修改 总装
parent
5e6fc85507
commit
f5f0050f2a
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.BaseOneUnquqlifiedRate;
|
||||
import com.ruoyi.system.service.IBaseOneUnquqlifiedRateService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 一次不合格率维护Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-22
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/base_rate")
|
||||
public class BaseOneUnquqlifiedRateController extends BaseController
|
||||
{
|
||||
private String prefix = "system/base_rate";
|
||||
|
||||
@Autowired
|
||||
private IBaseOneUnquqlifiedRateService baseOneUnquqlifiedRateService;
|
||||
|
||||
@RequiresPermissions("system:base_rate:view")
|
||||
@GetMapping()
|
||||
public String base_rate()
|
||||
{
|
||||
return prefix + "/base_rate";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询一次不合格率维护列表
|
||||
*/
|
||||
@RequiresPermissions("system:base_rate:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate)
|
||||
{
|
||||
startPage();
|
||||
List<BaseOneUnquqlifiedRate> list = baseOneUnquqlifiedRateService.selectBaseOneUnquqlifiedRateList(baseOneUnquqlifiedRate);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出一次不合格率维护列表
|
||||
*/
|
||||
@RequiresPermissions("system:base_rate:export")
|
||||
@Log(title = "一次不合格率维护", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate)
|
||||
{
|
||||
List<BaseOneUnquqlifiedRate> list = baseOneUnquqlifiedRateService.selectBaseOneUnquqlifiedRateList(baseOneUnquqlifiedRate);
|
||||
ExcelUtil<BaseOneUnquqlifiedRate> util = new ExcelUtil<BaseOneUnquqlifiedRate>(BaseOneUnquqlifiedRate.class);
|
||||
return util.exportExcel(list, "一次不合格率维护数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增一次不合格率维护
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存一次不合格率维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_rate:add")
|
||||
@Log(title = "一次不合格率维护", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate)
|
||||
{
|
||||
return toAjax(baseOneUnquqlifiedRateService.insertBaseOneUnquqlifiedRate(baseOneUnquqlifiedRate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改一次不合格率维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_rate:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
BaseOneUnquqlifiedRate baseOneUnquqlifiedRate = baseOneUnquqlifiedRateService.selectBaseOneUnquqlifiedRateById(id);
|
||||
mmap.put("baseOneUnquqlifiedRate", baseOneUnquqlifiedRate);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存一次不合格率维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_rate:edit")
|
||||
@Log(title = "一次不合格率维护", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate)
|
||||
{
|
||||
return toAjax(baseOneUnquqlifiedRateService.updateBaseOneUnquqlifiedRate(baseOneUnquqlifiedRate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除一次不合格率维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_rate:remove")
|
||||
@Log(title = "一次不合格率维护", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(baseOneUnquqlifiedRateService.deleteBaseOneUnquqlifiedRateByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 一次不合格率维护对象 base_one_unquqlified_rate
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-22
|
||||
*/
|
||||
public class BaseOneUnquqlifiedRate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 不合格率 */
|
||||
@Excel(name = "不合格率")
|
||||
private double rate;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public double getRate() {
|
||||
return rate;
|
||||
}
|
||||
|
||||
public void setRate(double rate) {
|
||||
this.rate = rate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("rate", getRate())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseOneUnquqlifiedRate;
|
||||
|
||||
/**
|
||||
* 一次不合格率维护Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-22
|
||||
*/
|
||||
public interface BaseOneUnquqlifiedRateMapper
|
||||
{
|
||||
/**
|
||||
* 查询一次不合格率维护
|
||||
*
|
||||
* @param id 一次不合格率维护主键
|
||||
* @return 一次不合格率维护
|
||||
*/
|
||||
public BaseOneUnquqlifiedRate selectBaseOneUnquqlifiedRateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询一次不合格率维护列表
|
||||
*
|
||||
* @param baseOneUnquqlifiedRate 一次不合格率维护
|
||||
* @return 一次不合格率维护集合
|
||||
*/
|
||||
public List<BaseOneUnquqlifiedRate> selectBaseOneUnquqlifiedRateList(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate);
|
||||
|
||||
/**
|
||||
* 新增一次不合格率维护
|
||||
*
|
||||
* @param baseOneUnquqlifiedRate 一次不合格率维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate);
|
||||
|
||||
/**
|
||||
* 修改一次不合格率维护
|
||||
*
|
||||
* @param baseOneUnquqlifiedRate 一次不合格率维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate);
|
||||
|
||||
/**
|
||||
* 删除一次不合格率维护
|
||||
*
|
||||
* @param id 一次不合格率维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseOneUnquqlifiedRateById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除一次不合格率维护
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseOneUnquqlifiedRateByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseOneUnquqlifiedRate;
|
||||
|
||||
/**
|
||||
* 一次不合格率维护Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-22
|
||||
*/
|
||||
public interface IBaseOneUnquqlifiedRateService
|
||||
{
|
||||
/**
|
||||
* 查询一次不合格率维护
|
||||
*
|
||||
* @param id 一次不合格率维护主键
|
||||
* @return 一次不合格率维护
|
||||
*/
|
||||
public BaseOneUnquqlifiedRate selectBaseOneUnquqlifiedRateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询一次不合格率维护列表
|
||||
*
|
||||
* @param baseOneUnquqlifiedRate 一次不合格率维护
|
||||
* @return 一次不合格率维护集合
|
||||
*/
|
||||
public List<BaseOneUnquqlifiedRate> selectBaseOneUnquqlifiedRateList(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate);
|
||||
|
||||
/**
|
||||
* 新增一次不合格率维护
|
||||
*
|
||||
* @param baseOneUnquqlifiedRate 一次不合格率维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate);
|
||||
|
||||
/**
|
||||
* 修改一次不合格率维护
|
||||
*
|
||||
* @param baseOneUnquqlifiedRate 一次不合格率维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate);
|
||||
|
||||
/**
|
||||
* 批量删除一次不合格率维护
|
||||
*
|
||||
* @param ids 需要删除的一次不合格率维护主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseOneUnquqlifiedRateByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除一次不合格率维护信息
|
||||
*
|
||||
* @param id 一次不合格率维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseOneUnquqlifiedRateById(Long id);
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BaseOneUnquqlifiedRateMapper;
|
||||
import com.ruoyi.system.domain.BaseOneUnquqlifiedRate;
|
||||
import com.ruoyi.system.service.IBaseOneUnquqlifiedRateService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 一次不合格率维护Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-22
|
||||
*/
|
||||
@Service
|
||||
public class BaseOneUnquqlifiedRateServiceImpl implements IBaseOneUnquqlifiedRateService
|
||||
{
|
||||
@Autowired
|
||||
private BaseOneUnquqlifiedRateMapper baseOneUnquqlifiedRateMapper;
|
||||
|
||||
/**
|
||||
* 查询一次不合格率维护
|
||||
*
|
||||
* @param id 一次不合格率维护主键
|
||||
* @return 一次不合格率维护
|
||||
*/
|
||||
@Override
|
||||
public BaseOneUnquqlifiedRate selectBaseOneUnquqlifiedRateById(Long id)
|
||||
{
|
||||
return baseOneUnquqlifiedRateMapper.selectBaseOneUnquqlifiedRateById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询一次不合格率维护列表
|
||||
*
|
||||
* @param baseOneUnquqlifiedRate 一次不合格率维护
|
||||
* @return 一次不合格率维护
|
||||
*/
|
||||
@Override
|
||||
public List<BaseOneUnquqlifiedRate> selectBaseOneUnquqlifiedRateList(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate)
|
||||
{
|
||||
return baseOneUnquqlifiedRateMapper.selectBaseOneUnquqlifiedRateList(baseOneUnquqlifiedRate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增一次不合格率维护
|
||||
*
|
||||
* @param baseOneUnquqlifiedRate 一次不合格率维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate)
|
||||
{
|
||||
return baseOneUnquqlifiedRateMapper.insertBaseOneUnquqlifiedRate(baseOneUnquqlifiedRate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改一次不合格率维护
|
||||
*
|
||||
* @param baseOneUnquqlifiedRate 一次不合格率维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseOneUnquqlifiedRate(BaseOneUnquqlifiedRate baseOneUnquqlifiedRate)
|
||||
{
|
||||
return baseOneUnquqlifiedRateMapper.updateBaseOneUnquqlifiedRate(baseOneUnquqlifiedRate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除一次不合格率维护
|
||||
*
|
||||
* @param ids 需要删除的一次不合格率维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseOneUnquqlifiedRateByIds(String ids)
|
||||
{
|
||||
return baseOneUnquqlifiedRateMapper.deleteBaseOneUnquqlifiedRateByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除一次不合格率维护信息
|
||||
*
|
||||
* @param id 一次不合格率维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseOneUnquqlifiedRateById(Long id)
|
||||
{
|
||||
return baseOneUnquqlifiedRateMapper.deleteBaseOneUnquqlifiedRateById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(2048, '一次不合格率维护', '5', '1', '/system/base_rate', 'C', '0', 'system:base_rate:view', '#', 'admin', sysdate, '', null, '一次不合格率维护菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(seq_sys_menu.nextval, '一次不合格率维护查询', 2048, '1', '#', 'F', '0', 'system:base_rate:list', '#', 'admin', sysdate, '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(seq_sys_menu.nextval, '一次不合格率维护新增', 2048, '2', '#', 'F', '0', 'system:base_rate:add', '#', 'admin', sysdate, '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(seq_sys_menu.nextval, '一次不合格率维护修改', 2048, '3', '#', 'F', '0', 'system:base_rate:edit', '#', 'admin', sysdate, '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(seq_sys_menu.nextval, '一次不合格率维护删除', 2048, '4', '#', 'F', '0', 'system:base_rate:remove', '#', 'admin', sysdate, '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(seq_sys_menu.nextval, '一次不合格率维护导出', 2048, '5', '#', 'F', '0', 'system:base_rate:export', '#', 'admin', sysdate, '', null, '');
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
<?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.ruoyi.system.mapper.BaseOneUnquqlifiedRateMapper">
|
||||
|
||||
<resultMap type="BaseOneUnquqlifiedRate" id="BaseOneUnquqlifiedRateResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="rate" column="rate" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseOneUnquqlifiedRateVo">
|
||||
select id, rate from base_one_unquqlified_rate
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseOneUnquqlifiedRateList" parameterType="BaseOneUnquqlifiedRate" resultMap="BaseOneUnquqlifiedRateResult">
|
||||
<include refid="selectBaseOneUnquqlifiedRateVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseOneUnquqlifiedRateById" parameterType="Long" resultMap="BaseOneUnquqlifiedRateResult">
|
||||
<include refid="selectBaseOneUnquqlifiedRateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseOneUnquqlifiedRate" parameterType="BaseOneUnquqlifiedRate">
|
||||
insert into base_one_unquqlified_rate
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="rate != null">rate,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="rate != null">#{rate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseOneUnquqlifiedRate" parameterType="BaseOneUnquqlifiedRate">
|
||||
update base_one_unquqlified_rate
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="rate != null">rate = #{rate},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseOneUnquqlifiedRateById" parameterType="Long">
|
||||
delete from base_one_unquqlified_rate where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseOneUnquqlifiedRateByIds" parameterType="String">
|
||||
delete from base_one_unquqlified_rate where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增一次不合格率维护')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-base_rate-add">
|
||||
<!-- <div class="form-group"> -->
|
||||
<!-- <label class="col-sm-3 control-label">主键:</label>-->
|
||||
<!-- <div class="col-sm-8">-->
|
||||
<!-- <input name="id" class="form-control" type="text">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">不合格率:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rate" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/base_rate"
|
||||
$("#form-base_rate-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-base_rate-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('一次不合格率维护列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<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()" shiro:hasPermission="system:base_rate:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:base_rate:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:base_rate:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:base_rate:export">-->
|
||||
<!-- <i class="fa fa-download"></i> 导出-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:base_rate:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:base_rate:remove')}]];
|
||||
var prefix = ctx + "system/base_rate";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "一次不合格率维护",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'rate',
|
||||
title: '不合格率'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" 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 ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改一次不合格率维护')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-base_rate-edit" th:object="${baseOneUnquqlifiedRate}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">不合格率:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rate" th:field="*{rate}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/base_rate";
|
||||
$("#form-base_rate-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-base_rate-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue