You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1329 lines
47 KiB

<template>
<view class="evan-form-show">
<view class="bottom-border">
<view class="left-border"><text class="mgl10">基本信息</text></view>
</view>
<uni-forms :value="formData" ref="form" validate-trigger="bind" err-show-type="toast">
<uni-forms-item required name="cusType" :label="fromData[0]?fromData[0].name:'客户类型'">
<uni-data-checkbox disabled v-model="cusType" :localdata="cusTypeList"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item name="code" required :label="fromData[1]?fromData[1].name:'客户编号'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.code" :placeholder="fromData[1]&&fromData[1].prompt?fromData[1].prompt:'请输入客户编号'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="name" required :label="fromData[2]&&fromData[2].name?fromData[2].name:'客户名称'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.name" :placeholder="fromData[2]&&fromData[2].prompt?fromData[2].prompt:'请输入客户名称'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="socialUnifiedCode" :label="fromData[3]&&fromData[3].name?fromData[3].name:'社会统一代码'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.socialUnifiedCode" :placeholder="fromData[3]&&fromData[3].prompt?fromData[3].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[4]&&fromData[4].name?fromData[4].name:'联系电话'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.phone" :placeholder="fromData[4]&&fromData[4].prompt?fromData[4].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="registerTime" :label="fromData[5]&&fromData[5].name?fromData[5].name:'注册时间'">
<picker disabled class="disabled" mode="date" :value="enterpriseForm.registerTime" @change="bindDateChange">
<view disabled class="picker-view flex-between">
<text>{{enterpriseForm.registerTime ? enterpriseForm.registerTime : '请选择'}}</text>
<text class="cuIcon-unfold lg text-gray"></text>
</view>
</picker>
</uni-forms-item>
<uni-forms-item name="registeredCapital" :label="fromData[6]&&fromData[6].name?fromData[6].name:'注册资金(万元)'">
<uni-easyinput disabled type="digit" :inputBorder="true" v-model="enterpriseForm.registeredCapital" :placeholder="fromData[6]&&fromData[6].prompt?fromData[6].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="empNum" :label="fromData[8]&&fromData[8].name?fromData[8].name:'员工人数'">
<uni-easyinput disabled type="number" :inputBorder="true" v-model="enterpriseForm.empNum" :placeholder="fromData[8]&&fromData[8].prompt?fromData[8].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="registerAddr" :label="fromData[7]&&fromData[7].name?fromData[7].name:'注册地址'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.registerAddr" :placeholder="fromData[7]&&fromData[7].prompt?fromData[7].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item :label="fromData[9]&&fromData[9].name?fromData[9].name:'经营地址'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.businessAddr" :placeholder="fromData[9]&&fromData[9].prompt?fromData[9].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="businessSource" required :label="fromData[10]&&fromData[10].name?fromData[10].name:'业务类别'">
<picker disabled mode="selector" :range="businessType" range-key="key" :value="businessApply.businessType" @change="bindBusinessType">
<view style="background: #eee;" class="picker-view flex-between">
<text>{{businessApply.businessType ? businessApply.businessType : '请选择'}}</text>
<text class="cuIcon-unfold lg text-gray"></text>
</view>
</picker>
</uni-forms-item>
<uni-forms-item name="businessScope" :label="fromData[11]&&fromData[11].name?fromData[11].name:'经营范围'">
<uni-easyinput disabled type="textarea" :inputBorder="true" v-model="enterpriseForm.businessScope" :placeholder="fromData[11]&&fromData[11].prompt?fromData[11].prompt:'请输入经营范围'"></uni-easyinput>
</uni-forms-item>
</uni-forms>
<view class="bottom-border">
<view class="left-border"><text class="mgl10">法人信息</text></view>
</view>
<uni-forms :value="enterpriseFrom" ref="form" validate-trigger="bind" err-show-type="toast">
<uni-forms-item name="legalName" :label="fromData[12]&&fromData[12].name?fromData[12].name:'姓名'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.legalName" :placeholder="fromData[12]&&fromData[12].prompt?fromData[12].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item disabled name="legalGender" :label="fromData[13]&&fromData[13].name?fromData[13].name:'性别'">
<uni-data-checkbox :disabled="true" v-model="enterpriseForm.legalGender" :localdata="genderList"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item name="legalIdNumber" :label="fromData[14]&&fromData[14].name?fromData[14].name:'身份证号码'">
<uni-easyinput disabled type="idcard" :inputBorder="true" v-model="enterpriseForm.legalIdNumber" :placeholder="fromData[14]&&fromData[14].prompt?fromData[14].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="legalHukouAddr" :label="fromData[16]&&fromData[16].name?fromData[16].name:'户口所在地'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.legalHukouAddr" :placeholder="fromData[16]&&fromData[16].prompt?fromData[16].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="legalPhone" :label="fromData[15]&&fromData[15].name?fromData[15].name:'联系电话'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.legalPhone" :placeholder="fromData[15]&&fromData[15].prompt?fromData[15].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="legalHomeAddr" :label="fromData[17]&&fromData[17].name?fromData[17].name:'家庭住址'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.legalHomeAddr" :placeholder="fromData[17]&&fromData[17].prompt?fromData[17].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item required name="isExist" :label="fromData[18]&&fromData[18].name?fromData[18].name:'是否存在关联人'">
<uni-data-checkbox @change="hasLinkman" v-model="enterpriseForm.isExistRelated" :localdata="isExistList"></uni-data-checkbox>
</uni-forms-item>
</uni-forms>
<!-- 展示关联人,传递handle默认false不禁用,传递companyId调用获取关联人接口 -->
<linkMan v-if="enterpriseForm.isExistRelated==1" :handle="true" :companyId="companyId"></linkMan>
<view class="bottom-border">
<view class="left-border"><text class="mgl10">申请贷款相关信息</text></view>
</view>
<uni-forms :value="enterpriseFrom" ref="form" validate-trigger="bind" err-show-type="toast">
<uni-forms-item required name="cusType" :label="fromData[19]&&fromData[19].name?fromData[19].name:'申请额度(万元)'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.applyAmount" :placeholder="fromData[19]&&fromData[19].prompt?fromData[19].prompt:'请输入申请额度'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item required name="gender" :label="fromData[20]&&fromData[20].name?fromData[20].name:'申请期限'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.applyTime" :placeholder="fromData[20]&&fromData[20].prompt?fromData[20].prompt:'申请期限'"></uni-easyinput>
<!-- <picker mode="selector" :range="timelimitDatas" range-key="label" :value="enterpriseForm.applyTime" >
<view style="background: #eee;" class="picker-view flex-between">
<text>{{enterpriseForm.applyTime ? enterpriseForm.applyTime : '请选择申请期限'}}</text>
<text class="cuIcon-unfold lg text-gray"></text>
</view>
</picker> -->
</uni-forms-item>
<uni-forms-item name="name" required :label="fromData[21]&&fromData[21].name?fromData[21].name:'贷款银行'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="mainbank" :placeholder="fromData[21]&&fromData[21].prompt?fromData[21].prompt:'请输入银行名称'"></uni-easyinput>
<!-- <view class="comBox" style="background: #eee;">
<uni-combox disabled :inputBorder="true" v-model="mainbank" @input="bankgroup($event,'main')" placeholder="请输入银行名称"></uni-combox>
</view> -->
</uni-forms-item>
<uni-forms-item name="name" label="分行">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="elsebank" @input="bankgroup($event,'else')" placeholder="分行名称"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="name" required :label="fromData[22]&&fromData[22].name?fromData[22].name:'贷款用途'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.amountWide" :placeholder="fromData[22]&&fromData[22].prompt?fromData[22].prompt:'贷款用途'"></uni-easyinput>
<!-- <picker mode="selector" :range="applyDatas" range-key="label" :value="enterpriseForm.amountWide" @change="applyClicked">
<view style="background: #eee;" class="picker-view flex-between">
<text>{{enterpriseForm.amountWide ? enterpriseForm.amountWide : '请选择'}}</text>
<text class="cuIcon-unfold lg text-gray"></text>
</view>
</picker> -->
</uni-forms-item>
<uni-forms-item v-if="enterpriseForm.amountWide=='其他'" name="name" label="其他贷款用途">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.otherAmountWide" placeholder="其他贷款用途"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="enGuaranteeMeasures" required :label="fromData[23]&&fromData[23].name?fromData[23].name:'反担保措施'">
<uni-data-checkbox multiple mode="list" v-model="businessApply.enGuaranteeMeasures" :localdata="easuresList"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item name="name" required label="反担保措施描述">
<uni-easyinput disabled type="textarea" v-model="enterpriseForm.description" :placeholder="fromData[23]&&fromData[23].prompt?fromData[23].prompt:'请输入反担保措施描述'"></uni-easyinput>
</uni-forms-item>
</uni-forms>
<view class="bottom-border">
<view class="left-border"><text class="mgl10">附件</text></view>
</view>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[24].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[24]&&fromData[24].name?fromData[24].name:'上传营业执照'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,0)" :files="filesArray[0]" :handle="handle=='servey'"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[25].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[25]&&fromData[25].name?fromData[25].name:'上传法定代表人夫妻及企业实际经营者身份证附件'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,1)" :files="filesArray[1]" :handle="handle=='servey'"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[26].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[26]&&fromData[26].name?fromData[26].name:'上传法定代表人夫妻户口本、结婚证(离婚证)'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,2)" :files="filesArray[2]" :handle="handle=='servey'"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[27].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[27]&&fromData[27].name?fromData[27].name:'上传法定代表人身份证证明'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,3)" :files="filesArray[3]" :handle="handle=='servey'"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[28].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[28]&&fromData[28].name?fromData[28].name:'上传公司章程'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,4)" :files="filesArray[4]" :handle="handle=='servey'"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[29].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[29]&&fromData[29].name?fromData[29].name:'上传由会计师事务所审计的上一年度及本年度审计报告'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,5)" :files="filesArray[5]" :handle="handle=='servey'"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[30].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[30]&&fromData[30].name?fromData[30].name:'上传股东会会议纪要'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,6)" :files="filesArray[6]" :handle="handle=='servey'"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[31].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[31]&&fromData[31].name?fromData[31].name:'上传谈话纪要'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,7)" :files="filesArray[7]" :handle="handle=='servey'"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[32].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[32]&&fromData[32].name?fromData[32].name:'上传考察图片'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,8)" :files="filesArray[8]" :handle="handle=='servey'"></upload>
<!-- 调查员审核 -->
<view class="margin-top" v-if="handle==='servey'||roleSurvey&&handle=='watch'">
<view class="self">
<text style="color: #00B9FF;" class="label-audit">审核意见</text>
<uni-easyinput :disabled="roleSurvey&&handle=='watch'" type="textarea" v-model="survey.applyContent" placeholder="请输入审核意见"></uni-easyinput>
</view>
</view>
<!-- 领导的审核框 -->
<view class="" v-if="handle==='audit'||roleManager&&handle=='watch'||roleLeader&&handle=='watch'">
<view class="bottom-border">
<view class="left-border"><text class="mgl10">审核</text></view>
</view>
<view class="margin-top">
<uni-forms :value="enterpriseFrom" ref="form" validate-trigger="bind" err-show-type="toast">
<uni-forms-item name="cusType" label="申请额度(万元)">
<uni-easyinput :disabled="roleManager&&handle=='watch'||roleLeader&&handle=='watch'" type="digit" :inputBorder="true" v-model="auditFrom.amount" placeholder="请输入申请额度"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="gender" label="期限">
<picker :disabled="roleManager&&handle=='watch'||roleLeader&&handle=='watch'" :class="roleManager&&handle=='watch'||roleLeader&&handle=='watch'?'disabled':''" mode="selector" :range="timelimitDatas" range-key="label" :value="auditFrom.term" @change="termTimeClicked" @cancel="applyTimeCencle">
<view class="picker-view flex-between">
<text>{{auditFrom.term ? auditFrom.term : '请选择申请期限'}}</text>
<text class="cuIcon-unfold lg text-gray"></text>
</view>
</picker>
</uni-forms-item>
<uni-forms-item name="gender" label="补充调查原因">
<uni-data-checkbox multiple mode="list" v-model="auditFrom.remark" :localdata="replenish"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item name="cusType" label="其他原因">
<uni-easyinput :disabled="roleManager&&handle=='watch'||roleLeader&&handle=='watch'" type="text" :inputBorder="true" v-model="auditFrom.otherRemark" placeholder="请输入其他原因"></uni-easyinput>
</uni-forms-item>
</uni-forms>
<view class="self">
<text style="color: #00B9FF;" class="label-audit">审核意见</text>
<uni-easyinput :disabled="roleManager&&handle=='watch'||roleLeader&&handle=='watch'" type="textarea" v-model="auditFrom.applyContent" placeholder="请输入审核意见"></uni-easyinput>
</view>
</view>
</view>
<view class="foot-btn btn-rig pad-bt">
<button v-if="handle==='watch'" plain class="mini-btn round plain-btn margin-top" type="primary" size="mini" @click="back()">返回</button>
<!-- 调查按钮 -->
<view v-if="handle==='servey'" class="margin-top">
<button plain class="mini-btn round plain-btn mar-lr" type="primary" size="mini" @click="back()">返回</button>
<button class="mini-btn round def-btn mar-lr" type="primary" size="mini" @click="guaranteeSurvey(6)">保存</button>
<button class="mini-btn round suc-btn mar-lr" type="primary" size="mini" @click="guaranteeSurvey(1)">同意</button>
<button class="mini-btn round cancel-btn" type="primary" size="mini" @click="guaranteeSurvey(4)">驳回</button>
</view>
<!-- 审核按钮 -->
<view v-if="handle==='audit'" class="margin-top">
<button plain class="mini-btn round plain-btn mar-lr" type="primary" size="mini" @click="back()">返回</button>
<button class="mini-btn round suc-btn" type="primary" size="mini" @click="guaranteeleader(1)">同意</button>
<button class="mini-btn round ref-btn mar-lr" type="primary" size="mini" @click="guaranteeleader(3)">拒绝</button>
<button class="mini-btn round cancel-btn" type="primary" size="mini" @click="guaranteeleader(4)">驳回</button>
</view>
</view>
<view class="flex wd100 margin-tb-sm">
<view class="flex wd45">
<text>A角:</text><text>{{&nbsp; Aname}}</text>
</view>
<view class="flex wd45">
<text>B角</text><text>{{&nbsp; Bname}}</text>
</view>
</view>
<timeline></timeline>
</view>
</template>
<script>
import utils from '@/components/evan-form/utils.js'
import upload from '../../../components/pretty-uploadFile/pretty-uploadFile.vue'
const CONTACT_INFO={
name:'',
phone:'',
duty:''
}
export default {
components: {
upload
},
data() {
return {
Aname:'',
Bname:'',
cusTypeList: [
// {//客户类型列表
// text: '个人',
// value: '1',
// disabled: true
// },
{
text: '企业',
value: '2',
disabled: true
}],
// linkTypeList: [{//客户类型列表--关联人
// text: '个人',
// value: "0",
// // disabled: true
// },
// {
// text: '企业',
// value: "1",
// // disabled: false
// }],
cusType: '2',
employeeMsg: [{
name: '个人',
value: '3'
},
{
name: '企业',
value: '4'
}],//客户经理列表
// genders: [{//性别列表-禁用
// text: '男',
// value: 1,
// },
// {
// text: '女',
// value: 0,
// }],
genderList: [{//性别列表-禁用
text: '男',
value: 1,
disabled:true
},
{
text: '女',
value: 0,
disabled:true
}],
easuresList: [{// 反担保措施的值
text: '第三方保证',
value: '第三方保证',
},
{
text: '抵押',
value: '抵押',
},
{
text: '个人无限责任连带',
value: '个人无限责任连带',
},
{
text: '质押',
value: '质押',
}],
imgList: [],
maritalList: ['未婚','已婚','离异','再婚'],//婚姻状况列表
educationList: ['本科','大专','高职','中专','其他'],//学历列表
isExistList: [{//是否存在关联人列表
text: '否',
value: 0,
disabled: true
},
{
text: '是',
value: 1,
disabled: true
}],
manager: '',
enterpriseFrom: {
maritalStatus: 0,//婚姻状况
gender: 1,//性别
education: 0, //学历
legalGender: 1, //关联人性别
isExistRelated: 0, //是否存在关联人
enGuaranteeMeasures: ''
},//个人form
enterpriseForm: {},//企业form
hideRequiredAsterisk: false,
// 表单的内容必须初始化
info: {
name: '',
email: '',
desc: '',
phone: '',
sex: '',
},
rules: {
cusType: {
required: true,
message: '请选择客户'
},
code: {
required: true,
message: '请选择客户编号'
},
manager: {
required: true,
message: '请选择客户经理'
},
name: {
required: true,
message: '请输入姓名'
},
email: [{
required: true,
message: '请输入邮箱'
}, {
type: 'email',
message: '邮箱格式不正确'
}],
desc: [{
required: true,
message: '请输入简介'
},
{
min: 10,
max: 30,
message: '简介必须在10到30个字之间'
}
],
phone: [{
required: true,
message: '请输入手机号'
},
{
validator: (rule, value, callback) => {
// 注意这里如果用的是methods里的isMobilePhone将不生效
if (this.$utils.isMobilePhone(value)) {
callback()
} else {
callback(new Error('手机号格式不正确'))
}
}
},
// 或者这样也是可以的
// {
// validator: this.isMobile
// }
],
sex: {
required: true,
message: '请选择性别'
}
},
info2:{
name:'',
email:'',
phone:''
},
rules2:{
name: {
required: true,
message: '请输入姓名'
},
email: [{
required: true,
message: '请输入邮箱'
}, {
type: 'email',
message: '邮箱格式不正确'
}],
phone:[{
required: true,
message: '请输入手机号'
},
{
pattern:'^1\\d{10}$', // 注意这里由于小程序的缘故正则表达式需要通过string的方式传递并且去除两边的斜杠,中间的斜杠变成两个斜杠
message:'手机号格式不正确'
}
]
},
dynamicInfo:{
test1:'',
test2:'',
list:[{...CONTACT_INFO}]
},
dynamicRules:{
test1:[{required:true,message:'请输入rule规则字段'},{min:4,max:8,message:'必须4-8位'}]
},
businessType:[//业务类型
{
key:'担保',
value:'担保'
},
{
key:'借贷',
value:'借贷'
},
{
key:'小额贷',
value:'小额贷'
},
{
key:'企业大贷',
value:'企业大贷'
}
],
timelimitDatas:[ // 多选框选项
{ value: '1个月', label: '1个月' },
{ value: '3个月', label: '3个月' },
{ value: '6个月', label: '6个月' },
{ value: '9个月', label: '9个月' },
{ value: '12个月', label: '12个月' },
{ value: '24个月', label: '24个月' },
],
replenish:[
{ value: '资料不全', text: '资料不全' },
{ value: '贷款用途不合理', text: '贷款用途不合理' },
{ value: '资料不符合要求', text: '资料不符合要求' },
{ value: '其他', text: '其他' }
],
showRuleParam:true,
showRequiredParam:true,
mobileRules:[{required:true,message:'请输入手机号'},{pattern:'^1\\d{10}$',message:'手机号格式不正确'}], // 注意这里由于小程序的缘故正则表达式需要通过string的方式传递并且去除两边的斜杠,中间的斜杠变成两个斜杠
handle:'',// 操作状态
getItem:{},// 取得传递的所有值
businessId:'',// 取得业务id
businessAuditParameter:{},// 审核用
clientMessageFrom:{},// 关联人列表处使用
businessApply:{// 提交调查的值
enGuaranteeMeasures:[]
},// 展示值
mainbank:'',// 银行
elsebank:'',// 分行
auditFrom:{
remark:[],
},// 审核提交的值
survey:{},// 调查提交的值
filesArray:[],// 展示的数据
nowRole:'',// 当前的角色+查看判定,查看自己的审核
roleSurvey:false,// 是否调查员
roleManager:false,// 是否经理审核
roleLeader:false,// 是否领导审核
companyId:'',
fromData: [],
upDataArr: [],
uploadFileList: []
}
},
created() {
// 判断来自待处理否
if(uni.getStorageSync('decideIndex')){
let data = JSON.parse(uni.getStorageSync('decideIndex'))
this.getItem.id = data.detailId
this.businessId = data.businessId
if(data.btn==='调查'){
this.handle = 'servey'
}else{// 审核
this.handle = 'audit'
}
uni.removeStorageSync('decideIndex')
}else if(uni.getStorageSync('copyData')){
let data = JSON.parse(uni.getStorageSync('copyData'))
this.handle = 'watch'
this.businessId = data.businessId
this.getItem.id = data.detailId
}else{
this.handle = uni.getStorageSync('handleGe')// 取得操作状态
}
if(uni.getStorageSync('applyMsg')){ // 取得传参,取得ID等
this.getItem = JSON.parse(uni.getStorageSync('applyMsg'))
this.businessId = this.getItem.businessId
}
// 判断情况禁用
if(this.handle!=='survey'){
this.easuresList.map(e=>{ // 禁用反担保措施勾选项
e.disabled = true
})
}
if(this.handle!=='audit'){
this.replenish.map(e=>{ // 禁用反担保措施勾选项
e.disabled = true
})
}
this.getGEdetails()// 详情
// 判断调查员,经理,领导
this.roleSurvey = this.judgeRole('59,60')
this.roleManager = this.judgeRole('58')
this.roleLeader = this.judgeRole('61')
this.designFrom()
},
destroyed() {// 销毁组件操作
uni.removeStorageSync('handleGe')
uni.removeStorageSync('applyMsg')
uni.removeStorageSync('copyData')
},
mounted() {
// 这里必须放在mounted中,不然h5,支付宝小程序等会找不到this.$refs.form
this.$refs.form.setRules(this.rules)
},
methods: {
designFrom(){// 表单数据接口
this.$http.get('/api-guarantee/form/design/list',{
processId: 2
}).then(res=>{
if(!res.data||res.data.length==0) return
this.fromData = res.data
this.fromData.sort(this.compare('id'))// 排序对象
this.upDataArr = []
this.upDataArr.push(this.fromData[24].ifRequired,this.fromData[25].ifRequired,this.fromData[26].ifRequired,this.fromData[27].ifRequired,this.fromData[28].ifRequired,this.fromData[29].ifRequired,this.fromData[30].ifRequired,this.fromData[31].ifRequired,this.fromData[32].ifRequired )
this.uploadFileList = []
this.uploadFileList.push(this.fromData[24].name,this.fromData[25].name,this.fromData[26].name,this.fromData[27].name,this.fromData[28].name,this.fromData[29].name,this.fromData[30].name,this.fromData[31].name)
})
},
compare(key){ // 用于对象数组排序
return function(value1,value2){
let val1=value1[key];
let val2=value2[key];
return val1-val2;
}
},
// 判断角色权限方法--小程序版
judgeRole(role){
let roleArr = uni.getStorageSync('roleArr')
if (roleArr.includes(role)) return true
else return false
},
termTimeClicked(e){// 经理审核-期限赋值
this.$set(this.auditFrom,'term',this.timelimitDatas[+e.detail.value].value)
},
applyTimeCencle(e){// 申请期限取消赋值
this.$set(this.auditFrom,'term','')
},
applyTimeClicked(e){// 补充调查原因选择赋值
this.$set(this.auditFrom,'remark',this.replenish[+e.detail.value].value)
},
bindBusinessType(e){// 业务类型赋值
this.$set(this.businessApply,'businessType',this.businessType[+e.detail.value].value)
},
bindDateChange(e) {//注册时间选择
this.enterpriseForm.registerTime = e.detail.value
},
//客户类型选择
cusChange(e) {
this.cusType = e.detail.value
},
//性别选择
genderChange(e) {
this.personageForm.gender = e.detail.value
},
//婚姻状况选择
maritalChange(e) {
this.personageForm.maritalStatus = e.detail.value
},
//学历选择
educationChange(e) {
this.personageForm.education = e.detail.value
},
//关联人性别选择
legalGenderChange(e) {
this.personageForm.legalGender = e.detail.value
},
isExistChange(e) {
this.personageForm.isExistRelated = e.detail.value
},
bindPickerChange: function(e) {
// this.cusType = e.target.value
},
save() {
this.$refs.form.validate((res) => {
if (res) {
uni.showToast({
title: '验证通过'
})
}
})
},
promiseSave(){
this.$refs.form.validate().then((res)=>{
uni.showToast({
title: '验证通过'
})
}).catch(()=>{
})
},
async asyncSave(){
try{
const result=await this.$refs.form.validate()
if(result){
uni.showToast({
title: '验证通过'
})
}
} catch(e){
}
},
saveForm2(){
this.$refs.form2.validate((res) => {
if (res) {
uni.showToast({
title: '验证通过'
})
}
})
},
utilsSave() {
utils.validate(this.info, this.rules, (res, errors) => {
if (res) {
uni.showToast({
title: '验证通过'
})
}
})
},
validateSingle() {
this.$refs.form.validateField('email', (res) => {
if (res) {
uni.showToast({
title: '验证通过'
})
}
})
},
validateMultiple() {
this.$refs.form.validateField(['email', 'phone'], (res) => {
if (res) {
uni.showToast({
title: '验证通过'
})
}
})
},
isMobilePhone() {
const reg = /^1\d{10}$/
if (reg.test(value)) {
return true
}
return false
},
isMobile(rule, value, callback) {
if (this.$utils.isMobilePhone(value)) {
callback()
} else {
callback(new Error('手机号格式不正确'))
}
},
sexChange(e) {
this.info.sex = e.detail.value
},
addContact(){
this.dynamicInfo.list.push({...CONTACT_INFO})
},
deleteContact(index){
this.dynamicInfo.list.splice(index,1)
},
toggleRuleParam(){
this.showRuleParam=!this.showRuleParam
},
toggleRequiredParam(){
this.showRequiredParam=!this.showRequiredParam
},
dynamicSave(){
this.$refs.dynamicForm.validate((res)=>{
if(res){
uni.showToast({
title: '验证通过'
})
}
})
},
ViewImage(img,index) {
let urls = ''
// 12个上传文件得分别匹配
switch (index){
case 1:
urls = this.survey.businessLicense
break;
case 2:
urls = this.survey.legalCardCopy
break;
case 3:
urls = this.survey.marriageCopy
break;
case 4:
urls = this.survey.legalCopy
break;
case 5:
urls = this.survey.companyConstitution
break;
case 6:
urls = this.survey.accountingFirm
break;
case 7:
urls = this.survey.meetingMinutes
break;
case 8:
urls = this.survey.conversationSummary
break;
case 9:
urls = this.survey.inspectionPhotos
break;
default:
break;
}
uni.previewImage({
urls: urls,
current: img
});
},
DelImg(val,index) {
uni.showModal({
title: '提示',
content: '确定要删除该文件吗?',
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
switch (val) {// 分别删除
case '1':
this.survey.businessLicense.splice(index,1)
break;
case '2':
this.survey.legalCardCopy.splice(index,1)
break;
case '3':
this.survey.marriageCopy.splice(index,1)
break;
case '4':
this.survey.legalCopy.splice(index,1)
break;
case '5':
this.survey.companyConstitution.splice(index,1)
break;
case '6':
this.survey.accountingFirm .splice(index,1)
break;
case '7':
this.survey.meetingMinutes.splice(index,1)
break;
case '8':
this.survey.conversationSummary.splice(index,1)
break;
case '9':
this.survey.inspectionPhotos.splice(index,1)
break;
default:
break;
}
}
}
})
},
// 选择图片上传
ChooseImage(str) {
uni.chooseImage({
count: 4, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: (res) => {
if (this.imgList.length != 0) {
this.imgList = this.imgList.concat(res.tempFilePaths)
} else {
this.imgList = res.tempFilePaths
}
uni.uploadFile({
url: 'https://www.huorantech.cn/api-guarantee/dg-apply-amount-info/uploadFile',
filePath: res.tempFilePaths[0],
name: 'file',
header: {
"Content-Type": "multipart/form-data",
"token": 'eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIzIiwic3ViIjoidG9rZW4iLCJpc3MiOiLmnY7lm5siLCJpYXQiOjE2MTIzMzI0MTgsImV4cCI6MTYxMjQxODgxOH0.mMMluvfIqgPeNDy6ZEs4-QgqToxkDHbgLnx0tgppkKo'
},
success: (uploadFileRes) => {
// 12个上传,一一对应字段,分别push进去
let res = JSON.parse(uploadFileRes.data),
data = res.data
switch (str){
case 1:this.survey.businessLicense.push(data[0])
break;
case 2:this.survey.legalCardCopy.push(data[0])
break;
case 3:this.survey.marriageCopy.push(data[0])
break;
case 4:this.survey.legalCopy.push(data[0])
break;
case 5:this.survey.companyConstitution.push(data[0])
break;
case 6:this.survey.accountingFirm.push(data[0])
break;
case 7:this.survey.meetingMinutes.push(data[0])
break;
case 8:this.survey.conversationSummary.push(data[0])
break;
case 9:this.survey.inspectionPhotos.push(data[0])
break;
default:
break;
}
}
})
}
});
},
// 获取表单详情
getGEdetails(){
this.$http.get('/api-guarantee/dg-guarantee-assign-user/guaranteeDetail',{id:this.getItem.id}).then(res=>{
// dgApplyAmountInfo//业务详情
// dgEnclosureInfo//附件详情
// dgBusinessCompany//企业信息
this.Aname = res.data.assignUser.aname
this.Bname = res.data.assignUser.bname
let apply = res.data.dgApplyAmountInfo
let reg = new RegExp(' ','g')//删除字符里的空格
this.businessAuditParameter.id = this.businessId//审核用-业务id
this.businessAuditParameter.companyId = apply.companyId//审核用-企业id
this.companyId = apply.companyId
this.businessApply={
companyId:apply.companyId,
businessType:apply.businessType,
isExistRelated:apply.isExistRelated,
applyAmount:apply.applyAmount,
bank:apply.bank,
applyTime:apply.applyTime,
amountWide:apply.amountWide,
enGuaranteeMeasures:apply.enGuaranteeMeasure,
description:apply.description,
customerType:apply.customerType
}
this.businessApply.enGuaranteeMeasures.join(",")// 小程序端,处理反担保展示
this.enterpriseForm = res.data.dgBusinessCompany//企业详情
this.enterpriseForm.description = apply.description// 反担保描述
this.enterpriseForm.applyAmount = apply.applyAmount
this.enterpriseForm.applyTime = apply.applyTime
this.enterpriseForm.amountWide = apply.amountWide
this.enterpriseForm.otherAmountWide = apply.otherAmountWide
if(res.data.dgBusinessCompany!==null){
this.name = res.data.dgBusinessCompany.name//客户名称
this.$set(this.businessApply,'isExistRelated',+res.data.dgBusinessCompany.isExistRelated)//是否存在关联人
this.clientMessageFrom.customerId = res.data.dgEnclosureInfo.companyId//企业id
this.enterpriseForm.customerId = res.data.dgEnclosureInfo.companyId
this.code = res.data.dgBusinessCompany.code //客户编号
if(this.businessApply.isExistRelated){
this.getLinkmanList()
}
}
if(this.businessApply.bank){//银行字符串处理
let across = this.businessApply.bank.indexOf('-')
if(across!==-1){
this.mainbank = this.businessApply.bank.substring(0,across)
let len = this.businessApply.bank.length
this.elsebank = this.businessApply.bank.substring(across+1,len)
}else{
this.mainbank = this.businessApply.bank
}
}
let files = res.data.dgEnclosureInfo
// 删除文件首个的双引号
for(let item in files){
if(files[item]&&files[item].length&&files[item][0]===''){
files[item].splice(0,1)
}
}
// 经理领导查看的时候
if(this.roleManager&&this.handle=='watch'||this.roleLeader&&this.handle=='watch'){
let data = res.data.assignUser
if(!data) return false
this.$set(this.auditFrom,'amount',data.amount)
this.$set(this.auditFrom,'term',data.term)
if(data.remark&&data.remark.length!==0){
this.$set(this.auditFrom,'remark',data.remark)
}
if(data.otherRemark){
this.$set(this.auditFrom,'otherRemark',data.otherRemark)
}
if(data.applyContent){
this.$set(this.auditFrom,'applyContent',data.applyContent)
}
}
// ||this.nowBtnis === "guaranteeSurvey"
if(this.roleSurvey&&this.handle=='watch'){
if(!res.data.assignUser)return
let data = res.data.assignUser
if(data.applyContent){
this.survey.applyContent = data.applyContent
}
if(data){
this.$set(this.survey,'applyContent',data.applyContent)
}
}
// files.forEach(e=>{
// if(e&&e.length&&e[0]===''){
// e.splice(0,1)
// }
// })
// 循环赋值9个空数组
for(let i=0;i<9;i++){
this.filesArray.push([])
}
this.survey.businessLicense = files.businessLicenseList
this.handleFiles(files.businessLicenseList,0)
this.survey.legalCardCopy = files.legalCardCopyList
this.handleFiles(files.legalCardCopyList,1)
this.survey.marriageCopy = files.marriageCopyList
this.handleFiles(files.marriageCopyList,2)
this.survey.legalCopy = files.legalCopyList
this.handleFiles(files.legalCopyList,3)
this.survey.companyConstitution = files.companyConstitutionList
this.handleFiles(files.companyConstitutionList,4)
this.survey.accountingFirm = files.accountingFirmList
this.handleFiles(files.accountingFirmList,5)
this.survey.meetingMinutes = files.meetingMinutesList
this.handleFiles(files.meetingMinutesList,6)
this.survey.conversationSummary = files.conversationSummaryList
this.handleFiles(files.conversationSummaryList,7)
this.survey.inspectionPhotos = files.inspectionPhotosList
this.handleFiles(files.inspectionPhotosList,8)
// 审核意见赋值
// this.survey.applyContent = res.data.assignUser.applyContent
// this.enterpriseForm.registerTime = res.data.dgBusinessCompany.registerTime.slice(0,10)//截取时间
this.businessApply.businessId = res.data.dgEnclosureInfo.businessId
// this.disposeFileList(get)
this.Aname = res.data.assignUser.aname
this.Bname = res.data.assignUser.bname
})
},
// 传入 data 要处理的数据格式['url1','url2']
// 传入对应的index
handleFiles(data,index){
if(!data||!data.length) return
data.map(e=>{
let obj = {},
num= e.lastIndexOf("."),
ext = e.substr(num+1);
// 判断格式--图片或者其他
if(['jpg','jpeg','png','bmp','gif'].includes(ext.toLowerCase())){
obj.book = 'img'
}else{
obj.book = "file"
if(ext=='png'){
obj.book = 'img'
}
}
// 确定文件格式
obj.ext = ext
obj.url = e
// 接收的数组
this.filesArray[index].push(obj)
})
},
// 关联人列表接口
getLinkmanList(){
if(!this.enterpriseForm.customerId) return uni.showToast({title: '请先选择客户!',icon:'none'})
this.$http.get("/api-crms/crms-company-personal/companyPersonalList",{
customerId:this.enterpriseForm.customerId,
page:1,
size:999 // 不做分页,直接展示所有的关联人或企业
}).then(res=>{
this.list = []
if(res.data.list&&res.data.list.length!==0){
this.list = res.data.list
this.list.map(e=>{
e.educationVal = +e.education
e.maritalStatusVal = +e.maritalStatus
})
}
})
},
// 是否有关联人change事件
hasLinkman(e){
// 存在关联人
if(e===1){this.getLinkmanList()}
},
// 领导审核
guaranteeleader(type){
if(type!==1&&!this.auditFrom.applyContent){
return uni.showToast({title: '拒绝或驳回请输入审核意见!',icon:'none'})
}
if(type==4&&this.auditFrom.remark.length===0){
return uni.showToast({title: '驳回时请选择补充调查!',icon:'none'})
}
if(type==1){
if(!this.auditFrom.amount) return uni.showToast({title: '请输入金额!',icon:'none'})
else if(!this.auditFrom.term)return uni.showToast({title: '请输入期限!',icon:'none'})
}
if(this.auditFrom.remark.indexOf('其他')!==-1&&!this.auditFrom.otherRemark){
return uni.showToast({title: '请输入其他补充调查原因!',icon:'none'})
}
this.auditFrom.status = type
this.auditFrom.id = this.getItem.id
// 有个同意领导传值是2,待权限完善
let role = uni.getStorageSync('roleArr')
if(type==1&&role.includes('61')){//领导审核传2
this.auditFrom.status = 2
}
uni.showLoading({
title:'处理中'
})
this.$http.post('/api-guarantee/dg-guarantee-assign-user/approvalGuarantee',this.auditFrom).then(res=>{
uni.showToast({title:'操作成功!'})
// 判断领导完成操作
if(role.includes('61')){
setTimeout(()=>{
uni.hideLoading()
this.back()
},1000)
}else{
setTimeout(()=>{
uni.hideLoading()
this.back()
},500)
}
})
},
// 调查
guaranteeSurvey(type){
this.survey.status = +type
this.survey.id = this.getItem.id
// 区分同意和保存
if(type===1){
this.survey.isSaveOrCommit = 1
if(!this.upDataArr[0]){
if(!this.survey.businessLicense||this.survey.businessLicense.length===0){
return uni.showToast({title:'请上传营业执照!',icon:"none"})
}
}
if(!this.upDataArr[1]){
if(!this.survey.legalCardCopy||this.survey.legalCardCopy.length===0){
return uni.showToast({title:'请上传法定代表人夫妻及企业实际经营者身份证附件!',icon:"none"})
}
}
if(!this.upDataArr[2]){
if(!this.survey.marriageCopy||this.survey.marriageCopy.length===0){
return uni.showToast({title:'请上传法定代表人夫妻户口本、结婚证(离婚证)!',icon:"none"})
}
}
if(!this.upDataArr[3]){
if(!this.survey.legalCopy||this.survey.legalCopy.length===0){
return uni.showToast({title:'请上传法定代表人身份证证明!',icon:"none"})
}
}
if(!this.upDataArr[4]){
if(!this.survey.companyConstitution||this.survey.companyConstitution.length===0){
return uni.showToast({title:'请上传公司章!',icon:"none"})
}
}
if(!this.upDataArr[5]){
if(!this.survey.accountingFirm||this.survey.accountingFirm.length===0){
return uni.showToast({title:'请上传由会计师事务所审计的上一年度及本年度审计报告!',icon:"none"})
}
}
if(!this.upDataArr[6]){
if(!this.survey.meetingMinutes||this.survey.meetingMinutes.length===0){
return uni.showToast({title:'请上传股东会会议纪要!',icon:"none"})
}
}
if(!this.upDataArr[7]){
if(!this.survey.conversationSummary||this.survey.conversationSummary.length===0){
return uni.showToast({title:'请上传谈话纪要!',icon:"none"})
}
}
if(!this.upDataArr[8]){
if(!this.survey.inspectionPhotos||this.survey.inspectionPhotos.length===0){
return uni.showToast({title:'请上传考察图片!',icon:"none"})
}
}
}else if(type===6){
this.survey.isSaveOrCommit = 0
}
// 文件是否需要上传未做限制。待后续处理
// 非同意/保存时,需要审核意见
if(type!==1&&type!==6&&!this.survey.applyContent){
return uni.showToast({title: '拒绝或驳回时,请输入审核意见!',icon:'none'})
}
uni.showLoading({
title:'处理中'
})
this.$http.post('/api-guarantee/dg-guarantee-assign-user/investigateGuarantee',this.survey).then(res=>{
setTimeout(()=>{
uni.hideLoading()
this.survey = {}
this.back()
},500)
})
},
/* 上传文件 */
uploadFile(e,inx) {
let fileList = e.map(r => r.url)
// 对应文件一一匹配
switch (inx){
case 0:this.survey.businessLicense = fileList
break;
case 1:this.survey.legalCardCopy = fileList
break;
case 2:this.survey.marriageCopy = fileList
break;
case 3:this.survey.legalCopy = fileList
break;
case 4:this.survey.companyConstitution = fileList
break;
case 5:this.survey.accountingFirm = fileList
break;
case 6:this.survey.meetingMinutes = fileList
break;
case 7:this.survey.conversationSummary = fileList
break;
case 8:this.survey.inspectionPhotos = fileList
break;
default:
break;
}
}
}
}
</script>
<style lang="scss" scoped>
.evan-form-show {
padding: 0 30rpx;
background-color: #fff;
.form-input {
font-size: 28rpx;
color: #333;
text-align: right;
width: 100%;
box-sizing: border-box;
height: 60rpx;
&.textarea{
height: 240rpx;
padding: 24rpx 0;
text-align: left;
}
}
.form-input-placeholder {
font-size: 28rpx;
color: #999;
}
&__button {
width: 100%;
height: 88rpx;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
font-size: 36rpx;
color: #fff;
margin-top: 20rpx;
background-color: #2D87D5;
&::before,
&::after {
border: none;
}
}
.customize-form-item {
&__label {
font-size: 28rpx;
color: #333;
margin-bottom: 16rpx;
}
&__radio {
display: flex;
align-items: center;
margin-bottom: 16rpx;
&__text {
font-size: 28rpx;
color: #333;
}
}
}
}
.label-color{
color: #00B9FF;
}
// 必填
.is-required {
color: $uni-color-error;
}
// 多选框样式
.more-select{
margin-left: 20%;
border: 2rpx solid #E6E6E6;
border-radius: 40rpx;
min-height: 70rpx;
line-height: 70rpx;
padding: 0 40rpx;
color: #333;
font-size: 28rpx;
}
.comBox{//客户编号样式
display: flex;
justify-content: flex-end;
width: 80%;
margin-left: 20%;
margin-right: 20%;
font-size: 28rpx;
border: 2rpx solid #E6E6E6;
border-radius: 40rpx;
height: 70rpx;
line-height: 70rpx;
padding: 0 20rpx 0 40rpx;
color: #333;
}
/deep/ .uni-combox__input {
margin-bottom: 10rpx;
}
/deep/ .uni-combox__input-arrow {
margin-bottom: 10rpx;
}
.label-audit{
position: absolute;
top: 1%;
left: 0%;
align-items: flex-end;
}
</style>