Commit 690520a4 authored by huangyuanyuan's avatar huangyuanyuan

签证

parent 2167bf8e
......@@ -820,7 +820,10 @@ export default {
filterRouter(){
let that=this
this.$router.beforeEach((to, from, next) => {
console.log("to.query.blank && to.query.blank=='y'",to.query)
// console.log("to.query.blank && to.query.blank=='y'",to.query,"666")
if(to.path=="/ModifyVisaProduct"){
this.reloadpage();
}
if(that.openMode==1){
let isThreeNav=false
to.matched.forEach(x=>{
......
......@@ -506,7 +506,7 @@
<div class="TNcontent" v-else>
<div class="EtNodata">暂无数据</div>
</div>
<span class="defaultAccount" slot="reference">默认叙述</span>
<span class="defaultAccount" slot="reference" v-if="defaultA">默认叙述</span>
</el-popover>
</span>
</div>
......@@ -534,7 +534,7 @@
Quill.register(Font, true);
export default {
name: 'edit',
props: ["editValue", "toolbarShow", "referenceList", "placeholder"],
props: ["editValue", "toolbarShow", "referenceList", "placeholder","defaultAccount"],
data() {
return {
myToolbar: '',
......@@ -542,6 +542,7 @@
myImageUploader: '',
quillValue: this.editValue,
popvisible: false,
defaultA:true,
//字体样式
fonts: [
"SimSun",
......@@ -591,6 +592,12 @@
}
},
created() {
if(this.defaultAccount==undefined){
this.defaultA=true;
}else{
this.defaultA=this.defaultAccount;
}
this.myToolbar = "toolbar_" + this.guid();
this.editorOption.placeholder = this.placeholder;
this.myQuillEditor = "editer_" + this.guid();
......
......@@ -528,6 +528,10 @@ export default {
}
})
})
if(userInfo.length==0){
this.Error("至少选择一人!");
return;
}
sessionStorage.setItem("saveGuestInfo",JSON.stringify(userInfo))
// this.$store.commit('saveGuestInfo',userInfo)
// console.log("getGuestInfo",this.$store.getters.getGuestInfo)
......
<style>
/* @import "../../assets/css/newTravelManager.css"; */
.ModifyVisaProduct .TravelLeftMenu {
width: 120px;
float: left;
position: fixed;
padding-bottom: 20px;
border-radius: 4px;
background-color: #fff;
margin-top: 30px;
text-align: center;
z-index: 1;
}
.ModifyVisaProduct .TravelTopTitle {
width: 100%;
height: 40px;
background-color: #333333;
color: #fff;
line-height: 40px;
font-size: 14px;
}
.ModifyVisaProduct .TravelTopTitle {
width: 100%;
height: 40px;
background-color: #333333;
color: #fff;
line-height: 40px;
font-size: 14px;
}
.ModifyVisaProduct .rightTravelInfo {
float: left;
margin-left: 160px;
/* min-width: 1150px; */
width: 85%;
}
.ModifyVisaProduct .TravelNavList {
width: 72px;
height: 28px;
line-height: 28px;
cursor: pointer;
margin: 10px auto;
font-size: 12px;
border-radius: 4px;
}
.ModifyVisaProduct .TravelNavList:hover {
background-color: #e95252;
color: #fff;
}
.ModifyVisaProduct .TravelLine {
width: 13px;
height: 2px;
background-color: #333333;
margin: auto;
}
.ModifyVisaProduct .TravelCked {
background-color: #e95252;
color: #fff;
}
.ModifyVisaProduct .newTravelRight {
float: left;
margin-left: 130px;
padding: 20px 0;
width: calc(100% - 130px);
box-sizing: content-box;
}
.ModifyVisaProduct .btnFixedDiv {
position: fixed;
z-index: 999;
width: 60px;
height: auto;
padding-bottom: 10px;
right: 30px;
bottom: 20%;
background-color: #e95252;
border-radius: 4px;
}
.ModifyVisaProduct .toTop {
width: 100%;
height: 40px;
text-align: center;
line-height: 40px;
color: #fff;
cursor: pointer;
}
.ModifyVisaProduct .toTop i {
font-size: 20px;
}
.ModifyVisaProduct .DTSaveBtn {
width: 37px;
height: 37px;
border-radius: 4px;
background-color: #ffc2c2;
margin: 8px;
color: #cc1212;
text-align: center;
line-height: 37px;
font-size: 12px;
cursor: pointer;
}
.ModifyVisaProduct .DTSaveBtn span {
display: block;
}
.ModifyVisaProduct .disClick {
background-color: #d1d1d1;
color: #fff;
border: 1px solid #d1d1d1;
}
.ModifyVisaProduct .TMTitle {
display: inline-block;
padding-left: 10px;
font-size: 14px;
}
.ModifyVisaProduct .TMTitle i {
display: inline-block;
width: 3px;
height: 14px;
background-color: #e95252;
margin-right: 10px;
position: relative;
top: 2px;
}
.ModifyVisaProduct .TC_tcnum {
margin-left: 20px;
}
.ModifyVisaProduct .TC_OneKeyUp {
margin-left: 35%;
width: 140px;
line-height: 38px;
text-align: center;
color: #fff;
cursor: pointer;
text-shadow: 1px 1px 1px #333;
border-radius: 5px;
margin-left: 32%;
position: relative;
padding: 5px 15px;
overflow: hidden;
border: 1px solid #64c878;
box-shadow: 0 1px 2px #b9ecc4 inset, 0 -1px 0 #6c9f76 inset,
0 -2px 3px #b9ecc4 inset;
background: -webkit-linear-gradient(top, #90dfa2, #47bf8c);
background: -moz-linear-gradient(top, #90dfa2, #47bf8c);
background: linear-gradient(top, #90dfa2, #47bf8c);
}
.ModifyVisaProduct .foldList {
width: 90px;
height: 28px;
background-color: #e95252;
color: #fff;
text-align: center;
font-size: 12px;
cursor: pointer;
float: right;
line-height: 28px;
border-radius: 16px;
}
.ModifyVisaProduct .Travel_Nav {
margin: 40px 0;
}
.ModifyVisaProduct .Travel_TT {
display: inline-block;
padding: 3px 8px;
background-color: #333333;
color: #fff;
border-radius: 4px;
font-size: 12px;
margin-left: 20px;
}
.ModifyVisaProduct .Travel_Line {
display: block;
width: 95%;
margin: 15px auto;
border-bottom: 1px dashed #bfbfbf;
}
.ModifyVisaProduct .modify_form .el-form-item {
display: inline-block;
width: 290px;
}
#firstAnchor,
#feiyXInxi,
#visacailiao,
#wenxintips {
background: #fff;
margin-top: 10px;
padding: 15px 6px;
box-sizing: border-box;
}
.ModifyVisaProduct .NotContain {
margin-top: 50px;
}
.ModifyVisaProduct .TNtitle {
height: 35px;
padding: 0 10px;
text-align: center;
line-height: 35px;
color: #fff;
display: inline-block;
font-size: 14px;
background-color: #333333;
}
.ModifyVisaProduct .ql-container {
box-sizing: border-box;
min-height: 200px;
}
.ModifyVisaProduct .el-textarea {
border: none;
height: 100%;
}
.ModifyVisaProduct .el-textarea textarea {
border: none;
height: 100%;
}
.ModifyVisaProduct .tag_ul {
font-size: 14px;
color: #606266;
padding-left: 50px;
}
.ModifyVisaProduct .tag_ul li .input-new-tag {
width: 150px;
}
.ModifyVisaProduct .tag_ul li .el-tag {
margin-right: 15px;
margin-bottom: 15px;
width: 70px;
padding: 0;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
position: relative;
}
.ModifyVisaProduct .tag_ul li > div {
margin: 15px 0;
}
.ModifyVisaProduct .el-tag .el-icon-close {
position: absolute;
top: 2px;
right: 0px;
}
.ModifyVisaProduct .Travel_ImgList {
margin: 10px 0 0 60px;
}
.ModifyVisaProduct .TFimgList {
float: left;
width: 170px;
height: 120px;
border-radius: 4px;
position: relative;
margin: 0 10px 10px 0;
overflow: hidden;
}
.ModifyVisaProduct .TFIMGzhe {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
position: absolute;
top: 0;
text-align: center;
line-height: 115px;
border-radius: 4px;
display: none;
}
.ModifyVisaProduct .TFimgList img {
width: 100%;
height: 100%;
}
.ModifyVisaProduct .TFreupload {
width: 32px;
height: 32px;
border-radius: 50%;
line-height: 32px;
top: 50px;
left: 53px;
display: inline-block;
text-align: center;
background-color: gray;
color: #fff;
}
.ModifyVisaProduct .TFimgList:hover .TFIMGzhe {
display: block;
}
.ModifyVisaProduct .TFreupload:hover {
color: #e95252;
background-color: #fff;
cursor: pointer;
}
.ModifyVisaProduct .TFimgList .re-delte {
width: 32px;
height: 32px;
background: gray;
border-radius: 50%;
text-align: center;
line-height: 32px;
display: inline-block;
color: #fff;
margin: 40px auto;
cursor: pointer;
}
.ModifyVisaProduct .TFimgList .re-delte:hover {
color: #e95252;
background: #fff;
}
.ModifyVisaProduct .btn_color{
background:#e95252;
border: 1px solid #e95252;
color:#fff;
padding: 4px 10px;
}
.ModifyVisaProduct .el-date-editor .el-range-separator{
width: auto;
}
.el-date-table td.end-date span{
background:#e95252;
}
.el-date-table td.start-date span{
background:#e95252;
}
.el-date-table td.start-date:hover span {
color:#fff!important;
}
.el-date-table td.end-date:hover span {
color:#fff!important;
}
.ModifyVisaProduct .tag_span{
display: inline-block;
width: 150px;
margin-bottom: 15px;
}
.ModifyVisaProduct .icon-img_bianji_small{
font-size: 12px;
}
.ModifyVisaProduct .el-upload-list{
width:500px;
}
</style>
<template>
<div class="ModifyVisaProduct">
<div class="clearfix" style="margin:auto;width:1300px;">
<div class="TravelLeftMenu">
<div class="TravelTopTitle">页面导航</div>
<div class="TravelNavList" :class="{'TravelCked':ckedNav==1}" @click.prevent="custormAnchor('firstAnchor',1)">
基础信息
</div>
<div class="TravelLine"></div>
<!-- <div class="TravelNavList" :class="{'TravelCked':ckedNav==2}" @click.prevent="custormAnchor('secondAnchor',2)">
预定须知
</div>
<div class="TravelLine"></div> -->
<div class="TravelNavList" :class="{'TravelCked':ckedNav==2}" @click.prevent="custormAnchor('feiyXInxi',2)">
费用说明
</div>
<div class="TravelLine"></div>
<div class="TravelNavList" :class="{'TravelCked':ckedNav==3}" @click.prevent="custormAnchor('visacailiao',3)">
签证材料
</div>
<div class="TravelLine"></div>
<div class="TravelNavList" :class="{'TravelCked':ckedNav==4}" @click.prevent="custormAnchor('wenxintips',4)">
温馨提示
</div>
<div class="TravelLine"></div>
</div>
<div class="newTravelRight" v-loading="loading">
<!-- 基础信息 -->
<div id="firstAnchor">
<span class="TMTitle">
<i></i>基础设置
</span>
<!-- <span class="foldList">点击折叠</span>
<span class="foldList">点击展开</span> -->
<div class="Travel_Nav">
<span class="Travel_TT">信息</span>
<span class="Travel_Line"></span>
</div>
<el-form
class="modify_form"
:model="addMsg"
:rules="rules"
ref="addMsg"
label-width="120px"
>
<el-form-item label="产品名称" prop="Name">
<el-input v-model="addMsg.Name" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="签证类型" prop="VisaType">
<el-select v-model="addMsg.VisaType" @change="getVisaManagementList">
<!-- <el-option label='不限' value='-1' key='-1'></el-option> -->
<el-option label="个签" :value="1" key="1"></el-option>
<el-option label="团签" :value="2" key="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="签证国家" prop="VisaManagementId">
<el-select v-model="addMsg.VisaManagementId">
<el-option label="不限" :value="0" key="0"></el-option>
<el-option
v-for="item in VisaManagementList"
:label="item.Name"
:value="item.Id"
:key="item.Id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="成本价" prop="CostPrice">
<el-input v-model="addMsg.CostPrice" placeholder="请输入" maxlength="20"></el-input>
</el-form-item>
<el-form-item label="同业价" prop="VisaPrice">
<el-input v-model="addMsg.VisaPrice" placeholder="请输入" maxlength="20"></el-input>
</el-form-item>
<el-form-item label="直客价" prop="VisaB2CPrice">
<el-input v-model="addMsg.VisaB2CPrice" placeholder="请输入" maxlength="20"></el-input>
</el-form-item>
<el-form-item label="提成金额" prop="CommissionPrice">
<el-input v-model="addMsg.CommissionPrice" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="提前预定天数">
<el-input v-model="addMsg.BookAdvance" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="价格有效日期">
<el-date-picker
v-model="PriceDates"
type="daterange"
range-separator="至"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item label="热门签证" prop="HotVisa">
<el-select v-model="addMsg.HotVisa">
<el-option label="是" :value="1" key="1" ></el-option>
<el-option label="否" :value="0" key="0" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="送签地" prop="SendCityName">
<el-input v-model="addMsg.SendCityName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="入境次数" prop="EntryType">
<el-select v-model="addMsg.EntryType">
<el-option label="单次" :value="1" key="1" ></el-option>
<el-option label="多次" :value="2" key="2" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="办理时长">
<el-input v-model="addMsg.ManageDuration" placeholder="工作日"></el-input>
</el-form-item>
<el-form-item label="停留天数">
<el-input v-model="addMsg.StayDays" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="限时优惠" prop="FlashSale">
<el-select v-model="addMsg.FlashSale">
<el-option label="是" :value="1" key="1" ></el-option>
<el-option label="否" :value="0" key="0" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="签证有效期">
<el-input v-model="addMsg.VisaValidity" placeholder="请输入"></el-input>
</el-form-item>
<span class="Travel_Line"></span>
<div>
<el-form-item label="签证关联国家" prop="VisaCountryId">
<el-select @change="VisaCountry" v-model="addMsg.VisaCountryId" class="dateClass">
<el-option
v-for="item in Visacountry"
:label="item.CountryName"
:value="item.Id"
:key="item.Id"
></el-option>
</el-select>
</el-form-item>
<ul class="tag_ul">
<li>
<span>签证类型</span>
<span style="margin-left:10px">
<el-input
class="input-new-tag"
v-if="inputVisible1"
v-model="inputValue"
ref="saveTagInput1"
size="small"
@blur="CloseTag"
@keyup.enter.native="handleInputConfirm(1)"
>
</el-input>
<el-button v-else class="button-new-tag btn_color" size="mini" @click="showInput(1)">新增</el-button>
</span>
<div>
<span class="tag_span" v-for="tag in CountryTagList" v-if="tag.TagType==1" :key="tag.Id">
<input type="checkbox" :value="tag.Id" v-model="checkList" :id="tag.Id">
<label :for="tag.Id">{{tag.TagTame}}</label>
<el-tooltip
class="item"
effect="dark"
content="编辑"
placement="top-start"
>
<el-button
type="primary"
style="background:#409EFF; border-color:#409EFF;padding:2px"
icon="iconfont icon-img_bianji_small"
@click="EditTag(tag,1)"
></el-button>
</el-tooltip>
</span>
</div>
</li>
<li>
<span>产品标签</span>
<span style="margin-left:10px">
<el-input
class="input-new-tag"
v-if="inputVisible2"
v-model="inputValue"
ref="saveTagInput2"
size="small"
@blur="CloseTag"
@keyup.enter.native="handleInputConfirm(2)"
>
</el-input>
<el-button v-else class="button-new-tag btn_color" size="mini" @click="showInput(2)">新增</el-button>
</span>
<div>
<span class="tag_span" v-for="tag in CountryTagList" v-if="tag.TagType==2" :key="tag.Id">
<input type="checkbox" :value="tag.Id" v-model="checkList" :id="tag.Id">
<label :for="tag.Id">{{tag.TagTame}}</label>
<el-tooltip
class="item"
effect="dark"
content="编辑"
placement="top-start"
>
<el-button
type="primary"
style="background:#409EFF; border-color:#409EFF;padding:2px"
icon="iconfont icon-img_bianji_small"
@click="EditTag(tag,2)"
></el-button>
</el-tooltip>
</span>
</div>
</li>
<li>
<span>特色服务</span>
<span style="margin-left:10px">
<el-input
class="input-new-tag"
v-if="inputVisible3"
v-model="inputValue"
ref="saveTagInput3"
size="small"
@blur="CloseTag"
@keyup.enter.native="handleInputConfirm(3)"
>
</el-input>
<el-button v-else class="button-new-tag btn_color" size="mini" @click="showInput(3)">新增</el-button>
</span>
<div>
<span class="tag_span" v-for="tag in CountryTagList" v-if="tag.TagType==3" :key="tag.Id">
<input type="checkbox" :value="tag.Id" v-model="checkList" :id="tag.Id">
<label :for="tag.Id">{{tag.TagTame}}</label>
<el-tooltip
class="item"
effect="dark"
content="编辑"
placement="top-start"
>
<el-button
type="primary"
style="background:#409EFF; border-color:#409EFF;padding:2px"
icon="iconfont icon-img_bianji_small"
@click="EditTag(tag,3)"
></el-button>
</el-tooltip>
</span>
</div>
</li>
</ul>
</div>
<div class="Travel_ImgList clearfix">
<div class="TFimgList" v-for="(item,index) in addMsg.CoverImageList" :key="item.subCode" v-if="index==1">
<img v-if="!item.Url" src="../../assets/img/bg_c3@3x.png">
<img v-else :src='compressImg(item.Url, "filt", 170, "")'>
<div class="TFIMGzhe">
<div class="TFreupload" @click="updateTFimg(index)">
<el-upload :file-list="addMsg.CoverImageList" :http-request="reUpload" :multiple="true"
accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false" action>
<i class="iconfont icon-Edit"></i>
</el-upload>
</div>
<!-- <div class="re-delte" @click.stop="ExchangeImg(index,0)" v-if="index!=0&&item.Url">
<i class="iconfont icon-zuoyi"></i>
</div>
<div class="re-delte" @click.stop="ExchangeImg(index,1)"
v-if="index!=addMsg.CoverImageList.length-1&&item.Url">
<i class="iconfont icon-youyi"></i>
</div> -->
<!-- <div class="re-delte" @click.stop="addImgOpen(index)">
<i class="iconfont icon-img_cz"></i>
</div> -->
</div>
</div>
</div>
</el-form>
</div>
<!-- 费用说明(费用包含,费用不包含) -->
<div id="feiyXInxi">
<span class="TMTitle">
<i></i>费用说明
</span>
<!-- <span class="foldList">点击折叠</span>
<span class="foldList">点击展开</span> -->
<div>
<div class="TNtitle NotContain">
费用包含
</div>
<div class="ql-container">
<my-edit v-on:edit-value="addMsg.VisaProductInfo.FeeInclude = arguments[0]" v-bind:editValue="addMsg.VisaProductInfo.FeeInclude"
v-bind:toolbarShow="toolbar" v-bind:referenceList="FeeInclude" v-bind:defaultAccount="false"></my-edit>
</div>
<div class="TNtitle NotContain">
费用不包含
</div>
<div class="ql-container">
<my-edit v-on:edit-value="addMsg.VisaProductInfo.FeeNonInclude = arguments[0]" v-bind:editValue="addMsg.VisaProductInfo.FeeNonInclude"
v-bind:toolbarShow="toolbar" v-bind:referenceList="FeeInclude" v-bind:defaultAccount="false"></my-edit>
</div>
</div>
</div>
<!-- 签证材料 -->
<div id="visacailiao">
<span class="TMTitle">
<i></i>签证材料
</span>
<!-- <span class="foldList">点击折叠</span>
<span class="foldList">点击展开</span> -->
<div>
<div class="TNtitle NotContain">
签证材料
</div>
<div class="ql-container">
<my-edit v-on:edit-value="addMsg.VisaProductInfo.VisaMaterials = arguments[0]" v-bind:editValue="addMsg.VisaProductInfo.VisaMaterials"
v-bind:toolbarShow="toolbar" v-bind:referenceList="FeeInclude" v-bind:defaultAccount="false"></my-edit>
</div>
<div>
<el-upload
class="upload-demo"
:file-list="addMsg.VisaProductInfo.DownloadMaterialsFileList"
:http-request="uploadTest"
:on-remove="handleRemove"
:multiple="true"
:limit="10"
action="">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
</div>
</div>
<!-- 温馨提示 -->
<div id="wenxintips">
<span class="TMTitle">
<i></i>温馨提示
</span>
<div>
<div class="TNtitle NotContain">
温馨提示
</div>
<div class="ql-container">
<my-edit v-on:edit-value="addMsg.VisaProductInfo.WarmTip = arguments[0]" v-bind:editValue="addMsg.VisaProductInfo.WarmTip"
v-bind:toolbarShow="toolbar" v-bind:referenceList="FeeInclude" v-bind:defaultAccount="false"></my-edit>
</div>
</div>
</div>
<!-- 返回顶部 -->
<div class="btnFixedDiv">
<div class="toTop" @click="backTop">
<i class="iconfont icon-huidaodingbu"></i>
</div>
<!-- @click="submitForm(1)" -->
<div class="DTSaveBtn" @click="SaveVisaProduct('addMsg')">保存</div>
<!-- <div class="DTSaveBtn">提交</div> -->
<!-- <div v-if="ConfigId>0" class="DTSaveBtn" :class="{'disClick':!isSubmit}" @click="goB2B()">预览</div> -->
</div>
</div>
</div>
</div>
</template>
<script>
import moment from "moment";
import {quillEditor} from "vue-quill-editor";
import * as Quill from "quill"; //引入编辑器
import MyEdit from "../EditTemplate.vue";
//quill编辑器的字体
var fonts = [
"SimSun",
"SimHei",
"Microsoft-YaHei",
"KaiTi",
"FangSong",
"Arial",
"Times-New-Roman",
"sans-serif"
];
var Font = Quill.import("formats/font");
Font.whitelist = fonts; //将字体加入到白名单
Quill.register(Font, true);
export default {
components: {
"my-edit": MyEdit
},
data() {
return {
fileList:[],
checkList:[],
fonts: [
"SimSun",
"SimHei",
"Microsoft-YaHei",
"KaiTi",
"FangSong",
"Arial",
"Times-New-Roman",
"sans-serif"
],
toolbar: {
clean: false, //加粗
font: false, //字体
narrative: true //叙述,
},
referenceList:[],
FeeInclude:[],
//选中的导航
ckedNav: 1,
loading: false,
value6: "",
VisaManagementList:[],
addMsg: {
Id: 0,
Name: "",
VisaType: 1,
SendVisaDate: "",
VisaPrice: "",
PeopleNum: "0",
CostPrice: "",
EntryType:0,
CommissionPrice: "",
VisaManagementId: "",
VisaB2CPrice: "",
VisaProductInfo: {
DownloadMaterialsFileList:[],
},
CoverImageList: [],
},
rules: {
Name: [{ required: true, message: "请输入产品名称", trigger: "blur" }],
customerName: [
{ required: true, message: "请输入客户名", trigger: "blur" }
],
VisaPrice: [
{ required: true, message: "请输入同业价", trigger: "blur" },
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: "请输入同业价"
}
],
VisaB2CPrice: [
{ required: true, message: "请输入直客价", trigger: "blur" },
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: "请输入直客价"
}
],
CostPrice: [
{ required: true, message: "请输入成本价", trigger: "blur" },
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: "请输入成本价"
}
],
VisaType: [
{ required: true, message: "请选择类型", trigger: "change" }
],
PeopleNum: [{ required: true, message: "请输入人数", trigger: "blur" }],
CommissionPrice: [
{ required: true, message: "请输入提成金额", trigger: "blur" },
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: "请输入提成金额"
}
],
SendVisaDate: [
{ required: true, message: "请输入价格有效期", trigger: "blur" }
]
},
inputVisible1: false,
inputVisible2: false,
inputVisible3: false,
productlabel: {},
inputValue: "",
CountryTagList: [],
Visacountry: [],
// 图片
updateChoseIndex: 0,
addimg: false,
ChooseImgIndex: 0,
// 价格有效期
PriceDates:[],
Pid:0,
};
},
mounted() {
if(this.$route.query.Id){
this.Pid=this.$route.query.Id;
this.GetVisaProductDetails(this.Pid);
}
// this.ScrollMethod();
this.Getvisacountry();
this.getVisaManagementList();
this.initFileList();
},
created() {
},
methods: {
onEditorChange({editor, html, text}, typeStr) {
//富文本编辑器 文本改变时 设置字段值
switch (typeStr) {
case "FeeInclude":
this.addMsg.VisaProductInfo.FeeInclude = html;
break;
case "FeeNonInclude":
this.addMsg.VisaProductInfo.FeeNonInclude = html;
break;
case "VisaMaterials":
this.addMsg.VisaProductInfo.VisaMaterials = html;
break;
case "WarmTip":
this.addMsg.VisaProductInfo.WarmTip = html;
break;
}
},
handleRemove(file, fileList) {
this.addMsg.VisaProductInfo.DownloadMaterialsFileList=fileList;
},
uploadTest(file) {
let newArr = [];
newArr.push(file.file);
let path = "/Upload/DMC/Icon/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath;
let Name=x.data.SourceFileName;
this.addMsg.VisaProductInfo.DownloadMaterialsFileList.push({Url:url,Name:Name,name:Name})
});
},
// 请求签证产品详情
GetVisaProductDetails(Pid){
this.PriceDates=[];
this.apipost(
"dmc_get_visa_GetVisaProductInfo_V1",
{Pid:Pid},
res => {
console.log(res);
if (res.data.resultCode == 1) {
let data=res.data.data;
this.addMsg=res.data.data;
this.PriceDates.push(data.EffectiveStartDate)
this.PriceDates.push(data.SendVisaDate)
let val=data.VisaCountryId;
if(val){
this.GetProductLabel(val);
}
this.initFileList();
// 新增签证字段
let Download=data.VisaProductInfo.DownloadMaterialsFileList;
if(Download.length>0){
Download.forEach(item=>{
item.name=item.Name;
})
}
// 初始化产品标签被选中的
let TagList=data.VisaProductTagList;
if(TagList.length>0){
TagList.forEach(tag=>{
this.checkList.push(tag.TagId);
})
}
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
initAddMasg(){
this.addMsg= {
Id: 0,
Name: "",
VisaType: "",
SendVisaDate: "",
VisaPrice: "",
PeopleNum: "0",
CostPrice: "",
CommissionPrice: "",
VisaManagementId: "",
VisaB2CPrice: "",
VisaProductInfo: {},
CoverImageList: [],
};
this.PriceDates=[]
},
SaveVisaProduct(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
this.loading=true;
let that = this;
this.addMsg.VisaProductTagList=[];
if(this.checkList.length>0){
this.checkList.forEach(item=>{
let obj_tag={TagId:0};
obj_tag.TagId=item;
this.addMsg.VisaProductTagList.push(obj_tag);
})
}
if (
!this.PriceDates ||
this.PriceDates == "" ||
this.PriceDates.length == 0
) {
this.Error("请选择价格有效期!");
return;
}
this.addMsg.EffectiveStartDate = moment(this.PriceDates[0]).format(
"YYYY-MM-DD"
);
this.addMsg.SendVisaDate = moment(this.PriceDates[1]).format(
"YYYY-MM-DD"
);
// console.log("this.addMsg", this.addMsg);
this.apipost(
"dmc_post_visa_SetVisaProduct_V1",
this.addMsg,
res => {
this.loading=false;
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.initAddMasg();
this.$router.push({name: "VisaProduct",query: { blank: "y", tab: "签证产品" }});
} else {
this.Error(res.data.message);
}
},
err => {}
);
} else {
return false;
}
});
},
initFileList() {
for (var i = 0; i <5; i++) {
var fileObj = this.$commonUtils.FileObject();
if (this.addMsg.CoverImageList.length <=5) {
this.addMsg.CoverImageList.push(fileObj);
}
}
},
getVisaManagementList() {
// 获取签证管理
this.VisaManagementList = [];
this.addMsg.VisaManagementId = "";
this.apipost(
"dmc_get_visa_GetVisaManagementList",
{ Status: -1, BranchId: -1, SignStatus: this.addMsg.VisaType },
res => {
if (res.data.resultCode == 1) {
this.VisaManagementList = res.data.data;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
//上传图片
reUpload(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
let that = this;
let path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var str = this.domainManager().ViittoFileUrl + x.data.FilePath;
that.addMsg.CoverImageList[
this.updateChoseIndex
].Url = this.$commonUtils.GetALiFileUrl(str);
that.addMsg.CoverImageList[this.updateChoseIndex].Name = fileName;
});
},
updateTFimg(index) {
this.updateChoseIndex = index;
},
//图片左移右移
// ExchangeImg(index, IsMove) {
// var imgItem = this.addMsg.CoverImageList[index];
// //左移
// if (IsMove == 0) {
// var upItem = this.addMsg.CoverImageList[index - 1];
// this.$set(this.addMsg.CoverImageList, index - 1, imgItem);
// this.$set(this.addMsg.CoverImageList, index, upItem);
// } else {
// //右移动
// var downItem = this.addMsg.CoverImageList[index + 1];
// this.$set(this.addMsg.CoverImageList, index + 1, imgItem);
// this.$set(this.addMsg.CoverImageList, index, downItem);
// }
// },
// 签证国家Id改变
VisaCountry(val) {
this.GetProductLabel(val);
},
// 双击编辑标签
EditTag(tag, num) {
this.showInput(num);
this.inputValue = tag.TagTame;
this.productlabel.Id = tag.Id;
},
handleClose(tag) {
this.tagloading = true;
this.apipost(
"dmc_post_visa_DeleteVisaProductCountryTag",
{ Id: tag.Id },
res => {
this.tagloading = false;
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.GetProductLabel(tag.VisaCountryId);
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
CloseTag(){
this.inputVisible1 = false;
this.inputVisible2 = false;
this.inputVisible3 = false;
},
showInput(num) {
if (!this.addMsg.VisaCountryId || this.addMsg.VisaCountryId == "") {
this.Error("请先选择签证国家!");
return;
}
this.productlabel.Id = 0;
this.inputValue = "";
this.productlabel.VisaCountryId = this.addMsg.VisaCountryId;
this.inputVisible1 = false;
this.inputVisible2 = false;
this.inputVisible3 = false;
if (num == 1) {
this.inputVisible1 = true;
}
if (num == 2) {
this.inputVisible2 = true;
}
if (num == 3) {
this.inputVisible3 = true;
}
// `${this.inputVisible}num` = true;
this.$nextTick(_ => {
this.$refs[`saveTagInput${num}`].$refs.input.focus();
// this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm(num) {
// 标签类型
this.productlabel.TagType = num;
this.productlabel.TagTame = this.inputValue;
this.apipost(
"dmc_post_visa_SetVisaProductCountryTag",
this.productlabel,
res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.inputValue = "";
this.inputVisible1 = false;
this.inputVisible2 = false;
this.inputVisible3 = false;
this.GetProductLabel(this.productlabel.VisaCountryId);
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
GetProductLabel(item) {
this.tagloading = true;
this.apipost(
"dmc_post_visa_GetVisaProductCountryTagList",
{ VisaCountryId: item },
res => {
this.tagloading = false;
if (res.data.resultCode == 1) {
this.CountryTagList = res.data.data;
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
// 获取签证国家
Getvisacountry() {
this.apipost(
"dmc_post_visa_GetVisaProductCountrySelect",
{},
res => {
if (res.data.resultCode == 1) {
this.Visacountry = res.data.data;
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
custormAnchor(anchorName, index) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在,就跳转到锚点
if (anchorElement) {
anchorElement.scrollIntoView();
}
this.ckedNav = index;
},
//滚动事件
// ScrollMethod() {
// var that = this;
// var s1, s2, s3, s4, s5;
// document
// .getElementsByClassName("frame-box")[0]
// .addEventListener("scroll", function() {
// if (document.getElementById("firstAnchor") != null) {
// s1 = document.getElementById("firstAnchor").offsetTop;
// }
// if (document.getElementById("secondAnchor") != null) {
// s2 = document.getElementById("secondAnchor").offsetTop;
// }
// if (document.getElementById("thirdAnchor") != null) {
// s3 = document.getElementById("thirdAnchor").offsetTop;
// }
// if (document.getElementById("fourAnchor") != null) {
// s4 = document.getElementById("fourAnchor").offsetTop;
// }
// if (document.getElementById("fiveAnchor") != null) {
// s5 = document.getElementById("fiveAnchor").offsetTop;
// }
// if (s1 >= this.scrollTop - 50 && s1 <= this.scrollTop + 50) {
// that.ckedNav = 1;
// } else if (s2 >= this.scrollTop - 50 && s2 <= this.scrollTop + 50) {
// that.ckedNav = 2;
// } else if (s3 >= this.scrollTop - 50 && s3 <= this.scrollTop + 50) {
// that.ckedNav = 3;
// } else if (s4 >= this.scrollTop - 50 && s4 <= this.scrollTop + 50) {
// that.ckedNav = 4;
// } else if (s5 >= this.scrollTop - 50 && s5 <= this.scrollTop + 50) {
// that.ckedNav = 5;
// }
// });
// },
//返回顶部
backTop() {
var timer = setInterval(function() {
var scrollTop = document.getElementsByClassName("frame-box")[0]
.scrollTop;
var ispeed = Math.floor(-scrollTop / 6);
if (scrollTop == 0) {
clearInterval(timer);
}
document.getElementsByClassName("frame-box")[0].scrollTop =
scrollTop + ispeed;
}, 30);
}
},
watch: {
},
};
</script>
......@@ -28,14 +28,14 @@
.page_MyCustomer ._mc_edit {
overflow: auto;
display: none;
position: absolute;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
left: 50px;
border-top: 3px solid #38425d;
background-color: #f9f9f9;
padding: 10px;
width: 100%;
width: calc(100% - 50px);
min-width: 1146px;
}
.page_MyCustomer .edHeight {
......@@ -291,7 +291,8 @@
</li>
<li>
<button class="hollowFixedBtn" @click="getList()">查询</button>
<button class="normalBtn" @click="cancelEdit(),addShow=true" v-if="msg.isFinacial==1">添加</button>
<!-- <button class="normalBtn" @click="cancelEdit(),addShow=true" v-if="msg.isFinacial==1">添加</button> -->
<button class="normalBtn" @click="AddVisaProduct" v-if="msg.isFinacial==1">添加</button>
</li>
</ul>
</div>
......@@ -370,7 +371,7 @@
</td>
<td class="groupTourOrderIcon">
<el-button-group>
<el-tooltip
<!-- <el-tooltip
class="item"
effect="dark"
content="修改"
......@@ -383,6 +384,20 @@
icon="iconfont icon-img_bianji_small"
@click="getDetail(item)"
></el-button>
</el-tooltip> -->
<el-tooltip
class="item"
effect="dark"
content="修改"
placement="top-start"
v-if="item.SendVisaStatus==1&&msg.isFinacial==1"
>
<el-button
type="primary"
style="background:#409EFF; border-color:#409EFF"
icon="iconfont icon-img_bianji_small"
@click="EditVisaProduct(item)"
></el-button>
</el-tooltip>
<el-tooltip effect="dark" content="查看" placement="top-start" v-if="msg.isFinacial==1">
<el-button
......@@ -629,6 +644,27 @@ export default {
};
},
methods: {
// 修改签证产品
EditVisaProduct(item){
this.$router.push({
name: "ModifyVisaProduct",
query: {
Id:item.Id,
blank: "y",
tab: "配置签证产品"
}
});
},
// 添加签证产品
AddVisaProduct(){
this.$router.push({
name: "ModifyVisaProduct",
query: {
blank: "y",
tab: "配置签证产品"
}
});
},
saveitem(tcid) {
this.uploadTCID = tcid;
},
......@@ -736,7 +772,6 @@ export default {
err => {}
);
},
goUrl(obj) {
this.$router.push({
name: "VisaProductOrder",
......
<style>
.page_visaMG ._vMG_edit {
position: fixed;
font-family: "PingFangSc-Fine";
bottom: 0;
left: 50px;
border-top: 3px solid #38425d;
background-color: #fff;
padding: 10px;
width: calc(100% - 50px);
min-width: 1146px;
padding-right: 10px;
}
/* .page_visaMG .edHeight{display: block;height: 330px;} */
.page_visaMG ._vMG_conten {
padding: 30px 0;
overflow-x: auto;
}
.page_visaMG ._vMG_conten .list li {
width: 175px;
height: auto;
padding: 20px;
float: left;
background-color: #ffffff;
margin-right: 26px;
}
.page_visaMG ._vMG_conten ul li ._top {
text-align: center;
position: relative;
}
.page_visaMG ._vMG_conten ul li ._top p {
font-size: 14px;
color: #333333;
font-weight: bold;
margin-top: 8px;
padding-bottom: 10px;
font-weight: bold;
}
.page_visaMG ._vMG_conten ul li ._btm {
border-top: 1px dashed #b8b8b8;
display: flex;
text-align: center;
padding-top: 22px;
}
.page_visaMG ._vMG_conten ul li ._btmt {
border: none;
}
.page_visaMG ._vMG_conten ul li ._btm > div {
width: 50%;
}
.page_visaMG ._vMG_conten ul li ._btm > div:nth-child(1) {
border-right: 1px solid #b8b8b8;
}
.page_visaMG ._vMG_conten ul li ._btm > div ._num {
font-size: 16px;
color: #333333;
font-weight: bold;
}
.page_visaMG ._vMG_conten ul li ._btmt > div ._num {
font-size: 14px;
}
.page_visaMG ._vMG_conten ul li ._btm > div ._text {
font-size: 12px;
color: #666666;
}
.page_visaMG ._vMG_conten ul li .tcenter {
margin-top: 15px;
}
.page_visaMG ._vMG_conten li:hover {
box-shadow: 0px 0px 20px rgba(191, 191, 191, 1);
transition: all linear 0.5s;
}
.page_visaMG ._black {
filter: gray;
-webkit-filter: grayscale(100%);
}
.page_visaMG ._noOpen {
line-height: 34px;
color: #666666;
font-size: 12px;
text-align: center;
padding-top: 22px;
border-top: 1px dashed #b8b8b8;
}
.page_visaMG ._vMG_edit ._tit {
padding-left: 10px;
border-left: 3px solid #e95252;
font-size: 16px;
color: #000000;
}
.page_visaMG ._vMG_edit ._tit span {
color: #666666;
font-size: 14px;
}
.page_visaMG ._info_box {
padding: 30px 15px;
font-size: 12px !important;
margin-bottom: 20px;
}
.page_visaMG ._info_box > div {
float: left;
}
.page_visaMG .w400 {
width: 450px;
margin-right: 20px;
height: 100px;
}
.page_visaMG .w225 {
width: 225px;
margin-right: 20px;
}
.page_visaMG .wauto label {
width: 98px;
}
.page_visaMG ._info_box {
/* padding-bottom: 0; */
}
.page_visaMG ._info_box ul {
margin-top: 10px;
}
.page_visaMG ._info_box ul li {
}
.page_visaMG ._info_box ul li .el-form-item {
display: flex;
height: 30px;
line-height: 30px;
}
.page_visaMG ._info_box ul li .el-form-item .el-input {
display: flex;
height: 30px;
line-height: 30px;
}
.page_visaMG ._info_box ul li:nth-child(odd) {
margin-right: 15px;
}
.page_visaMG ._info_box ul li .el-form-item__label {
font-size: 12px !important;
line-height: 30px;
}
.page_visaMG ._info_box ul li .el-form-item input {
height: 30px;
line-height: 30px;
}
.page_visaMG ._info_box ul li .el-form-item textarea {
height: 80px;
resize: none;
width: 280px;
}
.page_visaMG ._edHeight {
height: 400px;
}
.page_visaMG ._scrollbar::-webkit-scrollbar {
width: 4px;
height: 8px;
}
.page_visaMG ._scrollbar::-webkit-scrollbar-thumb {
border-radius: 4px;
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
background: #c9c9c9;
}
.page_visaMG ._scrollbar::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
border-radius: 4px;
background: #ededed;
}
.page_visaMG ._status {
position: absolute;
left: -20px;
top: 0px;
}
.page_visaMG ._status span {
display: inline-block;
padding: 2px 5px;
background-color: #4bca81;
color: white;
font-size: 12px;
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
}
.page_visaMG ._status span:nth-child(2) {
background-color: #e95252;
}
.page_visaMG ._tips {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
border: 1px solid #e95252;
color: #e95252;
font-size: 12px;
line-height: 15px;
cursor: pointer;
}
.page_visaMG_tips {
text-align: center;
}
.page_visaMG_tips .hollowFixedBtn {
margin-top: 10px;
}
.el-upload-list__item-status-label {
}
._info_box .el-form-item {
display: inline-block;
margin-left: 10px;
}
._top img {
width: 71px;
height: 46px;
}
.productlabel .el-form-item__content{
line-height: 30px;
}
.tag_ul li .input-new-tag{
width: 150px;
}
.tag_ul li .el-tag{
margin-right: 15px;
margin-bottom: 15px;
width: 70px;
padding: 0;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
position: relative;
}
.tag_ul li>div{
margin-top: 15px;
}
.page_visaMG .country .el-upload-list--text{
max-width:200px;
}
.visa_pro_country .el-tag .el-icon-close{
position: absolute;
top:2px;
right: 0px;
}
</style>
<template>
<div class="page_visaMG visa_pro_country">
<p style="padding-top:10px">
<span>国家:<el-input style="width:200px;display:inline-block" v-model="countryList.countryName" placeholder="请输入国家"/>
<button type="button" class="normalBtn" @click="getVisaManagementList(),resetPageIndex()">查询</button>
</span>
<button style="float:right" type="button" class="normalBtn" @click="AddForm">新增</button>
</p>
<div class="_vMG_conten _scrollbar">
<ul class="clearfix list">
<li v-for="(item,index) in DataList" :key="index">
<div class="_top">
<img :src="item.Icon" alt="">
<p class="PingFangSC">{{item.CountryName}}</p>
<div class="_status">
<span v-if="item.HotCountry==1">热门</span>
</div>
</div>
<div class="tcenter">
<el-tooltip class="item" effect="dark" content="签证国家" placement="top-start">
<el-button @click="EditCountry(item)" style="padding:6px" type="primary" icon="el-icon-edit" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="产品标签" placement="top-start">
<el-button @click="Product(item)" style="padding:6px;background:#FF680B;color:#fff;border:none" icon="el-icon-edit-outline" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除签证国家" placement="top-start">
<el-button @click="Delete(item)" style="padding:6px;background:#E95252;color:#fff;border:none" icon="el-icon-delete" circle></el-button>
</el-tooltip>
</div>
</li>
</ul>
<el-pagination
background
@current-change="handleCurrentChange"
v-if="DataList.length>0"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size="countryList.pageSize"
:total="total"
></el-pagination>
</div>
<div class="_vMG_edit" v-show="addShow">
<p class="_tit">签证国家
<span style="float:right">
<button class="hollowFixedBtn" type="button" @click="cancelEdit()">取消</button>
<button type="button" class="normalBtn" @click="saveVisa">保存</button>
</span>
</p>
<el-form class="country _info_box clearfix" label-width="80px">
<el-form-item label="国家">
<el-select @change="Selectchange" filterable v-model="country.CountryId" placeholder="请选择">
<el-option
v-for="item in allcountry"
:key="item.ID"
:label="item.Name"
:value="item.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否热门">
<el-select v-model="country.HotCountry" placeholder="请选择">
<el-option key="1" label="是" :value="1"></el-option>
<el-option key="0" label="否" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="排序">
<el-input v-model="country.Sort" placeholder="排序"/>
</el-form-item>
<el-form-item label="国家图标">
<el-upload
:file-list="fileList"
:http-request="uploadTest"
:multiple="true"
:limit="2"
:on-change="handleChange1"
action="">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="背景图片">
<el-upload
:file-list="fileList2"
:http-request="uploadTest2"
:multiple="true"
:limit="2"
:on-change="handleChange2"
action="">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<!-- <el-form-item>
<button class="hollowFixedBtn" type="button" @click="cancelEdit()">取消</button>
<button type="button" class="normalBtn" @click="saveVisa">保存</button>
</el-form-item> -->
</el-form>
</div>
<!-- 国家产品标签 -->
<el-dialog
@close="dialogclose"
v-loading="tagloading"
title="提示"
:visible.sync="CPBQ"
width="550px"
>
<ul class="tag_ul">
<li>
<span>签证类型</span>
<span style="margin-left:10px">
<el-input
class="input-new-tag"
v-if="inputVisible1"
v-model="inputValue"
ref="saveTagInput1"
size="small"
@keyup.enter.native="handleInputConfirm(1)"
>
</el-input>
<el-button v-else class="button-new-tag" size="mini" @click="showInput(1)">新增</el-button>
</span>
<div>
<el-tag size="small" v-for="tag in CountryTagList" v-if="tag.TagType==1"
:key="tag.Id"
closable
:disable-transitions="false"
@click.native="EditTag(tag,1)"
@close="handleClose(tag)">
<!-- <el-input v-model="tag.TagTame" :disabled="tagstate==tag.Id"></el-input> -->
{{tag.TagTame}}
</el-tag>
</div>
</li>
<li>
<span>产品标签</span>
<span style="margin-left:10px">
<el-input
class="input-new-tag"
v-if="inputVisible2"
v-model="inputValue"
ref="saveTagInput2"
size="small"
@keyup.enter.native="handleInputConfirm(2)"
>
</el-input>
<el-button v-else class="button-new-tag" size="mini" @click="showInput(2)">新增</el-button>
</span>
<div>
<el-tag v-if="tag.TagType==2" size="small"
:key="tag.Id"
v-for="tag in CountryTagList"
closable
:disable-transitions="false"
@click.native="EditTag(tag,2)"
@close="handleClose(tag)">
{{tag.TagTame}}
</el-tag>
</div>
</li>
<li>
<span>特色服务</span>
<span style="margin-left:10px">
<el-input
class="input-new-tag"
v-if="inputVisible3"
v-model="inputValue"
ref="saveTagInput3"
size="small"
@keyup.enter.native="handleInputConfirm(3)"
>
</el-input>
<el-button v-else class="button-new-tag" size="mini" @click="showInput(3)">新增</el-button>
</span>
<div>
<el-tag v-if="tag.TagType==3" size="small"
:key="tag.Id"
v-for="tag in CountryTagList"
closable
:disable-transitions="false"
@click.native="EditTag(tag,3)"
@close="handleClose(tag)">
{{tag.TagTame}}
</el-tag>
</div>
</li>
</ul>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
tagstate:13,
tagloading:false,
CPBQ:false,
productlabel:{},
country: {
CountryId: 2,
HotCountry: 1,
Icon: "",
ImageFileList: [],
Sort:0,
},
// fileList: [],
fileList: [],
fileList2: [],
DataList: [],
editData: [],
VisaSalesPlatformEnum: [],
CommuneInfoList: [],
addShow: false,
countryList: {
pageIndex: 1,
pageSize: 20
},
currentPage: 1,
total: 0,
allcountry: [],
CountryTagList:[],
dynamicTags:[],
inputVisible1: false,
inputVisible2: false,
inputVisible3: false,
inputValue: "",
};
},
methods: {
resetPageIndex() {
this.countryList.pageIndex = 1;
this.currentPage = 1
},
handleCurrentChange(val) {
this.countryList.pageIndex = val;
this.getVisaManagementList();
},
dialogclose(){
this.CountryTagList=[];
},
// 编辑标签
EditTag(tag,num){
console.log(tag);
this.showInput(num);
this.inputValue=tag.TagTame;
this.productlabel.Id=tag.Id;
},
handleClose(tag) {
this.tagloading=true;
this.apipost(
"dmc_post_visa_DeleteVisaProductCountryTag",
{Id:tag.Id},
res => {
this.tagloading=false;
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.GetProductLabel(tag.VisaCountryId);
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
showInput(num) {
this.inputValue="";
this.productlabel.Id=0;
this.inputVisible1 = false;
this.inputVisible2 = false;
this.inputVisible3 = false;
if(num==1){
this.inputVisible1=true;
}
if(num==2){
this.inputVisible2=true;
}
if(num==3){
this.inputVisible3=true;
}
// `${this.inputVisible}num` = true;
this.$nextTick(_ => {
this.$refs[`saveTagInput${num}`].$refs.input.focus();
// this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm(num) {
// 标签类型
this.productlabel.TagType=num;
this.productlabel.TagTame=this.inputValue;
this.apipost(
"dmc_post_visa_SetVisaProductCountryTag",
this.productlabel,
res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.inputValue = '';
this.inputVisible1 = false;
this.inputVisible2 = false;
this.inputVisible3 = false;
this.GetProductLabel(this.productlabel.VisaCountryId);
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
Product(item){
this.inputVisible1 = false;
this.inputVisible2 = false;
this.inputVisible3 = false;
this.tagloading=true;
this.productlabel.VisaCountryId=item.CountryId;
this.GetProductLabel(item.CountryId);
this.CPBQ=true;
},
// 新增
AddForm(){
this.addShow=true;
this.country = {
CountryId: "",
HotCountry: 1,
Icon: "",
ImageFileList: [],
Sort:0,
};
this.fileList2=[];
this.fileList=[];
},
// 获取签证国家产品标签列表
GetProductLabel(item){
this.tagloading=true;
this.apipost(
"dmc_post_visa_GetVisaProductCountryTagList",
{VisaCountryId:item},
res => {
this.tagloading=false;
if (res.data.resultCode == 1) {
this.CountryTagList=res.data.data;
console.log(this.CountryTagList,'countrylist');
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
// 删除签证国家
Delete(item) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apipost(
"dmc_post_visa_DeleteVisaProductCountry",
{ Id: item.Id },
res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.getVisaManagementList();
} else {
this.Error(res.data.message);
}
},
null
);
})
.catch(() => {
this.$message.info("已取消停用");
});
},
Selectchange(val) {
let obj = {};
obj = this.allcountry.find(item => {
//这里的userList就是上面遍历的数据源
return item.ID === val; //筛选出匹配数据
});
this.country.CountryName = obj.Name;
},
uploadTest2(file) {
let newArr = [];
this.country.ImageFileList = [];
newArr.push(file.file);
let path = "/Upload/DMC/Icon/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.country.ImageFileList[0] = url;
// this.fileList.push({url:url})
});
},
handleChange2(file, fileList) {
this.fileList2 = fileList.slice(-1);
},
handleChange1(file, fileList) {
this.fileList = fileList.slice(-1);
},
uploadTest(file) {
let newArr = [];
newArr.push(file.file);
let path = "/Upload/DMC/Icon/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.country.Icon = url;
// this.fileList.push({url:url})
});
},
EditCountry(item) {
this.fileList2=[];
this.fileList=[];
this.addShow = true;
this.country = Object.assign({}, item);
let obj1={name:"",url:''};
obj1.name=item.Icon;
obj1.url=item.Icon;
this.fileList.push(obj1);
let obj2={name:"",url:''};
obj2.name=item.ImageFileList[0];
obj2.url=item.ImageFileList[0];
this.fileList2.push(obj2);
},
editVisa(item) {
let data = item;
data.Status = data.Status.toString();
this.addShow = true;
this.addMsg = JSON.parse(JSON.stringify(data));
},
// 获取签证列表
getVisaManagementList() {
this.apipost(
"dmc_get_visa_GetVisaProductCountryPageList",
this.countryList,
res => {
if (res.data.resultCode == 1) {
this.DataList = res.data.data.pageData;
this.total=res.data.data.count;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
saveVisa() {
//修改保存
// console.log("this.country",this.country);
if (this.country.CountryId == "") {
this.$message.error("请选择国家!");
return;
}
if (this.country.Icon == "") {
this.$message.error("请上传国家图片!");
return;
}
if (this.country.ImageFileList.length == 0) {
this.$message.error("请上传背景图片!");
return;
}
this.apipost(
"dmc_post_visa_SetVisaProductCountry",
this.country,
res => {
if (res.data.resultCode == 1) {
this.country = {
CountryId: "",
HotCountry: 1,
Icon: "",
ImageFileList: [],
Sort:0,
};
this.fileList = [];
this.fileList2 = [];
this.addShow = false;
this.$message.success(res.data.message);
this.getVisaManagementList();
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
cancelEdit() {
this.addMsg = {
Id: 0,
Discription: "",
Sort: 1,
Status: 0,
B2B_Price: "",
B2C_Price: "",
DaySet: "",
Interior_Price: "",
SalesPlatform: "",
Unit_Price: ""
};
this.addShow = false;
},
// 获取国家列表
getcountryList() {
this.apipost(
"dict_post_Destination_GetCountry",
{},
res => {
if (res.data.resultCode == 1) {
this.allcountry = res.data.data;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
}
},
mounted() {
this.getVisaManagementList();
this.getcountryList();
}
};
</script>
......@@ -1499,8 +1499,8 @@
// 车资
if(that.isExists(item.CostTypeList,'车资')){
this.moneyAll.zheziyf+=item.Money;
this.moneyAll.zhezisf+=item.PayMoney;
this.moneyAll.cheziyf+=item.Money;
this.moneyAll.chezisf+=item.PayMoney;
}
// 机票款
if(that.isExists(item.CostTypeList,'国际段机票') || item.OrderSource===4 || that.isExists(item.CostTypeList,'机票退税') || that.isExists(item.CostTypeList,'机票罚金') || that.isExists(item.CostTypeList,'机票税金') || that.isExists(item.CostTypeList,'国内联运段机票')){
......
......@@ -608,7 +608,8 @@
</audio>
</div>
<div class="temDivs">
<router-view></router-view>
<!-- :key="key" -->
<router-view ></router-view>
</div>
......@@ -1061,6 +1062,9 @@ export default {
}
},
computed: {
key(){
return this.$route.path + Math.random();
},
sysMsgUnread() {
let temp = this.$store.state.sysMsgUnread;
let sysMsgUnread = temp.addFriend || 0;
......
......@@ -2482,11 +2482,29 @@ export default {
meta: {
title: '制作广告'
},
}, { // 签证 签证产品
},
{ // 签证 签证产品
path: '/VisaProduct',
name: 'VisaProduct',
component: resolve => require(['@/components/SalesVisa/VisaProduct'], resolve)
}, { // 签证 常用航班
},
{ // 签证 签证产品国家
path: '/VisaProductCountryManager',
name: 'VisaProductCountryManager',
component: resolve => require(['@/components/SalesVisa/VisaProductCountryManager'], resolve),
meta: {
title: '签证产品国家'
},
},
{ // 签证 签证产品配置
path: '/ModifyVisaProduct',
name: 'ModifyVisaProduct',
component: resolve => require(['@/components/SalesVisa/ModifyVisaProduct'], resolve),
meta: {
title: '配置签证产品'
},
},
{ // 签证 常用航班
path: '/regularFlights',
name: 'regularFlights',
component: resolve => require(['@/components/SalesVisa/regularFlights'], resolve),
......
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