diff --git a/canteen/pages/purchase/detail.vue b/canteen/pages/purchase/detail.vue index 93ba4e1..528280c 100644 --- a/canteen/pages/purchase/detail.vue +++ b/canteen/pages/purchase/detail.vue @@ -20,26 +20,24 @@ - + - - - 车辆 - {{order.car_license}} - - - 司机 - {{order.deliver_man}} - - - 联系电话 - {{order.deliver_phone}} - - - 收货时间 - {{order.deadline}} - - + + 车辆 + {{order.car_license}} + + + 司机 + {{order.deliver_man}} + + + 联系电话 + {{order.deliver_phone}} + + + 收货时间 + {{order.deadline_text}} + 证明材料-供应端 @@ -303,23 +301,31 @@ }, // 改变订单状态 orderStateChange(state){ - uni.showModal({ - title: '温馨提示', - content: '确定继续退单吗?', - confirmColor: '#FF0000', - cancelColor: '#11D189', - success: result => { - if(result.confirm){ - this.$http(this.API.API_CANTEEN_PURCHASEUPDATE, { - p_sn: this.p_sn, - state: state - }).then(res => { - console.log("orderStateChange", res); - this.$msg('操作成功').then(()=> this.getData()); - }) + let that = this; + if(state == '已退单'){ + uni.showModal({ + title: '温馨提示', + content: '退单前请与供应商协商,以免造成损失!确定继续退单操作吗?', + confirmColor: '#FF0000', + cancelColor: '#11D189', + success: result => { + if(result.confirm){ + $change(); + } } - } - }) + }) + }else{ + $change(); + } + + function $change(){ + that.$http(that.API.API_CANTEEN_PURCHASEUPDATE, { + p_sn: that.p_sn, + state: state + }).then(res => { + that.$msg('操作成功').then(()=> that.getData()); + }) + } } } }