Explorar o código

Merge branch 'master' of http://1.14.104.71:10880/lijunfeng/rtliveCompany

李妹妹 hai 12 horas
pai
achega
fea0556c86

+ 3 - 0
api/speaker.js

@@ -23,6 +23,9 @@ export function inviteDoctor(companyUserId,companyId) {
 export function getCompanyDoctorLevelApplyQuestionnaire(data) {
 	 return request('/survey/questionnaire/getCompanyDoctorLevelApplyQuestionnaire',data,'GET','application/json;charset=UTF-8');
 }
+export function checkIntegralLimit(data) {
+	 return request('/project/standard/checkIntegralLimit',data,'GET','application/json;charset=UTF-8');
+}
 
  
  

+ 10 - 2
pages_speaker/index.vue

@@ -231,7 +231,8 @@
 				// 选中的成员选项
 				selectedMember: 'all',
 				// 选中的成员选项文本
-				selectedMemberOption: '全员'
+				selectedMemberOption: '全员',
+				accountType: '',
 			}
 		},
 		watch: {
@@ -306,6 +307,12 @@
 				this.activeTab = '';
 			},
 			confirmFilters() {
+				console.log("选中内容", this.activeTab-1)
+				if (this.activeTab==1 ) {
+					this.accountType = 0
+				} else if (this.activeTab==2){
+					this.accountType = 1
+				}
 				// 验证日期范围
 				if (this.tempDateRange.startDate && this.tempDateRange.endDate) {
 					if (new Date(this.tempDateRange.startDate) > new Date(this.tempDateRange.endDate)) {
@@ -342,7 +349,8 @@
 						page: 1,
 						pageSize: 20,
 						doctorName: this.searchName,
-						status: this.currentTab
+						status: this.currentTab,
+						accountType: this.accountType
 					})
 					uni.hideLoading()
 					if (res.code === 200 && res.rows) {

+ 2 - 1
pages_task/approvalCenter.vue

@@ -500,7 +500,8 @@ import utils from '@/utils/common.js'
 							status: '',
 							sort: 0,
 							userId: userInfo.userId || '',
-							companyId: 1 || 0
+							companyId: userInfo.companyId || 0
+
 						}
 						const myInitiateRes = await getPendingAuditList(myInitiateParams)
 						this.topTabs[2].badge = myInitiateRes.code === 200 ? (myInitiateRes.total || 0) : 0

+ 7 - 1
pages_task/createTask.vue

@@ -306,7 +306,10 @@
 					taskType: '',
 					// companyUserId: '',
 					addRemark: false,
-					remark: ''
+					remark: '',
+					taskTypeDisplayText: '',
+					belongTypeDisplayText: ''
+					
 				},
 				originalCompanyData: null,
 				pickerTitle: '默认标题',
@@ -697,6 +700,8 @@
 						if (selectedType) {
 							this.formData.taskType = selectedType.dictValue;
 							console.log('设置formData.taskType为:', selectedType.dictValue);
+							this.formData.taskTypeDisplayText = this.taskTypeDisplayText;
+
 						} else {}
 					} else if (this.pickerTitle === '任务归属' && this.originalCompanyData) {
 						// e.value[0]是选中的文本值(deptName)
@@ -723,6 +728,7 @@
 							this.formData.projectId = selectedItem.id;
 							// 保存productId到表单
 							this.formData.productId = selectedItem.productId;
+							this.formData.belongTypeDisplayText = this.belongingProjectDisplayText;
 							console.log('设置formData.projectId为:', selectedItem.id);
 						} else {}
 					} else if (this.pickerTitle === '产品代码' && this.originalCompanyData) {

+ 91 - 61
pages_task/pointsSettings.vue

@@ -45,53 +45,53 @@
 				</view>
 
 				<!-- 任务信息 -->
-				<view class="overview-section">
-					<view class="row">
-						<text class="line"></text>
-						<view class="section-title">任务信息</view>
+			<view class="overview-section">
+				<view class="row">
+					<text class="line"></text>
+					<view class="section-title">任务信息</view>
+				</view>
+				<view class="info-list">
+					<view class="info-item">
+						<view class="info-label">项目归属:</view>
+						<view class="info-value">{{ taskFormData.belongTypeDisplayText || '-' }}</view>
 					</view>
-					<view class="info-list">
-						<view class="info-item">
-							<view class="info-label">项目归属:</view>
-							<view class="info-value">湖南省药学服务公司</view>
-						</view>
-						<view class="info-item">
-							<view class="info-label">项目任务:</view>
-							<view class="info-value">科普文章</view>
-						</view>
-						<view class="info-item">
-							<view class="info-label">项目时间:</view>
-							<view class="info-value">2025/11/19 14:12~2025/11/19 14:12</view>
-						</view>
+					<view class="info-item">
+						<view class="info-label">任务类型:</view>
+						<view class="info-value">{{ taskFormData.taskTypeDisplayText || '-' }}</view>
+					</view>
+					<view class="info-item">
+						<view class="info-label">项目时间:</view>
+						<view class="info-value">{{ taskFormData.planStartTime ? taskFormData.planStartTime.replace(/-/g, '/') : '-' }} ~ {{ taskFormData.planEndTime ? taskFormData.planEndTime.replace(/-/g, '/') : '-' }}</view>
 					</view>
 				</view>
+			</view>
 
-				<!-- 客户信息 -->
-				<view class="overview-section">
-					<view class="row">
-						<text class="line"></text>
-						<view class="section-title">客户信息</view>
+			<!-- 客户信息 -->
+			<view class="overview-section">
+				<view class="row">
+					<text class="line"></text>
+					<view class="section-title">客户信息</view>
+				</view>
+				<view class="customer-table">
+					<!-- 表头 -->
+					<view class="table-header">
+						<view class="table-cell" style="flex: 1.5;">姓名</view>
+						<view class="table-cell" style="flex: 1;">级别</view>
+						<view class="table-cell" style="flex: 1;">积分</view>
+						<view class="table-cell" style="flex: 2;">联系方式</view>
 					</view>
-					<view class="customer-table">
-						<!-- 表头 -->
-						<view class="table-header">
-							<view class="table-cell" style="flex: 1.5;">姓名</view>
-							<view class="table-cell" style="flex: 1;">级别</view>
-							<view class="table-cell" style="flex: 1;">积分</view>
-							<view class="table-cell" style="flex: 2;">联系方式</view>
-						</view>
 
-						<!-- 表格内容 -->
-						<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;">一级</view>
-								<view class="table-cell" style="flex: 1;">{{ customer.integral || '0' }}</view>
-								<view class="table-cell" style="flex: 2;">177****4235</view>
-							</view>
+					<!-- 表格内容 -->
+					<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;">{{ customer.level || '-' }}</view>
+							<view class="table-cell" style="flex: 1;">{{ customer.integral || '0' }}</view>
+							<view class="table-cell" style="flex: 2;">{{ customer.phone || customer.phonenumber || '-' }}</view>
 						</view>
 					</view>
 				</view>
+			</view>
 				<!-- 安全区域占位 -->
 				<view class="safe-area"></view>
 			</view>
@@ -112,6 +112,7 @@
 </template>
 
 <script>
+import { checkIntegralLimit } from '@/api/task.js'
 	import Step from '@/pages_task/components/step.vue'
 	import { addInfo} from '@/api/task.js';
 	export default {
@@ -119,29 +120,42 @@
 			Step
 		},
 		data() {
-				return {
-					currentText: [{
-							id: 1,
-							stepNumber: 1,
-							title: '填写任务'
-						},
-						{
-							id: 2,
-							stepNumber: 2,
-							title: '选择客户'
-						},
-						{
-							id: 3,
-							stepNumber: 3,
-							title: '积分设置'
-						}
-					],
-					currentStep: 3,
-					showOverview: false, // 控制概览弹窗显示
-					customerList: []
-				}
-			},
+					return {
+						currentText: [{
+								id: 1,
+								stepNumber: 1,
+								title: '填写任务'
+							},
+							{
+								id: 2,
+								stepNumber: 2,
+								title: '选择客户'
+							},
+							{
+								id: 3,
+								stepNumber: 3,
+								title: '积分设置'
+							}
+						],
+						currentStep: 3,
+						showOverview: false, // 控制概览弹窗显示
+						customerList: [],
+						userInfo: uni.getStorageSync('userInfo'),
+						taskFormData: {}, // 任务表单数据
+						selectedCustomers: [] // 选中的客户数据
+					}
+				},
 			onLoad() {
+				// 从本地存储中获取任务表单数据
+				const taskFormDataStr = uni.getStorageSync('taskFormData')
+				if (taskFormDataStr) {
+					try {
+						this.taskFormData = JSON.parse(taskFormDataStr)
+					} catch (e) {
+						console.error('解析任务表单数据失败:', e)
+					}
+				}
+				
 				// 从本地存储中获取选中的客户数据
 				const selectedCustomersData = uni.getStorageSync('selectedCustomers')
 				if (selectedCustomersData) {
@@ -149,6 +163,8 @@
 						const selectedCustomers = typeof selectedCustomersData === 'string' ? JSON.parse(selectedCustomersData) : selectedCustomersData
 						// 确保selectedCustomers是数组
 						if (Array.isArray(selectedCustomers)) {
+							// 保存原始选中的客户数据
+							this.selectedCustomers = selectedCustomers
 							// 将选中的客户数据转换为积分设置需要的格式
 							this.customerList = selectedCustomers.map(customer => ({
 								id: customer.id,
@@ -159,6 +175,7 @@
 								disabled: false
 							}))
 						}
+						this.checkIntegralLimitApi();//检查积分是否超出限制
 					} catch (e) {
 						console.error('解析客户数据失败:', e)
 					}
@@ -175,7 +192,20 @@
 			}
 		},
 		methods: {
-			
+			checkIntegralLimitApi(){
+				let params = {
+					companyId: this.userInfo.companyId,
+					projectId: this.userInfo.projectId,
+					doctorId: this.userInfo.userId,
+					pointNum: this.totalIntegral
+				}
+				checkIntegralLimit(params).then(res => {
+					if (res.code === 200 && res.data) {
+						// 将接口返回的数据映射为页面需要的格式
+						this.customerList = res.rows;
+					}
+				})
+			},
 			// 显示概览弹窗
 			showOverviewPopup() {
 				this.showOverview = true

+ 1 - 0
pages_task/selectCustomer.vue

@@ -114,6 +114,7 @@
 			}
 		},
 		methods: {
+			
 			async loadCustomerData() {
 				try {
 					this.loading = true

+ 1 - 1
pages_task/xlTask.vue

@@ -84,7 +84,7 @@
 							</view>
 							<view class="time-item">
 								<text>完成时间:</text>
-								<text>{{ item.updateTime || '-' }}</text>
+								<text>{{ item.finishAuditTime || '-' }}</text>
 							</view>
 							<view class="time-item">
 								<text>完成审核:</text>