From 3c738f4fe2762bba8087e5a22fc0dc06560eab0e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 08 Aug 2024 10:01:17 +0800
Subject: [PATCH] 三色任务与自查任务

---
 subPackage/workbench/views/bailReportDetail.vue |  144 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 107 insertions(+), 37 deletions(-)

diff --git a/subPackage/workbench/views/bailReportDetail.vue b/subPackage/workbench/views/bailReportDetail.vue
index bf576d9..78243d4 100644
--- a/subPackage/workbench/views/bailReportDetail.vue
+++ b/subPackage/workbench/views/bailReportDetail.vue
@@ -1,32 +1,44 @@
 <template>
 	<view class="container">
 		<view class="basic">
-			<box-title title="基本信息" class="box-title"></box-title>
-			<view class="info">
+			<!-- <box-title title="基本信息" class="box-title"></box-title> -->
+			<view class="info mt-20 bgc-ff">
 				<lineItem :dataInfo="basicData"></lineItem>
+
+				<view class="licence" v-if="locationImageUrls.length">
+					<!-- <box-title title="位置图片" class="box-title"></box-title> -->
+					<view class="f-30 mb-20">位置图片</view>
+					<view class="flex-wrap">
+						<view v-for="(i,k) in locationImageUrls" :key="k" class="mr-20 mt-20"
+							@click="previewImg(i,locationImageUrls)">
+							<u-image :src="i" width="80" height="80"></u-image>
+						</view>
+					</view>
+				</view>
+
 			</view>
 		</view>
-		<view class="licence" v-if="locationImageUrls.length">
+		<!-- <view class="licence" v-if="locationImageUrls.length">
 			<box-title title="位置图片" class="box-title"></box-title>
 			<view class="flex-wrap">
-				<view v-for="(i,k) in locationImageUrls" :key="k" class="ml-20 mt-20"  @click="previewImg(i,locationImageUrls)">
+				<view v-for="(i,k) in locationImageUrls" :key="k" class="ml-20 mt-20"
+					@click="previewImg(i,locationImageUrls)">
 					<u-image :src="i" width="80" height="80"></u-image>
 				</view>
 			</view>
-		</view>
+		</view> -->
 
 
-		<view class="item mt-30">
+		<view class="item mt-20 bgc-ff">
 			<u-form labelPosition="left" :model="info" ref="form" labelWidth="100" :labelStyle="{fontSize:'28rpx'}">
-				<u-form-item label="审核结果" prop="confirmFlag" borderBottom @click="showPicker()">
+				<u-form-item label="审核结果" prop="confirmFlag" borderBottom>
 					<u-input v-model="confirmFlag" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
 						placeholderClass="f-28 c-99" inputAlign="right"></u-input>
-					<u-icon slot="right" name="arrow-right"></u-icon>
+					<!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
 				</u-form-item>
-				<u-form-item label="备注" borderBottom>
-					<u--input type="textarea" v-model="info.confirmNotion" :disabled="isDisabled"
-						disabledColor="#ffffff" placeholderClass="f-28 c-99" border="none"
-						inputAlign="right"></u--input>
+				<u-form-item label="备注" borderBottom v-if="info.confirmNotion">
+					<u--input type="textarea" v-model="info.confirmNotion" :disabled="true" disabledColor="#ffffff"
+						placeholderClass="f-28 c-99" border="none" inputAlign="right"></u--input>
 
 				</u-form-item>
 				<u-form-item label="审核人员" prop="checkUserName" borderBottom>
@@ -41,7 +53,7 @@
 			</u-form>
 		</view>
 
-		<view v-if="status == 2 && roleType  == 2">
+		<view v-if="status == 2" class="section bgc-ff mt-20 mb-20">
 			<u-subsection :list="tabList" :current="tabIndex" button-color="#017BFC" @change="changeTab"></u-subsection>
 			<u-form labelPosition="left" :model="goOutInfo" ref="form" labelWidth="100"
 				:labelStyle="{fontSize:'28rpx'}">
@@ -83,12 +95,13 @@
 				</view>
 			</u-form>
 			<view class="upload bgc-ff">
-				<view class="f-28 mb-20">位置图片</view>
+				<view class="f-30 mb-20">位置图片</view>
 				<view class="mt-20" v-if="tabIndex == 0">
 					<u-upload :fileList="startImageUrls" :previewFullImage="uploadConfig.previewFullImage"
 						:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
 						:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
-						@afterRead="afterReadImgs($event,'startImageUrls')" @delete="deletePics($event,'startImageUrls')">
+						@afterRead="afterReadImgs($event,'startImageUrls')"
+						@delete="deletePics($event,'startImageUrls')">
 						<view class="upload-item upload-icon flex_base">
 							<u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
 						</view>
@@ -98,7 +111,8 @@
 					<u-upload :fileList="reachImageUrls" :previewFullImage="uploadConfig.previewFullImage"
 						:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
 						:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
-						@afterRead="afterReadImgs($event,'reachImageUrls')" @delete="deletePics($event,'reachImageUrls')">
+						@afterRead="afterReadImgs($event,'reachImageUrls')"
+						@delete="deletePics($event,'reachImageUrls')">
 						<view class="upload-item upload-icon flex_base">
 							<u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
 						</view>
@@ -108,7 +122,8 @@
 					<u-upload :fileList="returnImageUrls" :previewFullImage="uploadConfig.previewFullImage"
 						:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
 						:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
-						@afterRead="afterReadImgs($event,'returnImageUrls')" @delete="deletePics($event,'returnImageUrls')">
+						@afterRead="afterReadImgs($event,'returnImageUrls')"
+						@delete="deletePics($event,'returnImageUrls')">
 						<view class="upload-item upload-icon flex_base">
 							<u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
 						</view>
@@ -124,11 +139,14 @@
 		<view class="bottom-btn" v-if="roleType == 2 && status == 2">
 			<u-button type="primary" @click="submit">提交</u-button>
 		</view> -->
-		
-		<footer-btn   v-if="roleType == 1 && status == 1" text="提交审核"  @click="submit" />
-		<footer-btn   v-if="roleType == 2 && status == 2" text="提交" @click="submit"  />
-		
-		
+
+		<!-- <footer-btn   v-if="roleType == 1 && status == 1" text="提交审核"  @click="submit" /> -->
+
+		<audit-action @handle="submit" v-if="roleType == 1 && status == 1"></audit-action>
+		<footer-btn v-if="roleType == 2 && status == 2" text="提交" @click="submit" />
+		<footer-btn v-if="roleType == 2 && status == 3" text="重新编辑" @click="navToEdit" />
+
+
 		<u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="goOutDate[tabIndex]" mode="datetime"
 			:formatter="formatter" @confirm="confirmDate" @cancel="cancelPickerDate"></u-datetime-picker>
 		<u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
@@ -144,10 +162,12 @@
 		getBailReportingDetail,
 		setBailReporting
 	} from '@/api/reporting/reporting'
+	import auditAction from '../components/actionBtn.vue'
 	export default {
 		components: {
 			boxTitle,
-			lineItem
+			lineItem,
+			auditAction
 		},
 		mixins: [uploadMixin],
 		data() {
@@ -163,7 +183,7 @@
 						value: '未完善'
 					},
 					{
-						label: '申请名称',
+						label: '申请事由',
 						name: 'applyName',
 						value: '未完善'
 					},
@@ -261,15 +281,16 @@
 			},
 
 			showPickerDate() {
-				if (this.roleType == 2 && this.status != 1) return;
+				if (this.roleType == 1 && this.status != 1) return;
 				this.showSelectDate = true;
 			},
 			cancelPickerDate() {
 				this.showSelectDate = false;
 			},
 			showPicker() {
-				if (this.roleType == 1 && this.status != 2) return;
-				this.isPickerShow = true
+				if (this.roleType == 1) {
+					this.isPickerShow = true
+				};
 			},
 
 			showConfirmFlag(status) {
@@ -344,21 +365,27 @@
 						this.info.confirmFlag = data.confirmFlag;
 						this.info.confirmUserName = data.confirmUserName;
 						this.info.confirmUserTelephone = data.confirmUserTelephone;
+						for (let i in this.goOutInfo) {
+							this.goOutInfo[i] = data[i];
+						}
+						this.startImageUrls = this.$setImageUrl(data.startImageUrls, 2);
+						this.reachImageUrls = this.$setImageUrl(data.reachImageUrls, 2);
+						this.returnImageUrls = this.$setImageUrl(data.returnImageUrls, 2);
 					}
 					this.basicData.forEach(item => {
 						item.value = data[item.name]
 					})
 					this.locationImageUrls = this.$setImageUrl(data.locationImageUrls);
+				})
+			},
 
-				})
-			},
-			
-			previewImg(current,urls){
+			previewImg(current, urls) {
 				uni.previewImage({
-					current,urls
+					current,
+					urls
 				})
 			},
-			
+
 			handleConfirm(e) {
 				this.confirmFlag = e.value[0].name;
 				this.info.confirmFlag = e.value[0].status;
@@ -385,14 +412,31 @@
 				return urls.join(",")
 			},
 
-			submit() {
+			submit(val) {
 				if (this.roleType == 1) {
+					if (!this.info.confirmUserName) {
+						uni.showToast({
+							title: "请输入审核人员姓名",
+							icon: "none"
+						})
+						return
+					}
+					if (!this.info.confirmUserTelephone) {
+						uni.showToast({
+							title: "请输入审核人员手机号",
+							icon: "none"
+						})
+						return;
+					}
+					this.info.status = val.type;
+					this.info.confirmNotion = val.remark;
+					this.info.confirmFlag = 2;
 					this.submitRequest(this.info);
 				} else {
 					this.checkImages()
 					setTimeout(() => {
 						this.submitRequest(this.goOutInfo);
-					}, 1000)
+					}, 300)
 				}
 			},
 
@@ -414,12 +458,23 @@
 					}
 					// uni.navigateBack()
 				})
+			},
+
+			navToEdit() {
+				uni.navigateTo({
+					url: `/subPackage/label/bail?id=${this.taskId}`
+				})
 			}
+
 		}
 	}
 </script>
 
 <style lang="scss">
+	page {
+		background-color: #f5f5f5;
+	}
+
 	.container {
 		padding: 0 20rpx 130rpx;
 
@@ -466,11 +521,12 @@
 	/deep/ .u-form-item__body__left__content__label,
 	/deep/ .uni-input-placeholder {
 		font-size: 30rpx;
+		color: #000;
 	}
 
 	.upload {
-		margin: 0 30rpx;
-		padding: 30rpx;
+		// margin: 0 30rpx;
+		padding: 20rpx 0 0;
 
 
 	}
@@ -480,4 +536,18 @@
 		height: 140rpx;
 		border: 1px solid #EEEEEE;
 	}
+
+	.section {
+		padding: 20rpx;
+
+	}
+
+	.item,
+	.licence {
+		padding: 0 20rpx;
+	}
+
+	/deep/ .line-item-container .text .r {
+		color: #000 !important;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3