Selaa lähdekoodia

销售订单采购价区分业务员

caojunjie 3 vuotta sitten
vanhempi
commit
0f3e8fca63

+ 0 - 13
src/views/businessManagement/salesOrder/configuration/BuyFree.json

@@ -73,19 +73,6 @@
         }
       ]
     },{
-      "label": "采购价(元)",
-      "prop": "purchasePrice",
-      "index": 4,
-      "width":100,
-      "cell": true,
-      "rules": [
-        {
-          "required": false,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "销售价(元)",
       "prop": "salesPrice",
       "index": 5,

+ 0 - 15
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -216,21 +216,6 @@
       ]
     },
     {
-      "label": "采购价格",
-      "prop": "purchaseAmount",
-      "index": 11,
-      "width":100,
-      "cell": false,
-      "slot": true,
-      "overHidden": true,
-      "rules": [
-        {
-          "required": false,
-          "message": "请输入采购价格",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "最新单价",
       "prop": "price",
       "index": 12,

+ 0 - 13
src/views/businessManagement/salesOrder/configuration/optionPolicy.json

@@ -94,19 +94,6 @@
         }
       ]
     },{
-      "label": "采购价(元)",
-      "prop": "purchasePrice",
-      "index": 5,
-      "width":100,
-      "cell": true,
-      "rules": [
-        {
-          "required": false,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "销售价(元)",
       "prop": "salesPrice",
       "index": 6,

+ 59 - 0
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -1739,6 +1739,7 @@ export default {
         if (item.prop == 'grossProfitRate' || item.prop == 'grossProfit') item.display = false
       })
     }
+    this.judgeNew()
     if (this.roleName == 'salesman') {
       this.customerContact.column.forEach(item => {
         if (item.prop == 'purchaseAmount') {
@@ -1786,6 +1787,63 @@ export default {
     })
   },
   methods: {
+    judgeNew(){
+      if (this.roleName.includes('业务员')){
+        for (let item of this.customerContact.column) {
+          if (item.prop === 'purchaseAmount') return false
+        }
+        this.customerContact.column.push({
+          "label": "采购价格",
+          "prop": "purchaseAmount",
+          "index": 11,
+          "width":100,
+          "cell": false,
+          "slot": true,
+          "overHidden": true,
+          "rules": [
+            {
+              "required": false,
+              "message": "请输入采购价格",
+              "trigger": "blur"
+            }
+          ]
+        })
+        for (let item of this.optionPolicy.column) {
+          if (item.prop === 'purchasePrice') return false
+        }
+        this.optionPolicy.column.push({
+          "label": "采购价(元)",
+          "prop": "purchasePrice",
+          "index": 5,
+          "width":100,
+          "cell": true,
+          "rules": [
+            {
+              "required": false,
+              "message": " ",
+              "trigger": "blur"
+            }
+          ]
+        })
+        for (let item of this.customerBuyFree.column) {
+          if (item.prop === 'purchasePrice') return false
+        }
+        this.customerBuyFree.column.push({
+              "label": "采购价(元)",
+              "prop": "purchasePrice",
+              "index": 4,
+              "width":100,
+              "cell": true,
+              "rules": [
+                {
+                  "required": false,
+                  "message": " ",
+                  "trigger": "blur"
+                }
+              ]
+            })
+      }
+    },
     getGoodsRow(event,row) {
       row.priceCategory = event.goodsTypeName
       row.code = event.code
@@ -3380,6 +3438,7 @@ export default {
           this.$refs.crudContact.doLayout()
         })
         this.$message.success("重置成功");
+        this.judgeNew()
         //关闭窗口
         this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
       }