Commit 0547db2c by liangjianmin

ho

parent 1fc371ba
Showing with 21 additions and 26 deletions
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
</view> </view>
</navigator> </navigator>
<view class="print-form"> <view class="print-form">
<!-- <view class="box row verCenter"> <view class="box row verCenter">
<view class="label">订单类型</view> <view class="label">订单类型</view>
<view class="tab row verCenter"> <view class="tab row verCenter">
<view class="tab-pane row rowCenter verCenter" v-for="(item, index) in items_erp_order_sn_pre" :key="index" :class="{ curr: index_erp_order_sn_pre == index }" @click="change(index, 'erp_order_sn_pre')">{{ item }}</view> <view class="tab-pane row rowCenter verCenter" v-for="(item, index) in items_erp_order_sn_pre" :key="index" :class="{ curr: index_erp_order_sn_pre == index }" @click="change(index, 'erp_order_sn_pre')">{{ item }}</view>
</view> </view>
</view> --> </view>
<view class="box row verCenter"> <view class="box row verCenter">
<view class="label">打印类型</view> <view class="label">打印类型</view>
<view class="tab row verCenter"> <view class="tab row verCenter">
...@@ -29,11 +29,8 @@ ...@@ -29,11 +29,8 @@
</view> </view>
</view> </view>
<view class="box row verCenter"> <view class="box row verCenter">
<view class="row verCenter" style="flex:0 0 93%"> <view class="label">入仓号</view>
<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="text" v-model="form.erp_order_sn_number" placeholder-style="font-size:24rpx;color:#404547;" class="uni-input" placeholder="请输入" />
</view>
<text class="scan iconfont icon-juxing6" @click="scanChange()"></text>
</view> </view>
<view class="box row verCenter"> <view class="box row verCenter">
<view class="label">{{ text }}</view> <view class="label">{{ text }}</view>
...@@ -71,9 +68,11 @@ export default { ...@@ -71,9 +68,11 @@ export default {
platform: '', platform: '',
wstyptll_id: '', wstyptll_id: '',
form: { form: {
print_type: 1, //打印类型 erp_order_sn_pre: '',
erp_order_sn_number: '', //入仓号 print_type: 1,
label_num: '1' //总箱数 erp_order_sn_number: '',
label_num: '1',
tray_remark: ''
} }
}; };
}, },
...@@ -123,18 +122,17 @@ export default { ...@@ -123,18 +122,17 @@ export default {
} }
}, },
methods: { methods: {
scanChange() { getTraySelectOption() {
uni.scanCode({ this.request(API.getTraySelectOption, 'POST', {}, false).then(res => {
success: res => { if (res.err_code === 0) {
if (res.errMsg == 'scanCode:ok') { this.traySelectOption = res.data;
this.form.erp_order_sn_number = res.result; let token = uni.getStorageSync('token');
let tray_sn_index = uni.getStorageSync('tray_sn_index');
let tray_sn_value = uni.getStorageSync('tray_sn_value');
if (token) {
this.index = tray_sn_index;
this.form.tray_remark = tray_sn_value;
} }
},
fail: function(res) {
uni.showToast({
title: '扫码失败',
icon: 'error'
});
} }
}); });
}, },
...@@ -163,13 +161,13 @@ export default { ...@@ -163,13 +161,13 @@ export default {
}); });
return false; return false;
} }
/* if (!this.form.erp_order_sn_pre) { if (!this.form.erp_order_sn_pre) {
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
title: '请选择订单类型' title: '请选择订单类型'
}); });
return false; return false;
} */ }
if (!this.form.erp_order_sn_number) { if (!this.form.erp_order_sn_number) {
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
...@@ -239,9 +237,6 @@ export default { ...@@ -239,9 +237,6 @@ export default {
data.push('T 8 0 10 180 时间:' + this.printLabelData[this.print_number].create_time_cn + '\r\n'); data.push('T 8 0 10 180 时间:' + this.printLabelData[this.print_number].create_time_cn + '\r\n');
data.push('T 8 0 10 220 仓库代码:' + this.printLabelData[this.print_number].warehouse_code + '\r\n'); data.push('T 8 0 10 220 仓库代码:' + this.printLabelData[this.print_number].warehouse_code + '\r\n');
data.push('T 8 0 10 260 流水号:' + this.printLabelData[this.print_number].wstyptll_id_sn + '\r\n'); data.push('T 8 0 10 260 流水号:' + this.printLabelData[this.print_number].wstyptll_id_sn + '\r\n');
data.push('SETMAG 4 1');
data.push('T 8 0 350 30 #1');
data.push('SETMAG 0 0');
data.push('B QR 280 110 M 2 U 8\r\n'); data.push('B QR 280 110 M 2 U 8\r\n');
data.push('MA,' + this.printLabelData[this.print_number]['box_code'] + '|\r\n'); data.push('MA,' + this.printLabelData[this.print_number]['box_code'] + '|\r\n');
data.push('ENDQR\r\n'); data.push('ENDQR\r\n');
......
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