Bläddra i källkod

表单数据传递+数据绑定功能完成

USER-20230908AJ\Administrator 1 år sedan
förälder
incheckning
6f7e62b097

+ 1 - 1
api/task.js

@@ -44,7 +44,7 @@ export const delDraft = (data) => request(newsUrl + 'draft-del', 'post', { ...da
 export const setStageOperate = (data) => request(newsUrl + 'operate', 'post', { ...data },true)
 export const getReturnedBankList = (data) => request(newsUrl + 'banks', 'post', { ...data },true)
 //录入数据校验
-export const verifyBusinessModuleKey = (data) => request(newsUrl + 'verify', 'post', { ...data },true)
+export const verifyBusinessModuleKey = (data) => request(newsUrl + 'verify', 'post', { ...data },false)
 
 export const getWeekList = (data) => request(newsUrl + 'week', 'post', { ...data },true)
 export const getDayBacklogList = (data) => request(newsUrl + 'backlog', 'post', { ...data },true)

+ 18 - 26
page_task/apply/apply.vue

@@ -154,7 +154,7 @@
 									type="digit" placeholder="请输入定金" rightText="万元"></en-input>
 								<en-input label="资金监管" v-model="applyItem.supervise" v-if="verifyKey('supervise')"
 									type="digit" placeholder="请输监管金额" rightText="万元"></en-input>
-								<en-radio propertyData="批复类型" v-model="applyItem.reply_type"
+								<en-radio label="批复类型" v-model="applyItem.reply_type"
 									v-if="verifyKey('reply_type')" :list="replyData"></en-radio>
 								<en-input label="成交中介" v-model="applyItem.intermediary" v-if="verifyKey('intermediary')"
 									type="text" placeholder="请输入中介公司名称"></en-input>
@@ -165,11 +165,6 @@
 							<property-select label="选择资产" v-model="applyItem.property_sns"
 								:propertyList="propertyList"></property-select>
 						</view>
-						<view class="m-t30">
-							<text class="size-30 sys-weight-600'">{{applyItem.apply_type*1===1?'还款信息':'监管银行卡信息'}}</text>
-							<en-input label="还款金额" type="number" placeholder="请输入还款金额" rightText="万元"></en-input>
-							<add-bank></add-bank>
-						</view>
 						<view class="m-t30" v-for="(repaymentItem,repaymentIndex) in applyItem.repayment_data">
 							<text class="size-30 sys-weight-600'">{{applyItem.apply_type*1===1?'还款信息':'监管银行卡信息'}}</text>
 							<en-input v-if="applyItem.apply_type*1===1" v-model="repaymentItem.money" label="还款金额"
@@ -179,7 +174,7 @@
 						</view>
 						<view class="row">
 							<button class="size-26 r-10 button-color apply-button bank-button m-t30"
-								hover-class="is-hover" @click="addApply">+添加监管银行信息</button>
+								hover-class="is-hover" @click="addBank(index,1)">+{{applyItem.apply_type*1===1?'还款信息':'监管银行卡信息'}}</button>
 							<view class="flex"></view>
 						</view>
 
@@ -192,7 +187,7 @@
 						</view>
 						<view class="row">
 							<button class="size-26 r-10 button-color apply-button bank-button m-t30"
-								hover-class="is-hover" @click="addApply">+添加放款信息</button>
+								hover-class="is-hover" @click="addBank(index,2)">+添加放款信息</button>
 							<view class="flex"></view>
 						</view>
 						<!-- 						<view class="row-justify-sb">
@@ -206,13 +201,14 @@
 						</view> -->
 					</view>
 				</view>
+        <en-blank message="暂无抵押申请信息~~" v-if="appliesInfo.apply_data.length<=0"></en-blank>
 				<button class="size-26 r-10 button-color apply-button m-t30" hover-class="is-hover"
 					@click="addApply">+添加申请信息</button>
 			</view>
 			<!-- 抵押信息end -->
 		</view>
-		<EnButton is_both :leftText="'保存'" :rightText="step === 2?'提交':'下一步'" @onLeftSubmit="onLeftSubmit"
-			@onSubmit="onStep">
+    <EnButton  v-if="step === 1"  :text="'下一步'"  @onSubmit="onStep"></EnButton>
+		<EnButton is_both v-else :leftText="'上一步'" :rightText="'提交'" @onLeftSubmit="onLeftSubmit" @onSubmit="onSubmit">
 		</EnButton>
 	</view>
 </template>
@@ -229,9 +225,11 @@
 		getTaskOptions
 	} from "@/api/task";
 	import tools from "@/service/tools";
+  import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
 
 	export default {
 		components: {
+      EnBlank,
 			AddBank,
 			PropertySelect,
 			EnDate,
@@ -370,11 +368,11 @@
 				}
 			},
 			addApply() {
-				tools.success('aaaaaaaaaaaaa')
 				if (!this.appliesInfo.apply_data) {
 					this.appliesInfo.apply_data = []
 				}
-				this.appliesInfo.apply_data.push(this.applyItem)
+				this.appliesInfo.apply_data.push(JSON.parse(JSON.stringify(this.applyItem)))
+        this.editIndex=this.appliesInfo.apply_data.length-1
 			},
 			verifyKey(field) {
 				return this.showKeys.indexOf(field) >= 0
@@ -408,11 +406,6 @@
 			},
 			// 保存
 			onLeftSubmit() {
-				console.log(this.formData);
-				console.log('保存');
-				this.applyList.map(item => {
-					item.is_edit = true
-				})
 				if (this.step === 1) return
 				this.step--
 			},
@@ -423,14 +416,13 @@
 			},
 			// 完成
 			onSubmit() {
-				this.step = 4
-			},
-			// 添加信息
-			onAddInfo() {
-				this.applyList.push({
-					is_edit: false
-				})
+
+        uni.$emit('putAppliesInfo',this.appliesInfo)
+        setTimeout(()=>{
+          tools.leftClick()
+        },50)
 			},
+
 			// 编辑单个信息
 			onEditInfo(index) {
 				this.editIndex = index
@@ -439,10 +431,10 @@
 			onDeleteInfo(index) {
 				uni.showModal({
 					title: '提示',
-					content: '确定删除?',
+					content: '是否删除当前抵押信息?',
 					success: (res) => {
 						if (res.confirm) {
-							this.applyList.splice(index, 1)
+							this.appliesInfo.apply_data.splice(index, 1)
 						}
 					}
 				})

+ 4 - 4
page_task/apply/components/add-bank.vue

@@ -1,8 +1,7 @@
 <template>
 	<view class="bank-box">
-		<en-input label="银行卡" v-model="number" type="number" placeholder="请输入银行卡号" @addRight="showUploadingImg(true)"
-			right-img="/static/img/new-add/add-bank.png">
-			<uni-icons class="m-l10" type="camera" size="30" color="#999"></uni-icons>
+		<en-input label="银行卡" v-model="number" type="number" placeholder="请输入银行卡号" >
+			<uni-icons class="m-l10" type="camera" size="30" color="#999" @click="showUploadingImg(true)"></uni-icons>
 		</en-input>
 		<en-input label="所属银行" v-model="name" type="text" placeholder="请输入银行名称"></en-input>
 		<uni-popup ref="popup" :safeArea="false" type="bottom" @change="closePopup">
@@ -105,7 +104,8 @@
 					},
 				});
 			},
-			showUploadingImg(showImg, uploadingType) {
+			showUploadingImg(showImg) {
+        console.log('----------------------')
 				if (showImg) {
 					if (this.isUploading) {
 						return

+ 25 - 27
page_task/identity/identity.vue

@@ -47,22 +47,22 @@
 						:identity-two.sync="formData.identity_two" :identity-validity.sync="formData.identity_validity"
 						:user-birthday.sync="formData.birthday" v-if="verifyKey('identity_one')"></add-identity>
 					<view class="p-t20">
-						<en-input :value="formData.name" label="姓名" placeholder="待自动录入" v-if="verifyKey('name')"
+						<en-input  v-model="formData.name" label="姓名" placeholder="待自动录入" v-if="verifyKey('name')"
 							disabled></en-input>
-						<!--						<en-input :value="formData.sex===1?'男':'女'" label="性别" placeholder="待自动录入" disabled></en-input>-->
+						<!--						<en-input  v-model="formData.sex===1?'男':'女'" label="性别" placeholder="待自动录入" disabled></en-input>-->
 						<EnRadio v-model="formData.sex" label="性别" v-if="verifyKey('sex')" :list="sexData"
 							disabled="disabled"> </EnRadio>
-						<en-input :value="formData.id_number" v-if="verifyKey('id_number')" :label="'身份证号'"
+						<en-input  v-model="formData.id_number" v-if="verifyKey('id_number')" :label="'身份证号'"
 							placeholder="待自动录入" disabled> </en-input>
-						<en-input :value="formData.birthday" v-if="verifyKey('birthday')" :is_border="false"
+						<en-input  v-model="formData.birthday" v-if="verifyKey('birthday')" :is_border="false"
 							:label="'生日'" placeholder="待自动录入" disabled> </en-input>
 					</view>
 				</view>
 				<view class="sys-background-fff r-20 m-t20 p-lr30">
-					<en-input :value="formData.phone" v-if="verifyKey('phone')" :label="'联系方式'"></en-input>
+					<en-input v-model="formData.phone" v-if="verifyKey('phone')" :label="'联系方式'"></en-input>
 					<en-city label="常居城市" placeholder="请选择省、市、区" v-if="verifyKey('resident_city')"
 						v-model="formData.resident_city"></en-city>
-					<en-input :label="'详细地址'" :value="formData.resident_address"
+					<en-input :label="'详细地址'"  v-model="formData.resident_address"
 						v-if="verifyKey('resident_address')"></en-input>
 					<en-select label="婚姻状态" :local-data="marriageData" v-if="verifyKey('marriage_type')"
 						v-model="formData.marriage_type"></en-select>
@@ -92,9 +92,8 @@
 				v-show="verifyKey('education_type') || verifyKey('employ_type') || verifyKey('firm_name')|| verifyKey('firm_city')|| verifyKey('firm_address')">
 				<view class="sys-background-fff r-20 m-t20 p-lr30 p-t30">
 					<view class="size-30 sys-weight-600 p-b30">教育职业背景</view>
-					<en-input label="学历" placeholder="请选择教育背景" :local-data="educationData"
-						v-if="verifyKey('education_type')" v-model="formData.education_type" disabled
-						is_select></en-input>
+					<en-select label="学历" placeholder="请选择教育背景" :local-data="educationData"
+						v-if="verifyKey('education_type')" v-model="formData.education_type" ></en-select>
 					<EnRadio v-model="formData.is_farming" label="雇佣类型" :list="employTypeData"> </EnRadio>
 					<en-input label="企业名称" placeholder="请输入企业名称" v-if="verifyKey('firm_name')"
 						v-model="formData.firm_name"></en-input>
@@ -118,8 +117,7 @@
 			</view>
 			<!-- 社保信息end -->
 		</view>
-		<!-- <EnButton :text="'完成'" @onSubmit="onSubmit" v-if="step === 3 || step === 4"></EnButton> -->
-		<EnButton is_both :leftText="'上一步'" :rightText="'保存'" @onLeftSubmit="onStep(0)" @onSubmit="onSubmit" />
+		 <EnButton :text="'完成'" @onSubmit="onSubmit" ></EnButton>
 	</view>
 </template>
 <!-- correct -->
@@ -131,6 +129,8 @@
 	import EnUpload from "@/components/en-from/en-upload/en-upload.vue";
 	import AddIdentity from "@/page_task/identity_upload/add-identity.vue";
 	import EnInput from "@/components/en-from/en-input/en-input.vue";
+  import tools from "@/service/tools";
+  import {verifyBusinessModuleKey} from "@/api/task";
 
 	export default {
 		components: {
@@ -252,10 +252,16 @@
 		watch: {
 			'formData': {
 				handler() {
-					uni.$emit("putClientInfo", this.formData);
+          // console.log( this.formData)
+					// uni.$emit("putClientInfo", this.formData);
 				},
 				deep: true
 			},
+      'formData.id_number':function () {
+        if(this.formData.id_number!==''){
+          uni.$emit("putClientInfo", this.formData);
+        }
+      }
 		},
 		onPageScroll(res) {
 			this.scrollTop = res.scrollTop / 120
@@ -268,6 +274,7 @@
 			this.clientInfoKey = clientInfoKey
 
 			uni.$on('setClientData', clientInfo => {
+        console.log('数据被重置了-------------------')
 				this.formData = clientInfo
 			})
 		},
@@ -283,25 +290,16 @@
 						'&identity_validity=' + this.formData.identity_validity
 				})
 			},
-			// 保存
-			onLeftSubmit() {
-				console.log(this.formData);
-				console.log('保存');
-				this.step--
-			},
-			// 下一步
-			onStep(type) {
-
 
-			},
 			// 完成
 			onSubmit() {
-				this.step = 4
+
+        uni.$emit("putClientInfo", this.formData);
+        setTimeout(()=>{
+          tools.leftClick()
+        },50)
 			},
-			onChange(address) {
-				console.log(address);
-				this.formData.firm_address = address
-			}
+
 
 		}
 	}

+ 10 - 0
page_task/information/information.vue

@@ -219,6 +219,16 @@
           this.verifyBusinessModuleKey(1)
         }
       })
+      //更新资产信息
+      uni.$on('putPropertyInfo',propertyInfo=>{
+        this.taskData.property=propertyInfo
+        this.verifyBusinessModuleKey(2)
+      })
+      //更新申请信息
+      uni.$on('putAppliesInfo',appliesInfo=>{
+        this.taskData.applies=appliesInfo
+        this.verifyBusinessModuleKey(3)
+      })
       //更新第三方信息
       uni.$on('putTripartiteInfo',tripartiteInfo=>{
         this.taskData.tripartite=tripartiteInfo

+ 9 - 1
page_task/linkman/linkman.vue

@@ -25,7 +25,7 @@
               </view>
               <view class="row-c" v-if="verifyKey('relation')">
                 <view class="text-color-666"><text></text>关系:</view>
-                <text>{{linkmen.relation}}</text>
+                <text>{{getRelationText(linkmen.relation)}}</text>
               </view>
               <view class="row-c" v-if="verifyKey('phone')">
                 <view class="text-color-666"><text></text>手机号:</view>
@@ -111,6 +111,14 @@ export default {
     this.getTaskRelations()
   },
   methods: {
+    getRelationText(type){
+      let item=this.relationList.filter(val=>val.value===type*1)
+      if(item.length>0){
+        return item[0].text
+      }else {
+        return '';
+      }
+    },
     async getTaskRelations() {
       const res = await getTaskRelations()
       if (res.code === 1) {

+ 1 - 1
page_task/property/components/car.vue

@@ -147,7 +147,7 @@
 						this.carList.push({
 							'property_type': 2,
 							'property_sn': res.data,
-							'data': this.carItem
+							'data': JSON.parse(JSON.stringify(this.carItem))
 						})
 						this.$emit('onResize')
 					} else {

+ 1 - 1
page_task/property/components/company.vue

@@ -118,7 +118,7 @@
 						this.firmList.push({
 							'property_type': 4,
 							'property_sn': res.data,
-							'data': this.firmItem
+							'data': JSON.parse(JSON.stringify(this.firmItem))
 						})
 						this.$emit('onResize')
 					} else {

+ 1 - 1
page_task/property/components/guarantee.vue

@@ -109,7 +109,7 @@
 						this.insuranceList.push({
 							'property_type': 3,
 							'property_sn': res.data,
-							'data': this.insuranceItem
+							'data': JSON.parse(JSON.stringify(this.insuranceItem))
 						})
 						this.$emit('onResize')
 					} else {

+ 1 - 1
page_task/property/components/house.vue

@@ -123,7 +123,7 @@
 						this.houseList.push({
 							'property_type': 1,
 							'property_sn': res.data,
-							'data': this.houseItem
+							'data': JSON.parse(JSON.stringify(this.houseItem))
 						})
 						this.$emit('onResize')
 					} else {

+ 23 - 6
page_task/property/property.vue

@@ -16,8 +16,8 @@
 						<House></House>
 					</view>
 				</view> -->
-				<uni-collapse ref="collapse" accordion class="sys-from-background-color">
-					<uni-collapse-item titleBorder="none" :border="false"
+				<uni-collapse ref="collapse" accordion class="sys-from-background-color" >
+					<uni-collapse-item titleBorder="none" :border="true"  v-show="propertyKey.indexOf('house_item')>=0"
 						class="collapse-item-house page-box-bg-fff p-30 r-30">
 						<template v-slot:title>
 							<view class="row-justify-sb center">
@@ -33,7 +33,7 @@
 							<House v-model="houseList" :show-keys="propertyKey" @onResize="onResizeInit"></House>
 						</view>
 					</uni-collapse-item>
-					<uni-collapse-item titleBorder="none" :border="false" class="collapse-item-car   p-30 r-30">
+					<uni-collapse-item titleBorder="none" :border="true" v-show="propertyKey.indexOf('car_item')>=0" class="collapse-item-car    p-30 r-30">
 						<template v-slot:title class="page-box-bg-fff">
 							<view class="row-justify-sb center">
 								<view class="row-c">
@@ -49,7 +49,7 @@
 								@onResize="onResizeInit"></property-car>
 						</view>
 					</uni-collapse-item>
-					<uni-collapse-item titleBorder="none" :border="false"
+					<uni-collapse-item titleBorder="none" :border="true" v-show="propertyKey.indexOf('insurance_item')>=0"
 						class="collapse-item-guarantee  page-box-bg-fff p-30 r-30">
 						<template v-slot:title>
 							<view class="row-justify-sb center">
@@ -66,7 +66,7 @@
 								@onResize="onResizeInit"></property-guarantee>
 						</view>
 					</uni-collapse-item>
-					<uni-collapse-item titleBorder="none" :border="false"
+					<uni-collapse-item titleBorder="none" :border="true" v-show="propertyKey.indexOf('firm_item')>=0"
 						class="collapse-item-company page-box-bg-fff p-30 r-30">
 						<template v-slot:title>
 							<view class="row-justify-sb center">
@@ -96,6 +96,7 @@
 	import PropertyCar from "@/page_task/property/components/car.vue";
 	import PropertyGuarantee from "@/page_task/property/components/guarantee.vue";
 	import PropertyCompany from "@/page_task/property/components/company.vue";
+  import tools from "@/service/tools";
 
 	export default {
 		components: {
@@ -154,7 +155,23 @@
 				}, 200)
 			},
 			onSubmit() {
-				console.log('提交资料');
+        let propertyData=[]
+        for (let i in this.houseList) {
+          propertyData.push(this.houseList[i])
+        }
+        for (let i in this.carList) {
+          propertyData.push(this.carList[i])
+        }
+        for (let i in this.insuranceList) {
+          propertyData.push(this.insuranceList[i])
+        }
+        for (let i in this.firmList) {
+          propertyData.push(this.firmList[i])
+        }
+        uni.$emit('putPropertyInfo',propertyData)
+        setTimeout(()=>{
+          tools.leftClick()
+        },50)
 			},
 		}
 	}