Commit c917d8e6 authored by 黄奎's avatar 黄奎

页面修改

parent fc24eb4b
......@@ -666,7 +666,8 @@
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total">
</el-pagination>
<div class="buy-box" v-show="isShowTeamOrder">
<orderForm @success="reSearchPage" @close="closeForm" :priceObj="teamInfo"></orderForm>
<orderForm @success="reSearchPage" @close="closeForm" :PTCID="teamInfo.TCID" :POrderId="0" :PBranchId="0" :PProductType="2">
</orderForm>
</div>
</div>
</template>
......@@ -702,25 +703,23 @@
},
dataList: [],
isShowTeamOrder: false, //是否显示订单弹窗
teamInfo: {},//团队信息
teamInfo: {}, //团队信息
};
},
components: {
orderForm: orderForm
},
methods: {
//刷新页面
reSearchPage() {
this.isShowTeamOrder = false;
this.teamInfo={};
this.teamInfo = {};
this.getList();
},
//关闭窗口
closeForm()
{
this.isShowTeamOrder=false;
this.teamInfo={};
closeForm() {
this.isShowTeamOrder = false;
this.teamInfo = {};
},
//跳转到报名清单
gotoOrder(item) {
......@@ -744,8 +743,8 @@
}
},
goBuy(obj) {
this.isShowTeamOrder = true;
this.teamInfo = obj;
this.isShowTeamOrder = true;
},
getList() {
this.loading = true;
......
......@@ -282,7 +282,6 @@
<el-input v-model="addMsg.VisaNum" @keyup.native="checkInteger(addMsg, 'VisaNum')" @input="
yzVisaNum();
getTotalPrice();
autoRemarks2('VisaNum', '不要签证数量');
autoRemarks('VisaNum', '不要签证数量');
"></el-input>
</el-form-item>
......@@ -292,7 +291,6 @@
<el-input v-model="addMsg.SafeNum" @keyup.native="checkInteger(addMsg, 'SafeNum')" @input="
yzSafeNum();
getTotalPrice();
autoRemarks2('SafeNum', '不要保险数量');
"></el-input>
</el-form-item>
</el-col>
......@@ -445,8 +443,25 @@
</template>
<script>
export default {
//priceObj:团期价格信息
props: ["priceObj"],
//团期编号,订单编号(新增传0),下单人选择的公司
props: {
PTCID: {
type: Number,
default: 0, //团期编号(必须传)
},
POrderId: {
type: Number,
default: 0, //订单编号(新增传0)
},
PBranchId: {
type: Number,
default: 0, //销售公司/联运公司
},
PProductType: {
type: Number,
default: 0, //产品类型(1-常规团,2-包机团)
}
},
data() {
return {
pickerOptions0: {
......@@ -608,8 +623,27 @@
SingleDMCPricex: 0, // 单地接;
SingleDMCPrice: 0, // 单地接;
TotalNumber: 0, //总人数
priceObj: {}, //团期价格信息
};
},
filters: {
//价格格式化
priceFormat(value) {
if (value == null) {
return 0.00;
}
let nStr = value.toFixed(2)
nStr += '';
let x = nStr.split('.');
let x1 = x[0];
let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
},
},
methods: {
//参团类型切换
changeGroupType(type) {
......@@ -669,39 +703,62 @@
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);
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: function (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 (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 +
"/人;";
this.remarkMsg.qz = text + ":" + (count - this.addMsg[key]) + ";" +
"退签证费" + this.priceObj.BackVisaPrice + "/人;";
}
}
if (text === "不要保险数量") {
......@@ -717,24 +774,19 @@
if (this.remarkMsg.bzc === "") {
this.remarkMsg.bzc = "儿童不占床:" + this.addMsg[key] + ";";
if (this.priceObj.ChildNoNeedPrice) {
this.remarkMsg.bzc +=
"儿童不占床减免" + 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 + "/人;";
this.remarkMsg.bzc += "儿童不占床减免" + this.priceObj.ChildNoNeedPrice + "/人;";
}
}
if (this.remarkMsg.fjf === "") {
if (
this.priceObj["BabyChargePrice"] > 0 &&
this.priceObj["BabyChargePrice"]
) {
this.remarkMsg.fjf =
"儿童附加费:" + this.priceObj["BabyChargePrice"] + "/人;";
this.priceObj["BabyChargePrice"] > 0 && this.priceObj["BabyChargePrice"]) {
this.remarkMsg.fjf = "儿童附加费:" + this.priceObj["BabyChargePrice"] + "/人;";
} else {
this.remarkMsg.fjf = "";
}
......@@ -744,63 +796,40 @@
if (this.remarkMsg.zc === "") {
this.remarkMsg.zc = "儿童占床:" + this.addMsg[key] + ";";
if (this.priceObj.ChildNeedPrice) {
this.remarkMsg.zc =
this.remarkMsg.zc +
"儿童占床附加费" +
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 +
"/人;";
this.remarkMsg.zc = this.remarkMsg.zc + "儿童占床附加费" + this.priceObj.ChildNeedPrice + "/人;";
}
}
if (this.remarkMsg.fjf === "") {
this.remarkMsg.fjf = this.priceObj["BabyChargePrice"] ?
"儿童附加费:" + this.priceObj["BabyChargePrice"] + "/人;" :
"";
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 + "/人;";
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 + "/人;";
this.remarkMsg.lr = this.remarkMsg.lr + this.priceObj.OldManChargePrice + "/人;";
}
}
}
if (text === "婴儿人数") {
if (this.remarkMsg.ye === "") {
this.remarkMsg.ye =
"婴儿人数:" +
this.addMsg[key] +
";" +
"婴儿价格:" +
this.priceObj.BabyPrice +
"/人;";
this.remarkMsg.ye = "婴儿人数:" + this.addMsg[key] + ";" + "婴儿价格:" + this.priceObj.BabyPrice + "/人;";
} else {
this.remarkMsg.ye = "";
this.remarkMsg.ye =
"婴儿人数:" +
this.addMsg[key] +
";" +
"婴儿价格:" +
this.priceObj.BabyPrice +
"/人;";
this.remarkMsg.ye = "婴儿人数:" + this.addMsg[key] + ";" + "婴儿价格:" + this.priceObj.BabyPrice + "/人;";
}
}
if (text === "单地接数量") {
......@@ -813,22 +842,10 @@
}
if (text === "单房数量") {
if (this.remarkMsg.df === "") {
this.remarkMsg.df =
"单房数量:" +
this.addMsg[key] +
";" +
"单房差价" +
this.priceObj.SingleRoomPrice +
"/人;";
this.remarkMsg.df = "单房数量:" + this.addMsg[key] + ";" + "单房差价" + this.priceObj.SingleRoomPrice + "/人;";
} else {
this.remarkMsg.df = "";
this.remarkMsg.df =
"单房数量:" +
this.addMsg[key] +
";" +
"单房差价" +
this.priceObj.SingleRoomPrice +
"/人;";
this.remarkMsg.df = "单房数量:" + this.addMsg[key] + ";" + "单房差价" + this.priceObj.SingleRoomPrice + "/人;";
}
}
if (text === "大床房") {
......@@ -896,13 +913,6 @@
});
_this.addMsg.Remarks = newRemark;
},
//自动添加备注
autoRemarks2: function (key, text) {
// let count = (Number(this.addMsg.AirticketNum)+Number(this.addMsg.ManNum)+Number(this.addMsg.ChirdNum)+Number(this.addMsg.BabyNum)+Number(this.addMsg.OldPeopleNum))
// if (this.addMsg[key].toString() !== count.toString() && this.addMsg[key].toString() !== '') {
// this.addMsg.Remarks = this.addMsg.Remarks + text + ':' + (count-this.addMsg[key]) + ';'
// }
},
//获取联运价格
getUnionTravelPrice(obj, type) {
let msg = {};
......@@ -930,7 +940,6 @@
this.getTotalPrice();
}
},
(err) => {}
);
}
} else {
......@@ -955,7 +964,6 @@
this.getTotalPrice();
}
},
(err) => {}
);
}
}
......@@ -996,18 +1004,13 @@
},
//获取平台订单
platformOrderMethods() {
return;
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));
this.addMsg.MinOrderPrice = this.minPrice * (Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) +
Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum));
}
},
//获取线路最低定金金额
......@@ -1132,15 +1135,12 @@
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.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;
this.addMsg.Commission = this.addMsg.Commission - this.addMsg.CommissionShareMoney;
} else {
this.addMsg.CommissionShareMoney = "0";
}
......@@ -1152,9 +1152,7 @@
//算法:((成人+儿童占床数+老人-(三人房数量*3))-单房数)/2+单房数+三人房数量 8.7新增单地接儿童不占床 减去 儿童不占床
let etbzc = 0;
if (this.addMsg.GroupType == 4) {
etbzc = this.addMsg.ChirdNoNeedBedNum ?
Number(this.addMsg.ChirdNoNeedBedNum) :
0;
etbzc = this.addMsg.ChirdNoNeedBedNum ? Number(this.addMsg.ChirdNoNeedBedNum) : 0;
}
this.addMsg.PredictRoomNum =
(Number(this.addMsg.AirticketNum) +
......@@ -1280,60 +1278,7 @@
this.getTypePrice();
}
},
//验证单房数量
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", "三人房");
},
//提交表单验证
submitForm(addMsg) {
if (this.TotalNumber == 0) {
......@@ -1740,6 +1685,36 @@
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() {
......@@ -1755,6 +1730,15 @@
//获取交易方式
this.getTradeWay();
},
watch: {
//监听TCID变化
PTCID: function (oldValue, newVal) {
if (oldValue != newVal) {
this.clearMsg();
this.getTravelPirceInfo()
}
}
}
};
</script>
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