|
|
@@ -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
|