Commit 799893c6 by LJM

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

parent 350782b5
......@@ -22,6 +22,12 @@
"color": "#1969F9",
"float": "right",
"width": "100px"
}, {
"index": "1",
"text": "理货",
"fontSize": "15px",
"color": "#1969F9",
"float": "right"
}]
}
}
......@@ -51,11 +57,17 @@
"titleNView": {
"buttons": [{
"index": "0",
"text": "理货记录",
"text": "已理货",
"fontSize": "15px",
"color": "#1969F9",
"float": "right",
"width": "100px"
}, {
"index": "1",
"text": "上架",
"fontSize": "15px",
"color": "#1969F9",
"float": "right"
}]
}
}
......@@ -63,7 +75,7 @@
}, {
"path": "pages/tallyReceive/record",
"style": {
"navigationBarTitleText": "理货记录",
"navigationBarTitleText": "已理货",
"app-plus": {
"titleNView": {
"buttons": [{
......@@ -95,6 +107,13 @@
"color": "#1969F9",
"float": "right",
"width": "100px"
}, {
"index": "1",
"text": "按容器上架",
"fontSize": "15px",
"color": "#1969F9",
"float": "right",
"width": "100px"
}]
}
}
......@@ -112,6 +131,13 @@
"color": "#1969F9",
"float": "right",
"width": "100px"
}, {
"index": "1",
"text": "按货品上架",
"fontSize": "15px",
"color": "#1969F9",
"float": "right",
"width": "100px"
}]
}
}
......
......@@ -550,6 +550,10 @@
uni.navigateTo({
url: '/pages/arrivalRegister/registered'
});
} else if (e.index == 1) {
uni.redirectTo({
url: '/pages/tallyReceive/index'
});
}
},
onLoad() {
......
......@@ -190,6 +190,10 @@
uni.navigateTo({
url: '/pages/putaway/record'
});
} else if (e.index == 1) {
uni.redirectTo({
url: '/pages/putaway/pack'
});
}
},
onShow() {
......
......@@ -84,6 +84,10 @@
uni.navigateTo({
url: '/pages/putaway/record'
});
} else if (e.index == 1) {
uni.redirectTo({
url: '/pages/putaway/index'
});
}
},
onShow() {
......
......@@ -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%;" />
</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)" />
<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 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)" />
......@@ -201,6 +201,7 @@
import { createArray } from '@/util/util.js';
import debounce from 'lodash/debounce';
var that = '';
export default {
data() {
return {
......@@ -215,7 +216,7 @@
all_flag: false, //全选标记
page: 1,
limit: 30, //分页限制数量
index: 0,
index: uni.getStorageSync('tallyReceiveIndex') || 0, //记录用户上一次的选择
indexContainer: -1,
array: ['全量搜索', '入仓号', 'FedEx', 'DigKey', 'Rochester'],
list: [],
......@@ -264,6 +265,10 @@
uni.navigateTo({
url: '/pages/tallyReceive/record'
});
} else if (e.index == 1) {
uni.redirectTo({
url: '/pages/putaway/index'
});
}
},
onShow() {
......@@ -274,6 +279,12 @@
}
},
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 @@
}
}, 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供应商
* @param {Object} event
*
......@@ -464,32 +483,56 @@
var val = event.target.value;
if (val) {
this.resetChange(); //先清空数据
this.searchParams.mobile_wait_tally_all_search = ''; //清空全量搜索字段
this.searchParams.stock_in_with_stock_in_items_inhouse = ''; //清空入仓号字段
this.searchParams.tracking_no = ''; //清空FedEx
this.resetSearchParams(); //重置参数
this.searchParams.code_type = val; //赋值DigKey,Rochester,TME,Chip1stop供应商
let code_type = '';
if (this.index == 3) {
code_type = 'DigKey';
} else if (this.index == 4) {
code_type = 'Rochester';
} else if (this.index == 5) {
code_type = 'TME';
} else if (this.index == 6) {
code_type = 'Chip1stop';
}
let codeTypeByIndex = {
3: 'DigKey',
4: 'Rochester',
5: 'TME',
6: 'Chip1stop'
};
const codeType = codeTypeByIndex[this.index] || '';
this.input_flag = true;
this.identifyQrCodeNumAndSn(val, code_type); //识别二维码的数量和型号
this.identifyQrCodeNumAndSn(val, codeType); //识别二维码的数量和型号
} else {
this.resetChange();
this.input_flag = false;
this.getData();
}
}, that.index == 3 ? 0 : 500),
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
this.clearInputAndFocus();
/**
* 识别二维码的数量和型号
* @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.resetChange(); //清空数据
this.getData();
} else {
uni.showToast({
title: '识别错误',
icon: 'error'
});
}
});
}
},
//设置默认的容器
getTallyContainerDefault() {
......@@ -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() {
......
......@@ -2,14 +2,13 @@ const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
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_PUR = 'https://purchase.ichunt.net'; //采购系统
// const API_BASE = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
// const API_BASE_Queue = 'http://queue.ichunt.net'; //queue系统
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