From 39ae52b3f65e2bba3b6570adb51e791cb3befff7 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 02 七月 2025 16:32:29 +0800
Subject: [PATCH] 提交

---
 wx/pages/new_report/new_report.vue |  137 +++++++++++++++++++++++++++++++++++----------
 1 files changed, 106 insertions(+), 31 deletions(-)

diff --git a/wx/pages/new_report/new_report.vue b/wx/pages/new_report/new_report.vue
index f328ab3..c96f90e 100644
--- a/wx/pages/new_report/new_report.vue
+++ b/wx/pages/new_report/new_report.vue
@@ -35,7 +35,7 @@
 							</scroll-view>
 						</u-form-item>
 						<u-form-item label="璇佷欢鍙风爜锛�" prop="idcardNo" required>
-							<u--input v-model="model.idcardNo" maxlength="18" placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�" border="none"></u--input>
+							<u--input v-model="model.idcardNo" disabled maxlength="18" placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�" border="none"></u--input>
 						</u-form-item>
 						<u-form-item label="鎶ユ浜猴細" prop="informantName" borderBottom required>
 							<u--input v-model="model.informantName" placeholder="璇疯緭鍏ユ姤妗堜汉濮撳悕" border="none"></u--input>
@@ -54,7 +54,7 @@
 								<u-icon slot="right" name="arrow-right"></u-icon>
 							</view>
 							<view class="faList" v-if="scheme">
-								<text>淇濆崟鍙凤細{{scheme.applyCode || ''}}</text>
+								<text>淇濆崟鍙凤細{{scheme.applyCode || ''}}</text>	
 								<text>淇濋殰鏈熼檺锛�<template v-if="scheme.parentStartTime">{{scheme.parentStartTime}}锝瀧{scheme.parentEndTime}}</template></text>
 								<text>鎶曚繚鍗曚綅锛歿{scheme.companyName || ''}}</text>
 								<text>娲鹃仯鍗曚綅锛歿{scheme.duName}}</text>
@@ -140,7 +140,7 @@
 				</view>
 				<view class="box_up_title">
 					<text>涓婁紶鐞嗚禂鏉愭枡</text>
-					<view class="box_up_title_downlod">
+					<view class="box_up_title_downlod" @click="openDownLodFile">
 						<text>涓嬭浇绀轰緥</text>
 						<image src="/static/icon/ic_download@2x.png" mode="widthFix"></image>
 					</view>
@@ -172,7 +172,7 @@
 					<view class="box_up_list_row">
 						<view class="box_up_list_row_title">
 							<text>闂ㄨ瘖</text>
-							<view class="box_up_list_row_title_icon">
+							<view class="box_up_list_row_title_icon" @click="openInfo(2)">
 								<image src="/static/icon/ic_shuoming@2x.png" mode="widthFix"></image>
 								<text>涓婁紶璇存槑</text>
 							</view>
@@ -195,7 +195,7 @@
 					<view class="box_up_list_row">
 						<view class="box_up_list_row_title">
 							<text>浣忛櫌</text>
-							<view class="box_up_list_row_title_icon">
+							<view class="box_up_list_row_title_icon" @click="openInfo(3)">
 								<image src="/static/icon/ic_shuoming@2x.png" mode="widthFix"></image>
 								<text>涓婁紶璇存槑</text>
 							</view>
@@ -218,7 +218,7 @@
 					<view class="box_up_list_row">
 						<view class="box_up_list_row_title">
 							<text>浼ゆ畫</text>
-							<view class="box_up_list_row_title_icon">
+							<view class="box_up_list_row_title_icon" @click="openInfo(4)">
 								<image src="/static/icon/ic_shuoming@2x.png" mode="widthFix"></image>
 								<text>涓婁紶璇存槑</text>
 							</view>
@@ -241,7 +241,7 @@
 					<view class="box_up_list_row">
 						<view class="box_up_list_row_title">
 							<text>鍏朵粬</text>
-							<view class="box_up_list_row_title_icon">
+							<view class="box_up_list_row_title_icon" @click="openInfo(5)">
 								<image src="/static/icon/ic_shuoming@2x.png" mode="widthFix"></image>
 								<text>涓婁紶璇存槑</text>
 							</view>
@@ -337,15 +337,22 @@
 		<!-- 寮圭獥鎻愰啋 -->
 		<u-modal :show="show" title="鏃犳硶瀹屾垚鎶ユ" content='璇ュ嚭闄╀汉鏃犳湁鏁堜繚鍗� 璇烽噸鏂伴�夋嫨'></u-modal>
 		<!-- 涓婁紶璇存槑 -->
-		<u-popup :show="show6" closeable mode="bottom">
+		<u-popup :show="show6" closeable mode="bottom" @close="show6 = false">
 			<view class="info">
 				<view class="info_title">涓婁紶璇存槑</view>
-				<view class="info_content">闇�涓婁紶鐨勬枃浠讹細鍔冲姩鍚堝悓澶嶅嵃浠躲�佸伐璧勬祦姘淬��</view>
+				<view class="info_content" v-html="htmlVal"></view>
 				<view class="info_btn">
 					<u-button shape="circle" style="height: 100%;" text="鎴戠煡閬撲簡" color="#437CB3" @click="show6 = false"></u-button>
 				</view>
 			</view>
 		</u-popup>
+		<!-- 涓嬭浇鏂囦欢 -->
+		<u-action-sheet
+			:show="show7"
+			:actions="btns"
+			:closeOnClickOverlay="true"
+			:closeOnClickAction="true"
+			@select="selectRow" />
 	</view>
 </template>
 
@@ -362,6 +369,7 @@
 				show4: false,
 				show5: false,
 				show6: false,
+				show7: false,
 				date: Number(new Date()),
 				minDate: '',
 				maxDate: '',
@@ -378,6 +386,8 @@
 					{ name: '涓婁紶鐞嗚禂鏉愭枡' },
 					{ name: '瀹屾垚鎶ユ' },
 				],
+				btns: [],
+				insurance: null,
 				scheme: null,
 				columns1: [],
 				columns2: [],
@@ -420,24 +430,24 @@
 					otherFileList: [],
 				},
 				rules: {
-					'receiveAccount': {
-						type: 'string',
-						required: true,
-						message: '璇峰~鍐欐敹娆捐处鍙�',
-						trigger: ['blur']
-					},
-					'receiveUserName': {
-						type: 'string',
-						required: true,
-						message: '璇峰~鍐欐敹娆句汉',
-						trigger: ['blur']
-					},
-					'receiveBank': {
-						type: 'string',
-						required: true,
-						message: '璇峰~鍐欐敹娆鹃摱琛�',
-						trigger: ['blur']
-					},
+					// 'receiveAccount': {
+					// 	type: 'string',
+					// 	required: true,
+					// 	message: '璇峰~鍐欐敹娆捐处鍙�',
+					// 	trigger: ['blur']
+					// },
+					// 'receiveUserName': {
+					// 	type: 'string',
+					// 	required: true,
+					// 	message: '璇峰~鍐欐敹娆句汉',
+					// 	trigger: ['blur']
+					// },
+					// 'receiveBank': {
+					// 	type: 'string',
+					// 	required: true,
+					// 	message: '璇峰~鍐欐敹娆鹃摱琛�',
+					// 	trigger: ['blur']
+					// },
 					'memberName': {
 						type: 'string',
 						required: true,
@@ -493,7 +503,8 @@
 						trigger: ['blur']
 					}
 				},
-				fileList: []
+				fileList: [],
+				htmlVal: ''
 			};
 		},
 		onLoad(option) {
@@ -504,14 +515,66 @@
 				})
 				this.getDetails()
 				this.getArea()
-				// this.getUser()
 				return
 			}
 			this.getArea()
-			// this.getUser()
 			this.model.informantName = this.$store.state.userInfo.realname
 		},
 		methods: {
+			getInsuranceFile (obj) {
+				this.insurance = null
+				this.$u.api.insuranceFile(obj.insuranceId, 1)
+					.then(res => {
+						console.log(res)
+						this.insurance = res.data
+					})
+			},
+			selectRow(row) {
+				console.log(row)
+				var that = this;
+				uni.downloadFile({
+					url: row.type === 0 ? this.insurance.lpStampTempFile.fileurlFull : this.insurance.lpFile.fileurlFull,
+					success: (res) => {
+						if (res.statusCode === 200) {
+							let fileManager = wx.getFileSystemManager();
+							fileManager.saveFile({
+								tempFilePath: res.tempFilePath,
+								success: (res) => {
+									uni.showToast({ title: '淇濆瓨鎴愬姛!', icon: 'success' })
+									that.show7 = false
+								},
+								fail: (err) => {
+									uni.showToast({ title: '淇濆瓨澶辫触!', icon: 'error' })
+									that.show7 = false
+								}
+							});
+						}
+					}
+				})
+			},
+			openDownLodFile() {
+				let arr = []
+				if (this.insurance && this.insurance.lpStampTempFile && this.insurance.lpStampTempFile.fileurlFull) {
+					arr.push({
+						name: '鐩栫珷鏂囦欢妯$増',
+						type: 0,
+						fontSize: '20'
+					})
+				}
+				if (this.insurance && this.insurance.lpFile && this.insurance.lpFile.fileurlFull) {
+					arr.push({
+						name: '鐞嗚禂鏉愭枡涓�瑙堣〃',
+						type: 1,
+						fontSize: '20'
+					})
+				}
+				this.btns = arr
+				if (arr.length === 0) {
+					uni.showToast({ title: '鏆傛棤鏂囦欢', icon: 'none' })
+					return;
+				}
+				this.show7 = true
+			},
 			jixu() {
 				uni.navigateTo({
 					url: `/pages/report_details/report_details?id=${this.id}`
@@ -560,6 +623,7 @@
 			clickItem(item) {
 				this.model.memberName = item.name
 				this.model.memberId = item.id
+				this.model.idcardNo = item.idcardNo
 				this.columns2 = []
 			},
 			// 鎼滅储
@@ -646,6 +710,7 @@
 									res.data.forEach(item => {
 										if (item.solutionId === this.model.solutionId) {
 											this.scheme = item
+											this.getInsuranceFile(item)
 											this.minDate = this.dateToTimestamp(item.parentStartTime)
 											this.maxDate = this.dateToTimestamp(item.parentEndTime)
 											this.date = this.dateToTimestamp(item.parentStartTime)
@@ -894,8 +959,17 @@
 			},
 			openInfo(type) {
 				if (type === 1) {
-					this.show6 = true
+					this.htmlVal = this.insurance.lpYggxFileInfo
+				} else if (type === 2) {
+					this.htmlVal = this.insurance.lpMzFileInfo
+				} else if (type === 3) {
+					this.htmlVal = this.insurance.lpZyFileInfo
+				} else if (type === 4) {
+					this.htmlVal = this.insurance.lpScFileInfo
+				} else if (type === 5) {
+					this.htmlVal = this.insurance.lpYggxFileInfo
 				}
+				this.show6 = true
 			},
 			confirm4(e) {
 				this.minDate = this.dateToTimestamp(e.value[0].parentStartTime)
@@ -910,6 +984,7 @@
 				this.model.applyDetailId = e.value[0].id
 				this.model.insuranceApplyId = e.value[0].applyId
 				this.scheme = e.value[0]
+				this.getInsuranceFile(e.value[0])
 				this.show5 = false
 			},
 			confirm3(e) {

--
Gitblit v1.9.3