Commit 9c7c6dc6 authored by jingnan's avatar jingnan 👀

退库入库字段修改

parent 3ea85d34
......@@ -95,8 +95,8 @@ export default {
'extMaterialId': inventoryData.extMaterialId,
'testNo': inventoryData.testNo,
'suppname': inventoryData.suppname,
'backItemId': this.selection.id,
'backItemIdType': this.selection.subTypeName,
'outStorageId': this.selection.id,
'outStorageIdType': this.selection.subTypeName,
'backAmount': this.selection.backAmount || 0,
'backedAmount': this.selection.backedAmount || 0,
'scrapCount': this.selection.scrapCount || 0,
......
......@@ -118,17 +118,17 @@ export default {
if (val && val.id) {
if (this.basicData.inStorageRequestItems) {
this.tableData = this.basicData.inStorageRequestItems.map(item => {
if (item.backItem) {
item.backAmount = item.backItem.backAmount
item.backedAmount = item.backItem.backedAmount
item.outsideAmount = item.backItem.outsideAmount
item.scrapCount = item.backItem.scrapCount
if (item.backItem.inventory) {
item.testNo = item.backItem.inventory.testNo
item.suppname = item.backItem.inventory.suppname
if (item.outStorage) {
item.backAmount = item.outStorage.backAmount
item.backedAmount = item.outStorage.backedAmount
item.outsideAmount = item.outStorage.outsideAmount
item.scrapCount = item.outStorage.scrapCount
if (item.outStorage.inventory) {
item.testNo = item.outStorage.inventory.testNo
item.suppname = item.outStorage.inventory.suppname
}
if (item.backItem.jobOrder && item.backItem.jobOrder.outStorageRequest) {
item.reqNo = item.backItem.jobOrder.outStorageRequest.reqNo || ''
if (item.outStorage.jobOrder && item.outStorage.jobOrder.outStorageRequest) {
item.reqNo = item.outStorage.jobOrder.outStorageRequest.reqNo || ''
}
}
return item
......@@ -187,7 +187,7 @@ export default {
type: 'success',
message: '删除成功!'
})
this.tableData = this.tableData.filter(item => !this.selectionRows.map(item => item.backItemId).includes(item.backItemId))
this.tableData = this.tableData.filter(item => !this.selectionRows.map(item => item.outStorageId).includes(item.outStorageId))
}).catch((err) => {
console.log(err)
})
......@@ -201,7 +201,7 @@ export default {
submitEvent({ formData, addContinue }) {
const onlyFlag = this.tableData.find(item => item.reqNo !== formData[0].reqNo)
if (onlyFlag) return this.$utils.showMessageWarning('只能添加同一单据下的数据,请重新选择!')
const extMaterialIds = this.tableData.map(item => item.backItemId).includes(formData[0].backItemId)
const extMaterialIds = this.tableData.map(item => item.outStorageId).includes(formData[0].outStorageId)
if (extMaterialIds) return this.$utils.showMessageWarning('相同数据不能重复添加,请重新选择!')
this.tableData.push(...formData)
this.dialogShow = addContinue || false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment