Commit fe426d4b by LJM

移动端--按货品上架--一键上架操作后,继续操作一键上架时,会将上次填写的库位自动填入到库位输入框中

parent 3f9f5e93
...@@ -669,7 +669,6 @@ ...@@ -669,7 +669,6 @@
this.$forceUpdate(); this.$forceUpdate();
}, 1500); }, 1500);
} else if (type == 2) { } else if (type == 2) {
//入库批次号为自营仓库的时候,旧标签开启状态,输入文本后自动截取前8位,。 //入库批次号为自营仓库的时候,旧标签开启状态,输入文本后自动截取前8位,。
if (this.warehouse_id == 9 && this.old_Label) { if (this.warehouse_id == 9 && this.old_Label) {
val = getFirstEightChars(val); val = getFirstEightChars(val);
...@@ -1092,15 +1091,25 @@ ...@@ -1092,15 +1091,25 @@
}); });
}, },
/** /**
* @param {Object} lock_id
* @param {Object} pick_qty
* @param {Object} stock_out_item_id
* 按货品拣货提交 * 按货品拣货提交
*/ */
pick(lock_id, pick_qty, stock_out_item_id) { pick(lock_id, pick_qty, stock_out_item_id) {
var num = Number(this.detail.lock_qty) - Number(this.detail.pick_qty); var num = Number(this.detail.lock_qty) - Number(this.detail.pick_qty); //需求拣货的数量
var pick_qty_num = pick_qty * 1; var pick_qty_num = pick_qty * 1; //真实拣货数量
//拣货图片集合
var pic_ids = this.image_list.map(item => { var pic_ids = this.image_list.map(item => {
return item.pic_id; return item.pic_id;
}); });
this.request(API.pick, 'POST', { lock_id: lock_id, pick_qty: pick_qty, stock_out_item_id: stock_out_item_id, pic_ids: pic_ids.join(','), pick_remark: this.formParams.pick_remark }, true).then(res => { this.request(API.pick, 'POST', {
lock_id: lock_id,
pick_qty: pick_qty,
stock_out_item_id: stock_out_item_id,
pic_ids: pic_ids.join(','),
pick_remark: this.formParams.pick_remark,
}, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
uni.showToast({ uni.showToast({
title: '拣货成功', title: '拣货成功',
...@@ -1113,13 +1122,17 @@ ...@@ -1113,13 +1122,17 @@
// 根据 is_print 的值设置 setTimeout 的延迟时间 // 根据 is_print 的值设置 setTimeout 的延迟时间
const timeoutDuration = (this.is_print && this.warehouse_id == 9) ? 4000 : 2000; const timeoutDuration = (this.is_print && this.warehouse_id == 9) ? 4000 : 2000;
setTimeout(() => { setTimeout(() => {
this.getData();
if (pick_qty_num == num) { if (pick_qty_num == num) {
//清空数据
this.history_id = [];
this.filter_id = [];
this.search_keyword = '';
this.searchParams.stock_in_batch_sn = ''; this.searchParams.stock_in_batch_sn = '';
this.closeDrawer(1); this.closeDrawer(1);
} else { } else {
this.picked_num = Number(this.picked_num) - pick_qty_num; this.picked_num = Number(this.picked_num) - pick_qty_num;
} }
this.getData();
}, timeoutDuration); }, timeoutDuration);
} else { } else {
uni.showModal({ uni.showModal({
......
...@@ -326,27 +326,23 @@ ...@@ -326,27 +326,23 @@
this.request(API.quickTransfer, 'POST', this.formParams, true).then(res => { this.request(API.quickTransfer, 'POST', this.formParams, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.is_submit = true; this.is_submit = true;
uni.showModal({ uni.showToast({
title: '提示', title: '移位成功',
content: '移位成功', icon: 'success'
showCancel: false,
confirmText: '确定',
success: res => {
if (res.confirm) {
//恢复初始
this.searchParams.stock_in_batch_sn = '';
this.list = [];
this.is_focus = false;
setTimeout(() => {
this.formParams.position_code = ''; //清除目标库位
this.formParams.stock_id = ''; //清除表单的信息
this.formParams.transfer_qty = ''; //清除表单的信息
this.searchParams.stock_in_batch_sn = ''; //清除入库批次号 旧标签
this.is_focus = true;
}, 500);
}
}
}); });
setTimeout(() => {
//清空
this.searchParams.stock_in_batch_sn = '';
this.list = [];
this.is_focus = false;
setTimeout(() => {
this.formParams.position_code = ''; //清除目标库位
this.formParams.stock_id = ''; //清除表单的信息
this.formParams.transfer_qty = ''; //清除表单的信息
this.searchParams.stock_in_batch_sn = ''; //清除入库批次号 旧标签
this.is_focus = true;
}, 500);
}, 2000)
} else { } else {
this.is_submit = false; this.is_submit = false;
uni.showToast({ uni.showToast({
......
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