Commit ea36a7e0 by LJM

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

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