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
2bdbe965
authored
May 31, 2022
by
liangjianmin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
5e88be03
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
40 deletions
pages/tag/print.vue
util/api.js
pages/tag/print.vue
View file @
2bdbe965
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<view
class=
"box row verCenter"
>
<view
class=
"box row verCenter"
>
<view
class=
"row verCenter"
style=
"flex:0 0 93%"
>
<view
class=
"row verCenter"
style=
"flex:0 0 93%"
>
<view
class=
"label"
>
入仓号
</view>
<view
class=
"label"
>
入仓号
</view>
<input
type=
"text"
v-model=
"form.erp_order_sn"
placeholder-style=
"font-size:24rpx;color:#404547;"
class=
"uni-input"
placeholder=
"请输入"
/>
<input
type=
"text"
v-model=
"form.erp_order_sn"
placeholder-style=
"font-size:24rpx;color:#404547;"
class=
"uni-input"
placeholder=
"请输入
入仓号
"
/>
</view>
</view>
<text
class=
"scan iconfont icon-juxing6"
@
click=
"scanChange()"
></text>
<text
class=
"scan iconfont icon-juxing6"
@
click=
"scanChange()"
></text>
</view>
</view>
...
@@ -47,6 +47,16 @@
...
@@ -47,6 +47,16 @@
</picker>
</picker>
</view>
</view>
</view>
</view>
<view
class=
"box row verCenter"
v-if=
"index_print_type == 0"
>
<view
class=
"label"
>
卡板数
</view>
<input
type=
"number"
@
input=
"changeNumber()"
v-model=
"form.number"
placeholder-style=
"font-size:24rpx;color:#404547;"
class=
"uni-input"
placeholder=
"请输入卡板数"
/>
</view>
<
template
v-for=
"(item, index) in numberList"
v-if=
"flag && index_print_type == 0"
>
<view
class=
"box row verCenter"
>
<view
class=
"label"
>
第
{{
index
+
1
}}
卡板数量
</view>
<input
type=
"number"
placeholder-style=
"font-size:24rpx;color:#404547;"
class=
"uni-input"
placeholder=
"请输入数量"
@
input=
"onInput($event, index)"
/>
</view>
</
template
>
</view>
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submit()"
>
提交打印
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submit()"
>
提交打印
</view>
</view>
</view>
...
@@ -60,7 +70,6 @@ const ToBase64 = require('../../util/base64gb2312.js');
...
@@ -60,7 +70,6 @@ const ToBase64 = require('../../util/base64gb2312.js');
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
number
:
''
,
//从条码管理列表过来的
print_number
:
0
,
print_number
:
0
,
serviceId
:
''
,
serviceId
:
''
,
deviceId
:
''
,
deviceId
:
''
,
...
@@ -79,11 +88,15 @@ export default {
...
@@ -79,11 +88,15 @@ export default {
platform
:
''
,
platform
:
''
,
wstyptll_id
:
''
,
wstyptll_id
:
''
,
batchArr
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
],
batchArr
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
],
flag
:
false
,
numberList
:
[],
form
:
{
form
:
{
batch
:
0
,
//批次
batch
:
0
,
//批次
print_type
:
2
,
//打印类型
print_type
:
2
,
//打印类型
erp_order_sn
:
''
,
//入仓号
erp_order_sn
:
''
,
//入仓号
label_num
:
'1'
//总箱数
label_num
:
'1'
,
//总箱数
number
:
1
,
numbers
:
[]
}
}
};
};
},
},
...
@@ -117,9 +130,6 @@ export default {
...
@@ -117,9 +130,6 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
bindPickerChangeBatch
(
e
)
{
this
.
form
.
batch
=
e
.
target
.
value
;
},
scanChange
()
{
scanChange
()
{
uni
.
scanCode
({
uni
.
scanCode
({
success
:
res
=>
{
success
:
res
=>
{
...
@@ -135,31 +145,57 @@ export default {
...
@@ -135,31 +145,57 @@ export default {
}
}
});
});
},
},
bindPickerChange
:
function
(
e
)
{
/**
this
.
index
=
e
.
target
.
value
;
* 批次监听
this
.
form
.
tray_remark
=
this
.
traySelectOption
[
e
.
target
.
value
].
wstylt_id
;
*/
uni
.
setStorageSync
(
'tray_sn_index'
,
this
.
index
);
bindPickerChangeBatch
(
e
)
{
uni
.
setStorageSync
(
'tray_sn_value'
,
this
.
traySelectOption
[
e
.
target
.
value
].
wstylt_id
)
;
this
.
form
.
batch
=
e
.
target
.
value
;
},
},
submit
()
{
/**
if
(
!
this
.
device_name
)
{
* 卡板数量list监听
uni
.
showModal
({
*/
title
:
'提示'
,
onInput
(
e
,
index
)
{
content
:
'请连接蓝牙设备'
,
this
.
form
.
numbers
[
index
].
value
=
e
.
detail
.
value
;
showCancel
:
false
,
},
confirmText
:
'关闭'
,
/**
success
:
function
(
res
)
{
* 卡板数监听
if
(
res
.
confirm
)
{
*/
uni
.
navigateTo
({
changeNumber
()
{
url
:
'/pages/tag/deviceList'
if
(
this
.
form
.
number
>
1
)
{
this
.
flag
=
true
;
this
.
numberList
=
[];
this
.
form
.
numbers
=
[];
for
(
var
i
=
0
;
i
<
this
.
form
.
number
;
i
++
)
{
this
.
numberList
.
push
(
i
);
this
.
form
.
numbers
.
push
({
value
:
''
});
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
}
});
}
else
{
return
false
;
this
.
flag
=
false
;
this
.
numberList
=
[];
this
.
form
.
numbers
=
[];
}
}
},
submit
()
{
// if (!this.device_name) {
// uni.showModal({
// title: '提示',
// content: '请连接蓝牙设备',
// showCancel: false,
// confirmText: '关闭',
// success: function(res) {
// if (res.confirm) {
// uni.navigateTo({
// url: '/pages/tag/deviceList'
// });
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// });
// return false;
// }
if
(
!
this
.
form
.
erp_order_sn
)
{
if
(
!
this
.
form
.
erp_order_sn
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
...
@@ -187,6 +223,26 @@ export default {
...
@@ -187,6 +223,26 @@ export default {
return
false
;
return
false
;
}
}
if
(
this
.
index_print_type
==
0
&&
this
.
form
.
number
>
1
)
{
let
label_num
=
this
.
form
.
label_num
*
1
;
//总箱数
let
num
=
0
;
if
(
this
.
form
.
numbers
.
length
>
1
)
{
for
(
let
i
=
0
;
i
<
this
.
form
.
numbers
.
length
;
i
++
)
{
num
+=
this
.
form
.
numbers
[
i
].
value
*
1
;
}
}
if
(
label_num
!=
num
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'卡板数量总和必须等于总箱数'
,
showCancel
:
false
});
return
false
;
}
}
let
params
=
Object
.
assign
(
this
.
form
,
{
let
params
=
Object
.
assign
(
this
.
form
,
{
is_add
:
0
is_add
:
0
});
});
...
@@ -365,17 +421,7 @@ export default {
...
@@ -365,17 +421,7 @@ export default {
});
});
},
},
change
(
index
,
type
)
{
change
(
index
,
type
)
{
if
(
type
==
'erp_order_sn_pre'
)
{
if
(
type
==
'print_type'
)
{
//订单类型
this
.
index_erp_order_sn_pre
=
index
;
if
(
index
==
0
)
{
this
.
form
.
erp_order_sn_pre
=
'A'
;
}
else
if
(
index
==
1
)
{
this
.
form
.
erp_order_sn_pre
=
'B'
;
}
else
if
(
index
==
2
)
{
this
.
form
.
erp_order_sn_pre
=
'D'
;
}
}
else
if
(
type
==
'print_type'
)
{
//打印类型
//打印类型
this
.
index_print_type
=
index
;
this
.
index_print_type
=
index
;
if
(
index
==
0
)
{
if
(
index
==
0
)
{
...
@@ -386,6 +432,11 @@ export default {
...
@@ -386,6 +432,11 @@ export default {
this
.
form
.
print_type
=
2
;
this
.
form
.
print_type
=
2
;
this
.
text
=
'标签数量'
;
this
.
text
=
'标签数量'
;
this
.
print_text
=
'箱号'
;
this
.
print_text
=
'箱号'
;
//置空卡板
this
.
flag
=
false
;
this
.
form
.
number
=
''
;
this
.
form
.
numbers
=
[];
}
}
}
}
}
}
...
...
util/api.js
View file @
2bdbe965
const
API_BASE
=
'https://api.ichunt.com'
;
//
const API_BASE = 'https://api.ichunt.com';
//
const API_BASE = 'http://api.liexin.com';
const
API_BASE
=
'http://api.liexin.com'
;
const
API
=
{
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