Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Athena
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
华国豪
Athena
Commits
8bf277fe
Commit
8bf277fe
authored
Mar 01, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
‘修改产品详情@新增word下载方法’
parent
4bcea807
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
23 deletions
+107
-23
confirmationOrderDownLoad.vue
src/components/global/confirmationOrderDownLoad.vue
+18
-18
head.vue
src/components/global/head.vue
+1
-1
calendar.vue
src/components/mall/calendar.vue
+0
-1
detailTwo.vue
src/components/mall/detailTwo.vue
+47
-1
index.js
src/plugins/index.js
+41
-2
No files found.
src/components/global/confirmationOrderDownLoad.vue
View file @
8bf277fe
...
...
@@ -1925,6 +1925,13 @@
handler
:
function
(
val
,
oldVal
)
{
},
deep
:
true
},
"sonData.currentPriceInfo.startDate"
:{
handler
:
function
(
val
,
oldVal
)
{
// console.log("sonData.currentPriceInfo.startDate", val)
this
.
init
()
},
deep
:
true
}
},
data
()
{
...
...
@@ -1952,7 +1959,7 @@
travelOrderFlightList
:
[]
},
editMsgShow
:
false
,
pdfLoading
:
tru
e
,
pdfLoading
:
fals
e
,
vshowTCNUM
:
this
.
TripLayer
.
vshowTCNUM
===
undefined
?
false
:
this
.
TripLayer
.
vshowTCNUM
===
'true'
,
list
:
[],
tripList
:
[],
...
...
@@ -1966,23 +1973,13 @@
orderTripdiff
:
{},
title
:
''
,
isDirect
:
1
,
//是否是直采 0:否,1:是
blockShow
:
false
,
}
},
mounted
()
{
this
.
orderId
=
this
.
$route
.
query
.
orderId
;
this
.
isopOperation
=
this
.
$route
.
query
.
isopOperation
;
this
.
init
();
this
.
initAirlines
()
setTimeout
(()
=>
{
this
.
appendParent
()
},
2000
)
this
.
$nextTick
(
function
()
{
this
.
pdfLoading
=
false
;
let
imgs
=
document
.
getElementsByTagName
(
'img'
);
for
(
let
i
=
0
;
i
<
imgs
.
length
;
i
++
)
{
document
.
getElementsByTagName
(
'img'
)[
i
].
removeAttribute
(
'crossOrigin'
)
}
})
},
methods
:
{
//保存基础数据
...
...
@@ -2104,7 +2101,7 @@
},
setDate
:
function
(
j
)
{
let
stDate
=
this
.
priceList
[
0
]
.
startDate
let
stDate
=
this
.
sonData
.
currentPriceInfo
.
startDate
if
(
j
===
0
)
{
return
stDate
}
else
{
...
...
@@ -2162,7 +2159,7 @@
}
this
.
pdfLoading
=
false
}).
catch
(
err
=>
{
console
.
log
(
err
)
//
console.log(err)
})
},
DateDiff
(
sDate1
,
sDate2
)
{
//sDate1和sDate2是2002-12-18格式
...
...
@@ -2176,7 +2173,7 @@
},
init
()
{
if
(
true
)
{
let
data
=
this
.
sonData
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
sonData
))
this
.
orderTripdiff
=
data
.
currentPriceInfo
.
priceFlight
;
if
(
this
.
orderTripdiff
&&
this
.
orderTripdiff
.
flightInfoJson
)
{
this
.
orderTripdiff
.
travelOrderFlightList
=
JSON
.
parse
(
this
.
orderTripdiff
.
flightInfoJson
);
...
...
@@ -2238,10 +2235,12 @@
document
.
title
=
this
.
title
;
//初始化行程
this
.
initTrip
(
data
);
this
.
initAirlines
()
}
},
//初始化行程
initTrip
(
data
)
{
this
.
blockShow
=
false
this
.
tripList
=
data
.
dayList
;
this
.
feature
=
data
.
feature
this
.
showType
=
this
.
feature
.
featureType
;
...
...
@@ -2462,9 +2461,10 @@
}
}
x
.
islast
=
(
j
+
1
)
==
this
.
tripList
.
length
x
.
dateTime
=
this
.
setDate
(
j
)
this
.
$set
(
this
.
tripList
,
j
,
x
)
x
.
dateTime
=
this
.
setDate
(
j
);
})
// console.log("this.tripList",this.tripList)
},
//上移下移(IsUp:0上移,1下移)
...
...
@@ -2596,8 +2596,8 @@
.travelControlTrip
{
margin
:
0px
!important
;
padding
:
0px
!important
;
position
:
fixed
!important
;
left
:
-999px
!important
;
position
:
fixed
!important
;
left
:
-999px
!important
;
}
@media
print
{
...
...
src/components/global/head.vue
View file @
8bf277fe
...
...
@@ -48,7 +48,7 @@
<!-- <el-menu-item index="2-3">单团</el-menu-item>
<el-menu-item index="2-4">私人订制</el-menu-item> -->
</el-submenu>
<
el-menu-item
index=
"3"
><a
href=
"javascript:void(0);"
>
机票
</a></el-menu-item
>
<
!-- <el-menu-item index="3"><a href="javascript:void(0);">机票</a></el-menu-item> --
>
<!-- <el-menu-item index="5"><a href="javascript:void(0);">机票</a></el-menu-item>
<el-menu-item index="2"><a href="javascript:void(0);">酒店</a></el-menu-item>
<el-menu-item index="4"><a href="javascript:void(0);">餐厅</a></el-menu-item>
...
...
src/components/mall/calendar.vue
View file @
8bf277fe
...
...
@@ -147,7 +147,6 @@ export default {
for
(
var
i
in
this
.
priceData
)
{
var
price
=
this
.
priceData
[
i
];
var
dayIndex
=
price
.
dateStr
.
substring
(
price
.
dateStr
.
length
-
2
,
price
.
dateStr
.
length
);
console
.
log
(
dayIndex
)
var
dayDict
=
daysData
[
Number
(
dayIndex
)
-
1
];
dayDict
.
price
=
price
.
price
;
if
(
dayIndex
<
strDate
&&
strMonth
==
currentMonth
){
...
...
src/components/mall/detailTwo.vue
View file @
8bf277fe
...
...
@@ -786,6 +786,53 @@ export default {
this
.
$refs
.
confirmationOrderDownLoad
.
toPDF
(
orderMsg
.
startDate
+
orderMsg
.
lineteamName
+
orderMsg
.
dayNum
+
'日游'
);
}
},
ToWord
:
function
()
{
this
.
loadingDataList
=
true
let
title
=
this
.
dataList
.
currentPriceInfo
.
startDate
+
this
.
dataList
.
ltName
+
this
.
dataList
.
dayNum
+
'日游'
let
msg
=
{
configId
:
this
.
dayList
.
id
,
cityId
:
this
.
city
,
tcid
:
this
.
tcid
,
orderId
:
0
,
FileName
:
title
,
//是否显示基础信息
isShowBase
:
1
,
//是否显示航班
isShowFlight
:
1
,
//是否显示行程特色
isShowFeature
:
1
,
//自费、费用包含、费用不含
isShowFee
:
1
,
//购物说明,购物安排
isShowShop
:
1
,
//重要提示、温馨提示 [订单须知]
isShowTip
:
1
,
//是否显示同行备注
isShowB2B
:
1
,
//是否显示行程
isShowTrip
:
1
,
//是否显示标题
isShowTitle
:
1
,
//是否显示旅客名单
isShowGuest
:
0
,
//是否显示紧急联系人
isShowMan
:
0
,
//是否显示团号
isShowTCNUM
:
0
,
//是否显示行程图片
isShowTripImage
:
1
,
//是否显示签证信息
isShowVisa
:
1
,
//isPc是否PC下载
isPc
:
1
,
//模板参数
templateId
:
this
.
showType
,
};
this
.
GetLocalFile
(
"DownLoadTripWord"
,
msg
,
title
+
".doc"
,
res
=>
{
this
.
loadingDataList
=
false
});
},
donwLoad
(){
this
.
loadNone
=
true
;
this
.
loadingDataList
=
true
;
...
...
@@ -922,7 +969,6 @@ export default {
let
dateList
=
[];
if
(
list
&&
list
.
length
>
0
){
list
.
forEach
((
x
,
index
)
=>
{
console
.
log
(
list
)
if
(
x
.
tcState
==
3
){
let
msg
=
{
dateStr
:
x
.
startDate
,
...
...
src/plugins/index.js
View file @
8bf277fe
...
...
@@ -12,9 +12,9 @@ export default {
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
// var domainUrl = "http://test_reborn.oytour.com";//主域名
//
var domainUrl = "http://reborn.oytour.com"; //主域名
var
domainUrl
=
"http://reborn.oytour.com"
;
//主域名
// var domainUrl = "http://192.168.2.214:8082"//主域名
let
domainUrl
=
"http://192.168.2.16:8083"
;
//刘东主域名
//
let domainUrl = "http://192.168.2.16:8083"; //刘东主域名
if
(
this
.
isOnline
())
{
if
(
window
.
location
.
host
.
indexOf
(
'viitto.com'
)
!=-
1
)
domainUrl
=
"http://test.viitto.com"
...
...
@@ -27,9 +27,48 @@ export default {
//常用提交数据URL
PostUrl
:
domainUrl
+
"/api/common/post"
,
javaUrl
:
"http://192.168.2.16:9000"
,
LocalFileStreamDownLoadUrl
:
domainUrl
+
"/api/file/GetFileFromWebApi"
,
};
return
obj
;
},
Vue
.
prototype
.
GetLocalFile
=
function
(
cmd
,
msg
,
fileName
,
successCall
)
{
var
apiurl
=
this
.
domainManager
().
LocalFileStreamDownLoadUrl
;
var
timestamp
=
(
new
Date
()).
valueOf
();
if
(
!
localStorage
.
userInfo
&&
localStorage
.
userInfo
!=
""
&&
this
.
$route
.
path
.
toLowerCase
()
!=
"/login"
)
{
this
.
$router
.
push
({
path
:
'/login'
})
}
var
token
=
""
;
var
key
=
""
;
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
token
;
key
=
this
.
getLocalStorage
().
SecretKey
;
}
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
postData
=
{
"msg"
:
msg
,
"cmd"
:
cmd
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"sign"
:
md5Str
}
this
.
$http
.
post
(
apiurl
,
postData
,
{
responseType
:
'arraybuffer'
}).
then
((
res
)
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
"application/vnd.ms-excel"
})
let
url
=
URL
.
createObjectURL
(
blob
);
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
},
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
this
.
$message
({
...
...
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