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.
 
 
 
 

1188 lines
40 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 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" :label="fromData[1]?fromData[1].name:'客户编号'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="code" placeholder="请输入客户编号"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="name" :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="clientMessageFrom.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="clientMessageFrom.phone" :placeholder="fromData[4]&&fromData[4].prompt?fromData[4].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[5]&&fromData[5].name?fromData[5].name:'注册时间'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.registerTime" :placeholder="fromData[5]&&fromData[5].prompt?fromData[5].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[6]&&fromData[6].name?fromData[6].name:'注册资金(万元)'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.registeredCapital" :placeholder="fromData[6]&&fromData[6].prompt?fromData[6].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[7]&&fromData[7].name?fromData[7].name:'注册地址'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.registerAddr" :placeholder="fromData[7]&&fromData[7].prompt?fromData[7].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[8]&&fromData[8].name?fromData[8].name:'员工人数'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.empNum" :placeholder="fromData[8]&&fromData[8].prompt?fromData[8].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[9]&&fromData[9].name?fromData[9].name:'经营地址'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.businessAddr" :placeholder="fromData[9]&&fromData[9].prompt?fromData[9].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[10]&&fromData[10].name?fromData[10].name:'业务类别'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.businessType" :placeholder="fromData[10]&&fromData[10].prompt?fromData[10].prompt:'业务类别'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[11]&&fromData[11].name?fromData[11].name:'经营范围'">
<uni-easyinput disabled type="textarea" v-model="clientMessageFrom.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="enterpriseForm" ref="form" validate-trigger="bind" err-show-type="toast">
<uni-forms-item name="cusType" :label="fromData[12]&&fromData[12].name?fromData[12].name:'姓名'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.legalName" :placeholder="fromData[12]&&fromData[12].prompt?fromData[12].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="gender" :label="fromData[13]&&fromData[13].name?fromData[13].name:'性别'">
<uni-data-checkbox disabled v-model="clientMessageFrom.legalGender" :localdata="genderList"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item name="name" :label="fromData[14]&&fromData[14].name?fromData[14].name:'身份证号码'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.legalIdNumber" :placeholder="fromData[14]&&fromData[14].prompt?fromData[14].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="socialUnifiedCode" :label="fromData[15]&&fromData[15].name?fromData[15].name:'联系电话'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.legalPhone" :placeholder="fromData[15]&&fromData[15].prompt?fromData[15].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[16]&&fromData[16].name?fromData[16].name:'户口所在地'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.legalHukouAddr" :placeholder="fromData[16]&&fromData[16].prompt?fromData[16].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="phone" :label="fromData[17]&&fromData[17].name?fromData[17].name:'家庭住址'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="clientMessageFrom.legalHomeAddr" :placeholder="fromData[17]&&fromData[17].prompt?fromData[17].prompt:'系统读取'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="isExist" :label="fromData[18]&&fromData[18].name?fromData[18].name:'是否存在关联人'">
<uni-data-checkbox v-model="enterpriseForm.isExistRelated" :localdata="isExistList"></uni-data-checkbox>
</uni-forms-item>
</uni-forms>
<view class="bottom-border" v-if="enterpriseForm.isExistRelated">
<view class="left-border"><text class="mgl10">关联人信息</text></view>
</view>
<!-- 展示关联人,传递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="enterpriseForm" ref="form" validate-trigger="bind" err-show-type="toast">
<uni-forms-item 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 name="name" :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>
</uni-forms-item>
<uni-forms-item name="name" :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>
</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" :label="fromData[22]&&fromData[22].name?fromData[22].name:'贷款用途'">
<uni-easyinput disabled type="text" :inputBorder="true" v-model="enterpriseForm.name" :placeholder="fromData[22]&&fromData[22].prompt?fromData[22].prompt:'贷款用途'"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="enGuaranteeMeasures" :label="fromData[23]&&fromData[23].name?fromData[23].name:'反担保措施'">
<!-- <uni-data-checkbox disabled multiple mode="list" @change='test' v-model="enterpriseForm.enGuaranteeMeasures" :localdata="easuresList"></uni-data-checkbox> -->
<uni-data-checkbox multiple mode="list" v-model="enterpriseForm.enGuaranteeMeasures" :localdata="easuresList"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item name="name" 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="false"></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="false"></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="false"></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="false"></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="false"></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="false"></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="false"></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="false"></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="false"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[33].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[33]&&fromData[33].name?fromData[33].name:'上传增值税纳税报表首表/完税证明'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,9)" :files="filesArray[9]" :handle="false"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[34].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[34]&&fromData[34].name?fromData[34].name:'上传股东会会议纪要'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,10)" :files="filesArray[10]" :handle="false"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[35].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[35]&&fromData[35].name?fromData[35].name:'上传反担保资料和评估报告'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,11)" :files="filesArray[11]" :handle="false"></upload>
<view class="cu-bar bg-white">
<view class="action">
<text v-if="!fromData[36].ifRequired" class="is-required">*</text>
<text class="label-color">{{fromData[36]&&fromData[36].name?fromData[36].name:'其他'}}</text>
</view>
</view>
<upload @upload="($event)=>uploadFile($event,12)" :files="filesArray[12]" :handle="false"></upload>
<!-- 判断当前是否调查员查看调查员可查看当前数据待完善 -->
<view class="bottom-border" v-if="handle=='survey'||handle=='watch'&&roleSurvey">
<view class="left-border"><text class="mgl10">调查信息</text></view>
</view>
<view class="cu-bar bg-white" v-if="handle=='survey'||handle=='watch'&&roleSurvey">
<view class="action">
<text class="is-required">*</text>
<text class="label-color">上传附件</text>
</view>
</view>
<upload v-if="handle=='survey'||handle=='watch'&&roleSurvey" @upload="($event)=>uploadFile($event,12)" :files="filesArray[12]" :handle="handle=='survey'"></upload>
<!-- 调查员审核意见 -->
<view v-if="handle==='survey'||handle=='watch'&&roleSurvey" class="self margin-top">
<text style="color: #00B9FF;" class="label-audit">审核意见</text>
<uni-easyinput :disabled="handle=='watch'" type="textarea" v-model="messageSurveyFrom.remark" placeholder="请输入审核意见"></uni-easyinput>
</view>
<view class="bottom-border" v-if="handle==='audit'||handle=='watch'&&roleManage||handle=='watch'&&roleLeader">
<view class="left-border"><text class="mgl10">审核意见</text></view>
</view>
<!-- 领导审核意见--在领导查看时展示,需要角色进行判断,待完善 -->
<view v-if="handle==='audit'||handle=='watch'&&roleManage||handle=='watch'&&roleLeader" class="self margin-top" >
<text style="color: #00B9FF;" class="label-audit">审核意见</text>
<uni-easyinput :disabled="handle=='watch'" type="textarea" v-model="messageAuditFrom.remark" placeholder="请输入审核意见"></uni-easyinput>
</view>
<view class="foot-btn btn-rig pad-bt margin-top">
<button plain class="mini-btn round plain-btn mar-lr" type="primary" size="mini" @tap="back">返回</button>
<button v-if="handle==='survey'" class="mini-btn round def-btn mar-lr" type="primary" size="mini" @tap="messageSurvey">提交</button>
<button v-if="handle==='audit'" class="mini-btn round suc-btn suc-btn" type="primary" size="mini" @tap="messageAudit(1)">同意</button>
<button v-if="handle==='audit'" class="mini-btn round suc-btn ref-btn mar-lr" type="primary" size="mini" @tap="messageAudit(3)">拒绝</button>
<button v-if="handle==='audit'" class="mini-btn round suc-btn cancel-btn" type="primary" size="mini" @tap="messageAudit(4)">驳回</button>
</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 {
list: [],// 关联人数据
handle:'',// 操作状态
getItem:{},// 获取列表传值
survey:false,// 是否禁用调查员输入框
mainbank:'',// 银行
elsebank:'',// 分行
cusTypeList: [
// {//客户类型列表
// text: '个人',
// value: '1',
// disabled:true
// },
{
text: '企业',
value: '2',
disabled:true
}],
genders: [{//性别列表-禁用
text: '男',
value: 1,
disabled:true
},
{
text: '女',
value: 0,
disabled:true
}],
cusType: '2',// 客户类型当前固定为企业
EvaluationList: [{
text: '房产',
value: '0',
InputValue: ''
},
{
text: '车辆',
value: '1',
InputValue: ''
},
{
text: '设备',
value: '2',
InputValue: ''
},
{
text: '其他',
value: '3',
InputValue: ''
}],//评估价值列表
employeeMsg: [{
name: '个人',
value: '3'
},
{
name: '企业',
value: '4'
}],//客户经理列表
genderList: [{
text: '男',
value: 1,
disabled:true
},
{
text: '女',
value: 0,
disabled:true
}],//性别列表
easuresList: [{// 反担保措施的值
text: '第三方保证',
value: '第三方保证',
disabled:true
},
{
text: '抵押',
value: '抵押',
disabled:true
},
{
text: '个人无限责任连带',
value: '个人无限责任连带',
disabled:true
},
{
text: '质押',
value: '质押',
disabled:true
}],
imgList: [],
maritalList: [{
name: '未婚',
value: 0
},
{
name: '已婚',
value: 1
},
{
name: '离异',
value: 2
},
{
name: '再婚',
value: 3
}],//婚姻状况列表
educationList: [//学历列表
{
name: '本科',
value: 0
},
{
name: '大专',
value: 1
},
{
name: '高职',
value: 2
},
{
name: '中专',
value: 3
},
{
name: '其他',
value: 4
}],//学历列表
isExistList: [{
text: '否',
value: 0,
disabled:true
},
{
text: '是',
value: 1,
disabled:true
}],//是否存在关联人列表
manager: '',
enterpriseFrom: {//个人form
maritalStatus: 0,//婚姻状况
gender: 1,//性别
education: 0, //学历
legalGender: 1, //关联人性别
isExistRelated: 0, //是否存在关联人
},
enterpriseForm: {
enGuaranteeMeasures: []
},// 企业from,仅展示
clientMessageFrom:{},// 其他的企业信息,仅展示
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位'}]
},
showRuleParam:true,
showRequiredParam:true,
mobileRules:[{required:true,message:'请输入手机号'},{pattern:'^1\\d{10}$',message:'手机号格式不正确'}], // 注意这里由于小程序的缘故正则表达式需要通过string的方式传递并且去除两边的斜杠,中间的斜杠变成两个斜杠
messageAuditFrom:{// 审核传值
status:"",// 操作状态
remark:'',// 审核意见
id:'',// 业务id
},
messageSurveyFrom:{// 调查员传值
file:[],// 文件
// remake:'',// 审核信息
},
filesArray:[],// 展示文件用
roleSurvey:false,
roleManage:false,
roleLeader:false,
companyId:'',
code:'',
fromData: [],
upDataArr: [],
uploadFileList: []
}
},
destroyed() {// 销毁组件操作
uni.removeStorageSync('handleGe')
uni.removeStorageSync('applyMsg')
uni.removeStorageSync('copyData')
},
created() {
// 判断来自待处理否
if(uni.getStorageSync('decideIndex')){
let data = JSON.parse(uni.getStorageSync('decideIndex'))
this.getItem.id = data.detailId
if(data.btn==='调查'){
this.handle = 'survey'
}else{// 审核
this.handle = 'audit'
}
uni.removeStorageSync('decideIndex')
}else if(uni.getStorageSync('copyData')){
let data =JSON.parse(uni.getStorageSync('copyData'))
this.handle = 'watch'
this.getItem.id = data.detailId
}else{
this.handle = uni.getStorageSync('handleGe')// 取得操作状态
}
// 判断操作禁用
if(this.handle==='survey'){
this.survey = false // 调查员非禁用
}else{// 禁用
this.survey = true
// this.easuresList.forEach(e=>{
// e.disabled = true
// })
}
if(uni.getStorageSync('applyMsg')){ // 取得传参,取得ID等
this.getItem = JSON.parse(uni.getStorageSync('applyMsg'))
this.businessId = this.getItem.businessId
}
// 详情
this.messageDetail()
// 判断调查员,经理,领导
this.roleSurvey = this.judgeRole('66')
this.roleManage = this.judgeRole('65')
this.roleLeader = this.judgeRole('67')
this.designFrom()
},
mounted() {
// 这里必须放在mounted中,不然h5,支付宝小程序等会找不到this.$refs.form
this.$refs.form.setRules(this.rules)
},
methods: {
designFrom(){// 表单数据接口
this.$http.get('/api-guarantee/form/design/list',{
processId: 4
}).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.fromData[33].ifRequired,this.fromData[34].ifRequired,this.fromData[35].ifRequired,this.fromData[36].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,this.fromData[32].name,this.fromData[33].name,this.fromData[34].name,this.fromData[35].name,this.fromData[36].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
},
//客户类型选择
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(e) {
uni.previewImage({
urls: this.imgList,
current: e.currentTarget.dataset.url
});
},
// DelImg(e) {
// uni.showModal({
// title: '提示',
// content: '确定要删除该文件吗?',
// cancelText: '取消',
// confirmText: '确定',
// success: res => {
// if (res.confirm) {
// this.imgList.splice(e.currentTarget.dataset.index, 1)
// }
// }
// })
// },
ChooseImage() {
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) => {
let res = JSON.parse(uploadFileRes.data),
data = res.data
this.messageSurveyFrom.file.push(data[0])
}
})
}
});
},
// DelImg(val,index) {
// uni.showModal({
// title: '提示',
// content: '确定要删除该文件吗?',
// cancelText: '取消',
// confirmText: '确定',
// success: res => {
// if (res.confirm) {
// this.messageSurveyFrom.file.splice(index,1)
// }
// }
// })
// },
// 关联人列表接口
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
})
}
})
},
// 信息部--详情
messageDetail(id){
// this.rowID = id
// sessionStorage.setItem('message-detail',id)
this.$http.get('/api-guarantee/dg-message-investigation/messageDetail',{id:this.getItem.id}).then(res=>{
if(res.code===10000){
let apply = res.data.dgApplyAmountInfo
let handle = apply.enGuaranteeMeasure
this.companyId = apply.companyId
this.enterpriseForm={
name:res.data.dgBusinessCompany.name,// 客户名称
companyId:apply.companyId,// 客户编号
businessType:apply.businessType,// 业务类别
isExistRelated:apply.isExistRelated,// 是否有关联人
applyAmount:apply.applyAmount,// 申请金额
bank:apply.bank,// 银行
applyTime:apply.applyTime,// 申请期限
amountWide:apply.amountWide,// 贷款用途
enGuaranteeMeasures:handle,// 反担保措施
description:apply.description,// 反担保描述
}
this.cusType = apply.customerType // 客户类型
this.clientMessageFrom = res.data.dgBusinessCompany//企业详情
if(res.data.dgBusinessCompany!==null){
this.name = res.data.dgBusinessCompany.name//客户名称
this.$set(this.enterpriseForm,'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 //客户编号
// this.$nextTick(()=>{// 联系人
this.getLinkmanList()
// })
}
if(this.enterpriseForm.bank){//银行字符串处理
let across = this.enterpriseForm.bank.indexOf('-')
if(across!==-1){
this.mainbank = this.enterpriseForm.bank.substring(0,across)
let len = this.enterpriseForm.bank.length
this.elsebank = this.enterpriseForm.bank.substring(across+1,len)
}else{
this.mainbank = this.enterpriseForm.bank
}
}
// 调查员调查的情况下
if(this.surveyModule){
// this.messageSurveyFrom.remark = res.data.dgMessageInvestigation.remark
this.otherFiles = res.data.messageFileList // 其他文件赋值--展示
this.messageSurveyFrom.file = res.data.messageFileList// 上传用文件展示
this.$set(this.messageSurveyFrom,'remark',res.data.dgMessageInvestigation.remark)// 调查员审核意见
}
// 审核查看的情况下
if(this.auditModule){
this.$set(this.messageAuditFrom,'remark',res.data.dgMessageInvestigation.remark)
// this.messageAuditFrom.remark = res.data.dgMessageInvestigation.remark
}
let files = res.data.dgEnclosureInfo
// 删除文件首个值的双引号
for(let item in files){
if(files[item]&&files[item].length&&files[item][0]===''){
files[item].splice(0,1)
}
}
// 循环赋值12个空数组
for(let i=0;i<13;i++){
this.filesArray.push([])
}
// 展示的赋值--
this.enterpriseForm.businessLicense = files.businessLicenseList
this.handleFiles(files.businessLicenseList,0)
this.enterpriseForm.legalCardCopy = files.legalCardCopyList
this.handleFiles(files.legalCardCopyList,1)
this.enterpriseForm.marriageCopy = files.marriageCopyList
this.handleFiles(files.marriageCopyList,2)
this.enterpriseForm.legalCopy = files.legalCopyList
this.handleFiles(files.legalCopyList,3)
this.enterpriseForm.companyConstitution = files.companyConstitutionList
this.handleFiles(files.companyConstitutionList,4)
this.enterpriseForm.accountingFirm = files.accountingFirmList
this.handleFiles(files.accountingFirmList,5)
this.enterpriseForm.companyCredit = files.companyCreditList
this.handleFiles(files.companyCreditList,6)
this.enterpriseForm.creditReport = files.creditReportList
this.handleFiles(files.creditReportList,7)
this.enterpriseForm.certificateAuthorization = files.certificateAuthorizationList
this.handleFiles(files.certificateAuthorizationList,8)
this.enterpriseForm.taxCertificate = files.taxCertificateList
this.handleFiles(files.taxCertificateList,9)
this.enterpriseForm.meetingMinutes = files.meetingMinutesList
this.handleFiles(files.meetingMinutesList,10)
this.enterpriseForm.assessmentReport = files.assessmentReportList
this.handleFiles(files.assessmentReportList,11)
// 其他文件赋值
this.messageSurveyFrom.file = res.data.messageFileList
// this.enterpriseForm.otherFiles = res.data.messageFileList
this.handleFiles(res.data.messageFileList,12)
// 处于审核时还有一个其他的附件
get.map(e=>{// 删除空值时的“”
if(e){
if(e[0]==''){
e.splice(0,1)
}
}
})
this.enterpriseForm.businessId = res.data.dgEnclosureInfo.businessId
}
// 赋值 ----
}).catch(err=>{
// uni.showToast({ title:'读取数据失败,请刷新重试!',icon:'none' })
})
},
/* 上传文件 */
uploadFile(e) {
let fileList = e.map(r => r.url)
this.messageSurveyFrom.file = fileList
},
// 传入 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(e.toLowerCase().includes('jpg','jpeg','png','bmp','gif')){
obj.book = 'img'
}else{
obj.book = "file"
if(ext=='png'){
obj.book = 'img'
}
}
// 确定文件格式
obj.ext = ext
obj.url = e
// 接收的数组
this.filesArray[index].push(obj)
})
},
// 信息部调查,当前仅有一个提交
messageSurvey(type){
this.messageSurveyFrom.status = 1
this.messageSurveyFrom.id = this.getItem.id
if(!this.messageSurveyFrom.file||this.messageSurveyFrom.file&&this.messageSurveyFrom.file.length===0){
return uni.showToast({
title:'请上传调查文件!'
})
}
uni.showLoading({
title:'提交中!'
})
this.$http.post('/api-guarantee/dg-message-investigation/investigateMessage',this.messageSurveyFrom).then(res=>{
uni.hideLoading()
uni.showToast({
title:'操作成功!'
})
setTimeout(()=>{
this.back()
},700)
}).catch(err=>{
uni.showToast({
title:'操作失败'
})
})
},
// 信息部--审核
messageAudit(type){
this.messageAuditFrom.status = type
// 获取角色ID信息
let btnPermissionsStr = uni.getStorageSync("roleArr").split(',');
if(type==1&&btnPermissionsStr.includes('67')){//领导传2
this.messageAuditFrom.status = 2
}
this.messageAuditFrom.id = this.getItem.id
if(type===3&&!this.messageAuditFrom.remark||type===4&&!this.messageAuditFrom.remark){
return uni.showToast({
title:type===3?'请输入拒绝的审核意见!':'请输入驳回的审核意见!',
icon:'none'
})
}
this.$http.post('/api-guarantee/dg-message-investigation/approvalMessage',this.messageAuditFrom).then(res=>{
if(btnPermissionsStr.includes('67')){
setTimeout(()=>{
this.back()
},1000)
}else{
uni.showToast({
title:'审核成功!'
})
setTimeout(()=>{
this.back()
},500)
}
})
// .catch(err=>{
// uni.showToast({ title:'操作失败请重试!',icon:'none' })
// })
},
}
}
</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;
}
.checklist-group {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: wrap;
}
.checklist-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
margin: 10rpx 0;
margin-right: 50rpx;
}
.checklist-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.checklist-text {
font-size: 28rpx;
color: #333;
margin-left: 10rpx;
transition: color 0.2s;
}
.checkbox__inner {
flex-shrink: 0;
position: relative;
border: 2rpx solid #DCDFE6;
border-radius: 4rpx;
box-sizing: border-box;
width: 32rpx;
height: 32rpx;
background-color: #fff;
z-index: 1;
transition: border-color 0.1s;
}
.checkbox__inner-icon {
border: 2rpx solid #fff;
border-left: 0;
border-top: 0;
height: 16rpx;
left: 10rpx;
position: absolute;
top: 2rpx;
width: 6rpx;
opacity: 0;
transition: transform .2s;
transform-origin: center;
transform: rotate(40deg) scaleY(0.4);
}
.label-audit{
position: absolute;
top: 1%;
left: 0%;
}
</style>