修改 发泡
parent
ab282e34b0
commit
c7d040b836
@ -0,0 +1,135 @@
|
|||||||
|
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.BaseFpPlanqty;
|
||||||
|
import com.ruoyi.system.service.IBaseFpPlanqtyService;
|
||||||
|
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-20
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/system/base_planqty")
|
||||||
|
public class BaseFpPlanqtyController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "system/base_planqty";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBaseFpPlanqtyService baseFpPlanqtyService;
|
||||||
|
|
||||||
|
@RequiresPermissions("system:base_planqty:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String base_planqty()
|
||||||
|
{
|
||||||
|
return prefix + "/base_planqty";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发泡线工位目标列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_planqty:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(BaseFpPlanqty baseFpPlanqty)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<BaseFpPlanqty> list = baseFpPlanqtyService.selectBaseFpPlanqtyList(baseFpPlanqty);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出发泡线工位目标列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_planqty:export")
|
||||||
|
@Log(title = "发泡线工位目标", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(BaseFpPlanqty baseFpPlanqty)
|
||||||
|
{
|
||||||
|
List<BaseFpPlanqty> list = baseFpPlanqtyService.selectBaseFpPlanqtyList(baseFpPlanqty);
|
||||||
|
ExcelUtil<BaseFpPlanqty> util = new ExcelUtil<BaseFpPlanqty>(BaseFpPlanqty.class);
|
||||||
|
return util.exportExcel(list, "发泡线工位目标数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发泡线工位目标
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存发泡线工位目标
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_planqty:add")
|
||||||
|
@Log(title = "发泡线工位目标", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(BaseFpPlanqty baseFpPlanqty)
|
||||||
|
{
|
||||||
|
|
||||||
|
List<BaseFpPlanqty> list = baseFpPlanqtyService.selectBaseFpPlanqtyList(null);
|
||||||
|
Long id=1L;
|
||||||
|
System.out.println(list);
|
||||||
|
if (list!=null||!list.isEmpty()){
|
||||||
|
id=list.get(list.size()-1).getId()+1;
|
||||||
|
}
|
||||||
|
baseFpPlanqty.setId(id);
|
||||||
|
return toAjax(baseFpPlanqtyService.insertBaseFpPlanqty(baseFpPlanqty));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发泡线工位目标
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_planqty:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
BaseFpPlanqty baseFpPlanqty = baseFpPlanqtyService.selectBaseFpPlanqtyById(id);
|
||||||
|
mmap.put("baseFpPlanqty", baseFpPlanqty);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存发泡线工位目标
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_planqty:edit")
|
||||||
|
@Log(title = "发泡线工位目标", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(BaseFpPlanqty baseFpPlanqty)
|
||||||
|
{
|
||||||
|
return toAjax(baseFpPlanqtyService.updateBaseFpPlanqty(baseFpPlanqty));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发泡线工位目标
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_planqty:remove")
|
||||||
|
@Log(title = "发泡线工位目标", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(baseFpPlanqtyService.deleteBaseFpPlanqtyByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
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_fp_planqty
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-20
|
||||||
|
*/
|
||||||
|
public class BaseFpPlanqty extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 目标数 */
|
||||||
|
@Excel(name = "目标数")
|
||||||
|
private Long qty;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
public void setQty(Long qty)
|
||||||
|
{
|
||||||
|
this.qty = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getQty()
|
||||||
|
{
|
||||||
|
return qty;
|
||||||
|
}
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("qty", getQty())
|
||||||
|
.append("id", getId())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.BaseFpPlanqty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发泡线工位目标Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-20
|
||||||
|
*/
|
||||||
|
public interface BaseFpPlanqtyMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param id 发泡线工位目标主键
|
||||||
|
* @return 发泡线工位目标
|
||||||
|
*/
|
||||||
|
public BaseFpPlanqty selectBaseFpPlanqtyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发泡线工位目标列表
|
||||||
|
*
|
||||||
|
* @param baseFpPlanqty 发泡线工位目标
|
||||||
|
* @return 发泡线工位目标集合
|
||||||
|
*/
|
||||||
|
public List<BaseFpPlanqty> selectBaseFpPlanqtyList(BaseFpPlanqty baseFpPlanqty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param baseFpPlanqty 发泡线工位目标
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseFpPlanqty(BaseFpPlanqty baseFpPlanqty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param baseFpPlanqty 发泡线工位目标
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseFpPlanqty(BaseFpPlanqty baseFpPlanqty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param id 发泡线工位目标主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseFpPlanqtyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseFpPlanqtyByIds(String[] ids);
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.BaseFpPlanqty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发泡线工位目标Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-20
|
||||||
|
*/
|
||||||
|
public interface IBaseFpPlanqtyService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param id 发泡线工位目标主键
|
||||||
|
* @return 发泡线工位目标
|
||||||
|
*/
|
||||||
|
public BaseFpPlanqty selectBaseFpPlanqtyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发泡线工位目标列表
|
||||||
|
*
|
||||||
|
* @param baseFpPlanqty 发泡线工位目标
|
||||||
|
* @return 发泡线工位目标集合
|
||||||
|
*/
|
||||||
|
public List<BaseFpPlanqty> selectBaseFpPlanqtyList(BaseFpPlanqty baseFpPlanqty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param baseFpPlanqty 发泡线工位目标
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseFpPlanqty(BaseFpPlanqty baseFpPlanqty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param baseFpPlanqty 发泡线工位目标
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseFpPlanqty(BaseFpPlanqty baseFpPlanqty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的发泡线工位目标主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseFpPlanqtyByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发泡线工位目标信息
|
||||||
|
*
|
||||||
|
* @param id 发泡线工位目标主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseFpPlanqtyById(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.BaseFpPlanqtyMapper;
|
||||||
|
import com.ruoyi.system.domain.BaseFpPlanqty;
|
||||||
|
import com.ruoyi.system.service.IBaseFpPlanqtyService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发泡线工位目标Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-20
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BaseFpPlanqtyServiceImpl implements IBaseFpPlanqtyService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BaseFpPlanqtyMapper baseFpPlanqtyMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param id 发泡线工位目标主键
|
||||||
|
* @return 发泡线工位目标
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BaseFpPlanqty selectBaseFpPlanqtyById(Long id)
|
||||||
|
{
|
||||||
|
return baseFpPlanqtyMapper.selectBaseFpPlanqtyById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发泡线工位目标列表
|
||||||
|
*
|
||||||
|
* @param baseFpPlanqty 发泡线工位目标
|
||||||
|
* @return 发泡线工位目标
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BaseFpPlanqty> selectBaseFpPlanqtyList(BaseFpPlanqty baseFpPlanqty)
|
||||||
|
{
|
||||||
|
return baseFpPlanqtyMapper.selectBaseFpPlanqtyList(baseFpPlanqty);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param baseFpPlanqty 发泡线工位目标
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBaseFpPlanqty(BaseFpPlanqty baseFpPlanqty)
|
||||||
|
{
|
||||||
|
return baseFpPlanqtyMapper.insertBaseFpPlanqty(baseFpPlanqty);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param baseFpPlanqty 发泡线工位目标
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBaseFpPlanqty(BaseFpPlanqty baseFpPlanqty)
|
||||||
|
{
|
||||||
|
return baseFpPlanqtyMapper.updateBaseFpPlanqty(baseFpPlanqty);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除发泡线工位目标
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的发泡线工位目标主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseFpPlanqtyByIds(String ids)
|
||||||
|
{
|
||||||
|
return baseFpPlanqtyMapper.deleteBaseFpPlanqtyByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发泡线工位目标信息
|
||||||
|
*
|
||||||
|
* @param id 发泡线工位目标主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseFpPlanqtyById(Long id)
|
||||||
|
{
|
||||||
|
return baseFpPlanqtyMapper.deleteBaseFpPlanqtyById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
<?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.BaseFpPlanqtyMapper">
|
||||||
|
|
||||||
|
<resultMap type="BaseFpPlanqty" id="BaseFpPlanqtyResult">
|
||||||
|
<result property="qty" column="qty" />
|
||||||
|
<result property="id" column="id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBaseFpPlanqtyVo">
|
||||||
|
select qty, id from base_fp_planqty
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectBaseFpPlanqtyList" parameterType="BaseFpPlanqty" resultMap="BaseFpPlanqtyResult">
|
||||||
|
<include refid="selectBaseFpPlanqtyVo"/>
|
||||||
|
<where>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBaseFpPlanqtyById" parameterType="Long" resultMap="BaseFpPlanqtyResult">
|
||||||
|
<include refid="selectBaseFpPlanqtyVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBaseFpPlanqty" parameterType="BaseFpPlanqty">
|
||||||
|
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
||||||
|
SELECT seq_base_fp_planqty.NEXTVAL as id FROM DUAL
|
||||||
|
</selectKey>
|
||||||
|
insert into base_fp_planqty
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="qty != null">qty,</if>
|
||||||
|
<if test="id != null">id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="qty != null">#{qty},</if>
|
||||||
|
<if test="id != null">#{id},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBaseFpPlanqty" parameterType="BaseFpPlanqty">
|
||||||
|
update base_fp_planqty
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="qty != null">qty = #{qty},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBaseFpPlanqtyById" parameterType="Long">
|
||||||
|
delete from base_fp_planqty where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBaseFpPlanqtyByIds" parameterType="String">
|
||||||
|
delete from base_fp_planqty where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
<!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_planqty-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">目标数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="qty" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/base_planqty"
|
||||||
|
$("#form-base_planqty-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-base_planqty-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,82 @@
|
|||||||
|
<!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_planqty:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:base_planqty:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:base_planqty:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:base_planqty: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_planqty:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('system:base_planqty:remove')}]];
|
||||||
|
var prefix = ctx + "system/base_planqty";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "发泡线工位目标",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'qty',
|
||||||
|
title: '目标数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '${comment}',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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_planqty-edit" th:object="${baseFpPlanqty}">
|
||||||
|
<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="qty" th:field="*{qty}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/base_planqty";
|
||||||
|
$("#form-base_planqty-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-base_planqty-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue