New file |
| | |
| | | package com.javaweb.geo.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.javaweb.common.annotation.Log; |
| | | import com.javaweb.common.enums.BusinessType; |
| | | import com.javaweb.geo.domain.TubLog; |
| | | import com.javaweb.geo.service.ITubLogService; |
| | | import com.javaweb.common.core.controller.BaseController; |
| | | import com.javaweb.common.core.domain.AjaxResult; |
| | | import com.javaweb.common.utils.poi.ExcelUtil; |
| | | import com.javaweb.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 材料出入库记录Controller |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-22 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/geo/TubLog") |
| | | public class TubLogController extends BaseController |
| | | { |
| | | private String prefix = "geo/TubLog"; |
| | | |
| | | @Autowired |
| | | private ITubLogService tubLogService; |
| | | |
| | | @RequiresPermissions("geo:TubLog:view") |
| | | @GetMapping() |
| | | public String TubLog() |
| | | { |
| | | return prefix + "/TubLog"; |
| | | } |
| | | |
| | | /** |
| | | * 查询材料出入库记录列表 |
| | | */ |
| | | @RequiresPermissions("geo:TubLog:list") |
| | | @PostMapping("/list") |
| | | @ResponseBody |
| | | public TableDataInfo list(TubLog tubLog) |
| | | { |
| | | startPage(); |
| | | List<TubLog> list = tubLogService.selectTubLogList(tubLog); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出材料出入库记录列表 |
| | | */ |
| | | @RequiresPermissions("geo:TubLog:export") |
| | | @Log(title = "材料出入库记录", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @ResponseBody |
| | | public AjaxResult export(TubLog tubLog) |
| | | { |
| | | List<TubLog> list = tubLogService.selectTubLogList(tubLog); |
| | | ExcelUtil<TubLog> util = new ExcelUtil<TubLog>(TubLog.class); |
| | | return util.exportExcel(list, "TubLog"); |
| | | } |
| | | |
| | | /** |
| | | * 新增材料出入库记录 |
| | | */ |
| | | @GetMapping("/add") |
| | | public String add() |
| | | { |
| | | return prefix + "/add"; |
| | | } |
| | | |
| | | /** |
| | | * 新增保存材料出入库记录 |
| | | */ |
| | | @RequiresPermissions("geo:TubLog:add") |
| | | @Log(title = "材料出入库记录", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @ResponseBody |
| | | public AjaxResult addSave(TubLog tubLog) |
| | | { |
| | | return toAjax(tubLogService.insertTubLog(tubLog)); |
| | | } |
| | | |
| | | /** |
| | | * 修改材料出入库记录 |
| | | */ |
| | | @GetMapping("/edit/{id}") |
| | | public String edit(@PathVariable("id") Integer id, ModelMap mmap) |
| | | { |
| | | TubLog tubLog = tubLogService.selectTubLogById(id); |
| | | mmap.put("tubLog", tubLog); |
| | | return prefix + "/edit"; |
| | | } |
| | | |
| | | /** |
| | | * 修改保存材料出入库记录 |
| | | */ |
| | | @RequiresPermissions("geo:TubLog:edit") |
| | | @Log(title = "材料出入库记录", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @ResponseBody |
| | | public AjaxResult editSave(TubLog tubLog) |
| | | { |
| | | return toAjax(tubLogService.updateTubLog(tubLog)); |
| | | } |
| | | |
| | | /** |
| | | * 删除材料出入库记录 |
| | | */ |
| | | @RequiresPermissions("geo:TubLog:remove") |
| | | @Log(title = "材料出入库记录", businessType = BusinessType.DELETE) |
| | | @PostMapping( "/remove") |
| | | @ResponseBody |
| | | public AjaxResult remove(String ids) |
| | | { |
| | | return toAjax(tubLogService.deleteTubLogByIds(ids)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.javaweb.geo.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.javaweb.common.annotation.Excel; |
| | | import com.javaweb.common.core.domain.BaseEntity; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 材料出入库记录对象 js_tub_log |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-22 |
| | | */ |
| | | public class TubLog extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主键 */ |
| | | private Integer id; |
| | | |
| | | /** 出入库单子号 */ |
| | | @Excel(name = "出入库单子号") |
| | | private String code; |
| | | |
| | | /** 项目id */ |
| | | private String projectId; |
| | | |
| | | /** 管材名称 */ |
| | | @Excel(name = "管材名称") |
| | | private String tubName; |
| | | |
| | | /** 类型 */ |
| | | @Excel(name = "类型") |
| | | private String type; |
| | | |
| | | /** 出库时间 */ |
| | | @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date outboundDate; |
| | | |
| | | /** 入库时间 */ |
| | | @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date inboundDate; |
| | | |
| | | /** 经办人 */ |
| | | @Excel(name = "经办人") |
| | | private String optUser; |
| | | |
| | | /** 负责人 */ |
| | | @Excel(name = "负责人") |
| | | private String applyUser; |
| | | |
| | | /** 出入库数量 */ |
| | | @Excel(name = "出入库数量") |
| | | private Double number; |
| | | |
| | | /** 数据单位 */ |
| | | @Excel(name = "数据单位") |
| | | private String unit; |
| | | |
| | | /** 时间 */ |
| | | @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | public void setId(Integer id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setCode(String code) |
| | | { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getCode() |
| | | { |
| | | return code; |
| | | } |
| | | public void setProjectId(String projectId) |
| | | { |
| | | this.projectId = projectId; |
| | | } |
| | | |
| | | public String getProjectId() |
| | | { |
| | | return projectId; |
| | | } |
| | | public void setTubName(String tubName) |
| | | { |
| | | this.tubName = tubName; |
| | | } |
| | | |
| | | public String getTubName() |
| | | { |
| | | return tubName; |
| | | } |
| | | public void setType(String type) |
| | | { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getType() |
| | | { |
| | | return type; |
| | | } |
| | | public void setOutboundDate(Date outboundDate) |
| | | { |
| | | this.outboundDate = outboundDate; |
| | | } |
| | | |
| | | public Date getOutboundDate() |
| | | { |
| | | return outboundDate; |
| | | } |
| | | public void setInboundDate(Date inboundDate) |
| | | { |
| | | this.inboundDate = inboundDate; |
| | | } |
| | | |
| | | public Date getInboundDate() |
| | | { |
| | | return inboundDate; |
| | | } |
| | | public void setOptUser(String optUser) |
| | | { |
| | | this.optUser = optUser; |
| | | } |
| | | |
| | | public String getOptUser() |
| | | { |
| | | return optUser; |
| | | } |
| | | public void setApplyUser(String applyUser) |
| | | { |
| | | this.applyUser = applyUser; |
| | | } |
| | | |
| | | public String getApplyUser() |
| | | { |
| | | return applyUser; |
| | | } |
| | | public void setNumber(Double number) |
| | | { |
| | | this.number = number; |
| | | } |
| | | |
| | | public Double getNumber() |
| | | { |
| | | return number; |
| | | } |
| | | public void setUnit(String unit) |
| | | { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public String getUnit() |
| | | { |
| | | return unit; |
| | | } |
| | | public void setCreateDate(Date createDate) |
| | | { |
| | | this.createDate = createDate; |
| | | } |
| | | |
| | | public Date getCreateDate() |
| | | { |
| | | return createDate; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("code", getCode()) |
| | | .append("projectId", getProjectId()) |
| | | .append("tubName", getTubName()) |
| | | .append("type", getType()) |
| | | .append("outboundDate", getOutboundDate()) |
| | | .append("inboundDate", getInboundDate()) |
| | | .append("optUser", getOptUser()) |
| | | .append("applyUser", getApplyUser()) |
| | | .append("number", getNumber()) |
| | | .append("unit", getUnit()) |
| | | .append("createDate", getCreateDate()) |
| | | .append("remark", getRemark()) |
| | | .toString(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.javaweb.geo.mapper; |
| | | |
| | | import com.javaweb.geo.domain.TubLog; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 材料出入库记录Mapper接口 |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-22 |
| | | */ |
| | | public interface TubLogMapper |
| | | { |
| | | /** |
| | | * 查询材料出入库记录 |
| | | * |
| | | * @param id 材料出入库记录ID |
| | | * @return 材料出入库记录 |
| | | */ |
| | | public TubLog selectTubLogById(Integer id); |
| | | |
| | | /** |
| | | * 查询材料出入库记录列表 |
| | | * |
| | | * @param tubLog 材料出入库记录 |
| | | * @return 材料出入库记录集合 |
| | | */ |
| | | public List<TubLog> selectTubLogList(TubLog tubLog); |
| | | |
| | | /** |
| | | * 新增材料出入库记录 |
| | | * |
| | | * @param tubLog 材料出入库记录 |
| | | * @return 结果 |
| | | */ |
| | | public int insertTubLog(TubLog tubLog); |
| | | |
| | | /** |
| | | * 修改材料出入库记录 |
| | | * |
| | | * @param tubLog 材料出入库记录 |
| | | * @return 结果 |
| | | */ |
| | | public int updateTubLog(TubLog tubLog); |
| | | |
| | | /** |
| | | * 删除材料出入库记录 |
| | | * |
| | | * @param id 材料出入库记录ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteTubLogById(Integer id); |
| | | |
| | | /** |
| | | * 批量删除材料出入库记录 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteTubLogByIds(String[] ids); |
| | | } |
New file |
| | |
| | | package com.javaweb.geo.service; |
| | | |
| | | import com.javaweb.geo.domain.TubLog; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 材料出入库记录Service接口 |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-22 |
| | | */ |
| | | public interface ITubLogService |
| | | { |
| | | /** |
| | | * 查询材料出入库记录 |
| | | * |
| | | * @param id 材料出入库记录ID |
| | | * @return 材料出入库记录 |
| | | */ |
| | | public TubLog selectTubLogById(Integer id); |
| | | |
| | | /** |
| | | * 查询材料出入库记录列表 |
| | | * |
| | | * @param tubLog 材料出入库记录 |
| | | * @return 材料出入库记录集合 |
| | | */ |
| | | public List<TubLog> selectTubLogList(TubLog tubLog); |
| | | |
| | | /** |
| | | * 新增材料出入库记录 |
| | | * |
| | | * @param tubLog 材料出入库记录 |
| | | * @return 结果 |
| | | */ |
| | | public int insertTubLog(TubLog tubLog); |
| | | |
| | | /** |
| | | * 修改材料出入库记录 |
| | | * |
| | | * @param tubLog 材料出入库记录 |
| | | * @return 结果 |
| | | */ |
| | | public int updateTubLog(TubLog tubLog); |
| | | |
| | | /** |
| | | * 批量删除材料出入库记录 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteTubLogByIds(String ids); |
| | | |
| | | /** |
| | | * 删除材料出入库记录信息 |
| | | * |
| | | * @param id 材料出入库记录ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteTubLogById(Integer id); |
| | | } |
New file |
| | |
| | | package com.javaweb.geo.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.javaweb.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.javaweb.geo.mapper.TubLogMapper; |
| | | import com.javaweb.geo.domain.TubLog; |
| | | import com.javaweb.geo.service.ITubLogService; |
| | | import com.javaweb.common.core.text.Convert; |
| | | |
| | | /** |
| | | * 材料出入库记录Service业务层处理 |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-22 |
| | | */ |
| | | @Service |
| | | public class TubLogServiceImpl implements ITubLogService { |
| | | @Autowired |
| | | private TubLogMapper tubLogMapper; |
| | | |
| | | /** |
| | | * 查询材料出入库记录 |
| | | * |
| | | * @param id 材料出入库记录ID |
| | | * @return 材料出入库记录 |
| | | */ |
| | | @Override |
| | | public TubLog selectTubLogById(Integer id) { |
| | | return tubLogMapper.selectTubLogById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询材料出入库记录列表 |
| | | * |
| | | * @param tubLog 材料出入库记录 |
| | | * @return 材料出入库记录 |
| | | */ |
| | | @Override |
| | | public List<TubLog> selectTubLogList(TubLog tubLog) { |
| | | return tubLogMapper.selectTubLogList(tubLog); |
| | | } |
| | | |
| | | /** |
| | | * 新增材料出入库记录 |
| | | * |
| | | * @param tubLog 材料出入库记录 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertTubLog(TubLog tubLog) { |
| | | tubLog.setCreateDate(DateUtils.getNowDate()); |
| | | return tubLogMapper.insertTubLog(tubLog); |
| | | } |
| | | |
| | | /** |
| | | * 修改材料出入库记录 |
| | | * |
| | | * @param tubLog 材料出入库记录 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateTubLog(TubLog tubLog) { |
| | | return tubLogMapper.updateTubLog(tubLog); |
| | | } |
| | | |
| | | /** |
| | | * 删除材料出入库记录对象 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteTubLogByIds(String ids) { |
| | | return tubLogMapper.deleteTubLogByIds(Convert.toStrArray(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 删除材料出入库记录信息 |
| | | * |
| | | * @param id 材料出入库记录ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteTubLogById(Integer id) { |
| | | return tubLogMapper.deleteTubLogById(id); |
| | | } |
| | | } |
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.javaweb.geo.mapper.TubLogMapper"> |
| | | |
| | | <resultMap type="TubLog" id="TubLogResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="code" column="code" /> |
| | | <result property="projectId" column="project_id" /> |
| | | <result property="tubName" column="tub_name" /> |
| | | <result property="type" column="type" /> |
| | | <result property="outboundDate" column="outbound_date" /> |
| | | <result property="inboundDate" column="inbound_date" /> |
| | | <result property="optUser" column="opt_user" /> |
| | | <result property="applyUser" column="apply_user" /> |
| | | <result property="number" column="number" /> |
| | | <result property="unit" column="unit" /> |
| | | <result property="createDate" column="create_date" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTubLogVo"> |
| | | select id, code, project_id, tub_name, type, outbound_date, inbound_date, opt_user, apply_user, number, unit, create_date, remark from js_tub_log |
| | | </sql> |
| | | |
| | | <select id="selectTubLogList" parameterType="TubLog" resultMap="TubLogResult"> |
| | | <include refid="selectTubLogVo"/> |
| | | <where> |
| | | <if test="code != null and code != ''"> and code = #{code}</if> |
| | | <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if> |
| | | <if test="tubName != null and tubName != ''"> and tub_name like concat('%', #{tubName}, '%')</if> |
| | | <if test="type != null and type != ''"> and type = #{type}</if> |
| | | <if test="outboundDate != null "> and outbound_date = #{outboundDate}</if> |
| | | <if test="inboundDate != null "> and inbound_date = #{inboundDate}</if> |
| | | <if test="optUser != null and optUser != ''"> and opt_user = #{optUser}</if> |
| | | <if test="applyUser != null and applyUser != ''"> and apply_user = #{applyUser}</if> |
| | | <if test="number != null "> and number = #{number}</if> |
| | | <if test="unit != null and unit != ''"> and unit = #{unit}</if> |
| | | <if test="createDate != null "> and create_date = #{createDate}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectTubLogById" parameterType="Integer" resultMap="TubLogResult"> |
| | | <include refid="selectTubLogVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertTubLog" parameterType="TubLog" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into js_tub_log |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="code != null and code != ''">code,</if> |
| | | <if test="projectId != null and projectId != ''">project_id,</if> |
| | | <if test="tubName != null and tubName != ''">tub_name,</if> |
| | | <if test="type != null and type != ''">type,</if> |
| | | <if test="outboundDate != null ">outbound_date,</if> |
| | | <if test="inboundDate != null ">inbound_date,</if> |
| | | <if test="optUser != null and optUser != ''">opt_user,</if> |
| | | <if test="applyUser != null and applyUser != ''">apply_user,</if> |
| | | <if test="number != null ">number,</if> |
| | | <if test="unit != null and unit != ''">unit,</if> |
| | | <if test="createDate != null ">create_date,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="code != null and code != ''">#{code},</if> |
| | | <if test="projectId != null and projectId != ''">#{projectId},</if> |
| | | <if test="tubName != null and tubName != ''">#{tubName},</if> |
| | | <if test="type != null and type != ''">#{type},</if> |
| | | <if test="outboundDate != null ">#{outboundDate},</if> |
| | | <if test="inboundDate != null ">#{inboundDate},</if> |
| | | <if test="optUser != null and optUser != ''">#{optUser},</if> |
| | | <if test="applyUser != null and applyUser != ''">#{applyUser},</if> |
| | | <if test="number != null ">#{number},</if> |
| | | <if test="unit != null and unit != ''">#{unit},</if> |
| | | <if test="createDate != null ">#{createDate},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateTubLog" parameterType="TubLog"> |
| | | update js_tub_log |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="code != null and code != ''">code = #{code},</if> |
| | | <if test="projectId != null and projectId != ''">project_id = #{projectId},</if> |
| | | <if test="tubName != null and tubName != ''">tub_name = #{tubName},</if> |
| | | <if test="type != null and type != ''">type = #{type},</if> |
| | | <if test="outboundDate != null ">outbound_date = #{outboundDate},</if> |
| | | <if test="inboundDate != null ">inbound_date = #{inboundDate},</if> |
| | | <if test="optUser != null and optUser != ''">opt_user = #{optUser},</if> |
| | | <if test="applyUser != null and applyUser != ''">apply_user = #{applyUser},</if> |
| | | <if test="number != null ">number = #{number},</if> |
| | | <if test="unit != null and unit != ''">unit = #{unit},</if> |
| | | <if test="createDate != null ">create_date = #{createDate},</if> |
| | | <if test="remark != null and remark != ''">remark = #{remark},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteTubLogById" parameterType="Integer"> |
| | | delete from js_tub_log where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteTubLogByIds" parameterType="String"> |
| | | delete from js_tub_log where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <!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> |
| | | <p>管材名称:</p> |
| | | <input type="text" name="tubName"/> |
| | | </li> |
| | | <li> |
| | | <p>经办人:</p> |
| | | <input type="text" name="optUser"/> |
| | | </li> |
| | | <li> |
| | | <p>负责人:</p> |
| | | <input type="text" name="applyUser"/> |
| | | </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()" shiro:hasPermission="geo:TubLog:add"> |
| | | <i class="fa fa-plus"></i> 添加 |
| | | </a> |
| | | <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="geo:TubLog:edit"> |
| | | <i class="fa fa-edit"></i> 修改 |
| | | </a> |
| | | <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="geo:TubLog:remove"> |
| | | <i class="fa fa-remove"></i> 删除 |
| | | </a> |
| | | <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:TubLog: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('geo:TubLog:edit')}]]; |
| | | var removeFlag = [[${@permission.hasPermi('geo:TubLog:remove')}]]; |
| | | var prefix = ctx + "geo/TubLog"; |
| | | |
| | | $(function() { |
| | | var options = { |
| | | url: prefix + "/list", |
| | | createUrl: prefix + "/add", |
| | | updateUrl: prefix + "/edit/{id}", |
| | | removeUrl: prefix + "/remove", |
| | | exportUrl: prefix + "/export", |
| | | modalName: "材料出入库记录", |
| | | columns: [{ |
| | | checkbox: true |
| | | }, |
| | | { |
| | | field : 'id', |
| | | title : '主键', |
| | | visible: false |
| | | }, |
| | | { |
| | | field : 'code', |
| | | title : '出入库单子号' |
| | | }, |
| | | { |
| | | field : 'tubName', |
| | | title : '管材名称' |
| | | }, |
| | | { |
| | | field : 'type', |
| | | title : '类型' |
| | | }, |
| | | { |
| | | field : 'outboundDate', |
| | | title : '出库时间' |
| | | }, |
| | | { |
| | | field : 'inboundDate', |
| | | title : '入库时间' |
| | | }, |
| | | { |
| | | field : 'optUser', |
| | | title : '经办人' |
| | | }, |
| | | { |
| | | field : 'applyUser', |
| | | title : '负责人' |
| | | }, |
| | | { |
| | | field : 'number', |
| | | title : '出入库数量' |
| | | }, |
| | | { |
| | | field : 'unit', |
| | | title : '数据单位' |
| | | }, |
| | | { |
| | | field : 'createDate', |
| | | title : '时间' |
| | | }, |
| | | { |
| | | field : 'remark', |
| | | 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> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
| | | <head> |
| | | <th:block th:include="include :: header('新增材料出入库记录')" /> |
| | | <th:block th:include="include :: datetimepicker-css" /> |
| | | </head> |
| | | <body class="white-bg"> |
| | | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
| | | <form class="form-horizontal m" id="form-TubLog-add"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出入库单子号:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="code" 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="tubName" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">类型:</label> |
| | | <div class="col-sm-8"> |
| | | <select name="type" class="form-control m-b"> |
| | | <option value="">所有</option> |
| | | </select> |
| | | <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出库时间:</label> |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | | <span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
| | | <input name="outboundDate" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">入库时间:</label> |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | | <span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
| | | <input name="inboundDate" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经办人:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="optUser" 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="applyUser" 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="number" 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="unit" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">时间:</label> |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | | <span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
| | | <input name="createDate" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <th:block th:include="include :: datetimepicker-js" /> |
| | | <script type="text/javascript"> |
| | | var prefix = ctx + "geo/TubLog" |
| | | $("#form-TubLog-add").validate({ |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/add", $('#form-TubLog-add').serialize()); |
| | | } |
| | | } |
| | | |
| | | $("input[name='outboundDate']").datetimepicker({ |
| | | format: "yyyy-mm-dd", |
| | | minView: "month", |
| | | autoclose: true |
| | | }); |
| | | |
| | | $("input[name='inboundDate']").datetimepicker({ |
| | | format: "yyyy-mm-dd", |
| | | minView: "month", |
| | | autoclose: true |
| | | }); |
| | | |
| | | $("input[name='createDate']").datetimepicker({ |
| | | format: "yyyy-mm-dd", |
| | | minView: "month", |
| | | autoclose: true |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
| | | <head> |
| | | <th:block th:include="include :: header('修改材料出入库记录')" /> |
| | | <th:block th:include="include :: datetimepicker-css" /> |
| | | </head> |
| | | <body class="white-bg"> |
| | | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
| | | <form class="form-horizontal m" id="form-TubLog-edit" th:object="${tubLog}"> |
| | | <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="code" th:field="*{code}" 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="tubName" th:field="*{tubName}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">类型:</label> |
| | | <div class="col-sm-8"> |
| | | <select name="type" class="form-control m-b"> |
| | | <option value="">所有</option> |
| | | </select> |
| | | <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出库时间:</label> |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | | <span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
| | | <input name="outboundDate" th:value="${#dates.format(tubLog.outboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">入库时间:</label> |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | | <span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
| | | <input name="inboundDate" th:value="${#dates.format(tubLog.inboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经办人:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="optUser" th:field="*{optUser}" 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="applyUser" th:field="*{applyUser}" 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="number" th:field="*{number}" 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="unit" th:field="*{unit}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">时间:</label> |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | | <span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
| | | <input name="createDate" th:value="${#dates.format(tubLog.createDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <th:block th:include="include :: datetimepicker-js" /> |
| | | <script type="text/javascript"> |
| | | var prefix = ctx + "geo/TubLog"; |
| | | $("#form-TubLog-edit").validate({ |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/edit", $('#form-TubLog-edit').serialize()); |
| | | } |
| | | } |
| | | |
| | | $("input[name='outboundDate']").datetimepicker({ |
| | | format: "yyyy-mm-dd", |
| | | minView: "month", |
| | | autoclose: true |
| | | }); |
| | | |
| | | $("input[name='inboundDate']").datetimepicker({ |
| | | format: "yyyy-mm-dd", |
| | | minView: "month", |
| | | autoclose: true |
| | | }); |
| | | |
| | | $("input[name='createDate']").datetimepicker({ |
| | | format: "yyyy-mm-dd", |
| | | minView: "month", |
| | | autoclose: true |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |