| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | @change="handleTableChange" |
| | | :loading="loading" |
| | | > |
| | | |
| | | <template |
| | |
| | | </a-row> |
| | | <!-- :disabled="false" --> |
| | | </div> |
| | | <actual-material-select ref="actualMaterialSelect"> |
| | | <actual-material-select ref="actualMaterialSelect" > |
| | | <!-- @sendMaterialRecord="sendMaterialRecord" --> |
| | | </actual-material-select> |
| | | <j-select-spare-part-modal ref='JSelectSparePartModal'></j-select-spare-part-modal> |
| | | <j-select-spare-part-modal ref='JSelectSparePartModal' @getSelectRows="getSelectRows"></j-select-spare-part-modal> |
| | | </a-card> |
| | | </template> |
| | | <script> |
| | |
| | | lock: "/eam/maintenanceOrderActualMaterial/lock", |
| | | unLock: "/eam/maintenanceOrderActualMaterial/unLock" |
| | | }, |
| | | changeIndex: 0 |
| | | changeIndex: 0, |
| | | loading:false, |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.$message.error('使用数量不能大于可用数量!'); |
| | | return false; |
| | | } |
| | | this.confirmLoading = true; |
| | | this.loading = true; |
| | | postAction(this.url.lock, record).then(res => { |
| | | if (res.success) { |
| | | this.$message.success("库存锁定成功!") |
| | |
| | | this.$message.error(res.message) |
| | | } |
| | | }).finally(res => { |
| | | that.confirmLoading = false |
| | | that.loading = false |
| | | that.loadData(); |
| | | }) |
| | | |
| | | }, |
| | | handleUnLock(record) { |
| | | let that = this; |
| | | this.confirmLoading = true; |
| | | this.loading = true; |
| | | postAction(this.url.unLock, record).then(res => { |
| | | if (res.success) { |
| | | this.$message.success("库存解锁成功!") |
| | |
| | | this.$message.error(res.message) |
| | | } |
| | | }).finally(res => { |
| | | that.confirmLoading = false |
| | | that.loading = false |
| | | that.loadData(); |
| | | }) |
| | | }, |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | }, |
| | | mounted() { |
| | | let newActualMaterials = []; |
| | | this.$bus.$on('selectionRows', (data) => { |
| | | getSelectRows(data){ |
| | | let newActualMaterials = []; |
| | | for (let i = 0; i < data.length; i++) { |
| | | newActualMaterials.push({ |
| | | // id: this.getUuiD(16), |
| | |
| | | that.loadData(); |
| | | |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | |
| | | } |