Commit 9c7c6dc6 authored by jingnan's avatar jingnan 👀

退库入库字段修改

parent 3ea85d34
...@@ -95,8 +95,8 @@ export default { ...@@ -95,8 +95,8 @@ export default {
'extMaterialId': inventoryData.extMaterialId, 'extMaterialId': inventoryData.extMaterialId,
'testNo': inventoryData.testNo, 'testNo': inventoryData.testNo,
'suppname': inventoryData.suppname, 'suppname': inventoryData.suppname,
'backItemId': this.selection.id, 'outStorageId': this.selection.id,
'backItemIdType': this.selection.subTypeName, 'outStorageIdType': this.selection.subTypeName,
'backAmount': this.selection.backAmount || 0, 'backAmount': this.selection.backAmount || 0,
'backedAmount': this.selection.backedAmount || 0, 'backedAmount': this.selection.backedAmount || 0,
'scrapCount': this.selection.scrapCount || 0, 'scrapCount': this.selection.scrapCount || 0,
......
...@@ -118,17 +118,17 @@ export default { ...@@ -118,17 +118,17 @@ export default {
if (val && val.id) { if (val && val.id) {
if (this.basicData.inStorageRequestItems) { if (this.basicData.inStorageRequestItems) {
this.tableData = this.basicData.inStorageRequestItems.map(item => { this.tableData = this.basicData.inStorageRequestItems.map(item => {
if (item.backItem) { if (item.outStorage) {
item.backAmount = item.backItem.backAmount item.backAmount = item.outStorage.backAmount
item.backedAmount = item.backItem.backedAmount item.backedAmount = item.outStorage.backedAmount
item.outsideAmount = item.backItem.outsideAmount item.outsideAmount = item.outStorage.outsideAmount
item.scrapCount = item.backItem.scrapCount item.scrapCount = item.outStorage.scrapCount
if (item.backItem.inventory) { if (item.outStorage.inventory) {
item.testNo = item.backItem.inventory.testNo item.testNo = item.outStorage.inventory.testNo
item.suppname = item.backItem.inventory.suppname item.suppname = item.outStorage.inventory.suppname
} }
if (item.backItem.jobOrder && item.backItem.jobOrder.outStorageRequest) { if (item.outStorage.jobOrder && item.outStorage.jobOrder.outStorageRequest) {
item.reqNo = item.backItem.jobOrder.outStorageRequest.reqNo || '' item.reqNo = item.outStorage.jobOrder.outStorageRequest.reqNo || ''
} }
} }
return item return item
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
type: 'success', type: 'success',
message: '删除成功!' 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) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
submitEvent({ formData, addContinue }) { submitEvent({ formData, addContinue }) {
const onlyFlag = this.tableData.find(item => item.reqNo !== formData[0].reqNo) const onlyFlag = this.tableData.find(item => item.reqNo !== formData[0].reqNo)
if (onlyFlag) return this.$utils.showMessageWarning('只能添加同一单据下的数据,请重新选择!') 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('相同数据不能重复添加,请重新选择!') if (extMaterialIds) return this.$utils.showMessageWarning('相同数据不能重复添加,请重新选择!')
this.tableData.push(...formData) this.tableData.push(...formData)
this.dialogShow = addContinue || false 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