Commit c9c5d6e6 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/huaguohao/crm

# Conflicts:
#	src/components/clueManagement/guestDialogBox.vue
#	src/plugins/index.js
#	vue.config.js
#	yarn.lock
parents 5fa56f7b 2be1b4bf
<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 {
.customerDialogBox.add-box .add-tit p {
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: bold; font-weight: bold;
color: rgba(17, 17, 17, 1); color: rgba(17, 17, 17, 1);
font-size: 14px; font-size: 14px;
} }
.customerDialogBox.add-box .add-tit p span {
.customerDialogBox.add-box .add-tit p span {
display: inline-block; display: inline-block;
width: 6px; width: 6px;
height: 6px; height: 6px;
background: #409efe; background: rgba(13, 36, 129, 1);
border-radius: 50%; border-radius: 50%;
margin-right: 10px; margin-right: 10px;
} }
.customerDialogBox.add-box .el-dialog__header {
.customerDialogBox.add-box .el-dialog__header {
padding: 15px 20px; padding: 15px 20px;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
} }
.customerDialogBox.add-box .dialog-footer {
.customerDialogBox.add-box .dialog-footer {
text-align: center; text-align: center;
background-color: rgba(248, 250, 251, 1); background-color: rgba(248, 250, 251, 1);
padding-bottom: 20px; padding-bottom: 20px;
} }
.customerDialogBox.add-box .el-dialog__footer {
.customerDialogBox.add-box .el-dialog__footer {
padding: 0; padding: 0;
} }
.customerDialogBox.add-box .el-dialog__body {
.customerDialogBox.add-box .el-dialog__body {
background-color: rgba(248, 250, 251, 1); background-color: rgba(248, 250, 251, 1);
padding-top: 20px; padding-top: 20px;
max-height: 500px; max-height: 500px;
overflow: auto; overflow: auto;
} }
.customerDialogBox .add-box-btn.el-button {
.customerDialogBox .add-box-btn.el-button {
border-radius: 0; border-radius: 0;
background-color: #409efecc; background-color: rgba(13, 36, 129, .8);
border-color: #409efecc; border-color: rgba(13, 36, 129, .8);
color: white; color: white;
padding: 12px 43px; padding: 12px 43px;
} }
.customerDialogBox .add-box-btn.el-button:hover {
background-color: #409efe; .customerDialogBox .add-box-btn.el-button:hover {
border-color: #409efe; background-color: rgba(13, 36, 129, 1);
border-color: rgba(13, 36, 129, 1);
color: white; color: white;
} }
.customerDialogBox .add-box-btn.el-button.add-box-cancel {
color: #409efecc; .customerDialogBox .add-box-btn.el-button.add-box-cancel {
color: rgba(13, 36, 129, .8);
background-color: white; background-color: white;
} }
.customerDialogBox .add-box-btn.el-button.add-box-cancel:hover {
color: #409efe; .customerDialogBox .add-box-btn.el-button.add-box-cancel:hover {
color: rgba(13, 36, 129, 1);
background-color: white; background-color: white;
} }
.customerDialogBox .el-input .el-input-group__append {
background-color: #409efe; .customerDialogBox .el-input .el-input-group__append {
border-color: #409efe; background-color: rgba(13, 36, 129, 1);
border-color: rgba(13, 36, 129, 1);
color: #fff; color: #fff;
} }
.customerDialogBox .form-box .form-box-tit {
.customerDialogBox .form-box .form-box-tit {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
.customerDialogBox .form-box .radius {
.customerDialogBox .form-box .radius {
display: flex; display: flex;
width: 4px; width: 4px;
height: 4px; height: 4px;
background: rgba(255, 164, 117, 1); background: rgba(255, 164, 117, 1);
border-radius: 50%; border-radius: 50%;
margin-right: 10px; margin-right: 10px;
} }
.customerDialogBox .up-img-box .uib-item {
.customerDialogBox .up-img-box .uib-item {
margin-right: 30px; margin-right: 30px;
width: 120px; width: 120px;
height: 120px; height: 120px;
background-color: white; background-color: white;
position: relative; position: relative;
margin-bottom: 30px; margin-bottom: 30px;
} }
.customerDialogBox .up-img-box .uib-item p {
.customerDialogBox .up-img-box .uib-item p {
position: absolute; position: absolute;
bottom: -30px; bottom: -30px;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
width: 100%; width: 100%;
} }
.customerDialogBox .up-img-box .uib-item:hover .imgzhe-btn {
opacity: 1; .customerDialogBox .up-img-box .uib-item:hover .imgzhe-btn {
} opacity: 1
.customerDialogBox .imgzhe { }
.customerDialogBox .imgzhe {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
top: 0; top: 0;
} }
.customerDialogBox .imgzhe .imgzhe-btn {
.customerDialogBox .imgzhe .imgzhe-btn {
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -109,42 +127,48 @@ ...@@ -109,42 +127,48 @@
position: absolute; position: absolute;
top: 0; top: 0;
opacity: 1; opacity: 1;
transition: all linear 0.5s; transition: all linear .5s
} }
.customerDialogBox .imgzhe .imgzhe-btn i {
.customerDialogBox .imgzhe .imgzhe-btn i {
font-size: 22px; font-size: 22px;
margin-right: 5px; margin-right: 5px;
color: white; color: white;
cursor: pointer; cursor: pointer;
} }
.customerDialogBox .up-ctrl {
.customerDialogBox .up-ctrl {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.customerDialogBox .up-ctrl > div {
.customerDialogBox .up-ctrl>div {
width: 100%; width: 100%;
height: 100%; height: 100%;
text-align: center; text-align: center;
line-height: 140px; line-height: 140px;
} }
.MyEditForm-item-checkd.MyEditForm-item .el-form-item {
.MyEditForm-item-checkd.MyEditForm-item .el-form-item {
width: 80%; width: 80%;
} }
.MyEditForm-item-checkd .el-checkbox {
.MyEditForm-item-checkd .el-checkbox {
position: absolute; position: absolute;
right: -50px; right: -50px;
top: 10px; top: 10px;
} }
._addPassengerEconomicCapability {
._addPassengerEconomicCapability {
line-height: 22px; line-height: 22px;
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
} }
._addPassengerEconomicCapability span { ._addPassengerEconomicCapability span {
display: inline-block; display: inline-block;
padding: 2px 4px; padding: 2px 4px;
border: 1px solid #c0c4cc; border: 1px solid #c0c4cc;
...@@ -153,15 +177,33 @@ ...@@ -153,15 +177,33 @@
color: #c0c4cc; color: #c0c4cc;
font-size: 12px; font-size: 12px;
border-radius: 4px; border-radius: 4px;
} }
._addPassengerEconomicCapability span._active { ._addPassengerEconomicCapability span._active {
border: 1px solid rgb(123, 194, 245); border: 1px solid rgb(123, 194, 245);
color: rgb(123, 194, 245); color: rgb(123, 194, 245);
} }
.el-collapse-item__wrap {
background-color: rgba(248, 250, 251, 1);
}
.el-col .el-col-8 {
width: 31% !important;
margin-right: 15px;
}
.el-collapse-item__header {
padding-left: 10px;
}
.el-collapse-item__wrap {
padding-top: 15px;
}
</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>
...@@ -171,28 +213,114 @@ ...@@ -171,28 +213,114 @@
<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 label-pad-left">
<el-form-item label="名称" prop="ClueName ">
<el-input placeholder="请填写名称" v-model="form.ClueName "></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="需求" prop="ClueDemand ">
<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="WeChatNo">
<el-input placeholder="请输入微信号" v-model="form.WeChatNo"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="手机号码" prop="MobilePhone">
<el-input placeholder="请输入手机号码" v-model="form.MobilePhone"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="客户来源" prop="CustomerSourceType">
<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>
</div>
</el-col>
<el-col :span="8" v-if="form.CustomerSourceType === 6">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="客户来源信息" prop="CustomerSource">
<el-input type="textarea" placeholder="请输入客户来源信息" v-model="form.CustomerSource">
</el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8" v-if="form.CustomerSourceType === 7">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="来源细分" prop="SourceAccount">
<el-select placeholder="请选择来源途径" v-model="form.SourceAccount">
<el-option v-for="item in SourceSegmentList" :key="item.ID" :label="item.Name"
:value="item.ID"></el-option>
</el-select>
</el-form-item>
</div>
</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 class="_addPassengerEconomicCapability">
<span v-for="(item, index) in EconomicCapabilityS" :key="index" @click="addEconomicCapability(item)" :class="{_active:item.isShow}">{{item.Name}}</span>
</div>
</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-col :span="8">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="身份证号码" prop="IdCard"> <el-form-item label="身份证号码" prop="IdCard">
<el-input placeholder="请输入客户身份证号码" v-model="form.IdCard"></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 label-pad-left">
<el-form-item label="中文姓" prop="SurName"> <el-form-item label="中文姓" prop="SurName">
<el-input placeholder="请输入中文姓" v-model="form.SurName" @input="Transformation(form.SurName,'SurName')"></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"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item label-pad-left">
<el-form-item label="中文名" prop="Name"> <el-form-item label="中文名" prop="Name">
<el-input placeholder="请输入中文名" v-model="form.Name" @input="Transformation(form.Name,'Name')"></el-input> <el-input placeholder="请输入中文名" v-model="form.Name" @input="Transformation(form.Name,'Name')"></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 label-pad-left">
<el-form-item label="性别" prop="Sex"> <el-form-item label="性别" prop="Sex">
<el-select v-model="form.Sex"> <el-select v-model="form.Sex">
<el-option :key="0" label="保密" :value="0"></el-option> <el-option :key="0" label="保密" :value="0"></el-option>
...@@ -203,35 +331,23 @@ ...@@ -203,35 +331,23 @@
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item label-pad-left">
<el-form-item label="英文姓" prop="ESurName"> <el-form-item label="英文姓" prop="ESurName">
<el-input placeholder="请输入英文姓" v-model="form.ESurName"></el-input> <el-input placeholder="请输入英文姓" v-model="form.ESurName"></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 label-pad-left">
<el-form-item label="英文名" prop="EName"> <el-form-item label="英文名" prop="EName">
<el-input placeholder="请输入英文名" v-model="form.EName"></el-input> <el-input placeholder="请输入英文名" v-model="form.EName"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="手机号码" prop="MobilePhone">
<el-input placeholder="请输入手机号码" v-model="form.MobilePhone"></el-input>
</el-form-item>
</div>
</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="生日"> <el-form-item label="生日">
<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.Birthday"
type="date"
placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
...@@ -260,12 +376,7 @@ ...@@ -260,12 +376,7 @@
<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="护照签发日期"> <el-form-item label="护照签发日期">
<el-date-picker <el-date-picker :clearable="false" value-format="yyyy-MM-dd HH:mm:ss" v-model="form.PassportIssued" 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>
...@@ -273,26 +384,16 @@ ...@@ -273,26 +384,16 @@
<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="护照过期日"> <el-form-item label="护照过期日">
<el-date-picker <el-date-picker :clearable="false" value-format="yyyy-MM-dd HH:mm:ss" v-model="form.PassportExpiry" type="date" placeholder="选择日期">
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="form.PassportExpiry"
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 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,12 +440,13 @@ ...@@ -339,12 +440,13 @@
<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-checkbox>
</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 label-pad-left">
<el-form-item label="职务" prop="Duty"> <el-form-item label="职务" prop="Duty">
<el-select v-model="form.Duty" filterable> <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-option v-for="item in VisaDutyTypeEnum" :key="item.Id" :label="item.Name" :value="item.Name"></el-option>
...@@ -354,40 +456,33 @@ ...@@ -354,40 +456,33 @@
</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="备注">
<el-input type="textarea" placeholder="客户的特殊喜好" v-model="form.Remarks"></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<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>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item label-pad-left">
<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>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item label-pad-left">
<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>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item label-pad-left">
<el-form-item label="高校学生"> <el-form-item label="高校学生">
<el-select v-model="form.IsHightSchool"> <el-select v-model="form.IsHightSchool">
<el-option :key="1" label="是" :value="1"></el-option> <el-option :key="1" label="是" :value="1"></el-option>
...@@ -396,83 +491,54 @@ ...@@ -396,83 +491,54 @@
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="客户来源" prop="CustomerSourceType">
<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>
</div>
</el-col>
<el-col :span="16" v-if="form.CustomerSourceType === 6">
<div class="MyEditForm-item">
<el-form-item label="客户来源信息" prop="CustomerSource">
<el-input type="textarea" placeholder="请输入客户来源信息" v-model="form.CustomerSource"></el-input>
</el-form-item>
</div>
</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-form> </el-form>
<div class="_addPassengerEconomicCapability">
<span v-for="(item, index) in EconomicCapabilityS" :key="index" @click="addEconomicCapability(item)" </el-collapse-item>
:class="{_active:item.isShow}">{{item.Name}}</span> </el-collapse>
</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> <el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('form')">取 消
</div> </el-button>
<el-dialog :visible.sync="dialogVisible"> </div>
<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() { data() {
let checkPhone = (rule, value, callback) => { let checkPhone = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error("手机号不能为空")); return callback(new Error('手机号不能为空'));
} else { } else {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/; const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
if (reg.test(value)) { if (reg.test(value)) {
callback(); callback();
} else { } else {
return callback(new Error("请输入正确的手机号")); return callback(new Error('请输入正确的手机号'));
}
} }
} }
};
return { return {
dialogTableVisible: false, dialogTableVisible: false,
SourceEnum: [], SourceEnum: [],
countryList: "", countryList: "",
provinceList: "", provinceList: "",
dialogImageUrl: "", dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
cityList: "", cityList: "",
district: "", district: "",
...@@ -480,38 +546,44 @@ export default { ...@@ -480,38 +546,44 @@ export default {
fileList: [], fileList: [],
CustomerLevelEnum: [], CustomerLevelEnum: [],
CustomerBrandList: [], CustomerBrandList: [],
activeNames: ['3'],
form: { form: {
Id: 0, Id: 0,
SurName: "", SurName: '',
Name: "", Name: '',
Sex: "", Sex: '',
EName: "", EName: '',
ESurName: "", ESurName: '',
Birthday: "", Birthday: '',
BirthdayAddress: "", BirthdayAddress: '',
PassportAddress: "", PassportAddress: '',
PassportExpiry: "", PassportExpiry: '',
PassportNo: "", PassportNo: '',
Nationality: "", Nationality: '',
Marriage: "", Marriage: '',
Address: "", Address: '',
AddressDetail: "", AddressDetail: '',
HistoryRecord: "", HistoryRecord: '',
IdentityType: "", IdentityType: '',
Duty: "", Duty: '',
EconomicCapabilityList: [], EconomicCapabilityList: [],
Remarks: "", Remarks: '',
TravelType: "", TravelType: '',
UnitType: "", UnitType: '',
DutyType: "", DutyType: '',
IsHightSchool: "", IsHightSchool: '',
IsRecommend: "", IsRecommend: '',
PassportIssued: "", PassportIssued: '',
IssuingAuthority: "", IssuingAuthority: '',
IdCard: "", IdCard: '',
MobilePhone: "", MobilePhone: '',
CustomerSourceType: "", CustomerSourceType: '',
CustomerSource: "", CustomerSource: '',
ClueName: '',
ClueDemand: '',
WeChatNo: '',
SourceAccount: '',
}, },
VisaIdentityTypeEnum: [], VisaIdentityTypeEnum: [],
VisaDeparturesType: [], VisaDeparturesType: [],
...@@ -520,287 +592,293 @@ export default { ...@@ -520,287 +592,293 @@ export default {
DutyTypeList: [], DutyTypeList: [],
UnitTypeList: [], UnitTypeList: [],
rules: { rules: {
DutyType: [ /* DutyType: [{
{ required: true, message: "请选择职务类型", trigger: "change" }, required: true,
], message: '请选择职务类型',
UnitType: [ trigger: 'change'
{ required: true, message: "请选择单位类型", trigger: "change" }, }],
], UnitType: [{
TravelType: [ required: true,
{ required: true, message: "请选择出游类型", trigger: "change" }, message: '请选择单位类型',
], trigger: 'change'
IdCard: [ }],
{ TravelType: [{
required: true,
message: '请选择出游类型',
trigger: 'change'
}],
IdCard: [{
required: true, required: true,
message: "请填身份证号码", message: "请填身份证号码",
trigger: "blur", trigger: "blur"
}, }],
], SurName: [{
SurName: [
{
required: true, required: true,
message: "请填写中文姓", message: "请填写中文姓",
trigger: "blur", trigger: "blur"
}, }],
], Name: [{
Name: [
{
required: true, required: true,
message: "请填写中文名", message: "请填写中文名",
trigger: "blur", trigger: "blur"
}, }],
], Sex: [{
Sex: [
{
required: true, required: true,
message: "请填选择性别", message: "请填选择性别",
trigger: "change", trigger: "change"
}, }],
], ESurName: [{
ESurName: [
{
required: true, required: true,
message: "请填写英文姓", message: "请填写英文姓",
trigger: "blur", trigger: "blur"
}, }, {
{
pattern: /^[a-zA-Z]/, pattern: /^[a-zA-Z]/,
message: "请输入英文姓", message: "请输入英文姓"
}, }],
], EName: [{
EName: [
{
required: true, required: true,
message: "请填写英文名", message: "请填写英文名",
trigger: "blur", trigger: "blur"
}, }, {
{
pattern: /^[a-zA-Z]/, pattern: /^[a-zA-Z]/,
message: "请输入英文姓", message: "请输入英文姓"
}, }],
], Birthday: [{
Birthday: [
{
required: true, required: true,
message: "请填选择出生日期", message: "请填选择出生日期",
trigger: "blur", trigger: "blur"
}, }],
], PassportNo: [{
PassportNo: [
{
required: true, required: true,
message: "请填写护照号", message: "请填写护照号",
trigger: "blur", trigger: "blur"
}, }, {
{
pattern: /^[0-9a-zA-Z]+$/, pattern: /^[0-9a-zA-Z]+$/,
message: "正确的护照号", message: "正确的护照号"
}, }],
], PassportIssued: [{
PassportIssued: [
{
required: true, required: true,
message: "请选择签发日期", message: "请选择签发日期",
trigger: "blur", trigger: "blur"
}, }],
], PassportExpiry: [{
PassportExpiry: [
{
required: true, required: true,
message: "请选择过期日", message: "请选择过期日",
trigger: "blur", trigger: "blur"
}, }],
], AddressDetail: [{
AddressDetail: [
{
required: true, required: true,
message: "请输入详细地址", message: "请输入详细地址",
trigger: "blur", trigger: "blur"
}, }],
], Address: [{
Address: [
{
required: true, required: true,
message: "请输入家庭居住地", message: "请输入家庭居住地",
trigger: "blur", trigger: "blur"
}, }],
], PassportAddress: [{
PassportAddress: [
{
required: true, required: true,
message: "请填写签发地", message: "请填写签发地",
trigger: "blur", trigger: "blur"
}, }],
], MobilePhone: [{
MobilePhone: [{ validator: checkPhone, trigger: "blur" }], validator: checkPhone,
Nationality: [ trigger: 'blur'
{ }],
Nationality: [{
required: true, required: true,
message: "请选择国籍", message: "请选择国籍",
trigger: "change", trigger: "change"
}, }],
], BirthdayAddress: [{
BirthdayAddress: [
{
required: true, required: true,
message: "请填写出生地", message: "请填写出生地",
trigger: "change", trigger: "change"
}, }],
], IdentityType: [{
IdentityType: [
{
required: true, required: true,
message: "请选择身份确认", message: "请选择身份确认",
trigger: "change", trigger: "change"
}, }],
], HistoryRecord: [{
HistoryRecord: [
{
required: true, required: true,
message: "请选择出境记录", message: "请选择出境记录",
trigger: "change", trigger: "change"
}, }],
], Duty: [{
Duty: [
{
required: true, required: true,
message: "请选择职务", message: "请选择职务",
trigger: "change", trigger: "change"
}, }],
], Marriage: [{
Marriage: [
{
required: true, required: true,
message: "请选择婚姻", message: "请选择婚姻",
trigger: "change", trigger: "change"
}, }], */
], ClueName: [{
CustomerSource: [ required: true,
{ required: true, message: "请输入客户来源信息", trigger: "blur" }, 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'
}],
CustomerSource: [{
required: true,
message: '请输入客户来源信息',
trigger: 'blur'
}],
CustomerSourceType: [{
required: true,
message: '请选择客户来源',
trigger: 'change'
}],
SourceAccount: [{
required: true,
message: '请选择你的来源',
trigger: 'change'
}]
}, },
show: true, show: true,
CustomerList: [], CustomerList: [],
EconomicCapabilityS: [], EconomicCapabilityS: [],
// 小红书
SourceSegmentList: [],
}; };
}, },
watch: { watch: {
CustomerId: { CustomerId: {
handler(val, oldVal) { handler(val, oldVal) {
console.log(val); console.log(val)
},
deep: true,
}, },
deep: true
}
}, },
mounted() { mounted() {
this.GetCustomerLevelEnum(); this.GetCustomerLevelEnum()
this.getJycs(); this.getJycs()
this.getCustomerBrandList(); this.getCustomerBrandList()
this.getCountryList(); this.getCountryList()
this.GetCustomerSourceEnum(); this.GetCustomerSourceEnum()
this.getCustomerList(); this.getCustomerList()
this.getVisaIdentityTypeEnum(); this.getVisaIdentityTypeEnum()
this.getVisaDeparturesType(); this.getVisaDeparturesType()
this.getVisaDutyTypeEnum(); this.getVisaDutyTypeEnum()
this.getTravelType(); this.getTravelType()
this.getUnitType(); this.getUnitType()
this.getDutyType(); this.getDutyType()
this.getEconomicCapability(); this.getEconomicCapability()
let $this = this; this.getSourceSegmentList()
let $this = this
setTimeout(() => { setTimeout(() => {
$this.dialogTableVisible = true; $this.dialogTableVisible = true
}, 50); }, 50)
if (this.CustomerId !== 0) { if (this.CustomerId !== 0) {
this.apipost( this.apipost('/api/Customer/GetAllGuesstCustomerModel', {
"/api/Customer/GetAllGuesstCustomerModel", ID: this.CustomerId
{ ID: this.CustomerId }, }, res => {
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data; let data = res.data.data
if (!data.HousePhotos) { if (!data.HousePhotos) {
data.HousePhotos = []; data.HousePhotos = []
} }
if (!data.BusinessCardPhotos) { if (!data.BusinessCardPhotos) {
data.BusinessCardPhotos = []; data.BusinessCardPhotos = []
} }
if (!data.Images) { if (!data.Images) {
data.Images = []; data.Images = []
} }
if (!data.CustomerSourceType) { if (!data.CustomerSourceType) {
data.CustomerSourceType = ""; data.CustomerSourceType = ''
} }
if (!data.CustomerSource) { if (!data.CustomerSource) {
data.CustomerSource = ""; data.CustomerSource = ''
} }
if (!data.Province) { if (!data.Province) {
data.Province = ""; data.Province = ''
} }
if (!data.Country) { if (!data.Country) {
data.Country = ""; data.Country = ''
} }
if (!data.City) { if (!data.City) {
data.City = ""; data.City = ''
} }
if (!data.District) { if (!data.District) {
data.District = ""; data.District = ''
} }
if (data.Country) { if (data.Country) {
this.getProvinceList2(data.Country, 1); this.getProvinceList2(data.Country, 1)
} }
if (data.Province) { if (data.Province) {
this.getProvinceList2(data.Province, 2); this.getProvinceList2(data.Province, 2)
} }
if (data.City) { if (data.City) {
this.getProvinceList2(data.City, 3); this.getProvinceList2(data.City, 3)
} }
this.form = data; this.form = data
} }
} })
);
} }
}, },
/* /api/Customer/GetGuestSourceAccountList */
methods: { methods: {
handleChange(val) {
console.log(val);
},
Transformation(val, type) { Transformation(val, type) {
let text = this.pinyin(val, { let text = this.pinyin(val, {
style: this.pinyin.STYLE_NORMAL, style: this.pinyin.STYLE_NORMAL
}); });
if (type == "SurName") { if (type == "SurName") {
let upText = text.join("").toLocaleUpperCase(); let upText = text.join("").toLocaleUpperCase()
this.form.ESurName = upText; this.form.ESurName = upText;
} }
if (type == "Name") { if (type == "Name") {
let upText = text.join("").toLocaleUpperCase(); let upText = text.join("").toLocaleUpperCase()
this.form.EName = upText; this.form.EName = upText;
} }
}, },
getEconomicCapability() { getEconomicCapability() {
//获取经济能力 //获取经济能力
this.apipost2( this.apipost2(
"dict_post_GetList", "dict_post_GetList", {
{
Key: "SK_Visa_EconomicCapability", Key: "SK_Visa_EconomicCapability",
IsTimer: 1, IsTimer: 1
}, },
(res) => { res => {
this.EconomicCapabilityS = res.data.data; this.EconomicCapabilityS = res.data.data;
if (this.CustomerId != 0) { if (this.CustomerId != 0) {
this.form.Id = this.CustomerId; this.form.Id = this.CustomerId;
this.apipost( this.apipost('/api/Customer/GetAllGuesstCustomerModel', {
"/api/Customer/GetAllGuesstCustomerModel", ID: this.CustomerId
{ ID: this.CustomerId }, }, res => {
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let obj = res.data.data; let obj = res.data.data;
obj.TravelType = obj.TravelType.toString(); obj.TravelType = obj.TravelType.toString()
obj.UnitType = obj.UnitType.toString(); obj.UnitType = obj.UnitType.toString()
obj.DutyType = obj.DutyType.toString(); obj.DutyType = obj.DutyType.toString()
this.form = obj; this.form = obj;
this.EconomicCapabilityS.forEach((x) => { this.EconomicCapabilityS.forEach(x => {
if (obj.EconomicCapabilityList) { if (obj.EconomicCapabilityList) {
obj.EconomicCapabilityList.forEach((y) => { obj.EconomicCapabilityList.forEach(y => {
if (x.ID == y.ID) { if (x.ID == y.ID) {
x.isShow = true; x.isShow = true;
x.Content = y.Value; x.Content = y.Value;
...@@ -809,16 +887,18 @@ export default { ...@@ -809,16 +887,18 @@ export default {
} }
}); });
} }
} })
);
} }
}, },
(err) => {} err => {}
); );
},
addLittleRedBook() {
}, },
addEconomicCapability(obj) { addEconomicCapability(obj) {
// 添加经济能力说明 // 添加经济能力说明
this.EconomicCapabilityS.forEach((x) => { this.EconomicCapabilityS.forEach(x => {
if (x.ID == obj.ID) { if (x.ID == obj.ID) {
x.isShow ? (x.isShow = false) : (x.isShow = true); x.isShow ? (x.isShow = false) : (x.isShow = true);
} }
...@@ -827,47 +907,41 @@ export default { ...@@ -827,47 +907,41 @@ export default {
}, },
getDutyType() { getDutyType() {
this.apipost2( this.apipost2(
"dict_get_GetDictValueCommonList", "dict_get_GetDictValueCommonList", {
{ Key: 'SK_CRM_DutyType',
Key: "SK_CRM_DutyType",
}, },
(res) => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.DutyTypeList = res.data.data; this.DutyTypeList = res.data.data
} else { } else {}
}
}, },
(err) => {} err => {}
); );
}, },
getUnitType() { getUnitType() {
this.apipost2( this.apipost2(
"dict_get_GetDictValueCommonList", "dict_get_GetDictValueCommonList", {
{ Key: 'SK_CRM_UnitType',
Key: "SK_CRM_UnitType",
}, },
(res) => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.UnitTypeList = res.data.data; this.UnitTypeList = res.data.data
} else { } else {}
}
}, },
(err) => {} err => {}
); );
}, },
getTravelType() { getTravelType() {
this.apipost2( this.apipost2(
"dict_get_GetDictValueCommonList", "dict_get_GetDictValueCommonList", {
{ Key: 'SK_CRM_TravelType',
Key: "SK_CRM_TravelType",
}, },
(res) => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.TravelTypeList = res.data.data; this.TravelTypeList = res.data.data
} else { } else {}
}
}, },
(err) => {} err => {}
); );
}, },
getVisaDutyTypeEnum() { getVisaDutyTypeEnum() {
...@@ -876,14 +950,14 @@ export default { ...@@ -876,14 +950,14 @@ export default {
this.apipost2( this.apipost2(
"dmc_get_visa_GetVisaDutyTypeEnum", "dmc_get_visa_GetVisaDutyTypeEnum",
msg, msg,
(res) => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.VisaDutyTypeEnum = res.data.data; this.VisaDutyTypeEnum = res.data.data;
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}, },
(err) => {} err => {}
); );
}, },
getVisaDeparturesType() { getVisaDeparturesType() {
...@@ -892,14 +966,14 @@ export default { ...@@ -892,14 +966,14 @@ export default {
this.apipost2( this.apipost2(
"dmc_get_visa_GetVisaDeparturesTypeEnum", "dmc_get_visa_GetVisaDeparturesTypeEnum",
msg, msg,
(res) => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.VisaDeparturesType = res.data.data; this.VisaDeparturesType = res.data.data;
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}, },
(err) => {} err => {}
); );
}, },
getVisaIdentityTypeEnum() { getVisaIdentityTypeEnum() {
...@@ -908,62 +982,58 @@ export default { ...@@ -908,62 +982,58 @@ export default {
this.apipost2( this.apipost2(
"dmc_get_visa_GetVisaIdentityTypeEnum", "dmc_get_visa_GetVisaIdentityTypeEnum",
msg, msg,
(res) => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.VisaIdentityTypeEnum = res.data.data; this.VisaIdentityTypeEnum = res.data.data;
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}, },
(err) => {} err => {}
); );
}, },
getCustomerList() { getCustomerList() {
this.apipost("/api/Customer/GetCustomerListByCreateInfo", {}, (res) => { this.apipost('/api/Customer/GetCustomerListByCreateInfo', {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CustomerList = res.data.data; this.CustomerList = res.data.data
} }
}); })
}, },
closedDialog() { closedDialog() {
this.MsgBus.$emit("closeCustomerDialogBox"); this.MsgBus.$emit('closeCustomerDialogBox')
}, },
addData() { addData() {
if (this.form.CustomerID === "") { if (this.form.CustomerID === '') {
this.form.CustomerID = 0; this.form.CustomerID = 0
} }
this.form.EconomicCapabilityList = []; this.form.EconomicCapabilityList = []
this.EconomicCapabilityS.forEach((x) => { this.EconomicCapabilityS.forEach(x => {
if (x.isShow == true) { if (x.isShow == true) {
this.form.EconomicCapabilityList.push({ this.form.EconomicCapabilityList.push({
Key: x.Name, Key: x.Name,
Value: x.Content, Value: x.Content,
ID: x.ID, ID: x.ID
}); });
} }
}); });
this.apipost( this.apipost('/api/Customer/CreateGuestCustomerClue', this.form, res => {
"/api/Customer/CreateGuestCustomerClue",
this.form,
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dialogTableVisible = false; this.dialogTableVisible = false;
// 有id 发送更新抽屉消息 // 有id 发送更新抽屉消息
if (this.CustomerId !== 0) { if (this.CustomerId !== 0) {
this.$message.success("修改直客成功"); this.$message.success('修改直客成功');
this.MsgBus.$emit("RefreshInfoBox"); this.MsgBus.$emit('RefreshInfoBox')
} else { } else {
this.$message.success("新建直客成功"); this.$message.success('新建直客成功');
} }
this.$emit("getList"); this.$emit('getList')
this.resetForm("form"); this.resetForm("form");
} }
} })
);
}, },
submitForm(addMsg) { submitForm(addMsg) {
//提交创建、修改表单 //提交创建、修改表单
this.$refs[addMsg].validate((valid) => { this.$refs[addMsg].validate(valid => {
if (valid) { if (valid) {
this.addData(); this.addData();
} else { } else {
...@@ -971,92 +1041,90 @@ export default { ...@@ -971,92 +1041,90 @@ export default {
} }
}); });
}, },
resetForm(formName) { resetForm(formName) { // 重置表单
// 重置表单
this.form = { this.form = {
Id: 0, Id: 0,
SurName: "", SurName: '',
Name: 0, Name: 0,
Sex: "", Sex: '',
EName: "", EName: '',
ESurName: 0, ESurName: 0,
Birthday: "", Birthday: '',
BirthdayAddress: 2, BirthdayAddress: 2,
PassportAddress: "", PassportAddress: '',
PassportExpiry: "", PassportExpiry: '',
PassportNo: "", PassportNo: '',
Nationality: "", Nationality: '',
Marriage: "", Marriage: '',
Address: "", Address: '',
AddressDetail: "", AddressDetail: '',
HistoryRecord: "", HistoryRecord: '',
IdentityType: "", IdentityType: '',
Duty: "", Duty: '',
EconomicCapabilityList: [], EconomicCapabilityList: [],
Remarks: "", Remarks: '',
TravelType: "", TravelType: '',
UnitType: "", UnitType: '',
DutyType: "", DutyType: '',
IsHightSchool: "", IsHightSchool: '',
IsRecommend: "", IsRecommend: '',
PassportIssued: "", PassportIssued: '',
IssuingAuthority: "", IssuingAuthority: '',
IdCard: "", IdCard: '',
MobilePhone: "", MobilePhone: '',
CustomerSourceType: "", CustomerSourceType: '',
CustomerSource: "", CustomerSource: '',
}; ClueName: '',
WeChatNo: '',
SourceAccount: '',
}
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
getCustomerBrandList() { getCustomerBrandList() { // 获取品牌
// 获取品牌 this.apipost2('app_get_customer_brand', {}, res => {
this.apipost2(
"app_get_customer_brand",
{},
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CustomerBrandList = res.data.data; this.CustomerBrandList = res.data.data;
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message)
} }
}, }, err => {})
(err) => {}
);
}, },
getJycs() { getJycs() {
this.apipost2( this.apipost2('app_today_visit_GetCustomerPremisesEnum', {}, res => {
"app_today_visit_GetCustomerPremisesEnum",
{},
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.jycs = res.data.data; this.jycs = res.data.data
} }
}, }, err => {})
(err) => {}
);
}, },
GetCustomerLevelEnum() { GetCustomerLevelEnum() {
this.apipost("/api/Customer/GetCustomerLevelEnum", {}, (res) => { this.apipost('/api/Customer/GetCustomerLevelEnum', {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CustomerLevelEnum = res.data.data; this.CustomerLevelEnum = res.data.data
} }
}); })
}, },
GetCustomerSourceEnum() { GetCustomerSourceEnum() {
this.apipost("/api/Customer/GetCustomerSourceEnum", {}, (res) => { this.apipost('/api/Customer/GetCustomerSourceEnum', {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.SourceEnum = res.data.data; this.SourceEnum = res.data.data
} }
}); })
},
getSourceSegmentList() {
this.apipost('/api/Customer/GetGuestSourceAccountList', {}, res => {
if (res.data.resultCode == 1) {
this.SourceSegmentList = res.data.data
}
})
}, },
getProvinceList2(ID, type) { getProvinceList2(ID, type) {
let msg = { let msg = {
Id: ID, Id: ID
}; };
this.apipost2( this.apipost2(
"dict_post_Destination_GetChildList", "dict_post_Destination_GetChildList",
msg, msg,
(res) => { res => {
if (type == 1) { if (type == 1) {
this.provinceList = res.data.data; this.provinceList = res.data.data;
} else if (type == 2) { } else if (type == 2) {
...@@ -1065,24 +1133,23 @@ export default { ...@@ -1065,24 +1133,23 @@ export default {
this.district = res.data.data; this.district = res.data.data;
} }
}, },
(err) => {} err => {}
); );
}, },
//获取国家 //获取国家
getCountryList() { getCountryList() {
this.apipost2( this.apipost2(
"dict_post_Destination_GetCountry", "dict_post_Destination_GetCountry", {},
{}, res => {
(res) => {
this.countryList = res.data.data; this.countryList = res.data.data;
}, },
(err) => {} err => {}
); );
}, },
//根据省份获取城市 //根据省份获取城市
getProvinceList(ID, type) { getProvinceList(ID, type) {
let msg = { let msg = {
Id: ID, Id: ID
}; };
if (type == 1) { if (type == 1) {
this.form.Province = ""; this.form.Province = "";
...@@ -1098,7 +1165,7 @@ export default { ...@@ -1098,7 +1165,7 @@ export default {
this.apipost2( this.apipost2(
"dict_post_Destination_GetChildList", "dict_post_Destination_GetChildList",
msg, msg,
(res) => { res => {
if (type == 1) { if (type == 1) {
this.provinceList = res.data.data; this.provinceList = res.data.data;
} else if (type == 2) { } else if (type == 2) {
...@@ -1107,7 +1174,7 @@ export default { ...@@ -1107,7 +1174,7 @@ export default {
this.district = res.data.data; this.district = res.data.data;
} }
}, },
(err) => {} err => {}
); );
} }
}, },
...@@ -1116,8 +1183,8 @@ export default { ...@@ -1116,8 +1183,8 @@ export default {
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
let path = "/Upload/Temporary/"; let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, (x) => { this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath; let url = this.domainManager().ViittoFileUrl + x.data.FilePath
this.form.Images.push(url); this.form.Images.push(url);
}); });
}, },
...@@ -1126,8 +1193,8 @@ export default { ...@@ -1126,8 +1193,8 @@ export default {
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
let path = "/Upload/Temporary/"; let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, (x) => { this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath; let url = this.domainManager().ViittoFileUrl + x.data.FilePath
this.form.BusinessCardPhotos.push(url); this.form.BusinessCardPhotos.push(url);
}); });
}, },
...@@ -1136,32 +1203,32 @@ export default { ...@@ -1136,32 +1203,32 @@ export default {
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
let path = "/Upload/Temporary/"; let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, (x) => { this.UploadSelfFileT(path, newArr, x => {
let url = this.domainManager().ViittoFileUrl + x.data.FilePath; let url = this.domainManager().ViittoFileUrl + x.data.FilePath
this.form.HousePhotos.push(url); this.form.HousePhotos.push(url);
}); });
}, },
showImg(i) { showImg(i) {
let url = ""; let url = ''
if (i === 1) { if (i === 1) {
url = this.form.Images[0]; url = this.form.Images[0]
} else if (i === 2) { } else if (i === 2) {
url = this.form.BusinessCardPhotos[0]; url = this.form.BusinessCardPhotos[0]
} else if (i === 3) { } else if (i === 3) {
url = this.form.HousePhotos[0]; url = this.form.HousePhotos[0]
} }
this.dialogImageUrl = url; this.dialogImageUrl = url;
this.dialogVisible = true; this.dialogVisible = true;
}, },
delImg(i) { delImg(i) {
if (i === 1) { if (i === 1) {
this.form.Images = []; this.form.Images = []
} else if (i === 2) { } else if (i === 2) {
this.form.BusinessCardPhotos = []; this.form.BusinessCardPhotos = []
} else if (i === 3) { } else if (i === 3) {
this.form.HousePhotos = []; this.form.HousePhotos = []
} }
}, },
}, }
}; }
</script> </script>
\ No newline at end of file
...@@ -6,20 +6,19 @@ export default { ...@@ -6,20 +6,19 @@ export default {
apiurl: '' apiurl: ''
}, },
install(Vue, options) { install(Vue, options) {
Vue.prototype.isOnline = function () { Vue.prototype.isOnline = function() {
return process.env.NODE_ENV !== 'development'; return process.env.NODE_ENV !== 'development';
}, },
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function() {
let domainUrl = "https://localhost:5001" let domainUrl = "http://192.168.10.2:8098"
let locationName = window.location.hostname; let locationName = window.location.hostname;
let domainPostUrl = "http://reborn.oytour.com" let domainPostUrl = "http://198.168.10.2:8083"
if (this.isOnline()) { if (this.isOnline()) {
if (window.location.host.indexOf('fcrmyx.oytour.com') != -1) { if (window.location.host.indexOf('fcrmyx.oytour.com') != -1) {
domainUrl = "http://crm.oytour.com" domainUrl = "http://crm.oytour.com"
domainPostUrl = "http://reborn.oytour.com" domainPostUrl = "http://reborn.oytour.com"
} } else {
else {
domainUrl = "http://testcrm.oytour.com" domainUrl = "http://testcrm.oytour.com"
domainPostUrl = "http://testapi.oytour.com" domainPostUrl = "http://testapi.oytour.com"
} }
...@@ -48,7 +47,7 @@ export default { ...@@ -48,7 +47,7 @@ export default {
}; };
return obj; return obj;
}, },
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) { Vue.prototype.GetLocalFile = function(cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl; var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") { if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
...@@ -84,10 +83,10 @@ export default { ...@@ -84,10 +83,10 @@ export default {
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res); successCall(res);
}).catch(function (res) { }); }).catch(function(res) {});
}, },
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun //价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function (value) { Vue.prototype.moneyFormat = function(value) {
let nStr = Number(value).toFixed(2) let nStr = Number(value).toFixed(2)
nStr += ''; nStr += '';
let x = nStr.split('.'); let x = nStr.split('.');
...@@ -100,7 +99,7 @@ export default { ...@@ -100,7 +99,7 @@ export default {
return x1 + x2; return x1 + x2;
}, },
//消息成功提示 //消息成功提示
Vue.prototype.Success = function (msg) { Vue.prototype.Success = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -108,7 +107,7 @@ export default { ...@@ -108,7 +107,7 @@ export default {
}); });
}, },
//错误提示 //错误提示
Vue.prototype.Error = function (msg) { Vue.prototype.Error = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -117,7 +116,7 @@ export default { ...@@ -117,7 +116,7 @@ export default {
}, },
//一般提示 //一般提示
Vue.prototype.Info = function (msg) { Vue.prototype.Info = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -125,7 +124,7 @@ export default { ...@@ -125,7 +124,7 @@ export default {
}); });
}, },
//警告提示 //警告提示
Vue.prototype.Warning = function (msg) { Vue.prototype.Warning = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -133,7 +132,7 @@ export default { ...@@ -133,7 +132,7 @@ export default {
}); });
}, },
//Confirm //Confirm
Vue.prototype.Confirm = function (msg, callback) { Vue.prototype.Confirm = function(msg, callback) {
this.$confirm(msg, "提示", { this.$confirm(msg, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -153,7 +152,7 @@ export default { ...@@ -153,7 +152,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定 //type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽 // w : 宽
// h : 高 // h : 高
Vue.prototype.compressImg = function (path, type, w, h) { Vue.prototype.compressImg = function(path, type, w, h) {
let url = this.domainManager().UploadUrl; let url = this.domainManager().UploadUrl;
let poise = 'width='; let poise = 'width=';
w = w ? w : '' w = w ? w : ''
...@@ -166,13 +165,13 @@ export default { ...@@ -166,13 +165,13 @@ export default {
return path.split('?')[0] + '?width=' + w; return path.split('?')[0] + '?width=' + w;
} }
//打开新窗口连接 //打开新窗口连接
Vue.prototype.OpenNewUrl = function (URL) { Vue.prototype.OpenNewUrl = function(URL) {
if (URL != '') { if (URL != '') {
window.open('http://' + URL, '_blank'); window.open('http://' + URL, '_blank');
} }
} }
//HTTP提交数据 //HTTP提交数据
Vue.prototype.apipost2 = function (cmd, msg, successCall, faildCall, isOnline) { Vue.prototype.apipost2 = function(cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
...@@ -219,7 +218,7 @@ export default { ...@@ -219,7 +218,7 @@ export default {
} }
}, faildCall) }, faildCall)
} }
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
...@@ -262,7 +261,7 @@ export default { ...@@ -262,7 +261,7 @@ export default {
} }
}, faildCall) }, faildCall)
}, },
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
...@@ -313,7 +312,7 @@ export default { ...@@ -313,7 +312,7 @@ export default {
} }
}, faildCall) }, faildCall)
}, },
Vue.prototype.getAction = function (actionId, lineId) { Vue.prototype.getAction = function(actionId, lineId) {
// if(actionId==1){ // if(actionId==1){
// console.log("浏览签证产品",actionId) // console.log("浏览签证产品",actionId)
// } // }
...@@ -340,7 +339,7 @@ export default { ...@@ -340,7 +339,7 @@ export default {
} }
//验证只能输入2位小数 //验证只能输入2位小数
Vue.prototype.checkPrice = function (item, filed) { Vue.prototype.checkPrice = function(item, filed) {
var value = ""; var value = "";
if (typeof item[filed] == "string") { if (typeof item[filed] == "string") {
value = item[filed]; value = item[filed];
...@@ -361,7 +360,7 @@ export default { ...@@ -361,7 +360,7 @@ export default {
item[filed] = value; item[filed] = value;
} }
//验证只能输入整数 //验证只能输入整数
Vue.prototype.checkInteger = function (item, filed) { Vue.prototype.checkInteger = function(item, filed) {
var value = ""; var value = "";
if (typeof item[filed] == "string") { if (typeof item[filed] == "string") {
value = item[filed]; value = item[filed];
......
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