Commit b970bfe2 authored by 黄奎's avatar 黄奎

页面修改

parent 453f7878
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<!-- 参团类型 --> <!-- 参团类型 -->
<el-form-item :label="$t('fnc.ctleixing')" prop="GroupType"> <el-form-item :label="$t('fnc.ctleixing')" prop="GroupType">
<el-select v-model="addMsg.GroupType" <el-select v-model="addMsg.GroupType"
@change="changeGroupType(addMsg.GroupType),GetAutoCouponOrder(),getUserCouponList()" filterable @change="changeGroupType(addMsg.GroupType),GetAutoCouponOrder(),getUserCouponList()" filterable
:placeholder="$t('pub.pleaseSel')"> :placeholder="$t('pub.pleaseSel')">
<el-option v-for="item in joinTypeList" :label="item.Name" :value="item.Id" :key="item.Id"> <el-option v-for="item in joinTypeList" :label="item.Name" :value="item.Id" :key="item.Id">
</el-option> </el-option>
...@@ -266,40 +266,35 @@ ...@@ -266,40 +266,35 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" style="text-align: right;"> <el-col :span="4" style="text-align: right;">
<span v-if="couponData" style="color: green;"> <span v-if="couponData" style="color: green;">
优惠活动: {{couponData.CouponsName}} 优惠活动: {{couponData.CouponsName}}
满{{couponData.UseCondition}}元可用 满{{couponData.UseCondition}}元可用
<template v-if="couponData.CouponsType==1">抵用券</template> <template v-if="couponData.CouponsType==1">抵用券</template>
<template v-if="couponData.CouponsType==2">折扣券</template> <template v-if="couponData.CouponsType==2">折扣券</template>
{{couponData.Denomination}} {{couponData.Denomination}}
</span> </span>
<span v-else style="color: red;"> <span v-else style="color: red;">
当前报名不参与公司任何优惠活动 当前报名不参与公司任何优惠活动
</span> </span>
</el-col> </el-col>
<el-col :span="4" v-if="(addMsg.GroupType==1||addMsg.GroupType==2)&&couponList&&couponList.length>0"> <el-col :span="4" v-if="(addMsg.GroupType==1||addMsg.GroupType==2)&&couponList&&couponList.length>0">
<el-form-item label="优惠券" prop=""> <el-form-item label="优惠券" prop="">
<el-select v-model="DiscountAmountId" placeholder="选择优惠券" <el-select v-model="DiscountAmountId" placeholder="选择优惠券" @change="getDiscountAmount" clearable>
@change="getDiscountAmount" <el-option v-for="item in couponList" :label="item.couponName" :value="item.id" :key="item.id"
clearable> :disabled="expiredTime(item)">
<el-option v-for="item in couponList" <span>
:label="item.couponName" <!-- 名称: -->
:value="item.id" <span style="color: sandybrown;">{{item.couponName}}</span>
:key="item.id" </span>
:disabled="expiredTime(item)"> <span>
<span> / <span style="color: sandybrown;">{{item.couponsType==1?'抵用券':'折扣卷'}}</span>
<!-- 名称: --> </span>
<span style="color: sandybrown;">{{item.couponName}}</span> <span style="margin-left: 10px;margin-right: 10px;">
</span>
<span> <span style="color:sandybrown;">{{item.useCondition}}</span>
/ <span style="color: sandybrown;">{{item.couponsType==1?'抵用券':'折扣卷'}}</span> 可用
</span> </span>
<span style="margin-left: 10px;margin-right: 10px;"> <!-- <span style="color: #E6A23C;">
<span style="color:sandybrown;">{{item.useCondition}}</span>
可用
</span>
<!-- <span style="color: #E6A23C;">
{{item.expirationDate}}失效 {{item.expirationDate}}失效
</span> --> </span> -->
</el-option> </el-option>
...@@ -349,6 +344,7 @@ ...@@ -349,6 +344,7 @@
"> ">
{{ $t("salesModule.NoSupplier") }}! {{ $t("salesModule.NoSupplier") }}!
</p> </p>
<el-form-item v-if="priceObj.IsSupportChildren == 1" :label="$t('Operation.Op_childNobed')" <el-form-item v-if="priceObj.IsSupportChildren == 1" :label="$t('Operation.Op_childNobed')"
prop="ChirdNoNeedBedNum"> prop="ChirdNoNeedBedNum">
<el-input v-model="addMsg.ChirdNoNeedBedNum" @keyup.native="checkInteger(addMsg, 'ChirdNoNeedBedNum')" <el-input v-model="addMsg.ChirdNoNeedBedNum" @keyup.native="checkInteger(addMsg, 'ChirdNoNeedBedNum')"
...@@ -553,8 +549,6 @@ ...@@ -553,8 +549,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-if="pagesTitle == '当地游产品'"> <el-col :span="4" v-if="pagesTitle == '当地游产品'">
<!--联系人--> <!--联系人-->
<el-form-item label="行李数量" prop="LuggageNum"> <el-form-item label="行李数量" prop="LuggageNum">
...@@ -724,7 +718,7 @@ ...@@ -724,7 +718,7 @@
data() { data() {
return { return {
DiscountAmountId: null, DiscountAmountId: null,
DiscountAmountObj:{}, DiscountAmountObj: {},
timer: false, timer: false,
fullHeight: document.documentElement.clientHeight, fullHeight: document.documentElement.clientHeight,
ScreenHeight: 0, ScreenHeight: 0,
...@@ -814,7 +808,7 @@ ...@@ -814,7 +808,7 @@
LureEmpId: 0, //引流id LureEmpId: 0, //引流id
CRMGuestId: 0, //客人ID CRMGuestId: 0, //客人ID
CouponAllotIds: '', CouponAllotIds: '',
LuggageNum:'',//行李数量 LuggageNum: '', //行李数量
}, },
uploadLloading: false, uploadLloading: false,
rules: { rules: {
...@@ -824,10 +818,35 @@ ...@@ -824,10 +818,35 @@
trigger: "change", trigger: "change",
}, ], }, ],
CustomerId: [{ CustomerId: [{
required: false, required: true,
message: "请选择客户门店", message: "请选择客户门店",
trigger: "change", trigger: "change",
}, ], }, ],
ManNum: [{
required: true,
message: "请填写成人人数",
trigger: "blur",
}, ],
ChirdNeedBedNum: [{
required: true,
message: "请填写儿童占床人数",
trigger: "blur",
}, ],
BabyNum: [{
required: true,
message: "请填写婴儿人数",
trigger: "blur",
}, ],
OldPeopleNum: [{
required: true,
message: "请填写老人人数",
trigger: "blur",
}, ],
ChirdNoNeedBedNum: [{
required: true,
message: "请填写儿童不占床人数",
trigger: "blur",
}, ],
DepartureCityId: [{ DepartureCityId: [{
required: true, required: true,
message: "请选择出发城市", message: "请选择出发城市",
...@@ -982,45 +1001,45 @@ ...@@ -982,45 +1001,45 @@
priceObj: {}, //团期价格信息 priceObj: {}, //团期价格信息
crmOrderObj: null, crmOrderObj: null,
couponData: null, couponData: null,
couponList:[], couponList: [],
}; };
}, },
methods: { methods: {
// 获取已选优惠券 // 获取已选优惠券
getDiscountAmount(){ getDiscountAmount() {
let obj = this.couponList.find(x=>{ let obj = this.couponList.find(x => {
return x.id==this.DiscountAmountId return x.id == this.DiscountAmountId
}) })
this.DiscountAmountObj = obj?obj:{} this.DiscountAmountObj = obj ? obj : {}
}, },
getUserCouponList(){ getUserCouponList() {
let obj = this.customerList.find(x=>{ let obj = this.customerList.find(x => {
return x.customerId==this.addMsg.CustomerId return x.customerId == this.addMsg.CustomerId
}) })
if(this.addMsg.GroupType!=1&&this.addMsg.GroupType!=2) { if (this.addMsg.GroupType != 1 && this.addMsg.GroupType != 2) {
this.couponList = [] this.couponList = []
this.DiscountAmountId = null this.DiscountAmountId = null
this.DiscountAmountObj = {} this.DiscountAmountObj = {}
return return
} }
if(obj&&obj.customerAccountId&&this.priceObj.LineID){ if (obj && obj.customerAccountId && this.priceObj.LineID) {
let params={ let params = {
lineId: this.priceObj.LineID, lineId: this.priceObj.LineID,
lineteamId:0, lineteamId: 0,
CouponsUseScope:2, CouponsUseScope: 2,
userId: obj.customerAccountId userId: obj.customerAccountId
} }
this.apipost('coupon_post_GetUserCanUseCouponList',params,(res)=>{ this.apipost('coupon_post_GetUserCanUseCouponList', params, (res) => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.couponList = res.data.data this.couponList = res.data.data
} }
},(err)=>{ }, (err) => {
console.log(err) console.log(err)
}) })
} }
}, },
// 大人>=2优惠 // 大人>=2优惠
GetAutoCouponOrder(){ GetAutoCouponOrder() {
this.couponData = null this.couponData = null
let ChirdNum = Number(this.addMsg.ChirdNum); let ChirdNum = Number(this.addMsg.ChirdNum);
if (this.addMsg.GroupType == 4) { if (this.addMsg.GroupType == 4) {
...@@ -1032,26 +1051,26 @@ ...@@ -1032,26 +1051,26 @@
Number(this.addMsg.OldPeopleNum) + Number(this.addMsg.OldPeopleNum) +
Number(this.addMsg.BabyNum) + Number(this.addMsg.BabyNum) +
Number(this.addMsg.AirticketNum); Number(this.addMsg.AirticketNum);
let OrderGuest = this.addMsg.GuestNum-Number(this.addMsg.BabyNum) let OrderGuest = this.addMsg.GuestNum - Number(this.addMsg.BabyNum)
if(OrderGuest>=2&&(this.addMsg.GroupType==1||this.addMsg.GroupType==2)&&this.addMsg.CustomerId>0){ if (OrderGuest >= 2 && (this.addMsg.GroupType == 1 || this.addMsg.GroupType == 2) && this.addMsg.CustomerId >
0) {
let msg = { let msg = {
TCID:this.productObj.TCID, TCID: this.productObj.TCID,
CustomerId:this.addMsg.CustomerId, CustomerId: this.addMsg.CustomerId,
OrderId:0, OrderId: 0,
StratDate:this.productObj.StartCityTime, StratDate: this.productObj.StartCityTime,
OrderGuest:OrderGuest, OrderGuest: OrderGuest,
lineId:this.priceObj.LineID lineId: this.priceObj.LineID
} }
this.apipost( this.apipost(
"coupon_post_GetAutoCouponOrder", msg, "coupon_post_GetAutoCouponOrder", msg,
(res) => { (res) => {
if (res.data.resultCode == 1&&res.data.data!=null) { if (res.data.resultCode == 1 && res.data.data != null) {
this.couponData = res.data.data this.couponData = res.data.data
} }
} }
); );
} }
}, },
Transformation(val, type, index) { Transformation(val, type, index) {
let text = this.pinyin(val, { let text = this.pinyin(val, {
...@@ -1904,69 +1923,69 @@ ...@@ -1904,69 +1923,69 @@
//清空表单信息 //清空表单信息
clearMsg() { clearMsg() {
this.DiscountAmountId = null, this.DiscountAmountId = null,
this.DiscountAmountObj = {}, this.DiscountAmountObj = {},
this.addMsg = { this.addMsg = {
price: "0", price: "0",
GroupTypeNeedHouse: "0", GroupTypeNeedHouse: "0",
OrderId: "0", OrderId: "0",
OneSex: "0", OneSex: "0",
TCID: "0", TCID: "0",
CustomerType: "", CustomerType: "",
GroupType: "", GroupType: "",
IndustryCategory: "", IndustryCategory: "",
ContactName: "", ContactName: "",
ContactMobile: "", ContactMobile: "",
CustomerId: "", CustomerId: "",
DepartureCityId: "0", DepartureCityId: "0",
ReturnArriveCityId: "", ReturnArriveCityId: "",
IsIntermodal: "2", IsIntermodal: "2",
IsReturnIntermodal: "2", IsReturnIntermodal: "2",
Unit_Price: "0", Unit_Price: "0",
TC_Price: "0", TC_Price: "0",
ManNum: "0", // 成人数量 ManNum: "0", // 成人数量
ChirdNum: "0", // 小孩数量 ChirdNum: "0", // 小孩数量
ChirdNoNeedBedNum: "0", ChirdNoNeedBedNum: "0",
ChirdNeedBedNum: "0", ChirdNeedBedNum: "0",
BabyNum: "0", BabyNum: "0",
OldPeopleNum: "0", OldPeopleNum: "0",
SingleRoomNum: "0", SingleRoomNum: "0",
PreferPrice: "0", PreferPrice: "0",
YSeatNum: "0", YSeatNum: "0",
ESeatNum: "0", ESeatNum: "0",
FSeatNum: "0", FSeatNum: "0",
Commission: "0", Commission: "0",
ClientSource: "", ClientSource: "",
BrandId: "", BrandId: "",
TradeWay: "2", TradeWay: "2",
PlatformAccount: "", PlatformAccount: "",
PlatformOrder: "", PlatformOrder: "",
GuestNum: "0", GuestNum: "0",
IsChildrenTour: "0", IsChildrenTour: "0",
IsBirdDiscount: "0", IsBirdDiscount: "0",
PredictRoomNum: "0", PredictRoomNum: "0",
BigRoomNum: "0", BigRoomNum: "0",
TripleRoomNum: "0", TripleRoomNum: "0",
TradeDate: "", TradeDate: "",
CostType: "", CostType: "",
Remarks: "", Remarks: "",
VisaNum: "0", VisaNum: "0",
SafeNum: "0", SafeNum: "0",
AirticketNum: "0", AirticketNum: "0",
ScenicRefundArr: [], ScenicRefundArr: [],
GoCityTime: "", GoCityTime: "",
BackCityTime: "", BackCityTime: "",
CommissionSharePeople: "-1", CommissionSharePeople: "-1",
CommissionShareMoney: "0", CommissionShareMoney: "0",
OrderForm: "1", OrderForm: "1",
SonControlID: "-1", SonControlID: "-1",
IsShowMessagesMoney: "2", IsShowMessagesMoney: "2",
QuotationUrl: "", //单团附件 QuotationUrl: "", //单团附件
GuestList: [], GuestList: [],
GatherAddress: "", GatherAddress: "",
LureEmpId: 0, //引流id LureEmpId: 0, //引流id
CRMGuestId: 0, //客人ID CRMGuestId: 0, //客人ID
CouponAllotIds: '', CouponAllotIds: '',
}; };
this.remarkMsg = { this.remarkMsg = {
zc: "", zc: "",
bzc: "", bzc: "",
...@@ -2108,10 +2127,10 @@ ...@@ -2108,10 +2127,10 @@
if (this.pagesTitle == "跟团游产品") { if (this.pagesTitle == "跟团游产品") {
url = "sellorder_post_SetOrderInfo_02"; url = "sellorder_post_SetOrderInfo_02";
// 优惠券计算 // 优惠券计算
if((this.addMsg.GroupType==1||this.addMsg.GroupType==2)&&this.DiscountAmountId){ if ((this.addMsg.GroupType == 1 || this.addMsg.GroupType == 2) && this.DiscountAmountId) {
this.addMsg.CouponAllotIds = this.DiscountAmountId this.addMsg.CouponAllotIds = this.DiscountAmountId
// this.addMsg.PreferPrice = this.CalculationPreference() // this.addMsg.PreferPrice = this.CalculationPreference()
}else{ } else {
this.addMsg.CouponAllotIds = '' this.addMsg.CouponAllotIds = ''
} }
} }
...@@ -2136,22 +2155,22 @@ ...@@ -2136,22 +2155,22 @@
}); });
}, },
// 优惠券有效期 // 优惠券有效期
expiredTime(item){ expiredTime(item) {
let start_time = item.effectDate.split(' ')[0].replace(/-/g, '-') let start_time = item.effectDate.split(' ')[0].replace(/-/g, '-')
let end_time = item.expirationDate.split(' ')[0].replace(/-/g, '-') let end_time = item.expirationDate.split(' ')[0].replace(/-/g, '-')
let date1 = new Date(start_time); let date1 = new Date(start_time);
let date2 = new Date(end_time); let date2 = new Date(end_time);
let date3 = new Date(); let date3 = new Date();
if (this.addMsg.PreferPrice>item.useCondition if (this.addMsg.PreferPrice > item.useCondition &&
&& (date3.Format("yyyy-MM-dd") >= date1.Format("yyyy-MM-dd") (date3.Format("yyyy-MM-dd") >= date1.Format("yyyy-MM-dd") &&
&& date2.Format("yyyy-MM-dd") > date3.Format("yyyy-MM-dd"))) { date2.Format("yyyy-MM-dd") > date3.Format("yyyy-MM-dd"))) {
return false return false
}else{ } else {
return true return true
} }
}, },
// 优惠券计算 // 优惠券计算
CalculationPreference(){ CalculationPreference() {
let ChirdNum = Number(this.addMsg.ChirdNum); let ChirdNum = Number(this.addMsg.ChirdNum);
if (this.addMsg.GroupType == 4) { if (this.addMsg.GroupType == 4) {
ChirdNum = 0; ChirdNum = 0;
...@@ -2164,29 +2183,29 @@ ...@@ -2164,29 +2183,29 @@
ChirdNum + ChirdNum +
Number(this.addMsg.OldPeopleNum) Number(this.addMsg.OldPeopleNum)
// couponsType 优惠券类型 1:抵用券,2:折扣卷 // couponsType 优惠券类型 1:抵用券,2:折扣卷
if(DiscountNumber>0&&this.DiscountAmountId&&(this.addMsg.GroupType==1||this.addMsg.GroupType==2)){ if (DiscountNumber > 0 && this.DiscountAmountId && (this.addMsg.GroupType == 1 || this.addMsg.GroupType == 2)) {
if(this.DiscountAmountObj&&this.DiscountAmountObj.couponsType==1){ if (this.DiscountAmountObj && this.DiscountAmountObj.couponsType == 1) {
if(this.addMsg.GroupType==2){ if (this.addMsg.GroupType == 2) {
if(DiscountNumber>=this.DiscountAmountObj.expansionModel.orderGuestNum){ if (DiscountNumber >= this.DiscountAmountObj.expansionModel.orderGuestNum) {
PreferPrice = this.addMsg.PreferPrice-this.DiscountAmountObj.expansionModel.denomination PreferPrice = this.addMsg.PreferPrice - this.DiscountAmountObj.expansionModel.denomination
} }
} }
PreferPriceTwo = this.addMsg.PreferPrice-this.DiscountAmountObj.denomination PreferPriceTwo = this.addMsg.PreferPrice - this.DiscountAmountObj.denomination
}else if(this.DiscountAmountObj&&this.DiscountAmountObj.couponsType==2){ } else if (this.DiscountAmountObj && this.DiscountAmountObj.couponsType == 2) {
if(this.addMsg.GroupType==2){ if (this.addMsg.GroupType == 2) {
if(DiscountNumber>=this.DiscountAmountObj.expansionModel.orderGuestNum){ if (DiscountNumber >= this.DiscountAmountObj.expansionModel.orderGuestNum) {
PreferPrice = this.addMsg.PreferPrice-this.DiscountAmountObj.expansionModel.denomination PreferPrice = this.addMsg.PreferPrice - this.DiscountAmountObj.expansionModel.denomination
} }
} }
PreferPriceTwo = this.addMsg.PreferPrice*(this.DiscountAmountObj.denomination/100) PreferPriceTwo = this.addMsg.PreferPrice * (this.DiscountAmountObj.denomination / 100)
} }
if((PreferPrice>PreferPriceTwo)||PreferPrice==0){ if ((PreferPrice > PreferPriceTwo) || PreferPrice == 0) {
Price = PreferPriceTwo Price = PreferPriceTwo
}else{ } else {
Price = PreferPrice Price = PreferPrice
} }
return Price return Price
}else { } else {
return Price return Price
} }
}, },
...@@ -2253,10 +2272,10 @@ ...@@ -2253,10 +2272,10 @@
let obj = this.customerList.find( let obj = this.customerList.find(
(item) => item.customerId == this.addMsg.CustomerId (item) => item.customerId == this.addMsg.CustomerId
); );
this.customerId = obj&&obj.customerId; this.customerId = obj && obj.customerId;
this.createByInfo = obj&&obj.createByInfo; this.createByInfo = obj && obj.createByInfo;
this.addMsg.ContactName = obj&&obj.customerName + "(" + obj.contact + ")"; this.addMsg.ContactName = obj && obj.customerName + "(" + obj.contact + ")";
this.addMsg.ContactMobile = obj&&obj.contactNumber; this.addMsg.ContactMobile = obj && obj.contactNumber;
if (this.CurrentUserInfo.EmployeeId != this.createByInfo) { if (this.CurrentUserInfo.EmployeeId != this.createByInfo) {
this.addMsg.CommissionSharePeople = this.createByInfo; this.addMsg.CommissionSharePeople = this.createByInfo;
...@@ -2451,7 +2470,7 @@ ...@@ -2451,7 +2470,7 @@
this.ScreenHeight = "300px"; this.ScreenHeight = "300px";
} }
this.getMinPrice(this.productObj.LineID); // 当前线路报价 this.getMinPrice(this.productObj.LineID); // 当前线路报价
//获取所有账户列表 //获取所有账户列表
this.getPlatformAccount(this.productObj.PlatformAccountTypeId); this.getPlatformAccount(this.productObj.PlatformAccountTypeId);
}, },
...@@ -2496,17 +2515,17 @@ ...@@ -2496,17 +2515,17 @@
this.addMsg.LureEmpId = this.crmOrderObj.LureEmpId; //引流id this.addMsg.LureEmpId = this.crmOrderObj.LureEmpId; //引流id
this.addMsg.CRMGuestId = this.crmOrderObj.CRMGuestId; //客人ID this.addMsg.CRMGuestId = this.crmOrderObj.CRMGuestId; //客人ID
} }
}, },
deep: true, deep: true,
}, },
//监听TCID变化 //监听TCID变化
PTCID: function (oldValue, newVal) { PTCID: function (oldValue, newVal) {
this.getScenicRefund(this.PTCID); // 可退景点 this.getScenicRefund(this.PTCID); // 可退景点
}, },
'addMsg.CustomerId':{ 'addMsg.CustomerId': {
handler(oldValue, newVal) { handler(oldValue, newVal) {
if(oldValue){ if (oldValue) {
this.getUserCouponList() this.getUserCouponList()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment