| | |
| | | @ManagerAuth |
| | | public R stockOutList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | // @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | if (!Cools.isEmpty(param.get("modi_time"))){ |
| | | String val = String.valueOf(param.get("modi_time")); |
| | |
| | | import com.zy.common.utils.excel.matcode.MatCodeExcel; |
| | | import com.zy.common.utils.excel.matcode.MatCodeExcelListener; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.Role; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "产品代号数据导出") |
| | | public void export(@RequestParam(required = false) String fileName, |
| | | @RequestParam(required = false) Integer rowCount, |
| | | @RequestParam(required = false) String ids, |
| | | HttpServletResponse response) throws Exception { |
| | | List<MatCode> list = matCodeService.selectList(new EntityWrapper<>()); |
| | | List<MatCode> list = null; |
| | | if(!Cools.isEmpty(ids)){ |
| | | list = matCodeService.selectList(new EntityWrapper<MatCode>().last("where mat_no in (" + ids + ")")); |
| | | }else{ |
| | | list = matCodeService.selectList(new EntityWrapper<>()); |
| | | } |
| | | // List<MatCode> list = matCodeService.selectList(new EntityWrapper<>()); |
| | | List<MatCodeExcel> excels = new ArrayList<>(); |
| | | for (MatCode matCode : list) { |
| | | MatCodeExcel excel = VersionUtils.getExcel(matCode); |
| | |
| | | wrkDetl.setMemo(detlDto.getLocDetl().getMemo()); |
| | | wrkDetl.setQtyBox(matCode.getStr6()); |
| | | wrkDetl.setWeight(matCode.getWeight()); |
| | | wrkDetl.setAllWeight(qty*matCode.getWeight()+30); |
| | | wrkDetl.setAllQty(qty*matCode.getStr6()); |
| | | wrkDetl.setAllWeight(matCode.getWeight()!=null ? qty*matCode.getWeight()+30 : 0); |
| | | wrkDetl.setAllQty(matCode.getStr6()!=null ? qty*matCode.getStr6() : 0); |
| | | wrkDetl.setVendor(detlDto.getLocDetl().getVendor()); |
| | | wrkDetl.setSource(detlDto.getLocDetl().getSource()); |
| | | wrkDetl.setSupplier(detlDto.getLocDetl().getSupplier()); |
| | |
| | | <if test="startTime!=null and endTime!=null"> |
| | | and a.modi_time between #{startTime} and #{endTime} |
| | | </if> |
| | | <if test="memo!=null and memo!='' "> |
| | | and ( |
| | | a.loc_no like '%' + #{memo} + '%' |
| | | or a.mat_no like '%' + #{memo} + '%' |
| | | or a.mat_name like '%' + #{memo} + '%' |
| | | or a.qty like '%' + #{memo} + '%' |
| | | or a.str3 like '%' + #{memo} + '%' |
| | | or a.unit like '%' + #{memo} + '%' |
| | | or a.specs like '%' + #{memo} + '%' |
| | | or a.size like '%' + #{memo} + '%' |
| | | or a.color like '%' + #{memo} + '%' |
| | | or a.supplier like '%' + #{memo} + '%' |
| | | or a.zpallet like '%' + #{memo} + '%' |
| | | or a.source like '%' + #{memo} + '%' |
| | | or a.vendor like '%' + #{memo} + '%' |
| | | or a.qty_box like '%' + #{memo} + '%' |
| | | or a.str3 like '%' + #{memo} + '%' |
| | | or a.str4 like '%' + #{memo} + '%' |
| | | or a.str5 like '%' + #{memo} + '%' |
| | | or a.memo like '%' + #{memo} + '%' |
| | | ) |
| | | </if> |
| | | <if test="crnNo!=null and crnNo!='' "> |
| | | and b.crn_no=#{crnNo} |
| | | </if> |
| | | </sql> |
| | | |
| | | <sql id="stockOutCondition1"> |
| | |
| | | and b.loc_sts = 'F' |
| | | <include refid="stockOutCondition"></include> |
| | | ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | order by supplier,modi_time,loc_no |
| | | order by supplier,appe_time,loc_no |
| | | </select> |
| | | |
| | | <select id="getStockOutPageCount" parameterType="java.util.Map" resultType="java.lang.Integer"> |
| | |
| | | }); |
| | | }); |
| | | |
| | | var checkData; |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(matCode)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | checkData = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | |
| | | |
| | | // 导出excel |
| | | form.on('submit(exportDo)', function(data) { |
| | | debugger |
| | | // if (checkData.data.length === 0) { |
| | | // layer.msg('请选择数据'); |
| | | // } |
| | | layer.closeAll(); |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | location.href = baseUrl + "/matCode/export/auth?fileName="+$("#exportFileName").val()+"&rowCount="+$("#exportRowCount").val(); |
| | | |
| | | var ids = ""; |
| | | if(checkData.data.length>0) { |
| | | for (var i = 0; i < checkData.data.length; i++) { |
| | | ids = ids + "'" + checkData.data[i].matNo + "',"; |
| | | } |
| | | ids = ids.substring(0, ids.length - 1); |
| | | } |
| | | location.href = baseUrl + "/matCode/export/auth?fileName="+$("#exportFileName").val()+"&rowCount="+$("#exportRowCount").val()+"&ids=" + ids; |
| | | // location.href = baseUrl + "/matCode/export/auth?fileName="+$("#exportFileName").val()+"&rowCount="+$("#exportRowCount").val(); |
| | | layer.closeAll('loading'); |
| | | return false; |
| | | }); |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="mat_no" placeholder="产品代号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="mat_no" placeholder="产品编码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="mat_name" placeholder="产品名称" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <input class="layui-input" type="text" name="mat_no" placeholder="产品编码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="mat_name" placeholder="产品名称" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | .layui-table-body.layui-table-main { |
| | | overflow: scroll; |
| | | } |
| | | body { |
| | | padding: 0 20px; |
| | | } |
| | |
| | | <legend>搜索栏</legend> |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-input-inline" style="margin-top: -10px"> |
| | | <select id="crnNo" name="crnNo"> |
| | | <option value="" style="display: none">请选择巷道</option> |
| | | <option value="1">1号</option> |
| | | <option value="2">2号</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="loc_no" placeholder="库位号" autocomplete="off"> |
| | |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="mat_name" placeholder="物料描述" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="memo" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | |
| | | </div> |
| | | </script> |
| | | |
| | | <div class="layui-form"> |
| | | <div class="layui-form" style="width: 100%"> |
| | | <table class="layui-hide" id="stockOut" lay-filter="stockOut"></table> |
| | | </div> |
| | | |
| | |
| | | var cols = [ |
| | | {type: 'checkbox'} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push( |
| | | {field: 'str3', align: 'center',title: '客户名称'} |
| | | ,{field: 'matNo', align: 'center',title: '产品编码'} |
| | | ,{field: 'matName', align: 'center',title: '产品名称', width: 180} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'source', title: '来源', align: 'center'} |
| | | ,{field: 'vendor', title: '供应商', align: 'center'} |
| | | ,{field: 'qtyBox', align: 'center', title: '每箱数量(PCS)', width: 130} |
| | | ,{field: 'allQty', title: '总数量(PCS)', align: 'center', width: 120} |
| | | ,{field: 'weight', align: 'center', title: '每箱重量(KG)', width: 130} |
| | | ,{field: 'allWeight', title: '总重量(KG)', align: 'center', width: 120} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80, hide: true} |
| | | ,{field: 'supplier', align: 'center',title: '批号'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | // ,{field: 'bname', align: 'center',title: '库位名称'} |
| | | ,{field: 'memo', align: 'center',title: '生产日期'} |
| | | ,{field: 'str3', align: 'center',title: '客户名称'} |
| | | ,{field: 'str4', align: 'center',title: '项目信息'} |
| | | ,{field: 'str5$', align: 'center',title: '类别'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'}) |
| | | // {type: 'checkbox'} |
| | | // ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | ]; |
| | | // cols.push.apply(cols, detlCols); |
| | | cols.push( |
| | | // {field: 'str3', align: 'center',title: '客户名称'} |
| | | // ,{field: 'str4', align: 'center',title: '项目信息'} |
| | | // ,{field: 'str5$', align: 'center',title: '类别'} |
| | | {field: 'modiUser$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', width: 180}) |
| | | return cols; |
| | | } |
| | | |
| | |
| | | url: baseUrl+'/stock/out/list/auth', |
| | | page: true, |
| | | limit: 10, |
| | | limits: [10, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cellMinWidth: 100, |
| | | cols: [getCol()], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | .layui-table-body.layui-table-main { |
| | | overflow: scroll; |
| | | } |
| | | body { |
| | | padding: 0 20px; |
| | | } |
| | |
| | | <legend>搜索栏</legend> |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-input-inline" style="margin-top: -10px"> |
| | | <select id="crnNo" name="crnNo"> |
| | | <option value="" style="display: none">请选择巷道</option> |
| | | <option value="1">1号</option> |
| | | <option value="2">2号</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="loc_no" placeholder="库位号" autocomplete="off"> |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="mat_no" placeholder="物料号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="mat_no" placeholder="物料编码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="mat_name" placeholder="物料描述" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="mat_name" placeholder="物料名称" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="memo" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | |
| | | </div> |
| | | </script> |
| | | |
| | | <div class="layui-form"> |
| | | <div class="layui-form" style="width: 100%"> |
| | | <table class="layui-hide" id="stockOut" lay-filter="stockOut"></table> |
| | | </div> |
| | | |
| | |
| | | {type: 'checkbox'} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | ,{field: 'matNo', align: 'center',title: '产品编码'} |
| | | ,{field: 'matName', align: 'center',title: '产品名称'} |
| | | ,{field: 'matName', align: 'center',title: '产品名称', width: 180} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'source', title: '来源', align: 'center'} |
| | | ,{field: 'vendor', title: '供应商', align: 'center'} |
| | | ,{field: 'qtyBox', align: 'center', title: '每箱数量(PCS)'} |
| | | ,{field: 'allQty', title: '总数量(PCS)', align: 'center'} |
| | | ,{field: 'weight', align: 'center', title: '每箱重量(KG)'} |
| | | ,{field: 'allWeight', title: '总重量(KG)', align: 'center'} |
| | | ,{field: 'qtyBox', align: 'center', title: '每箱数量(PCS)', width: 130} |
| | | ,{field: 'allQty', title: '总数量(PCS)', align: 'center', width: 120} |
| | | ,{field: 'weight', align: 'center', title: '每箱重量(KG)', width: 130} |
| | | ,{field: 'allWeight', title: '总重量(KG)', align: 'center', width: 120} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80, hide: true} |
| | | ,{field: 'supplier', align: 'center',title: '批号'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |
| | |
| | | // cols.push.apply(cols, detlCols); |
| | | |
| | | cols.push({field: 'modiUser$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'}) |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', width: 180}) |
| | | return cols; |
| | | } |
| | | |
| | |
| | | url: baseUrl+'/stock/out/list/auth', |
| | | page: true, |
| | | limit: 10, |
| | | limits: [10, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cellMinWidth: 100, |
| | | cols: [getCol()], |
| | | request: { |
| | | pageName: 'curr', |