cz 1 年之前
父节点
当前提交
9e8406d567

+ 49 - 19
src/views/processApproval/components/EhsdContract.vue

@@ -886,6 +886,52 @@ const rulesTwo = {
   ],
   ],
   remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
   remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
 };
 };
+const getProduct = () => {
+  return new Promise((resolve, reject) => {
+    proxy
+      .post("productInfo/getConditionProductList", {
+        pageNum: 1,
+        pageSize: 9999,
+        definition: "1",
+      })
+      .then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          const data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+          resolve(data);
+        }
+      });
+  });
+};
+
+const getProductOne = () => {
+  return new Promise((resolve, reject) => {
+    proxy
+      .post("productInfo/getCustomerProductList", {
+        pageNum: 1,
+        pageSize: 9999,
+        definition: "1",
+        customerId: "",
+      })
+      .then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          const data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+          resolve(data);
+        }
+      });
+  });
+};
 const getDict = () => {
 const getDict = () => {
   let query = {
   let query = {
     pageNum: 1,
     pageNum: 1,
@@ -928,25 +974,9 @@ const getDict = () => {
       }));
       }));
     });
     });
   // 产品
   // 产品
-  proxy
-    .post("productInfo/getConditionProductList", {
-      pageNum: 1,
-      pageSize: 9999,
-      definition: "1",
-    })
-    .then((res) => {
-      if (res.data.rows && res.data.rows.length > 0) {
-        formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map(
-          (item) => {
-            return {
-              ...item,
-              label: item.name,
-              value: item.id,
-            };
-          }
-        );
-      }
-    });
+  Promise.all([getProduct(), getProductOne()]).then((res) => {
+    formGoodsOption.btnConfig.listConfig[0].data = res[0].concat(res[1]);
+  });
   // 包装方式
   // 包装方式
   proxy
   proxy
     .post("/dictTenantData/page", {
     .post("/dictTenantData/page", {

+ 49 - 15
src/views/processApproval/components/EhsdContractChange.vue

@@ -678,6 +678,52 @@ const rulesTwo = {
   ],
   ],
   remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
   remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
 };
 };
+const getProduct = () => {
+  return new Promise((resolve, reject) => {
+    proxy
+      .post("productInfo/getConditionProductList", {
+        pageNum: 1,
+        pageSize: 9999,
+        definition: "1",
+      })
+      .then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          const data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+          resolve(data);
+        }
+      });
+  });
+};
+
+const getProductOne = () => {
+  return new Promise((resolve, reject) => {
+    proxy
+      .post("productInfo/getCustomerProductList", {
+        pageNum: 1,
+        pageSize: 9999,
+        definition: "1",
+        customerId: "",
+      })
+      .then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          const data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+          resolve(data);
+        }
+      });
+  });
+};
 const getDict = () => {
 const getDict = () => {
   let query = {
   let query = {
     pageNum: 1,
     pageNum: 1,
@@ -706,21 +752,9 @@ const getDict = () => {
     });
     });
   });
   });
   // 产品
   // 产品
-  proxy
-    .post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "1" })
-    .then((res) => {
-      if (res.data.rows && res.data.rows.length > 0) {
-        formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map(
-          (item) => {
-            return {
-              ...item,
-              label: item.name,
-              value: item.id,
-            };
-          }
-        );
-      }
-    });
+  Promise.all([getProduct(), getProductOne()]).then((res) => {
+    formGoodsOption.btnConfig.listConfig[0].data = res[0].concat(res[1]);
+  });
   // 币种
   // 币种
   proxy
   proxy
     .post("/dictTenantData/page", { ...query, dictCode: "account_currency" })
     .post("/dictTenantData/page", { ...query, dictCode: "account_currency" })

+ 51 - 19
src/views/processApproval/components/EhsdSample.vue

@@ -886,6 +886,54 @@ const rulesTwo = {
   ],
   ],
   remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
   remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
 };
 };
+
+const getProduct = () => {
+  return new Promise((resolve, reject) => {
+    proxy
+      .post("productInfo/getConditionProductList", {
+        pageNum: 1,
+        pageSize: 9999,
+        definition: "1",
+      })
+      .then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          const data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+          resolve(data);
+        }
+      });
+  });
+};
+
+const getProductOne = () => {
+  return new Promise((resolve, reject) => {
+    proxy
+      .post("productInfo/getCustomerProductList", {
+        pageNum: 1,
+        pageSize: 9999,
+        definition: "1",
+        customerId: "",
+      })
+      .then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          const data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+          resolve(data);
+        }
+      });
+  });
+};
+
 const getDict = () => {
 const getDict = () => {
   let query = {
   let query = {
     pageNum: 1,
     pageNum: 1,
@@ -928,25 +976,9 @@ const getDict = () => {
       }));
       }));
     });
     });
   // 产品
   // 产品
-  proxy
-    .post("productInfo/getConditionProductList", {
-      pageNum: 1,
-      pageSize: 9999,
-      definition: "1",
-    })
-    .then((res) => {
-      if (res.data.rows && res.data.rows.length > 0) {
-        formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map(
-          (item) => {
-            return {
-              ...item,
-              label: item.name,
-              value: item.id,
-            };
-          }
-        );
-      }
-    });
+  Promise.all([getProduct(), getProductOne()]).then((res) => {
+    formGoodsOption.btnConfig.listConfig[0].data = res[0].concat(res[1]);
+  });
   // 包装方式
   // 包装方式
   proxy
   proxy
     .post("/dictTenantData/page", {
     .post("/dictTenantData/page", {

+ 49 - 19
src/views/processApproval/components/EhsdSampleChange.vue

@@ -886,6 +886,52 @@ const rulesTwo = {
   ],
   ],
   remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
   remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
 };
 };
+const getProduct = () => {
+  return new Promise((resolve, reject) => {
+    proxy
+      .post("productInfo/getConditionProductList", {
+        pageNum: 1,
+        pageSize: 9999,
+        definition: "1",
+      })
+      .then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          const data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+          resolve(data);
+        }
+      });
+  });
+};
+
+const getProductOne = () => {
+  return new Promise((resolve, reject) => {
+    proxy
+      .post("productInfo/getCustomerProductList", {
+        pageNum: 1,
+        pageSize: 9999,
+        definition: "1",
+        customerId: "",
+      })
+      .then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          const data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+          resolve(data);
+        }
+      });
+  });
+};
 const getDict = () => {
 const getDict = () => {
   let query = {
   let query = {
     pageNum: 1,
     pageNum: 1,
@@ -928,25 +974,9 @@ const getDict = () => {
       }));
       }));
     });
     });
   // 产品
   // 产品
-  proxy
-    .post("productInfo/getConditionProductList", {
-      pageNum: 1,
-      pageSize: 9999,
-      definition: "1",
-    })
-    .then((res) => {
-      if (res.data.rows && res.data.rows.length > 0) {
-        formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map(
-          (item) => {
-            return {
-              ...item,
-              label: item.name,
-              value: item.id,
-            };
-          }
-        );
-      }
-    });
+  Promise.all([getProduct(), getProductOne()]).then((res) => {
+    formGoodsOption.btnConfig.listConfig[0].data = res[0].concat(res[1]);
+  });
   // 包装方式
   // 包装方式
   proxy
   proxy
     .post("/dictTenantData/page", {
     .post("/dictTenantData/page", {