Bläddra i källkod

协销填写咨询记录增加关键词联想后台

Duan_xu 3 år sedan
förälder
incheckning
e50262021d

+ 46 - 0
src/main/java/com/caimei/modules/user/entity/CmRemaks.java

@@ -0,0 +1,46 @@
+package com.caimei.modules.user.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2022/5/9
+ */
+public class CmRemaks extends DataEntity<CmRemaks> {
+    private Integer remarksId;
+
+    private String remarks;
+
+    private Date addtime;
+
+    public Integer getRemarksId() {
+        return remarksId;
+    }
+
+    public void setRemarksId(Integer remarksId) {
+        this.remarksId = remarksId;
+    }
+
+    @Override
+    public String getRemarks() {
+        return remarks;
+    }
+
+    @Override
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    public Date getAddtime() {
+        return addtime;
+    }
+
+    public void setAddtime(Date addtime) {
+        this.addtime = addtime;
+    }
+}

+ 202 - 0
src/main/webapp/WEB-INF/views/modules/userNew/cmRemaksForm.jsp

@@ -0,0 +1,202 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="input" uri="/struts-tags" %>
+<html>
+<head>
+    <title>关键词库编辑</title>
+    <meta name="decorator" content="default"/>
+    <style>
+        .red {
+            color: red;
+            display: none;
+        }
+
+        .blue {
+            color: rgb(0, 100, 180);
+        }
+
+        #inputForm {
+            max-width: 1200px;
+            width: 100%;
+        }
+
+        #inputForm table {
+            width: 100%;
+            line-height: 18px;
+            margin-bottom: 50px;
+        }
+
+        #inputForm th, #inputForm td {
+            font-weight: normal;
+            text-align: left;
+            padding: 8px 5px;
+            border-bottom: 1px solid rgb(238, 238, 238);
+        }
+
+        #inputForm th {
+            width: 15%;
+            text-align: right;
+            white-space: nowrap;
+            font-weight: bold;
+        }
+
+        #inputForm td input[type="text"] {
+            width: 320px;
+            height: 16px;
+            line-height: 16px;
+        }
+
+        #inputForm td input.short {
+            width: 110px;
+        }
+
+        #inputForm td b.line {
+            margin: 0 15px 0 20px;
+            font-weight: normal
+        }
+
+        #allAreaInput {
+            padding: 10px 0 0 100px;
+        }
+
+        #inputForm .item {
+            line-height: 28px;
+        }
+
+        #ladderPriceBox {
+            border-top: 1px solid rgb(238, 238, 238);
+            margin-top: 8px;
+            padding-top: 8px;
+        }
+
+        #ladderPriceBox > div {
+            margin-bottom: 5px;
+        }
+
+        .priceIcon:before {
+            content: '\2729';
+            color: #aaa;
+            font-size: 18px;
+            font-style: normal;
+        }
+
+        .priceIcon.full:before {
+            content: '\272E';
+            color: #ffbd14;
+        }
+
+        #slider {
+            width: 335px;
+        }
+
+        .skword input {
+            margin: 2px 0;
+        }
+
+        .skword p {
+            margin: 2px 0;
+        }
+
+        .params input {
+            margin: 2px 0;
+        }
+
+        .tags input {
+            margin: 2px 0;
+        }
+
+        #tagsList {
+            margin: 2px 0;
+            display: none;
+            width: 600px;
+        }
+
+        .tags-li {
+            margin: 10px;
+            display: inline-block;
+            padding: 5px 10px;
+            line-height: 16px;
+            text-align: center;
+            position: relative;
+            font-size: 12px;
+            border: 1px solid #EBEBEB;
+            border-radius: 4px;
+        }
+
+        .tags-li i {
+            font-style: normal;
+            line-height: 20px;
+            display: block;
+            position: absolute;
+            width: 16px;
+            height: 16px;
+            text-align: center;
+            background: rgba(0, 0, 0, 0.2);
+            border-radius: 50%;
+            top: -8px;
+            right: -7px;
+            cursor: pointer;
+        }
+
+        .tags-li .tags-s {
+            background: #FFF;
+            width: auto !important;
+            outline: none;
+            border: none;
+        }
+        label
+        {
+            display: inline-block;
+            width: 60px;
+            text-align: justify;
+            text-align-last: justify;
+            margin-right: 270px;
+        }
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
+    <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
+    <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/cmrenaksForm">添加关键词库</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="list" onsubmit="return um()" action="${ctx}/new/user/agency/addcmrenaksForm" method="post" class="form-horizontal">
+    <table  align = "center" border="0" cellspacing="0" cellpadding="20" width="100%">
+        <tr>
+            <th><span style="color: red">*</span>  关键词:</th>
+            <td colspan="3">
+<%--                <input:form path="remarks" name="remarks" value=" ${empty list.remarks ? '' : list.remarks}" class="short input-small required" maxlength="50"/>--%>
+                <input id="remarks" placeholder="最多输入10个字符。" name="remarks" class="short input-small required" type="text" value="${remaks}" maxlength="10"/>&nbsp; &emsp; <span class="red" id="bt">*必填</span>
+            </td>
+        </tr>
+        <tr>
+            <td colspan="5" style="text-align:center;">
+                <shiro:hasPermission name="product:product:edit">
+                    <input id="btnSave" class="btn btn-primary" onsubmit="return um()" type="submit" value="保 存"/>
+                </shiro:hasPermission>
+                <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+            </td>
+        </tr>
+
+    </table>
+</form:form>
+<sys:message content="${message}"/>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+<script type="text/javascript">
+    function um() {
+        // debugger
+        var remarks = document.getElementById("remarks").value.length;
+        var bt = document.getElementById("bt");
+        console.log('2222222222222', remarks);
+        if (remarks <= 0) {
+            bt.style.display = "inline-block";
+            return false;
+        }
+    }
+</script>
+</body>
+</html>

+ 88 - 0
src/main/webapp/WEB-INF/views/modules/userNew/cmRemaksList.jsp

@@ -0,0 +1,88 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<html>
+<head>
+    <title>关键词库</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center;
+        }
+
+        .table td {
+            text-align: center;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+
+        });
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+    </script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
+    <li><a href="${ctx}/new/user/visit/unregist">未注册用户咨询记录</a></li>
+    <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/cmrenaksList">关键词库</a></li>
+</ul>
+<form:form id="searchForm" modelAttribute="" action="${ctx}/new/user/agency/cmrenaksList" method="post"
+           class="breadcrumb form-search">
+    <div class="ul-form">
+        <label>关键词:</label>
+        <input id="remarks" name="remarks" class="input-medium" type="text" value="" maxlength="10">
+        <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询">
+        <a id="dfa" href="${ctx}/new/user/agency/cmrenaksForm" class="btn btn-primary"> 添加关键词</a>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>ID</th>
+        <th>关键字</th>
+        <th>添加时间</th>
+        <th>操作</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="cmop">
+        <tr>
+            <td>
+                    ${empty cmop.remarksId ? "------" : cmop.remarksId}
+            </td>
+            <td>
+                    ${empty cmop.remarks ? "________" : cmop.remarks}
+            </td>
+            <td>
+            <fmt:formatDate value="${cmop.addtime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+        </td>
+            <td>
+                <a href="${ctx}/new/user/agency/cmrenaksForm?remarksId=${cmop.remarksId}">编辑</a>
+                <a href="javascript:void(0);" onclick="offliney(${cmop.remarksId})">删除</a>
+            </td>
+
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
+<script type="text/javascript">
+    function offliney(userId) {
+        $.jBox.confirm("确定删除该关键词吗?","提示",function(v,h,f){
+            if(v === 1){
+                window.location.href="${ctx}/new/user/agency/deleteRamarks?remarksId="+userId;
+            }
+        } ,{ buttons: {  '确定': 1,'取消':2}});
+    }
+</script>
+</body>
+</html>