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
78ea32a3
Commit
78ea32a3
authored
Sep 23, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改报价单
parent
37a90b8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1248 additions
and
0 deletions
+1248
-0
DirectNewQuotation.vue
...s/TravelManager/TravelNewQuotation/DirectNewQuotation.vue
+1066
-0
QuotationNewPrice.vue
...ts/TravelManager/TravelNewQuotation/QuotationNewPrice.vue
+172
-0
quoTation.vue
...ponents/TravelManager/TravelQuotationCenter/quoTation.vue
+10
-0
No files found.
src/components/TravelManager/TravelNewQuotation/DirectNewQuotation.vue
0 → 100644
View file @
78ea32a3
<
style
>
.DQ_copyTopDiv
{
width
:
373px
;
height
:
110px
;
font-size
:
12px
;
padding
:
15px
;
overflow
:
auto
;
background-color
:
#f5f5f5
;
}
.DQ_copyTopDiv
::-webkit-scrollbar
{
width
:
4px
;
height
:
8px
;
}
.DQ_copyTopDiv
::-webkit-scrollbar-thumb
{
border-radius
:
4px
;
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#c9c9c9
;
}
.DQ_copyTopDiv
::-webkit-scrollbar-track
{
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
4px
;
background
:
#ededed
;
}
.DQ_comSpan
{
display
:
inline-block
;
width
:
40px
;
height
:
20px
;
background-color
:
#2aaef2
;
text-align
:
center
;
line-height
:
20px
;
color
:
#fff
;
}
.DQ_details
{
width
:
100%
;
margin-top
:
10px
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.DQ_dateList
{
margin-top
:
30px
;
}
.DQ_rightDate
{
float
:
right
;
margin-top
:
18px
;
font-size
:
12px
;
}
.DanCheked
{
background-color
:
#2aa872
;
color
:
#fff
!important
;
}
.DQ_Ulist
li
{
list-style-type
:
none
;
display
:
block
;
cursor
:
pointer
;
border
:
1px
solid
#f5f5f5
;
padding
:
3px
;
margin-bottom
:
10px
;
border-radius
:
5px
;
}
.DQckedLi
{
border-color
:
#2aa872
!important
;
}
.DQ_Ulist
li
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
}
.DQ_copyBtn
{
float
:
right
;
margin
:
0
0
0
30px
;
}
.DQ_Otcopy
{
float
:
right
;
}
.DrightList
{
margin-left
:
80px
;
}
.ScienTicket
.el-form-item__content
{
margin-left
:
0
!important
;
}
.EditQuotation
{
position
:
absolute
;
color
:
#e95252
;
right
:
-27px
;
top
:
-18px
;
}
</
style
>
<
template
>
<div
v-if=
"isShow"
class=
"DirectQuotation clearfix"
>
<el-form
label-width=
"100px"
:model=
"currentOffer"
:rules=
"rules"
ref=
"currentOfferFrom"
>
<div
class=
"switchDiv clearfix"
style=
"width:98%;"
>
<div
class=
"DirectPriceCenter"
>
<div
class=
"singlePrice"
style=
"margin-top:20px;"
>
<div
class=
"singleDiv"
>
<span
class=
"TMTitle"
><i></i>
{{
currentOffer
.
OfferName
}}
</span>
<div
class=
"DQ_rightDate"
>
<el-popover
popper-class=
"salsSetPrice"
width=
"400"
trigger=
"click"
>
<div>
<div
class=
"DQ_copyTopDiv"
>
<ul
class=
"DQ_Ulist"
>
<li
v-for=
"item in otherTeamInfo"
:class=
"
{'DQckedLi':item.IsCheck}" @click="getReference(item)"
:key="item.subCode">
{{
item
.
title
}}
</li>
</ul>
</div>
<div
class=
"clearfix DQ_dateList"
>
<div
class=
"DQ_left"
>
<el-form-item
label=
"报价单选择"
style=
"margin-left:-20px;"
>
<el-select
class=
'w200'
v-model=
"offerId"
>
<el-option
v-for=
"item in otherTemObj"
:label=
'item.value'
:value=
'item.offerId'
:key=
'item.offerId'
>
</el-option>
</el-select>
</el-form-item>
</div>
<div
class=
"DQ_right DQ_Otcopy"
>
<input
type=
"button"
class=
"normalBtn"
@
click=
"copyDerect"
value=
"复制"
/>
</div>
</div>
</div>
</el-popover>
</div>
</div>
<div
class=
"leftGou"
>
<div
class=
"Dcircle"
></div>
<div
class=
"DLingCenter"
></div>
<div
class=
"Dcircle DalastCir"
></div>
</div>
<div
class=
"leftGou RightGou"
>
<div
class=
"Dcircle"
></div>
<div
class=
"DLingCenter"
></div>
<div
class=
"Dcircle DalastCir"
></div>
</div>
</div>
<div
class=
"singlePrice clearfix"
>
<CostPrice
ref=
"CostPrice"
@
headCallBack=
"setOfferCostPrice"
:OfferCostPrice=
"currentOffer.OfferCostPrice"
:lineName=
"postData.LineName"
:lineTeamName=
"postData.LtName"
></CostPrice>
</div>
</div>
<div
class=
"DirectRightPrice"
style=
"margin-left:20px;"
>
<div
class=
"dingjiaDiv"
>
<span
class=
"TMTitle"
><i></i>
定价
</span>
</div>
<div>
<div
class=
"Dleftname"
></div>
<div
class=
"DrightList"
>
<el-checkbox
style=
"margin-left:25px;"
v-model=
"currentOffer.QuotationPrice.IsSupportChildren"
:checked=
"currentOffer.QuotationPrice.IsSupportChildren===CheckedVaule"
:true-label=
"CheckedVaule"
:false-label=
"UnCheckedVaule"
>
不支持儿童出游
</el-checkbox>
<el-form-item
label=
"成本人数"
style=
"margin-left:70px;"
>
<el-select
class=
'w120'
v-model=
'currentOffer.QuotationPrice.PeopleNumber'
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'noLimit'
></el-option>
<el-option
v-for=
"item in currentOffer.OfferCostPrice.CostNumberList"
:label=
'item.PeopleNumber'
:value=
'item.PeopleNumber'
:key=
'item.PeopleNumber'
>
</el-option>
</el-select>
</el-form-item>
</div>
</div>
<div
class=
"clearfix"
>
<div
class=
"Dleftname"
>
标准
</div>
<div
class=
"DrightList"
>
<el-form-item
:prop=
"'QuotationPrice.B2BMemberPrice'"
:rules=
"rules.B2BMemberPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.B2BMemberPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'B2BMemberPrice')"
class=
"w200 ComSeat"
>
<template
slot=
"prepend"
>
同行会员
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.B2BPrice'"
:rules=
"rules.B2BPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.B2BPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'B2BPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
同行
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.B2CMemberPrice'"
:rules=
"rules.B2CMemberPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.B2CMemberPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'B2CMemberPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
直客会员
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.B2CPrice'"
:rules=
"rules.B2CPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.B2CPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'B2CPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
直客
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.BabyPrice'"
:rules=
"rules.BabyPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.BabyPrice"
@
keyup
.
native=
"checkInteger(currentOffer.QuotationPrice,'BabyPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
婴儿
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.SingleDMCPrice'"
:rules=
"rules.SingleDMCPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.SingleDMCPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'SingleDMCPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
单地接
</
template
>
</el-input>
</el-form-item>
</div>
</div>
<div
class=
"clearfix"
>
<div
class=
"Dleftname"
>
增收
</div>
<div
class=
"DrightList"
>
<el-form-item
:prop=
"'QuotationPrice.ChildNeedPrice'"
:rules=
"rules.ChildNeedPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.ChildNeedPrice"
@
keyup
.
native=
"checkInteger(currentOffer.QuotationPrice,'ChildNeedPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
儿童占床
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.BabyChargePrice'"
:rules=
"rules.BabyChargePrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.BabyChargePrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'BabyChargePrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
儿童附加费
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.OldManChargePrice'"
:rules=
"rules.OldManChargePrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.OldManChargePrice"
@
keyup
.
native=
"checkInteger(currentOffer.QuotationPrice,'OldManChargePrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
老人附加费
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.VisaPrice'"
:rules=
"rules.VisaPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.VisaPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'VisaPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
签证费
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.SingleRoomPrice'"
:rules=
"rules.SingleRoomPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.SingleRoomPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'SingleRoomPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
单房差
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.SafeMoney'"
:rules=
"rules.SafeMoney"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.SafeMoney"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'SafeMoney')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
保险
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.OtherPrice'"
:rules=
"rules.OtherPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.OtherPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'OtherPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
杂费
</
template
>
</el-input>
</el-form-item>
</div>
</div>
<!-- <div class="clearfix">
<div class="Dleftname"></div>
<div class="DrightList">
<el-form-item :prop="'QuotationPrice.AirticketMoney'" :rules="rules.AirticketMoney">
<el-input placeholder="" v-model="currentOffer.QuotationPrice.AirticketMoney"
@keyup.native="checkPrice(currentOffer.QuotationPrice,'AirticketMoney')" class="w200 ComSeat">
<template slot="prepend">机票</template>
</el-input>
</el-form-item>
</div>
</div> -->
<div
class=
"clearfix"
>
<div
class=
"Dleftname"
>
减免
</div>
<div
class=
"DrightList"
>
<el-form-item
:prop=
"'QuotationPrice.ChildNoNeedPrice'"
:rules=
"rules.ChildNoNeedPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.ChildNoNeedPrice"
@
keyup
.
native=
"checkInteger(currentOffer.QuotationPrice,'ChildNoNeedPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
儿童不占床
</
template
>
</el-input>
</el-form-item>
<el-form-item
style=
"display:none;"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.RebatePrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'RebatePrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
同行返佣
</
template
>
</el-input>
</el-form-item>
<el-form-item
style=
"display:none;"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.DiscountPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'DiscountPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
早鸟优惠
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.BackVisaPrice'"
:rules=
"rules.BackVisaPrice"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.BackVisaPrice"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'BackVisaPrice')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
退签证费
</
template
>
</el-input>
</el-form-item>
<el-form-item
:prop=
"'QuotationPrice.BackSafeMoney'"
:rules=
"rules.BackSafeMoney"
style=
"display:none"
>
<el-input
placeholder=
""
v-model=
"currentOffer.QuotationPrice.BackSafeMoney"
@
keyup
.
native=
"checkPrice(currentOffer.QuotationPrice,'BackSafeMoney')"
class=
"w200 ComSeat"
>
<
template
slot=
"prepend"
>
退保险费
</
template
>
</el-input>
</el-form-item>
</div>
</div>
<div
class=
"DisDirUp"
>
<div
class=
"dingjiaDiv"
>
<span
class=
"TMTitle"
><i></i>
地接合同上传
</span>
</div>
<div>
<el-form-item
style=
"margin-left:-63px;"
>
<el-upload
:http-request=
"uploadFileBtn"
:multiple=
"true"
:show-file-list=
"false"
action=
""
>
<el-button
size=
"small"
type=
"danger"
icon=
"el-icon-upload2"
>
上传
</el-button>
</el-upload>
</el-form-item>
</div>
<div
v-if=
"uploadList.length>0"
>
<el-form-item
label=
"附件列表"
>
<div
class=
"DQ_FileList"
>
<li
v-for=
"item in uploadList"
:key=
"item.subCode"
>
<span
@
click=
"downloadOne(item)"
>
{{item.Name}}--下载
</span>
<i
class=
"el-icon-circle-close-outline"
@
click=
"deleteFile(item)"
></i>
</li>
</div>
</el-form-item>
</div>
</div>
<table
class=
"CostPriceTable ScienTicket"
>
<tr>
<th
width=
"400"
>
景点名
</th>
<th>
门票名
</th>
<th
width=
"200"
>
退款金额
</th>
<th
width=
"150"
>
是否退款
</th>
</tr>
<tr
v-for=
"item in currentOffer.QuotationPrice.QuotationScenicList"
:key=
"item.subCode"
>
<td>
{{item.CouponsName}}
</td>
<td>
{{item.CouponsTicketName}}
</td>
<td>
<el-form-item
v-if=
"item.CanReundMoney==1"
>
<el-input
type=
'text'
v-model=
"item.RefundMoney"
@
keyup
.
native=
"checkPrice(item,'RefundMoney')"
></el-input>
</el-form-item>
</td>
<td>
<el-switch
v-model=
"item.CanReundMoney"
@
change=
"resetRefundMoney(item)"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</td>
</tr>
</table>
</div>
</div>
</el-form>
</div>
</template>
<
script
>
import
CostPrice
from
"../TravelQuotationCenter/CostPrice"
;
export
default
{
props
:
[
"postConfig"
],
data
()
{
var
FlightIdValidate
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
0
)
{
callback
(
new
Error
(
"请选择机票"
));
}
else
{
callback
();
}
};
return
{
noLimit
:
0
,
currentOffer
:
{},
postData
:
""
,
isSubmit
:
true
,
CheckedVaule
:
2
,
UnCheckedVaule
:
1
,
uploadList
:
[],
rules
:
{
//表单必填验证
B2BMemberPrice
:
[
{
required
:
true
,
message
:
"请填写同业会员价"
,
trigger
:
"blur"
}
],
B2BPrice
:
[
{
required
:
true
,
message
:
"请填写同业价"
,
trigger
:
"blur"
}
],
B2CMemberPrice
:
[
{
required
:
true
,
message
:
"请填写直客会员价"
,
trigger
:
"blur"
}
],
B2CPrice
:
[
{
required
:
true
,
message
:
"请填写直客价"
,
trigger
:
"blur"
}
],
ChildNeedPrice
:
[
{
required
:
true
,
message
:
"请填写占床价"
,
trigger
:
"blur"
}
],
ChildNoNeedPrice
:
[
{
required
:
true
,
message
:
"请填写儿童不占床数"
,
trigger
:
"blur"
}
],
BackVisaPrice
:
[
{
required
:
true
,
message
:
"请填写退签证费"
,
trigger
:
"blur"
}
],
BabyPrice
:
[
{
required
:
true
,
message
:
"请填写婴儿价"
,
trigger
:
"blur"
}
],
BabyChargePrice
:
[
{
required
:
true
,
message
:
"请填写附加费"
,
trigger
:
"blur"
}
],
OldManChargePrice
:
[
{
required
:
true
,
message
:
"请填写占床价"
,
trigger
:
"blur"
}
],
VisaPrice
:
[
{
required
:
true
,
message
:
"请填写签证价"
,
trigger
:
"blur"
}
],
OtherPrice
:
[
{
required
:
true
,
message
:
"请填写杂费"
,
trigger
:
"blur"
}
],
SingleRoomPrice
:
[
{
required
:
true
,
message
:
"请填写单房差"
,
trigger
:
"blur"
}
],
SafeMoney
:
[
{
required
:
true
,
message
:
"请填写保险费"
,
trigger
:
"blur"
}
],
// AirticketMoney: [
// {required: true, message: "请填写机票费", trigger: "blur"}
// ],
SingleDMCPrice
:
[
{
required
:
true
,
message
:
"请填写地接价"
,
trigger
:
"blur"
}
]
// RebatePrice: [
// {required: true, message: "请填写同行返佣", trigger: "blur"}
// ],
// DiscountPrice: [
// {required: true, message: "请填写早鸟优惠", trigger: "blur"}
// ],
},
msg
:
{
QStartDate
:
""
,
QEndDate
:
""
},
QuotationList
:
[
{
label
:
"报价单"
,
Id
:
1
},
{
label
:
"报价单"
,
Id
:
1
}
],
//其他团期信息
otherTeamInfo
:
""
,
otherTemObj
:
[],
configId
:
""
,
offerId
:
""
,
offerList
:
[],
isShow
:
false
//数据初始化后再渲染页面
};
},
methods
:
{
//验证
submitForm
(
type
)
{
//提交创建、修改表单
this
.
modifyTeamValue
();
let
that
=
this
;
let
isSuccess
=
false
;
that
.
$refs
[
"currentOfferFrom"
].
validate
(
valid
=>
{
if
(
valid
)
{
isSuccess
=
valid
;
}
else
{
return
false
;
}
});
if
(
isSuccess
)
{
this
.
postData
.
OfferList
.
forEach
(
x
=>
{
if
(
x
.
StartDate
==
null
||
x
.
StartDate
==
""
||
x
.
EndDate
==
null
||
x
.
EndDate
==
""
)
{
isSuccess
=
false
;
this
.
Error
(
"请完善【"
+
x
.
OfferName
+
"】日期范围信息"
);
return
;
}
var
result
=
this
.
validateTeamQuot
(
x
.
OfferCostPrice
,
x
.
QuotationPrice
);
if
(
result
==
-
1
)
{
isSuccess
=
false
;
this
.
Error
(
"请选择【"
+
x
.
OfferName
+
"】的使用成本人数"
);
return
;
}
else
if
(
result
==
0
)
{
isSuccess
=
false
;
this
.
Error
(
"请完善【"
+
x
.
OfferName
+
"】的报价信息"
);
return
;
}
// else if (result == 2) {
// isSuccess = false;
// this.Info(
// "报价单【" +
// x.OfferNumber +
// "】的同业会员价、同业价、直客会员价、直客价不能小于成本价!"
// );
// return;
// }
});
}
if
(
isSuccess
&&
this
.
isSubmit
)
{
this
.
isSubmit
=
false
;
this
.
$parent
.
updateSubmitState
(
this
.
isSubmit
);
this
.
doSubmitConfig
(
type
);
}
},
//验证团期定价
validateTeamQuot
(
offerCostPrice
,
quotationPrice
)
{
if
(
!
(
quotationPrice
.
PeopleNumber
>
0
))
{
return
-
1
;
//没有选择成本人数
}
// this.$commonUtils.isNullOrEmpty(quotationPrice.RebatePrice) ||
// this.$commonUtils.isNullOrEmpty(quotationPrice.AirticketMoney) ||
// this.$commonUtils.isNullOrEmpty(quotationPrice.DiscountPrice) ||
// this.$commonUtils.isNullOrEmpty(quotationPrice.BackSafeMoney)
if
(
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
B2BMemberPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
B2BPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
B2CMemberPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
B2CPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
BabyChargePrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
BabyPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
ChildNeedPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
ChildNoNeedPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
OldManChargePrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
OtherPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
SafeMoney
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
SingleRoomPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
SingleDMCPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
PeopleNumber
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
VisaPrice
)
||
this
.
$commonUtils
.
isNullOrEmpty
(
quotationPrice
.
BackVisaPrice
)
)
{
return
0
;
}
else
{
var
flag
=
1
;
//验证价格不能小于成本价
offerCostPrice
.
CostNumberList
.
forEach
(
item
=>
{
if
(
flag
==
1
&&
quotationPrice
.
PeopleNumber
===
item
.
PeopleNumber
)
{
if
(
quotationPrice
.
B2BMemberPrice
<
this
.
$commonUtils
.
getConvertMoney
(
item
.
TotalMoney
)
||
quotationPrice
.
B2BPrice
<
this
.
$commonUtils
.
getConvertMoney
(
item
.
TotalMoney
)
||
quotationPrice
.
B2CMemberPrice
<
this
.
$commonUtils
.
getConvertMoney
(
item
.
TotalMoney
)
||
quotationPrice
.
B2CPrice
<
this
.
$commonUtils
.
getConvertMoney
(
item
.
TotalMoney
)
)
{
flag
=
2
;
}
}
});
return
flag
;
}
},
modifyChangeValue
(
postDataTemp
)
{
postDataTemp
.
OfferList
.
forEach
(
x
=>
{
if
(
x
.
OfferNumber
==
this
.
currentOffer
.
OfferNumber
)
{
x
.
OfferId
=
this
.
currentOffer
.
OfferId
;
x
.
ConfigID
=
this
.
currentOffer
.
ConfigID
;
x
.
StartDate
=
this
.
currentOffer
.
StartDate
;
x
.
EndDate
=
this
.
currentOffer
.
EndDate
;
x
.
OfferCostPrice
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
currentOffer
.
OfferCostPrice
)
);
x
.
QuotationPrice
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
currentOffer
.
QuotationPrice
)
);
let
contractUrl
=
[];
this
.
uploadList
.
forEach
(
y
=>
{
let
urlInfo
=
{
Name
:
y
.
Name
,
Url
:
y
.
Url
};
contractUrl
.
push
(
urlInfo
);
});
x
.
QuotationPrice
.
ContractUrl
=
JSON
.
stringify
(
contractUrl
);
x
.
QuotationPrice
.
ContractArray
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
uploadList
)
);
}
});
},
modifyTeamValue
()
{
let
postDataTemp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
postData
));
//修改已变动的数据
this
.
modifyChangeValue
(
postDataTemp
);
this
.
postData
=
postDataTemp
;
},
doSubmitConfig
(
travelState
)
{
this
.
postData
.
TravelState
=
travelState
;
this
.
isSubmit
=
true
;
let
comitData
=
{
ID
:
this
.
postData
.
ID
,
OfferList
:
this
.
postData
.
OfferList
,
TravelState
:
this
.
postData
.
TravelState
,
RemoveChild
:
this
.
postData
.
RemoveChild
};
this
.
apipost
(
"travel_post_SetConfigOfferInfo"
,
comitData
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
$router
.
push
({
path
:
"quoTation"
});
this
.
isSubmit
=
true
;
this
.
$parent
.
updateSubmitState
(
this
.
isSubmit
);
}
else
if
(
res
.
data
.
resultCode
==
10009
){
//表单重复提交不处理
}
else
{
this
.
isSubmit
=
true
;
this
.
$parent
.
updateSubmitState
(
this
.
isSubmit
);
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{
}
);
},
firstLoad
()
{
this
.
postData
.
OfferList
.
forEach
((
x
,
index
)
=>
{
if
(
index
==
0
)
{
x
.
IsCheck
=
true
;
this
.
currentOffer
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
postData
.
OfferList
[
index
])
);
if
(
this
.
currentOffer
.
QuotationPrice
.
ContractArray
!=
undefined
&&
this
.
currentOffer
.
QuotationPrice
.
ContractArray
!=
null
)
{
this
.
uploadList
=
this
.
currentOffer
.
QuotationPrice
.
ContractArray
;
}
this
.
initCostLocalHotelSelect
(
this
.
currentOffer
.
OfferCostPrice
,
this
.
postData
);
}
else
{
x
.
IsCheck
=
false
;
}
if
(
x
.
QuotationPrice
.
B2BMemberPrice
==
null
)
{
x
.
QuotationPrice
.
B2BMemberPrice
=
""
;
}
});
this
.
isShow
=
true
;
},
setOfferCostPrice
(
returnValue
)
{
let
offerCostPrice
=
JSON
.
parse
(
JSON
.
stringify
(
returnValue
));
let
currencyNumberList
=
[];
offerCostPrice
.
CurrencyNumberListExt
.
forEach
(
x
=>
{
if
(
x
.
currencyNumberList
.
length
>
0
)
{
x
.
currencyNumberList
.
forEach
(
y
=>
{
currencyNumberList
.
push
(
y
);
});
}
});
offerCostPrice
.
CurrencyNumberList
=
currencyNumberList
;
this
.
currentOffer
.
OfferCostPrice
=
offerCostPrice
;
},
uploadFileBtn
(
file
)
{
//上传
if
(
file
.
file
.
size
>
1024
*
1024
*
100
)
{
this
.
$message
.
warning
(
"文件大小不能超过100M!"
);
return
;
}
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
path
=
"/Upload/DMC/"
;
this
.
$message
.
info
(
"上传中..."
);
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
fileSize
=
file
.
file
.
size
<
1024
?
file
.
file
.
size
:
(
file
.
file
.
size
/
1024
).
toFixed
(
0
);
this
.
saveMsg
=
[];
this
.
saveMsg
.
push
({
Path
:
x
.
data
.
FilePath
,
FileName
:
file
.
file
.
name
,
MD5Sign
:
file
.
file
.
uid
,
FileSize
:
fileSize
});
this
.
uploadList
.
push
({
Url
:
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
,
Name
:
file
.
file
.
name
});
});
},
downloadOne
(
obj
)
{
var
Url
=
obj
.
Url
;
let
reg
=
/^http
(
s
)?
:
\/\/(
.*
?)\/
/
;
this
.
downloadFileRename
(
Url
.
replace
(
reg
,
""
),
obj
.
Name
);
},
deleteFile
(
obj
)
{
if
(
this
.
uploadList
.
findIndex
(
item
=>
item
.
Url
===
obj
.
Url
)
!=
-
1
)
{
this
.
uploadList
.
splice
(
this
.
uploadList
.
findIndex
(
item
=>
item
.
Url
===
obj
.
Url
),
1
);
}
},
//初始化地接数据
initCostLocalHotelSelect
(
OfferCostPrice
,
postData
)
{
let
newCostLocalList
=
[];
for
(
let
i
=
1
;
i
<=
postData
.
DayNum
;
i
++
)
{
OfferCostPrice
.
CostLocalList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
let
newCostLocal
=
JSON
.
parse
(
JSON
.
stringify
(
x
));
let
hotelArr
=
[];
let
hotelNameArr
=
[];
postData
.
HotelList
.
forEach
(
y
=>
{
if
(
newCostLocal
.
DayNum
===
y
.
DayNum
)
{
let
hotel
=
{
HotelId
:
y
.
HotelId
,
HotelName
:
y
.
HotelName
};
hotelArr
.
push
(
hotel
);
hotelNameArr
.
push
(
y
.
HotelName
);
}
});
newCostLocal
.
HotelArr
=
hotelArr
;
if
(
hotelNameArr
.
length
>
0
)
{
newCostLocal
.
HotelName
=
hotelNameArr
.
join
(
","
);
}
let
TicketNameArr
=
[];
postData
.
ScenicList
.
forEach
(
y
=>
{
if
(
y
.
DayNum
===
i
)
{
TicketNameArr
.
push
(
y
.
CouponsName
);
}
});
if
(
TicketNameArr
.
length
>
0
)
{
newCostLocal
.
TicketName
=
TicketNameArr
.
join
(
","
);
}
newCostLocalList
.
push
(
newCostLocal
);
}
});
}
OfferCostPrice
.
CostLocalList
=
newCostLocalList
;
},
//获取成本价对象
getCostPrice
(
postData
)
{
let
costLocalArr
=
[];
for
(
let
i
=
1
;
i
<=
postData
.
DayNum
;
i
++
)
{
let
costLocal
=
this
.
$tripUtils
.
CostLocal
();
costLocal
.
DayNum
=
i
;
postData
.
HotelList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
costLocal
.
HotelNameArr
.
push
(
x
.
HotelName
);
// costLocal.HotelMoney += x.HotelProductPrice;
}
});
if
(
costLocal
.
HotelNameArr
.
length
>
0
)
{
costLocal
.
HotelName
=
costLocal
.
HotelNameArr
.
join
(
","
);
}
postData
.
TrafficList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
costLocal
.
CarMoney
+=
x
.
TrafficePrice
;
}
});
postData
.
ScenicList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
costLocal
.
TicketNameArr
.
push
(
x
.
CouponsName
);
costLocal
.
TicketMoney
+=
x
.
CouponsTicketPrice
;
}
});
if
(
costLocal
.
TicketNameArr
.
length
>
0
)
{
costLocal
.
TicketName
=
costLocal
.
TicketNameArr
.
join
(
","
);
}
let
morningFood
=
{
foodType
:
1
,
money
:
0.0
};
let
noonFood
=
{
foodType
:
2
,
money
:
0.0
};
let
nightFood
=
{
foodType
:
3
,
money
:
0.0
};
postData
.
DinnerList
.
forEach
(
x
=>
{
if
(
x
.
DayNum
===
i
)
{
if
(
x
.
UseDinnerType
==
"1"
)
{
morningFood
=
{
foodType
:
1
,
money
:
x
.
DiningPrice
};
}
else
if
(
x
.
UseDinnerType
==
"2"
)
{
noonFood
=
{
foodType
:
2
,
money
:
x
.
DiningPrice
};
}
else
if
(
x
.
UseDinnerType
==
"3"
)
{
nightFood
=
{
foodType
:
3
,
money
:
x
.
DiningPrice
};
}
}
});
costLocal
.
FoodItem
.
push
(
morningFood
);
costLocal
.
FoodItem
.
push
(
noonFood
);
costLocal
.
FoodItem
.
push
(
nightFood
);
costLocalArr
.
push
(
costLocal
);
}
let
offerCostPrice
=
this
.
$tripUtils
.
OfferCostPrice
();
offerCostPrice
.
CostLocalList
=
costLocalArr
;
return
offerCostPrice
;
},
//获取报价对象
getQuotationPrice
(
postData
)
{
let
quotationPrice
=
this
.
$tripUtils
.
QuotationPrice
();
let
quotationScenicArr
=
[];
postData
.
ScenicList
.
forEach
(
y
=>
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
y
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
y
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
y
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
y
.
CouponsTicketName
;
if
(
quotationScenic
.
CouponsTicketId
>
0
||
(
quotationScenic
.
CouponsTicketId
===
0
&&
quotationScenic
.
CouponsTicketName
.
length
>
0
))
{
quotationScenicArr
.
push
(
quotationScenic
);
};
});
quotationPrice
.
QuotationScenicList
=
quotationScenicArr
;
return
quotationPrice
;
},
//组装报价景点数据
decorationQuotationScenic
(
postData
)
{
let
isDirect
=
postData
.
IsDirect
;
postData
.
OfferList
.
forEach
((
x
,
index
)
=>
{
x
.
OfferNumber
=
index
+
1
;
//报价单重新排序
if
(
x
.
QuotationPrice
!=
null
)
{
let
quotationScenicArr
=
[];
postData
.
ScenicList
.
forEach
(
y
=>
{
let
scenic
=
""
;
if
(
x
.
QuotationPrice
!=
null
&&
x
.
QuotationPrice
.
QuotationScenicList
!=
null
&&
x
.
QuotationPrice
.
QuotationScenicList
.
length
>
0
)
{
x
.
QuotationPrice
.
QuotationScenicList
.
forEach
(
z
=>
{
if
(
scenic
===
""
)
{
if
(
isDirect
===
1
)
{
if
(
z
.
CouponsId
==
y
.
CouponsId
&&
z
.
CouponsTicketId
==
y
.
CouponsTicketId
)
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
z
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
z
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
z
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
z
.
CouponsTicketName
;
quotationScenic
.
RefundMoney
=
z
.
RefundMoney
;
quotationScenic
.
CanReundMoney
=
z
.
CanReundMoney
;
scenic
=
quotationScenic
;
}
}
else
{
if
(
this
.
$commonUtils
.
getStrValue
(
z
.
CouponsName
)
.
indexOf
(
this
.
$commonUtils
.
getStrValue
(
y
.
CouponsName
)
)
!=
-
1
&&
this
.
$commonUtils
.
getStrValue
(
z
.
CouponsTicketName
)
.
indexOf
(
this
.
$commonUtils
.
getStrValue
(
y
.
CouponsTicketName
)
)
!=
-
1
)
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
z
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
z
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
z
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
z
.
CouponsTicketName
;
quotationScenic
.
RefundMoney
=
z
.
RefundMoney
;
quotationScenic
.
CanReundMoney
=
z
.
CanReundMoney
;
scenic
=
quotationScenic
;
}
}
}
});
if
(
scenic
===
""
)
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
y
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
y
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
y
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
y
.
CouponsTicketName
;
scenic
=
quotationScenic
;
}
}
else
{
let
quotationScenic
=
this
.
$tripUtils
.
QuotationScenic
();
quotationScenic
.
CouponsId
=
y
.
CouponsId
;
quotationScenic
.
CouponsTicketId
=
y
.
CouponsTicketId
;
quotationScenic
.
CouponsName
=
y
.
CouponsName
;
quotationScenic
.
CouponsTicketName
=
y
.
CouponsTicketName
;
scenic
=
quotationScenic
;
}
if
(
scenic
.
CouponsTicketId
>
0
||
(
scenic
.
CouponsTicketId
===
0
&&
scenic
.
CouponsTicketName
.
length
>
0
))
{
quotationScenicArr
.
push
(
scenic
);
};
});
x
.
QuotationPrice
.
QuotationScenicList
=
quotationScenicArr
;
}
});
},
//报价单数据初始化
intiOfficeList
(
postData
)
{
this
.
postData
=
postData
;
this
.
postData
.
OfferList
.
forEach
(
offer
=>
{
offer
.
isShow
=
false
;
});
if
(
this
.
postData
.
OfferList
.
length
==
0
)
{
this
.
offerListAppend
();
}
else
{
this
.
decorationQuotationScenic
(
this
.
postData
);
}
this
.
firstLoad
();
},
//添加报价单
offerListAppend
()
{
let
maxOfferNumber
=
0
;
this
.
postData
.
OfferList
.
forEach
(
x
=>
{
if
(
x
.
OfferNumber
>
maxOfferNumber
)
{
maxOfferNumber
=
x
.
OfferNumber
;
}
x
.
isShow
=
false
;
});
let
offer
=
this
.
$tripUtils
.
OfferObj
();
offer
.
OfferNumber
=
maxOfferNumber
+
1
;
offer
.
OfferName
=
"报价单"
+
(
maxOfferNumber
+
1
);
offer
.
OfferCostPrice
=
this
.
getCostPrice
(
this
.
postData
);
offer
.
QuotationPrice
=
this
.
getQuotationPrice
(
this
.
postData
);
this
.
postData
.
OfferList
.
push
(
offer
);
this
.
postData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
postData
));
},
//复制报价单信息
copyInfo
()
{
var
copyObj
=
{};
this
.
postData
.
OfferList
.
forEach
(
x
=>
{
if
(
x
.
IsCheck
)
{
copyObj
.
ConfigID
=
x
.
ConfigID
;
copyObj
.
EndDate
=
""
;
copyObj
.
IsCheck
=
false
;
copyObj
.
OfferCostPrice
=
x
.
OfferCostPrice
;
copyObj
.
OfferCostPrice
.
CostId
=
0
;
copyObj
.
OfferCostPrice
.
ConfigID
=
0
;
copyObj
.
OfferCostPrice
.
OfferId
=
0
;
copyObj
.
OfferId
=
0
;
copyObj
.
OfferNumber
=
this
.
postData
.
OfferList
.
length
+
1
;
copyObj
.
QuotationPrice
=
x
.
QuotationPrice
;
copyObj
.
QuotationPrice
.
QuotationId
=
0
;
copyObj
.
QuotationPrice
.
OfferId
=
0
;
copyObj
.
QuotationPrice
.
ConfigID
=
0
;
copyObj
.
StartDate
=
""
;
}
});
this
.
postData
.
OfferList
.
push
(
copyObj
);
},
//点击标题
getReference
(
item
)
{
this
.
otherTeamInfo
.
forEach
(
x
=>
{
x
.
IsCheck
=
false
;
});
item
.
IsCheck
=
!
item
.
IsCheck
;
if
(
item
.
configId
!=
this
.
configId
)
{
this
.
configId
=
item
.
configId
;
this
.
offerList
=
[];
}
this
.
otherTemObj
=
[];
item
.
offerList
.
forEach
(
x
=>
{
var
obj
=
{};
obj
.
configId
=
item
.
configId
;
obj
.
offerId
=
x
.
offerId
;
obj
.
value
=
x
.
startDate
+
"至"
+
x
.
endDate
;
this
.
otherTemObj
.
push
(
obj
);
});
},
//复制其他团期信息
copyDerect
()
{
if
(
this
.
offerList
.
length
>
0
)
{
this
.
copyOffer
();
}
else
{
let
msg
=
{
configId
:
this
.
configId
};
this
.
apipost
(
"travel_get_GetTravelOfferInfo"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
offerList
=
res
.
data
.
data
;
this
.
copyOffer
();
}
},
err
=>
{
}
);
}
},
//选择是否退款重置金额
resetRefundMoney
(
item
){
if
(
item
.
CanReundMoney
==
0
){
item
.
RefundMoney
=
0
;
}
},
//复制信息
copyOffer
()
{
//let firstPrice = JSON.parse(JSON.stringify(this.postData.OfferList[0]));
this
.
offerList
.
forEach
(
x
=>
{
if
(
x
.
OfferId
===
this
.
offerId
)
{
let
offer
=
JSON
.
parse
(
JSON
.
stringify
(
x
));
offer
.
ConfigID
=
0
;
offer
.
configID
=
0
;
offer
.
OfferId
=
0
;
offer
.
StartDate
=
""
;
offer
.
EndDate
=
""
;
offer
.
OfferNumber
=
this
.
postData
.
OfferList
.
length
+
1
;
offer
.
IsCheck
=
false
;
offer
.
OfferCostPrice
.
ConfigID
=
0
;
offer
.
OfferCostPrice
.
CostId
=
0
;
offer
.
OfferCostPrice
.
OfferId
=
0
;
offer
.
OfferCostPrice
.
LocalProject
=
""
;
offer
.
OfferCostPrice
.
CostLocalList
=
this
.
getCostPrice
(
this
.
postData
).
CostLocalList
;
offer
.
QuotationPrice
.
ConfigId
=
0
;
offer
.
QuotationPrice
.
OfferId
=
0
;
offer
.
QuotationPrice
.
QuotationId
=
0
;
offer
.
QuotationPrice
.
QuotationScenicList
=
this
.
getQuotationPrice
(
this
.
postData
).
QuotationScenicList
;
this
.
postData
.
OfferList
.
push
(
offer
);
}
});
}
},
created
()
{
this
.
intiOfficeList
(
this
.
postConfig
);
},
filters
:
{
dateFormate
(
date
)
{
let
dateStr
=
date
.
split
(
"-"
);
return
dateStr
[
1
]
+
"月"
+
dateStr
[
2
]
+
"日"
;
},
offerName
(
offerNumber
)
{
return
"报价单"
+
offerNumber
;
}
},
watch
:
{
"postData.OfferList"
:
{
handler
:
function
(
val
,
oldVal
)
{
val
.
forEach
(
x
=>
{
if
(
x
.
OfferNumber
===
this
.
currentOffer
.
OfferNumber
)
{
this
.
currentOffer
.
OfferName
=
x
.
OfferName
;
}
});
},
deep
:
true
}
},
components
:
{
CostPrice
:
CostPrice
}
};
</
script
>
src/components/TravelManager/TravelNewQuotation/QuotationNewPrice.vue
0 → 100644
View file @
78ea32a3
<
template
>
<div
v-if=
"isShow"
class=
"DirectQuotation clearfix"
>
<DirectQuotation
ref=
"QuotationPrice"
:postConfig=
"postData"
></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"
@
click=
"copyQuotationData"
style=
"display:none;"
>
复制
</div>
<div
class=
"DTSaveBtn caogao"
:class=
"
{'disClick':!isSubmit}" @click="submitForm(1)">
<span>
保存
</span>
<span>
草稿
</span>
</div>
</div>
</div>
</
template
>
<
script
>
import
DirectQuotation
from
"../TravelNewQuotation/DirectNewQuotation"
;
export
default
{
data
()
{
return
{
postData
:
""
,
isSubmit
:
true
,
priceIsDirect
:
2
,
//是否直采报价(1-否-2-是)
isShow
:
false
//数据请求后再加载组件
};
},
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
};
return
obj
;
},
//复制信息
copyQuotationData
()
{
this
.
$refs
.
QuotationPrice
.
copyInfo
();
},
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
}
};
</
script
>
src/components/TravelManager/TravelQuotationCenter/quoTation.vue
View file @
78ea32a3
...
...
@@ -48,6 +48,7 @@
</li>
<li>
<button
class=
"hollowFixedBtn"
@
click=
"getList(),resetPageIndex()"
>
查询
</button>
<button
class=
"hollowFixedBtn"
@
click=
"goMakeQuo('MakeQuotation')"
>
新增
</button>
</li>
</ul>
</div>
...
...
@@ -455,6 +456,15 @@
}
});
},
goMakeQuo
(
path
)
{
this
.
$router
.
push
({
path
:
path
,
query
:
{
blank
:
'y'
,
tab
:
'报价单'
}
});
},
goSubInfo
(
path
,
configId
)
{
this
.
$store
.
commit
(
"pageConditionUpdate"
,
this
.
queryData
);
...
...
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