Commit 268e3cb1 by liangjianmin

解决相关bug

parent 4fa1b2ff
Showing with 63 additions and 29 deletions
......@@ -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>
</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="t2">去提交</text>
</navigator>
......@@ -176,6 +176,7 @@ export default {
picTextStatus: [], //照片文字说明
print_text: '总箱数',
text: '总箱数',
disabled: false, //按钮重复点击
printForm: {
erp_order_sn_pre: '', //A单B单
print_type: 1, //打印类型
......@@ -335,53 +336,86 @@ export default {
},
submit() {
if (!this.form.sort_goods_num) {
uni.showToast({
icon: 'error',
title: '请输入理货数量'
uni.showModal({
title: '提示',
content: '请输入理货数量',
showCancel: false
});
return false;
}
if (!this.form.gross_weight) {
uni.showToast({
icon: 'error',
title: '请输入毛重'
uni.showModal({
title: '提示',
content: '请输入毛重',
showCancel: false
});
return false;
}
if (!this.form.wstylt_id) {
uni.showModal({
title: '提示',
content: '请选择放置托盘',
showCancel: false
});
return false;
}
//截取入仓号
if (this.form.number) {
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.request(API.addSortGodds, 'POST', this.form, false).then(res => {
if (res.err_code === 0) {
uni.showModal({
title: '提示',
content: '确认收货成功,点击确定打印',
showCancel: false,
success: res => {
if (res.confirm) {
this.print();
} else if (res.cancel) {
console.log('用户点击取消');
}
//禁止按钮重复点击
if (this.disabled) {
uni.showModal({
title: '提示',
content: '已确认收货,点击确定打印',
showCancel: true,
success: res => {
if (res.confirm) {
this.print();
} else if (res.cancel) {
console.log('用户点击取消');
}
});
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
}
});
} else {
this.request(API.addSortGodds, 'POST', this.form, false).then(res => {
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() {
if (!this.device_name) {
uni.showToast({
icon: 'error',
title: '请连接蓝牙设备'
title: '请连接蓝牙'
});
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