Commit 9e8ac006 by LJM

优化

parent 60948629
Showing with 28 additions and 22 deletions
......@@ -44,11 +44,11 @@
<view class="input-box row verCenter">
<!-- 其他 -->
<template v-if="index == 0">
<input class="uni-input" :focus="is_focus_3" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" v-model="goods_type" @input="handleInput($event,2)" />
<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" :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)" />
<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>
......@@ -180,7 +180,7 @@
<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.length < 5"><text class="iconfont icon-xingzhuangjiehe"></text></view>
<view class="default row rowCenter verCenter" @click="chooseImageChange(index)" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</view>
<template v-if="item.tally_status == 3">
<view class="btn row rowCenter verCenter disabled" @click="cancelTallyDetail(index)">取消理货</view>
......@@ -254,7 +254,7 @@
fixBoxStyle: '',
noexebshowFalg: true, //控制是否会触发生命周期
index: 0,
item: ['型号', 'DigiKey', 'Rochester', 'TME', 'Chip1stop', 'Mouser'],
item: ['型号', 'DigiKey', 'Rochester', 'TME', 'Chip1stop'],
box_sn: '', //箱号信息
wsty_id: '', //箱子id
erp_order_sn: '', //入仓号
......@@ -366,7 +366,7 @@
// 使用 chooseImage选择图片
// #ifdef MP-WEIXIN
uni.chooseMedia({
count: 5,
count: 4,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
......@@ -382,11 +382,11 @@
const imagePaths = chooseImageRes.tempFiles;
// 判断选择的图片数量是否超过最大限制数量
let maxNum = Number(imagePaths.length) + Number(this.image_list.length); //当前上传的+已经上传的
if (maxNum > 5) {
let maxNum = Number(imagePaths.length) + Number(this.image_list[key].length); //当前上传的+已经上传的
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过5张',
title: '图片不超过4张',
icon: 'none'
});
return false;
......@@ -446,7 +446,7 @@
// #ifdef APP-PLUS
uni.chooseImage({
count: 5,
count: 4,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
......@@ -461,11 +461,11 @@
const imagePaths = chooseImageRes.tempFilePaths;
// 判断选择的图片数量是否超过最大限制数量
let maxNum = Number(imagePaths.length) + Number(this.image_list.length); //当前上传的+已经上传的
if (maxNum > 5) {
let maxNum = Number(imagePaths.length) + Number(this.image_list[key].length); //当前上传的+已经上传的
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过5张',
title: '图片不超过4张',
icon: 'none'
});
return false;
......
......@@ -25,11 +25,11 @@
<view class="input-box row verCenter">
<!-- 全量 -->
<template v-if="index == 0">
<input class="uni-input" :focus="is_focus_2" placeholder="输入或扫描" placeholder-style="color:#000;font-weight: bold;" v-model="all_search" @input="handleInput($event,2)" />
<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" :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)" />
<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>
......@@ -138,7 +138,7 @@
<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.length < 5"><text class="iconfont icon-xingzhuangjiehe"></text></view>
<view class="default row rowCenter verCenter" @click="chooseImageChange(index)" v-if="image_list[index].length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</view>
<template v-if="item.tally_status == 3">
<view class="btn row rowCenter verCenter disabled" @click="cancelTallyDetail(index)">取消理货</view>
......@@ -258,6 +258,12 @@
this.clearInput(2);
},
/**
* 选择国家确认-关闭弹窗
*/
confirmChange() {
this.$refs.popup.close();
},
/**
* @param {Object} event 输入框监听
*/
handleInput: debounce(function(event, type) {
......@@ -323,7 +329,7 @@
// 使用 chooseImage选择图片
// #ifdef MP-WEIXIN
uni.chooseMedia({
count: 5,
count: 4,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
......@@ -339,8 +345,8 @@
const imagePaths = chooseImageRes.tempFiles;
// 判断选择的图片数量是否超过最大限制数量
let maxNum = Number(imagePaths.length) + Number(this.image_list.length); //当前上传的+已经上传的
if (maxNum > 5) {
let maxNum = Number(imagePaths.length) + Number(this.image_list[key].length); //当前上传的+已经上传的
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过5张',
......@@ -403,7 +409,7 @@
// #ifdef APP-PLUS
uni.chooseImage({
count: 5,
count: 4,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
......@@ -418,11 +424,11 @@
const imagePaths = chooseImageRes.tempFilePaths;
// 判断选择的图片数量是否超过最大限制数量
let maxNum = Number(imagePaths.length) + Number(this.image_list.length); //当前上传的+已经上传的
if (maxNum > 5) {
let maxNum = Number(imagePaths.length) + Number(this.image_list[key].length); //当前上传的+已经上传的
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过5张',
title: '图片不超过4张',
icon: 'none'
});
return false;
......
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