Commit ec4a0f81 authored by 黄奎's avatar 黄奎

包车处理

parent 863f251a
<style scoped> <style scoped>
.combottomDiv { .combottomDiv {
width: inherit; width: inherit;
} }
.lineMG .query_box { .lineMG .query_box {
font-size: 12px; font-size: 12px;
padding: 29px 0; padding: 29px 0;
padding-right: 30px; padding-right: 30px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.lineMG .el-switch.is-checked .el-switch__core { .lineMG .el-switch.is-checked .el-switch__core {
border-color: #4bca81; border-color: #4bca81;
background-color: #4bca81; background-color: #4bca81;
} }
.lineMG .addCompany { .lineMG .addCompany {
width: 440px; width: 440px;
max-height: 600px; max-height: 600px;
} }
.lineMG .addCompany .el-dialog__body { .lineMG .addCompany .el-dialog__body {
height: 486px; height: 486px;
overflow: auto; overflow: auto;
} }
.lineMG .query_box div label { .lineMG .query_box div label {
display: inline-block; display: inline-block;
min-width: 80px; min-width: 80px;
text-align: right; text-align: right;
font-style: normal; font-style: normal;
margin: 0 20px 0 0; margin: 0 20px 0 0;
} }
input::-webkit-outer-spin-button, input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { input::-webkit-inner-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
} }
input[type="number"] { input[type="number"] {
-moz-appearance: textfield; -moz-appearance: textfield;
} }
.lineType { .lineType {
width: 51px; width: 51px;
height: 24px; height: 24px;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
line-height: 24px; line-height: 24px;
margin-top: 25px; margin-top: 25px;
border-radius: 4px; border-radius: 4px;
background-color: #ff9c00; background-color: #ff9c00;
color: #ffffff; color: #ffffff;
} }
.lineMG .LMTable tr { .lineMG .LMTable tr {
height: 70px; height: 70px;
text-align: center !important; text-align: center !important;
background-color: #fff; background-color: #fff;
} }
.comPanyNum { .comPanyNum {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
display: inline-block; display: inline-block;
font-weight: bold; font-weight: bold;
cursor: pointer; cursor: pointer;
margin-bottom: 5px; margin-bottom: 5px;
text-decoration: underline; text-decoration: underline;
} }
.comPanyNum:hover { .comPanyNum:hover {
color: #e95252; color: #e95252;
} }
.zhicai:first-child { .zhicai:first-child {
margin-top: 23px; margin-top: 23px;
} }
.zhicai { .zhicai {
color: #47bf8c; color: #47bf8c;
} }
.partCompany { .partCompany {
padding: 0; padding: 0;
box-shadow: 0px 1px 3px 0px #dedede; box-shadow: 0px 1px 3px 0px #dedede;
} }
.partCompany .popper__arrow::after { .partCompany .popper__arrow::after {
border-bottom-color: #ededed !important; border-bottom-color: #ededed !important;
} }
.partCompany table { .partCompany table {
padding: 10px 0 0 20px; padding: 10px 0 0 20px;
background-color: #ededed; background-color: #ededed;
border-collapse: collapse; border-collapse: collapse;
border: 1px solid #d2d2d2; border: 1px solid #d2d2d2;
font-size: 12px; font-size: 12px;
} }
.partCompany table th { .partCompany table th {
background-color: #ededed; background-color: #ededed;
padding: 5px; padding: 5px;
} }
.partCompany table td { .partCompany table td {
background-color: #ffffff; background-color: #ffffff;
padding: 9px 15px; padding: 9px 15px;
color: #333333; color: #333333;
border: 1px solid #d2d2d2; border: 1px solid #d2d2d2;
} }
.partCompany table td._d_name { .partCompany table td._d_name {
background-color: #ededed; background-color: #ededed;
} }
.partCompany table ._color_666 { .partCompany table ._color_666 {
color: #666666; color: #666666;
} }
.partCompany table tr._color_666 th { .partCompany table tr._color_666 th {
padding: 9px 15px; padding: 9px 15px;
} }
.LineName { .LineName {
display: inline-block; display: inline-block;
width: 170px; width: 170px;
margin: 30px 0 0 20px; margin: 30px 0 0 20px;
text-align: left; text-align: left;
} }
.lineMG .LM_Back { .lineMG .LM_Back {
background-color: #f2f2f2; background-color: #f2f2f2;
} }
.redType { .redType {
color: #e95252; color: #e95252;
} }
.lineMG .tbDiv { .lineMG .tbDiv {
overflow-y: auto; overflow-y: auto;
} }
.departListDiv { .departListDiv {
width: 100%; width: 100%;
height: 200px; height: 200px;
overflow-y: auto; overflow-y: auto;
} }
.lineMG .tbDiv::-webkit-scrollbar { .lineMG .tbDiv::-webkit-scrollbar {
width: 4px; width: 4px;
height: 8px; height: 8px;
} }
.lineMG .tbDiv::-webkit-scrollbar-track { .lineMG .tbDiv::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
border-radius: 4px; border-radius: 4px;
background: #ededed; background: #ededed;
} }
.lineMG .tbDiv::-webkit-scrollbar-thumb { .lineMG .tbDiv::-webkit-scrollbar-thumb {
border-radius: 4px; border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
background: #c9c9c9; background: #c9c9c9;
} }
.departListDiv::-webkit-scrollbar { .departListDiv::-webkit-scrollbar {
width: 4px; width: 4px;
height: 8px; height: 8px;
} }
.departListDiv::-webkit-scrollbar-track { .departListDiv::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
border-radius: 4px; border-radius: 4px;
background: #ededed; background: #ededed;
} }
.departListDiv::-webkit-scrollbar-thumb { .departListDiv::-webkit-scrollbar-thumb {
border-radius: 4px; border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
background: #c9c9c9; background: #c9c9c9;
} }
.LMTable { .LMTable {
width: 100%; width: 100%;
font-size: 12px; font-size: 12px;
} }
.lineMG .LMTable tr th { .lineMG .LMTable tr th {
border-bottom: 1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1;
} }
.lineMG .tbDiv .LMTable td { .lineMG .tbDiv .LMTable td {
border-bottom: 1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1;
border-right: 1px solid #d1d1d1; border-right: 1px solid #d1d1d1;
position: relative; position: relative;
text-align: center; text-align: center;
padding: 5px; padding: 5px;
min-width: 250px; min-width: 250px;
} }
.lineMG .tbDiv table { .lineMG .tbDiv table {
padding-right: 80px; padding-right: 80px;
margin-top: 10px; margin-top: 10px;
border-top: 1px solid #d1d1d1; border-top: 1px solid #d1d1d1;
border-left: 1px solid #d1d1d1; border-left: 1px solid #d1d1d1;
border-right: 1px solid #d1d1d1; border-right: 1px solid #d1d1d1;
} }
.upFentan { .upFentan {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right: 13px; right: 13px;
top: 32%; top: 32%;
} }
.subCountryList { .subCountryList {
width: 150px; width: 150px;
text-align: left; text-align: left;
display: inline-block; display: inline-block;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
top: 3px; top: 3px;
} }
.lineMG ._addLineTB tr { .lineMG ._addLineTB tr {
height: 40px !important; height: 40px !important;
} }
.saveCompanyBtn { .saveCompanyBtn {
margin-top: 20px; margin-top: 20px;
} }
.setItem { .setItem {
cursor: pointer; cursor: pointer;
text-decoration: underline; text-decoration: underline;
position: absolute; position: absolute;
right: 13px; right: 13px;
top: 32%; top: 32%;
} }
._LMComdiv { ._LMComdiv {
float: left; float: left;
width: 32%; width: 32%;
text-align: left; text-align: left;
margin-top: 20px; margin-top: 20px;
} }
.LineRank { .LineRank {
width: 24px; width: 24px;
height: 24px; height: 24px;
background-color: #2aaef2; background-color: #2aaef2;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
line-height: 24px; line-height: 24px;
color: #fff; color: #fff;
margin: 15px auto 5px; margin: 15px auto 5px;
} }
.lineMG .joinDepart { .lineMG .joinDepart {
display: inline-block; display: inline-block;
margin-right: 50px; margin-right: 50px;
text-align: left; text-align: left;
float: left; float: left;
width: 180px; width: 180px;
} }
.lineMG .LM_Rank { .lineMG .LM_Rank {
text-align: center; text-align: center;
} }
._LowDisMoney { ._LowDisMoney {
text-align: left; text-align: left;
margin: 20px 0 0 25px; margin: 20px 0 0 25px;
} }
.LM_Btcontent { .LM_Btcontent {
margin-left: 20px; margin-left: 20px;
} }
.LM_ul li { .LM_ul li {
height: 78px; height: 78px;
margin: 20px 0 0px 0px; margin: 20px 0 0px 0px;
transition: linear all 0.5s; transition: linear all 0.5s;
background-color: #fff; background-color: #fff;
font-size: 12px; font-size: 12px;
border: 1px solid #dddddd; border: 1px solid #dddddd;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
} }
.LM_BTNList { .LM_BTNList {
margin-top: 25px; margin-top: 25px;
} }
.lineMG .el-button-group .el-button { .lineMG .el-button-group .el-button {
padding: 5px; padding: 5px;
} }
.lineMG .LM_ul>li:hover { .lineMG .LM_ul>li:hover {
box-shadow: 0px 0px 20px rgba(191, 191, 191, 1); box-shadow: 0px 0px 20px rgba(191, 191, 191, 1);
transition: all linear 0.5s; transition: all linear 0.5s;
} }
.lineMG .el-date-editor.el-input, .lineMG .el-date-editor.el-input,
.el-date-editor.el-input__inner { .el-date-editor.el-input__inner {
width: auto; width: auto;
} }
.SP_datePicker .el-input__inner { .SP_datePicker .el-input__inner {
padding-right: 0 !important; padding-right: 0 !important;
} }
.SP_AddTicket { .SP_AddTicket {
margin: 10px 10px 0 30px; margin: 10px 10px 0 30px;
} }
</style> </style>
<template> <template>
<div class="flexOne lineMG"> <div class="flexOne lineMG">
...@@ -364,18 +365,20 @@ input[type="number"] { ...@@ -364,18 +365,20 @@ input[type="number"] {
<div>{{ item.B2BPrice }}</div> <div>{{ item.B2BPrice }}</div>
</div> </div>
</el-col> </el-col>
<el-col :span="2"> <template v-if="currentUserInfo&&currentUserInfo.RB_Group_id==2">
<div class="_LowDisMoney"> <el-col :span="2">
<div>B2C价格</div> <div class="_LowDisMoney">
<div>{{ item.B2CPrice }}</div> <div>B2C价格</div>
</div> <div>{{ item.B2CPrice }}</div>
</el-col> </div>
<el-col :span="2"> </el-col>
<div class="_LowDisMoney"> <el-col :span="2">
<div>内部价格</div> <div class="_LowDisMoney">
<div>{{ item.SalesPrice }}</div> <div>内部价格</div>
</div> <div>{{ item.SalesPrice }}</div>
</el-col> </div>
</el-col>
</template>
<el-col :span="3"> <el-col :span="3">
<div class="_LowDisMoney"> <div class="_LowDisMoney">
<div>机场</div> <div>机场</div>
...@@ -452,17 +455,20 @@ input[type="number"] { ...@@ -452,17 +455,20 @@ input[type="number"] {
<el-input type="text" v-model="addMsg.B2BPrice" @keyup.native="checkPrice(addMsg, 'B2BPrice')"></el-input> <el-input type="text" v-model="addMsg.B2BPrice" @keyup.native="checkPrice(addMsg, 'B2BPrice')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <template v-if="currentUserInfo&&currentUserInfo.RB_Group_id==2">
<el-form-item :label="$t('hotel.hotel_B2CPrice')" prop="B2CPrice"> <el-col :span="4">
<el-input type="text" v-model="addMsg.B2CPrice" @keyup.native="checkPrice(addMsg, 'B2CPrice')"></el-input> <el-form-item :label="$t('hotel.hotel_B2CPrice')" prop="B2CPrice">
</el-form-item> <el-input type="text" v-model="addMsg.B2CPrice" @keyup.native="checkPrice(addMsg, 'B2CPrice')">
</el-col> </el-input>
<el-col :span="4"> </el-form-item>
<el-form-item :label="$t('hotel.hotel_SalesPrice')" prop="SalesPrice"> </el-col>
<el-input type="text" v-model="addMsg.SalesPrice" <el-col :span="4">
@keyup.native="checkPrice(addMsg, 'SalesPrice')"></el-input> <el-form-item :label="$t('hotel.hotel_SalesPrice')" prop="SalesPrice">
</el-form-item> <el-input type="text" v-model="addMsg.SalesPrice" @keyup.native="checkPrice(addMsg, 'SalesPrice')">
</el-col> </el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="机场" prop="AirportId" v-if="dataInfo.CarType == 1 || dataInfo.CarType == 2"> <el-form-item label="机场" prop="AirportId" v-if="dataInfo.CarType == 1 || dataInfo.CarType == 2">
<el-select v-model="addMsg.AirportId" filterable placeholder="请选择机场"> <el-select v-model="addMsg.AirportId" filterable placeholder="请选择机场">
...@@ -507,384 +513,369 @@ input[type="number"] { ...@@ -507,384 +513,369 @@ input[type="number"] {
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
var validateCurrent = (rule, value, callback) => { var validateCurrent = (rule, value, callback) => {
if (value === 0) { if (value === 0) {
callback(new Error("请选择币种")); callback(new Error("请选择币种"));
} }
}; };
return { return {
querys: null, querys: null,
//供应商列表 //供应商列表
AirportList: [], AirportList: [],
//门票编号 //门票编号
ProductId: "", ProductId: "",
//景点编号 //景点编号
CarId: "", CarId: "",
//是否自定(自定-不需要选择供应商,) //是否自定(自定-不需要选择供应商,)
IsSelfBook: false, IsSelfBook: false,
//提交报价中 //提交报价中
comBtnText: "保存", comBtnText: "保存",
//新增数据 //新增数据
addMsg: { addMsg: {
ID: 0, ID: 0,
CarId: 0, CarId: 0,
ProductId: 0, ProductId: 0,
StartDate: "", StartDate: "",
EndDate: "", EndDate: "",
Inventory: 0,//库存数量 Inventory: 0, //库存数量
B2BPrice: 0.0,//B2B价格 B2BPrice: 0.0, //B2B价格
B2CPrice: 0.0,//B2C价格 B2CPrice: 0.0, //B2C价格
SalesPrice: 0.0,//内部价格 SalesPrice: 0.0, //内部价格
Remark: "", Remark: "",
CostPrice: 0.0,//成本价格 CostPrice: 0.0, //成本价格
CurrencyId: 0,//币种 CurrencyId: 0, //币种
CurrentRate: 0.0,//汇率 CurrentRate: 0.0, //汇率
AirportId: '',//机场ID (接送机才有) AirportId: '', //机场ID (接送机才有)
}, },
rules: { rules: {
//表单必填验证 //表单必填验证
StartDate: [ StartDate: [{
{
required: true, required: true,
message: "开始日期必填", message: "开始日期必填",
trigger: "change" trigger: "change"
} }],
], EndDate: [{
EndDate: [
{
required: true, required: true,
message: "结束日期必填", message: "结束日期必填",
trigger: "change" trigger: "change"
} }],
], CostPrice: [{
CostPrice: [ required: true,
{ message: "请输入成本价",
required: true, trigger: "change"
message: "请输入成本价", },
trigger: "change" {
}, pattern: this.$commonUtils.Regex.el_Isdecimal,
{ message: "请输入两位小数"
pattern: this.$commonUtils.Regex.el_Isdecimal, }
message: "请输入两位小数" ],
} Inventory: [{
], required: true,
Inventory: [ message: "请输入库存",
{ trigger: "change"
required: true, },
message: "请输入库存", {
trigger: "change" pattern: this.$commonUtils.Regex.el_isInteger,
}, message: "请输入正确的数字"
{ }
pattern: this.$commonUtils.Regex.el_isInteger, ],
message: "请输入正确的数字" B2BPrice: [{
} required: true,
], message: "请输入B2B价格",
B2BPrice: [ trigger: "change"
{ },
required: true, {
message: "请输入B2B价格", pattern: this.$commonUtils.Regex.el_Isdecimal,
trigger: "change" message: "请输入两位小数"
}, }
{ ],
pattern: this.$commonUtils.Regex.el_Isdecimal, B2CPrice: [{
message: "请输入两位小数" required: true,
} message: "请输入B2C价格",
], trigger: "change"
B2CPrice: [ },
{ {
required: true, pattern: this.$commonUtils.Regex.el_Isdecimal,
message: "请输入B2C价格", message: "请输入两位小数"
trigger: "change" }
}, ],
{ SalesPrice: [{
pattern: this.$commonUtils.Regex.el_Isdecimal, required: true,
message: "请输入两位小数" message: "请输入成本价格",
} trigger: "change"
], },
SalesPrice: [ {
{ pattern: this.$commonUtils.Regex.el_Isdecimal,
required: true, message: "请输入两位小数"
message: "请输入成本价格", }
trigger: "change" ],
}, AirportId: [{
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: "请输入两位小数"
}
],
AirportId: [
{
required: true, required: true,
message: "请选择机场", message: "请选择机场",
trigger: "change" trigger: "change"
}, }, ],
], CurrencyId: [
CurrencyId: [ // {
// { // validator:validateCurrent,
// validator:validateCurrent, // trigger: "change"
// trigger: "change" // }
// } ],
], CurrentRate: [{
CurrentRate: [
{
required: true, required: true,
message: "请输输入汇率", message: "请输输入汇率",
trigger: "change" trigger: "change"
} }]
]
},
msg: {
pageIndex: 1,
pageSize: 14,
CarId: 0,
ProductId: 0,
QDate: "",
// EndDate: "",
total: 0,
currentPage: 1
},
tableData: [],
isShowDIv: false,
loading: true,
noData: false,
SelectDefaultValue: 0,
//所有币种
allCurrencyList: [],
addPickerBeginDateBefore: {
disabledDate: time => {
let endTime = new Date(this.addMsg.EndDate);
return endTime.getTime() < time.getTime();
}
},
addPickerBeginDateAfter: {
disabledDate: time => {
// let startTime = new Date(this.addMsg.StartDate);
let startTime = new Date(this.getBeforeDate(1,new Date(this.addMsg.StartDate).Format("yyyy-MM-dd")));
return startTime.getTime() >= time.getTime();
}
},
dataInfo: null
};
},
methods: {
//初始化列表数据
initDataTable() {
this.loading = true;
this.apipost(
"CarSingle_post_GetCarSinglePricePageList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.msg.total = res.data.data.count;
this.tableData = res.data.data.pageData;
this.noData = !this.msg.total > 0;
}
}, },
null msg: {
); pageIndex: 1,
}, pageSize: 14,
resetPageIndex() { CarId: 0,
this.msg.pageIndex = 1; ProductId: 0,
this.msg.currentPage = 1; QDate: "",
}, // EndDate: "",
handleCurrentChange(val) { total: 0,
this.msg.pageIndex = val; currentPage: 1
this.initDataTable(); },
}, tableData: [],
//重置信息 isShowDIv: false,
clearInfo() { loading: true,
this.addMsg.Id = 0; noData: false,
this.addMsg.Inventory = ""; SelectDefaultValue: 0,
this.addMsg.B2BPrice = ""; //所有币种
this.addMsg.B2CPrice = ""; allCurrencyList: [],
this.addMsg.SalesPrice = ""; addPickerBeginDateBefore: {
this.addMsg.Remark = ""; disabledDate: time => {
this.addMsg.CostPrice = ""; let endTime = new Date(this.addMsg.EndDate);
this.addMsg.StartDate = ""; return endTime.getTime() < time.getTime();
this.addMsg.EndDate = "";
this.addMsg.CurrencyId = 0;
this.addMsg.CurrentRate = "";
this.addMsg.AirportId = "";
},
//修改报价信息
updateData(item) {
this.addMsg = {
Id: item.Id,
CarId: this.CarId,
ProductId: this.ProductId,
StartDate: item.StartDate,
EndDate: item.EndDate,
Inventory: item.Inventory,//库存数量
B2BPrice: item.B2BPrice,//B2B价格
B2CPrice: item.B2CPrice,//B2C价格
SalesPrice: item.SalesPrice,//内部价格
Remark: item.Remark,
CostPrice: item.CostPrice,//成本价格
CurrencyId: item.CurrencyId,//币种
CurrentRate: item.CurrentRate,//汇率
AirportId: item.AirportId,
}
},
//获取所有币种
getAllCurrency() {
this.apipost(
"financeinfo_post_GetList",
{},
res => {
if (res.data.resultCode == 1) {
this.allCurrencyList = res.data.data;
} }
}, },
err => { } addPickerBeginDateAfter: {
); disabledDate: time => {
}, // let startTime = new Date(this.addMsg.StartDate);
//获取当前下拉选中币种汇率 let startTime = new Date(this.getBeforeDate(1, new Date(this.addMsg.StartDate).Format("yyyy-MM-dd")));
getCurrentRate(currencyId) { return startTime.getTime() >= time.getTime();
this.addMsg.CurrentRate = 0.0;
this.allCurrencyList.forEach(x => {
if (x.ID == currencyId) {
this.addMsg.CurrentRate = x.Rate;
}
});
},
//获取去币种名
getCurrencyName(currencyId) {
let currencyName = "";
this.allCurrencyList.forEach(x => {
if (x.ID == currencyId) {
currencyName = x.Name + "(" + x.Code + ")";
}
});
return currencyName;
},
//HK新增查询条件
initAirport() {
this.apipost(
"CarSingle_post_GetCarSingleAirportList",
{ ProductId: this.ProductId },
response => {
if (response.data.resultCode == 1) {
this.AirportList = response.data.data;
} }
}, },
null dataInfo: null,
); currentUserInfo: {},
};
}, },
// 获取产品详情 methods: {
getInfo() { //初始化列表数据
this.apipost( initDataTable() {
"CarSingle_post_GetCarSingleProductInfo", this.loading = true;
{ this.apipost(
ProductId: this.ProductId "CarSingle_post_GetCarSinglePricePageList",
}, this.msg,
res => { res => {
if (res.data.resultCode == 1) { this.loading = false;
this.dataInfo = res.data.data; if (res.data.resultCode == 1) {
} this.msg.total = res.data.data.count;
this.tableData = res.data.data.pageData;
this.noData = !this.msg.total > 0;
}
},
null
);
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.msg.currentPage = 1;
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.initDataTable();
},
//重置信息
clearInfo() {
this.addMsg.Id = 0;
this.addMsg.Inventory = "";
this.addMsg.B2BPrice = "";
this.addMsg.B2CPrice = "";
this.addMsg.SalesPrice = "";
this.addMsg.Remark = "";
this.addMsg.CostPrice = "";
this.addMsg.StartDate = "";
this.addMsg.EndDate = "";
this.addMsg.CurrencyId = 0;
this.addMsg.CurrentRate = "";
this.addMsg.AirportId = "";
},
//修改报价信息
updateData(item) {
this.addMsg = {
Id: item.Id,
CarId: this.CarId,
ProductId: this.ProductId,
StartDate: item.StartDate,
EndDate: item.EndDate,
Inventory: item.Inventory, //库存数量
B2BPrice: item.B2BPrice, //B2B价格
B2CPrice: item.B2CPrice, //B2C价格
SalesPrice: item.SalesPrice, //内部价格
Remark: item.Remark,
CostPrice: item.CostPrice, //成本价格
CurrencyId: item.CurrencyId, //币种
CurrentRate: item.CurrentRate, //汇率
AirportId: item.AirportId,
} }
); },
}, //获取所有币种
//提交景点报价 getAllCurrency() {
hotelOfferSet() { this.apipost(
let that = this "financeinfo_post_GetList", {},
this.addMsg.ProductId = this.ProductId; res => {
this.addMsg.CarId = this.CarId; if (res.data.resultCode == 1) {
let msg = [] this.allCurrencyList = res.data.data;
msg.push(this.addMsg) }
this.apipost( },
"CarSingle_post_SetCarSinglePrice", err => {}
msg, );
res => { },
if (res.data.resultCode == 1) { //获取当前下拉选中币种汇率
that.initDataTable(); getCurrentRate(currencyId) {
that.Success("保存成功!"); this.addMsg.CurrentRate = 0.0;
that.isShowDIv = false; this.allCurrencyList.forEach(x => {
that.resetForm("addMsg"); if (x.ID == currencyId) {
// this.goUrl('CharteringProductList', this.CarId); this.addMsg.CurrentRate = x.Rate;
} else {
this.Error(res.data.message);
} }
}, });
null },
); //获取去币种名
}, getCurrencyName(currencyId) {
isdelete(Id) { let currencyName = "";
var that = this; this.allCurrencyList.forEach(x => {
that.Confirm("是否删除?", function () { if (x.ID == currencyId) {
that.apipost( currencyName = x.Name + "(" + x.Code + ")";
"ticketcouponsprice_post_Remove", }
{ });
PriceId: Id return currencyName;
},
//HK新增查询条件
initAirport() {
this.apipost(
"CarSingle_post_GetCarSingleAirportList", {
ProductId: this.ProductId
},
response => {
if (response.data.resultCode == 1) {
this.AirportList = response.data.data;
}
},
null
);
},
// 获取产品详情
getInfo() {
this.apipost(
"CarSingle_post_GetCarSingleProductInfo", {
ProductId: this.ProductId
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.Success("删除成功!"); this.dataInfo = res.data.data;
}
}
);
},
//提交景点报价
hotelOfferSet() {
let that = this
this.addMsg.ProductId = this.ProductId;
this.addMsg.CarId = this.CarId;
let msg = []
msg.push(this.addMsg)
this.apipost(
"CarSingle_post_SetCarSinglePrice",
msg,
res => {
if (res.data.resultCode == 1) {
that.initDataTable(); that.initDataTable();
// that.goUrl('ticketManagement', that.CarId); that.Success("保存成功!");
that.isShowDIv = false;
that.resetForm("addMsg");
} else { } else {
that.Error(res.data.message); this.Error(res.data.message);
} }
}, },
null null
); );
}); },
}, isdelete(Id) {
//提交创建、修改表单 var that = this;
submitForm(addMsg) { that.Confirm("是否删除?", function () {
let that = this; that.apipost(
that.$refs[addMsg].validate(valid => { "ticketcouponsprice_post_Remove", {
if (valid) { PriceId: Id
that.hotelOfferSet(); },
} else { res => {
return false; if (res.data.resultCode == 1) {
} that.Success("删除成功!");
}); that.initDataTable();
}, } else {
resetForm(formName) { that.Error(res.data.message);
this.$refs[formName].resetFields(); }
}, },
//获取供应商是否显示 null
getSuplier() { );
this.apipost( });
"ticketcoupons_post_Get", },
{ //提交创建、修改表单
ID: this.CarId submitForm(addMsg) {
}, let that = this;
res => { that.$refs[addMsg].validate(valid => {
if (res.data.resultCode == 1) { if (valid) {
this.IsSelfBook = res.data.data.IsSelfBook; that.hotelOfferSet();
} else {
return false;
} }
} });
); },
resetForm(formName) {
this.$refs[formName].resetFields();
},
//获取供应商是否显示
getSuplier() {
this.apipost(
"ticketcoupons_post_Get", {
ID: this.CarId
},
res => {
if (res.data.resultCode == 1) {
this.IsSelfBook = res.data.data.IsSelfBook;
}
}
);
},
goUrl(path, id) {
this.$router.push({
name: path,
query: {
id: id
}
});
},
}, },
goUrl(path, id) { created() {
this.$router.push({ this.currentUserInfo = this.getLocalStorage();
name: path,
query: {
id: id
}
});
}, },
}, mounted() {
mounted() { if (this.$route.query && this.$route.query.obj) {
if (this.$route.query && this.$route.query.obj) { this.querys = JSON.parse(this.$route.query.obj)
this.querys = JSON.parse(this.$route.query.obj) this.CarId = this.querys.CarId;
this.CarId = this.querys.CarId; this.ProductId = this.querys.ProductId;
this.ProductId = this.querys.ProductId; this.msg.CarId = this.querys.CarId;
this.msg.CarId = this.querys.CarId; this.msg.ProductId = this.querys.ProductId;
this.msg.ProductId = this.querys.ProductId; }
this.getSuplier();
this.initAirport();
this.getAllCurrency();
this.initDataTable();
this.getInfo()
} }
};
this.getSuplier();
this.initAirport();
this.getAllCurrency();
this.initDataTable();
this.getInfo()
}
};
</script> </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