Commit 689ec9fb authored by jingnan's avatar jingnan 👀

台账界面入厂验收单修改

parent e697694c
......@@ -9,9 +9,9 @@
<!-- <div v-if="!allDisabled" class="sub-title" style="padding-bottom: 12px;">
物料检验详情
</div> -->
<equipmen-check-no v-if="type==='AirEquipment'" ref="AirEquipment" :basic-data="basicData" :job-response-in-test-data="data" />
<outSource-check-no v-if="type==='OutSource'" ref="OutSource" :basic-data="basicData" :job-response-in-test-data="data" />
<material-check-no v-if="type==='Material'" ref="Material" :basic-data="basicData" :job-response-in-test-data="data" />
<equipmen-check-no v-if="type==='AirEquipment'" ref="AirEquipment" :basic-data="basicData.fromInventory?jobOrderInfo:basicData" :job-response-in-test-data="data" />
<outSource-check-no v-if="type==='OutSource'" ref="OutSource" :basic-data="basicData.fromInventory?jobOrderInfo:basicData" :job-response-in-test-data="data" />
<material-check-no v-if="type==='Material'" ref="Material" :basic-data="basicData.fromInventory?jobOrderInfo:basicData" :job-response-in-test-data="data" />
</div>
</template>
<script>
......@@ -37,7 +37,8 @@ export default {
data: null,
basicDataId: null,
inventoryReqId: null,
allDisabled: that.basicData.allDisabled
allDisabled: that.basicData.allDisabled,
jobOrderInfo: null
}
},
computed: {},
......@@ -58,29 +59,61 @@ export default {
// 初始化数据
},
mounted() {
this.basicDataId = this.basicData.id
this.inventoryReqId = this.basicData.inventoryReqId
this.getInventoryRequest(this.basicData.inventoryReqId)
if (this.basicData.fromInventory) {
this.basicData.jobResponseId && this.getJobOrderInfo(this.basicData.jobResponseId)
} else {
this.basicDataId = this.basicData.id
this.inventoryReqId = this.basicData.inventoryReqId
this.getInventoryRequest(this.basicData.inventoryReqId)
}
},
methods: {
getJobOrderInfo(jobResponseId) {
const param = {
'pageFrom': 1,
'pageSize': 1,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'id',
'operator': 'EQ',
'value': jobResponseId
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'jobOrder',
'pageFrom': 1,
'pageSize': 9999
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('JobResponseInStorage/search', param).then(res => {
const jobOrder = res.items.content && res.items.content[0] && res.items.content[0].jobOrder || {}
this.basicDataId = jobOrder.id
this.inventoryReqId = jobOrder.inventoryReqId
this.jobOrderInfo = {
...jobOrder,
...this.basicData
}
this.getInventoryRequest(jobOrder.inventoryReqId)
}).catch((err) => {
console.log(err)
})
},
getInventoryRequest(id) {
if (!id) return
get(`InventoryRequest/${id}`).then(res => {
const type = res.items.billType
// switch (type) {
// case '器材':
// case 'Material':
// this.type = 'Material'
// break
// case '机载设备':
// case 'AirEquipment':
// this.initData('AirEquipment')
// break
// case '外包产品':
// case 'OutSource':
// this.initData('OutSource')
// break
// }
if (!type) return this.$utils.showMessageWarning('未查询到验收单信息!')
this.initData(type)
}).catch((err) => {
......
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