|
|
|
@ -1374,6 +1374,42 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
serialNumber: '106002Table1FirstToolId', |
|
|
|
tableId: "106002Table1", |
|
|
|
tableName: "刀具申请主表", |
|
|
|
columnProp: "firstToolId", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "工具编码", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
serialNumber: '106002Table1FirstToolDesc', |
|
|
|
tableId: "106002Table1", |
|
|
|
tableName: "刀具申请主表", |
|
|
|
columnProp: "firstToolDesc", |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: "工具描述", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 150 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
@ -2314,6 +2350,8 @@ export default { |
|
|
|
this.dataForm.sp = '' |
|
|
|
} |
|
|
|
this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp)) |
|
|
|
// 加载每条记录的首条工具明细信息 |
|
|
|
this.loadToolDetailInfo() |
|
|
|
if (this.dataList1.length > 0) { |
|
|
|
this.$refs.mainTable.setCurrentRow(this.dataList1[0]); |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0])); |
|
|
|
@ -2326,6 +2364,30 @@ export default { |
|
|
|
}) |
|
|
|
this.isFilterSearch = false |
|
|
|
}, |
|
|
|
// 加载每条申请记录的首条工具明细信息 |
|
|
|
loadToolDetailInfo() { |
|
|
|
this.dataList1.forEach(item => { |
|
|
|
searchProjectToolApplyDetail({ |
|
|
|
site: item.site, |
|
|
|
applyNo: item.applyNo |
|
|
|
}).then(({data}) => { |
|
|
|
if (data && data.code === 0 && data.rows && data.rows.length > 0) { |
|
|
|
const firstDetail = data.rows[0] |
|
|
|
// 使用$set确保响应式更新 |
|
|
|
this.$set(item, 'firstToolId', firstDetail.toolId) |
|
|
|
this.$set(item, 'firstToolDesc', firstDetail.toolDesc) |
|
|
|
} else { |
|
|
|
// 如果没有明细数据,清空这两个字段 |
|
|
|
this.$set(item, 'firstToolId', '') |
|
|
|
this.$set(item, 'firstToolDesc', '') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
// 忽略错误,只是显示为空 |
|
|
|
this.$set(item, 'firstToolId', '') |
|
|
|
this.$set(item, 'firstToolDesc', '') |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
//单击切换订单 |
|
|
|
changeData(row) { |
|
|
|
this.dataForm.status = row.status |
|
|
|
@ -2945,6 +3007,8 @@ export default { |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.dataList1 = data.page.list |
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
// 加载每条记录的首条工具明细信息 |
|
|
|
this.loadToolDetailInfo() |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
|