Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsApp
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
799893c6
authored
Mar 27, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
移动端--理货--操作优化
parent
350782b5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
59 deletions
pages.json
pages/arrivalRegister/index.vue
pages/putaway/index.vue
pages/putaway/pack.vue
pages/tallyReceive/index.vue
util/api.js
pages.json
View file @
799893c6
...
...
@@ -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"
}]
}
}
...
...
pages/arrivalRegister/index.vue
View file @
799893c6
...
...
@@ -550,6 +550,10 @@
uni
.
navigateTo
({
url
:
'/pages/arrivalRegister/registered'
});
}
else
if
(
e
.
index
==
1
)
{
uni
.
redirectTo
({
url
:
'/pages/tallyReceive/index'
});
}
},
onLoad
()
{
...
...
pages/putaway/index.vue
View file @
799893c6
...
...
@@ -190,6 +190,10 @@
uni
.
navigateTo
({
url
:
'/pages/putaway/record'
});
}
else
if
(
e
.
index
==
1
)
{
uni
.
redirectTo
({
url
:
'/pages/putaway/pack'
});
}
},
onShow
()
{
...
...
pages/putaway/pack.vue
View file @
799893c6
...
...
@@ -84,6 +84,10 @@
uni
.
navigateTo
({
url
:
'/pages/putaway/record'
});
}
else
if
(
e
.
index
==
1
)
{
uni
.
redirectTo
({
url
:
'/pages/putaway/index'
});
}
},
onShow
()
{
...
...
pages/tallyReceive/index.vue
View file @
799893c6
...
...
@@ -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
_t
ype
);
//识别二维码的数量和型号
this
.
identifyQrCodeNumAndSn
(
val
,
code
T
ype
);
//识别二维码的数量和型号
}
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
()
{
...
...
util/api.js
View file @
799893c6
...
...
@@ -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
=
{
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment