|
|
@ -77,7 +77,7 @@ |
|
|
<!-- 操作按钮 --> |
|
|
<!-- 操作按钮 --> |
|
|
<view class="fixed-bottom"> |
|
|
<view class="fixed-bottom"> |
|
|
<view v-if="type == '待接单'" class="lf-row-flex-end"> |
|
|
<view v-if="type == '待接单'" class="lf-row-flex-end"> |
|
|
<button class="btn btn2" style="background-color: #1833F2;" @click="orderTaking">立即接单</button> |
|
|
|
|
|
|
|
|
<button class="btn btn2" :class="{'lf-btn-disabled': button_click}" style="background-color: #1833F2;" @click="orderTaking">立即接单</button> |
|
|
</view> |
|
|
</view> |
|
|
<view v-else-if="type == '备货中'" class="lf-row-flex-end"> |
|
|
<view v-else-if="type == '备货中'" class="lf-row-flex-end"> |
|
|
<button class="btn btn1" @click="is_show_voucher = true">上传凭证</button> |
|
|
<button class="btn btn1" @click="is_show_voucher = true">上传凭证</button> |
|
|
@ -198,7 +198,8 @@ |
|
|
driver_name: '', |
|
|
driver_name: '', |
|
|
driver_phone: '', |
|
|
driver_phone: '', |
|
|
canteen_voucher: [], // 食堂端凭证 |
|
|
canteen_voucher: [], // 食堂端凭证 |
|
|
supplier_voucher: [] // 供应端凭证 |
|
|
|
|
|
|
|
|
supplier_voucher: [], // 供应端凭证 |
|
|
|
|
|
button_click: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(options){ |
|
|
onLoad(options){ |
|
|
@ -315,8 +316,13 @@ |
|
|
// 用户点击确定,将图片上传至oss,并将url发送给后端 |
|
|
// 用户点击确定,将图片上传至oss,并将url发送给后端 |
|
|
submitImage(){ |
|
|
submitImage(){ |
|
|
let that = this; |
|
|
let that = this; |
|
|
|
|
|
if(that.button_click){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
that.button_click = true; |
|
|
let voucher_list = that.voucher_list; |
|
|
let voucher_list = that.voucher_list; |
|
|
if(voucher_list.length <= 0){ |
|
|
if(voucher_list.length <= 0){ |
|
|
|
|
|
that.button_click = false; |
|
|
return that.$msg('您未上传图片哦'); |
|
|
return that.$msg('您未上传图片哦'); |
|
|
}; |
|
|
}; |
|
|
that.is_show_voucher = false; |
|
|
that.is_show_voucher = false; |
|
|
@ -345,11 +351,16 @@ |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
that.voucher_list = []; |
|
|
that.voucher_list = []; |
|
|
that.$msg('凭证已上传成功!'); |
|
|
that.$msg('凭证已上传成功!'); |
|
|
|
|
|
that.button_click = false; |
|
|
that.getData(); |
|
|
that.getData(); |
|
|
}).catch(err => uni.hideLoading()); |
|
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
that.button_click = false; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
|
|
|
that.button_click = false; |
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title: '', |
|
|
title: '', |
|
|
content: JSON.stringify(err), |
|
|
content: JSON.stringify(err), |
|
|
@ -360,23 +371,31 @@ |
|
|
}, |
|
|
}, |
|
|
// 立即接单 |
|
|
// 立即接单 |
|
|
orderTaking(){ |
|
|
orderTaking(){ |
|
|
|
|
|
if(this.button_click) return; |
|
|
|
|
|
this.button_click = true; |
|
|
this.$http(this.API.API_SUPPLIER_PURCHASEORDERACCEPT, { |
|
|
this.$http(this.API.API_SUPPLIER_PURCHASEORDERACCEPT, { |
|
|
p_sn: this.p_sn |
|
|
p_sn: this.p_sn |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
this.$msg('接单成功'); |
|
|
this.$msg('接单成功'); |
|
|
|
|
|
this.button_click = false; |
|
|
this.getData(); |
|
|
this.getData(); |
|
|
}); |
|
|
|
|
|
|
|
|
}).catch(err => this.button_click = false) |
|
|
}, |
|
|
}, |
|
|
// 确认发货 |
|
|
// 确认发货 |
|
|
confirmDeliver(){ |
|
|
confirmDeliver(){ |
|
|
|
|
|
if(this.buttom_click) return; |
|
|
|
|
|
this.buttom_click = true; |
|
|
let l_p_num = this.l_p_num; |
|
|
let l_p_num = this.l_p_num; |
|
|
let driver_name = this.driver_name; |
|
|
let driver_name = this.driver_name; |
|
|
let driver_phone = this.driver_phone; |
|
|
let driver_phone = this.driver_phone; |
|
|
if(!l_p_num){ |
|
|
if(!l_p_num){ |
|
|
|
|
|
this.buttom_click = false; |
|
|
return this.$msg('请输入车牌号') |
|
|
return this.$msg('请输入车牌号') |
|
|
}else if(!driver_name){ |
|
|
}else if(!driver_name){ |
|
|
|
|
|
this.buttom_click = false; |
|
|
return this.$msg('请输入司机姓名') |
|
|
return this.$msg('请输入司机姓名') |
|
|
}else if(!driver_phone){ |
|
|
}else if(!driver_phone){ |
|
|
|
|
|
this.buttom_click = false; |
|
|
return this.$msg('请输入司机电话') |
|
|
return this.$msg('请输入司机电话') |
|
|
} |
|
|
} |
|
|
this.is_show_receiving = false; |
|
|
this.is_show_receiving = false; |
|
|
@ -387,8 +406,9 @@ |
|
|
car_license: l_p_num |
|
|
car_license: l_p_num |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
this.$msg('确认发货成功'); |
|
|
this.$msg('确认发货成功'); |
|
|
|
|
|
this.buttom_click = false; |
|
|
this.getData(); |
|
|
this.getData(); |
|
|
}); |
|
|
|
|
|
|
|
|
}).catch(err => this.buttom_click = false) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|