优化单据优化嵌套子表格的功能
This commit is contained in:
@@ -719,15 +719,11 @@ export const BillListMixin = {
|
|||||||
showType = 'purchase'
|
showType = 'purchase'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let isReadOnly = '1'
|
|
||||||
if(record.subType === '组装单' || record.subType === '拆卸单') {
|
|
||||||
isReadOnly = '0'
|
|
||||||
}
|
|
||||||
let params = {
|
let params = {
|
||||||
headerId: record.id,
|
headerId: record.id,
|
||||||
mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
|
mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
|
||||||
linkType: showType,
|
linkType: showType,
|
||||||
isReadOnly: isReadOnly
|
isReadOnly: '0'
|
||||||
}
|
}
|
||||||
let url = '/depotItem/getDetailList'
|
let url = '/depotItem/getDetailList'
|
||||||
this.requestSubTableData(record, url, params)
|
this.requestSubTableData(record, url, params)
|
||||||
@@ -864,6 +860,26 @@ export const BillListMixin = {
|
|||||||
}
|
}
|
||||||
this.detailColumns = currentCol
|
this.detailColumns = currentCol
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
//动态替换扩展字段
|
||||||
|
handleChangeOtherField() {
|
||||||
|
let mpStr = getMpListShort(Vue.ls.get('materialPropertyList'))
|
||||||
|
if(mpStr) {
|
||||||
|
let mpArr = mpStr.split(',')
|
||||||
|
if(mpArr.length ===3) {
|
||||||
|
for (let i = 0; i < this.defDetailColumns.length; i++) {
|
||||||
|
if(this.defDetailColumns[i].dataIndex === 'otherField1') {
|
||||||
|
this.defDetailColumns[i].title = mpArr[0]
|
||||||
|
}
|
||||||
|
if(this.defDetailColumns[i].dataIndex === 'otherField2') {
|
||||||
|
this.defDetailColumns[i].title = mpArr[1]
|
||||||
|
}
|
||||||
|
if(this.defDetailColumns[i].dataIndex === 'otherField3') {
|
||||||
|
this.defDetailColumns[i].title = mpArr[2]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user