Commit 08aa7bd6 authored by “lixuyan”'s avatar “lixuyan”

修改物料配套分发

parent 5bfa579a
......@@ -183,7 +183,12 @@ export default {
.searchApi('AircraftSorties', params)
.then((res) => {
this.sortiesData = []
if (res) {
if (res.items && res.items.content) {
res.items.content.map((item, index) => {
if (item.defCode === 'NA') {
res.items.content.unshift(res.items.content.splice(index, 1)[0])
}
})
this.sortiesData = res.items.content.map((row) => {
return {
value: row.id,
......
......@@ -163,7 +163,9 @@
show-overflow-tooltip
>
<template slot-scope="scope">
<span v-if="scope.row.jobResponseOutStorageVOS"> {{ scope.row.jobResponseOutStorageVOS[0].inventory.extMaterial.modelNo }}</span>
<span
v-if="scope.row.weigthObj"
> {{ scope.row.weigthObj.inventory.extMaterial.modelNo }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -173,7 +175,7 @@
sortable
>
<template slot-scope="scope">
<span v-if="scope.row.jobResponseOutStorageVOS"> {{ scope.row.jobResponseOutStorageVOS[0].inventory.jobResponse.jobOrder.arrivalVer }}</span>
<span v-if="scope.row.weigthObj"> {{ scope.row.weigthObj.inventory.jobResponse.jobOrder.arrivalVer }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -184,7 +186,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
<span v-if="scope.row.jobResponseOutStorageVOS"> {{ scope.row.jobResponseOutStorageVOS[0].inventory.jobResponse.jobOrder.inventoryJobResponses[0].testNo }}</span>
<span v-if="scope.row.weigthObj"> {{ scope.row.weigthObj.inventory.jobResponse.jobOrder.inventoryJobResponses[0].testNo }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -194,7 +196,7 @@
sortable
>
<template slot-scope="scope">
<span v-if="scope.row.jobResponseOutStorageVOS"> {{ scope.row.jobResponseOutStorageVOS[0].jobOrder.checkoutAmount }}</span>
<span v-if="scope.row.weigthObj"> {{ scope.row.weigthObj.jobOrder.checkoutAmount }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -204,7 +206,7 @@
sortable
>
<template slot-scope="scope">
<span v-if="scope.row.jobResponseOutStorageVOS"> {{ scope.row.jobResponseOutStorageVOS[0].outsideAmount }}</span>
<span v-if="scope.row.weigthObj"> {{ scope.row.weigthObj.outsideAmount }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -229,10 +231,10 @@
/>
<span
v-else-if="
scope.row.jobResponseOutStorageVOS &&
scope.row.weigthObj &&
scope.row.extMaterial.resType2.typeName === '外购成品'
"
>{{ scope.row.jobResponseOutStorageVOS[0].actualWeight }}</span>
>{{ scope.row.weigthObj.actualWeight }}</span>
<i v-if="scope.row.actualWeightLoading" class="el-icon-loading" />
</template>
</el-table-column>
......@@ -256,7 +258,7 @@
@focus="tableInputFocus"
@blur="deeTableBlur(scope.row, false)"
/>
<span v-else-if="scope.row.jobResponseOutStorageVOS && scope.row.extMaterial.resType2.typeName === '外购成品'">{{ scope.row.jobResponseOutStorageVOS[0].removeWeight }}</span>
<span v-else-if="scope.row.weigthObj && scope.row.extMaterial.resType2.typeName === '外购成品'">{{ scope.row.weigthObj.removeWeight }}</span>
<i v-if="scope.row.removeWeightLoading" class="el-icon-loading" />
</template>
</el-table-column>
......@@ -353,7 +355,8 @@ export default {
{}
)
.then((res) => {
this.tableData = res.items.map((p) => {
const arr = []
res.items.map((p) => {
this.stateList.forEach(element => {
if (element.value === p.reqStatus) {
if (element.value === 'Not') {
......@@ -363,16 +366,58 @@ export default {
}
}
})
return {
popoverVisible: false,
uuid: uuidv4(),
...p,
actualWeightSelect: false,
removeWeightSelect: false,
actualWeightLoading: false,
removeWeightLoading: false
if (p.jobResponseOutStorageVOS && p.jobResponseOutStorageVOS.length > 0) {
p.jobResponseOutStorageVOS.forEach(item => {
arr.push({
weigthObj: item,
popoverVisible: false,
uuid: uuidv4(),
...p,
actualWeightSelect: false,
removeWeightSelect: false,
actualWeightLoading: false,
removeWeightLoading: false
})
})
} else {
arr.push({
weigthObj: null,
popoverVisible: false,
uuid: uuidv4(),
...p,
actualWeightSelect: false,
removeWeightSelect: false,
actualWeightLoading: false,
removeWeightLoading: false
})
}
})
this.tableData = arr
// this.tableData = res.items.map((p) => {
// if (p.jobResponseOutStorageVOS && p.jobResponseOutStorageVOS.length > 0) {
// p.jobResponseOutStorageVOS.forEach(item => {
// })
// }
// this.stateList.forEach(element => {
// if (element.value === p.reqStatus) {
// if (element.value === 'Not') {
// p.stateName = '未出库'
// } else {
// p.stateName = element.label
// }
// }
// })
// return {
// popoverVisible: false,
// uuid: uuidv4(),
// ...p,
// actualWeightSelect: false,
// removeWeightSelect: false,
// actualWeightLoading: false,
// removeWeightLoading: false
// }
// })
this.tablePagination.total = res.items.length
})
.catch((err) => console.error(err))
......@@ -408,9 +453,9 @@ export default {
return
}
this.timer = setTimeout(function() {
if (column.property === 'jobResponseOutStorageVOS[0].actualWeight') {
if (column.property === 'actualWeight') {
row.actualWeightSelect = false
} else if (column.property === 'jobResponseOutStorageVOS[0].removeWeight') {
} else if (column.property === 'removeWeight') {
row.removeWeightSelect = false
}
clearTimeout(this.timer)
......@@ -430,7 +475,7 @@ export default {
var that = this
const param = {
operator: 'MODIFY',
id: row.jobResponseOutStorageVOS[0].id,
id: row.weigthObj.id,
actualWeight: row.actualWeight,
removeWeight: row.removeWeight
}
......
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