| | |
| | | convert(param, wrapper); |
| | | allLike(CompanyPost.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("update_time", false); |
| | | return R.ok(companyPostService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/companyPost/add/auth") |
| | | @ManagerAuth(memo = "添加公告") |
| | | public R add(CompanyPost companyPost) { |
| | | companyPost.setCreateTime(new Date()); |
| | | Date now = new Date(); |
| | | companyPost.setCreateTime(now); |
| | | companyPost.setUserId(getUserId()); |
| | | companyPost.setUpdateTime(now); |
| | | companyPost.setUpdateUserId(getUserId()); |
| | | companyPostService.insert(companyPost); |
| | | return R.ok(); |
| | | } |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.utils.WordUtils; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | |
| | | // null // |
| | | // ); |
| | | |
| | | public String getStaff$(){ |
| | | if (Cools.isEmpty(this.staff)) return "公司"; |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.staff); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getComplete$(){ |
| | | int completes =0; |
| | | int targets = 0; |
| | | if (!Cools.isEmpty(this.complete)){ |
| | | completes = Integer.parseInt(this.complete); |
| | | } |
| | | if (!Cools.isEmpty(this.target)){ |
| | | targets = Integer.parseInt(this.target); |
| | | } |
| | | if (completes==0 && targets==0){ |
| | | return "未知"; |
| | | } |
| | | if (completes<targets){ |
| | | return "未完成"; |
| | | }else if (completes>targets){ |
| | | return "超额完成"; |
| | | }else { |
| | | return "完成"; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | ( |
| | | user_id = #{userId} |
| | | or |
| | | director = #{userId} |
| | | or |
| | | mc.id in |
| | | ( |
| | | select |
| | |
| | | ( |
| | | user_id = #{userId} |
| | | or |
| | | director = #{userId} |
| | | or |
| | | mc.id in |
| | | ( |
| | | select |
| | |
| | | // ,{field: 'id', align: 'center',title: '#ID'} |
| | | , {field: 'year', align: 'center', title: '年度'} |
| | | , {field: 'target', align: 'center', title: '目标',templet: '#targetTmp'} |
| | | , {field: 'complete', align: 'center', title: '实际',templet: '#completeTmp'} |
| | | , {field: 'complete$', align: 'center', title: '完成状况'} |
| | | |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 400} |
| | | ]], |
| | |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', align: 'center',title: '#ID'} |
| | | , {field: 'staff$', align: 'center', title: '人员'} |
| | | , {field: 'year', align: 'center', title: '年度'} |
| | | , {field: 'target', align: 'center', title: '目标',templet: '#targetTmp'} |
| | | , {field: 'complete', align: 'center', title: '实际',templet: '#completeTmp'} |
| | | , {field: 'complete$', align: 'center', title: '完成状况'} |
| | | |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 400} |
| | | ]], |
| | |
| | | // ,{field: 'id', align: 'center',title: 'ID'} |
| | | // ,{field: 'hostId$', align: 'center',title: '所属商户'} |
| | | ,{field: 'name', align: 'left',title: '客户名称', style: 'color: #1890ff;cursor:pointer', event: 'more', width: 350} |
| | | ,{field: 'simple', align: 'left',title: '客户简称', hide: false} |
| | | ,{field: 'simple', align: 'left',title: '客户简称', hide: true} |
| | | ,{field: 'uuid', align: 'left',title: '客户代号'} |
| | | ,{field: 'addr', align: 'left',title: '详细地址', templet:function(d){return emptyShow(d.addr)}} |
| | | ,{field: 'tel', align: 'left',title: '电话', templet:function(d){return emptyShow(d.tel)}} |
| | |
| | | {{d.target}}万元 |
| | | </script> |
| | | |
| | | <script type="text/html" id="completeTmp"> |
| | | {{# if( d.complete === '0'){ }} |
| | | 0 |
| | | {{# }else if(d.complete === null){ }} |
| | | 0 |
| | | {{# }else { }} |
| | | {{d.complete}}万元 |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | |
| | | {{d.target}}万元 |
| | | </script> |
| | | |
| | | <script type="text/html" id="completeTmp"> |
| | | {{# if( d.complete === '0'){ }} |
| | | 0 |
| | | {{# }else if(d.complete === null){ }} |
| | | 0 |
| | | {{# }else { }} |
| | | {{d.complete}}万元 |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | |
| | | |
| | | <div class="layui-col-xs12 layui-col-md8"> |
| | | <div class="layui-card" style=""> |
| | | <div class="layui-card-header">活动实时交易情况</div> |
| | | <div class="layui-card-header">团队活动实时交易情况</div> |
| | | <div class="layui-card-body" style="padding-bottom: 20px;"> |
| | | <div class="layui-row"> |
| | | <div>团队数据</div> |
| | |
| | | <div class="numberInfoValue"><span id="companyRate">92</span>%</div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top: 50px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-card" style=""> |
| | | <div class="layui-card-header">个人活动实时交易情况</div> |
| | | <div class="layui-card-body" style="padding-bottom: 20px;"> |
| | | <div class="layui-row"> |
| | | <div>个人数据</div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">年度销售目标</div> |
| | |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">跟踪项目数量</div> |
| | | <div class="numberInfoValue"> |
| | | <a href="#" id="openProgress"><span id="progressCount">124</span><em class="numberInfoSuffix">个</em></a> |
| | | <a href="#" id="openProgress" style="color: #1E9FFF"><span id="progressCount">124</span><em class="numberInfoSuffix">个</em></a> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">成交项目数量</div> |
| | | <div class="numberInfoValue"> |
| | | <a href="#" id="openSuccess"><span id="successCount">121</span><em class="numberInfoSuffix">个</em></a> |
| | | <a href="#" id="openSuccess" style="color: #1E9FFF"><span id="successCount">121</span><em class="numberInfoSuffix">个</em></a> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | |
| | | <div class="layui-card" style="height: 403px;overflow: hidden;"> |
| | | <div class="layui-card-header" style="display: flex;justify-content: space-between;"> |
| | | <div>公司公告</div> |
| | | <div><a href="#" id="openCompanyPost">查看更多</a></div> |
| | | <div><a href="#" id="openCompanyPost" style="color: #1E9FFF">查看更多</a></div> |
| | | </div> |
| | | <div class="layui-card-body" id="companyPostId"> |
| | | </div> |
| | |
| | | success: function (res) { |
| | | let data = res.data.records |
| | | for (var i = 0; i < data.length; i++) { |
| | | // let div = "<div style='margin-top: 10px;display: flex;justify-content: space-between;'>"; |
| | | // div += '<div><span class="layui-badge-dot layui-bg-green" style="margin-right: 10px;"></span>' |
| | | // div += data[i].content + "</div>" |
| | | // div += "<div>" + data[i].updateTime$ + "</div>" |
| | | // div += "</div>" |
| | | let div = "<div style='margin-top: 10px;display: flex;justify-content: space-between;'>"; |
| | | div += '<div><span class="layui-badge-dot layui-bg-green" style="margin-right: 10px;"></span>' |
| | | div += data[i].content + "</div>" |
| | | div += "<div>" + data[i].createTime$ + "</div>" |
| | | div += "</div>" |
| | | |
| | | div += "<div style='width: 79%;'>"; |
| | | div += "<span class='layui-badge-dot layui-bg-green' style='margin-right: 10px;'></span>"; |
| | | div += data[i].content; |
| | | div += "</div>"; |
| | | |
| | | div += "<div style='width: 19%;'>"; |
| | | div += data[i].updateTime$; |
| | | div += "</div>"; |
| | | |
| | | div += "</div>"; |
| | | |
| | | |
| | | $("#companyPostId").append(div) |
| | | } |