| | |
| | | </text> |
| | | <text class="blue-btn small-btn ml-10" |
| | | v-if="isShowOrder(item.status)" |
| | | @click.stop=""> |
| | | @click.stop="confirmServiceOrder(item.id)"> |
| | | 确认预约 |
| | | </text> |
| | | <text class="blue-btn small-btn ml-10" |
| | |
| | | name: '待确认' |
| | | }, |
| | | { |
| | | state: 8, |
| | | state: 2, |
| | | name: '待排班' |
| | | }, |
| | | { |
| | | state: 2, |
| | | state: 3, |
| | | name: '待配料' |
| | | }, |
| | | { |
| | | state: 3, |
| | | state: 4, |
| | | name: '待服务' |
| | | }, |
| | | { |
| | | state: 4, |
| | | state: 5, |
| | | name: '服务中' |
| | | }, |
| | | { |
| | | state: 5, |
| | | state: 6, |
| | | name: '已完成' |
| | | } |
| | | ], |
| | |
| | | }, |
| | | // 是否显示确认预约 |
| | | isShowOrder(status){ |
| | | return status == 1 && this.$utils.hasPermission('fwdgl.qryy'); |
| | | return status == 9 && this.$utils.hasPermission('fwdgl.qryy'); |
| | | }, |
| | | // 是否显示开始服务按钮 |
| | | isShowStartServiceBtn(status, items){ |
| | |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.$httpUtils.request('/api/serviceOrder/cancelService/'+id).then((res) => { |
| | | if(res.status == 200){ |
| | | this.reloadData() |
| | | } |
| | | this.$toast.info(res.info); |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // 确认预约 |
| | | confirmServiceOrder(id){ |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认预约吗?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.$httpUtils.request('/api/serviceOrder/confirmServiceOrder', { |
| | | id:id |
| | | }, 'POST').then((res) => { |
| | | if(res.status == 200){ |
| | | this.reloadData() |
| | | } |
| | |
| | | return '已完成' |
| | | } else if(val == 7){ |
| | | return '服务单结束' |
| | | } else if(val == 9){ |
| | | return '待确认' |
| | | } else { |
| | | return '已取消' |
| | | } |