Commit f81595fe4bf60d56d9a32223fd1362addf9e690c

Authored by 史婷婷
1 parent 4c791563

feat: 经销未锁规合同-列表&详情-按钮权限

... ... @@ -265,19 +265,19 @@ export default {
265 265 const e = this.detail.showExamine || false
266 266 const f = this.detail.standardShowExamine || false
267 267 return [
268   - { ...this.buttons[0], visible: (s === 'DRAFT') },
269   - { ...this.buttons[1], visible: (s === 'DRAFT') },
270   - { ...this.buttons[2], visible: (s === 'FORMAL' && !l) },
271   - { ...this.buttons[3], visible: (s === 'FORMAL' && !l) },
272   - { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') },
273   - { ...this.buttons[5], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
274   - { ...this.buttons[6], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS') },
275   - { ...this.buttons[7], visible: (s === 'FORMAL' && e && t === 'AUDIT') },
276   - { ...this.buttons[8], visible: (s === 'STANDARD' && e && t === 'AUDIT') },
277   - { ...this.buttons[9], visible: (s === 'STANDARD' && f && a === 'AUDIT') },
278   - { ...this.buttons[10], visible: (s === 'FORMAL' && t) },
279   - { ...this.buttons[11], visible: (s === 'STANDARD' && t) },
280   - { ...this.buttons[12], visible: (s === 'STANDARD' && a) },
  268 + { ...this.buttons[0], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:modify')) },
  269 + { ...this.buttons[1], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:delete')) },
  270 + { ...this.buttons[2], visible: (s === 'FORMAL' && !l && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:lock')) },
  271 + { ...this.buttons[3], visible: (s === 'FORMAL' && !l && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:lock-apply')) },
  272 + { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:upload')) },
  273 + { ...this.buttons[5], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:upload')) },
  274 + { ...this.buttons[6], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:standard-upload')) },
  275 + { ...this.buttons[7], visible: (s === 'FORMAL' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:approve')) },
  276 + { ...this.buttons[8], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:approve')) },
  277 + { ...this.buttons[9], visible: (s === 'STANDARD' && f && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:standard-approve')) },
  278 + { ...this.buttons[10], visible: (s === 'FORMAL' && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:review')) },
  279 + { ...this.buttons[11], visible: (s === 'STANDARD' && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:review')) },
  280 + { ...this.buttons[12], visible: (s === 'STANDARD' && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-unlocked-contract:standard-review')) },
281 281 ]
282 282 }
283 283 },
... ...
... ... @@ -14,7 +14,7 @@
14 14 @input="onSearchInput"
15 15 />
16 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-unlocked-contract:add')" class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" />
18 18 <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" />
19 19 </view>
20 20 </view>
... ...