Commit 071e2cc7 by LJM

修复一系列的bug

parent 6d11b013
...@@ -40,6 +40,13 @@ ...@@ -40,6 +40,13 @@
font-size: 24rpx; font-size: 24rpx;
color: #197adb; color: #197adb;
} }
.icon-jinggao2 {
position: relative;
font-size: 30rpx;
color: #c6c7cc;
margin-right: 30rpx;
z-index: 22;
}
} }
.tab { .tab {
height: 106rpx; height: 106rpx;
...@@ -70,13 +77,13 @@ ...@@ -70,13 +77,13 @@
} }
} }
.list { .list {
height: calc(100% - 420rpx); height: calc(100% - 346rpx);
.scroll-Y { .scroll-Y {
height: 100%; height: 100%;
.num { .num {
position: absolute; position: absolute;
left: 24rpx; left: 24rpx;
top: 39rpx; top: 30rpx;
width: 40rpx; width: 40rpx;
height: 28rpx; height: 28rpx;
border-radius: 4rpx; border-radius: 4rpx;
...@@ -131,6 +138,9 @@ ...@@ -131,6 +138,9 @@
} }
} }
} }
&.pb100 {
padding-bottom: 100rpx;
}
} }
.fix-btn { .fix-btn {
position: fixed; position: fixed;
......
{ {
"name": "wms", "name": "供应链",
"appid": "__UNI__81E2D4D", "appid": "__UNI__81E2D4D",
"description": "供应链面单系统", "description": "供应链面单系统",
"versionName": "1.0.0", "versionName": "1.0.0",
...@@ -43,7 +43,39 @@ ...@@ -43,7 +43,39 @@
/* ios打包配置 */ /* ios打包配置 */
"ios": {}, "ios": {},
/* SDK配置 */ /* SDK配置 */
"sdkConfigs": {} "sdkConfigs": {},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
}
} }
}, },
/* 快应用特有相关 */ /* 快应用特有相关 */
......
<template> <template>
<view class="abnormalTally"> <view class="abnormalTally">
<view class="input-box row bothSide verCenter" style="margin-bottom: 16rpx;"> <view class="input-box row bothSide verCenter" style="margin-bottom: 16rpx;">
<input class="uni-input" placeholder="请取箱号" disabled placeholder-style="color:#000;font-weight: bold;" v-model="box_sn" focus /> <input class="uni-input" placeholder="请取箱号" :focus="is_focus_1" placeholder-style="color:#000;font-weight: bold;" v-model="box_sn" @input="handleInput($event,1)" />
<template v-if="box_sn"> <view class="row verCenter">
<view class="btn1 row rowCenter verCenter" @click="print()">打印箱号</view> <text class="iconfont icon-jinggao2" @click="clearInput(1)" v-if="box_sn"></text>
<view class="btn row rowCenter verCenter" @click="canel()">取消装箱</view> <template v-if="box_sn">
</template> <view class="btn1 row rowCenter verCenter" @click="print()" style="margin-right: 8rpx;">打印箱号</view>
<template v-else> <view class="btn row rowCenter verCenter" @click="canel()">取消装箱</view>
<view class="btn row rowCenter verCenter" @click="getBoxSn()">取箱号</view> </template>
</template> <template v-else>
<view class="btn row rowCenter verCenter" @click="getBoxSn()">取箱号</view>
</template>
</view>
</view> </view>
<view class="input-box row bothSide verCenter"> <view class="input-box row bothSide verCenter">
<input class="uni-input" placeholder="请输入或扫描异常批次" placeholder-style="color:#000;font-weight: bold;" v-model="abnormal_batch" @input="handleInput($event)" /> <input class="uni-input" placeholder="请输入或扫描异常批次" :focus="is_focus_2" placeholder-style="color:#000;font-weight: bold;" v-model="abnormal_batch" @input="handleInput($event,2)" />
<view class="btn1 row rowCenter verCenter" @click="confirm()">确 认</view> <view class="row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="abnormal_batch"></text>
<view class="btn1 row rowCenter verCenter" @click="confirm()">确 认</view>
</view>
</view> </view>
<view class="tab row verCenter"> <view class="tab row verCenter">
<view class="box" v-for="(item,index) in arr" :key="index" :class="{curr:curr==index}" @click="tab(index)"> <view class="box" v-for="(item,index) in arr" :key="index" :class="{curr:curr==index}" @click="tab(index)">
...@@ -23,15 +29,19 @@ ...@@ -23,15 +29,19 @@
<template v-else-if="index == 3">({{have_close_box_num}})</template> <template v-else-if="index == 3">({{have_close_box_num}})</template>
</view> </view>
</view> </view>
<view class="list" v-if="list.length > 0"> <view class="list" v-if="list.length > 0" :class="{pb100:curr==3}">
<scroll-view scroll-y="true" class="scroll-Y"> <scroll-view scroll-y="true" class="scroll-Y">
<view class="box" v-for="(item,index) in list" :key="index"> <view class="box" v-for="(item,index) in list" :key="index">
<view class="text row bothSide verCenter"> <view class="text row bothSide">
<text class="num row rowCenter verCenter">{{index+1}}</text> <text class="num row rowCenter verCenter">{{index+1}}</text>
<!-- 左侧 --> <!-- 左侧 -->
<view class="bar" style="width: 60%;"> <view class="bar" style="width: 60%;">
<view class="t1 mb16">{{item.abnormal_batch}}</view> <view class="t1 mb16">{{item.abnormal_batch}}</view>
<view class="row verCenter mb16"> <view class="row verCenter mb16">
<text class="t2">入仓号:</text>
<text class="t3">{{item.erp_order_sn}}</text>
</view>
<view class="row verCenter mb16">
<text class="t2">型号:</text> <text class="t2">型号:</text>
<text class="t3">{{item.goods_type}}</text> <text class="t3">{{item.goods_type}}</text>
</view> </view>
...@@ -41,7 +51,13 @@ ...@@ -41,7 +51,13 @@
</view> </view>
</view> </view>
<!-- 右侧 --> <!-- 右侧 -->
<view class="bar" style="width: 40%;"> <view class="bar" style="width: 40%;margin-top: 30rpx;">
<template v-if="curr == 3">
<view class="row verCenter mb16">
<text class="t2">箱号:</text>
<text class="t3">{{item.box_sn}}</text>
</view>
</template>
<view class="row verCenter mb16"> <view class="row verCenter mb16">
<text class="t2">数量:</text> <text class="t2">数量:</text>
<text class="t3">{{item.tally_num}}</text> <text class="t3">{{item.tally_num}}</text>
...@@ -109,6 +125,8 @@ ...@@ -109,6 +125,8 @@
return { return {
email: uni.getStorageSync('email') || '', //操作人邮箱 email: uni.getStorageSync('email') || '', //操作人邮箱
curr: 0, curr: 0,
is_focus_1: true, //获取焦点动态化
is_focus_2: false,
arr: ['全部未装箱', '美产', '商检', '已装箱'], arr: ['全部未装箱', '美产', '商检', '已装箱'],
num: '', //异常数量总数 num: '', //异常数量总数
usa_num: 0, usa_num: 0,
...@@ -128,12 +146,14 @@ ...@@ -128,12 +146,14 @@
* 监听输入框 * 监听输入框
* @param {Object} event * @param {Object} event
*/ */
handleInput: debounce(function(event) { handleInput: debounce(function(event, type) {
var inputValue = event.target.value; var value = event.target.value;
if (inputValue) { if (type == 1) {
if (inputValue.includes('\n')) { if (value) {
this.getData(); this.getBoxSn(value);
} }
} else if (type == 2) {
this.getData();
} }
}, 500), }, 500),
/** /**
...@@ -151,16 +171,27 @@ ...@@ -151,16 +171,27 @@
}, },
/** /**
* 获取箱号 * 获取箱号
* @param {Object} box_sn 传值就表示验证入仓号是否正确
*/ */
getBoxSn() { getBoxSn(box_sn) {
this.request(API.getBoxSn, 'POST', {}, true).then(res => { this.request(API.getBoxSn, 'POST', { box_sn: box_sn }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.box_sn = res.data.box_sn; this.box_sn = res.data.box_sn;
this.wsty_id = res.data.wsty_id; this.wsty_id = res.data.wsty_id;
} else { } else {
uni.showToast({ uni.showModal({
title: res.err_msg, title: '',
icon: 'none' content: res.err_msg,
showCancel: false,
success: (res) => {
if (res.confirm) {
this.box_sn = '';
this.wsty_id = '';
this.clearInput(1);
} else if (res.cancel) {
console.log('用户点击取消');
}
}
}); });
} }
}); });
...@@ -196,13 +227,16 @@ ...@@ -196,13 +227,16 @@
* 异常型号装箱 * 异常型号装箱
*/ */
submitAbnormalBox(type, wstydl_id) { submitAbnormalBox(type, wstydl_id) {
if (!this.box_sn) { //装箱的时候验证
uni.showModal({ if (type == 1) {
title: '', if (!this.box_sn) {
content: '请先取箱号!并将打印的箱号贴于外箱上', uni.showModal({
showCancel: false title: '',
}); content: '请先取箱号!并将打印的箱号贴于外箱上',
return false; showCancel: false
});
return false;
}
} }
this.request(API.submitAbnormalBox, 'POST', { type: type, wstydl_id: wstydl_id, wsty_id: this.wsty_id }, true).then(res => { this.request(API.submitAbnormalBox, 'POST', { type: type, wstydl_id: wstydl_id, wsty_id: this.wsty_id }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
...@@ -309,7 +343,26 @@ ...@@ -309,7 +343,26 @@
canel() { canel() {
this.box_sn = ''; this.box_sn = '';
this.wsty_id = ''; this.wsty_id = '';
} },
/**
* 清空数据
*/
clearInput(type) {
if (type == 1) {
this.box_sn = '';
this.is_focus_1 = false;
setTimeout(() => {
this.is_focus_1 = true;
}, 200);
} else if (type == 2) {
this.abnormal_batch = '';
this.is_focus_2 = false;
setTimeout(() => {
this.is_focus_2 = true;
this.getData();
}, 200);
}
},
} }
}; };
</script> </script>
......
...@@ -50,18 +50,14 @@ ...@@ -50,18 +50,14 @@
handleInput: debounce(function(event) { handleInput: debounce(function(event) {
var inputValue = event.target.value; var inputValue = event.target.value;
if (inputValue) { if (inputValue) {
if (inputValue.includes('\n')) { // 执行添加操作
// 如果包含回车符,则移除回车符 this.add(inputValue);
const keyword = inputValue.replace(/\n/g, ''); // 清空输入框
// 执行添加操作 this.keyword = '';
this.add(keyword); // 再次获取焦点
// 清空输入框 this.clearInputAndFocus();
this.keyword = '';
// 再次获取焦点
this.clearInputAndFocus();
}
} }
}, 500), }, 800),
/** /**
* 添加 * 添加
*/ */
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
<view class="column-box row bothSide verCenter"> <view class="column-box row bothSide verCenter">
<view class="input-box row verCenter"> <view class="input-box row verCenter">
<input class="uni-input" :focus="is_focus_2" :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" :focus="is_focus_2" :disabled="form.length > 0 && step == 1 && erp_order_sn !=''" :class="{ 'disabled': form.length > 0 && step == 1 && erp_order_sn !='' }" placeholder="输入或扫描入仓号" placeholder-style="color:#000;font-weight: bold;" v-model="erp_order_sn" />
</view> </view>
<view class="action-bar row verCenter"> <view class="action-bar row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="erp_order_sn"></text> <text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="erp_order_sn"></text>
...@@ -31,30 +31,25 @@ ...@@ -31,30 +31,25 @@
</template> </template>
</view> </view>
</view> </view>
<view class="column-box row bothSide verCenter" style="margin-bottom: 0;"> <view class="column-box row verCenter" style="margin-bottom: 0;">
<view class="row verCenter"> <view class="select-box">
<view class="select-box"> <picker @change="bindPickerChange" :value="index" :range="item">
<picker @change="bindPickerChange" :value="index" :range="item"> <view class="wrap row verCenter bothSide">
<view class="wrap row verCenter bothSide"> <view class="uni-input">{{ item[index] }}</view>
<view class="uni-input">{{ item[index] }}</view> <text class="iconfont icon-sanjiaoxing1 uni-arrow"></text>
<text class="iconfont icon-sanjiaoxing1 uni-arrow"></text> </view>
</view> </picker>
</picker>
</view>
<view class="input-box row verCenter">
<!-- 其他 -->
<template v-if="index == 0">
<input class="uni-input" maxlength="-1" :focus="is_focus_3" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" v-model="goods_type" @input="handleInput($event,2)" />
</template>
<!-- digikey等供应商-->
<template v-else>
<input class="uni-input" maxlength="-1" :focus="is_focus_3" :confirm-type="'none'" :hold-keyboard="false" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" v-model="keyword" @input="handleInput($event,2)" />
</template>
</view>
</view> </view>
<view class="action-bar row verCenter"> <view class="input-box row verCenter" style="width: calc(100% - 129rpx);">
<!-- 其他 -->
<template v-if="index == 0">
<input class="uni-input" maxlength="-1" :focus="is_focus_3" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" style="width: 100%;" v-model="goods_type" @input="handleInput($event,2)" />
</template>
<!-- digikey等供应商-->
<template v-else>
<input class="uni-input" maxlength="-1" :focus="is_focus_3" :confirm-type="'none'" :hold-keyboard="false" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" style="width: 100%;" v-model="keyword" @input="handleInput($event,2)" />
</template>
<text class="iconfont icon-jinggao2" @click="clearInput(3)" v-if="goods_type || keyword"></text> <text class="iconfont icon-jinggao2" @click="clearInput(3)" v-if="goods_type || keyword"></text>
<view class="btn1 row rowCenter verCenter" @click="identifyQrCodeNumAndSn()">扫 描</view>
</view> </view>
</view> </view>
<!-- 箱子基础信息 --> <!-- 箱子基础信息 -->
...@@ -176,7 +171,14 @@ ...@@ -176,7 +171,14 @@
<view class="delete row rowCenter verCenter" @click="deletePic(index,i)"><text class="iconfont icon-shanchu"></text></view> <view class="delete row rowCenter verCenter" @click="deletePic(index,i)"><text class="iconfont icon-shanchu"></text></view>
</view> </view>
</template> </template>
<view class="default row rowCenter verCenter" @click="chooseImageChange(index)" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view> <!-- 完全理货 -->
<template v-if="item.tally_status == 3">
<view class="default row rowCenter verCenter" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</template>
<!-- 1未理货2部分理货 -->
<template v-else>
<view class="default row rowCenter verCenter" @click="chooseImageChange(index)" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</template>
</view> </view>
<template v-if="item.tally_status == 3"> <template v-if="item.tally_status == 3">
<view class="btn row rowCenter verCenter disabled" @click="cancelTallyDetail(index)">取消理货</view> <view class="btn row rowCenter verCenter disabled" @click="cancelTallyDetail(index)">取消理货</view>
...@@ -241,8 +243,8 @@ ...@@ -241,8 +243,8 @@
return { return {
email: uni.getStorageSync('email') || '', //操作人邮箱 email: uni.getStorageSync('email') || '', //操作人邮箱
is_focus_1: true, //获取焦点动态化 is_focus_1: true, //获取焦点动态化
is_focus_2: false, //获取焦点动态化 is_focus_2: false,
is_focus_3: false, //获取焦点动态化 is_focus_3: false,
title: '', title: '',
step: 0, step: 0,
keyword: '', keyword: '',
...@@ -326,7 +328,7 @@ ...@@ -326,7 +328,7 @@
* @param {Object} type 1箱号监听 2型号监听 3输入国家监听 * @param {Object} type 1箱号监听 2型号监听 3输入国家监听
*/ */
handleInput: debounce(function(event, type) { handleInput: debounce(function(event, type) {
var value = event.target.value.trim(); var value = event.target.value;
if (type == 1) { if (type == 1) {
if (value) { if (value) {
this.getBoxSn(value); this.getBoxSn(value);
...@@ -628,6 +630,7 @@ ...@@ -628,6 +630,7 @@
if (res.confirm) { if (res.confirm) {
this.box_sn = ''; this.box_sn = '';
this.wsty_id = ''; this.wsty_id = '';
this.clearInput(1);
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }
...@@ -919,6 +922,7 @@ ...@@ -919,6 +922,7 @@
this.erp_order_sn = ''; this.erp_order_sn = '';
this.form = []; this.form = [];
this.$refs.inputDialog.close(); this.$refs.inputDialog.close();
this.clearInput(1);
}, 2000); }, 2000);
} else { } else {
uni.showToast({ uni.showToast({
...@@ -936,6 +940,7 @@ ...@@ -936,6 +940,7 @@
this.tallyData = []; this.tallyData = [];
this.erp_order_sn = ''; this.erp_order_sn = '';
this.form = []; this.form = [];
this.clearInput(2);
}, },
/** /**
* 打印箱号 * 打印箱号
......
...@@ -12,30 +12,25 @@ ...@@ -12,30 +12,25 @@
</template> </template>
</view> </view>
</view> </view>
<view class="column-box row bothSide verCenter"> <view class="column-box row verCenter">
<view class="row verCenter"> <view class="select-box">
<view class="select-box"> <picker @change="bindPickerChange" :value="index" :range="item">
<picker @change="bindPickerChange" :value="index" :range="item"> <view class="wrap row verCenter bothSide">
<view class="wrap row verCenter bothSide"> <view class="uni-input">{{ item[index] }}</view>
<view class="uni-input">{{ item[index] }}</view> <text class="iconfont icon-sanjiaoxing1 uni-arrow"></text>
<text class="iconfont icon-sanjiaoxing1 uni-arrow"></text> </view>
</view> </picker>
</picker>
</view>
<view class="input-box row verCenter">
<!-- 全量 -->
<template v-if="index == 0">
<input class="uni-input" maxlength="-1" :focus="is_focus_2" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" v-model="all_search" @input="handleInput($event,2)" />
</template>
<!-- digikey等供应商-->
<template v-else>
<input class="uni-input" maxlength="-1" :focus="is_focus_2" :confirm-type="'none'" :hold-keyboard="false" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" v-model="keyword" @input="handleInput($event,2)" />
</template>
</view>
</view> </view>
<view class="action-bar row verCenter"> <view class="input-box row verCenter" style="width: calc(100% - 129rpx);">
<text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="all_search || keyword"></text> <!-- 全量 -->
<view class="btn1 row rowCenter verCenter" @click="identifyQrCodeNumAndSn()">扫 描</view> <template v-if="index == 0">
<input class="uni-input" maxlength="-1" :focus="is_focus_2" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" style="width: 100%;" v-model="all_search" @input="handleInput($event,2)" />
</template>
<!-- digikey等供应商-->
<template v-else>
<input class="uni-input" maxlength="-1" :focus="is_focus_2" :confirm-type="'none'" :hold-keyboard="false" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" style="width: 100%;" v-model="keyword" @input="handleInput($event,2)" />
</template>
<text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="all_search || keyword" style="margin-right: 0;"></text>
</view> </view>
</view> </view>
<!-- 列表 --> <!-- 列表 -->
...@@ -138,7 +133,14 @@ ...@@ -138,7 +133,14 @@
<view class="delete row rowCenter verCenter" @click="deletePic(index,i)"><text class="iconfont icon-shanchu"></text></view> <view class="delete row rowCenter verCenter" @click="deletePic(index,i)"><text class="iconfont icon-shanchu"></text></view>
</view> </view>
</template> </template>
<view class="default row rowCenter verCenter" @click="chooseImageChange(index)" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view> <!-- 完全理货 -->
<template v-if="item.tally_status == 3">
<view class="default row rowCenter verCenter" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</template>
<!-- 1未理货2部分理货 -->
<template v-else>
<view class="default row rowCenter verCenter" @click="chooseImageChange(index)" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</template>
</view> </view>
<template v-if="item.tally_status == 3"> <template v-if="item.tally_status == 3">
<view class="btn row rowCenter verCenter disabled" @click="cancelTallyDetail(index)">取消理货</view> <view class="btn row rowCenter verCenter disabled" @click="cancelTallyDetail(index)">取消理货</view>
......
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