解决增加以销定购模块后产生的单据bug
This commit is contained in:
@@ -1292,6 +1292,20 @@
|
||||
if(record.status === '3') {
|
||||
//部分采购|部分销售的时候显示全部列
|
||||
this.columns = this.defColumns
|
||||
} else if(record.purchaseStatus === '3') {
|
||||
//将已出库的标题转为已采购,针对销售订单转采购订单的场景
|
||||
let currentCol = []
|
||||
for(let i=0; i<this.defColumns.length; i++){
|
||||
let info = {}
|
||||
info.title = this.defColumns[i].title
|
||||
info.dataIndex = this.defColumns[i].dataIndex
|
||||
info.width = this.defColumns[i].width
|
||||
if(this.defColumns[i].dataIndex === 'finishNumber') {
|
||||
info.title = '已采购'
|
||||
}
|
||||
currentCol.push(info)
|
||||
}
|
||||
this.columns = currentCol
|
||||
} else {
|
||||
let currentCol = []
|
||||
for(let i=0; i<this.defColumns.length; i++){
|
||||
@@ -1348,9 +1362,16 @@
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model,'id'))
|
||||
});
|
||||
let showType = 'basic'
|
||||
if(record.status === '3') {
|
||||
showType = 'basic'
|
||||
} else if(record.purchaseStatus === '3') {
|
||||
showType = 'purchase'
|
||||
}
|
||||
let params = {
|
||||
headerId: this.model.id,
|
||||
mpList: getMpListShort(Vue.ls.get('materialPropertyList')) //扩展属性
|
||||
mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
|
||||
linkType: showType
|
||||
}
|
||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||
this.requestSubTableData(record, type, url, params);
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
selectedDetailRowKeys: [],
|
||||
selectBillRows: [],
|
||||
selectBillDetailRows: [],
|
||||
showType: 'list',
|
||||
showType: 'basic',
|
||||
selectType: 'list',
|
||||
linkNumber: '',
|
||||
organId: '',
|
||||
@@ -195,13 +195,14 @@
|
||||
this.visible = true;
|
||||
this.loadData(1)
|
||||
},
|
||||
purchaseShow(type, subType, organType, status) {
|
||||
purchaseShow(type, subType, organType, status, purchaseStatus) {
|
||||
this.selectType = 'list'
|
||||
this.showType = 'purchase'
|
||||
this.queryParam.type = type
|
||||
this.queryParam.subType = subType
|
||||
this.queryParam.roleType = '全部数据'
|
||||
this.queryParam.status = status
|
||||
this.queryParam.purchaseStatus = purchaseStatus
|
||||
this.columns[0].title = organType
|
||||
this.model = Object.assign({}, {});
|
||||
this.visible = true;
|
||||
|
||||
@@ -194,6 +194,8 @@
|
||||
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.normal },
|
||||
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.normal },
|
||||
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.normal },
|
||||
{ title: '原数量', key: 'preNumber', width: '4%', type: FormTypes.normal },
|
||||
{ title: '已采购', key: 'finishNumber', width: '4%', type: FormTypes.normal },
|
||||
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
@@ -235,6 +237,8 @@
|
||||
this.materialTable.columns[1].type = FormTypes.popupJsh
|
||||
this.getSystemConfig()
|
||||
this.changeColumnHide()
|
||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
||||
if (this.action === 'add') {
|
||||
this.addInit(this.prefixNo)
|
||||
this.fileList = []
|
||||
|
||||
Reference in New Issue
Block a user