Commit 1c0b0f0b by LJM

add

parent aa427f92
Showing with 11 additions and 7 deletions
......@@ -213,7 +213,7 @@
fixBoxStyle: '',
noexebshowFalg: true, //控制是否会触发生命周期
index: 0,
item: ['其他', 'digikey', 'mouser', 'future', 'TI'],
item: ['其他', 'DigiKey', 'Rochester', 'TME', 'Chip1stop', 'Mouser'],
box_sn: '', //箱号信息
wsty_id: '', //箱子id
erp_order_sn: '', //入仓号
......@@ -429,18 +429,18 @@
this.getTallyData();
} else {
let codeTypeByIndex = {
3: 'DigiKey',
4: 'Rochester',
5: 'TME',
6: 'Chip1stop',
7: 'Mouser'
1: 'DigiKey',
2: 'Rochester',
3: 'TME',
4: 'Chip1stop',
5: 'Mouser'
};
let codeType = codeTypeByIndex[this.index] || '';
let device = uni.getDeviceInfo();
//匹配到内容才开始调接口
if (!this.isRequestSent) {
this.isRequestSent = true; // 设置标志,防止重复发送请求
this.request(API.identifyQrCodeNumAndSn, 'POST', { data: this.keyword, type: codeType, device: device.deviceModel }, true).then(res => {
this.request(API.scanQrCode, 'POST', { data: this.keyword, type: codeType, device: device.deviceModel }, true).then(res => {
this.isRequestSent = false; // 请求完成后重置标志
if (res.code === 0) {
//如果后台搜索到型号则替换输入框的值
......
......@@ -183,6 +183,10 @@ const API = {
*/
identifyQrCodeNumAndSn: API_BASE + '/supplywechatwms/identifyQrCodeNumAndSn',
/**
* 识别二维码数量和型号
*/
scanQrCode: API_BASE + '/supplywechatwms/scanQrCode',
/**
* 提交当前箱号的数据
*/
submitBoxSnAndNum: API_BASE + '/supplywechatwms/submitBoxSnAndNum',
......
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