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
4fd54bd1
Commit
4fd54bd1
authored
Sep 23, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
7d3c7788
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
134 additions
and
175 deletions
+134
-175
QuotationNewPrice.vue
...ts/TravelManager/TravelNewQuotation/QuotationNewPrice.vue
+134
-175
No files found.
src/components/TravelManager/TravelNewQuotation/QuotationNewPrice.vue
View file @
4fd54bd1
<
template
>
<div
v-if=
"isShow"
class=
"DirectQuotation clearfix"
>
<DirectQuotation
ref=
"QuotationPrice"
:postConfig=
"postData"
:dayCostPrice=
"dayCostPriceList"
></DirectQuotation>
<div
v-if=
"isShow"
class=
"DirectQuotation clearfix"
>
<DirectQuotation
ref=
"QuotationPrice"
:postConfig=
"postData"
:dayCostPrice=
"dayCostPriceList"
:otherPrice=
"otherPrice"
></DirectQuotation>
<div
class=
"btnFixedDiv"
>
<div
class=
"toTop"
@
click=
"backTop"
>
<i
class=
"iconfont icon-huidaodingbu"
></i>
</div>
<div
class=
"DTSaveBtn"
:class=
"
{'disClick':!isSubmit}" @click="
submitForm
(2)">提交
</div>
<div
class=
"DTSaveBtn"
:class=
"
{'disClick':!isSubmit}" @click="
SaveData
(2)">提交
</div>
<div
class=
"DTSaveBtn"
@
click=
"copyQuotationData"
style=
"display:none;"
>
复制
</div>
<div
class=
"DTSaveBtn caogao"
:class=
"
{'disClick':!isSubmit}" @click="
submitForm
(1)">
<div
class=
"DTSaveBtn caogao"
:class=
"
{'disClick':!isSubmit}" @click="
SaveData
(1)">
<span>
保存
</span>
<span>
草稿
</span>
</div>
...
...
@@ -15,185 +16,143 @@
</div>
</
template
>
<
script
>
import
DirectQuotation
from
"../TravelNewQuotation/DirectNewQuotation"
;
import
DirectQuotation
from
"../TravelNewQuotation/DirectNewQuotation"
;
export
default
{
data
()
{
return
{
//基本配置
postData
:
{
ID
:
0
,
StartCityId
:
0
,
LineId
:
0
,
LineteamId
:
0
,
Title
:
""
,
IsOrder
:
0
,
IsSubstitution
:
0
,
IsB2B
:
0
,
IsB2C
:
0
,
FSeat
:
""
,
CSeat
:
""
,
YSeat
:
""
,
//最低成团人数
LowNum
:
""
,
//OP备注
OpRemark
:
""
,
//产品经理备注
ProductRecommend
:
""
,
IsDirect
:
0
,
//是否直采(0-否-1-是)【全部默认非直采】
PriceIsDirect
:
1
,
//是否直采报价(1-否-2-是)【全部默认非直采】
PDFAlias
:
""
,
//pdf别名
ImgCover
:
""
,
//封面图
DayNum
:
""
,
//天数
NightNum
:
""
,
//晚数
StartCityId
:
0
,
ReturnArriveCityId
:
0
,
//返回抵达城市
},
dayCostPriceList
:[],
//报价列表
};
},
methods
:
{
//表单提交
submitForm
(
type
)
{
this
.
$refs
[
"QuotationPrice"
].
submitForm
(
type
);
},
changeDirect
(
value
)
{
this
.
priceIsDirect
=
value
;
this
.
postData
.
PriceIsDirect
=
value
;
this
.
isSubmit
=
true
;
if
(
this
.
postData
.
IsDirect
==
1
)
{
this
.
changeTeamLocalOfferValue
();
}
},
updateSubmitState
(
state
)
{
this
.
isSubmit
=
state
;
},
changeTeamLocalOfferValue
()
{
this
.
postData
.
PriceList
.
forEach
(
y
=>
{
let
localOfferList
=
JSON
.
parse
(
JSON
.
stringify
(
y
.
OfferPrice
.
FullLocalOfferList
)
);
y
.
OfferPrice
.
LocalOfferList
=
localOfferList
;
});
},
//回到顶部
backTop
()
{
var
timer
=
setInterval
(
function
()
{
var
scrollTop
=
document
.
getElementsByClassName
(
"flexParent"
)[
0
]
.
scrollTop
;
var
ispeed
=
Math
.
floor
(
-
scrollTop
/
6
);
if
(
scrollTop
==
0
)
{
clearInterval
(
timer
);
}
document
.
getElementsByClassName
(
"flexParent"
)[
0
].
scrollTop
=
scrollTop
+
ispeed
;
},
30
);
},
//获取行程信息
getConfigDayTrip
(
subConfig
)
{
var
TrafficList
=
[];
var
ScenicList
=
[];
var
HotelList
=
[];
var
DinnerList
=
[];
var
FreedomList
=
[];
var
WarmTipList
=
[];
var
TitleList
=
[];
subConfig
.
DayList
.
forEach
((
item
,
dayIndex
)
=>
{
var
rank
=
1
;
if
(
item
.
dayArray
!=
null
&&
item
.
dayArray
.
length
>
0
)
{
item
.
dayArray
.
forEach
(
subItem
=>
{
subItem
.
childItem
.
Rank
=
rank
;
subItem
.
childItem
.
dayNum
=
item
.
dayNum
;
subItem
.
Type
=
subItem
.
Type
.
toString
();
switch
(
subItem
.
Type
)
{
case
this
.
$tripUtils
.
TypeKey
.
traffic
:
TrafficList
.
push
(
subItem
.
childItem
);
break
;
case
this
.
$tripUtils
.
TypeKey
.
scenic
:
ScenicList
.
push
(
subItem
.
childItem
);
break
;
case
this
.
$tripUtils
.
TypeKey
.
hotel
:
HotelList
.
push
(
subItem
.
childItem
);
break
;
case
this
.
$tripUtils
.
TypeKey
.
dinner
:
DinnerList
.
push
(
subItem
.
childItem
);
break
;
case
this
.
$tripUtils
.
TypeKey
.
freedom
:
FreedomList
.
push
(
subItem
.
childItem
);
break
;
case
this
.
$tripUtils
.
TypeKey
.
warmtip
:
WarmTipList
.
push
(
subItem
.
childItem
);
break
;
case
this
.
$tripUtils
.
TypeKey
.
title
:
TitleList
.
push
(
subItem
.
childItem
);
break
;
}
rank
++
;
});
}
});
var
obj
=
{
DinnerList
:
DinnerList
,
FreedomList
:
FreedomList
,
HotelList
:
HotelList
,
ScenicList
:
ScenicList
,
TrafficList
:
TrafficList
,
WarmTipList
:
WarmTipList
,
TitleList
:
TitleList
export
default
{
data
()
{
return
{
//基本配置
postData
:
{
ID
:
0
,
StartCityId
:
0
,
LineId
:
0
,
LineteamId
:
0
,
Title
:
""
,
IsOrder
:
0
,
IsSubstitution
:
0
,
IsB2B
:
0
,
IsB2C
:
0
,
FSeat
:
""
,
CSeat
:
""
,
YSeat
:
""
,
//最低成团人数
LowNum
:
""
,
//OP备注
OpRemark
:
""
,
//产品经理备注
ProductRecommend
:
""
,
IsDirect
:
0
,
//是否直采(0-否-1-是)【全部默认非直采】
PriceIsDirect
:
1
,
//是否直采报价(1-否-2-是)【全部默认非直采】
PDFAlias
:
""
,
//pdf别名
ImgCover
:
""
,
//封面图
DayNum
:
""
,
//天数
NightNum
:
""
,
//晚数
StartCityId
:
0
,
ReturnArriveCityId
:
0
,
//返回抵达城市
},
dayCostPriceList
:
[],
//报价列表
otherPrice
:
{
CostId
:
0
,
//主键编号
ConfigID
:
0
,
//配置编号
OfferId
:
0
,
//报价单编号
InlandAirTicketCurrency
:
0
,
//内陆段机位币种
InlandAirTicketMoney
:
0
,
//内陆段机位金额(每人)
InlandShipTicketCurrency
:
0
,
//内陆段船票币种
InlandShipTicketMoney
:
0
,
//内陆段船票金额(每人)
InlandTrainTicketCurrency
:
0
,
//内陆段火车币种
InlandTrainTicketMoney
:
0
,
//内陆段火车金额(每人)
VisaMoney
:
0
,
//签证费用(每人)
SafeMoney
:
0
,
//保险费用(每人)
LeaderTripMoney
:
0
,
//领队小费
DriverGuideMoney
:
0
,
//司机导游小费
SalesCommissionMoney
:
0
,
//销售提成
OfficeCommissionMoney
:
0
,
//作业处提成
TripMoney
:
0
,
//小费
GuidePeopleMoney
:
0
,
//导游人头费
AirTicketMoeny
:
0
,
//机票成本费用
KBMoney
:
0
,
//KB人头费
AirTicketShareMoney
:
0
,
//机票分摊费用
TicketShareMoney
:
0
,
//门票分摊费用,
SingleRoomShareMoney
:
0
,
//单房差分摊费用
InlandTrafficShareMoney
:
0
,
//内陆段交通分摊费用
OtherShareMoney
:
0
,
//杂费分摊费用
},
};
return
obj
;
},
//复制信息
copyQuotationData
()
{
this
.
$refs
.
QuotationPrice
.
copyInfo
();
},
getPostData
()
{
let
configId
=
this
.
$route
.
query
.
configId
;
if
(
configId
>
0
)
{
let
msg
=
{
ID
:
configId
};
methods
:
{
//表单提交
submitForm
(
type
)
{
this
.
$refs
[
"QuotationPrice"
].
submitForm
(
type
);
},
//保存数据
SaveData
()
{
this
.
apipost
(
"travel_get_GetMyTravelInfo"
,
msg
,
"travel_post_SetConfigOffer_V2"
,
{
config
:
postData
,
dayCostPriceList
:
dayCostPriceList
,
otherPrice
:
otherPrice
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
postData
=
res
.
data
.
data
;
let
postDaysTrip
=
this
.
getConfigDayTrip
(
this
.
postData
);
this
.
postData
.
DinnerList
=
postDaysTrip
.
DinnerList
;
this
.
postData
.
FreedomList
=
postDaysTrip
.
FreedomList
;
this
.
postData
.
HotelList
=
postDaysTrip
.
HotelList
;
this
.
postData
.
ScenicList
=
postDaysTrip
.
ScenicList
;
this
.
postData
.
TrafficList
=
postDaysTrip
.
TrafficList
;
this
.
postData
.
WarmTipList
=
postDaysTrip
.
WarmTipList
;
this
.
postData
.
TitleList
=
postDaysTrip
.
TitleList
;
if
(
this
.
postData
.
OfferList
==
null
)
{
this
.
postData
.
OfferList
=
[];
}
if
(
this
.
postData
.
IsDirect
==
1
)
{
this
.
priceIsDirect
=
2
;
this
.
postData
.
PriceIsDirect
=
2
;
}
else
{
this
.
priceIsDirect
=
1
;
this
.
postData
.
PriceIsDirect
=
1
;
}
this
.
isShow
=
true
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
console
.
log
(
res
.
data
);
if
(
res
.
data
.
resultCode
==
1
)
{}
},
err
=>
{}
);
}
else
{
let
params
=
{
isNoOffer
:
false
};
this
.
$router
.
push
({
name
:
"quoTation"
,
params
:
params
});
},
getPostData
()
{
let
configId
=
this
.
$route
.
query
.
configId
;
if
(
configId
>
0
)
{
let
msg
=
{
ID
:
configId
};
this
.
apipost
(
"travel_get_GetMyTravelInfo"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
postData
=
res
.
data
.
data
;
let
postDaysTrip
=
this
.
getConfigDayTrip
(
this
.
postData
);
this
.
postData
.
DinnerList
=
postDaysTrip
.
DinnerList
;
this
.
postData
.
FreedomList
=
postDaysTrip
.
FreedomList
;
this
.
postData
.
HotelList
=
postDaysTrip
.
HotelList
;
this
.
postData
.
ScenicList
=
postDaysTrip
.
ScenicList
;
this
.
postData
.
TrafficList
=
postDaysTrip
.
TrafficList
;
this
.
postData
.
WarmTipList
=
postDaysTrip
.
WarmTipList
;
this
.
postData
.
TitleList
=
postDaysTrip
.
TitleList
;
if
(
this
.
postData
.
OfferList
==
null
)
{
this
.
postData
.
OfferList
=
[];
}
if
(
this
.
postData
.
IsDirect
==
1
)
{
this
.
priceIsDirect
=
2
;
this
.
postData
.
PriceIsDirect
=
2
;
}
else
{
this
.
priceIsDirect
=
1
;
this
.
postData
.
PriceIsDirect
=
1
;
}
this
.
isShow
=
true
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
}
else
{
let
params
=
{
isNoOffer
:
false
};
this
.
$router
.
push
({
name
:
"quoTation"
,
params
:
params
});
}
}
},
created
()
{
this
.
getPostData
();
},
components
:
{
DirectQuotation
:
DirectQuotation
}
},
created
()
{
this
.
getPostData
();
},
components
:
{
DirectQuotation
:
DirectQuotation
}
};
};
</
script
>
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