From ec0d91353b767f089fa72f3cd1eb62568852710b Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期四, 22 八月 2024 10:39:30 +0800
Subject: [PATCH] 工单管理增加取消下发功能

---
 src/views/tigerprojects/mes/eng/route/index.vue |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/views/tigerprojects/mes/eng/route/index.vue b/src/views/tigerprojects/mes/eng/route/index.vue
index c7e85c1..36db057 100644
--- a/src/views/tigerprojects/mes/eng/route/index.vue
+++ b/src/views/tigerprojects/mes/eng/route/index.vue
@@ -110,12 +110,16 @@
   provide<Ref<MES_ROUTE>>('mesRoute', currRoute);
   const selectnode = ref({} as node);
   const currRotId = ref(route.params?.id);
+  const prodCode = ref('');
+  const custCode = ref('');
   const colSlots = ref<any>([]);
   const crudColSlots = ref<any>([]);
   const entityName = ref<any>('MES_POSITION');
   const props = defineProps({
     rotId: { type: String, default: '' },
     rotType: { type: String, default: 'Route' },
+    prodCode: { type: String, default: '' },
+    custCode: { type: String, default: '' },
   });
   const IsOperation = ref(false);
   const title = ref('');
@@ -123,10 +127,10 @@
   let _num = 1;
   let _numEdge = 1;
   watch(
-    () => props.rotId,
+    [() => props.rotId,()=> props.prodCode, () => props.custCode],
     (v) => {
-      if (!isNullOrEmpty(v) && v !== currRotId.value) {
-        currRotId.value = v;
+      if (!isNullOrEmpty(v[0]) && v[0] !== currRotId.value) {
+        currRotId.value = v[0];
         if (!isNullOrUnDef(unref(currlf))) {
           unref(currlf).render({});
           routeData.value = {
@@ -135,6 +139,12 @@
           };
           init(currlf);
         }
+      }
+      if (!isNullOrEmpty(v[1]) && v[1] !== prodCode.value) {
+        prodCode.value = v[1];
+      }
+      if (!isNullOrEmpty(v[2]) && v[2] !== custCode.value) {
+        custCode.value = v[2];
       }
     },
     { deep: true },
@@ -166,6 +176,12 @@
       if (!isNullOrEmpty(currRotId.value) && isNullOrEmpty(props.rotId)) {
         setTitle('璁捐锛氬伐鑹鸿矾绾�-' + currRoute.value.ROT_CODE);
       }
+      if(!isNullOrEmpty(prodCode.value)){
+        currRoute.value.PROD_CODE = !isNullOrEmpty(currRoute.value.PROD_CODE)?currRoute.value.PROD_CODE: prodCode.value;
+      }
+      if(!isNullOrEmpty(custCode.value)){
+        currRoute.value.CUST_CODE = !isNullOrEmpty(currRoute.value.CUST_CODE)?currRoute.value.CUST_CODE: custCode.value;
+      }
       _data.Data.nodes.forEach((n) => {
         n.node.properties = JSON.parse(n.node.properties);
         n['node']['text']['value'] = n.NODE_NAME;

--
Gitblit v1.9.3