Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
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
罗超
SuperMan
Commits
37cad693
Commit
37cad693
authored
Feb 28, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
行程下载修改
parent
13489e17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
68 deletions
+72
-68
confirmationOrderDownLoad.vue
src/components/confirmationOrderDownLoad.vue
+72
-68
No files found.
src/components/confirmationOrderDownLoad.vue
View file @
37cad693
...
...
@@ -11,7 +11,8 @@
<input
type=
"button"
style=
"width: auto !important;"
class=
"travelControlTripBtn"
value=
"下载手机版WORD"
@
click=
"gernalFeature(0)"
/>
<input
type=
"button"
style=
"width: auto !important;"
class=
"travelControlTripBtn"
value=
"下载电脑版WORD"
@
click=
"gernalFeature(1)"
/>
<a
class=
"travelControlTripBtn"
v-if=
"priceList!=null&& priceList[0]!=null && priceList[0].wordPath!=''"
style=
"display:inline-block;text-decoration:none;
width:135px;text-align:center;line-height:30px;font-size:13px;position:relative;top:2px;"
:href=
"domainManager().ViittoFileUrl+priceList[0].wordPath"
>
下载WORD行程
</a>
width:135px;text-align:center;line-height:30px;font-size:13px;position:relative;top:2px;"
:href=
"domainManager().ViittoFileUrl+priceList[0].wordPath"
>
下载WORD行程
</a>
<!-- ToWord(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游') -->
<!--&&isopOperation HK 注释 可以让销售修改基本信息-->
<input
type=
"button"
v-if=
"orderId>0"
class=
"travelControlTripBtn"
value=
"修改信息"
@
click=
"editMsgShow=true"
/>
...
...
@@ -465,7 +466,7 @@
</div>
</div>
</div>
<el-dialog
title=
"修改信息"
custom-class=
"confirmOrder"
:visible
.
sync=
"editMsgShow"
center
>
<el-dialog
title=
"修改信息"
custom-class=
"confirmOrder"
:visible
.
sync=
"editMsgShow"
center
>
<el-form
:model=
"editForm"
label-width=
"100px"
>
<p
class=
"edit_form_box_tit"
>
集合地点
&
联系人
</p>
<div
class=
"edit_form_box"
>
...
...
@@ -539,12 +540,11 @@
circle
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
v-if=
"index!=0"
style=
"margin-left:0"
effect=
"dark"
content=
"上移"
placement=
"top-start"
>
<el-button
type=
"danger"
icon=
"iconfont icon-shangyi"
@
click=
"MoveItem(priceFlight,index,0)"
circle
></el-button>
<el-button
type=
"danger"
icon=
"iconfont icon-shangyi"
@
click=
"MoveItem(priceFlight,index,0)"
circle
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
v-if=
"index!=editForm.travelOrderFlightList.length-1"
style=
"margin-left:0"
effect=
"dark"
content=
"下移"
placement=
"top-start"
>
<el-button
type=
"danger"
icon=
"iconfont icon-xiayi1"
@
click=
"MoveItem(priceFlight,index,1)"
circle
></el-button>
<el-tooltip
class=
"item"
v-if=
"index!=editForm.travelOrderFlightList.length-1"
style=
"margin-left:0"
effect=
"dark"
content=
"下移"
placement=
"top-start"
>
<el-button
type=
"danger"
icon=
"iconfont icon-xiayi1"
@
click=
"MoveItem(priceFlight,index,1)"
circle
></el-button>
</el-tooltip>
</td>
</tr>
...
...
@@ -645,48 +645,50 @@
},
2000
)
},
methods
:
{
gernalFeature
(
isPc
){
gernalFeature
(
isPc
)
{
this
.
pdfLoading
=
true
;
let
tcid
=
this
.
$route
.
query
.
tcid
;
let
UploadUrl
=
this
.
domainManager
().
UploadUrl
let
_this
=
this
if
(
this
.
showType
>=
4
)
{
// 判断是否为行程特色
$
.
ajax
({
//调用是否已经存在文件夹接口判断是否进行上传图片操作
if
(
this
.
showType
>=
4
)
{
// 判断是否为行程特色
$
.
ajax
({
//调用是否已经存在文件夹接口判断是否进行上传图片操作
url
:
UploadUrl
+
'/Upload/GetImage?filePath=Feature/'
+
tcid
,
type
:
"POST"
,
datatype
:
"jsonP"
,
datatype
:
"jsonP"
,
success
:
function
(
data
)
{
let
msg
=
JSON
.
parse
(
data
)
if
(
msg
.
ResultCode
)
{
// 已经存在文件 直接调用下载
_this
.
ToWord
(
_this
.
orderMsg
.
startDate
+
_this
.
orderMsg
.
lineteamName
+
_this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
}
else
if
(
document
.
querySelector
(
"#gernalCanvas"
)){
// 不存在图片保存图片后下载
if
(
msg
.
ResultCode
)
{
// 已经存在文件 直接调用下载
_this
.
ToWord
(
_this
.
orderMsg
.
startDate
+
_this
.
orderMsg
.
lineteamName
+
_this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
}
else
if
(
document
.
querySelector
(
"#gernalCanvas"
))
{
// 不存在图片保存图片后下载
if
(
document
.
querySelector
(
"#gernalCanvas"
).
querySelectorAll
(
'img'
).
length
===
0
)
{
_this
.
ToWord
(
_this
.
orderMsg
.
startDate
+
_this
.
orderMsg
.
lineteamName
+
_this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
_this
.
ToWord
(
_this
.
orderMsg
.
startDate
+
_this
.
orderMsg
.
lineteamName
+
_this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
return
}
document
.
querySelector
(
"#gernalCanvas"
).
querySelectorAll
(
'img'
).
forEach
(
x
=>
{
let
src
=
x
.
src
src
=
src
.
replace
(
'https:'
,
'http:'
)
if
(
src
.
indexOf
(
'http'
)
!=-
1
)
{
x
.
setAttribute
(
'crossOrigin'
,
'anonymous'
)
src
=
src
.
replace
(
'https:'
,
'http:'
)
if
(
src
.
indexOf
(
'http'
)
!=
-
1
)
{
x
.
setAttribute
(
'crossOrigin'
,
'anonymous'
)
}
x
.
src
=
src
});
let
cName
=
''
if
(
_this
.
showType
==
4
)
{
cName
=
'.feature-box'
}
else
if
(
_this
.
showType
>
4
)
{
cName
=
'.travle_page'
let
cName
=
''
if
(
_this
.
showType
==
4
)
{
cName
=
'.feature-box'
}
else
if
(
_this
.
showType
>
4
)
{
cName
=
'.travle_page'
}
if
(
cName
!=
''
)
{
if
(
cName
!=
''
)
{
let
allNum
=
1
document
.
querySelectorAll
(
cName
).
forEach
((
x
,
index
)
=>
{
html2Canvas
(
x
,{
useCORS
:
true
,
scale
:
0.7
,
backgroundColor
:
'#FFFFFF'
,
html2Canvas
(
x
,
{
useCORS
:
true
,
scale
:
0.7
,
backgroundColor
:
'#FFFFFF'
,
}).
then
((
canvas
)
=>
{
if
(
canvas
)
{
if
(
canvas
)
{
var
context
=
canvas
.
getContext
(
'2d'
)
context
.
mozImageSmoothingEnabled
=
false
context
.
webkitImageSmoothingEnabled
=
false
...
...
@@ -695,39 +697,42 @@
var
image
=
new
Image
();
image
.
src
=
canvas
.
toDataURL
(
"image/png"
);
$
.
ajax
({
url
:
UploadUrl
+
'/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Feature/'
+
tcid
,
type
:
"POST"
,
data
:
{
myfile
:
image
.
src
,
fileIndex
:
index
},
datatype
:
"jsonP"
,
success
:
function
(
data
)
{
//console.log("上传成功",data);
},
error
:
function
()
{
//console.log("上传失败");
}
url
:
UploadUrl
+
'/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Feature/'
+
tcid
,
type
:
"POST"
,
data
:
{
myfile
:
image
.
src
,
fileIndex
:
index
},
datatype
:
"jsonP"
,
success
:
function
(
data
)
{
//console.log("上传成功",data);
},
error
:
function
()
{
//console.log("上传失败");
}
});
if
(
allNum
!==
document
.
querySelectorAll
(
cName
).
length
)
{
if
(
allNum
!==
document
.
querySelectorAll
(
cName
).
length
)
{
allNum
+=
1
}
else
{
_this
.
ToWord
(
_this
.
orderMsg
.
startDate
+
_this
.
orderMsg
.
lineteamName
+
_this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
_this
.
ToWord
(
_this
.
orderMsg
.
startDate
+
_this
.
orderMsg
.
lineteamName
+
_this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
}
}
});
});
}
}
else
{
_this
.
ToWord
(
_this
.
orderMsg
.
startDate
+
_this
.
orderMsg
.
lineteamName
+
_this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
_this
.
ToWord
(
_this
.
orderMsg
.
startDate
+
_this
.
orderMsg
.
lineteamName
+
_this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
}
},
error
:
function
()
{
// console.log("上传失败");
// console.log("上传失败");
}
});
}
else
{
this
.
ToWord
(
this
.
orderMsg
.
startDate
+
this
.
orderMsg
.
lineteamName
+
this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
this
.
ToWord
(
this
.
orderMsg
.
startDate
+
this
.
orderMsg
.
lineteamName
+
this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
}
},
//保存基础数据
...
...
@@ -907,51 +912,50 @@
console
.
log
(
err
)
})
},
ToWord
:
function
(
title
,
isPc
)
{
ToWord
:
function
(
title
,
isPc
)
{
let
msg
=
{
configId
:
this
.
$route
.
query
.
configId
,
cityId
:
this
.
$route
.
query
.
cityId
,
tcid
:
this
.
$route
.
query
.
tcid
,
orderId
:
this
.
$route
.
query
.
orderId
,
FileName
:
title
,
FileName
:
title
,
//是否显示基础信息
isShowBase
:
this
.
vshowA
?
1
:
0
,
isShowBase
:
this
.
vshowA
?
1
:
0
,
//是否显示航班
isShowFlight
:
this
.
vshowB
?
1
:
0
,
isShowFlight
:
this
.
vshowB
?
1
:
0
,
//是否显示行程特色
isShowFeature
:
this
.
vshowC
?
1
:
0
,
isShowFeature
:
this
.
vshowC
?
1
:
0
,
//自费、费用包含、费用不含
isShowFee
:
this
.
vshowE
?
1
:
0
,
isShowFee
:
this
.
vshowE
?
1
:
0
,
//购物说明,购物安排
isShowShop
:
this
.
vshowF
?
1
:
0
,
isShowShop
:
this
.
vshowF
?
1
:
0
,
//重要提示、温馨提示 [订单须知]
isShowTip
:
this
.
vshowG
?
1
:
0
,
isShowTip
:
this
.
vshowG
?
1
:
0
,
//是否显示同行备注
isShowB2B
:
this
.
vshowI
?
1
:
0
,
isShowB2B
:
this
.
vshowI
?
1
:
0
,
//是否显示行程
isShowTrip
:
this
.
vshowD
?
1
:
0
,
isShowTrip
:
this
.
vshowD
?
1
:
0
,
//是否显示标题
isShowTitle
:
this
.
vshowL
?
1
:
0
,
isShowTitle
:
this
.
vshowL
?
1
:
0
,
//是否显示旅客名单
isShowGuest
:
this
.
vshowM
?
1
:
0
,
isShowGuest
:
this
.
vshowM
?
1
:
0
,
//是否显示紧急联系人
isShowMan
:
this
.
vshowLLR
?
1
:
0
,
isShowMan
:
this
.
vshowLLR
?
1
:
0
,
//是否显示团号
isShowTCNUM
:
this
.
vshowTCNUM
?
1
:
0
,
isShowTCNUM
:
this
.
vshowTCNUM
?
1
:
0
,
//是否显示行程图片
isShowTripImage
:
this
.
vshowK
?
1
:
0
,
isShowTripImage
:
this
.
vshowK
?
1
:
0
,
//是否显示签证信息
isShowVisa
:
this
.
vshowH
?
1
:
0
,
isShowVisa
:
this
.
vshowH
?
1
:
0
,
//isPc是否PC下载
isPc
:
isPc
,
//模板参数
templateId
:
this
.
showType
,
};
this
.
GetLocalFile
(
"DownLoadTripWord"
,
msg
,
title
+
".doc"
,
res
=>
{
this
.
pdfLoading
=
false
this
.
GetLocalFile
(
"DownLoadTripWord"
,
msg
,
title
+
".doc"
,
res
=>
{
this
.
pdfLoading
=
false
});
},
DateDiff
(
sDate1
,
sDate2
)
{
//sDate1和sDate2是2002-12-18格式
var
aDate
,
oDate1
,
oDate2
,
iDays
...
...
@@ -995,7 +999,7 @@
this
.
SourceData
.
gatheringAddress
=
this
.
orderMsg
.
gatheringAddress
;
if
(
data
.
priceList
!=
null
&&
data
.
priceList
.
length
>
0
)
{
var
array
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
priceList
[
0
].
priceFlight
));
this
.
SourceData
.
travelOrderFlightList
=
[];
this
.
SourceData
.
travelOrderFlightList
=
[];
array
.
forEach
(
fItem
=>
{
this
.
SourceData
.
travelOrderFlightList
.
push
({
airLineID
:
fItem
.
airLineID
,
...
...
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