Browse Source

按钮权限,内部销售默认

孤鹤 2 years ago
parent
commit
47ee2b04d8

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

@@ -615,6 +615,7 @@ export default {
       storageNameList: [],
       surplusRouteQuantityOption: [],
       saveLoading: false,
+      userInfo:null,
       disabled: false,
       form: {
         corpId: null,
@@ -1428,6 +1429,7 @@ export default {
       }
       this.routerTag = window.location.hash.slice(1);
     })
+    this.userInfo = localStorage.getItem('saber-userInfo') && JSON.parse(localStorage.getItem('saber-userInfo')).content.role_name.split(',').includes('admin');
   },
   filters: {
     IntegerFormat(num) {
@@ -1465,6 +1467,16 @@ export default {
     }
     let roleName = 'admin'
     this.judgeNew()
+    //是管理员才能看返利价格
+    if (!this.roleName.includes('admin')) {
+      console.log('45654645');
+      this.customerContact.column.forEach(item => {
+        if (item.prop == 'purchaseRebatePrice') {
+          item.hide = true;
+          item.showColumn = false;
+        }
+      })
+    }
     if (this.roleName == 'salesman') {
       this.customerContact.column.forEach(item => {
         if (item.prop == 'purchaseAmount') {

+ 2 - 1
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -159,6 +159,7 @@ export default {
                                 this.form.phone = res.data.data.corpsAttnList[0].tel
                                 this.contactsOption = res.data.data.corpsAddrList
                                 this.form.recAddress = res.data.data.corpsAddrList[0].id
+                                this.form.businessSource = '内部销售'
 
                             })
                         }
@@ -706,7 +707,7 @@ export default {
             getDetails({ id: id }).then(res => {
                 console.log('res', res);
                 this.form = res.data.data
-                // console.log(this.form.businessSource);
+                console.log(this.form.businessSource);
                 this.form.orderItemsList.forEach((items) => {
                     if (!items.subTotalMoney) {
                         items.subTotalMoney = items.goodsNum * items.price