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({
......
...@@ -94,7 +94,9 @@ ...@@ -94,7 +94,9 @@
<text class="label">明细备注:</text> <text class="label">明细备注:</text>
<text class="desc">{{ item.remark }}</text> <text class="desc">{{ item.remark }}</text>
</view> </view>
<navigator class="btn-box row" :url="'/pages/putaway/single?stock_in_batch_sn=' + item.stock_in_batch_sn + '&tally_id=' + item.tally_id" hover-class="none"><view class="btn row rowCenter verCenter">上架</view></navigator> <navigator class="btn-box row" :url="'/pages/putaway/single?stock_in_batch_sn=' + item.stock_in_batch_sn + '&tally_id=' + item.tally_id" hover-class="none">
<view class="btn row rowCenter verCenter">上架</view>
</navigator>
</view> </view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
...@@ -137,11 +139,11 @@ ...@@ -137,11 +139,11 @@
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import { createArray } from '@/util/util.js'; import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
export default { export default {
data() { data() {
return { return {
isFocus: true, isFocus: true,
...@@ -235,7 +237,9 @@ export default { ...@@ -235,7 +237,9 @@ export default {
let warehouse_id = filter_arr.map(i => this.list[i].warehouse_id); let warehouse_id = filter_arr.map(i => this.list[i].warehouse_id);
let stock_in_type = filter_arr.map(i => this.list[i].stock_in_type); let stock_in_type = filter_arr.map(i => this.list[i].stock_in_type);
let isAllElementsEqual = warehouse_id.every(val => val === warehouse_id[0]); let isAllElementsEqual = warehouse_id.every(val => val === warehouse_id[0]);
this.formParams.position_code = ''; //清空每次输入的库位
this.is_submit = true;
//所选仓库必须要一样
if (isAllElementsEqual) { if (isAllElementsEqual) {
this.$refs.showRight.open(); this.$refs.showRight.open();
this.warehouse_id = warehouse_id[0]; this.warehouse_id = warehouse_id[0];
...@@ -473,8 +477,10 @@ export default { ...@@ -473,8 +477,10 @@ export default {
icon: 'success' icon: 'success'
}); });
setTimeout(() => { setTimeout(() => {
this.closeDrawer();
this.filter_id = []; this.filter_id = [];
this.formParams.position_code = ''; //清空每次输入的库位
this.is_submit = true;
this.closeDrawer();
this.getData(); this.getData();
}, 2000); }, 2000);
} else { } else {
...@@ -487,9 +493,9 @@ export default { ...@@ -487,9 +493,9 @@ export default {
}); });
} }
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/putaway/index.scss'; @import '@/assets/css/putaway/index.scss';
</style> </style>
\ No newline at end of file
...@@ -326,14 +326,12 @@ ...@@ -326,14 +326,12 @@
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: '确定', setTimeout(() => {
success: res => { //清空
if (res.confirm) {
//恢复初始
this.searchParams.stock_in_batch_sn = ''; this.searchParams.stock_in_batch_sn = '';
this.list = []; this.list = [];
this.is_focus = false; this.is_focus = false;
...@@ -344,9 +342,7 @@ ...@@ -344,9 +342,7 @@
this.searchParams.stock_in_batch_sn = ''; //清除入库批次号 旧标签 this.searchParams.stock_in_batch_sn = ''; //清除入库批次号 旧标签
this.is_focus = true; this.is_focus = true;
}, 500); }, 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