#
luxiaotao1123
2021-03-26 b2fc5258724d5ab65ff7854df7e11261da039e0b
#
5个文件已修改
30 ■■■■ 已修改文件
src/main/java/zy/cloud/wms/common/service/erp/ErpService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/entity/SafeStoDo.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/PriorMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/safeSto/safeSto.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/safeSto/safeSto.html 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/common/service/erp/ErpService.java
@@ -30,6 +30,9 @@
     * 单据上报
     */
    public Boolean uploadBill(List<BillDto> dtos, Integer docId, String docNumber){
        if (true) {
            return true;
        }
        try {
            if (Cools.isEmpty(dtos)) {
                return false;
src/main/java/zy/cloud/wms/manager/entity/SafeStoDo.java
@@ -22,4 +22,6 @@
    private String progress;
    private Integer status;
}
src/main/resources/mapper/PriorMapper.xml
@@ -50,10 +50,15 @@
            mp.matnr,
            mp.maktx,
            mp.safe_qua,
            ls.amount,
            (cast(round((ls.amount/(mp.safe_qua*1.0))*100,2) as varchar)+'%') as progress
            ISNULL(ls.amount, 0) as amount,
            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
            else 3
            end as status
            from man_prior mp
            inner join
            left join
            (
                select
                node_id,
@@ -71,7 +76,7 @@
        select
        count(1) as count
        from man_prior mp
        inner join
        left join
        (
        select
        node_id,
src/main/webapp/static/js/safeSto/safeSto.js
@@ -15,7 +15,6 @@
        page: true,
        limit: 16,
        limits: [16, 30, 50, 100, 200, 500],
        even: true,
        toolbar: '#toolbar',
        cellMinWidth: 50,
        cols: [[
@@ -24,6 +23,7 @@
            ,{field: 'matnr', align: 'center',title: '商品编号'}
            ,{field: 'maktx', align: 'center',title: '商品名称'}
            ,{field: 'progress', align: 'center',title: '使用情况', templet: '#progressTpl'}
            ,{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}
src/main/webapp/views/safeSto/safeSto.html
@@ -75,7 +75,15 @@
      <div class="layui-progress-bar layui-bg-blue" lay-percent= {{ d.progress }}></div>
    </div>
</script>
<script type="text/html" id="statusTpl">
    {{#  if(d.status == 1){ }}
    <button class="layui-btn layui-btn-normal layui-btn-xs">满仓</button>
    {{#  } else if(d.status == 2){ }}
    <button class="layui-btn layui-btn-primary layui-btn-xs">安全</button>
    {{#  } else{ }}
    <button class="layui-btn layui-btn-warm layui-btn-xs">危险</button>
    {{#  } }}
</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>