Commit efaa3e0c by LJM

PDD端无单号登记到货未显示在“到货记录”列表

parent 26639865
......@@ -334,6 +334,13 @@
margin-bottom: 10rpx;
}
.input-box {
.uni-arrow {
width: 14rpx;
height: 9rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png') no-repeat center;
background-size: contain;
margin-left: 12rpx;
}
.uni-input {
height: 55rpx;
background: #ffffff;
......@@ -352,5 +359,20 @@
padding: 18rpx;
}
}
.sel-box {
height: 55rpx;
background: #ffffff;
border-radius: 10rpx;
border: 1px solid #1969f9;
font-size: 17rpx;
padding-left: 18rpx;
.uni-arrow {
width: 14rpx;
height: 9rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png') no-repeat center;
background-size: contain;
margin-right: 12rpx;
}
}
}
}
......@@ -138,6 +138,17 @@
<text class="tt">注意:物流单号、其它信息必填其一</text>
</view>
<view class="input-wrap column">
<text class="label-title">仓库:</text>
<view class="sel-box">
<picker @change="bindPickerChange($event, 1)" :value="warehouse_id_index" :range="warehouse_id_data" range-key="name" style="width: 100%;height: 100%;">
<view class="row verCenter bothSide" style="height: 51rpx;">
<view class="uni-input">{{ warehouse_id_data[warehouse_id_index].name }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
</view>
<view class="input-wrap column">
<text class="label-title">物流公司:</text>
<view class="input-box"><input type="text" class="uni-input" placeholder-style="color:#919399" placeholder="请输入物流公司(必填)" v-model="formParams.logistics_company" /></view>
</view>
......@@ -175,12 +186,15 @@ export default {
filter_list: [], //筛选已选中的列表
filter_id: [], //过滤处理的id
detail: {}, //详情的数据
warehouse_id_index: 0,
warehouse_id_data: [],
searchParams: {
stock_in_sn: '', //入库单号
tracking_no: '', //物流单号
stock_in_with_stock_in_items_inhouse: '' //入仓单号
},
formParams: {
warehouse_id: '',
logistics_company: '',
logistics_sn: '',
other_info: ''
......@@ -194,6 +208,9 @@ export default {
});
}
},
onLoad() {
this.getWareHouselist();
},
onShow() {
this.getData();
},
......@@ -213,6 +230,27 @@ export default {
return result;
},
/**
* 获取仓库
*/
getWareHouselist() {
this.request(API.getWareHouselist, 'POST', { warehouse_status: 1 }, false).then(res => {
if (res.code === 0) {
this.formParams.warehouse_id = res.data.list[0].warehouse_id;
this.warehouse_id_data = res.data.list.map(function(item) {
return {
name: item.warehouse_name,
value: item.warehouse_id
};
});
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 筛选过滤出选中的元素
*/
filterChange(index) {
......@@ -361,6 +399,7 @@ export default {
} else if (type == 2) {
stock_in_id[0] = id;
}
this.request(API.addStockInRegister, 'POST', { stock_in_id: JSON.stringify(stock_in_id) }, true).then(res => {
if (res.code === 0) {
uni.showToast({
......@@ -381,9 +420,14 @@ export default {
}
});
},
bindPickerChange: function(e) {
bindPickerChange: function(e, type) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
if (type == 1) {
this.warehouse_id_index = e.detail.value;
this.formParams.warehouse_id = this.warehouse_id_data[e.detail.value].value;
} else {
this.index = e.detail.value;
}
},
showDrawer(stock_in_sn) {
this.$refs.showRight.open();
......
......@@ -113,7 +113,6 @@ export default {
getData() {
this.request(API.getWareHouselist, 'POST', { warehouse_status: 1 }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
this.formParams.warehouse_id = res.data.list[0].warehouse_id;
this.warehouse_id_data = res.data.list.map(function(item) {
return {
......
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