瀏覽代碼

提交随访模版修改

wangshuangpan 3 月之前
父節點
當前提交
da8fafd875

+ 4 - 3
health-admin/src/main/java/com/bzd/web/controller/gxhpz/FollowTemplateConfigController.java

@@ -138,6 +138,7 @@ public class FollowTemplateConfigController extends BaseController {
         PageData pd = new PageData();
         PageData pd = new PageData();
         pd.put("id", templateId);
         pd.put("id", templateId);
         PageData template = followTemplateConfigService.selectTemplateById(pd);
         PageData template = followTemplateConfigService.selectTemplateById(pd);
+        mmap.put("templateName", template.get("template_name"));
         mmap.put("template", template);
         mmap.put("template", template);
         mmap.put("templateId", templateId);
         mmap.put("templateId", templateId);
         return prefix + "/fields";
         return prefix + "/fields";
@@ -160,8 +161,8 @@ public class FollowTemplateConfigController extends BaseController {
      * 新增字段配置页面
      * 新增字段配置页面
      */
      */
     @RequiresPermissions("gxhpz:followTemplate:field")
     @RequiresPermissions("gxhpz:followTemplate:field")
-    @GetMapping("/addField/{templateId}")
-    public String addField(@PathVariable("templateId") Long templateId, ModelMap mmap) throws Exception {
+    @GetMapping("/addField")
+    public String addField( ModelMap mmap) throws Exception {
         PageData pd = this.getPageData();
         PageData pd = this.getPageData();
         pd.put("isEnabled",1);
         pd.put("isEnabled",1);
         pd.put("storeId",getSysUser().getDeptId());
         pd.put("storeId",getSysUser().getDeptId());
@@ -169,7 +170,7 @@ public class FollowTemplateConfigController extends BaseController {
         // 获取所有可用字段
         // 获取所有可用字段
         List<PageData> availableFields = followTemplateConfigService.selectFieldList(pd);
         List<PageData> availableFields = followTemplateConfigService.selectFieldList(pd);
        // mmap.put("availableFields", availableFields);
        // mmap.put("availableFields", availableFields);
-        mmap.put("templateId", templateId);
+
         return prefix + "/addField";
         return prefix + "/addField";
     }
     }
 
 

+ 1 - 1
health-admin/src/main/resources/templates/gxhpz/followTemplateConfig/addField.html

@@ -7,7 +7,7 @@
 <body class="white-bg">
 <body class="white-bg">
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
     <form class="form-horizontal m" id="form-field-add">
     <form class="form-horizontal m" id="form-field-add">
-        <input type="hidden" name="templateId" th:value="${templateId}" />
+<!--        <input type="hidden" name="templateId" th:value="${templateId}" />-->
 
 
         <!-- 字段编码 -->
         <!-- 字段编码 -->
         <div class="form-group">
         <div class="form-group">

+ 16 - 15
health-admin/src/main/resources/templates/gxhpz/followTemplateConfig/followTemplateConfig.html

@@ -37,18 +37,19 @@
             <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="gxhpz:followTemplate:add">
             <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="gxhpz:followTemplate:add">
                 <i class="fa fa-plus"></i> 新增模版
                 <i class="fa fa-plus"></i> 新增模版
             </a>
             </a>
+            <a class="btn btn-success" onclick="addFields()" shiro:hasPermission="gxhpz:followTemplate:add">
+                <i class="fa fa-cog"></i> 添加字段
+            </a>
             <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="gxhpz:followTemplate:edit">
             <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="gxhpz:followTemplate:edit">
-                <i class="fa fa-edit"></i> 修改
+                <i class="fa fa-edit"></i> 修改模版
             </a>
             </a>
             <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="gxhpz:followTemplate:remove">
             <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="gxhpz:followTemplate:remove">
-                <i class="fa fa-remove"></i> 删除
+                <i class="fa fa-remove"></i> 删除模版
             </a>
             </a>
             <a class="btn btn-info single disabled" onclick="configFields()" shiro:hasPermission="gxhpz:followTemplate:field">
             <a class="btn btn-info single disabled" onclick="configFields()" shiro:hasPermission="gxhpz:followTemplate:field">
                 <i class="fa fa-cog"></i> 字段配置
                 <i class="fa fa-cog"></i> 字段配置
             </a>
             </a>
-            <a class="btn btn-info single disabled" onclick="addFields()" shiro:hasPermission="gxhpz:followTemplate:field">
-                <i class="fa fa-cog"></i> 添加字段
-            </a>
+
 <!--            <a class="btn btn-warning single disabled" onclick="configRules()" shiro:hasPermission="gxhpz:followTemplate:rule">-->
 <!--            <a class="btn btn-warning single disabled" onclick="configRules()" shiro:hasPermission="gxhpz:followTemplate:rule">-->
 <!--                <i class="fa fa-gear"></i> 规则配置-->
 <!--                <i class="fa fa-gear"></i> 规则配置-->
 <!--            </a>-->
 <!--            </a>-->
@@ -253,16 +254,16 @@
         var url = ctx + 'gxhpz/followTemplateConfig/fields/' + id;
         var url = ctx + 'gxhpz/followTemplateConfig/fields/' + id;
         $.modal.openTab("字段配置", url);
         $.modal.openTab("字段配置", url);
     }
     }
-    function addFields(id) {
-        if (typeof id === 'undefined') {
-            var rows = $.table.selectFirstColumns();
-            if (rows.length == 0) {
-                $.modal.alertWarning("请选择一条记录");
-                return;
-            }
-            id = rows[0];
-        }
-        var url = ctx + 'gxhpz/followTemplateConfig/addField/' + id;
+    function addFields() {
+        // if (typeof id === 'undefined') {
+        //     var rows = $.table.selectFirstColumns();
+        //     if (rows.length == 0) {
+        //         $.modal.alertWarning("请选择一条记录");
+        //         return;
+        //     }
+        //     id = rows[0];
+        // }
+        var url = ctx + 'gxhpz/followTemplateConfig/addField';
         $.modal.openTab("添加字段", url);
         $.modal.openTab("添加字段", url);
     }
     }
     // 规则配置
     // 规则配置

+ 11 - 11
health-admin/src/main/resources/templates/gxhpz/followTemplateConfig/preview.html

@@ -113,26 +113,26 @@
         <div class="col-sm-12">
         <div class="col-sm-12">
             <div class="ibox">
             <div class="ibox">
                 <div class="ibox-title">
                 <div class="ibox-title">
-                    <h5>模版预览 - <span th:text="${template.get('templateName')}"></span></h5>
+<!--                    <h5>模版预览 - <span th:text="${template.get('template_name')}"></span></h5>-->
 
 
                     <!-- 模版信息 -->
                     <!-- 模版信息 -->
-                    <p><strong>模版名称:</strong><span th:text="${template.get('templateName')}"></span></p>
+                    <p><strong>模版名称:</strong><span th:text="${template.get('template_name')}"></span></p>
                     <p><strong>模版类型:</strong>
                     <p><strong>模版类型:</strong>
-                        <span th:if="${template.get('templateType') == 'custom'}">自定义</span>
-                        <span th:if="${template.get('templateType') == 'default'}">系统默认</span>
+                        <span th:if="${template.get('template_type') == 'custom'}">自定义</span>
+                        <span th:if="${template.get('template_type') == 'default'}">系统默认</span>
                     </p>
                     </p>
-                    <p><strong>适用业务:</strong><span th:text="${template.get('businessType')}"></span></p>
+                    <p><strong>适用业务:</strong><span th:text="${template.get('business_type')}"></span></p>
 
 
                     <p><strong>状态:</strong>
                     <p><strong>状态:</strong>
-                        <span th:if="${template.get('status') == 1}" class="label label-success">启用</span>
-                        <span th:if="${template.get('status') == 0}" class="label label-danger">禁用</span>
+                        <span th:if="${template.get('status') == 1}" class="label-success">启用</span>
+                        <span th:if="${template.get('status') == 0}" class="label-danger">禁用</span>
                     </p>
                     </p>
-                    <p><strong>创建人:</strong><span th:text="${template.get('createdBy')}"></span></p>
-                    <p><strong>创建时间:</strong><span th:text="${template.get('createdTime')}"></span></p>
+                    <p><strong>创建人:</strong><span th:text="${template.get('created_by')}"></span></p>
+                    <p><strong>创建时间:</strong><span th:text="${template.get('created_time')}"></span></p>
 
 
-                    <div class="row" th:if="${template.get('templateDesc')}">
+                    <div class="row" th:if="${template.get('template_desc')}">
                         <div class="col-sm-12">
                         <div class="col-sm-12">
-                            <p><strong>模版描述:</strong><span th:text="${template.get('templateDesc')}"></span></p>
+                            <p><strong>模版描述:</strong><span th:text="${template.get('template_desc')}"></span></p>
                         </div>
                         </div>
                     </div>
                     </div>
                     </div>
                     </div>

+ 2 - 2
health-system/src/main/resources/mapper/gxhpz/followTemplateConfigMapper.xml

@@ -163,11 +163,11 @@
     <!-- 新增字段配置 -->
     <!-- 新增字段配置 -->
     <insert id="insertField" parameterType="pd">
     <insert id="insertField" parameterType="pd">
         INSERT INTO s_follow_template_fields (
         INSERT INTO s_follow_template_fields (
-            template_id, field_code, field_name, field_type, field_options,
+             field_code, field_name, field_type, field_options,
             is_required, display_order, tab_code, tab_name, is_enabled,
             is_required, display_order, tab_code, tab_name, is_enabled,
             placeholder, validation_rules, created_time,store_id
             placeholder, validation_rules, created_time,store_id
         ) VALUES (
         ) VALUES (
-                     #{templateId}, #{fieldCode}, #{fieldName}, #{fieldType}, #{fieldOptions},
+                      #{fieldCode}, #{fieldName}, #{fieldType}, #{fieldOptions},
                      #{isRequired}, #{displayOrder}, #{tabCode}, #{tabName}, #{isEnabled},
                      #{isRequired}, #{displayOrder}, #{tabCode}, #{tabName}, #{isEnabled},
                      #{placeholder}, #{validationRules}, #{createdTime}, #{storeId}
                      #{placeholder}, #{validationRules}, #{createdTime}, #{storeId}
                  )
                  )