liujiaxin пре 1 дан
родитељ
комит
1f9a362b45

+ 7 - 0
api/audit.js

@@ -25,3 +25,10 @@ export function searchCompanyUser(data) {
 export function getTaskFinishAuditInfo(data) {
 	 return request('/task/info/getTaskFinishAuditInfo', data, 'GET');
 }
+
+
+
+ //审核
+export function detail(data) {
+ 	 return request('/company/audit/detail',data,'GET','application/json;charset=UTF-8');
+} 

+ 7 - 2
api/task.js

@@ -19,7 +19,7 @@ export function company(data) {
  
  //添加任务信息
 export function addInfo(data) {
- 	 return request('/task/info',data,'GET');
+	 return request('/task/info',data,'POST','application/json;charset=UTF-8');
 } 
  // 任务完成统计
 export function getTaskCompleteStats(data) {
@@ -43,4 +43,9 @@ export function queryAllProduct(data) {
  //获取任务类型
 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');
+} 

+ 6 - 6
pages_speaker/gradeApplication.vue

@@ -37,14 +37,14 @@
 						<text class="required">*</text>
 						<text>国际性期刊论文/著作数</text>
 					</view>
-					<input type="number" class="input" v-model="formData.internationalPapers" placeholder="请输入,若无请填0"></input>
+					<input type="number" class="input" v-model="formData.internationalPapers" ></input>
 				</view>
 				<view class="form-item">
 					<view class="form-label">
 						<text class="required">*</text>
 						<text>全国性期刊论文/著作数</text>
 					</view>
-					<input type="number" class="input" v-model="formData.nationalPapers" placeholder="请输入,若无请填0"></input>
+					<input type="number" class="input" v-model="formData.nationalPapers" ></input>
 				</view>
 				<view class="form-item">
 					<view class="form-label">
@@ -62,7 +62,7 @@
 						<text class="required">*</text>
 						<text>临床工作经验年数</text>
 					</view>
-					<input type="number" class="input" v-model="formData.clinicalExperience" placeholder="请输入,若无请填0"></input>
+					<input type="number" class="input" v-model="formData.clinicalExperience"></input>
 				</view>
 				<view class="form-item">
 					<view class="form-label">
@@ -180,10 +180,10 @@
 					// 学术信息
 					academicTitle: '', // 学术头衔
 					academicPositions: '', // 学术任职
-					internationalPapers: '', // 国际性期刊论文/著作数
-					nationalPapers: '', // 全国性期刊论文/著作数
+					internationalPapers: 0, // 国际性期刊论文/著作数
+					nationalPapers: 0, // 全国性期刊论文/著作数
 					researchAreas: '', // 学术研究
-					clinicalExperience: '', // 临床工作经验年数
+					clinicalExperience: 0, // 临床工作经验年数
 					degree: '', // 学位
 					applicationLevel: '', // 申请级别
 					proofImages: [] // 证明材料图片

+ 1 - 0
pages_task/approvalCenter.vue

@@ -151,6 +151,7 @@
 import utils from '@/utils/common.js'
 	import TabPopup from '@/components/tab-popup.vue'
 	import { getPendingAuditList, searchCompanyUser } from '@/api/audit.js'
+	
 	export default {
 		components: {
 			TabPopup

+ 108 - 266
pages_task/approvalTaskDetail.vue

@@ -6,110 +6,121 @@
 			<text>任务详情</text>
 		</view>
 		<scroll-view class="content" scroll-y>
-		
-
-			<!-- 审核表单(根据类型动态渲染) -->
-			<view v-if="auditData">
-				<!-- 只有完成任务审核和创建任务审核才涉及文章、短视频、长视频 -->
-				<view v-if="businessType === 'ADUIT_WCRWSH' || businessType === 'ADUIT_CJRW'">
-					<!-- 短视频审核 -->
-					<ShortVideoAudit v-if="auditData.shortVideoData" :data="auditData.shortVideoData" />
-					
-					<!-- 长视频审核 -->
-					<LongVideoAudit v-else-if="auditData.longVideoData" :data="auditData.longVideoData" />
-					
-					<!-- 文章审核 -->
-					<ArticleAudit v-else-if="auditData.articleData" :data="auditData.articleData" />
+			<!-- 任务卡片 -->
+			<view class="task-card" v-if="auditData">
+				<view class="card-header">
+					<view class="card-title">{{ auditData.projectVO.projectName||'-' }}</view>
+					<view class="card-lable" :class="'pending'">待审核</view>
 				</view>
-				
-				<!-- 讲者审核 -->
-				<SpeakerAudit v-else-if="businessType === 'ADUIT_JZSH'" :data="{ docterVO: auditData.docterVO, companyUserVO: auditData.companyUserVO }" />
-				
-				<!-- 提现审核 -->
-				<WithdrawAudit v-else-if="businessType === 'ADUIT_TXSH'" :data="auditData.withdrawData" />
-				
-				<!-- 服务单生成配置模板审核 -->
-				<view v-else-if="businessType === 'AUDIT_FWDRWSCPZ'" class="info-section">
-					<view class="section-header">
-						<view class="section-indicator"></view>
-						<text class="section-title">服务单生成配置模板信息</text>
+				<view class="card-meta">
+					<view class="item">
+						<image src="/static/image/icon_user.png"></image>
+						{{ auditData.AuditTaskInfoVO.companyUserName||'-' }}</view>
+					<view class="item">
+						
+						<image src="/static/image/icon_time.png"></image>
+						{{ auditData.projectVO.startDate||'-' }}</view>
+				</view>
+			</view>
+
+			<!-- 任务信息 -->
+			<view class="info-section" v-if="auditData">
+				<view class="section-header">
+					<view class="section-indicator"></view>
+					<text class="section-title">任务信息</text>
+				</view>
+				<view class="info-list">
+					<view class="info-item">
+						<text class="info-label">任务名称</text>
+						<text class="info-value">{{ auditData.audit.projectName }}</text>
 					</view>
-					<view class="info-list">
-						<view class="info-item">
-							<text class="info-label">任务编号</text>
-							<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.taskNo ? auditData.auditTaskInfoVO.taskNo : '-' }}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">任务名称</text>
-							<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.taskName ? auditData.auditTaskInfoVO.taskName : '-' }}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">项目名称</text>
-							<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.projectName ? auditData.auditTaskInfoVO.projectName : '-' }}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">归属部门</text>
-							<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.deptName ? auditData.auditTaskInfoVO.deptName : '-' }}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">归属类型</text>
-							<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.belongTypeName ? auditData.auditTaskInfoVO.belongTypeName : '-' }}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">任务数量</text>
-							<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.taskCount ? auditData.auditTaskInfoVO.taskCount : '-' }}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">任务积分</text>
-							<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.taskIntegral ? auditData.auditTaskInfoVO.taskIntegral : '-' }}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">计划开始时间</text>
-							<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.planStartTime ? auditData.auditTaskInfoVO.planStartTime : '-' }}</text>
-						</view>
-						<view class="info-item">
-							<text class="info-label">计划结束时间</text>
-							<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.planEndTime ? auditData.auditTaskInfoVO.planEndTime : '-' }}</text>
-						</view>
-						<view class="info-item">
-						<text class="info-label">申请人</text>
-						<text class="info-value">{{ auditData.auditTaskInfoVO && auditData.auditTaskInfoVO.companyUserName ? auditData.auditTaskInfoVO.companyUserName : '-' }}</text>
+					<view class="info-item">
+						<text class="info-label">任务类型</text>
+						<text class="info-value">{{ auditData.audit.projectName }}</text>
+					</view>
+					<view class="info-item">
+						<text class="info-label">归属部门</text>
+						<text class="info-value">{{ auditData.audit.deptName }}</text>
 					</view>
 				</view>
-				
-				<!-- 审核流程信息 -->
-					<view class="info-section" v-if="auditData.auditFlowVO && auditData.auditFlowVO.length > 0">
-						<view class="section-header">
-							<view class="section-indicator"></view>
-							<text class="section-title">审核流程信息</text>
-						</view>
-						<view class="flow-list">
-							<view v-for="(flow, index) in auditData.auditFlowVO" :key="index" class="flow-item">
-								<view class="flow-step">
-									<view class="step-number">{{ flow.stepNumber }}</view>
-									<view class="step-line" v-if="index < auditData.auditFlowVO.length - 1"></view>
+			</view>
+<!-- 项目信息 -->
+			<view class="info-section" v-if="auditData.projectVO">
+				<view class="section-header">
+					<view class="section-indicator"></view>
+					<text class="section-title">项目信息</text>
+				</view>
+				<view class="info-list">
+					<view class="info-item">
+						<text class="info-label">项目名称</text>
+						<text class="info-value">{{ auditData.projectVO.projectName }}</text>
+					</view>
+					<view class="info-item">
+						<text class="info-label">项目活动ID</text>
+						<text class="info-value">{{ auditData.projectVO.projectTypeId }}</text>
+					</view>
+					<!-- <view class="info-item">
+						<text class="info-label">任务备注</text>
+						<text class="info-value">{{ auditData.projectVO.thirdPartyCode }}</text>
+					</view> -->
+				</view>
+			</view>
+
+			<!-- 客户信息 -->
+			<view class="info-section" v-if="auditData.docterVO">
+				<view class="section-header">
+					<view class="section-indicator"></view>
+					<text class="section-title">客户信息</text>
+				</view>
+				<view class="client-list">
+					<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">
+									{{ auditData.docterVO.doctorName }}
+									<text class="client-level">一级</text>
 								</view>
-								<view class="flow-content">
-									<view class="flow-header">
-										<text class="flow-title">{{ flow.stepDescription }}</text>
-										<text class="flow-status" :class="{'status-pending': flow.status === 1, 'status-completed': flow.status === 2, 'status-submitted': flow.status === 0}">{{ flow.statusName }}</text>
-									</view>
-									<view class="flow-info">
-										<text>审核人:{{ flow.auditUserName || '-' }}</text>
-									</view>
-									<view class="flow-info" v-if="flow.auditTime">
-										<text>审核时间:{{ flow.auditTime }}</text>
-									</view>
-									<view class="flow-info" v-if="flow.comment">
-										<text>审核意见:{{ flow.comment }}</text>
-									</view>
+								<view class="client-hospital">
+									<text>{{ auditData.docterVO.institution }} </text>
+									<view class="line"></view>
+									<text>{{ auditData.docterVO.department || '-' }}</text>
 								</view>
 							</view>
 						</view>
+						<view class="client-stats">
+							<view class="stat-item"><text class="num">{{ auditData.auditTaskInfoVO.taskCount }} </text>任务</view>
+							<view class="stat-item"><text class="num">{{ auditData.auditTaskInfoVO.taskIntegral }} </text>积分</view>
+						</view>
 					</view>
-			</view>
+				</view>
 			</view>
 
+			<!-- 审批信息 -->
+			<view class="info-section" v-if="auditData">
+				<view class="section-header">
+					<view class="section-indicator"></view>
+					<text class="section-title">审批流程</text>
+				</view>
+				<view class="approval-list">
+					<view class="approval-item" v-for="(item, index) in auditData.auditFlows" :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==1" 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==2"  src="/static/image/icon_refuse.png"></image>
+							</view>
+							<view class="approval-user">
+								<view class="user-name">{{ item.auditUserName }}</view>
+								<view class="user-status" :style="{ color: item.status === 0 ? '#4CAF50' : item.status === 1 ? '#FF9800' : '#F44336' }">{{ item.statusName }}</view>
+							</view>
+						</view>
+						<text class="approval-time">{{ item.auditTime || '' }}</text>
+						<view class="approval-line" v-if="index < auditData.auditFlows.length - 1"></view>
+					</view>
+				</view>
+			</view>
 		</scroll-view>
 
 		<view class="bottom-bar">
@@ -147,21 +158,10 @@
 </template>
 
 <script>
-import { doAudit, getAuditFlows, getTaskFinishAuditInfo } from '@/api/audit.js'
-import ShortVideoAudit from './components/ShortVideoAudit.vue'
-import LongVideoAudit from './components/LongVideoAudit.vue'
-import ArticleAudit from './components/ArticleAudit.vue'
-import SpeakerAudit from './components/SpeakerAudit.vue'
-import WithdrawAudit from './components/WithdrawAudit.vue'
+import { doAudit, getAuditFlows, getTaskFinishAuditInfo ,detail} from '@/api/audit.js'
+import image from 'uview-ui/libs/config/props/image';
 
 export default {
-  components: {
-    ShortVideoAudit,
-    LongVideoAudit,
-    ArticleAudit,
-    SpeakerAudit,
-    WithdrawAudit
-  },
   data() {
     return {
 		userInfo:JSON.parse(uni.getStorageSync('userInfo')),
@@ -177,17 +177,10 @@ export default {
       // 接口返回的原始数据
       auditData: null,
       // 审批信息
-      approvalInfo: [],
-	  businessType:null
+      approvalInfo: []
     }
   },
   onLoad(options) {
-	console.log("options参数",options)
-
-	if(options.businessType){
-		this.businessType = options.businessType
-	}
-
     if (options.taskId) {
       this.taskId = options.taskId
       this.loadData()
@@ -282,7 +275,7 @@ export default {
 //         }
         
         // 获取任务完成审核信息
-        const taskFinishAuditRes = await getTaskFinishAuditInfo({ taskId: 69||this.taskId })
+        const taskFinishAuditRes = await detail({ auditId: this.taskId })
         if (taskFinishAuditRes.code === 200) {
           // 直接保存接口返回的原始数据
           console.log('任务完成审核信息:', taskFinishAuditRes.data)
@@ -373,157 +366,6 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-	// 通用信息部分样式
-	.info-section {
-		background: #fff;
-		border-radius: 16rpx;
-		padding: 32rpx;
-		margin-bottom: 20rpx;
-		box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
-	}
-
-	.section-header {
-		display: flex;
-		align-items: center;
-		margin-bottom: 24rpx;
-	}
-
-	.section-indicator {
-		width: 8rpx;
-		height: 24rpx;
-		background: #1989fa;
-		border-radius: 4rpx;
-		margin-right: 12rpx;
-	}
-
-	.section-title {
-		font-size: 28rpx;
-		font-weight: 600;
-		color: #333;
-	}
-
-	.info-list {
-		width: 100%;
-	}
-
-	.info-item {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 16rpx 0;
-		border-bottom: 1rpx solid #f2f2f2;
-	}
-
-	.info-item:last-child {
-		border-bottom: none;
-	}
-
-	.info-label {
-		font-size: 26rpx;
-		color: #666;
-		flex: 1;
-	}
-
-	.info-value {
-		font-size: 26rpx;
-		color: #333;
-		flex: 2;
-		text-align: right;
-		word-break: break-all;
-	}
-
-	// 审核流程样式
-	.flow-list {
-		position: relative;
-	}
-
-	.flow-item {
-		display: flex;
-		margin-bottom: 32rpx;
-		position: relative;
-	}
-
-	.flow-step {
-		width: 40rpx;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		position: relative;
-	}
-
-	.step-number {
-		width: 40rpx;
-		height: 40rpx;
-		border-radius: 50%;
-		background: #1989fa;
-		color: #fff;
-		font-size: 24rpx;
-		font-weight: bold;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		z-index: 2;
-	}
-
-	.step-line {
-		width: 2rpx;
-		height: 100%;
-		background: #e5e5e5;
-		position: absolute;
-		top: 40rpx;
-		left: 19rpx;
-		z-index: 1;
-	}
-
-	.flow-content {
-		flex: 1;
-		margin-left: 24rpx;
-		background: #f9f9f9;
-		border-radius: 12rpx;
-		padding: 24rpx;
-		position: relative;
-	}
-
-	.flow-header {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		margin-bottom: 16rpx;
-	}
-
-	.flow-title {
-		font-size: 26rpx;
-		font-weight: 600;
-		color: #333;
-	}
-
-	.flow-status {
-		font-size: 24rpx;
-		padding: 4rpx 16rpx;
-		border-radius: 12rpx;
-	}
-
-	.status-pending {
-		background: #fff7e6;
-		color: #fa8c16;
-	}
-
-	.status-completed {
-		background: #f0f9eb;
-		color: #52c41a;
-	}
-
-	.status-submitted {
-		background: #e6f7ff;
-		color: #1890ff;
-	}
-
-	.flow-info {
-		font-size: 24rpx;
-		color: #666;
-		margin-bottom: 8rpx;
-	}
-
 	// 弹窗样式
 	.reject-popup-content {
 		padding: 32rpx;

+ 237 - 118
pages_task/createTask.vue

@@ -20,9 +20,9 @@
 						{{ formData.institution || '请选择任务归属' }}
 						<image class="icon" src="/static/image/icon_more.png"></image>
 					</view> -->
-					<view class="form-input picker-input" :class="{ placeholder: !formData.institution }"
+					<view class="form-input picker-input" :class="{ placeholder: !formData.deptId }"
 						@click="showPicker('任务归属',companyData)">
-						{{ formData.institution || '请选择任务归属' }}
+						{{ institutionDisplayText || '请选择任务归属' }}
 						<image class="icon" src="/static/image/icon_more.png"></image>
 					</view>
 				</view>
@@ -32,30 +32,20 @@
 						<text class="required">*</text>
 						<text>归属项目</text>
 					</view>
-					<view class="form-input picker-input" :class="{ placeholder: !formData.belongingProject }"
+					<view class="form-input picker-input" :class="{ placeholder: !formData.projectId }"
 						@click="showPicker('归属项目',companyList)">
-						{{ formData.belongingProject || '请选择归属项目' }}
+						{{ belongingProjectDisplayText || '请选择归属项目' }}
 						<image class="icon" src="/static/image/icon_more.png"></image>
 					</view>
-					<!-- <view class="form-input picker-input" :class="{ placeholder: !formData.belongingProject }"
-						@click="showBelongingPopup = true">
-						{{ formData.belongingProject || '请选择归属项目' }}
-						<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>
 					</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.productCode }"
+					<view class="form-input picker-input" :class="{ placeholder: !formData.productId }"
 						@click="showPicker('产品代码',productList)">
-						{{ formData.productCode || '请选择产品代码' }}
+						{{ productNameDisplayText || '请选择产品代码' }}
 						<image class="icon" src="/static/image/icon_more.png"></image>
 					</view>
 				</view>
@@ -64,9 +54,9 @@
 						<text class="required">*</text>
 						<text>费用分摊</text>
 					</view>
-					<view class="form-input picker-input" :class="{ placeholder: !formData.costAllocation }"
+					<view class="form-input picker-input" :class="{ placeholder: !formData.costShareId }"
 						@click="showPicker('费用分摊',companyData)">
-						{{ formData.costAllocation || '请选择费用分摊主体' }}
+						{{ costAllocationDisplayText || '请选择费用分摊主体' }}
 						<image class="icon" src="/static/image/icon_more.png"></image>
 					</view>
 				</view>
@@ -83,7 +73,11 @@
 						<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">
@@ -93,7 +87,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>
@@ -103,12 +97,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">
@@ -116,12 +109,11 @@
 						<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>
 		</scroll-view>
@@ -130,6 +122,14 @@
 			: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">
@@ -204,7 +204,9 @@ import utils from '@/utils/common.js'
 			return {
 				taskTypeDict:[],//任务类型字典
 				taskType:[],//任务类型
+				taskTypeOriginalData:[],//任务类型原始数据(包含dictLabel和dictValue)
 				companyList:[],//归属项目
+				projectData:[],//项目数据(持久化存储)
 				productList:[],//产品列表
 				companyData:[],
 				userInfo:{},
@@ -250,7 +252,7 @@ import utils from '@/utils/common.js'
 					['主体1', '主体2', '主体3'],
 				],
 				taskTypeColumns: [
-					['类型1', '类型2', '类型3'],
+					// ['类型1', '类型2', '类型3'],
 				],
 				currentStep: 1,
 				currentText: [{
@@ -271,28 +273,32 @@ import utils from '@/utils/common.js'
 				],
 				rejectionInfo: '',
 				formData: {
-					costAllocation: '',
+					costShareId: '',
 					planStartTime: '',
 					planEndTime: '',
-					institution: '',
+					belongType: '',
 					deptId: '',
-					belongingProject: '',
+					projectId: '',
 					productId: '',
-					productCode: '',
-					productCodeValue: '',
 					taskType: '',
 					addRemark: false
 				},
 				originalCompanyData: null,
 				pickerTitle: '默认标题',
 				pickerData: [],
-				companyId:''
+				companyId:'',
+				showStartTimePicker: false,
+				showEndTimePicker: false,
+				startTimeValue: new Date(),
+				endTimeValue: new Date(),
+
 			}
 		},
 
 		onLoad: async function(options) {
 			try {
 				this.taskTypeDict = await utils.getDicts("task_type");//任务类型
+				this.belongTypeList = await utils.getDicts("task_belong_type");//任务类型
 				
 			} catch (e) {
 				console.log('获取字典数据失败:', e)
@@ -303,63 +309,93 @@ import utils from '@/utils/common.js'
 			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());
+			
 		},
-		// onLoad(options) {
-		// 		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
-
-		// },
+		
 		computed: {
-			filteredProjects() {
-				if (!this.searchKeyword.trim()) {
-					return this.belongingprojects;
+			taskTypeDisplayText() {
+				console.log('计算taskTypeDisplayText, formData.taskType:', this.formData.taskType);
+				console.log('计算taskTypeDisplayText, taskTypeOriginalData:', this.taskTypeOriginalData);
+				if (!this.formData.taskType || !this.taskTypeOriginalData) {
+					return '';
+				}
+				const selectedType = this.taskTypeOriginalData.find(item => item.dictValue === this.formData.taskType);
+				console.log('找到的selectedType:', selectedType);
+				return selectedType ? selectedType.dictLabel : '';
+			},
+			institutionDisplayText() {
+				if (!this.formData.deptId || !this.originalCompanyData) {
+					return '';
+				}
+				const selectedItem = this.originalCompanyData.find(item => item.deptId === this.formData.deptId);
+				return selectedItem ? selectedItem.deptName : '';
+			},
+			costAllocationDisplayText() {
+				if (!this.formData.costShareId || !this.originalCompanyData) {
+					return '';
+				}
+				const selectedItem = this.originalCompanyData.find(item => item.deptId === this.formData.costShareId);
+				return selectedItem ? selectedItem.deptName : '';
+			},
+			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 : '';
 				}
-				return this.belongingprojects.filter(project =>
-					project.name.includes(this.searchKeyword)
-				);
-			}
 		},
 		methods: {
 			//任务类型
 			queryAllData(){
-				if(!this.id){
-					uni.showToast({
-						title: '请先选择产品',
-						icon: 'none'
-					})
-					return
-				}
-				let data={
-					companyId:this.userInfo.companyId||'',
-					deptId:this.formData.deptId||'',
-					productId:this.id||'',
+				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,获取对应的字典数据
+					}
+					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) {
@@ -369,15 +405,21 @@ import utils from '@/utils/common.js'
 								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);
 							}
 						}
-					}
-				}).catch(err => {
-					console.error('获取任务类型失败:', err);
+						}
+						resolve(res);
+					}).catch(err => {
+						console.error('获取任务类型失败:', err);
+						reject(err);
+					});
 				});
 			},
 
@@ -412,8 +454,11 @@ import utils from '@/utils/common.js'
 						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 => {
@@ -482,7 +527,7 @@ import utils from '@/utils/common.js'
 			handleConfirm() {
 				if (this.selectedSecondaryItem) {
 					const displayText = `${this.selectedPrimaryItem.name} > ${this.selectedSecondaryItem}`;
-					this.formData.institution = displayText;
+					this.formData.belongType = displayText;
 					this.showTaskPopup = false;
 				} else {
 					uni.showToast({
@@ -516,16 +561,21 @@ import utils from '@/utils/common.js'
 					// 调用getAllData()获取归属项目数据
 					await this.getAllData();
 					data = this.companyList;
+					console.log('归属项目数据:', data);
 				} else if (title === '产品代码') {
 					// 调用queryAllProduct()获取产品代码数据
 					await this.queryAllProduct();
 					data = this.productList;
-				}else if (title === '任务类型') {
+				} else if (title === '任务类型') {
 					// queryAllData()获取任务类型数据
 					await this.queryAllData();
 					// 使用处理后的taskTypeColumns作为数据
 					data = this.taskTypeColumns;
 					console.log('任务类型数据:', data);
+				} else if (title === '归属类型') {
+					// 归属类型数据已经在onLoad中获取
+					data = this.belongTypeList;
+					console.log('归属类型数据:', data);
 				}
 
 				// 处理任务归属和费用分摊数据,将deptStr作为显示文本
@@ -544,52 +594,108 @@ import utils from '@/utils/common.js'
 					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 === '费用分摊') {
-						this.formData.costAllocation = e.value[0]
+						// e.value[0]是选中的文本值(deptStr)
+						const selectedDeptStr = e.value[0];
+						console.log('选中的费用分摊文本:', selectedDeptStr);
+						console.log('originalCompanyData:', this.originalCompanyData);
+						// 从originalCompanyData中找到对应的项
+						const selectedItem = this.originalCompanyData.find(item => item.deptStr === 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 === '任务类型') {
-						this.formData.taskType = e.value[0]
+						// 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) {
-						// 获取选中的索引
-						const selectedIndex = e.value[0]
-						// 找到对应的原始数据项
-						const selectedItem = this.originalCompanyData.find(item => item.deptStr === selectedIndex)
+						// e.value[0]是选中的文本值(deptStr)
+						const selectedDeptStr = e.value[0];
+						console.log('选中的任务归属文本:', selectedDeptStr);
+						console.log('originalCompanyData:', this.originalCompanyData);
+						// 从originalCompanyData中找到对应的项
+						const selectedItem = this.originalCompanyData.find(item => item.deptStr === selectedDeptStr);
 						if (selectedItem) {
-							// 显示deptStr
-							this.formData.institution = selectedItem.deptStr
-							// 保存deptId到表单
-							this.formData.deptId = selectedItem.deptId
+							// 保存deptId到表单(存储id值)
+							this.formData.deptId = selectedItem.deptId;
+							console.log('设置formData.deptId为:', selectedItem.deptId);
+						} else {
 						}
 					} else if (this.pickerTitle === '归属项目' && this.originalCompanyData) {
-						// 获取选中的索引
-						const selectedIndex = e.value[0]
-						// 找到对应的原始数据项
-						const selectedItem = this.originalCompanyData.find(item => item.projectName === selectedIndex)
+						// 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) {
-							// 显示projectName
-							this.formData.belongingProject = selectedItem.projectName
+							// 保存id到表单(存储id值)
+							this.formData.projectId = selectedItem.id;
 							// 保存productId到表单
-							this.formData.productId = selectedItem.productId
+							this.formData.productId = selectedItem.productId;
+							console.log('设置formData.projectId为:', selectedItem.id);
+						} else {
 						}
 					} else if (this.pickerTitle === '产品代码' && this.originalCompanyData) {
-						// 获取选中的索引
-						const selectedIndex = e.value[0]
-						// 找到对应的原始数据项
-						const selectedItem = this.originalCompanyData.find(item => item.productName === selectedIndex)
+						// 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) {
-							// 显示productName
-							this.formData.productCode = selectedItem.productName
-							// 保存productCode到表单
-							this.formData.productCodeValue = selectedItem.productCode
-							this.id=selectedItem.id
+							// 保存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('未找到对应的归属类型');
 						}
 					}
 				}
@@ -605,11 +711,24 @@ import utils from '@/utils/common.js'
 					url: '/pages_task/selectCustomer'
 				})
 			},
-			onPlanStartTimeChange(e) {
-				this.formData.planStartTime = e.detail.value
+			onStartTimeConfirm(e) {
+				this.formData.planStartTime = this.formatDateTime(e.value);
+				this.showStartTimePicker = false;
+			},
+			onEndTimeConfirm(e) {
+				this.formData.planEndTime = this.formatDateTime(e.value);
+				this.showEndTimePicker = false;
 			},
-			onPlanEndTimeChange(e) {
-				this.formData.planEndTime = e.detail.value
+			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}`;
 			}
 		}
 	}

+ 93 - 76
pages_task/pointsSettings.vue

@@ -193,91 +193,108 @@
 				uni.navigateBack()
 			},
 			submit() {
-				// 验证所有客户积分是否已填写
-				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
-				})
+					// 验证所有客户积分是否已填写
+					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 taskFormDataStr = uni.getStorageSync('taskFormData')
-				const selectedCustomersStr = uni.getStorageSync('selectedCustomers')
-				const taskFormData = taskFormDataStr ? JSON.parse(taskFormDataStr) : {}
-				const selectedCustomers = selectedCustomersStr ? JSON.parse(selectedCustomersStr) : []
-
-				// 构建提交数据
-				const taskData = {
-					// 任务基本信息
-					...taskFormData,
-					// 客户信息和积分
-					customers: this.customerList.map(customer => ({
-						id: customer.id,
-						name: customer.name,
-						doctorName: customer.doctorName,
-						integral: parseInt(customer.integral)
-					})),
-					// 总积分
-					totalIntegral: this.totalIntegral,
-					// 选中的原始客户数据
-					selectedCustomers: selectedCustomers
-				}
-
-				console.log('提交的任务数据:', taskData)
-
-				// 调用addInfo接口提交表单
-				uni.showLoading({
-					title: '提交中...'
-				})
-				addInfo(taskData).then(res => {
-					uni.hideLoading()
-					if (res.code === 200) {
-						// 清除本地存储的数据
-						uni.removeStorageSync('taskFormData')
-						uni.removeStorageSync('selectedCustomers')
-						// 显示提交成功提示
+					if (invalidCustomers.length > 0) {
 						uni.showToast({
-							title: '任务创建成功',
-							success: () => {
-								// 延迟跳转,让用户看到成功提示
-								setTimeout(() => {
-									uni.navigateTo({
-										url: '/pages_task/taskList'
-									})
-								}, 1500)
-							}
+							icon: 'none',
+							title: '请输入有效的积分数值'
 						})
-					} else {
+						return
+					}
+
+					// 获取所有三个页面的数据
+					const taskFormDataStr = uni.getStorageSync('taskFormData')
+					const selectedCustomersStr = uni.getStorageSync('selectedCustomers')
+					const taskFormData = taskFormDataStr ? JSON.parse(taskFormDataStr) : {}
+					const selectedCustomers = selectedCustomersStr ? JSON.parse(selectedCustomersStr) : []
+					
+					// 获取用户信息
+					const userInfoStr = uni.getStorageSync('userInfo')
+					const userInfo = userInfoStr ? JSON.parse(userInfoStr) : {}
+					
+					// 获取当前时间
+					const now = new Date()
+					const applyTime = now.toISOString().slice(0, 19).replace('T', ' ')
+
+					// 构建提交数据
+					const taskData = {
+						// 任务基本信息
+						// taskName: taskFormData.taskName || '',
+						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 || '',
+						// applyTime: applyTime,
+						belongType: taskFormData.belongType || 0,
+						companyId: userInfo.companyId || 0,
+						companyUserId: userInfo.id || 0,
+						// 构建doctorIds数组
+						// doctorIds: this.customerList.map(customer => parseInt(customer.id) || 0),
+						// 构建doctorTaskList数组
+						doctorTaskList: this.customerList.map(customer => ({
+							doctorId: parseInt(customer.id) || 0,
+							taskIntegral: parseInt(customer.integral) || 0
+						}))
+					}
+
+					console.log('提交的任务数据:', taskData)
+
+					// 调用addInfo接口提交表单
+					uni.showLoading({
+						title: '提交中...'
+					})
+					addInfo(taskData).then(res => {
+						uni.hideLoading()
+						if (res.code === 200) {
+							// 清除本地存储的数据
+							uni.removeStorageSync('taskFormData')
+							uni.removeStorageSync('selectedCustomers')
+							// 显示提交成功提示
+							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: res.message || '提交失败'
+							title: '网络错误,请重试'
 						})
-					}
-				}).catch(err => {
-					uni.hideLoading()
-					uni.showToast({
-						icon: 'none',
-						title: '网络错误,请重试'
 					})
-				})
-			},
+				},
 			deleteSelected() {
 				// 删除所有客户数据
 				uni.showModal({

+ 6 - 6
pages_task/selectCustomer.vue

@@ -12,10 +12,10 @@
 					<image class="clear-icon" src="/static/image/icon_clear.png" v-if="searchKeyword"
 						@click="clearSearch"></image>
 				</view>
-				<view class="section-title">已选择 {{ selectedCustomers.length }} 人:</view>
+				<view class="section-title">已选择 {{ selectedCustomers.length||'0' }} 人:</view>
 				<view class="selected-tags">
 					<view class="selected-tag" v-for="(customer, index) in selectedCustomers" :key="customer.id">
-						<text class="tag-name">{{ customer.doctorName }}</text>
+						<text class="tag-name">{{ customer.doctorName||'-' }}</text>
 						<text class="tag-remove" @click="removeCustomer(customer.id)">×</text>
 					</view>
 				</view>
@@ -32,15 +32,15 @@
 				<view class="customer-item" :class="{ active: isSelected(customer.id) }"
 					v-for="(customer, index) in filteredCustomers" :key="customer.id" @click="toggleCustomer(customer)">
 					<view class="left">
-						<image class="head" src="/static/image/img_avatar_client.png"></image>
+						<image class="head" src="/static/image/my_heads_icon.png"></image>
 						<view class="customer-info">
 							<view class="customer-header">
-								<view class="customer-name">{{ customer.doctorName }}</view>
+								<view class="customer-name">{{ customer.doctorName ||'-'}}</view>
 								<view class="customer-level" v-if="customer.jobTitle">{{ customer.jobTitle }}</view>
 							</view>
 							<view class="customer-details">
-								<view class="customer-hospital">{{ customer.cityName }}</view>
-								<view class="customer-department">{{ customer.department }}</view>
+								<view class="customer-hospital">{{ customer.cityName||'-' }}</view>
+								<view class="customer-department">{{ customer.department ||'-'}}</view>
 							</view>
 						</view>
 					</view>

+ 3 - 3
pages_task/taskDetail.vue

@@ -185,9 +185,9 @@
 						<view class="left">
 							<view class="avatar-box">
 								<image class="avatar" src="/static/image/my_heads_icon.png"></image>
-								<image class="icon" src="/static/image/icon_wait.png"></image>
-								<!-- <image class="icon" src="/static/image/icon_pass.png"></image>
-								<image class="icon" src="/static/image/icon_refuse.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>
 
 							</view>
 							<view class="approval-user">

+ 89 - 60
pages_task/xlTask.vue

@@ -25,7 +25,7 @@
 		<!-- 动态子标签 -->
 		<view class="sub-tabs">
 			<view class="sub-tab-item" :class="{ active: currentSubTab === item.value }"
-				@click="currentSubTab = item.value" v-for="(item, index) in currentSubTabsList" :key="index">
+				@click="selectSubTab(item.value)" v-for="(item, index) in currentSubTabsList" :key="index">
 				{{ item.label }}
 			</view>
 		</view>
@@ -202,14 +202,29 @@
 				</view>
 			</view>
 		</view>
+		
+		<!-- 日期选择器 -->
+		<u-datetime-picker
+			:show="showDatePicker"
+			:value="datePickerValue"
+			mode="date"
+			@confirm="datePickerConfirm"
+			@cancel="datePickerCancel"
+		></u-datetime-picker>
 	</view>
 </template>
 <script>
+import { dicts } from '@/api/common.js';
+import { utils} from '@/utils/common.js';
+
 	import { list,  deleted, company } from '@/api/task.js';
 	export default {
 		data() {
 			return {
 				showFilter: false,
+				showDatePicker: false,
+				currentDateField: '',
+				datePickerValue: new Date().getTime(),
 				filters: {
 					applyTimeStart: '',
 					applyTimeEnd: '',
@@ -222,19 +237,9 @@
 					belongType: ''
 				},
 				currentTopTab: 'task',
-				currentSubTab: 'all',
-				taskSubTabs: [{
-						label: '全部任务',
-						value: 'all'
-					},
-					{
-						label: '未完成',
-						value: 'unfinished'
-					},
-					{
-						label: '已完成',
-						value: 'finished'
-					}
+				currentSubTab: '',
+				taskSubTabs: [
+						{ label: '全部任务', value: '' }
 				],
 				auditSubTabs: [{
 						label: '全部',
@@ -253,45 +258,34 @@
 						value: 'rejected'
 					}
 				],
-				taskList: [{
-					taskTitle: '王小明医生的学术讲座',
-					statusText: '待完成',
-					statusClass: 'status-wait',
-					speaker: '王小明',
-					level: '一级',
-					hospital: '湖南省人民医院',
-					department: '口腔科',
-					videoType: '长视频',
-					category: '学术',
-					points: 10,
-					count: 1,
-					applyTime: '2025-9-20 13:55',
-					finishTime: '-',
-					auditStatus: '-',
-					showDelete: true,
-					sealImg: '/static/image/img_unfinish.png'
-				}],
+				taskList: [],
 				auditList: [{
-					taskTitle: '王小明医生的学术讲座',
-					statusText: '创建驳回',
-					statusClass: 'status-rejected',
-					speaker: '王小明',
-					level: '一级',
-					hospital: '湖南省人民医院',
-					department: '口腔科',
-					videoType: '长视频',
-					category: '学术',
-					points: 10,
-					count: 1,
-					applyTime: '2025-9-20 13:55',
-					showDelete: true,
-					showEdit: true
+					
 				}],
 				userInfo: {
 					companyId: ''
-				}
+				},taskStatus:{
+
+				},
+				taskBelong: []
 			}
 		},
+		onLoad: async function(options) {
+			try {
+				this.taskBelong = await utils.getDicts("task_belong_type");//任务归属
+				console.log('任务归属字典:',this.taskBelong)
+
+				
+			} catch (e) {
+				console.log('获取字典数据失败:', e)
+			}
+
+
+		this.dicts();
+			// 获取用户信息
+			this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}')
+		},
+		
 		computed: {
 			currentSubTabsList() {
 				return this.currentTopTab === 'task' ? this.taskSubTabs : this.auditSubTabs;
@@ -304,6 +298,24 @@
 			this.loadData();
 		},
 		methods: {
+			dicts() {
+				dicts('task_status').then(res => {
+					if (res.code === 200 ) {
+						console.log(res.data)
+						this.taskStatus = res.data;
+						this.taskSubTabs = [
+							{ label: '全部任务', value: '' }
+						];
+						res.data.forEach(item => {
+							this.taskSubTabs.push({
+								label: item.dictLabel,
+								value: item.dictValue
+							});
+						});
+						console.log('更新后的taskSubTabs:', this.taskSubTabs);
+					}
+				});
+			},
 			loadData() {
 				// 加载任务列表数据
 				this.getTaskList();
@@ -315,7 +327,7 @@
 				const params = {
 					...this.filters,
 					type: this.currentTopTab,
-					status: this.currentSubTab
+					taskStatus: this.currentSubTab
 				};
 				
 				uni.showLoading({
@@ -329,6 +341,7 @@
 						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),
@@ -445,9 +458,13 @@
 					url: `/pages_task/taskDetail?taskId=${item.id}`
 				});
 			},
+			selectSubTab(value) {
+				this.currentSubTab = value;
+				this.loadData();
+			},
 			switchTopTab(type) {
 				this.currentTopTab = type;
-				this.currentSubTab = 'all';
+				this.currentSubTab = '';
 				this.loadData();
 			},
 			closeFilter() {
@@ -473,18 +490,30 @@
 			},
 			// 打开日期选择器
 			openDatePicker(field) {
+				console.log('openDatePicker called with field:', field);
+				this.currentDateField = field;
 				const currentValue = this.filters[field];
-				const defaultDate = currentValue ? new Date(currentValue) : new Date();
-				
-				uni.datePicker({
-					type: 'date',
-					start: '2020-01-01',
-					end: new Date().toISOString().split('T')[0],
-					current: currentValue || new Date().toISOString().split('T')[0],
-					success: (res) => {
-						this.filters[field] = res.value;
-					}
-				});
+				if (currentValue) {
+					this.datePickerValue = new Date(currentValue).getTime();
+				} else {
+					this.datePickerValue = new Date().getTime();
+				}
+				this.showDatePicker = true;
+			},
+			// 日期选择器确认
+			datePickerConfirm(e) {
+				console.log('datePickerConfirm:', e);
+				const date = new Date(e.value);
+				const year = date.getFullYear();
+				const month = String(date.getMonth() + 1).padStart(2, '0');
+				const day = String(date.getDate()).padStart(2, '0');
+				const formattedDate = `${year}-${month}-${day}`;
+				this.filters[this.currentDateField] = formattedDate;
+				this.showDatePicker = false;
+			},
+			// 日期选择器取消
+			datePickerCancel() {
+				this.showDatePicker = false;
 			},
 			handleShare(item) {
 				uni.showToast({