Commit 1df6ed62 authored by zhengke's avatar zhengke

111

parent da0332a1
<style> <style>
.customerDialogBox.add-box .add-tit{ .customerDialogBox.add-box .add-tit {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: 20px; height: 20px;
} }
.customerDialogBox.add-box .add-tit p{
display: flex; .customerDialogBox.add-box .add-tit p {
align-items: center; display: flex;
font-weight: bold; align-items: center;
color:rgba(17,17,17,1); font-weight: bold;
font-size:14px; color: rgba(17, 17, 17, 1);
} font-size: 14px;
.customerDialogBox.add-box .add-tit p span{ }
display: inline-block;
width:6px; .customerDialogBox.add-box .add-tit p span {
height:6px; display: inline-block;
background:rgba(13,36,129,1); width: 6px;
border-radius:50%; height: 6px;
margin-right: 10px; background: rgba(13, 36, 129, 1);
} border-radius: 50%;
.customerDialogBox.add-box .el-dialog__header{ margin-right: 10px;
padding: 15px 20px; }
background:rgba(255,255,255,1);
} .customerDialogBox.add-box .el-dialog__header {
.customerDialogBox.add-box .dialog-footer{ padding: 15px 20px;
text-align: center; background: rgba(255, 255, 255, 1);
background-color: rgba(248,250,251,1); }
padding-bottom: 20px;
} .customerDialogBox.add-box .dialog-footer {
.customerDialogBox.add-box .el-dialog__footer{ text-align: center;
padding: 0; background-color: rgba(248, 250, 251, 1);
} padding-bottom: 20px;
.customerDialogBox.add-box .el-dialog__body{ }
background-color: rgba(248,250,251,1);
padding-top: 20px; .customerDialogBox.add-box .el-dialog__footer {
max-height: 500px; padding: 0;
overflow: auto; }
}
.customerDialogBox .add-box-btn.el-button{ .customerDialogBox.add-box .el-dialog__body {
border-radius: 0; background-color: rgba(248, 250, 251, 1);
background-color: rgba(13, 36, 129, .8); padding-top: 20px;
border-color: rgba(13, 36, 129, .8); max-height: 500px;
color: white; overflow: auto;
padding: 12px 43px; }
}
.customerDialogBox .add-box-btn.el-button:hover{ .customerDialogBox .add-box-btn.el-button {
background-color: rgba(13, 36, 129, 1); border-radius: 0;
border-color: rgba(13, 36, 129, 1); background-color: rgba(13, 36, 129, .8);
color: white; border-color: rgba(13, 36, 129, .8);
} color: white;
.customerDialogBox .add-box-btn.el-button.add-box-cancel{ padding: 12px 43px;
color: rgba(13, 36, 129, .8); }
background-color: white;
} .customerDialogBox .add-box-btn.el-button:hover {
.customerDialogBox .add-box-btn.el-button.add-box-cancel:hover{ background-color: rgba(13, 36, 129, 1);
color: rgba(13, 36, 129, 1); border-color: rgba(13, 36, 129, 1);
background-color: white; color: white;
} }
.customerDialogBox .el-input .el-input-group__append {
background-color: rgba(13, 36, 129, 1); .customerDialogBox .add-box-btn.el-button.add-box-cancel {
border-color: rgba(13, 36, 129, 1); color: rgba(13, 36, 129, .8);
color: #fff; background-color: white;
} }
.customerDialogBox .form-box .form-box-tit{
display: flex; .customerDialogBox .add-box-btn.el-button.add-box-cancel:hover {
align-items: center; color: rgba(13, 36, 129, 1);
margin-bottom: 20px; background-color: white;
} }
.customerDialogBox .form-box .radius{
display: flex; .customerDialogBox .el-input .el-input-group__append {
width:4px; background-color: rgba(13, 36, 129, 1);
height:4px; border-color: rgba(13, 36, 129, 1);
background:rgba(255,164,117,1); color: #fff;
border-radius:50%; }
margin-right: 10px;
} .customerDialogBox .form-box .form-box-tit {
.customerDialogBox .up-img-box .uib-item{ display: flex;
margin-right: 30px; align-items: center;
width: 120px; margin-bottom: 20px;
height: 120px; }
background-color: white;
position: relative; .customerDialogBox .form-box .radius {
margin-bottom: 30px; display: flex;
} width: 4px;
.customerDialogBox .up-img-box .uib-item p{ height: 4px;
position: absolute; background: rgba(255, 164, 117, 1);
bottom: -30px; border-radius: 50%;
font-size: 12px; margin-right: 10px;
text-align: center; }
width: 100%;
} .customerDialogBox .up-img-box .uib-item {
.customerDialogBox .up-img-box .uib-item:hover .imgzhe-btn{ margin-right: 30px;
opacity: 1 width: 120px;
} height: 120px;
.customerDialogBox .imgzhe { background-color: white;
width: 100%; position: relative;
height: 100%; margin-bottom: 30px;
position: absolute; }
top: 0;
} .customerDialogBox .up-img-box .uib-item p {
.customerDialogBox .imgzhe .imgzhe-btn{ position: absolute;
background: rgba(0, 0, 0, 0.6); bottom: -30px;
width: 100%; font-size: 12px;
height: 100%; text-align: center;
text-align: center; width: 100%;
line-height: 120px; }
position: absolute;
top: 0; .customerDialogBox .up-img-box .uib-item:hover .imgzhe-btn {
opacity: 1; opacity: 1
transition: all linear .5s }
}
.customerDialogBox .imgzhe .imgzhe-btn i{ .customerDialogBox .imgzhe {
font-size: 22px; width: 100%;
margin-right: 5px; height: 100%;
color: white; position: absolute;
cursor: pointer; top: 0;
} }
.customerDialogBox .up-ctrl{
position: absolute; .customerDialogBox .imgzhe .imgzhe-btn {
left: 0; background: rgba(0, 0, 0, 0.6);
top: 0; width: 100%;
width: 100%; height: 100%;
height: 100%; text-align: center;
} line-height: 120px;
.customerDialogBox .up-ctrl>div{ position: absolute;
width: 100%; top: 0;
height: 100%; opacity: 1;
text-align: center; transition: all linear .5s
line-height: 140px; }
}
.MyEditForm-item-checkd.MyEditForm-item .el-form-item{ .customerDialogBox .imgzhe .imgzhe-btn i {
width: 80%; font-size: 22px;
} margin-right: 5px;
.MyEditForm-item-checkd .el-checkbox{ color: white;
position: absolute; cursor: pointer;
right: -50px; }
top: 10px;
} .customerDialogBox .up-ctrl {
._addPassengerEconomicCapability { position: absolute;
line-height: 22px; left: 0;
overflow: hidden; top: 0;
width: 100%; width: 100%;
} height: 100%;
}
._addPassengerEconomicCapability span {
display: inline-block; .customerDialogBox .up-ctrl>div {
padding: 2px 4px; width: 100%;
border: 1px solid #c0c4cc; height: 100%;
margin: 1px; text-align: center;
cursor: pointer; line-height: 140px;
color: #c0c4cc; }
font-size: 12px;
border-radius: 4px; .MyEditForm-item-checkd.MyEditForm-item .el-form-item {
} width: 80%;
}
._addPassengerEconomicCapability span._active {
border: 1px solid rgb(123, 194, 245); .MyEditForm-item-checkd .el-checkbox {
color: rgb(123, 194, 245); position: absolute;
} right: -50px;
top: 10px;
}
._addPassengerEconomicCapability {
line-height: 22px;
overflow: hidden;
width: 100%;
}
._addPassengerEconomicCapability span {
display: inline-block;
padding: 2px 4px;
border: 1px solid #c0c4cc;
margin: 1px;
cursor: pointer;
color: #c0c4cc;
font-size: 12px;
border-radius: 4px;
}
._addPassengerEconomicCapability span._active {
border: 1px solid rgb(123, 194, 245);
color: rgb(123, 194, 245);
}
</style> </style>
<template> <template>
<el-dialog :visible.sync="dialogTableVisible" @closed="closedDialog" :close-on-click-modal="false" class="add-box add-box1 customerDialogBox"> <el-dialog :visible.sync="dialogTableVisible" @closed="closedDialog" :close-on-click-modal="false"
class="add-box add-box1 customerDialogBox">
<div class="add-tit" slot="title"> <div class="add-tit" slot="title">
<p><span></span>{{name}}</p> <p><span></span>{{name}}</p>
<span icon="el-icon-close"></span> <span icon="el-icon-close"></span>
</div> </div>
<div class="form-box" v-if="show"> <div class="form-box" v-if="show">
<el-form :model="form" ref="form" class="MyEditForm" :rules="rules"> <el-form :model="form" ref="form" class="MyEditForm" :rules="rules">
<p class="form-box-tit"><span class="radius"></span> 基本信息</p> <p class="form-box-tit"><span class="radius"></span> 基本信息</p>
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item label-pad-left">
<el-form-item label="身份证号码" prop="IdCard"> <el-form-item label="需求" prop="ClueDemand ">
<el-input placeholder="请输入客户身份证号码" v-model="form.IdCard"></el-input> <el-input placeholder="请填写需求" v-model="form.ClueDemand "></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="中文姓" prop="SurName">
<el-input placeholder="请输入中文姓" v-model="form.SurName" @input="Transformation(form.SurName,'SurName')"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="中文名" prop="Name"> <el-form-item label="微信号" prop="WeChatNo">
<el-input placeholder="请输入中文名" v-model="form.Name" @input="Transformation(form.Name,'Name')"></el-input> <el-input placeholder="请输入微信号" v-model="form.WeChatNo"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="性别" prop="Sex"> <el-form-item label="手机号码" prop="MobilePhone">
<el-select v-model="form.Sex"> <el-input placeholder="请输入手机号码" v-model="form.MobilePhone"></el-input>
<el-option :key="0" label="保密" :value="0"></el-option>
<el-option :key="1" label="男" :value="1"></el-option>
<el-option :key="2" label="女" :value="2"></el-option>
</el-select>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="英文姓" prop="ESurName"> <el-form-item label="中文姓" prop="SurName">
<el-input placeholder="请输入英文姓" v-model="form.ESurName"></el-input> <el-input placeholder="请输入中文姓" v-model="form.SurName" @input="Transformation(form.SurName,'SurName')"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="中文名" prop="Name">
<el-input placeholder="请输入中文名" v-model="form.Name" @input="Transformation(form.Name,'Name')"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="英文姓" prop="ESurName">
<el-input placeholder="请输入英文姓" v-model="form.ESurName"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="英文名" prop="EName">
<el-input placeholder="请输入英文名" v-model="form.EName"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="护照号" prop="PassportNo">
<el-input placeholder="请输入护照号" v-model="form.PassportNo"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="护照号签发地" prop="PassportAddress">
<el-input placeholder="请输入护照号签发地" v-model="form.PassportAddress"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="护照签发日期" prop="PassportIssued">
<el-date-picker :clearable="false" value-format="yyyy-MM-dd HH:mm:ss" v-model="form.PassportIssued" type="date" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="护照过期日" prop="PassportExpiry">
<el-date-picker :clearable="false" value-format="yyyy-MM-dd HH:mm:ss" v-model="form.PassportExpiry" type="date" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</div>
</el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="英文名" prop="EName"> <el-form-item label="客户来源" prop="CustomerSourceType">
<el-input placeholder="请输入英文名" v-model="form.EName"></el-input> <el-select v-model="form.CustomerSourceType" placeholder="请选择客户来源">
<el-option v-for="item in SourceEnum" :key="item.ID" :label="item.Name"
:value="item.ID">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8" v-if="form.CustomerSourceType === 6">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="手机号码" prop="MobilePhone"> <el-form-item label="客户来源信息" prop="CustomerSource">
<el-input placeholder="请输入手机号码" v-model="form.MobilePhone"></el-input> <el-input type="textarea" placeholder="请输入客户来源信息" v-model="form.CustomerSource">
</el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8" v-if="form.CustomerSourceType === 7">
<div class="MyEditForm-item"> <div class="MyEditForm-item label-pad-left">
<el-form-item label="生日" prop="Birthday"> <el-form-item label="来源细分" prop="SourceAccount">
<el-date-picker <el-select placeholder="请选择来源途径" v-model="form.SourceAccount">
:clearable="false" <el-option v-for="item in SourceSegmentList" :key="item.ID" :label="item.Name"
value-format="yyyy-MM-dd HH:mm:ss" :value="item.ID"></el-option>
v-model="form.Birthday" </el-select>
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<template v-for='(item,index) in EconomicCapabilityS'>
<el-col :span="8" :key="index" v-if='item.isShow'>
<div class="MyEditForm-item">
<el-form-item :label="item.Name">
<el-input v-model="item.Content" type="text" maxlength="50"></el-input>
</el-form-item>
</div>
</el-col>
</template>
</el-row>
<el-col :span="24">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="备注" prop="Remarks">
<el-input type="textarea" placeholder="客户的特殊喜好" v-model="form.Remarks"></el-input>
</el-form-item>
</div>
</el-col>
</el-form>
</div>
<div class="form-box" v-if="show">
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item title="更多信息" name="3">
<el-form :model="form" ref="form" class="MyEditForm">
<el-row :gutter="30">
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="出生地" prop="BirthdayAddress"> <el-form-item label="身份证号码" prop="IdCard">
<el-input placeholder="请输入出生地" v-model="form.BirthdayAddress"></el-input> <el-input placeholder="请输入客户身份证号码" v-model="form.IdCard"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="护照号" prop="PassportNo"> <el-form-item label="性别" prop="Sex">
<el-input placeholder="请输入护照号" v-model="form.PassportNo"></el-input> <el-select v-model="form.Sex">
<el-option :key="0" label="保密" :value="0"></el-option>
<el-option :key="1" label="男" :value="1"></el-option>
<el-option :key="2" label="女" :value="2"></el-option>
</el-select>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="护照号签发地" prop="PassportAddress"> <el-form-item label="手机号码" prop="MobilePhone">
<el-input placeholder="请输入护照号签发地" v-model="form.PassportAddress"></el-input> <el-input placeholder="请输入手机号码" v-model="form.MobilePhone"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="护照签发日期" prop="PassportIssued"> <el-form-item label="生日" prop="Birthday">
<el-date-picker <el-date-picker :clearable="false" value-format="yyyy-MM-dd HH:mm:ss" v-model="form.Birthday" type="date" placeholder="选择日期">
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="form.PassportIssued"
type="date"
placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="护照过期日" prop="PassportExpiry"> <el-form-item label="出生地" prop="BirthdayAddress">
<el-date-picker <el-input placeholder="请输入出生地" v-model="form.BirthdayAddress"></el-input>
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="form.PassportExpiry"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item label-pad-left"> <div class="MyEditForm-item label-pad-left">
<el-form-item label="国籍" prop="Nationality"> <el-form-item label="国籍" prop="Nationality">
<el-select <el-select v-model="form.Nationality" placeholder="国家">
v-model="form.Nationality" placeholder="国家"> <el-option v-for="item in countryList" :key="item.ID" :label="item.Name" :value="item.ID">
<el-option
v-for="item in countryList"
:key="item.ID"
:label="item.Name"
:value="item.ID">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -339,30 +424,15 @@ ...@@ -339,30 +424,15 @@
<el-option v-for="item in VisaDeparturesType" :key="item.Id" :label="item.Name" :value="item.Name"> <el-option v-for="item in VisaDeparturesType" :key="item.Id" :label="item.Name" :value="item.Name">
</el-option> </el-option>
</el-select> </el-select>
<el-checkbox v-model='form.IsRecommend' :true-label='1' :false-label='2'>推荐</el-checkbox> <el-checkbox v-model='form.IsRecommend' :true-label='1' :false-label='2'>推荐
</el-form-item> </el-checkbox>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item ">
<el-form-item label="职务" prop="Duty">
<el-select v-model="form.Duty" filterable>
<el-option v-for="item in VisaDutyTypeEnum" :key="item.Id" :label="item.Name" :value="item.Name"></el-option>
</el-select>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="备注">
<el-input type="textarea" placeholder="客户的特殊喜好" v-model="form.Remarks"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="出游类型" prop="TravelType"> <el-form-item label="出游类型" prop="TravelType">
<el-select v-model="form.TravelType" filterable > <el-select v-model="form.TravelType" filterable>
<el-option v-for="item in TravelTypeList" :key="item.Code" :label="item.Content" :value="item.Code"></el-option> <el-option v-for="item in TravelTypeList" :key="item.Code" :label="item.Content" :value="item.Code"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -371,7 +441,7 @@ ...@@ -371,7 +441,7 @@
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="单位类型" prop="UnitType"> <el-form-item label="单位类型" prop="UnitType">
<el-select v-model="form.UnitType" filterable > <el-select v-model="form.UnitType" filterable>
<el-option v-for="item in UnitTypeList" :key="item.Code" :label="item.Content" :value="item.Code"></el-option> <el-option v-for="item in UnitTypeList" :key="item.Code" :label="item.Content" :value="item.Code"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -380,7 +450,7 @@ ...@@ -380,7 +450,7 @@
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="职务类型" prop="DutyType"> <el-form-item label="职务类型" prop="DutyType">
<el-select v-model="form.DutyType" filterable > <el-select v-model="form.DutyType" filterable>
<el-option v-for="item in DutyTypeList" :key="item.Code" :label="item.Content" :value="item.Code"></el-option> <el-option v-for="item in DutyTypeList" :key="item.Code" :label="item.Content" :value="item.Code"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -400,11 +470,7 @@ ...@@ -400,11 +470,7 @@
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="客户来源" prop="CustomerSourceType"> <el-form-item label="客户来源" prop="CustomerSourceType">
<el-select v-model="form.CustomerSourceType" placeholder="请选择客户来源"> <el-select v-model="form.CustomerSourceType" placeholder="请选择客户来源">
<el-option <el-option v-for="item in SourceEnum" :key="item.ID" :label="item.Name" :value="item.ID">
v-for="item in SourceEnum"
:key="item.ID"
:label="item.Name"
:value="item.ID">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -413,650 +479,697 @@ ...@@ -413,650 +479,697 @@
<el-col :span="16" v-if="form.CustomerSourceType === 6"> <el-col :span="16" v-if="form.CustomerSourceType === 6">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="客户来源信息" prop="CustomerSource"> <el-form-item label="客户来源信息" prop="CustomerSource">
<el-input type="textarea" placeholder="请输入客户来源信息" v-model="form.CustomerSource"></el-input> <el-input type="textarea" placeholder="请输入客户来源信息" v-model="form.CustomerSource">
</el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<template v-for='(item,index) in EconomicCapabilityS' > <template v-for='(item,index) in EconomicCapabilityS'>
<el-col :span="8" :key="index" v-if='item.isShow' > <el-col :span="8" :key="index" v-if='item.isShow'>
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item :label="item.Name"> <el-form-item :label="item.Name">
<el-input v-model="item.Content" type="text" maxlength="50"></el-input> <el-input v-model="item.Content" type="text" maxlength="50"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
</template> </template>
</el-row> </el-row>
</el-form> </el-form>
<div class="_addPassengerEconomicCapability"> </el-collapse-item>
<span v-for="(item, index) in EconomicCapabilityS" :key="index" @click="addEconomicCapability(item)" </el-collapse>
:class="{_active:item.isShow}">{{item.Name}}</span>
</div>
</div>
</div> <div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer"> <el-button type="primary" class="add-box-btn" @click="submitForm('form')">确 定</el-button>
<el-button type="primary" class="add-box-btn" @click="submitForm('form')">确 定</el-button> <el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('form')">取 消
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('form')">取 消</el-button> </el-button>
</div> </div>
<el-dialog :visible.sync="dialogVisible"> <el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt=""> <img width="100%" :src="dialogImageUrl" alt="">
</el-dialog> </el-dialog>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
export default { export default {
props:{ props: {
CustomerId: { CustomerId: {
type: Number, type: Number,
default: 0 default: 0
}, },
name: { name: {
type: String, type: String,
default: '新建客户' default: '新建客户'
}
},
data() {
let checkPhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('手机号不能为空'));
} else {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
if (reg.test(value)) {
callback();
} else {
return callback(new Error('请输入正确的手机号'));
} }
}
}
return {
dialogTableVisible: false,
SourceEnum: [],
countryList: "",
provinceList: "",
dialogImageUrl: '',
dialogVisible: false,
cityList: "",
district: "",
jycs: [],
fileList: [],
CustomerLevelEnum: [],
CustomerBrandList: [],
form: {
Id: 0,
CustomerSourceType: '',
CustomerSource: '',
SurName: '',
Name: '',
Sex: '',
EName: '',
ESurName: '',
Birthday: '',
BirthdayAddress: '',
PassportAddress: '',
PassportExpiry: '',
PassportNo: '',
Nationality: '',
Marriage: '',
Address: '',
AddressDetail: '',
HistoryRecord: '',
IdentityType: '',
Duty: '',
EconomicCapabilityList: [],
Remarks: '',
TravelType: '',
UnitType: '',
DutyType: '',
IsHightSchool: '',
IsRecommend: '',
PassportIssued: '',
IssuingAuthority: '',
IdCard: '',
MobilePhone: '',
}, },
VisaIdentityTypeEnum: [], data() {
VisaDeparturesType: [], let checkPhone = (rule, value, callback) => {
VisaDutyTypeEnum: [], if (!value) {
TravelTypeList: [], return callback(new Error('手机号不能为空'));
DutyTypeList: [], } else {
UnitTypeList: [], const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
rules: { if (reg.test(value)) {
DutyType: [ callback();
{ required: true, message: '请选择职务类型', trigger: 'change' } } else {
], return callback(new Error('请输入正确的手机号'));
UnitType: [ }
{ required: true, message: '请选择单位类型', trigger: 'change' } }
],
TravelType: [
{ required: true, message: '请选择出游类型', trigger: 'change' }
],
IdCard: [{
required: true,
message: "请填身份证号码",
trigger: "blur"
}],
SurName: [{
required: true,
message: "请填写中文姓",
trigger: "blur"
}],
Name: [{
required: true,
message: "请填写中文名",
trigger: "blur"
}],
Sex: [{
required: true,
message: "请填选择性别",
trigger: "change"
}],
ESurName: [{
required: true,
message: "请填写英文姓",
trigger: "blur"
},
{
pattern: /^[a-zA-Z]/,
message: "请输入英文姓"
}
],
EName: [{
required: true,
message: "请填写英文名",
trigger: "blur"
},
{
pattern: /^[a-zA-Z]/,
message: "请输入英文姓"
} }
], return {
Birthday: [{ dialogTableVisible: false,
required: true, SourceEnum: [],
message: "请填选择出生日期", countryList: "",
trigger: "blur" provinceList: "",
}], dialogImageUrl: '',
PassportNo: [{ dialogVisible: false,
required: true, cityList: "",
message: "请填写护照号", district: "",
trigger: "blur" jycs: [],
}, fileList: [],
{ CustomerLevelEnum: [],
pattern: /^[0-9a-zA-Z]+$/, CustomerBrandList: [],
message: "正确的护照号" form: {
Id: 0,
CustomerSourceType: '',
CustomerSource: '',
SurName: '',
Name: '',
Sex: '',
EName: '',
ESurName: '',
Birthday: '',
BirthdayAddress: '',
PassportAddress: '',
PassportExpiry: '',
PassportNo: '',
Nationality: '',
Marriage: '',
Address: '',
AddressDetail: '',
HistoryRecord: '',
IdentityType: '',
Duty: '',
EconomicCapabilityList: [],
Remarks: '',
TravelType: '',
UnitType: '',
DutyType: '',
IsHightSchool: '',
IsRecommend: '',
PassportIssued: '',
IssuingAuthority: '',
IdCard: '',
MobilePhone: '',
ClueDemand: '',
WeChatNo: '',
SourceAccount: '',
},
VisaIdentityTypeEnum: [],
VisaDeparturesType: [],
VisaDutyTypeEnum: [],
TravelTypeList: [],
DutyTypeList: [],
UnitTypeList: [],
rules: {
/* DutyType: [{
required: true,
message: '请选择职务类型',
trigger: 'change'
}],
UnitType: [{
required: true,
message: '请选择单位类型',
trigger: 'change'
}],
TravelType: [{
required: true,
message: '请选择出游类型',
trigger: 'change'
}],
Name: [{
required: true,
message: "请填写中文名",
trigger: "blur"
}],
Sex: [{
required: true,
message: "请填选择性别",
trigger: "change"
}],
EName: [{
required: true,
message: "请填写英文名",
trigger: "blur"
}, {
pattern: /^[a-zA-Z]/,
message: "请输入英文姓"
}],
Birthday: [{
required: true,
message: "请填选择出生日期",
trigger: "blur"
}],
AddressDetail: [{
required: true,
message: "请输入详细地址",
trigger: "blur"
}],
Address: [{
required: true,
message: "请输入家庭居住地",
trigger: "blur"
}],
PassportAddress: [{
required: true,
message: "请填写签发地",
trigger: "blur"
}],
MobilePhone: [{
required: true,
validator: checkPhone,
trigger: 'blur'
}],
Nationality: [{
required: true,
message: "请选择国籍",
trigger: "change"
}],
BirthdayAddress: [{
required: true,
message: "请填写出生地",
trigger: "change"
}],
IdentityType: [{
required: true,
message: "请选择身份确认",
trigger: "change"
}],
HistoryRecord: [{
required: true,
message: "请选择出境记录",
trigger: "change"
}],
Duty: [{
required: true,
message: "请选择职务",
trigger: "change"
}],
Marriage: [{
required: true,
message: "请选择婚姻",
trigger: "change"
}],*/
PassportNo: [{
required: true,
message: "请填写护照号",
trigger: "blur"
}, {
pattern: /^[0-9a-zA-Z]+$/,
message: "正确的护照号"
}],
PassportIssued: [{
required: true,
message: "请选择签发日期",
trigger: "blur"
}],
PassportExpiry: [{
required: true,
message: "请选择过期日",
trigger: "blur"
}],
ESurName: [{
required: true,
message: "请填写英文姓",
trigger: "blur"
}, {
pattern: /^[a-zA-Z]/,
message: "请输入英文姓"
}],
IdCard: [{
required: true,
message: "请填身份证号码",
trigger: "blur"
}],
SurName: [{
required: true,
message: "请填写中文姓",
trigger: "blur"
}],
CustomerSource: [{
required: true,
message: '请输入客户来源信息',
trigger: 'blur'
}],
CustomerSourceType: [{
required: true,
message: '请选择客户来源',
trigger: 'change'
}],
ClueDemand: [{
required: true,
message: '请填写需求',
trigger: 'blur'
}],
Remarks: [{
required: true,
message: '请填写备注',
trigger: 'blur'
}],
WeChatNo: [{
required: true,
message: '请填写微信号',
trigger: 'blur'
}],
MobilePhone: [{
required: true,
message: '请填写手机号码',
trigger: 'blur'
}],
SourceAccount: [{
required: true,
message: '请选择你的来源',
trigger: 'change'
}]
},
show: true,
CustomerList: [],
EconomicCapabilityS: [],
// 小红书
SourceSegmentList: [],
};
},
watch: {
CustomerId: {
handler(val, oldVal) {
// console.log(val)
},
deep: true
} }
],
PassportIssued: [{
required: true,
message: "请选择签发日期",
trigger: "blur"
}],
PassportExpiry: [{
required: true,
message: "请选择过期日",
trigger: "blur"
}],
AddressDetail: [{
required: true,
message: "请输入详细地址",
trigger: "blur"
}],
Address: [{
required: true,
message: "请输入家庭居住地",
trigger: "blur"
}],
PassportAddress: [{
required: true,
message: "请填写签发地",
trigger: "blur"
}],
MobilePhone: [{ required: true, validator: checkPhone, trigger: 'blur'}],
Nationality: [{
required: true,
message: "请选择国籍",
trigger: "change"
}],
BirthdayAddress: [{
required: true,
message: "请填写出生地",
trigger: "change"
}],
IdentityType: [{
required: true,
message: "请选择身份确认",
trigger: "change"
}],
HistoryRecord: [{
required: true,
message: "请选择出境记录",
trigger: "change"
}],
Duty: [{
required: true,
message: "请选择职务",
trigger: "change"
}],
Marriage: [{
required: true,
message: "请选择婚姻",
trigger: "change"
}],
CustomerSource: [
{ required: true, message: '请输入客户来源信息', trigger: 'blur' }
],
CustomerSourceType: [
{ required: true, message: '请选择客户来源', trigger: 'change' }
],
}, },
show: true, mounted() {
CustomerList: [], this.GetCustomerLevelEnum()
EconomicCapabilityS: [], this.getJycs()
}; this.getCustomerBrandList()
},watch:{ this.getCountryList()
CustomerId: { this.GetCustomerSourceEnum()
handler(val, oldVal){ this.getVisaIdentityTypeEnum()
console.log(val) this.getVisaDeparturesType()
this.getVisaDutyTypeEnum()
this.getTravelType()
this.getUnitType()
this.getDutyType()
this.getEconomicCapability();
// this.getCustomerList()
this.getSourceSegmentList()
let $this = this
setTimeout(() => {
$this.dialogTableVisible = true
}, 50)
},
methods: {
Transformation(val, type) {
let text = this.pinyin(val, {
style: this.pinyin.STYLE_NORMAL
});
if (type == "SurName") {
let upText = text.join("").toLocaleUpperCase()
this.form.ESurName = upText;
}
if (type == "Name") {
let upText = text.join("").toLocaleUpperCase()
this.form.EName = upText;
}
}, },
deep:true getEconomicCapability() {
} //获取经济能力
}, this.apipost2(
mounted() { "dict_post_GetList", {
this.GetCustomerLevelEnum() Key: "SK_Visa_EconomicCapability",
this.getJycs() IsTimer: 1
this.getCustomerBrandList() },
this.getCountryList() res => {
this.GetCustomerSourceEnum() this.EconomicCapabilityS = res.data.data;
this.getVisaIdentityTypeEnum() if (this.CustomerId != 0) {
this.getVisaDeparturesType() this.form.Id = this.CustomerId;
this.getVisaDutyTypeEnum() this.apipost('/api/Customer/GetAllGuesstCustomerModel', {
this.getTravelType() ID: this.CustomerId
this.getUnitType() }, res => {
this.getDutyType() if (res.data.resultCode == 1) {
this.getEconomicCapability(); let obj = res.data.data;
// this.getCustomerList() obj.TravelType = obj.TravelType.toString()
let $this = this obj.UnitType = obj.UnitType.toString()
setTimeout(()=>{ obj.DutyType = obj.DutyType.toString()
$this.dialogTableVisible = true this.form = obj;
},50) this.EconomicCapabilityS.forEach(x => {
}, if (obj.EconomicCapabilityList) {
methods: { obj.EconomicCapabilityList.forEach(y => {
Transformation(val, type) { if (x.ID == y.ID) {
let text = this.pinyin(val, { x.isShow = true;
style: this.pinyin.STYLE_NORMAL x.Content = y.Value;
}); }
if (type == "SurName") { });
let upText = text.join("").toLocaleUpperCase() }
this.form.ESurName = upText; });
} }
if (type == "Name") { })
let upText = text.join("").toLocaleUpperCase() }
this.form.EName = upText; },
} err => {}
}, );
getEconomicCapability() { },
//获取经济能力 addEconomicCapability(obj) {
this.apipost2( // 添加经济能力说明
"dict_post_GetList", { this.EconomicCapabilityS.forEach(x => {
Key: "SK_Visa_EconomicCapability", if (x.ID == obj.ID) {
IsTimer:1 x.isShow ? (x.isShow = false) : (x.isShow = true);
}, }
res => { });
this.EconomicCapabilityS = res.data.data; this.$forceUpdate();
if (this.CustomerId != 0) { },
this.form.Id = this.CustomerId; getDutyType() {
this.apipost('/api/Customer/GetAllGuesstCustomerModel', {ID: this.CustomerId}, res=>{ this.apipost2(
"dict_get_GetDictValueCommonList", {
Key: 'SK_CRM_DutyType',
},
res => {
if (res.data.resultCode == 1) {
this.DutyTypeList = res.data.data
} else {}
},
err => {}
);
},
getUnitType() {
this.apipost2(
"dict_get_GetDictValueCommonList", {
Key: 'SK_CRM_UnitType',
},
res => {
if (res.data.resultCode == 1) {
this.UnitTypeList = res.data.data
} else {}
},
err => {}
);
},
getTravelType() {
this.apipost2(
"dict_get_GetDictValueCommonList", {
Key: 'SK_CRM_TravelType',
},
res => {
if (res.data.resultCode == 1) {
this.TravelTypeList = res.data.data
} else {}
},
err => {}
);
},
getVisaDutyTypeEnum() {
//获取职务
let msg = {};
this.apipost2(
"dmc_get_visa_GetVisaDutyTypeEnum",
msg,
res => {
if (res.data.resultCode == 1) {
this.VisaDutyTypeEnum = res.data.data;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
getVisaDeparturesType() {
//获取出境记录状态
let msg = {};
this.apipost2(
"dmc_get_visa_GetVisaDeparturesTypeEnum",
msg,
res => {
if (res.data.resultCode == 1) {
this.VisaDeparturesType = res.data.data;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
getVisaIdentityTypeEnum() {
//获取身份证明
let msg = {};
this.apipost2(
"dmc_get_visa_GetVisaIdentityTypeEnum",
msg,
res => {
if (res.data.resultCode == 1) {
this.VisaIdentityTypeEnum = res.data.data;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
getCustomerList() {
this.apipost('/api/Customer/GetCustomerListByCreateInfo', {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let obj = res.data.data; this.CustomerList = res.data.data
obj.TravelType = obj.TravelType.toString() }
obj.UnitType = obj.UnitType.toString() })
obj.DutyType = obj.DutyType.toString() },
this.form = obj; getSourceSegmentList() {
this.EconomicCapabilityS.forEach(x => { this.apipost('/api/Customer/GetGuestSourceAccountList', {}, res => {
if (obj.EconomicCapabilityList) { if (res.data.resultCode == 1) {
obj.EconomicCapabilityList.forEach(y => { this.SourceSegmentList = res.data.data
if (x.ID == y.ID) { }
x.isShow = true; })
x.Content = y.Value; },
} closedDialog() {
}); this.MsgBus.$emit('closeCustomerDialogBox')
} },
addData() {
if (this.form.CustomerID === '') {
this.form.CustomerID = 0
}
this.form.EconomicCapabilityList = []
this.EconomicCapabilityS.forEach(x => {
if (x.isShow == true) {
this.form.EconomicCapabilityList.push({
Key: x.Name,
Value: x.Content,
ID: x.ID
}); });
} }
});
this.apipost('/api/Customer/CreateGuesstCustomer', this.form, res => {
if (res.data.resultCode == 1) {
this.dialogTableVisible = false;
// 有id 发送更新抽屉消息
if (this.CustomerId !== 0) {
this.$message.success('修改直客成功');
this.MsgBus.$emit('RefreshInfoBox')
} else {
this.$message.success('新建直客成功');
}
this.$emit('getList')
this.resetForm("form");
}
}) })
} },
}, submitForm(addMsg) {
err => {} //提交创建、修改表单
); this.$refs[addMsg].validate(valid => {
}, if (valid) {
addEconomicCapability(obj) { this.addData();
// 添加经济能力说明 } else {
this.EconomicCapabilityS.forEach(x => { return false;
if (x.ID == obj.ID) { }
x.isShow ? (x.isShow = false) : (x.isShow = true);
}
});
this.$forceUpdate();
},
getDutyType(){
this.apipost2(
"dict_get_GetDictValueCommonList",
{
Key: 'SK_CRM_DutyType',
},
res => {
if (res.data.resultCode == 1) {
this.DutyTypeList = res.data.data
}else{
}
},
err => {}
);
},
getUnitType(){
this.apipost2(
"dict_get_GetDictValueCommonList",
{
Key: 'SK_CRM_UnitType',
},
res => {
if (res.data.resultCode == 1) {
this.UnitTypeList = res.data.data
}else{
}
},
err => {}
);
},
getTravelType(){
this.apipost2(
"dict_get_GetDictValueCommonList",
{
Key: 'SK_CRM_TravelType',
},
res => {
if (res.data.resultCode == 1) {
this.TravelTypeList = res.data.data
}else{
}
},
err => {}
);
},
getVisaDutyTypeEnum() {
//获取职务
let msg = {};
this.apipost2(
"dmc_get_visa_GetVisaDutyTypeEnum",
msg,
res => {
if (res.data.resultCode == 1) {
this.VisaDutyTypeEnum = res.data.data;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
getVisaDeparturesType() {
//获取出境记录状态
let msg = {};
this.apipost2(
"dmc_get_visa_GetVisaDeparturesTypeEnum",
msg,
res => {
if (res.data.resultCode == 1) {
this.VisaDeparturesType = res.data.data;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
getVisaIdentityTypeEnum() {
//获取身份证明
let msg = {};
this.apipost2(
"dmc_get_visa_GetVisaIdentityTypeEnum",
msg,
res => {
if (res.data.resultCode == 1) {
this.VisaIdentityTypeEnum = res.data.data;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
getCustomerList(){
this.apipost('/api/Customer/GetCustomerListByCreateInfo', {}, res=>{
if (res.data.resultCode == 1) {
this.CustomerList = res.data.data
}
})
},
closedDialog(){
this.MsgBus.$emit('closeCustomerDialogBox')
},
addData(){
if (this.form.CustomerID === '') {
this.form.CustomerID = 0
}
this.form.EconomicCapabilityList = []
this.EconomicCapabilityS.forEach(x => {
if (x.isShow == true) {
this.form.EconomicCapabilityList.push({
Key: x.Name,
Value: x.Content,
ID: x.ID
}); });
} },
}); resetForm(formName) { // 重置表单
this.apipost('/api/Customer/CreateGuesstCustomer', this.form, res=>{ this.form = {
if (res.data.resultCode == 1) { Id: 0,
this.dialogTableVisible = false; SurName: '',
// 有id 发送更新抽屉消息 Name: 0,
if(this.CustomerId !== 0) { Sex: '',
this.$message.success('修改直客成功'); EName: '',
this.MsgBus.$emit('RefreshInfoBox') ESurName: 0,
} else { Birthday: '',
this.$message.success('新建直客成功'); BirthdayAddress: 2,
PassportAddress: '',
PassportExpiry: '',
PassportNo: '',
Nationality: '',
Marriage: '',
Address: '',
AddressDetail: '',
HistoryRecord: '',
IdentityType: '',
Duty: '',
EconomicCapabilityList: [],
CustomerSourceType: '',
CustomerSource: '',
Remarks: '',
TravelType: '',
UnitType: '',
DutyType: '',
IsHightSchool: '',
IsRecommend: '',
PassportIssued: '',
IssuingAuthority: '',
IdCard: '',
MobilePhone: '',
} }
this.$emit('getList') this.$refs[formName].resetFields();
this.resetForm("form"); },
} getCustomerBrandList() { // 获取品牌
}) this.apipost2('app_get_customer_brand', {}, res => {
}, if (res.data.resultCode == 1) {
submitForm(addMsg) { this.CustomerBrandList = res.data.data;
//提交创建、修改表单 } else {
this.$refs[addMsg].validate(valid => { this.$message.error(res.data.message)
if (valid) { }
this.addData(); }, err => {})
} else { },
return false; getJycs() {
} this.apipost2('app_today_visit_GetCustomerPremisesEnum', {}, res => {
}); if (res.data.resultCode == 1) {
}, this.jycs = res.data.data
resetForm(formName) { // 重置表单 }
this.form = { }, err => {})
Id: 0, },
SurName: '', GetCustomerLevelEnum() {
Name: 0, this.apipost('/api/Customer/GetCustomerLevelEnum', {}, res => {
Sex: '', if (res.data.resultCode == 1) {
EName: '', this.CustomerLevelEnum = res.data.data
ESurName: 0, }
Birthday: '', })
BirthdayAddress: 2, },
PassportAddress: '', GetCustomerSourceEnum() {
PassportExpiry: '', this.apipost('/api/Customer/GetCustomerSourceEnum', {}, res => {
PassportNo: '', if (res.data.resultCode == 1) {
Nationality: '', this.SourceEnum = res.data.data
Marriage: '', }
Address: '', })
AddressDetail: '', },
HistoryRecord: '', getProvinceList2(ID, type) {
IdentityType: '', let msg = {
Duty: '', Id: ID
EconomicCapabilityList: [], };
CustomerSourceType: '', this.apipost2(
CustomerSource: '', "dict_post_Destination_GetChildList",
Remarks: '', msg,
TravelType: '', res => {
UnitType: '', if (type == 1) {
DutyType: '', this.provinceList = res.data.data;
IsHightSchool: '', } else if (type == 2) {
IsRecommend: '', this.cityList = res.data.data;
PassportIssued: '', } else if (type == 3) {
IssuingAuthority: '', this.district = res.data.data;
IdCard: '', }
MobilePhone: '', },
} err => {}
this.$refs[formName].resetFields(); );
}, },
getCustomerBrandList() { // 获取品牌 //获取国家
this.apipost2('app_get_customer_brand', {}, res => { getCountryList() {
if (res.data.resultCode == 1) { this.apipost2(
this.CustomerBrandList = res.data.data; "dict_post_Destination_GetCountry", {},
} else { res => {
this.$message.error(res.data.message) this.countryList = res.data.data;
} },
}, err => {}) err => {}
}, );
getJycs() { },
this.apipost2('app_today_visit_GetCustomerPremisesEnum', {}, res => { //根据省份获取城市
if (res.data.resultCode == 1) { getProvinceList(ID, type) {
this.jycs = res.data.data let msg = {
} Id: ID
}, err => {}) };
},
GetCustomerLevelEnum(){
this.apipost('/api/Customer/GetCustomerLevelEnum', {}, res=>{
if (res.data.resultCode == 1) {
this.CustomerLevelEnum = res.data.data
}
})
},
GetCustomerSourceEnum(){
this.apipost('/api/Customer/GetCustomerSourceEnum', {}, res=>{
if (res.data.resultCode == 1) {
this.SourceEnum = res.data.data
}
})
},
getProvinceList2(ID, type) {
let msg = {
Id: ID
};
this.apipost2(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
} else if (type == 3) {
this.district = res.data.data;
}
},
err => {}
);
},
//获取国家
getCountryList() {
this.apipost2(
"dict_post_Destination_GetCountry", {},
res => {
this.countryList = res.data.data;
},
err => {}
);
},
//根据省份获取城市
getProvinceList(ID, type) {
let msg = {
Id: ID
};
if (type == 1) {
this.form.Province = "";
this.form.City = "";
this.form.District = "";
} else if (type == 2) {
this.form.City = "";
this.form.District = "";
} else if (type == 3) {
this.form.District = "";
}
if (this.QCountry !== "") {
this.apipost2(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) { if (type == 1) {
this.provinceList = res.data.data; this.form.Province = "";
this.form.City = "";
this.form.District = "";
} else if (type == 2) { } else if (type == 2) {
this.cityList = res.data.data; this.form.City = "";
this.form.District = "";
} else if (type == 3) { } else if (type == 3) {
this.district = res.data.data; this.form.District = "";
}
if (this.QCountry !== "") {
this.apipost2(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
} else if (type == 3) {
this.district = res.data.data;
}
},
err => {}
);
}
},
uploadImg(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath
this.form.Images.push(url);
});
},
uploadImg2(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath
this.form.BusinessCardPhotos.push(url);
});
},
uploadImg3(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath
this.form.HousePhotos.push(url);
});
},
showImg(i) {
let url = ''
if (i === 1) {
url = this.form.Images[0]
} else if (i === 2) {
url = this.form.BusinessCardPhotos[0]
} else if (i === 3) {
url = this.form.HousePhotos[0]
}
this.dialogImageUrl = url;
this.dialogVisible = true;
},
delImg(i) {
if (i === 1) {
this.form.Images = []
} else if (i === 2) {
this.form.BusinessCardPhotos = []
} else if (i === 3) {
this.form.HousePhotos = []
} }
}, },
err => {}
);
}
},
uploadImg(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath
this.form.Images.push(url);
});
},
uploadImg2(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath
this.form.BusinessCardPhotos.push(url);
});
},
uploadImg3(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath
this.form.HousePhotos.push(url);
});
},
showImg(i){
let url = ''
if (i === 1) {
url = this.form.Images[0]
} else if (i === 2) {
url = this.form.BusinessCardPhotos[0]
} else if (i === 3) {
url = this.form.HousePhotos[0]
}
this.dialogImageUrl = url;
this.dialogVisible = true;
},
delImg(i){
if (i === 1) {
this.form.Images = []
} else if (i === 2) {
this.form.BusinessCardPhotos = []
} else if (i === 3) {
this.form.HousePhotos = []
} }
}, }
}
}
</script> </script>
\ No newline at end of file
<style> <style>
@import '../../assets/css/customerManage.css'; @import '../../assets/css/customerManage.css';
.el-table__fixed-body-wrapper table {
.el-table__fixed-body-wrapper table{ padding-bottom: 8px!important;
padding-bottom: 8px!important; }
}
</style> </style>
<template> <template>
<div class="customerManage"> <div class="customerManage">
...@@ -117,234 +116,78 @@ ...@@ -117,234 +116,78 @@
width="120" width="120"
v-if="queryType[0].show" v-if="queryType[0].show"
show-overflow-tooltip> show-overflow-tooltip>
<template slot-scope="scope"> <template @click="openDetails(scope)" slot-scope="scope">
<p @click="openDetails(scope)" class="font-color-link cp">{{scope.row.GusetName}}</p> <p class="font-color-link cp">{{scope.row.GusetName}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="MobilePhone" label="手机号码" width="120" v-if="queryType[1].show" show-overflow-tooltip>
prop="MobilePhone" </el-table-column>
label="手机号码" <el-table-column prop="Address" label="地址" v-if="queryType[2].show" show-overflow-tooltip>
width="120" </el-table-column>
v-if="queryType[1].show" <el-table-column prop="CustomerSourceTypeStr" label="客户来源" v-if="queryType[3].show" show-overflow-tooltip>
show-overflow-tooltip> </el-table-column>
</el-table-column> <el-table-column prop="TraveNum" label="参团数" sortable v-if="queryType[4].show" show-overflow-tooltip>
<el-table-column </el-table-column>
prop="Address" <el-table-column prop="OrderCount" label="订单交易数" sortable v-if="queryType[24].show" show-overflow-tooltip>
label="地址" </el-table-column>
v-if="queryType[2].show" <el-table-column prop="OrderMoney" label="交易金额" sortable v-if="queryType[25].show" show-overflow-tooltip>
show-overflow-tooltip> </el-table-column>
</el-table-column> <el-table-column prop="BirthdayAddress" label="出生地点" sortable v-if="queryType[28].show" show-overflow-tooltip>
<el-table-column </el-table-column>
prop="CustomerSourceTypeStr" <el-table-column prop="AddressDetail" label="家庭详细地址" sortable v-if="queryType[27].show" show-overflow-tooltip>
label="客户来源" </el-table-column>
v-if="queryType[3].show" <el-table-column prop="HistoryRecord" label="出境记录" sortable v-if="queryType[26].show" show-overflow-tooltip>
show-overflow-tooltip> </el-table-column>
</el-table-column> <el-table-column prop="EconomicCapability" label="经济能力确认" sortable v-if="queryType[29].show" show-overflow-tooltip>
<el-table-column <template slot-scope="scope">
prop="TraveNum"
label="参团数"
sortable
v-if="queryType[4].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="OrderCount"
label="订单交易数"
sortable
v-if="queryType[24].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="OrderMoney"
label="交易金额"
sortable
v-if="queryType[25].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="BirthdayAddress"
label="出生地点"
sortable
v-if="queryType[28].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="AddressDetail"
label="家庭详细地址"
sortable
v-if="queryType[27].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="HistoryRecord"
label="出境记录"
sortable
v-if="queryType[26].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="EconomicCapability"
label="经济能力确认"
sortable
v-if="queryType[29].show"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-for="(item, index) in scope.row.EconomicCapability" :key="index">{{item.Value}}{{index === scope.row.EconomicCapability.length -1 ? '' : '、'}}</span> <span v-for="(item, index) in scope.row.EconomicCapability" :key="index">{{item.Value}}{{index === scope.row.EconomicCapability.length -1 ? '' : '、'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="IsRecommendStr" label="是否推存" sortable v-if="queryType[30].show" show-overflow-tooltip>
prop="IsRecommendStr" </el-table-column>
label="是否推存" <el-table-column prop="BusinessCount" label="商机数" sortable v-if="queryType[5].show" show-overflow-tooltip>
sortable </el-table-column>
v-if="queryType[30].show" <el-table-column prop="ScoreNum" label="总评分" sortable v-if="queryType[6].show" show-overflow-tooltip>
show-overflow-tooltip> </el-table-column>
</el-table-column> <el-table-column prop="Client_Balance" label="余额" sortable v-if="queryType[8].show" show-overflow-tooltip>
<el-table-column </el-table-column>
prop="BusinessCount" <el-table-column prop="Birthday" label="生日" width="120" sortable v-if="queryType[13].show" show-overflow-tooltip>
label="商机数" </el-table-column>
sortable <el-table-column prop="MarriageStr" label="是否结婚" sortable v-if="queryType[14].show" show-overflow-tooltip>
v-if="queryType[5].show" </el-table-column>
show-overflow-tooltip> <el-table-column prop=" Duty" label="职务" sortable v-if="queryType[15].show" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="IsHightSchool" label="是否高中生" sortable width="120" v-if="queryType[16].show" show-overflow-tooltip>
prop="ScoreNum" <template slot-scope="scope">
label="总评分"
sortable
v-if="queryType[6].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="Client_Balance"
label="余额"
sortable
v-if="queryType[8].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="Birthday"
label="生日"
width="120"
sortable
v-if="queryType[13].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="MarriageStr"
label="是否结婚"
sortable
v-if="queryType[14].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop=" Duty"
label="职务"
sortable
v-if="queryType[15].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="IsHightSchool"
label="是否高中生"
sortable
width="120"
v-if="queryType[16].show"
show-overflow-tooltip>
<template slot-scope="scope">
<p>{{scope.row.IsHightSchool === 1 ? '是': '否'}}</p> <p>{{scope.row.IsHightSchool === 1 ? '是': '否'}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop=" IdCard" label="身份证" sortable v-if="queryType[17].show" show-overflow-tooltip>
prop=" IdCard" </el-table-column>
label="身份证" <el-table-column prop="PassportNo" label="护照号" sortable v-if="queryType[18].show" show-overflow-tooltip>
sortable </el-table-column>
v-if="queryType[17].show" <el-table-column prop="PassportAddress" label="护照签发地" width="120" sortable v-if="queryType[19].show" show-overflow-tooltip>
show-overflow-tooltip> </el-table-column>
</el-table-column> <el-table-column prop="PassportIssuedStr" label="护照签发日期" width="120" sortable v-if="queryType[20].show" show-overflow-tooltip>
<el-table-column </el-table-column>
prop="PassportNo" <el-table-column prop="PassportExpiryStr" label="护照过期时间" width="120" sortable v-if="queryType[21].show" show-overflow-tooltip>
label="护照号" </el-table-column>
sortable <el-table-column prop="IssuingAuthority" label="签发机关" sortable v-if="queryType[22].show" show-overflow-tooltip>
v-if="queryType[18].show" </el-table-column>
show-overflow-tooltip> <el-table-column prop="CustomerLevelStr" label="客户等级" sortable v-if="false" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Remarks" label="备注" sortable v-if="queryType[23].show" show-overflow-tooltip>
prop="PassportAddress" </el-table-column>
label="护照签发地" <el-table-column prop="UpdateDate" label="最后更新时间" sortable v-if="queryType[9].show" show-overflow-tooltip>
width="120" </el-table-column>
sortable <el-table-column prop="PersonChargeStr" label="负责人" sortable v-if="queryType[10].show" show-overflow-tooltip>
v-if="queryType[19].show" </el-table-column>
show-overflow-tooltip> <el-table-column prop="CreateTimestr" label="创建时间" v-if="queryType[11].show" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="CreateByStr" label="创建人" v-if="queryType[12].show" width="120" show-overflow-tooltip>
prop="PassportIssuedStr" </el-table-column>
label="护照签发日期" <el-table-column prop="IsCarefor" fixed="right" width="50" label="关注">
width="120" <template slot-scope="scope">
sortable
v-if="queryType[20].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="PassportExpiryStr"
label="护照过期时间"
width="120"
sortable
v-if="queryType[21].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="IssuingAuthority"
label="签发机关"
sortable
v-if="queryType[22].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CustomerLevelStr"
label="客户等级"
sortable
v-if="false"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="Remarks"
label="备注"
sortable
v-if="queryType[23].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="UpdateDate"
label="最后更新时间"
sortable
v-if="queryType[9].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="PersonChargeStr"
label="负责人"
sortable
v-if="queryType[10].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CreateTimestr"
label="创建时间"
v-if="queryType[11].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CreateByStr"
label="创建人"
v-if="queryType[12].show"
width="120"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="IsCarefor"
fixed="right"
width="50"
label="关注">
<template slot-scope="scope">
<p> <p>
<el-tooltip class="item" effect="dark" content="关注" placement="top"> <el-tooltip class="item" effect="dark" content="关注" placement="top">
<i v-if="scope.row.IsCarefor === 0" @click="CareforCustomer(scope)" class="iconfont iconwujiaoxing cp"></i> <i v-if="scope.row.IsCarefor === 0" @click="CareforCustomer(scope)" class="iconfont iconwujiaoxing cp"></i>
...@@ -354,11 +197,9 @@ ...@@ -354,11 +197,9 @@
</el-tooltip> </el-tooltip>
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column width="40" fixed="right">
width="40" <template slot="header" slot-scope="scope">
fixed="right">
<template slot="header" slot-scope="scope">
<el-popover <el-popover
placement="bottom" placement="bottom"
width="240"> width="240">
...@@ -366,544 +207,502 @@ ...@@ -366,544 +207,502 @@
<i class="el-icon-s-operation cp" slot="reference"></i> <i class="el-icon-s-operation cp" slot="reference"></i>
</el-popover> </el-popover>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div> <div>
<el-pagination <el-pagination class="Mypagination" background @current-change="handleCurrentChange" :page-sizes="[30, 60, 90, 100]" :page-size="msg.pageSize" layout="sizes, prev, pager, next" @size-change="handleSizeChange" :total="total">
class="Mypagination" </el-pagination>
background </div>
@current-change="handleCurrentChange" <el-drawer :with-header="false" size='70%' :visible.sync="drawer" direction="rtl" :before-close="handleClose">
:page-sizes="[30, 60, 90, 100]" <customerInfoBox :CustomerId="CustomerId" @transferS="transfer" @editCustS="editCust" />
:page-size="msg.pageSize" </el-drawer>
layout="sizes, prev, pager, next" <div v-if="dialogTableVisible">
@size-change="handleSizeChange" <customerDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId" />
:total="total"> </div>
</el-pagination> <el-dialog :visible.sync="transferVisible" :close-on-click-modal="false" width="450px" custom-class="transfer-box add-box add-box2">
<div class="add-tit" slot="title">
<p><span></span>客户转移</p>
<span icon="el-icon-close"></span>
</div> </div>
<el-drawer <el-form :model="transferMsg" ref="form" class="MyEditForm">
:with-header="false" <div class="MyEditForm-item">
size='70%' <el-form-item label="变更负责人为" class="label-pad-left">
:visible.sync="drawer" <el-select filterable v-model="transferMsg.EmpId" placeholder="请选择">
direction="rtl" <el-option v-for="item in EmployeeList" :label='item.EmName' :value='item.EmployeeId' :key='item.EmployeeId'>
:before-close="handleClose"> </el-option>
<customerInfoBox :CustomerId="CustomerId" @transferS="transfer" @editCustS="editCust"/> </el-select>
</el-drawer> </el-form-item>
<div v-if="dialogTableVisible">
<customerDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId"/>
</div>
<el-dialog :visible.sync="transferVisible" :close-on-click-modal="false" width="450px" custom-class="transfer-box add-box add-box2">
<div class="add-tit" slot="title">
<p><span></span>客户转移</p>
<span icon="el-icon-close"></span>
</div>
<el-form :model="transferMsg" ref="form" class="MyEditForm" >
<div class="MyEditForm-item">
<el-form-item label="变更负责人为" class="label-pad-left">
<el-select
filterable
v-model="transferMsg.EmpId" placeholder="请选择">
<el-option
v-for="item in EmployeeList"
:label='item.EmName'
:value='item.EmployeeId'
:key='item.EmployeeId'>
</el-option>
</el-select>
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="transfer(2)">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="transferVisible = false">取 消</el-button>
</div> </div>
</el-dialog> </el-form>
</div> <div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="transfer(2)">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="transferVisible = false">取 消</el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import mySelect from "../dialogModel/select"; import mySelect from "../dialogModel/select";
import customerInfoBox from "./customerInfoBox"; import customerInfoBox from "./customerInfoBox";
import customerDialogBox from "./customerDialogBox"; import customerDialogBox from "./customerDialogBox";
export default { export default {
components: { components: {
mySelect, mySelect,
customerInfoBox, customerInfoBox,
customerDialogBox customerDialogBox
},
data() {
return {
queryType2: [
{
label: '客户名称',
show: true,
},{
label: '手机号码',
show: true,
},{
label: '地址',
show: true,
},{
label: '客户来源',
show: true,
},{
label: '参团数',
show: true,
}
,{
label: '商机数',
show: true,
},{
label: '总评分',
show: true,
},{
label: '客户等级',
show: true,
},{
label: '余额',
show: true,
},{
label: '最后更新时间',
show: true,
},{
label: '负责人',
show: true,
},{
label: '创建时间',
show: true,
},{
label: '创建人',
show: true,
},{
label: '生日',
show: true,
},{
label: '是否结婚',
show: true,
}
,{
label: '职务',
show: true,
}
,{
label: '是否高中生',
show: true,
}
,{
label: '身份证',
show: true,
}
,{
label: '护照号',
show: true,
}
,{
label: '护照签发地',
show: true,
}
,{
label: '护照签发日期',
show: true,
}
,{
label: '护照过期时间',
show: true,
}
,{
label: '签发机关',
show: true,
}
,{
label: '备注',
show: true,
},{
label: '订单交易数',
show: true,
},{
label: '订单金额',
show: true,
},{
label: '出境记录',
show: true,
},{
label: '家庭详细地址 ',
show: true,
},{
label: '出生地点',
show: true,
},{
label: '经济能力确认',
show: true,
},{
label: '是否推存',
show: true,
}
],
queryType: [
{
label: '客户名称',
show: true,
},{
label: '手机号码',
show: true,
},{
label: '地址',
show: true,
},{
label: '客户来源',
show: true,
},{
label: '参团数',
show: true,
},{
label: '商机数',
show: true,
},{
label: '总评分',
show: true,
},{
label: '客户等级',
show: true,
},{
label: '余额',
show: true,
},{
label: '最后更新时间',
show: true,
},{
label: '负责人',
show: true,
},{
label: '创建时间',
show: true,
},{
label: '创建人',
show: true,
},{
label: '生日',
show: true,
},{
label: '是否结婚',
show: true,
}
,{
label: '职务',
show: true,
}
,{
label: '是否高中生',
show: true,
}
,{
label: '身份证',
show: true,
}
,{
label: '护照号',
show: true,
}
,{
label: '护照签发地',
show: true,
}
,{
label: '护照签发日期',
show: true,
}
,{
label: '护照过期时间',
show: true,
}
,{
label: '签发机关',
show: true,
}
,{
label: '备注',
show: true,
},{
label: '订单交易数',
show: true,
},{
label: '订单金额',
show: true,
},{
label: '出境记录',
show: true,
},{
label: '家庭详细地址 ',
show: true,
},{
label: '出生地点',
show: true,
},{
label: '经济能力确认',
show: true,
},{
label: '是否推存',
show: true,
}
],
CustomerId: 0,
CustomerIdStr: '',
transferVisible: false,
mySelectCtrl: false,
drawer: false,
loading: true,
dialogTableVisible: false,
dialogTableVisibleName: '新建直客',
tableData: [],
multipleSelection: [],
EmployeeList: [],
value: '',
userInfo: {},
transferMsg: {
IDs: [],
EmpId: '',
}, },
msg: { data() {
GusetName: '', return {
pageIndex: 1, queryType2: [{
pageSize: 30, label: '客户名称',
ContactNumber: '', show: true,
WhereType: -1, }, {
OrderBy: '', label: '手机号码',
ID: 36 show: true,
}, {
label: '地址',
show: true,
}, {
label: '客户来源',
show: true,
}, {
label: '参团数',
show: true,
}, {
label: '商机数',
show: true,
}, {
label: '总评分',
show: true,
}, {
label: '客户等级',
show: true,
}, {
label: '余额',
show: true,
}, {
label: '最后更新时间',
show: true,
}, {
label: '负责人',
show: true,
}, {
label: '创建时间',
show: true,
}, {
label: '创建人',
show: true,
}, {
label: '生日',
show: true,
}, {
label: '是否结婚',
show: true,
}, {
label: '职务',
show: true,
}, {
label: '是否高中生',
show: true,
}, {
label: '身份证',
show: true,
}, {
label: '护照号',
show: true,
}, {
label: '护照签发地',
show: true,
}, {
label: '护照签发日期',
show: true,
}, {
label: '护照过期时间',
show: true,
}, {
label: '签发机关',
show: true,
}, {
label: '备注',
show: true,
}, {
label: '订单交易数',
show: true,
}, {
label: '订单金额',
show: true,
}, {
label: '出境记录',
show: true,
}, {
label: '家庭详细地址 ',
show: true,
}, {
label: '出生地点',
show: true,
}, {
label: '经济能力确认',
show: true,
}, {
label: '是否推存',
show: true,
}],
queryType: [{
label: '客户名称',
show: true,
}, {
label: '手机号码',
show: true,
}, {
label: '地址',
show: true,
}, {
label: '客户来源',
show: true,
}, {
label: '参团数',
show: true,
}, {
label: '商机数',
show: true,
}, {
label: '总评分',
show: true,
}, {
label: '客户等级',
show: true,
}, {
label: '余额',
show: true,
}, {
label: '最后更新时间',
show: true,
}, {
label: '负责人',
show: true,
}, {
label: '创建时间',
show: true,
}, {
label: '创建人',
show: true,
}, {
label: '生日',
show: true,
}, {
label: '是否结婚',
show: true,
}, {
label: '职务',
show: true,
}, {
label: '是否高中生',
show: true,
}, {
label: '身份证',
show: true,
}, {
label: '护照号',
show: true,
}, {
label: '护照签发地',
show: true,
}, {
label: '护照签发日期',
show: true,
}, {
label: '护照过期时间',
show: true,
}, {
label: '签发机关',
show: true,
}, {
label: '备注',
show: true,
}, {
label: '订单交易数',
show: true,
}, {
label: '订单金额',
show: true,
}, {
label: '出境记录',
show: true,
}, {
label: '家庭详细地址 ',
show: true,
}, {
label: '出生地点',
show: true,
}, {
label: '经济能力确认',
show: true,
}, {
label: '是否推存',
show: true,
}],
CustomerId: 0,
CustomerIdStr: '',
transferVisible: false,
mySelectCtrl: false,
drawer: false,
loading: true,
dialogTableVisible: false,
dialogTableVisibleName: '新建直客',
tableData: [],
multipleSelection: [],
EmployeeList: [],
value: '',
userInfo: {},
transferMsg: {
IDs: [],
EmpId: '',
},
msg: {
GusetName: '',
pageIndex: 1,
pageSize: 30,
ContactNumber: '',
WhereType: -1,
OrderBy: '',
ID: 36
},
total: 0,
WhereTypeList: [{
id: -1,
name: '全部'
}, {
id: 1,
name: '我负责的'
}, {
id: 2,
name: '下属的'
}, {
id: 3,
name: '我关注的'
}, ],
selectionList: [{
name: '转移',
class: 'iconfont iconplus-transfer',
myFun: this.transfer
}, {
name: '删除',
class: 'iconfont icondelete',
myFun: this.delete
}, ],
sceneList: [],
SceneEmployeeList: [],
sceneID: 36,
visible: false,
};
}, },
total: 0, mounted() {
WhereTypeList: [ this.userInfo = this.getLocalStorage();
{ console.log(this.queryType)
id: -1, this.getList()
name: '全部' this.Employee()
},{ let $this = this
id: 1, this.MsgBus.$on('closeCustomerDialogBox', function() {
name: '我负责的' $this.dialogTableVisible = false
},{ })
id: 2, this.GetSceneEmployeeList()
name: '下属的' this.MsgBus.$on('sceneSave', function(msg) {
},{ $this.sceneList = [...msg]
id: 3, $this.GetSceneEmployeeList()
name: '我关注的' let obj = {}
msg.forEach(element => {
obj[element.name] = element
});
$this.msg.Data = obj
$this.getList()
})
this.MsgBus.$on('editScene', function() {
console.log(1)
$this.GetSceneEmployeeList()
})
},
beforeDestroy() {
this.MsgBus.$off('sceneSave');
this.MsgBus.$off('editScene');
},
methods: {
handleCommand(command) {
this.$message.warning('功能正在开发中~');
}, },
], changeWhere(item) {
selectionList: [ this.msg.ID = item.ID
{ this.sceneID = item.ID
name: '转移', this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {}
class:'iconfont iconplus-transfer', this.msg.WhereType = item.WhereType
myFun: this.transfer this.visible = false
},{ this.getList()
name: '删除',
class:'iconfont icondelete',
myFun: this.delete
}, },
], GetSceneEmployeeList() {
sceneList: [], this.apipost('/api/Scene/GetSceneEmployeeList', {
SceneEmployeeList: [], LableType: 5
sceneID: 36, }, res => {
visible: false, if (res.data.resultCode == 1) {
}; this.SceneEmployeeList = res.data.data
}, }
mounted() { })
this.userInfo = this.getLocalStorage(); },
console.log(this.queryType) deleteScene(index) {
this.getList() this.sceneList.splice(index, 1)
this.Employee() let obj = {}
let $this = this this.sceneList.forEach(element => {
this.MsgBus.$on('closeCustomerDialogBox', function (){ obj[element.name] = element
$this.dialogTableVisible = false });
}) this.msg.Data = obj
this.GetSceneEmployeeList()
this.MsgBus.$on('sceneSave', function (msg){
$this.sceneList = [...msg]
$this.GetSceneEmployeeList()
let obj = {}
msg.forEach(element => {
obj[element.name] = element
});
$this.msg.Data = obj
$this.getList()
})
this.MsgBus.$on('editScene', function (){
console.log(1)
$this.GetSceneEmployeeList()
})
},beforeDestroy() {
this.MsgBus.$off('sceneSave');
this.MsgBus.$off('editScene');
},
methods: {
handleCommand(command){
this.$message.warning('功能正在开发中~');
},
changeWhere(item){
this.msg.ID = item.ID
this.sceneID = item.ID
this.msg.Data = item.WhereData ? JSON.parse(item.WhereData) : {}
this.msg.WhereType = item.WhereType
this.visible = false
this.getList()
},
GetSceneEmployeeList(){
this.apipost('/api/Scene/GetSceneEmployeeList', {LableType: 5}, res=>{
if (res.data.resultCode == 1) {
this.SceneEmployeeList = res.data.data
}
})
},
deleteScene(index){
this.sceneList.splice(index, 1)
let obj = {}
this.sceneList.forEach(element => {
obj[element.name] = element
});
this.msg.Data = obj
this.getList()
},
getMarriageStr(type){
if (type === 5) return '其他'
if (type === 4) return '丧偶'
if (type === 3) return '未婚'
if (type === 2) return '离婚'
if (type === 1) return '已婚'
if (type === 0) return '无'
},
Employee(){
let msg = {
RB_Group_id: this.userInfo.RB_Group_id,
BranchId:-1,
DepartmentId:0,
PostId:0,
IsLeave:0,
}
this.apipost2(
"admin_get_EmployeeGetList",
this.msg,
res => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} else {
}
},
err => {}
);
},
//锁定
locking(){
console.log('锁定')
},
//解锁
Unlock(){
console.log('解锁')
},
//删除团队成员
delCust(){
console.log('删除团队成员')
},
//删除
delete(){
console.log('删除')
},
//导出
export(){
console.log('导出')
},
// 更改状态
changeState(){
console.log('更改状态')
},
// 关注
CareforCustomer(scope){
this.apipost('/api/Customer/CareforGuesstCustomer', {ID: scope.row.ID}, res=>{
if (res.data.resultCode == 1) {
this.$message.success('操作成功');
this.getList() this.getList()
} },
}) getMarriageStr(type) {
}, if (type === 5) return '其他'
// 转移 if (type === 4) return '丧偶'
transfer(type){ if (type === 3) return '未婚'
if (type !== 2) { if (type === 2) return '离婚'
if (type === 3) { if (type === 1) return '已婚'
this.multipleSelection.push(this.CustomerId) if (type === 0) return '无'
} },
this.transferVisible = true Employee() {
} else { let msg = {
if (this.transferMsg.EmpId === '') { RB_Group_id: this.userInfo.RB_Group_id,
return this.$message.error('请选择变更负责人!') BranchId: -1,
} DepartmentId: 0,
let str = '' PostId: 0,
this.multipleSelection.map((x, i)=>{ IsLeave: 0,
str = str + x + ',' }
}) this.apipost2(
this.transferMsg.IDs = str.substring(0, str.length - 1) "admin_get_EmployeeGetList",
this.apipost('/api/Customer/TransferGuesstCustomer', this.transferMsg, res=>{ this.msg,
if (res.data.resultCode == 1) { res => {
this.multipleSelection = [] if (res.data.resultCode == 1) {
this.transferVisible = false this.EmployeeList = res.data.data;
if (type === 3) {} { } else {}
this.drawer = false },
err => {}
);
},
//锁定
locking() {
console.log('锁定')
},
//解锁
Unlock() {
console.log('解锁')
},
//删除团队成员
delCust() {
console.log('删除团队成员')
},
//删除
delete() {
console.log('删除')
},
//导出
export () {
console.log('导出')
},
// 更改状态
changeState() {
console.log('更改状态')
},
// 关注
CareforCustomer(scope) {
this.apipost('/api/Customer/CareforGuesstCustomer', {
ID: scope.row.ID
}, res => {
if (res.data.resultCode == 1) {
this.$message.success('操作成功');
this.getList()
} }
this.$message.success(res.data.message); })
this.getList() },
this.transferMsg = { // 转移
IDs: [], transfer(type) {
EmpId: '' if (type !== 2) {
if (type === 3) {
this.multipleSelection.push(this.CustomerId)
}
this.transferVisible = true
} else {
if (this.transferMsg.EmpId === '') {
return this.$message.error('请选择变更负责人!')
} }
let str = ''
this.multipleSelection.map((x, i) => {
str = str + x + ','
})
this.transferMsg.IDs = str.substring(0, str.length - 1)
this.apipost('/api/Customer/TransferGuesstCustomer', this.transferMsg, res => {
if (res.data.resultCode == 1) {
this.multipleSelection = []
this.transferVisible = false
if (type === 3) {} {
this.drawer = false
}
this.$message.success(res.data.message);
this.getList()
this.transferMsg = {
IDs: [],
EmpId: ''
}
}
})
} }
}) console.log('转移')
} },
console.log('转移') showMessageFromChild(list) {
}, this.mySelectCtrl = !this.mySelectCtrl
showMessageFromChild(list){ if (list) {
this.mySelectCtrl=!this.mySelectCtrl this.queryType = list
if (list) { this.getList()
this.queryType = list }
this.getList() },
} editCust() {
}, this.dialogTableVisibleName = '修改直客'
editCust(){ this.dialogTableVisible = true
this.dialogTableVisibleName = '修改直客' },
this.dialogTableVisible = true openDetails(scope) {
}, this.drawer = true
openDetails(scope){ this.CustomerId = scope.row.ID
this.drawer = true this.CustomerName = scope.row.GusetName
this.CustomerId = scope.row.ID },
this.CustomerName = scope.row.GusetName handleSizeChange(val) {
}, this.msg.pageSize = val
handleSizeChange(val) { this.getList();
this.msg.pageSize = val },
this.getList(); handleCurrentChange(val) {
}, this.msg.pageIndex = val;
handleCurrentChange(val) { this.getList();
this.msg.pageIndex = val; },
this.getList(); handleClose(done) {
}, done();
handleClose(done) { },
done(); getList: function() {
}, this.tableData = []
getList: function (){ this.loading = true
this.tableData = [] this.apipost('/api/Customer/GetGuesstCustomerPageList', this.msg, res => {
this.loading = true if (res.data.resultCode == 1) {
this.apipost('/api/Customer/GetGuesstCustomerPageList', this.msg, res=>{ this.tableData = res.data.data.pageData;
if (res.data.resultCode == 1) { this.tableData.map(x => {
this.tableData = res.data.data.pageData; if (x.EconomicCapability) {
this.tableData.map(x=>{ x.EconomicCapability = JSON.parse(x.EconomicCapability)
if(x.EconomicCapability){ } else {
x.EconomicCapability = JSON.parse(x.EconomicCapability)} x.EconomicCapability = [];
else{ }
x.EconomicCapability = []; })
this.total = res.data.data.count;
this.loading = false;
} }
}) })
this.total = res.data.data.count; },
this.loading = false; handleSelectionChange(val) {
this.multipleSelection = val.map(x =>
x.ID
)
} }
}) }
}, };
handleSelectionChange(val) { </script>
this.multipleSelection = val.map(x=> \ No newline at end of file
x.ID
)
}
}
};
</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