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

Merge remote-tracking branch 'origin/dev' into dev

shiy 1 жил өмнө
parent
commit
0c1a1c94b7

+ 19 - 0
src/components/popover-select-v2/index.vue

@@ -119,6 +119,25 @@ export default {
         );
         if (code === 200) {
           this.data = rows;
+
+
+          // 处理新增字段无法映射
+          let that = this;
+
+          this.TableColumns.forEach(({item,attr}) =>{
+
+            that.data = that.data.map(d =>{
+
+              if(!attr.is && attr.formatter){
+                d[item.key] = attr.formatter(d);
+              }
+
+              return d;
+
+            })
+
+          })
+
           this.page.total = total;
         }
       } catch (err) {

+ 1 - 1
src/components/popover-select/components/MATERIAL_PARAM.js

@@ -39,7 +39,7 @@ export default [
     item: { key: "isDrugNumber", title: "药品", width: "auto" },
     attr: {
       formatter: (prop) => {
-        return prop.materialMedcine.isDrugNumber;
+        return prop.materialMedcine.isDrug;
       },
     },
   },

+ 11 - 6
src/views/purchase/contract/add/columns.js

@@ -20,13 +20,14 @@ export default function useColumns() {
       attr: { is: "el-input" },
     },
     {
-      item: { key: "lastPuMoney", title: "年度采购额", width: 100 ,required: true,},
+      item: { key: "lastPuMoney", 
+        title: "年度采购额", width: 100 ,required: true,},
       attr: {
         is: "el-input-number",
       },
     },
     {
-      item: { key: "buyerName", title: "采购员", required: true, width: 100 },
+      item: { key: "buyerName", title: "采购员", width: 100 },
       attr: {
         is: "el-popover-select-v2",
         valueKey: "name",
@@ -71,7 +72,6 @@ export default function useColumns() {
       item: {
         key: "puDeptName",
         title: "采购部门",
-        required: true,
         width: 100,
       },
       attr: {
@@ -239,7 +239,7 @@ export default function useColumns() {
       attr: { is: "el-input" },
     },
     {
-      item: { key: "signDate", title: "合同签订日期", width: 100 },
+      item: { key: "signDate", title: "合同签订日期", width: 100 ,required: true,},
       attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
     },
     {
@@ -256,7 +256,10 @@ export default function useColumns() {
       attr: { is: "el-input", value: "自制", disabled: true },
     },
     {
-      item: { key: "principalManufacturers", title: "主要厂家", width: 100 },
+      item: { key: "principalManufacturers", 
+      title: "主要厂家", width: 100,
+      required: true,
+     },
       attr: { is: "el-input", },
     },
     {
@@ -270,7 +273,9 @@ export default function useColumns() {
       attr: { is: "el-input", },
     },
     {
-      item: { key: "freightMethods", title: "运费承担方式", width: 100 },
+      item: { key: "freightMethods",
+       title: "运费承担方式", width: 100 ,required: true,
+      },
       attr: {
         is: "el-select",
         dictName: "puarchase_contract_freight_methods",

+ 7 - 5
src/views/purchase/contract/edit/columns.js

@@ -26,7 +26,7 @@ export default function useColumns() {
       },
     },
     {
-      item: { key: "buyerName", title: "采购员", required: true, width: 100 },
+      item: { key: "buyerName", title: "采购员",  width: 100 },
       attr: {
         is: "el-popover-select-v2",
         valueKey: "name",
@@ -70,7 +70,6 @@ export default function useColumns() {
       item: {
         key: "puDeptName",
         title: "采购部门",
-        required: true,
         width: 100,
       },
       attr: {
@@ -245,7 +244,7 @@ export default function useColumns() {
       attr: { is: "el-input" },
     },
     {
-      item: { key: "signDate", title: "合同签订日期", width: 100 },
+      item: { key: "signDate", title: "合同签订日期", width: 100,required: true, },
       attr: { is: "el-date-picker", valueFormat: "yyyy-MM-dd" },
     },
    
@@ -263,7 +262,9 @@ export default function useColumns() {
       attr: { is: "el-input", value: "自制", disabled: true },
     },
     {
-      item: { key: "principalManufacturers", title: "主要厂家", width: 100 },
+      item: { key: "principalManufacturers", 
+      title: "主要厂家", width: 100 ,required: true,
+    },
       attr: { is: "el-input", },
     },
     {
@@ -276,7 +277,8 @@ export default function useColumns() {
       attr: { is: "el-input", },
     },
     {
-      item: { key: "freightMethods", title: "运费承担方式", width: 100 },
+      item: { key: "freightMethods", title: "运费承担方式",
+       width: 100,required: true, },
       attr: {
         is: "el-select",
         dictName: "puarchase_contract_freight_methods",

+ 3 - 2
src/views/purchase/contract/see/index.vue

@@ -82,11 +82,12 @@ export default {
     },
     async handleJump(){
       console.log(this.params,'params');
-      const {name} = this.$store.state.user;
 
       try {
 
-        let {code,msg,oaUrl} = await orderApi.ToOA(name,this.params.flowId);
+        const {name} = this.$store.state.user;
+
+        let {code,oaUrl} = await ToOA(name,this.params.flowId);
 
         if(code == 200){
           window.open(oaUrl);