| | |
| | | |
| | | |
| | | <sql id="pageCondition"> |
| | | <if test="loc_no != null and loc_no != ''"> |
| | | and mld.loc_no like concat('%',#{loc_no},'%') |
| | | </if> |
| | | <if test="matnr != null and matnr != ''"> |
| | | and mld.matnr like concat('%',#{matnr},'%') |
| | | and mp.matnr like concat('%',#{matnr},'%') |
| | | </if> |
| | | <if test="maktx != null and maktx != ''"> |
| | | and mld.maktx like concat('%',#{maktx},'%') |
| | | </if> |
| | | <if test="startTime!=null and endTime!=null"> |
| | | and mld.update_time between #{startTime} and #{endTime} |
| | | <if test="node_id != null and node_id != ''"> |
| | | and mp.node_id like concat('%',#{node_id},'%') |
| | | </if> |
| | | </sql> |
| | | |
| | |
| | | ISNULL((cast(round((ls.amount/(mp.safe_qua*1.0))*100,2) as varchar)+'%'), '0.00%') as progress, |
| | | case |
| | | when isnull(round((ls.amount/mp.safe_qua),2),0) > 1 then 1 |
| | | when isnull(round((ls.amount/mp.safe_qua),2),0) > 0.5 then 2 |
| | | when isnull(round((ls.amount/mp.safe_qua),2),0) > 0.75 then 2 |
| | | else 3 |
| | | end as status |
| | | from man_prior mp |
| | |
| | | ,{field: 'node_name', align: 'center',title: '货位'} |
| | | ,{field: 'matnr', align: 'center',title: '商品编号'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | ,{field: 'progress', align: 'center',title: '使用情况', templet: '#progressTpl'} |
| | | ,{field: 'progress', align: 'center',title: '使用情况', templet: '#progressTpl', width: 350} |
| | | ,{field: 'status', align: 'center',title: '警报', templet: '#statusTpl', width: 100} |
| | | ,{field: 'safe_qua', align: 'center',title: '安全库存量', style: 'font-weight: bold'} |
| | | ,{field: 'amount', align: 'center',title: '当前库存量', style: 'font-weight: bold'} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | 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); |
| | | } |
| | | }); |
| | | } |
| | |
| | | <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="uuid" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="matId" class="layui-input" name="mat_id" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="matId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="关联商品" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="matQueryBymatId" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="matQueryBymatIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</a> |
| | | <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">编辑</a> |
| | | {{# if(d.status > 1){ }} |
| | | <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail">补仓</a> |
| | | {{# } }} |
| | | </script> |
| | | <script type="text/html" id="progressTpl"> |
| | | <div class="layui-progress layuiadmin-order-progress"> |
| | |
| | | </script> |
| | | <script type="text/html" id="statusTpl"> |
| | | {{# if(d.status == 1){ }} |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs">满仓</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-xs">满仓</button> |
| | | {{# } else if(d.status == 2){ }} |
| | | <button class="layui-btn layui-btn-primary layui-btn-xs">安全</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs">安全</button> |
| | | {{# } else{ }} |
| | | <button class="layui-btn layui-btn-warm layui-btn-xs">危险</button> |
| | | <button class="layui-btn layui-btn-danger layui-btn-xs">危险</button> |
| | | {{# } }} |
| | | </script> |
| | | |