Browse Source

修改 bug

master
王泽彦 5 months ago
parent
commit
8b7ef4c0db
  1. 2
      niucloud/app/model/resource_sharing/ResourceSharing.php
  2. 1
      niucloud/app/service/admin/campus_person_role/CampusPersonRoleService.php
  3. 84
      niucloud/app/service/api/apiService/CustomerResourcesService.php
  4. 30
      niucloud/app/service/api/apiService/ResourceSharingService.php
  5. 49
      start.sh
  6. 104
      uniapp/pages-coach/coach/my/salary.vue
  7. 94
      uniapp/pages-common/profile/personal_info.vue
  8. 11
      uniapp/pages-market/clue/index.vue
  9. BIN
      uniapp/static/images/no_data.png

2
niucloud/app/model/resource_sharing/ResourceSharing.php

@ -42,8 +42,6 @@ class ResourceSharing extends BaseModel
/**
* 搜索器:资源共享共享记录编号
* @param $value

1
niucloud/app/service/admin/campus_person_role/CampusPersonRoleService.php

@ -64,6 +64,7 @@ class CampusPersonRoleService extends BaseAdminService
->alias("a")
->join(['school_personnel' => 'b'],'a.person_id = b.id','left')
->where($where)
->where('b.deleted_at', 0) // 只显示未删除的人员
->with(['campus','personnel','sysRole','departments'])
->field($field)->order($order);

84
niucloud/app/service/api/apiService/CustomerResourcesService.php

@ -144,11 +144,11 @@ class CustomerResourcesService extends BaseApiService
'resource_id' => $resource_id,
'assignee_type' => 'user',
'assignee_id' => $assignee_id,
'is_primary' => 1,
'is_primary' => 0,
'assigned_by' => 0,
'assigned_at' => date("Y-m-d H:i:s"),
'campus_id' => $customer_resources_data['campus'],
'assigned_source' => 'api'
'assigned_source' => 'add'
]);
} catch (\Exception $e) {
// 如果插入失败,记录日志但不影响主流程
@ -164,7 +164,7 @@ class CustomerResourcesService extends BaseApiService
$student_data['user_id'] = $resource_id; // 设置user_id为新添加的客户资源ID
$student_data['updated_at'] = $date;
$student_data['created_at'] = $date;
$studentAdd = SchoolStudent::create($student_data);
if (!$studentAdd) {
Db::rollback();
@ -720,7 +720,7 @@ class CustomerResourcesService extends BaseApiService
// 奖励配置(可以后续移到配置文件中)
$rewardConfig = [
'gift_name' => '转介绍奖励',
'gift_type' => 'referral_reward',
'gift_type' => 'referral_reward',
'reward_amount' => 100, // 奖励金额,可配置
];
@ -740,7 +740,7 @@ class CustomerResourcesService extends BaseApiService
];
Db::table('shcool_resources_gift')->insert($giftData);
Log::info("转介绍奖励发放成功:推荐人ID $referral_resource_id,新客户ID $new_resource_id");
} catch (\Exception $e) {
@ -754,36 +754,36 @@ class CustomerResourcesService extends BaseApiService
if (empty($data['id'])) {
return ['code' => false, 'msg' => '缺少必要参数id'];
}
try {
// 更新school_student_courses表中的字段
$update_data = [];
// 更新主教练ID
if (isset($data['main_coach_id'])) {
$update_data['main_coach_id'] = $data['main_coach_id'];
}
// 更新助教IDs
if (isset($data['assistant_ids'])) {
$update_data['assistant_ids'] = $data['assistant_ids'];
}
// 更新教务ID
if (isset($data['education_id'])) {
$update_data['education_id'] = $data['education_id'];
}
// 如果没有需要更新的数据,直接返回成功
if (empty($update_data)) {
return ['code' => true, 'msg' => '更新成功'];
}
// 执行更新操作
$res = \think\facade\Db::name('student_courses')
->where('id', $data['id'])
->update($update_data);
if ($res !== false) {
return ['code' => true, 'msg' => '更新成功'];
} else {
@ -803,11 +803,11 @@ class CustomerResourcesService extends BaseApiService
{
try {
$resource_id = $where['resource_id'] ?? 0;
if (empty($resource_id)) {
return ['code' => false, 'msg' => '缺少客户资源ID'];
}
// 查询赠品记录,同时关联查询赠送人信息
$gift_records = Db::table('shcool_resources_gift')
->alias('g')
@ -824,7 +824,7 @@ class CustomerResourcesService extends BaseApiService
->order('g.create_time', 'desc')
->select()
->toArray();
// 处理数据格式
$formatted_records = [];
foreach ($gift_records as $record) {
@ -846,13 +846,13 @@ class CustomerResourcesService extends BaseApiService
'create_time' => date('Y-m-d H:i:s', $record['create_time'])
];
}
return [
'code' => true,
'msg' => '获取成功',
'data' => $formatted_records
];
} catch (\Exception $e) {
Log::error('获取赠品记录失败:' . $e->getMessage());
return [
@ -876,7 +876,7 @@ class CustomerResourcesService extends BaseApiService
'activity_reward' => '活动奖励',
'other' => '其他'
];
return $type_map[$gift_type] ?? $gift_type;
}
@ -892,7 +892,7 @@ class CustomerResourcesService extends BaseApiService
1 => '可使用',
2 => '已使用'
];
return $status_map[$gift_status] ?? '未知状态';
}
@ -986,7 +986,7 @@ class CustomerResourcesService extends BaseApiService
'msg' => '操作失败',
'data' => []
];
try {
// 构建查询条件
$query = Db::table('school_student')
@ -994,17 +994,17 @@ class CustomerResourcesService extends BaseApiService
->leftJoin('school_student_courses sc', 's.id = sc.student_id')
->where('s.deleted_at', 0)
->where('s.status', 1); // 只查询状态正常的学员
// 按姓名搜索
if (!empty($where['name'])) {
$query->where('s.name', 'like', "%{$where['name']}%");
}
// 按手机号搜索
if (!empty($where['phone_number'])) {
$query->where('s.contact_phone', 'like', "%{$where['phone_number']}%");
}
// 获取学员基本信息和课程信息
$students = $query
->field([
@ -1033,22 +1033,22 @@ class CustomerResourcesService extends BaseApiService
->group('s.id')
->order('s.created_at DESC')
->select();
if (!$students) {
$res['msg'] = '暂无学员数据';
return $res;
}
// 处理数据格式,计算课程进度
$result = [];
foreach ($students as $student) {
$totalHours = intval($student['total_hours'] ?: 0) + intval($student['gift_hours'] ?: 0);
$usedHours = intval($student['use_total_hours'] ?: 0) + intval($student['use_gift_hours'] ?: 0);
$remainingHours = $totalHours - $usedHours;
// 判断是否为体验课学员
$isTrialStudent = empty($student['student_course_id']);
// 判断是否需要续费
$needsRenewal = false;
if (!$isTrialStudent) {
@ -1064,7 +1064,7 @@ class CustomerResourcesService extends BaseApiService
$needsRenewal = true;
}
}
$result[] = [
'id' => $student['student_id'],
'student_id' => $student['student_id'],
@ -1108,16 +1108,16 @@ class CustomerResourcesService extends BaseApiService
'expiryDate' => $student['end_date']
];
}
$res['code'] = 1;
$res['msg'] = '操作成功';
$res['data'] = $result;
} catch (\Exception $e) {
Log::error('搜索学员失败:' . $e->getMessage());
$res['msg'] = '搜索学员失败:' . $e->getMessage();
}
return $res;
}
@ -1133,16 +1133,16 @@ class CustomerResourcesService extends BaseApiService
'msg' => '操作失败',
'data' => []
];
try {
$resourceId = $where['resource_id'] ?? 0;
$studentId = $where['student_id'] ?? 0;
if (!$resourceId && !$studentId) {
$res['msg'] = '缺少必要参数';
return $res;
}
// 构建查询条件 - 不限制status状态
$query = Db::table('school_student')
->alias('s')
@ -1150,7 +1150,7 @@ class CustomerResourcesService extends BaseApiService
->leftJoin('school_customer_resources cr', 's.user_id = cr.id')
->where('s.deleted_at', 0)
->where('s.id', $studentId);
// 获取学员基本信息和课程信息
$student = $query
->field([
@ -1180,7 +1180,7 @@ class CustomerResourcesService extends BaseApiService
'sc.course_id'
])
->find();
if (!$student) {
$res['msg'] = '学员不存在';
return $res;
@ -1190,10 +1190,10 @@ class CustomerResourcesService extends BaseApiService
$totalHours = intval($student['total_hours'] ?: 0) + intval($student['gift_hours'] ?: 0);
$usedHours = intval($student['use_total_hours'] ?: 0) + intval($student['use_gift_hours'] ?: 0);
$remainingHours = $totalHours - $usedHours;
// 判断是否为体验课学员
$isTrialStudent = empty($student['student_course_id']);
// 判断是否需要续费
$needsRenewal = false;
if (!$isTrialStudent) {
@ -1209,7 +1209,7 @@ class CustomerResourcesService extends BaseApiService
$needsRenewal = true;
}
}
$result = [
'id' => $student['student_id'],
'student_id' => $student['student_id'],
@ -1254,15 +1254,15 @@ class CustomerResourcesService extends BaseApiService
'usedHours' => $usedHours,
'expiryDate' => $student['end_date']
];
$res['code'] = 1;
$res['msg'] = '操作成功';
$res['data'] = $result;
} catch (\Exception $exception) {
$res['msg'] = '获取预设学员信息失败:' . $exception->getMessage();
}
return $res;
}
}

30
niucloud/app/service/api/apiService/ResourceSharingService.php

@ -643,18 +643,17 @@ class ResourceSharingService extends BaseApiService
$consultant_names = $personnel->whereIn('id', $consultant_ids)->column('name', 'id');
}
// 查询销售老师信息(从资源分配表获取assigned_by=0的记录)
// 查询销售老师信息(从资源分配表获取assigned_source为auto_allocation或api的最新记录)
$sales_teachers = [];
if (!empty($resource_ids)) {
$assignment_model = new \app\model\resource_assignment\ResourceAssignment();
// 查询每个资源assigned_by=0的最新一条记录
// 查询每个资源assigned_source为auto_allocation或api的最新一条记录
$sales_assignments = [];
foreach ($resource_ids as $resource_id) {
$latest_assignment = $assignment_model
->where('resource_id', $resource_id)
->where('assignee_type', 'user')
->where('assigned_by', 0)
->whereIn('assigned_source', ['auto_allocation', 'api'])
->order('assigned_at', 'desc')
->field('assignee_id')
->find();
@ -678,17 +677,18 @@ class ResourceSharingService extends BaseApiService
}
}
// 查询市场老师信息(从资源分配表获取assigned_source为auto_allocation或api的最新记录)
// 查询市场老师信息(从资源分配表获取assigned_by=0且assignee_type='user'的记录)
$market_teachers = [];
if (!empty($resource_ids)) {
$assignment_model = new \app\model\resource_assignment\ResourceAssignment();
// 查询每个资源assigned_source为auto_allocation或api的最新一条记录
// 查询每个资源assigned_by=0且assignee_type='user'的最新一条记录
$market_assignments = [];
foreach ($resource_ids as $resource_id) {
$latest_assignment = $assignment_model
->where('resource_id', $resource_id)
->whereIn('assigned_source', ['auto_allocation', 'api'])
->where('assignee_type', 'user')
->where('assigned_by', 0)
->order('assigned_at', 'desc')
->field('assignee_id')
->find();
@ -1266,18 +1266,17 @@ class ResourceSharingService extends BaseApiService
$consultant_names = $personnel->whereIn('id', $consultant_ids)->column('name', 'id');
}
// 查询销售老师信息(从资源分配表获取assigned_by=0的记录)
// 查询销售老师信息(从资源分配表获取assigned_source为auto_allocation或api的最新记录)
$sales_teachers = [];
if (!empty($resource_ids)) {
$assignment_model = new \app\model\resource_assignment\ResourceAssignment();
// 查询每个资源assigned_by=0的最新一条记录
// 查询每个资源assigned_source为auto_allocation或api的最新一条记录
$sales_assignments = [];
foreach ($resource_ids as $resource_id) {
$latest_assignment = $assignment_model
->where('resource_id', $resource_id)
->where('assignee_type', 'user')
->where('assigned_by', 0)
->whereIn('assigned_source', ['auto_allocation', 'api'])
->order('assigned_at', 'desc')
->field('assignee_id')
->find();
@ -1301,17 +1300,18 @@ class ResourceSharingService extends BaseApiService
}
}
// 查询市场老师信息(从资源分配表获取assigned_source为auto_allocation或api的最新记录)
// 查询市场老师信息(从资源分配表获取assigned_by=0且assignee_type='user'的记录)
$market_teachers = [];
if (!empty($resource_ids)) {
$assignment_model = new \app\model\resource_assignment\ResourceAssignment();
// 查询每个资源assigned_source为auto_allocation或api的最新一条记录
// 查询每个资源assigned_by=0且assignee_type='user'的最新一条记录
$market_assignments = [];
foreach ($resource_ids as $resource_id) {
$latest_assignment = $assignment_model
->where('resource_id', $resource_id)
->whereIn('assigned_source', ['auto_allocation', 'api'])
->where('assignee_type', 'user')
->where('assigned_by', 0)
->order('assigned_at', 'desc')
->field('assignee_id')
->find();
@ -1524,7 +1524,7 @@ class ResourceSharingService extends BaseApiService
'resource_id' => $resource_id,
'assignee_type' => $assignee_type,
'assignee_id' => $assignee_id,
'is_primary' => $is_primary ? 1 : 0,
'is_primary' => 1,
'assigned_by' => $assigned_by,
'assigned_at' => date('Y-m-d H:i:s'),
'campus_id' => $campus_id,

49
start.sh

@ -173,6 +173,26 @@ EOF
# 启动服务
start_services() {
print_message "启动 ${PROJECT_NAME} 服务..."
# 检查是否存在冲突的容器并清理
print_message "检查并清理可能冲突的容器..."
# 检查并停止冲突的容器
for container in niucloud_mysql niucloud_redis niucloud_php niucloud_nginx niucloud_composer niucloud_node; do
if docker ps -a --format "table {{.Names}}" | grep -q "^${container}$"; then
print_warning "发现已存在的容器: $container,正在清理..."
docker stop $container 2>/dev/null || true
docker rm $container 2>/dev/null || true
fi
done
# 清理可能存在的网络
if docker network ls --format "table {{.Name}}" | grep -q "^zhjwxt_niucloud_network$"; then
print_warning "发现已存在的网络,正在清理..."
docker network rm zhjwxt_niucloud_network 2>/dev/null || true
fi
# 启动服务
docker-compose up -d
}
@ -182,6 +202,31 @@ stop_services() {
docker-compose down
}
# 强制清理所有容器和网络
force_cleanup() {
print_message "强制清理所有相关容器和网络..."
# 停止并删除所有相关容器
for container in niucloud_mysql niucloud_redis niucloud_php niucloud_nginx niucloud_composer niucloud_node; do
if docker ps -a --format "table {{.Names}}" | grep -q "^${container}$"; then
print_warning "正在删除容器: $container"
docker stop $container 2>/dev/null || true
docker rm $container 2>/dev/null || true
fi
done
# 删除网络
if docker network ls --format "table {{.Name}}" | grep -q "^zhjwxt_niucloud_network$"; then
print_warning "正在删除网络: zhjwxt_niucloud_network"
docker network rm zhjwxt_niucloud_network 2>/dev/null || true
fi
# 删除未使用的网络
docker network prune -f 2>/dev/null || true
print_message "清理完成!"
}
# 重启服务
restart_services() {
print_message "重启 ${PROJECT_NAME} 服务..."
@ -241,6 +286,7 @@ show_help() {
echo " status 查看服务状态"
echo " logs 查看所有服务日志"
echo " logs <服务名> 查看指定服务日志"
echo " cleanup 强制清理所有容器和网络"
echo " init 初始化项目"
echo " help 显示此帮助信息"
}
@ -265,6 +311,9 @@ main() {
logs)
view_logs "$2"
;;
cleanup)
force_cleanup
;;
init)
init_project
;;

104
uniapp/pages-coach/coach/my/salary.vue

@ -2,7 +2,7 @@
<template>
<view class="main_box">
<view class="main_section">
<!-- 筛选条件 -->
<view class="filter_section">
<view class="filter_item">
@ -18,9 +18,9 @@
<!-- 工资条列表 -->
<view class="salary_list" v-if="salaryList.length > 0">
<view
class="salary_item"
v-for="(item, index) in salaryList"
<view
class="salary_item"
v-for="(item, index) in salaryList"
:key="item.id"
@click="viewSalaryDetail(item)"
>
@ -30,7 +30,7 @@
{{ getStatusText(item.status) }}
</view>
</view>
<view class="salary_content">
<view class="salary_row">
<text class="label">基础工资:</text>
@ -49,7 +49,7 @@
<text class="value net_salary">¥{{ formatMoney(item.net_salary) }}</text>
</view>
</view>
<view class="salary_footer">
<text class="view_detail">点击查看详情 ></text>
</view>
@ -58,7 +58,7 @@
<!-- 暂无数据 -->
<view class="no_data" v-else-if="!loading">
<image class="no_data_icon" src="/static/images/no_data.png" mode="aspectFit"></image>
<image class="no_data_icon" src="@/static/images/no_data.png" mode="aspectFit"></image>
<text class="no_data_text">暂无工资数据</text>
</view>
@ -75,7 +75,7 @@
<text class="modal_title">工资详情</text>
<text class="modal_close" @click="closeDetail">×</text>
</view>
<view class="modal_body" v-if="salaryDetail">
<view class="detail_section">
<view class="section_title">基础信息</view>
@ -190,7 +190,7 @@ export default {
if (this.selectedMonth) {
params.salary_month = this.selectedMonth;
}
const res = await memberApi.getSalaryList(params);
if (res.code === 1) {
this.salaryList = res.data.data || [];
@ -294,14 +294,14 @@ export default {
.filter_item {
flex: 1;
.picker_display {
display: flex;
justify-content: space-between;
align-items: center;
color: #D7D7D7;
font-size: 28rpx;
.picker_arrow {
color: #25a18b;
font-size: 24rpx;
@ -326,7 +326,7 @@ export default {
border-radius: 10rpx;
padding: 30rpx;
margin-bottom: 20rpx;
.salary_header {
display: flex;
justify-content: space-between;
@ -334,51 +334,51 @@ export default {
margin-bottom: 20rpx;
padding-bottom: 15rpx;
border-bottom: 1rpx solid #555;
.salary_month {
color: #fff;
font-size: 32rpx;
font-weight: bold;
}
.salary_status {
padding: 8rpx 16rpx;
border-radius: 20rpx;
font-size: 24rpx;
&.status_pending {
background: rgba(255, 165, 0, 0.2);
color: #FFA500;
}
&.status_paid {
background: rgba(34, 197, 94, 0.2);
color: #22c55e;
}
}
}
.salary_content {
.salary_row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15rpx;
.label {
color: #D7D7D7;
font-size: 26rpx;
}
.value {
color: #fff;
font-size: 28rpx;
&.highlight {
color: #25a18b;
font-weight: bold;
}
&.net_salary {
color: #22c55e;
font-weight: bold;
@ -387,13 +387,13 @@ export default {
}
}
}
.salary_footer {
text-align: center;
margin-top: 20rpx;
padding-top: 15rpx;
border-top: 1rpx solid #555;
.view_detail {
color: #25a18b;
font-size: 24rpx;
@ -404,18 +404,24 @@ export default {
/* 暂无数据 */
.no_data {
text-align: center;
padding: 100rpx 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 0;
color: #888;
.no_data_icon {
width: 150rpx;
height: 150rpx;
margin-bottom: 30rpx;
width: 180rpx;
height: 180rpx;
margin-bottom: 40rpx;
opacity: 0.8;
}
.no_data_text {
font-size: 28rpx;
font-size: 30rpx;
color: #999;
margin-top: 10rpx;
}
}
@ -439,27 +445,27 @@ export default {
align-items: center;
justify-content: center;
z-index: 1000;
.modal_content {
background: #434544;
border-radius: 15rpx;
width: 90%;
max-height: 80%;
overflow: hidden;
.modal_header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #555;
.modal_title {
color: #fff;
font-size: 32rpx;
font-weight: bold;
}
.modal_close {
color: #888;
font-size: 40rpx;
@ -470,15 +476,15 @@ export default {
justify-content: center;
}
}
.modal_body {
max-height: 60vh;
overflow-y: auto;
padding: 30rpx;
.detail_section {
margin-bottom: 40rpx;
.section_title {
color: #25a18b;
font-size: 28rpx;
@ -487,50 +493,50 @@ export default {
padding-bottom: 10rpx;
border-bottom: 1rpx solid #555;
}
.detail_row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15rpx;
.detail_label {
color: #D7D7D7;
font-size: 26rpx;
}
.detail_value {
color: #fff;
font-size: 26rpx;
&.highlight {
color: #25a18b;
font-weight: bold;
}
&.net_salary {
color: #22c55e;
font-weight: bold;
}
&.text_red {
color: #f56565;
}
}
}
&.highlight_row {
background: rgba(37, 161, 139, 0.1);
padding: 15rpx;
border-radius: 8rpx;
}
&.net_salary_row {
background: rgba(34, 197, 94, 0.1);
padding: 15rpx;
border-radius: 8rpx;
}
.detail_remarks {
background: #555;
padding: 20rpx;
@ -542,5 +548,5 @@ export default {
}
}
}
}
</style>
}
</style>

94
uniapp/pages-common/profile/personal_info.vue

@ -9,8 +9,8 @@
</view>
<view class="nav-title">个人资料</view>
<view class="nav-right">
<text class="save-btn" @click="saveProfile" v-if="isEditing">保存</text>
<text class="edit-btn" @click="toggleEdit" v-else>编辑</text>
<text class="action-btn" @click="saveProfile" v-if="isEditing">保存</text>
<text class="action-btn" @click="toggleEdit" v-else>编辑</text>
</view>
</view>
</view>
@ -279,18 +279,7 @@
<text v-else class="value">{{ formData.info.name || '未填写' }}</text>
</view>
<!-- 门店 -->
<view class="form-item">
<text class="label">门店</text>
<input
v-if="isEditing"
v-model="formData.info.store"
placeholder="请输入门店"
class="input-field"
/>
<text v-else class="value">{{ formData.info.store || '未填写' }}</text>
</view>
<!-- 民族 -->
<view class="form-item">
<text class="label">民族</text>
@ -470,6 +459,8 @@ export default {
return {
isEditing: false,
loading: false,
//
originalData: {},
formData: {
head_img: '',
name: '',
@ -493,7 +484,6 @@ export default {
// personnel_info
info: {
name: '',
store: '',
ethnicity: '',
age: '',
tenure: '',
@ -533,14 +523,69 @@ export default {
await this.loadUserProfile()
},
methods: {
//
hasUnsavedChanges() {
if (!this.isEditing) return false
//
const currentData = JSON.stringify(this.formData)
const originalData = JSON.stringify(this.originalData)
return currentData !== originalData
},
//
goBack() {
uni.navigateBack()
//
if (this.isEditing && this.hasUnsavedChanges()) {
uni.showModal({
title: '确认离开',
content: '离开这个页面后未保存的内容会丢失',
confirmText: '离开',
cancelText: '取消',
success: (res) => {
if (res.confirm) {
// 退
this.isEditing = false
//
this.formData = JSON.parse(JSON.stringify(this.originalData))
uni.navigateBack()
}
//
}
})
} else {
//
uni.navigateBack()
}
},
//
toggleEdit() {
this.isEditing = !this.isEditing
if (this.isEditing) {
// 退
if (this.hasUnsavedChanges()) {
uni.showModal({
title: '确认退出编辑',
content: '退出编辑后未保存的内容会丢失',
confirmText: '退出',
cancelText: '取消',
success: (res) => {
if (res.confirm) {
// 退
this.formData = JSON.parse(JSON.stringify(this.originalData))
this.isEditing = false
}
//
}
})
} else {
// 退
this.isEditing = false
}
} else {
//
this.isEditing = true
}
},
//
@ -607,6 +652,8 @@ export default {
...(data.info || {})
}
}
//
this.originalData = JSON.parse(JSON.stringify(this.formData))
} else {
uni.showToast({
title: res.msg || '获取用户信息失败',
@ -663,7 +710,6 @@ export default {
id_card_back: this.formData.id_card_back,
info: {
name: this.formData.info.name,
store: this.formData.info.store,
ethnicity: this.formData.info.ethnicity,
age: this.formData.info.age,
politics: this.formData.info.politics,
@ -693,6 +739,8 @@ export default {
icon: 'success'
})
this.isEditing = false
//
this.originalData = JSON.parse(JSON.stringify(this.formData))
} else {
uni.showToast({
title: res.msg || '保存失败',
@ -968,16 +1016,22 @@ export default {
}
.nav-right {
width: 60px;
width: 80px; /* 增加宽度避免换行 */
display: flex;
align-items: center;
justify-content: flex-end;
/* 微信小程序胶囊按钮适配 */
/* #ifdef MP-WEIXIN */
margin-right: 100px; /* 为胶囊按钮预留足够空间 */
/* #endif */
}
.edit-btn, .save-btn {
.action-btn {
color: #29d3b4;
font-size: 14px;
padding: 5px 10px;
white-space: nowrap; /* 防止文字换行 */
display: inline-block;
}
.content-wrapper {

11
uniapp/pages-market/clue/index.vue

@ -85,11 +85,11 @@
<view class="info-column">
<view class="card-con">
<text class="info-label">市场老师</text>
<text class="info-value">{{ v.customerResource.sales_teacher || '-' }}</text>
<text class="info-value">{{ v.customerResource.market_teacher || '-' }}</text>
</view>
<view class="card-con">
<text class="info-label">销售老师</text>
<text class="info-value">{{ v.customerResource.market_teacher || '-' }}</text>
<text class="info-value">{{ v.customerResource.sales_teacher || '-' }}</text>
</view>
<view class="card-con">
<text class="info-label">是否有效</text>
@ -188,7 +188,7 @@
<view class="status-section">
<view class="assign-status">
<span class="assigned-to" :class="v.shared_by_name === '未分配' ? 'unassigned' : 'assigned'">
{{v.shared_by_name}}
{{v.shared_by_name === '未分配' ? '未分配' : '已分配'}}
</span>
</view>
</view>
@ -221,12 +221,12 @@
<view class="info-column">
<view class="card-con">
<text class="info-label">市场老师</text>
<text class="info-value">{{ v.customerResource.sales_teacher || '-' }}</text>
<text class="info-value">{{ v.customerResource.market_teacher || '-' }}</text>
</view>
<view class="card-con">
<text class="info-label">分配状态</text>
<text class="info-value assigned-to" :class="v.shared_by_name === '未分配' ? 'unassigned' : 'assigned'">
{{v.shared_by_name}}
{{v.shared_by_name === '未分配' ? '未分配' : v.shared_by_name + '分配了资源'}}
</text>
</view>
</view>
@ -1935,7 +1935,6 @@
border-radius: 20rpx;
width: 90%;
max-width: 700rpx;
max-height: 80vh;
overflow: hidden;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.4);
}

BIN
uniapp/static/images/no_data.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Loading…
Cancel
Save