4 files modified
6 files added
| | |
| | | import com.xcong.excoin.common.entity.FebsResponse;
|
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.AppVersionEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.CommonConfigurationEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformNoticeEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity;
|
| | |
| | | private final SystemSettingService systemSettingService;
|
| | |
|
| | | /**
|
| | | *类别设置表---列表
|
| | | */
|
| | | @GetMapping("commonConfiguration")
|
| | | public FebsResponse commonConfiguration(CommonConfigurationEntity commonConfigurationEntity, QueryRequest request) {
|
| | | Map<String, Object> data = getDataTable(systemSettingService.findCommonConfigurationEntityInPage(commonConfigurationEntity, request));
|
| | | return new FebsResponse().success().data(data);
|
| | | }
|
| | | |
| | | /**
|
| | | * 类别设置表---新增
|
| | | */
|
| | | @PostMapping("commonConfigurationAdd")
|
| | | @ControllerEndpoint(operation = "类别设置表---新增", exceptionMessage = "新增失败")
|
| | | public FebsResponse commonConfigurationAdd(@Valid CommonConfigurationEntity commonConfigurationEntity) {
|
| | | systemSettingService.commonConfigurationAdd(commonConfigurationEntity);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | | |
| | | /**
|
| | | * 类别设置表---删除
|
| | | */
|
| | | @GetMapping("commonConfigurationDelete/{id}")
|
| | | @ControllerEndpoint(operation = "类别设置表---删除", exceptionMessage = "删除失败")
|
| | | public FebsResponse commonConfigurationDelete(@NotNull(message = "{required}") @PathVariable Long id) {
|
| | | return systemSettingService.commonConfigurationDelete(id);
|
| | | }
|
| | | |
| | | /**
|
| | | *类别设置表---确认
|
| | | * @return
|
| | | */
|
| | | @PostMapping("commonConfigurationUpdate")
|
| | | @ControllerEndpoint(operation = "类别设置表---确认", exceptionMessage = "设置失败")
|
| | | public FebsResponse commonConfigurationUpdate(@Valid CommonConfigurationEntity commonConfigurationEntity) {
|
| | | return systemSettingService.commonConfigurationUpdate(commonConfigurationEntity);
|
| | | }
|
| | | |
| | | /**
|
| | | * 交易设置---列表
|
| | | */
|
| | | @GetMapping("platformTradeSetting")
|
| | |
| | | import com.xcong.excoin.common.entity.FebsConstant; |
| | | import com.xcong.excoin.common.utils.FebsUtil; |
| | | import com.xcong.excoin.modules.systemSetting.entity.AppVersionEntity; |
| | | import com.xcong.excoin.modules.systemSetting.entity.CommonConfigurationEntity; |
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity; |
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformNoticeEntity; |
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity; |
| | |
| | | |
| | | private final SystemSettingService systemSettingService; |
| | | |
| | | /** |
| | | * 类别设置表---列表 |
| | | */ |
| | | @GetMapping("commonConfiguration") |
| | | @RequiresPermissions("commonConfiguration:view") |
| | | public String commonConfiguration() { |
| | | return FebsUtil.view("modules/systemSetting/commonConfiguration"); |
| | | } |
| | | |
| | | /** |
| | | * 类别设置表---新增 |
| | | */ |
| | | @GetMapping("commonConfigurationAdd") |
| | | @RequiresPermissions("commonConfigurationAdd:add") |
| | | public String commonConfigurationAdd() { |
| | | return FebsUtil.view("modules/systemSetting/commonConfigurationAdd"); |
| | | } |
| | | /** |
| | | * 类别设置表---修改 |
| | | */ |
| | | @GetMapping("commonConfigurationUpdate/{id}") |
| | | @RequiresPermissions("commonConfigurationUpdate:update") |
| | | public String commonConfigurationUpdate(@PathVariable long id, Model model) { |
| | | CommonConfigurationEntity data = systemSettingService.selectCommonConfigurationById(id); |
| | | model.addAttribute("member", data); |
| | | return FebsUtil.view("modules/systemSetting/commonConfigurationUpdate"); |
| | | } |
| | | |
| | | /** |
| | | * 交易设置---列表 |
| | | */ |
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.entity; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | /** |
| | | * 类别设置表 |
| | | */ |
| | | @Data |
| | | @TableName("common_configuration") |
| | | public class CommonConfigurationEntity implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | @TableId(value = "id",type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 所属分类(对应英文简写) |
| | | */ |
| | | private String type; |
| | | /** |
| | | * 内容 |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 状态0禁用 1 启用 |
| | | */ |
| | | private int state; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remarks; |
| | | |
| | | } |
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.xcong.excoin.modules.systemSetting.entity.CommonConfigurationEntity; |
| | | |
| | | public interface CommonConfigurationMapper extends BaseMapper<CommonConfigurationEntity> { |
| | | |
| | | IPage<CommonConfigurationEntity> findCommonConfigurationEntityInPage(Page<CommonConfigurationEntity> page, |
| | | @Param("record")CommonConfigurationEntity commonConfigurationEntity); |
| | | |
| | | } |
| | |
| | | import com.xcong.excoin.common.entity.FebsResponse;
|
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.AppVersionEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.CommonConfigurationEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformNoticeEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformTradeSettingEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.AppVersionMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.CommonConfigurationMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformBannerMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformNoticeMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformSymbolsSkuMapper;
|
| | |
| | | private final PlatformNoticeMapper platformNoticeMapper;
|
| | |
|
| | | private final AppVersionMapper appVersionMapper;
|
| | | |
| | | private final CommonConfigurationMapper commonConfigurationMapper;
|
| | |
|
| | | @Override
|
| | | public IPage<PlatformTradeSettingEntity> findPlatformTradeSettingInPage(
|
| | |
| | | appVersionEntitys.setAddress(appVersionEntity.getAddress());
|
| | | appVersionEntitys.setContent(appVersionEntity.getContent());
|
| | | appVersionEntitys.setType(appVersionEntity.getType());
|
| | | appVersionEntitys.setVersion(appVersionEntity.getVersion()); |
| | | appVersionEntitys.setVersion(appVersionEntity.getVersion()); |
| | | appVersionMapper.insert(appVersionEntitys);
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public IPage<CommonConfigurationEntity> findCommonConfigurationEntityInPage(
|
| | | CommonConfigurationEntity commonConfigurationEntity, QueryRequest request) {
|
| | |
|
| | | Page<CommonConfigurationEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
|
| | | IPage<CommonConfigurationEntity> commonConfigurationEntitys = commonConfigurationMapper.findCommonConfigurationEntityInPage(page, commonConfigurationEntity);
|
| | | return commonConfigurationEntitys;
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void commonConfigurationAdd(@Valid CommonConfigurationEntity commonConfigurationEntity) {
|
| | | CommonConfigurationEntity commonConfiguration = new CommonConfigurationEntity();
|
| | | String name = commonConfigurationEntity.getName();
|
| | | String type = commonConfigurationEntity.getType();
|
| | | int state = commonConfigurationEntity.getState();
|
| | | String content = commonConfigurationEntity.getContent();
|
| | | String remarks = commonConfigurationEntity.getRemarks();
|
| | | commonConfiguration.setName(name);
|
| | | commonConfiguration.setType(type);
|
| | | commonConfiguration.setState(state);
|
| | | commonConfiguration.setContent(content);
|
| | | commonConfiguration.setRemarks(remarks);
|
| | | commonConfigurationMapper.insert(commonConfiguration);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse commonConfigurationDelete(@NotNull(message = "{required}") Long id) {
|
| | | commonConfigurationMapper.deleteById(id);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | public CommonConfigurationEntity selectCommonConfigurationById(long id) {
|
| | | return commonConfigurationMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse commonConfigurationUpdate(@Valid CommonConfigurationEntity commonConfigurationEntity) {
|
| | | commonConfigurationMapper.updateById(commonConfigurationEntity);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
| | | import com.xcong.excoin.common.entity.FebsResponse;
|
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.AppVersionEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.CommonConfigurationEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformNoticeEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity;
|
| | |
| | |
|
| | | void appVersionAdds(@Valid AppVersionEntity appVersionEntity);
|
| | |
|
| | | IPage<CommonConfigurationEntity> findCommonConfigurationEntityInPage(CommonConfigurationEntity commonConfigurationEntity,
|
| | | QueryRequest request);
|
| | |
|
| | | void commonConfigurationAdd(@Valid CommonConfigurationEntity commonConfigurationEntity);
|
| | |
|
| | | FebsResponse commonConfigurationDelete(@NotNull(message = "{required}") Long id);
|
| | |
|
| | | CommonConfigurationEntity selectCommonConfigurationById(long id);
|
| | |
|
| | | FebsResponse commonConfigurationUpdate(@Valid CommonConfigurationEntity commonConfigurationEntity);
|
| | |
|
| | | }
|
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.xcong.excoin.modules.systemSetting.mapper.CommonConfigurationMapper"> |
| | | |
| | | <select id="findCommonConfigurationEntityInPage" resultType="com.xcong.excoin.modules.systemSetting.entity.CommonConfigurationEntity"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | common_configuration |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <div class="layui-fluid layui-anim febs-anim" id="febs-user" lay-title="类别设置"> |
| | | <div class="layui-row febs-container"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body febs-table-full"> |
| | | <form class="layui-form layui-table-form" lay-filter="user-table-form"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="add"> |
| | | 新增 |
| | | </div> |
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset"> |
| | | <i class="layui-icon"></i> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | // 引入组件并初始化 |
| | | layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs'], function () { |
| | | var $ = layui.jquery, |
| | | laydate = layui.laydate, |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | dropdown = layui.dropdown, |
| | | $view = $('#febs-user'), |
| | | $reset = $view.find('#reset'), |
| | | $add = $view.find('#add'), |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: 'title', type: null}, |
| | | tableIns |
| | | ; |
| | | |
| | | form.render(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | | // 初始化表格操作栏各个按钮功能 |
| | | table.on('tool(userTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | |
| | | if (layEvent === 'edit') { |
| | | febs.modal.open('设置', 'modules/systemSetting/commonConfigurationUpdate/' + data.id, { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#user-update').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | if (layEvent === 'delete') { |
| | | febs.modal.confirm('删除', '您是否确认删除?', function () { |
| | | deleteUsers(data.id); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function deleteUsers(id) { |
| | | febs.get(ctx + 'systemSetting/commonConfigurationDelete/' + id, null, function () { |
| | | febs.alert.success('确认删除'); |
| | | $reset.click(); |
| | | }); |
| | | } |
| | | |
| | | // 刷新按钮 |
| | | $reset.on('click', function () { |
| | | $searchForm[0].reset(); |
| | | sortObject.type = 'null'; |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | }); |
| | | |
| | | $add.on('click', function () { |
| | | febs.modal.open('新增', 'modules/systemSetting/commonConfigurationAdd/', { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#user-add').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | return {}; |
| | | } |
| | | |
| | | function initTable() { |
| | | tableIns = febs.table.init({ |
| | | elem: $view.find('table'), |
| | | id: 'userTable', |
| | | url: ctx + 'systemSetting/commonConfiguration', |
| | | cols: [[ |
| | | {field: 'id', title: '', minWidth: 10,align:'center'}, |
| | | {field: 'name', title: '类别名称', minWidth: 120,align:'center'}, |
| | | {field: 'type', title: '所属分类(对应英文简写)', minWidth: 200,align:'center'}, |
| | | {field: 'content', title: '内容', minWidth: 200,align:'center'}, |
| | | {field: 'state', title: '状态', |
| | | templet: function (d) { |
| | | if (d.state === 1) { |
| | | return '<span style="color:green;">启用</span>' |
| | | } else if (d.state === 0) { |
| | | return '<span style="color:red;">禁用</span>' |
| | | }else{ |
| | | return '' |
| | | } |
| | | }, minWidth: 80,align:'center'}, |
| | | {field: 'remarks', title: '备注', minWidth: 200,align:'center'}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | return '<button lay-event="delete" shiro:hasPermission="user:update">删除</button>' |
| | | + '<button lay-event="edit" shiro:hasPermission="user:update">修改</button>' |
| | | },minWidth: 300,align:'center'} |
| | | ]] |
| | | }); |
| | | } |
| | | }) |
| | | </script> |
New file |
| | |
| | | <style> |
| | | #user-add { |
| | | padding: 20px 25px 25px 0; |
| | | } |
| | | |
| | | #user-add .layui-treeSelect .ztree li a, .ztree li span { |
| | | margin: 0 0 2px 3px !important; |
| | | } |
| | | #user-add #data-permission-tree-block { |
| | | border: 1px solid #eee; |
| | | border-radius: 2px; |
| | | padding: 3px 0; |
| | | } |
| | | #user-add .layui-treeSelect .ztree li span.button.switch { |
| | | top: 1px; |
| | | left: 3px; |
| | | } |
| | | |
| | | </style> |
| | | <div class="layui-fluid" id="user-add"> |
| | | <form class="layui-form" action="" lay-filter="user-add-form"> |
| | | <div class="layui-form-item febs-hide"> |
| | | <label class="layui-form-label febs-form-item-require">用户id:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="id"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <div style="text-align: center;color:red"> |
| | | 类别名称 : 同一组类别请使用同意的名称 |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">类别名称:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="name" lay-verify="range|name" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div style="text-align: center;color:red"> |
| | | 所属分类 : 请填写对应的英文简写。如合约:contract |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">所属分类:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="type" lay-verify="range|type" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">内容:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="content" minlength="4" maxlength="500" lay-verify="range|content" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="remarks" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">状态:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="radio" name="state" value="0" title="禁用" > |
| | | <input type="radio" name="state" value="1" title="启用" checked=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item febs-hide"> |
| | | <button class="layui-btn" lay-submit="" lay-filter="user-add-form-submit" id="submit"></button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <script data-th-inline="javascript"> |
| | | layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree'], function () { |
| | | var $ = layui.$, |
| | | febs = layui.febs, |
| | | layer = layui.layer, |
| | | formSelects = layui.formSelects, |
| | | treeSelect = layui.treeSelect, |
| | | form = layui.form, |
| | | eleTree = layui.eleTree, |
| | | $view = $('#user-add'), |
| | | validate = layui.validate, |
| | | _deptTree; |
| | | |
| | | form.render(); |
| | | |
| | | formSelects.render(); |
| | | |
| | | form.on('submit(user-add-form-submit)', function (data) { |
| | | febs.post(ctx + 'systemSetting/commonConfigurationAdd', data.field, function () { |
| | | layer.closeAll(); |
| | | febs.alert.success('新增成功'); |
| | | $('#febs-user').find('#reset').click(); |
| | | }); |
| | | return false; |
| | | }); |
| | | }); |
| | | </script> |
New file |
| | |
| | | <style> |
| | | #user-update { |
| | | padding: 20px 25px 25px 0; |
| | | } |
| | | |
| | | #user-update .layui-treeSelect .ztree li a, .ztree li span { |
| | | margin: 0 0 2px 3px !important; |
| | | } |
| | | #user-update #data-permission-tree-block { |
| | | border: 1px solid #eee; |
| | | border-radius: 2px; |
| | | padding: 3px 0; |
| | | } |
| | | #user-add .layui-treeSelect .ztree li span.button.switch { |
| | | top: 1px; |
| | | left: 3px; |
| | | } |
| | | |
| | | </style> |
| | | <div class="layui-fluid" id="user-update"> |
| | | <form class="layui-form" action="" lay-filter="user-update-form"> |
| | | <div class="layui-form-item febs-hide"> |
| | | <label class="layui-form-label febs-form-item-require">用户id:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="id" data-th-value="${member.id}"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <div style="text-align: center;color:red"> |
| | | 类别名称 : 同一组类别请使用同意的名称 |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">类别名称:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="name" data-th-value="${member.name}" lay-verify="range|name" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div style="text-align: center;color:red"> |
| | | 所属分类 : 请填写对应的英文简写。如合约:contract |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">所属分类:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="type" data-th-value="${member.type}" lay-verify="range|type" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">内容:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="content" data-th-value="${member.content}" minlength="4" maxlength="500" lay-verify="range|content" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="remarks" data-th-value="${member.remarks}" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">状态:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="radio" name="state" value="0" title="禁用" > |
| | | <input type="radio" name="state" value="1" title="启用" checked=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item febs-hide"> |
| | | <button class="layui-btn" lay-submit="" lay-filter="user-update-form-submit" id="submit"></button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <script data-th-inline="javascript"> |
| | | layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree'], function () { |
| | | var $ = layui.$, |
| | | febs = layui.febs, |
| | | layer = layui.layer, |
| | | formSelects = layui.formSelects, |
| | | treeSelect = layui.treeSelect, |
| | | form = layui.form, |
| | | eleTree = layui.eleTree, |
| | | member = [[${member}]], |
| | | $view = $('#user-update'), |
| | | validate = layui.validate, |
| | | _deptTree; |
| | | |
| | | form.render(); |
| | | |
| | | initUserValue(); |
| | | |
| | | formSelects.render(); |
| | | |
| | | function initUserValue() { |
| | | form.val("user-update-form", { |
| | | "name": member.name, |
| | | "type": member.type, |
| | | "content": member.content, |
| | | "state": member.state, |
| | | "remarks": member.remarks |
| | | }); |
| | | } |
| | | |
| | | form.on('submit(user-update-form-submit)', function (data) { |
| | | febs.post(ctx + 'systemSetting/commonConfigurationUpdate', data.field, function () { |
| | | layer.closeAll(); |
| | | febs.alert.success('设置成功'); |
| | | $('#febs-user').find('#reset').click(); |
| | | }); |
| | | return false; |
| | | }); |
| | | }); |
| | | </script> |