| | |
| | | import { onMounted, ref } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { useRouter } from "vue-router"; |
| | | import { productOrderListPage } from "@/api/productionManagement/productionOrder.js"; |
| | | import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | import ProcessRouteItemForm from "@/views/productionManagement/productionOrder/ProcessRouteItemForm.vue"; |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | |
| | | |
| | | const isShowItemModal = ref(false); |
| | | const record = ref({}); |
| | | const showRouteItemModal = row => { |
| | | isShowItemModal.value = true; |
| | | record.value = row; |
| | | const showRouteItemModal = async row => { |
| | | const orderId = row.id; |
| | | try { |
| | | const res = await getOrderProcessRouteMain(orderId); |
| | | const data = res.data || {}; |
| | | if (!data || !data.id) { |
| | | proxy.$modal.msgWarning("未找到关联的工艺路线"); |
| | | return; |
| | | } |
| | | router.push({ |
| | | path: "/productionManagement/processRouteItem", |
| | | query: { |
| | | id: data.id, |
| | | processRouteCode: data.processRouteCode || "", |
| | | productName: data.productName || "", |
| | | model: data.model || "", |
| | | bomNo: data.bomNo || "", |
| | | description: data.description || "", |
| | | orderId, |
| | | type: "order", |
| | | }, |
| | | }); |
| | | } catch (e) { |
| | | console.error("获取工艺路线主信息失败:", e); |
| | | proxy.$modal.msgError("获取工艺路线信息失败"); |
| | | } |
| | | }; |
| | | |
| | | // 导出 |