| | |
| | | @click.stop="cancelOrder(item.id)"> |
| | | 取消 |
| | | </text> |
| | | <text class="blue-btn small-btn ml-10" |
| | | v-if="isShowOrder(item.status)" |
| | | @click.stop=""> |
| | | 确认预约 |
| | | </text> |
| | | <text class="blue-btn small-btn ml-10" |
| | | v-if="isShowStartServiceBtn(item.status, item.projs)" |
| | | @click.stop="startService(item.id)"> |
| | |
| | | } |
| | | this.loadList(); |
| | | this.userId = this.$httpUtils.getRoleInfo().id; |
| | | // 判断权限 |
| | | // #ifdef APP-PLUS |
| | | if(!this.$utils.hasPermission('fwdgl.add')){ |
| | | let webView = this.$mp.page.$getAppWebview(); |
| | | webView.setTitleNViewButtonStyle(0, { |
| | | width: 0, |
| | | }); |
| | | } |
| | | // #endif |
| | | }, |
| | | onNavigationBarButtonTap(Object){ |
| | | if(Object.key === 'add'){ |
| | |
| | | isShowFooter(status, items, staffId){ |
| | | return this.isShowCancelBtn(status, items, staffId) || |
| | | this.isShowStartServiceBtn(status, items) || |
| | | this.isShowEndServiceBtn(status, items) |
| | | this.isShowEndServiceBtn(status, items) || |
| | | this.isShowOrder(status) |
| | | }, |
| | | // 是否显示取消按钮 |
| | | isShowCancelBtn(status, items, staffId){ |
| | | // 美疗师和下单顾问可以取消服务 |
| | | let isEnable = (items.some((item) => item.id == this.userId)) || (this.userId == staffId); |
| | | return status != 5 && status != 6 && status != 7 && status != 8 && isEnable; |
| | | return status != 5 && status != 6 && status != 7 && status != 8 && isEnable && this.$utils.hasPermission('fwdgl.cancel'); |
| | | }, |
| | | // 是否显示确认预约 |
| | | isShowOrder(status){ |
| | | return status == 1 && this.$utils.hasPermission('fwdgl.qryy'); |
| | | }, |
| | | // 是否显示开始服务按钮 |
| | | isShowStartServiceBtn(status, items){ |
| | | // 只有美疗师本人才可以开始服务 |
| | | let isEnable = items.some((item) => item.id == this.userId) |
| | | return status == 4 && isEnable; |
| | | return status == 4 && isEnable && this.$utils.hasPermission('fwdgl.begin'); |
| | | }, |
| | | // 是否显示结束服务按钮 |
| | | isShowEndServiceBtn(status, items){ |
| | | // 只有美疗师本人才可以开始服务 |
| | | let isEnable = items.some((item) => item.id == this.userId) |
| | | return status == 5 && isEnable; |
| | | return status == 5 && isEnable && this.$utils.hasPermission('fwdgl.end'); |
| | | }, |
| | | search(val){ |
| | | this.queryKey = val; |