瀏覽代碼

修改产品选项数据接口

lph 1 年之前
父節點
當前提交
0581418836
共有 2 個文件被更改,包括 29 次插入9 次删除
  1. 8 1
      zkqy-ui/src/api/dragform/form.js
  2. 21 8
      zkqy-ui/src/views/orderMange/index.vue

+ 8 - 1
zkqy-ui/src/api/dragform/form.js

@@ -87,7 +87,14 @@ export function queryDropDownBoxData(data) {
   })
 }
 
-// 
+// 新的获取品名的接口
+export function getSaleOrderProductionList(data) {
+  return request({
+    url: '/system/production/getSaleOrderProductionList',
+    method: 'get',
+    //baseURL: process.env.VUE_APP_BASE_API1
+  })
+}
 
 
 

+ 21 - 8
zkqy-ui/src/views/orderMange/index.vue

@@ -768,7 +768,10 @@ import { inputDisableComplete } from "@/utils/other";
 import Menu from "@/views/tablelist/commonTable/BtnMenu.vue";
 import { checkRole } from "@/utils/permission";
 import DialogTemplate from "@/views/dialogTemplate/components/index.vue";
-import { queryDropDownBoxData } from "@/api/dragform/form";
+import {
+  queryDropDownBoxData,
+  getSaleOrderProductionList,
+} from "@/api/dragform/form";
 import { v4 as uuidv4 } from "uuid";
 import { mapState } from "vuex";
 import moment from "moment";
@@ -1066,7 +1069,7 @@ export default {
           }
         }
       } else {
-        this.productionOptions = this.allProductionOptions.slice(0, 100);
+        this.productionOptions = this.allProductionOptions.slice(0, 500);
       }
     },
     // 出库单回调
@@ -1091,7 +1094,7 @@ export default {
     // 产品名称改变
     handleProductChange(productNo, row) {
       if (!productNo) {
-        this.productionOptions = this.allProductionOptions.slice(0, 100);
+        this.productionOptions = this.allProductionOptions.slice(0, 500);
         return;
       }
       row.productName = this.productionOptions.find(
@@ -1100,7 +1103,7 @@ export default {
       row.productType = this.productionOptions.find(
         (item) => item.productNo == productNo
       )?.productType;
-      this.productionOptions = this.allProductionOptions.slice(0, 100);
+      this.productionOptions = this.allProductionOptions.slice(0, 500);
     },
     // 订单类型改变回调
     orderTypeChange(type) {
@@ -1250,14 +1253,24 @@ export default {
         ];
         let res = await queryDropDownBoxData(payLoad);
         if (res.code == 200) {
-          let { production, customer } = res.data.resultMap;
-          this.allProductionOptions = production || [];
-          this.productionOptions =
-            this.allProductionOptions.slice(0, 100) || [];
+          let { customer } = res.data.resultMap;
+          // this.allProductionOptions = production || [];
+          // this.productionOptions =
+          //   this.allProductionOptions.slice(0, 100) || [];
           this.customerOptions = customer || [];
         } else {
           throw Error("获取下拉框数据失败");
         }
+        let proRes = await getSaleOrderProductionList();
+        if (proRes.code == 200) {
+          console.log(proRes.data);
+          // let { production, customer } = proRes.data.resultMap;
+          this.allProductionOptions = proRes.data || [];
+          this.productionOptions =
+            this.allProductionOptions.slice(0, 500) || [];
+        } else {
+          throw Error("获取下拉框数据失败");
+        }
       } catch (error) {
         console.log(error);
       }