优化单据退货的逻辑
This commit is contained in:
parent
87dafe79fb
commit
02fcd2d35e
@ -282,9 +282,14 @@
|
||||
let listEx = []
|
||||
for(let j=0; j<list.length; j++){
|
||||
let info = list[j];
|
||||
//去掉已经全部转换的明细
|
||||
if(info.preNumber !== info.finishNumber) {
|
||||
//去掉已经全部转换的明细
|
||||
listEx.push(info)
|
||||
} else {
|
||||
if(this.queryParam.subType === '采购' || this.queryParam.subType === '销售' || this.queryParam.subType === '零售') {
|
||||
//针对退货单,不过滤明细
|
||||
listEx.push(info)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.dataSourceDetail = listEx
|
||||
|
||||
@ -246,6 +246,8 @@
|
||||
{ title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.popupJsh, kind: 'batch', multi: false },
|
||||
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.normal },
|
||||
{ title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
|
||||
{ title: '原数量', key: 'preNumber', width: '5%', type: FormTypes.normal },
|
||||
{ title: '已退货', key: 'finishNumber', width: '5%', type: FormTypes.normal },
|
||||
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
@ -254,7 +256,8 @@
|
||||
{ title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber,placeholder: '%'},
|
||||
{ title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true },
|
||||
{ title: '价税合计', key: 'taxLastMoney', width: '6%', type: FormTypes.inputNumber, statistics: true },
|
||||
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input }
|
||||
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input },
|
||||
{ title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
|
||||
]
|
||||
},
|
||||
confirmLoading: false,
|
||||
@ -294,6 +297,8 @@
|
||||
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
||||
if (this.action === 'add') {
|
||||
this.addInit(this.prefixNo)
|
||||
this.fileList = []
|
||||
@ -373,11 +378,14 @@
|
||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||
this.rowCanEdit = false
|
||||
this.materialTable.columns[1].type = FormTypes.normal
|
||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
||||
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
||||
let listEx = []
|
||||
let allTaxLastMoney = 0
|
||||
for(let j=0; j<selectBillDetailRows.length; j++) {
|
||||
let info = selectBillDetailRows[j];
|
||||
info.linkId = info.id
|
||||
allTaxLastMoney += info.taxLastMoney
|
||||
listEx.push(info)
|
||||
this.changeColumnShow(info)
|
||||
|
||||
@ -237,12 +237,15 @@
|
||||
{ title: '批号', key: 'batchNumber', width: '8%', type: FormTypes.input },
|
||||
{ title: '有效期', key: 'expirationDate',width: '9%', type: FormTypes.date },
|
||||
{ title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
|
||||
{ title: '原数量', key: 'preNumber', width: '6%', type: FormTypes.normal },
|
||||
{ title: '已退货', key: 'finishNumber', width: '6%', type: FormTypes.normal },
|
||||
{ title: '数量', key: 'operNumber', width: '6%', type: FormTypes.inputNumber, statistics: true,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '单价', key: 'unitPrice', width: '6%', type: FormTypes.inputNumber},
|
||||
{ title: '金额', key: 'allPrice', width: '6%', type: FormTypes.inputNumber, statistics: true },
|
||||
{ title: '备注', key: 'remark', width: '7%', type: FormTypes.input }
|
||||
{ title: '备注', key: 'remark', width: '7%', type: FormTypes.input },
|
||||
{ title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
|
||||
]
|
||||
},
|
||||
confirmLoading: false,
|
||||
@ -279,6 +282,8 @@
|
||||
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
||||
if (this.action === 'add') {
|
||||
this.addInit(this.prefixNo)
|
||||
this.fileList = []
|
||||
@ -376,11 +381,14 @@
|
||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||
this.rowCanEdit = false
|
||||
this.materialTable.columns[1].type = FormTypes.normal
|
||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
||||
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
||||
let listEx = []
|
||||
let allTaxLastMoney = 0
|
||||
for(let j=0; j<selectBillDetailRows.length; j++) {
|
||||
let info = selectBillDetailRows[j];
|
||||
info.linkId = info.id
|
||||
allTaxLastMoney += info.allPrice
|
||||
listEx.push(info)
|
||||
this.changeColumnShow(info)
|
||||
|
||||
@ -253,6 +253,8 @@
|
||||
{ title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.input },
|
||||
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.date },
|
||||
{ title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
|
||||
{ title: '原数量', key: 'preNumber', width: '5%', type: FormTypes.normal },
|
||||
{ title: '已退货', key: 'finishNumber', width: '5%', type: FormTypes.normal },
|
||||
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
@ -261,7 +263,8 @@
|
||||
{ title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber,placeholder: '%'},
|
||||
{ title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true },
|
||||
{ title: '价税合计', key: 'taxLastMoney', width: '6%', type: FormTypes.inputNumber, statistics: true },
|
||||
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input }
|
||||
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input },
|
||||
{ title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
|
||||
]
|
||||
},
|
||||
confirmLoading: false,
|
||||
@ -301,6 +304,8 @@
|
||||
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
||||
if (this.action === 'add') {
|
||||
this.addInit(this.prefixNo)
|
||||
this.personList.value = ''
|
||||
@ -386,11 +391,14 @@
|
||||
linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) {
|
||||
this.rowCanEdit = false
|
||||
this.materialTable.columns[1].type = FormTypes.normal
|
||||
this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
|
||||
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
|
||||
if(selectBillDetailRows && selectBillDetailRows.length>0) {
|
||||
let listEx = []
|
||||
let allTaxLastMoney = 0
|
||||
for(let j=0; j<selectBillDetailRows.length; j++) {
|
||||
let info = selectBillDetailRows[j];
|
||||
info.linkId = info.id
|
||||
allTaxLastMoney += info.taxLastMoney
|
||||
listEx.push(info)
|
||||
this.changeColumnShow(info)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user