|
@@ -13,7 +13,7 @@
|
|
|
<div style="width: 25%;">
|
|
|
<el-form-item label="团组名称:" label-width="160px">
|
|
|
<el-select v-model="OpVisaPriceData.diId" clearable filterable placeholder="团组选择"
|
|
|
- :disabled="isShow" style="width: 220px;" @change="DiIdSelectChange">
|
|
|
+ :disabled="isShow" style="width: 100%;" @change="DiIdSelectChange">
|
|
|
<el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
|
|
|
:value="item.id">
|
|
|
</el-option>
|
|
@@ -61,14 +61,23 @@
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<el-form :model="OpVisaPriceData" ref="OpVisaPriceData" :rules="OpVisaPriceDataRules" label-width="100px"
|
|
|
- class="demo-ruleForm">
|
|
|
- <div style="display: flex;">
|
|
|
- <div style="width: 25%;">
|
|
|
+ class="demo-ruleForm">
|
|
|
+ <div style="width: 100%;">
|
|
|
+ <el-form-item label="此舱位客人名称:" prop="visaClient" label-width="160px">
|
|
|
+ <el-select @change="clientNamechange" style="width: 100%;" v-model="OpVisaPriceData.visaClient" placeholder="此舱位客人名称" multiple clearable
|
|
|
+ filterable >
|
|
|
+ <el-option v-for="item in fliterClient" :key="item.id" :label="item.lastName+item.firstName" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex;flex-wrap: wrap;">
|
|
|
+ <!-- <div style="width: 25%;">
|
|
|
<el-form-item label="签证客户:" prop="visaClient" label-width="160px">
|
|
|
<el-input placeholder="签证客户" v-model="OpVisaPriceData.visaClient">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div style="width: 25%;">
|
|
|
<el-form-item label="签证费用:" prop="visaPrice" label-width="160px">
|
|
|
<el-input placeholder="签证费用" v-model="OpVisaPriceData.visaPrice" style="width: 58%;">
|
|
@@ -97,23 +106,21 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div style="display: flex;">
|
|
|
<div style="width: 25%;">
|
|
|
<el-form-item label="签证办理人数:" prop="visaNumber" label-width="160px">
|
|
|
- <el-input placeholder="签证办理人数" v-model="OpVisaPriceData.visaNumber" style="width: 58%;">
|
|
|
+ <el-input placeholder="签证办理人数" v-model="OpVisaPriceData.visaNumber" style="width: 100%;">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div style="width: 25%;">
|
|
|
<el-form-item label="免签人数:" prop="visaFreeNumber" label-width="160px">
|
|
|
- <el-input placeholder="免签人数" v-model="OpVisaPriceData.visaFreeNumber" style="width: 58%;">
|
|
|
+ <el-input placeholder="免签人数" v-model="OpVisaPriceData.visaFreeNumber" style="width: 100%;">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="display: flex;">
|
|
|
- <div style="width: 81%;">
|
|
|
+ <div style="width: 100%;">
|
|
|
<el-form-item label="备 注:" prop="Remark" label-width="160px">
|
|
|
<el-input type="textarea" :rows="5" placeholder="备注"
|
|
|
v-model="OpVisaPriceData.remark"></el-input>
|
|
@@ -139,7 +146,7 @@
|
|
|
</div>
|
|
|
<div style="width: 25%;">
|
|
|
<el-form-item label="消费日期:" prop="consumptionDate" label-width="160px">
|
|
|
- <el-date-picker v-model="OpVisaPriceData.consumptionDate" placeholder="消费日期" type="date">
|
|
|
+ <el-date-picker style="width:100%" v-model="OpVisaPriceData.consumptionDate" placeholder="消费日期" type="date">
|
|
|
</el-date-picker>
|
|
|
|
|
|
</el-form-item>
|
|
@@ -316,6 +323,7 @@ export default {
|
|
|
IsAuditGM: 0,
|
|
|
VisitDate: '',
|
|
|
passengerTypeSelect: [],
|
|
|
+ fliterClient:[],
|
|
|
transformDateFormat: function (value) {
|
|
|
|
|
|
// 将value转换为Date对象
|
|
@@ -439,6 +447,7 @@ export default {
|
|
|
that.delegationInfo = that.delegationInfoList[index];
|
|
|
|
|
|
that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
|
|
|
+ that.QueryClientInfoByDIID()
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -486,6 +495,32 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ //选择客户名单
|
|
|
+ clientNamechange(val){
|
|
|
+ this.OpVisaPriceData.visaNumber=val.length;
|
|
|
+ this.verifytoll()
|
|
|
+ console.log(this.ClientFormat(this.OpVisaPriceData.visaClient))
|
|
|
+ },
|
|
|
+ //获取团组客户名单
|
|
|
+ QueryClientInfoByDIID() {
|
|
|
+ var url = "/api/Groups/QueryClientInfoByDIID"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ diid: that.OpVisaPriceData.diId
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res);
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.fliterClient=res.data.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//根据Id获取单挑数据及C表数据
|
|
|
QueryVisaById() {
|
|
|
var url = "/api/Groups/QueryVisaById"
|
|
@@ -504,7 +539,7 @@ export default {
|
|
|
var CreditCardPayment = res.data.data.creditCardPayment;
|
|
|
var VisaInfo = res.data.data.visaInfo;
|
|
|
that.IsAuditGM = CreditCardPayment.isAuditGM;
|
|
|
- that.OpVisaPriceData.visaClient = VisaInfo.visaClient;
|
|
|
+ that.OpVisaPriceData.visaClient = that.ClientFormat(VisaInfo.visaClient);
|
|
|
that.OpVisaPriceData.visaPrice = VisaInfo.visaPrice;
|
|
|
that.OpVisaPriceData.visaCurrency = VisaInfo.visaCurrency;
|
|
|
that.OpVisaPriceData.isThird = VisaInfo.isThird;
|
|
@@ -529,6 +564,15 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //验证人数W
|
|
|
+ verifytoll(){
|
|
|
+ if(Number(this.OpVisaPriceData.visaNumber)+Number(this.OpVisaPriceData.visaFreeNumber)>this.OpVisaPriceData.visaClient.length){
|
|
|
+ this.$message.error("请检查人数");
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.OpVisaPriceData.visaClient=this.ClientFormat(this.OpVisaPriceData.visaClient);
|
|
|
+ }
|
|
|
+ },
|
|
|
addBtn() {
|
|
|
if (this.IsAuditGM == 1) {
|
|
|
this.$message.error('已通过审核,不可修改!');
|
|
@@ -545,7 +589,7 @@ export default {
|
|
|
if (that.OpVisaPriceData.ctdId == '') {
|
|
|
that.OpVisaPriceData.ctdId = 0
|
|
|
}
|
|
|
-
|
|
|
+ that.verifytoll()
|
|
|
var url = "/api/Groups/OpVisaPrice"
|
|
|
that.$axios({
|
|
|
method: 'post',
|
|
@@ -588,25 +632,45 @@ export default {
|
|
|
diId: this.OpVisaPriceData.diId
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ //处理名单
|
|
|
+ ClientFormat(val) {
|
|
|
+ var result = [];
|
|
|
+ if (typeof val == "string") {
|
|
|
+ if (val.indexOf(',') != -1) {
|
|
|
+ result = val.split(',').map(x => { return Number(x) }).filter(f => f > 0)
|
|
|
+ } else {
|
|
|
+ var clientId = Number(val);
|
|
|
+ if (clientId > 0) {
|
|
|
+ result = [clientId]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (Array.isArray(val)) {
|
|
|
+ if (val.length > 0) {
|
|
|
+ result = val.join();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ result = val;
|
|
|
+ }
|
|
|
+ return result;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
mounted() {
|
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
|
- this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
|
|
|
+ this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|
|
|
this.initializeSelect();
|
|
|
- this.OpVisaPriceData.diId = parseInt(this.$route.query.DiId)
|
|
|
- this.OpVisaPriceData.id = this.$route.query.id
|
|
|
- debugger
|
|
|
+ this.OpVisaPriceData.diId = parseInt(this.$route.query.DiId);
|
|
|
+ this.OpVisaPriceData.id = this.$route.query.id;
|
|
|
+ this.QueryClientInfoByDIID()
|
|
|
if (this.OpVisaPriceData.id != null && this.OpVisaPriceData.id != undefined && this.OpVisaPriceData.id != 0) {
|
|
|
this.QueryVisaById();
|
|
|
this.title = "修改签证费用";
|
|
|
- this.OpVisaPriceData.status = 2
|
|
|
- this.isShow = true
|
|
|
+ this.OpVisaPriceData.status = 2;
|
|
|
+ this.isShow = true;
|
|
|
} else {
|
|
|
- this.OpVisaPriceData.status = 1
|
|
|
- this.title = "新增签证费用"
|
|
|
- this.isShow = false
|
|
|
+ this.OpVisaPriceData.status = 1;
|
|
|
+ this.title = "新增签证费用";
|
|
|
+ this.isShow = false;
|
|
|
}
|
|
|
|
|
|
}
|