From 0940d5f4527735be64f2151a2d95c8bf1dc4d64e Mon Sep 17 00:00:00 2001 From: 姜友瑶 <935090232@qq.com> Date: Thu, 05 May 2022 07:34:52 +0800 Subject: [PATCH] fix:添加跟进记录服务端查询接口 --- zq-erp/src/main/java/com/matrix/system/hive/action/FollowuController.java | 10 +- zq-erp/src/main/java/com/matrix/system/hive/dto/FollowuListDto.java | 6 + zq-erp/src/main/resources/templates/views/admin/hive/vip/followu-list.html | 206 +++++++++++++++++++++++++++++++++++++++++++++++++++ zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html | 2 zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html | 2 5 files changed, 218 insertions(+), 8 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/FollowuController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/FollowuController.java index 2f9f7a0..569cff6 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/action/FollowuController.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/action/FollowuController.java @@ -7,9 +7,10 @@ import com.matrix.core.tools.WebUtil; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.hive.dto.FollowuListDto; -import org.springframework.stereotype.Controller; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; @@ -17,7 +18,7 @@ /** * @description 跟进记录 */ -@Controller +@RestController @RequestMapping(value = "admin/followu") public class FollowuController extends BaseController{ @@ -29,9 +30,10 @@ * 显示所有的会员卡等级信息 */ @RequestMapping(value = "/showList") - public @ResponseBody AjaxResult showList(FollowuListDto followuListDto) { + public AjaxResult showList(@RequestBody @Validated FollowuListDto followuListDto) { SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); followuListDto.setCompanyId(users.getCompanyId()); + followuListDto.setSelfStaff(users.getSuId()); List<SysFollowup> list= followupService.findVipFollowuByPage(followuListDto); return AjaxResult.buildSuccessInstance(list); } diff --git a/zq-erp/src/main/java/com/matrix/system/hive/dto/FollowuListDto.java b/zq-erp/src/main/java/com/matrix/system/hive/dto/FollowuListDto.java index cb76a66..93c4ff3 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/dto/FollowuListDto.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/dto/FollowuListDto.java @@ -21,13 +21,15 @@ /** * 员工id */ - @NotNull private Long staffId; + /** + * 当前查询人 + */ + private Long selfStaff; /** * 公司id */ - @NotNull private Long companyId; diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html index c26f320..cde4cab 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html @@ -193,7 +193,7 @@ title : "会员跟进记录", area : MUI.SIZE_M, maxmin : true, - content : [ basePath+'/admin/serviceRecord/toServicefollowListForZd?id=' + id ] + content : [ basePath+'/admin/redirect/hive/vip/followu-list?vipId=' + id ] }); } diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/followu-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/followu-list.html new file mode 100644 index 0000000..54985fd --- /dev/null +++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/followu-list.html @@ -0,0 +1,206 @@ +<!DOCTYPE HTML> +<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> +<head> + <meta charset="utf-8"> + <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> + <meta name="renderer" content="webkit|ie-comp|ie-stand"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" + content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> + <meta http-equiv="Cache-Control" content="no-siteapp"/> + <LINK rel="Bookmark" href="../images/favicon.ico"> + <!-- 本框架基本脚本和样式 --> + <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script> + <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}"> + <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/> + <title></title> + <style> + .panel-body{ + overflow: hidden; + } + .buttonPanel{ + background: #ffffff; + padding: 10px 10px ; + margin: 0px 0px 10px 0px; + } + .rowPanel{ + background: #ffffff; + padding: 0px 10px ; + padding-top: 10px; + margin: 0px 0px 10px 0px; + } + .paginationStyle{ + background: #ffffff; + padding: 10px 10px; + margin: 0px 0px 10px 0px; + text-align: right; + } + </style> +</head> +<body> +<div class="panel-body" id="app"> + + <el-row class="table-style" > + + <el-table id="proj" :data="table.rows" :height="height" stripe @sort-change="sortChange"> + <el-table-column + prop="vipName" + label="客户名称" + width="180"> + </el-table-column> + <el-table-column + prop="staffName" + label="员工名称"> + </el-table-column> + <el-table-column + prop="orderAbstract" + label="订单摘要信息" + show-overflow-tooltip + width="240"> + </el-table-column> + <el-table-column + prop="content" + label="跟进内容" + show-overflow-tooltip + width="340"> + </el-table-column> + <el-table-column + prop="createTime" + label="填写时间" + width="180"> + </el-table-column> + + <el-table-column + prop="nextNotifyTime" + label="下次跟进时间"> + </el-table-column> + <el-table-column label="效果图片"> + <template slot-scope="scope"> + <el-image + style="width: 100px; height: 100px" + :src="scope.row.showImg" + :preview-src-list="scope.row.imgList"> + </el-image> + + </template> + </el-table-column> + </el-table> + </el-row> + <el-row class="paginationStyle" > + <el-pagination background + @size-change="changePageSize" + @current-change="changeCurrentPage" + :current-page="table.currentPage" + :page-sizes="[10, 20, 30, 50]" + :page-size="table.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="table.total"> + </el-pagination> + </el-row> + +</div> +</body> +<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> +<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script> +<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script> +<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script> +<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script> +<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script> +<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script> +<script type="text/javascript" th:inline="javascript"> + + var vipId = $.query.get('vipId'); + + var vue = new Vue({ + el: '#app', + data: { + table:{ + rows:[], + total:0, + pageSize:10, + currentPage:1, + }, + form:{ + vipId:vipId, + order:'', + sort:'' + }, + height:'calc(100vh - 240px)', + }, + created: function () { + + let _this=this; + this.loadData(); + window.addEventListener("keydown", this.keydown); + + }, + methods: { + changePageSize(val) { + this.table.pageSize = val; + this.loadData(); + }, + changeCurrentPage(val) { + this.table.currentPage = val; + this.loadData(); + }, + resetForm(formName) { + this.$refs[formName].resetFields(); + }, + sortChange:function (column){ + if(column.order){ + if(column.order.indexOf("desc")){ + this.form.order="desc"; + }else{ + this.form.order="asc"; + } + this.form.sort=column.prop; + this.loadData(); + } + }, + loadData:function(){ + let _this = this; + let data=_this.getRequestParam(); + data.limit=_this.table.pageSize; + data.offset=_this.table.pageSize*(_this.table.currentPage-1); + AjaxProxy.requst({ + app: _this, + data:data, + url: basePath + '/admin/followu/showList', + callback: function (data) { + data.rows.forEach(e=>{ + e.showImg= e.albums[0].img; + e.imgList=[]; + e.albums.forEach(album=>{ + e.imgList.push(album.img); + }) + }) + _this.table.rows = data.rows; + _this.table.total=data.total; + } + }); + }, + getRequestParam(){ + let _this = this; + return { + vipId:_this.form.vipId, + order:_this.form.order, + sort:_this.form.sort + + } + }, + search:function(){ + this.table.currentPage=1; + this.loadData(); + }, + keydown(evt){ + if(evt.keyCode==13) { + this.search(); + } + }, + } + }); + + +</script> +</body> +</html> \ No newline at end of file diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html index 9d86ad6..f6d43a4 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html @@ -315,7 +315,7 @@ title : "会员跟进记录", area : MUI.SIZE_M, maxmin : true, - content : [ basePath+'/admin/serviceRecord/toServicefollowList?id=' + id ] + content : [ basePath+'/admin/redirect/hive/vip/followu-list?vipId=' + id ] }); } function createDateDictionary() { -- Gitblit v1.9.1