Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
46fb3eea
Commit
46fb3eea
authored
Jul 20, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印订单标签
parent
2270d256
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
463 additions
and
114 deletions
+463
-114
LodopFuncs.js
public/static/LodopFuncs.js
+188
-0
order.js
src/api/ecw/order.js
+8
-0
dict.js
src/utils/dict.js
+1
-0
lodop.js
src/utils/lodop.js
+21
-0
PrintTag.vue
src/views/ecw/order/components/PrintTag.vue
+157
-0
edit.vue
src/views/ecw/order/edit.vue
+73
-59
index.vue
src/views/ecw/order/index.vue
+15
-55
No files found.
public/static/LodopFuncs.js
0 → 100644
View file @
46fb3eea
//==本JS是加载Lodop插件或Web打印服务CLodop/Lodop7的综合示例,可直接使用,建议理解后融入自己程序==
//用双端口加载主JS文件Lodop.js(或CLodopfuncs.js兼容老版本)以防其中某端口被占:
var
MainJS
=
"
CLodopfuncs.js
"
,
URL_WS1
=
"
ws://localhost:8000/
"
+
MainJS
,
//ws用8000/18000
URL_WS2
=
"
ws://localhost:18000/
"
+
MainJS
,
URL_HTTP1
=
"
http://localhost:8000/
"
+
MainJS
,
//http用8000/18000
URL_HTTP2
=
"
http://localhost:18000/
"
+
MainJS
,
URL_HTTP3
=
"
https://localhost.lodop.net:8443/
"
+
MainJS
;
//https用8000/8443
var
CreatedOKLodopObject
,
CLodopIsLocal
,
LoadJsState
;
//==判断是否需要CLodop(那些不支持插件的浏览器):==
function
needCLodop
()
{
try
{
var
ua
=
navigator
.
userAgent
;
if
(
ua
.
match
(
/Windows
\s
Phone/i
)
||
ua
.
match
(
/iPhone|iPod|iPad/i
)
||
ua
.
match
(
/Android/i
)
||
ua
.
match
(
/Edge
\D?\d
+/i
))
return
true
;
var
verTrident
=
ua
.
match
(
/Trident
\D?\d
+/i
);
var
verIE
=
ua
.
match
(
/MSIE
\D?\d
+/i
);
var
verOPR
=
ua
.
match
(
/OPR
\D?\d
+/i
);
var
verFF
=
ua
.
match
(
/Firefox
\D?\d
+/i
);
var
x64
=
ua
.
match
(
/x64/i
);
if
((
!
verTrident
)
&&
(
!
verIE
)
&&
(
x64
))
return
true
;
else
if
(
verFF
)
{
verFF
=
verFF
[
0
].
match
(
/
\d
+/
);
if
((
verFF
[
0
]
>=
41
)
||
(
x64
))
return
true
;
}
else
if
(
verOPR
)
{
verOPR
=
verOPR
[
0
].
match
(
/
\d
+/
);
if
(
verOPR
[
0
]
>=
32
)
return
true
;
}
else
if
((
!
verTrident
)
&&
(
!
verIE
))
{
var
verChrome
=
ua
.
match
(
/Chrome
\D?\d
+/i
);
if
(
verChrome
)
{
verChrome
=
verChrome
[
0
].
match
(
/
\d
+/
);
if
(
verChrome
[
0
]
>=
41
)
return
true
;
}
}
return
false
;
}
catch
(
err
)
{
return
true
;
}
}
//==检查加载成功与否,如没成功则用http(s)再试==
//==低版本CLODOP6.561/Lodop7.043及前)用本方法==
function
checkOrTryHttp
()
{
if
(
window
.
CLODOP2015_7028
)
{
LoadJsState
=
"
complete
"
;
return
true
;
}
if
(
LoadJsState
==
"
loadingB
"
||
LoadJsState
==
"
complete
"
)
return
;
LoadJsState
=
"
loadingB
"
;
var
head
=
document
.
head
||
document
.
getElementsByTagName
(
"
head
"
)[
0
]
||
document
.
documentElement
;
var
JS1
=
document
.
createElement
(
"
script
"
)
,
JS2
=
document
.
createElement
(
"
script
"
)
,
JS3
=
document
.
createElement
(
"
script
"
);
JS1
.
src
=
URL_HTTP1
;
JS2
.
src
=
URL_HTTP2
;
JS3
.
src
=
URL_HTTP3
;
JS1
.
onload
=
JS2
.
onload
=
JS3
.
onload
=
JS2
.
onerror
=
JS3
.
onerror
=
function
(){
LoadJsState
=
"
complete
"
;}
JS1
.
onerror
=
function
(
e
)
{
if
(
window
.
location
.
protocol
!==
'
https:
'
)
head
.
insertBefore
(
JS2
,
head
.
firstChild
);
else
head
.
insertBefore
(
JS3
,
head
.
firstChild
);
}
head
.
insertBefore
(
JS1
,
head
.
firstChild
);
}
//==加载Lodop对象的主过程:==
(
function
loadCLodop
(){
if
(
!
needCLodop
())
return
;
CLodopIsLocal
=
!!
((
URL_WS1
+
URL_WS2
).
match
(
/
\/\/
localho|
\/\/
127.0.0./i
));
LoadJsState
=
"
loadingA
"
;
if
(
!
window
.
WebSocket
&&
window
.
MozWebSocket
)
window
.
WebSocket
=
window
.
MozWebSocket
;
//ws方式速度快(小于200ms)且可避免CORS错误,但要求Lodop版本足够新:
try
{
var
WSK1
=
new
WebSocket
(
URL_WS1
);
WSK1
.
onopen
=
function
(
e
)
{
setTimeout
(
"
checkOrTryHttp();
"
,
200
);
}
WSK1
.
onmessage
=
function
(
e
)
{
if
(
!
window
.
CLODOP2015_7028
)
eval
(
e
.
data
);}
WSK1
.
onerror
=
function
(
e
)
{
var
WSK2
=
new
WebSocket
(
URL_WS2
);
WSK2
.
onopen
=
function
(
e
)
{
setTimeout
(
"
checkOrTryHttp();
"
,
200
);}
WSK2
.
onmessage
=
function
(
e
)
{
if
(
!
window
.
CLODOP2015_7028
)
eval
(
e
.
data
);}
WSK2
.
onerror
=
function
(
e
)
{
checkOrTryHttp
();}
}
}
catch
(
e
){
checkOrTryHttp
();
}
})();
//==获取LODOP对象主过程,判断是否安装、需否升级:==
function
getLodop
(
oOBJECT
,
oEMBED
)
{
var
strFontTag
=
"
<br><font color='#FF00FF'>打印控件
"
;
var
strLodopInstall
=
strFontTag
+
"
未安装!点击这里<a href='install_lodop32.exe' target='_self'>执行安装</a>
"
;
var
strLodopUpdate
=
strFontTag
+
"
需要升级!点击这里<a href='install_lodop32.exe' target='_self'>执行升级</a>
"
;
var
strLodop64Install
=
strFontTag
+
"
未安装!点击这里<a href='install_lodop64.exe' target='_self'>执行安装</a>
"
;
var
strLodop64Update
=
strFontTag
+
"
需要升级!点击这里<a href='install_lodop64.exe' target='_self'>执行升级</a>
"
;
var
strCLodopInstallA
=
"
<br><font color='#FF00FF'>Web打印服务CLodop未安装启动,点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>下载执行安装</a>
"
;
var
strCLodopInstallB
=
"
<br>(若此前已安装过,可<a href='CLodop.protocol:setup' target='_self'>点这里直接再次启动</a>)
"
;
var
strCLodopUpdate
=
"
<br><font color='#FF00FF'>Web打印服务CLodop需升级!点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>
"
;
var
strLodop7FontTag
=
"
<br><font color='#FF00FF'>Web打印服务Lodop7
"
;
var
strLodop7HrefX86
=
"
点击这里<a href='Lodop7_Linux_X86_64.tar.gz' target='_self'>下载安装</a>(下载后解压,点击lodop文件开始执行)
"
;
var
strLodop7HrefARM
=
"
点击这里<a href='Lodop7_Linux_ARM64.tar.gz' target='_self'>下载安装</a>(下载后解压,点击lodop文件开始执行)
"
;
var
strLodop7Install_X86
=
strLodop7FontTag
+
"
未安装启动,
"
+
strLodop7HrefX86
;
var
strLodop7Install_ARM
=
strLodop7FontTag
+
"
未安装启动,
"
+
strLodop7HrefARM
;
var
strLodop7Update_X86
=
strLodop7FontTag
+
"
需升级,
"
+
strLodop7HrefX86
;
var
strLodop7Update_ARM
=
strLodop7FontTag
+
"
需升级,
"
+
strLodop7HrefARM
;
var
strInstallOK
=
"
,成功后请刷新本页面或重启浏览器。</font>
"
;
var
LODOP
;
try
{
var
isWinIE
=
(
/MSIE/i
.
test
(
navigator
.
userAgent
))
||
(
/Trident/i
.
test
(
navigator
.
userAgent
));
var
isWinIE64
=
isWinIE
&&
(
/x64/i
.
test
(
navigator
.
userAgent
));
var
isLinuxX86
=
(
/Linux/i
.
test
(
navigator
.
platform
))
&&
(
/x86/i
.
test
(
navigator
.
platform
));
var
isLinuxARM
=
(
/Linux/i
.
test
(
navigator
.
platform
))
&&
(
/aarch/i
.
test
(
navigator
.
platform
));
if
(
needCLodop
()
||
isLinuxX86
||
isLinuxARM
)
{
try
{
LODOP
=
window
.
CLODOP2015_7028
;
}
catch
(
err
)
{}
if
(
!
LODOP
&&
LoadJsState
!==
"
complete
"
)
{
if
(
!
LoadJsState
)
alert
(
"
未曾加载Lodop主JS文件,请先调用loadCLodop过程.
"
);
else
alert
(
"
网页还没下载完毕,请稍等一下再操作.
"
+
LoadJsState
);
return
;
}
var
strAlertMessage
;
if
(
!
LODOP
)
{
if
(
isLinuxX86
)
strAlertMessage
=
strLodop7Install_X86
;
else
if
(
isLinuxARM
)
strAlertMessage
=
strLodop7Install_ARM
;
else
strAlertMessage
=
strCLodopInstallA
+
(
CLodopIsLocal
?
strCLodopInstallB
:
""
);
document
.
body
.
innerHTML
=
strAlertMessage
+
strInstallOK
+
document
.
body
.
innerHTML
;
return
;
}
else
{
if
(
isLinuxX86
&&
LODOP
.
CVERSION
<
"
7.0.4.3
"
)
strAlertMessage
=
strLodop7Update_X86
;
else
if
(
isLinuxARM
&&
LODOP
.
CVERSION
<
"
7.0.4.3
"
)
strAlertMessage
=
strLodop7Update_ARM
;
else
if
(
CLODOP
.
CVERSION
<
"
6.5.6.6
"
)
strAlertMessage
=
strCLodopUpdate
;
if
(
strAlertMessage
)
document
.
body
.
innerHTML
=
strAlertMessage
+
strInstallOK
+
document
.
body
.
innerHTML
;
}
}
else
{
//==如果页面有Lodop插件就直接使用,否则新建:==
if
(
oOBJECT
||
oEMBED
)
{
if
(
isWinIE
)
LODOP
=
oOBJECT
;
else
LODOP
=
oEMBED
;
}
else
if
(
!
CreatedOKLodopObject
)
{
LODOP
=
document
.
createElement
(
"
object
"
);
LODOP
.
setAttribute
(
"
width
"
,
0
);
LODOP
.
setAttribute
(
"
height
"
,
0
);
LODOP
.
setAttribute
(
"
style
"
,
"
position:absolute;left:0px;top:-100px;width:0px;height:0px;
"
);
if
(
isWinIE
)
LODOP
.
setAttribute
(
"
classid
"
,
"
clsid:2105C259-1E0C-4534-8141-A753534CB4CA
"
);
else
LODOP
.
setAttribute
(
"
type
"
,
"
application/x-print-lodop
"
);
document
.
documentElement
.
appendChild
(
LODOP
);
CreatedOKLodopObject
=
LODOP
;
}
else
LODOP
=
CreatedOKLodopObject
;
//==Lodop插件未安装时提示下载地址:==
if
((
!
LODOP
)
||
(
!
LODOP
.
VERSION
))
{
document
.
body
.
innerHTML
=
(
isWinIE64
?
strLodop64Install
:
strLodopInstall
)
+
strInstallOK
+
document
.
body
.
innerHTML
;
return
LODOP
;
}
if
(
LODOP
.
VERSION
<
"
6.2.2.6
"
)
{
document
.
body
.
innerHTML
=
(
isWinIE64
?
strLodop64Update
:
strLodopUpdate
)
+
strInstallOK
+
document
.
body
.
innerHTML
;
}
}
//===如下空白位置适合调用统一功能(如注册语句、语言选择等):=======================
LODOP
.
SET_LICENSES
(
"
江西省晨尚科技有限公司
"
,
"
9D5CB0779D3B7FF8B70BD2F896DA5312
"
,
""
,
""
);
//===============================================================================
return
LODOP
;
}
catch
(
err
)
{
alert
(
"
getLodop出错:
"
+
err
);
}
}
src/api/ecw/order.js
View file @
46fb3eea
...
...
@@ -52,3 +52,11 @@ export function exportOrderExcel(query) {
responseType
:
'
blob
'
})
}
// 打印标签
export
function
printTag
(
id
)
{
return
request
({
url
:
'
/order/print/orderTagPrint?orderId=
'
+
id
,
method
:
'
get
'
,
})
}
\ No newline at end of file
src/utils/dict.js
View file @
46fb3eea
...
...
@@ -99,6 +99,7 @@ export const DICT_TYPE = {
ECW_RECEIPT_STATE
:
'
receipt_state
'
,
//收款单状态
ECW_SUING_METHOD
:
'
suing_method
'
,
// 出单方式
ECW_HARVEST_METHOD
:
'
harvest_method
'
,
// 收货方式
ECW_PAY_ADVANCE
:
'
pay_advance
'
,
// 是否预付
//--------ecw---------
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_SOURCE
:
'
customer_source
'
,
...
...
src/utils/lodop.js
0 → 100644
View file @
46fb3eea
const
lodop
=
function
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
window
.
getLodop
){
var
hm
=
document
.
createElement
(
"
script
"
);
hm
.
src
=
"
/static/LodopFuncs.js
"
;
hm
.
onload
=
function
(){
console
.
log
(
'
lodop.js已加载
'
)
// 加载js文件后会自动链接ws,等一会再操作
setTimeout
(
res
=>
{
resolve
(
getLodop
())
},
500
)
}
hm
.
onerror
=
function
(
err
){
reject
(
err
)
}
var
s
=
document
.
getElementsByTagName
(
"
script
"
)[
0
];
s
.
parentNode
.
insertBefore
(
hm
,
s
);
}
else
resolve
(
getLodop
())
})
}
export
default
lodop
\ No newline at end of file
src/views/ecw/order/components/PrintTag.vue
0 → 100644
View file @
46fb3eea
<
template
>
<el-dialog
:title=
"title"
visible
:before-close=
"closeDialog"
>
<div
class=
""
v-if=
"step == 'form'"
>
<el-form
ref=
"form"
:model=
"form"
label-position=
"left"
label-width=
"100px"
>
<el-form-item
v-if=
"detail"
label=
"订单号"
>
<el-input
v-model=
"detail.orderNo"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"起始标签"
prop=
"start"
required
>
<el-input
v-model.number=
"form.start"
type=
"number"
></el-input>
</el-form-item>
<el-form-item
label=
"结束标签"
prop=
"end"
required
>
<el-input
v-model.number=
"form.end"
type=
"number"
:max=
"detail ? detail.num : 1"
></el-input>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"primary"
@
click=
"showPreview"
>
去打印
</el-button>
</el-form-item>
</el-form>
</div>
<template
v-if=
"step=='preview'"
>
<div
style=
"width: 80mm; margin: 0 auto;"
id=
"order-print-tag"
v-if=
"detail"
>
<div
style=
"float: left; width: 28mm; border-bottom: 0.2mm solid #333; border-right: 0.2mm solid #333; "
>
<img
:src=
"detail.url"
alt=
"ECP0063704N-1"
style=
"width: 26mm"
/>
<p
style=
" text-align: center; height: 5mm; font-size: 3mm; -webkit-margin-before: 0em; -webkit-margin-after: 0em; margin-top: 0mm; "
>
{{
detail
.
orderNo
}}
-
{{
currentNo
}}
</p>
<p
style=
"margin-top: -1mm; text-align: center"
>
<span
style=
"text-align: center; font-weight: 600; font-size: 6mm"
>
{{
currentNo
}}
</span>
</p>
</div>
<div
style=
"float: left; width: 50mm; margin-bottom: 2mm"
>
<p
style=
" padding-top: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; padding-bottom: 2.5mm; margin: 0px; font-weight: 600; font-size: 6mm; "
>
{{
detail
.
orderNo
}}
</p>
<p
style=
" padding: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; padding-top: 2.6mm; padding-bottom: 2.6mm; margin: 0px; font-weight: 600; font-size: 6mm; "
>
{{
detail
.
marks
}}
</p>
<p
style=
" padding: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; margin: 0px; font-size: 5mm; text-transform: uppercase; padding-top: 3.5mm; padding-bottom: 2.5mm; "
>
{{
detail
.
startTitleEn
}}
--
>
<label
style=
"font-weight: 600; font-size: 5.5mm"
>
{{
detail
.
destTitleEn
}}
</label>
</p>
<p
style=
" padding: 0px; padding-top: 2.7mm; padding-bottom: 2.7mm; padding-left: 3mm; float: left; width: 29%; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; font-size: 4mm; text-transform: uppercase; margin: 0px; "
>
LCL
</p>
<p
style=
" padding: 0px; padding-top: 2.7mm; padding-bottom: 2.7mm; padding-left: 4mm; float: left; border-left: 0.2mm solid #333; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; margin: 0px; font-size: 5mm; text-transform: uppercase; font-weight: 500; "
>
{{
detail
.
inTime
|
parseTime
(
'
{y
}
-{m
}
-{d
}
'
)
}}
<
/p
>
<
/div
>
<
div
style
=
"
width: 76mm
"
>
<
p
style
=
"
text-align: center
"
>
<
label
style
=
"
font-size: 5mm; font-weight: 600; padding-right: 1mm
"
>
E
&
amp
;
C
<
/labe
l
>
{{
detail
.
foot
}}
<
/p
>
<
/div
>
<
/div
>
<
div
style
=
"
text-align:center;
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
print
"
>
确定打印
<
/el-button
>
<
/div
>
<
/template
>
<
/el-dialog
>
<
/template
>
<
script
>
import
{
printTag
}
from
'
@/api/ecw/order
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
lodop
from
'
@/utils/lodop
'
/* var LODOP;
const init = function(){
console.log('打印控件已准备好')
LODOP = getLodop();
}
if(!window.getLodop){
var hm = document.createElement("script");
hm.src = "/static/LodopFuncs.js";
hm.onload = function(){
init()
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
}
else init() */
export
default
{
filters
:
{
parseTime
}
,
props
:{
orderId
:
[
String
,
Number
]
}
,
data
(){
return
{
show
:
false
,
detail
:
null
,
step
:
'
form
'
,
form
:{
start
:
1
,
end
:
1
}
,
currentNo
:
1
}
}
,
computed
:{
title
(){
let
t
=
'
打印标签
'
if
(
this
.
detail
){
t
+=
'
-
'
+
this
.
detail
.
orderNo
}
return
t
}
}
,
created
(){
this
.
show
=
true
this
.
loadData
()
}
,
methods
:{
loadData
(){
printTag
(
this
.
orderId
).
then
(
res
=>
{
this
.
$set
(
this
,
'
detail
'
,
res
.
data
[
0
])
}
)
}
,
closeDialog
(){
console
.
log
(
'
关闭
'
)
this
.
show
=
false
this
.
$emit
(
'
close
'
);
}
,
showPreview
(){
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
this
.
currentNo
=
this
.
form
.
start
this
.
step
=
'
preview
'
}
)
}
,
print
(){
lodop
().
then
(
LODOP
=>
{
LODOP
.
PRINT_INIT
(
this
.
title
);
LODOP
.
SET_PRINT_STYLE
(
"
FontSize
"
,
18
);
LODOP
.
SET_PRINT_STYLE
(
"
Bold
"
,
1
);
// LODOP.ADD_PRINT_TEXT(50,231,260,39,"打印页面部分内容");
for
(
let
i
=
this
.
form
.
start
;
i
<=
this
.
form
.
end
;
i
++
){
LODOP
.
ADD_PRINT_HTM
(
88
,
200
,
350
,
600
,
document
.
getElementById
(
"
order-print-tag
"
).
innerHTML
);
LODOP
.
PRINT
();
}
this
.
$alert
(
'
已发起打印任务
'
);
// LODOP.PREVIEW(); // 预览
/* LODOP.PRINTA(); // 选择打印机
// 直接打印 */
console
.
log
(
'
打印哦
'
)
}
).
catch
(
err
=>
{
console
.
error
(
'
lodop异常
'
,
err
)
alert
(
'
请检查LODOP打印控件是否安装并启动
'
);
}
)
}
}
}
<
/script>
\ No newline at end of file
src/views/ecw/order/edit.vue
View file @
46fb3eea
...
...
@@ -116,7 +116,7 @@
<el-table-column
label=
"品牌"
width=
"100px"
>
<
template
slot-scope=
"{row}"
>
<dict-selector
v-model=
"row.brand"
:type=
"DICT_TYPE.ECW_IS_BRAND"
formatter=
"bool"
defaultable
@
input=
"calculationPrice(row)"
:disabled=
"!form.lineId"
/>
<dict-selector
v-model=
"row.brand"
:type=
"DICT_TYPE.ECW_IS_BRAND"
defaultable
@
input=
"calculationPrice(row)"
:disabled=
"!form.lineId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"件数"
width=
"90px"
>
...
...
@@ -164,19 +164,22 @@
<el-table-column
label=
"运费"
width=
"200px"
>
<
template
slot-scope=
"{row}"
>
<template
v-if=
"row.fee"
>
<template
v-if=
"row.fee && row.fee.charging == 1"
>
全包价:
{{
row
.
fee
.
freight
}}
{{
currentcyMap
[
row
.
fee
.
freightCurrency
]
}}
/
{{
unitMap
[
row
.
fee
.
freightVolume
]
}}
</
template
>
<
template
v-else-if=
"row.fee"
>
<div>
运费:
{{
row
.
fee
.
seaFreight
}}
{{
currentcyMap
[
row
.
fee
.
seaFreightCurrency
]
}}
/
{{
unitMap
[
row
.
fee
.
seaF
reightVolume
]
}}
运费:
{{
row
.
fee
.
freight
}}
{{
currentcyMap
[
row
.
fee
.
freightCurrency
]
}}
/
{{
unitMap
[
row
.
fee
.
f
reightVolume
]
}}
</div>
<div>
清关费:
{{
row
.
fee
.
clearanceF
reight
}}
{{
currentcyMap
[
row
.
fee
.
clearanceFreightCurrency
]
}}
/
{{
unitMap
[
row
.
fee
.
clearanceFreight
Volume
]
}}
清关费:
{{
row
.
fee
.
clearanceF
ee
}}
{{
currentcyMap
[
row
.
fee
.
clearanceFeeCurrency
]
}}
/
{{
unitMap
[
row
.
fee
.
clearanceFee
Volume
]
}}
</div>
</
template
>
</template>
</el-table-column>
<el-table-column
label=
"是否预付"
width=
"200px"
>
<el-table-column
label=
"是否预付"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
yufu
||
'
未知
'
}}
<dict-tag
v-if=
"row.fee"
:type=
"DICT_TYPE.ECW_PAY_ADVANCE"
:value=
"row.fee.isPayAdvance"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"80px"
fixed=
"right"
>
...
...
@@ -188,7 +191,7 @@
<!--
</el-card>
<el-card class="mt-10"> -->
<div
class=
"card-title"
style=
"padding:20px 0;"
>
费用小
计
</div>
<div
class=
"card-title"
style=
"padding:20px 0;"
>
合
计
</div>
<el-descriptions
:column=
"4"
border
>
<el-descriptions-item
label=
"总件数"
>
{{sum.totalNum || 0}}
...
...
@@ -208,6 +211,60 @@
</el-descriptions>
</el-card>
<el-card
class=
"mt-10"
>
<div
class=
"card-title"
slot=
"header"
>
预计费用
</div>
<el-descriptions
:column=
"5"
border
>
<el-descriptions-item
label=
"保价费"
>
{{fee.insuranceFee || 0}} 人民币
</el-descriptions-item>
<el-descriptions-item
label=
"总运费"
>
<div>
{{fee.seaNGN || 0}}奈拉
</div>
<div>
{{fee.seaRMB || 0}}人民币
</div>
<div>
{{fee.seaUSD || 0}}美元
</div>
</el-descriptions-item>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-descriptions-item
label=
"总清关费"
>
<div>
{{fee.clearanceNGN || 0}}奈拉
</div>
<div>
{{fee.clearanceRMB || 0}}人民币
</div>
<div>
{{fee.clearanceUSD || 0}}美元
</div>
</el-descriptions-item>
<el-descriptions-item
label=
"其他费用"
>
<!--TODO 缺少其他费用字段-->
<el-input
v-model=
"form.collectionProxy"
placeholder=
""
style=
"width:200px"
></el-input>
<selector
v-model=
"form.collectionProxyCurrency"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
</el-descriptions-item>
<el-descriptions-item
label=
"原价"
:span=
"2"
>
<!--TODO 缺少字段-->
<div>
{{fee.clearanceNGN || 0}}奈拉
</div>
<div>
{{fee.clearanceRMB || 0}}人民币
</div>
<div>
{{fee.clearanceUSD || 0}}美元
</div>
</el-descriptions-item>
</el-descriptions>
<div
class=
"card-title"
style=
"padding:20px 0;"
>
优惠信息
</div>
<el-row
v-for=
"(item, index) in getDictDatas(DICT_TYPE.ECW_COUPON_TYPE)"
:key=
"item.value"
>
<el-col
:span=
"2"
>
{{index+1}}.{{item.label}}
</el-col>
<el-col
:span=
"4"
>
<el-select
placeholder=
""
>
</el-select>
</el-col>
<el-col
:span=
"2"
>
-10美元
</el-col>
<el-col
:span=
"5"
>
有效期:永久有效
</el-col>
</el-row>
<el-descriptions
:column=
"1"
border
>
<el-descriptions-item
label=
"优惠合计"
>
1233.1美元
</el-descriptions-item>
<el-descriptions-item
label=
"预计费用"
>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card
class=
"mt-10"
>
<div
class=
"card-title"
slot=
"header"
>
通用
</div>
...
...
@@ -332,11 +389,10 @@ import Selector from '@/components/Selector'
import
CustomerContactSelector
from
'
@/components/CustomerContactSelector
'
import
{
openedRouterList
as
getOpenedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
getDictData
}
from
'
@/utils/dict
'
import
{
getDictData
,
getDictDatas
}
from
'
@/utils/dict
'
import
Fee
from
'
@/components/Fee
'
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
import
{
getDictDatas
}
from
'
@/utils/dict
'
;
import
{
getCustomer
}
from
'
@/api/ecw/customer
'
;
import
{
getListTree
}
from
"
@/api/ecw/region
"
;
import
AreaSelector
from
'
@/components/AreaSelector
'
...
...
@@ -391,6 +447,9 @@ export default {
getDictData
(){
return
(
type
,
value
)
=>
getDictData
(
type
,
value
)
||
{}
},
getDictDatas
(){
return
getDictDatas
},
// 根据线路id显示线路名称
getRouterNameById
(){
...
...
@@ -460,6 +519,9 @@ export default {
// 收货联系人发生变化获取收货客户
consigneeContact
(){
this
.
getConsignee
()
},
productList
(){
console
.
log
(
'
计算运费
'
)
}
},
created
()
{
...
...
@@ -533,61 +595,13 @@ export default {
this
.
consignee
=
res
.
data
})
},
/* onTransportChange(row, val){
this.this.calculationPrice(row)
if(this.getDictData(this.DICT_TYPE.ECW_TRANSPORT_TYPE, val).cssClass != 'channel') row.channelId = null
this.updateEnabledTransports()
},
onLineChange(row){
this.getProductFee(row)
this.updateEnabledTransports()
},
onChannelChange(row){
this.getProductFee(row)
}, */
onProductAttrChange
(
row
,
attr
){
console
.
log
(
attr
)
this
.
calculationPrice
(
row
)
/* // 需要强制刷新,否则勾选框不更新
this.$forceUpdate() */
},
// 更新运输方式
/* updateEnabledTransports(){
let enabled = {}
this.productList.forEach(prod => {
if(prod.transportId){
if(!enabled[prod.transportId]){
enabled[prod.transportId] = {
// transportId: prod.transportId,
lineIdSet: new Set(),
channelIdSet: new Set(),
routers:[]
}
}
if(prod.lineId){
enabled[prod.transportId].lineIdSet.add(prod.lineId)
}
if(prod.channelId){
enabled[prod.transportId].channelIdSet.add(prod.channelId)
}
if(prod.lineId && enabled[prod.transportId].routers.findIndex(item => { item.lineId == prod.lineId && item.channelId == prod.channelId }) < 0){
enabled[prod.transportId].routers.push({
lineId: prod.lineId,
channelId: prod.channelId
})
}
}
})
console.log(JSON.stringify(enabled))
let enabledTransportIds = Object.keys(enabled).map(item => +item)
this.transportList.forEach(transport => {
this.$set(transport, '_enabled', enabledTransportIds.indexOf(transport.transportId) > -1 && enabled[transport.transportId].routers.length)
if(transport._enabled){
Object.assign(transport, enabled[transport.transportId])
}
})
}, */
addProduct
(
data
){
this
.
productList
.
push
(
data
||
{
prodAttrArr
:[]})
},
...
...
@@ -604,7 +618,7 @@ export default {
channelId
:
this
.
form
.
channelId
,
prodConditionParamList
:
[
row
]
}).
then
(
res
=>
{
this
.
$set
(
row
,
'
fee
'
,
res
.
data
[
0
]
||
{})
this
.
$set
(
row
,
'
fee
'
,
res
.
data
.
prodCostDtoList
[
0
]
||
{})
})
},
// 获取路线
...
...
src/views/ecw/order/index.vue
View file @
46fb3eea
...
...
@@ -147,6 +147,8 @@
v-hasPermi=
"['ecw:order:update']"
>
退仓
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:order:delete']"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"printTagOrderId=scope.row.orderId"
v-hasPermi=
"['ecw:order:delete']"
>
打印标签
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -185,6 +187,11 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- <el-dialog :title="'打印标签'" visible.sync="showPrintTag">
</el-dialog> -->
<print-tag
v-if=
"printTagOrderId !== null"
:order-id=
"printTagOrderId"
@
close=
"printTagOrderId=null"
/>
</div>
</template>
...
...
@@ -196,10 +203,11 @@ import CustomerSelector from '@/components/CustomerSelector'
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
createOrder
,
updateOrder
,
deleteOrder
,
getOrder
,
getOrderPage
,
exportOrderExcel
}
from
"
@/api/ecw/order
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
PrintTag
from
'
./components/PrintTag
'
export
default
{
name
:
"
Order
"
,
components
:
{
CustomerSelector
,
ProductSelector
,
Selector
CustomerSelector
,
ProductSelector
,
Selector
,
PrintTag
},
filters
:
{
cargoControlStatusFilter
(
e
,
cargoControlStatusList
)
{
...
...
@@ -252,60 +260,7 @@ export default {
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
orderNo
:
null
,
number
:
null
,
tidanNo
:
null
,
parentNumber
:
null
,
oldNumbers
:
null
,
transportId
:
null
,
lineId
:
null
,
channelId
:
null
,
orderType
:
null
,
userId
:
null
,
marks
:
null
,
productRecord
:
null
,
isCargoControl
:
null
,
cargoControlStatus
:
null
,
customsType
:
null
,
upFile
:
null
,
payType
:
null
,
status
:
null
,
isDel
:
null
,
collectionProxy
:
null
,
isCollection
:
null
,
zhongPao
:
null
,
wVolume
:
null
,
vWeight
:
null
,
weightUnit
:
null
,
warehouseType
:
null
,
countryAbbreviation
:
null
,
countryCode
:
null
,
sendsms
:
null
,
commissionId
:
null
,
documentsFile
:
null
,
remarks
:
null
,
isTodoOrder
:
null
,
advanceType
:
null
,
transFee
:
null
,
transCurrency
:
null
,
plateFee
:
null
,
boxFee
:
null
,
todoDetail
:
null
,
advanceWho
:
null
,
toDepartureId
:
null
,
sumNum
:
null
,
sumVolume
:
null
,
sumWeight
:
null
,
weightRatio
:
null
,
customerId
:
null
,
wareId
:
null
,
areaId
:
null
,
locationId
:
null
,
locationName
:
null
,
sumValue
:
null
,
valuationFee
:
null
,
cost
:
null
,
pageSize
:
10
},
// 表单参数
form
:
{},
...
...
@@ -327,6 +282,8 @@ export default {
denominator
:
''
,
//重货比分母
dateFilterType
:
''
,
//日期筛选类别
dateFilter
:
[],
//筛选日期
printTagOrderId
:
null
,
// 显示打印标签的订单号
};
},
computed
:
{
...
...
@@ -343,6 +300,9 @@ export default {
getTradeCityList
().
then
(
res
=>
this
.
tradeCityList
=
res
.
data
)
},
methods
:
{
printTag
(
item
){
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
...
...
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