cz 1 rok pred
rodič
commit
d18b012289

+ 69 - 64
src/views/JXSK/mes/forward/add.vue

@@ -173,18 +173,45 @@ const otherBtnClick = () => {
 };
 
 const getDetails = () => {
-  proxy.post("/productionTaskDetail/detail", { id: route.query.id }).then(
-    (res) => {
-      if (
-        res.data.productionTaskDetailRecordList &&
-        res.data.productionTaskDetailRecordList.length > 0
-      ) {
-        let id = res.data.previousProcessesRecordId;
+  proxy
+    .post("/productionTaskDetail/detail", {
+      id: route.query.id,
+      taskProgressId: route.query.taskProgressId,
+    })
+    .then(
+      (res) => {
+        if (
+          res.data.productionTaskDetailRecordList &&
+          res.data.productionTaskDetailRecordList.length > 0
+        ) {
+          let id = res.data.previousProcessesRecordId;
+          proxy
+            .post("/fileInfo/getList", { businessIdList: [id] })
+            .then((res) => {
+              if (res.data[id] && res.data[id].length > 0) {
+                formData.data.fileListOne = res.data[id].map((item) => {
+                  return {
+                    raw: item,
+                    name: item.fileName,
+                    url: item.fileUrl,
+                  };
+                });
+              }
+            });
+        }
+
         proxy
-          .post("/fileInfo/getList", { businessIdList: [id] })
-          .then((res) => {
-            if (res.data[id] && res.data[id].length > 0) {
-              formData.data.fileListOne = res.data[id].map((item) => {
+          .post("/fileInfo/getList", {
+            businessIdList: [res.data.productionProcessesId],
+          })
+          .then((resOne) => {
+            if (
+              resOne.data[res.data.productionProcessesId] &&
+              resOne.data[res.data.productionProcessesId].length > 0
+            ) {
+              formData.data.fileListTwo = resOne.data[
+                res.data.productionProcessesId
+              ].map((item) => {
                 return {
                   raw: item,
                   name: item.fileName,
@@ -193,55 +220,33 @@ const getDetails = () => {
               });
             }
           });
-      }
-
-      proxy
-        .post("/fileInfo/getList", {
-          businessIdList: [res.data.productionProcessesId],
-        })
-        .then((resOne) => {
-          if (
-            resOne.data[res.data.productionProcessesId] &&
-            resOne.data[res.data.productionProcessesId].length > 0
-          ) {
-            formData.data.fileListTwo = resOne.data[
-              res.data.productionProcessesId
-            ].map((item) => {
-              return {
-                raw: item,
-                name: item.fileName,
-                url: item.fileUrl,
-              };
-            });
-          }
-        });
 
-      proxy
-        .post("/fileInfo/getList", {
-          businessIdList: [res.data.workOrderId],
-          fileType: 1,
-        })
-        .then((resOne) => {
-          if (
-            resOne.data[res.data.workOrderId] &&
-            resOne.data[res.data.workOrderId].length > 0
-          ) {
-            formData.data.fileListThree = resOne.data[res.data.workOrderId].map(
-              (item) => {
+        proxy
+          .post("/fileInfo/getList", {
+            businessIdList: [res.data.workOrderId],
+            fileType: 1,
+          })
+          .then((resOne) => {
+            if (
+              resOne.data[res.data.workOrderId] &&
+              resOne.data[res.data.workOrderId].length > 0
+            ) {
+              formData.data.fileListThree = resOne.data[
+                res.data.workOrderId
+              ].map((item) => {
                 return {
                   raw: item,
                   name: item.fileName,
                   url: item.fileUrl,
                 };
-              }
-            );
-          }
-        });
-    },
-    (err) => {
-      return showFailToast(err.message);
-    }
-  );
+              });
+            }
+          });
+      },
+      (err) => {
+        return showFailToast(err.message);
+      }
+    );
 };
 const configData = [
   [
@@ -281,11 +286,11 @@ const configData = [
       readonly: true,
     },
 
-    {
-      type: "slot",
-      slotName: "fileOne",
-      label: "前道工序完工拍摄",
-    },
+    // {
+    //   type: "slot",
+    //   slotName: "fileOne",
+    //   label: "前道工序完工拍摄",
+    // },
     {
       type: "slot",
       label: "生产工序资料",
@@ -362,11 +367,11 @@ const configData = [
       readonly: true,
     },
 
-    {
-      type: "slot",
-      slotName: "fileOne",
-      label: "前道工序完工拍摄",
-    },
+    // {
+    //   type: "slot",
+    //   slotName: "fileOne",
+    //   label: "前道工序完工拍摄",
+    // },
     {
       type: "slot",
       label: "生产工序资料",

+ 66 - 61
src/views/JXSK/mes/receive/add.vue

@@ -118,13 +118,13 @@ const formConfig = reactive([
     prop: "productionProcessesName",
     readonly: true,
   },
-  {
-    type: "input",
-    itemType: "text",
-    label: proxy.t("receive.previousProcess"),
-    prop: "previousProcessesName",
-    readonly: true,
-  },
+  // {
+  //   type: "input",
+  //   itemType: "text",
+  //   label: proxy.t("receive.previousProcess"),
+  //   prop: "previousProcessesName",
+  //   readonly: true,
+  // },
   {
     type: "picker",
     itemType: "datePicker",
@@ -222,18 +222,45 @@ const otherBtnClick = () => {
   );
 };
 const getDetails = () => {
-  proxy.post("/productionTaskDetail/detail", { id: route.query.id }).then(
-    (res) => {
-      if (
-        res.data.productionTaskDetailRecordList &&
-        res.data.productionTaskDetailRecordList.length > 0
-      ) {
-        let id = res.data.previousProcessesRecordId;
+  proxy
+    .post("/productionTaskDetail/detail", {
+      id: route.query.id,
+      taskProgressId: route.query.taskProgressId,
+    })
+    .then(
+      (res) => {
+        if (
+          res.data.productionTaskDetailRecordList &&
+          res.data.productionTaskDetailRecordList.length > 0
+        ) {
+          let id = res.data.previousProcessesRecordId;
+          proxy
+            .post("/fileInfo/getList", { businessIdList: [id] })
+            .then((res) => {
+              if (res.data[id] && res.data[id].length > 0) {
+                formData.data.fileList = res.data[id].map((item) => {
+                  return {
+                    raw: item,
+                    name: item.fileName,
+                    url: item.fileUrl,
+                  };
+                });
+              }
+            });
+        }
+
         proxy
-          .post("/fileInfo/getList", { businessIdList: [id] })
-          .then((res) => {
-            if (res.data[id] && res.data[id].length > 0) {
-              formData.data.fileList = res.data[id].map((item) => {
+          .post("/fileInfo/getList", {
+            businessIdList: [res.data.productionProcessesId],
+          })
+          .then((resOne) => {
+            if (
+              resOne.data[res.data.productionProcessesId] &&
+              resOne.data[res.data.productionProcessesId].length > 0
+            ) {
+              formData.data.fileListTwo = resOne.data[
+                res.data.productionProcessesId
+              ].map((item) => {
                 return {
                   raw: item,
                   name: item.fileName,
@@ -242,55 +269,33 @@ const getDetails = () => {
               });
             }
           });
-      }
-
-      proxy
-        .post("/fileInfo/getList", {
-          businessIdList: [res.data.productionProcessesId],
-        })
-        .then((resOne) => {
-          if (
-            resOne.data[res.data.productionProcessesId] &&
-            resOne.data[res.data.productionProcessesId].length > 0
-          ) {
-            formData.data.fileListTwo = resOne.data[
-              res.data.productionProcessesId
-            ].map((item) => {
-              return {
-                raw: item,
-                name: item.fileName,
-                url: item.fileUrl,
-              };
-            });
-          }
-        });
 
-      proxy
-        .post("/fileInfo/getList", {
-          businessIdList: [res.data.workOrderId],
-          fileType: 1,
-        })
-        .then((resOne) => {
-          if (
-            resOne.data[res.data.workOrderId] &&
-            resOne.data[res.data.workOrderId].length > 0
-          ) {
-            formData.data.fileListThree = resOne.data[res.data.workOrderId].map(
-              (item) => {
+        proxy
+          .post("/fileInfo/getList", {
+            businessIdList: [res.data.workOrderId],
+            fileType: 1,
+          })
+          .then((resOne) => {
+            if (
+              resOne.data[res.data.workOrderId] &&
+              resOne.data[res.data.workOrderId].length > 0
+            ) {
+              formData.data.fileListThree = resOne.data[
+                res.data.workOrderId
+              ].map((item) => {
                 return {
                   raw: item,
                   name: item.fileName,
                   url: item.fileUrl,
                 };
-              }
-            );
-          }
-        });
-    },
-    (err) => {
-      return showFailToast(err.message);
-    }
-  );
+              });
+            }
+          });
+      },
+      (err) => {
+        return showFailToast(err.message);
+      }
+    );
 };
 onMounted(() => {
   if (route.query.id) {

+ 2 - 2
src/views/JXSK/mes/receive/index.vue

@@ -23,9 +23,9 @@
               <div class="row">
                 <span class="label">当前工序:</span> <span>{{item.productionProcessesName}}</span>
               </div>
-              <div class="row">
+              <!-- <div class="row">
                 <span class="label">前道工序:</span> <span>{{item.previousProcessesName}}</span>
-              </div>
+              </div> -->
               <div class="row">
                 <span class="label">完成期限:</span> <span>{{item.dueDate}}</span>
               </div>