From c2cb12bcd295512de34023fd3b0943fc8ab75f34 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 19 八月 2025 09:31:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 h5/pages/workOrder_she/workOrder_she.vue |  190 ++++++++++++++++++++++++++++++++---------------
 1 files changed, 129 insertions(+), 61 deletions(-)

diff --git a/h5/pages/workOrder_she/workOrder_she.vue b/h5/pages/workOrder_she/workOrder_she.vue
index 1083ca0..498e8ce 100644
--- a/h5/pages/workOrder_she/workOrder_she.vue
+++ b/h5/pages/workOrder_she/workOrder_she.vue
@@ -3,6 +3,7 @@
 		<view class="dca_head">
 			<text>浠诲姟{{returnStatus(info.status)}}</text>
 			<text>宸ュ崟鍙凤細{{info.code}}</text>
+			<view class="dca_head_chao" v-if="[...info.sheDealUserQwIds.split(',')].includes(userInfo.qwId) && [1, 2].includes(info.status)" @click="show3 = true">鎶勯��</view>
 		</view>
 		<u-gap height="5" bgColor="#EFEFEF"></u-gap>
 		<view class="dca_list">
@@ -96,11 +97,13 @@
 				</view>
 			</view>
 		</view>
-		<view style="width: 100%; height: calc(84rpx + env(safe-area-inset-bottom));"></view>
-		<view class="footer">
-			<view class="footer_btn" :style="info.passOnButton === 0 ? 'background-color: #3875C5; color: #ffffff;' : ''" v-if="info.closeButton === 1" @click="openGB">闂鍏抽棴</view>
-			<view class="footer_btn" v-if="info.passOnButton === 1" style="background-color: #3875C5; color: #ffffff;" @click="openFP">浠诲姟鍒嗛厤</view>
-		</view>
+		<template v-if="info.closeButton === 1 || info.passOnButton === 1">
+			<view style="width: 100%; height: calc(84rpx + env(safe-area-inset-bottom));"></view>
+			<view class="footer">
+				<view class="footer_btn" :style="info.passOnButton === 0 ? 'background-color: #3875C5; color: #ffffff;' : ''" v-if="info.closeButton === 1" @click="openGB">闂鍏抽棴</view>
+				<view class="footer_btn" v-if="info.passOnButton === 1" style="background-color: #3875C5; color: #ffffff;" @click="openFP">浠诲姟鍒嗛厤</view>
+			</view>
+		</template>
 		<!-- 浠诲姟鍒嗛厤 -->
 		<u-popup :show="show" :round="10" mode="bottom">
 			<view class="fp">
@@ -120,13 +123,13 @@
 								maxlength="200" count></u--textarea>
 						</u-form-item>
 						<u-form-item label="涓婁紶鍥剧墖" labelWidth="80" prop="multifileList" labelPosition="top">
-							<u-upload
+							<UploadImage
 								:fileList="model.multifileList"
-								@afterRead="afterRead"
-								@delete="deletePic"
-								name="2"
-								multiple
-								style="margin-top: 15rpx;" />
+								folder="WORKORDER_LOG_FILE_PATH"
+								@dele="deletePic"
+								@getFileList="afterRead"
+								style="margin-top: 15rpx;"
+							/>
 						</u-form-item>
 					</u--form>
 				</view>
@@ -146,13 +149,35 @@
 								maxlength="200" count></u--textarea>
 						</u-form-item>
 						<u-form-item label="涓婁紶鍥剧墖" labelWidth="120" prop="multifileList" labelPosition="top" required>
-							<u-upload
+							<UploadImage
 								:fileList="model.multifileList"
-								@afterRead="afterRead"
-								@delete="deletePic"
-								name="1"
-								multiple
-								style="margin-top: 15rpx;" />
+								folder="WORKORDER_LOG_FILE_PATH"
+								@dele="deletePic"
+								@getFileList="afterRead"
+								style="margin-top: 15rpx;"
+							/>
+						</u-form-item>
+					</u--form>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 鎶勯�� -->
+		<u-popup :show="show3" :round="10" mode="bottom">
+			<view class="fp">
+				<view class="fp_head">
+					<text @click="show3 = false">鍙栨秷</text>
+					<text @click="send">纭鎶勯��</text>
+				</view>
+				<view class="fp_box">
+					<u--form labelPosition="left" :model="model" :rules="rules1" ref="uForm2">
+						<u-form-item label="閫夋嫨鎶勯�佷汉" labelWidth="80" prop="passOnUserName" @click="seleUser1" required>
+							<u--input v-model="model.passOnUserName" border="none" placeholder="璇烽�夋嫨鎶勯�佷汉" disabledColor="#ffffff"
+								disabled></u--input>
+							<u-icon slot="right" name="arrow-right"></u-icon>
+						</u-form-item>
+						<u-form-item label="璇存槑" labelWidth="80" labelPosition="top" prop="info">
+							<u--textarea v-model="model.info" placeholder="璇疯緭鍏ヨ鏄�" style="margin-top: 15rpx;"
+								maxlength="200" count></u--textarea>
 						</u-form-item>
 					</u--form>
 				</view>
@@ -164,7 +189,13 @@
 </template>
 
 <script>
+	import { mapState } from 'vuex'
+	import UploadImage from '@/components/uploadImage/uploadImage.vue'
 	export default {
+		components: { UploadImage },
+		computed: {
+			...mapState(['userInfo'])
+		},
 		data() {
 			return {
 				id: null,
@@ -172,6 +203,7 @@
 				show: false,
 				show1: false,
 				show2: false,
+				show3: false,
 				model: {
 					name: '',
 					info: '',
@@ -209,6 +241,37 @@
 			this.getDetails()
 		},
 		methods: {
+			seleUser1() {
+				var that = this
+				that.$ww.selectEnterpriseContact({
+					fromDepartmentId: -1,
+					mode: 'multi',
+					type: ['user'],
+				}).then(res =>{
+					console.log(res)
+					if (res.errCode === 0) {
+						that.model.passOnUserName = res.result.userList.map(item => item.name).join(',')
+						that.model.passOnUserId = res.result.userList.map(item => item.id).join(',')
+					}
+				})
+			},
+			send() {
+				var that = this
+				that.$refs.uForm2.validate().then(async () => {
+					let res = await that.$u.api.sendCopy({
+						info: that.model.info,
+						userIds: that.model.passOnUserId,
+						workorderId: that.info.id
+					})
+					if (res.code === 200) {
+						that.show3 = false
+						that.getDetails()
+						uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'none' })
+					}
+				}).catch(errors => {
+					
+				})
+			},
 			previewImage(current, urls) {
 				uni.previewImage({
 					current,
@@ -313,56 +376,17 @@
 			async getDetails() {
 				let res = await this.$u.api.detail({ id: this.id })
 				if (res.code === 200) {
+					res.data.managerId = res.data.managerId ? res.data.managerId : ''
 					this.info = res.data
 				}
 			},
 			// 鍒犻櫎鍥剧墖
-			deletePic(event) {
-				this.model.multifileList.forEach((item, index) => {
-					if (item.imgaddr === event.file.imgaddr) {
-						this.model.multifileList.splice(index, 1)
-					}
-				})
+			deletePic(index) {
+				this.model.multifileList.splice(index, 1)
 			},
 			// 鏂板鍥剧墖
-			afterRead(event) {
-				var that = this
-				uni.showLoading({ title: '涓婁紶涓�...', mask: true })
-				uni.uploadFile({
-					url: this.$baseUrl + '/web/public/uploadBatch',
-					files: event.file.map(e => {
-						return { name: 'files', uri: e.url }
-					}),
-					formData: {
-						folder: "WORKORDER_LOG_FILE_PATH",
-					},
-					success(res) {
-						uni.hideLoading();
-						let obj = JSON.parse(res.data)
-						if (obj.code === 200) {
-							console.log(obj.data)
-							obj.data.forEach(item => {
-								item.fileurl = item.imgaddr
-							})
-							that.model.multifileList = [...that.model.multifileList, ...obj.data]
-						}
-					}
-				})
-				// uni.uploadFile({
-				// 	url: this.$baseUrl + '/web/public/upload',
-				// 	filePath: event.file.url,
-				// 	name: "file",
-				// 	formData: {
-				// 		folder: "WORKORDER_LOG_FILE_PATH"
-				// 	},	
-				// 	success: (res) => {
-				// 		let obj = JSON.parse(res.data)
-				// 		if (obj.code === 200) {
-				// 			obj.data.fileurl = obj.data.imgaddr
-				// 			this.model.multifileList.push(obj.data)
-				// 		}
-				// 	}
-				// });
+			afterRead(arr) {
+				this.model.multifileList = [...this.model.multifileList, ...arr]
 			}
 		}
 	}
@@ -371,6 +395,40 @@
 <style lang="scss" scoped>
 	.dca {
 		width: 100%;
+		
+		.fp {
+			width: 100%;
+		
+			.fp_head {
+				width: 100%;
+				height: 74rpx;
+				padding: 0 42rpx;
+				box-sizing: border-box;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				border-bottom: 1rpx solid #EFEFEF;
+		
+				text {
+					&:nth-child(1) {
+						color: rgba(16, 16, 16, 1);
+						font-size: 28rpx;
+					}
+		
+					&:nth-child(2) {
+						color: rgba(56, 117, 197, 1);
+						font-size: 28rpx;
+					}
+				}
+			}
+		
+			.fp_box {
+				width: 100%;
+				padding: 30rpx;
+				box-sizing: border-box;
+		
+			}
+		}
 
 		.dca_process {
 			width: 100%;
@@ -576,6 +634,16 @@
 			background-color: #ffffff;
 			display: flex;
 			flex-direction: column;
+			position: relative;
+			
+			.dca_head_chao {
+				position: absolute;
+				top: 32rpx;
+				right: 32rpx;
+				color: rgba(32,110,238,1);
+				font-size: 28rpx;
+				text-decoration: underline;
+			}
 
 			text {
 				&:nth-child(1) {

--
Gitblit v1.9.3