| | |
| | | value="3" /> |
| | | <el-option label="已取消" |
| | | value="4" /> |
| | | <el-option label="已结束" |
| | | value="5" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | :tableLoading="tableLoading" |
| | | :row-class-name="tableRowClassName" |
| | | :isSelection="true" |
| | | :selectable="row => !row.endOrder" |
| | | @selection-change="handleSelectionChange" |
| | | @pagination="pagination"> |
| | | <template #completionStatus="{ row }"> |
| | |
| | | listProcessBom, |
| | | delProductOrder, |
| | | getProductOrderSource, |
| | | updateProductOrder, |
| | | } from "@/api/productionManagement/productionOrder.js"; |
| | | import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import MaterialLedgerDialog from "@/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue"; |
| | |
| | | prop: "npsNo", |
| | | width: "150px", |
| | | }, |
| | | // 1.待开始、2.进行中、3.已完成、4.已取消 |
| | | // 1.待开始、2.进行中、3.已完成、4.已取消、5.已结束 |
| | | { |
| | | label: "状态", |
| | | prop: "status", |
| | |
| | | ? "进行中" |
| | | : val === 3 |
| | | ? "已完成" |
| | | : val === 5 |
| | | ? "已结束" |
| | | : "已取消", |
| | | formatType: val => |
| | | val === 1 |
| | |
| | | ? "warning" |
| | | : val === 3 |
| | | ? "success" |
| | | : "danger", |
| | | : val === 5 |
| | | ? "danger" |
| | | : "info", |
| | | }, |
| | | { |
| | | label: "产品名称", |
| | |
| | | label: "操作", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 260, |
| | | width: 280, |
| | | operation: [ |
| | | { |
| | | name: "工艺路线", |
| | |
| | | { |
| | | name: "绑定工艺路线", |
| | | type: "text", |
| | | showHide: row => !row.processRouteCode, |
| | | showHide: row => !row.processRouteCode && !row.endOrder, |
| | | clickFun: row => { |
| | | openBindRouteDialog(row, "add"); |
| | | }, |
| | |
| | | { |
| | | name: "更换工艺路线", |
| | | type: "text", |
| | | showHide: row => row.processRouteCode, |
| | | showHide: row => row.processRouteCode && !row.endOrder, |
| | | clickFun: row => { |
| | | openBindRouteDialog(row, "change"); |
| | | }, |
| | |
| | | name: "领料", |
| | | type: "text", |
| | | color: "#5EC7AB", |
| | | showHide: row => !row.endOrder, |
| | | clickFun: row => { |
| | | openMaterialDialog(row); |
| | | }, |
| | |
| | | name: "补料", |
| | | type: "text", |
| | | color: "#5EC7AB", |
| | | showHide: row => !row.endOrder, |
| | | clickFun: row => { |
| | | openMaterialSupplementDialog(row); |
| | | }, |
| | |
| | | { |
| | | name: "打印领料单", |
| | | type: "text", |
| | | color: "#409eff", |
| | | color: "#5EC7AB", |
| | | showHide: row => !row.endOrder, |
| | | clickFun: row => { |
| | | handlePrint(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "生产追溯", |
| | | type: "text", |
| | | color: "#409eff", |
| | | clickFun: row => { |
| | | router.push({ |
| | | path: "/productionManagement/productionTraceability", |
| | | query: { |
| | | npsNo: row.npsNo, |
| | | productName: row.productName, |
| | | model: row.model, |
| | | }, |
| | | }); |
| | | }, |
| | | }, |
| | | { |
| | | name: "结束订单", |
| | | type: "text", |
| | | color: "red", |
| | | showHide: row => !row.endOrder, |
| | | clickFun: row => { |
| | | handleEndOrder(row); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | quantity: row.quantity || 0, |
| | | orderId, |
| | | type: "order", |
| | | editable: !row.endOrder, |
| | | }, |
| | | }); |
| | | } catch (e) { |
| | |
| | | }); |
| | | }; |
| | | |
| | | // 结束订单 |
| | | const handleEndOrder = row => { |
| | | ElMessageBox.confirm(`是否确认结束订单:${row.npsNo}?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | const params = { |
| | | id: row.id, |
| | | endOrder: true, |
| | | }; |
| | | updateProductOrder(params).then(() => { |
| | | proxy.$modal.msgSuccess("结束订单成功"); |
| | | getList(); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | const handleConfirmRoute = () => {}; |
| | | |
| | | onMounted(() => { |