Commit f41112e6 authored by jingnan's avatar jingnan 👀

配套出库申请修改

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