| | |
| | | <include refid="batchSeq"></include> |
| | | </update> |
| | | |
| | | <sql id="stockOutConditionTwo"> |
| | | <if test="loc_no!=null and loc_no!='' "> |
| | | AND a.loc_no LIKE '%' + #{loc_no} + '%' |
| | | </if> |
| | | <if test="matnr!=null and matnr!='' "> |
| | | AND a.matnr LIKE '%' + #{matnr} + '%' |
| | | </if> |
| | | <if test="model!=null and model!='' "> |
| | | AND a.model LIKE '%' + #{model} + '%' |
| | | </if> |
| | | <if test="specs!=null and specs!='' "> |
| | | AND a.specs LIKE '%' + #{specs} + '%' |
| | | </if> |
| | | <if test="batch!=null and batch!='' "> |
| | | AND a.batch LIKE '%' + #{batch} + '%' |
| | | </if> |
| | | <if test="supp!=null and supp!='' "> |
| | | AND a.supp LIKE '%' + #{supp} + '%' |
| | | </if> |
| | | <if test="outOrderNo!=null and outOrderNo!='' "> |
| | | AND a.out_order_no LIKE '%' + #{outOrderNo} + '%' |
| | | </if> |
| | | <if test="proType!=null and proType!='' "> |
| | | AND a.pro_type = #{proType} |
| | | </if> |
| | | <if test="temp1!=null and temp1!='' "> |
| | | AND a.temp1 LIKE '%' + #{temp1} + '%' |
| | | </if> |
| | | <!-- 以下字段如不在SELECT和GROUP BY中建议删去或改为HAVING --> |
| | | <!-- <if test="anfme!=null and anfme!='' "> |
| | | HAVING SUM(a.anfme) LIKE '%' + #{anfme} + '%' |
| | | </if> --> |
| | | </sql> |
| | | |
| | | <sql id="stockOutCondition"> |
| | | <if test="loc_no!=null and loc_no!='' "> |
| | | and a.loc_no like '%' + #{loc_no} + '%' |
| | |
| | | </select> |
| | | |
| | | <select id="getStockStatis" resultType="com.zy.asrs.entity.LocDetl"> |
| | | select * from |
| | | ( |
| | | select |
| | | ROW_NUMBER() over (order by sum(a.anfme) desc) as row |
| | | , a.matnr |
| | | , a.batch |
| | | , sum(a.anfme) as anfme |
| | | from asr_loc_detl a |
| | | where 1=1 |
| | | <include refid="stockOutCondition"></include> |
| | | group by a.matnr, a.batch |
| | | ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | SELECT * FROM ( |
| | | SELECT |
| | | ROW_NUMBER() OVER (ORDER BY SUM(a.anfme) DESC) AS row, |
| | | -- 分组字段 |
| | | a.model, |
| | | a.pro_type AS proType, |
| | | a.out_order_no AS outOrderNo, |
| | | -- 非分组字段用聚合函数获取一个代表值(例如MAX或MIN) |
| | | MAX(a.matnr) AS matnr, |
| | | MAX(a.specs) AS specs, |
| | | MAX(a.temp1) AS temp1, |
| | | -- 聚合数量 |
| | | SUM(a.anfme) AS anfme |
| | | FROM asr_loc_detl a |
| | | WHERE 1=1 |
| | | <include refid="stockOutConditionTwo"/> |
| | | GROUP BY a.model, a.pro_type, a.out_order_no |
| | | ) t |
| | | WHERE t.row BETWEEN ((#{pageNumber}-1)*#{pageSize}+1) AND (#{pageNumber}*#{pageSize}) |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getStockStatisCount" parameterType="java.util.Map" resultType="java.lang.Integer"> |
| | | select count(1) as count from |
| | | ( |
| | | select |
| | | a.matnr |
| | | a.model |
| | | from asr_loc_detl a |
| | | where 1=1 |
| | | <include refid="stockOutCondition"></include> |
| | | group by a.matnr |
| | | group by a.model |
| | | ) b |
| | | </select> |
| | | |
| | |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '总重量', hide: false} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '总重量', hide: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: false} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间', hide: true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{field: 'proType', align: 'center',title: '属性', hide: false} |
| | | ,{field: 'proType', align: 'center',title: '属性', hide: true} |
| | | ,{field: 'temp1', align: 'center',title: '名称总称', hide: false} |
| | | ,{field: 'outOrderNo', align: 'center',title: '合同号', hide: false} |
| | | ,{field: 'outOrderNo', align: 'center',title: '合同号', hide: true} |
| | | |
| | | |
| | | ] |
| | |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '总重量', hide: false} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: false} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '客户名称', hide:false } |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {field: 'lkQty', title:'立库数量', align: 'center', width:150}, |
| | | {field: 'erpQty', title:'ERP数量', align: 'center', width:150}, |
| | | {field: 'anfme', title:'立库数量', align: 'center', width:150}, |
| | | {field: 'matnr', title:'产品编码', align: 'center'}, |
| | | {field: 'model', title:'产品代码', align: 'center'}, |
| | | {field: 'specs', title:'产品规格', align: 'center'}, |
| | | {field: 'maktx', title:'产品名称', align: 'center'}, |
| | | {field: 'pgNo', title:'派工单号', align: 'center'}, |
| | | {field: 'temp1', title:'产品总称', align: 'center'}, |
| | | {field: 'outOrderNo', title:'合同号', align: 'center'}, |
| | | {field: 'batch', title:'批次', align: 'center'}, |
| | | {field: 'proType', title:'属性', align: 'center'}, |
| | | {field: 'color', title:'颜色', align: 'center'}, |
| | | {field: 'luHao', title:'炉号', align: 'center'}, |
| | | {field: 'packing', title:'供应商', align: 'center'} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | var cols = [ |
| | | {type: 'checkbox'} |
| | | ,{field: 'tagId$', align: 'center',title: '归类', templet: '#tagTpl'} |
| | | ,{field: 'store_max', align: 'center',title: '库存上限'} |
| | | ,{field: 'store_min', align: 'center',title: '库存下限'} |
| | | ,{field: 'store_max_date', align: 'center',title: '库龄上限(天)'} |
| | | ,{field: 'store_max', align: 'center',title: '库存上限',hide:true} |
| | | ,{field: 'store_min', align: 'center',title: '库存下限',hide:true} |
| | | ,{field: 'store_max_date', align: 'center',title: '库龄上限(天)',hide:true} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push( |
| | |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', width: 200} |
| | | ,{field: 'batch', align: 'center',title: '序列码'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'sPgNO', align: 'center',title: '派工单号'} |
| | | ,{field: 'sPgNO', align: 'center',title: '派工单号',hide:true} |
| | | // ,{field: 'anfme', align: 'center',title: '数量'} |
| | | // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'} |
| | | ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'} |
| | |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {field: 'model', title: '产品编号', align: 'center'}, |
| | | {field: 'batch', title: '批次', align: 'center'}, |
| | | {field: 'sPgNO', title: '派工单号', align: 'center'}, |
| | | {field: 'sPgNO', title: '派工单号', align: 'center',hide:true}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | {field: 'zpallet', align: 'center',title: '托盘码'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | |
| | | <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="pg_no" placeholder="派工单号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="pg_no" placeholder="派工单号" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="out_order_no" placeholder="合同号" autocomplete="off"> |
| | |
| | | <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="sPgNO" placeholder="派工单号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="outOrderNo" placeholder="派工单号" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="outOrderNo" placeholder="合同号" autocomplete="off"> |
| | |
| | | <!-- <input class="layui-input" type="text" name="zpallet" placeholder="托盘条码" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input name="different" type="radio" value="0" title="显示全部" checked> |
| | | <input name="different" type="radio" value="1" title="显示差异"> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input name="different" type="radio" value="0" title="显示全部" checked>--> |
| | | <!-- <input name="different" type="radio" value="1" title="显示差异">--> |
| | | |
| | | </div> |
| | | </div> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索 |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="sPgNO" placeholder="派工单号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="sPgNO" placeholder="派工单号" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="outOrderNo" placeholder="合同号" autocomplete="off"> |
| | |
| | | <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="sPgNO" placeholder="派工单号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="sPgNO" placeholder="派工单号" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="outOrderNo" placeholder="合同号" autocomplete="off"> |
| | |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 290px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="sPgNO" placeholder="派工单号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="sPgNO" placeholder="派工单号" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="outOrderNo" placeholder="合同号" autocomplete="off"> |
| | |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="sPgNO" placeholder="派工单号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="sPgNO" placeholder="派工单号" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="outOrderNo" placeholder="合同号" autocomplete="off"> |