PDA销售出库扫码模块优化(增加先进先出扫码功能,单据ID获取方法修改等)
2个文件已修改
1244 ■■■■■ 已修改文件
WebTM/views/领料发货/销售出库/Kf_SellOutBill_Fast.html 1197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/销售出库/Kf_SellOutBill_FastList.html 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill_Fast.html
@@ -49,15 +49,15 @@
                    </div>
                    <div class="layui-tab layui-col-xs12" lay-filter="tab-SellOutBill">
                        <ul class="layui-tab-title" lay-filter="tab-all">
                            <li lay-id="1" style="padding:1px;" class="layui-this">源单信息</li>
                            <li lay-id="2" style="padding:1px;">单据信息</li>
                            <li lay-id="3" style="padding:1px;">物料清单</li>
                            <li lay-id="4" style="padding:1px;">明细清单</li>
                            <li lay-id="5" style="padding:1px;">源单找货</li>
                            <li lay-id="6" style="padding:1px;">日志</li>
                            <li lay-id="1" style="padding:1px;" class="layui-this">选择源单</li>
                            <li lay-id="2" style="padding:1px;">表头信息</li>
                            <li lay-id="3" style="padding:1px;">明细信息</li>
                            <li lay-id="4" style="padding:1px;">下架信息</li>
                            <!--<li lay-id="5" style="padding:1px;">源单找货</li>-->
                            <li lay-id="5" style="padding:1px;">日志</li>
                        </ul>
                        <div class="layui-tab-content">
                            <!--源单信息-->
                            <!--选择源单-->
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item">
                                    <div class="layui-row">
@@ -103,14 +103,14 @@
                                <div class="layui-form-item" style="padding:0px;margin:0px">
                                    <div class="layui-row">
                                        <div class="layui-col-xs3">
                                            <label class="layui-form-label" style="width:60px;padding-left:0px;">FIFOWH</label><!--先进先出仓库-->
                                            <label class="layui-form-label" style="width:60px;padding-left:0px;">先进先出仓库</label><!--先进先出仓库-->
                                        </div>
                                        <div class="layui-col-xs8">
                                            <input type="text" name="HWHNAME_FIFO" id="HWHNAME_FIFO" lay-verify="HWHNAME_FIFO" autocomplete="off" class="layui-input">
                                            <input type="hidden" name="HWHID_FIFO" id="HWHID_FIFO" lay-verify="HWHID_FIFO" value="0" autocomplete="off" class="layui-input">
                                            <input type="text" name="HFIFOWHNAME" id="HFIFOWHNAME" lay-verify="HFIFOWHNAME" autocomplete="off" class="layui-input">
                                            <input type="hidden" name="HFIFOWHID" id="HFIFOWHID" lay-verify="HFIFOWHID" value="0" autocomplete="off" class="layui-input">
                                        </div>
                                        <div class="layui-col-xs2">
                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HWHID_FIFO-BT" disabled:"disabled">...</button>
                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HFIFOWHID-BT" disabled:"disabled">...</button>
                                        </div>
                                    </div>
                                </div>
@@ -125,7 +125,7 @@
                                    </div>
                                </div>
                            </div>
                            <!--单据信息-->
                            <!--表头信息-->
                            <div class="layui-tab-item">
                                <div class="layui-form-item" style="padding:0px;margin:0px">
                                    <div class="layui-row">
@@ -238,30 +238,22 @@
                                </div>
                            </div>
                            <!--物料清单-->
                            <!--明细信息-->
                            <div class="layui-tab-item">
                                <div class="layui-form-item" style="padding:0px;margin:0px">
                                    <div class="layui-row">
                                        <div class="layui-col-xs4">
                                            <label class="layui-form-label" style="width:40px;padding-left:0px;">条码</label>
                                        </div>
                                        <div class="layui-col-xs8">
                                            <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                </div>
                                <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table>
                            </div>
                            <!--下架信息-->
                            <div class="layui-tab-item">
                                <table class="layui-hide" id="FIFOlist-table" lay-filter="FIFOlist-table"></table>
                            </div>
                            <!--明细清单-->
                            <div class="layui-tab-item">
                            <!--<div class="layui-tab-item">
                                <table class="layui-hide" id="mx-table" lay-filter="mx-table"></table>
                            </div>
                            </div>-->
                            <!--源单找货-->
                            <div class="layui-tab-item">
                            <!--<div class="layui-tab-item">
                                <table class="layui-hide" id="zh-table" lay-filter="zh-table"></table>
                            </div>
                            </div>-->
                            <!--日志-->
                            <div class="layui-tab-item">
                                <div class="layui-row">
@@ -269,7 +261,7 @@
                                        <label class="layui-form-label" style="width:60px;padding-left:0px;">条码数量</label>
                                    </div>
                                    <div class="layui-col-xs8 layui-input-inline mobile">
                                        <input type="text" name="HBarcodeQtys" id="HBarcodeQtys" lay-verify="HBarcodeQtys" autocomplete="off" class="layui-input">
                                        <input type="text" name="HBarcodeQtys" id="HBarcodeQtys" lay-verify="HBarcodeQtys" value="0" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-row">
@@ -344,7 +336,13 @@
                , form = layui.form
                , laydate = layui.laydate
                , element = layui.element;
            var HInterID = $('#HInterID').val()
            var HBillNo = $('#HBillNo').val()
            var HBillType = '1205'
            var HMaker = sessionStorage["HUserName"]
            var HStockOrgID = sessionStorage["OrganizationID"]
            var HSourceFlag = sessionStorage["SourceFlag"];
            var OperationType = 0;//操作类型
            var option = [];
            //光标默认在源单号位置上
            $("#HSourceBillNo").focus();
@@ -369,10 +367,85 @@
                    none: '暂无相关数据,请先扫描源单号!'
                }
            };
            //明细信息
            var listOption = {
                elem: '#wl-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , limit: 3000
                , totalRow: true
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HSNO', title: '序号', width: 60 }
                    , { field: 'HQty', title: '数量', width: 80, totalRow: true }
                    , { field: 'HAuxQty', title: '辅助数量', width: 80, totalRow: true }
                    , { field: 'HQtyMust', title: '应发数量', width: 80 }
                    , { field: 'HMaterName', title: '物料名称', width: 90 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 90 }
                    , { field: 'HMaterModel', title: '规格型号', width: 90 }
                    , { field: 'HSourceInterID', title: '源单主内码', width: 90 }
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 90 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 90 }
                    , { field: 'HBatchNo', title: '批次', width: 90 }
                    , { field: 'HPieceQty', title: '条码数量', width: 150 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            }
            //下架信息
            var FIFOlistOption = {
                elem: '#FIFOlist-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , limit: 3000
                , totalRow: true
                , cols: [[
                    { field: 'HQty', title: '数量', width: 150, totalRow: true }
                    , { field: 'HQtyMust', title: '下架数量', width: 150, totalRow: true }
                    , { field: 'HWhName', title: '仓库', width: 150 }
                    , { field: 'HSPName', title: '仓位', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HBatchNo', title: '批次', width: 150 }
                    , { field: 'HAuxPropName', title: '辅助属性', width: 150 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            }
            var listOption1 = {
                elem: '#mx-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HQty', title: '数量', width: 150, totalRow: true }
                    , { field: 'HQtyMust', title: '应发数量', width: 150 }
                    , { field: 'HBarCode', title: '条码编号', width: 150 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HBatchNo', title: '批号', width: 150 }
                    //, { field: 'HSourceInterID', title: '源单主内码', width: 150 }
                    //, { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            }
            //初始加载表格
            ZHOption.data = [];
            table.render(ZHOption);
            //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
            //$("#HWHID").val(sessionStorage["HWHID"]);
@@ -393,7 +466,6 @@
            $("#HBillerID").val(sessionStorage["HBillerID"]);
            $("#HBillerID").hide();
            $("#HDate").val(formatDate(sessionStorage["HDate"]));
            var HSourceFlag = sessionStorage["SourceFlag"];
            // ç¼–辑获取表头时时间格式矫正方式
            function formatDate(date) {
@@ -453,7 +525,6 @@
                }, function () { window.location.href = "../../user/login.html"; });
            }
            //获取参数
            function getUrlVars() {
                var vars = [], hash;
@@ -465,9 +536,12 @@
                }
                return vars;
            }
            //var params = getUrlVars();
            //var HInterID_Temp = params[params[0]]; //从参数中获取 å•据内码
            //var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            var params = getUrlVars();
            var linterid = params[params[0]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            var OperationType = params[params[0]];  //从缓存列表中返回数据类型  1新增  2从缓存列表中返回
            var HInterID_Temp = params[params[1]];  //从缓存列表中返回单据ID
            //初始化表单插件
@@ -481,12 +555,52 @@
                });
            }
            function RoadBillMain(linterid)//加载表头
            //判断是否新增
            if (HInterID != 0) {
                HSourceFlag = true;
            }
            //从缓存列表编辑功能跳转至单据模块
            else if (OperationType == 2) {
                RoadBillMain(HInterID_Temp);
                $("#HBarCode").select();
                $("#HBarCode").focus();     //获取光标
                //$('#QueDin2').addClass("layui-btn-disabled").attr("disabled", true);//按钮禁用
                //document.getElementById("QueDin2").disabled = true;   //按钮变为不可编辑状态
                //显示表体明细
                DisBillEntryList();
                HSourceFlag = true;
            }
            else {
                OperationType = 1;
                //获取最大单据ID、单据号
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HBillType": HBillType },
                    success: function (d) {
                        if (d.count == 1) {
                            $("#HInterID").val(d.data[0].HInterID);
                            $("#HBillNo").val(d.data[0].HBillNo);
                            $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
                            HInterID = $('#HInterID').val()
                            HBillNo = $('#HBillNo').val()
                        }
                        else {
                            layer.msg(d.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }
                });
                HSourceFlag = false;
            }
            function RoadBillMain(HInterID_Temp)//加载表头
            {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetPonderationBill",
                    type: "GET",
                    data: { "HInterID": linterid },
                    url: GetWEBURL() + "/Web/GetPonderationBill",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": HInterID_Temp },
                    success: function (d) {
                        // console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
@@ -544,8 +658,9 @@
                }
                else {
                    $.ajax({
                        url: GetWEBURL() + "/SellOut/get_GetXs_SeOutStockBillList",
                        type: "GET",
                        url: GetWEBURL() + "/SellOut/get_GetXs_SeOutStockBillList",
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                        success: function (result) {
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -566,103 +681,104 @@
                }
            }
            function RoadBillSub(linterid)//加载表体
            {
                $("#HInterID").val(linterid);//修改时主表ID
                //编辑加载数据
                var sInterID = $("#HInterID").val();
                table.render({
                    elem: '#wl-table'
                    //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
                    , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
                    //, toolbar: '#toolbarDemo'
                    , page: true
                    , limit: 100
                    , defaultToolbar: []
                    , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                    , cols: [[
                        { type: 'radio' }
                        , { field: 'HQty', title: '数量', width: 150 }
                        , { field: 'HAuxQty', title: '辅助数量', width: 150 }
                        , { field: 'HQtyMust', title: '应收数量', width: 150 }
                        , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                        , { field: 'HMaterName', title: '物料名称', width: 150 }
                        , { field: 'HMaterModel', title: '规格型号', width: 150 }
                        , { field: 'HSourceInterID', title: '源单主内码', width: 150 }
                        , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                        , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                        , { field: 'HBatchNo', title: '批次', width: 150 }
                    ]]
                    // , data: [linterid]
                    , height: 500
                    , done: function () {
                        layer.closeAll("loading");
                    }
                });
            //function RoadBillSub(HInterID_Temp)//加载表体
            //{
            //    var sInterID = $("#HInterID").val()
            //    var sBillNo = $("#HBillNo").val()
            //    var HBillType = '1205'
            //    var sHStockOrgID = sessionStorage["OrganizationID"];
                //$.ajax({
                //    url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
                //    type: "GET",
                //    data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
                //    success: function (result) {
                //        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                //            listOption.data = result.data.list;
                //            table.render(listOption);
                //            listOption1.data = result.data.list2;
                //            table.render(listOption1);
            //    //$("#HInterID").val(HInterID_Temp);//修改时主表ID
            //    ////编辑加载数据
            //    //var sInterID = $("#HInterID").val();
            //    //table.render({
            //    //    elem: '#wl-table'
            //    //    //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
            //    //    , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
            //    //    //, toolbar: '#toolbarDemo'
            //    //    , page: true
            //    //    , limit: 100
            //    //    , defaultToolbar: []
            //    //    , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
            //    //    , cols: [[
            //    //        { type: 'radio' }
            //    //        , { field: 'HQty', title: '数量', width: 150 }
            //    //        , { field: 'HAuxQty', title: '辅助数量', width: 150 }
            //    //        , { field: 'HQtyMust', title: '应收数量', width: 150 }
            //    //        , { field: 'HMaterNumber', title: '物料代码', width: 150 }
            //    //        , { field: 'HMaterName', title: '物料名称', width: 150 }
            //    //        , { field: 'HMaterModel', title: '规格型号', width: 150 }
            //    //        , { field: 'HSourceInterID', title: '源单主内码', width: 150 }
            //    //        , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
            //    //        , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
            //    //        , { field: 'HBatchNo', title: '批次', width: 150 }
            //    //    ]]
            //    //    // , data: [HInterID_Temp]
            //    //    , height: 500
            //    //    , done: function () {
            //    //        layer.closeAll("loading");
            //    //    }
            //    //});
                //            //console.log(result.data.list2);
                //            var count = 0;
                //            var count1 = 0;
                //            for (var i = 0; i < result.data.list.length; i++) {
                //                count += result.data.list[i].HQty;
                //                count1 += result.data.list[i].HPieceQty;
                //            }
                //            $("#HSumQtys").val(count);
                //            $("#HBarCodeQtys").val(count1);
                //            //return;
                //        }
                //        else {
                //            layer.msg(result.Message);
                //        }
                //        layer.closeAll("loading");
                //    }
                //});
            }
            //    //$.ajax({
            //    //    url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
            //    //    type: "GET",
            //    //    data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
            //    //    success: function (result) {
            //    //        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
            //    //            listOption.data = result.data.list;
            //    //            table.render(listOption);
            //    //            listOption1.data = result.data.list2;
            //    //            table.render(listOption1);
            //    //            //console.log(result.data.list2);
            //    //            var count = 0;
            //    //            var count1 = 0;
            //    //            for (var i = 0; i < result.data.list.length; i++) {
            //    //                count += result.data.list[i].HQty;
            //    //                count1 += result.data.list[i].HPieceQty;
            //    //            }
            //    //            $("#HSumQtys").val(count);
            //    //            $("#HBarCodeQtys").val(count1);
            //    //            //return;
            //    //        }
            //    //        else {
            //    //            layer.msg(result.Message);
            //    //        }
            //    //        layer.closeAll("loading");
            //    //    }
            //    //});
            //}
            //动态加载源单类型列表 new
            //判断是否新增
            if (linterid == null || linterid == 0) {
                //获取最大单据号 new
                $("#HInterID").val("");
                $("#HBillNo").val("");
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HBillType": '1205' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
                        //$("#HInterID").val('132522535');
                        //$("#HBillNo").val('421458026');
                        set_InitGrid();
                    }
                });
            }
            else {//如果修改则走下面 new-----不会走
                RoadBillMain(linterid);
                RoadBillSub(linterid);
            }
            ////判断是否新增
            //if (HInterID_Temp == null || HInterID_Temp == 0) {
            //    //获取最大单据号 new
            //    $("#HInterID").val("");
            //    $("#HBillNo").val("");
            //    $.ajax({
            //        type: "GET",
            //        url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
            //        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
            //        data: { "HBillType": '1205' },
            //        success: function (d) {
            //            //console.log(d.data);
            //            $("#HInterID").val(d.data[0].HInterID);
            //            $("#HBillNo").val(d.data[0].HBillNo);
            //            $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
            //            //$("#HInterID").val('132522535');
            //            //$("#HBillNo").val('421458026');
            //            set_InitGrid();
            //        }
            //    });
            //}
            //else {//如果修改则走下面 new-----不会走
            //    RoadBillMain(HInterID_Temp);
            //    //显示表体明细
            //    DisBillEntryList();
            //    //RoadBillSub(HInterID_Temp);
            //}
            form.on('submit(HWHID-BT)', function () {//选择仓库
@@ -694,7 +810,7 @@
            //        }
            //    })
            //});
            form.on('submit(HWHID_FIFO-BT)', function () {//选择先进先出仓库
            form.on('submit(HFIFOWHID-BT)', function () {//选择先进先出仓库
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
@@ -833,11 +949,37 @@
                })
            });
            //退出按钮
            form.on('submit(Cancel)', function () {
                var sInterID = $("#HInterID").val()
                var HBillType = '1205'
                $.ajax(
                    {
                        type: "Get",
                        url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json",
                        async: true,
                        data: { "HInterID": sInterID, "HBillType": HBillType },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                            }
                            else {
                                layer.msg(data.Message, { icon: 2 });
                            }
                        },
                        error: function (err) {
                            layer.msg('错误' + err, {
                                icon: 5,
                                time: 20000
                            }, function () {
                            });
                        }
                    });
                layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                    parent.location.href = "../../../views/index_Mobile.html";
                });
            })
            //编辑
            //form.on('submit(cmdModify)', function () {//编辑
@@ -877,10 +1019,9 @@
            //})
            form.on('submit(cmdModify)', function () {//编辑
                //var sSubStr = table.cache['wl-table'];
                var checkStatus = table.checkStatus('wl-table')
                    , data = checkStatus.data;
                //if (AllowLoadData(sSubStr) != false) {//非空验证
                if (checkStatus.data.length === 1) {
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
@@ -894,100 +1035,62 @@
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                    , end: function () {
                        //刷新页面,
                        //location.reload();
                        var sInterID = $("#HInterID").val()
                        table.render({
                            elem: '#wl-table'
                            //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
                            , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                            //, toolbar: '#toolbarDemo'
                            , page: true
                            , limit: 100
                            , defaultToolbar: []
                            , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                            , cols: [[
                                { type: 'radio' }
                                , { field: 'HSNO', title: '序号', width: 60 }
                                , { field: 'HQty', title: '数量', width: 80 }
                                , { field: 'HAuxQty', title: '辅助数量', width: 80 }
                                , { field: 'HQtyMust', title: '应发数量', width: 80 }
                                , { field: 'HMaterName', title: '物料名称', width: 90 }
                                , { field: 'HMaterNumber', title: '物料代码', width: 90 }
                                , { field: 'HMaterModel', title: '规格型号', width: 90 }
                                , { field: 'HSourceInterID', title: '源单主内码', width: 90 }
                                , { field: 'HSourceEntryID', title: '源单子内码', width: 90 }
                                , { field: 'HSourceBillNo', title: '源单单号', width: 90 }
                                , { field: 'HBatchNo', title: '批次', width: 90 }
                            ]]
                            // , data: [linterid]
                            , height: 500
                            , done: function () {
                                layer.closeAll("loading");
                            }
                        })
                        //显示表体明细
                        DisBillEntryList();
                    }
                })
                }
                else {
                    layer.msg('请先选择一行记录,进行编辑!');
                }
                // }
            });
            //删除
            //删除功能控件
            form.on('submit(cmdDelete)', function () {//删除
                //var checkStatus = table.checkStatus('wl-table')
                //, data = checkStatus.data;
                //// console.log(data);
                //var sInterID = $('#HInterID').val()
                //var sMaterID = data[0].HMaterID
                //var sBillType = '1205'
                //var sAuxPropID = data[0].HAuxPropID
                ////var sMTONo = data[0].HMTONo
                //var sMTONo = ''
                //var sSourceInterID = data[0].HSourceInterID
                //var sSourceEntryID = data[0].HSourceEntryID
                //$.ajax(
                //   {
                //       type: "Get",
                //       //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //方法所在页面和方法名
                //       url: GetWEBURL() + "/SellOut/Delete_Json",
                //       async: true,
                //       data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
                //       dataType: "json",
                //       success: function (data) {
                //           if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                //               table.render({
                //                   elem: '#wl-table'
                //                   , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                //                   , cellMinWidth: 80
                //                   , toolbar: '#toolbarDemo'
                //                   , defaultToolbar: []
                //                   , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                //                   , cols: [[
                //                      { type: 'radio' }
                //                       , { field: 'HQty', title: '数量', width: 80 }
                //                       , { field: 'HAuxQty', title: '辅助数量', width: 80 }
                //                    , { field: 'HQtyMust', title: '应收数量', width: 80 }
                //                    , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                //                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                //                    , { field: 'HMaterModel', title: '规格型号', width: 100 }
                //                    , { field: 'HSourceInterID', title: '源单主内码', width: 100 }
                //                    , { field: 'HSourceEntryID', title: '源单子内码', width: 100 }
                //                    , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                //                    , { field: 'HBatchNo', title: '批次', width: 100 }
                //                    , { field: 'HAuxPropID', title: '辅助属性', width: 100 }
                //                    , { field: 'HMTONo', title: '计划跟踪号', width: 100 }
                //                    , { field: 'HWHID', title: 'ck', width: 100 }
                //                   ]]
                //                    //, height: 500
                //               })
                //           }
                //           else {
                //               layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                //           }
                //       },
                //       error: function (err) {
                //           layer.msg("错误" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                //       }
                //   });
                var checkStatus = table.checkStatus('wl-table')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.confirm("确认要删除吗,删除后将不可恢复!", { title: "删除确认" }, function (index) {
                        var sInterID = $("#HInterID").val()
                        var sBillNo = $("#HBillNo").val()
                        var sMaterID = data[0].HMaterID
                        var sAuxPropID = data[0].HAuxPropID
                        var sMTONo = ''
                        var sSourceInterID = data[0].HSourceInterID
                        var sSourceEntryID = data[0].HSourceEntryID
                        var HBillType = '1205';
                        var sHStockOrgID = sessionStorage["OrganizationID"]
                        $.ajax(
                            {
                                type: "Get",
                                url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json",
                                async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                                data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "HBillType": HBillType },
                                dataType: "json",
                                success: function (data) {
                                    if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                        //显示表体明细
                                        DisBillEntryList();
                                    }
                                    else {
                                        layer.msg(data.Message, { icon: 2 });
                                    }
                                },
                                error: function (err) {
                                    layer.msg('错误' + err, {
                                        icon: 5,
                                        time: 20000
                                    }, function () {
                                    });
                                }
                            });
                        layer.close(index)
                    })
                }
                else {
                    layer.msg('请选择一行记录,进行删除!');
                }
            });
@@ -1027,7 +1130,7 @@
                        type: "POST",
                        // url: "http://61.130.49.162:9090/WMSAPI///SellOut/set_SaveSellOutBill_Json", //方法所在页面和方法名
                        url: GetWEBURL() + "/SellOut/set_SaveSellOutBill_Json",
                        async: true,
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "oMain": sMainStr },
                        dataType: "json",
                        success: function (data) {
@@ -1041,7 +1144,8 @@
                                    }//关闭
                                }, function () {
                                    //sessionStorage["SourceFlag"] = false;
                                    window.location.reload();
                                    //window.location.reload();
                                    location.replace('Kf_SellOutBill_Fast.html?OperationType=1&HInterID=0');
                                });//新增
                            }
                            else {
@@ -1067,16 +1171,6 @@
                }
            });
            //扫条码-直接调webservice
            $('#HBarCode').on('keydown', function (event) {
                if (event.keyCode == 13) {
                    GetMeesageByBarCode();
                }
            });
            //确定
            form.on('submit(QueDin)', function (data) {
                GetMeesageByBarCode();
            });
            $('#HStockPlaceName').on('keydown', function (event) {      //扫仓位
@@ -1084,8 +1178,9 @@
                if (event.keyCode == 13) {
                    //判断文本框是否有数据    new
                    $.ajax({
                        url: GetWEBURL() + "/LookingFor/getSpName_Json",
                        type: "GET",
                        url: GetWEBURL() + "/LookingFor/getSpName_Json",
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "HBarCode": HBarCode },
                        success: function (result) {
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -1114,8 +1209,9 @@
                    }
                    //判断文本框是否有数据    new
                    $.ajax({
                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
                        type: "GET",
                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "HBarCode": HBarCode },
                        success: function (result) {
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -1197,7 +1293,7 @@
            //                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
            //                    , { field: 'HBatchNo', title: '批次', width: 150 }
            //                  ]]
            //                        // , data: [linterid]
            //                        // , data: [HInterID_Temp]
            //                        // , page: true
            //                  , height: 500
            //                  , done: function () {
@@ -1214,23 +1310,13 @@
            //    }
            //});
            //扫源单
            $('#HSourceBillNo').on('keydown', function (event) {
                if (event.keyCode == 13) {
                    GetMeesageBySourceBillNo();
                }
            });
            //确定
            form.on('submit(QueDin2)', function (data) {
                GetMeesageBySourceBillNo();
            });
            //刷新明细页签
            table.render({
                elem: '#mx-table'
                // , url: 'http://localhost:8083/Web/SellOut/GetHBarCodeShowBillSub'
                //, toolbar: '#toolbarDemo'
                // , where: { sMsg: linterid, sMsg2: lentryid }
                // , where: { sMsg: HInterID_Temp, sMsg2: lentryid }
                , cols: [[
                    , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
                ]]
@@ -1274,8 +1360,9 @@
            function GetSellOutFindSP() {
                var HSourceBillNo = $('#HSourceBillNo').val();
                $.ajax({
                    url: GetWEBURL() + "/LookingFor/GetSellOutFindSP",
                    type: "GET",
                    url: GetWEBURL() + "/LookingFor/GetSellOutFindSP",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HbillNo": HSourceBillNo },
                    success: function (result) {
                        if (result.count == 1) {
@@ -1292,6 +1379,190 @@
                });
            }
            //#region æ‰«ææºå•条码
            //扫源单
            $('#HSourceBillNo').on('keydown', function (event) {
                if (event.keyCode == 13) {
                    GetMeesageBySourceBillNo();
                }
            });
            //确定
            form.on('submit(QueDin2)', function (data) {
                GetMeesageBySourceBillNo();
            });
            //扫描源单条码
            function GetMeesageBySourceBillNo(obj) {
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var HBillType = '1205'
                var HSourceBillNo = $('#HSourceBillNo').val()
                var HSourceBillType = $("#HBillType").val()
                var HMaker = sessionStorage["HUserName"]
                var sHStockOrgID = sessionStorage["OrganizationID"];
                var HFIFOWhID = $("#HFIFOWHID").val()
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/WEBSController/Get_SourceBarCode_SellOut_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "HMaker": HMaker, "HFIFOWhID": HFIFOWhID, "HOWNERID": sHStockOrgID },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            playSound1();
                            HSourceFlag = true;
                            $("#HSupName").val(result.data.hSupNameField);
                            $("#HSupID").val(result.data.hSupIDField);
                            if (result.data.hDeptIDField != 0) {
                                $("#HDeptID").val(result.data.hDeptIDField);
                                $("#HDeptName").val(result.data.hDeptNameField);
                            }
                            $("#HSourceBillNo").val(result.data.hSourceBillNoField);
                            $("#HBillType").attr("disabled", "disabled");
                            form.render('select');
                            if (result.data.hMulSourceFlagField == 0) {
                                $("#HSourceBillNo").attr("readonly", "readonly");
                            }
                            layer.load(3);
                            element.tabChange('tab-SellOutBill', '2');
                            //扫源单成功后,光标显示到仓库上
                            $("#HWHNAME").focus();
                            //显示表体明细
                            DisBillEntryList();
                        }
                        else {
                            playSound();
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                        layer.closeAll("loading");
                    }
                });
            }
            //原调用方法
            ////扫源单
            //function GetMeesageBySourceBillNo(obj) {
            //    var HSourceBillNo = $('#HSourceBillNo').val()
            //    var sInterID = $("#HInterID").val()
            //    var sBillNo = $("#HBillNo").val()
            //    var HSourceBillType = $("#HBillType").val()
            //    var HBillType = '1205'
            //    var HFIFOWHID = $("#HFIFOWHID").val();//先进先出仓库ID
            //    var sMouldManagerCtl = 'N'
            //    var sFIFOCtl = 'N'
            //    if (HSourceBillNo == "" || sInterID <= 0) {
            //        layer.msg("源单号为空,或者内码不存在!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //        return;
            //    }
            //    $.ajax({
            //        url: GetWEBURL() + "/SellOut/set_SavePonderationBillMain_Temp_Source_Fast_Json",
            //        type: "GET",
            //        data: { sInterID: sInterID, sBillNo: sBillNo, HBillType: '1205', "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
            //        success: function (result) {
            //            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
            //                //GetSellOutFindSP();
            //                $("#HSupID").val(result.data[0].HSupID);
            //                $("#HSupName").val(result.data[0].HSupName);
            //                //$("#HDeptID").val(result.data[0].HDeptID);
            //                //$("#HDeptName").val(result.data[0].HDeptName);
            //                HSourceFlag = true;
            //                element.tabChange('tab-SellOutBill', '2');
            //                //扫源单成功后,光标显示到条码上
            //                $("#HWHNAME").focus();
            //                //table.reload('wl-table', {
            //                //    where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
            //                //});
            //                //table.render({
            //                //    elem: '#wl-table'
            //                //    , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
            //                //    , toolbar: '#toolbarDemo'
            //                //    , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
            //                //    , cols: [[
            //                //        { type: 'radio' }
            //                //        , { field: 'HSNO', title: '序号', width: 60 }
            //                //        , { field: 'HQty', title: '数量', width: 80 }
            //                //        , { field: 'HAuxQty', title: '辅助数量', width: 80 }
            //                //        , { field: 'HQtyMust', title: '应发数量', width: 80 }
            //                //        , { field: 'HMaterName', title: '物料名称', width: 90 }
            //                //        , { field: 'HMaterNumber', title: '物料代码', width: 90 }
            //                //        , { field: 'HMaterModel', title: '规格型号', width: 90 }
            //                //        , { field: 'HSourceInterID', title: '源单主内码', width: 90 }
            //                //        , { field: 'HSourceEntryID', title: '源单子内码', width: 90 }
            //                //        , { field: 'HSourceBillNo', title: '源单单号', width: 90 }
            //                //        , { field: 'HBatchNo', title: '批次', width: 90 }
            //                //    ]]
            //                //    , height: 500
            //                //    , done: function () {
            //                //        layer.closeAll("loading");
            //                //    }
            //                //});
            //                $.ajax({
            //                    url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
            //                    type: "GET",
            //                    data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
            //                    success: function (result) {
            //                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
            //                            listOption.data = result.data.list;
            //                            table.render(listOption);
            //                            listOption1.data = result.data.list2;
            //                            table.render(listOption1);
            //                            //console.log(result.data.list2);
            //                            var count = 0;
            //                            var count1 = 0;
            //                            for (var i = 0; i < result.data.list.length; i++) {
            //                                count += result.data.list[i].HQty;
            //                                count1 += result.data.list[i].HPieceQty;
            //                            }
            //                            $("#HSumQtys").val(count);
            //                            $("#HBarCodeQtys").val(count1);
            //                            //return;
            //                        }
            //                        else {
            //                            layer.msg(result.Message);
            //                        }
            //                        layer.closeAll("loading");
            //                    }
            //                });
            //                $("#HSourceBillNo").attr("disabled", "true");
            //            }
            //            else {
            //                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //            }
            //        }
            //    });
            //}
            //#endregion
            //#region æ‰«æç‰©æ–™æ¡ç 
            //扫条码
            $('#HBarCode').on('keydown', function (event) {
                if (event.keyCode == 13) {
                    GetMeesageByBarCode();
                }
            });
            //确定
            form.on('submit(QueDin)', function (data) {
                GetMeesageByBarCode();
            });
            //扫条码
            function GetMeesageByBarCode(obj) {  //返回工作中心
                var sOldBarCode = $('#HBarCode').val()
@@ -1301,6 +1572,7 @@
                var sBillType = '1205'
                var sBillNo = $("#HBillNo").val()//单据号
                var sMaker = sessionStorage["HUserName"];
                var sHStockOrgID = sessionStorage["OrganizationID"];
                var sHWHID = $("#HWHID").val();//仓库ID
                var sHSPID = $("#HStockPlaceID").val();//仓位ID
                var sQty = $("#HQty").val()//数量
@@ -1326,9 +1598,9 @@
                    }
                    $.ajax(
                        {
                            type: "Get",
                            type: "GET",
                            url: GetWEBURL() + "/ProductIn/Delete_Json",
                            async: true,
                            async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                            data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HBarCode": sBarCode },
                            dataType: "json",
                            success: function (data) {
@@ -1336,39 +1608,42 @@
                                    playSound1();
                                    //清空数量
                                    $("#HQty").val("");
                                    table.reload('wl-table', {
                                        where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                                    });
                                    //table.reload('wl-table', {
                                    //    where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                                    //});
                                    //刷新列表信息
                                    $.ajax({
                                        url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
                                        type: "GET",
                                        data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: sBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
                                        success: function (result) {
                                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                                listOption.data = result.data.list;
                                                table.render(listOption);
                                                listOption1.data = result.data.list2;
                                                table.render(listOption1);
                                    //显示表体明细
                                    DisBillEntryList();
                                                //console.log(result.data.list2);
                                                var count = 0;
                                                var count1 = 0;
                                                for (var i = 0; i < result.data.list.length; i++) {
                                                    count += result.data.list[i].HQty;
                                                    count1 += result.data.list[i].HPieceQty;
                                                }
                                                $("#HSumQtys").val(count);
                                                $("#HBarCodeQtys").val(count1);
                                                //return;
                                            }
                                            else {
                                                layer.msg(result.Message);
                                            }
                                            layer.closeAll("loading");
                                        }
                                    });
                                    ////刷新列表信息
                                    //$.ajax({
                                    //    url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
                                    //    type: "GET",
                                    //    data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: sBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
                                    //    success: function (result) {
                                    //        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                    //            listOption.data = result.data.list;
                                    //            table.render(listOption);
                                    //            listOption1.data = result.data.list2;
                                    //            table.render(listOption1);
                                    //            //console.log(result.data.list2);
                                    //            var count = 0;
                                    //            var count1 = 0;
                                    //            for (var i = 0; i < result.data.list.length; i++) {
                                    //                count += result.data.list[i].HQty;
                                    //                count1 += result.data.list[i].HPieceQty;
                                    //            }
                                    //            $("#HSumQtys").val(count);
                                    //            $("#HBarCodeQtys").val(count1);
                                    //            //return;
                                    //        }
                                    //        else {
                                    //            layer.msg(result.Message);
                                    //        }
                                    //        layer.closeAll("loading");
                                    //    }
                                    //});
                                }
                                else {
                                    playSound();
@@ -1394,7 +1669,7 @@
                        {
                            type: "Get",
                            url: GetWEBURL() + "/POStockInBillList/SellOutBillSDeleCode",
                            async: true,
                            async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                            data: { "HBarCode": HBarCode, "HInterID": HInterID },
                            dataType: "json",
                            success: function (data) {
@@ -1402,33 +1677,37 @@
                                    layer.msg(data.Message, { icon: 1, btn: ['确认'], time: 100000, title: "温馨提示" });
                                    //清空数量
                                    $("#HQty").val("");
                                    table.render({
                                        elem: '#wl-table'
                                        , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                                        , cellMinWidth: 80
                                        //, toolbar: '#toolbarDemo'
                                        , page: true
                                        , limit: 100
                                        , defaultToolbar: []
                                        , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                                        , cols: [[
                                            { type: 'radio' }
                                            , { field: 'HQty', title: '数量', width: 80 }
                                            , { field: 'HAuxQty', title: '辅助数量', width: 80 }
                                            , { field: 'HQtyMust', title: '应收数量', width: 80 }
                                            , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                                            , { field: 'HMaterName', title: '物料名称', width: 150 }
                                            , { field: 'HMaterModel', title: '规格型号', width: 100 }
                                            , { field: 'HSourceInterID', title: '源单主内码', width: 100 }
                                            , { field: 'HSourceEntryID', title: '源单子内码', width: 100 }
                                            , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                                            , { field: 'HBatchNo', title: '批次', width: 100 }
                                            , { field: 'HAuxPropID', title: '辅助属性', width: 100 }
                                            , { field: 'HMTONo', title: '计划跟踪号', width: 100 }
                                            , { field: 'HWHID', title: 'ck', width: 100 }
                                        ]]
                                        //, height: 500
                                    })
                                    //显示表体明细
                                    DisBillEntryList();
                                    //table.render({
                                    //    elem: '#wl-table'
                                    //    , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                                    //    , cellMinWidth: 80
                                    //    //, toolbar: '#toolbarDemo'
                                    //    , page: true
                                    //    , limit: 100
                                    //    , defaultToolbar: []
                                    //    , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                                    //    , cols: [[
                                    //        { type: 'radio' }
                                    //        , { field: 'HQty', title: '数量', width: 80 }
                                    //        , { field: 'HAuxQty', title: '辅助数量', width: 80 }
                                    //        , { field: 'HQtyMust', title: '应收数量', width: 80 }
                                    //        , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                                    //        , { field: 'HMaterName', title: '物料名称', width: 150 }
                                    //        , { field: 'HMaterModel', title: '规格型号', width: 100 }
                                    //        , { field: 'HSourceInterID', title: '源单主内码', width: 100 }
                                    //        , { field: 'HSourceEntryID', title: '源单子内码', width: 100 }
                                    //        , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                                    //        , { field: 'HBatchNo', title: '批次', width: 100 }
                                    //        , { field: 'HAuxPropID', title: '辅助属性', width: 100 }
                                    //        , { field: 'HMTONo', title: '计划跟踪号', width: 100 }
                                    //        , { field: 'HWHID', title: 'ck', width: 100 }
                                    //    ]]
                                    //    //, height: 500
                                    //})
                                }
                                else {
                                    layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
@@ -1461,8 +1740,9 @@
                    //}
                    //
                    $.ajax({
                        url: GetWEBURL() + "/WEBSController/Get_BarCode_Json",
                        type: "GET",
                        url: GetWEBURL() + "/WEBSController/Get_BarCode_Json",
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": sBillType, "HBillNo": sBillNo, "HMaker": sMaker, "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sQty, "HRedBlueFlag": false, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockOrgID": sessionStorage["OrganizationID"], "HScanStyle": HScanStyle, "HCustom1": "", "HCustom2": "" },
                        //url: GetWEBURL() + "/SellOut/get_CheckTypeByBarCode_Json",
                        //type: "GET",
@@ -1541,169 +1821,105 @@
                                        element.tabChange('tab-SellOutBill', '3');
                                    }
                                    else {
                                        //$("#HSupName").val(result.data.HSupName);
                                        //$("#HSupID").val(result.data.HSupID);
                                        //$("#HDeptName").val(result.data.HDeptName);
                                        //$("#HDeptID").val(result.data.HDeptID);
                                        //$("#HSourceBillNo").val(result.data.HSourceBillNo);
                                        HSourceFlag = true;
                                        //获取源单类型、源单单号
                                        //if (result.data.HSourceBillType == "1402") {
                                        //    $("#HBillType").val("1402");
                                        //}
                                        //else if (result.data.HSourceBillType == "1401") {
                                        //    $("#HBillType").val("1401");
                                        //}
                                        //else if (result.data.HSourceBillType == "1601") {
                                        //    $("#HBillType").val("1601");
                                        //}
                                        $("#HNote").val(";物料条码");
                                        element.tabChange('tab-SellOutBill', '3');
                                    }
                                }
                                //$("#HSupID").val(result.data.HSupID);
                                //$("#HSupName").val(result.data.HSupName);
                                //$("#HDeptID").val(result.data.HDeptID);
                                //$("#HDeptName").val(result.data.HDeptName);
                                //显示表体明细
                                DisBillEntryList();
                                //$.ajax({
                                //    url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
                                //    type: "GET",
                                //    data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: sBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
                                //    success: function (result) {
                                //        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                //            listOption.data = result.data.list;
                                //            table.render(listOption);
                                //            listOption1.data = result.data.list2;
                                //            table.render(listOption1);
                                //table.render({
                                //    elem: '#wl-table'
                                //    , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                                //    , toolbar: '#toolbarDemo'
                                //    , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                                //    , cols: [[
                                //        { type: 'radio' }
                                //        , { field: 'HSNO', title: '序号', width: 60 }
                                //        , { field: 'HQty', title: '数量', width: 80 }
                                //        , { field: 'HAuxQty', title: '辅助数量', width: 80 }
                                //        , { field: 'HQtyMust', title: '应发数量', width: 80 }
                                //        , { field: 'HMaterName', title: '物料名称', width: 90 }
                                //        , { field: 'HMaterNumber', title: '物料代码', width: 90 }
                                //        , { field: 'HMaterModel', title: '规格型号', width: 90 }
                                //        , { field: 'HSourceInterID', title: '源单主内码', width: 90 }
                                //        , { field: 'HSourceEntryID', title: '源单子内码', width: 90 }
                                //        , { field: 'HSourceBillNo', title: '源单单号', width: 90 }
                                //        , { field: 'HBatchNo', title: '批次', width: 90 }
                                //    ]]
                                //    , height: 500
                                //    , done: function () {
                                //            //console.log(result.data.list2);
                                //            var count = 0;
                                //            var count1 = 0;
                                //            for (var i = 0; i < result.data.list.length; i++) {
                                //                count += result.data.list[i].HQty;
                                //                count1 += result.data.list[i].HPieceQty;
                                //            }
                                //            $("#HSumQtys").val(count);
                                //            $("#HBarCodeQtys").val(count1);
                                //            //return;
                                //        }
                                //        else {
                                //            layer.msg(result.Message);
                                //        }
                                //        layer.closeAll("loading");
                                //    }
                                //});
                                $.ajax({
                                    url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
                                    type: "GET",
                                    data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: sBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
                                    success: function (result) {
                                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                            listOption.data = result.data.list;
                                            table.render(listOption);
                                            listOption1.data = result.data.list2;
                                            table.render(listOption1);
                                            //console.log(result.data.list2);
                                            var count = 0;
                                            var count1 = 0;
                                            for (var i = 0; i < result.data.list.length; i++) {
                                                count += result.data.list[i].HQty;
                                                count1 += result.data.list[i].HPieceQty;
                                            }
                                            $("#HSumQtys").val(count);
                                            $("#HBarCodeQtys").val(count1);
                                            //return;
                                        }
                                        else {
                                            layer.msg(result.Message);
                                        }
                                        layer.closeAll("loading");
                                    }
                                });
                                //var count = 0;
                                //var count1 = 0;
                                //for (var i = 0; i < result.data.length; i++) {
                                //    count += result.data.HQty;
                                //    count1 += result.data.HPieceQty;
                                //}
                                //$("#HSumQtys").val(count);
                                //$("#HBarCodeQtys").val(count1);
                                playSound1();
                                //清空数量
                                $("#HQty").val("");
                            }
                            else {
                                // $("#verifycode").click();
                                //layer.msg(result.Message, { icon: 5 });
                                //
                                playSound();
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                //11
                            }
                            layer.closeAll("loading");
                        },
                        error: function (err) {
                            playSound();
                            layer.msg("接口请求失败!" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            //11
                        }
                    });
                }
            }
            //#endregion
            //#region æ˜¾ç¤ºç‰©æ–™åˆ—表信息
            var listOption = {
                elem: '#wl-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , limit: 3000
                , totalRow: true
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HSNO', title: '序号', width: 60 }
                    , { field: 'HQty', title: '数量', width: 80, totalRow: true }
                    , { field: 'HAuxQty', title: '辅助数量', width: 80, totalRow: true }
                    , { field: 'HQtyMust', title: '应发数量', width: 80 }
                    , { field: 'HMaterName', title: '物料名称', width: 90 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 90 }
                    , { field: 'HMaterModel', title: '规格型号', width: 90 }
                    , { field: 'HSourceInterID', title: '源单主内码', width: 90 }
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 90 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 90 }
                    , { field: 'HBatchNo', title: '批次', width: 90 }
                    , { field: 'HPieceQty', title: '条码数量', width: 150 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            function DisBillEntryList() {
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var HBillType = '1205'
                var sHStockOrgID = sessionStorage["OrganizationID"];
                //刷新列表信息
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": sHStockOrgID },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            listOption.data = result.data.Materlist;
                            table.render(listOption);
                            FIFOlistOption.data = result.data.FIFOlist;
                            table.render(FIFOlistOption);
                            //console.log(result.data.list2);
                            var count = 0;
                            var count1 = 0;
                            for (var i = 0; i < result.data.Materlist.length; i++) {
                                count += result.data.Materlist[i].HQty;
                                count1 += result.data.Materlist[i].HPieceQty;
                            }
                            $("#HSumQtys").val(count);
                            $("#HBarcodeQtys").val(count1);
                            //return;
                        }
                        else {
                            layer.msg(result.Message);
                        }
                        layer.closeAll("loading");
                    }
                });
            }
            var listOption1 = {
                elem: '#mx-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HQty', title: '数量', width: 150, totalRow: true }
                    , { field: 'HQtyMust', title: '应发数量', width: 150 }
                    , { field: 'HBarCode', title: '条码编号', width: 150 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HBatchNo', title: '批号', width: 150 }
                    //, { field: 'HSourceInterID', title: '源单主内码', width: 150 }
                    //, { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            }
            //#endregion
            function playSound() {
                console.log("playSound");
                //var audio = document.getElementById("cs");
@@ -1724,100 +1940,7 @@
                var audio = document.getElementById("cs2");
                audio.play();
            }
            //扫源单
            function GetMeesageBySourceBillNo(obj) {
                var HSourceBillNo = $('#HSourceBillNo').val()
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var HSourceBillType = $("#HBillType").val()
                var HBillType = '1205'
                var HWHID_FIFO = $("#HWHID_FIFO").val();//先进先出仓库ID
                var sMouldManagerCtl = 'N'
                var sFIFOCtl = 'N'
                if (HSourceBillNo == "" || sInterID <= 0) {
                    layer.msg("源单号为空,或者内码不存在!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                $.ajax({
                    url: GetWEBURL() + "/SellOut/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                    type: "GET",
                    data: { sInterID: sInterID, sBillNo: sBillNo, HBillType: '1205', "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            //GetSellOutFindSP();
                            $("#HSupID").val(result.data[0].HSupID);
                            $("#HSupName").val(result.data[0].HSupName);
                            //$("#HDeptID").val(result.data[0].HDeptID);
                            //$("#HDeptName").val(result.data[0].HDeptName);
                            HSourceFlag = true;
                            element.tabChange('tab-SellOutBill', '2');
                            //扫源单成功后,光标显示到条码上
                            $("#HWHNAME").focus();
                            //table.reload('wl-table', {
                            //    where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                            //});
                            //table.render({
                            //    elem: '#wl-table'
                            //    , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                            //    , toolbar: '#toolbarDemo'
                            //    , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                            //    , cols: [[
                            //        { type: 'radio' }
                            //        , { field: 'HSNO', title: '序号', width: 60 }
                            //        , { field: 'HQty', title: '数量', width: 80 }
                            //        , { field: 'HAuxQty', title: '辅助数量', width: 80 }
                            //        , { field: 'HQtyMust', title: '应发数量', width: 80 }
                            //        , { field: 'HMaterName', title: '物料名称', width: 90 }
                            //        , { field: 'HMaterNumber', title: '物料代码', width: 90 }
                            //        , { field: 'HMaterModel', title: '规格型号', width: 90 }
                            //        , { field: 'HSourceInterID', title: '源单主内码', width: 90 }
                            //        , { field: 'HSourceEntryID', title: '源单子内码', width: 90 }
                            //        , { field: 'HSourceBillNo', title: '源单单号', width: 90 }
                            //        , { field: 'HBatchNo', title: '批次', width: 90 }
                            //    ]]
                            //    , height: 500
                            //    , done: function () {
                            //        layer.closeAll("loading");
                            //    }
                            //});
                            $.ajax({
                                url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
                                type: "GET",
                                data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
                                success: function (result) {
                                    if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                        listOption.data = result.data.list;
                                        table.render(listOption);
                                        listOption1.data = result.data.list2;
                                        table.render(listOption1);
                                        //console.log(result.data.list2);
                                        var count = 0;
                                        var count1 = 0;
                                        for (var i = 0; i < result.data.list.length; i++) {
                                            count += result.data.list[i].HQty;
                                            count1 += result.data.list[i].HPieceQty;
                                        }
                                        $("#HSumQtys").val(count);
                                        $("#HBarCodeQtys").val(count1);
                                        //return;
                                    }
                                    else {
                                        layer.msg(result.Message);
                                    }
                                    layer.closeAll("loading");
                                }
                            });
                            $("#HSourceBillNo").attr("disabled", "true");
                        }
                        else {
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    }
                });
            }
        });
@@ -1832,8 +1955,8 @@
        }
        function GetHFIFOWHNAMEValue(obj)  //返回先进先出仓库
        {
            $("#HWHNAME_FIFO").val(obj[0].HName);
            $("#HWHID_FIFO").val(obj[0].HItemID);
            $("#HFIFOWHNAME").val(obj[0].HName);
            $("#HFIFOWHID").val(obj[0].HItemID);
        }
        function GetHSpValue(obj) {  //返回调入仓位
            $("#HStockPlaceName").val(obj[0].HName);
WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill_FastList.html
@@ -138,24 +138,41 @@
            //window.close();//关闭当前页
        })
        //编辑
        form.on('submit(cmdModify)', function () {
            var checkStatus = table.checkStatus('dj-table')
                     , data = checkStatus.data;
            //ajaxLabelData = data;
            //layer.alert(rows);
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '销售出库单'
                , shade: 0.6 //遮罩透明度
                , maxmin: false //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../领料发货/销售出库/Kf_SellOutBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
                , resize: false
                , cancel: function () {
                    $(".layui-btn").removeClass("layui-btn-disabled");
                , data = checkStatus.data;
            $.ajax({
                type: "GET",
                url: GetWEBURL() + "/WEBSController/TempList_Modify_Json",
                async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                data: { "HInterID": data[0].HInterID, "HBillNo": data[0].HBillNo, "HBillType": sBillType },
                success: function (result) {
                    if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                        layer.open({
                            type: 2
                            , area: ['100%', '100%']
                            , title: '销售出库单'
                            , shade: 0.6 //遮罩透明度
                            , maxmin: false //允许全屏最小化
                            , anim: 0 //0-6的动画形式,-1不开启
                            , content: ['../../领料发货/销售出库/Kf_SellOutBill_Fast.html?OperationType=2&HInterID=' + data[0].HInterID, 'yes']
                            //, content: ['../../领料发货/销售出库/Kf_SellOutBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
                            , resize: false
                            , cancel: function () {
                                $(".layui-btn").removeClass("layui-btn-disabled");
                            }
                        })
                    }
                    else {
                        layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
                },
                error: function (err) {
                    layer.msg("错误" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                }
            })
            });
        });
        form.on('submit(cmdRefresh)', function () {//刷新