|
@@ -4,7 +4,7 @@
|
|
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
|
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
|
</div>
|
|
</div>
|
|
<div class="form-container">
|
|
<div class="form-container">
|
|
- <y-detail-page-layout @save="handleCreate" :edit-status="true" :couldBack="true" >
|
|
|
|
|
|
+ <y-detail-page-layout ref="myPersonalOrder" @save="handleCreate" :editStatus="couldEdit" @doRecall="doRecall" :couldBack="couldBack" :rules="rules">
|
|
<el-form ref="personalForm" :model="personal">
|
|
<el-form ref="personalForm" :model="personal">
|
|
<div class="createMajor-main-container">
|
|
<div class="createMajor-main-container">
|
|
<div class="postInfo-container">
|
|
<div class="postInfo-container">
|
|
@@ -48,6 +48,7 @@
|
|
label="房屋用途:"
|
|
label="房屋用途:"
|
|
prop="purpose"
|
|
prop="purpose"
|
|
label-width="160px"
|
|
label-width="160px"
|
|
|
|
+ :rules="{required: true, message: '房屋用途不能为空', trigger: 'blur'}"
|
|
class="postInfo-container-item"
|
|
class="postInfo-container-item"
|
|
>
|
|
>
|
|
<el-checkbox-group v-model="personal.purpose">
|
|
<el-checkbox-group v-model="personal.purpose">
|
|
@@ -93,6 +94,7 @@
|
|
label="客户名称:"
|
|
label="客户名称:"
|
|
prop="clienteleId"
|
|
prop="clienteleId"
|
|
label-width="120px"
|
|
label-width="120px"
|
|
|
|
+ :rules="{required: true, message: '客户名称不能为空', trigger: 'blur'}"
|
|
class="postInfo-container-item"
|
|
class="postInfo-container-item"
|
|
>
|
|
>
|
|
<el-select v-model="personal.clienteleId" placeholder="请选择(可搜索)" @change="findSubClientele(0)" clearable filterable v-if="couldEdit">
|
|
<el-select v-model="personal.clienteleId" placeholder="请选择(可搜索)" @change="findSubClientele(0)" clearable filterable v-if="couldEdit">
|
|
@@ -106,6 +108,7 @@
|
|
label="业务来源:"
|
|
label="业务来源:"
|
|
prop="clienteleSubId"
|
|
prop="clienteleSubId"
|
|
label-width="120px"
|
|
label-width="120px"
|
|
|
|
+ :rules="{required: true, message: '业务来源不能为空', trigger: 'blur'}"
|
|
class="postInfo-container-item"
|
|
class="postInfo-container-item"
|
|
>
|
|
>
|
|
<el-select v-model="personal.clienteleSubId" placeholder="请选择(可搜索)" @change="getCustomerContract" clearable filterable v-if="couldEdit">
|
|
<el-select v-model="personal.clienteleSubId" placeholder="请选择(可搜索)" @change="getCustomerContract" clearable filterable v-if="couldEdit">
|
|
@@ -202,6 +205,7 @@
|
|
label="贷款额度:"
|
|
label="贷款额度:"
|
|
prop="loanLimit"
|
|
prop="loanLimit"
|
|
label-width="120px"
|
|
label-width="120px"
|
|
|
|
+ :rules="{required: true, message: '贷款额度不能为空', trigger: 'blur'}"
|
|
class="postInfo-container-item"
|
|
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" style=" width: 225px" >
|
|
@@ -299,7 +303,6 @@
|
|
<el-form-item
|
|
<el-form-item
|
|
label="终端客户类型:"
|
|
label="终端客户类型:"
|
|
prop="terminalClienteleType"
|
|
prop="terminalClienteleType"
|
|
- :rules="{required: true, message: '终端客户类型不能为空', trigger: 'blur'}"
|
|
|
|
label-width="140px"
|
|
label-width="140px"
|
|
class="postInfo-container-item"
|
|
class="postInfo-container-item"
|
|
>
|
|
>
|
|
@@ -747,18 +750,8 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
rules:{
|
|
rules:{
|
|
- buildAcreage:[{required:true,message:"建筑面积不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
|
|
|
|
- landAcreage:[{required:false,validator:isNumber,trigger:'blur'}],
|
|
|
|
- evaluateValue:[{required:true,message:"评估价格不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
|
|
|
|
- checkValue:[{required:true,message:"审核价格不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
|
|
|
|
- production:[{required:true,message:"产品类型不能为空",trigger:'blur'}],
|
|
|
|
- printing:[{required:true,message:"打印份数不能为空",trigger:'blur'}],
|
|
|
|
- useAcreage:[{required:true,message:"使用权面积不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
|
|
|
|
- residueYears:[{required:false,validator:isNumber,trigger:'blur'}],
|
|
|
|
- plotRatio:[{required:false,validator:isNumber,trigger:'blur'}],
|
|
|
|
- clientTel:[{required:true,message:"委托方电话不能为空",trigger:'blur'},{validator:phoneNumber,trigger:'blur'}],
|
|
|
|
- evaluateAmount:[{required:true,message:"评估总价不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
|
|
|
|
- evaluateAcreage:[{required:true,message:"评估面积不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
|
|
|
|
|
|
+ loanLimit:[{required:true,message:"贷款额度不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
|
|
|
|
+
|
|
},
|
|
},
|
|
personal:{
|
|
personal:{
|
|
id:null,
|
|
id:null,
|
|
@@ -845,9 +838,10 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ this.personal.id = this.$route.query.id
|
|
this.couldEdit = this.$route.query.couldEdit ==='true';
|
|
this.couldEdit = this.$route.query.couldEdit ==='true';
|
|
- this.showBtn = this.$route.query.showBtn ==='true';
|
|
|
|
this.couldBack = this.$route.query.couldBack ==='true';
|
|
this.couldBack = this.$route.query.couldBack ==='true';
|
|
|
|
+ this.getPersonal();
|
|
this.getCustomerCompany(0);
|
|
this.getCustomerCompany(0);
|
|
this.getCustomerCompany(1);
|
|
this.getCustomerCompany(1);
|
|
},
|
|
},
|
|
@@ -1056,7 +1050,142 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
+ createLinkman(val){
|
|
|
|
+ this.createLinkmanVisible = true;
|
|
|
|
+ this.linkmanFrom.terminal = val;
|
|
|
|
+ this.linkmanFrom.clienteleType = this.major.clienteleType;
|
|
|
|
+ this.linkmanFrom.clienteleId = this.major.clienteleId;
|
|
|
|
+ this.linkmanFrom.clienteleSubId = this.major.clienteleSubId;
|
|
|
|
+ if (this.major.clienteleType==='企业'){
|
|
|
|
+ this.linkmanFrom.ccId = this.major.clienteleSubId
|
|
|
|
+ }else{
|
|
|
|
+ this.major.clienteleSubId = 1;
|
|
|
|
+ this.linkmanFrom.ccId = this.major.clienteleSubId;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ createTlinkman(){
|
|
|
|
+ this.createTlinkmanVisible = true;
|
|
|
|
+ this.tLinkmanFrom.terminal = 1;
|
|
|
|
+ this.major.clienteleSubId = 1;
|
|
|
|
+ this.tLinkmanFrom.ccId = this.major.clienteleSubId;
|
|
|
|
+ },
|
|
|
|
+ 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.major.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
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ 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;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.major.terminalClienteleContactId = this.tCustomerContract[0].id;
|
|
|
|
+ this.getTcontactInfo();
|
|
|
|
+ },2000)
|
|
|
|
+ this.createTlinkmanVisible=false;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ saveClient(){
|
|
|
|
+ this.$refs.terminalClientFrom.validate(valid =>{
|
|
|
|
+ if (valid){
|
|
|
|
+ this.$api.customerCompany.add(this.terminalClientFrom).then(res=>{
|
|
|
|
+ if (res.code ===200){
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '成功',
|
|
|
|
+ message: '新增客户成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.getCustomerCompany(1);
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.major.terminalClienteleId = this.tCustomerCompany[0].id;
|
|
|
|
+ this.findSubClientele(1);
|
|
|
|
+ },2000)
|
|
|
|
+ this.createTerminalClientVisible=false;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getPersonal(){
|
|
|
|
+ if (this.personal.id){
|
|
|
|
+ this.$api.personal.detail(this.personal.id).then(res=>{
|
|
|
|
+ if (res.code ===200 ){
|
|
|
|
+ res.data.credentials = JSON.parse(res.data.credentials);
|
|
|
|
+ res.data.purpose = JSON.parse(res.data.purpose);
|
|
|
|
+ this.personal = res.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ doRecall(){
|
|
|
|
+ this.$confirm('请确认是否撤回此个贷订单的业务流程?','提示',{
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ center: true
|
|
|
|
+ }).then(()=>{
|
|
|
|
+ if (this.personal.id){
|
|
|
|
+ this.$api.personal.doRecall(this.personal.id).then(res=>{
|
|
|
|
+ if (res.code ===200 && res.data){
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '成功',
|
|
|
|
+ message: '业务流程撤回成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ this.$refs.myPersonalOrder.initPageStatus(true,true);
|
|
|
|
+ this.couldEdit = true;
|
|
|
|
+ //this.$refs.myPersonalOrder.forceUpdate();
|
|
|
|
+ }else{
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '失败',
|
|
|
|
+ message: '业务流程撤回失败',
|
|
|
|
+ type: 'error',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|