This commit is contained in:
parent
422aaeca3b
commit
d2c4e2c65f
|
|
@ -96,9 +96,9 @@
|
|||
<div >
|
||||
<el-table :data="tableData" border stripe :span-method="handleSpanMethod" height="546">
|
||||
<!-- <el-table :data="tableData" >-->
|
||||
<el-table-column label="序号" align="center" width="55" type="index" fixed />
|
||||
<el-table-column label="序号" align="center" width="55" type="index" />
|
||||
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip column-key="orderNumber"
|
||||
fixed min-width="200" />
|
||||
min-width="200" />
|
||||
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100" />
|
||||
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 4)">查看</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in columns" v-if="item.visible" :key="index" align="center"
|
||||
<el-table-column v-for="(item, index) in columns2" v-if="item.visible" :key="index" align="center"
|
||||
show-overflow-tooltip :label="item.label" :prop="item.prop">
|
||||
<template v-slot="{ row }" v-if="/^feature(Item|Value)\d+$/.test(item.prop)">
|
||||
<span>
|
||||
|
|
@ -240,6 +240,7 @@ export default {
|
|||
pageSize: 10
|
||||
},
|
||||
manufacturerList: [],
|
||||
columns2: [],
|
||||
columns: [
|
||||
{ key: 26, label: `特征项1`, prop: 'featureItem1', visible: true },
|
||||
{ key: 27, label: `特征值1`, prop: 'featureValue1', visible: true },
|
||||
|
|
@ -298,6 +299,18 @@ export default {
|
|||
|
||||
// 按 orderNumber 排序,确保相同订单连续
|
||||
this.tableData.sort((a, b) => a.orderNumber.localeCompare(b.orderNumber))
|
||||
let maxLength = 0
|
||||
this.tableData.forEach((item) => {
|
||||
if (item.propertyVoList && item.propertyVoList.length > maxLength) {
|
||||
maxLength = item.propertyVoList.length
|
||||
}
|
||||
})
|
||||
maxLength = maxLength > 0 ? maxLength * 2 : 0
|
||||
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}, 200)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取装备申请列表失败:', error)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<span class="page-title">{{ pageTitle }}</span>
|
||||
</div>
|
||||
<div class="dialog-footer" style="float: right">
|
||||
<el-button size="medium" @click="goBack">取消</el-button>
|
||||
<el-button size="medium" @click="close">取消</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleSubmit">确认</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -512,7 +512,13 @@ export default {
|
|||
},
|
||||
// 返回上一页
|
||||
goBack() {
|
||||
this.$tab.closePage()
|
||||
// this.$tab.closePage()
|
||||
this.$router.go(-1)
|
||||
},
|
||||
close() {
|
||||
this.$tab.closePage({ path: '/equipment/equipment-input/add' }).then(() => {
|
||||
this.$router.go(-1)
|
||||
})
|
||||
},
|
||||
deviceTypeChange(val) {
|
||||
if (val === 0) {
|
||||
|
|
|
|||
|
|
@ -170,7 +170,6 @@
|
|||
align="center"
|
||||
show-overflow-tooltip
|
||||
column-key="orderNumber"
|
||||
fixed
|
||||
min-width="200"
|
||||
/>
|
||||
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100" />
|
||||
|
|
@ -205,7 +204,7 @@
|
|||
<el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="100" />
|
||||
<el-table-column prop="manufacturer" label="生产厂家" show-overflow-tooltip align="center" min-width="100" />
|
||||
<el-table-column prop="productionDate" label="出厂日期" show-overflow-tooltip align="center" min-width="100" />
|
||||
<!-- <el-table-column prop="purchaseDate" label="采购日期" align="center"/>-->
|
||||
<el-table-column prop="purchaseDate" label="采购日期" align="center" />
|
||||
<el-table-column
|
||||
prop="originalValue"
|
||||
label="资产原值(万元)"
|
||||
|
|
@ -213,8 +212,8 @@
|
|||
align="center"
|
||||
min-width="100"
|
||||
/>
|
||||
<!-- <el-table-column prop="maxServiceLifeYears" label="最大使用年限(年)" align="center"/>-->
|
||||
<!-- <el-table-column prop="nextMaintenanceDate" label="下次维保日期" align="center"/>-->
|
||||
<el-table-column prop="maxServiceLifeYears" label="最大使用年限(年)" align="center" />
|
||||
<el-table-column prop="nextMaintenanceDate" label="下次维保日期" align="center" />
|
||||
<el-table-column prop="province" label="所属省份" show-overflow-tooltip align="center" min-width="100" />
|
||||
<el-table-column prop="appearanceImages" label="装备外观" show-overflow-tooltip align="center" min-width="100">
|
||||
<template v-slot="{ row }">
|
||||
|
|
@ -257,7 +256,7 @@
|
|||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
prop="orderCreateUser"
|
||||
label="申请人"
|
||||
show-overflow-tooltip
|
||||
|
|
@ -272,7 +271,7 @@
|
|||
align="center"
|
||||
fixed="right"
|
||||
min-width="100"
|
||||
/>
|
||||
/> -->
|
||||
<el-table-column
|
||||
prop="entryStatus"
|
||||
align="center"
|
||||
|
|
@ -301,12 +300,12 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination-wrapper">
|
||||
<pagination
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
<pagination
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<EquipmentEntryEditDialog
|
||||
|
|
|
|||
|
|
@ -155,11 +155,11 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableData" :span-method="handleSpanMethod" border stripe height="546">
|
||||
<el-table ref="tableRef" :data="tableData" :span-method="handleSpanMethod" border stripe height="546">
|
||||
<!-- <el-table :data="tableData" >-->
|
||||
<el-table-column label="序号" align="center" width="55" type="index" fixed/>
|
||||
<el-table-column label="序号" align="center" width="55" type="index"/>
|
||||
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip
|
||||
column-key="orderNumber" fixed min-width="200"
|
||||
column-key="orderNumber" min-width="200"
|
||||
/>
|
||||
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/>
|
||||
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
|
||||
|
|
@ -390,6 +390,10 @@ export default {
|
|||
})
|
||||
maxLength = maxLength > 0 ? maxLength * 2 : 0
|
||||
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}, 200)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取装备申请列表失败:', error)
|
||||
|
|
|
|||
|
|
@ -141,11 +141,11 @@
|
|||
重置
|
||||
</el-button>
|
||||
|
||||
<el-button class="primary-lease" type="primary" @click="allApproved()" v-if="!this.isAddVisible && this.orderStatus =='0'">
|
||||
<el-button class="primary-lease" type="primary" @click="allApproved()" v-if="!isAddVisible && orderStatus =='0'">
|
||||
全部通过
|
||||
</el-button>
|
||||
|
||||
<el-button class="primary-lease" type="primary" @click="allReject()" v-if="!this.isAddVisible && this.orderStatus =='0'">
|
||||
<el-button class="primary-lease" type="primary" @click="allReject()" v-if="!isAddVisible && orderStatus =='0'">
|
||||
全部驳回
|
||||
</el-button>
|
||||
|
||||
|
|
@ -154,11 +154,11 @@
|
|||
</el-row>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableData" :span-method="handleSpanMethod" height="546">
|
||||
<el-table ref="tableRef" :data="tableData" :span-method="handleSpanMethod" height="546">
|
||||
<!-- <el-table :data="tableData" >-->
|
||||
<el-table-column label="序号" align="center" width="55" type="index" fixed/>
|
||||
<el-table-column label="序号" align="center" width="55" type="index"/>
|
||||
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip
|
||||
column-key="orderNumber" fixed min-width="200"
|
||||
column-key="orderNumber" min-width="200"
|
||||
/>
|
||||
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/>
|
||||
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
|
||||
|
|
@ -238,23 +238,25 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="300" fixed="right">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" @click="handleViewDetail(row)">
|
||||
<i class="el-icon-view"></i> 查看
|
||||
<el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)">
|
||||
查看
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="approved(row)"
|
||||
v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0'"
|
||||
>
|
||||
<i class="el-icon-edit"></i> 通过
|
||||
通过
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="reject(row)"
|
||||
v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0' "
|
||||
>
|
||||
<i class="el-icon-delete"></i> 驳回
|
||||
驳回
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
|
|
@ -350,7 +352,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
const { orderId, status, orderStatus, isAddVisible, isApprovalVisible } = this.$route.query
|
||||
this.isAddVisible = isAddVisible == 'true'
|
||||
this.isAddVisible = isAddVisible
|
||||
if (orderId) {
|
||||
this.queryParams.orderId = orderId
|
||||
this.orderStatus = status || orderStatus
|
||||
|
|
@ -387,6 +389,10 @@ export default {
|
|||
})
|
||||
maxLength = maxLength > 0 ? maxLength * 2 : 0
|
||||
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}, 200)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取装备申请列表失败:', error)
|
||||
|
|
|
|||
|
|
@ -319,6 +319,7 @@
|
|||
</el-row>
|
||||
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="tableData"
|
||||
:key="Date.now()"
|
||||
@selection-change="handleSelectionChange"
|
||||
|
|
@ -1302,6 +1303,10 @@ export default {
|
|||
})
|
||||
maxLength = maxLength > 0 ? maxLength * 2 : 0
|
||||
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}, 200)
|
||||
} catch (error) {
|
||||
// this.$message.error('获取设备列表失败:' + (error.message || '未知错误'))
|
||||
console.error(error)
|
||||
|
|
|
|||
Loading…
Reference in New Issue