Merge remote-tracking branch 'origin/master'
| | |
| | | private String userId; |
| | | |
| | | @Id |
| | | @Column(name = "batch_id", columnDefinition = "varchar(40) COMMENT '班次编号'") |
| | | @TableField("batch_id") |
| | | private String batchId; |
| | | @Column(name = "conf_id", columnDefinition = "varchar(40) COMMENT '班次编号'") |
| | | @TableField("conf_id") |
| | | private String confId; |
| | | |
| | | @Column(name = "conf_name", columnDefinition = "varchar(40) COMMENT '班次名称'") |
| | | @TableField("conf_name") |
| | | private String confName; |
| | | |
| | | @Column(name = "dept_id", columnDefinition = "varchar(40) COMMENT '所属库区'") |
| | | @TableField("dept_id") |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Id |
| | | @Column(name = "batch_id", columnDefinition = "varchar(40) COMMENT '班次编号'") |
| | | @TableId(value = "batch_id", type = IdType.NONE) |
| | | @TableField("batch_id") |
| | | private String batchId; |
| | | @Column(name = "id", columnDefinition = "varchar(40) COMMENT '班次编号'") |
| | | @TableId(value = "id", type = IdType.NONE) |
| | | @TableField("id") |
| | | private String id; |
| | | |
| | | @Column(name = "dept_id", columnDefinition = "varchar(40) COMMENT '所属库区'") |
| | | @TableField("dept_id") |
| | | private String deptId; |
| | | |
| | | @Column(name = "batch_name", columnDefinition = "varchar(40) COMMENT '班次名称'") |
| | | @TableField("batch_name") |
| | | private String batchName; |
| | | @Column(name = "name", columnDefinition = "varchar(40) COMMENT '班次名称'") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | @Column(name = "user_name", columnDefinition = "varchar(40) COMMENT '巡逻人'") |
| | | @Column(name = "user_id", columnDefinition = "varchar(200) COMMENT '巡逻人账号'") |
| | | @TableField("user_id") |
| | | private String userId; |
| | | |
| | | @Column(name = "user_name", columnDefinition = "varchar(200) COMMENT '巡逻人'") |
| | | @TableField("user_name") |
| | | private String userName; |
| | | |
| | |
| | | |
| | | private String userId; |
| | | |
| | | private String batchId; |
| | | private String confId; |
| | | |
| | | public PatrolKey(){ |
| | | super(); |
| | |
| | | */ |
| | | public QueryWrapper<PatrolConf> getQueryWrapper(PatrolConf param) { |
| | | QueryWrapper<PatrolConf> queryWrapper = new QueryWrapper<>(); |
| | | if (param == null) { |
| | | param = new PatrolConf(); |
| | | } |
| | | |
| | | // 设置公司ID并作为查询条件 |
| | | param.setCompanyId(ContextUtil.getCompanyId()); |
| | | queryWrapper.eq("company_id", param.getCompanyId()); |
| | | |
| | | if (StringUtils.isNotEmpty(param.getDeptId())) { |
| | | queryWrapper.eq("dept_id", param.getDeptId()); |
| | | } |
| | | |
| | | |
| | | // 按创建时间倒序排序 |
| | |
| | | * @return 影响行数 |
| | | */ |
| | | public int insertData(PatrolConf param) { |
| | | if (StringUtils.isEmpty(param.getBatchId())) { |
| | | param.setBatchId(ContextUtil.generateId()); |
| | | if (StringUtils.isEmpty(param.getId())) { |
| | | param.setId(ContextUtil.generateId()); |
| | | } |
| | | return patrolConfMapper.insert(param); |
| | | } |
| | |
| | | if (StringUtils.isNotBlank(param.getDeptId())) { |
| | | queryWrapper.eq("dept_id", param.getDeptId()); |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(param.getUserName())) { |
| | | queryWrapper.like("user_name", param.getUserName()); |
| | | } |
| | | if (StringUtils.isNotBlank(param.getConfName())) { |
| | | queryWrapper.like("conf_name", param.getConfName()); |
| | | } |
| | | |
| | | queryWrapper.orderByDesc("create_time"); |
| | | |
| | | return queryWrapper; |
| | |
| | | |
| | | import com.fzzy.igds.domain.PatrolConf; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.sys.manager.common.CommonManager; |
| | | import com.fzzy.sys.manager.security.PatrolConfManager; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.ShiroUtils; |
| | |
| | | @Resource |
| | | private PatrolConfManager patrolConfManager; |
| | | |
| | | @Resource |
| | | private CommonManager commonManager; |
| | | |
| | | /** |
| | | * 巡更配置页面 |
| | | */ |
| | | @GetMapping() |
| | | public String patrolConf() { |
| | | public String patrolConf(ModelMap mmap) { |
| | | return prefix + "/patrolConf"; |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("/add") |
| | | public String add(ModelMap mmap) { |
| | | //巡逻人列表 |
| | | mmap.put("userList", commonManager.listUserData()); |
| | | return prefix + "/add"; |
| | | } |
| | | |
| | |
| | | } |
| | | param.setCreateBy(getLoginName()); |
| | | param.setCreateTime(new Date()); |
| | | if (StringUtils.isEmpty(param.getBatchId())) { |
| | | param.setBatchId(ContextUtil.generateId()); |
| | | if (StringUtils.isEmpty(param.getId())) { |
| | | param.setId(ContextUtil.generateId()); |
| | | } |
| | | return toAjax(patrolConfManager.insertData(param)); |
| | | } |
| | |
| | | public String edit(@PathVariable("id") String id, ModelMap mmap) { |
| | | PatrolConf record = patrolConfManager.selectById(id); |
| | | mmap.put("patrolConf", record); |
| | | //巡逻人列表 |
| | | mmap.put("userList", commonManager.listUserData()); |
| | | return prefix + "/edit"; |
| | | } |
| | | |
| | |
| | | } |
| | | param.setUpdateBy(getLoginName()); |
| | | param.setUpdateTime(new Date()); |
| | | PatrolConf patrolConf = patrolConfManager.selectById(param.getBatchId()); |
| | | PatrolConf patrolConf = patrolConfManager.selectById(param.getId()); |
| | | if (patrolConf == null) { |
| | | param.setBatchId(ContextUtil.generateId()); |
| | | param.setId(ContextUtil.generateId()); |
| | | return toAjax(patrolConfManager.insertData(param)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/remove") |
| | | @ResponseBody |
| | | public AjaxResult remove(String ids) { |
| | | patrolConfManager.deleteDataById( ids); |
| | | patrolConfManager.deleteDataById(ids); |
| | | return success(); |
| | | } |
| | | } |
| | |
| | | package com.fzzy.sys.controller.security; |
| | | |
| | | import com.fzzy.igds.domain.Patrol; |
| | | import com.fzzy.igds.domain.PatrolConf; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.sys.manager.common.CommonManager; |
| | | import com.fzzy.sys.manager.security.PatrolConfManager; |
| | | import com.fzzy.sys.manager.security.PatrolManager; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | |
| | | @Resource |
| | | private PatrolManager patrolManager; |
| | | |
| | | @Resource |
| | | private PatrolConfManager patrolConfManager; |
| | | |
| | | |
| | | @Resource |
| | | private CommonManager commonManager; |
| | | /** |
| | | * 电子巡更页面 |
| | | * |
| | |
| | | * @date 2025/12/06 |
| | | */ |
| | | @GetMapping() |
| | | public String patrol() { |
| | | public String patrol(ModelMap mmap) { |
| | | //获取库区回显列表 |
| | | mmap.put("deptList", commonManager.listDeptData()); |
| | | return prefix + "/patrol"; |
| | | } |
| | | |
| | |
| | | |
| | | import com.fzzy.igds.constant.DepotType; |
| | | import com.fzzy.igds.domain.Depot; |
| | | import com.fzzy.igds.domain.Dept; |
| | | import com.fzzy.igds.service.CoreDeptService; |
| | | import com.fzzy.igds.service.DepotService; |
| | | import com.fzzy.igds.service.DicService; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | |
| | | @Slf4j |
| | | @Component |
| | | public class CommonManager { |
| | | |
| | | @Resource |
| | | private DepotService depotService; |
| | | @Resource |
| | | private DicService dicService; |
| | | @Resource |
| | | private CoreDeptService coreDeptService; |
| | | |
| | | @Autowired |
| | | private ISysUserService userService; |
| | | |
| | | /** |
| | | * 根据字典类型获取字典列表 |
| | | * |
| | | * @param parentCode |
| | | * @param companyId |
| | | * @return |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取分库列表 |
| | | * |
| | | * @author sgj |
| | | * @date 2025/12/12 |
| | | */ |
| | | public List<Dept> listDeptData() { |
| | | return coreDeptService.getDeptData(); |
| | | } |
| | | |
| | | /** |
| | | * 根据仓库编码获取仓库类型 |
| | | * |
| | | * @param depotId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | return depotType; |
| | | } |
| | | |
| | | /** |
| | | * 获取用户列表 |
| | | * |
| | | * @author sgj |
| | | * @date 2025/12/12 |
| | | */ |
| | | public List<SysUser> listUserData() { |
| | | SysUser user = new SysUser() ; |
| | | user.setCompanyId(ContextUtil.getCompanyId()); |
| | | user.setDeptId(Long.valueOf(ContextUtil.subDeptId(null))); |
| | | return userService.selectUserList(user); |
| | | } |
| | | } |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">班次编号:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="batchId" id="batchId" placeholder="请输入" class="form-control " type="text" |
| | | <input name="confId" id="confId" placeholder="请输入" class="form-control " type="text" |
| | | maxlength="30"> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">巡逻人:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="userName" id="userName" placeholder="请输入" class="form-control " type="text" |
| | | <input name="userId" id="userId" placeholder="请输入" class="form-control " type="text" |
| | | maxlength="30" required> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="select-list"> |
| | | <ul> |
| | | <li> |
| | | 名称:<input type="text" name="name"/> |
| | | 巡逻人:<input type="text" name="userName"/> |
| | | </li> |
| | | <li> |
| | | 班次名称:<input type="text" name="confName"/> |
| | | </li> |
| | | <li> |
| | | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
| | |
| | | </div> |
| | | |
| | | <div class="btn-group-sm" id="toolbar" role="group"> |
| | | <a class="btn btn-success" onclick="$.operate.add()" > |
| | | <i class="fa fa-plus"></i> 新增 |
| | | </a> |
| | | <a class="btn btn-primary single disabled" onclick="$.operate.edit()" > |
| | | <i class="fa fa-edit"></i> 修改 |
| | | </a> |
| | | <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" > |
| | | <i class="fa fa-remove"></i> 删除 |
| | | </a> |
| | | <a class="btn btn-warning" onclick="$.table.exportExcel()" > |
| | | <i class="fa fa-download"></i> 导出 |
| | | </a> |
| | | <!-- <a class="btn btn-success" onclick="$.operate.add()" >--> |
| | | <!-- <i class="fa fa-plus"></i> 新增--> |
| | | <!-- </a>--> |
| | | <!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" >--> |
| | | <!-- <i class="fa fa-edit"></i> 修改--> |
| | | <!-- </a>--> |
| | | <!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" >--> |
| | | <!-- <i class="fa fa-remove"></i> 删除--> |
| | | <!-- </a>--> |
| | | <!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" >--> |
| | | <!-- <i class="fa fa-download"></i> 导出--> |
| | | <!-- </a>--> |
| | | <a class="btn btn-success" onclick="openPatrolConf()" > |
| | | <i class="fa fa-plus"></i> 巡更配置 |
| | | </a> |
| | |
| | | <th:block th:include="include :: select2-js" /> |
| | | <script th:inline="javascript"> |
| | | var prefix = ctx + "security/patrol"; |
| | | |
| | | var deptList = [[${deptList}]]; |
| | | $(function() { |
| | | |
| | | var options = { |
| | |
| | | sortName: "id", |
| | | sortOrder: "asc", |
| | | modalName: "参数", |
| | | showSearch:false, |
| | | showRefresh:false, |
| | | showColumns:false, |
| | | showToggle:false, |
| | | columns: [{ |
| | | checkbox: true |
| | | }, |
| | |
| | | field: 'deptId', |
| | | title: '所属库区', |
| | | align: 'left', |
| | | // formatter: function(value, row, index) { |
| | | // return $.table.tooltip(value); |
| | | // } |
| | | //根据deptList回显诗句 |
| | | formatter: function(value, row, index) { |
| | | var deptName = ''; |
| | | deptList.forEach(function (item) { |
| | | if (item.id == value) { |
| | | deptName = item.kqmc; |
| | | } |
| | | }) |
| | | return $.table.tooltip(deptName); |
| | | } |
| | | |
| | | }, |
| | | { |
| | | field: 'batchId', |
| | | title: '班次编号', |
| | | field: 'confName', |
| | | title: '班次名称', |
| | | align: 'left', |
| | | // formatter: function(value, row, index) { |
| | | // return $.table.tooltip(value); |
| | |
| | | align: 'center', |
| | | formatter: function(value, row, index) { |
| | | var actions = []; |
| | | actions.push('<a class="btn btn-success btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
| | | actions.push('<a class="btn btn-danger btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
| | | // actions.push('<a class="btn btn-success btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
| | | // actions.push('<a class="btn btn-danger btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
| | | actions.push('<a class="btn btn-info btn-xs ' + '" href="javascript:void(0)" onclick="patrolDetail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>详情</a> '); |
| | | return actions.join(''); |
| | | } |
| | |
| | | <body> |
| | | <div class="main-content"> |
| | | <form id="form-patrol-add" class="form-horizontal"> |
| | | <input name="deptId" type="hidden" id="treeId"/> |
| | | <input name="userId" type="hidden" id="userId"/> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">班次名称:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="batchName" id="batchName" placeholder="请输入" class="form-control " type="text" |
| | | <input name="name" id="name" placeholder="请输入" class="form-control " type="text" |
| | | maxlength="30" required> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">巡逻人:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="userName" id="userName" placeholder="请输入" class="form-control " type="text" |
| | | maxlength="30" required> |
| | | <select name="userName" id="userName" class="form-control select2" multiple required onchange="changeUser(this)"> |
| | | <option value="">请选择巡逻人</option> |
| | | <option th:each="user : ${userList}" th:value="${user.userName}" th:data-userid="${user.userId}" th:text="${user.userName}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">开始时间:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="start" placeholder="请选择开始时间" data-type="datetime" class="form-control time-input" type="text" |
| | | required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">结束时间:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="end" placeholder="请选择结束时间" data-type="datetime" class="form-control time-input" type="text" |
| | | required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <th:block th:include="include :: footer"/> |
| | | <th:block th:include="include :: select2-js"/> |
| | | <script> |
| | | <script type="text/javascript"> |
| | | var prefix = ctx + "security/patrol/patrolConf"; |
| | | |
| | | $("#form-cabinet-add").validate({ |
| | |
| | | } |
| | | } |
| | | |
| | | function changeUser(selectElement) { |
| | | var selectedOptions = Array.from(selectElement.selectedOptions); |
| | | var userIds = selectedOptions.map(option => option.getAttribute('data-userid')).filter(id => id); |
| | | var userIdStr = userIds.join(','); |
| | | $("#userId").val(userIdStr); |
| | | } |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | |
| | | <body class="white-bg"> |
| | | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
| | | <form class="form-horizontal m" id="form-patrol-edit" th:object="${patrolConf}"> |
| | | <input id="id" name="id" th:field="*{batchId}" type="hidden"> |
| | | <input id="id" name="id" th:field="*{id}" type="hidden"> |
| | | <input name="userId" type="hidden" th:field="*{userId}" id="userId"/> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">班次名称:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="batchName" id="batchName" th:field="*{batchName}" placeholder="请输入" class="form-control " |
| | | <input name="name" id="name" th:field="*{name}" placeholder="请输入" class="form-control " |
| | | type="text" |
| | | maxlength="30" required> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">巡逻人:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="userName" id="userName" th:field="*{userName}" placeholder="请输入" class="form-control " |
| | | type="text" |
| | | maxlength="30" required> |
| | | <select name="userName" id="userName" class="form-control select2" multiple required onchange="changeUser(this)"> |
| | | <option value="">请选择巡逻人</option> |
| | | <option th:each="user : ${userList}" |
| | | th:value="${user.userName}" |
| | | th:text="${user.userName}" |
| | | th:data-userid="${user.userId}" |
| | | th:selected="${#strings.contains(patrolConf.userId, user.userId)}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">开始时间:</label> |
| | | <div class="col-sm-8"> |
| | | <input id="start" name="startTime" th:value="*{#dates.format(start, 'yyyy-MM-dd HH:mm:ss')}" data-type="datetime" placeholder="请选择开始时间" class="form-control time-input" type="text" required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">结束时间:</label> |
| | | <div class="col-sm-8"> |
| | | <input id="end" name="endTime" th:value="*{#dates.format(end, 'yyyy-MM-dd HH:mm:ss')}" data-type="datetime" placeholder="请选择结束时间" class="form-control time-input" type="text" required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <th:block th:include="include :: footer"/> |
| | | <th:block th:include="include :: select2-js"/> |
| | | <script type="text/javascript"> |
| | | |
| | | var prefix = ctx + "security/patrol/patrolConf"; |
| | | |
| | | |
| | |
| | | $.operate.save(prefix + "/edit", $('#form-patrol-edit').serialize()); |
| | | } |
| | | } |
| | | |
| | | function changeUser(selectElement) { |
| | | var selectedOptions = Array.from(selectElement.selectedOptions); |
| | | var userIds = selectedOptions.map(option => option.getAttribute('data-userid')).filter(id => id); |
| | | var userIdStr = userIds.join(','); |
| | | $("#userId").val(userIdStr); |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | <body class="gray-bg"> |
| | | <div class="container-div"> |
| | | <div class="row"> |
| | | <div class="col-sm-12 search-collapse"> |
| | | <form id="property-form"> |
| | | <div class="select-list"> |
| | | <ul> |
| | | <li> |
| | | 名称:<input type="text" name="name"/> |
| | | </li> |
| | | <li> |
| | | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
| | | <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <!-- <div class="col-sm-12 search-collapse">--> |
| | | <!-- <form id="property-form">--> |
| | | <!-- <div class="select-list">--> |
| | | <!-- <ul>--> |
| | | <!-- <li>--> |
| | | <!-- 名称:<input type="text" name="name"/>--> |
| | | <!-- </li>--> |
| | | <!-- <li>--> |
| | | <!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>--> |
| | | <!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>--> |
| | | <!-- </li>--> |
| | | <!-- </ul>--> |
| | | <!-- </div>--> |
| | | <!-- </form>--> |
| | | <!-- </div>--> |
| | | |
| | | <div class="btn-group-sm" id="toolbar" role="group"> |
| | | <a class="btn btn-success" onclick="$.operate.add()" > |
| | |
| | | <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" > |
| | | <i class="fa fa-remove"></i> 删除 |
| | | </a> |
| | | <a class="btn btn-warning" onclick="$.table.exportExcel()" > |
| | | <i class="fa fa-download"></i> 导出 |
| | | </a> |
| | | <!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" >--> |
| | | <!-- <i class="fa fa-download"></i> 导出--> |
| | | <!-- </a>--> |
| | | </div> |
| | | <div class="col-sm-12 select-table table-striped"> |
| | | <table id="bootstrap-table"></table> |
| | |
| | | updateUrl: prefix + "/edit/{id}", |
| | | removeUrl: prefix + "/remove", |
| | | exportUrl: prefix + "/export", |
| | | sortName: "batchId", |
| | | sortName: "id", |
| | | sortOrder: "asc", |
| | | modalName: "参数", |
| | | showSearch:false, |
| | | showRefresh:false, |
| | | showColumns:false, |
| | | showToggle:false, |
| | | columns: [{ |
| | | checkbox: true |
| | | }, |
| | | { |
| | | field: 'batchId', |
| | | field: 'id', |
| | | title: '主键', |
| | | visible: false, |
| | | }, |
| | | { |
| | | field: 'batchName', |
| | | field: 'name', |
| | | title: '班次名称', |
| | | align: 'left', |
| | | // formatter: function(value, row, index) { |
| | |
| | | align: 'center', |
| | | formatter: function(value, row, index) { |
| | | var actions = []; |
| | | actions.push('<a class="btn btn-success btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.batchId + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
| | | actions.push('<a class="btn btn-danger btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.batchId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
| | | actions.push('<a class="btn btn-success btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
| | | actions.push('<a class="btn btn-danger btn-xs ' + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
| | | return actions.join(''); |
| | | } |
| | | }] |