YYC
2023-07-07 b32697542f61ab9f6579aed1321d2916dd278eb5
出入库测试
已修改8个文件
已添加1个文件
172 ■■■■ 文件已修改
igds-inout/src/main/java/com/ld/igds/inout/InoutBill.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/out-card-back.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/out-weight.js 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/admin/inout/out-card-back.html 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/admin/inout/out-handle.html 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/admin/inout/out-register.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/test/print-out.html 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/InoutBill.java
@@ -14,7 +14,7 @@
    /**
     * é»˜è®¤å‡ºåº“过磅单
     */
    public static String OUT_WEIGHT_DEFAULT = "<!DOCTYPE html><html lang='zh-cn'><head><meta http-equiv='Content-Type'content='text/html;charset=UTF-8'><title>出库称重单</title><style>body{text-align:center;padding:10px}.tit{margin:10px;font-size:24px;font-family:'宋体';padding-top:15px}.div-tit{padding-top:10px}.sp1{width:33%;float:left;padding-bottom:10px}.sp2{width:25%;float:left;text-align:center}table{width:100%;border-right:1px solid;border-bottom:1px solid;font-size:14px}table td{border-left:1px solid;border-top:1px solid;height:38px}</style></head><body><h1 class='tit'>billTitle</h1><div class='div-tit'><span class='sp1'>登记时间:registerTime</span><span class='sp1'>完成时间:completeTime</span><span class='sp1'>出库单号:serId</span></div><table cellspacing='0'cellpadding='0'><tr><td width='12.5%'>发货单位</td><td colspan='3'width='37.5%'>deptName</td><td width='12.5%'>收货单位</td><td colspan='3'width='37.5%'>customerName</td></tr><tr><td width='12.5%'>承运人</td><td width='12.5%'>driverName</td><td width='12.5%'>粮食品种</td><td width='12.5%'>foodVariety</td><td width='12.5%'>出库仓库</td><td width='12.5%'>depotName</td><td width='12.5%'>粮食产地</td><td width='12.5%'>foodLocation</td></tr><tr><td>承运车牌</td><td>plateNum</td><td>毛重(KG)</td><td>fullWeight</td><td>皮重(KG)</td><td>emptyWeight</td><td>净重(KG)</td><td>netWeight</td></tr><tr><td>备注</td><td colspan='3'>remark</td><td>水分增重(KG)</td><td>deWet</td><td>结算重量(KG)</td><td>settleWeight</td></tr></table><div class='div-tit'><span class='sp2'>司磅员:</span><span class='sp2'>监磅员:</span><span class='sp2'>保管员:handleUser</span><span class='sp2'>承运人:</span></div></body></html>";
    public static String OUT_WEIGHT_DEFAULT = "<!DOCTYPE html><html lang='zh-cn'><head><meta http-equiv='Content-Type' content='text/html;charset=UTF-8'><title>出库称重单</title><style>body {text-align: center;padding: 10px}  .tit {margin: 10px;font-size: 24px;font-family: '宋体';padding-top: 15px}  .div-tit {padding-top: 10px}  .sp1 {width: 50%;float: left;padding-bottom: 10px}  .sp2 {width: 25%;float: left;text-align: center}  table {width: 100%;border-right: 1px solid;border-bottom: 1px solid;font-size: 14px}  table td {border-left: 1px solid;border-top: 1px solid;height: 38px}</style></head><body><h1 class='tit'>billTitle</h1><div class='div-tit'><span class='sp1'>登记时间:registerTime</span><span class='sp1'>出库单号:serId</span></div><table cellspacing='0' cellpadding='0'><tr><td width='12.5%'>发货单位</td><td colspan='3' width='37.5%'>deptName</td><td width='12.5%'>收货单位</td><td colspan='3' width='37.5%'>customerName</td></tr><tr><td width='12.5%'>承运人</td><td width='12.5%'>driverName</td><td width='12.5%'>粮食品种</td><td width='12.5%'>foodVariety</td><td width='12.5%'>出库仓库</td><td width='12.5%'>depotName</td><td width='12.5%'>粮食产地</td><td width='12.5%'>foodLocation</td></tr><tr><td>承运车牌</td><td>plateNum</td><td>毛重(KG)</td><td>fullWeight</td><td>皮重(KG)</td><td>emptyWeight</td><td>净重(KG)</td><td>netWeight</td></tr><tr><td>其他扣重(KG)</td><td>deOther</td><td>值仓扣重(KG)</td><td>deHandle</td><td>结算重量(KG)</td><td>settleWeight</td><td colspan=\"2\"></td></tr><tr><td>备注</td><td colspan='7'>remark</td></tr></table><div class='div-tit'><span class='sp2'>司磅员:</span><span class='sp2'>监磅员:</span><span class='sp2'>保管员:handleUser</span><span class='sp2'>承运人:driverName</span></div><br></body><div style=\"padding-top: 10px\"><span></span></div><div style=\"text-align: left;font-size: 12px\"><span>注:</span></div><div style=\"text-align: left;font-size: 12px\"><span>1.净重=毛重-皮重;</span></div><div style=\"text-align: left;font-size: 12px\"><span>2.出库重量=净重-总扣重;结算重量=净重-总扣重;</span></div><div style=\"text-align: left;font-size: 12px\"><span>3.白联(存根),红联(记账),黄联(客户保留)</span></div></html>";
    /**
     * é»˜è®¤éªŒæ£€å•
     */
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutReportManager.java
@@ -148,7 +148,7 @@
     */
    public String outWeightBill(InoutData data) {
        // èŽ·å–è¡¨å•æ•°æ®
        WeightBill bill = this.createBillData(data, "出库称重单");
        WeightBill bill = this.createBillData(data, "出库划码单");
        //默认模版
        String htmlStr = InoutBill.OUT_WEIGHT_DEFAULT;
@@ -190,7 +190,7 @@
        htmlStr = htmlStr.replace("fullTime", bill.getFullTime());
        htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime());
        htmlStr = htmlStr.replace("serId", bill.getSerId());
        htmlStr = htmlStr.replace("specType", bill.getSpecType());
//        htmlStr = htmlStr.replace("specType", bill.getSpecType());
        htmlStr = htmlStr.replace("customerName", bill.getCustomerName());
        htmlStr = htmlStr.replace("deptName", bill.getUnitName());
@@ -212,13 +212,13 @@
                new DecimalFormat("0").format(bill.getNetWeight()));
        htmlStr = htmlStr.replace("remark", bill.getRemark());
        htmlStr = htmlStr.replace("deWet", bill.getDeWet() + "");
//        htmlStr = htmlStr.replace("deWet", bill.getDeWet() + "");
        htmlStr = htmlStr.replace("settleWeight",
                new DecimalFormat("0").format(bill.getSettleWeight()));
        htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + "");
        htmlStr = htmlStr.replace("handleUser", bill.getHandleUser());
        htmlStr = htmlStr.replace("deSum", bill.getDeSum() + "");
        htmlStr = htmlStr.replace("deOther", bill.getDeOther() + "");
        htmlStr = htmlStr.replace("price", bill.getPrice());
        htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + "");
        htmlStr = htmlStr.replace("wet", bill.getWet() + "");
igds-web/src/main/resources/static/admin/inout/out-card-back.js
@@ -116,7 +116,7 @@
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout-report/inout-bill-weight",
        url: "../../basic/inout/report/bill-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
igds-web/src/main/resources/static/admin/inout/out-weight.js
@@ -264,7 +264,7 @@
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../inout/api/ic-card-num",
        url: "../../inout/api/get-icCard",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: param,
@@ -388,10 +388,11 @@
    });
}
// æ‰“印过磅单
// ç‚¹å‡»æ‰“印,系统判断是否已经执行完成,如果已经完成,直接打印,如果未完成则先执行完成
function printBill() {
    if (!recordData) {
        layer.alert("没有获取到业务数据,不支持打印!");
        alertError("没有获取到业务数据,打印被拒绝!");
        return;
    }
    // ä»ŽåŽå°èŽ·å–æ¨¡ç‰ˆå¹¶æ‰“å°
@@ -399,7 +400,27 @@
    // åˆå¹¶æ›´æ–°ç•¶å‰ç¼–辑数据
    Object.assign(recordData, data);
    printBillStep2();
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/report/bill-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                layer.msg("开始渲染打印单……");
                printWeight(result.data);
            }
        },
        error: function () {
            layer.close(index);
            alertError("获取打印模版失败,请联系管理员查看原因");
        }
    });
}
// ç‚¹å‡»æ‰“印,先执行系统默认执行完成卡回收
@@ -407,7 +428,7 @@
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout-report/inout-bill-weight",
        url: "../../basic/inout-report/bill-weight",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(recordData),
@@ -599,7 +620,6 @@
        fileName: snapData.fileName3
    }];
    recordData.files = files;
    console.log("out-weight,submit")
    var index = layer.load();
    $.ajax({
        type: "POST",
@@ -624,10 +644,10 @@
    });
    //以下逻辑为增加一个语音通知的调用方法,不考虑返回结果
    var curWeight = recordData.fullWeight;
    if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
        curWeight = recordData.emptyWeight;
    }
    // var curWeight = recordData.fullWeight;
    // if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
    //     curWeight = recordData.emptyWeight;
    // }
    // var param = {
    //     sort: $("#scaleName").val(),
    //     weight: curWeight,
igds-web/src/main/resources/templates/admin/inout/out-card-back.html
@@ -299,6 +299,13 @@
                                           autocomplete="off" class="layui-input rkbk-search-input" disabled>
                                </div>
                            </div>
                            <div class="rkbk-quick layui-text-center">
                                <button class="rkbk-quick-btn layui-btn btn-green" type='button'
                                        onclick="submit()">
                                    <i><img th:src="@{../../static/images/icon-ok.png}"/></i> å‡ºåº“收卡
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
igds-web/src/main/resources/templates/admin/inout/out-handle.html
@@ -444,7 +444,16 @@
                            <!--        </div>-->
                            <!--    </div>-->
                            <!--</div>-->
                            <div class="layui-col-xs12">
                            <div class="layui-col-xs4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label color-red">值仓人</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="handleUser" autocomplete="off"
                                               placeholder="手动录入" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs8">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">其他说明</label>
                                    <div class="layui-input-block">
@@ -567,6 +576,7 @@
<script th:src="@{../../static/js/jquery.min.js}"></script>
<script th:src="@{../../static/js/constant.js}"></script>
<script th:src="@{../../static/js/igds-common.js}"></script>
<script th:src="@{../../static/admin/inout/inout-common.js}"></script>
<script th:src="@{../../static/admin/inout/weight.js}"></script>
<script th:src="@{../../static/admin/inout/out-handle.js}"></script>
igds-web/src/main/resources/templates/admin/inout/out-register.html
@@ -351,6 +351,7 @@
<script th:src="@{../../static/js/constant.js}"></script>
<script th:src="@{../../static/js/igds-common.js}"></script>
<script th:src="@{../../static/admin/inout/video-play.js}"></script>
<script th:src="@{../../static/admin/inout/inout-common.js}"></script>
<script th:src="@{../../static/admin/inout/out-register.js}"></script>
<!-- å¼¹å‡ºæ¡†çš„信息 -->
igds-web/src/main/resources/templates/test/print-out.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
<!DOCTYPE html>
<html lang='zh-cn'>
<head>
    <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'>
    <title>出库称重单</title>
    <style>body {
        text-align: center;
        padding: 10px
    }
    .tit {
        margin: 10px;
        font-size: 24px;
        font-family: '宋体';
        padding-top: 15px
    }
    .div-tit {
        padding-top: 10px
    }
    .sp1 {
        width: 50%;
        float: left;
        padding-bottom: 10px
    }
    .sp2 {
        width: 25%;
        float: left;
        text-align: center
    }
    table {
        width: 100%;
        border-right: 1px solid;
        border-bottom: 1px solid;
        font-size: 14px
    }
    table td {
        border-left: 1px solid;
        border-top: 1px solid;
        height: 38px
    }</style>
</head>
<body><h1 class='tit'>billTitle</h1>
<div class='div-tit'><span class='sp1'>登记时间:registerTime</span><span class='sp1'>出库单号:serId</span></div>
<table cellspacing='0' cellpadding='0'>
    <tr>
        <td width='12.5%'>发货单位</td>
        <td colspan='3' width='37.5%'>deptName</td>
        <td width='12.5%'>收货单位</td>
        <td colspan='3' width='37.5%'>customerName</td>
    </tr>
    <tr>
        <td width='12.5%'>承运人</td>
        <td width='12.5%'>driverName</td>
        <td width='12.5%'>粮食品种</td>
        <td width='12.5%'>foodVariety</td>
        <td width='12.5%'>出库仓库</td>
        <td width='12.5%'>depotName</td>
        <td width='12.5%'>粮食产地</td>
        <td width='12.5%'>foodLocation</td>
    </tr>
    <tr>
        <td>承运车牌</td>
        <td>plateNum</td>
        <td>毛重(KG)</td>
        <td>fullWeight</td>
        <td>皮重(KG)</td>
        <td>emptyWeight</td>
        <td>净重(KG)</td>
        <td>netWeight</td>
    </tr>
    <tr>
        <td>其他扣重</td>
        <td>deOther</td>
        <td>值仓扣重(KG)</td>
        <td>deHandle</td>
        <td>结算重量(KG)</td>
        <td>settleWeight</td>
        <td colspan="2"></td>
    </tr>
    <tr>
        <td>备注</td>
        <td colspan='7'>remark</td>
    </tr>
</table>
<div class='div-tit'><span class='sp2'>司磅员:</span><span class='sp2'>监磅员:</span><span
        class='sp2'>保管员:handleUser</span><span class='sp2'>承运人:driverName</span></div>
<br></body>
<div style="padding-top: 10px"><span></span></div>
<div style="text-align: left;font-size: 12px"><span>注:</span></div>
<div style="text-align: left;font-size: 12px"><span>1.净重=毛重-皮重;</span></div>
<div style="text-align: left;font-size: 12px"><span>2.出库重量=净重-总扣重;结算重量=净重-总扣重;</span></div>
<div style="text-align: left;font-size: 12px"><span>3.白联(存根),红联(记账),黄联(客户保留)</span></div>
</html>