Commit 3f0bd246 by liangjianmin

bug

parent b7fd246c
......@@ -61,7 +61,7 @@ export default {
{
name: '快递回单上传',
iconfont: 'icon-a-juxing1',
tips: 19
tips: ''
},
{
name: '收货登记',
......@@ -153,7 +153,7 @@ export default {
} else {
uni.showModal({
title: '提示',
content: '后续陆续开此功能!',
content: '后续陆续开此功能!',
showCancel: false,
confirmText: '关闭',
success: function(res) {
......
......@@ -24,8 +24,8 @@
<view class="box row verCenter">
<view class="label">放置托盘</view>
<view class="el-select row verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
<view class="uni-input">{{ array[index] || '请选择' }}</view>
<picker @change="bindPickerChange" :value="index" :range="traySelectOption" range-key="tray_sn">
<view class="uni-input">{{ traySelectOption[index].tray_sn || '请选择' }}</view>
</picker>
</view>
</view>
......@@ -45,11 +45,11 @@ export default {
characteristics: '',
text: '总箱数',
index: -1,
array: ['暂时存储', '第1卡板', '第2卡板', '第3卡板', '第4卡板', '第5卡板'],
index_erp_order_sn_pre: -1,
index_print_type: 0,
items_erp_order_sn_pre: ['A单号', 'B单号', 'D单号'],
items_print_type: ['卡板', '散箱'],
traySelectOption: [],
form: {
erp_order_sn_pre: '',
print_type: 1,
......@@ -59,11 +59,21 @@ export default {
}
};
},
created(){
this.getTraySelectOption();
},
methods: {
getTraySelectOption() {
this.request(API.getTraySelectOption, 'POST', { erp_order_sn: this.form.erp_order_sn_pre + this.form.erp_order_sn_number}, false).then(res => {
if (res.err_code === 0) {
this.traySelectOption = res.data;
}
});
},
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value);
this.index = e.target.value;
this.form.tray_remark = e.target.value;
this.form.tray_remark = this.traySelectOption[e.target.value].wstylt_id;
},
submit() {
this.openBluetoothAdapter();
......
......@@ -9,11 +9,11 @@
</view>
<view class="box row verCenter">
<view class="label">入仓号</view>
<input type="number" v-model="form.erp_order_sn_number" placeholder-style="font-size:24rpx;color:#404547;" class="uni-input" placeholder="请输入" />
<input type="number" @input="onKeyInput" v-model="form.erp_order_sn_number" placeholder-style="font-size:24rpx;color:#404547;" class="uni-input" placeholder="请输入" />
</view>
<view class="box row verCenter">
<view class="label">{{ text }}</view>
<input type="number" v-model="form.label_num" placeholder-style="font-size:24rpx;color:#404547;" class="uni-input" placeholder="请输入" />
<input type="number" v-model="form.label_sort" placeholder-style="font-size:24rpx;color:#404547;" class="uni-input" placeholder="请输入" />
</view>
</view>
<view class="btn row rowCenter verCenter" @click="submit()">提交打印</view>
......@@ -28,18 +28,31 @@ export default {
return {
text: '标签数量',
index_erp_order_sn_pre: -1,
index_print_type: 0,
items_erp_order_sn_pre: ['A单号', 'B单号', 'D单号'],
form: {
erp_order_sn_pre: '',
erp_order_sn_number: '',
label_num: '',
tray_remark: ''
label_sort: ''
}
};
},
onShow() {},
methods: {
onKeyInput: function(event) {
if(event.target.value.length >3){
this.getErpOrderSnPrintLabelType();
}
},
getErpOrderSnPrintLabelType(){
this.request(API.getErpOrderSnPrintLabelType, 'POST', { erp_order_sn: this.form.erp_order_sn_pre + this.form.erp_order_sn_number}, false).then(res => {
if (res.err_code === 0) {
if(res.data == 1){
this.text='标签数量';
}else{
this.text='子箱号';
}
}
});
},
submit() {
if (!this.form.erp_order_sn_pre) {
uni.showToast({
......@@ -64,7 +77,7 @@ export default {
return false;
}
if (!this.form.label_num) {
if (!this.form.label_sort) {
uni.showToast({
icon: 'error',
title: '请输入' + this.text
......@@ -72,7 +85,7 @@ export default {
return false;
}
if (!/(^[0-9]*$)/.test(this.form.label_num)) {
if (!/(^[0-9]*$)/.test(this.form.label_sort)) {
uni.showToast({
icon: 'error',
title: this.text + '为纯数字'
......@@ -80,8 +93,7 @@ export default {
return false;
}
this.request(API.printLabel, 'POST', this.form).then(res => {
this.request(API.getPrintLabel, 'POST', { erp_order_sn: this.form.erp_order_sn_pre + this.form.erp_order_sn_number, label_sort: this.form.label_sort }).then(res => {
if (res.err_code === 0) {
uni.showModal({
title: '提示',
......@@ -110,13 +122,10 @@ export default {
this.index_erp_order_sn_pre = index;
if (index == 0) {
this.form.erp_order_sn_pre = 'A';
this.index = -1;
} else if (index == 1) {
this.form.erp_order_sn_pre = 'B';
this.index = 0;
} else if (index == 2) {
this.form.erp_order_sn_pre = 'D';
this.index = 0;
}
}
}
......
......@@ -24,7 +24,15 @@ const API = {
/**
* 获取补打标签数据
* */
getPrintLabel: API_BASE + '/supplywechatwms/getPrintLabel'
getPrintLabel: API_BASE + '/supplywechatwms/getPrintLabel',
/**
* 获取托盘下拉列表
* */
getTraySelectOption: API_BASE + '/supplywechatwms/getTraySelectOption',
/**
* 获取入仓号打印类型
* */
getErpOrderSnPrintLabelType: API_BASE + '/supplywechatwms/getErpOrderSnPrintLabelType'
}
......
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