|
|
@@ -1,10 +1,11 @@
|
|
|
<template>
|
|
|
<view class="total-page page-box task-bg">
|
|
|
- <Nav :title="productInfo.product_name" :genre="1" :fixedHeight="105"></Nav>
|
|
|
+ <Nav :title="productInfo.product_name" :genre="1" is_fixed></Nav>
|
|
|
<view class="task-tabs" :style="{top:`${$tools.topHeight()}px`}">
|
|
|
<view class="m-t20">
|
|
|
<view class="creation_item row-justify-sb center sys-background-fff m-lr30 m-b20 p-30 r-20"
|
|
|
- v-for="(item,index) in informationList" :key="index" v-show="item.is_show" @click="onAuthentication(item)">
|
|
|
+ v-for="(item,index) in informationList" :key="index" v-show="item.is_show"
|
|
|
+ @click="onAuthentication(item)">
|
|
|
<view class="row-c">
|
|
|
<image class="wh-80 m-r20 r-100" :src="item.icon" mode="aspectFill"></image>
|
|
|
<view>
|
|
|
@@ -13,9 +14,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="">
|
|
|
- <button class="button-background info_button sys-weight-500 text-color-fff size-26 r-100">待上传</button>
|
|
|
- <!-- <button class="info_button sys-bg-CBCBCB sys-weight-500 text-color-fff size-26 r-100"
|
|
|
- v-else>已认证</button> -->
|
|
|
+ <button
|
|
|
+ class="button-background info_button sys-weight-500 text-color-fff size-26 r-100">待上传</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -27,16 +27,19 @@
|
|
|
|
|
|
<script>
|
|
|
import TaskImgTab from "@/common/task/task_ima_tab.vue"
|
|
|
- import tools from "@/service/tools";
|
|
|
- import {
|
|
|
- addDraft,
|
|
|
- addTask, delBusinessCache,
|
|
|
- getBusinessCache,
|
|
|
- getClientInfo,
|
|
|
- getDraftItem, getTaskDetail,
|
|
|
- getTaskTypeInfo,
|
|
|
- setBusinessCache, verifyBusinessModuleKey
|
|
|
- } from "@/api/task";
|
|
|
+ import tools from "@/service/tools";
|
|
|
+ import {
|
|
|
+ addDraft,
|
|
|
+ addTask,
|
|
|
+ delBusinessCache,
|
|
|
+ getBusinessCache,
|
|
|
+ getClientInfo,
|
|
|
+ getDraftItem,
|
|
|
+ getTaskDetail,
|
|
|
+ getTaskTypeInfo,
|
|
|
+ setBusinessCache,
|
|
|
+ verifyBusinessModuleKey
|
|
|
+ } from "@/api/task";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -53,7 +56,7 @@
|
|
|
type: 1,
|
|
|
is_finish: false,
|
|
|
is_show: false,
|
|
|
- type_keys:[]
|
|
|
+ type_keys: []
|
|
|
}, {
|
|
|
name: '资产信息',
|
|
|
explain: '房产、车辆等资产',
|
|
|
@@ -61,8 +64,8 @@
|
|
|
path: '/page_task/property/property',
|
|
|
type: 2,
|
|
|
is_finish: false,
|
|
|
- is_show: false,
|
|
|
- type_keys:[]
|
|
|
+ is_show: false,
|
|
|
+ type_keys: []
|
|
|
}, {
|
|
|
name: '申请信息',
|
|
|
explain: '贷款额度信息',
|
|
|
@@ -70,412 +73,424 @@
|
|
|
path: '/page_task/apply/apply',
|
|
|
type: 3,
|
|
|
is_finish: false,
|
|
|
- is_show: false,
|
|
|
- type_keys:[]
|
|
|
+ is_show: false,
|
|
|
+ type_keys: []
|
|
|
}, {
|
|
|
- name: '第三方信息',
|
|
|
- explain: '第三方企业/人员相关信息',
|
|
|
- icon: '/static/img/task/task-apply.png',
|
|
|
- path: '/page_task/apply/apply',
|
|
|
- type: 4,
|
|
|
- is_finish: false,
|
|
|
- is_show: false,
|
|
|
- type_keys:[]
|
|
|
- },{
|
|
|
name: '联系人信息',
|
|
|
explain: '其他联系人',
|
|
|
icon: '/static/img/task/task-contacts.png',
|
|
|
type: 5,
|
|
|
is_finish: false,
|
|
|
- is_show: false,
|
|
|
- type_keys:[]
|
|
|
+ is_show: false,
|
|
|
+ type_keys: []
|
|
|
+ }, {
|
|
|
+ name: '第三方信息',
|
|
|
+ explain: '第三方企业/人员相关信息',
|
|
|
+ icon: '/static/img/task/task-three.png',
|
|
|
+ path: '/page_task/tripartite_info/tripartite_info',
|
|
|
+ type: 4,
|
|
|
+ is_finish: false,
|
|
|
+ is_show: false,
|
|
|
+ type_keys: []
|
|
|
}, {
|
|
|
name: '征信信息',
|
|
|
explain: '银行征信信息',
|
|
|
icon: '/static/img/task/task-credit.png',
|
|
|
type: 6,
|
|
|
is_finish: false,
|
|
|
- is_show: false,
|
|
|
- type_keys:[]
|
|
|
+ is_show: false,
|
|
|
+ type_keys: []
|
|
|
}, ],
|
|
|
- stepsNum: 0,
|
|
|
- stepsKey: 0,
|
|
|
- productInfo: {
|
|
|
- id: 1,
|
|
|
- product_name: "",
|
|
|
- product_types: '',
|
|
|
- field_ids: [],
|
|
|
- type_data: [],
|
|
|
- },
|
|
|
- taskData: {
|
|
|
- 'productId': '',
|
|
|
- "clientInfo": {
|
|
|
- "name": "",
|
|
|
- "birthday": "",
|
|
|
- "sex": 1,
|
|
|
- "id_number": "",
|
|
|
- "identity_one": "",
|
|
|
- "identity_two": "",
|
|
|
- "phone": "",
|
|
|
- "marriage_type": 1,
|
|
|
- "education_type": '',
|
|
|
- "education_name": '',
|
|
|
- "employ_type": 1,
|
|
|
- "firm_name": "",
|
|
|
- "firm_address": "",
|
|
|
- "resident_city": "",
|
|
|
- "resident_address": "",
|
|
|
- "mate_name": "",
|
|
|
- "mate_phone": "",
|
|
|
- "mate_id_number": "",
|
|
|
- "mate_firm": "",
|
|
|
- "m_code": "",
|
|
|
- "code": "",
|
|
|
- "m_identity_one": "",
|
|
|
- "m_identity_two": "",
|
|
|
- "firm_city": "",
|
|
|
- "social_num": "",
|
|
|
- "reserved_money": "",
|
|
|
- "marriage_img": [],
|
|
|
- "credit_img": []
|
|
|
- },
|
|
|
- "property": [],
|
|
|
- "applies": {
|
|
|
- "is_farming": '1',
|
|
|
- "loan_form": '',
|
|
|
- "loan_type": '',
|
|
|
- "loan_industry": [],
|
|
|
- "enterprise_type": "",
|
|
|
- "use_date": "",
|
|
|
- "pay_status": '1',
|
|
|
- "quota": "",
|
|
|
- "apply_data":[]
|
|
|
- },
|
|
|
- "tripartite": [],
|
|
|
- "linkman": [],
|
|
|
- "credit": {
|
|
|
- 'credit_img': [],
|
|
|
- 'deal_data': [],
|
|
|
- 'overdue_data': [],
|
|
|
- 'query_data': [],
|
|
|
- },
|
|
|
- "post_loan": {
|
|
|
- 'bank_id':'',
|
|
|
- 'loans_money':'',
|
|
|
- 'interest_rate':'',
|
|
|
- 'repayment_money':'',
|
|
|
- 'refund_num':'',
|
|
|
- 'repayment_type':'',
|
|
|
- 'repayment_date':'',
|
|
|
- },
|
|
|
- },
|
|
|
- isCache: true,
|
|
|
- isNew: true
|
|
|
+ stepsNum: 0,
|
|
|
+ stepsKey: 0,
|
|
|
+ productInfo: {
|
|
|
+ id: 1,
|
|
|
+ product_name: "",
|
|
|
+ product_types: '',
|
|
|
+ field_ids: [],
|
|
|
+ type_data: [],
|
|
|
+ },
|
|
|
+ taskData: {
|
|
|
+ 'productId': '',
|
|
|
+ "clientInfo": {
|
|
|
+ "name": "",
|
|
|
+ "birthday": "",
|
|
|
+ "sex": 1,
|
|
|
+ "id_number": "",
|
|
|
+ "identity_one": "",
|
|
|
+ "identity_two": "",
|
|
|
+ "phone": "",
|
|
|
+ "marriage_type": 1,
|
|
|
+ "education_type": '',
|
|
|
+ "education_name": '',
|
|
|
+ "employ_type": 1,
|
|
|
+ "firm_name": "",
|
|
|
+ "firm_address": "",
|
|
|
+ "resident_city": "",
|
|
|
+ "resident_address": "",
|
|
|
+ "mate_name": "",
|
|
|
+ "mate_phone": "",
|
|
|
+ "mate_id_number": "",
|
|
|
+ "mate_firm": "",
|
|
|
+ "m_code": "",
|
|
|
+ "code": "",
|
|
|
+ "m_identity_one": "",
|
|
|
+ "m_identity_two": "",
|
|
|
+ "firm_city": "",
|
|
|
+ "social_num": "",
|
|
|
+ "reserved_money": "",
|
|
|
+ "marriage_img": [],
|
|
|
+ "credit_img": []
|
|
|
+ },
|
|
|
+ "property": [],
|
|
|
+ "applies": {
|
|
|
+ "is_farming": '1',
|
|
|
+ "loan_form": '',
|
|
|
+ "loan_type": '',
|
|
|
+ "loan_industry": [],
|
|
|
+ "enterprise_type": "",
|
|
|
+ "use_date": "",
|
|
|
+ "pay_status": '1',
|
|
|
+ "quota": "",
|
|
|
+ "apply_data": []
|
|
|
+ },
|
|
|
+ "tripartite": [],
|
|
|
+ "linkman": [],
|
|
|
+ "credit": {
|
|
|
+ 'credit_img': [],
|
|
|
+ 'deal_data': [],
|
|
|
+ 'overdue_data': [],
|
|
|
+ 'query_data': [],
|
|
|
+ },
|
|
|
+ "post_loan": {
|
|
|
+ 'bank_id': '',
|
|
|
+ 'loans_money': '',
|
|
|
+ 'interest_rate': '',
|
|
|
+ 'repayment_money': '',
|
|
|
+ 'refund_num': '',
|
|
|
+ 'repayment_type': '',
|
|
|
+ 'repayment_date': '',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ isCache: true,
|
|
|
+ isNew: true
|
|
|
}
|
|
|
},
|
|
|
- watch:{
|
|
|
- 'productInfo.product_types':function () {
|
|
|
- let productTypes=this.productInfo.product_types
|
|
|
- if(typeof productTypes==='string'){
|
|
|
- productTypes=productTypes.split(',')
|
|
|
- }
|
|
|
- this.informationList.forEach(item=>{
|
|
|
- item.is_show = productTypes.indexOf(item.type + '') >= 0;
|
|
|
- this.productInfo.type_data.forEach(val=>{
|
|
|
- if(val.type===item.type+''){
|
|
|
- item.type_keys=val.type_keys
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ watch: {
|
|
|
+ 'productInfo.product_types': function() {
|
|
|
+ let productTypes = this.productInfo.product_types
|
|
|
+ if (typeof productTypes === 'string') {
|
|
|
+ productTypes = productTypes.split(',')
|
|
|
+ }
|
|
|
+ this.informationList.forEach(item => {
|
|
|
+ item.is_show = productTypes.indexOf(item.type + '') >= 0;
|
|
|
+ this.productInfo.type_data.forEach(val => {
|
|
|
+ if (val.type === item.type + '') {
|
|
|
+ item.type_keys = val.type_keys
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
|
|
|
-
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
onLoad(data) {
|
|
|
- if (data.draftId) {
|
|
|
- this.getDraftItem(data.draftId)
|
|
|
- this.isNew = false
|
|
|
- } else if (data.businessId) {
|
|
|
- this.getTaskDetail(data.businessId)
|
|
|
- this.isNew = false
|
|
|
- } else {
|
|
|
- if (data.productId === undefined) {
|
|
|
- tools.leftClick()
|
|
|
- } else {
|
|
|
- this.taskData.productId = data.productId
|
|
|
- this.getTaskTypeInfo(data.productId)
|
|
|
- }
|
|
|
- }
|
|
|
+ if (data.draftId) {
|
|
|
+ this.getDraftItem(data.draftId)
|
|
|
+ this.isNew = false
|
|
|
+ } else if (data.businessId) {
|
|
|
+ this.getTaskDetail(data.businessId)
|
|
|
+ this.isNew = false
|
|
|
+ } else {
|
|
|
+ if (data.productId === undefined) {
|
|
|
+ tools.leftClick()
|
|
|
+ } else {
|
|
|
+ this.taskData.productId = data.productId
|
|
|
+ this.getTaskTypeInfo(data.productId)
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- addTask() {
|
|
|
- console.log('addTask----start')
|
|
|
- // let isEnd=false;
|
|
|
- // this.productInfo.type_data.forEach((typeItem,typeKey)=>{
|
|
|
- // if(!typeItem.is_end && !isEnd && typeKey!==this.stepsNum){
|
|
|
- // isEnd=true
|
|
|
- // tools.error('完善'+typeItem.type_name)
|
|
|
- // }
|
|
|
- // })
|
|
|
- // if(isEnd){
|
|
|
- // return;
|
|
|
- // }
|
|
|
- if (this.isAjax) {
|
|
|
- return ;
|
|
|
- }
|
|
|
- this.isAjax = true;
|
|
|
- addTask(this.taskData).then((res) => {
|
|
|
- if (res.code === 1) {
|
|
|
- tools.success(res.msg)
|
|
|
- // uni.$emit('goToTaskList', 0)
|
|
|
- setTimeout(() => {
|
|
|
- uni.redirectTo({
|
|
|
- url: 'pages-task/task-info/task-info?id=' + res.data.id
|
|
|
- });
|
|
|
- }, 1500)
|
|
|
- } else {
|
|
|
- this.isAjax = false;
|
|
|
- tools.error(res.msg)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- addDraft() {
|
|
|
- addDraft(this.taskData).then((res) => {
|
|
|
- if (res.code === 1) {
|
|
|
- tools.success(res.msg)
|
|
|
- delBusinessCache({'productId': this.productInfo.id}).then((res) => {
|
|
|
- uni.$emit('setNewDraft')
|
|
|
- setTimeout(() => {
|
|
|
- tools.leftClick()
|
|
|
- }, 1000)
|
|
|
- })
|
|
|
- } else {
|
|
|
- tools.error(res.msg)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ addTask() {
|
|
|
+ console.log('addTask----start')
|
|
|
+ // let isEnd=false;
|
|
|
+ // this.productInfo.type_data.forEach((typeItem,typeKey)=>{
|
|
|
+ // if(!typeItem.is_end && !isEnd && typeKey!==this.stepsNum){
|
|
|
+ // isEnd=true
|
|
|
+ // tools.error('完善'+typeItem.type_name)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // if(isEnd){
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ if (this.isAjax) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isAjax = true;
|
|
|
+ addTask(this.taskData).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ tools.success(res.msg)
|
|
|
+ // uni.$emit('goToTaskList', 0)
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: 'pages-task/task-info/task-info?id=' + res.data.id
|
|
|
+ });
|
|
|
+ }, 1500)
|
|
|
+ } else {
|
|
|
+ this.isAjax = false;
|
|
|
+ tools.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ addDraft() {
|
|
|
+ addDraft(this.taskData).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ tools.success(res.msg)
|
|
|
+ delBusinessCache({
|
|
|
+ 'productId': this.productInfo.id
|
|
|
+ }).then((res) => {
|
|
|
+ uni.$emit('setNewDraft')
|
|
|
+ setTimeout(() => {
|
|
|
+ tools.leftClick()
|
|
|
+ }, 1000)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ tools.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
- verifyBusinessModuleKey(verifyKey){
|
|
|
- let typeRow=this.productInfo.type_data[verifyKey];
|
|
|
- let data={}
|
|
|
- if(typeRow.type==='1'){
|
|
|
- data=this.taskData.clientInfo
|
|
|
- }else if(typeRow.type==='2'){
|
|
|
- data=this.taskData.property
|
|
|
- }else if(typeRow.type==='3'){
|
|
|
- data=this.taskData.applies
|
|
|
- }else if(typeRow.type==='4'){
|
|
|
- data=this.taskData.tripartite
|
|
|
- }else if(typeRow.type==='5'){
|
|
|
- data=this.taskData.linkman
|
|
|
- }else if(typeRow.type==='6'){
|
|
|
- data=this.taskData.credit
|
|
|
- }else if(typeRow.type==='7'){
|
|
|
- data=this.taskData.post_loan
|
|
|
- }
|
|
|
- console.log(data)
|
|
|
- verifyBusinessModuleKey({'productId':this.productInfo.id,'data':data,'type':typeRow.type}).then((res)=>{
|
|
|
- this.productInfo.type_data[verifyKey].is_end = res.code === 1;
|
|
|
- })
|
|
|
- },
|
|
|
- getClientInfo() {
|
|
|
- //获取客户原始数据
|
|
|
- if (this.taskData.clientInfo.id_number === '') {
|
|
|
- return;
|
|
|
- }
|
|
|
- getClientInfo({
|
|
|
- 'id_number': this.taskData.clientInfo.id_number,
|
|
|
- 'productId': this.taskData.productId
|
|
|
- }).then((res) => {
|
|
|
- if (res.code === 1) {
|
|
|
- this.isNew = false
|
|
|
- if (res.data.business) {
|
|
|
- res.data.business.id = ''
|
|
|
- this.taskData.clientInfo = res.data.business
|
|
|
- }
|
|
|
- if (res.data.propertyList) {
|
|
|
- this.taskData.property = res.data.propertyList
|
|
|
- if( this.taskData.property){
|
|
|
- this.taskData.property.forEach((item) => {
|
|
|
- item.id = ''
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
+ verifyBusinessModuleKey(verifyKey) {
|
|
|
+ let typeRow = this.productInfo.type_data[verifyKey];
|
|
|
+ let data = {}
|
|
|
+ if (typeRow.type === '1') {
|
|
|
+ data = this.taskData.clientInfo
|
|
|
+ } else if (typeRow.type === '2') {
|
|
|
+ data = this.taskData.property
|
|
|
+ } else if (typeRow.type === '3') {
|
|
|
+ data = this.taskData.applies
|
|
|
+ } else if (typeRow.type === '4') {
|
|
|
+ data = this.taskData.tripartite
|
|
|
+ } else if (typeRow.type === '5') {
|
|
|
+ data = this.taskData.linkman
|
|
|
+ } else if (typeRow.type === '6') {
|
|
|
+ data = this.taskData.credit
|
|
|
+ } else if (typeRow.type === '7') {
|
|
|
+ data = this.taskData.post_loan
|
|
|
+ }
|
|
|
+ console.log(data)
|
|
|
+ verifyBusinessModuleKey({
|
|
|
+ 'productId': this.productInfo.id,
|
|
|
+ 'data': data,
|
|
|
+ 'type': typeRow.type
|
|
|
+ }).then((res) => {
|
|
|
+ this.productInfo.type_data[verifyKey].is_end = res.code === 1;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getClientInfo() {
|
|
|
+ //获取客户原始数据
|
|
|
+ if (this.taskData.clientInfo.id_number === '') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ getClientInfo({
|
|
|
+ 'id_number': this.taskData.clientInfo.id_number,
|
|
|
+ 'productId': this.taskData.productId
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ this.isNew = false
|
|
|
+ if (res.data.business) {
|
|
|
+ res.data.business.id = ''
|
|
|
+ this.taskData.clientInfo = res.data.business
|
|
|
+ }
|
|
|
+ if (res.data.propertyList) {
|
|
|
+ this.taskData.property = res.data.propertyList
|
|
|
+ if (this.taskData.property) {
|
|
|
+ this.taskData.property.forEach((item) => {
|
|
|
+ item.id = ''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- if (res.data.applyFor) {
|
|
|
- res.data.applyFor.id = ''
|
|
|
- this.taskData.applies = res.data.applyFor
|
|
|
- if( this.taskData.applies.apply_data){
|
|
|
- this.taskData.applies.apply_data.forEach((item) => {
|
|
|
- item.id = ''
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- if (res.data.tripartite) {
|
|
|
- this.taskData.tripartite = res.data.tripartite
|
|
|
- this.taskData.tripartite.forEach((item) => {
|
|
|
- item.id = ''
|
|
|
- })
|
|
|
- }
|
|
|
- if (res.data.linkman) {
|
|
|
- res.data.linkman.forEach((item) => {
|
|
|
- item.id = ''
|
|
|
- })
|
|
|
- this.taskData.linkman = res.data.linkman
|
|
|
- }
|
|
|
- if (res.data.credit) {
|
|
|
- this.taskData.credit = res.data.credit
|
|
|
- this.taskData.credit.deal_data.forEach((item)=>{
|
|
|
- item.id=''
|
|
|
- })
|
|
|
- this.taskData.credit.overdue_data.forEach((item)=>{
|
|
|
- item.id=''
|
|
|
- })
|
|
|
- this.taskData.credit.query_data.forEach((item)=>{
|
|
|
- item.id=''
|
|
|
- })
|
|
|
- }
|
|
|
- if (res.data.postLoan) {
|
|
|
- this.taskData.post_loan = res.data.postLoan
|
|
|
- }
|
|
|
- console.log('-----------this.taskData-------------',this.taskData)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- setBusinessCache() {
|
|
|
- //设置缓存
|
|
|
- if (this.isCache) {
|
|
|
- return false
|
|
|
- }
|
|
|
- this.isCache = true
|
|
|
- setBusinessCache(this.taskData).then((res) => {
|
|
|
- setTimeout(() => {
|
|
|
- this.isCache = false;
|
|
|
- }, 2000)
|
|
|
- })
|
|
|
- },
|
|
|
- getBusinessCache(productId) {
|
|
|
- //获取缓存
|
|
|
- getBusinessCache({'productId': productId}).then((res) => {
|
|
|
- if (res.code === 1) {
|
|
|
- if (res.data.productId !== 0) {
|
|
|
- this.isNew = false
|
|
|
- this.taskData = res.data
|
|
|
- }
|
|
|
- }
|
|
|
+ if (res.data.applyFor) {
|
|
|
+ res.data.applyFor.id = ''
|
|
|
+ this.taskData.applies = res.data.applyFor
|
|
|
+ if (this.taskData.applies.apply_data) {
|
|
|
+ this.taskData.applies.apply_data.forEach((item) => {
|
|
|
+ item.id = ''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (res.data.tripartite) {
|
|
|
+ this.taskData.tripartite = res.data.tripartite
|
|
|
+ this.taskData.tripartite.forEach((item) => {
|
|
|
+ item.id = ''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (res.data.linkman) {
|
|
|
+ res.data.linkman.forEach((item) => {
|
|
|
+ item.id = ''
|
|
|
+ })
|
|
|
+ this.taskData.linkman = res.data.linkman
|
|
|
+ }
|
|
|
+ if (res.data.credit) {
|
|
|
+ this.taskData.credit = res.data.credit
|
|
|
+ this.taskData.credit.deal_data.forEach((item) => {
|
|
|
+ item.id = ''
|
|
|
+ })
|
|
|
+ this.taskData.credit.overdue_data.forEach((item) => {
|
|
|
+ item.id = ''
|
|
|
+ })
|
|
|
+ this.taskData.credit.query_data.forEach((item) => {
|
|
|
+ item.id = ''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (res.data.postLoan) {
|
|
|
+ this.taskData.post_loan = res.data.postLoan
|
|
|
+ }
|
|
|
+ console.log('-----------this.taskData-------------', this.taskData)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setBusinessCache() {
|
|
|
+ //设置缓存
|
|
|
+ if (this.isCache) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.isCache = true
|
|
|
+ setBusinessCache(this.taskData).then((res) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.isCache = false;
|
|
|
+ }, 2000)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getBusinessCache(productId) {
|
|
|
+ //获取缓存
|
|
|
+ getBusinessCache({
|
|
|
+ 'productId': productId
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ if (res.data.productId !== 0) {
|
|
|
+ this.isNew = false
|
|
|
+ this.taskData = res.data
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
- },
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
- getTaskTypeInfo(id) {
|
|
|
- getTaskTypeInfo({
|
|
|
- 'id': id
|
|
|
- }).then((res) => {
|
|
|
- if (res.code === 1) {
|
|
|
- this.productInfo = res.data;
|
|
|
- if(this.isNew)this.getBusinessCache(id)
|
|
|
- } else {
|
|
|
- tools.error(res.msg)
|
|
|
- setTimeout(() => {
|
|
|
- this.closePage();
|
|
|
- }, 1000)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- getDraftItem(draftId) {
|
|
|
- getDraftItem({'draftId': draftId}).then((res) => {
|
|
|
- if (res.code === 1) {
|
|
|
- this.productInfo = res.data.productInfo
|
|
|
- this.taskData = res.data.taskData
|
|
|
- this.getTaskTypeInfo(this.taskData.productId)
|
|
|
- } else {
|
|
|
- this.closePage();
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- async getTaskDetail(businessId) {
|
|
|
- const res = await getTaskDetail({
|
|
|
- id: businessId
|
|
|
- })
|
|
|
- if (res.code === 1) {
|
|
|
- if (res.data.product) {
|
|
|
- this.productInfo = res.data.product
|
|
|
- this.taskData.productId = res.data.product.id
|
|
|
- }
|
|
|
- if (res.data.business) {
|
|
|
- this.taskData.clientInfo = res.data.business
|
|
|
- }
|
|
|
- if (res.data.propertyList) {
|
|
|
- this.taskData.property = res.data.propertyList
|
|
|
- }
|
|
|
- if (res.data.applyFor) {
|
|
|
- this.taskData.applies = res.data.applyFor
|
|
|
- }
|
|
|
- if (res.data.tripartite) {
|
|
|
- this.taskData.tripartite = res.data.tripartite
|
|
|
- }
|
|
|
- if (res.data.linkman) {
|
|
|
- this.taskData.linkman = res.data.linkman
|
|
|
- console.log('this.taskData.linkman:',this.taskData.linkman)
|
|
|
- }
|
|
|
- if (res.data.credit) {
|
|
|
- this.taskData.credit = res.data.credit
|
|
|
- }
|
|
|
- if (res.data.postLoan) {
|
|
|
- this.taskData.post_loan = res.data.postLoan
|
|
|
- }
|
|
|
- this.getTaskTypeInfo(this.taskData.productId)
|
|
|
- } else {
|
|
|
- this.closePage();
|
|
|
- }
|
|
|
- },
|
|
|
- delBusinessCache() {
|
|
|
- uni.showModal({
|
|
|
- title: '警告',
|
|
|
- content: '是否退出当前任务,并清除缓存!',
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- delBusinessCache({'productId': this.productInfo.id}).then((res) => {
|
|
|
- tools.leftClick()
|
|
|
- })
|
|
|
- uni.removeStorageSync('creditImg');
|
|
|
- } else {
|
|
|
- tools.leftClick()
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ getTaskTypeInfo(id) {
|
|
|
+ getTaskTypeInfo({
|
|
|
+ 'id': id
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ this.productInfo = res.data;
|
|
|
+ if (this.isNew) this.getBusinessCache(id)
|
|
|
+ } else {
|
|
|
+ tools.error(res.msg)
|
|
|
+ setTimeout(() => {
|
|
|
+ this.closePage();
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getDraftItem(draftId) {
|
|
|
+ getDraftItem({
|
|
|
+ 'draftId': draftId
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ this.productInfo = res.data.productInfo
|
|
|
+ this.taskData = res.data.taskData
|
|
|
+ this.getTaskTypeInfo(this.taskData.productId)
|
|
|
+ } else {
|
|
|
+ this.closePage();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async getTaskDetail(businessId) {
|
|
|
+ const res = await getTaskDetail({
|
|
|
+ id: businessId
|
|
|
+ })
|
|
|
+ if (res.code === 1) {
|
|
|
+ if (res.data.product) {
|
|
|
+ this.productInfo = res.data.product
|
|
|
+ this.taskData.productId = res.data.product.id
|
|
|
+ }
|
|
|
+ if (res.data.business) {
|
|
|
+ this.taskData.clientInfo = res.data.business
|
|
|
+ }
|
|
|
+ if (res.data.propertyList) {
|
|
|
+ this.taskData.property = res.data.propertyList
|
|
|
+ }
|
|
|
+ if (res.data.applyFor) {
|
|
|
+ this.taskData.applies = res.data.applyFor
|
|
|
+ }
|
|
|
+ if (res.data.tripartite) {
|
|
|
+ this.taskData.tripartite = res.data.tripartite
|
|
|
+ }
|
|
|
+ if (res.data.linkman) {
|
|
|
+ this.taskData.linkman = res.data.linkman
|
|
|
+ console.log('this.taskData.linkman:', this.taskData.linkman)
|
|
|
+ }
|
|
|
+ if (res.data.credit) {
|
|
|
+ this.taskData.credit = res.data.credit
|
|
|
+ }
|
|
|
+ if (res.data.postLoan) {
|
|
|
+ this.taskData.post_loan = res.data.postLoan
|
|
|
+ }
|
|
|
+ this.getTaskTypeInfo(this.taskData.productId)
|
|
|
+ } else {
|
|
|
+ this.closePage();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ delBusinessCache() {
|
|
|
+ uni.showModal({
|
|
|
+ title: '警告',
|
|
|
+ content: '是否退出当前任务,并清除缓存!',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ delBusinessCache({
|
|
|
+ 'productId': this.productInfo.id
|
|
|
+ }).then((res) => {
|
|
|
+ tools.leftClick()
|
|
|
+ })
|
|
|
+ uni.removeStorageSync('creditImg');
|
|
|
+ } else {
|
|
|
+ tools.leftClick()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- },
|
|
|
+ },
|
|
|
onAuthentication(item) {
|
|
|
- if(item.type===1){
|
|
|
- uni.setStorageSync('clientInfoKey',item.type_keys)
|
|
|
- uni.setStorageSync('clientInfoData',this.taskData.clientInfo)
|
|
|
- }else if(item.type===2){
|
|
|
- uni.setStorageSync('propertyKey',item.type_keys)
|
|
|
- uni.setStorageSync('propertyData',this.taskData.property)
|
|
|
- }else if(item.type===3){
|
|
|
- uni.setStorageSync('appliesKey',item.type_keys)
|
|
|
- uni.setStorageSync('appliesData',this.taskData.applies)
|
|
|
- }else if(item.type===4){
|
|
|
- uni.setStorageSync('tripartiteKey',item.type_keys)
|
|
|
- uni.setStorageSync('tripartiteData',this.taskData.tripartite)
|
|
|
- }else if(item.type===5){
|
|
|
- uni.setStorageSync('linkmanKey',item.type_keys)
|
|
|
- uni.setStorageSync('linkmanData',this.taskData.linkman)
|
|
|
- }else if(item.type===6){
|
|
|
- uni.setStorageSync('creditKey',item.type_keys)
|
|
|
- uni.setStorageSync('creditData',this.taskData.credit)
|
|
|
- }else if(item.type===7){
|
|
|
- uni.setStorageSync('postLoanKey',item.type_keys)
|
|
|
- uni.setStorageSync('postLoanData',this.taskData.post_loan)
|
|
|
- }
|
|
|
+ if (item.type === 1) {
|
|
|
+ uni.setStorageSync('clientInfoKey', item.type_keys)
|
|
|
+ uni.setStorageSync('clientInfoData', this.taskData.clientInfo)
|
|
|
+ } else if (item.type === 2) {
|
|
|
+ uni.setStorageSync('propertyKey', item.type_keys)
|
|
|
+ uni.setStorageSync('propertyData', this.taskData.property)
|
|
|
+ } else if (item.type === 3) {
|
|
|
+ uni.setStorageSync('appliesKey', item.type_keys)
|
|
|
+ uni.setStorageSync('appliesData', this.taskData.applies)
|
|
|
+ } else if (item.type === 4) {
|
|
|
+ uni.setStorageSync('tripartiteKey', item.type_keys)
|
|
|
+ uni.setStorageSync('tripartiteData', this.taskData.tripartite)
|
|
|
+ } else if (item.type === 5) {
|
|
|
+ uni.setStorageSync('linkmanKey', item.type_keys)
|
|
|
+ uni.setStorageSync('linkmanData', this.taskData.linkman)
|
|
|
+ } else if (item.type === 6) {
|
|
|
+ uni.setStorageSync('creditKey', item.type_keys)
|
|
|
+ uni.setStorageSync('creditData', this.taskData.credit)
|
|
|
+ } else if (item.type === 7) {
|
|
|
+ uni.setStorageSync('postLoanKey', item.type_keys)
|
|
|
+ uni.setStorageSync('postLoanData', this.taskData.post_loan)
|
|
|
+ }
|
|
|
uni.navigateTo({
|
|
|
url: `${item.path}?title=${item.name}`
|
|
|
})
|
|
|
},
|
|
|
- closePage(){
|
|
|
- tools.leftClick()
|
|
|
- },
|
|
|
+ closePage() {
|
|
|
+ tools.leftClick()
|
|
|
+ },
|
|
|
onCeationTask() {},
|
|
|
onLeftSubmit() {
|
|
|
console.log('预览');
|