| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_doc_type") |
| | |
| | | @ApiModelProperty(value= "类型名称") |
| | | @TableField("doc_name") |
| | | private String docName; |
| | | |
| | | /** |
| | | * 入库 1: 入库 0: 非入库 |
| | | */ |
| | | @ApiModelProperty(value= "入库 1: 入库 0: 非入库 ") |
| | | private Integer pakin; |
| | | |
| | | /** |
| | | * 出库 1: 出库 0: 非出库 |
| | | */ |
| | | @ApiModelProperty(value= "出库 1: 出库 0: 非出库 ") |
| | | private Integer pakout; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public DocType() {} |
| | | |
| | | public DocType(Long docId,String docName,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.docId = docId; |
| | | this.docName = docName; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | public String getPakin$() { |
| | | if (null == this.pakin){ return null; } |
| | | switch (this.pakin){ |
| | | case 1: |
| | | return "入库"; |
| | | case 0: |
| | | return "非入库"; |
| | | default: |
| | | return String.valueOf(this.pakin); |
| | | } |
| | | } |
| | | |
| | | // DocType docType = new DocType( |
| | | // null, // 类型编号[非空] |
| | | // null, // 类型名称 |
| | | // null, // 状态 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null // 备注 |
| | | // ); |
| | | public String getPakout$() { |
| | | if (null == this.pakout){ return null; } |
| | | switch (this.pakout){ |
| | | case 1: |
| | | return "出库"; |
| | | case 0: |
| | | return "非出库"; |
| | | default: |
| | | return String.valueOf(this.pakout); |
| | | } |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.DocType"> |
| | | <result column="doc_id" property="docId" /> |
| | | <result column="doc_name" property="docName" /> |
| | | <result column="pakin" property="pakin" /> |
| | | <result column="pakout" property="pakout" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | |
| | | var pageCurr; |
| | | var tableData; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | |
| | | {type: 'checkbox'} |
| | | ,{field: 'docId', align: 'center',title: '类型编号'} |
| | | ,{field: 'docName', align: 'center',title: '类型名称'} |
| | | ,{field: 'pakin', align: 'center',title: '入库', templet: '#pakinTpl', width: 120, unresize: true} |
| | | ,{field: 'pakout', align: 'center',title: '出库', templet: '#pakoutTpl', width: 120, unresize: true} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.docType; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | |
| | | }); |
| | | }); |
| | | |
| | | form.on('switch(pakinSwitch)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableData[index]; |
| | | data[this.name] = obj.elem.checked?1:0; |
| | | http.post(baseUrl+"/docType/update/auth", {docId: data.docId, pakin: data[this.name]}, function (res) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | }) |
| | | }) |
| | | |
| | | form.on('switch(pakoutSwitch)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableData[index]; |
| | | data[this.name] = obj.elem.checked?1:0; |
| | | http.post(baseUrl+"/docType/update/auth", {docId: data.docId, pakout: data[this.name]}, function (res) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | }) |
| | | }) |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(docType)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/html" id="pakinTpl"> |
| | | <input type="checkbox" name="pakin" value="{{d.pakin}}" lay-skin="switch" lay-text="入库|关闭" lay-filter="pakinSwitch" {{ d.pakin === 1 ? 'checked' : '' }}> |
| | | </script> |
| | | |
| | | <script type="text/html" id="pakoutTpl"> |
| | | <input type="checkbox" name="pakout" value="{{d.pakout}}" lay-skin="switch" lay-text="出库|关闭" lay-filter="pakoutSwitch" {{ d.pakout === 1 ? 'checked' : '' }}> |
| | | </script> |
| | | |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |