| | |
| | | @click="syncERP" |
| | | >同步ERP |
| | | </el-button> |
| | | <el-button |
| | | v-waves |
| | | icon="el-icon-switch-button" |
| | | @click="orderClose" |
| | | >关闭订单 |
| | | </el-button> |
| | | <div style="display: flex"> |
| | | <el-button |
| | | v-waves |
| | | icon="el-icon-switch-button" |
| | | @click="orderClose" |
| | | >关闭订单 |
| | | </el-button> |
| | | <el-button |
| | | v-waves |
| | | icon="el-icon-delete" |
| | | @click="orderDel" |
| | | >删除订单 |
| | | </el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { ClosedErpOrder, ErpOrderSearch, MarkSaveErpOrder } from '@/api/produceManager' |
| | | import { ClosedErpOrder, DeleteErpOrder, ErpOrderSearch, MarkSaveErpOrder } from '@/api/produceManager' |
| | | import { handleDatetime } from '@/utils/global' |
| | | import { SeaveSearchErpOrder } from '@/api/ErpSyncMes' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | |
| | | // this.$message.error('同步失败!') |
| | | // }, 10000) |
| | | // } |
| | | }).catch(e => { |
| | | loading.close() |
| | | }) |
| | | }, |
| | | // 查询 |
| | |
| | | }, |
| | | rowClick(row) { |
| | | this.radioSelectedId = row.id |
| | | }, |
| | | |
| | | // 订单删除 |
| | | orderDel() { |
| | | if (this.radioSelectedId.length < 1) { |
| | | return this.$message.info('请先选择订单!') |
| | | } |
| | | this.tableData.forEach(item => { |
| | | if (item.id === this.radioSelectedId) { |
| | | if (item.status === 'CLOSED') { |
| | | return this.$message.info('此订单已关闭,无法删除!') |
| | | } else { |
| | | this.$confirm('是否确认关闭订单?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteErpOrder({ erpordercode: item.wo, erporderid: this.radioSelectedId }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('订单删除成功!') |
| | | this.getErpOrderSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消删除!') |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 订单关闭 |
| | | async orderClose() { |
| | |
| | | }, |
| | | // 修改按钮 |
| | | edit(operation, row) { |
| | | if (parseFloat(row.qty) === parseFloat(row.relse_qty)) { |
| | | if (parseFloat(row.qty) === parseFloat(row.relse_qty) || row.status === 'CLOSED') { |
| | | return this.$message.info('此工单已全部下达!') |
| | | } |
| | | |