| | |
| | | import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | import BindRouteDialog from "./BindRouteDialog.vue"; |
| | | import {getDeviceLedger} from "@/api/equipmentManagement/ledger.js"; |
| | | const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue")); |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | |
| | | const handleBindRouteSubmit =async (data)=>{ |
| | | const res = await saveProductionProductInput(data) |
| | | console.log(res) |
| | | if(res.code === 200){ |
| | | proxy.$modal.msgSuccess("绑定成功"); |
| | | bindRouteDialogVisible.value = false |
| | | handleQuery() |
| | | }else{ |
| | | proxy.$modal.msgError(res.msg || "绑定失败") |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | width: '150px', |
| | | }, |
| | | { |
| | | label: "客户名称", |
| | | label: "厂家", |
| | | prop: "customerName", |
| | | width: '200px', |
| | | }, |
| | |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "规格", |
| | | label: "纸张规格", |
| | | prop: "specificationModel", |
| | | width: '120px', |
| | | }, |
| | |
| | | width: '200px', |
| | | }, |
| | | { |
| | | label: "需求数量", |
| | | label: "印刷数量", |
| | | prop: "quantity", |
| | | }, |
| | | { |
| | | label: "尺寸", |
| | | prop: "cutSize", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "小盒数量", |
| | | prop: "smallBoxQty", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "中盒数量", |
| | | prop: "mediumBoxQty", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "色数", |
| | | prop: "printColorCount", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "完成数量", |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "交付日期", |
| | | label: "计划交货日期", |
| | | prop: "deliveryDate", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "备注", |
| | | prop: "remark", |
| | | width: 120, |
| | | }, |
| | | { |
| | |
| | | const openBindRouteDialog = async (row,type) => { |
| | | bindForm.orderId = row.id; |
| | | bindForm.routeId = null; |
| | | bindRouteDialogVisible.value = true; |
| | | routeOptions.value = []; |
| | | bindRouteLoading.value = true; |
| | | if(type === "view") { |
| | | bindDialogType.value = "view" |
| | | let res = await viewGetByProductWordId(row.id) |
| | | console.log(res) |
| | | } |
| | | BindRouteDialogRef.value?.getProductOrder() |
| | | |
| | | try { |
| | | rowData.value = row; |
| | | BindRouteDialogRef.value?.resetForm?.() |
| | | if (type === "view") { |
| | | bindDialogType.value = "detail" |
| | | const res = await viewGetByProductWordId(row.id) |
| | | if(res?.cuttingFileVo?.id ==null){ |
| | | res.cuttingFileVo = [] |
| | | }else{ |
| | | res.cuttingFileVo = [res.cuttingFileVo] |
| | | } |
| | | rowData.value = res?.data || res |
| | | } else { |
| | | bindDialogType.value = "add" |
| | | rowData.value = row |
| | | rowData.value.finishedSize = row.specificationModel |
| | | } |
| | | bindRouteDialogVisible.value = true; |
| | | } catch (e) { |
| | | console.error("获取工艺路线列表失败:", e); |
| | | proxy.$modal.msgError("获取工艺路线列表失败"); |