فهرست منبع

1.工艺路线 路线状态已绑定原分组不可删除和修改

liziliang 2 هفته پیش
والد
کامیت
3def48cbd4

+ 3 - 2
src/views/base/craftManagement/route/bindProcess.vue

@@ -279,7 +279,7 @@ import GroupProcess from "./components/groupProcess.vue";
 import GroupSort from "./components/groupSort.vue";
 
 defineOptions({
-  name: "bindProcess/:id/:prodtCode",
+  name: "bindProcess/:id/:prodtCode/:usable",
 });
 
 const styleStatus = ref(false);
@@ -370,7 +370,8 @@ const startGroup = () => {
   GroupProcessRef.value &&
     GroupProcessRef.value.startGroup(
       flowData.nodes,
-      route.fullPath.split("/")[4]
+      route.fullPath.split("/")[4],
+      route.fullPath.split("/")[6]
     );
 };
 const groupFinish = () => {

+ 6 - 2
src/views/base/craftManagement/route/components/groupProcess.vue

@@ -34,7 +34,9 @@ function confirmClick() {
   });
 }
 
-const startGroup = async (nodes: any[], routeId: string) => {
+const stateUsable = ref(null);
+const startGroup = async (nodes: any[], routeId: string, usable: any) => {
+  stateUsable.value = usable;
   nodesData.value = markRaw(nodes);
   if(nodesData.value){
     try{
@@ -62,6 +64,7 @@ defineExpose({
 });
 
 import type { CheckboxValueType } from "element-plus";
+import {number} from "echarts";
 
 const checkAll = ref(false);
 const indeterminate = ref(false);
@@ -144,13 +147,14 @@ const changeChecked = (key: string) => {
       <div v-for="key in new Map(Object.entries(groupData)).keys()" :key="key">
         <div class="name-container">
           <div class="group-name">{{ key }}</div>
-          <el-button link type="danger" @click="() => delete groupData[key]"
+          <el-button v-if="stateUsable === '0'" link type="danger" @click="() => delete groupData[key]"
             >删除</el-button
           >
         </div>
 
         <el-select
           v-model="groupData[key]"
+          :disabled="stateUsable === '1'"
           multiple
           clearable
           filterable

+ 2 - 2
src/views/base/craftManagement/route/index.vue

@@ -565,7 +565,7 @@ const bindProcess = (row) => {
 const bindProcessPop = (row) => {
   if (row.routeData) {
     router.push({
-      path: `/base/craftManagement/bindProcess/${row.id}/${row.prodtCode}`,
+      path: `/base/craftManagement/bindProcess/${row.id}/${row.prodtCode}/${row.usable}`,
     });
     return;
   }
@@ -574,7 +574,7 @@ const bindProcessPop = (row) => {
     console.log(tableData.value);
     if (!tableData.value || tableData.value.length == 0) {
       router.push({
-        path: `/base/craftManagement/bindProcess/${row.id}/${row.prodtCode}`,
+        path: `/base/craftManagement/bindProcess/${row.id}/${row.prodtCode}/${row.usable}`,
       });
       return;
     }