Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsMin
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
5473a441
authored
Nov 29, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
理货确认-打印标签 打印机保持连接
parent
13fc83b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
72 deletions
pages/tag/print.vue
pages/tallyGoods/confirm.vue
pages/tag/print.vue
View file @
5473a441
...
...
@@ -90,6 +90,7 @@
numberList
:
[],
numberArr
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
],
numberIndex
:
0
,
from
:
''
,
//标记成哪个页面来的
form
:
{
batch
:
0
,
//批次
print_type
:
2
,
//打印类型
...
...
@@ -110,21 +111,27 @@
this
.
printParams
.
board_num
=
Number
(
option
.
board_num
)
||
''
;
//箱
this
.
printParams
.
box_num
=
Number
(
option
.
box_num
)
||
''
;
//板子
this
.
printParams
.
erp_order_sn
=
option
.
erp_order_sn
||
''
;
//入仓号
this
.
from
=
option
.
from
;
//标记从哪个页面来
//从理货确认页面过来的
if
(
this
.
from
==
'tallyGoods'
)
{
//一直保持连接
}
else
{
//停止搜索,节省系统资源
uni
.
stopBluetoothDevicesDiscovery
({
success
:
res
=>
{
console
.
log
(
'停止搜索'
,
JSON
.
stringify
(
res
.
errMsg
));
}
});
//停止搜索,节省系统资源
uni
.
stopBluetoothDevicesDiscovery
({
success
:
res
=>
{
console
.
log
(
'停止搜索'
,
JSON
.
stringify
(
res
.
errMsg
));
try
{
uni
.
removeStorageSync
(
'device'
);
}
catch
(
e
)
{
// error
}
});
try
{
uni
.
removeStorageSync
(
'device'
);
}
catch
(
e
)
{
// error
}
//如果【理货确认-板/箱 均不为0】,则【打印标签】打印类型只继承入仓号,打印类型默认为【散箱】标签数量1 批次为0(保持原默认值)
if
(
this
.
printParams
.
box_num
&&
this
.
printParams
.
board_num
)
{
this
.
index_print_type
=
0
;
...
...
pages/tallyGoods/confirm.vue
View file @
5473a441
...
...
@@ -461,70 +461,64 @@
* 提交
*/
submit
(
type
)
{
//
if (!this.form.erp_order_sn) {
//
uni.showModal({
//
title: '提示',
//
content: '请输入入仓号',
//
showCancel: false
//
});
//
return false;
//
}
//
if (this.disabled) {
//
uni.showModal({
//
content: '请检查该入仓号是否正确',
//
showCancel: false
//
});
//
return false;
//
}
//
if (this.currentIndex == -1) {
//
uni.showModal({
//
content: '请选择清关费选项',
//
showCancel: false
//
});
//
return false;
//
}
//
if (!this.form.box_num) {
//
uni.showModal({
//
content: '请填写箱子数',
//
showCancel: false
//
});
//
return false;
//
}
//
if (!this.form.board_num) {
//
uni.showModal({
//
content: '请填写板子数',
//
showCancel: false
//
});
//
return false;
//
}
//
if (!this.form.gross_weight) {
//
uni.showModal({
//
content: '请填写箱毛重',
//
showCancel: false
//
});
//
return false;
//
}
if
(
!
this
.
form
.
erp_order_sn
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'请输入入仓号'
,
showCancel
:
false
});
return
false
;
}
if
(
this
.
disabled
)
{
uni
.
showModal
({
content
:
'请检查该入仓号是否正确'
,
showCancel
:
false
});
return
false
;
}
if
(
this
.
currentIndex
==
-
1
)
{
uni
.
showModal
({
content
:
'请选择清关费选项'
,
showCancel
:
false
});
return
false
;
}
if
(
!
this
.
form
.
box_num
)
{
uni
.
showModal
({
content
:
'请填写箱子数'
,
showCancel
:
false
});
return
false
;
}
if
(
!
this
.
form
.
board_num
)
{
uni
.
showModal
({
content
:
'请填写板子数'
,
showCancel
:
false
});
return
false
;
}
if
(
!
this
.
form
.
gross_weight
)
{
uni
.
showModal
({
content
:
'请填写箱毛重'
,
showCancel
:
false
});
return
false
;
}
//
//
商检图片必填
//
if (this.isInspOrg) {
//
// 使用every方法检查每个子数组是否满足条件
//
var isValid = this.goods_check_pic_list.every(subArray => subArray.length >= 2);
//
if (!isValid) {
//
uni.showModal({
//
content: '商检图片上传须大于2张',
//
showCancel: false
//
});
//
return false;
//
}
//
}
//商检图片必填
if
(
this
.
isInspOrg
)
{
// 使用every方法检查每个子数组是否满足条件
var
isValid
=
this
.
goods_check_pic_list
.
every
(
subArray
=>
subArray
.
length
>=
2
);
if
(
!
isValid
)
{
uni
.
showModal
({
content
:
'商检图片上传须大于2张'
,
showCancel
:
false
});
return
false
;
}
}
this
.
request
(
API
.
submitTallyGoods
,
'POST'
,
this
.
form
,
true
).
then
(
res
=>
{
//点击【确认提交并打印】跳转至【打印标签】页面
uni
.
navigateTo
({
url
:
'/pages/tag/print?board_num='
+
this
.
form
.
board_num
+
'&box_num='
+
this
.
form
.
box_num
+
'&erp_order_sn='
+
this
.
form
.
erp_order_sn
})
return
false
;
if
(
res
.
err_code
===
0
)
{
uni
.
showModal
({
title
:
'提示'
,
...
...
@@ -535,7 +529,7 @@
if
(
type
==
1
)
{
//点击【确认提交并打印】跳转至【打印标签】页面
uni
.
navigateTo
({
url
:
'/pages/tag/print?board_num='
+
this
.
form
.
board_num
+
'&box_num='
+
this
.
form
.
box_num
+
'&erp_order_sn='
+
this
.
form
.
erp_order_sn
url
:
'/pages/tag/print?board_num='
+
this
.
form
.
board_num
+
'&box_num='
+
this
.
form
.
box_num
+
'&erp_order_sn='
+
this
.
form
.
erp_order_sn
+
'&from=tallyGoods'
})
}
else
{
setTimeout
(()
=>
{
...
...
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