This commit is contained in:
Vinjor 2025-11-27 14:35:23 +08:00
parent dbe624497f
commit 2fe99b7e9e
19 changed files with 81 additions and 47 deletions

View File

@ -18,6 +18,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.cus.domain.CusMainSeas; import com.ruoyi.cus.domain.CusMainSeas;
import com.ruoyi.cus.domain.CusManager;
import com.ruoyi.cus.domain.CusTimeAxis; import com.ruoyi.cus.domain.CusTimeAxis;
import com.ruoyi.cus.service.*; import com.ruoyi.cus.service.*;
import com.ruoyi.cus.vo.CusMainVO; import com.ruoyi.cus.vo.CusMainVO;
@ -299,4 +300,22 @@ public class CusMainController extends BaseController {
return success(); return success();
} }
/**
* 更新客户管理人员信息
*/
@Log(title = "客户管理信息", businessType = BusinessType.UPDATE)
@PutMapping("/updateUser")
public AjaxResult updateUser(@RequestBody CusMain cusMain) {
SysUser sysUser = SecurityUtils.getLoginUser().getUser();
CusMain oldData = cusMainService.getById(cusMain.getId());
cusMainService.updateById(cusMain);
//时间轴信息
CusTimeAxis cusTimeAxis = new CusTimeAxis();
cusTimeAxis.setBusiMaxCatg("客户");
cusTimeAxis.setBusiCatg("修改");
cusTimeAxis.setContent("移交客户,操作人:"+sysUser.getNickName()+",原业务员:"+oldData.getUserName()+",新业务员:"+cusMain.getUserName());
cusTimeAxis.setCusId(cusMain.getId());
cusTimeAxisService.saveNewTimeAxis(cusTimeAxis);
return success();
}
} }

View File

@ -86,15 +86,6 @@ public class CusManagerController extends BaseController
return toAjax(cusManagerService.save(cusManager)); return toAjax(cusManagerService.save(cusManager));
} }
/**
* 更新客户管理人员信息
*/
@Log(title = "客户管理信息", businessType = BusinessType.UPDATE)
@PutMapping("/updateUser")
public AjaxResult updateUser(@RequestBody CusManager cusManager) {
cusManagerService.updateByCusId(cusManager);
return success();
}
/** /**
* 删除客户管理信息 * 删除客户管理信息

View File

@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.base.domain.BaseCountry; import com.ruoyi.base.domain.BaseCountry;
import com.ruoyi.base.service.IBaseCountryService; import com.ruoyi.base.service.IBaseCountryService;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.DlBaseEntity; import com.ruoyi.common.core.domain.DlBaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.domain.model.LoginUser;
@ -66,6 +67,7 @@ public class CusMainServiceImpl extends ServiceImpl<CusMainMapper,CusMain> impl
private DateTimeUtil dateTimeUtil; private DateTimeUtil dateTimeUtil;
@Override @Override
@DataScope(deptAlias = "cm", userAlias = "cm")
public IPage<MainVO> queryListPage(MainVO pageReqVO, Page<CusMain> page) { public IPage<MainVO> queryListPage(MainVO pageReqVO, Page<CusMain> page) {
IPage<MainVO> list = cusMainMapper.queryListPage(pageReqVO, page); IPage<MainVO> list = cusMainMapper.queryListPage(pageReqVO, page);
list.getRecords().forEach(item->{ list.getRecords().forEach(item->{

View File

@ -37,10 +37,8 @@ public class SysDeptController extends BaseController
/** /**
* 获取部门列表 * 获取部门列表
*/ */
@PreAuthorize("@ss.hasPermi('system:dept:list')")
@GetMapping("/list") @GetMapping("/list")
public AjaxResult list(SysDept dept) public AjaxResult list(SysDept dept) {
{
List<SysDept> depts = deptService.selectDeptList(dept); List<SysDept> depts = deptService.selectDeptList(dept);
return success(depts); return success(depts);
} }

View File

@ -40,7 +40,6 @@ public class SysDictDataController extends BaseController
@Autowired @Autowired
private ISysDictTypeService dictTypeService; private ISysDictTypeService dictTypeService;
@PreAuthorize("@ss.hasPermi('system:dict:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SysDictData dictData) public TableDataInfo list(SysDictData dictData)
{ {

View File

@ -6,9 +6,9 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://8.220.74.244:3306/dl_crm_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://rm-bp1msd0a4kq4t7a66lo.mysql.rds.aliyuncs.com:3306/dl_crm_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: crm username: csd_rw
password: Aa123456. password: Csd2025#123
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

View File

@ -82,6 +82,7 @@
<if test="entity.cusType!=null and entity.cusType!=''"> <if test="entity.cusType!=null and entity.cusType!=''">
AND cm.cus_type = #{entity.cusType} AND cm.cus_type = #{entity.cusType}
</if> </if>
${entity.params.dataScope}
GROUP BY GROUP BY
cm.id cm.id
ORDER BY ORDER BY

View File

@ -2,6 +2,8 @@ package com.ruoyi.framework.aspectj;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.DlBaseEntity;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Before;
@ -161,11 +163,14 @@ public class DataScopeAspect
if (StringUtils.isNotBlank(sqlString.toString())) if (StringUtils.isNotBlank(sqlString.toString()))
{ {
Object params = joinPoint.getArgs()[0]; Object params = joinPoint.getArgs()[0];
if (StringUtils.isNotNull(params) && params instanceof BaseEntity) if (StringUtils.isNotNull(params) && params instanceof BaseEntity) {
{
BaseEntity baseEntity = (BaseEntity) params; BaseEntity baseEntity = (BaseEntity) params;
baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")"); baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
} }
if (StringUtils.isNotNull(params) && params instanceof DlBaseEntity) {
DlBaseEntity baseEntity = (DlBaseEntity) params;
baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
}
} }
} }

View File

@ -98,3 +98,13 @@ export function getOtherInfo(query) {
params: query params: query
}) })
} }
// 更新客户管理人员信息
export function updateUser(data) {
return request({
url: '/cus/main/updateUser',
method: 'put',
data: data
})
}

View File

@ -26,15 +26,6 @@ export function addManager(data) {
}) })
} }
// 更新客户管理人员信息
export function updateUser(data) {
return request({
url: '/cus/manager/updateUser',
method: 'put',
data: data
})
}
// 删除客户管理信息 // 删除客户管理信息
export function delManager(id) { export function delManager(id) {
return request({ return request({

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -2,12 +2,12 @@
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<transition name="sidebarLogoFade"> <transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" /> <img v-if="logo" :src="logoImgIcon" class="sidebar-logo-icon" />
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1> <!-- <h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>-->
</router-link> </router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/"> <router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" /> <img v-if="logo" :src="logo" class="sidebar-logo" />
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1> <!-- <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>-->
</router-link> </router-link>
</transition> </transition>
</div> </div>
@ -15,6 +15,7 @@
<script> <script>
import logoImg from '@/assets/logo/logo.png' import logoImg from '@/assets/logo/logo.png'
import logoImgIcon from '@/assets/logo/logo-icon.png'
import variables from '@/assets/styles/variables.scss' import variables from '@/assets/styles/variables.scss'
export default { export default {
@ -35,6 +36,7 @@ export default {
}, },
data() { data() {
return { return {
logoImgIcon:logoImgIcon,
title: process.env.VUE_APP_TITLE, title: process.env.VUE_APP_TITLE,
logo: logoImg logo: logoImg
} }
@ -55,8 +57,8 @@ export default {
.sidebar-logo-container { .sidebar-logo-container {
position: relative; position: relative;
width: 100%; width: 100%;
height: 50px; height: 60px;
line-height: 50px; line-height: 70px;
background: #2b2f3a; background: #2b2f3a;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
@ -66,6 +68,12 @@ export default {
width: 100%; width: 100%;
& .sidebar-logo { & .sidebar-logo {
width: 155px;
height: auto;
vertical-align: middle;
margin-right: 12px;
}
& .sidebar-logo-icon {
width: 32px; width: 32px;
height: 32px; height: 32px;
vertical-align: middle; vertical-align: middle;

View File

@ -103,21 +103,21 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-circle-check" icon="el-icon-circle-check"
@click="handleComplete(scope.row,true)" @click.stop="handleComplete(scope.row,true)"
>完成</el-button> >完成</el-button>
<el-button <el-button
v-else v-else
size="mini" size="mini"
type="text" type="text"
icon="el-icon-circle-close" icon="el-icon-circle-close"
@click="handleComplete(scope.row,false)" @click.stop="handleComplete(scope.row,false)"
>取消完成</el-button> >取消完成</el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click.stop="handleDelete(scope.row)"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -539,7 +539,6 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.loading=true
let dataObj = JSON.parse(JSON.stringify(this.formData)) let dataObj = JSON.parse(JSON.stringify(this.formData))
// //
if(dataObj.contact.length>0){ if(dataObj.contact.length>0){
@ -555,6 +554,7 @@ export default {
this.$message.warning("请至少添加一个联系人") this.$message.warning("请至少添加一个联系人")
return return
} }
this.loading=true
addMain(dataObj).then(response => { addMain(dataObj).then(response => {
if(response.code==200){ if(response.code==200){
this.$message.success("新增成功"); this.$message.success("新增成功");

View File

@ -86,7 +86,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed label="客户名称" align="center" prop="fullName" width="130"> <el-table-column fixed label="客户名称" align="center" prop="fullName" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :content="scope.row.fullName" placement="top" effect="dark"> <el-tooltip :content="scope.row.fullName" placement="top" effect="dark">
<div class="text-ellipsis-single">{{ scope.row.fullName }}</div> <div class="text-ellipsis-single">{{ scope.row.fullName }}</div>
@ -286,7 +286,7 @@
<script> <script>
import { listMain, getMain, delMain, addMain, updateMain ,setIfStar,moveToSeas} from '@/api/cus/main' import { listMain, getMain, delMain, addMain, updateMain ,setIfStar,moveToSeas} from '@/api/cus/main'
import { updateUser} from '@/api/cus/manager' import { updateUser} from '@/api/cus/main'
import DrawForm from './drawForm' import DrawForm from './drawForm'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import FollowForm from '../follow/followForm' import FollowForm from '../follow/followForm'
@ -545,7 +545,7 @@ export default {
*/ */
chooseUserFun(userList){ chooseUserFun(userList){
let dataObj = { let dataObj = {
cusId: this.cusMain.id, id: this.cusMain.id,
userId: userList[0].userId, userId: userList[0].userId,
userName: userList[0].nickName userName: userList[0].nickName
} }
@ -626,5 +626,10 @@ export default {
.el-tag { .el-tag {
border: 1px solid transparent !important; border: 1px solid transparent !important;
} }
::v-deep body .el-table__fixed-right, body .el-table__fixed-left {
z-index: 10;
background-color: #fff;
}
</style> </style>

View File

@ -972,7 +972,6 @@ export default {
// //
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
this.loading=true
let dataObj = JSON.parse(JSON.stringify(this.formData)) let dataObj = JSON.parse(JSON.stringify(this.formData))
// //
if(dataObj.contact.length>0){ if(dataObj.contact.length>0){
@ -988,6 +987,7 @@ export default {
this.$message.warning("请至少添加一个联系人") this.$message.warning("请至少添加一个联系人")
return return
} }
this.loading=true
addMain(dataObj).then(response => { addMain(dataObj).then(response => {
if(response.code==200){ if(response.code==200){
this.$message.success("操作成功"); this.$message.success("操作成功");

View File

@ -221,7 +221,7 @@
</template> </template>
<script> <script>
import { updateUser} from '@/api/cus/manager' import { updateUser} from '@/api/cus/main'
import { delMain,moveToSeas} from "@/api/cus/main"; import { delMain,moveToSeas} from "@/api/cus/main";
import { delSeas,moveToMain} from "@/api/cus/seas"; import { delSeas,moveToMain} from "@/api/cus/seas";
import { delContacts } from "@/api/cus/contacts"; import { delContacts } from "@/api/cus/contacts";
@ -410,11 +410,11 @@ export default {
moveToMain(){ moveToMain(){
let that = this let that = this
this.$modal.confirm('是否确认将编号为"' + this.mainInfo.cusMain.cusCode + '"的客户移出公海?').then(function() { this.$modal.confirm('是否确认将编号为"' + this.mainInfo.cusMain.cusCode + '"的客户移出公海?').then(function() {
moveToMain({ id:this.id}).then((resp) => { moveToMain({ id:that.id}).then((resp) => {
if(resp.code==200){ if(resp.code==200){
that.$modal.msgSuccess('操作成功') that.$modal.msgSuccess('操作成功')
setTimeout(()=>{ setTimeout(()=>{
this.closeAndBack() that.closeAndBack()
},500) },500)
}else{ }else{
that.$message.error(resp.msg) that.$message.error(resp.msg)
@ -428,11 +428,11 @@ export default {
moveToSeasFun(){ moveToSeasFun(){
let that = this let that = this
this.$modal.confirm('是否确认将编号为"' + this.mainInfo.cusMain.cusCode + '"的客户移入公海?').then(function() { this.$modal.confirm('是否确认将编号为"' + this.mainInfo.cusMain.cusCode + '"的客户移入公海?').then(function() {
moveToSeas({ id:this.id}).then((resp) => { moveToSeas({ id:that.id}).then((resp) => {
if(resp.code==200){ if(resp.code==200){
that.$modal.msgSuccess('操作成功') that.$modal.msgSuccess('操作成功')
setTimeout(()=>{ setTimeout(()=>{
this.closeAndBack() that.closeAndBack()
},500) },500)
}else{ }else{
that.$message.error(resp.msg) that.$message.error(resp.msg)
@ -498,7 +498,7 @@ export default {
*/ */
chooseUserFun(userList){ chooseUserFun(userList){
let dataObj = { let dataObj = {
cusId: this.id, id: this.id,
userId: userList[0].userId, userId: userList[0].userId,
userName: userList[0].nickName userName: userList[0].nickName
} }

View File

@ -73,7 +73,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed label="客户名称" align="center" prop="fullName" width="130"> <el-table-column fixed label="客户名称" align="center" prop="fullName" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :content="scope.row.fullName" placement="top" effect="dark"> <el-tooltip :content="scope.row.fullName" placement="top" effect="dark">
<div class="text-ellipsis-single">{{ scope.row.fullName }}</div> <div class="text-ellipsis-single">{{ scope.row.fullName }}</div>
@ -474,4 +474,9 @@ export default {
.el-tag { .el-tag {
border: 1px solid transparent !important; border: 1px solid transparent !important;
} }
::v-deep body .el-table__fixed-right, body .el-table__fixed-left {
z-index: 10;
background-color: #fff;
}
</style> </style>