Showing
1 changed file
with
8 additions
and
12 deletions
| ... | ... | @@ -44,9 +44,7 @@ export default { |
| 44 | 44 | buttons: [ |
| 45 | 45 | { text: '编辑', visible: true, variant: 'outline', event: 'edit' }, |
| 46 | 46 | { text: '审核详情', visible: true, variant: 'outline', event: 'auditDetail' }, |
| 47 | - { text: '填写补货时间', visible: true, variant: 'outline', event: 'fill' }, | |
| 48 | 47 | { text: '审核', visible: true, variant: 'primary', event: 'audit' }, |
| 49 | - { text: '取消', visible: true, variant: 'outline', event: 'cancel', style: { color: 'rgba(0,0,0,0.9)', border: '1px solid #DCDCDC' } }, | |
| 50 | 48 | ] |
| 51 | 49 | } |
| 52 | 50 | }, |
| ... | ... | @@ -54,23 +52,21 @@ export default { |
| 54 | 52 | statusFlags() { |
| 55 | 53 | const m = this.form || {} |
| 56 | 54 | const e = String(m.status || '') |
| 55 | + // showAudit 这个字段就是后端自己判断的 制单人所在区域 所有人 权限 | |
| 57 | 56 | return { |
| 58 | - isRefuse: e === 'REFUSE' || false, | |
| 59 | - isAudit: e === 'AUDIT' || false, | |
| 60 | - canEdit: e === 'REFUSE' && m.isOwner || false, | |
| 57 | + // todo 等下还原 | |
| 58 | + // canEdit: !e && m.showAudit || false, | |
| 59 | + canEdit: true, | |
| 61 | 60 | canAudit: e === 'AUDIT' && m.showExamine || false, |
| 62 | - canCancel: e === 'REFUSE' && m.isOwner || false, | |
| 63 | - canFill: e === 'PASS' && !m.completed || false, | |
| 61 | + canAuditDetail: !!e || false, | |
| 64 | 62 | } |
| 65 | 63 | }, |
| 66 | 64 | displayButtons() { |
| 67 | 65 | const f = this.statusFlags |
| 68 | 66 | return [ |
| 69 | - { ...this.buttons[0], visible: f.canEdit && this.$auth.hasPermi('shipping-plan-manage:replenishment-order:modify') }, | |
| 70 | - { ...this.buttons[1], visible: this.$auth.hasPermi('shipping-plan-manage:replenishment-order:review') }, | |
| 71 | - { ...this.buttons[2], visible: f.canFill && this.$auth.hasPermi('shipping-plan-manage:replenishment-order:fill') }, | |
| 72 | - { ...this.buttons[3], visible: f.canAudit && this.$auth.hasPermi('shipping-plan-manage:replenishment-order:approve') }, | |
| 73 | - { ...this.buttons[4], visible: f.canCancel && this.$auth.hasPermi('shipping-plan-manage:replenishment-order:cancel') }, | |
| 67 | + { ...this.buttons[0], visible: f.canEdit }, // 不需要额外的角色权限 | |
| 68 | + { ...this.buttons[1], visible: f.canAuditDetail && this.$auth.hasPermi('sample-order:confirmation-form:review') }, | |
| 69 | + { ...this.buttons[2], visible: f.canAudit && this.$auth.hasPermi('sample-order:confirmation-form:approve') }, | |
| 74 | 70 | ] |
| 75 | 71 | } |
| 76 | 72 | }, | ... | ... |