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

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!579
黄梓星 1 жил өмнө
parent
commit
742bb6b72f

+ 40 - 38
src/views/purchase/purchase-order/add/column.js

@@ -382,6 +382,24 @@ const PurchaseTabColumns =[
         },
       },
       {
+        key: "goodsAllocationName",
+        title: "货位",
+        inputType: "PopoverSelect",
+        valueKey: "id",
+        referName: "ALLOCATION_PARAM",
+        dataMapping: {
+          goodsAllocation: 'id',
+          goodsAllocationName: 'name',
+    
+        },
+         isShow:true,
+        queryParams: (params) => ({
+          stordocId: params.warehouse,
+          pkOrg: params.puOrg,
+        }),
+        width: 180,
+      },
+      {
         key: "rowNo",
         title: "行号",
         inputType: "Input",
@@ -411,7 +429,6 @@ const PurchaseTabColumns =[
           manufacturerName:'manufacturerIdName',
           unit:'unitId',
           unitName:'unitIdName',
-          // tax:'materialRateName',
           storageCondition:'storageCondition',
           carriageCondition:'transportationCondition',
           materialClassifyOneName:'oneClass',
@@ -495,6 +512,7 @@ const PurchaseTabColumns =[
         width: 180,
         isSummary:true,
        },
+       
        {
         key: "isGift",
         title: "赠品",
@@ -607,24 +625,7 @@ const PurchaseTabColumns =[
         width: 180,
         isSummary:true,
       },
-      {
-        key: "goodsAllocationName",
-        title: "货位",
-        inputType: "PopoverSelect",
-        valueKey: "id",
-        referName: "ALLOCATION_PARAM",
-        dataMapping: {
-          goodsAllocation: 'id',
-          goodsAllocationName: 'name',
-    
-        },
-         isShow:true,
-        queryParams: (params) => ({
-          stordocId: params.warehouse,
-          pkOrg: params.puOrg,
-        }),
-        width: 180,
-      },
+      
       {
         key: "closeReason",
         title: "行关闭/打开原因",
@@ -1166,6 +1167,24 @@ const CauseTabColumns =[
         },
       },
       {
+        key: "goodsAllocationName",
+        title: "货位",
+        inputType: "PopoverSelect",
+        valueKey: "id",
+        referName: "ALLOCATION_PARAM",
+        dataMapping: {
+          goodsAllocation: 'id',
+          goodsAllocationName: 'name',
+
+        },
+        isShow:true,
+        queryParams: (params) => ({
+          stordocId: params.warehouse,
+          pkOrg: params.puOrg,
+        }),
+        width: 180,
+      },
+      {
         key: "rowNo",
         title: "行号",
         inputType: "Input",
@@ -1185,7 +1204,6 @@ const CauseTabColumns =[
           material: "id",
           materialName: "name",
           materialCode: "code",
-          // materialClassify:'classifyIdName',
           materialManufacturersCode:'manufacturersMaterialCode',
           specification:'specification',
           model:'model',
@@ -1297,6 +1315,7 @@ const CauseTabColumns =[
         width: 180,
         isSummary:true,
        },
+       
        {
         key: "ntaxnetprice",
         title: "含税净价",
@@ -1413,24 +1432,7 @@ const CauseTabColumns =[
       { key: "discountRule", title: "折扣规则编码", inputType: "Input", width: 180 },
       { key: "demandCode", title: "采购需求单号", inputType: "Input", width: 180 },
       { key: "remark", title: "备注", inputType: "Input", width: 200 },
-      {
-        key: "goodsAllocationName",
-        title: "货位",
-        inputType: "PopoverSelect",
-        valueKey: "id",
-        referName: "ALLOCATION_PARAM",
-        dataMapping: {
-          goodsAllocation: 'id',
-          goodsAllocationName: 'name',
-
-        },
-        isShow:true,
-        queryParams: (params) => ({
-          stordocId: params.warehouse,
-          pkOrg: params.puOrg,
-        }),
-        width: 180,
-      },
+      
       {
         key: "closeReason",
         title: "关闭原因",

+ 4 - 3
src/views/purchase/purchase-order/add/index.vue

@@ -547,7 +547,7 @@ export default {
 
     // 子表参照改变之后
     async handleTabReferChange(val, props, source) {
-      let { type, copy, dataMapping } = props;
+      // let { type, copy, dataMapping } = props;
       let { params, tabName } = this;
       console.log(val, "val", props, "props", source, "source");
 
@@ -571,7 +571,7 @@ export default {
       // }
 
       // 触发物料参照询价
-      if (type == "MATERIAL_PARAM" && source.qty && source.qty != "") {
+      if (props == "MATERIAL_PARAM" && source.qty && source.qty != "") {
         source["qty"] = 0;
 
         // source['whetherCompleteInquiry'] = false;
@@ -599,8 +599,9 @@ export default {
       }
 
       // 物料触发税率
-      if (type == "MATERIAL_PARAM") {
+      if (props == "MATERIAL_PARAM") {
         let { rateCode } = source;
+        console.log(rateCode, "rateCode-------");
         try {
           // try
           this.loading = true;

+ 18 - 42
src/views/purchase/purchase-order/column.js

@@ -814,6 +814,12 @@ const PurTabColumns = [
         },
       },
       { 
+        item:{ key: "goodsAllocationName", title: "货位",width:100,},
+        attr:{
+          isHidden:true,
+        },
+      },
+      { 
         item:{
           key: "rowNo", title: "行号",width:80,},
         attr:{
@@ -877,6 +883,7 @@ const PurTabColumns = [
           isSummary:true,
         },
       },
+     
       {
         item:{
           
@@ -1082,13 +1089,7 @@ const PurTabColumns = [
           isSummary:true,
         },
       },
-      { 
-        item:{ key: "goodsAllocationName", title: "货位",width:100,},
-        attr:{
-          isHidden:true,
-        },
-        
-      },
+      
       { 
         item:{ key: "closeReason", title: "行关闭/打开原因",width:100,},
         attr:{
@@ -1119,12 +1120,20 @@ const CommonTabColumns = [
     key: 'puOrderItemList',
     tableColumns: [
       { 
+        item:{ key: "goodsAllocationName", title: "货位",width:100,},
+        attr:{
+          isHidden:true,
+        },
+        
+      },
+      { 
         item:{
           key: "rowNo", title: "行号",width:80,},
         attr:{
           isHidden:true,
         },
       },
+      
       // { item:{key: "orderId", title: "采购订单ID" },
       { 
         item:{ key: "demandCode", title:"采购需求单号",width:150,},
@@ -1260,28 +1269,17 @@ const CommonTabColumns = [
         item:{key: "money", title: "价税合计" ,width:120, },
         attr:{
           isSummary:true,
-          // is: "el-computed-input-v2",
-          // formatter: (prop) => {
-          //   return prop ? (prop * 1).toFixed(2) : prop;
-          // },
         },
       },
+      
       { 
         item:{key: "tax", title: "税率" ,width:120, },
         attr:{
-          // is: "el-computed-input-v2",
-          // formatter: (prop) => {
-          //   return prop ? (prop * 1).toFixed(2) : prop;
-          // },
         },
       },
       { 
         item:{key: "taxDeductMoneya", title: "折扣金额", width:80,  },
         attr:{
-          // is: "el-computed-input-v2",
-          // formatter: (prop) => {
-          //   return prop ? (prop * 1).toFixed(2) : prop;
-          // },
           isSummary:true,
         },
       },
@@ -1305,39 +1303,23 @@ const CommonTabColumns = [
       { 
         item:{key: "arrivalQty", title: "已到货数量" , width:80,},
         attr:{
-          // is: "el-computed-input-v2",
-          // formatter: (prop) => {
-          //   return prop ? (prop * 1).toFixed(2) : prop;
-          // },
           isSummary:true,
         },
       },
       { 
         item:{key: "unarrivedQty", title: "未到货数量" , width:80,},
         attr:{
-          // is: "el-computed-input-v2",
-          // formatter: (prop) => {
-          //   return prop ? (prop * 1).toFixed(2) : prop;
-          // },
           isSummary:true,
         },
       },
       { 
         item:{key: "price", title: "无税单价" , width:120, },
         attr:{
-          // is: "el-computed-input-v2",
-          // formatter: (prop) => {
-          //   return prop ? (prop * 1).toFixed(2) : prop;
-          // },
         },
       },
       { 
         item:{key: "notaxMoney", title: "无税金额" , width:120, },
         attr:{
-          // is: "el-computed-input-v2",
-          // formatter: (prop) => {
-          //   return prop ? (prop * 1).toFixed(2) : prop;
-          // },
           isSummary:true,
         },
       },
@@ -1670,13 +1652,7 @@ const CommonTabColumns = [
           isHidden:true,
         },
       },
-      { 
-        item:{ key: "goodsAllocationName", title: "货位",width:100,},
-        attr:{
-          isHidden:true,
-        },
-        
-      },
+      
       { 
         item:{ key: "closeReason", title: "行关闭/打开原因",width:100,},
         attr:{

+ 2 - 1
src/views/purchase/purchase-order/edit/index.vue

@@ -441,7 +441,8 @@ export default {
             // key != "puDeptName" &&
             key != "status" &&
             key != "billDate" &&
-            key != "createTime"
+            key != "createTime" &&
+            key != "source"
           ) {
             this.params[key] = "";
           } else {