cz 1 rok pred
rodič
commit
a68181a4e0

+ 1 - 0
src/views/JXSK/production/processConfig/handleBtnOne.vue

@@ -15,6 +15,7 @@ import { defineProps, inject, ref } from "vue";
 let title = ref("");
 let getNode = inject("getNode");
 const node = getNode();
+title.value = node.store.data?.data?.title;
 node.on("change:data", ({ current }) => {
   title.value = current.title;
 });

+ 26 - 6
src/views/JXSK/production/processConfig/vueFlow.vue

@@ -139,7 +139,6 @@ const submitForm = () => {
 const submitAll = () => {
   const nodeList = graph.toJSON().cells;
   submitFormData.nodeObject = JSON.stringify(nodeList);
-  console.log(nodeList, "asda");
   // return;
   const arr = nodeList
     .filter((x) => x.shape != "edge")
@@ -152,6 +151,7 @@ const submitAll = () => {
     });
     return false;
   }
+
   // 检验名称是否有填写
   let nameArr = [];
   for (const key in flowNodeObj.value) {
@@ -165,6 +165,7 @@ const submitAll = () => {
     }
     nameArr.push(value);
   }
+
   // 名称不可重复
   let newNameArr = nameArr.map((x) => x.nodeName.trim());
   if (new Set(newNameArr).size != nameArr.length) {
@@ -237,8 +238,17 @@ const addVersion = () => {
 
 const pushRoom = (port: any) => {
   if (port.node.shape == "handle-btn-one") {
+    let nodeName = "";
+    if (
+      port.node.store &&
+      port.node.store.data &&
+      port.node.store.data.data &&
+      port.node.store.data.data.title
+    ) {
+      nodeName = port.node.store.data.data.title;
+    }
     flowNodeObj.value[port.node.id] = {
-      nodeName: "",
+      nodeName: nodeName,
       id: port.node.id,
     };
   }
@@ -379,9 +389,9 @@ const antvInit = async (data) => {
   // 监听添加节点
 
   graph.on("node:added", ({ node }) => {
+    let time = Date.now();
+    node.store.data.productionId = time;
     if (node.store.data && node.store.data.shape == "handle-btn-one") {
-      let time = Date.now();
-      node.store.data.productionId = time;
       proxy.$emit("addRow", {
         productionId: time,
       });
@@ -389,7 +399,7 @@ const antvInit = async (data) => {
       let name = node.store.data.label;
       proxy.$emit("addRow", {
         name,
-        productionId: node.store.data.productionId,
+        productionId: time,
       });
     }
   });
@@ -661,7 +671,7 @@ const antvInit = async (data) => {
     return graph.createNode({
       shape: "handle-btn",
       label: x.name,
-      productionId: x.id,
+      productionId: "",
       zIndex: 100,
       attrs: {
         body: {
@@ -700,6 +710,16 @@ const antvInit = async (data) => {
 const getFlowInfo = (data) => {
   if (data) {
     antvInit(data);
+    if (data && data.length > 0) {
+      let arr = data.filter((x) => x.shape == "handle-btn-one");
+      for (let i = 0; i < arr.length; i++) {
+        const iele = arr[i];
+        flowNodeObj.value[iele.id] = {
+          nodeName: iele.data.title,
+          id: iele.id,
+        };
+      }
+    }
   } else {
     antvInit();
   }

+ 17 - 12
src/views/JXSK/production/task/index.vue

@@ -26,13 +26,21 @@
         <template #list>
           <div style="width: 100%">
             <el-table :data="formData.dataOne.productionTaskDetailList">
-              <el-table-column prop="productSn" label="产品SN" />
-              <el-table-column prop="productionProcessesName" label="当前工序" />
-              <el-table-column prop="cumulativeTime" label="累计耗时" />
-              <el-table-column label="工序状态" prop="processesStatus" :formatter="
-                  (row) =>
-                    dictValueLabel(row.processesStatus, processesStatusData)
-                " />
+              <el-table-column prop="productSn" label="产品SN" width="150" />
+              <el-table-column prop="productionProcessesName" label="当前工序">
+                <template #default="{ row, $index }">
+                  <div style="width:100%">
+                    <span v-for="(x, i) in row.taskProgressList" :key="i">
+                      {{ x.processesName }}
+                      <span>({{ dictValueLabel(x.status, processesStatusData)}})</span>
+                      <span v-if="i + 1 < row.taskProgressList.length">,
+                      </span>
+                    </span>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="cumulativeTime" label="累计耗时" width="80" />
+
             </el-table>
           </div>
         </template>
@@ -113,13 +121,10 @@ const processesStatusData = ref([
     label: "进行中",
     value: "1",
   },
-  {
-    label: "驳回",
-    value: "2",
-  },
+
   {
     label: "完成",
-    value: "3",
+    value: "2",
   },
 ]);
 const dialogVisible = ref(false);

+ 0 - 2
src/views/JXSK/salesMange/contract/index.vue

@@ -946,8 +946,6 @@ const clickOutBound = () => {
       }
     }
   }
-  return;
-
   ElMessageBox.confirm(`你确定提交出库吗?`, "提示", {
     confirmButtonText: "确定",
     cancelButtonText: "取消",