From 8cae1dcd8d2bde01880ac4b70bdda4e61df3c7ef Mon Sep 17 00:00:00 2001
From: YangYuGang <1378265336@qq.com>
Date: 星期六, 08 三月 2025 12:46:26 +0800
Subject: [PATCH] 送货单(U9)

---
 src/views/tigerprojects/mes/eng/route/components/FormItemProps.vue |  167 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 124 insertions(+), 43 deletions(-)

diff --git a/src/views/tigerprojects/mes/eng/route/components/FormItemProps.vue b/src/views/tigerprojects/mes/eng/route/components/FormItemProps.vue
index 49196d7..a3106ab 100644
--- a/src/views/tigerprojects/mes/eng/route/components/FormItemProps.vue
+++ b/src/views/tigerprojects/mes/eng/route/components/FormItemProps.vue
@@ -1,54 +1,135 @@
 <!--
+ * @Description: file content
+ * @Author: Ben Lin
+ * @version: 
+ * @Date: 2024-06-18 15:09:48
+ * @LastEditors: Ben Lin
+ * @LastEditTime: 2024-10-13 15:44:51
+-->
+<!--
  * @Description: 琛ㄥ崟椤瑰睘鎬э紝鎺т欢灞炴�ч潰鏉�
 -->
 <template>
   <div class="properties-content">
-    <div class="properties-body" v-if="itemProps">
-      <Empty class="hint-box" v-if="!itemProps" description="鏈�夋嫨鎺т欢" />
-      <Form v-else label-align="left" layout="vertical">
-        <div v-for="item of baseFormItemProps" :key="item.name">
-          <FormItem :label="item.label" v-if="showProps(item.exclude)">
-            <component
-              class="component-props"
-              v-bind="item.componentProps"
-              :is="item.component"
-              v-model:value="formConfig.currentItem[item.name]"
-            />
-          </FormItem>
-        </div>
-      </Form>
-    </div>
+    <Form class="properties-body" label-align="left" layout="vertical">
+      <FormItem label="宸ヨ壓璺嚎缂栫爜" name="宸ヨ壓璺嚎缂栫爜">
+        <Input
+          :style="{ width: '100%' }"
+          v-model:value="mesRoute.ROT_CODE"
+          :min="0"
+          :step="1"
+          :readonly="true"
+        />
+      </FormItem>
+      <FormItem label="鑺傜偣鍚嶇О" name="鑺傜偣鍚嶇О">
+        <Input
+          :style="{ width: '100%' }"
+          v-model:value="routeConfig.currentItem.NODE_NAME"
+          :min="0"
+          :step="1"
+        />
+      </FormItem>
+      <FormItem label="宸ユ" name="宸ユ">
+        <Input
+          :style="{ width: '100%' }"
+          v-model:value="routeConfig.currentItem.SEGMENT"
+          :min="0"
+          :step="1"
+        />
+      </FormItem>
+      <FormItem label="宸ュ簭缂栫爜" name="宸ュ簭缂栫爜">
+        <Input
+          :style="{ width: '100%' }"
+          v-model:value="routeConfig.currentItem.OPER_CODE"
+          :min="0"
+          :step="1"
+        />
+      </FormItem>
+      <FormItem label="鏄惁鍚敤" name="鏄惁鍚敤">
+        <Switch v-model:checked="routeConfig.isActive" />
+      </FormItem>
+      <FormItem label="鏄惁鍏佽璺崇珯" name="鏄惁鍏佽璺崇珯">
+        <Switch v-model:checked="routeConfig.canSkip" />
+      </FormItem>
+      
+      <FormItem label="鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N)" name="鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N)">
+        <Switch v-model:checked="routeConfig.allowDftIn" />
+      </FormItem>
+      <!-- <FormItem label="鏄惁璁$畻鐩撮�氱巼" name="鏄惁璁$畻鐩撮�氱巼">
+        <Switch v-model:checked="routeConfig.isCalcFpy" />
+      </FormItem>
+      <FormItem label="鏄惁鍏佽璺崇珯" name="鏄惁鍏佽璺崇珯">
+        <Switch v-model:checked="routeConfig.canSkip" />
+      </FormItem>
+      <FormItem label="鏄惁鎶曞叆绔�" name="鏄惁鎶曞叆绔�">
+        <Switch v-model:checked="routeConfig.isInput" />
+      </FormItem>
+      <FormItem label="鏄惁浜у嚭绔�" name="鏄惁浜у嚭绔�">
+        <Switch v-model:checked="routeConfig.isOutput" />
+      </FormItem> -->
+    </Form>
   </div>
 </template>
 <script lang="ts" setup>
-  import { computed, ref, watch } from 'vue';
-  import { Empty, Input, Form, FormItem, Switch, Checkbox, Col } from 'ant-design-vue';
+  import { Select, Switch, Input, Form, FormItem } from 'ant-design-vue';
+  import { useRouteDesignState } from '../hooks/useRouteDesignState';
+  import { SelectTypes } from 'ant-design-vue/es/select';
+  import { ref, watch } from 'vue';
+  import { isNullOrUnDef } from '/@/utils/is';
 
-  const itemProps = ref(true);
-  const baseFormItemProps = ref([]);
-  // watch(
-  //   () => formConfig.value,
-  //   () => {
-  //     if (formConfig.value.currentItem) {
-  //       formConfig.value.currentItem.itemProps = formConfig.value.currentItem.itemProps || {};
-  //       formConfig.value.currentItem.itemProps.labelCol =
-  //         formConfig.value.currentItem.itemProps.labelCol || {};
-  //       formConfig.value.currentItem.itemProps.wrapperCol =
-  //         formConfig.value.currentItem.itemProps.wrapperCol || {};
-  //     }
-  //   },
-  //   { deep: true, immediate: true },
-  // );
-  // const showProps = (exclude: string[] | undefined) => {
-  //   if (!exclude) {
-  //     return true;
-  //   }
-  //   return isArray(exclude) ? !exclude.includes(formConfig.value.currentItem!.component) : true;
-  // };
+  const { routeConfig, mesRoute } = useRouteDesignState();
+  const emit = defineEmits(['changeNodeName']);
+  const options1 = ref<SelectTypes['options']>([
+    {
+      value: 'Y',
+      label: '鍚敤',
+    },
+    {
+      value: 'N',
+      label: '涓嶅惎鐢�',
+    },
+  ]);
 
-  // const controlPropsList = computed(() => {
-  //   return baseFormItemControlAttrs.filter((item) => {
-  //     return showProps(item.exclude);
-  //   });
-  // });
+  watch(
+    [
+      () => routeConfig['isCalcFpy'],
+      () => routeConfig['canSkip'],
+      () => routeConfig['isInput'],
+      () => routeConfig['isOutput'],
+      () => routeConfig['allowDftIn'],
+      () => routeConfig['isActive'],
+      () => routeConfig['currentItem'],
+    ],
+    (newVal, oldVal) => {
+      routeConfig['routeData'].nodes.forEach((r) => {
+        if (r.ID == routeConfig['currentItem'].ID) {
+          if (oldVal[0] != newVal[0] && !isNullOrUnDef(oldVal[0])) {
+            r.IS_CALC_FPY = newVal[0] ? 'Y' : 'N';
+          }
+          if (oldVal[1] != newVal[1] && !isNullOrUnDef(oldVal[1])) {
+            r.CAN_SKIP = newVal[1] ? 'Y' : 'N';
+          }
+          if (oldVal[2] != newVal[2] && !isNullOrUnDef(oldVal[2])) {
+            r.IS_INPUT = newVal[2] ? 'Y' : 'N';
+          }
+          if (oldVal[3] != newVal[3] && !isNullOrUnDef(oldVal[3])) {
+            r.IS_OUTPUT = newVal[3] ? 'Y' : 'N';
+          }
+          if (oldVal[4] != newVal[4] && !isNullOrUnDef(oldVal[4])) {
+            r.ALLOW_DFT_IN = newVal[4] ? 'Y' : 'N';
+          }
+          if (oldVal[5] != newVal[5] && !isNullOrUnDef(oldVal[5])) {
+            r.IS_ACTIVE = newVal[5] ? 'Y' : 'N';
+          }
+          // r.IS_ACTIVE = newVal[4].IS_ACTIVE;
+          r.SEGMENT = newVal[6].SEGMENT;
+          if (r.NODE_NAME != newVal[6].NODE_NAME) {
+            r.NODE_NAME = newVal[6].NODE_NAME;
+            emit('changeNodeName', { id: r.ID, val: r.NODE_NAME });
+          }
+        }
+      });
+    },
+    { deep: true, immediate: true },
+  );
 </script>

--
Gitblit v1.9.3