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
1a9a1b1c
authored
Oct 31, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
b34df578
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
151 additions
and
142 deletions
pages/repairPrint/index.vue
pages/repairPrint/index.vue
View file @
1a9a1b1c
...
@@ -20,7 +20,9 @@
...
@@ -20,7 +20,9 @@
<view
class=
"search-box row bothSide verCenter"
v-if=
"formParams.type == 5"
style=
"margin-bottom: 22rpx;"
>
<view
class=
"search-box row bothSide verCenter"
v-if=
"formParams.type == 5"
style=
"margin-bottom: 22rpx;"
>
<view
class=
"sn row rowCenter verCenter"
>
<view
class=
"sn row rowCenter verCenter"
>
<view>
<view>
<view
class=
"row verCenter"
><view
class=
"uni-input"
>
数量
</view></view>
<view
class=
"row verCenter"
>
<view
class=
"uni-input"
>
数量
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"search-bar row bothSide verCenter"
>
<view
class=
"search-bar row bothSide verCenter"
>
...
@@ -34,7 +36,9 @@
...
@@ -34,7 +36,9 @@
<view
class=
"search-box row bothSide verCenter"
style=
"margin-bottom: 22rpx;"
>
<view
class=
"search-box row bothSide verCenter"
style=
"margin-bottom: 22rpx;"
>
<view
class=
"sn row rowCenter verCenter"
>
<view
class=
"sn row rowCenter verCenter"
>
<view>
<view>
<view
class=
"row verCenter"
><view
class=
"uni-input"
>
目标打印机
</view></view>
<view
class=
"row verCenter"
>
<view
class=
"uni-input"
>
目标打印机
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"search-bar row bothSide verCenter"
>
<view
class=
"search-bar row bothSide verCenter"
>
...
@@ -48,7 +52,9 @@
...
@@ -48,7 +52,9 @@
<view
class=
"search-box row bothSide verCenter"
style=
"margin-bottom: 22rpx;"
>
<view
class=
"search-box row bothSide verCenter"
style=
"margin-bottom: 22rpx;"
>
<view
class=
"sn row rowCenter verCenter"
>
<view
class=
"sn row rowCenter verCenter"
>
<view>
<view>
<view
class=
"row verCenter"
><view
class=
"uni-input"
>
标签版本
</view></view>
<view
class=
"row verCenter"
>
<view
class=
"uni-input"
>
标签版本
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"row bothSide verCenter select-wrap"
>
<view
class=
"row bothSide verCenter select-wrap"
>
...
@@ -63,7 +69,9 @@
...
@@ -63,7 +69,9 @@
<view
class=
"search-box row bothSide verCenter"
style=
"margin-bottom: 22rpx;"
>
<view
class=
"search-box row bothSide verCenter"
style=
"margin-bottom: 22rpx;"
>
<view
class=
"sn row rowCenter verCenter"
>
<view
class=
"sn row rowCenter verCenter"
>
<view>
<view>
<view
class=
"row verCenter"
><view
class=
"uni-input"
>
仓库
</view></view>
<view
class=
"row verCenter"
>
<view
class=
"uni-input"
>
仓库
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"row bothSide verCenter select-wrap"
>
<view
class=
"row bothSide verCenter select-wrap"
>
...
@@ -80,165 +88,165 @@
...
@@ -80,165 +88,165 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
API
}
from
'@/util/api.js'
;
import
{
API
}
from
'@/util/api.js'
;
import
debounce
from
'lodash/debounce'
;
import
debounce
from
'lodash/debounce'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
company_id
:
1
,
company_id
:
1
,
input_flag
:
false
,
input_flag
:
false
,
input_flag_num
:
false
,
input_flag_num
:
false
,
index
:
0
,
index
:
0
,
print_language_index
:
0
,
print_language_index
:
0
,
print_language
:
[
'中文'
,
'英文'
],
print_language
:
[
'中文'
,
'英文'
],
labelStyles
:
[
labelStyles
:
[{
{
id
:
5
,
id
:
5
,
name
:
'入库标签'
name
:
'入库标签'
},
},
{
{
id
:
1
,
id
:
1
,
name
:
'库位标签'
name
:
'库位标签'
},
},
{
{
id
:
2
,
id
:
2
,
name
:
'库区标签'
name
:
'库区标签'
},
},
{
{
id
:
3
,
id
:
3
,
name
:
'区域标签'
name
:
'区域标签'
},
},
{
{
id
:
4
,
id
:
4
,
name
:
'容器标签'
name
:
'容器标签'
}
],
warehouse_arr
:
[],
warehouse_index
:
0
,
formParams
:
{
user_email
:
''
,
// 登录账号邮箱
warehouse_id
:
''
,
// 登录仓库
sn
:
''
,
target_printer_ip
:
''
,
//模板打印机
tally_qty
:
''
,
//打印数量
print_language
:
1
,
//标签版本
type
:
5
,
//库位 1;库区 2;区域 3; 容器 4;入库 5 默认5
warehouse_id
:
''
,
//仓库id
print_type
:
1
}
}
],
};
warehouse_arr
:
[],
},
warehouse_index
:
0
,
onShow
()
{
formParams
:
{
let
company_id
=
uni
.
getStorageSync
(
'company_id'
)
||
1
;
user_email
:
''
,
// 登录账号邮箱
if
(
company_id
==
1
)
{
warehouse_id
:
''
,
// 登录仓库
this
.
warehouse_arr
=
[{
name
:
'深圳现货仓'
,
value
:
'7'
},
{
name
:
'深圳自营仓'
,
value
:
9
}];
sn
:
''
,
this
.
formParams
.
warehouse_id
=
7
;
target_printer_ip
:
''
,
//模板打印机
}
else
if
(
company_id
==
2
)
{
tally_qty
:
''
,
//打印数量
this
.
warehouse_arr
=
[{
name
:
'香港仓'
,
value
:
'10'
}];
print_language
:
1
,
//标签版本
this
.
formParams
.
warehouse_id
=
10
;
type
:
5
,
//库位 1;库区 2;区域 3; 容器 4;入库 5 默认5
warehouse_id
:
''
//仓库id
}
};
},
onShow
()
{
let
company_id
=
uni
.
getStorageSync
(
'company_id'
)
||
1
;
if
(
company_id
==
1
)
{
this
.
warehouse_arr
=
[{
name
:
'深圳现货仓'
,
value
:
'7'
},
{
name
:
'深圳自营仓'
,
value
:
9
}];
this
.
formParams
.
warehouse_id
=
7
;
}
else
if
(
company_id
==
2
)
{
this
.
warehouse_arr
=
[{
name
:
'香港仓'
,
value
:
'10'
}];
this
.
formParams
.
warehouse_id
=
10
;
}
},
methods
:
{
/**
* 清空数据
*/
clearInput
(
type
)
{
if
(
type
==
1
)
{
this
.
formParams
.
sn
=
''
;
this
.
input_flag
=
false
;
}
else
if
(
type
==
2
)
{
this
.
formParams
.
tally_qty
=
''
;
this
.
input_flag_num
=
false
;
}
}
},
},
/**
methods
:
{
* 单号搜索
/**
* @param {Object} event
* 清空数据
*/
*/
handleInput
:
debounce
(
function
(
type
,
val
)
{
clearInput
(
type
)
{
if
(
val
)
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
this
.
input_flag
=
true
;
this
.
formParams
.
sn
=
''
;
this
.
input_flag
=
false
;
}
else
if
(
type
==
2
)
{
}
else
if
(
type
==
2
)
{
this
.
input_flag_num
=
true
;
this
.
formParams
.
tally_qty
=
''
;
this
.
input_flag_num
=
false
;
}
}
}
else
{
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput
:
debounce
(
function
(
type
,
val
)
{
if
(
val
)
{
if
(
type
==
1
)
{
this
.
input_flag
=
true
;
}
else
if
(
type
==
2
)
{
this
.
input_flag_num
=
true
;
}
}
else
{
if
(
type
==
1
)
{
this
.
input_flag
=
false
;
}
else
if
(
type
==
2
)
{
this
.
input_flag_num
=
false
;
}
}
},
500
),
bindPickerChange
:
function
(
e
,
type
)
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
this
.
input_flag
=
false
;
//标签版本切换
this
.
print_language_index
=
e
.
detail
.
value
;
this
.
formParams
.
print_language
=
Number
(
e
.
detail
.
value
)
+
1
;
}
else
if
(
type
==
2
)
{
}
else
if
(
type
==
2
)
{
this
.
input_flag_num
=
false
;
this
.
warehouse_index
=
e
.
detail
.
value
;
this
.
formParams
.
warehouse_id
=
this
.
warehouse_arr
[
e
.
detail
.
value
].
value
;
}
else
{
this
.
index
=
e
.
detail
.
value
;
this
.
formParams
.
type
=
this
.
labelStyles
[
e
.
detail
.
value
].
id
;
}
}
}
},
},
500
),
/**
bindPickerChange
:
function
(
e
,
type
)
{
* 打印
if
(
type
==
1
)
{
*/
//标签版本切换
latePrint
()
{
this
.
print_language_index
=
e
.
detail
.
value
;
if
(
!
this
.
formParams
.
sn
)
{
this
.
formParams
.
print_language
=
Number
(
e
.
detail
.
value
)
+
1
;
}
else
if
(
type
==
2
)
{
this
.
warehouse_index
=
e
.
detail
.
value
;
this
.
formParams
.
warehouse_id
=
this
.
warehouse_arr
[
e
.
detail
.
value
].
value
;
}
else
{
this
.
index
=
e
.
detail
.
value
;
this
.
formParams
.
type
=
this
.
labelStyles
[
e
.
detail
.
value
].
id
;
}
},
/**
* 打印
*/
latePrint
()
{
if
(
!
this
.
formParams
.
sn
)
{
uni
.
showToast
({
title
:
'请输入标签'
,
icon
:
'error'
});
return
false
;
}
if
(
this
.
formParams
.
type
==
5
)
{
if
(
!
this
.
formParams
.
tally_qty
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'请输入
数量
'
,
title
:
'请输入
标签
'
,
icon
:
'error'
icon
:
'error'
});
});
return
false
;
return
false
;
}
}
}
else
{
if
(
this
.
formParams
.
type
==
5
)
{
this
.
formParams
.
tally_qty
=
1
;
if
(
!
this
.
formParams
.
tally_qty
)
{
}
uni
.
showToast
({
title
:
'请输入数量'
,
this
.
formParams
.
user_email
=
uni
.
getStorageSync
(
'oa_user_email'
)
||
''
;
icon
:
'error'
});
return
false
;
}
}
else
{
this
.
formParams
.
tally_qty
=
1
;
}
// company_id == 1 ? '深圳市猎芯科技有限公司' : '深贸电子有限公司'
this
.
formParams
.
user_email
=
uni
.
getStorageSync
(
'oa_user_email'
)
||
''
;
this
.
company_id
=
uni
.
getStorageSync
(
'company_id'
)
||
1
;
// 7 深圳仓, 10 香港仓
// company_id == 1 ? '深圳市猎芯科技有限公司' : '深贸电子有限公司'
if
(
this
.
company_id
==
1
)
{
this
.
company_id
=
uni
.
getStorageSync
(
'company_id'
)
||
1
;
this
.
formParams
.
warehouse_id
=
7
;
}
else
{
this
.
formParams
.
warehouse_id
=
10
;
}
this
.
request
(
API
.
latePrint
,
'POST'
,
this
.
formParams
,
true
).
then
(
res
=>
{
// 7 深圳仓, 10 香港仓
if
(
res
.
code
===
0
)
{
if
(
this
.
company_id
==
1
)
{
uni
.
showLoading
({
this
.
formParams
.
warehouse_id
=
7
;
title
:
'正在打印中...'
});
setTimeout
(()
=>
{
uni
.
hideLoading
();
},
5000
);
}
else
{
}
else
{
uni
.
showModal
({
this
.
formParams
.
warehouse_id
=
10
;
itle
:
'提示'
,
content
:
res
.
msg
,
showCancel
:
false
});
}
}
});
this
.
request
(
API
.
latePrint
,
'POST'
,
this
.
formParams
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
uni
.
showLoading
({
title
:
'正在打印中...'
});
setTimeout
(()
=>
{
uni
.
hideLoading
();
},
5000
);
}
else
{
uni
.
showModal
({
itle
:
'提示'
,
content
:
res
.
msg
,
showCancel
:
false
});
}
});
}
}
}
}
};
};
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
@import
'@/assets/css/repairPrint/index.scss'
;
@import
'@/assets/css/repairPrint/index.scss'
;
</
style
>
</
style
>
\ No newline at end of file
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