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
961a2052
Commit
961a2052
authored
Jun 12, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
bfa19c8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
1891 deletions
+0
-1891
order-form.vue
src/components/orderCommon/order-form.vue
+0
-1891
No files found.
src/components/orderCommon/order-form.vue
deleted
100644 → 0
View file @
bfa19c8e
<
style
scoped
>
.commonOrderForm
{
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
2
;
overflow
:
auto
;
/* max-height: 300px; */
border-top
:
3px
solid
#38425d
;
background-color
:
#ffffff
;
padding
:
10px
10px
0
;
width
:
100%
;
padding
:
20px
20px
10px
80px
;
}
.title
{
border-left
:
3px
solid
#e95252
;
text-indent
:
15px
;
height
:
16px
;
font-family
:
"PingFangSc-Fine"
;
font-size
:
16px
;
margin-bottom
:
20px
;
line-height
:
14px
;
color
:
#000
;
}
</
style
>
<
template
>
<div
class=
"commonOrderForm"
:style=
"
{'height':ScreenHeight}">
<p
class=
"title"
>
{{
$t
(
"salesModule.SignImdi"
)
}}
<span
v-if=
"crmOrderObj"
>
<span
style=
"color: red;"
>
引流人:
{{
crmOrderObj
.
LureEmpNmae
}}
</span>
<span
style=
"color: #2AAEF2;"
>
/客人:
{{
crmOrderObj
.
CRMGuestName
}}
</span>
</span>
<span
class=
"fr"
>
<input
type=
"button"
class=
"hollowFixedBtn"
:value=
"$t('pub.cancelBtn')"
@
click=
"cancelSubmit()"
/>
<input
type=
"button"
class=
"normalBtn"
:value=
"$t('salesModule.SignImdi')"
@
click=
"submitForm('addMsg')"
/>
</span>
</p>
<el-form
:model=
"addMsg"
ref=
"addMsg"
label-position=
"right"
:rules=
"rules"
label-width=
"90px"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<!-- 客户类型 -->
<el-form-item
:label=
"$t('fnc.khleixing')"
prop=
"CustomerType"
>
<el-select
v-model=
"addMsg.CustomerType"
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"
resetMsg(addMsg.CustomerType);
getTypePrice();
resetSelect();
getClientSource();
getCustomer();
getTotalPrice();
"
>
<el-option
v-for=
"item in customerTypeList"
:label=
"item.Name"
:value=
"item.Id"
:key=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"pagesTitle=='跟团游产品'"
>
<!-- 参团类型 -->
<el-form-item
:label=
"$t('fnc.ctleixing')"
prop=
"GroupType"
>
<el-select
v-model=
"addMsg.GroupType"
@
change=
"changeGroupType(addMsg.GroupType)"
filterable
:placeholder=
"$t('pub.pleaseSel')"
>
<!-- v-if="item.Id != 5" -->
<el-option
v-for=
"item in joinTypeList"
:label=
"item.Name"
:value=
"item.Id"
:key=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"addMsg.GroupType == '3'"
>
<!--自由行占床不占床0-占床,1-不占床-->
<el-form-item
:label=
"$t('salesModule.IsUseRoom')"
prop=
"GroupTypeNeedHouse"
>
<el-switch
v-model=
"addMsg.GroupTypeNeedHouse"
active-value=
"0"
inactive-value=
"1"
></el-switch>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"addMsg.CustomerType == 3 || addMsg.CustomerType == 4"
>
<!--联系人-->
<el-form-item
:label=
"$t('hotel.suplier_contact')"
prop=
"ContactName"
>
<el-input
v-model=
"addMsg.ContactName"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"addMsg.CustomerType == 3 || addMsg.CustomerType == 4"
>
<!--联系电话-->
<el-form-item
:label=
"$t('restaurant.res_ContactNumber')"
prop=
"ContactMobile"
>
<el-input
v-model=
"addMsg.ContactMobile"
maxlength=
"20"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"
addMsg.CustomerType == 1 ||
addMsg.CustomerType == 2 ||
addMsg.CustomerType == ''
"
>
<!--同行Id-->
<el-form-item
:label=
"$t('salesModule.CustomerStore')"
prop=
"CustomerId"
>
<el-select
v-model=
"addMsg.CustomerId"
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"changeCustomer"
>
<el-option
v-for=
"(item,index) in customerList"
:label=
"item.customerName + '-' + item.contact"
:value=
"item.customerId"
:key=
"index"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-show=
"addMsg.GroupType == 2"
>
<!--行业-->
<el-form-item
:label=
"$t('salesModule.HYLB')"
prop=
"IndustryCategory"
>
<el-input
v-model=
"addMsg.IndustryCategory"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"showCity&&pagesTitle=='跟团游产品'"
>
<!--出发城市-->
<el-form-item
:label=
"$t('system.table_goCity')"
prop=
"DepartureCityId"
>
<el-select
v-model=
"addMsg.DepartureCityId"
:disabled=
"
priceObj.SonControlID !== -1 &&
priceObj.OutBranchId !== priceObj.SonControlID
"
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"addMsg.IsIntermodal = 2"
>
<el-option
v-for=
"item in startCityList"
:label=
"item.Name"
:value=
"item.ID"
:key=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<!--出发是否联运-->
<el-form-item
:label=
"$t('salesModule.IsLianYn')"
prop=
"IsIntermodal"
v-show=
"
addMsg.DepartureCityId != priceObj.StartCityID &&
addMsg.DepartureCityId != ''
"
>
<el-switch
v-model=
"addMsg.IsIntermodal"
active-value=
"1"
inactive-value=
"2"
@
change=
"getUnionTravelPrice(priceObj, 1)"
></el-switch>
</el-form-item>
<!--联运时间-->
<el-form-item
:label=
"$t('salesModule.LYtime')"
prop=
"GoCityTime"
v-show=
"
addMsg.IsIntermodal == 1 &&
addMsg.DepartureCityId != priceObj.StartCityID
"
>
<el-date-picker
:picker-options=
"pickerOptions0"
v-model=
"addMsg.GoCityTime"
value-format=
"yyyy-MM-dd"
type=
"date"
@
change=
"getUnionTravelPrice(priceObj, 1)"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"showCity&&pagesTitle=='跟团游产品'"
>
<!--返回城市-->
<el-form-item
:label=
"$t('salesModule.BackCity')"
prop=
"ReturnArriveCityId"
>
<el-select
v-model=
"addMsg.ReturnArriveCityId"
:disabled=
"
priceObj.SonControlID !== -1 &&
priceObj.OutBranchId !== priceObj.SonControlID
"
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"addMsg.IsReturnIntermodal = 2"
>
<el-option
v-for=
"item in startCityList"
:label=
"item.Name"
:value=
"item.ID"
:key=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<!--返程是否联运-->
<el-form-item
:label=
"$t('salesModule.IsLianYn')"
prop=
"IsReturnIntermodal"
v-show=
"
addMsg.ReturnArriveCityId != priceObj.ReturnArriveCityId &&
addMsg.ReturnArriveCityId != ''
"
>
<el-switch
v-model=
"addMsg.IsReturnIntermodal"
active-value=
"1"
inactive-value=
"2"
@
change=
"getUnionTravelPrice(priceObj, 2)"
></el-switch>
</el-form-item>
<!--返程联运时间-->
<el-form-item
:label=
"$t('salesModule.LYtime')"
prop=
"IsReturnIntermodal"
v-show=
" addMsg.IsReturnIntermodal == 1 && addMsg.ReturnArriveCityId != priceObj.ReturnArriveCityId "
>
<el-date-picker
:picker-options=
"pickerOptions1"
v-model=
"addMsg.BackCityTime"
value-format=
"yyyy-MM-dd"
type=
"date"
@
change=
"getUnionTravelPrice(priceObj, 2)"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('salesModule.TeamPrice')"
prop=
"TC_Price"
>
<el-input
v-if=
"addMsg.GroupType != 4"
v-model=
"addMsg.TC_Price"
:disabled=
"pagesTitle=='跟团游产品'?false:true"
@
input=
"getTotalPrice()"
>
</el-input>
<el-input
v-else
v-model=
"SingleDMCPricex"
:disabled=
"true"
@
input=
"getTotalPrice()"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('salesModule.StartLY')"
v-show=
"addMsg.IsIntermodal == 1 && addMsg.DepartureCityId != priceObj.StartCityID"
>
<el-input
v-model=
"stratPrice"
v-show=
"stratPriceShow"
:disabled=
"true"
></el-input>
<span
class=
"colorE95252"
v-show=
"!stratPriceShow"
>
{{
$t
(
"pub.NoPrice"
)
}}
!
</span>
</el-form-item>
<el-form-item
:label=
"$t('salesModule.BackLY')"
v-show=
"
addMsg.IsReturnIntermodal == 1 &&
addMsg.ReturnArriveCityId != priceObj.ReturnArriveCityId
"
>
<el-input
v-model=
"returnPrice"
v-show=
"returnPriceShow"
:disabled=
"true"
></el-input>
<span
class=
"colorE95252"
v-show=
"!returnPriceShow"
>
{{
$t
(
"pub.NoPrice"
)
}}
!
</span>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('fnc.cjdanjia')"
prop=
"Unit_Price"
v-if=
"HightUnitPrice === '2'"
>
<el-select
v-model=
"addMsg.Unit_Price"
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"getTotalPrice(2)"
>
<el-option
v-for=
"item in Unit_PriceList"
:label=
"item.LessMoney"
:value=
"item.ID"
:key=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('fnc.cjdanjia')"
prop=
"Unit_Price"
v-else
>
<el-input
v-if=
"addMsg.GroupType != 4"
v-model=
"addMsg.Unit_Price"
@
change=
"getTotalPrice(3)"
>
</el-input>
<el-input
v-else
v-model=
"SingleDMCPrice"
@
change=
"getTotalPrice(3)"
></el-input>
</el-form-item>
<!--高于本团单价-->
<el-form-item
:label=
"$t('salesModule.UpTeamPrice')"
v-show=
"addMsg.GroupType != '4'"
>
<el-switch
v-model=
"HightUnitPrice"
active-value=
"1"
inactive-value=
"2"
></el-switch>
</el-form-item>
<!--少价金额-->
<el-form-item
v-show=
"addMsg.GroupType != '4'"
>
<p
v-if=
"LessMoney == 0"
style=
"line-height: 18px; color: #e95252"
>
{{
$t
(
"salesModule.Notice1"
)
}}
</p>
<p
v-else-if=
"LessMoney > 0"
style=
"line-height: 18px; color: #e95252"
>
{{
$t
(
"salesModule.Notice2"
)
}}{{
LessMoney
}}{{
$t
(
"salesModule.Notice3"
)
}}
</p>
</el-form-item>
</el-col>
</el-row>
<div
style=
"width: 100%; border-top: 1px dashed #ccc; margin-bottom: 25px"
></div>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('salesModule.SingleNum')"
prop=
"AirticketNum"
v-show=
"addMsg.GroupType == 4"
>
<el-input
v-model=
"addMsg.AirticketNum"
@
keyup
.
native=
"checkInteger(addMsg, 'AirticketNum')"
@
input=
"
getNumber();
getTotalPrice();
getHouseNo();
autoRemarks('AirticketNum', '单地接数量');
"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<!--成人人数-->
<el-form-item
:label=
"$t('salesModule.AdultNum')"
prop=
"ManNum"
v-show=
"addMsg.GroupType !== '4'"
>
<el-input
v-model=
"addMsg.ManNum"
:disabled=
"addMsg.GroupType === '4'"
@
keyup
.
native=
"checkInteger(addMsg, 'ManNum')"
@
input=
"
getNumber();
getHouseNo();
getTotalPrice();
"
></el-input>
</el-form-item>
</el-col>
<template
v-if=
"pagesTitle=='跟团游产品'"
>
<el-col
:span=
"4"
>
<p
v-if=
"priceObj.IsSupportChildren == 2"
style=
"color:#e95252;font-size:12px;line-height:40px;text-align:center; "
>
{{
$t
(
"salesModule.NoSupplier"
)
}}
!
</p>
<el-form-item
v-if=
"priceObj.IsSupportChildren == 1"
:label=
"$t('Operation.Op_childNobed')"
prop=
"ChirdNoNeedBedNum"
>
<el-input
v-model=
"addMsg.ChirdNoNeedBedNum"
@
keyup
.
native=
"checkInteger(addMsg, 'ChirdNoNeedBedNum')"
@
input=
"
getNumber();
getHouseNo();
getTotalPrice();
autoRemarks('ChirdNoNeedBedNum', '儿童不占床');
"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"priceObj.IsSupportChildren == 1"
v-show=
"addMsg.GroupType !== '4'"
>
<el-form-item
:label=
"$t('Operation.Op_childBed')"
prop=
"ChirdNeedBedNum"
>
<el-input
v-model=
"addMsg.ChirdNeedBedNum"
:disabled=
"addMsg.GroupType === '4'"
@
keyup
.
native=
"checkInteger(addMsg, 'ChirdNeedBedNum')"
@
input=
"
getNumber();
getHouseNo();
getTotalPrice();
autoRemarks('ChirdNeedBedNum', '儿童占床');
"
></el-input>
</el-form-item>
</el-col>
</
template
>
<
template
v-if=
"pagesTitle=='当地游产品'"
>
<el-col
:span=
"4"
>
<p
v-if=
'priceObj.IsSupportChildren==2'
style=
"color: #E95252; font-size: 12px; line-height: 40px; text-align: center;"
>
{{
$t
(
'salesModule.NoSupplier'
)
}}
!
</p>
<el-form-item
v-if=
'priceObj.IsSupportChildren==1'
v-show=
"addMsg.GroupType !== '4'"
:label=
"$t('salesModule.ChildNum')"
prop=
"ChirdNoNeedBedNum"
>
<el-input
v-model=
'addMsg.ChirdNum'
:disabled=
"addMsg.GroupType==='4'"
@
keyup
.
native=
"checkInteger(addMsg,'ChirdNoNeedBedNum')"
@
input=
'getNumber();getHouseNo();getTotalPrice();autoRemarks("ChirdNoNeedBedNum","儿童人数");'
@
change=
"getNumGuest"
></el-input>
</el-form-item>
</el-col>
</
template
>
<el-col
:span=
"4"
v-if=
"priceObj.IsSupportChildren == 1"
v-show=
"addMsg.GroupType !== '4'"
>
<el-form-item
:label=
"$t('salesModule.BabyNum')"
prop=
"BabyNum"
>
<el-input
v-model=
"addMsg.BabyNum"
:disabled=
"addMsg.GroupType === '4'"
@
keyup
.
native=
"checkInteger(addMsg, 'BabyNum')"
@
input=
"
getNumber();
getTotalPrice();
autoRemarks('BabyNum', '婴儿人数');
"
></el-input>
</el-form-item>
</el-col>
<
template
v-if=
"pagesTitle=='跟团游产品'"
>
<el-col
:span=
"4"
v-show=
"addMsg.GroupType !== '4'"
>
<el-form-item
:label=
"$t('salesModule.OldPeopleNum')"
prop=
"OldPeopleNum"
>
<el-input
v-model=
"addMsg.OldPeopleNum"
:disabled=
"addMsg.GroupType === '4'"
@
keyup
.
native=
"checkInteger(addMsg, 'OldPeopleNum')"
@
input=
"
getNumber();
getHouseNo();
getTotalPrice();
autoRemarks('OldPeopleNum', '老人人数');
"
></el-input>
</el-form-item>
</el-col>
</
template
>
</el-row>
<el-row
:gutter=
"20"
>
<
template
v-if=
"pagesTitle=='跟团游产品'"
>
<el-col
:span=
"4"
v-if=
"addMsg.GroupTypeNeedHouse == '0'"
>
<el-form-item
:label=
"$t('salesModule.SingleRoomNum')"
prop=
"SingleRoomNum"
>
<el-input
v-model=
"addMsg.SingleRoomNum"
@
keyup
.
native=
"checkInteger(addMsg, 'SingleRoomNum')"
@
input=
"
yzSingleBed();
getTotalPrice();
autoRemarks('SingleRoomNum', '单房数量');
"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"addMsg.GroupTypeNeedHouse == '0' && showCity"
>
<el-form-item
:label=
"$t('salesModule.BigRoomNum')"
prop=
"BigRoomNum"
>
<el-input
v-model=
"addMsg.BigRoomNum"
@
keyup
.
native=
"checkInteger(addMsg, 'BigRoomNum')"
@
input=
"
yzBigBed();
getTotalPrice();
autoRemarks('BigRoomNum', '大床房');
"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"addMsg.GroupTypeNeedHouse == '0' && showCity"
>
<el-form-item
:label=
"$t('salesModule.TripleRoomNum')"
prop=
"TripleRoomNum"
>
<el-input
v-model=
"addMsg.TripleRoomNum"
@
keyup
.
native=
"checkInteger(addMsg, 'TripleRoomNum')"
@
input=
"
yzThreeBed();
getTotalPrice();
autoRemarks('TripleRoomNum', '三人房');
"
></el-input>
</el-form-item>
</el-col>
</
template
>
<el-col
:span=
"4"
v-if=
"pagesTitle=='跟团游产品'"
>
<el-form-item
:label=
"$t('salesModule.VisaNum')"
prop=
"VisaNum"
>
<el-input
v-model=
"addMsg.VisaNum"
@
keyup
.
native=
"checkInteger(addMsg, 'VisaNum')"
@
input=
"
yzVisaNum();
getTotalPrice();
autoRemarks('VisaNum', '不要签证数量');
"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"showCity||pagesTitle=='当地游产品'"
>
<el-form-item
:label=
"$t('salesModule.SaleNum')"
prop=
"SaleNum"
>
<el-input
v-model=
"addMsg.SafeNum"
@
keyup
.
native=
"checkInteger(addMsg, 'SafeNum')"
@
input=
"
yzSafeNum();
getTotalPrice();
"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"pagesTitle=='跟团游产品'"
>
<el-form-item
:label=
"$t('salesModule.SingleFM')"
>
<el-radio
v-model=
"addMsg.OneSex"
label=
"1"
>
{{ $t("pub.man") }}
</el-radio>
<el-radio
v-model=
"addMsg.OneSex"
label=
"2"
>
{{ $t("pub.woman") }}
</el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<
template
v-if=
"pagesTitle=='跟团游产品'"
>
<el-col
:span=
"4"
v-if=
"addMsg.GroupTypeNeedHouse == '0'"
>
<el-form-item
:label=
"$t('salesModule.PredictRoomNum')"
prop=
"PredictRoomNum"
>
<el-input
v-model=
"addMsg.PredictRoomNum"
:disabled=
"true"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('fnc.yszonge')"
prop=
"PreferPrice"
>
<el-input
v-model=
"addMsg.PreferPrice"
:disabled=
"true"
></el-input>
</el-form-item>
</el-col>
</
template
>
<el-col
:span=
"4"
v-show=
"addMsg.CustomerType == 1 || addMsg.CustomerType == 2"
>
<el-form-item
:label=
"$t('salesModule.SharePeople')"
prop=
"CommissionSharePeople"
>
<el-select
:disabled=
"isUpdateSharePeople"
filterable
clearable
@
change=
"getTotalPrice"
v-model=
"addMsg.CommissionSharePeople"
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
:label=
"$t('fnc.no')"
value=
"-1"
key=
"-1"
></el-option>
<el-option
v-for=
"item in employeeList"
:label=
"item.EmName"
:value=
"item.EmployeeId"
:key=
"item.EmployeeId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-show=
"addMsg.CommissionSharePeople != '-1' && (addMsg.CustomerType == 1 || addMsg.CustomerType == 2)"
>
<el-form-item
:label=
"$t('salesModule.ShareMoney')"
prop=
"CommissionShareMoney"
>
<el-input
v-model=
"addMsg.CommissionShareMoney"
:disabled=
"true"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<
template
v-if=
"pagesTitle=='跟团游产品'"
>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('Airticket.Air_EconomyClass')"
prop=
"YSeatNum"
>
<el-input
v-model=
"addMsg.YSeatNum"
@
keyup
.
native=
"checkInteger(addMsg, 'YSeatNum')"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('Airticket.Air_businessClass')"
prop=
"ESeatNum"
>
<el-input
v-model=
"addMsg.ESeatNum"
@
input=
"getNumber()"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('Airticket.Air_firstClass')"
prop=
"FSeatNum"
>
<el-input
v-model=
"addMsg.FSeatNum"
@
input=
"getNumber()"
></el-input>
</el-form-item>
</el-col>
</
template
>
<!--<el-col :span="4">
<el-form-item label="单地接数量" prop="AirticketNum">
<el-input v-model='addMsg.AirticketNum' @keyup.native="checkInteger(addMsg,'AirticketNum')" @input='getTotalPrice();getHouseNo()'></el-input>
</el-form-item>
</el-col>-->
<el-col
:span=
"4"
v-if=
"showCity&&pagesTitle=='跟团游产品'"
>
<el-form-item
:label=
"$t('salesModule.ScenicRefund')"
>
<el-select
filterable
multiple
class=
"multiple_input"
v-model=
"addMsg.ScenicRefundArr"
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"ScenicRefundMethods"
>
<el-option
v-for=
"(item,index) in ScenicRefundList"
:label=
"item.ScenicName"
:value=
"item.Id"
:key=
"index"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
v-if=
"showCity||pagesTitle=='当地游产品'"
>
<el-form-item
:label=
"$t('salesModule.MsgMoney')"
>
<el-select
filterable
v-model=
"addMsg.IsShowMessagesMoney"
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
:label=
"$t('system.table_isShows')"
value=
"1"
></el-option>
<el-option
:label=
"$t('MarketingActi.notShow')"
value=
"2"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('salesModule.CustomFrom')"
prop=
"ClientSource"
>
<el-select
v-model=
"addMsg.ClientSource"
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
change=
'changeClientSource'
>
<el-option
v-for=
"(item,index) in clientSourceList"
:label=
"item.Name"
:value=
"item.Id"
:key=
"index"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('salesModule.SSPT')"
prop=
"BrandId"
v-show=
"addMsg.ClientSource == 1|| addMsg.ClientSource == 4"
>
<el-select
v-model=
"addMsg.BrandId"
filterable
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
"item in customerBrandList"
:label=
"item.brandName"
:value=
"item.dictId"
:key=
"item.dictId"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<!--交易方式-->
<el-form-item
:label=
"$t('tips.jiaoyifangshi')"
prop=
"TradeWay"
v-show=
"addMsg.ClientSource == 1|| addMsg.ClientSource == 4"
>
<el-select
v-model=
"addMsg.TradeWay"
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"tradeWayMethods"
>
<el-option
v-for=
"item in tradeWayList"
:label=
"item.Name"
:value=
"item.Id"
:key=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!--平台账户-->
<el-col
:span=
"4"
v-if=
"addMsg.TradeWay == 1 || addMsg.TradeWay == 3"
>
<el-form-item
:label=
"$t('fnc.fkuanzhanghu')"
>
<el-select
filterable
v-model=
"addMsg.PlatformAccount"
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
"item in PlatformAccountList"
:label=
"item.Alias"
:value=
"item.ID"
:key=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!--平台订单-->
<el-col
:span=
"4"
v-if=
"addMsg.TradeWay == 1 || addMsg.TradeWay == 3"
>
<el-form-item
:label=
"$t('salesModule.PlatOrder')"
prop=
"PlatformOrder"
>
<el-input
v-model=
"addMsg.PlatformOrder"
@
input=
"platformOrderMethods"
maxlength=
"20"
></el-input>
</el-form-item>
</el-col>
<!--报价单-->
<el-col
:span=
"4"
>
<el-form-item
label=
"报价单"
prop=
"QuotationUrl"
v-show=
"addMsg.GroupType == '2'"
>
<div
style=
"margin-bottom: 10px; width: 32%"
v-loading=
"uploadLloading"
element-loading-text=
"拼命上传中"
>
<el-upload
ref=
"my-upload"
class=
"upload-demo"
:http-request=
"uploadFileBtn"
:multiple=
"true"
:show-file-list=
"true"
:on-preview=
"previewFile"
:on-remove=
"removeFile"
:limit=
"1"
action
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
</el-upload>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<!--备注-->
<el-form-item
:label=
"$t('pub.pubRemark')"
prop=
"Remarks"
>
<el-input
v-model=
"addMsg.Remarks"
type=
"textarea"
maxlength=
"500"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
v-if=
"addMsg.IsIntermodal == 1 || addMsg.IsReturnIntermodal == 1"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"联运备注"
prop=
"UnionRemark"
>
<el-input
v-model=
"addMsg.UnionRemark"
type=
"textarea"
maxlength=
"500"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<
script
>
export
default
{
//团期编号,订单编号(新增传0),下单人选择的公司
props
:
[
'showCity'
,
'PTCID'
,
//团期编号(必须传),
'POrderId'
,
//订单编号(新增传0)
'PBranchId'
,
//销售公司/联运公司
'PProductType'
,
//产品类型(1-常规团,2-包机团)
'productObj'
,
'pagesTitle'
],
data
()
{
return
{
timer
:
false
,
fullHeight
:
document
.
documentElement
.
clientHeight
,
ScreenHeight
:
0
,
pickerOptions0
:
{
disabledDate
:
(
time
)
=>
{
let
starTime
=
new
Date
(
this
.
starTime
);
return
time
.
getTime
()
>
starTime
.
getTime
();
},
},
pickerOptions1
:
{
disabledDate
:
(
time
)
=>
{
let
endTime
=
new
Date
(
this
.
endTime
);
return
time
.
getTime
()
<
endTime
.
getTime
()
-
5.64e7
;
},
},
CurrentUserInfo
:
{},
//当前登录用户信息
HightUnitPrice
:
"2"
,
//高于本团单价
createByInfo
:
""
,
isUpdateSharePeople
:
false
,
starTime
:
""
,
endTime
:
""
,
stratPrice
:
""
,
stratPriceShow
:
false
,
returnPrice
:
""
,
returnPriceShow
:
false
,
minPrice
:
0
,
Unit_PriceList
:
[],
//成交单价下拉数据
LessMoney
:
0
,
addMsg
:
{
price
:
0
,
GroupTypeNeedHouse
:
0
,
OrderId
:
0
,
OneSex
:
0
,
TCID
:
0
,
CustomerType
:
""
,
GroupType
:
""
,
IndustryCategory
:
""
,
ContactName
:
""
,
ContactMobile
:
""
,
CustomerId
:
""
,
DepartureCityId
:
0
,
ReturnArriveCityId
:
""
,
IsIntermodal
:
"2"
,
IsReturnIntermodal
:
"2"
,
Unit_Price
:
0
,
TC_Price
:
0
,
ManNum
:
0
,
// 成人数量
ChirdNum
:
0
,
// 小孩数量
ChirdNoNeedBedNum
:
0
,
ChirdNeedBedNum
:
0
,
BabyNum
:
0
,
OldPeopleNum
:
0
,
SingleRoomNum
:
0
,
PreferPrice
:
0
,
YSeatNum
:
0
,
ESeatNum
:
0
,
FSeatNum
:
0
,
Commission
:
0
,
ClientSource
:
0
,
BrandId
:
0
,
TradeWay
:
"2"
,
PlatformAccount
:
""
,
PlatformOrder
:
""
,
GuestNum
:
0
,
IsChildrenTour
:
0
,
IsBirdDiscount
:
0
,
PredictRoomNum
:
0
,
BigRoomNum
:
0
,
TripleRoomNum
:
0
,
TradeDate
:
""
,
CostType
:
""
,
Remarks
:
""
,
VisaNum
:
0
,
SafeNum
:
0
,
AirticketNum
:
0
,
ScenicRefundArr
:
[],
GoCityTime
:
""
,
BackCityTime
:
""
,
CommissionSharePeople
:
0
,
CommissionShareMoney
:
0
,
OrderForm
:
"1"
,
SonControlID
:
"-1"
,
IsShowMessagesMoney
:
"2"
,
QuotationUrl
:
""
,
//单团附件
LureEmpId
:
0
,
//引流id
CRMGuestId
:
0
,
//客人ID
},
uploadLloading
:
false
,
rules
:
{
CustomerType
:
[{
required
:
true
,
message
:
"请选择客户类型"
,
trigger
:
"change"
,
}],
CustomerId
:
[{
required
:
false
,
message
:
"请选择客户门店"
,
trigger
:
"change"
,
}],
DepartureCityId
:
[{
required
:
true
,
message
:
"请选择出发城市"
,
trigger
:
"change"
,
}],
GroupType
:
[{
required
:
true
,
message
:
"请选择参团类型"
,
trigger
:
"change"
,
}],
ClientSource
:
[{
required
:
true
,
message
:
"请选择客人来源"
,
trigger
:
"change"
,
}],
TradeWay
:
[{
required
:
true
,
message
:
"请选择交易方式"
,
trigger
:
"change"
,
}],
ContactName
:
[{
required
:
true
,
message
:
"请输入联系人姓名"
,
trigger
:
"blur"
,
}],
ContactMobile
:
[{
required
:
true
,
message
:
"请输入联系人电话"
,
trigger
:
"blur"
,
},
{
pattern
:
/^
(
0|86|17951
)?(
13
[
0-9
]
|15
[
012356789
]
|17
[
012356789
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
57
])[
0-9
]{8}
$/
,
message
:
"请输入正确的手机"
,
},
],
},
startCityList
:
[],
//出发城市列表
customerTypeList
:
[],
//客户类型列表
customerBrandList
:
[],
//客户平平列表
clientSourceList
:
[],
//客人来源列表
customerList
:
[],
//客户列表
joinTypeList
:
[],
//参团类型列表
tradeWayList
:
[],
//交易方式列表
ScenicRefundList
:
[],
//可退景点列表
employeeList
:
[],
//员工列表
PlatformAccountList
:
[],
//平台账户绑定列表
PlatformAccountList1
:
[],
//所有平台账户列表
DiplomacyPlatformAccountList
:
[],
//外交平台账户列表
ScenicRefundMoney
:
0
,
//可退景点的金额
remarkMsg
:
{
zc
:
""
,
bzc
:
""
,
fjf
:
""
,
ye
:
""
,
lr
:
""
,
dd
:
""
,
df
:
""
,
dc
:
""
,
srf
:
""
,
qz
:
""
,
qzf
:
""
,
},
otherRemark
:
""
,
SingleDMCPricex
:
0
,
// 单地接;
SingleDMCPrice
:
0
,
// 单地接;
TotalNumber
:
0
,
//总人数
priceObj
:
{},
//团期价格信息
crmOrderObj
:
null
};
},
methods
:
{
//参团类型切换
changeGroupType
(
type
)
{
if
((
type
=
!
2
))
{
this
.
addMsg
.
IndustryCategory
=
""
;
this
.
addMsg
.
QuotationUrl
=
""
;
}
//单地接
if
(
type
==
4
)
{
this
.
HightUnitPrice
=
"1"
;
this
.
addMsg
.
AirticketNum
=
0
;
this
.
addMsg
.
ManNum
=
0
;
this
.
addMsg
.
BabyNum
=
0
;
this
.
addMsg
.
OldPeopleNum
=
0
;
this
.
addMsg
.
ChirdNoNeedBedNum
=
0
;
this
.
addMsg
.
ChirdNeedBedNum
=
0
;
this
.
addMsg
.
PreferPrice
=
0
;
this
.
addMsg
.
SafeNum
=
0
;
this
.
addMsg
.
VisaNum
=
0
;
this
.
addMsg
.
PredictRoomNum
=
0
;
this
.
addMsg
.
YSeatNum
=
0
;
}
else
{
this
.
HightUnitPrice
=
"2"
;
this
.
addMsg
.
AirticketNum
=
0
;
this
.
addMsg
.
ManNum
=
0
;
this
.
addMsg
.
BabyNum
=
0
;
this
.
addMsg
.
OldPeopleNum
=
0
;
this
.
addMsg
.
ChirdNoNeedBedNum
=
0
;
this
.
addMsg
.
ChirdNeedBedNum
=
0
;
this
.
addMsg
.
PreferPrice
=
0
;
this
.
addMsg
.
SafeNum
=
0
;
this
.
addMsg
.
VisaNum
=
0
;
this
.
addMsg
.
PredictRoomNum
=
0
;
this
.
addMsg
.
YSeatNum
=
0
;
}
this
.
Unit_PriceList
=
[];
this
.
addMsg
.
GroupTypeNeedHouse
=
"0"
;
},
//验证签证人数
yzVisaNum
()
{
let
ChirdNum
=
Number
(
this
.
addMsg
.
ChirdNum
);
//地接
if
(
this
.
addMsg
.
GroupType
==
4
)
{
ChirdNum
=
0
;
}
let
count
=
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
ChirdNum
+
Number
(
this
.
addMsg
.
BabyNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
);
if
(
count
<
this
.
addMsg
.
VisaNum
)
{
this
.
addMsg
.
VisaNum
=
count
;
this
.
Error
(
"签证人数不能大于总人数"
);
}
},
//验证保险人数
yzSafeNum
()
{
let
ChirdNum
=
Number
(
this
.
addMsg
.
ChirdNum
);
//单地接
if
(
this
.
addMsg
.
GroupType
==
4
)
{
ChirdNum
=
0
;
}
let
count
=
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
ChirdNum
+
Number
(
this
.
addMsg
.
BabyNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
);
this
.
TotalNumber
=
count
;
if
(
count
<
this
.
addMsg
.
SafeNum
)
{
this
.
addMsg
.
SafeNum
=
count
;
this
.
Error
(
"保险人数不能大于总人数"
);
}
},
//验证单房数量
yzSingleBed
()
{
let
x
=
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNeedBedNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
-
Number
(
this
.
addMsg
.
SingleRoomNum
);
let
y
=
x
-
Number
(
this
.
addMsg
.
TripleRoomNum
)
*
3
-
Number
(
this
.
addMsg
.
BigRoomNum
)
*
2
;
if
(
y
<
0
)
{
this
.
addMsg
.
SingleRoomNum
=
0
;
}
this
.
getHouseNo
();
this
.
autoRemarks
(
"SingleRoomNum"
,
"单房数量"
);
},
//验证大床房
yzBigBed
()
{
let
x
=
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNeedBedNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
-
Number
(
this
.
addMsg
.
SingleRoomNum
);
let
y
=
x
-
Number
(
this
.
addMsg
.
TripleRoomNum
)
*
3
-
Number
(
this
.
addMsg
.
BigRoomNum
)
*
2
;
if
(
y
<=
-
1
)
{
this
.
addMsg
.
BigRoomNum
=
0
;
}
this
.
getHouseNo
();
this
.
autoRemarks
(
"BigRoomNum"
,
"大床房"
);
},
//验证三人房
yzThreeBed
()
{
let
x
=
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNeedBedNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
-
Number
(
this
.
addMsg
.
SingleRoomNum
);
let
y
=
x
-
Number
(
this
.
addMsg
.
TripleRoomNum
)
*
3
-
Number
(
this
.
addMsg
.
BigRoomNum
)
*
2
;
if
(
y
<=
-
1
)
{
this
.
addMsg
.
TripleRoomNum
=
0
;
}
this
.
getHouseNo
();
this
.
autoRemarks
(
"TripleRoomNum"
,
"三人房"
);
},
// 自动添加备注
autoRemarks
(
key
,
text
)
{
let
count
=
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
BabyNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
);
this
.
remarkMsg
.
qz
=
""
;
if
(
this
.
addMsg
[
key
].
toString
()
!==
"0"
&&
this
.
addMsg
[
key
].
toString
()
!==
""
)
{
if
(
this
.
addMsg
[
key
].
toString
()
!==
count
.
toString
()
&&
this
.
addMsg
[
key
].
toString
()
!==
""
)
{
if
(
text
===
"不要签证数量"
)
{
this
.
remarkMsg
.
qz
=
text
+
":"
+
(
count
-
this
.
addMsg
[
key
])
+
";"
;
if
(
this
.
priceObj
.
VisaPrice
)
{
this
.
remarkMsg
.
qzf
=
"签证费"
+
this
.
priceObj
.
VisaPrice
+
"/人;"
;
}
if
(
this
.
priceObj
.
BackVisaPrice
)
{
this
.
remarkMsg
.
qz
=
text
+
":"
+
(
count
-
this
.
addMsg
[
key
])
+
";"
+
"退签证费"
+
this
.
priceObj
.
BackVisaPrice
+
"/人;"
;
}
}
if
(
text
===
"不要保险数量"
)
{
this
.
remarkMsg
.
bx
=
text
+
":"
+
(
count
-
this
.
addMsg
[
key
])
+
";"
;
}
}
else
if
(
this
.
addMsg
[
key
].
toString
()
===
count
.
toString
())
{
if
(
this
.
priceObj
.
VisaPrice
)
{
this
.
remarkMsg
.
qzf
=
"签证费"
+
this
.
priceObj
.
VisaPrice
+
"/人;"
;
}
this
.
remarkMsg
.
qz
=
""
;
}
if
(
text
===
"儿童不占床"
)
{
if
(
this
.
remarkMsg
.
bzc
===
""
)
{
this
.
remarkMsg
.
bzc
=
"儿童不占床:"
+
this
.
addMsg
[
key
]
+
";"
;
if
(
this
.
priceObj
.
ChildNoNeedPrice
)
{
this
.
remarkMsg
.
bzc
+=
"儿童不占床减免"
+
this
.
priceObj
.
ChildNoNeedPrice
+
"/人;"
;
}
}
else
{
this
.
remarkMsg
.
bzc
=
""
;
this
.
remarkMsg
.
bzc
=
"儿童不占床:"
+
this
.
addMsg
[
key
]
+
";"
;
if
(
this
.
priceObj
.
ChildNoNeedPrice
)
{
this
.
remarkMsg
.
bzc
+=
"儿童不占床减免"
+
this
.
priceObj
.
ChildNoNeedPrice
+
"/人;"
;
}
}
if
(
this
.
remarkMsg
.
fjf
===
""
)
{
if
(
this
.
priceObj
[
"BabyChargePrice"
]
>
0
&&
this
.
priceObj
[
"BabyChargePrice"
])
{
this
.
remarkMsg
.
fjf
=
"儿童附加费:"
+
this
.
priceObj
[
"BabyChargePrice"
]
+
"/人;"
;
}
else
{
this
.
remarkMsg
.
fjf
=
""
;
}
}
}
if
(
text
===
"儿童占床"
)
{
if
(
this
.
remarkMsg
.
zc
===
""
)
{
this
.
remarkMsg
.
zc
=
"儿童占床:"
+
this
.
addMsg
[
key
]
+
";"
;
if
(
this
.
priceObj
.
ChildNeedPrice
)
{
this
.
remarkMsg
.
zc
=
this
.
remarkMsg
.
zc
+
"儿童占床附加费"
+
this
.
priceObj
.
ChildNeedPrice
+
"/人;"
;
}
}
else
{
this
.
remarkMsg
.
zc
=
""
;
this
.
remarkMsg
.
zc
=
"儿童占床:"
+
this
.
addMsg
[
key
]
+
";"
;
if
(
this
.
priceObj
.
ChildNeedPrice
)
{
this
.
remarkMsg
.
zc
=
this
.
remarkMsg
.
zc
+
"儿童占床附加费"
+
this
.
priceObj
.
ChildNeedPrice
+
"/人;"
;
}
}
if
(
this
.
remarkMsg
.
fjf
===
""
)
{
this
.
remarkMsg
.
fjf
=
this
.
priceObj
[
"BabyChargePrice"
]
?
"儿童附加费:"
+
this
.
priceObj
[
"BabyChargePrice"
]
+
"/人;"
:
""
;
}
}
if
(
text
===
"老人人数"
)
{
if
(
this
.
remarkMsg
.
lr
===
""
)
{
this
.
remarkMsg
.
lr
=
"老人人数:"
+
this
.
addMsg
[
key
]
+
";"
;
if
(
this
.
priceObj
.
OldManChargePrice
)
{
this
.
remarkMsg
.
lr
=
this
.
remarkMsg
.
lr
+
this
.
priceObj
.
OldManChargePrice
+
"/人;"
;
}
}
else
{
this
.
remarkMsg
.
lr
=
""
;
this
.
remarkMsg
.
lr
=
"老人人数:"
+
this
.
addMsg
[
key
]
+
";"
;
if
(
this
.
priceObj
.
OldManChargePrice
)
{
this
.
remarkMsg
.
lr
=
this
.
remarkMsg
.
lr
+
this
.
priceObj
.
OldManChargePrice
+
"/人;"
;
}
}
}
if
(
text
===
"婴儿人数"
)
{
if
(
this
.
remarkMsg
.
ye
===
""
)
{
this
.
remarkMsg
.
ye
=
"婴儿人数:"
+
this
.
addMsg
[
key
]
+
";"
+
"婴儿价格:"
+
this
.
priceObj
.
BabyPrice
+
"/人;"
;
}
else
{
this
.
remarkMsg
.
ye
=
""
;
this
.
remarkMsg
.
ye
=
"婴儿人数:"
+
this
.
addMsg
[
key
]
+
";"
+
"婴儿价格:"
+
this
.
priceObj
.
BabyPrice
+
"/人;"
;
}
}
if
(
text
===
"单地接数量"
)
{
if
(
this
.
remarkMsg
.
dd
===
""
)
{
this
.
remarkMsg
.
dd
=
"单地接数量:"
+
this
.
addMsg
[
key
]
+
";"
;
}
else
{
this
.
remarkMsg
.
dd
=
""
;
this
.
remarkMsg
.
dd
=
"单地接数量:"
+
this
.
addMsg
[
key
]
+
";"
;
}
}
if
(
text
===
"单房数量"
)
{
if
(
this
.
remarkMsg
.
df
===
""
)
{
this
.
remarkMsg
.
df
=
"单房数量:"
+
this
.
addMsg
[
key
]
+
";"
+
"单房差价"
+
this
.
priceObj
.
SingleRoomPrice
+
"/人;"
;
}
else
{
this
.
remarkMsg
.
df
=
""
;
this
.
remarkMsg
.
df
=
"单房数量:"
+
this
.
addMsg
[
key
]
+
";"
+
"单房差价"
+
this
.
priceObj
.
SingleRoomPrice
+
"/人;"
;
}
}
if
(
text
===
"大床房"
)
{
if
(
this
.
remarkMsg
.
dc
===
""
)
{
this
.
remarkMsg
.
dc
=
"大床房:"
+
this
.
addMsg
[
key
]
+
";"
;
}
else
{
this
.
remarkMsg
.
dc
=
""
;
this
.
remarkMsg
.
dc
=
"大床房:"
+
this
.
addMsg
[
key
]
+
";"
;
}
}
if
(
text
===
"三人房"
)
{
if
(
this
.
remarkMsg
.
srf
===
""
)
{
this
.
remarkMsg
.
srf
=
"三人房:"
+
this
.
addMsg
[
key
]
+
";"
;
}
else
{
this
.
remarkMsg
.
srf
=
""
;
this
.
remarkMsg
.
srf
=
"三人房:"
+
this
.
addMsg
[
key
]
+
";"
;
}
}
}
else
{
if
(
text
===
"儿童不占床"
)
{
this
.
remarkMsg
.
bzc
=
""
;
this
.
remarkMsg
.
fjf
=
""
;
}
if
(
text
===
"儿童占床"
)
{
this
.
remarkMsg
.
zc
=
""
;
this
.
remarkMsg
.
fjf
=
""
;
}
if
(
text
===
"婴儿人数"
)
{
this
.
remarkMsg
.
ye
=
""
;
}
if
(
text
===
"老人人数"
)
{
this
.
remarkMsg
.
lr
=
""
;
}
if
(
text
===
"单地接数量"
)
{
this
.
remarkMsg
.
dd
=
""
;
}
if
(
text
===
"单房数量"
)
{
this
.
remarkMsg
.
df
=
""
;
}
if
(
text
===
"大床房"
)
{
this
.
remarkMsg
.
dc
=
""
;
}
if
(
text
===
"三人房"
)
{
this
.
remarkMsg
.
srf
=
""
;
}
if
(
text
===
"不要签证数量"
)
{
this
.
remarkMsg
.
qz
=
""
;
this
.
remarkMsg
.
qzf
=
""
;
}
if
(
text
===
"不要保险数量"
)
{
this
.
remarkMsg
.
bx
=
""
;
}
}
let
_this
=
this
;
let
newRemark
=
""
;
_this
.
addMsg
.
Remarks
=
""
;
if
(
this
.
addMsg
.
GroupType
==
4
)
{
newRemark
=
_this
.
addMsg
.
Remarks
+
_this
.
otherRemark
;
}
else
{
newRemark
=
_this
.
addMsg
.
Remarks
;
}
newRemark
=
_this
.
addMsg
.
Remarks
+
_this
.
otherRemark
;
Object
.
keys
(
_this
.
remarkMsg
).
forEach
(
function
(
key
)
{
newRemark
=
newRemark
+
_this
.
remarkMsg
[
key
];
});
_this
.
addMsg
.
Remarks
=
newRemark
;
},
//获取联运价格
getUnionTravelPrice
(
obj
,
type
)
{
let
msg
=
{};
msg
.
TCID
=
obj
.
TCID
;
msg
.
Type
=
type
;
if
(
type
==
1
)
{
msg
.
StartCityId
=
this
.
addMsg
.
DepartureCityId
;
msg
.
CityTime
=
this
.
addMsg
.
GoCityTime
;
if
(
this
.
addMsg
.
IsIntermodal
==
2
)
{
this
.
stratPrice
=
"0"
;
this
.
stratPriceShow
=
false
;
this
.
getTotalPrice
();
}
else
{
this
.
apipost
(
"sellorder_get_GetUnionTravelPrice"
,
msg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
stratPrice
=
res
.
data
.
data
.
Price
;
if
(
this
.
stratPrice
==
0
)
{
this
.
stratPriceShow
=
false
;
}
else
{
this
.
stratPriceShow
=
true
;
}
this
.
getTotalPrice
();
}
},
);
}
}
else
{
msg
.
StartCityId
=
this
.
addMsg
.
ReturnArriveCityId
;
msg
.
CityTime
=
this
.
addMsg
.
BackCityTime
;
if
(
this
.
addMsg
.
IsReturnIntermodal
==
2
)
{
this
.
returnPrice
=
"0"
;
this
.
returnPriceShow
=
true
;
this
.
getTotalPrice
();
}
else
{
this
.
apipost
(
"sellorder_get_GetUnionTravelPrice"
,
msg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
returnPrice
=
res
.
data
.
data
.
Price
;
if
(
this
.
returnPrice
==
0
)
{
this
.
returnPriceShow
=
false
;
}
else
{
this
.
returnPriceShow
=
true
;
}
this
.
getTotalPrice
();
}
},
);
}
}
},
//可退景点(获取可退景点的可退金额)
ScenicRefundMethods
()
{
this
.
ScenicRefundMoney
=
0
;
if
(
this
.
addMsg
.
ScenicRefundArr
&&
this
.
addMsg
.
ScenicRefundArr
.
length
>
0
)
{
this
.
addMsg
.
ScenicRefundArr
.
forEach
((
x
)
=>
{
let
listIndex
=
this
.
ScenicRefundList
.
findIndex
(
(
item
)
=>
item
.
Id
==
x
);
if
(
listIndex
!=
-
1
)
{
this
.
ScenicRefundMoney
+=
this
.
ScenicRefundList
[
listIndex
].
RefundMoney
;
}
});
}
this
.
getTotalPrice
();
this
.
getTicheng
();
},
//交易方式
tradeWayMethods
(
val
)
{
if
(
val
==
3
)
{
this
.
addMsg
.
PlatformAccount
=
""
;
this
.
PlatformAccountList
=
this
.
DiplomacyPlatformAccountList
;
}
if
(
val
==
1
)
{
this
.
addMsg
.
PlatformAccount
=
""
;
this
.
PlatformAccountList
=
this
.
PlatformAccountList1
;
}
if
(
this
.
addMsg
.
TradeWay
==
2
)
{
this
.
addMsg
.
PlatformOrder
=
""
;
this
.
addMsg
.
PlatformAccount
=
""
;
this
.
addMsg
.
MinOrderPrice
=
0
;
this
.
addMsg
.
CostType
=
""
;
this
.
addMsg
.
TradeDate
=
""
;
}
},
//获取平台订单
platformOrderMethods
()
{
if
(
this
.
addMsg
.
PlatformOrder
==
""
)
{
this
.
addMsg
.
MinOrderPrice
=
0
;
this
.
addMsg
.
CostType
=
""
;
this
.
addMsg
.
TradeDate
=
""
;
}
else
{
this
.
addMsg
.
MinOrderPrice
=
this
.
minPrice
*
(
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
));
}
},
//获取线路最低定金金额
getMinPrice
(
id
)
{
this
.
apipost
(
"line_post_Get"
,
{
ID
:
id
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
minPrice
=
res
.
data
.
data
&&
res
.
data
.
data
.
LowDeposit
;
}
},
);
},
//客户类型切换 清空客户编号
resetSelect
()
{
if
(
this
.
addMsg
.
CustomerType
==
1
||
this
.
addMsg
.
CustomerType
==
2
)
{
this
.
addMsg
.
CustomerId
=
""
;
}
},
//清空联系人和联系电话
resetMsg
(
type
)
{
if
(
type
==
3
||
type
==
4
)
{
this
.
addMsg
.
ContactName
=
""
;
this
.
addMsg
.
ContactMobile
=
""
;
}
},
//计算少价金额
getTypePrice
()
{
if
(
this
.
pagesTitle
==
'当地游产品'
){
this
.
addMsg
.
ContactName
=
''
this
.
addMsg
.
ContactMobile
=
''
}
if
(
this
.
addMsg
.
CustomerType
==
1
)
{
this
.
addMsg
.
TC_Price
=
this
.
priceObj
.
B2BMemberPrice
;
this
.
addMsg
.
Unit_Price
=
this
.
priceObj
.
B2BMemberPrice
;
}
if
(
this
.
addMsg
.
CustomerType
==
2
)
{
this
.
addMsg
.
TC_Price
=
this
.
priceObj
.
B2BPrice
;
this
.
addMsg
.
Unit_Price
=
this
.
priceObj
.
B2BPrice
;
}
if
(
this
.
addMsg
.
CustomerType
==
3
)
{
this
.
addMsg
.
TC_Price
=
this
.
priceObj
.
B2CMemberPrice
;
this
.
addMsg
.
Unit_Price
=
this
.
priceObj
.
B2CMemberPrice
;
this
.
addMsg
.
CustomerId
=
"0"
;
this
.
addMsg
.
CommissionShareMoney
=
"0"
;
}
if
(
this
.
addMsg
.
CustomerType
==
4
)
{
this
.
addMsg
.
TC_Price
=
this
.
priceObj
.
B2CPrice
;
this
.
addMsg
.
Unit_Price
=
this
.
priceObj
.
B2CPrice
;
this
.
addMsg
.
CustomerId
=
"0"
;
this
.
addMsg
.
CommissionShareMoney
=
"0"
;
}
this
.
Unit_PriceList
=
[];
let
maxPeopleNum
=
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNoNeedBedNum
)
+
Number
(
this
.
addMsg
.
ChirdNeedBedNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
+
Number
(
this
.
addMsg
.
AirticketNum
);
if
(
maxPeopleNum
>
0
)
{
this
.
apipost
(
"sellorder_post_GetLessPrice"
,
{
TCID
:
this
.
priceObj
.
TCID
,
MaxPeopleNum
:
maxPeopleNum
},
(
res
)
=>
{
this
.
LessMoney
=
res
.
data
.
data
.
lessMoney
;
if
(
parseFloat
(
this
.
LessMoney
)
>
0
)
{
for
(
var
i
=
0
;
i
<=
parseInt
(
this
.
LessMoney
)
/
10
;
i
++
)
{
var
obj
=
{
ID
:
""
,
LessMoney
:
""
,
};
obj
.
ID
=
this
.
addMsg
.
Unit_Price
-
i
*
10
;
obj
.
LessMoney
=
this
.
addMsg
.
Unit_Price
-
i
*
10
;
this
.
Unit_PriceList
.
push
(
obj
);
}
if
(
this
.
Unit_PriceList
.
findIndex
(
(
markers
)
=>
markers
.
ID
==
this
.
addMsg
.
Unit_Price
)
<
0
)
{
var
obj
=
{
ID
:
""
,
LessMoney
:
""
,
};
obj
.
ID
=
this
.
addMsg
.
Unit_Price
;
obj
.
LessMoney
=
this
.
addMsg
.
Unit_Price
;
this
.
Unit_PriceList
.
push
(
obj
);
}
}
else
{
var
obj
=
{
ID
:
""
,
LessMoney
:
""
,
};
obj
.
ID
=
this
.
addMsg
.
Unit_Price
;
obj
.
LessMoney
=
this
.
addMsg
.
Unit_Price
;
this
.
Unit_PriceList
.
push
(
obj
);
}
},
);
}
},
//提成
getTicheng
()
{
let
num
=
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
);
let
yh
=
0
;
if
(
num
>
0
)
{
this
.
apipost
(
"sellorder_get_GetOrderMinPrice"
,
{
ltID
:
this
.
priceObj
.
ltID
,
Num
:
num
,
},
(
res
)
=>
{
yh
=
res
.
data
.
data
;
},
);
}
//let cj='成交单价-最低成交价格(标准单价-符合人数[成人,儿童,老人]条件的最高少价)'
let
chajia
=
Number
(
this
.
addMsg
.
Unit_Price
)
-
(
this
.
addMsg
.
TC_Price
-
yh
);
let
ewtc
=
chajia
>
0
?
chajia
*
0.5
*
num
:
chajia
*
num
;
//额外提成
this
.
addMsg
.
Commission
=
(
Number
(
this
.
addMsg
.
PreferPrice
)
*
0.01
+
ewtc
).
toFixed
(
2
);
this
.
addMsg
.
CommissionShareMoney
=
"0"
;
if
((
this
.
addMsg
.
CustomerType
==
1
||
this
.
addMsg
.
CustomerType
==
2
)
&&
this
.
addMsg
.
CommissionSharePeople
!=
""
)
{
if
(
this
.
addMsg
.
CommissionSharePeople
!=
"-1"
)
{
if
(
this
.
addMsg
.
Commission
>
0
)
{
this
.
addMsg
.
CommissionShareMoney
=
this
.
addMsg
.
Commission
/
2
;
this
.
addMsg
.
Commission
=
this
.
addMsg
.
Commission
-
this
.
addMsg
.
CommissionShareMoney
;
}
else
{
this
.
addMsg
.
CommissionShareMoney
=
"0"
;
}
}
}
},
//预计用房数
getHouseNo
()
{
//算法:((成人+儿童占床数+老人-(三人房数量*3))-单房数)/2+单房数+三人房数量 8.7新增单地接儿童不占床 减去 儿童不占床
let
etbzc
=
0
;
if
(
this
.
addMsg
.
GroupType
==
4
)
{
etbzc
=
this
.
addMsg
.
ChirdNoNeedBedNum
?
Number
(
this
.
addMsg
.
ChirdNoNeedBedNum
)
:
0
;
}
this
.
addMsg
.
PredictRoomNum
=
(
Number
(
this
.
addMsg
.
AirticketNum
)
+
(
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNeedBedNum
)
-
etbzc
+
Number
(
this
.
addMsg
.
OldPeopleNum
))
-
Number
(
this
.
addMsg
.
TripleRoomNum
)
*
3
-
Number
(
this
.
addMsg
.
SingleRoomNum
))
/
2
+
Number
(
this
.
addMsg
.
SingleRoomNum
)
+
Number
(
this
.
addMsg
.
TripleRoomNum
);
},
getNumber
()
{
if
(
this
.
addMsg
.
GroupType
==
4
&&
parseInt
(
this
.
addMsg
.
ChirdNoNeedBedNum
)
>
parseInt
(
this
.
addMsg
.
AirticketNum
)
)
{
this
.
addMsg
.
ChirdNoNeedBedNum
=
0
;
this
.
Error
(
"儿童不占床数不能大于单地接人数!"
);
this
.
$forceUpdate
();
return
;
}
let
ChirdNum
=
this
.
addMsg
.
ChirdNoNeedBedNum
*
1
+
this
.
addMsg
.
ChirdNeedBedNum
*
1
;
if
(
this
.
addMsg
.
GroupType
==
4
)
{
ChirdNum
=
0
;
}
//儿童人数
this
.
addMsg
.
ChirdNum
=
this
.
addMsg
.
ChirdNoNeedBedNum
*
1
+
this
.
addMsg
.
ChirdNeedBedNum
*
1
;
//签证人数
this
.
addMsg
.
VisaNum
=
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
ChirdNum
+
Number
(
this
.
addMsg
.
BabyNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
);
//保险人数
this
.
addMsg
.
SafeNum
=
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
ChirdNum
+
Number
(
this
.
addMsg
.
BabyNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
);
//总人数
this
.
TotalNumber
=
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
ChirdNum
+
Number
(
this
.
addMsg
.
BabyNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
);
//座位数
var
SeatNum
=
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
-
(
Number
(
this
.
addMsg
.
ESeatNum
)
+
Number
(
this
.
addMsg
.
FSeatNum
));
this
.
addMsg
.
YSeatNum
=
SeatNum
<
0
?
0
:
SeatNum
;
if
(
this
.
addMsg
.
GroupType
==
4
)
{
this
.
addMsg
.
YSeatNum
=
0
;
}
this
.
autoRemarks
(
"VisaNum"
,
"不要签证数量"
);
},
//计算价格
getTotalPrice
(
t
)
{
if
(
t
===
3
)
{
if
(
parseFloat
(
this
.
addMsg
.
Unit_Price
).
toString
()
===
"NaN"
)
{
this
.
$message
.
error
(
"请输入正确的价格!"
);
this
.
addMsg
.
Unit_Price
=
this
.
addMsg
.
TC_Price
;
return
;
}
if
(
parseFloat
(
this
.
addMsg
.
Unit_Price
)
<
this
.
addMsg
.
TC_Price
)
{
this
.
$message
.
error
(
"成交单价必须大于等于本团单价!"
);
this
.
addMsg
.
Unit_Price
=
this
.
addMsg
.
TC_Price
;
return
;
}
if
(
parseFloat
(
this
.
SingleDMCPrice
)
<
this
.
SingleDMCPricex
)
{
this
.
$message
.
error
(
"成交单价必须大于等于本团单价!"
);
this
.
SingleDMCPrice
=
this
.
SingleDMCPricex
;
return
;
}
}
this
.
addMsg
.
ChirdNum
=
this
.
addMsg
.
ChirdNoNeedBedNum
*
1
+
this
.
addMsg
.
ChirdNeedBedNum
*
1
;
var
DiscountPrice
=
0
;
//早鸟优惠价格
//享受早鸟优惠
if
(
this
.
priceObj
.
IsBirdDiscount
==
1
)
{
DiscountPrice
=
Number
(
this
.
priceObj
.
DiscountPrice
);
}
//成人价格=成人人数*(成交单价-早鸟优惠)
let
chengren
=
Number
(
this
.
addMsg
.
ManNum
)
*
(
Number
(
this
.
addMsg
.
Unit_Price
)
-
DiscountPrice
);
//儿童价格=儿童人数*(单价-早鸟优惠+儿童附加费)
let
ertong
=
Number
(
this
.
addMsg
.
ChirdNum
)
*
(
Number
(
this
.
addMsg
.
Unit_Price
)
-
DiscountPrice
+
Number
(
this
.
priceObj
.
BabyChargePrice
));
//婴儿价格=婴儿人数*婴儿价格
let
yinger
=
Number
(
this
.
addMsg
.
BabyNum
)
*
(
Number
(
this
.
priceObj
.
BabyPrice
));
//老人价格=老人人数*(单价-早鸟优惠+老人附加费)
let
laoren
=
Number
(
this
.
addMsg
.
OldPeopleNum
)
*
(
Number
(
this
.
addMsg
.
Unit_Price
)
-
this
.
priceObj
.
DiscountPrice
+
this
.
priceObj
.
OldManChargePrice
);
//杂费签证费
let
zafeiqianzhen
=
this
.
priceObj
.
OtherPrice
*
(
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
))
+
this
.
priceObj
.
VisaPrice
*
(
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
))
-
this
.
priceObj
.
BackVisaPrice
*
(
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
BabyNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
-
Number
(
this
.
addMsg
.
VisaNum
));
//单房价格=单房人数*单房差价格
let
danfang
=
Number
(
this
.
addMsg
.
SingleRoomNum
)
*
this
.
priceObj
.
SingleRoomPrice
;
//儿童占床、不占床价格
let
ertongbed
=
this
.
priceObj
.
ChildNeedPrice
*
Number
(
this
.
addMsg
.
ChirdNeedBedNum
)
-
this
.
priceObj
.
ChildNoNeedPrice
*
(
Number
(
this
.
addMsg
.
ChirdNum
)
-
Number
(
this
.
addMsg
.
ChirdNeedBedNum
));
//联运
let
lianyun
=
(
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
))
*
(
Number
(
this
.
stratPrice
)
+
Number
(
this
.
returnPrice
));
//单地接
let
dandijie
=
0
;
if
(
this
.
addMsg
.
GroupType
==
4
)
{
dandijie
=
this
.
SingleDMCPrice
*
Number
(
this
.
addMsg
.
AirticketNum
)
-
this
.
priceObj
.
ChildNoNeedPrice
*
Number
(
this
.
addMsg
.
ChirdNoNeedBedNum
);
ertong
=
0
;
ertongbed
=
0
;
zafeiqianzhen
=
0
;
}
else
{
dandijie
=
this
.
priceObj
.
SingleDMCPrice
*
Number
(
this
.
addMsg
.
AirticketNum
);
}
//退景点费用
var
refundScenicPrice
=
this
.
ScenicRefundMoney
*
(
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
));
//总应收价格
this
.
addMsg
.
PreferPrice
=
dandijie
+
lianyun
+
chengren
+
ertong
+
yinger
+
laoren
+
zafeiqianzhen
+
danfang
+
ertongbed
-
refundScenicPrice
;
this
.
getTicheng
();
if
(
!
t
)
{
this
.
getTypePrice
();
}
},
//提交表单验证
submitForm
(
addMsg
)
{
if
(
this
.
TotalNumber
==
0
)
{
this
.
$message
.
error
(
'总人数不能小于1人'
)
return
}
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
saveOrder
();
}
else
{
return
false
;
}
});
},
//关闭窗口
cancelSubmit
()
{
this
.
clearMsg
();
this
.
$emit
(
"close"
);
},
//清空表单信息
clearMsg
()
{
this
.
addMsg
=
{
price
:
0
,
GroupTypeNeedHouse
:
0
,
OrderId
:
0
,
OneSex
:
0
,
TCID
:
0
,
CustomerType
:
""
,
GroupType
:
""
,
IndustryCategory
:
""
,
ContactName
:
""
,
ContactMobile
:
""
,
CustomerId
:
""
,
DepartureCityId
:
0
,
ReturnArriveCityId
:
""
,
IsIntermodal
:
"2"
,
IsReturnIntermodal
:
"2"
,
Unit_Price
:
0
,
TC_Price
:
0
,
ManNum
:
0
,
// 成人数量
ChirdNum
:
0
,
// 小孩数量
ChirdNoNeedBedNum
:
0
,
ChirdNeedBedNum
:
0
,
BabyNum
:
0
,
OldPeopleNum
:
0
,
SingleRoomNum
:
0
,
PreferPrice
:
0
,
YSeatNum
:
0
,
ESeatNum
:
0
,
FSeatNum
:
0
,
Commission
:
0
,
ClientSource
:
0
,
BrandId
:
0
,
TradeWay
:
"2"
,
PlatformAccount
:
""
,
PlatformOrder
:
""
,
GuestNum
:
0
,
IsChildrenTour
:
0
,
IsBirdDiscount
:
0
,
PredictRoomNum
:
0
,
BigRoomNum
:
0
,
TripleRoomNum
:
0
,
TradeDate
:
""
,
CostType
:
""
,
Remarks
:
""
,
VisaNum
:
0
,
SafeNum
:
0
,
AirticketNum
:
0
,
ScenicRefundArr
:
[],
GoCityTime
:
""
,
BackCityTime
:
""
,
CommissionSharePeople
:
0
,
CommissionShareMoney
:
0
,
OrderForm
:
"1"
,
SonControlID
:
"-1"
,
IsShowMessagesMoney
:
"2"
,
QuotationUrl
:
""
,
//单团附件
LureEmpId
:
0
,
//引流id
CRMGuestId
:
0
,
//客人ID
}
this
.
remarkMsg
=
{
zc
:
""
,
bzc
:
""
,
fjf
:
""
,
ye
:
""
,
lr
:
""
,
dd
:
""
,
df
:
""
,
dc
:
""
,
srf
:
""
,
qz
:
""
,
qzf
:
""
,
}
if
(
this
.
pagesTitle
==
'当地游产品'
){
this
.
addMsg
.
GroupType
=
"1"
}
this
.
clientSourceList
=
[];
this
.
addMsg
.
ScenicRefundArr
=
[];
},
saveOrder
()
{
// 判断单团类型
if
(
this
.
addMsg
.
GroupType
==
2
)
{
if
(
this
.
addMsg
.
IndustryCategory
==
""
)
{
this
.
Error
(
"请填写行业类别!"
);
return
;
}
if
(
this
.
addMsg
.
QuotationUrl
==
""
)
{
this
.
Error
(
"请上传附件!"
);
return
;
}
}
// 选择联运,联运备注必填
if
(
this
.
addMsg
.
IsIntermodal
==
1
||
this
.
addMsg
.
IsReturnIntermodal
==
1
)
{
if
(
!
this
.
addMsg
.
UnionRemark
)
{
this
.
Error
(
"请填写联运备注!"
);
return
;
}
}
//验证人数和机位数 20190807 修改 如果是不是单地接才判断
if
(
this
.
addMsg
.
GroupType
!==
"4"
&&
this
.
addMsg
.
GroupType
!==
"3"
)
{
if
(
this
.
addMsg
.
ChirdNoNeedBedNum
==
""
)
{
this
.
addMsg
.
ChirdNoNeedBedNum
=
0
;
}
if
(
this
.
addMsg
.
ChirdNeedBedNum
==
""
)
{
this
.
addMsg
.
ChirdNeedBedNum
=
0
;
}
if
(
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
!=
Number
(
this
.
addMsg
.
YSeatNum
)
+
Number
(
this
.
addMsg
.
ESeatNum
)
+
Number
(
this
.
addMsg
.
FSeatNum
)
)
{
this
.
$message
.
warning
(
"人数和机位数不相等!"
);
return
;
}
if
(
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
+
Number
(
this
.
addMsg
.
BabyNum
)
<
Number
(
this
.
addMsg
.
VisaNum
)
)
{
this
.
$message
.
warning
(
"签证数量不能大于人数总和!"
);
return
;
}
if
(
Number
(
this
.
addMsg
.
AirticketNum
)
+
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
ChirdNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
+
Number
(
this
.
addMsg
.
BabyNum
)
<
Number
(
this
.
addMsg
.
SafeNum
)
)
{
this
.
$message
.
warning
(
"保险数量不能大于人数总和!"
);
return
;
}
if
(
Number
(
this
.
addMsg
.
ChirdNum
)
-
Number
(
this
.
addMsg
.
ChirdNeedBedNum
)
+
Number
(
this
.
addMsg
.
BabyNum
)
>
Number
(
this
.
addMsg
.
ManNum
)
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
+
Number
(
this
.
addMsg
.
ChirdNeedBedNum
)
)
{
this
.
$message
.
warning
(
"儿童占床数量不足!"
);
return
;
}
if
(
Number
(
this
.
addMsg
.
ChirdNeedBedNum
)
>
Number
(
this
.
addMsg
.
ChirdNum
)
)
{
this
.
$message
.
warning
(
"儿童占床不能大于儿童数!"
);
return
;
}
}
if
(
this
.
CurrentUserInfo
.
EmployeeId
==
this
.
createByInfo
)
{
if
(
this
.
addMsg
.
CommissionSharePeople
==
"-1"
)
{
this
.
addMsg
.
CommissionShareMoney
=
"0"
;
}
}
//单地接
if
(
this
.
addMsg
.
GroupType
==
4
)
{
this
.
addMsg
.
TC_Price
=
this
.
SingleDMCPricex
;
//地接时 本团单价
this
.
addMsg
.
Unit_Price
=
this
.
SingleDMCPrice
;
// 地接时 成交单价
if
(
this
.
addMsg
.
ChirdNoNeedBedNum
==
""
)
{
this
.
addMsg
.
ChirdNoNeedBedNum
=
0
;
}
}
let
ChirdNum
=
Number
(
this
.
addMsg
.
ChirdNum
);
if
(
this
.
addMsg
.
GroupType
==
4
)
{
ChirdNum
=
0
;
}
// 判断交易方式是外交平台和平台付款
if
(
this
.
addMsg
.
TradeWay
==
1
||
this
.
addMsg
.
TradeWay
==
3
)
{
if
(
this
.
addMsg
.
PlatformAccount
==
""
)
{
this
.
Error
(
"请选择收款账户!"
);
return
;
}
}
this
.
addMsg
.
TCID
=
this
.
priceObj
.
TCID
;
this
.
addMsg
.
GuestNum
=
Number
(
this
.
addMsg
.
ManNum
)
+
ChirdNum
+
Number
(
this
.
addMsg
.
OldPeopleNum
)
+
Number
(
this
.
addMsg
.
BabyNum
)
+
Number
(
this
.
addMsg
.
AirticketNum
);
this
.
addMsg
.
IsChildrenTour
=
this
.
priceObj
.
IsSupportChildren
;
this
.
addMsg
.
IsBirdDiscount
=
this
.
priceObj
.
IsBirdDiscount
;
let
url
if
(
this
.
PProductType
==
1
){
url
=
'sellorder_post_SetOrderInfo_02'
}
else
if
(
this
.
PProductType
==
2
){
url
=
'sellorder_post_SetTravelTeamOrderForB2B'
//团下单接口sellorder_post_SetOrderInfoForB2B
}
this
.
apipost
(
url
,
this
.
addMsg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
$refs
[
"addMsg"
].
resetFields
();
this
.
clearMsg
();
//调用父组件方法
this
.
$emit
(
"success"
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
);
},
//获取所有账户列表
getPlatformAccount
(
typeIdtwo
)
{
let
platBranchId
=
this
.
CurrentUserInfo
.
RB_Branch_id
;
this
.
apipost
(
"FinancialInstitutions_post_GetALLAccountList"
,
{
TypeId
:
typeIdtwo
,
BranchId
:
platBranchId
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
PlatformAccountList1
=
res
.
data
.
data
;
}
});
},
//获取外交平台账户列表
getPlatformAccountNew
()
{
this
.
apipost
(
"Financial_get_GetDiplomacyPlatformList"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
DiplomacyPlatformAccountList
=
[];
let
data
=
res
.
data
.
data
;
data
.
forEach
((
item
)
=>
{
let
obj
=
{
Alias
:
item
.
Name
,
ID
:
item
.
ID
,
};
this
.
DiplomacyPlatformAccountList
.
push
(
obj
);
});
}
});
},
//可退景点
getScenicRefund
(
TCID
)
{
this
.
apipost
(
"sellorder_get_GetScenicRefundList"
,
{
TCID
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
ScenicRefundList
=
res
.
data
.
data
;
this
.
ScenicRefundList
.
forEach
((
item
)
=>
{
item
[
"ScenicName"
]
=
item
.
CouponsName
+
" -¥"
+
this
.
moneyFormat
(
item
.
RefundMoney
);
});
}
},
);
},
//获取交易方式
getTradeWay
()
{
this
.
apipost
(
"sellorder_get_GetSellTradeWayEnumList"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
tradeWayList
=
res
.
data
.
data
;
}
},
);
},
//客户品牌
changeCustomer
()
{
//给非直客 隐藏电话姓名赋值
let
obj
=
this
.
customerList
.
find
(
(
item
)
=>
item
.
customerId
==
this
.
addMsg
.
CustomerId
);
this
.
customerId
=
obj
.
customerId
;
this
.
createByInfo
=
obj
.
createByInfo
;
this
.
addMsg
.
ContactName
=
obj
.
customerName
+
"("
+
obj
.
contact
+
")"
;
this
.
addMsg
.
ContactMobile
=
obj
.
contactNumber
;
if
(
this
.
CurrentUserInfo
.
EmployeeId
!=
this
.
createByInfo
)
{
this
.
addMsg
.
CommissionSharePeople
=
this
.
createByInfo
;
this
.
isUpdateSharePeople
=
true
;
}
else
{
this
.
addMsg
.
CommissionSharePeople
=
"-1"
;
this
.
isUpdateSharePeople
=
false
;
}
this
.
apipost
(
"app_today_visit_GetCustomerBrandByCustomerId"
,
{
customerInfoId
:
this
.
addMsg
.
CustomerId
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
.
BrandId
=
""
;
this
.
customerBrandList
=
res
.
data
.
data
;
}
});
},
//获取客户列表
getCustomer
()
{
this
.
apipost
(
"app_today_visit_GetOrderMyCustomerList"
,
{
typeId
:
this
.
addMsg
.
CustomerType
,
lineId
:
this
.
priceObj
.
LineID
,
IsLineId
:
1
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
customerList
=
res
.
data
.
data
;
}
},
(
err
)
=>
{}
);
},
//获取客户来源
getClientSource
()
{
this
.
addMsg
.
ClientSource
=
""
;
this
.
apipost
(
"sellorder_get_GetSellClientSourceEnumList"
,
{
typeId
:
this
.
addMsg
.
CustomerType
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
clientSourceList
=
res
.
data
.
data
;
}
}
);
},
//参团类型
getJoinType
()
{
this
.
apipost
(
"sellorder_get_GetOrderJoinEnumList"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
joinTypeList
=
res
.
data
.
data
;
this
.
joinTypeList
.
splice
(
-
1
)
this
.
joinTypeList
.
splice
(
-
1
)
this
.
joinTypeList
.
splice
(
-
1
)
}
},
);
},
//获取客户类型
getCustomerType
()
{
this
.
apipost
(
"sellorder_get_GetSellClientTypeEnumList"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
this
.
showCity
)
{
this
.
customerTypeList
=
res
.
data
.
data
;
}
else
{
this
.
customerTypeList
=
res
.
data
.
data
.
filter
(
item
=>
item
.
Id
<
3
);
}
}
},
);
},
//出发城市
getCityList
()
{
this
.
apipost
(
"sellorder_get_GetAllStartCity"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
startCityList
=
res
.
data
.
data
;
}
});
},
//获取员工列表
getEmployee
()
{
var
qEmpMsg
=
{
BranchId
:
"-1"
,
IsLeave
:
0
,
};
//员工
this
.
apipost
(
"admin_get_EmployeeGetList"
,
qEmpMsg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
employeeList
=
res
.
data
.
data
;
}
}
);
},
//改变平台获取备注
getRemarkDetail
(
id
)
{
this
.
customerBrandList
.
forEach
((
x
)
=>
{
if
(
x
.
dictId
==
id
)
{
let
msg
=
x
.
brandName
+
"订单号"
+
this
.
addMsg
.
PlatformOrder
;
this
.
addMsg
.
Remarks
=
msg
;
}
this
.
$forceUpdate
();
});
},
//预览文件
previewFile
(
e
)
{
window
.
open
(
this
.
addMsg
.
QuotationUrl
,
"_blank"
);
return
;
},
//上传文件
uploadFileBtn
(
file
)
{
if
(
file
.
file
.
size
>
1024
*
1024
*
100
)
{
this
.
$message
.
warning
(
"上传文件不能大于100M"
);
this
.
$refs
[
"my-upload"
].
clearFiles
();
return
;
}
this
.
uploadLloading
=
true
;
//上传
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/Temporary/"
;
this
.
$message
.
info
(
this
.
$t
(
"tips.shangchuanzhong"
));
this
.
UploadSelfFileT
(
path
,
newArr
,
(
x
)
=>
{
this
.
addMsg
.
QuotationUrl
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
this
.
$message
.
success
(
this
.
$t
(
"tips.scchenggong"
));
this
.
uploadLloading
=
false
;
});
},
//移除文件
removeFile
(
e
)
{
this
.
addMsg
.
QuotationUrl
=
""
;
},
//切换客人来源
changeClientSource
()
{
let
text
=
'飞猪订单'
if
(
this
.
addMsg
.
ClientSource
==
4
&&
this
.
addMsg
.
Remarks
.
indexOf
(
text
)
==
-
1
)
{
this
.
addMsg
.
Remarks
=
'飞猪订单;'
+
this
.
addMsg
.
Remarks
}
},
//获取团期价格信息
getTravelPirceInfo
()
{
var
cmdStr
=
""
;
//常规团
if
(
this
.
PProductType
==
1
)
{
cmdStr
=
"TaskManagemnet_get_GetSellProductCenter"
;
}
//包机团
else
if
(
this
.
PProductType
==
2
)
{
cmdStr
=
"sellorder_post_GetTravelTeamProductCenter"
;
}
var
priceMsg
=
{
pageIndex
:
1
,
pageSize
:
10
,
TCID
:
this
.
PTCID
,
BranchId
:
this
.
PBranchId
,
};
this
.
apipost
(
cmdStr
,
priceMsg
,
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempData
=
res
.
data
.
data
.
pageData
;
if
(
tempData
&&
tempData
.
length
>
0
)
{
this
.
priceObj
=
tempData
[
0
];
}
}
}
);
}
},
mounted
()
{
const
that
=
this
window
.
onresize
=
()
=>
{
return
(()
=>
{
window
.
fullHeight
=
document
.
documentElement
.
clientHeight
that
.
fullHeight
=
window
.
fullHeight
})()
}
if
(
this
.
fullHeight
>
700
){
this
.
ScreenHeight
=
'600px'
}
else
{
this
.
ScreenHeight
=
'300px'
}
this
.
CurrentUserInfo
=
this
.
getLocalStorage
();
//获取客户类型
this
.
getCustomerType
();
// 当前线路报价
this
.
getMinPrice
(
this
.
productObj
.
LineID
)
// 可退景点
this
.
getScenicRefund
(
this
.
PTCID
);
//获取所有账户列表
this
.
getPlatformAccount
(
this
.
productObj
.
PlatformAccountTypeId
)
this
.
getPlatformAccountNew
()
//参团类型
this
.
getJoinType
();
//获取员工列表
this
.
getEmployee
();
//获取出发、返回城市
this
.
getCityList
();
//获取交易方式
this
.
getTradeWay
();
},
watch
:
{
fullHeight
(
val
)
{
if
(
!
this
.
timer
)
{
this
.
fullHeight
=
val
this
.
timer
=
true
let
that
=
this
setTimeout
(
function
(){
that
.
timer
=
false
},
400
)
}
if
(
this
.
fullHeight
>
700
){
this
.
ScreenHeight
=
'600px'
}
else
{
this
.
ScreenHeight
=
'300px'
}
},
productObj
:{
handler
(
oldValue
,
newVal
){
this
.
clearMsg
();
this
.
getTravelPirceInfo
()
this
.
addMsg
.
DepartureCityId
=
oldValue
.
StartCityID
this
.
addMsg
.
ReturnArriveCityId
=
oldValue
.
ReturnArriveCityId
this
.
addMsg
.
GoCityTime
=
this
.
starTime
=
oldValue
.
StartCityTime
;
this
.
addMsg
.
BackCityTime
=
this
.
endTime
=
oldValue
.
BackCityTime
;
this
.
priceObj
=
JSON
.
parse
(
JSON
.
stringify
(
oldValue
))
if
(
this
.
pagesTitle
==
'当地游产品'
){
let
str
=
''
if
(
oldValue
.
OtherPrice
>
0
)
{
str
+=
'杂费'
+
oldValue
.
OtherPrice
+
'/人;'
}
this
.
addMsg
.
Remarks
=
str
this
.
otherRemark
=
str
;
this
.
SingleDMCPrice
=
oldValue
.
SingleDMCPrice
;
this
.
SingleDMCPricex
=
oldValue
.
SingleDMCPrice
;
}
// crm自动登陆传过来的参数
if
(
this
.
$route
.
query
.
crmOrderObj
)
{
this
.
crmOrderObj
=
JSON
.
parse
(
this
.
$route
.
query
.
crmOrderObj
)
this
.
addMsg
.
LureEmpId
=
this
.
crmOrderObj
.
LureEmpId
//引流id
this
.
addMsg
.
CRMGuestId
=
this
.
crmOrderObj
.
CRMGuestId
//客人ID
}
},
deep
:
true
},
//监听TCID变化
PTCID
:
function
(
oldValue
,
newVal
)
{
// if (oldValue != newVal) {
// this.clearMsg();
// this.getTravelPirceInfo()
// }
}
}
};
</
script
>
\ 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