Commit a341cf4f by LJM

bug

parent 7f8bb222
Showing with 40 additions and 15 deletions
......@@ -90,7 +90,7 @@
<view class="uni-drawer-tally-receive-detail" v-if="detail">
<view class="title row rowCenter verCenter">
<text class="iconfont icon-juxing2" @click="closeDrawer()"></text>
<text class="text">位移操作</text>
<text class="text">移位操作</text>
</view>
<view class="field-item row" style="margin-top: 39rpx;">
<view class="item row verCenter" style="flex: 0 0 100%;">
......@@ -158,30 +158,30 @@
<text class="arrow">*</text>
<text class="input-title-t1">移位数量:</text>
</view>
<view class="input-box"><input type="text" class="uni-input" placeholder-style="color:#919399" placeholder="请输入" v-model="formParams.transfer_qty" /></view>
<view class="input-box"><input type="number" inputmode="numeric" class="uni-input" placeholder-style="color:#919399" placeholder="请输入" v-model="formParams.transfer_qty" /></view>
</view>
<view class="form-input">
<view class="input-title">
<text class="arrow">*</text>
<text class="input-title-t1">目标库位:</text>
</view>
<view class="input-box-search row bothSide verCenter">
<view class="input-box-search row bothSide verCenter" :class="{ 'error-style': !is_submit }">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入" placeholder-style="color:#919399" v-model="formParams.position_code" @input="handleInput(3, formParams.position_code)" />
<input class="uni-input" placeholder="请扫描或输入目标库位" placeholder-style="color:#919399" v-model="formParams.position_code" @input="handleInput(3, formParams.position_code)" />
</view>
<text class="iconfont icon-a-juxing11" v-if="input_flag_position_code" @click="clearInput(3)"></text>
</view>
</view>
<view class="form-input">
<view class="input-title">
<text class="arrow">*</text>
<text class="arrow"></text>
<text class="input-title-t1">目标容器:</text>
</view>
<view class="input-box-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="formParams.container_sn" @input="handleInput(4, formParams.container_sn)" />
<input class="uni-input" placeholder="请扫描或输入目标容器" placeholder-style="color:#919399" v-model="formParams.container_sn" @input="handleInput(4, formParams.container_sn)" />
</view>
<text class="iconfont icon-a-juxing11" v-if="input_flag_container_sn" @click="clearInput(4)"></text>
</view>
......@@ -202,6 +202,7 @@ import debounce from 'lodash/debounce';
export default {
data() {
return {
is_submit: true,
transfer_id: '',
input_flag_origin_pos_code: false,
input_flag_stock_in_batch_sn: false,
......@@ -212,6 +213,8 @@ export default {
index: 0,
list: [],
detail: {},
warehouse_id: '',
stock_in_type: '',
searchParams: {
transfer_id: '',
origin_pos_code: '', //源库位编码
......@@ -258,13 +261,6 @@ export default {
});
return false;
}
if (!this.formParams.container_sn) {
uni.showToast({
title: '请输入目标容器s',
icon: 'error'
});
return false;
}
this.request(API.confirmTransfer, 'POST', { ...this.formParams }, true).then(res => {
if (res.code === 0) {
......@@ -291,6 +287,8 @@ export default {
getData() {
this.request(API.getTransferDetail, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.warehouse_id = res.data.warehouse_id;
this.stock_in_type = res.data.stock_in_type;
this.list = res.data.trans_items;
} else {
uni.showToast({
......@@ -328,10 +326,13 @@ export default {
if (val) {
if (type == 1) {
this.input_flag_origin_pos_code = true;
this.getData();
} else if (type == 2) {
this.input_flag_stock_in_batch_sn = true;
this.getData();
} else if (type == 3) {
this.input_flag_position_code = true;
this.getWhPositionList();
} else if (type == 4) {
this.input_flag_container_sn = true;
}
......@@ -346,8 +347,32 @@ export default {
this.input_flag_container_sn = false;
}
}
this.getData();
}, 500)
}, 500),
/**
* 监听库位编码
*/
inputPositionCodeChange: debounce(function(event) {
this.getWhPositionList();
}, 500),
/**
* @param {Object} type
* 获取库位
*/
getWhPositionList() {
this.request(API.getWhPositionList, 'POST', { warehouse_id: this.warehouse_id, stock_in_type: 1 }, 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;
});
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
}
}
};
</script>
......
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