yu-sijie
2022-09-13 1b3c2e774e74c9cbf7a4341cee80518964a47db9
Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
1个文件已修改
70 ■■■■■ 已修改文件
WebTM/views/领料发货/收料入库/Kf_ReciveBill_Fast.html 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/ÁìÁÏ·¢»õ/ÊÕÁÏÈë¿â/Kf_ReciveBill_Fast.html
@@ -14,7 +14,6 @@
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <!--自定义样式-->
    <style>
        .maintitle {
@@ -84,8 +83,8 @@
                        <div class="layui-row">
                            <label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>条码</label>
                            <div class="layui-input-block" style="margin-left: 100px;width:46%;">
                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="required" placeholder="请键入后回车" autocomplete="off" class="layui-input">
                                <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="QueDin" name="QueDin" id="QueDin" style="width: 70px; background-color: #1492ff;color:white">确定</button>
                                <input type="text" name="HBarCode" id="HBarCode" placeholder="请键入后回车" autocomplete="off" class="layui-input"><!--lay-verify="required"-->
                                <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin" name="QueDin" id="QueDin" style="width: 70px; background-color: #1492ff;color:white">确定</button>
                            </div>
                        </div>
                    </div>
@@ -184,7 +183,7 @@
                GetMeesageByBarCode();
            });
            //扫描条形码方法
            function GetMeesageByBarCode() {
            function GetMeesageByBarCode() {
                var HBarCode = $('#HBarCode').val();
                if (!HBarCode) {
                    layer.msg("条形码不能为空!")
@@ -197,23 +196,24 @@
                }
                var index = layer.load();
                $.ajax({
                    url: GetWEBURL() + "/POStockInBillList/Get_ReciveBillCheckDate",
                    url: GetWEBURL() + "/POStockInBillList/Get_ReciveBillByBarcode",
                    type: "GET",
                    data: { "HBillno": HBarCode },
                    data: { "HBarCode": HBarCode, "HInterID": HInterID },
                    success: function (result) {
                        if (result.code == "1") {
                            var data = result.data[0];
                            $("#HSupName").val(data.供应商);
                            $("#HDeptName").val(data.部门);
                            $("#HBillNo").val(data.单据号);
                            $("#HInterID").val(data.hmainid);
                            option.data = result.data;
                            table.render(option);
                            var sSubStr = table.cache['mainTable'];
                            for (var i = 0; i < sSubStr.length; i++) {
                                if (sSubStr[i].HMaterID == HBarCode.split("#")[0]) {
                                    sSubStr[i].HSQty += parseInt(HBarCode.split("#")[1]);
                                    table.render(option);
                                    break;
                                }
                            }
                            layer.close(index);
                        }
                        else {
                            layer.close(index);
                            layer.msg("未查找到数据", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (err) {
@@ -231,13 +231,21 @@
            })
            //审核
            form.on('submit(btn_Check)', function (data) {//审核
                var sSubStr = table.cache['mainTable'];
                for (var i = 0; i < sSubStr.length; i++) {
                    if (parseInt(sSubStr[i].HSQty) > parseInt(sSubStr[i].HQty)) {
                        layer.msg("明细记录第" + (i + 1) + "行,扫码数量不能超出订单数量!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return;
                    }
                }
                var index = layer.load();
                var HInterID = $('#HInterID').val();
                var HBillNo = $('#HBillNo').val();
                $.ajax({
                    url: GetWEBURL() + "/POStockInBillList/AuditPOInStockBill",
                    type: "Get",
                    data: { "HInterID": HInterID, "CurUserName": sessionStorage["HUserName"], "HBillNo": HBillNo },
                    url: GetWEBURL() + "/POStockInBillList/AuditPOInStockBillPost",
                    type: "Post",
                    data: { "msg": JSON.stringify(sSubStr) },
                    success: function (result) {
                        if (result.code == "1") {
                            layer.msg("审核成功", { icon: 1, btn: ['确认'], time: 1000000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
@@ -260,11 +268,15 @@
                //表头
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: '数量', title: '到货数量', edit: 'text', hide: true }
                    , { field: '物料代码', title: '物料代码', edit: 'text', event: "" }
                    , { field: '物料名称', title: '物料名称', edit: 'text' }
                    , { field: '规格型号', title: '规格型号', edit: 'text' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left' }
                    , { field: 'HSQty', title: '数量', edit: 'text' }
                    , { field: 'HQty', title: '订单数量' }
                    , { field: 'HMaterID', title: 'HMaterID' }
                    , { field: 'HMaterNum', title: '物料代码' }
                    , { field: 'HMaterName', title: '物料名称' }
                    , { field: 'HModel', title: '规格型号' }
                    , { field: 'HInterID', title: '主内码', sort: true, width: 200 }
                    , { field: 'HEntryID', title: '子内码', sort: true, width: 200 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150 }
                ];
                option = {
@@ -277,7 +289,7 @@
                    , done: function (res, curr, count) {
                    }
                };
                option.data = [{ "数量": 0, "物料代码": 0, "物料名称": "", "规格型号": "" }];
                //option.data = [{ "数量": 0, "物料代码": 0, "物料名称": "", "规格型号": "" }];
                table.render(option);
            }
            // è¡¨æ ¼è¡Œå†…事件删除
@@ -302,7 +314,7 @@
                }
            }
            //源单回车方法
            $('#HSourceBillNo').on('keydown', function (event) {
            $('#HBillNo').on('keydown', function (event) {
                if (event.keyCode == 13) {
                    GetMeesageBySourceBillNo();
                }
@@ -326,17 +338,17 @@
                    success: function (result) {
                        if (result.code == "1") {
                            var data = result.data[0];
                            $("#HSupName").val(data.供应商);
                            $("#HDeptName").val(data.部门);
                            $("#HBillNo").val(data.单据号);
                            $("#HInterID").val(data.hmainid);
                            $("#HSupName").val(data.HSupName);
                            $("#HDeptName").val(data.HDeptName);
                            $("#HBillNo").val(data.HBillNo);
                            $("#HInterID").val(data.HInterID);
                            option.data = result.data;
                            table.render(option);
                            layer.close(index);
                        }
                        else {
                            layer.close(index);
                            layer.msg("未查找到数据", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (err) {