Commit cd4c94b5adc94f0013764abfe51dd15e7c3b1c08
1 parent
b905dd56
feat: 草稿要车单-详情-审核详情按钮增加status判断&详情按钮样式优化
Showing
2 changed files
with
3 additions
and
2 deletions
| 1 | 1 | <template> |
| 2 | - <view class="button-bar"> | |
| 2 | + <view v-if="effectiveButtons.length" class="button-bar"> | |
| 3 | 3 | <view v-if="showMoreButton" class="more-link" @click="toggleMore">更多</view> |
| 4 | 4 | <view class="button-grid" :style="{ gridTemplateColumns: gridColumns }"> |
| 5 | 5 | <view v-for="(btn, idx) in visibleButtons" :key="idx" class="action-button" :class="buttonClass(btn)" :style="buttonStyle(btn)" @click="emitClick(btn)">{{ btn.text }}</view> | ... | ... |
| ... | ... | @@ -55,7 +55,8 @@ export default { |
| 55 | 55 | const f = this.statusFlags |
| 56 | 56 | return [ |
| 57 | 57 | { ...this.buttons[0], visible: f.canEdit && this.$auth.hasPermi('shipping-plan-manage:draft-order:modify') }, |
| 58 | - { ...this.buttons[1], visible: this.$auth.hasPermi('shipping-plan-manage:draft-order:review') }, | |
| 58 | + // 审核详情按钮 需要判断 status有值时 才展示 | |
| 59 | + { ...this.buttons[1], visible: (this.form.status || false) && this.$auth.hasPermi('shipping-plan-manage:draft-order:review') }, | |
| 59 | 60 | { ...this.buttons[2], visible: f.canAudit && this.$auth.hasPermi('shipping-plan-manage:draft-order:approve') }, |
| 60 | 61 | { ...this.buttons[3], visible: f.canCancel && this.$auth.hasPermi('shipping-plan-manage:draft-order:cancel') }, |
| 61 | 62 | ] | ... | ... |