Эх сурвалжийг харах

价格目录加多物料查询,申报单加详情判断是否复制

黄梓星 1 жил өмнө
parent
commit
d10fee8afb

+ 2 - 2
src/api/business/purchase/apply.js

@@ -9,9 +9,9 @@ export function LIST(data, params) {
   });
 }
 
-export function ITEM(data) {
+export function ITEM(data, isCopy) {
   return request({
-    url: `/pu/priceApply/${data}`,
+    url: `/pu/priceApply/${data}/${isCopy}`,
     method: "GET",
   });
 }

+ 2 - 2
src/views/purchase/apply/add/index.vue

@@ -86,7 +86,7 @@
           const {
             recentlyPrice = "0",
             isApprovalFirst = "N",
-          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: ""});
+          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: "", priceType: prop.row.priceType});
           this.loading = false;
           await this.onRowAdd(this.tabName, {
             ...item,
@@ -122,7 +122,7 @@
           recentlyPrice,
           isApprovalFirst,
           purchasequantity
-          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName, priceType: prop.row.priceType});
           prop.row.yPurchaseQuantity = purchasequantity
           prop.row.recentlyPrice = recentlyPrice
           prop.row.isApprovalFirst = isApprovalFirst

+ 4 - 3
src/views/purchase/apply/copy/index.vue

@@ -102,7 +102,7 @@ export default {
         const {
           recentlyPrice = "0",
           isApprovalFirst = "N",
-        } = await fetchExist({ puOrg, customer, supplier, materialCode });
+        } = await fetchExist({ puOrg, customer, supplier, materialCode, priceType: prop.row.priceType });
         this.loading = false;
         await this.onRowAdd(this.tabName, {
           ...item,
@@ -138,7 +138,7 @@ export default {
           recentlyPrice,
           isApprovalFirst,
           purchasequantity
-          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName, priceType: prop.row.priceType});
           prop.row.yPurchaseQuantity = purchasequantity
           prop.row.recentlyPrice = recentlyPrice
           prop.row.isApprovalFirst = isApprovalFirst
@@ -152,7 +152,8 @@ export default {
         const { TableColumns } = TabColumns.find(
           ({ item: { key } }) => key === tabName
         );
-        const { code, data } = await ITEM(prop);
+        console.log('看看prop', prop)
+        const { code, data } = await ITEM(prop, true);
         if (code === 200) {
           this.params = data;
           this.params.priceApplyItems = data.priceApplyItems.map((item) => ({

+ 3 - 3
src/views/purchase/apply/edit/index.vue

@@ -131,7 +131,7 @@
           const {
             recentlyPrice = "0",
             isApprovalFirst = "N",
-          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: ""});
+          } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: "",priceType: prop.row.priceType});
           this.loading = false;
           await this.onRowAdd(this.tabName, {
             ...item,
@@ -168,7 +168,7 @@
           recentlyPrice,
           isApprovalFirst,
           purchasequantity
-          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName});
+          } = await fetchExist({puOrg, supplier, materialCode: prop.row.materialCode, customer:prop.row.customer,customerName: prop.row.customerName, priceType: prop.row.priceType});
           prop.row.yPurchaseQuantity = purchasequantity
           prop.row.recentlyPrice = recentlyPrice
           prop.row.isApprovalFirst = isApprovalFirst
@@ -182,7 +182,7 @@
           const {TableColumns} = TabColumns.find(
             ({item: {key}}) => key === tabName
           );
-          const {code, data} = await ITEM(prop);
+          const {code, data} = await ITEM(prop, false);
           if (code === 200) {
             this.params = data;
             this.params.priceApplyItems = data.priceApplyItems.map((item) => ({

+ 1 - 1
src/views/purchase/apply/see/index.vue

@@ -67,7 +67,7 @@ export default {
           total,
           rows: [{ id }],
         } = await LIST({ ...model }, { pageNum: prop, pageSize: 1 });
-        const { code, data } = await ITEM(id);
+        const { code, data } = await ITEM(id, false);
         if (code === 200) {
           this.params = data;
           this.params.$index = prop;

+ 8 - 0
src/views/purchase/catalogue/columns.js

@@ -137,6 +137,14 @@ export default function useColumns() {
         referName: "MATERIAL_PARAM",
       },
     },
+    {
+      item: { key: "materialCodes", title: "物料编码"},
+      attr: {
+        clearable: true,
+        is: "el-input",
+        placeholder: '多物料编码使用 , 隔开',
+      },
+    },
     // {
     //   item: { width: 100, key: "materialCodeList", title: "物料编码" },
     //   attr: {