Commit 071e2cc7 by LJM

修复一系列的bug

parent 6d11b013
......@@ -40,6 +40,13 @@
font-size: 24rpx;
color: #197adb;
}
.icon-jinggao2 {
position: relative;
font-size: 30rpx;
color: #c6c7cc;
margin-right: 30rpx;
z-index: 22;
}
}
.tab {
height: 106rpx;
......@@ -70,13 +77,13 @@
}
}
.list {
height: calc(100% - 420rpx);
height: calc(100% - 346rpx);
.scroll-Y {
height: 100%;
.num {
position: absolute;
left: 24rpx;
top: 39rpx;
top: 30rpx;
width: 40rpx;
height: 28rpx;
border-radius: 4rpx;
......@@ -131,6 +138,9 @@
}
}
}
&.pb100 {
padding-bottom: 100rpx;
}
}
.fix-btn {
position: fixed;
......
{
"name": "wms",
"name": "供应链",
"appid": "__UNI__81E2D4D",
"description": "供应链面单系统",
"versionName": "1.0.0",
......@@ -43,7 +43,39 @@
/* ios打包配置 */
"ios": {},
/* 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>
<view class="abnormalTally">
<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 />
<template v-if="box_sn">
<view class="btn1 row rowCenter verCenter" @click="print()">打印箱号</view>
<view class="btn row rowCenter verCenter" @click="canel()">取消装箱</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="getBoxSn()">取箱号</view>
</template>
<input class="uni-input" placeholder="请取箱号" :focus="is_focus_1" placeholder-style="color:#000;font-weight: bold;" v-model="box_sn" @input="handleInput($event,1)" />
<view class="row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(1)" v-if="box_sn"></text>
<template v-if="box_sn">
<view class="btn1 row rowCenter verCenter" @click="print()" style="margin-right: 8rpx;">打印箱号</view>
<view class="btn row rowCenter verCenter" @click="canel()">取消装箱</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="getBoxSn()">取箱号</view>
</template>
</view>
</view>
<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)" />
<view class="btn1 row rowCenter verCenter" @click="confirm()">确 认</view>
<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="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 class="tab row verCenter">
<view class="box" v-for="(item,index) in arr" :key="index" :class="{curr:curr==index}" @click="tab(index)">
......@@ -23,15 +29,19 @@
<template v-else-if="index == 3">({{have_close_box_num}})</template>
</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">
<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>
<!-- 左侧 -->
<view class="bar" style="width: 60%;">
<view class="t1 mb16">{{item.abnormal_batch}}</view>
<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="t3">{{item.goods_type}}</text>
</view>
......@@ -41,7 +51,13 @@
</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">
<text class="t2">数量:</text>
<text class="t3">{{item.tally_num}}</text>
......@@ -109,6 +125,8 @@
return {
email: uni.getStorageSync('email') || '', //操作人邮箱
curr: 0,
is_focus_1: true, //获取焦点动态化
is_focus_2: false,
arr: ['全部未装箱', '美产', '商检', '已装箱'],
num: '', //异常数量总数
usa_num: 0,
......@@ -128,12 +146,14 @@
* 监听输入框
* @param {Object} event
*/
handleInput: debounce(function(event) {
var inputValue = event.target.value;
if (inputValue) {
if (inputValue.includes('\n')) {
this.getData();
handleInput: debounce(function(event, type) {
var value = event.target.value;
if (type == 1) {
if (value) {
this.getBoxSn(value);
}
} else if (type == 2) {
this.getData();
}
}, 500),
/**
......@@ -151,16 +171,27 @@
},
/**
* 获取箱号
* @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 = '';
this.clearInput(1);
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
......@@ -196,13 +227,16 @@
* 异常型号装箱
*/
submitAbnormalBox(type, wstydl_id) {
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
//装箱的时候验证
if (type == 1) {
if (!this.box_sn) {
uni.showModal({
title: '',
content: '请先取箱号!并将打印的箱号贴于外箱上',
showCancel: false
});
return false;
}
}
this.request(API.submitAbnormalBox, 'POST', { type: type, wstydl_id: wstydl_id, wsty_id: this.wsty_id }, true).then(res => {
if (res.err_code === 0) {
......@@ -309,7 +343,26 @@
canel() {
this.box_sn = '';
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>
......
......@@ -50,18 +50,14 @@
handleInput: debounce(function(event) {
var inputValue = event.target.value;
if (inputValue) {
if (inputValue.includes('\n')) {
// 如果包含回车符,则移除回车符
const keyword = inputValue.replace(/\n/g, '');
// 执行添加操作
this.add(keyword);
// 清空输入框
this.keyword = '';
// 再次获取焦点
this.clearInputAndFocus();
}
// 执行添加操作
this.add(inputValue);
// 清空输入框
this.keyword = '';
// 再次获取焦点
this.clearInputAndFocus();
}
}, 500),
}, 800),
/**
* 添加
*/
......
......@@ -18,7 +18,7 @@
</view>
<view class="column-box row bothSide 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 class="action-bar row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="erp_order_sn"></text>
......@@ -31,30 +31,25 @@
</template>
</view>
</view>
<view class="column-box row bothSide verCenter" style="margin-bottom: 0;">
<view class="row verCenter">
<view class="select-box">
<picker @change="bindPickerChange" :value="index" :range="item">
<view class="wrap row verCenter bothSide">
<view class="uni-input">{{ item[index] }}</view>
<text class="iconfont icon-sanjiaoxing1 uni-arrow"></text>
</view>
</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 class="column-box row verCenter" style="margin-bottom: 0;">
<view class="select-box">
<picker @change="bindPickerChange" :value="index" :range="item">
<view class="wrap row verCenter bothSide">
<view class="uni-input">{{ item[index] }}</view>
<text class="iconfont icon-sanjiaoxing1 uni-arrow"></text>
</view>
</picker>
</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>
<view class="btn1 row rowCenter verCenter" @click="identifyQrCodeNumAndSn()">扫 描</view>
</view>
</view>
<!-- 箱子基础信息 -->
......@@ -176,7 +171,14 @@
<view class="delete row rowCenter verCenter" @click="deletePic(index,i)"><text class="iconfont icon-shanchu"></text></view>
</view>
</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>
<template v-if="item.tally_status == 3">
<view class="btn row rowCenter verCenter disabled" @click="cancelTallyDetail(index)">取消理货</view>
......@@ -241,8 +243,8 @@
return {
email: uni.getStorageSync('email') || '', //操作人邮箱
is_focus_1: true, //获取焦点动态化
is_focus_2: false, //获取焦点动态化
is_focus_3: false, //获取焦点动态化
is_focus_2: false,
is_focus_3: false,
title: '',
step: 0,
keyword: '',
......@@ -326,7 +328,7 @@
* @param {Object} type 1箱号监听 2型号监听 3输入国家监听
*/
handleInput: debounce(function(event, type) {
var value = event.target.value.trim();
var value = event.target.value;
if (type == 1) {
if (value) {
this.getBoxSn(value);
......@@ -628,6 +630,7 @@
if (res.confirm) {
this.box_sn = '';
this.wsty_id = '';
this.clearInput(1);
} else if (res.cancel) {
console.log('用户点击取消');
}
......@@ -919,6 +922,7 @@
this.erp_order_sn = '';
this.form = [];
this.$refs.inputDialog.close();
this.clearInput(1);
}, 2000);
} else {
uni.showToast({
......@@ -936,6 +940,7 @@
this.tallyData = [];
this.erp_order_sn = '';
this.form = [];
this.clearInput(2);
},
/**
* 打印箱号
......
......@@ -12,30 +12,25 @@
</template>
</view>
</view>
<view class="column-box row bothSide verCenter">
<view class="row verCenter">
<view class="select-box">
<picker @change="bindPickerChange" :value="index" :range="item">
<view class="wrap row verCenter bothSide">
<view class="uni-input">{{ item[index] }}</view>
<text class="iconfont icon-sanjiaoxing1 uni-arrow"></text>
</view>
</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 class="column-box row verCenter">
<view class="select-box">
<picker @change="bindPickerChange" :value="index" :range="item">
<view class="wrap row verCenter bothSide">
<view class="uni-input">{{ item[index] }}</view>
<text class="iconfont icon-sanjiaoxing1 uni-arrow"></text>
</view>
</picker>
</view>
<view class="action-bar row verCenter">
<text class="iconfont icon-jinggao2" @click="clearInput(2)" v-if="all_search || keyword"></text>
<view class="btn1 row rowCenter verCenter" @click="identifyQrCodeNumAndSn()">扫 描</view>
<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_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>
<!-- 列表 -->
......@@ -138,7 +133,14 @@
<view class="delete row rowCenter verCenter" @click="deletePic(index,i)"><text class="iconfont icon-shanchu"></text></view>
</view>
</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>
<template v-if="item.tally_status == 3">
<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