Explorar o código

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!387
黄梓星 hai 1 ano
pai
achega
89907b6248

+ 1 - 1
src/components/popover-select-v2/index.vue

@@ -6,7 +6,7 @@ export default {
   props: {
     // v-model
     value: {
-      type: [Array, String],
+      type: [Array, String,Number],
       require: true,
     },
     // 参照类型 ,对应后端

+ 2 - 0
src/views/material/requisition/index.vue

@@ -380,8 +380,10 @@
       },
       getList(val) {
         console.log('val', val)
+        this.failLoad = true;
         
         getReqList({...this.params,...this.pageStatus}).then(res => {
+          this.failLoad = false;
           if (res.code === 200) {
             this.tableList = res.rows;
             // this.total = res.total;

+ 1 - 0
src/views/purchase/PurchaseDemandList/add.vue

@@ -889,6 +889,7 @@ export default {
       this.basicForm.createBy = ''
       this.basicForm.source = '4'
       this.basicForm.isCustomerSpecified = 'N'
+      this.basicForm.flowId = ''
       this.basicForm.demandPersonal = this.$store.state.user.name
       this.basicForm.demandPersonalName = this.$store.state.user.nickName
       this.basicForm.demandDept = this.$store.state.user.deptId

+ 3 - 3
src/views/purchase/PurchaseDemandList/index.vue

@@ -23,7 +23,7 @@
             </el-col>
             <el-col :span="1.5">
               <el-form-item label="是否客户指定">
-                <el-select clearable v-model="queryParams.isProcess" size="mini" style="width: 200px" placeholder="请选择">
+                <el-select clearable v-model="queryParams.isCustomerSpecified" size="mini" style="width: 200px" placeholder="请选择">
                   <el-option
                     v-for="item in options"
                     :key="item.value"
@@ -368,7 +368,7 @@ export default {
       queryParams: {
         code: '',
         customer: '',
-        isProcess: '',
+        isCustomerSpecified: '',
         demandPersonal: '',
         source: '',
         planType: '',
@@ -469,7 +469,7 @@ export default {
       this.queryParams = {
         code: '',
         customer: '',
-        isProcess: '',
+        isCustomerSpecified: '',
         demandPersonal: '',
         source: '',
         planType: '',

+ 16 - 4
src/views/purchase/apply/add/columns.js

@@ -279,11 +279,13 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "isPriceAdjustment", title: "调价类型" },
+          item: { key: "isPriceAdjustmentName", title: "调价类型" },
           attr: {
-            is: "el-select",
-            dictName: "price_adjustment_type",
-            disabled: true,
+            value: '无',
+            formatter: (prop) => {
+              const { priceDiffer } = prop;
+              return (prop.isPriceAdjustment = priceDiffer > 0 ? '涨价' : priceDiffer < 0 ? '降价' : '无');
+            },
           },
         },
         {
@@ -452,6 +454,16 @@ export default function useColumns() {
         },
         { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
+        {
+          item: { key: "isPriceAdjustment", title: "", width: 10 },
+          attr: {
+            value: 'no',
+            formatter: (prop) => {
+              const { priceDiffer } = prop;
+              return (prop.isPriceAdjustment = priceDiffer > 0 ? 'up' : priceDiffer < 0 ? 'down' : 'no');
+            },
+          },
+        },
       ],
     },
   ];

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

@@ -86,7 +86,6 @@
           const {
             recentlyPrice = "0",
             isApprovalFirst = "N",
-            isPriceAdjustment = "N",
           } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: ""});
           this.loading = false;
           await this.onRowAdd(this.tabName, {
@@ -102,7 +101,6 @@
             puUnitName: puUnitName,
             recentlyPrice,
             isApprovalFirst,
-            isPriceAdjustment,
             tax: Number(ntaxrate === "0E-8" ? 0 : ntaxrate),
             createByName: createByName,
             updateByName: createByName,

+ 16 - 4
src/views/purchase/apply/copy/columns.js

@@ -279,11 +279,13 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "isPriceAdjustment", title: "调价类型" },
+          item: { key: "isPriceAdjustmentName", title: "调价类型" },
           attr: {
-            is: "el-select",
-            dictName: "price_adjustment_type",
-            disabled: true,
+            value: '无',
+            formatter: (prop) => {
+              const { priceDiffer } = prop;
+              return (prop.isPriceAdjustment = priceDiffer > 0 ? '涨价' : priceDiffer < 0 ? '降价' : '无');
+            },
           },
         },
         {
@@ -450,6 +452,16 @@ export default function useColumns() {
         },
         { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
+        {
+          item: { key: "isPriceAdjustment", title: "", width: 10 },
+          attr: {
+            value: 'no',
+            formatter: (prop) => {
+              const { priceDiffer } = prop;
+              return (prop.isPriceAdjustment = priceDiffer > 0 ? 'up' : priceDiffer < 0 ? 'down' : 'no');
+            },
+          },
+        },
       ],
     },
   ];

+ 0 - 2
src/views/purchase/apply/copy/index.vue

@@ -102,7 +102,6 @@ export default {
         const {
           recentlyPrice = "0",
           isApprovalFirst = "N",
-          isPriceAdjustment = "N",
         } = await fetchExist({ puOrg, customer, supplier, materialCode });
         this.loading = false;
         await this.onRowAdd(this.tabName, {
@@ -118,7 +117,6 @@ export default {
           puUnitName: puUnitName,
           recentlyPrice,
           isApprovalFirst,
-          isPriceAdjustment,
           tax: Number(ntaxrate === "0E-8" ? 0 : ntaxrate),
           createByName: createByName,
           updateByName: createByName,

+ 16 - 4
src/views/purchase/apply/edit/columns.js

@@ -279,11 +279,13 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "isPriceAdjustment", title: "调价类型" },
+          item: { key: "isPriceAdjustmentName", title: "调价类型" },
           attr: {
-            is: "el-select",
-            dictName: "price_adjustment_type",
-            disabled: true,
+            value: '无',
+            formatter: (prop) => {
+              const { priceDiffer } = prop;
+              return (prop.isPriceAdjustment = priceDiffer > 0 ? '涨价' : priceDiffer < 0 ? '降价' : '无');
+            },
           },
         },
         {
@@ -454,6 +456,16 @@ export default function useColumns() {
         },
         { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
+        {
+          item: { key: "isPriceAdjustment", title: "", width: 10 },
+          attr: {
+            value: 'no',
+            formatter: (prop) => {
+              const { priceDiffer } = prop;
+              return (prop.isPriceAdjustment = priceDiffer > 0 ? 'up' : priceDiffer < 0 ? 'down' : 'no');
+            },
+          },
+        },
       ],
     },
   ];

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

@@ -131,7 +131,6 @@
           const {
             recentlyPrice = "0",
             isApprovalFirst = "N",
-            isPriceAdjustment = "",
           } = await fetchExist({puOrg, customer, supplier, materialCode, customerName: ""});
           this.loading = false;
           await this.onRowAdd(this.tabName, {
@@ -147,12 +146,12 @@
             puUnitName: puUnitName,
             recentlyPrice,
             isApprovalFirst,
-            isPriceAdjustment,
             tax: Number(ntaxrate === "0E-8" ? 0 : ntaxrate),
             createByName: createByName,
             updateByName: createByName,
             id: null,
           });
+          console.log('isPriceAdjustment', isPriceAdjustment)
         }
       },
       // 

+ 1 - 2
src/views/purchase/apply/see/columns.js

@@ -167,10 +167,9 @@ export default function useColumns() {
           },
         },
         {
-          item: { width: 100, key: "isPriceAdjustment", title: "调价类型" },
+          item: { width: 100, key: "isPriceAdjustmentName", title: "调价类型" },
           attr: {
             is: "el-dict-tag",
-            dictName: "price_adjustment_type",
           },
         },
         {

+ 2 - 3
src/views/purchase/contract/add/columns.js

@@ -283,7 +283,7 @@ export default function useColumns() {
     },
     {
       item: { key: "createTime", title: "合同创建时间", width: 100 },
-      attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
+      attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd",disabled:true,},
     },
     {
       item: { key: "project", title: "项目医院", required: true, width: 100 },
@@ -539,8 +539,7 @@ export default function useColumns() {
               registration: "registrationNo",
               specification: "specification",
               manufacturer: "manufacturerIdName",
-              tax: "materialRateName",
-              // tax: "materialRate",
+              rateCode: "materialRateName",
             },
           },
         },

+ 2 - 1
src/views/purchase/contract/add/index.vue

@@ -34,6 +34,7 @@ export default {
       ],
     } = useColumns();
     const rules = this.$init.rules([...TabColumns, ...TableColumns]);
+    console.log(rules,'rules------------');
     const params = this.$init.params([...TabColumns, ...TableColumns]);
     return {
       loading: false,
@@ -128,7 +129,7 @@ export default {
         // try
         this.loading = true;
         const { ntaxrate } = await tax(rateCode);
-        row.tax = Number(ntaxrate === "0E-8" ? 0 : ntaxrate);
+        row.tax = ntaxrate === "0E-8" ? 0 : ntaxrate;
       } catch (err) {
         // catch
         console.error(err);

+ 2 - 1
src/views/purchase/contract/edit/columns.js

@@ -286,7 +286,7 @@ export default function useColumns() {
     },
     {
       item: { key: "createTime", title: "合同创建时间", width: 100 },
-      attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
+      attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" ,disabled:true,},
     },
     {
       item: { key: "project", title: "项目医院", required: true, width: 100 },
@@ -526,6 +526,7 @@ export default function useColumns() {
               registration: "registrationNo",
               specification: "specification",
               manufacturer: "manufacturerIdName",
+              rateCode: "materialRateName",
             },
           },
         },

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

@@ -131,7 +131,8 @@ export default {
         // try
         this.loading = true;
         const { ntaxrate } = await tax(rateCode);
-        row.tax = Number(ntaxrate === "0E-8" ? 0 : ntaxrate);
+        // row.tax = Number(ntaxrate === "0E-8" ? 0 : ntaxrate);
+        row.tax = ntaxrate === "0E-8" ? 0 : ntaxrate;
       } catch (err) {
         // catch
         console.error(err);