|
@@ -74,15 +74,19 @@
|
|
:rules="[{ required: true, message: '请选择客户联系人' }]"
|
|
:rules="[{ required: true, message: '请选择客户联系人' }]"
|
|
:required="true"
|
|
:required="true"
|
|
:search="true"
|
|
:search="true"
|
|
- />
|
|
|
|
|
|
+ >
|
|
|
|
+ <template #button>
|
|
|
|
+ <div @click="openCreateLinkmanPopup()">新增</div>
|
|
|
|
+ </template>
|
|
|
|
+ </VanSinglePicker>
|
|
<van-field label="中介" v-model="personal.agent" name="agent" placeholder="请输入中介" />
|
|
<van-field label="中介" v-model="personal.agent" name="agent" placeholder="请输入中介" />
|
|
<van-field label="贷款性质" v-model="personal.loanNature" name="loanNature" placeholder="请输入贷款性质" />
|
|
<van-field label="贷款性质" v-model="personal.loanNature" name="loanNature" placeholder="请输入贷款性质" />
|
|
<van-field label="贷款用途" v-model="personal.loanAim" name="loanAim" placeholder="请输入贷款用途" />
|
|
<van-field label="贷款用途" v-model="personal.loanAim" name="loanAim" placeholder="请输入贷款用途" />
|
|
- <van-field label="贷款额度" v-model="personal.loanLimit" name="loanLimit" type="number" placeholder="请输入贷款额度" :rules="[{ required: true, message: '请输入贷款额度' }]" required >
|
|
|
|
- <template #button> 万元 </template>
|
|
|
|
|
|
+ <van-field label="贷款额度" v-model="personal.loanLimit" name="loanLimit" type="number" placeholder="请输入贷款额度" :rules="[{ required: true, message: '请输入贷款额度' }]" required>
|
|
|
|
+ <template #button>万元</template>
|
|
</van-field>
|
|
</van-field>
|
|
- <van-field label="贷款期限" v-model="personal.loanPeriod" name="loanPeriod" type="number" placeholder="请输入贷款期限" >
|
|
|
|
- <template #button> 年 </template>
|
|
|
|
|
|
+ <van-field label="贷款期限" v-model="personal.loanPeriod" name="loanPeriod" type="number" placeholder="请输入贷款期限">
|
|
|
|
+ <template #button>年</template>
|
|
</van-field>
|
|
</van-field>
|
|
<van-field name="loanExpire" label="贷款是否到期">
|
|
<van-field name="loanExpire" label="贷款是否到期">
|
|
<template #input>
|
|
<template #input>
|
|
@@ -112,14 +116,34 @@
|
|
</div>
|
|
</div>
|
|
</van-form>
|
|
</van-form>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <!-- 新增客户联系人弹窗 -->
|
|
|
|
+ <van-popup v-model:show="showCreateLinkman" round :style="{ padding: '10px' }">
|
|
|
|
+ <van-form @submit="saveLinkman()">
|
|
|
|
+ <van-cell-group inset>
|
|
|
|
+ <van-field label="联系人姓名" v-model="linkman.name" name="name" placeholder="请输入联系人姓名" :rules="[{ required: true, message: '请输入联系人姓名' }]" required />
|
|
|
|
+ <van-field
|
|
|
|
+ label="联系电话"
|
|
|
|
+ v-model="linkman.mobile"
|
|
|
|
+ name="mobile"
|
|
|
|
+ type="tel"
|
|
|
|
+ placeholder="请输入联系电话"
|
|
|
|
+ :rules="[{ required: true, message: '请输入联系电话' },{message:'联系电话格式错误',pattern:new RegExp(/^(1\d{10})$|\d{3}-\d{8}|\d{4}-\d{7}$/)}]"
|
|
|
|
+ required
|
|
|
|
+ />
|
|
|
|
+ <van-button round block type="primary" native-type="submit">提交</van-button>
|
|
|
|
+ </van-cell-group>
|
|
|
|
+ </van-form>
|
|
|
|
+ </van-popup>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
|
|
+import { showDialog } from 'vant';
|
|
import { mapStores } from 'pinia';
|
|
import { mapStores } from 'pinia';
|
|
import { useUserStore } from '@/stores/useUserStore';
|
|
import { useUserStore } from '@/stores/useUserStore';
|
|
import { showNotify } from 'vant';
|
|
import { showNotify } from 'vant';
|
|
import VanSinglePicker from '@/components/VanSinglePicker/index.vue';
|
|
import VanSinglePicker from '@/components/VanSinglePicker/index.vue';
|
|
-import { customerLinkmanDrop } from '@/api/customerLinkman';
|
|
|
|
|
|
+import { customerLinkmanDrop, add as addLinkman } from '@/api/customerLinkman';
|
|
import { customerCompanyDrop } from '@/api/customerCompany';
|
|
import { customerCompanyDrop } from '@/api/customerCompany';
|
|
import { add } from '@/api/personal';
|
|
import { add } from '@/api/personal';
|
|
import { commit } from '@/api/workflow';
|
|
import { commit } from '@/api/workflow';
|
|
@@ -169,6 +193,9 @@ export default {
|
|
bailorbTel: null,
|
|
bailorbTel: null,
|
|
remark: null,
|
|
remark: null,
|
|
},
|
|
},
|
|
|
|
+ // 新增联系人弹窗
|
|
|
|
+ showCreateLinkman: false,
|
|
|
|
+ linkman: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -258,6 +285,58 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 打开新增联系人popup
|
|
|
|
+ openCreateLinkmanPopup() {
|
|
|
|
+ this.linkman = {};
|
|
|
|
+ if (this.personal.clienteleType) {
|
|
|
|
+ if (this.personal.clienteleType === '企业') {
|
|
|
|
+ if (this.personal.clienteleSubId) {
|
|
|
|
+ this.showCreateLinkman = true;
|
|
|
|
+ this.linkman.terminal = false;
|
|
|
|
+ this.linkman.ccId = this.personal.clienteleSubId;
|
|
|
|
+ } else {
|
|
|
|
+ showDialog({
|
|
|
|
+ message: '未选择客户名称与业务来源',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.showCreateLinkman = true;
|
|
|
|
+ this.linkman.terminal = false;
|
|
|
|
+ this.linkman.ccId = 1;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ showDialog({
|
|
|
|
+ message: '未选择客户类型',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 新增客户联系人
|
|
|
|
+ saveLinkman() {
|
|
|
|
+ addLinkman(this.linkman).then((res) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ showNotify({ type: 'success', message: '新增成功' });
|
|
|
|
+ }
|
|
|
|
+ // ccId 不等于1说明新增的企业类型的客户联系人
|
|
|
|
+ if (this.linkman.ccId !== 1) {
|
|
|
|
+ this.findCustomerContract();
|
|
|
|
+ } else {
|
|
|
|
+ // 个人类型直接获取客户联系人
|
|
|
|
+ let simpleAll = new Object();
|
|
|
|
+ simpleAll.ccId = 1;
|
|
|
|
+ simpleAll.terminal = 0;
|
|
|
|
+ customerLinkmanDrop(simpleAll).then((res) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ // 使用 map 方法提取 id 和 name 属性
|
|
|
|
+ this.customerContractColumns = res.data.map((item) => ({
|
|
|
|
+ value: String(item.id),
|
|
|
|
+ text: String(item.name),
|
|
|
|
+ }));
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.showCreateLinkman = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 个贷下单
|
|
// 个贷下单
|
|
addPersonalOrder() {
|
|
addPersonalOrder() {
|
|
// 将数组转换成JSON字符串后会影响表单的双向绑定,所以新建一个对象
|
|
// 将数组转换成JSON字符串后会影响表单的双向绑定,所以新建一个对象
|