Commit bdb66553 by LJM

移动端--app--收货登记,增加根据物流单号查询出入仓号、物流公司进行登记

parent 11c9a30b
...@@ -229,3 +229,48 @@ ...@@ -229,3 +229,48 @@
color: #ffffff; color: #ffffff;
} }
} }
.popup-content {
background-color: #f1f4f6;
padding: 28rpx 24rpx 24rpx 24rpx;
border-radius: 10rpx;
width: 675rpx;
.title {
margin-bottom: 10rpx;
.t1 {
font-size: 26rpx;
color: #333;
}
.t2 {
font-size: 26rpx;
color: #197adb;
}
}
.tt {
font-size: 26rpx;
color: #333;
}
.list {
padding: 24rpx;
background-color: #ffffff;
margin-top: 24rpx;
.scroll-Y {
max-height: 600rpx;
}
.box {
height: 80rpx;
border-bottom: 1px solid #e6edf0;
&:last-child {
border-bottom: none;
}
.t1 {
font-size: 26rpx;
color: #333;
}
.select {
font-size: 26rpx;
color: #197adb;
}
}
}
}
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<view class="box row verCenter" v-if="currentIndex == 0"> <view class="box row verCenter" v-if="currentIndex == 0">
<text class="label">物流单号</text> <text class="label">物流单号</text>
<view class="uni-input-box row bothSide"> <view class="uni-input-box row bothSide">
<input type="text" class="uni-input" placeholder="请输入物流单号" placeholder-style="color:#404547;font-weight:bold;" v-model="form.logistics_number" /> <input type="text" class="uni-input" placeholder="请输入物流单号" placeholder-style="color:#404547;font-weight:bold;" v-model="form.logistics_number" @input="handleInput($event,1)" />
<view class="scan-view row verCenter" @click="scanChange()"> <view class="scan-view row verCenter" @click="scanChange()">
<text class="iconfont icon-juxing6"></text> <text class="iconfont icon-juxing6"></text>
<text class="tt">扫描</text> <text class="tt">扫描</text>
...@@ -77,6 +77,24 @@ ...@@ -77,6 +77,24 @@
</view> </view>
</view> </view>
<view class="btn row rowCenter verCenter" @click="submit()">确认收货</view> <view class="btn row rowCenter verCenter" @click="submit()">确认收货</view>
<!-- 选择入仓号 -->
<uni-popup ref="popup" background-color="#f00" borderRadius="10px 10px 10px 10px">
<view class="popup-content">
<view class="title">
<text class="t1">物料单号:</text>
<text class="t2">{{form.logistics_number}}</text>
</view>
<view class="tt">查询到以下入仓号,可选择进行登记</view>
<view class="list">
<scroll-view scroll-y="true" class="scroll-Y">
<view class="box row bothSide verCenter" v-for="(item,index) in erpOrderSn" :key="index">
<text class="t1">{{index+1}}:{{item}}</text>
<text class="select" @click="selecttErpOrderSn(index)">选中</text>
</view>
</scroll-view>
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
...@@ -84,6 +102,7 @@ ...@@ -84,6 +102,7 @@
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import { titleCase } from '@/util/util.js'; import { titleCase } from '@/util/util.js';
import w_md5 from '../../js_sdk/zww-md5/w_md5.js'; import w_md5 from '../../js_sdk/zww-md5/w_md5.js';
import debounce from 'lodash/debounce';
export default { export default {
data() { data() {
...@@ -99,6 +118,7 @@ ...@@ -99,6 +118,7 @@
unitIndex: 0, unitIndex: 0,
limitword: 0, limitword: 0,
id: '', id: '',
erpOrderSn: [],
form: { form: {
delivery_method: 1, //来货方式1物流2送货3上门取货 delivery_method: 1, //来货方式1物流2送货3上门取货
logistics_company: '', //物流公司 logistics_company: '', //物流公司
...@@ -153,6 +173,10 @@ ...@@ -153,6 +173,10 @@
console.log(res); console.log(res);
if (res.errMsg == 'scanCode:ok') { if (res.errMsg == 'scanCode:ok') {
this.form.logistics_number = res.result; this.form.logistics_number = res.result;
if (res.result) {
this.erpOrderSn = [];
this.getErpOrderSn(res.result);
}
} }
}, },
fail: function(res) { fail: function(res) {
...@@ -280,6 +304,44 @@ ...@@ -280,6 +304,44 @@
}, },
/**
* @param {Object} event 输入框监听
* @param {Object} type 1 物流
*/
handleInput: debounce(function(event, type) {
var value = event.target.value;
if (value) {
this.erpOrderSn = [];
this.getErpOrderSn(value);
}
}, 500),
/**
* 根据物料单号,筛选出入仓号列表
* @param {Object} val
*/
getErpOrderSn(val) {
this.request(API.getErpOrderSn, 'GET', { logistics_no: val }, true).then(res => {
if (res.err_code === 0) {
// 查询到入仓号,则弹出选择框,展示对应的入仓号,用户操作【选择】,则关闭弹窗并将选择的入仓号填入“入仓号”框中
if (res.data.length > 0) {
this.erpOrderSn = res.data;
this.$refs.popup.open();
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
/**
* 选中对应的入仓号
*/
selecttErpOrderSn(index) {
this.form.erp_order_sn = this.erpOrderSn[index];
this.$refs.popup.close();
},
inputChange() { inputChange() {
if (this.form.check_in_remark.length <= 200) { if (this.form.check_in_remark.length <= 200) {
this.limitword = this.form.check_in_remark.length; this.limitword = this.form.check_in_remark.length;
...@@ -389,5 +451,5 @@ ...@@ -389,5 +451,5 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '../../assets/css/goods/addReceiving.scss'; @import '@/assets/css/goods/addReceiving.scss';
</style> </style>
\ No newline at end of file
...@@ -309,7 +309,11 @@ const API = { ...@@ -309,7 +309,11 @@ const API = {
/** /**
* 供应链理货打印 - 箱号标签 * 供应链理货打印 - 箱号标签
*/ */
addSCTallyData: API_BASE_WMS + '/open/label/addSCTallyData' addSCTallyData: API_BASE_WMS + '/open/label/addSCTallyData',
/**
* 根据物料获取入仓号
*/
getErpOrderSn: API_BASE + '/supplywechatwms/getErpOrderSn'
} }
......
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