Commit 00c89cc4 authored by arvin's avatar arvin

三期入库调整

parent 56e306a2
......@@ -28,6 +28,12 @@ export default {
componentName: '添加三期入库物料明细弹框',
name: 'AddPutStorageMaterialDetailDialog',
components: {},
props: {
basicData: {
type: Object,
default: () => {}
}
},
data() {
return {
selection: [],
......@@ -42,6 +48,20 @@ export default {
// const materialType = this.findByNameVnode(this, 'DeeAsForm').form.materialType
val.items.push({ fieldName: 'subTypeName', operator: 'EQ', value: 'JobResponseOutStorageExpire' }/*, { fieldName: 'inventory.materialType', operator: 'EQ', value: materialType }*/,
{ fieldName: 'state', operator: 'EQ', value: 'Finish' })
if (this.basicData.billType) {
val.items.push({
fieldName: 'inventory.jobResponse.jobOrder.inventoryReq.billType',
operator: 'EQ',
value: this.basicData.billType
})
}
if (this.basicData.extDxProductArea) {
val.items.push({
fieldName: 'inventory.jobResponse.jobOrder.storageZoneId',
operator: 'EQ',
value: this.basicData.extDxProductArea
})
}
const el = this.$refs['materielTable']
el.$refs.asCom.getData(val.items, val.items)
},
......@@ -56,12 +76,47 @@ export default {
this.selection = val
},
submitEvent() {
this.selection = this.$refs['materielTable'].$refs['asCom'].selectedData
if (this.selection.length) {
const showData = this.findByNameVnode(this, 'DeeAsTable').showData
if (showData.length) {
this.selection = this.selection.filter(item => !showData.some(x => x.inventoryId === item.inventoryId))
}
this.$emit('submitEvent', { formData: this.selection })
const data = this.selection.map(r => {
return {
'subTypeName': 'InStorageExpireItem',
'reqStatus': 'NOT',
'outStorageId': r.inventory.jobResponseId,
'outStorageIdType': r.inventory.jobResponseIdType,
'inventoryId': r.inventoryId,
'inventoryIdType': r.inventoryIdType,
'purchaseUnitId': r.inventory.jobResponse.jobOrder.extMaterial.extUnitId,
'purchaseUnitIdType': r.inventory.jobResponse.jobOrder.extMaterial.extUnitIdType,
'extDxSipplierId': r.inventory.jobResponse.jobOrder.extDxSipplierId,
'extDxSipplierIdType': r.inventory.jobResponse.jobOrder.extDxSipplierIdType,
extDxSipplier: r.inventory.jobResponse.jobOrder.extDxSipplier,
extMaterial: r.inventory.jobResponse.jobOrder.extMaterial,
'extMaterialId': r.inventory.jobResponse.jobOrder.extMaterialId,
'extMaterialIdType': r.inventory.jobResponse.jobOrder.extMaterialIdType,
'arrivalDate': r.inventory.jobResponse.jobOrder.arrivalDate,
'reqAmount': r.inventory.jobResponse.jobOrder.reqAmount,
'airModel': r.inventory.jobResponse.jobOrder.airModel,
'sorties': r.inventory.jobResponse.jobOrder.sorties,
'manufacturer': r.inventory.jobResponse.jobOrder.manufacturer,
'contractNo': r.inventory.jobResponse.jobOrder.contractNo,
'stockPrice': r.inventory.jobResponse.jobOrder.stockPrice,
'lotNo': r.inventory.jobResponse.jobOrder.lotNo,
'taxRate': r.inventory.jobResponse.jobOrder.taxRate,
'taxUnitPrice': r.inventory.jobResponse.jobOrder.taxUnitPrice,
'taxPrice': r.inventory.jobResponse.jobOrder.taxPrice,
'stockUnitPrice': r.inventory.jobResponse.jobOrder.stockUnitPrice,
'purchaseOrderNo': r.inventory.jobResponse.jobOrder.purchaseOrderNo,
'operator': 'ADD',
'isRoot': r.inventory.jobResponse.jobOrder.isRoot
}
})
this.$emit('submitEvent', { formData: data })
}
},
cancelEvent() {
......
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