Commit 268e3cb1 by liangjianmin

解决相关bug

parent 4fa1b2ff
Showing with 45 additions and 11 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,26 +336,53 @@ export default { ...@@ -335,26 +336,53 @@ 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; return false;
} }
if (!this.form.wstylt_id) {
uni.showModal({
title: '提示',
content: '请选择放置托盘',
showCancel: 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);
} }
//禁止按钮重复点击
if (this.disabled) {
uni.showModal({
title: '提示',
content: '已确认收货,点击确定打印',
showCancel: true,
success: res => {
if (res.confirm) {
this.print();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
this.request(API.addSortGodds, 'POST', this.form, false).then(res => { this.request(API.addSortGodds, 'POST', this.form, false).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
uni.showModal({ uni.showModal({
...@@ -363,6 +391,7 @@ export default { ...@@ -363,6 +391,7 @@ export default {
showCancel: false, showCancel: false,
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
this.disabled = true; //禁止按钮重复点击
this.print(); this.print();
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
...@@ -370,18 +399,23 @@ export default { ...@@ -370,18 +399,23 @@ export default {
} }
}); });
} else { } else {
uni.showToast({ uni.showModal({
title: res.err_msg, title: '提示',
icon: 'error' 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