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

修改物料配套分发

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