Commit f41112e6 authored by jingnan's avatar jingnan 👀

配套出库申请修改

parent fb12f71e
......@@ -11,6 +11,7 @@
ref="outerTable"
:data="tableData"
align="center"
height="calc(100vh - 100px)"
:row-class-name="outerRowClassName"
row-key="id"
@selection-change="handleSelectionChange"
......@@ -139,6 +140,7 @@ export default {
{ 'title': '需求数量', 'key': 'reqAmount', 'minWidth': 100 },
{ 'title': '库房', 'key': 'productWorkCenter.extname', 'minWidth': 100 },
{ 'title': '占用数量', 'key': 'takeAmount', 'minWidth': 120 },
{ 'title': '状态', 'key': 'reqStatus' },
{ 'title': '版本', 'key': 'elecHardwareConfPieceNo' }
],
internalColumn: [
......@@ -181,25 +183,36 @@ export default {
layKey: 'matchApplyOccupy'
},
selectionRows: [],
currentRow: {}
currentRow: {},
reqStatusOptions: []
}
},
computed: {},
watch: {},
created() {
this.getDicListByCode()
},
mounted() {
this.getOuterTableData()
},
methods: {
async getDicListByCode() {
await this.$utils.getDicListByCode('StorageReqStatus').then(res => {
this.reqStatusOptions = res
})
},
getOuterTableData() {
this.loading = true
get(`/ExtSupportingItem/searchByAo?aoId=${this.basicData.extProcessPlanId}`).then(res => {
if (!res.items) return
this.tableData = res.items.map(item => {
item.internalDataList = []
let tempData = this.tableData.slice()
tempData = res.items.map((item) => {
const orgData = this.tableData.find(ori => ori.id === item.id)
item.internalDataList = orgData && orgData.internalDataList || []
item.reqStatus = this.$utils.getParamsFromLists(this.reqStatusOptions, 'value', item.reqStatus, 'label')
return item
})
this.tableData = tempData
}).catch(err => {
console.log(err)
}).finally(() => {
......@@ -244,6 +257,7 @@ export default {
this.$utils.showMessageSuccess('占用成功!')
this.handleClose()
this.getInternalColumn(this.selectionRows[0])
this.getOuterTableData()
}).catch(err => {
console.log(err)
}).finally(() => {
......@@ -253,6 +267,7 @@ export default {
post(`/ExtSupportingItem/adjust/cancelTake?jobResponseId=${row.id}`).then(res => {
this.$utils.showMessageSuccess('解除成功!')
this.getInternalColumn(outerRow)
this.getOuterTableData()
}).catch(err => {
console.log(err)
}).finally(() => {
......
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