Commit a8f23424 by LJM

add

parent 1c0b0f0b
Showing with 41 additions and 14 deletions
......@@ -3,11 +3,12 @@
<view class="fix-box">
<view class="column-box row bothSide verCenter">
<view class="input-box row verCenter">
<input disabled class="uni-input" placeholder="当前箱号" placeholder-style="color:#000;font-weight: bold;" v-model="box_sn" />
<input class="uni-input" @input="handleInput($event,1)" :focus="is_focus" placeholder="当前箱号" placeholder-style="color:#000;font-weight: bold;" v-model="box_sn" />
</view>
<view class="action-bar">
<template v-if="box_sn">
<view class="btn1 row rowCenter verCenter" @click="print()">打印箱号</view>
<view class="action-bar row verCenter">
<template v-if="wsty_id">
<view class="btn1 row rowCenter verCenter" @click="print()" style="margin-right: 8rpx;">打印箱号</view>
<view class="btn row rowCenter verCenter" @click="getBoxSn()">取箱号</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="getBoxSn()">取箱号</view>
......@@ -16,7 +17,7 @@
</view>
<view class="column-box row bothSide verCenter">
<view class="input-box row verCenter">
<input class="uni-input" :focus="is_focus" @input="handleInput($event,1)" :disabled="tallyData.detail && tallyData.detail.length > 0 && step == 1 && erp_order_sn !=''" :class="{ 'disabled': tallyData.detail && tallyData.detail.length > 0 && step == 1 && erp_order_sn !='' }" placeholder="输入或扫描入仓号" placeholder-style="color:#000;font-weight: bold;" v-model="erp_order_sn" />
<input class="uni-input" :disabled="tallyData.detail && tallyData.detail.length > 0 && step == 1 && erp_order_sn !=''" :class="{ 'disabled': tallyData.detail && tallyData.detail.length > 0 && step == 1 && erp_order_sn !='' }" placeholder="输入或扫描入仓号" placeholder-style="color:#000;font-weight: bold;" v-model="erp_order_sn" />
</view>
<view class="action-bar row verCenter">
<template v-if="tallyData.detail && tallyData.detail.length > 0 && step == 1 && erp_order_sn != ''">
......@@ -57,7 +58,7 @@
<view class="info row verCenter" v-if="tallyData && tallyData.detail">
<view class="grid-item row verCenter">
<view class="t1">业务日期:</view>
<view class="t2">{{tallyData.create_time_sn}}</view>
<view class="t2">{{tallyData.create_time_cn}}</view>
</view>
<view class="grid-item row verCenter">
<view class="t1">型号总数:</view>
......@@ -108,10 +109,24 @@
</view>
</view>
<view class="pb16 row" style="border-bottom: 1px solid #E6EDF0;padding-bottom: 24rpx;">
<!-- 完全理货 -->
<template v-if="item.tally_status == 3">
<view class="row">
<text class="t3 w130" style="text-align: right;">总数量:</text>
<text class="t4">{{item.order_numbers}}</text>
</view>
</template>
<!-- 1未理货2部分理货 -->
<template v-else>
<view class="row" style="width: 50%;">
<text class="t3 w130">待收数量:</text>
<text class="t4">{{item.wait_tally_num}}</text>
</view>
<view class="row" style="width: 50%;">
<text class="t3 w130">总数量:</text>
<text class="t3 w130" style="text-align: right;">总数量:</text>
<text class="t4">{{item.order_numbers}}</text>
</view>
</template>
</view>
<view class="pb16 row verCenter bothSide" style="margin-top: 24rpx;">
<view class="row verCenter">
......@@ -123,9 +138,11 @@
<view class="row verCenter rowCenter">
<text class="t3 w130" style="width:105rpx;">原产地:</text>
<view class="input-text">
<!-- 完全理货 -->
<template v-if="item.tally_status == 3">
<input class="uni-input" placeholder="输入" placeholder-style="color:#000;font-weight: bold;" disabled="" v-model="form[index].origin" />
</template>
<!-- 1未理货2部分理货 -->
<template v-else>
<input class="uni-input" placeholder="输入" placeholder-style="color:#000;font-weight: bold;" disabled="" @click="open(index)" v-model="form[index].origin" />
</template>
......@@ -281,13 +298,13 @@
},
/**
* @param {Object} event 输入框监听
* @param {Object} type 1入仓号监听 2型号监听 3输入国家监听
* @param {Object} type 1号监听 2型号监听 3输入国家监听
*/
handleInput: debounce(function(event, type) {
var value = event.target.value;
if (type == 1) {
if (value) {
this.lockTally();
this.getBoxSn(value);
}
} else if (type == 2) {
if (value) {
......@@ -462,16 +479,26 @@
},
/**
* 获取箱号
* @param {Object} box_sn 传值就表示验证入仓号是否正确
*/
getBoxSn() {
this.request(API.getBoxSn, 'POST', {}, true).then(res => {
getBoxSn(box_sn) {
this.request(API.getBoxSn, 'POST', { box_sn: box_sn }, true).then(res => {
if (res.err_code === 0) {
this.box_sn = res.data.box_sn;
this.wsty_id = res.data.wsty_id;
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
uni.showModal({
title: '',
content: res.err_msg,
showCancel: false,
success: (res) => {
if (res.confirm) {
this.box_sn = '';
this.wsty_id = '';
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
......
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