Procházet zdrojové kódy

轮胎采购明细业务员不可看成本

caojunjie před 1 rokem
rodič
revize
90f90e3e59

+ 40 - 0
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -1087,6 +1087,18 @@ export default {
                 }
             }
         })
+        // 明细信息成本、毛利对业务员隐藏
+        this.optionContacts.column.forEach(its => {
+            if (JSON.parse(localStorage.getItem('saber-userInfo')).content.role_name.split(',').includes('业务员')) {
+                if (its.prop == 'costprie' || its.prop == 'grossProfit') {
+                    this.$set(its, 'hide', true)
+                }
+            }else {
+                if (its.prop == 'costprie' || its.prop == 'grossProfit') {
+                    this.$set(its, 'hide', false)
+                }
+            }
+        })
 
         if (this.detailData.id) {
             this.getDetailsfun()
@@ -1956,6 +1968,21 @@ export default {
                         }
                     }
                 })
+                // 明细信息成本、毛利对业务员隐藏
+                this.optionContacts.column.forEach(its => {
+                    if (JSON.parse(localStorage.getItem('saber-userInfo')).content.role_name.split(',').includes('业务员')) {
+                        if (its.prop == 'costprie' || its.prop == 'grossProfit') {
+                            this.$set(its, 'hide', true)
+                        }
+                    }else {
+                        if (its.prop == 'costprie' || its.prop == 'grossProfit') {
+                            this.$set(its, 'hide', false)
+                        }
+                    }
+                })
+
+
+
                 this.form.orderItemsList.forEach((items) => {
                     if (!items.subTotalMoney) {
                         items.subTotalMoney = items.goodsNum * items.price
@@ -2082,6 +2109,19 @@ export default {
                         }
                     }
                 })
+                // 明细信息成本、毛利对业务员隐藏
+                this.optionContacts.column.forEach(its => {
+                    if (JSON.parse(localStorage.getItem('saber-userInfo')).content.role_name.split(',').includes('业务员')) {
+                        if (its.prop == 'costprie' || its.prop == 'grossProfit') {
+                            this.$set(its, 'hide', true)
+                        }
+                    }else {
+                        if (its.prop == 'costprie' || its.prop == 'grossProfit') {
+                            this.$set(its, 'hide', false)
+                        }
+                    }
+                })
+
 
                 this.form.orderItemsList.forEach((items) => {
                     if (!items.subTotalMoney) {