Commit 4c791563fb98ce2b7accaa77efb4038f2b132093

Authored by 史婷婷
1 parent e54fb169

feat: 经销库存合同-列表&详情-按钮权限

@@ -252,18 +252,18 @@ export default { @@ -252,18 +252,18 @@ export default {
252 const e = this.detail.showExamine || false 252 const e = this.detail.showExamine || false
253 const f = this.detail.standardShowExamine || false 253 const f = this.detail.standardShowExamine || false
254 return [ 254 return [
255 - { ...this.buttons[0], visible: (s === 'DRAFT') },  
256 - { ...this.buttons[1], visible: (s === 'DRAFT') },  
257 - { ...this.buttons[2], visible: (s === 'FORMAL' && !l) },  
258 - { ...this.buttons[3], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') },  
259 - { ...this.buttons[4], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },  
260 - { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS') },  
261 - { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT') },  
262 - { ...this.buttons[7], visible: (s === 'STANDARD' && e && t === 'AUDIT') },  
263 - { ...this.buttons[8], visible: (s === 'STANDARD' && f && a === 'AUDIT') },  
264 - { ...this.buttons[9], visible: (s === 'FORMAL' && t) },  
265 - { ...this.buttons[10], visible: (s === 'STANDARD' && t ) },  
266 - { ...this.buttons[11], visible: (s === 'STANDARD' && a ) }, 255 + { ...this.buttons[0], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:modify')) },
  256 + { ...this.buttons[1], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:delete')) },
  257 + { ...this.buttons[2], visible: (s === 'FORMAL' && !l && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:lock')) },
  258 + { ...this.buttons[3], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:upload')) },
  259 + { ...this.buttons[4], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:upload')) },
  260 + { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:standard-upload')) },
  261 + { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:approve')) },
  262 + { ...this.buttons[7], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:approve')) },
  263 + { ...this.buttons[8], visible: (s === 'STANDARD' && f && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:restandard-approveview')) },
  264 + { ...this.buttons[9], visible: (s === 'FORMAL' && t && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:review')) },
  265 + { ...this.buttons[10], visible: (s === 'STANDARD' && t && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:review')) },
  266 + { ...this.buttons[11], visible: (s === 'STANDARD' && a && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:standard-review')) },
267 ] 267 ]
268 } 268 }
269 }, 269 },
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 @input="onSearchInput" 14 @input="onSearchInput"
15 /> 15 />
16 <view class="tool-icons"> 16 <view class="tool-icons">
17 - <image class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> 17 + <image v-if="$auth.hasPermi('contract-manage:distribution-inventory-contract:add')" class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" />
18 <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> 18 <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" />
19 </view> 19 </view>
20 </view> 20 </view>