|
@@ -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 {
|