Commit 268e3cb1 by liangjianmin

解决相关bug

parent 4fa1b2ff
Showing with 63 additions and 29 deletions
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<image v-if="item.isInspOrg" src="http://img.ichunt.com/images/ichunt/minProgram/scmMinProgram/wms/202203/08/d034765db26eb07075b2965dc96b8b35.png" mode="aspectFill" class="pic"></image> <image v-if="item.isInspOrg" src="http://img.ichunt.com/images/ichunt/minProgram/scmMinProgram/wms/202203/08/d034765db26eb07075b2965dc96b8b35.png" mode="aspectFill" class="pic"></image>
</view> </view>
</view> </view>
<navigator class="btn-submit row rowCenter verCenter" :url="'/pages/goods/tallyQuestion?number='+goodsArrangeData.number" hover-class="none"> <navigator class="btn-submit row rowCenter verCenter" :url="'/pages/goods/tallyQuestion?number=' + goodsArrangeData.number" hover-class="none">
<text class="t1">理货异常?</text> <text class="t1">理货异常?</text>
<text class="t2">去提交</text> <text class="t2">去提交</text>
</navigator> </navigator>
...@@ -176,6 +176,7 @@ export default { ...@@ -176,6 +176,7 @@ export default {
picTextStatus: [], //照片文字说明 picTextStatus: [], //照片文字说明
print_text: '总箱数', print_text: '总箱数',
text: '总箱数', text: '总箱数',
disabled: false, //按钮重复点击
printForm: { printForm: {
erp_order_sn_pre: '', //A单B单 erp_order_sn_pre: '', //A单B单
print_type: 1, //打印类型 print_type: 1, //打印类型
...@@ -335,53 +336,86 @@ export default { ...@@ -335,53 +336,86 @@ export default {
}, },
submit() { submit() {
if (!this.form.sort_goods_num) { if (!this.form.sort_goods_num) {
uni.showToast({ uni.showModal({
icon: 'error', title: '提示',
title: '请输入理货数量' content: '请输入理货数量',
showCancel: false
}); });
return false; return false;
} }
if (!this.form.gross_weight) { if (!this.form.gross_weight) {
uni.showToast({ uni.showModal({
icon: 'error', title: '提示',
title: '请输入毛重' content: '请输入毛重',
showCancel: false
});
return false;
}
if (!this.form.wstylt_id) {
uni.showModal({
title: '提示',
content: '请选择放置托盘',
showCancel: false
}); });
return false; return false;
} }
//截取入仓号
if (this.form.number) { if (this.form.number) {
this.printForm.erp_order_sn_pre = this.form.number.substr(0, 1); this.printForm.erp_order_sn_pre = this.form.number.substr(0, 1);
this.printForm.erp_order_sn_number = this.form.number.slice(1, this.form.number.length); this.printForm.erp_order_sn_number = this.form.number.slice(1, this.form.number.length);
} }
this.request(API.addSortGodds, 'POST', this.form, false).then(res => { //禁止按钮重复点击
if (res.err_code === 0) { if (this.disabled) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确认收货成功,点击确定打印', content: '已确认收货,点击确定打印',
showCancel: false, showCancel: true,
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
this.print(); this.print();
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
}
} }
}); }
} else { });
uni.showToast({ } else {
title: res.err_msg, this.request(API.addSortGodds, 'POST', this.form, false).then(res => {
icon: 'error' if (res.err_code === 0) {
}); uni.showModal({
} title: '提示',
}); content: '确认收货成功,点击确定打印',
showCancel: false,
success: res => {
if (res.confirm) {
this.disabled = true; //禁止按钮重复点击
this.print();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
}
}, },
/**
* 蓝牙打印
*/
print() { print() {
if (!this.device_name) { if (!this.device_name) {
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
title: '请连接蓝牙设备' title: '请连接蓝牙'
}); });
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment