Commit 9695d499 authored by 黄奎's avatar 黄奎

车辆报价修改

parent 13209c71
<style>
.airlineMg .addCompany {
width: 440px;
max-height: 600px;
}
.airlineMg .addCompany .el-dialog__body {
height: 486px;
overflow: auto;
}
.airlineMg .airline_item_box {
padding-left: 50px;
padding-top: 30px;
}
.airlineMg .airline_item_box .item {
width: 208px;
float: left;
padding: 14px 14px 20px 14px;
margin-right: 30px;
text-align: center;
color: #333333;
border:1px solid #DDDDDD;
background-color: white;
position: relative;
margin-bottom: 20px;
}
.airlineMg .airline_item_box .item .tit {
font-size: 12px;
color:#333333;
white-space: nowrap;
margin-top:10px;
text-overflow: ellipsis;
overflow: hidden;
}
.airlineMg .airline_item_box .item .logo img {
width:100px;
height:100px;
.airlineMg .addCompany {
width: 440px;
max-height: 600px;
}
.airlineMg .addCompany .el-dialog__body {
height: 486px;
overflow: auto;
}
.airlineMg .airline_item_box {
padding-left: 50px;
padding-top: 30px;
}
.airlineMg .airline_item_box .item {
width: 208px;
float: left;
padding: 14px 14px 20px 14px;
margin-right: 30px;
text-align: center;
color: #333333;
border: 1px solid #DDDDDD;
background-color: white;
position: relative;
margin-bottom: 20px;
}
.airlineMg .airline_item_box .item .tit {
font-size: 12px;
color: #333333;
white-space: nowrap;
margin-top: 10px;
text-overflow: ellipsis;
overflow: hidden;
}
.airlineMg .airline_item_box .item .logo img {
width: 100px;
height: 100px;
display: block;
border-radius: 50%;
border: 1px solid #F4F4F4;
margin: 0 auto;
}
.airlineMg .airline_item_box .item .info {
display: block;
flex-direction: row;
margin-bottom: 20px;
}
.airlineMg .airline_item_box .item .info div {
width: 84px;
height: 50px;
float: left;
background-color: #f9f9f9;
}
.airlineMg .airline_item_box .item .info div:nth-child(2) {
float: right;
margin-left:10px;
}
.airlineMg .airline_item_box .item .edit {
background-color: rgba(0, 0, 0, 0.5);
height: 50px;
width: 200px;
position: absolute;
left: 0;
bottom: 0px;
color: white;
font-size: 12px;
cursor: pointer;
}
.airlineMg .airline_item_box .item .edit p {
display: flex;
justify-content: center;
padding: 15px;
}
.airlineMg .airline_item_box .item .edit:hover {
color: #fc6262;
}
.airlineMg .airline_item_box .item .edit i {
font-size: 18px;
}
.airlineMg .airline_item_box .item .phone {
font-size: 12px;
color:#333333;
margin-bottom:15px;
height:37px;
padding-bottom:12px;
border-bottom:1px solid #DDDDDD;
}
.airlineMg {
background-color: #f9f9f9;
}
.airlineMg .IATA {
padding-bottom: 5px;
margin-top: 5px;
font-size:14px;
color:#333333;
}
.airlineMg .IATAs {
color: #999999;
font-size: 12px;
}
.airlineMg .el-switch.is-checked .el-switch__core:after {
left: 100%;
margin-left: -17px;
}
.airlineMg .el-switch__core:after {
content: "";
position: absolute;
top: 1px;
left: 1px;
border-radius: 100%;
transition: all 0.3s;
width: 16px;
height: 16px;
background-color: #fff;
}
.airlineMg .el-switch.is-checked .el-switch__core {
border-color: #4bca81;
background-color: #4bca81;
}
.airlineMg .query-box .el-input,
.airlineMg .query-box .el-input .el-input__inner,
.airlineMg .el-select .el-input {
height: 34px !important;
width: 208px !important;
border-radius: 17px;
}
.airlineMg .query-box li label {
display: inline-block;
min-width: 80px;
text-align: right;
font-style: normal;
margin: 0 20px 0 0;
}
.airlineMg .el-dialog .el-form-item__label {
width: 100px !important;
}
.airlineMg .addCompany input {
width: 208px;
}
/* 上传样式 */
.airlineMg .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
cursor: pointer;
position: relative;
overflow: hidden;
width: 100px;
height: 100px;
border-radius: 50%;
}
.airlineMg .avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.airlineMg .avatar-uploader-icon {
font-size: 28px;
color: white;
width: 100px;
height: 100px;
line-height: 80px;
text-align: center;
position: absolute;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.5);
}
.airlineMg .avatar {
width: 100px;
height: 100px;
display: block;
position: absolute;
left: 0;
top: 0;
}
.airlineMg .repUp {
font-size: 12px;
position: absolute;
left: 25px;
bottom: 10px;
color: white;
}
.airlineMg .tips {
width: 85px;
color: #e95252;
font-size: 12px;
line-height: 20px;
position: absolute;
top: 30px;
right: 90px;
}
.airlineMg .el-checkbox .el-checkbox,
.el-checkbox + .el-checkbox {
margin: 0;
margin-left: 10px;
}
.airlineMg .el-checkbox {
margin: 0;
width: 90px;
margin-left: 10px;
}
.airlineMg .ckek_box {
position: relative;
}
.airlineMg .chekAll {
position: absolute;
left: -67px;
top: 45px;
margin: 0;
}
.airlineMg .query-box li label {
display: inline-block;
min-width: 80px;
text-align: right;
font-style: normal;
margin: 0 20px 0 0;
}
.airlineMg .el-dialog .el-form-item__label {
width: 100px !important;
}
.airlineMg .airUpBtn{float:left;margin-left:0!important;}
.airlineUpbtn{margin-right:7px;}
.airlineMg .icon-weibiaoti-{position: relative;top:2px;}
}
.airlineMg .airline_item_box .item .info {
display: block;
flex-direction: row;
margin-bottom: 20px;
}
.airlineMg .airline_item_box .item .info div {
width: 84px;
height: 50px;
float: left;
background-color: #f9f9f9;
}
.airlineMg .airline_item_box .item .info div:nth-child(2) {
float: right;
margin-left: 10px;
}
.airlineMg .airline_item_box .item .edit {
background-color: rgba(0, 0, 0, 0.5);
height: 50px;
width: 200px;
position: absolute;
left: 0;
bottom: 0px;
color: white;
font-size: 12px;
cursor: pointer;
}
.airlineMg .airline_item_box .item .edit p {
display: flex;
justify-content: center;
padding: 15px;
}
.airlineMg .airline_item_box .item .edit:hover {
color: #fc6262;
}
.airlineMg .airline_item_box .item .edit i {
font-size: 18px;
}
.airlineMg .airline_item_box .item .phone {
font-size: 12px;
color: #333333;
margin-bottom: 15px;
height: 37px;
padding-bottom: 12px;
border-bottom: 1px solid #DDDDDD;
}
.airlineMg {
background-color: #f9f9f9;
}
.airlineMg .IATA {
padding-bottom: 5px;
margin-top: 5px;
font-size: 14px;
color: #333333;
}
.airlineMg .IATAs {
color: #999999;
font-size: 12px;
}
.airlineMg .el-switch.is-checked .el-switch__core:after {
left: 100%;
margin-left: -17px;
}
.airlineMg .el-switch__core:after {
content: "";
position: absolute;
top: 1px;
left: 1px;
border-radius: 100%;
transition: all 0.3s;
width: 16px;
height: 16px;
background-color: #fff;
}
.airlineMg .el-switch.is-checked .el-switch__core {
border-color: #4bca81;
background-color: #4bca81;
}
.airlineMg .query-box .el-input,
.airlineMg .query-box .el-input .el-input__inner,
.airlineMg .el-select .el-input {
height: 34px !important;
width: 208px !important;
border-radius: 17px;
}
.airlineMg .query-box li label {
display: inline-block;
min-width: 80px;
text-align: right;
font-style: normal;
margin: 0 20px 0 0;
}
.airlineMg .el-dialog .el-form-item__label {
width: 100px !important;
}
.airlineMg .addCompany input {
width: 208px;
}
/* 上传样式 */
.airlineMg .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
cursor: pointer;
position: relative;
overflow: hidden;
width: 100px;
height: 100px;
border-radius: 50%;
}
.airlineMg .avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.airlineMg .avatar-uploader-icon {
font-size: 28px;
color: white;
width: 100px;
height: 100px;
line-height: 80px;
text-align: center;
position: absolute;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.5);
}
.airlineMg .avatar {
width: 100px;
height: 100px;
display: block;
position: absolute;
left: 0;
top: 0;
}
.airlineMg .repUp {
font-size: 12px;
position: absolute;
left: 25px;
bottom: 10px;
color: white;
}
.airlineMg .tips {
width: 85px;
color: #e95252;
font-size: 12px;
line-height: 20px;
position: absolute;
top: 30px;
right: 90px;
}
.airlineMg .el-checkbox .el-checkbox,
.el-checkbox+.el-checkbox {
margin: 0;
margin-left: 10px;
}
.airlineMg .el-checkbox {
margin: 0;
width: 90px;
margin-left: 10px;
}
.airlineMg .ckek_box {
position: relative;
}
.airlineMg .chekAll {
position: absolute;
left: -67px;
top: 45px;
margin: 0;
}
.airlineMg .query-box li label {
display: inline-block;
min-width: 80px;
text-align: right;
font-style: normal;
margin: 0 20px 0 0;
}
.airlineMg .el-dialog .el-form-item__label {
width: 100px !important;
}
.airlineMg .airUpBtn {
float: left;
margin-left: 0 !important;
}
.airlineUpbtn {
margin-right: 7px;
}
.airlineMg .icon-weibiaoti- {
position: relative;
top: 2px;
}
</style>
<template>
<div class="flexOne airlineMg">
......@@ -228,11 +275,13 @@
</li>
<li>
<label class="">{{$t('system.query_IATA')}}</label>
<el-input v-model="msg.AlCode" :placeholder="$t('system.ph_in')" maxlength="3" @keyup.native.enter="getList"></el-input>
<el-input v-model="msg.AlCode" :placeholder="$t('system.ph_in')" maxlength="3" @keyup.native.enter="getList">
</el-input>
</li>
<li>
<label class="">{{$t('system.query_ICAO')}}</label>
<el-input v-model="msg.TicketCode" :placeholder="$t('system.ph_in')" maxlength="4" @keyup.native.enter="getList"></el-input>
<el-input v-model="msg.TicketCode" :placeholder="$t('system.ph_in')" maxlength="4"
@keyup.native.enter="getList"></el-input>
</li>
<li>
<input type="button" class="hollowFixedBtn" value="查询" @click="resetPageIndex(),getList()" /> &nbsp;
......@@ -262,15 +311,16 @@
<!-- <div class="edit" v-show="chosenIndex==index" @click="outerVisible = true,dialogTitle='修改航空公司',updateData(index)">
<p><i class='el-icon-edit-outline'></i>{{$t('system.table_edit')}}</p>
</div> -->
<input type="button" class="normalBtn airUpBtn airlineUpbtn" value="修改信息" @click="outerVisible = true,dialogTitle='修改航空公司',updateData(index)" />
<input type="button" class="normalBtn airUpBtn airlineUpbtn" value="修改信息"
@click="outerVisible = true,dialogTitle='修改航空公司',updateData(index)" />
<input type="button" class="normalBtn airUpBtn" value="账户管理" @click="goBackAccount(item)" />
</div>
</div>
<div class="noData" v-show="noData">
{{$t('system.content_noData')}}
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" layout="total,prev, pager, next, jumper"
:page-size=msg.pageSize :total=total>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total>
</el-pagination>
<el-dialog center custom-class='insideDialog' width="100" title="提示信息" :visible.sync="innerVisible" append-to-body>
{{this.insideDialogTxt}}
......@@ -278,29 +328,34 @@
<button class="normalBtn" type="primary" @click="innerVisible=false">{{$t('pub.sureBtn')}}</button>
</div>
</el-dialog>
<el-dialog custom-class='addCompany' :title="dialogTitle" :visible.sync="outerVisible" center :before-close="closeChangeMachie">
<el-dialog custom-class='addCompany' :title="dialogTitle" :visible.sync="outerVisible" center
:before-close="closeChangeMachie">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
<el-form-item :label="$t('system.query_airName')" prop="AlName">
<el-input type="text" v-model="addMsg.AlName" :placeholder="$t('system.ph_airName')" maxlength="20"></el-input>
<el-input type="text" v-model="addMsg.AlName" :placeholder="$t('system.ph_airName')" maxlength="20">
</el-input>
</el-form-item>
<el-form-item :label="$t('system.query_IATA')" prop="AlCode">
<el-input type="text" v-model="addMsg.AlCode" :placeholder="$t('system.ph_IATA')" maxlength="3"></el-input>
</el-form-item>
<el-form-item :label="$t('system.query_ICAO')" prop="TicketCode">
<el-input type="text" v-model="addMsg.TicketCode" :placeholder="$t('system.ph_ICAO')" maxlength="4"></el-input>
<el-input type="text" v-model="addMsg.TicketCode" :placeholder="$t('system.ph_ICAO')" maxlength="4">
</el-input>
</el-form-item>
<el-form-item label="父级公司" prop="TicketCode">
<el-select v-model="addMsg.ParentId" filterable placeholder="请选择">
<el-option label="无" value='0'></el-option>
<el-option :label="item.AlName" :value='item.AirLineId' v-for="item in allCompanyData" :key="item.ID"></el-option>
<el-option :label="item.AlName" :value='item.AirLineId' v-for="item in allCompanyData" :key="item.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('system.table_kfPhone')" prop="ServiceTel">
<el-input type="text" v-model="addMsg.ServiceTel" :placeholder="$t('system.ph_kfphone')" maxlength="12"></el-input>
<el-input type="text" v-model="addMsg.ServiceTel" :placeholder="$t('system.ph_kfphone')" maxlength="12">
</el-input>
</el-form-item>
<el-form-item :label="$t('system.table_logoImg')">
<el-upload class="avatar-uploader" :action="importFileUrl" :show-file-list="false" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<el-upload class="avatar-uploader" :action="importFileUrl" :show-file-list="false"
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i class="el-icon-upload2 avatar-uploader-icon"></i>
<span v-if="imageUrl" class="repUp">{{$t('system.up_againUp')}}</span>
......@@ -314,7 +369,8 @@
<el-switch v-model="addMsg.AutomaticGeneration" active-value="1" inactive-value="0"></el-switch>
</el-form-item>
<el-form-item :label="$t('system.table_ticketCont')" calss="ckek_box" v-if='addMsg.AutomaticGeneration=="1"'>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange" class="chekAll">{{$t('system.table_chekAll')}}</el-checkbox>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"
class="chekAll">{{$t('system.table_chekAll')}}</el-checkbox>
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
<el-checkbox v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox>
</el-checkbox-group>
......@@ -323,293 +379,291 @@
</el-form>
<div slot="footer" class="dialog-footer">
<button class="normalBtn" type="primary" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> &nbsp;
<button class="hollowFixedBtn" @click="outerVisible = false,resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button>
<button class="hollowFixedBtn"
@click="outerVisible = false,resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button>
</div>
</el-dialog>
</div>
</template>
<script>
const cityOptions = [
"客人姓",
"客人名",
"英文姓",
"英文名",
"性别",
"出生日期",
"出生地",
"签发地",
"酒店寄房间",
"客户手机",
"客户Email",
"护照证件",
"签注类型",
"身份证号",
"证件类型",
"PNR组别",
"条码号",
"备注",
"分房"
];
export default {
data() {
return {
msg: {
pageIndex: 1,
pageSize: 14,
AlName: "",
AlCode: "",
TicketCode: ""
},
addMsg: {
AirLineId: 0,
AlCode: "",
AlName: "",
TicketCode: "",
ServiceTel: "",
image: "",
AutomaticGeneration: "",
ticket_requirements: "",
ParentId: "0"
},
importFileUrl:
this.domainManager().UploadFileUrl +
"?cmd=User_post_FileUpload&fileType=1&fileLimit=10",
defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"',
checkAll: false,
checkedCities: [],
cities: cityOptions,
isIndeterminate: true,
DataList: [],
loading: true,
imageUrl: "",
total: 0,
chosenIndex: -1,
currentPage: 1,
outerVisible: false,
innerVisible: false,
noData: false,
insideDialogTxt: "保存成功!",
dialogTitle: "",
rules: {
AlName: [
{
const cityOptions = [
"客人姓",
"客人名",
"英文姓",
"英文名",
"性别",
"出生日期",
"出生地",
"签发地",
"酒店寄房间",
"客户手机",
"客户Email",
"护照证件",
"签注类型",
"身份证号",
"证件类型",
"PNR组别",
"条码号",
"备注",
"分房"
];
export default {
data() {
return {
msg: {
pageIndex: 1,
pageSize: 14,
AlName: "",
AlCode: "",
TicketCode: ""
},
addMsg: {
AirLineId: 0,
AlCode: "",
AlName: "",
TicketCode: "",
ServiceTel: "",
image: "",
AutomaticGeneration: "",
ticket_requirements: "",
ParentId: "0"
},
importFileUrl: this.domainManager().UploadFileUrl +
"?cmd=User_post_FileUpload&fileType=1&fileLimit=10",
defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"',
checkAll: false,
checkedCities: [],
cities: cityOptions,
isIndeterminate: true,
DataList: [],
loading: true,
imageUrl: "",
total: 0,
chosenIndex: -1,
currentPage: 1,
outerVisible: false,
innerVisible: false,
noData: false,
insideDialogTxt: "保存成功!",
dialogTitle: "",
rules: {
AlName: [{
required: true,
message: "请输入航空公司名称",
trigger: "blur"
}
],
AlCode: [
{
required: true,
message: "请输入IATA",
trigger: "blur"
}],
AlCode: [{
required: true,
message: "请输入IATA",
trigger: "blur"
},
{
pattern: this.$commonUtils.Regex.el_IsNumEn,
message: "请输正确的IATA"
}
],
TicketCode: [{
required: true,
message: "请输入ICAO",
trigger: "blur"
},
{
pattern: this.$commonUtils.Regex.el_IsNumEn,
message: "请输正确的ICAO"
}
]
},
allCompanyData: []
};
},
methods: {
getList() {
//获取数据分页
this.loading = true;
this.apipost(
"airline_post_GetPageList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
if (this.total > 0) {
res.data.data.pageData.forEach(x => {
if (x.image) {
x.image = this.domainManager().ViittoFileUrl + x.image;
}
});
this.noData = false;
this.DataList = res.data.data.pageData;
} else {
this.noData = true;
this.DataList = [];
}
} else {
this.Error(res.data.message);
}
},
{
pattern: this.$commonUtils.Regex.el_IsNumEn,
message: "请输正确的IATA"
}
],
TicketCode: [
{
required: true,
message: "请输入ICAO",
trigger: "blur"
err => {}
);
},
getAllAirCompany() {
this.apipost(
"airline_post_GetList", {},
res => {
if (res.data.resultCode == 1) {
this.allCompanyData = res.data.data;
}
},
{
pattern: this.$commonUtils.Regex.el_IsNumEn,
message: "请输正确的ICAO"
}
]
err => {}
);
},
allCompanyData: []
};
},
methods: {
getList() {
//获取数据分页
this.loading = true;
this.apipost(
"airline_post_GetPageList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
if (this.total > 0) {
res.data.data.pageData.forEach(x => {
if (x.image) {
x.image =this.domainManager().ViittoFileUrl+ x.image;
}
});
this.noData = false;
this.DataList = res.data.data.pageData;
addAirline() {
//新增航空公司
if (this.addMsg.AirLineId == "") {
this.addMsg.AirLineId = 0;
}
if (this.addMsg.image == null) {
this.addMsg.image = "";
}
this.addMsg.ticket_requirements = JSON.stringify(this.checkedCities);
this.apipost(
"airline_post_Set",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.tips("保存成功!", "success");
this.getList();
this.outerVisible = false;
this.resetForm("addMsg");
} else {
this.noData = true;
this.DataList = [];
this.tips(res.data.message, "warning");
this.innerVisible = true;
this.insideDialogTxt = res.data.message;
}
},
err => {}
);
},
showEdit(index) {
//鼠标移入
this.chosenIndex = this.chosenIndex == index ? -1 : index;
},
updateData(index) {
//修改
let msg = {
ID: this.DataList[index].AirLineId
};
this.apipost(
"airline_post_Get",
msg,
res => {
res.data.data.AutomaticGeneration = res.data.data.AutomaticGeneration.toString();
if (res.data.data.ParentId == 0) res.data.data.ParentId = "0";
if (res.data.data.ticket_requirements.length > 0) {
this.imageUrl = res.data.data.image;
this.checkedCities = JSON.parse(res.data.data.ticket_requirements);
}
this.addMsg = res.data.data;
},
err => {}
);
},
handleCurrentChange(val) {
//翻页功能按钮
this.msg.pageIndex = val;
this.getList();
},
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.addAirline();
} else {
this.Error(res.data.message);
return false;
}
},
err => {}
);
},
getAllAirCompany() {
this.apipost(
"airline_post_GetList",
{},
res => {
if (res.data.resultCode == 1) {
this.allCompanyData = res.data.data;
});
},
initAddMsg() {
//初始化查询数据
let newMsg = {
AirLineId: "",
AlCode: "",
AlName: "",
TicketCode: "",
ServiceTel: "",
image: "",
AutomaticGeneration: "",
ticket_requirements: "",
ParentId: "0"
};
this.addMsg = newMsg;
},
resetPageIndex() {
//查询初始化页码
this.msg.pageIndex = 1;
this.currentPage = 1;
},
closeChangeMachie(done) {
done();
this.resetForm("addMsg");
},
resetForm(formName) {
this.initAddMsg();
this.$refs[formName].resetFields();
},
handleAvatarSuccess(res, file) {
if (res.resultCode == 1) {
var img_path = res.data.FullFilePath;
this.addMsg.image = res.data.FilePath;
this.imageUrl = img_path;
}
},
beforeAvatarUpload(file) {
//上传-
const isJPG = file.type === "image/jpeg";
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error("上传头像图片只能是 JPG 格式!");
}
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
}
return isJPG && isLt2M;
},
tips(msg, type) {
this.$message({
message: msg,
duration: 2000,
type: type
});
},
handleCheckAllChange(val) {
//多选
this.checkedCities = val ? cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cities.length;
},
goBackAccount(item) {
this.$router.push({
name: "empBankAccount",
query: {
id: item.AirLineId,
type: 6,
blank: 'y',
tab: '账户管理'
}
},
err => {}
);
},
addAirline() {
//新增航空公司
if (this.addMsg.AirLineId == "") {
this.addMsg.AirLineId = 0;
}
if (this.addMsg.image == null) {
this.addMsg.image = "";
});
}
this.addMsg.ticket_requirements = JSON.stringify(this.checkedCities);
this.apipost(
"airline_post_Set",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.tips("保存成功!", "success");
this.getList();
this.outerVisible = false;
this.resetForm("addMsg");
} else {
this.tips(res.data.message, "warning");
this.innerVisible = true;
this.insideDialogTxt = res.data.message;
}
},
err => {}
);
},
showEdit(index) {
//鼠标移入
this.chosenIndex = this.chosenIndex == index ? -1 : index;
},
updateData(index) {
//修改
let msg = {
ID: this.DataList[index].AirLineId
};
this.apipost(
"airline_post_Get",
msg,
res => {
res.data.data.AutomaticGeneration = res.data.data.AutomaticGeneration.toString();
if (res.data.data.ParentId == 0) res.data.data.ParentId = "0";
if (res.data.data.ticket_requirements.length > 0) {
this.imageUrl = res.data.data.image;
this.checkedCities = JSON.parse(res.data.data.ticket_requirements);
}
this.addMsg = res.data.data;
},
err => {}
);
},
handleCurrentChange(val) {
//翻页功能按钮
this.msg.pageIndex = val;
mounted() {
this.getList();
},
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.addAirline();
} else {
console.log("error submit!!");
return false;
}
});
},
initAddMsg() {
//初始化查询数据
let newMsg = {
AirLineId: "",
AlCode: "",
AlName: "",
TicketCode: "",
ServiceTel: "",
image: "",
AutomaticGeneration: "",
ticket_requirements: "",
ParentId: "0"
};
this.addMsg = newMsg;
},
resetPageIndex() {
//查询初始化页码
this.msg.pageIndex = 1;
this.currentPage = 1;
},
closeChangeMachie(done) {
done();
this.resetForm("addMsg");
},
resetForm(formName) {
this.initAddMsg();
this.$refs[formName].resetFields();
},
handleAvatarSuccess(res, file) {
//上传
console.log("上传文件", res);
if (res.resultCode == 1) {
var img_path = res.data.FullFilePath;
this.addMsg.image = res.data.FilePath;
this.imageUrl = img_path;
}
},
beforeAvatarUpload(file) {
//上传-
const isJPG = file.type === "image/jpeg";
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error("上传头像图片只能是 JPG 格式!");
}
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
}
return isJPG && isLt2M;
},
tips(msg, type) {
this.$message({
message: msg,
duration: 2000,
type: type
});
},
handleCheckAllChange(val) {
//多选
this.checkedCities = val ? cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cities.length;
},
goBackAccount(item) {
this.$router.push({
name: "empBankAccount",
query: { id: item.AirLineId, type: 6 ,blank:'y',tab:'账户管理'}
});
this.getAllAirCompany();
}
},
mounted() {
this.getList();
this.getAllAirCompany();
}
};
};
</script>
<style>
.busUsePrice .busList {
width: 200px;
height: 280px;
float: left;
margin:0 10px 10px 0;
background-color: #fff;
border-radius: 4px;
font-size: 12px;
overflow: hidden;
}
.busUsePrice .busListTop {
width: 100%;
position: relative;
text-align: center;
}
.busUsePrice .usePricediv {
margin: 7px 0 0 20px;
}
.busUsePrice .btmAddStore {
border-top: 1px solid #d1d1d1;
width: 100%;
display: none;
overflow-x: auto;
overflow-y: auto;
position: fixed;
background: #f9f9f9;
bottom: 0;
}
.busUsePrice .changeMsg {
width: 80%;
}
.busUsePrice .changeMsg li {
float: left;
}
.busUsePrice .changeMsg li:first-child {
margin-left: 20px;
}
.busUsePrice .btmTitle {
padding: 0 10px;
margin: 20px 0 20px 25px;
border-left: 3px solid #e95252;
font-size: 14px;
color: #000000;
}
.busUsePrice .busUsePeople .el-input__inner {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.busUsePrice .busType {
margin: 10px 0 0 31px;
font-size: 14px;
display: inline-block;
}
.busUsePrice .cityBtnList {
margin: 10px 0 20px 20px;
}
.busUsePrice .busUserBtnList {
width: 100%;
text-align: center;
margin-top: 10px;
}
.busUsePrice .busListTop img {
width: 100%;
}
.busUsePrice .BusTypeStr {
position: absolute;
top: 15px;
color: #fff;
font-size: 25px;
left: 63px;
}
.busUsePrice .UPBtn {
width: 70px;
height: 23px;
}
.busUsePrice .topNotice {
width: 100%;
height: 20px;
font-size: 12px;
text-align: left;
margin: 20px 0;
}
.busUsePrice .delScien {
position: absolute;
right: 10px;
top: 10px;
display: none;
}
.busUsePrice .delScien:hover {
color: #f76f6f;
cursor: pointer;
}
.busUsePrice .busList:hover .delScien {
display: block;
}
.busUsePrice .busDiv {
margin-top: 20px;
}
.busUsePrice .busList:hover {
box-shadow: 0px 0px 20px rgba(191, 191, 191, 1);
transition: all linear 0.5s;
}
.Bus_BtnList{text-align: right;margin-bottom: 10px;}
.Bus_Spacing{margin-left:24px;}
.busUsePrice .combottomDiv .el-select{
width:100%;
}
.busUsePrice .busList {
width: 230px;
height: 240px;
float: left;
margin: 0 10px 10px 0;
background-color: #fff;
border-radius: 4px;
font-size: 12px;
overflow: hidden;
}
.busUsePrice .busListTable{
width: 98%;
margin: 0px 2px 0px 2px;
}
.busUsePrice .busListTable tr td{
height: 20px;
line-height: 20px;
}
.busUsePrice .busListTop {
width: 100%;
position: relative;
text-align: center;
}
.busUsePrice .usePricediv {
margin: 7px 0 0 20px;
}
.busUsePrice .btmAddStore {
border-top: 1px solid #d1d1d1;
width: 100%;
display: none;
overflow-x: auto;
overflow-y: auto;
position: fixed;
background: #f9f9f9;
bottom: 0;
}
.busUsePrice .changeMsg {
width: 80%;
}
.busUsePrice .changeMsg li {
float: left;
}
.busUsePrice .changeMsg li:first-child {
margin-left: 20px;
}
.busUsePrice .btmTitle {
padding: 0 10px;
margin: 20px 0 20px 25px;
border-left: 3px solid #e95252;
font-size: 14px;
color: #000000;
}
.busUsePrice .busUsePeople .el-input__inner {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.busUsePrice .busType {
margin: 10px 0 0 31px;
font-size: 14px;
display: inline-block;
}
.busUsePrice .cityBtnList {
margin: 10px 0 20px 20px;
}
.busUsePrice .busUserBtnList {
width: 100%;
text-align: center;
margin-top: 10px;
}
.busUsePrice .busListTop img {
width: 100%;
}
.busUsePrice .BusTypeStr {
position: absolute;
top: 15px;
color: #fff;
font-size: 25px;
left: 63px;
}
.busUsePrice .UPBtn {
width: 70px;
height: 23px;
}
.busUsePrice .topNotice {
width: 100%;
height: 20px;
font-size: 12px;
text-align: left;
margin: 20px 0;
}
.busUsePrice .delScien {
position: absolute;
right: 10px;
top: 10px;
display: none;
}
.busUsePrice .delScien:hover {
color: #f76f6f;
cursor: pointer;
}
.busUsePrice .busList:hover .delScien {
display: block;
}
.busUsePrice .busDiv {
margin-top: 20px;
}
.busUsePrice .busList:hover {
box-shadow: 0px 0px 20px rgba(191, 191, 191, 1);
transition: all linear 0.5s;
}
.Bus_BtnList {
text-align: right;
margin-bottom: 10px;
}
.Bus_Spacing {
margin-left: 24px;
}
.busUsePrice .combottomDiv .el-select {
width: 100%;
}
</style>
<template>
<div class="flexOne busUsePrice">
......@@ -122,36 +159,53 @@
<div class="busDiv clearfix" v-loading="loading">
<div class="busList" v-for="item in dataList" :key="item.subCode">
<div class="busListTop">
<img src="../../assets/img/suplier.jpg">
<img v-if="item.ShowBusImage" :src="item.ShowBusImage" style="width:230px;height:60px;" />
<img v-else src="../../assets/img/suplier.jpg" style="width:200px;height:60px;" />
<span class="BusTypeStr">{{item.BusTypeStr}}</span>
<div class="delScien" @click="isdelete(item.Id)">
<i class="iconfont icon-xingzhuang"></i>
</div>
</div>
<div class="usePricediv">使用人数:{{item.UseNum}}</div>
<div class="usePricediv">接机报价:{{item.ReceivePrice}}</div>
<div class="usePricediv">送机报价:{{item.SendPrice}}</div>
<div class="usePricediv">全天报价:{{item.AllDayPrice}}</div>
<div class="usePricediv">半天报价:{{item.HalfDayPrice}}</div>
<div class="usePricediv">小时报价:{{item.HourPrice}}</div>
<div class="usePricediv"><span class="Bus_Spacing"></span>{{getArea(item.AreaType)}}</div>
<table class="busListTable">
<tr>
<td style="width:49%;">使用人数:{{item.UseNum}}</td>
<td style="width:49%;"><span class="Bus_Spacing"></span>{{getArea(item.AreaType)}}</td>
</tr>
<tr>
<td>接送报价:{{item.ReceivePrice}}</td>
<td>全天报价:{{item.AllDayPrice}}</td>
</tr>
<tr>
<td colspan="2">
半天报价:{{item.HalfDayPrice}}
</td>
</tr>
<tr>
<td>全天高速:{{item.AllDayHighSpeedFee}}</td>
<td>接送高速:{{item.PickUpHighSpeedFee}}</td>
</tr>
<tr>
<td>全天茶代:{{item.AllDayChaDaiFee}}</td>
<td>接送茶代:{{item.PickUpChaDaiFee}}</td>
</tr>
</table>
<div class="busUserBtnList">
<input type="button" class="normalBtn" @click="managePrice(item.Id)" value="管理报价">
</div>
</div>
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" layout="total,prev, pager, next, jumper"
:page-size="this.msg.pageSize" :total="total">
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="this.msg.pageSize" :total="total">
</el-pagination>
<div class="combottomDiv" v-if="isShow">
<el-row>
<el-col :span="18">
<div class="combottomTitle">报价管理</div>
<div class="combottomTitle">报价管理</div>
</el-col>
<el-col :span="4" class="Bus_BtnList">
<input type="button" class="hollowFixedBtn" @click="cancelPanel" value="取消" />
<input type="button" class="normalBtn" @click="submitForm('addMsg')" value="保存" />
<input type="button" class="hollowFixedBtn" @click="cancelPanel" value="取消" />
<input type="button" class="normalBtn" @click="submitForm('addMsg')" value="保存" />
</el-col>
</el-row>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
......@@ -173,18 +227,19 @@
</el-col>
<el-col :span="5">
<el-form-item label="使用人数" prop="UseNum">
<el-input placeholder="人数" v-model="addMsg.UseNum" @keyup.native="checkInteger(addMsg,'UseNum')" class="busUsePeople">
<el-input placeholder="人数" v-model="addMsg.UseNum" @keyup.native="checkInteger(addMsg,'UseNum')"
class="busUsePeople">
<template slot="append">以下</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="接报价" prop="ReceivePrice">
<el-form-item label="接报价" prop="ReceivePrice">
<el-input v-model="addMsg.ReceivePrice" @keyup.native="checkPrice(addMsg,'ReceivePrice')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="送机报价" prop="SendPrice">
<el-form-item label="送机报价" prop="SendPrice" style="display:none;">
<el-input v-model="addMsg.SendPrice" @keyup.native="checkPrice(addMsg,'SendPrice')"></el-input>
</el-form-item>
</el-col>
......@@ -198,22 +253,57 @@
<el-input v-model="addMsg.HalfDayPrice" @keyup.native="checkPrice(addMsg,'HalfDayPrice')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="5" style="display:none;">
<el-form-item label="小时报价" prop="HourPrice">
<el-input v-model="addMsg.HourPrice" @keyup.native="checkPrice(addMsg,'HourPrice')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="全天高速" prop="AllDayHighSpeedFee">
<el-input v-model="addMsg.AllDayHighSpeedFee" @keyup.native="checkPrice(addMsg,'HourPrice')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="接送高速" prop="PickUpHighSpeedFee">
<el-input v-model="addMsg.PickUpHighSpeedFee" @keyup.native="checkPrice(addMsg,'PickUpHighSpeedFee')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="全天茶代" prop="AllDayChaDaiFee">
<el-input v-model="addMsg.AllDayChaDaiFee" @keyup.native="checkPrice(addMsg,'AllDayChaDaiFee')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="接送茶代" prop="PickUpChaDaiFee">
<el-input v-model="addMsg.PickUpChaDaiFee" @keyup.native="checkPrice(addMsg,'PickUpChaDaiFee')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="币种" prop="CurrencyId">
<el-select filterable v-model='addMsg.CurrencyId' @change="getRate(addMsg.CurrencyId)" >
<el-option label='不限' :value="selectDefauleValue"></el-option>
<el-option v-for="item in currencyTypeList" :key="item.ID" :value="item.ID" :label="item.Name"></el-option>
</el-select>
<el-select filterable v-model='addMsg.CurrencyId' @change="getRate(addMsg.CurrencyId)">
<el-option label='不限' :value="selectDefauleValue"></el-option>
<el-option v-for="item in currencyTypeList" :key="item.ID" :value="item.ID" :label="item.Name">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="汇率" prop="CurrentRate">
<el-input v-model="addMsg.CurrentRate" @keyup.native="checkRate(addMsg,'CurrentRate')"></el-input>
<el-input v-model="addMsg.CurrentRate" @keyup.native="checkRate(addMsg,'CurrentRate')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车辆图片">
<el-upload class="avatar-uploader" :http-request="UploadImage" :multiple="false"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<img v-if="addMsg.ShowBusImage&&addMsg.ShowBusImage!=''" :src="addMsg.ShowBusImage"
style="width:200px;height:100px">
<i class="el-icon-upload2 avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="10">
......@@ -229,293 +319,323 @@
</template>
<script>
export default {
data() {
var DealAreaValidate = (rule, value, callback) => {
if (value === 0) {
callback(new Error("请选择地区"));
} else {
callback();
}
};
var validateCurrency = (rule, value, callback) => {
if (value === 0) {
callback(new Error("请选择币种"));
} else {
callback();
}
};
return {
total: 0,
currentPage: 1,
dataList: "",
loading: false,
isShow: false,
BusTypeList: "",
selectDefauleValue:0,
AreaList:[],
currencyTypeList:[],
msg: {
pageIndex: 1,
pageSize: 18
},
//表单json
addMsg: {
ID: 0,
UseNum: "",
BusType: "",
ReceivePrice: "",
SendPrice: "",
AllDayPrice: "",
HalfDayPrice: "",
HourPrice: "",
Remark: "",
AreaType:0,
CurrencyId:0,
CurrentRate: 0
},
//表单验证
rules: {
AreaType: [{
export default {
data() {
var DealAreaValidate = (rule, value, callback) => {
if (value === 0) {
callback(new Error("请选择地区"));
} else {
callback();
}
};
var validateCurrency = (rule, value, callback) => {
if (value === 0) {
callback(new Error("请选择币种"));
} else {
callback();
}
};
return {
total: 0,
currentPage: 1,
dataList: "",
loading: false,
isShow: false,
BusTypeList: "",
selectDefauleValue: 0,
AreaList: [],
currencyTypeList: [],
msg: {
pageIndex: 1,
pageSize: 18
},
//表单json
addMsg: {
ID: 0,
UseNum: "",
BusType: "",
ReceivePrice: "",
SendPrice: "",
AllDayPrice: "",
HalfDayPrice: "",
HourPrice: "",
Remark: "",
AreaType: 0,
CurrencyId: 0,
CurrentRate: 0,
AllDayHighSpeedFee: 0, //全天高速费
PickUpHighSpeedFee: 0, //接送高速费
AllDayChaDaiFee: 0, //全天茶代费
PickUpChaDaiFee: 0, //接送茶代费
BusImage: '', //车辆图片
ShowBusImage: "",
},
//表单验证
rules: {
AreaType: [{
validator: DealAreaValidate,
trigger: "change",
required:true
}
],
CurrencyId:[{
required: true
}],
CurrencyId: [{
validator: validateCurrency,
trigger: "change",
required:true
}],
BusType: [
{
required: true
}],
BusType: [{
required: true,
message: "请选择车辆类型",
trigger: "change"
}
],
UseNum: [
{
}],
UseNum: [{
required: true,
message: "请输入人数",
trigger: "change"
}
],
ReceivePrice: [
{
}],
ReceivePrice: [{
required: true,
message: "请输入接机价格",
trigger: "change"
}
],
SendPrice: [
{
}],
SendPrice: [{
required: true,
message: "请输入送机价格",
trigger: "change"
}
],
AllDayPrice: [
{
}],
AllDayPrice: [{
required: true,
message: "请输入全天价格",
trigger: "change"
}
],
HalfDayPrice: [
{
}],
HalfDayPrice: [{
required: true,
message: "请输入全天价格",
trigger: "change"
}
],
HourPrice: [
{
}],
HourPrice: [{
required: true,
message: "请输入小时价格",
trigger: "change"
}
]
}
};
},
methods: {
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.initData();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
initData() {
this.loading = true;
this.apipost(
"busprice_get_GetBusPricePageList",
this.msg,
res => {
this.loading = false;
if(res.data.resultCode==1){
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
}
},
null
);
},
saveInfo() {
this.apipost(
"busprice_post_SetBusPrice",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.initData();
this.Success("保存成功");
this.isShow = false;
this.resetForm("addMsg");
} else {
this.Error(res.data.message);
}
},
null
);
},
//获取地区下拉
getAreaList(){
this.apipost(
"busprice_get_GetBusAreaType",
{},
res => {
if(res.data.resultCode==1){
this.AreaList = res.data.data;
}
},
null
);
},
//根据ID获取地区
getArea(AreaType){
var AreaName='';
this.AreaList.forEach(item=>{
if(item.Id==AreaType){
AreaName = item.Name
}],
AllDayHighSpeedFee: [{
required: true,
message: "请输入全天高速价格",
trigger: "change"
}],
PickUpHighSpeedFee: [{
required: true,
message: "请输入接送高速价格",
trigger: "change"
}],
AllDayChaDaiFee: [{
required: true,
message: "请输入全天茶代价格",
trigger: "change"
}],
PickUpChaDaiFee: [{
required: true,
message: "请输入接送茶代价格",
trigger: "change"
}]
}
})
return AreaName;
},
getCurrencyType(){ // 币种类型
this.apipost('financeinfo_post_GetList',{Name:''},res=>{
if(res.data.resultCode==1){
this.currencyTypeList = res.data.data;
}else{
}
},err=>{})
},
//修改管理报价
managePrice(ID) {
this.addMsg.ID = ID;
this.isShow = true;
let msg = {
ID: ID
};
this.apipost(
"busprice_get_GetBusPrice",
msg,
res => {
this.addMsg = res.data.data;
},
null
);
},
/*获取车辆类型列表*/
getBusTypeList() {
this.apipost(
"bus_get_GetBusTypeList",
null,
res => {
methods: {
//上传图片
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var obj = this.$DMCUtils.DMCImageObj();
var str = x.name;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.addMsg.BusImage = x.data.FilePath;
this.addMsg.ShowBusImage = imgUrl;
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.initData();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
initData() {
this.loading = true;
this.apipost(
"busprice_get_GetBusPricePageList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
}
},
null
);
},
saveInfo() {
this.apipost(
"busprice_post_SetBusPrice",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.initData();
this.Success("保存成功");
this.isShow = false;
this.resetForm("addMsg");
} else {
this.Error(res.data.message);
}
},
null
);
},
//获取地区下拉
getAreaList() {
this.apipost(
"busprice_get_GetBusAreaType", {},
res => {
if (res.data.resultCode == 1) {
this.AreaList = res.data.data;
}
},
null
);
},
//根据ID获取地区
getArea(AreaType) {
var AreaName = '';
this.AreaList.forEach(item => {
if (item.Id == AreaType) {
AreaName = item.Name
}
})
return AreaName;
},
getCurrencyType() { // 币种类型
this.apipost('financeinfo_post_GetList', {
Name: ''
}, res => {
if (res.data.resultCode == 1) {
this.BusTypeList = res.data.data;
this.currencyTypeList = res.data.data;
}
},
null
);
},
//币种下拉获取汇率
getRate(ID) {
this.currencyTypeList.forEach(x => {
if (x.ID == ID) {
this.addMsg.CurrentRate = x.Rate;
}
});
},
//取消
cancelPanel() {
this.isShow = false;
this.resetForm("addMsg");
},
//添加
addPanel() {
this.isShow = true;
this.addMsg.ID = 0;
this.clearInfo();
},
clearInfo() {
this.addMsg = {
ID: 0,
UseNum: "",
BusType: "",
ReceivePrice: "",
SendPrice: "",
AllDayPrice: "",
HalfDayPrice: "",
HourPrice: "",
Remark: "",
AreaType:0,
CurrencyId:0,
CurrentRate: 0
};
},
submitForm(addMsg) {
//提交创建、修改表单
let that = this;
that.$refs[addMsg].validate(valid => {
if (valid) {
that.saveInfo();
} else {
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
//删除
isdelete(ID) {
var that = this;
this.Confirm("是否删除?", function() {
var msg = {
}, err => {})
},
//修改管理报价
managePrice(ID) {
this.addMsg.ID = ID;
this.isShow = true;
let msg = {
ID: ID
};
that.apipost(
"busprice_post_RemoveBusPrice",
this.apipost(
"busprice_get_GetBusPrice",
msg,
res => {
this.addMsg = res.data.data;
},
null
);
},
/*获取车辆类型列表*/
getBusTypeList() {
this.apipost(
"bus_get_GetBusTypeList",
null,
res => {
if (res.data.resultCode == 1) {
that.initData();
this.BusTypeList = res.data.data;
}
},
null
);
});
},
//币种下拉获取汇率
getRate(ID) {
this.currencyTypeList.forEach(x => {
if (x.ID == ID) {
this.addMsg.CurrentRate = x.Rate;
}
});
},
//取消
cancelPanel() {
this.isShow = false;
this.resetForm("addMsg");
},
//添加
addPanel() {
this.isShow = true;
this.addMsg.ID = 0;
this.clearInfo();
},
clearInfo() {
this.addMsg = {
ID: 0,
UseNum: "",
BusType: "",
ReceivePrice: "",
SendPrice: "",
AllDayPrice: "",
HalfDayPrice: "",
HourPrice: "",
Remark: "",
AreaType: 0,
CurrencyId: 0,
CurrentRate: 0,
AllDayHighSpeedFee: 0,
PickUpHighSpeedFee: 0,
AllDayChaDaiFee: 0,
PickUpChaDaiFee: 0,
BusImage: ''
};
},
submitForm(addMsg) {
//提交创建、修改表单
let that = this;
that.$refs[addMsg].validate(valid => {
if (valid) {
that.saveInfo();
} else {
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
//删除
isdelete(ID) {
var that = this;
this.Confirm("是否删除?", function () {
var msg = {
ID: ID
};
that.apipost(
"busprice_post_RemoveBusPrice",
msg,
res => {
if (res.data.resultCode == 1) {
that.initData();
}
},
null
);
});
}
},
mounted() {
this.initData();
this.getAreaList();
this.getCurrencyType();
this.getBusTypeList();
}
},
mounted() {
this.initData();
this.getAreaList();
this.getCurrencyType();
this.getBusTypeList();
}
};
</script>
\ No newline at end of file
};
</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