Commit ea36a7e0 by LJM

移动端--理货--操作优化

parent 1308c07f
......@@ -2,7 +2,7 @@
"name" : "wms",
"appid" : "__UNI__655E80D",
"description" : "供应链仓储App",
"versionName" : "2.2.6",
"versionName" : "2.2.7",
"versionCode" : 100000000,
"transformPx" : false,
/* 5+App特有相关 */
......
......@@ -109,11 +109,10 @@
"width": "100px"
}, {
"index": "1",
"text": "按容器上架",
"text": "",
"fontSize": "15px",
"color": "#1969F9",
"float": "right",
"width": "100px"
"float": "right"
}]
}
}
......@@ -133,11 +132,10 @@
"width": "100px"
}, {
"index": "1",
"text": "按货品上架",
"text": "",
"fontSize": "15px",
"color": "#1969F9",
"float": "right",
"width": "100px"
"float": "right"
}]
}
}
......
......@@ -23,16 +23,16 @@
<input class="uni-input" placeholder="请输入FedEx" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.tracking_no" @input="handleInput(0, $event)" />
</template>
<template v-else-if="index == 3">
<input class="uni-input" placeholder="请输入DigKey" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 100%;" />
<input class="uni-input" maxlength="-1" placeholder="请输入DigKey" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 100%;" />
</template>
<template v-else-if="index == 4">
<input class="uni-input" placeholder="请输入Rochester" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 100%;" />
<input class="uni-input" maxlength="-1" placeholder="请输入Rochester" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 100%;" />
</template>
<template v-else-if="index == 5">
<input class="uni-input" placeholder="请输入TME" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" />
<input class="uni-input" maxlength="-1" placeholder="请输入TME" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 100%;" />
</template>
<template v-else-if="index == 6">
<input class="uni-input" placeholder="请输入Chip1stop" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" />
<input class="uni-input" maxlength="-1" placeholder="请输入Chip1stop" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" style="width: 100%;" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag"></text>
......@@ -227,6 +227,7 @@
maxNum: 10, //最大上传图片数量
hasMoreData: true, //是否分页加载
is_watch: false, //是否看货
isRequestSent: false,
searchParams: {
mobile_wait_tally_all_search: '', //全量搜索
stock_in_with_stock_in_items_inhouse: '', //入仓单号
......@@ -476,18 +477,6 @@
}
}, 500),
/**
* 重置参数
*/
resetSearchParams() {
this.searchParams.mobile_wait_tally_all_search = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
this.searchParams.container_name = '';
this.searchParams.container_id = '';
this.searchParams.tracking_no = '';
this.searchParams.goods_name = '';
this.searchParams.code_type = '';
},
/**
* DigKey,Rochester,TME,Chip1stop供应商
* @param {Object} event
*
......@@ -514,6 +503,18 @@
}
}, that.index == 3 ? 0 : 500),
/**
* 重置参数
*/
resetSearchParams() {
this.searchParams.mobile_wait_tally_all_search = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
this.searchParams.container_name = '';
this.searchParams.container_id = '';
this.searchParams.tracking_no = '';
this.searchParams.goods_name = '';
this.searchParams.code_type = '';
},
/**
* 识别二维码的数量和型号
* @param {Object} code_str 输入值
* @param {Object} code_type 供应商类型(DigKey,Rochester,TME,Chip1stop)
......@@ -524,7 +525,7 @@
var result = '';
if (index !== -1) {
// 从第七位开始截取直到第一个1P的位置
var result = code_str.substring(6, index);
result = code_str.substring(6, index);
} else {
uni.showToast({
title: '未识别到匹配的内容',
......@@ -532,12 +533,16 @@
});
}
//匹配到内容才开始调接口
if (result != '') {
this.request(API.identifyQrCodeNumAndSn, 'POST', { data: result, type: 'DigKey' }, true).then(res => {
if (result && !this.isRequestSent) {
this.isRequestSent = true; // 设置标志,防止重复发送请求
this.request(API.identifyQrCodeNumAndSn, 'POST', { data: result, type: code_type }, true).then(res => {
if (res.code === 0) {
this.searchParams.goods_name = res.data.model; //赋值检索出来的型号
this.resetChange(); //清空数据
setTimeout(() => {
this.getData();
this.isRequestSent = false; // 请求完成后重置标志
}, 0)
} else {
uni.showToast({
title: '识别错误',
......
......@@ -29,8 +29,7 @@ const request = (url = '', type = 'GET', param = {}, Loading) => {
url: url,
data: params,
header: header,
dataType: 'json',
timeout: 600000
dataType: 'json'
}).then((response) => {
let [error, res] = response;
//未登录拦截
......
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