|
@@ -4,7 +4,8 @@
|
|
|
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
|
|
</div>
|
|
|
<div class="form-container">
|
|
|
- <y-detail-page-layout ref="myPersonalOrder" @save="handleCreate" :editStatus="couldEdit" @doRecall="doRecall" :couldBack="couldBack" :rules="rules">
|
|
|
+ <y-detail-page-layout ref="myPersonalOrder" @save="handleCreate" :editStatus="couldEdit"
|
|
|
+ @doRecall="doRecall" :couldBack="couldBack" :rules="rules">
|
|
|
<el-form ref="personalForm" :model="personal">
|
|
|
<div class="createMajor-main-container">
|
|
|
<div class="postInfo-container">
|
|
@@ -25,7 +26,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input :value="personal.clientManager" class="filter-item" readonly disabled style=" width: 225px" />
|
|
|
+ <el-input :value="personal.clientManager" class="filter-item" readonly disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -36,7 +37,8 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-select v-model="personal.evaluateAim" placeholder="请选择">
|
|
|
+
|
|
|
+ <el-select v-model="personal.evaluateAim" placeholder="请选择" style="width: 100%" >
|
|
|
<el-option label="按揭" value="按揭"></el-option>
|
|
|
<el-option label="抵押" value="抵押"></el-option>
|
|
|
<el-option label="咨询" value="咨询"></el-option>
|
|
@@ -62,7 +64,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row class="row-style">
|
|
|
- <el-col :xs="12" :sm="12" :lg="23" :span="6">
|
|
|
+ <el-col :xs="12" :sm="12" :lg="24" :span="6">
|
|
|
<el-form-item
|
|
|
label="坐落:"
|
|
|
prop="location"
|
|
@@ -70,7 +72,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.location" class="filter-item" style=" width: 100%"/>
|
|
|
+ <el-input v-model="personal.location" class="filter-item" style=" width: 100%" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -83,7 +85,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-select v-model="personal.clienteleType" placeholder="请选择" @change="changeCustomerType(0)" >
|
|
|
+ <el-select v-model="personal.clienteleType" placeholder="请选择" @change="changeCustomerType(0)" style="width: 100%">
|
|
|
<el-option label="企业" value="企业"></el-option>
|
|
|
<el-option label="个人" value="个人"></el-option>
|
|
|
</el-select>
|
|
@@ -97,10 +99,9 @@
|
|
|
:rules="{required: true, message: '客户名称不能为空', trigger: 'blur'}"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-select v-model="personal.clienteleId" placeholder="请选择(可搜索)" @change="findSubClientele(0)" clearable filterable v-if="couldEdit">
|
|
|
+ <el-select style="width: 100%" v-model="personal.clienteleId" placeholder="请选择(可搜索)" @change="findSubClientele(0)" clearable filterable >
|
|
|
<el-option v-for="(c,id) in customerCompany" :label="c.name" :value="c.id"></el-option>
|
|
|
</el-select>
|
|
|
- <el-input :value="personal.cclienteleName" class="filter-item" style=" width: 225px" v-else/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6" v-if="personal.clienteleType==='企业'">
|
|
@@ -111,10 +112,9 @@
|
|
|
:rules="{required: true, message: '业务来源不能为空', trigger: 'blur'}"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-select v-model="personal.clienteleSubId" placeholder="请选择(可搜索)" @change="getCustomerContract" clearable filterable v-if="couldEdit">
|
|
|
+ <el-select style="width: 100%" v-model="personal.clienteleSubId" placeholder="请选择(可搜索)" @change="getCustomerContract" clearable filterable >
|
|
|
<el-option v-for="(s,id) in subCustomerCompany" :label="s.name" :value="s.id"></el-option>
|
|
|
</el-select>
|
|
|
- <el-input :value="personal.cclienteleSubName" class="filter-item" style=" width: 225px" v-else />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -122,18 +122,18 @@
|
|
|
label="客户联系人:"
|
|
|
prop="clienteleContactId"
|
|
|
:rules="{required: true, message: '客户联系人不能为空', trigger: 'blur'}"
|
|
|
- label-width="120px"
|
|
|
+ label-width="140px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
<div v-if="couldEdit">
|
|
|
- <el-select v-model="personal.clienteleContactId" placeholder="请选择(可搜索)" clearable filterable @change="getContactInfo" style="width:60%">
|
|
|
+ <el-select style="width: 80%" v-model="personal.clienteleContactId" placeholder="请选择(可搜索)" clearable filterable @change="getContactInfo" >
|
|
|
<el-option v-for="(c,id) in customerContract" :label="c.name" :value="c.id"></el-option>
|
|
|
</el-select>
|
|
|
<el-tooltip class="item" effect="dark" content="没有联系人?点击新增" placement="top-end">
|
|
|
<span style="margin-left:5%;color:RGB(64,158,255);cursor:pointer" @click="createLinkman(false)">新增</span>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
- <el-input :value="personal.cclienteleContactName" class="filter-item" style=" width: 225px" v-else/>
|
|
|
+ <el-input :value="personal.contactName" class="filter-item" v-else/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -145,7 +145,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input :value="personal.cmobile" class="filter-item" style=" width: 225px"/>
|
|
|
+ <el-input :value="personal.contactTel" class="filter-item" disabled readonly/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -155,7 +155,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input :value="personal.cdepartment" class="filter-item" style=" width: 225px"/>
|
|
|
+ <el-input :value="personal.cdepartment" class="filter-item" disabled readonly/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -165,7 +165,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input :value="personal.cduty" class="filter-item" style=" width: 225px"/>
|
|
|
+ <el-input :value="personal.cduty" class="filter-item" disabled readonly/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -175,7 +175,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.agent" class="filter-item" style=" width: 225px" />
|
|
|
+ <el-input v-model="personal.agent" class="filter-item" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -187,7 +187,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.loanNature" class="filter-item" style=" width: 225px" />
|
|
|
+ <el-input v-model="personal.loanNature" class="filter-item" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -197,7 +197,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.loanAim" class="filter-item" style=" width: 225px" />
|
|
|
+ <el-input v-model="personal.loanAim" class="filter-item" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -208,7 +208,7 @@
|
|
|
:rules="{required: true, message: '贷款额度不能为空', trigger: 'blur'}"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.loanLimit" class="filter-item" style=" width: 225px" >
|
|
|
+ <el-input v-model="personal.loanLimit" class="filter-item" >
|
|
|
<template slot="append">万元</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
@@ -220,7 +220,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.loanPeriod" class="filter-item" style=" width: 225px" >
|
|
|
+ <el-input v-model="personal.loanPeriod" class="filter-item" >
|
|
|
<template slot="append">年</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
@@ -234,8 +234,8 @@
|
|
|
label-width="140px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-radio v-model="personal.loanExpire" :label="false" border size="medium" >否</el-radio>
|
|
|
- <el-radio v-model="personal.loanExpire" :label="true" border size="medium" >是</el-radio>
|
|
|
+ <el-radio v-model="personal.loanExpire" :label="false" border size="medium" >否</el-radio>
|
|
|
+ <el-radio v-model="personal.loanExpire" :label="true" border size="medium" >是</el-radio>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
@@ -245,7 +245,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-checkbox-group v-model="personal.credentials">
|
|
|
+ <el-checkbox-group v-model="personal.credentials" >
|
|
|
<el-checkbox-button label="HOUSE_CERTIFICATE" name="credentials">房产证</el-checkbox-button>
|
|
|
<el-checkbox-button label="LAND_CERTIFICATE" name="credentials">国土证</el-checkbox-button>
|
|
|
<el-checkbox-button label="IMMOVABLE_CERTIFICATE" name="credentials">不动产权证</el-checkbox-button>
|
|
@@ -264,7 +264,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.bailorA" class="filter-item" style=" width: 225px" />
|
|
|
+ <el-input v-model="personal.bailorA" class="filter-item" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -274,7 +274,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.bailoraTel" class="filter-item" style=" width: 225px"/>
|
|
|
+ <el-input v-model="personal.bailoraTel" class="filter-item" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -284,7 +284,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.bailorB" class="filter-item" style=" width: 225px" />
|
|
|
+ <el-input v-model="personal.bailorB" class="filter-item" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
@@ -294,7 +294,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.bailorbTel" class="filter-item" style=" width: 225px" />
|
|
|
+ <el-input v-model="personal.bailorbTel" class="filter-item" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -306,13 +306,14 @@
|
|
|
label-width="140px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-select v-model="personal.terminalClienteleType" placeholder="请选择" style="width:205px" @change="changeCustomerType(1)">
|
|
|
+ <el-select v-if="couldEdit" v-model="personal.terminalClienteleType" placeholder="请选择" clearable style="width: 100%" @change="changeCustomerType(1)">
|
|
|
<el-option label="企业" value="企业"></el-option>
|
|
|
<el-option label="个人" value="个人"></el-option>
|
|
|
</el-select>
|
|
|
+ <el-input v-else :value="personal.terminalClienteleType" class="filter-item" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6" :span="6" v-if="personal.terminalClienteleType==='企业'">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6" v-if="personal.terminalClienteleType!=''">
|
|
|
<el-form-item
|
|
|
label="终端客户名称:"
|
|
|
prop="terminalClienteleId"
|
|
@@ -321,45 +322,45 @@
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
<div v-if="couldEdit">
|
|
|
- <el-select v-model="personal.terminalClienteleId" placeholder="请选择(可搜索)" @change="findSubClientele(1)" clearable filterable style="width:80%">
|
|
|
+ <el-select style="width: 90%" v-model="personal.terminalClienteleId" placeholder="请选择(可搜索)" @change="findSubClientele(1)" clearable filterable >
|
|
|
<el-option v-for="(c,id) in tCustomerCompany" :label="c.name" :value="c.id"></el-option>
|
|
|
</el-select>
|
|
|
<el-tooltip class="item" effect="dark" content="没有终端客户?点击新增" placement="top-end">
|
|
|
<span style="margin-left:5%;color:RGB(64,158,255);cursor:pointer" @click="createTerminalClient()">新增</span>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
- <el-input :value="personal.tterminalClienteleName" class="filter-item" style=" width: 225px" v-else/>
|
|
|
+ <el-input :value="personal.tterminalClienteleName" class="filter-item" v-else/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6" :span="6" v-if="personal.terminalClienteleType==='个人'">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6" v-if="personal.terminalClienteleType=='企业'">
|
|
|
<el-form-item
|
|
|
label="终端联系人:"
|
|
|
prop="terminalClienteleContactId"
|
|
|
- label-width="120px"
|
|
|
+ label-width="140px"
|
|
|
:rules="{required: true, message: '终端联系人不能为空', trigger: 'blur'}"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
<div v-if="couldEdit">
|
|
|
- <el-select v-model="personal.terminalClienteleContactId" placeholder="请选择(可搜索)" clearable filterable @change="getTcontactInfo" style="width:80%">
|
|
|
+ <el-select style="width: 80%" v-model="personal.terminalClienteleContactId" placeholder="请选择(可搜索)" clearable filterable @change="getTcontactInfo">
|
|
|
<el-option v-for="(c,id) in tCustomerContract" :label="c.name" :value="c.id"></el-option>
|
|
|
</el-select>
|
|
|
<el-tooltip class="item" effect="dark" content="没有联系人?点击新增" placement="top-end">
|
|
|
<span style="margin-left:5%;color:RGB(64,158,255);cursor:pointer" @click="createTlinkman()">新增</span>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
- <el-input :value="personal.tterminalClienteleContactName" class="filter-item" style=" width: 225px" v-else/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
|
- <el-form-item
|
|
|
- label="终端联系电话:"
|
|
|
- prop="clienteleType"
|
|
|
- label-width="130px"
|
|
|
- class="postInfo-container-item"
|
|
|
- >
|
|
|
- <el-input :value="personal.tmobile" class="filter-item" style=" width: 215px"/>
|
|
|
+ <el-input :value="personal.tterminalClienteleContactName" class="filter-item" v-else />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6" v-if="personal.terminalClienteleType!=''">
|
|
|
+ <el-form-item
|
|
|
+ label="终端联系电话:"
|
|
|
+ prop="clienteleType"
|
|
|
+ label-width="140px"
|
|
|
+ class="postInfo-container-item"
|
|
|
+ >
|
|
|
+ <el-input :value="personal.tmobile" class="filter-item" readonly disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row class="row-style">
|
|
|
<el-col :xs="24" :sm="12" :lg="23" :span="12">
|
|
@@ -369,7 +370,7 @@
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
- <el-input v-model="personal.remark" :autosize="{ minRows: 4, maxRows: 4}" class="filter-item" type="textarea" />
|
|
|
+ <el-input v-model="personal.remark" :autosize="{ minRows: 4, maxRows: 4}" class="filter-item" type="textarea"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -550,15 +551,29 @@
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
<el-dialog :visible.sync="createTlinkmanVisible" width="70%" custom-class="createLinkman">
|
|
|
- <el-divider content-position="left">新增终端客户联系人</el-divider>
|
|
|
+ <el-divider content-position="left">{{personal.terminalClienteleType==='企业'?'新增终端客户联系人':'新增终端客户'}}</el-divider>
|
|
|
<el-form ref="tLinkmanFrom" :model="tLinkmanFrom" :rules="rules" >
|
|
|
+ <el-row v-if="personal.terminalClienteleType==='企业'">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item
|
|
|
+ label="所属企业:"
|
|
|
+ prop="ccId"
|
|
|
+ label-width="120px"
|
|
|
+ class="postInfo-container-item"
|
|
|
+ >
|
|
|
+ <el-select v-model="personal.terminalClienteleId" disabled readonly style="width:100%">
|
|
|
+ <el-option v-for="(c,id) in tCustomerCompany" :label="c.name" :value="c.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<el-row>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
|
<el-form-item
|
|
|
label="联系人姓名:"
|
|
|
prop="name"
|
|
|
:rules="{required: true, message: '联系人姓名不能为空', trigger: 'blur'}"
|
|
|
- label-width="120px"
|
|
|
+ label-width="140px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
|
<el-input v-model.trim="tLinkmanFrom.name" class="filter-item" />
|
|
@@ -707,6 +722,7 @@
|
|
|
<el-form-item
|
|
|
label="联系电话:"
|
|
|
prop="phone"
|
|
|
+ :rules="{required: true, message: '联系电话不能为空', trigger: 'blur'}"
|
|
|
label-width="120px"
|
|
|
class="postInfo-container-item"
|
|
|
>
|
|
@@ -782,7 +798,11 @@
|
|
|
tterminalClienteleName:null,
|
|
|
tterminalClienteleContactName:null,
|
|
|
tmobile:null,
|
|
|
- remark:null
|
|
|
+ remark:null,
|
|
|
+ clienteleContactId:null,
|
|
|
+ terminalClienteleId:null,
|
|
|
+ terminalClienteleContactId:null
|
|
|
+
|
|
|
},
|
|
|
createLinkmanVisible:false,
|
|
|
linkmanFrom:{
|
|
@@ -907,62 +927,83 @@
|
|
|
})
|
|
|
},
|
|
|
changeCustomerType(val){
|
|
|
- if (val ===0){
|
|
|
- if (this.personal.clienteleId){
|
|
|
- this.personal.clienteleId = null;
|
|
|
- this.customerCompany=[]
|
|
|
+ if (val ===0){
|
|
|
+ this.personal.cmobile = null;
|
|
|
+ this.personal.cdepartment = null;
|
|
|
+ this.personal.cduty = null;
|
|
|
+ if (this.persoanl.clienteleId){
|
|
|
+ this.persoanl.clienteleId = null;
|
|
|
+ this.customerCompany=[];
|
|
|
+ this.cmobile = null;
|
|
|
}
|
|
|
- if (this.personal.clienteleSubId){
|
|
|
- this.personal.clienteleSubId = null;
|
|
|
- this.subCustomerCompany=[]
|
|
|
+ if (this.persoanl.clienteleSubId){
|
|
|
+ this.persoanl.clienteleSubId = null;
|
|
|
+ this.subCustomerCompany=[];
|
|
|
+ this.cmobile = null;
|
|
|
}
|
|
|
- if (this.personal.clienteleContactId){
|
|
|
- this.personal.clienteleContactId = null;
|
|
|
- this.customerContract =[]
|
|
|
+ if (this.persoanl.clienteleContactId){
|
|
|
+ this.persoanl.clienteleContactId = null;
|
|
|
+ this.customerContract =[];
|
|
|
+ this.cmobile = null;
|
|
|
}
|
|
|
- if (this.personal.clienteleType==='个人'){
|
|
|
+ if (this.persoanl.clienteleType==='个人'){
|
|
|
let simpleAll = new Object();
|
|
|
simpleAll.ccId = 1;
|
|
|
simpleAll.terminal = 0;
|
|
|
this.$api.customerLinkman.simpleAll(simpleAll).then(res=>{
|
|
|
if (res.code === 200){
|
|
|
this.customerContract = res.data;
|
|
|
- if (this.personal.clienteleContactId){
|
|
|
- this.personal.clienteleContactId = null
|
|
|
+ if (this.persoanl.clienteleContactId){
|
|
|
+ this.persoanl.clienteleContactId = null;
|
|
|
+ this.cmobile = null;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- if (this.personal.clienteleType==='企业'){
|
|
|
+ if (this.persoanl.clienteleType==='企业'){
|
|
|
this.getCustomerCompany(0)
|
|
|
- this.personal.clienteleContactId = null
|
|
|
+ this.persoanl.clienteleContactId = null;
|
|
|
this.customerContract =[];
|
|
|
+ this.cmobile = null;
|
|
|
}
|
|
|
- }else {
|
|
|
- if (this.personal.terminalClienteleType==='个人'){
|
|
|
- let simpleAll = new Object();
|
|
|
- simpleAll.ccId = 1;
|
|
|
- simpleAll.terminal = 1;
|
|
|
- this.$api.customerLinkman.simpleAll(simpleAll).then(res=>{
|
|
|
- if (res.code === 200){
|
|
|
- this.tCustomerContract = res.data;
|
|
|
- if (this.personal.terminalClienteleId){
|
|
|
- this.personal.terminalClienteleId = null
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.personal.terminalClienteleType==='企业'){
|
|
|
- this.getCustomerCompany(1)
|
|
|
- if (this.personal.terminalClienteleContactId){
|
|
|
- this.personal.terminalClienteleContactId = null
|
|
|
- this.tCustomerContract =[];
|
|
|
- }
|
|
|
+ }else {
|
|
|
+ if (this.personal.terminalClienteleType==='个人'){
|
|
|
+ let simpleAll = new Object();
|
|
|
+ simpleAll.ccId = 2;
|
|
|
+ simpleAll.terminal = 1;
|
|
|
+ this.$api.customerLinkman.simpleAll(simpleAll).then(res=>{
|
|
|
+ if (res.code === 200){
|
|
|
+ this.tCustomerCompany = res.data;
|
|
|
+ if (this.personal.terminalClienteleId){
|
|
|
+ this.personal.terminalClienteleContactId = null
|
|
|
+ this.personal.terminalClienteleId = null
|
|
|
+ this.tCustomerContract =[];
|
|
|
+ this.personal.tmobile = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.personal.terminalClienteleType==='企业'){
|
|
|
+ this.personal.terminalClienteleContactId = null
|
|
|
+ this.personal.terminalClienteleId = null;
|
|
|
+ this.personal.tmobile = null;
|
|
|
+ this.tCustomerContract =[];
|
|
|
+ this.getCustomerCompany(1)
|
|
|
+ }
|
|
|
+ if (this.personal.terminalClienteleType===''){
|
|
|
+ this.personal.terminalClienteleContactId = null;
|
|
|
+ this.personal.terminalClienteleId = null;
|
|
|
+ this.personal.tmobile = null;
|
|
|
+ this.tCustomerCompany= [];
|
|
|
+ this.tCustomerContract =[];
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
},
|
|
|
findSubClientele(val){
|
|
|
if (val===0){
|
|
|
+ this.personal.cmobile = null;
|
|
|
+ this.personal.cdepartment = null;
|
|
|
+ this.personal.cduty = null;
|
|
|
if (this.personal.clienteleId){
|
|
|
let simpleAll = new Object();
|
|
|
simpleAll.terminal=val;
|
|
@@ -981,34 +1022,52 @@
|
|
|
})
|
|
|
}
|
|
|
}else {
|
|
|
- if (this.personal.terminalClienteleId){
|
|
|
+ if (this.personal.terminalClienteleType==='企业' && this.personal.terminalClienteleId){
|
|
|
let simpleAll = new Object();
|
|
|
simpleAll.terminal=val;
|
|
|
simpleAll.ccId = this.personal.terminalClienteleId;
|
|
|
- this.$api.customerCompany.detail(this.personal.terminalClienteleId).then(res=>{
|
|
|
+ this.$api.customerLinkman.simpleAll(simpleAll).then(res=>{
|
|
|
if (res.code === 200){
|
|
|
- this.personal.tmobile = res.data.phone;
|
|
|
+ this.tCustomerContract =res.data;
|
|
|
}
|
|
|
+ this.personal.terminalClienteleContactId = null;
|
|
|
+ this.personal.tmobile = null;
|
|
|
})
|
|
|
+ }else{
|
|
|
+ if (this.personal.terminalClienteleType==='个人' && this.personal.terminalClienteleId){
|
|
|
+ this.$api.customerLinkman.detail(this.personal.terminalClienteleId).then(res=>{
|
|
|
+ if (res.code === 200){
|
|
|
+ this.personal.tmobile = res.data.mobile;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
createTerminalClient(){
|
|
|
+ if (this.personal.terminalClienteleType==='企业'){
|
|
|
this.createTerminalClientVisible = true;
|
|
|
+ }else{
|
|
|
+ this.createTlinkmanVisible = true;
|
|
|
+ }
|
|
|
},
|
|
|
getCustomerContract(){
|
|
|
if (this.personal.clienteleSubId){
|
|
|
- let simpleAll = new Object();
|
|
|
- simpleAll.ccId = this.personal.clienteleSubId
|
|
|
- this.$api.customerLinkman.simpleAll(simpleAll).then(res=>{
|
|
|
- if (res.code === 200){
|
|
|
- this.customerContract = res.data;
|
|
|
- if (this.personal.clienteleContactId){
|
|
|
- this.personal.clienteleContactId = null
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ let simpleAll = new Object();
|
|
|
+ simpleAll.ccId = this.personal.clienteleSubId
|
|
|
+ this.$api.customerLinkman.simpleAll(simpleAll).then(res=>{
|
|
|
+ if (res.code === 200){
|
|
|
+ this.customerContract = res.data;
|
|
|
+ if (this.personal.clienteleContactId){
|
|
|
+ this.personal.clienteleContactId = null;
|
|
|
+ this.personal.cmobile = null;
|
|
|
+ this.personal.cdepartment = null;
|
|
|
+ this.personal.cduty = null;
|
|
|
+ this.personal.cwechatNo = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
getContactInfo(){
|
|
|
if (this.personal.clienteleContactId){
|
|
@@ -1065,61 +1124,79 @@
|
|
|
|
|
|
},
|
|
|
createTlinkman(){
|
|
|
- this.createTlinkmanVisible = true;
|
|
|
- this.tLinkmanFrom.terminal = 1;
|
|
|
- this.personal.clienteleSubId = 1;
|
|
|
- this.tLinkmanFrom.ccId = this.personal.clienteleSubId;
|
|
|
+ this.createTlinkmanVisible = true;
|
|
|
+ this.tLinkmanFrom.terminal = 1;
|
|
|
+ if (this.personal.terminalClienteleType==='企业'){
|
|
|
+ this.tLinkmanFrom.ccId = this.personal.terminalClienteleId;
|
|
|
+ }else{
|
|
|
+ this.tLinkmanFrom.ccId = 1;
|
|
|
+ }
|
|
|
},
|
|
|
saveLinkman(){
|
|
|
- this.$refs.linkmanFrom.validate(valid =>{
|
|
|
- if (valid){
|
|
|
- this.$api.customerLinkman.add(this.linkmanFrom).then(res=>{
|
|
|
- if (res.code ===200){
|
|
|
- this.$notify({
|
|
|
- title: '成功',
|
|
|
- message: '新增客户联系人成功',
|
|
|
- type: 'success',
|
|
|
- duration: 2000
|
|
|
- });
|
|
|
- }
|
|
|
- this.getCustomerContract();
|
|
|
- setTimeout(()=>{
|
|
|
- this.personal.clienteleContactId = this.customerContract[0].id;
|
|
|
- this.getContactInfo();
|
|
|
- },2000)
|
|
|
- this.createLinkmanVisible=false;
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$refs.linkmanFrom.validate(valid =>{
|
|
|
+ if (valid){
|
|
|
+ this.$api.customerLinkman.add(this.linkmanFrom).then(res=>{
|
|
|
+ if (res.code ===200){
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '新增客户联系人成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.getCustomerContract();
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.personal.clienteleContactId = this.customerContract[0].id;
|
|
|
+ this.getContactInfo();
|
|
|
+ },2000)
|
|
|
+ this.createLinkmanVisible=false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
saveTlinkman(){
|
|
|
this.$refs.tLinkmanFrom.validate(valid =>{
|
|
|
- if (valid){
|
|
|
- this.$api.customerLinkman.add(this.tLinkmanFrom).then(res=>{
|
|
|
- if (res.code ===200){
|
|
|
- this.$notify({
|
|
|
- title: '成功',
|
|
|
- message: '新增终端联系人成功',
|
|
|
- type: 'success',
|
|
|
- duration: 2000
|
|
|
- });
|
|
|
- }
|
|
|
+ if (valid){
|
|
|
+ if (!this.tLinkmanFrom.ccId){
|
|
|
+ this.tLinkmanFrom.ccId = 2;
|
|
|
+ this.tLinkmanFrom.terminal = 1;
|
|
|
+ }
|
|
|
+ this.$api.customerLinkman.add(this.tLinkmanFrom).then(res=>{
|
|
|
+ if (res.code ===200){
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '新增终端联系人成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.personal.terminalClienteleType==='企业'){
|
|
|
+ this.findSubClientele(1);
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.personal.terminalClienteleContactId = this.tCustomerContract[0].id;
|
|
|
+ this.getTcontactInfo();
|
|
|
+ },2000)
|
|
|
+ }
|
|
|
+ if (this.personal.terminalClienteleType==='个人'){
|
|
|
let simpleAll = new Object();
|
|
|
- simpleAll.ccId = 1;
|
|
|
+ simpleAll.ccId = 2;
|
|
|
simpleAll.terminal = 1;
|
|
|
this.$api.customerLinkman.simpleAll(simpleAll).then(res=>{
|
|
|
if (res.code === 200){
|
|
|
- this.tCustomerContract = res.data;
|
|
|
+ this.tCustomerCompany = res.data;
|
|
|
}
|
|
|
})
|
|
|
setTimeout(()=>{
|
|
|
- this.personal.terminalClienteleContactId = this.tCustomerContract[0].id;
|
|
|
+ this.personal.terminalClienteleId = this.tCustomerCompany[0].id;
|
|
|
+ this.personal.terminalClienteleContactId = this.tCustomerCompany[0].id;
|
|
|
this.getTcontactInfo();
|
|
|
},2000)
|
|
|
- this.createTlinkmanVisible=false;
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ }
|
|
|
+
|
|
|
+ this.createTlinkmanVisible=false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
saveClient(){
|
|
|
this.$refs.terminalClientFrom.validate(valid =>{
|
|
@@ -1134,6 +1211,9 @@
|
|
|
});
|
|
|
}
|
|
|
this.getCustomerCompany(1);
|
|
|
+ this.personal.terminalClienteleContactId = null;
|
|
|
+ this.personal.tmobile = null;
|
|
|
+ this.tCustomerContract =[];
|
|
|
setTimeout(()=>{
|
|
|
this.personal.terminalClienteleId = this.tCustomerCompany[0].id;
|
|
|
this.findSubClientele(1);
|
|
@@ -1172,7 +1252,6 @@
|
|
|
});
|
|
|
this.$refs.myPersonalOrder.initPageStatus(true,true);
|
|
|
this.couldEdit = true;
|
|
|
- //this.$refs.myPersonalOrder.forceUpdate();
|
|
|
}else{
|
|
|
this.$notify({
|
|
|
title: '失败',
|