From 2d1e72379f4096386c6046ddcf0d7274ad03cc17 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 23 十一月 2022 13:36:01 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/crm/manager/controller/PlanController.java | 18 +++++++++---------
src/main/webapp/static/js/plan/plan.js | 2 +-
src/main/webapp/views/plan/plan_more.html | 38 +++++++++++++++++++-------------------
3 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/src/main/java/com/zy/crm/manager/controller/PlanController.java b/src/main/java/com/zy/crm/manager/controller/PlanController.java
index 85dfa9a..caa7561 100644
--- a/src/main/java/com/zy/crm/manager/controller/PlanController.java
+++ b/src/main/java/com/zy/crm/manager/controller/PlanController.java
@@ -238,8 +238,8 @@
@RequestMapping(value = "/plan/followers/table/auth")
@ManagerAuth
- public R planFollowersTable(@RequestParam("orderId") Long orderId) {
- List<PlanFoll> planFolls = planFollService.selectList(new EntityWrapper<PlanFoll>().eq("plan_id", orderId).orderBy("id", false));
+ public R planFollowersTable(@RequestParam("planId") Long planId) {
+ List<PlanFoll> planFolls = planFollService.selectList(new EntityWrapper<PlanFoll>().eq("plan_id", planId).orderBy("id", false));
List<FollowerTableVo> result = new ArrayList<>();
for (PlanFoll planFoll : planFolls) {
User user = userService.selectById(planFoll.getUserId());
@@ -254,15 +254,15 @@
@RequestMapping(value = "/plan/followers/add/auth")
@ManagerAuth
@Transactional
- public R planFollowersAdd(@RequestParam("orderId") Long orderId,
+ public R planFollowersAdd(@RequestParam("planId") Long planId,
@RequestParam("followerIds[]") Long[] followerIds) {
- if (Cools.isEmpty(orderId, followerIds)) {
+ if (Cools.isEmpty(planId, followerIds)) {
return R.parse(BaseRes.PARAM);
}
for (Long userId : followerIds) {
- if (planFollService.selectCount(new EntityWrapper<PlanFoll>().eq("plan_id", orderId).eq("user_id", userId)) == 0) {
+ if (planFollService.selectCount(new EntityWrapper<PlanFoll>().eq("plan_id", planId).eq("user_id", userId)) == 0) {
PlanFoll planFoll = new PlanFoll();
- planFoll.setPlanId(orderId);
+ planFoll.setPlanId(planId);
planFoll.setUserId(userId);
if (!planFollService.insert(planFoll)) {
throw new CoolException("娣诲姞澶辫触锛岃鑱旂郴绠$悊鍛�");
@@ -274,12 +274,12 @@
@RequestMapping(value = "/plan/followers/remove/auth")
@ManagerAuth
- public R planFollowersRemove(@RequestParam("orderId") Long orderId,
+ public R planFollowersRemove(@RequestParam("planId") Long planId,
@RequestParam("userId") Long userId) {
- if (Cools.isEmpty(orderId, userId)) {
+ if (Cools.isEmpty(planId, userId)) {
return R.parse(BaseRes.PARAM);
}
- if (!planFollService.delete(new EntityWrapper<PlanFoll>().eq("plan_id", orderId).eq("user_id", userId))) {
+ if (!planFollService.delete(new EntityWrapper<PlanFoll>().eq("plan_id", planId).eq("user_id", userId))) {
throw new CoolException("鍒犻櫎澶辫触锛岃鑱旂郴绠$悊鍛�");
}
return R.ok("鍒犻櫎鎴愬姛");
diff --git a/src/main/webapp/static/js/plan/plan.js b/src/main/webapp/static/js/plan/plan.js
index 7bbcd81..c39deaf 100644
--- a/src/main/webapp/static/js/plan/plan.js
+++ b/src/main/webapp/static/js/plan/plan.js
@@ -141,7 +141,7 @@
// ,{field: 'hostId$', align: 'center',title: '鎵�灞炲晢鎴�'}
,{field: 'userId$', align: 'left',title: '涓氬姟鍛�'}
,{field: 'planType$', align: 'left',title: '涓氬姟绫诲瀷', width: 150}
- ,{field: 'name', align: 'left',title: '鍞墠瑙勫垝鐢宠鍗曞悕绉�', width: 220, style: 'color: #1890ff;cursor:pointer', event: 'planMore',}
+ ,{field: 'name', align: 'left',title: '鍞墠瑙勫垝鐢宠鍗曞悕绉�', width: 220, style: 'color: #1890ff;cursor:pointer', event: 'more'}
,{field: 'uuid', align: 'left',title: '瑙勫垝鍗曞彿', width: 100}
,{field: 'planNeed$', align: 'left',title: '鎵�闇�', templet:function(d){return emptyShow(d.planNeed$)}}
,{field: 'deptId$', align: 'left',title: '鎵�灞為儴闂�'}
diff --git a/src/main/webapp/views/plan/plan_more.html b/src/main/webapp/views/plan/plan_more.html
index 0d9891c..7676185 100644
--- a/src/main/webapp/views/plan/plan_more.html
+++ b/src/main/webapp/views/plan/plan_more.html
@@ -44,9 +44,9 @@
<div class="layui-card">
<div class="layui-card-header" style="padding-top: 5px; padding-bottom: 5px">
<div>
- <i class="layui-icon" style="font-size: 20px;color: #1890ff;font-weight: bold"></i>
+ <i class="layui-icon" style="font-size: 20px;color: #1890ff;font-weight: bold"></i>
<span id="form-name" style="margin: 0 6px;font-size: 18px;font-weight: bold;letter-spacing: 1px"></span>
- <span style="opacity: .5;font-size: small;margin-left: 5px">璺熻釜椤圭洰</span>
+ <span style="opacity: .5;font-size: small;margin-left: 5px">鍞墠瑙勫垝鐢宠鍗�</span>
</div>
</div>
</div>
@@ -188,7 +188,7 @@
</script>
<script>
- var orderId = top.orderByMore;
+ var planId = top.planByMore;
$('.layui-layer-close').hide();
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
@@ -208,19 +208,19 @@
function init(){
notice.msg('姝e湪杞藉叆鏁版嵁......', {icon: 4, position: "topRight"});
$.ajax({
- url: baseUrl + "/order/" + orderId + "/auth",
+ url: baseUrl + "/plan/" + planId + "/auth",
headers: {'token': localStorage.getItem('token')},
method: 'GET',
success: function (res) {
notice.destroy();
if (res.code === 200) {
- let order = res.data;
- top.orderByMore = null;
- $("#form-name").html(order.name);
+ let plan = res.data;
+ top.planByMore = null;
+ $("#form-name").html(plan.name);
// 璁惧鏄庣粏
- form.val('formAdvForm', order);
+ form.val('formAdvForm', plan);
// 璺熻繘浜�
- initFollowers(order.id);
+ initFollowers(plan.id);
layDateRender();
} else if (res.code === 403) {
top.location.href = baseUrl + "/";
@@ -241,15 +241,15 @@
layDateRender();
// 娓叉煋璺熻繘浜烘ā鍧�
- function initFollowers(orderId) {
- if (!orderId) {
+ function initFollowers(planId) {
+ if (!planId) {
return;
}
$.ajax({
- url: baseUrl+"/order/followers/table/auth",
+ url: baseUrl+"/plan/followers/table/auth",
headers: {'token': localStorage.getItem('token')},
data: {
- orderId: orderId
+ planId: planId
},
method: 'GET',
success: function (res) {
@@ -274,17 +274,17 @@
case "del":
let loadIndex = layer.load(2);
$.ajax({
- url: baseUrl+"/order/followers/remove/auth",
+ url: baseUrl+"/plan/followers/remove/auth",
headers: {'token': localStorage.getItem('token')},
data: {
- orderId: orderId,
+ planId: planId,
userId: data.userId
},
method: 'POST',
success: function (res) {
layer.close(loadIndex);
if (res.code === 200){
- initFollowers(orderId);
+ initFollowers(planId);
} else if (res.code === 403){
top.location.href = baseUrl+"/";
} else {
@@ -324,10 +324,10 @@
}
let loadIndex = layer.load(2);
$.ajax({
- url: baseUrl+"/order/followers/add/auth",
+ url: baseUrl+"/plan/followers/add/auth",
headers: {'token': localStorage.getItem('token')},
data: {
- orderId: orderId,
+ planId: planId,
followerIds: selectList.map(function (d) {
return d.value;
})
@@ -336,7 +336,7 @@
success: function (res) {
if (res.code === 200){
layer.close(loadIndex);
- initFollowers(orderId);
+ initFollowers(planId);
} else if (res.code === 403){
top.location.href = baseUrl+"/";
}else {
--
Gitblit v1.9.1