Browse Source

bug 修复

lilei 3 years ago
parent
commit
0b09336851
1 changed files with 14 additions and 1 deletions
  1. 14 1
      src/views/purchasingManagement/purchaseOrder/basicInfoModal.vue

+ 14 - 1
src/views/purchasingManagement/purchaseOrder/basicInfoModal.vue

@@ -187,7 +187,20 @@ export default {
       })
       })
     },
     },
     getParentDealer () {
     getParentDealer () {
-      purchaseTargetList({}).then(res => {
+      let params = null
+      // 向上级和总部采购
+      if (this.$hasPermissions('B_SJANDZB')) {
+        params = {}
+      }
+      // 只能向上级采购
+      if (this.$hasPermissions('B_SUPPLIER_SJ')) {
+        params.purchaseTargetType = 'DEALER_UP'
+      }
+      // 只能向总部采购
+      if (this.$hasPermissions('B_SUPPLIER_ZB')) {
+        params.purchaseTargetType = 'SUPPLIER_SYS'
+      }
+      purchaseTargetList(params).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.purchaseTragetType = res.data
           this.purchaseTragetType = res.data
         } else {
         } else {