Commit fab22a50 authored by 沈良进's avatar 沈良进

save'

parent 45dc5140
......@@ -2,7 +2,7 @@
/* @import "../../assets/css/newTravelManager.css"; */
</style>
<template>
<div style="padding: 20px">
<div style="padding:10px 20px 10px 80px;">
<p>
{{ $t("salesModule.SignImdi") }}
<span class="fr">
......@@ -445,6 +445,12 @@
<script>
export default {
props: {
info: {
default: () => ({}),
require: true
}
},
data() {
return {
pickerOptions0: {
......@@ -1660,143 +1666,7 @@
};
},
saveOrder() {
// 判断单团类型
if (this.addMsg.GroupType == 2) {
if (this.addMsg.IndustryCategory == "") {
this.Error("请填写行业类别!");
return;
}
if (this.addMsg.QuotationUrl == "") {
this.Error("请上传附件!");
return;
}
}
//验证人数和机位数 20190807 修改 如果是不是单地接才判断
if (this.addMsg.GroupType !== "4" && this.addMsg.GroupType !== "3") {
if (this.addMsg.ChirdNoNeedBedNum == "") {
this.addMsg.ChirdNoNeedBedNum = 0;
// this.$message.warning("请输入儿童不占床数!如果没有请输入0!");
// return;
}
if (this.addMsg.ChirdNeedBedNum == "") {
this.addMsg.ChirdNeedBedNum = 0;
// this.$message.warning("请输入儿童占床数!如果没有请输入0!");
// return;
}
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((Number(this.addMsg.ManNum)+Number(this.addMsg.ChirdNoNeedBedNum)+Number(this.addMsg.ChirdNeedBedNum)+Number(this.addMsg.OldPeopleNum))
// <(Number(this.addMsg.YSeatNum)+Number(this.addMsg.ESeatNum)+Number(this.addMsg.FSeatNum)))
// {
// this.$message.warning('机票数量不能大于人数总和!')
// return
// }
if (this.userId == 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;
// this.$message.warning("请输入儿童不占床数!如果没有请输入0!");
// return;
}
}
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.addObj.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.addObj.IsSupportChildren;
this.addMsg.IsBirdDiscount = this.addObj.IsBirdDiscount;
this.apipost(
"sellorder_post_SetOrderInfo_02",
this.addMsg,
(res) => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.$refs["addMsg"].resetFields();
this.clearMsg();
this.isShowLayer = false;
} else {
this.$message.error(res.data.message);
}
},
(err) => {}
);
this.$emit('change', this.addMsg)
},
// todo 购买的产品信息,需要从外部传入
goBuy(obj) {
......
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