From e0503405ec329055fcbae47a66eef8cbb2e2d5a7 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 28 五月 2025 18:23:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1

---
 wx/pages/new_report/new_report.vue |  101 +++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 90 insertions(+), 11 deletions(-)

diff --git a/wx/pages/new_report/new_report.vue b/wx/pages/new_report/new_report.vue
index f328ab3..9b97239 100644
--- a/wx/pages/new_report/new_report.vue
+++ b/wx/pages/new_report/new_report.vue
@@ -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: [],
@@ -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}`
@@ -646,6 +709,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 +958,22 @@
 			},
 			openInfo(type) {
 				if (type === 1) {
-					this.show6 = true
+					console.log(this.insurance.lpYggxFileInfo)
+					this.htmlVal = this.insurance.lpYggxFileInfo
+				} else if (type === 2) {
+					console.log(this.insurance.lpMzFileInfo)
+					this.htmlVal = this.insurance.lpMzFileInfo
+				} else if (type === 3) {
+					console.log(this.insurance.lpZyFileInfo)
+					this.htmlVal = this.insurance.lpZyFileInfo
+				} else if (type === 4) {
+					console.log(this.insurance.lpScFileInfo)
+					this.htmlVal = this.insurance.lpScFileInfo
+				} else if (type === 5) {
+					console.log(this.insurance.lpYggxFileInfo)
+					this.htmlVal = this.insurance.lpYggxFileInfo
 				}
+				this.show6 = true
 			},
 			confirm4(e) {
 				this.minDate = this.dateToTimestamp(e.value[0].parentStartTime)
@@ -910,6 +988,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