Commit 1122d384 by LJM

js

parent efaa3e0c
......@@ -102,7 +102,7 @@
<view class="bor"></view>
<view class="tip-box row verCenter" v-if="workingRule">
<text class="iconfont icon-a-juxing4"></text>
<text class="t1">{{ workingRuleList.prefix }}{{ workingRuleList.execute_type_val }}库位:</text>
<text class="t1">{{ workingRuleList.prefix || '' }}{{ workingRuleList.execute_type_val || '' }}库位:</text>
<text class="t2">{{ workingRule }}</text>
</view>
<view class="field-item row">
......@@ -192,7 +192,8 @@ export default {
* 监听上架数量
*/
inputNumChange: debounce(function(event, pending_shelf_qty) {
if (this.formParams.position_code && this.formParams.qty_on_shelf) {
//如果是退货入库就不请求推荐规则
if (this.formParams.position_code && this.formParams.qty_on_shelf && this.detail.stock_in_type != 2) {
this.getWorkingRuleList();
}
var pending_shelf_qty = Number(pending_shelf_qty);
......@@ -206,7 +207,8 @@ export default {
*/
inputPositionCodeChange: debounce(function(event) {
this.getWhPositionList();
if (this.formParams.position_code && this.formParams.qty_on_shelf) {
//如果是退货入库就不请求推荐规则
if (this.formParams.position_code && this.formParams.qty_on_shelf && this.detail.stock_in_type != 2) {
this.getWorkingRuleList();
}
}, 500),
......@@ -225,20 +227,28 @@ export default {
this.formParams.tally_id = res.data.tally_id;
if (res.data.stock_in_type != 2) {
this.getWorkingRuleList();
} else {
this.getWhPositionList(1);
}
}
});
},
/**
* 获取库位
* @param {Object} type
* type 退货入库
*/
getWhPositionList() {
getWhPositionList(type) {
this.request(API.getWhPositionList, 'POST', { warehouse_id: this.detail.warehouse_id, stock_in_type: this.detail.stock_in_type }, false).then(res => {
if (res.code === 0) {
var position_code = this.formParams.position_code;
this.is_submit = res.data.list.some(function(obj) {
return obj.position_code === position_code;
});
if (type == 1) {
this.workingRuleList.prefix = '推荐';
this.workingRule = res.data.list.map(item => item.position_code).join(',');
} else {
var position_code = this.formParams.position_code;
this.is_submit = res.data.list.some(function(obj) {
return obj.position_code === position_code;
});
}
} else {
uni.showToast({
title: res.msg,
......
......@@ -257,6 +257,21 @@
<text class="iconfont icon-juxing2" @click="closeDrawer(2)"></text>
<text class="text">按容器复核</text>
</view>
<view class="pack">
<view class="h2">打包箱号:</view>
<view class="row verCenter bothSide">
<view class="search row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入打包箱号" placeholder-style="color:#919399" v-model="searchParams.box_name" @input="handleInput(1, searchParams.box_name)" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag_box_name"></text>
</view>
<view class="row verCenter">
<view class="icon-box row rowCenter verCenter" @click="refresh"><text class="iconfont icon-juxing3"></text></view>
</view>
</view>
</view>
<view class="field-item row" style="margin-top: 39rpx;">
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">容 器:</text>
......@@ -363,7 +378,7 @@
<view class="search row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入物流单号" placeholder-style="color:#919399" v-model="searchParams.box_name" />
<input class="uni-input" placeholder="请输入打包箱号" placeholder-style="color:#919399" v-model="searchParams.box_name" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag_box_name"></text>
</view>
......@@ -675,6 +690,13 @@ export default {
*按货品复核-单个复核
*/
markChecked(stock_out_item_id, recheck_qty, box_name) {
if (!this.searchParams.box_name) {
uni.showToast({
title: '输入打包箱号',
icon: 'error'
});
return false;
}
if (Number(this.formParams.recheck_qty) <= 0) {
uni.showToast({
title: '输入复核数量',
......@@ -706,6 +728,13 @@ export default {
* 按容器复核-一键复核
*/
multiMarkChecked() {
if (!this.searchParams.box_name) {
uni.showToast({
title: '输入打包箱号',
icon: 'error'
});
return false;
}
this.request(API.multiMarkChecked, 'POST', { stock_out_item_ids: this.stock_out_item_ids.join(','), box_name: this.box_name }, true).then(res => {
if (res.code === 0) {
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