liujiaxin hai 3 días
pai
achega
4bb0a3f537

+ 4 - 0
api/speaker.js

@@ -14,6 +14,10 @@ export function apply(data) {
 	 return request('/doctor/apply',data,'POST','application/json;charset=UTF-8');
 }
  
+ //邀请
+export function inviteDoctor(companyUserId,companyId) {
+ 	 return request(`/doctor/doctor/invite_doctor?companyUserId=${companyUserId}&companyId=${companyId}`,{},'GET','application/json;charset=UTF-8');
+} 
  
 
  

+ 17 - 3
api/task.js

@@ -45,7 +45,21 @@ export function queryAllData(data) {
  	 return request('/project/type/queryAllData',data,'GET','application/json;charset=UTF-8');
 } 
 
- //审核
-export function detail(data) {
- 	 return request('/company/audit/detail',data,'GET','application/json;charset=UTF-8');
+ //审核列表
+export function auditList(data) {
+ 	 return request('/task/info/list',data,'GET','application/json;charset=UTF-8');
 } 
+ //审核列表修改
+export function editAudit(data) {
+ 	 return request('/task/info/edit',data,'POST','application/json;charset=UTF-8');
+} 
+
+//任务查询
+export function info(id) {
+ 	 return request(`/task/info/${id}`,null,'GET','application/json;charset=UTF-8');
+} 
+
+//任务列表 复制创建
+export function copy(id) {
+ 	 return request(`/task/info/copy/${id}`,null,'POST','application/json;charset=UTF-8');
+} 

+ 34 - 5
api/user.js

@@ -10,16 +10,45 @@ export function changePWD(data) {
  	 return request('/app/user/changePWD',data,'POST','application/json;charset=UTF-8');
 } 
 
-//发送短信验证码
-export function sendSmsCode(data) {
- 	 return request(`/app/user/sendSmsCode?phone=${data}`,data,'POST','application/json;charset=UTF-8');
-} 
+
 // 校验短信验证码
 export function smsLogin(data) {
  	 return request('/app/user/smsLogin',data,'POST','application/json;charset=UTF-8');
 } 
  
+ // 忘记密码
+export function forgetPassword(data) {
+ 	 return request('/app/user/forgetPassword',data,'POST','application/json;charset=UTF-8');
+} 
+//发送短信验证码
+export function sendSmsCode(data) {
+ 	 return request(`/app/user/sendSmsCode?phone=${data.phone}&type=${data.type}`,data,'POST','application/json;charset=UTF-8');
+} 
  
+ //查询用户信息
+export function getUserInfo(data) {
+	 return request('/app/user/getUserInfo',data,'GET','application/json;charset=UTF-8');
+} 
+ //更新业务员个人信息
+export function updateUserInfo(data) {
+	 return request('/app/user/updateUserInfo',data,'POST','application/json;charset=UTF-8');
+} 
+
+//获取当前公司部门列表
+export function getDeptList(data) {
+	 return request('/app/user/getDeptList',data,'GET','application/json;charset=UTF-8');
+} 
+//获取当前公司岗位列表
+export function getPostList(data) {
+	 return request('/app/user/getPostList',data,'GET','application/json;charset=UTF-8');
+} 
+//获取当前公司所有产品列表
+export function getProductList(data) {
+	 return request('/app/user/getProductList',data,'GET','application/json;charset=UTF-8');
+} 
+//获取当前公司所有业务员列表(前端需要排除当前用户)
+export function getCompanyUserList(data) {
+	 return request('/app/user/getCompanyUserList',data,'GET','application/json;charset=UTF-8');
+} 
 
- 
  

+ 7 - 7
components/StatisticsTable.vue

@@ -4,12 +4,12 @@
     <view class="summary-section x-bc">
       <view class="summary-header">
         <view class="summary-indicator"></view>
-        <text class="summary-title">{{ summaryTitle }}</text>
+        <text class="summary-title">{{ summaryTitle||'' }}</text>
       </view>
       <view class="summary-stats">
         <view class="stat-item" v-for="stat in summaryStats" :key="stat.label">
-          <text class="stat-label">{{ stat.label }}</text>
-          <text class="stat-value">{{ stat.value }}</text>
+          <text class="stat-label">{{ stat.label||'未定义' }}</text>
+          <text class="stat-value">{{ stat.value||'' }}</text>
         </view>
       </view>
     </view>
@@ -23,7 +23,7 @@
           :key="index"
           :style="{ width: column.width }"
         >
-          {{ column.title }}
+          {{ column.title ||''}}
         </view>
       </view>
       <view class="table-body">
@@ -37,16 +37,16 @@
             <!-- 使用渲染函数或条件判断代替动态插槽 -->
             <template v-if="column.key === 'statusText' && column.slot">
               <slot name="statusText" :item="item" :index="index">
-                {{ item[column.key] }}
+                {{ item[column.key]||'' }}
               </slot>
             </template>
             <template v-else-if="column.key === 'operation' && column.slot">
               <slot name="operation" :item="item" :index="index">
-                {{ item[column.key] }}
+              {{ item[column.key] ||'' }}
               </slot>
             </template>
             <template v-else>
-              {{ item[column.key] }}
+              {{ item[column.key] ||'s'}}
             </template>
           </view>
         </view>

+ 139 - 71
pages/auth/forgetPassword.vue

@@ -42,69 +42,139 @@
 </template>
 
 <script>
+	import { forgetPassword } from '@/api/user.js'
+	import {
+		sendSmsCode,//发送短信验证码
+	} from '@/api/user'
 	export default {
 		data() {
 			return {
-				phone:17873014571,
+				phone: '',
+				verifyCode: '', // 验证码
 				codeText: '获取验证码', // 验证码按钮文字
 				newPassword: '',
 				confirmPassword: '',
 				// 为每个密码框单独设置显示状态
-				showOldPassword: false,
 				showNewPassword: false,
-				showConfirmPassword: false
+				showConfirmPassword: false,
+				// 倒计时相关
+				countdown: 0,
+				countdownTimer: null
 			}
 		},
-		onLoad() {},
+		onLoad(options) {
+			// this.phone = options.phone || '';
+	},
 		methods: {
-			// 获取验证码
-			getVerifyCode() {
-				if (this.countdown > 0) {
-					return;
-				}
-				if (!this.phone) {
-					uni.showToast({
-						icon: 'none',
-						title: "请输入手机号",
+			// 修改密码的API调用
+			async changePassword() {
+				try {
+					uni.showLoading({
+						title: '修改中...'
 					});
-					return;
-				}
-				if (!/^1[3-9]\d{9}$/.test(this.phone)) {
+					
+					// 构建请求参数
+					const params = {
+						phone: this.phone,
+						code: this.codeText,
+						newPassword: this.newPassword,
+						confirmPassword: this.confirmPassword
+					};
+					
+					// 调用修改密码接口
+					const res = await forgetPassword(params);
+					
+					uni.hideLoading();
+					
+					if (res.code === 200) {
+						uni.showToast({
+							title: '密码修改成功',
+							icon: 'success'
+						});
+						
+						// 清空表单
+						this.newPassword = '';
+						this.confirmPassword = '';
+						
+						// 跳转到其他页面或返回
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 1500);
+					} else {
+						uni.showToast({
+							title: res.message || '修改失败',
+							icon: 'none'
+						});
+					}
+					
+				} catch (error) {
+					uni.hideLoading();
 					uni.showToast({
-						icon: 'none',
-						title: "请输入正确的手机号",
+						title: error.message || '修改失败',
+						icon: 'none'
 					});
-					return;
 				}
-				// TODO: 调用发送验证码API
-				// 这里需要对接真实的发送验证码接口
+			},
+			getVerifyCode() {
+			if (this.countdown > 0) {
+				return;
+			}
+			if (!this.phone) {
+				uni.showToast({
+					icon: 'none',
+					title: "请输入手机号",
+				});
+				return;
+			}
+			if (!/^1[3-9]\d{9}$/.test(this.phone)) {
+				uni.showToast({
+					icon: 'none',
+					title: "请输入正确的手机号",
+				});
+				return;
+			}
+			// 调用发送验证码API
 				uni.showLoading({
 					title: "发送中..."
 				});
-				// 模拟发送验证码
-				setTimeout(() => {
-					uni.hideLoading();
-					uni.showToast({
-						icon: 'success',
-						title: "验证码已发送",
-					});
-					// 开始倒计时
-					this.countdown = 60;
-					this.countdownTimer = setInterval(() => {
-						this.countdown--;
-						this.codeText = this.countdown + '秒重新获取';
-						if (this.countdown <= 0) {
-							clearInterval(this.countdownTimer);
-							this.countdownTimer = null;
-							this.codeText = '获取验证码';
+				let params = {
+					phone: this.phone,
+					type: '1',
+				}
+				sendSmsCode(params)
+					.then(res => {
+						uni.hideLoading();
+						if (res.code == 200) {
+							uni.showToast({
+								icon: 'success',
+								title: "验证码已发送",
+							});
+							// 开始倒计时
+							this.countdown = 60;
+							this.countdownTimer = setInterval(() => {
+								this.countdown--;
+								this.codeText = this.countdown + '秒重新获取';
+								if (this.countdown <= 0) {
+									clearInterval(this.countdownTimer);
+									this.countdownTimer = null;
+									this.codeText = '获取验证码';
+								}
+							}, 1000);
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.message || "发送验证码失败",
+							});
 						}
-					}, 1000);
-				}, 1000);
-			},
-			// 分别控制每个密码框的显示/隐藏
-			toggleOldPassword() {
-				this.showOldPassword = !this.showOldPassword;
-			},
+					})
+					.catch(err => {
+						uni.hideLoading();
+						uni.showToast({
+							icon: 'none',
+							title: "发送验证码接口调用失败",
+						});
+					});
+		},
 			toggleNewPassword() {
 				this.showNewPassword = !this.showNewPassword;
 			},
@@ -112,14 +182,7 @@
 				this.showConfirmPassword = !this.showConfirmPassword;
 			},
 			confirm() {
-				// 验证逻辑
-				if (!this.oldPassword) {
-					uni.showToast({
-						title: '请输入原密码',
-						icon: 'none'
-					});
-					return;
-				}
+				
 
 				if (!this.newPassword) {
 					uni.showToast({
@@ -157,36 +220,41 @@
 					uni.showLoading({
 						title: '修改中...'
 					});
-
-					// 这里添加实际的API调用
-					// const res = await uni.request({
-					// 	url: '/api/change-password',
-					// 	method: 'POST',
-					// 	data: {
-					// 		oldPassword: this.oldPassword,
-					// 		newPassword: this.newPassword
-					// 	}
-					// });
-
-					// 模拟成功
-					setTimeout(() => {
-						uni.hideLoading();
+					
+					// 构建请求参数
+					const params = {
+						phone: this.phone,
+						code: this.verifyCode,
+						newPassword: this.newPassword,
+						confirmPassword: this.confirmPassword
+					};
+					
+					// 调用修改密码接口
+					const res = await forgetPassword(params);
+					
+					uni.hideLoading();
+					
+					if (res.code === 200) {
 						uni.showToast({
 							title: '密码修改成功',
 							icon: 'success'
 						});
-
+						
 						// 清空表单
-						this.oldPassword = '';
 						this.newPassword = '';
 						this.confirmPassword = '';
-
+						
 						// 跳转到其他页面或返回
 						setTimeout(() => {
 							uni.navigateBack();
 						}, 1500);
-					}, 1000);
-
+					} else {
+						uni.showToast({
+							title: res.message || '修改失败',
+							icon: 'none'
+						});
+					}
+					
 				} catch (error) {
 					uni.hideLoading();
 					uni.showToast({

+ 5 - 1
pages/auth/login.vue

@@ -180,7 +180,11 @@
 				uni.showLoading({
 					title: "发送中..."
 				});
-				sendSmsCode(this.phone)
+				let params = {
+					phone: this.phone,
+					type: '0',
+				}
+				sendSmsCode(params)
 					.then(res => {
 						uni.hideLoading();
 						if (res.code == 200) {

+ 2 - 0
pages/auth/setting.vue

@@ -27,6 +27,8 @@
 		},
 		onLoad() {
 			this.getVersion()
+			this.version = uni.getSystemInfoSync().version; // 注意:这里实际上是获取系统信息,而非应用版本号。对于应用版本号,通常需要在 manifest.json 中定义或在代码中硬编码。
+
 		},
 		methods: {
 			getVersion() {

+ 49 - 70
pages/user/index.vue

@@ -9,22 +9,21 @@
 					<view class="user-info">
 						<view class="left">
 							<view class="head-img">
-						<image :src="userInfo.avatar==null?'/static/image/my_heads_icon.png':userInfo.avatar"
-							mode="aspectFill">
-						</image>
-						<image class="gender"
-							:src="isGirl==null?'/static/image/icon_girl.png':'/static/image/icon_boy.png'"
-							mode="aspectFill"></image>
-
-					</view>
+								<image :src="userInfo.avatar?userInfo.avatar:'/static/image/my_heads_icon.png'"
+									mode="aspectFill">
+								</image>
+								<image class="gender"
+									:src="isGirl==null?'/static/image/icon_girl.png':'/static/image/icon_boy.png'"
+									mode="aspectFill"></image>
+							</view>
 							<view class="name-phone">
 								<view class="x-f">
-							<view class="name" v-if="UserInfo">{{userInfo.nickName}}</view>
-							<view class="name" v-else>请先登录</view>
-							<view class="lable" v-if="UserInfo">{{userInfo.deptName}}</view>
-						</view>
+									<view class="name" v-if="UserInfo">{{userInfo.nickName||'未命名'}}</view>
+									<view class="name" v-else>请先登录</view>
+									<view class="lable" v-if="UserInfo.deptName">{{userInfo.deptName}}</view>
+								</view>
 							</view>
-							<view class="txt" v-if="UserInfo">您已加入小蜜蜂{{joinDays}}天了~</view>
+							<view class="txt" v-if="UserInfo">您已加入小蜜蜂{{joinDays||'0'}}天了~</view>
 						</view>
 					</view>
 
@@ -32,7 +31,7 @@
 						<view class="item" v-for="(item,index) in tabs" :key="index" @click="openLink(item)">
 							<view class="left">
 								<image :src="item.icon" mode=""></image>
-								<view class="title-l">{{item.name}}</view>
+								<view class="title-l">{{item.name||''}}</view>
 							</view>
 							<view class="right">
 								<image src="@/static/image/icon_my_more.png" mode=""></image>
@@ -42,9 +41,7 @@
 
 				</view>
 			</view>
-
 		</view>
-
 	</view>
 </template>
 
@@ -62,12 +59,6 @@
 				count2: 0,
 				afterSalesCount: 0,
 				tabs: [
-					// {
-					// 	name: '我的积分',
-					// 	num: 12,
-					// 	icon: '/static/image/icon_my_points.png',
-					// 	url: '/pages_user/points'
-					// },
 					{
 						name: '个人信息',
 						num: 3,
@@ -82,15 +73,15 @@
 					},
 				],
 				userInfo: {},
-			user: {
-				isPromoter: 0,
-				isWeixinAuth: 0,
-				phone: "",
-				nickname: "用户昵称",
-				avatarUrl: "/static/images/detault_head.png"
-			},
+				user: {
+					isPromoter: 0,
+					isWeixinAuth: 0,
+					phone: "",
+					nickname: "用户昵称",
+					avatarUrl: "/static/images/detault_head.png"
+				},
 				// 状态栏的高度
-				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+				statusBarHeight: uni.getStorageSync('menuInfo')?.statusBarHeight || '0px',
 				// 消息数量
 				msgNum: 0,
 				isShow: true,
@@ -103,16 +94,18 @@
 		onShow() {
 			console.log("onshow")
 			// 从本地缓存加载用户信息
-			const userInfoStr = uni.getStorageSync('userInfo')
-			if (userInfoStr) {
-				this.userInfo = JSON.parse(userInfoStr)
+			const userInfo = uni.getStorageSync('userInfo')
+			if (userInfo) {
+				this.userInfo = typeof userInfo === 'string' ? JSON.parse(userInfo) : userInfo
 			}
 			// 更新登录状态
 			this.UserInfo = uni.getStorageSync('AppToken')
 		},
 		onReachBottom() {
 			console.log("onReachBottom")
-			this.$refs.product.getGoodsProducts();
+			if (this.$refs.product) {
+				this.$refs.product.getGoodsProducts();
+			}
 		},
 		methods: {
 			seeChange() {
@@ -140,28 +133,19 @@
 				uni.navigateTo({
 					url: item.url
 				})
-				// this.utils.isLogin().then(res => {
-				// 	if(res){
-				// 		uni.navigateTo({
-				// 			url: url+'?userId='+this.user.userId
-				// 		})
-				// 	}
-				// })
 			},
 			toManager() {
-				// uni.navigateTo({
-				// 	url: '/pages_company/index'
-				// })
-				if (this.utils.checkCompanyUserLoginState()) {
-					uni.navigateTo({
-						url: '/pages_company/index'
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages_company/auth/login'
-					})
+				if (this.utils && this.utils.checkCompanyUserLoginState) {
+					if (this.utils.checkCompanyUserLoginState()) {
+						uni.navigateTo({
+							url: '/pages_company/index'
+						})
+					} else {
+						uni.navigateTo({
+							url: '/pages_company/auth/login'
+						})
+					}
 				}
-
 			},
 			openH5(url) {
 				var requestPath = uni.getStorageSync('requestPath');
@@ -177,7 +161,9 @@
 							if (res.user != null) {
 								this.user = res.user;
 							} else {
-								this.utils.loginOut();
+								if (this.utils && this.utils.loginOut) {
+									this.utils.loginOut();
+								}
 							}
 
 						} else {
@@ -192,13 +178,15 @@
 			},
 			// 跳转页面
 			navgetTo(url) {
-				this.utils.isLogin().then(res => {
-					if (res) {
-						uni.navigateTo({
-							url: url + '?userId=' + this.user.userId
-						})
-					}
-				})
+				if (this.utils && this.utils.isLogin) {
+					this.utils.isLogin().then(res => {
+						if (res) {
+							uni.navigateTo({
+								url: url + '?userId=' + this.user.userId
+							})
+						}
+					})
+				}
 			},
 			// 查看订单
 			showOrder(status) {
@@ -240,15 +228,8 @@
 			top: 0;
 			left: 0;
 			z-index: 2;
-
-
-
-
 		}
 	}
-
-
-
 	.content {
 		background: linear-gradient(360deg, rgba(244, 249, 255, 0.6) 0%, #FFFFFF 100%);
 		border-radius: 40rpx 40rpx 24rpx 24rpx;
@@ -383,8 +364,6 @@
 				justify-content: space-between;
 				padding: 28rpx 24rpx;
 				box-sizing: border-box;
-
-				// margin-bottom: 24rpx;
 				.left {
 					display: flex;
 					align-items: center;

+ 1 - 1
pages_speaker/index.vue

@@ -53,7 +53,7 @@
 					<view class="card-title">
 						<text>{{ item.doctorName||'未命名' }}</text>
 						<text class="title-little" v-if="item.account_type">{{item.account_type}}</text>
-						<view class="lable" v-if="item.doctorLevel">{{item.doctorLevel}}</view>
+						<view class="lable" v-if="item.jobTitle">{{item.jobTitle}}</view>
 					</view>
 					<view class="status-tag"
 						:class="item.status === 0 ? 'reviewing' : item.status === 1 ? 'approved' : item.status === 2 ? 'rejected' : 'manual'">

+ 22 - 5
pages_speaker/speakerInvitation.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="container">
-		<image class="bg" src="@/static/image/bg_invite.png" mode="aspectFill"></image>
+		<image class="bg" src="/static/image/bg_invite.png" mode="aspectFill"></image>
 		<!-- 状态栏占位(微信小程序原生适配) -->
 		<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
 		<view class="return">
+			<image class="return-img" @click="goBack" src="/static/image/back_white.png" mode="aspectFill"></image>
 
-			<image class="return-img" src="@/static/image/back_white.png" mode="aspectFill"></image>
 		</view>
 		<!-- 核心内容区:居中布局 -->
 		<view class="main-content">
@@ -37,17 +37,34 @@
 </template>
 
 <script>
+import { inviteDoctor } from '@/api/speaker.js'
+
 	export default {
 		data() {
 			return {
 				// 仅获取微信小程序状态栏高度,无多余逻辑
-				statusBarHeight: uni.getSystemInfoSync().statusBarHeight
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				userInfo: {},
+
 			};
 		},
 		onLoad() {
-			
+				this.userInfo=JSON.parse(uni.getStorageSync('userInfo'));
+			this.inviteDoctor();
 		},
-		methods: {}
+		methods: {
+			goBack() {
+				uni.navigateBack({
+					delta: 1
+				});
+			},
+
+			inviteDoctor() {
+				inviteDoctor(this.userInfo.userId,this.userInfo.companyId).then(res => {
+					console.log(res);
+				});
+			}
+		}
 	};
 </script>
 

+ 2 - 1
pages_task/approvalCenter.vue

@@ -380,7 +380,8 @@ import utils from '@/utils/common.js'
 				async loadData() {
 					try {
 						// 无论当前标签是什么,都调用getPendingAuditList请求
-						const userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}')
+						const userInfoStr = uni.getStorageSync('userInfo')
+						const userInfo = userInfoStr ? (typeof userInfoStr === 'string' ? JSON.parse(userInfoStr) : userInfoStr) : {}
 						const params = {
 							initiatorName: userInfo.nickName || '',
 							initiatorPhone: userInfo.phone || '',

+ 99 - 20
pages_task/createTask.vue

@@ -15,11 +15,6 @@
 						<text class="required">*</text>
 						<text>任务归属</text>
 					</view>
-					<!-- <view class="form-input picker-input" :class="{ placeholder: !formData.institution }"
-						@click="showTaskPopup=true">
-						{{ formData.institution || '请选择任务归属' }}
-						<image class="icon" src="/static/image/icon_more.png"></image>
-					</view> -->
 					<view class="form-input picker-input" :class="{ placeholder: !formData.deptId }"
 						@click="showPicker('任务归属',companyData)">
 						{{ institutionDisplayText || '请选择任务归属' }}
@@ -62,12 +57,14 @@
 				</view>
 
 				<view class="form-item">
-					<view class="form-label">
-						<text class="required">*</text>
-						<text>添加任务备注</text>
-					</view>
-					<EvanSwitch v-model="formData.addRemark"></EvanSwitch>
+				<view class="form-label">
+					<text>添加任务备注</text>
 				</view>
+				<EvanSwitch v-model="formData.addRemark"></EvanSwitch>
+			</view>
+			<view class="form-item" v-if="formData.addRemark">
+				<textarea class="form-textarea" v-model="formData.remark" placeholder="请输入任务备注" rows="4"></textarea>
+			</view>
 				<view class="form-item">
 					<view class="form-label">
 						<text class="required">*</text>
@@ -281,7 +278,8 @@ import utils from '@/utils/common.js'
 					projectId: '',
 					productId: '',
 					taskType: '',
-					addRemark: false
+					addRemark: false,
+					remark: ''
 				},
 				originalCompanyData: null,
 				pickerTitle: '默认标题',
@@ -333,17 +331,17 @@ import utils from '@/utils/common.js'
 				return selectedType ? selectedType.dictLabel : '';
 			},
 			institutionDisplayText() {
-				if (!this.formData.deptId || !this.originalCompanyData) {
+				if (!this.formData.deptId || !this.companyData) {
 					return '';
 				}
-				const selectedItem = this.originalCompanyData.find(item => item.deptId === this.formData.deptId);
+				const selectedItem = this.companyData.find(item => item.deptId === this.formData.deptId);
 				return selectedItem ? selectedItem.deptName : '';
 			},
 			costAllocationDisplayText() {
-				if (!this.formData.costShareId || !this.originalCompanyData) {
+				if (!this.formData.costShareId || !this.companyData) {
 					return '';
 				}
-				const selectedItem = this.originalCompanyData.find(item => item.deptId === this.formData.costShareId);
+				const selectedItem = this.companyData.find(item => item.deptId === this.formData.costShareId);
 				return selectedItem ? selectedItem.deptName : '';
 			},
 			belongingProjectDisplayText() {
@@ -581,7 +579,7 @@ import utils from '@/utils/common.js'
 				// 处理任务归属和费用分摊数据,将deptStr作为显示文本
 				if ((title === '任务归属' || title === '费用分摊') && data && data.length > 0) {
 					// 转换为picker需要的格式
-					this.pickerData = [data.map(item => item.deptStr)]
+					this.pickerData = [data.map(item => item.deptName)]
 					// 保存原始数据,用于后续获取deptId
 					this.originalCompanyData = data
 				} else if (title === '归属项目' && data && data.length > 0) {
@@ -614,12 +612,12 @@ import utils from '@/utils/common.js'
 				console.log('e.value:', e.value);
 				if (e.value && e.value.length > 0) {
 					if (this.pickerTitle === '费用分摊') {
-						// e.value[0]是选中的文本值(deptStr
+						// e.value[0]是选中的文本值(deptName
 						const selectedDeptStr = e.value[0];
 						console.log('选中的费用分摊文本:', selectedDeptStr);
 						console.log('originalCompanyData:', this.originalCompanyData);
 						// 从originalCompanyData中找到对应的项
-						const selectedItem = this.originalCompanyData.find(item => item.deptStr === selectedDeptStr);
+						const selectedItem = this.originalCompanyData.find(item => item.deptName === selectedDeptStr);
 						if (selectedItem) {
 						// 保存deptId到表单(存储id值)
 						this.formData.costShareId = selectedItem.deptId;
@@ -641,12 +639,12 @@ import utils from '@/utils/common.js'
 						} else {
 						}
 					} else if (this.pickerTitle === '任务归属' && this.originalCompanyData) {
-						// e.value[0]是选中的文本值(deptStr
+						// e.value[0]是选中的文本值(deptName
 						const selectedDeptStr = e.value[0];
 						console.log('选中的任务归属文本:', selectedDeptStr);
 						console.log('originalCompanyData:', this.originalCompanyData);
 						// 从originalCompanyData中找到对应的项
-						const selectedItem = this.originalCompanyData.find(item => item.deptStr === selectedDeptStr);
+						const selectedItem = this.originalCompanyData.find(item => item.deptName === selectedDeptStr);
 						if (selectedItem) {
 							// 保存deptId到表单(存储id值)
 							this.formData.deptId = selectedItem.deptId;
@@ -705,6 +703,71 @@ import utils from '@/utils/common.js'
 				this.showPickerVisible = false
 			},
 			toNext() {
+				// 表单验证
+				if (!this.formData.deptId) {
+					uni.showToast({
+						title: '请选择任务归属',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.formData.projectId) {
+					uni.showToast({
+						title: '请选择归属项目',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.formData.productId) {
+					uni.showToast({
+						title: '请选择产品代码',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.formData.costShareId) {
+					uni.showToast({
+						title: '请选择费用分摊',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.formData.belongType) {
+					uni.showToast({
+						title: '请选择归属类型',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.formData.taskType) {
+					uni.showToast({
+						title: '请选择任务类型',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.formData.planStartTime) {
+					uni.showToast({
+						title: '请选择计划开始时间',
+						icon: 'none'
+					})
+					return
+				}
+				if (!this.formData.planEndTime) {
+					uni.showToast({
+						title: '请选择计划结束时间',
+						icon: 'none'
+					})
+					return
+				}
+				// 如果开启了任务备注,则备注为必填
+				if (this.formData.addRemark && !this.formData.remark) {
+					uni.showToast({
+						title: '请输入任务备注',
+						icon: 'none'
+					})
+					return
+				}
 				// 保存任务表单数据到本地存储
 				uni.setStorageSync('taskFormData', JSON.stringify(this.formData))
 				uni.navigateTo({
@@ -840,6 +903,22 @@ import utils from '@/utils/common.js'
 							height: 36rpx;
 						}
 					}
+					
+					.form-textarea {
+						flex: 1;
+						font-size: 28rpx;
+						color: #333;
+						padding: 16rpx;
+						border: 1px solid #EBEDF0;
+						border-radius: 8rpx;
+						min-height: 200rpx;
+						resize: none;
+						box-sizing: border-box;
+						
+						&::placeholder {
+							color: #C8C9CC;
+						}
+					}
 				}
 			}
 		}

+ 187 - 93
pages_task/editSelectCustomer.vue

@@ -13,7 +13,7 @@
 				<view class="integral-list">
 					<view class="integral-item" v-for="(customer, index) in customerList" :key="customer.id">
 						<view class="customer-info">
-							<view class="customer-name">{{ customer.name }}</view>
+							<view class="customer-name">{{ customer.doctorName }}</view>
 						</view>
 						<view class="integral-input-wrapper">
 							<input class="integral-input" type="number" :placeholder="customer.placeholder"
@@ -82,7 +82,7 @@
 						<!-- 表格内容 -->
 						<view class="table-body">
 							<view class="table-row" v-for="(customer, index) in customerList" :key="customer.id">
-								<view class="table-cell" style="flex: 1.5;">{{ customer.name }}</view>
+								<view class="table-cell" style="flex: 1.5;">{{ customer.doctorName }}</view>
 								<view class="table-cell" style="flex: 1;">一级</view>
 								<view class="table-cell" style="flex: 1;">{{ customer.integral || '0' }}</view>
 								<view class="table-cell" style="flex: 2;">177****4235</view>
@@ -110,49 +110,47 @@
 </template>
 
 <script>
+	import { speakerList } from '@/api/speaker.js'
+import{editAudit} from '@/api/task.js'
 	import Step from '@/pages_task/components/step.vue'
 	export default {
 		components: {
 			Step
 		},
 		data() {
-			return {currentText: [{
-						id: 1,
-						stepNumber: 1,
-						title: '填写任务'
-					},
-					
-					{
-						id: 2,
-						stepNumber: 2,
-						title: '积分设置'
-					}
-				],
-				currentStep: 2,
-				showOverview: false, // 控制概览弹窗显示
-				customerList: [{
-						id: 1,
-						name: '王小明',
-						integral: '30',
-						placeholder: '请输入积分',
-						disabled: false
-					},
-					{
-						id: 2,
-						name: '李洋',
-						integral: '',
-						placeholder: '请输入积分',
-						disabled: false
-					},
-					{
-						id: 3,
-						name: '钱小燕',
-						integral: '',
-						placeholder: '请输入积分',
-						disabled: false
-					}
-				]
+				return {
+					currentText: [{
+							id: 1,
+							stepNumber: 1,
+							title: '填写任务'
+						},
+							{
+							id: 2,
+							stepNumber: 2,
+							title: '积分设置'
+						}
+					],
+					currentStep: 2,
+					showOverview: false, // 控制概览弹窗显示
+					customerList: [],
+					doctorId: '',
+					fillTaskFormData: {} // 存储从 fillTask.vue 页面传递的表单数据
+				}
+			},
+		onLoad: function(options) {
+			console.log("编辑任务积分接受数据",options);
+			if (options.doctorId) {
+				this.doctorId = options.doctorId;
+				
+			} 
+			// 从本地存储中获取 fillTask.vue 页面传递的表单数据
+			const fillTaskFormDataStr = uni.getStorageSync('fillTaskFormData');
+			if (fillTaskFormDataStr) {
+				this.fillTaskFormData = JSON.parse(fillTaskFormDataStr);
+				console.log('获取到 fillTask 表单数据:', this.fillTaskFormData);
 			}
+			this.loadCustomerData()
+
 		},
 		computed: {
 			totalIntegral() {
@@ -165,6 +163,50 @@
 			}
 		},
 		methods: {
+		
+			async loadCustomerData() {
+				try {
+					this.loading = true
+					// 调用speakerList接口获取数据
+					const res = await speakerList({})
+					if (res.code === 200 && res.rows) {
+						// 将接口返回的数据映射为页面需要的格式
+						this.customerList = res.rows.map(item => ({
+							id: item.id,
+							doctorName: item.doctorName,
+							integral: '',
+							placeholder: '请输入积分',
+							disabled: false
+						}));
+						
+						// 如果有 doctorId 参数,只显示对应 ID 的医生
+						if (this.doctorId) {
+							this.customerList = this.customerList.filter(item => item.id == this.doctorId);
+						}
+					}
+				} catch (error) {
+					console.error('获取客户数据失败:', error)
+					uni.showToast({
+						icon: 'none',
+						title: '获取客户数据失败'
+					})
+				} finally {
+					this.loading = false
+				}
+			},
+			// 根据 doctorId 获取客户信息
+			getCustomerInfo(doctorId) {
+				// 这里应该调用接口获取客户信息
+				// 暂时使用模拟数据
+				this.customerList = [{
+						id: doctorId,
+						doctorName: '客户' + doctorId,
+						integral: '',
+						placeholder: '请输入积分',
+						disabled: false
+				}];
+			},
+			
 			
 			// 显示概览弹窗
 			showOverviewPopup() {
@@ -187,65 +229,117 @@
 				}
 			},
 			handlePrev() {
-				uni.navigateBack()
-			},
-			submit() {
-				// 重命名方法为 submit 以匹配模板
-				this.handleSubmit();
-				uni.navigateTo({
-					url: '/pages_task/success'
-				})
-			},
-			handleSubmit() {
-				// 验证所有客户积分是否已填写
-				const emptyCustomers = this.customerList.filter(customer => !customer.integral || customer.integral === '')
-				if (emptyCustomers.length > 0) {
-					uni.showToast({
-						icon: 'none',
-						title: '请为所有客户设置积分'
-					})
-					return
-				}
-
-				// 验证积分是否为数字
-				const invalidCustomers = this.customerList.filter(customer => {
-					const integral = parseInt(customer.integral)
-					return isNaN(integral) || integral < 0
-				})
+					uni.navigateBack()
+				},
+				submit() {
+					// 验证所有客户积分是否已填写
+					const emptyCustomers = this.customerList.filter(customer => !customer.integral || customer.integral === '')
+					if (emptyCustomers.length > 0) {
+						uni.showToast({
+							icon: 'none',
+							title: '请为所有客户设置积分'
+						})
+						return
+					}
 
-				if (invalidCustomers.length > 0) {
-					uni.showToast({
-						icon: 'none',
-						title: '请输入有效的积分数值'
+					// 验证积分是否为数字
+					const invalidCustomers = this.customerList.filter(customer => {
+						const integral = parseInt(customer.integral)
+						return isNaN(integral) || integral < 0
 					})
-					return
-				}
-
-				// 提交数据
-				const taskData = {
-					customers: this.customerList.map(customer => ({
-						id: customer.id,
-						name: customer.name,
-						integral: parseInt(customer.integral)
-					})),
-					totalIntegral: this.totalIntegral
-				}
-
-				console.log('提交的任务数据:', taskData)
 
-				// 显示提交成功提示
-				uni.showToast({
-					title: '任务创建成功',
-					success: () => {
-						// 延迟跳转,让用户看到成功提示
-						setTimeout(() => {
-							uni.navigateTo({
-								url: '/pages_task/taskList'
-							})
-						}, 1500)
+					if (invalidCustomers.length > 0) {
+						uni.showToast({
+							icon: 'none',
+							title: '请输入有效的积分数值'
+						})
+						return
 					}
-				})
-			},
+					// 获取用户信息
+					const userInfoStr = uni.getStorageSync('userInfo')
+					const userInfo = userInfoStr ? JSON.parse(userInfoStr) : {}
+
+					// 构建提交数据
+					const taskFormData = this.fillTaskFormData
+					const taskData = {
+						// 任务基本信息
+						id: taskFormData.id || 0,
+						taskNo: taskFormData.taskNo || '',
+						taskName: taskFormData.taskName || '',
+						deptId: taskFormData.deptId || 0,
+						projectId: taskFormData.projectId || 0,
+						costShareId: taskFormData.costShareId || 0,
+						taskType: taskFormData.taskType || 0,
+						taskIntegral: this.totalIntegral || 0,
+						taskCount: taskFormData.taskCount || 0,
+						taskUnit: taskFormData.taskUnit || 0,
+						taskStatus: taskFormData.taskStatus || 0,
+						productId: taskFormData.productId || 0,
+						doctorId: this.doctorId || 0,
+						planStartTime: taskFormData.planStartTime || '',
+						planEndTime: taskFormData.planEndTime || '',
+						applyTime: taskFormData.applyTime || '',
+						serviceConfirmStatus: taskFormData.serviceConfirmStatus || 0,
+						finishStatus: taskFormData.finishStatus || 0,
+						belongType: taskFormData.belongType || 0,
+						isSpotCheck: taskFormData.isSpotCheck || 0,
+						spotCheckUserId: taskFormData.spotCheckUserId || 0,
+						spotCheckTime: taskFormData.spotCheckTime || '',
+						auditStatus: taskFormData.auditStatus || 0,
+						companyId: userInfo.companyId || 0,
+						companyUserId: userInfo.id || 0
+					}
+					// deptId: taskFormData.deptId || 0,
+					// 	projectId: taskFormData.projectId || 0,
+					// 	costShareId: taskFormData.costShareId || 0,
+					// 	taskType: taskFormData.taskType || 0,
+					// 	taskIntegral: this.totalIntegral || 0,
+					// 	taskUnit: taskFormData.taskUnit || 0,
+					// 	productId: taskFormData.productId || 0,
+					// 	planStartTime: taskFormData.planStartTime || '',
+					// 	planEndTime: taskFormData.planEndTime || '',
+					// 	belongType: taskFormData.belongType || 0,
+					// 	companyId: userInfo.companyId || 0,
+					// 	companyUserId: userInfo.id || 0,
+					// 	doctorId: this.doctorId || 0,
+
+					console.log('提交的任务数据:', taskData)
+
+					// 调用addInfo接口提交表单
+					uni.showLoading({
+						title: '提交中...'
+					})
+					editAudit(taskData).then(res => {
+						uni.hideLoading()
+						if (res.code === 200) {
+							// 清除本地存储的表单数据
+							uni.removeStorageSync('fillTaskFormData');
+							// 显示提交成功提示
+							uni.showToast({
+								title: '任务创建成功',
+								success: () => {
+									// 延迟跳转,让用户看到成功提示
+									setTimeout(() => {
+										uni.navigateTo({
+											url: '/pages_task/taskList'
+										})
+									}, 1500)
+								}
+							})
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.message || '提交失败'
+							})
+						}
+					}).catch(err => {
+						uni.hideLoading()
+						uni.showToast({
+							icon: 'none',
+							title: '网络错误,请重试'
+						})
+					})
+				},
 			deleteSelected() {
 				// 删除所有客户数据
 				uni.showModal({

+ 687 - 241
pages_task/fillTask.vue

@@ -15,9 +15,9 @@
 						<text class="required">*</text>
 						<text>任务归属</text>
 					</view>
-					<view class="form-input picker-input" :class="{ placeholder: !formData.institution }"
-						@click="showTaskPopup=true">
-						{{ formData.institution || '请选择任务归属' }}
+					<view class="form-input picker-input" :class="{ placeholder: !formData.deptId }"
+						@click="showPicker('任务归属',companyData)">
+						{{ institutionDisplayText || '请选择任务归属' }}
 						<image class="icon" src="/static/image/icon_more.png"></image>
 					</view>
 				</view>
@@ -27,38 +27,52 @@
 						<text class="required">*</text>
 						<text>归属项目</text>
 					</view>
-					<view class="form-input picker-input" :class="{ placeholder: !formData.belongingProject }"
-						@click="showBelongingPopup = true">
-						{{ formData.belongingProject || '请选择归属项目' }}
+					<view class="form-input picker-input" :class="{ placeholder: !formData.projectId }"
+						@click="showPicker('归属项目',companyList)">
+						{{ belongingProjectDisplayText || '请选择归属项目' }}
+						<image class="icon" src="/static/image/icon_more.png"></image>
+					</view>
+				</view>
+				<view class="form-item">
+					<view class="form-label">
+						<text class="required">*</text>
+						<text>产品代码</text>
+					</view>
+					<view class="form-input picker-input" :class="{ placeholder: !formData.productId }"
+						@click="showPicker('产品代码',productList)">
+						{{ productNameDisplayText || '请选择产品代码' }}
 						<image class="icon" src="/static/image/icon_more.png"></image>
 					</view>
 				</view>
-
 				<view class="form-item">
 					<view class="form-label">
 						<text class="required">*</text>
 						<text>费用分摊</text>
 					</view>
-					<view class="form-input picker-input" :class="{ placeholder: !formData.costAllocation }"
-						@click="showPicker('费用分摊',costColumns)">
-						{{ formData.costAllocation || '请选择费用分摊主体' }}
+					<view class="form-input picker-input" :class="{ placeholder: !formData.costShareId }"
+						@click="showPicker('费用分摊',companyData)">
+						{{ costAllocationDisplayText || '请选择费用分摊主体' }}
 						<image class="icon" src="/static/image/icon_more.png"></image>
 					</view>
 				</view>
 
 				<view class="form-item">
 					<view class="form-label">
+						<text class="required">*</text>
 						<text>添加任务备注</text>
 					</view>
 					<EvanSwitch v-model="formData.addRemark"></EvanSwitch>
 				</view>
-
 				<view class="form-item">
 					<view class="form-label">
 						<text class="required">*</text>
 						<text>归属类型</text>
 					</view>
-					<text class="txt">院内</text>
+					<view class="form-input picker-input" :class="{ placeholder: !formData.belongType }"
+						@click="showPicker('归属类型',dictTypeColumns)">
+						{{ belongTypeDisplayText || '请选择归属类型' }}
+						<image class="icon" src="/static/image/icon_more.png"></image>
+					</view>
 				</view>
 
 				<view class="form-item">
@@ -68,7 +82,7 @@
 					</view>
 					<view class="form-input picker-input" :class="{ placeholder: !formData.taskType }"
 						@click="showPicker('任务类型',taskTypeColumns)">
-						{{ formData.taskType || '请选择任务类型' }}
+						{{ taskTypeDisplayText || '请选择任务类型' }}
 						<image class="icon" src="/static/image/icon_more.png"></image>
 					</view>
 				</view>
@@ -78,12 +92,11 @@
 						<text class="required">*</text>
 						<text>计划开始时间</text>
 					</view>
-					<picker mode="date" :value="formData.planStartTime" fields="day" @change="onPlanStartTimeChange">
-						<view class="form-input picker-input" :class="{ placeholder: !formData.planStartTime }">
-							{{ formData.planStartTime || '请选择计划开始时间' }}
-							<image class="icon" src="/static/image/icon_more.png"></image>
-						</view>
-					</picker>
+					<view class="form-input picker-input" :class="{ placeholder: !formData.planStartTime }"
+						@click="showStartTimePicker = true">
+						{{ formData.planStartTime || '请选择计划开始时间' }}
+						<image class="icon" src="/static/image/icon_more.png"></image>
+					</view>
 				</view>
 
 				<view class="form-item">
@@ -91,16 +104,15 @@
 						<text class="required">*</text>
 						<text>计划结束时间</text>
 					</view>
-					<picker mode="date" :value="formData.planEndTime" fields="day" @change="onPlanEndTimeChange">
-						<view class="form-input picker-input" :class="{ placeholder: !formData.planEndTime }">
-							{{ formData.planEndTime || '请选择计划结束时间' }}
-							<image class="icon" src="/static/image/icon_more.png"></image>
-						</view>
-					</picker>
+					<view class="form-input picker-input" :class="{ placeholder: !formData.planEndTime }"
+						@click="showEndTimePicker = true">
+						{{ formData.planEndTime || '请选择计划结束时间' }}
+						<image class="icon" src="/static/image/icon_more.png"></image>
+					</view>
 				</view>
 
 				<!-- 观看方式 -->
-				<view class="form-item">
+				<!-- <view class="form-item">
 					<view class="form-label">
 						<text class="required">*</text>
 						<text>观看方式</text>
@@ -121,10 +133,10 @@
 							<text>加密</text>
 						</label>
 					</view>
-				</view>
+				</view> -->
 
 				<!-- 观看要求 -->
-				<view class="form-item">
+				<!-- <view class="form-item">
 					<view class="form-label">
 						<text class="required">*</text>
 						<text>观看要求</text>
@@ -132,7 +144,6 @@
 					<view class="radio-group">
 						<label class="radio-item" :class="{ active: formData.viewRequire === '登录账户' }"
 							@click="formData.viewRequire = '登录账户'">
-							<!-- <view class="radio-circle" :class="{ checked: formData.viewRequire === '登录账户' }"></view> -->
 							<image class="radio-circle" v-if="formData.viewRequire === '登录账户'"
 								src="/static/image/icon_circle_sel.png"></image>
 							<image class="radio-circle" v-else src="/static/image/icon_circle.png"></image>
@@ -146,10 +157,9 @@
 							<text>认证客户</text>
 						</label>
 					</view>
-				</view>
+				</view> -->
 			</view>
-			<view class="form-section">
-				<!-- 直播间标题 -->
+			<!-- <view class="form-section">
 				<view class="form-item">
 					<view class="form-label">
 						<text class="required">*</text>
@@ -159,8 +169,6 @@
 						<input v-model="formData.roomTitle" placeholder="请输入直播间标题" />
 					</view>
 				</view>
-
-				<!-- 封面图 -->
 				<view class="form-item column baseline">
 					<view class="form-label">
 						<text class="required">*</text>
@@ -175,7 +183,7 @@
 							@click.stop="deleteCoverImage" />
 					</view>
 				</view>
-			</view>
+			</view> -->
 			<view class="form-section">
 				<!-- 申请补充讲者任务 -->
 				<view class="form-item">
@@ -187,8 +195,71 @@
 				</view>
 			</view>
 		</scroll-view>
-
 		<view class="next-button" @click="toNext">下一步</view>
+		<u-picker :title='pickerTitle' :show="showPickerVisible" confirmColor='#576B95' ref="uPicker"
+			:columns="pickerData" @confirm="confirm" @cancel="cancel">
+		</u-picker>
+
+		<u-datetime-picker :show="showStartTimePicker" v-model="startTimeValue" mode="date"
+			confirmColor='#576B95' @confirm="onStartTimeConfirm" @cancel="showStartTimePicker = false">
+		</u-datetime-picker>
+
+		<u-datetime-picker :show="showEndTimePicker" v-model="endTimeValue" mode="date"
+			confirmColor='#576B95' @confirm="onEndTimeConfirm" @cancel="showEndTimePicker = false">
+		</u-datetime-picker>
+
+		<u-popup :show="showBelongingPopup" mode="bottom" round="20" @close="closePopup" closeable>
+			<view class="popup-content p32">
+				<view class="popup-header">
+					<text class="title">归属项目</text>
+				</view>
+
+				<view class="search-box">
+					<image class="icon" src="/static/image/search.png"></image>
+					<u-input v-model="searchKeyword" placeholder="请输入归属项目" border="none" clearable />
+				</view>
+
+				<scroll-view scroll-y class="project-list">
+					<view v-for="(project, index) in filteredProjects" :key="index" class="project-item"
+						:class="{ active: selectedIndex === index }" @tap="selectProject(project, index)">
+						<text class="project-name">{{ project.name }}</text>
+						<image class="icon" src="/static/image/icon_right.png"></image>
+					</view>
+				</scroll-view>
+			</view>
+		</u-popup>
+
+		<u-popup :show="showTaskPopup" mode="bottom" round="16" @close="showTaskPopup = false" safeAreaInsetBottom>
+			<view class="popup-content">
+				<view class="popup-header">
+					<text class="popup-title">任务归属</text>
+					<image class="close-icon" src="/static/image/icon_cross.png" @click="showTaskPopup=false"></image>
+				</view>
+				<view class="two-level-container">
+					<scroll-view class="primary-list" scroll-y>
+						<view v-for="(item, index) in primaryOptions" :key="index" class="primary-item"
+							:class="{ 'primary-active': activePrimaryIndex === index }"
+							@click="handlePrimarySelect(index)">
+							<text class="primary-text">{{ item.name }}</text>
+						</view>
+					</scroll-view>
+
+					<scroll-view class="secondary-list" scroll-y>
+						<view v-for="(subItem, subIndex) in currentSecondaryOptions" :key="subIndex"
+							class="secondary-item" :class="{ 'secondary-active': selectedSecondaryItem === subItem }"
+							@click="handleSecondarySelect(subItem)">
+							<text class="secondary-text">{{ subItem }}</text>
+							<u-icon v-if="selectedSecondaryItem === subItem" name="checkbox-mark" color="#2979ff"
+								size="20" />
+						</view>
+					</scroll-view>
+				</view>
+
+				<view class="popup-footer">
+					<button class="confirm-btn" @click="handleConfirm">确定</button>
+				</view>
+			</view>
+		</u-popup>
 
 		<!-- 通用选择器 -->
 		<u-picker :title='pickerTitle' :show="showPickerVisible" confirmColor='#576B95' ref="uPicker"
@@ -249,8 +320,10 @@
 </template>
 
 <script>
+import { info, queryAllData, queryAllProduct, getAllData, company } from '@/api/task'
 	import Step from '@/pages_task/components/step.vue'
 	import EvanSwitch from '@/components/evan-switch.vue'
+	import utils from '@/utils/common.js'
 
 	export default {
 		components: {
@@ -258,227 +331,600 @@
 			EvanSwitch
 		},
 		data() {
-			return {
-				showTaskPopup: false,
-				primaryOptions: [{
-						id: 1,
-						name: '中药事业部',
-						children: ['中药一部', '中药二部', '中药三部', '中药四部']
-					},
-					{
-						id: 2,
-						name: '事业1组',
-						children: ['事业1组-项目部', '事业1组-市场部', '事业1组-技术部']
-					},
-					{
-						id: 3,
-						name: '学术研究部',
-						children: ['学术研究一部', '学术研究二部', '学术研究三部']
-					},
-					{
-						id: 4,
-						name: '湖南省药学服务公司',
-						children: ['药学服务一部', '药学服务二部', '药学服务三部']
-					},
-					{
-						id: 5,
-						name: '医药事业部',
-						children: ['医药一部', '医药二部', '医药三部']
-					},
-					{
-						id: 6,
-						name: '医疗事业部',
-						children: ['医疗一部', '医疗二部', '医疗三部']
-					},
-					{
-						id: 7,
-						name: '健康管理部',
-						children: ['健康管理一部', '健康管理二部']
-					},
-					{
-						id: 8,
-						name: '医疗事业部',
-						children: ['医疗一部', '医疗二部', '医疗三部']
+				return {
+					showTaskPopup: false,
+					primaryOptions: [],
+					activePrimaryIndex: 0,
+					currentSecondaryOptions: [],
+					selectedSecondaryItem: '',
+					selectedPrimaryItem: null,
+					selectedIndex: -1,
+					selectedProject: null,
+					belongingprojects: [],
+					searchKeyword: '',
+					showBelongingPopup: false,
+					showPickerVisible: false,
+					currentStep: 1,
+					currentText: [{
+							id: 1,
+							stepNumber: 1,
+							title: '填写任务'
+						},
+						{
+							id: 2,
+							stepNumber: 2,
+							title: '积分设置'
+						}
+					],
+					rejectionInfo: '',
+					// 核心修复:所有表单字段统一放在formData里
+					formData: {
+						id:'',
+						costShareId: '',
+						planStartTime: '',
+						planEndTime: '',
+						deptId: '',
+						projectId: '',
+						productId: '',
+						taskType: '',
+						belongType: '',
+						addRemark: false,
+						viewMode: '公开', // 观看方式默认值
+						viewRequire: '登录账户', // 观看要求默认值
+						roomTitle: '', // 直播间标题
+						coverImage: '', // 封面图
+						applySpeaker: true // 申请补充讲者任务
 					},
-					{
-						id: 9,
-						name: '健康管理部',
-						children: ['健康管理一部', '健康管理二部']
+					pickerTitle: '默认标题',
+					pickerData: [],
+					companyId:'',
+					showStartTimePicker: false,
+					showEndTimePicker: false,
+					startTimeValue: new Date(),
+					endTimeValue: new Date(),
+					originalCompanyData: null,
+					companyData: [],
+					companyList: [],
+					productList: [],
+					taskTypeOriginalData: [],
+					taskTypeDict: [],
+					belongTypeList: [],
+					projectData: [],
+					userInfo: {},
+					// 页面显示数据
+					deptName: '',
+					costShareName: '',
+					productName: '',
+					projectName: '',
+					id:'',
+					doctorId:''
+				}
+			},
+		onLoad: async function(options) {
+			console.log("编辑任务接受数据",options);
+				try {
+					this.taskTypeDict = await utils.getDicts("task_type");//任务类型
+					this.belongTypeList = await utils.getDicts("task_belong_type");//任务类型
+				} catch (e) {
+					console.log('获取字典数据失败:', e)
+				}
+               if(options.id){
+			   console.log('有id',options.id);
+
+	           this.id=options.id
+	           this.formData.id=options.id
+
 					}
-				],
-				activePrimaryIndex: 0,
-				currentSecondaryOptions: [],
-				selectedSecondaryItem: '',
-				selectedPrimaryItem: null,
-				selectedIndex: -1,
-				selectedProject: null,
-				belongingprojects: [{
-						name: '学术交流项目'
-					},
-					{
-						name: '科学调研项目'
-					},
-					{
-						name: '2026年1月医学研究项目'
-					},
-					{
-						name: '2026年2月医学研究项目'
-					},
-					{
-						name: '2026年3月医学研究项目'
+                if(options.doctorId){
+					this.doctorId=options.doctorId
+				}
+				this.userInfo=JSON.parse(uni.getStorageSync("userInfo"))||''
+				if (options.rejectionInfo) {
+					this.rejectionInfo = decodeURIComponent(options.rejectionInfo)
+				}
+				// 初始化二级选项
+				this.currentSecondaryOptions = this.primaryOptions[0]?.children || []
+				// 获取用户信息
+				const userInfoStr = uni.getStorageSync('userInfo')
+				this.userInfo = userInfoStr ? JSON.parse(userInfoStr) : {}
+				console.log(this.userInfo);
+				// 加载信息
+				this.companyId = this.userInfo.companyId || 1
+				// 设置默认日期为当天
+				this.formData.planStartTime = this.formatDateTime(new Date());
+				this.formData.planEndTime = this.formatDateTime(new Date());
+				this.info();
+			},
+		computed: {
+				filteredProjects() {
+					if (!this.searchKeyword.trim()) {
+						return this.belongingprojects;
 					}
-				],
-				searchKeyword: '',
-				showBelongingPopup: false,
-				showPickerVisible: false,
-				costColumns: [
-					['主体1', '主体2', '主体3']
-				],
-				taskTypeColumns: [
-					['类型1', '类型2', '类型3']
-				],
-				currentStep: 1,
-				currentText: [{
-						id: 1,
-						stepNumber: 1,
-						title: '填写任务'
-					},
-					{
-						id: 2,
-						stepNumber: 2,
-						title: '积分设置'
+					return this.belongingprojects.filter(project =>
+						project.name.includes(this.searchKeyword)
+					);
+				},
+				taskTypeDisplayText() {
+					console.log('计算taskTypeDisplayText, formData.taskType:', this.formData.taskType);
+					console.log('计算taskTypeDisplayText, taskTypeOriginalData:', this.taskTypeOriginalData);
+					if (!this.formData.taskType || !this.taskTypeOriginalData) {
+						return '';
 					}
-				],
-				rejectionInfo: '',
-				// 核心修复:所有表单字段统一放在formData里
-				formData: {
-					costAllocation: '',
-					planStartTime: '',
-					planEndTime: '',
-					institution: '',
-					belongingProject: '',
-					taskType: '',
-					addRemark: false,
-					viewMode: '公开', // 观看方式默认值
-					viewRequire: '登录账户', // 观看要求默认值
-					roomTitle: '', // 直播间标题
-					coverImage: '', // 封面图
-					applySpeaker: true // 申请补充讲者任务
+					const selectedType = this.taskTypeOriginalData.find(item => item.dictValue === this.formData.taskType);
+					console.log('找到的selectedType:', selectedType);
+					return selectedType ? selectedType.dictLabel : '';
 				},
-				pickerTitle: '默认标题',
-				pickerData: []
-			}
-		},
-		onLoad(options) {
-			if (options.rejectionInfo) {
-				this.rejectionInfo = decodeURIComponent(options.rejectionInfo)
-			}
-			// 初始化二级选项
-			this.currentSecondaryOptions = this.primaryOptions[0]?.children || []
-		},
-		computed: {
-			filteredProjects() {
-				if (!this.searchKeyword.trim()) {
-					return this.belongingprojects;
+				institutionDisplayText() {
+				if (!this.formData.deptId || !this.companyData) {
+					return '';
 				}
-				return this.belongingprojects.filter(project =>
-					project.name.includes(this.searchKeyword)
-				);
-			}
-		},
-		methods: {
-			// 封面图上传
-			chooseCoverImage() {
-				uni.chooseImage({
-					count: 1,
-					sizeType: ['compressed'],
-					sourceType: ['album', 'camera'],
-					success: (res) => {
-						this.formData.coverImage = res.tempFilePaths[0]
-					}
-				})
+				const selectedItem = this.companyData.find(item => item.deptId === this.formData.deptId);
+				return selectedItem ? selectedItem.deptName : '';
 			},
-			// 删除封面图
-			deleteCoverImage() {
-				this.formData.coverImage = ''
-			},
-			// 一级分类选择
-			handlePrimarySelect(index) {
-				this.activePrimaryIndex = index;
-				this.currentSecondaryOptions = this.primaryOptions[index].children || [];
-				this.selectedSecondaryItem = '';
-			},
-			// 二级分类选择
-			handleSecondarySelect(item) {
-				this.selectedSecondaryItem = item;
-				this.selectedPrimaryItem = this.primaryOptions[this.activePrimaryIndex];
-			},
-			// 任务归属确认
-			handleConfirm() {
-				if (this.selectedSecondaryItem) {
-					const displayText = `${this.selectedPrimaryItem.name} > ${this.selectedSecondaryItem}`;
-					this.formData.institution = displayText;
-					this.showTaskPopup = false;
-				} else {
-					uni.showToast({
-						title: '请选择二级部门',
-						icon: 'none'
-					});
+			costAllocationDisplayText() {
+				if (!this.formData.costShareId || !this.companyData) {
+					return '';
 				}
+				const selectedItem = this.companyData.find(item => item.deptId === this.formData.costShareId);
+				return selectedItem ? selectedItem.deptName : '';
 			},
-			// 关闭归属项目弹窗
-			closePopup() {
-				this.showBelongingPopup = false;
-				this.searchKeyword = '';
-				this.selectedIndex = -1;
+				belongingProjectDisplayText() {
+					console.log('计算belongingProjectDisplayText:', this.formData.projectId, this.projectData);
+					if (!this.formData.projectId || !this.projectData) {
+						console.log('formData.projectId或projectData为空');
+						return '';
+					}
+					const selectedItem = this.projectData.find(item => item.id === this.formData.projectId);
+					console.log('找到的项目:', selectedItem);
+					return selectedItem ? selectedItem.projectName : '';
+				},
+				productNameDisplayText() {
+						if (!this.formData.productId || !this.productList) {
+							return '';
+						}
+						const selectedItem = this.productList.find(item => item.id === this.formData.productId);
+						return selectedItem ? selectedItem.productName : '';
+					},
+				belongTypeDisplayText() {
+					if (!this.formData.belongType || !this.belongTypeList) {
+						return '';
+					}
+					const selectedItem = this.belongTypeList.find(item => item.dictValue === this.formData.belongType);
+					return selectedItem ? selectedItem.dictLabel : '';
+				}
 			},
-			// 选择归属项目
-			selectProject(project, index) {
-				this.selectedIndex = index;
-				this.selectedProject = project;
-				this.formData.belongingProject = project.name;
-				setTimeout(() => {
+		methods: {
+				// 任务详情查询
+				info() {
+					info(this.id).then(res => {
+						if (res.code === 200) {
+							const data = res.data;
+							// 直接将接口返回的数据赋值给 formData
+							this.formData = {
+								// 基本信息
+								 id: this.id || '',
+								deptId: data.deptId || '',
+								deptName: data.deptName || '',
+								projectId: data.projectId || '',
+								productId: data.productId || '',
+								costShareId: data.costShareId || '',
+								belongType: data.belongType || '',
+								taskType: data.taskType || '',
+								addRemark: false,
+								
+								// 时间信息
+								planStartTime: data.planStartTime || '',
+								planEndTime: data.planEndTime || '',
+								
+								// 直播信息
+								viewMode: '公开', // 观看方式默认值
+								viewRequire: '登录账户', // 观看要求默认值
+								roomTitle: '', // 直播间标题
+								coverImage: '', // 封面图
+								applySpeaker: true // 申请补充讲者任务
+							};
+							
+							// 保存其他需要的数据
+							this.deptName = data.deptName || '';
+							this.costShareName = data.costShareName || '';
+							this.productName = data.productName || '';
+							this.projectName = data.projectName || '';
+						} else {
+							uni.showToast({
+								title: '查询任务详情失败',
+								icon: 'none'
+							});
+						}
+					})
+				},
+				// 封面图上传
+				chooseCoverImage() {
+					uni.chooseImage({
+						count: 1,
+						sizeType: ['compressed'],
+						sourceType: ['album', 'camera'],
+						success: (res) => {
+							this.formData.coverImage = res.tempFilePaths[0]
+						}
+					})
+				},
+				// 删除封面图
+				deleteCoverImage() {
+					this.formData.coverImage = ''
+				},
+				// 一级分类选择
+				handlePrimarySelect(index) {
+					this.activePrimaryIndex = index;
+					this.currentSecondaryOptions = this.primaryOptions[index].children || [];
+					this.selectedSecondaryItem = '';
+				},
+				// 二级分类选择
+				handleSecondarySelect(item) {
+					this.selectedSecondaryItem = item;
+					this.selectedPrimaryItem = this.primaryOptions[this.activePrimaryIndex];
+				},
+				// 任务归属确认
+				handleConfirm() {
+					if (this.selectedSecondaryItem) {
+						const displayText = `${this.selectedPrimaryItem.name} > ${this.selectedSecondaryItem}`;
+						this.formData.institution = displayText;
+						this.showTaskPopup = false;
+					} else {
+						uni.showToast({
+							title: '请选择二级部门',
+							icon: 'none'
+						});
+					}
+				},
+				// 关闭归属项目弹窗
+				closePopup() {
 					this.showBelongingPopup = false;
 					this.searchKeyword = '';
 					this.selectedIndex = -1;
-				}, 300);
-			},
-			// 打开通用选择器
-			showPicker(title, data) {
-				this.pickerData = data
-				this.pickerTitle = title
-				this.showPickerVisible = true
-			},
-			// 通用选择器确认
-			confirm(e) {
-				if (e.value && e.value.length > 0) {
-					if (this.pickerTitle === '费用分摊') {
-						this.formData.costAllocation = e.value[0]
-					} else if (this.pickerTitle === '任务类型') {
-						this.formData.taskType = e.value[0]
+				},
+				// 选择归属项目
+				selectProject(project, index) {
+					this.selectedIndex = index;
+					this.selectedProject = project;
+					this.formData.belongingProject = project.name;
+					setTimeout(() => {
+						this.showBelongingPopup = false;
+						this.searchKeyword = '';
+						this.selectedIndex = -1;
+					}, 300);
+				},
+				//任务类型
+				queryAllData(){
+					return new Promise((resolve, reject) => {
+						if(!this.formData.productId){
+							uni.showToast({
+								title: '请先选择产品',
+								icon: 'none'
+							})
+							resolve();
+							return
+						}
+						let data={
+							companyId:this.userInfo.companyId||'',
+							deptId:this.formData.deptId||'',
+							productId:this.formData.productId||'',
+
+						}
+						queryAllData(data).then(res => {
+							if (res.code === 200) {
+								// 处理任务类型
+								this.taskType = res.data || []
+								console.log('company接口返回数据:', res)
+								
+								// 处理taskTypeIds,获取对应的字典数据
+							if (res.data && res.data.length > 0) {
+								const firstData = res.data[0];
+								if (firstData.taskTypeIds) {
+									// 分割taskTypeIds为数组
+									const taskTypeIdsArray = firstData.taskTypeIds.split(',');
+									// 从字典表中筛选出对应的项
+									const filteredTaskTypes = this.taskTypeDict.filter(item => 
+										taskTypeIdsArray.includes(item.dictValue)
+									);
+									// 保存原始数据(包含dictLabel和dictValue)
+									this.taskTypeOriginalData = filteredTaskTypes;
+									// 提取dictLabel并放到taskTypeColumns中
+									const taskTypeLabels = filteredTaskTypes.map(item => item.dictLabel);
+									this.taskTypeColumns = [taskTypeLabels];
+									console.log('处理后的taskTypeColumns:', this.taskTypeColumns);
+									console.log('任务类型原始数据:', this.taskTypeOriginalData);
+								}
+							}
+							}
+							resolve(res);
+						}).catch(err => {
+							console.error('获取任务类型失败:', err);
+							reject(err);
+						});
+					});
+				},
+
+				//获取公司所有产品
+				async queryAllProduct(){
+					return new Promise((resolve, reject) => {
+						let data={
+							companyId:this.userInfo.companyId||'',
+						}
+						queryAllProduct(data).then(res => {
+							if (res.code === 200) {
+								// 处理公司所有产品数据
+								this.productList = res.data || []
+								console.log('company接口返回数据:', res)
+							}
+							resolve(res);
+						}).catch(err => {
+							console.error('获取公司所有产品失败:', err);
+							reject(err);
+						});
+					});
+				},
+				// 归属项目
+				async getAllData(){
+					return new Promise((resolve, reject) => {
+						let data={
+						companyId:this.userInfo.companyId||'',
+							deptId:this.userInfo.deptId||'',
+							productCode:this.userInfo.productCode||''
+						}
+						getAllData(data).then(res => {
+							if (res.code === 200) {
+								// 处理公司项目设置列表数据
+								this.companyList = res.data || []
+								// 保存项目数据用于显示
+								this.projectData = res.data || []
+
+								console.log('company接口返回数据:', res)
+								console.log('companyList数据结构:', this.companyList)
+							}
+							resolve(res);
+						}).catch(err => {
+							console.error('获取公司项目设置失败:', err);
+							reject(err);
+						});
+					});
+				},
+
+				async company() {
+					return new Promise((resolve, reject) => {
+						try {
+							uni.showLoading({
+								title: '加载中...'
+							})
+							// 调用company接口获取公司项目设置列表
+							company(this.companyId).then(companyRes => {
+								uni.hideLoading()
+								if (companyRes.code === 200) {
+									// 处理公司项目设置列表数据
+									this.companyData = companyRes.data || []
+
+									console.log('company接口返回数据:', companyRes)
+									// 这里可以根据接口返回的数据进行页面初始化,比如填充项目列表
+								}
+								resolve(companyRes);
+							}).catch(e => {
+								uni.hideLoading()
+								console.error('加载信息失败', e)
+								uni.showToast({
+									title: '网络错误',
+									icon: 'none'
+								})
+								reject(e);
+							});
+						} catch (e) {
+							uni.hideLoading()
+							console.error('加载信息失败', e)
+							uni.showToast({
+								title: '网络错误',
+								icon: 'none'
+							})
+							reject(e);
+						}
+					});
+				},
+				// 打开通用选择器
+				async showPicker(title, data) {
+					// 根据不同的title调用对应的请求方法
+					if (title === '任务归属' || title === '费用分摊') {
+						// 调用company()获取任务归属和费用分摊数据
+						await this.company();
+						data = this.companyData;
+					} else if (title === '归属项目') {
+						// 调用getAllData()获取归属项目数据
+						await this.getAllData();
+						data = this.companyList;
+						console.log('归属项目数据:', data);
+					} else if (title === '产品代码') {
+						// 调用queryAllProduct()获取产品代码数据
+						await this.queryAllProduct();
+						data = this.productList;
+					} else if (title === '任务类型') {
+						// queryAllData()获取任务类型数据
+						await this.queryAllData();
+						// 使用处理后的taskTypeColumns作为数据
+						data = this.taskTypeColumns;
+						console.log('任务类型数据:', data);
+					} else if (title === '归属类型') {
+						// 归属类型数据已经在onLoad中获取
+						data = this.belongTypeList;
+						console.log('归属类型数据:', data);
+					}
+
+					// 处理任务归属和费用分摊数据,将deptName作为显示文本
+					if ((title === '任务归属' || title === '费用分摊') && data && data.length > 0) {
+						// 转换为picker需要的格式
+						this.pickerData = [data.map(item => item.deptName)]
+						// 保存原始数据,用于后续获取deptId
+						this.originalCompanyData = data
+					} else if (title === '归属项目' && data && data.length > 0) {
+						// 处理归属项目数据,将projectName作为显示文本
+						this.pickerData = [data.map(item => item.projectName)]
+						// 保存原始数据,用于后续获取productId
+						this.originalCompanyData = data
+					} else if (title === '产品代码' && data && data.length > 0) {
+						// 处理产品代码数据,将productName作为显示文本
+						this.pickerData = [data.map(item => item.productName)]
+						// 保存原始数据,用于后续获取productCode
+						this.originalCompanyData = data
+					} else if (title === '归属类型' && data && data.length > 0) {
+						// 处理归属类型数据,将dictLabel作为显示文本
+						this.pickerData = [data.map(item => item.dictLabel)]
+						// 保存原始数据,用于后续获取dictType
+						this.originalCompanyData = data
+					} else {
+						this.pickerData = data
+						this.originalCompanyData = null
+					}
+					this.pickerTitle = title
+					console.log('打开picker, pickerTitle:', this.pickerTitle);
+					console.log('pickerData:', this.pickerData);
+					this.showPickerVisible = true
+				},
+				// 通用选择器确认
+				confirm(e) {
+					console.log('confirm事件返回值:', e);
+					console.log('pickerTitle:', this.pickerTitle);
+					console.log('e.value:', e.value);
+					if (e.value && e.value.length > 0) {
+						if (this.pickerTitle === '费用分摊') {
+							// e.value[0]是选中的文本值(deptName)
+							const selectedDeptStr = e.value[0];
+							console.log('选中的费用分摊文本:', selectedDeptStr);
+							console.log('originalCompanyData:', this.originalCompanyData);
+							// 从originalCompanyData中找到对应的项
+							const selectedItem = this.originalCompanyData.find(item => item.deptName === selectedDeptStr);
+							if (selectedItem) {
+							// 保存deptId到表单(存储id值)
+							this.formData.costShareId = selectedItem.deptId;
+							console.log('设置formData.costShareId为:', selectedItem.deptId);
+						} else {
+							this.formData.costShareId = '';
+							console.log('未找到对应的费用分摊');
+						}
+						} else if (this.pickerTitle === '任务类型') {
+							// e.value[0]是选中的文本值(dictLabel)
+							const selectedLabel = e.value[0];
+							console.log('选中的任务类型文本:', selectedLabel);
+							console.log('taskTypeOriginalData:', this.taskTypeOriginalData);
+							// 从taskTypeOriginalData中找到对应的项
+							const selectedType = this.taskTypeOriginalData.find(item => item.dictLabel === selectedLabel);
+							if (selectedType) {
+								this.formData.taskType = selectedType.dictValue;
+								console.log('设置formData.taskType为:', selectedType.dictValue);
+							} else {
+							}
+						} else if (this.pickerTitle === '任务归属' && this.originalCompanyData) {
+							// e.value[0]是选中的文本值(deptName)
+							const selectedDeptStr = e.value[0];
+							console.log('选中的任务归属文本:', selectedDeptStr);
+							console.log('originalCompanyData:', this.originalCompanyData);
+							// 从originalCompanyData中找到对应的项
+							const selectedItem = this.originalCompanyData.find(item => item.deptName === selectedDeptStr);
+							if (selectedItem) {
+								// 保存deptId到表单(存储id值)
+								this.formData.deptId = selectedItem.deptId;
+								console.log('设置formData.deptId为:', selectedItem.deptId);
+							} else {
+							}
+						} else if (this.pickerTitle === '归属项目' && this.originalCompanyData) {
+							// e.value[0]是选中的文本值(projectName)
+							const selectedProjectName = e.value[0];
+							console.log('选中的归属项目文本:', selectedProjectName);
+							console.log('originalCompanyData:', this.originalCompanyData);
+							// 从originalCompanyData中找到对应的项
+							const selectedItem = this.originalCompanyData.find(item => item.projectName === selectedProjectName);
+							if (selectedItem) {
+								// 保存id到表单(存储id值)
+								this.formData.projectId = selectedItem.id;
+								// 保存productId到表单
+								this.formData.productId = selectedItem.productId;
+								console.log('设置formData.projectId为:', selectedItem.id);
+							} else {
+							}
+						} else if (this.pickerTitle === '产品代码' && this.originalCompanyData) {
+							// e.value[0]是选中的文本值(productName)
+							const selectedProductName = e.value[0];
+							console.log('选中的产品代码文本:', selectedProductName);
+							console.log('originalCompanyData:', this.originalCompanyData);
+							// 从originalCompanyData中找到对应的项
+							const selectedItem = this.originalCompanyData.find(item => item.productName === selectedProductName);
+							if (selectedItem) {
+								// 保存id到表单
+								this.formData.productId = selectedItem.id;
+								// 保存id用于获取任务类型
+								console.log('设置formData.productId为:', selectedItem.id);
+							} else {
+								
+							}
+						} else if (this.pickerTitle === '归属类型' && this.originalCompanyData) {
+							// e.value[0]是选中的文本值(dictLabel)
+							const selectedLabel = e.value[0];
+							console.log('选中的归属类型文本:', selectedLabel);
+							console.log('originalCompanyData:', this.originalCompanyData);
+							// 从originalCompanyData中找到对应的项
+							const selectedItem = this.originalCompanyData.find(item => item.dictLabel === selectedLabel);
+							if (selectedItem) {
+								// 保存dictValue到表单的belongType字段
+								this.formData.belongType = selectedItem.dictValue;
+								console.log('设置formData.belongType为:', selectedItem.dictValue);
+							} else {
+								console.log('未找到对应的归属类型');
+							}
+						}
 					}
+					this.showPickerVisible = false
+				},
+				// 通用选择器取消
+				cancel() {
+					this.showPickerVisible = false
+				},
+				// 下一步
+				toNext() {
+					console.log('去编辑积分:', this.doctorId);
+					console.log('去编辑积分formData:', this.formData);
+					// 保存表单数据到本地存储,以便 editSelectCustomer.vue 页面使用
+					uni.setStorageSync('fillTaskFormData', JSON.stringify(this.formData));
+					uni.navigateTo({
+						url: `/pages_task/editSelectCustomer?doctorId=${this.doctorId}`
+					})
+				},
+				// 提交表单
+				submit() {
+					console.log('提交表单数据:', this.formData);
+					// 这里可以添加表单验证逻辑
+					// 然后调用接口提交数据
+					uni.showToast({
+						title: '提交成功',
+						icon: 'success'
+					});
+				},
+				// 开始时间选择确认
+				onStartTimeConfirm(e) {
+					this.formData.planStartTime = this.formatDateTime(e.value);
+					this.showStartTimePicker = false;
+				},
+				// 结束时间选择确认
+				onEndTimeConfirm(e) {
+					this.formData.planEndTime = this.formatDateTime(e.value);
+					this.showEndTimePicker = false;
+				},
+				// 格式化日期时间
+				formatDateTime(timestamp) {
+					const date = new Date(timestamp);
+					const year = date.getFullYear();
+					const month = String(date.getMonth() + 1).padStart(2, '0');
+					const day = String(date.getDate()).padStart(2, '0');
+					// const hours = String(date.getHours()).padStart(2, '0');
+					// const minutes = String(date.getMinutes()).padStart(2, '0');
+					// const seconds = String(date.getSeconds()).padStart(2, '0');
+					//  ${hours}:${minutes}:${seconds}
+					return `${year}-${month}-${day}`;
 				}
-				this.showPickerVisible = false
-			},
-			// 通用选择器取消
-			cancel() {
-				this.showPickerVisible = false
-			},
-			// 下一步
-			toNext() {
-				uni.navigateTo({
-					url: '/pages_task/editSelectCustomer'
-				})
-			},
-			// 计划开始时间选择
-			onPlanStartTimeChange(e) {
-				this.formData.planStartTime = e.detail.value
-			},
-			// 计划结束时间选择
-			onPlanEndTimeChange(e) {
-				this.formData.planEndTime = e.detail.value
 			}
-		}
 	}
 </script>
 

+ 1 - 0
pages_task/pointsSettings.vue

@@ -248,6 +248,7 @@
 						belongType: taskFormData.belongType || 0,
 						companyId: userInfo.companyId || 0,
 						companyUserId: userInfo.id || 0,
+						remark: taskFormData.remark || '',
 						// 构建doctorIds数组
 						// doctorIds: this.customerList.map(customer => parseInt(customer.id) || 0),
 						// 构建doctorTaskList数组

+ 531 - 121
pages_task/taskDetail.vue

@@ -9,11 +9,11 @@
 			<!-- 任务卡片 -->
 			<view class="task-card">
 				<view class="card-header">
-					<view class="card-title">{{ taskData.title }}</view>
+					<view class="card-title">{{ detail.taskName||'-'  }}</view>
 				</view>
 				<view class="card-meta">
-					<view class="meta-tag">{{ taskData.tag }}</view>
-					<view class="meta-id">ID:{{ taskData.id }}</view>
+					<view class="meta-tag">{{ detail.taskTypeName||'-'  }}</view>
+					<view class="meta-id">ID:{{ detail.taskNo||'-' }}</view>
 				</view>
 			</view>
 
@@ -26,32 +26,32 @@
 				<view class="info-list">
 					<view class="info-item">
 						<text class="info-label">费用分摊:</text>
-						<text class="info-value">{{ taskInfo.costSharing }}</text>
+						<text class="info-value">{{ detail.costShareName||'-' }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">归属项目:</text>
-						<text class="info-value">{{ taskInfo.belongProject }}</text>
+						<text class="info-value">{{ detail.projectName ||'-' }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">归属部门:</text>
-						<text class="info-value">{{ taskInfo.belongDept }}</text>
+						<text class="info-value">{{ detail.deptName ||'-' }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">归属产品:</text>
-						<text class="info-value">{{ taskInfo.belongProduct }}</text>
+						<text class="info-value">{{ detail.productName ||'-' }}</text>
 					</view>
-					<view class="info-item">
+					<!-- <view class="info-item">
 						<text class="info-label">申请补充直播任务:</text>
-						<text class="info-value">{{ taskInfo.applySupplementLive }}</text>
+						<text class="info-value">{{ detail.applySupplementLive ||'-' }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">补充任务直播间ID:</text>
-						<text class="info-value">{{ taskInfo.supplementRoomId }}</text>
+						<text class="info-value">{{ detail.supplementRoomId ||'-' }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">申请补充任务原因:</text>
-						<text class="info-value">{{ taskInfo.supplementReason }}</text>
-					</view>
+						<text class="info-value">{{ detail.supplementReason ||'-' }}</text>
+					</view> -->
 				</view>
 			</view>
 
@@ -64,51 +64,51 @@
 				<view class="info-list">
 					<view class="info-item">
 						<text class="info-label">交付物名称:</text>
-						<text class="info-value">{{ contentInfo.deliverableName }}</text>
+						<text class="info-value">{{ detail.deliverableName ||'-' }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">交付物ID:</text>
-						<text class="info-value">{{ contentInfo.deliverableId }}</text>
+						<text class="info-value">{{ detail.deliverableId||'-'  }}</text>
 					</view>
-					<view class="info-item">
+					<!-- <view class="info-item">
 						<text class="info-label">直播间地址:</text>
-						<text class="info-value">{{ contentInfo.liveRoomUrl }}</text>
+						<text class="info-value">{{ detail.liveRoomUrl ||'-' }}</text>
 						<text class="copy-btn" @click="copyToClipboard(contentInfo.liveRoomUrl)">复制</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">推流地址:</text>
-						<text class="info-value">{{ contentInfo.pushUrl }}</text>
+						<text class="info-value">{{ detail.pushUrl ||'-' }}</text>
 						<text class="copy-btn" @click="copyToClipboard(contentInfo.pushUrl)">复制</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">开播地址:</text>
-						<text class="info-value">{{ contentInfo.startUrl }}</text>
+						<text class="info-value">{{ detail.startUrl||'-'  }}</text>
 						<text class="copy-btn" @click="copyToClipboard(contentInfo.startUrl)">复制</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">直播回放:</text>
-						<text class="info-value">{{ contentInfo.liveReplay }}</text>
+						<text class="info-value">{{ detail.liveReplay ||'-' }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">播放视频:</text>
-						<text class="info-value">{{ contentInfo.playVideo }}</text>
+						<text class="info-value">{{ detail.playVideo||'-'  }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">下载视频:</text>
-						<text class="info-value">{{ contentInfo.downloadVideo }}</text>
+						<text class="info-value">{{ detail.downloadVideo||'-'  }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">观众人数:</text>
-						<text class="info-value">{{ contentInfo.viewerCount }}</text>
+						<text class="info-value">{{ detail.viewerCount||'0'  }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">有效观看:</text>
-						<text class="info-value">{{ contentInfo.validView }}</text>
+						<text class="info-value">{{ detail.validView||'-'  }}</text>
 					</view>
 					<view class="info-item">
 						<text class="info-label">情况说明:</text>
-						<text class="info-value">{{ contentInfo.description }}</text>
-					</view>
+						<text class="info-value">{{ detail.description||'-'  }}</text>
+					</view> -->
 				</view>
 			</view>
 
@@ -119,24 +119,24 @@
 					<text class="section-title">客户信息</text>
 				</view>
 				<view class="client-list">
-					<view class="client-item" v-for="(item, index) in clientList" :key="index">
+					<view class="client-item" >
 						<view class="client-info">
 							<image class="avatar" src="/static/image/my_heads_icon.png"></image>
 							<view class="client-txt">
 								<view class="client-name">
-									{{ item.name }}
-									<text class="client-level">{{ item.level }}</text>
+									{{ detail.doctorVO.doctorName||'-' }}
+									<text class="client-level" v-if="detail.doctorVO.jobTitle">{{ detail.doctorVO.jobTitle }}</text>
 								</view>
 								<view class="client-hospital">
-									<text>{{ item.hospital }} </text>
+									<text>{{ detail.doctorVO.institution ||'-'}} </text>
 									<view class="line"></view>
-									<text>{{ item.department }}</text>
+									<text>{{ detail.doctorVO.department ||'-'}}</text>
 								</view>
 							</view>
 						</view>
 						<view class="client-stats">
-							<view class="stat-item"><text class="num">{{ item.taskCount }} </text>任务</view>
-							<view class="stat-item"><text class="num">{{ item.points }} </text>积分</view>
+							<view class="stat-item"><text class="num">{{detail.doctorVO.taskNum ||'0'}} </text>任务</view>
+							<view class="stat-item"><text class="num">{{ detail.doctorVO.balance||'0' }} </text>积分</view>
 						</view>
 					</view>
 				</view>
@@ -149,27 +149,37 @@
 					<text class="section-title">补充材料</text>
 				</view>
 				<view class="info-list">
-					<view class="info-item">
-						<text class="info-label">交付物名称:</text>
-						<text class="info-value">{{ supplementMaterial.deliverableName }}</text>
-					</view>
-					<view class="info-item">
-						<text class="info-label">情况说明:</text>
-						<text class="info-value">{{ supplementMaterial.description }}</text>
-					</view>
-					<view class="info-item column">
-						<text class="info-label">附件:</text>
-						<view class="attachment-item" v-if="supplementMaterial.attachment.name">
-							<view class="left">
-								<image class="img" src="/static/image/icon_attachment.png"></image>
-								<view class="txt-item">
-									<view class="attachment-name">{{ supplementMaterial.attachment.name }}</view>
-									<view class="attachment-size">{{ supplementMaterial.attachment.size }}</view>
+					<template v-if="detail.materialInfoList && detail.materialInfoList.length > 0">
+						<view v-for="(material, index) in detail.materialInfoList" :key="index" class="material-item">
+							<view class="material-header">
+								<text class="material-title" v-if="detail.materialInfoList.length > 1">材料 {{ index + 1 }}</text>
+							</view>
+							<view class="info-item">
+								<text class="info-label">交付物名称:</text>
+								<text class="info-value">{{ material.materialName || '-' }}</text>
+							</view>
+							<view class="info-item">
+								<text class="info-label">情况说明:</text>
+								<text class="info-value">{{ material.materialDesc || '-' }}</text>
+							</view>
+							<view class="info-item column">
+								<text class="info-label">附件:</text>
+								<view class="attachment-item" v-if="material.materialLink">
+									<view class="left">
+										<image class="img" src="/static/image/icon_attachment.png"></image>
+										<view class="txt-item">
+											<view class="attachment-name">{{ material.materialLink || '-' }}</view>
+											<view class="attachment-size">{{ formatFileSize(material.fileSize || 0) }}</view>
+										</view>
+									</view>
+									<image class="download-btn" @click="downloadAttachment(material.materialLink)"
+										src="/static/image/icon_downlad.png"></image>
 								</view>
 							</view>
-							<image class="download-btn" @click="downloadAttachment"
-								src="/static/image/icon_downlad.png"></image>
 						</view>
+					</template>
+					<view v-else class="empty-material">
+						<text>暂无补充材料</text>
 					</view>
 				</view>
 			</view>
@@ -180,15 +190,18 @@
 					<view class="section-indicator"></view>
 					<text class="section-title">审批信息</text>
 				</view>
+				<view class="audit-tabs">
+					<view class="audit-tab" :class="{ active: activeTab === 'create' }" @click="switchTab('create')">创建任务审批</view>
+					<view class="audit-tab" :class="{ active: activeTab === 'complete' }" @click="switchTab('complete')">完成任务审批</view>
+				</view>
 				<view class="approval-list">
-					<view class="approval-item" v-for="(item, index) in approvalInfo" :key="index">
+					<view class="approval-item" v-for="(item, index) in currentApprovalInfo" :key="index">
 						<view class="left">
 							<view class="avatar-box">
 								<image class="avatar" src="/static/image/my_heads_icon.png"></image>
-								<image class="icon" v-if="item.status==2" src="/static/image/icon_wait.png"></image>
-								<image class="icon" v-if="item.status==0" src="/static/image/icon_pass.png"></image>
-								<image class="icon" v-if="item.status==1" src="/static/image/icon_refuse.png"></image>
-
+								<image class="icon" v-if="item.status=='待审核'" src="/static/image/icon_wait.png"></image>
+								<image class="icon" v-if="item.status=='已通过'" src="/static/image/icon_pass.png"></image>
+								<image class="icon" v-if="item.status=='已驳回'" src="/static/image/icon_refuse.png"></image>
 							</view>
 							<view class="approval-user">
 								<view class="user-name">{{ item.name }}</view>
@@ -196,21 +209,53 @@
 							</view>
 						</view>
 						<text class="approval-time">{{ item.time }}</text>
-						<view class="approval-line" v-if="index < approvalInfo.length - 1"></view>
+						<view class="approval-line" v-if="index < currentApprovalInfo.length - 1"></view>
 					</view>
+					<view v-if="currentApprovalInfo.length === 0" class="empty-approval">
+						<text>暂无审批信息</text>
+					</view>
+				</view>
 
+			</view>
+		</scroll-view>
+		<view class="bottom-bar" v-if="auditStatus==1">
+			<view class="action-buttons">
+				<view class="btn btn-cancel" @click="openRejectPopup">
+					<image class="icon" src="/static/image/icon_approval_no.png"></image>
+					<text>驳回</text>
 				</view>
-				<view class="reason" v-if="item.status==3">
-					费用分摊部门填写错误,应该是学术研究事业部,请修改后重新提交。
+				<view class="btn btn-submit" @click="handleNext">
+					<image class="icon" src="/static/image/icon_approval_yes.png"></image>
+					<text>通过</text>
+				</view>
+			</view>
+		</view>
+		<!-- 驳回弹窗 -->
+		<u-popup :show="showRejectPopup" mode="bottom" round="24" z-index="9999999">
+			<view class="reject-popup-content">
+				<view class="popup-header">
+					<text class="popup-title">驳回</text>
+					<image @click="showRejectPopup = false;" class="close" src="/static/image/icon_close.png"></image>
 				</view>
 
+				<view class="input-area">
+					<textarea v-model="rejectReason" placeholder="请输入驳回意见" class="reason-input" :auto-height="true"
+						maxlength="200" />
+				</view>
+				<view class="btn-group">
+					<view class="button reject" @click="showRejectPopup = false">取消</view>
+					<view class="button confirm" @click="handleConfirmReject ">确认驳回</view>
+				</view>
 			</view>
-		</scroll-view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
-	import { getTaskFinishAuditInfo} from '@/api/task.js';
+import { doAudit} from '@/api/audit.js'
+import { info } from '@/api/task.js';
+	// import { getTaskFinishAuditInfo,detail} from '@/api/task.js';
+	import { detail} from '@/api/audit.js';
 
 	export default {
 		data() {
@@ -242,82 +287,225 @@
 					}
 				},
 				// 审批信息
-				approvalInfo: []
+				createApprovalInfo: [],
+				completeApprovalInfo: [],
+				activeTab: 'create',
+				taskId:'',
+				taskId2:'',
+				detail:{},
+				createStatus:'',
+				completeStatus:'',
+				auditStatus:'',
+				userInfo:{},
+				showRejectPopup:false,//是否展示驳回弹窗
+				rejectReason:'',//驳回原因
+
+
+			}
+		},
+		computed: {
+			currentApprovalInfo() {
+				return this.activeTab === 'create' ? this.createApprovalInfo : this.completeApprovalInfo
 			}
 		},
 		onLoad(options) {
+			console.log("任务详情数据",options)
 			if (options.taskId) {
 				this.taskId = options.taskId
-				this.loadData()
+				this.loadData(this.taskId,'create')
+
 			}
+			if (options.taskId2) {
+				this.taskId2 = options.taskId2
+				this.loadData(this.taskId2,'complete')
+			}
+			if (options.id) {
+				const id = options.id
+			this.info(id);
+
+			}
+
+			// 初始化 auditStatus
+			this.auditStatus = this.createStatus;
+			this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
+
+
+			
 		},
-		methods: {
+		methods: { // 打开驳回弹窗
+    openRejectPopup() {
+      // 直接打开驳回弹窗
+      this.showRejectPopup = true
+    },
+
+    // 确认驳回
+    async handleConfirmReject() {
+      if (!this.rejectReason.trim()) {
+        uni.showToast({
+          title: '请输入驳回意见',
+          icon: 'none'
+        })
+        return
+      }
+      
+      try {
+        uni.showLoading({
+          title: '提交中...'
+        })
+        console.log("this.userInfo",this.userInfo)
+
+        // 调用审核接口,传递action=2表示驳回
+        const res = await doAudit({
+          auditId: this.activeTab === 'create' ? this.taskId : this.taskId2,
+          userId: this.userInfo.userId,
+          userType: 0,
+          action: 2,
+          comment: this.rejectReason,
+          companyId: this.userInfo.companyId
+        })
+        
+        uni.hideLoading()
+        
+        if (res.code === 200) {
+          uni.showToast({
+            title: res.data.message,
+            icon: 'none'
+          })
+          
+          // 关闭弹窗
+          this.showRejectPopup = false
+          // 重置输入
+          this.rejectReason = ''
+          // 重新加载数据
+          this.loadData()
+        } else {
+          uni.showToast({
+            title: res.msg || '驳回失败',
+            icon: 'none'
+          })
+        }
+      } catch (e) {
+        uni.hideLoading()
+        console.error('驳回失败', e)
+        uni.showToast({
+          title: '驳回失败,请稍后重试',
+          icon: 'none'
+        })
+      }
+    },
+
+			 // 审批通过
+    async handleNext() {
+      try {
+        uni.showLoading({
+          title: '提交中...'
+        })
+        console.log("this.userInfo",this.userInfo)
+
+        // 调用审核接口,传递action=1表示通过
+        const res = await doAudit({
+          auditId: this.activeTab === 'create' ? this.taskId : this.taskId2,
+          userId: this.userInfo.userId,
+          userType: 0,
+          action: 1,
+          comment: "",
+          companyId: this.userInfo.companyId
+        })
+        
+        uni.hideLoading()
+        
+        if (res.code === 200) {
+          uni.showToast({
+            title: res.data.message,
+            icon:  'none'
+          })
+          
+          // 重新加载数据
+        //   this.loadData()
+        } else {
+          uni.showToast({
+            title: res.msg || '审批通过失败',
+            icon: 'none'
+          })
+        }
+      } catch (e) {
+        uni.hideLoading()
+        console.error('审批通过失败', e)
+        uni.showToast({
+          title: '审批通过失败,请稍后重试',
+          icon: 'none'
+        })
+      }
+    },
 			goBack() {
 				uni.navigateBack()
 			},
-			async loadData() {
+			switchTab(tab) {
+			this.activeTab = tab
+			// 根据切换的标签更新 auditStatus
+			this.auditStatus = tab === 'create' ? this.createStatus : this.completeStatus
+		},
+			info(id){
+				info(id).then(res=>{
+					if(res.code===200){
+						this.detail = res.data
+						console.log("任务详情",this.detail)
+					}
+			})},
+			async loadData(taskId,type) {
+				// 如果没有传递参数,根据当前选中的标签加载对应的数据
+				if (!taskId || !type) {
+					if (this.activeTab === 'create' && this.taskId) {
+						await this.loadData(this.taskId, 'create');
+					}
+					if (this.activeTab === 'complete' && this.taskId2) {
+						await this.loadData(this.taskId2, 'complete');
+					}
+					return;
+				}
 				try {
 					uni.showLoading({
 						title: '加载中...'
 					})
 					// 调用接口获取任务详情
-					const res = await getTaskFinishAuditInfo({ taskId: this.taskId })
+					const res = await detail({ auditId:taskId})
 					uni.hideLoading()
 					if (res.code === 200) {
 						// 处理返回的数据
-						const data = res.data
-						// 更新任务基础信息
-						this.taskData = {
-							title: data.auditTaskInfoVO?.taskName || '任务名称',
-							tag: data.auditTaskInfoVO?.taskTypeName || '任务类型',
-							id: data.auditTaskInfoVO?.taskNo || ''
+						const data = res.data.auditFlows
+						if(type==='create'){
+						this.createApprovalInfo = data?.map(item => ({
+						name: item.auditUserName || '审批人',
+						status: item.statusName || '-',
+						statusColor: this.getAuditStatusColor(item.status),
+						time: item.auditTime || ''
+					})) || []
+						this.createStatus = res.data.audit.status
+						// 如果当前选中的是创建审批标签,更新 auditStatus
+						if (this.activeTab === 'create') {
+							this.auditStatus = this.createStatus;
 						}
-						// 更新任务信息
-						this.taskInfo = {
-							costSharing: data.auditTaskInfoVO?.costShareName || '-',
-							belongProject: data.auditTaskInfoVO?.projectName || '-',
-							belongDept: data.auditTaskInfoVO?.deptName || '-',
-							belongProduct: '-', // 接口返回数据中没有产品名称
-							applySupplementLive: '否', // 接口返回数据中没有该字段
-							supplementRoomId: '-', // 接口返回数据中没有该字段
-							supplementReason: '-', // 接口返回数据中没有该字段
+
 						}
-						// 更新内容信息
-						this.contentInfo = {
-							deliverableName: data.auditTaskInfoVO?.taskName || '-',
-							deliverableId: data.auditTaskInfoVO?.taskNo || '-',
-							liveRoomUrl: '-', // 接口返回数据中没有该字段
-							pushUrl: '-', // 接口返回数据中没有该字段
-							startUrl: '-', // 接口返回数据中没有该字段
-							liveReplay: '-', // 接口返回数据中没有该字段
-							playVideo: '-', // 接口返回数据中没有该字段
-							downloadVideo: '-', // 接口返回数据中没有该字段
-							viewerCount: '-', // 接口返回数据中没有该字段
-							validView: '-', // 接口返回数据中没有该字段
-							description: '-', // 接口返回数据中没有该字段
+						if(type==='complete'){
+						this.completeApprovalInfo = data?.map(item => ({
+						name: item.auditUserName || '审批人',
+						status: item.statusName || '-',
+						statusColor: this.getAuditStatusColor(item.status),
+						time: item.auditTime || ''
+					})) || []
+						this.completeStatus = res.data.audit.status
+						// 如果当前选中的是完成审批标签,更新 auditStatus
+						if (this.activeTab === 'complete') {
+							this.auditStatus = this.completeStatus;
 						}
-						// 更新客户信息列表
-						this.clientList = [{
-								name: data.docterVO?.doctorName || '医生姓名',
-								level: '', // 接口返回数据中没有该字段
-								hospital: data.docterVO?.institution || '-',
-								department: data.docterVO?.department || '-',
-								taskCount: data.auditTaskInfoVO?.taskCount || '0',
-								points: data.auditTaskInfoVO?.taskIntegral || '0'
-							}]
-						// 更新审批信息
-						this.approvalInfo = data.auditFlowVO?.map(item => ({
-							name: item.auditUserName || '审批人',
-							status: item.statusName || '-',
-							statusColor: this.getAuditStatusColor(item.status),
-							time: item.auditTime || ''
-						})) || []
-					} else {
+						}
+						} else {
 						uni.showToast({
 							title: '获取任务详情失败',
 							icon: 'none'
 						})
-					}
+						}
 				} catch (e) {
 					uni.hideLoading()
 					console.error('加载数据失败', e)
@@ -358,18 +546,95 @@
 				})
 			},
 			// 下载附件
-			downloadAttachment() {
-				uni.showToast({
-					title: '开始下载附件',
-					icon: 'none'
+			downloadAttachment(materialLink) {
+				if (!materialLink) {
+					uni.showToast({
+						title: '附件链接不存在',
+						icon: 'none'
+					})
+					return
+				}
+				uni.showLoading({
+					title: '下载中...'
 				})
-				// 实际项目中添加下载逻辑:uni.downloadFile + uni.saveFile
+				uni.downloadFile({
+					url: materialLink,
+					success: (res) => {
+						if (res.statusCode === 200) {
+							uni.saveFile({
+								tempFilePath: res.tempFilePath,
+								success: (saveRes) => {
+									uni.hideLoading()
+									uni.showToast({
+										title: '下载成功',
+										icon: 'success'
+									})
+								},
+								fail: (err) => {
+									uni.hideLoading()
+									uni.showToast({
+										title: '保存失败',
+										icon: 'none'
+									})
+								}
+							})
+						} else {
+							uni.hideLoading()
+							uni.showToast({
+								title: '下载失败',
+								icon: 'none'
+							})
+						}
+					},
+					fail: (err) => {
+						uni.hideLoading()
+						uni.showToast({
+							title: '下载失败',
+							icon: 'none'
+						})
+					}
+				})
+			},
+			// 格式化文件大小
+			formatFileSize(bytes) {
+				if (bytes === 0) return '0 B';
+				const k = 1024;
+				const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
+				const i = Math.floor(Math.log(bytes) / Math.log(k));
+				return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
 			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
+	.material-item {
+		margin-bottom: 20px;
+		padding: 15px;
+		background: #fff;
+		border-radius: 8px;
+		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
+	}
+	
+	.material-header {
+		margin-bottom: 15px;
+		padding-bottom: 10px;
+		border-bottom: 1px solid #f0f0f0;
+	}
+	
+	.material-title {
+		font-size: 16px;
+		font-weight: 600;
+		color: #333;
+	}
+	
+	.empty-material {
+		padding: 40px 0;
+		text-align: center;
+		color: #999;
+		font-size: 14px;
+	}
+	
 	.container {
 		min-height: 100vh;
 		background: #f5f5f5;
@@ -410,7 +675,7 @@
 
 	.content {
 		flex: 1;
-		padding: 24rpx;
+		padding: 24rpx 24rpx 120rpx;
 		box-sizing: border-box;
 	}
 
@@ -701,9 +966,154 @@
 	}
 
 	.reason {
-		font-size: 28rpx;
-		color: #666666;
-		line-height: 40rpx;
-		margin-left: 136rpx;
+			font-size: 28rpx;
+			color: #666666;
+			line-height: 40rpx;
+			margin-left: 136rpx;
+		}
+
+		/* 审批标签样式 */
+		.audit-tabs {
+			display: flex;
+			margin: 24rpx 0;
+			border-radius: 8rpx;
+			background-color: #F7F8FA;
+			overflow: hidden;
+		}
+
+		.audit-tab {
+			flex: 1;
+			text-align: center;
+			padding: 16rpx 0;
+			font-size: 28rpx;
+			color: #666666;
+			transition: all 0.3s ease;
+			cursor: pointer;
+		}
+
+		.audit-tab.active {
+			background-color: #4080FF;
+			color: #FFFFFF;
+			font-weight: 500;
+		}
+
+.bottom-bar {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		background: #fff;
+		padding: 24rpx 32rpx;
+		border-top: 1rpx solid #F2F3F5;
+		z-index: 100;
+		display: flex;
+		align-items: center;
+
+		.action-buttons {
+			display: flex;
+			flex: 1;
+			justify-content: space-between;
+
+			.btn {
+				width: 292rpx;
+				height: 88rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: 32rpx;
+				font-weight: 500;
+				border-radius: 200rpx 200rpx 200rpx 200rpx;
+				cursor: pointer;
+				display: flex;
+				align-items: center;
+
+				&.btn-cancel {
+					background: #fff;
+					border: 2rpx solid #CF3546;
+					color: #CF3546;
+				}
+
+				&.btn-submit {
+					background: #388BFF;
+					color: #fff;
+				}
+
+				.icon {
+					width: 32rpx;
+					height: 32rpx;
+					margin-right: 16rpx;
+				}
+			}
+		}
+	}// 弹窗样式
+	.reject-popup-content {
+		padding: 32rpx;
+		box-sizing: border-box;
+		overflow: hidden;
+		border-radius: 24rpx 24rpx 0 0;
+
+		.popup-header {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			margin-bottom: 32rpx;
+			position: relative;
+
+			.popup-title {
+				font-size: 32rpx;
+				font-weight: bold;
+				color: #333;
+			}
+
+			.close {
+				position: absolute;
+				right: 0;
+				width: 44rpx;
+				height: 44rpx;
+			}
+		}
+
+		.input-area {
+			margin-bottom: 40rpx;
+
+			.reason-input {
+				min-height: 120rpx;
+				padding: 20rpx;
+				background: #F7F8FA;
+				border-radius: 12rpx;
+				font-size: 28rpx;
+				color: #333;
+				width: 100%; // 新增:确保输入框宽度100%
+				box-sizing: border-box;
+			}
+		}
+
+		.btn-group {
+			display: flex;
+			gap: 24rpx;
+
+			.button {
+				width: 332rpx;
+				height: 80rpx;
+				flex: 1;
+				border-radius: 200rpx;
+				font-size: 28rpx;
+				text-align: center;
+				line-height: 80rpx;
+			}
+
+			.reject {
+				color: #388BFF;
+				background: #FFFFFF;
+				border-radius: 200rpx 200rpx 200rpx 200rpx;
+				border: 2rpx solid #388BFF;
+			}
+
+			.confirm {
+				background: #388BFF;
+				color: #FFFFFF;
+			}
+		}
 	}
+
 </style>

+ 496 - 177
pages_task/xlTask.vue

@@ -32,85 +32,154 @@
 
 		<!-- 列表内容 -->
 		<scroll-view class="content" scroll-y>
-			<view class="task-card" v-for="(item, index) in currentList" :key="index" @click="goDetails(item)">
-				<!-- 任务/审核标题+状态 -->
-				<view class="card-top">
-					<text class="card-task-title">{{ item.taskTitle }}</text>
-					<view class="status-tag" :class="item.statusClass">{{ item.statusText }}</view>
-				</view>
-
-				<view class="card-content">
-					<!-- 讲者信息 -->
-					<view class="speaker-info">
-						<text class="speaker-name">{{ item.doctorName||'未命名' }}</text>
-						<view class="level-tag" v-if="item.level">{{ item.level }}</view>
+			<!-- 任务列表 -->
+			<view v-if="currentTopTab === 'task'">
+				<view class="task-card" v-for="(item, index) in currentList" :key="index" @click="goDetails(item)">
+					<!-- 任务标题+状态 -->
+					<view class="card-top">
+						<text class="card-task-title">{{ item.taskName }}</text>
+						<view class="status-tag" :class="item.statusClass">{{ item.statusText }}</view>
 					</view>
 
-					<!-- 医院+科室 -->
-					<view class="org-info">
-						<image class="org-icon" src="@/static/image/icon_hospital.png" mode="widthFix"></image>
-						<text>{{ item.hospital ||'-' }}</text>
-						<view class="line"></view>
-						<text>{{ item.department||'-' }}</text>
-					</view>
+					<view class="card-content">
+						<!-- 讲者信息 -->
+						<view class="speaker-info">
+							<text class="speaker-name">{{ item.doctorName||'未命名' }}</text>
+							<view class="level-tag" v-if="item.level">{{ item.level }}</view>
+						</view>
 
-					<!-- 标签组 -->
-					<view class="card-tags">
-						<view class="tag-left-group">
-							<view class="tag-item video-tag" v-if="item.videoType">
-								<image class="video-tag-icon" src="@/static/image/icon_longvideo.png" mode="widthFix">
-								</image>
-								<text>{{ item.videoType ||'-'}}</text>
+						<!-- 医院+科室 -->
+						<view class="org-info">
+							<image class="org-icon" src="@/static/image/icon_hospital.png" mode="widthFix"></image>
+							<text>{{ item.deptName ||'-' }}</text>
+							<view class="line"></view>
+							<text>{{ item.deptName||'-' }}</text>
+						</view>
+
+						<!-- 标签组 -->
+						<view class="card-tags">
+							<view class="tag-left-group">
+								<view class="tag-item video-tag" v-if="item.taskTypeName">
+									<image class="video-tag-icon" src="@/static/image/icon_longvideo.png" mode="widthFix">
+									</image>
+									<text>{{ item.taskTypeName ||'-'}}</text>
+								</view>
+								<view class="tag-item category-tag" v-if="item.taskTypeName">
+									{{ item.taskTypeName }}
+								</view>
 							</view>
-							<view class="tag-item category-tag" v-if="item.category">
-								{{ item.category }}
+
+							<view class="tag-right-group">
+								<view class="tag-item points-tag">{{ item.taskIntegral||'0' }}积分</view>
+								<view class="tag-item count-tag">{{ item.taskCount ||'0' }}个</view>
+								<view class="tag-item count-tag">院内</view>
 							</view>
 						</view>
 
-						<view class="tag-right-group">
-							<view class="tag-item points-tag">{{ item.points||'0' }}积分</view>
-							<view class="tag-item count-tag">{{ item.count ||'0' }}个</view>
-							<view class="tag-item count-tag">院内</view>
+						<!-- 时间信息 -->
+						<view class="time-info">
+							<view class="time-item">
+								<text>申请时间:</text>
+								<text>{{ item.createTime ||'-'}}</text>
+							</view>
+							<view class="time-item">
+								<text>完成时间:</text>
+								<text>{{ item.updateTime || '-' }}</text>
+							</view>
+							<view class="time-item">
+								<text>完成审核:</text>
+								<text>{{ item.auditStatus || '-' }}</text>
+							</view>
 						</view>
-					</view>
 
-					<!-- 时间信息 -->
-					<view class="time-info">
-						<view class="time-item">
-							<text>申请时间:</text>
-							<text>{{ item.applyTime ||'-'}}</text>
+						<!-- 操作按钮 -->
+						<view class="operate-btn-group">
+							<view class="share-btn" @click="handleShare(item)">
+								<image class="share-icon" src="/static/image/icon_share.png" mode="widthFix"></image>
+								<text>分享</text>
+							</view>
+							<view class="btn-group">
+								<view class="btn" v-if="item.showDelete" @click.stop="handleTaskDelete(item, index)">删除</view>
+							<!-- @click.stop="handleCopy(item)" -->
+						<view class="btn" @click.stop="copyTask(item.id)" >复制创建</view>
+							</view>
 						</view>
-						<view class="time-item" v-if="currentTopTab === 'task'">
-							<text>完成时间:</text>
-							<text>{{ item.updateTime || '-' }}</text>
+
+						<!-- 状态印章 -->
+						<image class="status-seal" :src="item.sealImg" mode="widthFix">
+						</image>
+					</view>
+				</view>
+			</view>
+			<!-- 审核列表 -->
+			<view v-else>
+				<view class="task-card" v-for="(item, index) in currentList" :key="index" @click="goDetails(item)">
+					<!-- 任务标题+状态 -->
+					<view class="card-top">
+						<text class="card-task-title">{{ item.auditName || '未设置' }}</text>
+						<view class="status-tag" :class="item.statusClass">{{ item.statusText }}</view>
+					</view>
+
+					<view class="card-content">
+						<!-- 讲者信息 -->
+						<view class="speaker-info">
+							<text class="speaker-name">{{ item.businessData.taskInfo.doctorVO.doctorName||'未命名' }}</text>
+							<view class="level-tag" v-if="item.businessData.taskInfo.doctorVO.jobTitle">{{ item.businessData.taskInfo.doctorVO.jobTitle }}</view>
 						</view>
-						<view class="time-item" v-if="currentTopTab === 'task'">
-							<text>完成审核:</text>
-							<text>{{ item.auditStatus || '-' }}</text>
+
+						<!-- 医院+科室 -->
+						<view class="org-info">
+							<image class="org-icon" src="@/static/image/icon_hospital.png" mode="widthFix"></image>
+							<text>{{ item.businessData.taskInfo.doctorVO.institution ||'-' }}</text>
+							<view class="line"></view>
+							<text>{{ item.businessData.taskInfo.doctorVO.department||'-' }}</text>
 						</view>
-					</view>
 
-					<!-- 操作按钮 -->
-					<view class="operate-btn-group" v-if="currentTopTab === 'task'">
-						<view class="share-btn" @click="handleShare(item)">
-							<image class="share-icon" src="/static/image/icon_share.png" mode="widthFix"></image>
-							<text>分享</text>
+						<!-- 标签组 -->
+						<view class="card-tags">
+							<view class="tag-left-group">
+								<view class="tag-item video-tag" v-if="item.businessData.taskInfo.taskTypeName">
+									<image class="video-tag-icon" src="@/static/image/icon_longvideo.png" mode="widthFix">
+									</image>
+									<text>{{ item.businessData.taskInfo.taskTypeName ||'-'}}</text>
+								</view>
+								<view class="tag-item category-tag" v-if="item.businessData.taskInfo.taskTypeName">
+									{{ item.businessData.taskInfo.taskTypeName }}
+								</view>
+
+							</view>
+
+							<view class="tag-right-group">
+								<view class="tag-item points-tag">{{ item.businessData.taskInfo.doctorVO.taskIntegral||'0' }}积分</view>
+								<view class="tag-item count-tag">{{ item.businessData.taskInfo.doctorVO.taskCount ||'0' }}个</view>
+								<view class="tag-item count-tag">院内</view>
+							</view>
 						</view>
-						<view class="btn-group">
-							<view class="btn" v-if="item.showDelete" @click.stop="handleTaskDelete(item, index)">删除</view>
-							<view class="btn" @click.stop="handleCopy(item)">复制创建</view>
+
+						<!-- 时间信息 -->
+						<view class="time-info">
+							<view class="time-item">
+								<text>申请时间:</text>
+								<text>{{  item.businessData.taskInfo.createTime ||'-'}}</text>
+							</view>
 						</view>
-					</view>
-					<view class="operate-btn-group flex-end" v-else>
-						<view class="btn-group">
-							<view class="btn" v-if="item.showDelete" @click.stop="handleAuditDelete(item, index)">删除</view>
-							<view class="btn" v-if="item.showEdit" @click.stop="handleEdit(item)">编辑</view>
+
+						<!-- 操作按钮 -->
+						<view class="operate-btn-group">
+							<view class="share-btn" @click="handleShare(item)">
+								<image class="share-icon" src="@/static/image/icon_user.png" mode="widthFix"></image>
+								<text>{{ item.initiatorName || '未命名' }}</text>
+							</view>
+							<view class="btn-group">
+								<view class="btn"  @click.stop="handleTaskDelete(item, index)">删除</view>
+								<view class="btn"  @click.stop="handleCopy(item)">编辑</view>
+							</view>
 						</view>
-					</view>
 
-					<!-- 状态印章 -->
-					<image class="status-seal" :src="item.sealImg" mode="widthFix" v-if="currentTopTab === 'task'">
-					</image>
+						<!-- 状态印章 -->
+						<image class="status-seal" :src="item.sealImg" mode="widthFix">
+						</image>
+					</view>
 				</view>
 			</view>
 		</scroll-view>
@@ -166,10 +235,10 @@
 					<view class="filter-section">
 						<view class="section-label">任务归属</view>
 						<view class="btn-group">
-							<view class="filter-btn" :class="{ active: filters.taskBelong === 'my' }"
-								@click="filters.taskBelong = 'my'">我的任务</view>
-							<view class="filter-btn" :class="{ active: filters.taskBelong === 'dept' }"
-								@click="filters.taskBelong = 'dept'">部门任务</view>
+							<view class="filter-btn" :class="{ active: filters.taskBelong === '' }"
+								@click="filters.taskBelong = ''">我的任务</view>
+							<!-- <view class="filter-btn" :class="{ active: filters.taskBelong === 'dept' }"
+								@click="filters.taskBelong = 'dept'">部门任务</view> -->
 						</view>
 					</view>
 
@@ -188,10 +257,9 @@
 					<view class="filter-section">
 						<view class="section-label">归属类型</view>
 						<view class="btn-group">
-							<view class="filter-btn" :class="{ active: filters.belongType === 'inner' }"
-								@click="filters.belongType = 'inner'">院内</view>
-							<view class="filter-btn" :class="{ active: filters.belongType === 'outer' }"
-								@click="filters.belongType = 'outer'">院外</view>
+							<view v-for="item in taskBelong" :key="item.dictValue"
+								class="filter-btn" :class="{ active: filters.belongType === item.dictValue }"
+								@click="filters.belongType = item.dictValue">{{ item.dictLabel }}</view>
 						</view>
 					</view>
 				</view>
@@ -215,75 +283,96 @@
 </template>
 <script>
 import { dicts } from '@/api/common.js';
-import { utils} from '@/utils/common.js';
-
-	import { list,  deleted, company } from '@/api/task.js';
+import utils from '@/utils/common.js'
+// auditList
+import { list,  deleted, company ,auditList,copy} from '@/api/task.js';
+import { getPendingAuditList } from '@/api/audit.js';
 	export default {
 		data() {
-			return {
-				showFilter: false,
-				showDatePicker: false,
-				currentDateField: '',
-				datePickerValue: new Date().getTime(),
-				filters: {
-					applyTimeStart: '',
-					applyTimeEnd: '',
-					finishTimeStart: '',
-					finishTimeEnd: '',
-					auditTimeStart: '',
-					auditTimeEnd: '',
-					taskBelong: 'my',
-					finishStatus: '',
-					belongType: ''
-				},
-				currentTopTab: 'task',
-				currentSubTab: '',
-				taskSubTabs: [
-						{ label: '全部任务', value: '' }
-				],
-				auditSubTabs: [{
-						label: '全部',
-						value: 'all'
+				return {
+					showFilter: false,
+					showDatePicker: false,
+					currentDateField: '',
+					datePickerValue: new Date().getTime(),
+					processTemplate: null,
+					companySettingsLoaded: false,
+					isLoading: false,
+					filters: {
+						applyTimeStart: '',
+						applyTimeEnd: '',
+						finishTimeStart: '',
+						finishTimeEnd: '',
+						auditTimeStart: '',
+						auditTimeEnd: '',
+						taskBelong: '',
+						finishStatus: '',
+						belongType: ''
 					},
-					{
-						label: '创建待审批',
-						value: 'createPending'
-					},
-					{
-						label: '完成待审批',
-						value: 'finishPending'
+					currentTopTab: 'task',
+					currentSubTab: '',
+					taskSubTabs: [
+							{ label: '全部任务', value: '' }
+						],
+
+					auditSubTabs: [{
+							label: '全部',
+							value: ''
+						}
+						
+					],
+					taskList: [],
+					auditList: [],
+					userInfo: {
+						companyId: ''
+					},taskStatus:{
+
 					},
-					{
-						label: '驳回',
-						value: 'rejected'
-					}
-				],
-				taskList: [],
-				auditList: [{
-					
-				}],
-				userInfo: {
-					companyId: ''
-				},taskStatus:{
-
-				},
-				taskBelong: []
+					taskBelong: [],
+				taskType: [],
+				taskAuditStatus: [],
+				auditStatus: []
 			}
 		},
 		onLoad: async function(options) {
+			// 先获取用户信息
+			this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
+			
 			try {
-				this.taskBelong = await utils.getDicts("task_belong_type");//任务归属
-				console.log('任务归属字典:',this.taskBelong)
-
+				// 并行获取所有字典数据,提高性能
+				const [taskBelongRes, taskTypeRes, processTemplateRes, taskAuditStatusRes] = await Promise.all([
+					utils.getDicts("task_belong_type"),//任务归属
+					utils.getDicts("task_type"),//任务类型
+					utils.getDicts("FLOW_TEMPLATE"),//流程模板
+					utils.getDicts("task_audit_status")//任务审核状态
+				]);
+				
+				this.taskBelong = taskBelongRes;
+				this.taskType = taskTypeRes;
+				this.processTemplate = processTemplateRes;
+				this.taskAuditStatus = taskAuditStatusRes;
+				
+				console.log("task_audit_status", this.taskAuditStatus);
+				
+				// 构建审核子标签
+				this.auditSubTabs = [{
+					label: '全部',
+					value: ''
+				}];
+				
+				this.taskAuditStatus.forEach(item => {
+					this.auditSubTabs.push({
+						label: item.dictLabel,
+						value: item.dictValue
+					});
+				});
 				
+				console.log('任务归属字典:', this.taskBelong);
 			} catch (e) {
-				console.log('获取字典数据失败:', e)
+				console.log('获取字典数据失败:', e);
 			}
-
-
-		this.dicts();
-			// 获取用户信息
-			this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}')
+			
+			// 获取任务状态字典
+			this.dicts();
 		},
 		
 		computed: {
@@ -298,6 +387,101 @@ import { utils} from '@/utils/common.js';
 			this.loadData();
 		},
 		methods: {
+			//复制任务
+			copyTask(id){
+				console.log("复制",id);
+				copy(id).then(res => {
+					if (res.code === 200) {
+						uni.showToast({
+							title: '复制成功',
+							icon: 'success'
+						});
+						this.loadData();
+					} else {
+						uni.showToast({
+							title: res.msg || '复制失败',
+							icon: 'none'
+						});}})},
+
+			//审批列表
+			getAuditList() {
+				// 构建请求参数
+				const params = {
+					userId: this.userInfo.userId,
+				    taskStatus: this.currentSubTab || '',
+					status:'',
+				    companyId:this.userInfo.companyId,
+					templateCode: this.templateCode||'',
+					pageNum:1,
+					pageSize:10,
+					// 任务申请时间
+					applyStartTime: this.filters.applyTimeStart || '',
+					applyEndTime: this.filters.applyTimeEnd || '',
+					// 任务完成时间
+					taskFinishTimeStart: this.filters.finishTimeStart || '',
+					taskFinishTimeEnd: this.filters.finishTimeEnd || '',
+					// 任务完成审核时间
+					finishAuditTimeStart: this.filters.auditTimeStart || '',
+					finishAuditTimeEnd: this.filters.auditTimeEnd || '',
+					// 完结状态
+					finishStatus: this.filters.finishStatus === 'unfinished' ? 0 : this.filters.finishStatus === 'finished' ? 1 : ''
+				};
+				
+				// 避免重复请求
+				if (this.isLoading) return;
+				
+				this.isLoading = true;
+				uni.showLoading({
+					title: '加载中...'
+				});
+				
+				getPendingAuditList(params).then(res => {
+					this.isLoading = false;
+					uni.hideLoading();
+					if (res.code === 200 && res.rows) {
+						// 处理审核列表数据
+						this.auditList = res.rows.map(item => {
+							// 从businessData.taskInfo中获取任务信息
+							const taskInfo = item.businessData?.taskInfo || {};
+							return {
+								id: item.id,
+								auditName: item.auditName,
+								initiatorName: taskInfo.doctorName || item.initiatorName || '未知',
+								createTime: item.createTime,
+								statusText: this.getAuditStatusText(item.status),
+								statusClass: this.getAuditStatusClass(item.status),
+								doctorName: taskInfo.doctorName || item.initiatorName || '未知',
+								initiatorId: item.initiatorId || '',
+								sealImg: item.status === 1 ? '/static/image/img_finish.png' : '/static/image/img_unfinish.png',
+								businessData: item.businessData || {},
+								// 从taskInfo中获取其他需要的字段
+								taskTitle: taskInfo.taskName || item.auditName,
+								hospital: taskInfo.deptName || '-',
+								department: taskInfo.deptName || '-',
+								videoType: taskInfo.taskTypeName || '-',
+								category: taskInfo.taskTypeName || '-',
+								points: taskInfo.taskIntegral || 0,
+								count: taskInfo.taskCount || 0,
+								applyTime: item.createTime
+							};
+						});
+						console.log("审核列表数据",this.auditList);
+
+
+					} else {
+						uni.showToast({
+							title: '获取数据失败',
+							icon: 'none'
+						});
+					}
+				}).catch(err => {
+					uni.hideLoading();
+					uni.showToast({
+						title: '网络错误',
+						icon: 'none'
+					});
+				});
+			},
 			dicts() {
 				dicts('task_status').then(res => {
 					if (res.code === 200 ) {
@@ -317,11 +501,19 @@ import { utils} from '@/utils/common.js';
 				});
 			},
 			loadData() {
-				// 加载任务列表数据
-				this.getTaskList();
-				// 加载公司项目设置
-				this.getCompanySettings();
+				// 根据当前标签加载对应数据
+				if (this.currentTopTab === 'task') {
+					this.getTaskList();
+				} else if (this.currentTopTab === 'audit') {
+					this.getAuditList();
+				}
+				// 只在首次加载时获取公司项目设置
+				if (!this.companySettingsLoaded) {
+					this.getCompanySettings();
+					this.companySettingsLoaded = true;
+				}
 			},
+			//任务列表
 			getTaskList() {
 				// 构建请求参数
 				const params = {
@@ -330,54 +522,38 @@ import { utils} from '@/utils/common.js';
 					taskStatus: this.currentSubTab
 				};
 				
+				// 避免重复请求
+				if (this.isLoading) return;
+				
+				this.isLoading = true;
 				uni.showLoading({
 					title: '加载中...'
 				});
 				
 				list(params).then(res => {
+					this.isLoading = false;
 					uni.hideLoading();
 					if (res.code === 200 && res.rows) {
 						// 处理任务列表数据
-						if (this.currentTopTab === 'task') {
-							this.taskList = res.rows.map(item => ({
-								id: item.id,
-								doctorName: item.doctorName,
-								taskTitle: item.taskName,
-								statusText: this.getStatusText(item.taskStatus),
-								statusClass: this.getStatusClass(item.taskStatus),
-								speaker: item.doctorName,
-								level: '', // 接口返回数据中没有level字段
-								hospital: item.deptName, // 使用deptName作为hospital
-								department: item.deptName, // 使用deptName作为department
-								videoType: item.taskTypeName, // 使用taskTypeName作为videoType
-								category: item.taskTypeName, // 使用taskTypeName作为category
-								points: item.taskIntegral,
-								count: item.taskCount,
-								applyTime: item.createTime,
-								finishTime: item.finishAuditTime || '-',
-								auditStatus: this.getAuditStatusText(item.finishAuditStatus),
-								showDelete: true,
-								sealImg: item.taskStatus === 1 ? '/static/image/img_finish.png' : '/static/image/img_unfinish.png'
-							}));
-						} else {
-							this.auditList = res.rows.map(item => ({
-								id: item.id,
-								taskTitle: item.taskName,
-								statusText: this.getAuditStatusText(item.createAuditStatus),
-								statusClass: this.getAuditStatusClass(item.createAuditStatus),
-								speaker: item.doctorName,
-								level: '', // 接口返回数据中没有level字段
-								hospital: item.deptName, // 使用deptName作为hospital
-								department: item.deptName, // 使用deptName作为department
-								videoType: item.taskTypeName, // 使用taskTypeName作为videoType
-								category: item.taskTypeName, // 使用taskTypeName作为category
-								points: item.taskIntegral,
-								count: item.taskCount,
-								applyTime: item.createTime,
-								showDelete: true,
-								showEdit: item.createAuditStatus === 2 || item.finishAuditStatus === 2 // 2表示驳回
-							}));
-						}
+						this.taskList = res.rows.map(item => ({
+							id: item.id,
+							doctorName: item.doctorName,
+							taskName: item.taskName,
+							statusText: this.getStatusText(item.taskStatus),
+							statusClass: this.getStatusClass(item.taskStatus),
+							level: '', // 接口返回数据中没有level字段
+							deptName: item.deptName, // 使用deptName作为deptName
+							taskTypeName: item.taskTypeName, 
+							taskIntegral: item.taskIntegral,
+							taskCount: item.taskCount,
+							createTime: item.createTime,
+							finishAuditTime: item.finishAuditTime || '-',
+							auditStatus: this.getAuditStatusText(item.finishAuditStatus),
+							showDelete: true,
+							sealImg: item.taskStatus === 1 ? '/static/image/img_finish.png' : '/static/image/img_unfinish.png',
+							finishAuditInstanceId: item.finishAuditInstanceId || '-',
+							createAuditInstanceId: item.createAuditInstanceId || '-',
+						}));
 					} else {
 						uni.showToast({
 							title: '获取数据失败',
@@ -385,6 +561,7 @@ import { utils} from '@/utils/common.js';
 						});
 					}
 				}).catch(err => {
+					this.isLoading = false;
 					uni.hideLoading();
 					uni.showToast({
 						title: '网络错误',
@@ -439,6 +616,23 @@ import { utils} from '@/utils/common.js';
 				};
 				return statusMap[status] || 'status-wait';
 			},
+			getBusinessTypeLabel(businessType) {
+				// 根据业务类型获取标签文本
+				if (!businessType || !this.processTemplate) {
+					return '未设置';
+				}
+				const dictItem = this.processTemplate.find(item => item.dictValue === businessType);
+				return dictItem ? dictItem.dictLabel : businessType;
+			},
+			formatTime(time) {
+				// 格式化时间
+				if (!time) return '-';
+				const date = new Date(time);
+				const year = date.getFullYear();
+				const month = String(date.getMonth() + 1).padStart(2, '0');
+				const day = String(date.getDate()).padStart(2, '0');
+				return `${year}-${month}-${day}`;
+			},
 			goCreate(){
 				console.log('创建任务');
 				uni.navigateTo({
@@ -454,18 +648,34 @@ import { utils} from '@/utils/common.js';
 			goDetails(item) {
 				console.log("跳转到任务详情页",item);
 				// 直接跳转到任务详情页,传递id作为taskId参数
+				let id = ''
+				if(this.currentTopTab === 'task'){
+					id = item.id
+				}else if(this.currentTopTab === 'audit'){
+					id = item.businessData.taskInfo.id
+				}
 				uni.navigateTo({
-					url: `/pages_task/taskDetail?taskId=${item.id}`
+					url: `/pages_task/taskDetail?taskId=${item.createAuditInstanceId||item.businessData.taskInfo.createAuditInstanceId||''}&taskId2=${item.finishAuditInstanceId||item.businessData.taskInfo.finishAuditInstanceId||''}&id=${id||''}`
 				});
 			},
 			selectSubTab(value) {
 				this.currentSubTab = value;
-				this.loadData();
+				// 根据当前的 topTab 类型调用对应的方法
+				if (this.currentTopTab === 'task') {
+					this.getTaskList();
+				} else if (this.currentTopTab === 'audit') {
+					this.getAuditList();
+				}
 			},
 			switchTopTab(type) {
 				this.currentTopTab = type;
 				this.currentSubTab = '';
-				this.loadData();
+				// 根据标签类型调用相应的加载方法
+				if (type === 'task') {
+					this.getTaskList();
+				} else if (type === 'audit') {
+					this.getAuditList();
+				}
 			},
 			closeFilter() {
 				this.showFilter = false
@@ -478,7 +688,7 @@ import { utils} from '@/utils/common.js';
 					finishTimeEnd: '',
 					auditTimeStart: '',
 					auditTimeEnd: '',
-					taskBelong: 'my',
+					taskBelong: '',
 					finishStatus: '',
 					belongType: ''
 				}
@@ -543,6 +753,7 @@ import { utils} from '@/utils/common.js';
 										icon: 'success',
 										duration: 1500
 									});
+									this.loadData();
 								} else {
 									uni.showToast({
 										title: '删除失败',
@@ -561,8 +772,10 @@ import { utils} from '@/utils/common.js';
 				});
 			},
 			handleCopy(item) {
+				console.log('去编辑', item);
+
 				uni.navigateTo({
-					url: `/pages_task/createTask?id=${item.id}&copy=true`
+					url: `/pages_task/fillTask?id=${item.id}&doctorId=${item.initiatorId}&copy=true`
 				})
 			},
 			handleAuditDelete(item, index) {
@@ -941,6 +1154,111 @@ import { utils} from '@/utils/common.js';
 					}
 				}
 			}
+
+			.audit-card {
+				background: #f9f9f9;
+				border-radius: 24rpx;
+				margin-bottom: 20rpx;
+				border: 2rpx solid #E9F2FF;
+				position: relative;
+				padding-bottom: 24rpx;
+				.card-top {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					background: linear-gradient(90deg, #E8F1FF 0%, #FFFFFF 100%);
+					border-radius: 24rpx 24rpx 0 0;
+					padding: 26rpx 24rpx;
+					margin-bottom: 16rpx;
+
+					.card-task-title {
+						font-size: 32rpx;
+						font-weight: 600;
+						color: #333;
+					}
+
+					.status-tag {
+						padding: 8rpx 16rpx;
+						border-radius: 20rpx;
+						font-size: 24rpx;
+
+						&.status-wait {
+							background: #E3F2FD;
+							color: #2196F3;
+						}
+
+						&.status-finish {
+							background: #E6FAEF;
+							color: #07C160;
+						}
+
+						&.status-rejected {
+							background: #FFF4F5;
+							color: #CF3546;
+						}
+
+						&.status-createPending {
+							background: #FFF8E6;
+							color: #FF9500;
+						}
+					}
+				}
+
+				.card-content {
+					padding: 0 24rpx;
+
+					.time-info {
+						margin-bottom: 16rpx;
+
+						.time-item {
+							margin-bottom: 8rpx;
+							display: flex;
+							align-items: flex-start;
+
+							text {
+								font-size: 24rpx;
+								color: #999;
+
+								&.title {
+									color: #666;
+									margin-right: 8rpx;
+									white-space: nowrap;
+								}
+								&:not(.title) {
+									flex: 1;
+									word-break: break-word;
+									overflow-wrap: break-word;
+								}
+							}
+						}
+					}
+
+					.operate-btn-group {
+						display: flex;
+						justify-content: space-between;
+						align-items: center;
+						margin-top: 16rpx;
+
+						.share-btn {
+							display: flex;
+							align-items: center;
+							font-size: 24rpx;
+							color: #999;
+
+							.share-icon {
+								width: 36rpx;
+								height: 36rpx;
+								margin-right: 8rpx;
+							}
+						}
+
+						.date {
+							font-size: 24rpx;
+							color: #999;
+						}
+					}
+				}
+			}
 		}
 
 		.side {
@@ -1026,6 +1344,7 @@ import { utils} from '@/utils/common.js';
 
 							.time-input {
 								flex: 1;
+								line-height: 72rpx;
 								height: 72rpx;
 								text-align: center;
 								background: #F7F8FA;

+ 496 - 79
pages_user/userInfo.vue

@@ -7,23 +7,24 @@
 					<text class="summary-title">基础信息</text>
 				</view>
 				<view class="list">
-					<view class="info-item" @click="toChangePassword">
+					<view class="info-item">
 						<view class="label">头像</view>
 						<view class="right">
-							<image class="img" src="/static/image/my_heads_icon.png" mode=""></image>
-							<image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
+							<image class="head" :src="userInfo.avatar?userInfo.avatar:'/static/image/my_heads_icon.png'" ></image>
+							<button class="wx-head" type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
+							</button>
 						</view>
 					</view>
-					<view class="info-item" @click="toChangePassword">
+					<view class="info-item">
 						<view class="label">姓名</view>
 						<view class="right">
-							<text class="txt">王小明</text>
+							<input type="nickname" @blur="bindblur" @input="bindinput" v-model="userInfo.userName" placeholder="请输入昵称" class="input"/>
 						</view>
 					</view>
-					<view class="info-item" @click="toChangePassword">
+					<view class="info-item" @click="toSelectGender">
 						<view class="label">性别</view>
-						<view class="right">
-							<text class="txt">男</text>
+						<view class="right" v-if="userInfo!=null">
+							<text class="txt">{{userInfo.sex==1?'':'女'}}</text>
 							<image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
 						</view>
 					</view>
@@ -34,31 +35,31 @@
 					<text class="summary-title">岗位信息</text>
 				</view>
 				<view class="list">
-					<view class="info-item" @click="toChangePassword">
+					<view class="info-item" @click="toSelectDept">
 						<view class="label">部门</view>
 						<view class="right">
-							<text class="txt ash">请选择部门</text>
+							<text class="txt" :class="{ash:!formData.deptName}">{{formData.deptName||'请选择部门'}}</text>
 							<image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
 						</view>
 					</view>
-					<view class="info-item" @click="toChangePassword">
+					<view class="info-item" @click="toSelectPost">
 						<view class="label">岗位</view>
 						<view class="right">
-							<text class="txt ">办公室主任</text>
+							<text class="txt" :class="{ash:!formData.postName}">{{formData.postName||'请选择岗位'}}</text>
 							<image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
 						</view>
 					</view>
-					<view class="info-item" @click="toChangePassword">
+					<view class="info-item" @click="toSelectProduct">
 						<view class="label">产品</view>
 						<view class="right">
-							<text class="txt ">301、201</text>
+							<text class="txt" :class="{ash:!formData.productName}">{{formData.productName||'请选择产品'}}</text>
 							<image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
 						</view>
 					</view>
-					<view class="info-item" @click="toChangePassword">
+					<view class="info-item" @click="toSelectSuperior">
 						<view class="label">直属上级</view>
 						<view class="right">
-							<text class="txt ash">请选择</text>
+							<text class="txt" :class="{ash:!formData.superiorName}">{{formData.superiorName||'请选择'}}</text>
 							<image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
 						</view>
 					</view>
@@ -68,71 +69,424 @@
 							<text>证明材料</text>
 							<text class="tip">工作证、OA信息截图、个人名片等</text>
 						</view>
-						<view class="upload-cover" @click="chooseCoverImage">
-							<image v-if="formData.coverImage" :src="formData.coverImage" mode="aspectFill"></image>
-							<image v-if="formData.coverImage" class="del" @click="del"  src="/static/image/icon_img_delete.png"
-								mode="aspectFill"></image>
+						<view class="upload-proof" @click="chooseProofImages">
+							<view v-if="formData.proofImages && formData.proofImages.length > 0" class="uploaded-images">
+								<view v-for="(image, index) in formData.proofImages" :key="index"
+									class="uploaded-image-item">
+									<image :src="image" mode="aspectFill"></image>
+									<view class="image-delete" @click.stop="deleteProofImage(index)">×</view>
+								</view>
+								<view class="upload-placeholder">
+									<image src="/static/image/icon_camera.png" mode="aspectFill"></image>
+								</view>
+							</view>
 							<view v-else class="upload-placeholder">
-								<image class="icon" src="/static/image/icon_camera.png" mode="aspectFill"></image>
+								<image src="/static/image/icon_camera.png" mode="aspectFill"></image>
 							</view>
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
-
+		<view class="btn-box">
+			<view class="sub-btn" @click="submit()">保存</view>
+		</view>
+		
+		<u-picker :show="showPicker" :columns="[pickerList]" keyName="title" @confirm="onPickerConfirm" @cancel="showPicker=false"></u-picker>
 	</view>
+
 </template>
 
 <script>
+import {
+	getUserInfo,//查询用户信息
+	updateUserInfo,//更新业务员个人信息
+	getDeptList,//获取当前公司部门列表
+	getPostList,//获取当前公司岗位列表
+	getProductList,//获取当前公司所有产品列表
+	getCompanyUserList//获取当前公司所有业务员列表(前端需要排除当前用户)
+} from '@/api/user'
+import utils from '@/utils/common.js'
 	export default {
 		data() {
 			return {
+				user: null,
 				formData: {
-					coverImage: '/static/image/icon_camera.png',
+					proofImages: [],
+					avatar: '',
+					nickname: '',
+					sex: '',
+					deptId: '',
+					deptName: '',
+					postId: '',
+					postName: '',
+					postIds: '',
+					productId: '',
+					productName: '',
+					productCode: '',
+					superiorId: '',
+					superiorName: '',
+					certificationMaterials: ''
 				},
-
+				userInfo:{},
+				showPicker: false,
+				pickerList: [],
+				pickerType: '',
+				deptList: [],
+				postList: [],
+				productList: [],
+				userList: []
 			}
-		},
-		computed: {
-
-		},
-		watch: {
-
 		},
 		onLoad() {
-
 		},
-		onReachBottom() {},
+		onShow() {
+			this.getUserInfo();
+			this.getDeptList();
+			this.getPostList();
+			this.getProductList();
+			this.getCompanyUserList();
+		},
 		methods: {
-			chooseCoverImage() {
-				uni.chooseImage({
-					count: 1,
-					sizeType: ['compressed'],
-					sourceType: ['album', 'camera'],
-					success: async (res) => {
-						try {
-							uni.showLoading({
-								title: '上传中...'
-							})
-							const uploadRes = await uploadFile({
-								file: res.tempFilePaths[0],
-								type: 'cover'
-							})
-							uni.hideLoading()
-							if (uploadRes.code === 200 && uploadRes.data) {
-								this.formData.coverImage = uploadRes.data.url
+			getDeptList(){
+				getDeptList().then(
+					res => {
+						if(res.code==200){
+							if(res.data!=null && res.data.length>0){
+								this.deptList = res.data.map(item => ({
+									id: item.deptId,
+									title: item.deptName
+								}));
+								console.log("获取当前公司部门列表this.deptList",this.deptList);
 							}
-						} catch (e) {
-							uni.hideLoading()
+						}else{
 							uni.showToast({
-								icon: 'none',
-								title: '上传失败'
-							})
+								icon:'none',
+								title: res.msg,
+							});
 						}
+					},
+					rej => {}
+				);
+			},
+			getPostList(){
+				getPostList().then(
+					res => {
+						if(res.code==200){
+							if(res.data!=null && res.data.length>0){
+								this.postList = res.data.map(item => ({
+									id: item.postId,
+									title: item.postName
+								}));
+								console.log("获取当前公司岗位列表this.postList",this.postList);
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getProductList(){
+				getProductList().then(
+					res => {
+						if(res.code==200){
+							if(res.data!=null && res.data.length>0){
+								this.productList = res.data.map(item => ({
+									id: item.id,
+									title: item.productName
+								}));
+								console.log("获取当前公司所有产品列表this.productList",this.productList);
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getCompanyUserList(){
+				getCompanyUserList().then(
+					res => {
+						if(res.code==200){
+							if(res.data!=null && res.data.length>0){
+								this.userList = res.data.map(item => ({
+									id: item.userId,
+									title: item.nickName
+								}));
+								console.log("获取当前公司所有业务员列表(前端需要排除当前用户)this.userList",this.userList);
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			bindblur(e) {
+				if (this.user) {
+					this.user.nickname = e.detail.value;
+				}
+			},
+			bindinput(e){
+					if (this.user) {
+						this.user.userName = e.detail.value;
+						this.formData.nickname = e.detail.value;
+					}
+				},
+			onChooseAvatar(e){
+					let {
+						avatarUrl
+					} = e.detail;
+					if (!this.user) {
+						uni.showToast({
+							icon: 'none',
+							title: '请先获取用户信息'
+						});
+						return;
+					}
+					uni.uploadFile({
+						url: uni.getStorageSync('requestPath')+'/app/common/uploadOSS',
+						filePath: avatarUrl,
+						name: 'file',
+						formData: {
+							'user': 'test'
+						},
+						success: (uploadFileRes) => {
+							const avatarUrl = JSON.parse(uploadFileRes.data).url;
+							this.user.avatar = avatarUrl;
+							this.formData.avatar = avatarUrl;
+						}
+					});
+				},
+			submit(){
+				if (!this.user) {
+					uni.showToast({
+						icon: 'none',
+						title: '请先获取用户信息'
+					});
+					return;
+				}
+				this.user.proofImages = this.formData.proofImages;
+				console.log("修改数据",this.user.proofImages);
+				console.log("修改数据2",this.user);
+				const params = {
+					avatar: this.formData.avatar,
+					nicknName: this.formData.nickname,
+					sex: this.formData.sex,
+					deptId: this.formData.deptId,
+					postIds: this.formData.postIds,
+					productCode: this.formData.productCode,
+					superiorId: this.formData.superiorId,
+					certificationMaterials: this.formData.certificationMaterials||[]
+				}
+
+				updateUserInfo(params).then(
+					res => {
+						if(res.code==200){
+							uni.showToast({
+								icon:'success',
+								title: "修改成功",
+							});
+							setTimeout(function(){
+								uni.navigateBack({
+									delta:1,
+								})
+							},2000);
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getUserInfo(){
+				getUserInfo().then(
+					res => {
+						if(res.code==200){
+							if(res.user!=null){
+								this.user = res.user;
+								this.userInfo=res.user;
+								uni.setStorageSync('userInfo', this.userInfo);
+								this.formData.avatar = this.user.avatar || '';
+								this.formData.nickname = this.user.userName || '';
+								this.formData.sex = this.user.sex || '';
+								this.formData.deptId = this.user.deptId || '';
+								this.formData.deptName = this.user.deptName || '';
+								this.formData.postId = this.user.postId || '';
+								this.formData.postName = this.user.postName || '';
+								this.formData.postIds = this.user.postId || '';
+								this.formData.productId = this.user.productId || '';
+								this.formData.productName = this.user.productName || '';
+								this.formData.productCode = this.user.productCode || '';
+								this.formData.superiorId = this.user.superiorId || '';
+								this.formData.superiorName = this.user.superiorName || '';
+								this.formData.certificationMaterials = Array.isArray(this.user.proofImages) ? this.user.proofImages.join(',') : '';
+								this.formData.proofImages = this.user.proofImages || [];
+							}
+
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			chooseProofImages() {
+				uni.chooseImage({
+					count: 9,
+					sizeType: ['compressed'],
+					sourceType: ['album', 'camera'],
+					success: (res) => {
+						this.uploadImages(res.tempFilePaths)
 					}
 				})
 			},
+			async uploadImages(tempFilePaths) {
+				try {
+					uni.showLoading({ title: '上传中...' })
+					const uploadedImages = []
+					const baseUrl = uni.getStorageSync('requestPath')
+					for (const tempFilePath of tempFilePaths) {
+						const uploadRes = await new Promise((resolve, reject) => {
+							uni.uploadFile({
+								url: `${baseUrl}/system/file/upload`,
+								filePath: tempFilePath,
+								name: 'file',
+								formData: {
+									bizType: 'USER_INFO'
+								},
+								header: {
+									'AppToken': uni.getStorageSync('AppToken')
+								},
+								success: (res) => {
+									const data = JSON.parse(res.data)
+									if (data.code === 200) {
+										console.log('上传成功:', data.data)
+										resolve(data.data)
+									} else {
+										reject(new Error(data.message || '上传失败'))
+									}
+								},
+								fail: (err) => {
+									reject(err)
+								}
+							})
+						})
+						uploadedImages.push(uploadRes.fileUrl)
+					}
+					this.formData.proofImages = [...this.formData.proofImages, ...uploadedImages]
+				this.formData.certificationMaterials = this.formData.proofImages.join(',')
+				uni.hideLoading()
+				uni.showToast({ icon: 'success', title: '上传成功' })
+				} catch (e) {
+					uni.hideLoading()
+					uni.showToast({ icon: 'none', title: '上传失败' })
+				}
+			},
+			deleteProofImage(index) {
+				this.formData.proofImages.splice(index, 1)
+				this.formData.certificationMaterials = this.formData.proofImages.join(',')
+			},
+			onPickerConfirm(e) {
+				const selectedItem = e.value[0];
+				
+				if (this.pickerType === 'dept') {
+					this.formData.deptId = selectedItem.id;
+					this.formData.deptName = selectedItem.title;
+				} else if (this.pickerType === 'post') {
+					this.formData.postId = selectedItem.id;
+					this.formData.postName = selectedItem.title;
+					this.formData.postIds = selectedItem.id;
+				} else if (this.pickerType === 'product') {
+					this.formData.productId = selectedItem.id;
+					this.formData.productName = selectedItem.title;
+					this.formData.productCode = selectedItem.id;
+				} else if (this.pickerType === 'superior') {
+					this.formData.superiorId = selectedItem.id;
+					this.formData.superiorName = selectedItem.title;
+				} else if (this.pickerType === 'gender') {
+					// 处理性别选择
+					this.user.sex = selectedItem.id;
+					this.userInfo.sex = selectedItem.id;
+					this.formData.sex = selectedItem.id;
+				}
+				
+				this.showPicker = false;
+			},
+			toSelectDept() {
+				if (this.deptList && this.deptList.length > 0) {
+					this.pickerList = this.deptList;
+					this.pickerType = 'dept';
+					this.showPicker = true;
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: '暂无部门数据'
+					})
+				}
+			},
+			toSelectPost() {
+				if (this.postList && this.postList.length > 0) {
+					this.pickerList = this.postList;
+					this.pickerType = 'post';
+					this.showPicker = true;
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: '暂无岗位数据'
+					})
+				}
+			},
+			toSelectProduct() {
+				if (this.productList && this.productList.length > 0) {
+					this.pickerList = this.productList;
+					this.pickerType = 'product';
+					this.showPicker = true;
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: '暂无产品数据'
+					})
+				}
+			},
+			toSelectSuperior() {
+				if (this.userList && this.userList.length > 0) {
+					this.pickerList = this.userList;
+					this.pickerType = 'superior';
+					this.showPicker = true;
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: '暂无业务员数据'
+					})
+				}
+			},
+			toSelectGender() {
+				// 设置性别选择数据
+				this.pickerList = [
+					{ id: '1', title: '男' },
+					{ id: '0', title: '女' }
+				];
+				this.pickerType = 'gender';
+				this.showPicker = true;
+			}
+
 		}
 	}
 </script>
@@ -196,7 +550,7 @@
 					display: flex;
 					align-items: center;
 					justify-content: space-between;
-					border-bottom: 1px solid #F5F6FA;
+					border-bottom:1px solid #F5F6FA;
 
 					&:last-child {
 						border-bottom: none;
@@ -235,6 +589,27 @@
 							width: 36rpx;
 							height: 36rpx;
 						}
+
+						.head {
+							border-radius: 50%;
+							width: 80upx;
+							height: 80upx;
+						}
+
+						.wx-head {
+							position: absolute;
+							width: 80upx;
+							height: 80upx;
+							opacity: 0;
+						}
+
+						.input {
+							text-align: right;
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: 400;
+							color: #0F1826;
+						}
 					}
 				}
 
@@ -307,33 +682,56 @@
 						}
 					}
 
-					.upload-cover {
-						width: 160rpx;
-						height: 160rpx;
-						border-radius: 16rpx;
-						background: #F7F8FA;
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						margin-top: 24rpx;
-						position: relative;
+					.upload-proof {
+						margin-top: 16rpx;
 
-						.del {
-							position: absolute;
-							right: 0;
-							top: 0;
-							width: 28rpx;
-							height: 28rpx;
-						}
+						.uploaded-images {
+							display: flex;
+							flex-wrap: wrap;
+							gap: 20rpx;
+
+							.uploaded-image-item {
+								width: 160rpx;
+								height: 160rpx;
+								border-radius: 16rpx;
+								position: relative;
+
+								image {
+									width: 100%;
+									height: 100%;
+									border-radius: 12rpx;
+								}
 
-						image {
-							width: 100%;
-							height: 100%;
-							border-radius: 8rpx;
+								.image-delete {
+									position: absolute;
+									top: -12rpx;
+									right: -12rpx;
+									width: 40rpx;
+									height: 40rpx;
+									background: rgba(0, 0, 0, 0.6);
+									color: #FFFFFF;
+									border-radius: 50%;
+									display: flex;
+									align-items: center;
+									justify-content: center;
+									font-size: 32rpx;
+									font-weight: bold;
+									z-index: 1;
+								}
+							}
 						}
 
 						.upload-placeholder {
-							.icon {
+							width: 160rpx;
+							height: 160rpx;
+							background: #F7F8FA;
+							border-radius: 16rpx;
+							display: flex;
+							flex-direction: column;
+							align-items: center;
+							justify-content: center;
+
+							image {
 								width: 48rpx;
 								height: 48rpx;
 							}
@@ -355,7 +753,7 @@
 							}
 
 							.attachment-info {
-								flex: 1;
+								flex:1;
 								display: flex;
 								flex-direction: column;
 
@@ -399,8 +797,27 @@
 						}
 					}
 				}
-
 			}
 		}
 	}
+	.btn-box{
+		margin-top: 20rpx;
+		height: 120upx;
+		padding: 0 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		.sub-btn{
+			width: 100%;
+			height: 88upx;
+			line-height: 88upx;
+			text-align: center;
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			background: #388BFF;
+			border-radius: 44upx;
+		}
+	}
 </style>

BIN=BIN
static/image/bg_invite.png