| | |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping("/viewWorkOutTtlList.action") |
| | | public R viewWorkOutTtlList(ViewWorkInAllBean bean){ |
| | | List<ViewWorkInAllBean> list = reportQueryMapper.queryViewWorkOutTtlList(bean); |
| | | int count = reportQueryMapper.getViewWorkOutTtlCount(bean); |
| | | Page<ViewWorkInAllBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping("/viewWorkOutTtlExport.action") |
| | | @ManagerAuth(memo = "日出库明细汇总统计导出") |
| | | public R viewWorkOutTtlExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInAllBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInAllBean.class); |
| | | bean.setQuery_date(bean.getQuery_date()); |
| | | List<ViewWorkInAllBean> list = reportQueryMapper.getViewWorkOutTtlAll(bean); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping("/viewWorkInTtlList.action") |
| | | public Map<String,Object> viewWorkInTtlList(ViewWorkInAllBean bean){ |
| | | List<ViewWorkInAllBean> list = reportQueryMapper.queryViewWorkInTtlList(bean); |
| | | int count = reportQueryMapper.getViewWorkInTtlCount(bean); |
| | | Page<ViewWorkInAllBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping("/viewWorkInTtlExport.action") |
| | | @ManagerAuth(memo = "日入库明细汇总统计导出") |
| | | public R viewWorkInTtlExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInAllBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInAllBean.class); |
| | | bean.setQuery_date(bean.getQuery_date()); |
| | | List<ViewWorkInAllBean> list = reportQueryMapper.getViewWorkInTtlAll(bean); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 入库总数统计 |
| | | * @author lty |
| | | */ |
| | | @Data |
| | | public class ViewWorkInAllBean { |
| | | |
| | | private int pageNumber; |
| | | private int pageSize; |
| | | |
| | | private String begin_date; |
| | | private String end_date; |
| | | private String query_date; |
| | | |
| | | private Integer row; |
| | | @ApiModelProperty(value= "工作时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date io_date; |
| | | |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | @ApiModelProperty(value= "品号") |
| | | private String matnr; |
| | | |
| | | @ApiModelProperty(value= "品名") |
| | | private String maktx; |
| | | |
| | | @ApiModelProperty(value= "批号") |
| | | private String batch; |
| | | |
| | | @ApiModelProperty(value= "规格") |
| | | private String specs; |
| | | |
| | | @ApiModelProperty(value= "类型") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value= "单位") |
| | | private String unit; |
| | | |
| | | public void setQuery_date(String query_date) { |
| | | this.query_date = query_date; |
| | | if (query_date.contains(" - ")) { |
| | | String[] dates = query_date.split(" - "); |
| | | this.begin_date = dates[0]; |
| | | this.end_date = dates[1]; |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value= "类型") |
| | | // @ApiModelProperty(value= "品牌") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value= "单位") |
| | |
| | | Integer selectWorkCountInSum(String matnr, @Param("start") String startTime, @Param("end") String endTime); |
| | | |
| | | Integer selectWorkCountOutSum(String matnr, @Param("start") String startTime, @Param("end") String endTime); |
| | | |
| | | public List<ViewWorkInAllBean> queryViewWorkInTtlList(ViewWorkInAllBean viewWorkIn); |
| | | |
| | | public int getViewWorkInTtlCount(ViewWorkInAllBean viewWorkIn); |
| | | |
| | | public List<ViewWorkInAllBean> getViewWorkInTtlAll(ViewWorkInAllBean viewWorkIn); |
| | | |
| | | public List<ViewWorkInAllBean> queryViewWorkOutTtlList(ViewWorkInAllBean viewWorkOut); |
| | | public int getViewWorkOutTtlCount(ViewWorkInAllBean viewWorkOut); |
| | | //不分页查询所有信息,用于excel导出 |
| | | public List<ViewWorkInAllBean> getViewWorkOutTtlAll(ViewWorkInAllBean viewWorkOut); |
| | | } |
| | |
| | | <include refid="viewWorkInConditionSql"></include> |
| | | Order by a.io_time desc |
| | | </select> |
| | | <sql id="viewWorkInTtlConditionSql"> |
| | | |
| | | <if test="matnr!=null and matnr!='' "> |
| | | and matnr like '%' + #{matnr} + '%' |
| | | </if> |
| | | <if test="maktx!=null and maktx!='' "> |
| | | and (maktx like '%' + #{maktx} + '%' |
| | | or matnr like '%' + #{maktx} + '%' |
| | | or maktx like '%' + #{maktx} + '%' |
| | | or specs like '%' + #{maktx} + '%' |
| | | or anfme like '%' + #{maktx} + '%' |
| | | or batch like '%' + #{maktx} + '%' |
| | | or brand like '%' + #{maktx} + '%' |
| | | or unit like '%' + #{maktx} + '%' |
| | | ) |
| | | </if> |
| | | <if test="begin_date!=null and begin_date!='' "> |
| | | <![CDATA[ |
| | | and io_date >= #{begin_date} |
| | | ]]> |
| | | </if> |
| | | <if test="end_date!=null and end_date!='' "> |
| | | <![CDATA[ |
| | | and io_date <= #{end_date} |
| | | ]]> |
| | | </if> |
| | | </sql> |
| | | <sql id="viewWorkOutTtlConditionSql"> |
| | | |
| | | <if test="matnr!=null and matnr!='' "> |
| | | and matnr like '%' + #{matnr} + '%' |
| | | </if> |
| | | <if test="maktx!=null and maktx!='' "> |
| | | and (maktx like '%' + #{maktx} + '%' |
| | | or matnr like '%' + #{maktx} + '%' |
| | | or maktx like '%' + #{maktx} + '%' |
| | | or specs like '%' + #{maktx} + '%' |
| | | or anfme like '%' + #{maktx} + '%' |
| | | or batch like '%' + #{maktx} + '%' |
| | | or brand like '%' + #{maktx} + '%' |
| | | or unit like '%' + #{maktx} + '%' |
| | | ) |
| | | </if> |
| | | <if test="begin_date!=null and begin_date!='' "> |
| | | <![CDATA[ |
| | | and io_date >= #{begin_date} |
| | | ]]> |
| | | </if> |
| | | <if test="end_date!=null and end_date!='' "> |
| | | <![CDATA[ |
| | | and io_date <= #{end_date} |
| | | ]]> |
| | | </if> |
| | | </sql> |
| | | <select id="queryViewWorkInTtlList" parameterType="com.zy.asrs.entity.ViewWorkInAllBean" resultType="com.zy.asrs.entity.ViewWorkInAllBean"> |
| | | select |
| | | * |
| | | from ( |
| | | select |
| | | ROW_NUMBER() OVER(Order by t.io_date desc) as row |
| | | , * |
| | | from ( |
| | | select * |
| | | from asr_wrkin_ttl_view |
| | | where 1=1 |
| | | <include refid="viewWorkInTtlConditionSql"></include> |
| | | ) t |
| | | ) a where 1=1 and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | </select> |
| | | |
| | | <select id="getViewWorkInTtlCount" parameterType="com.zy.asrs.entity.ViewWorkInAllBean" resultType="Integer"> |
| | | select count(1) |
| | | from asr_wrkin_ttl_view a |
| | | where 1=1 |
| | | <include refid="viewWorkInTtlConditionSql"></include> |
| | | </select> |
| | | <select id="getViewWorkInTtlAll" parameterType="com.zy.asrs.entity.ViewWorkInAllBean" resultType="com.zy.asrs.entity.ViewWorkInAllBean"> |
| | | select * from asr_wrkin_ttl_view |
| | | where 1=1 |
| | | <include refid="viewWorkInTtlConditionSql"></include> |
| | | </select> |
| | | |
| | | <select id="queryViewWorkOutTtlList" parameterType="com.zy.asrs.entity.ViewWorkInAllBean" resultType="com.zy.asrs.entity.ViewWorkInAllBean"> |
| | | select |
| | | * |
| | | from ( |
| | | select |
| | | ROW_NUMBER() OVER(Order by t.io_date desc) as row |
| | | , * |
| | | from ( |
| | | select * |
| | | from asr_wrkout_ttl_view |
| | | where 1=1 |
| | | <include refid="viewWorkInTtlConditionSql"></include> |
| | | ) t |
| | | ) a where 1=1 and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | </select> |
| | | <select id="getViewWorkOutTtlCount" parameterType="com.zy.asrs.entity.ViewWorkInAllBean" resultType="Integer"> |
| | | select count(1) |
| | | from asr_wrkout_ttl_view a |
| | | where 1=1 |
| | | <include refid="viewWorkInTtlConditionSql"></include> |
| | | </select> |
| | | <select id="getViewWorkOutTtlAll" parameterType="com.zy.asrs.entity.ViewWorkInAllBean" resultType="com.zy.asrs.entity.ViewWorkInAllBean"> |
| | | select * |
| | | from asr_wrkout_ttl_view a |
| | | where 1=1 |
| | | <include refid="viewWorkInTtlConditionSql"></include> |
| | | Order by a.io_date desc |
| | | </select> |
| | | </mapper> |
| | |
| | | ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | |
| | | |
| | | ] |
| | | var detlTtlCols = [ |
| | | {field: 'matnr', align: 'center',title: '品号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '品名', sort:true} |
| | | ,{field: 'batch', align: 'center',title: '批号', sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'brand', align: 'center',title: '类型', hide: false} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ] |
| | | |
New file |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'io_date', align: 'center', title: '入库日期', width: 200} |
| | | ]; |
| | | cols.push.apply(cols, detlTtlCols); |
| | | return cols; |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#workInTtl', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/report/viewWorkInTtlList.action', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |
| | | request: { |
| | | pageName: 'pageNumber', |
| | | limitName: 'pageSize' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(workInTtl)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(workInTtl)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | fields: fields, |
| | | exportData: exportData |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/report/viewWorkInTtlExport.action", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.9); |
| | | } |
| | | layer.style(index, { |
| | | top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | $(".layui-layer-shade").remove(); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
New file |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'io_date', align: 'center', title: '出库日期', width: 200} |
| | | ]; |
| | | cols.push.apply(cols, detlTtlCols); |
| | | return cols; |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#workOutTtl', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/report/viewWorkOutTtlList.action', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |
| | | request: { |
| | | pageName: 'pageNumber', |
| | | limitName: 'pageSize' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(workOutTtl)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(workOutTtl)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | fields: fields, |
| | | exportData: exportData |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/report/viewWorkOutTtlExport.action", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.9); |
| | | } |
| | | layer.style(index, { |
| | | top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | $(".layui-layer-shade").remove(); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | #btn-export { |
| | | margin-top: 10px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="品号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="maktx" placeholder="品名" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="specs" placeholder="批号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="batch" placeholder="规格" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="brand" placeholder="类型" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="unit" placeholder="单位" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="anfme" placeholder="数量" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <table class="layui-hide" id="workInTtl" lay-filter="workInTtl"></table> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | </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> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/report/workInTtl.js" charset="utf-8"></script> |
| | | </body> |
| | | </html> |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | #btn-export { |
| | | margin-top: 10px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="品号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="maktx" placeholder="品名" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="specs" placeholder="批号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="batch" placeholder="规格" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="brand" placeholder="类型" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="unit" placeholder="单位" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="anfme" placeholder="数量" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <table class="layui-hide" id="workOutTtl" lay-filter="workOutTtl"></table> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" >导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | </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> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/report/workOutTtl.js" charset="utf-8"></script> |
| | | </body> |
| | | </html> |
| | | |