Commit 799893c6 by LJM

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

parent 350782b5
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
"color": "#1969F9", "color": "#1969F9",
"float": "right", "float": "right",
"width": "100px" "width": "100px"
}, {
"index": "1",
"text": "理货",
"fontSize": "15px",
"color": "#1969F9",
"float": "right"
}] }]
} }
} }
...@@ -51,11 +57,17 @@ ...@@ -51,11 +57,17 @@
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
"index": "0", "index": "0",
"text": "理货记录", "text": "已理货",
"fontSize": "15px", "fontSize": "15px",
"color": "#1969F9", "color": "#1969F9",
"float": "right", "float": "right",
"width": "100px" "width": "100px"
}, {
"index": "1",
"text": "上架",
"fontSize": "15px",
"color": "#1969F9",
"float": "right"
}] }]
} }
} }
...@@ -63,7 +75,7 @@ ...@@ -63,7 +75,7 @@
}, { }, {
"path": "pages/tallyReceive/record", "path": "pages/tallyReceive/record",
"style": { "style": {
"navigationBarTitleText": "理货记录", "navigationBarTitleText": "已理货",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
...@@ -95,6 +107,13 @@ ...@@ -95,6 +107,13 @@
"color": "#1969F9", "color": "#1969F9",
"float": "right", "float": "right",
"width": "100px" "width": "100px"
}, {
"index": "1",
"text": "按容器上架",
"fontSize": "15px",
"color": "#1969F9",
"float": "right",
"width": "100px"
}] }]
} }
} }
...@@ -112,6 +131,13 @@ ...@@ -112,6 +131,13 @@
"color": "#1969F9", "color": "#1969F9",
"float": "right", "float": "right",
"width": "100px" "width": "100px"
}, {
"index": "1",
"text": "按货品上架",
"fontSize": "15px",
"color": "#1969F9",
"float": "right",
"width": "100px"
}] }]
} }
} }
......
...@@ -550,6 +550,10 @@ ...@@ -550,6 +550,10 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/arrivalRegister/registered' url: '/pages/arrivalRegister/registered'
}); });
} else if (e.index == 1) {
uni.redirectTo({
url: '/pages/tallyReceive/index'
});
} }
}, },
onLoad() { onLoad() {
......
...@@ -190,6 +190,10 @@ ...@@ -190,6 +190,10 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/putaway/record' url: '/pages/putaway/record'
}); });
} else if (e.index == 1) {
uni.redirectTo({
url: '/pages/putaway/pack'
});
} }
}, },
onShow() { onShow() {
......
...@@ -84,6 +84,10 @@ ...@@ -84,6 +84,10 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/putaway/record' url: '/pages/putaway/record'
}); });
} else if (e.index == 1) {
uni.redirectTo({
url: '/pages/putaway/index'
});
} }
}, },
onShow() { onShow() {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<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" 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)" /> <input class="uni-input" 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" placeholder="请输入TME" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.code_type" @input="handleInputChange($event)" />
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
import { createArray } from '@/util/util.js'; import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
var that = ''; var that = '';
export default { export default {
data() { data() {
return { return {
...@@ -215,7 +216,7 @@ ...@@ -215,7 +216,7 @@
all_flag: false, //全选标记 all_flag: false, //全选标记
page: 1, page: 1,
limit: 30, //分页限制数量 limit: 30, //分页限制数量
index: 0, index: uni.getStorageSync('tallyReceiveIndex') || 0, //记录用户上一次的选择
indexContainer: -1, indexContainer: -1,
array: ['全量搜索', '入仓号', 'FedEx', 'DigKey', 'Rochester'], array: ['全量搜索', '入仓号', 'FedEx', 'DigKey', 'Rochester'],
list: [], list: [],
...@@ -264,6 +265,10 @@ ...@@ -264,6 +265,10 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/tallyReceive/record' url: '/pages/tallyReceive/record'
}); });
} else if (e.index == 1) {
uni.redirectTo({
url: '/pages/putaway/index'
});
} }
}, },
onShow() { onShow() {
...@@ -274,6 +279,12 @@ ...@@ -274,6 +279,12 @@
} }
}, },
methods: { methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
uni.setStorageSync('tallyReceiveIndex', this.index);
this.clearInputAndFocus();
},
/** /**
* 是否打印 * 是否打印
*/ */
...@@ -456,6 +467,14 @@ ...@@ -456,6 +467,14 @@
} }
}, 500), }, 500),
/** /**
* 重置参数
*/
resetSearchParams() {
this.searchParams.mobile_wait_tally_all_search = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
this.searchParams.tracking_no = '';
},
/**
* DigKey,Rochester,TME,Chip1stop供应商 * DigKey,Rochester,TME,Chip1stop供应商
* @param {Object} event * @param {Object} event
* *
...@@ -464,32 +483,56 @@ ...@@ -464,32 +483,56 @@
var val = event.target.value; var val = event.target.value;
if (val) { if (val) {
this.resetChange(); //先清空数据 this.resetChange(); //先清空数据
this.searchParams.mobile_wait_tally_all_search = ''; //清空全量搜索字段 this.resetSearchParams(); //重置参数
this.searchParams.stock_in_with_stock_in_items_inhouse = ''; //清空入仓号字段
this.searchParams.tracking_no = ''; //清空FedEx
this.searchParams.code_type = val; //赋值DigKey,Rochester,TME,Chip1stop供应商 this.searchParams.code_type = val; //赋值DigKey,Rochester,TME,Chip1stop供应商
let code_type = ''; let codeTypeByIndex = {
if (this.index == 3) { 3: 'DigKey',
code_type = 'DigKey'; 4: 'Rochester',
} else if (this.index == 4) { 5: 'TME',
code_type = 'Rochester'; 6: 'Chip1stop'
} else if (this.index == 5) { };
code_type = 'TME'; const codeType = codeTypeByIndex[this.index] || '';
} else if (this.index == 6) {
code_type = 'Chip1stop';
}
this.input_flag = true; this.input_flag = true;
this.identifyQrCodeNumAndSn(val, code_type); //识别二维码的数量和型号 this.identifyQrCodeNumAndSn(val, codeType); //识别二维码的数量和型号
} else { } else {
this.resetChange(); this.resetChange();
this.input_flag = false; this.input_flag = false;
this.getData(); this.getData();
} }
}, that.index == 3 ? 0 : 500), }, that.index == 3 ? 0 : 500),
bindPickerChange: function(e) { /**
console.log('picker发送选择改变,携带值为', e.detail.value); * 识别二维码的数量和型号
this.index = e.detail.value; * @param {Object} code_str 输入值
this.clearInputAndFocus(); * @param {Object} code_type 供应商类型(DigKey,Rochester,TME,Chip1stop)
*/
identifyQrCodeNumAndSn(code_str, code_type) {
// 找到第一个1P的位置
var index = code_str.indexOf('1P');
var result = '';
if (index !== -1) {
// 从第七位开始截取直到第一个1P的位置
var result = code_str.substring(6, index);
} else {
uni.showToast({
title: '未识别到匹配的内容',
icon: 'none'
});
}
//匹配到内容才开始调接口
if (result != '') {
this.request(API.identifyQrCodeNumAndSn, 'POST', { data: result, type: 'DigKey' }, true).then(res => {
if (res.code === 0) {
this.searchParams.goods_name = res.data.model; //赋值检索出来的型号
this.resetChange(); //清空数据
this.getData();
} else {
uni.showToast({
title: '识别错误',
icon: 'error'
});
}
});
}
}, },
//设置默认的容器 //设置默认的容器
getTallyContainerDefault() { getTallyContainerDefault() {
...@@ -549,41 +592,6 @@ ...@@ -549,41 +592,6 @@
}); });
}, },
/** /**
* 识别二维码的数量和型号
* @param {Object} code_str 输入值
* @param {Object} code_type 供应商类型(DigKey,Rochester,TME,Chip1stop)
*/
identifyQrCodeNumAndSn(code_str, code_type) {
// 找到第一个1P的位置
var index = code_str.indexOf('1P');
var result = '';
if (index !== -1) {
// 从第七位开始截取直到第一个1P的位置
var result = code_str.substring(6, index);
} else {
uni.showToast({
title: '未识别到匹配的内容',
icon: 'none'
});
}
//匹配到内容才开始调接口
if (result != '') {
this.request(API.identifyQrCodeNumAndSn, 'POST', { data: result, type: 'DigKey' }, true).then(res => {
if (res.code === 0) {
this.searchParams.goods_name = res.data.model; //赋值检索出来的型号
this.list = [];
this.page = 1;
this.getData();
} else {
uni.showToast({
title: '识别错误',
icon: 'error'
});
}
});
}
},
/**
* 获取列表数据 支持分页 * 获取列表数据 支持分页
*/ */
getData() { getData() {
......
...@@ -2,14 +2,13 @@ const API_BASE_USER = 'http://user.liexindev.net'; //用户系统 ...@@ -2,14 +2,13 @@ const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统 const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const API_BASE = 'http://wms.liexindev.net'; //WMS系统 const API_BASE = 'http://wms.liexindev.net'; //WMS系统
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统 const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_Queue = 'http://192.168.1.252:16590'; //queue
// const API_BASE_USER = 'https://user.ichunt.net'; //用户系统 // const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
// const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统 // const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
// const API_BASE = 'https://wms.ichunt.net'; //WMS系统 // const API_BASE = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统 // const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
// const API_BASE_Queue = 'http://queue.ichunt.net'; //queue系统
const API = { const API = {
/** /**
......
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