1
yusijie
2023-06-29 6bfd1f54a60e0ebcec5541c53e048b5da27087f9
1
17个文件已修改
2个文件已添加
5627 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 2762 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/home/console.html 247 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/indexMenu.html 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html 740 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/仓存管理/仓库调拨/Kf_MoveStockBill_FastList.html 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/系统管理/快捷方式自定义/Xt_UserFastMenu.html 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/系统管理/菜单自定义/Xt_DefineMenuDisplay.html 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序进站接收单/Cj_StationInBillList.html 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/Kf_MaterOutEntryReport_Cloth.html 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/销售出库/Kf_SellOutBill_CheckList_New.html 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/销售出库/Kf_SellOutBill_Check_New.html 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/销售出库/Kf_SellOutBill_Fast.html 1220 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/销售出库/Kf_SellOutBill_FastList.html 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
Diff too large
WebTM/WebTM.csproj
@@ -209,7 +209,9 @@
    <Content Include="views\基础资料\公用基础资料\xmlLBM_Sc_ProcExchRecordBackBillList.aspx" />
    <Content Include="views\条码明细\Kf_BarCodeDetailQuery.html" />
    <Content Include="views\生产管理\日计划基础资料\Cg_PODemandPlanConfigBill_Excel.html" />
    <Content Include="views\系统管理\快捷方式自定义\Xt_UserFastMenu.html" />
    <Content Include="views\系统管理\按钮设置\Xt_ModuleButtonSet.html" />
    <Content Include="views\系统管理\菜单自定义\Xt_DefineMenuDisplay.html" />
    <Content Include="views\计划管理\工艺路线\Gy_RoutingBillListQuery.html" />
    <Content Include="views\车间管理\工序流转卡\Sc_ProcessExchangeBill_Change.html" />
    <Content Include="views\车间管理\工序流转卡\Sc_ProcessExchangeBill_Copy_PL.html" />
WebTM/WebTM.csproj.user
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <NameOfLastUsedPublishProfile>JFTM</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\GIT仓库\MESWMS-LayUI\WebTM\Properties\PublishProfiles\JFTM.pubxml</NameOfLastUsedPublishProfile>
    <ProjectView>ProjectFiles</ProjectView>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>true</UseIISExpress>
WebTM/layuiadmin/Scripts/webConfig.js
@@ -3,7 +3,7 @@
    //var WEBURL = "http://192.168.16.80:8011/";          //办公室服务器
    //var WEBURL = "http://localhost:8081/SWEAPI/";       //ch本地*/
    //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
    //var WEBURL = "http://localhost/API/";   //颜晓军本地配置
    var WEBURL = "http://localhost/API/";   //颜晓军本地配置
    //var WEBURL = "http://localhost/WEBAPI/";   //颜家台式机本地配置
    //var WEBURL = "http://localhost:8082/lubao";   //颜晓军本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //杨乐本地配置
WebTM/views/home/console.html
@@ -3,6 +3,7 @@
<!DOCTYPE html>
<html>
<head>
    <
    <meta charset="utf-8">
    <title>控制台主页一</title>
    <meta name="renderer" content="webkit">
@@ -10,9 +11,28 @@
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
    <style id="LAY_layadmin_theme">
        .layui-side-menu, .layadmin-pagetabs .layui-tab-title li:after, .layadmin-pagetabs .layui-tab-title li.layui-this:after, .layui-layer-admin .layui-layer-title, .layadmin-side-shrink .layui-side-menu .layui-nav > .layui-nav-item > .layui-nav-child {
            background-color: #20222A !important;
        }
        .layui-nav-tree .layui-this, .layui-nav-tree .layui-this > a, .layui-nav-tree .layui-nav-child dd.layui-this, .layui-nav-tree .layui-nav-child dd.layui-this a {
            background-color: #009688 !important;
        }
        .layui-layout-admin .layui-logo {
            background-color: #20222A !important;
        }
        .FastMenu {
        }
    </style>
    <script>
        /^http(s*):\/\//.test(location.href) || alert('请先部署到 localhost ä¸‹å†è®¿é—®');
    </script>
</head>
<body layadmin-themealias="default">
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md8">
@@ -23,114 +43,8 @@
                            <div class="layui-card-header">快捷方式</div>
                            <div class="layui-card-body">
                                <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="width: 100%; height: 280px;">
                                    <div carousel-item="">
                                        <ul class="layui-row layui-col-space10 layui-this">
                                            <li class="layui-col-xs3">
                                                <a lay-href="生产管理/生产任务单/Sc_ICMOBillList.html">
                                                    <i class="layui-icon layui-icon-add-circle"></i>
                                                    <cite>生产订单维护</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a lay-href="车间管理/工序流转卡/Sc_ProcessExchangeIssueBillList.html">
                                                    <i class="layui-icon layui-icon-mike"></i>
                                                    <cite>工序流转卡(下达)</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a lay-href="车间管理/工序流转卡/Sc_ProcessSendWorkList.html">
                                                    <i class="layui-icon layui-icon-android"></i>
                                                    <cite>派工单维护</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a lay-href="车间管理/工序出站汇报单/Cj_StationOutBillList.html">
                                                    <i class="layui-icon layui-icon-chart"></i>
                                                    <cite>工序出站汇报单维护</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a lay-href="仓存管理/条码生成/Gy_BarCodeBill.html">
                                                    <i class="layui-icon layui-icon-app"></i>
                                                    <cite>条码生成</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a lay-href="车间管理/工序出站汇报单/Cj_StationOutBill.html">
                                                    <i class="layui-icon layui-icon-theme"></i>
                                                    <cite>报工新增</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a lay-href="模治具管理/模治具管理/Gy_BarCodeBillList.html">
                                                    <i class="layui-icon layui-icon-addition"></i>
                                                    <cite>条码主档维护</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a lay-href="基础资料/公用基础资料/Gy_Material.html">
                                                    <i class="layui-icon layui-icon-release"></i>
                                                    <cite>物料列表</cite>
                                                </a>
                                            </li>
                                        </ul>
                                        <ul class="layui-row layui-col-space10">
                                            <li class="layui-col-xs3">
                                                <a href="../仓存管理/仓库调拨/Cc_LookingForReturnBill.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-at"></i>
                                                    <cite>上架归还单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../车间管理/工序流转/MES_StationInBill_PDA.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-auz"></i>
                                                    <cite>工序进站接收单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../车间管理/工序流转/MES_StationOutBill_PDA.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-bluetooth"></i>
                                                    <cite>工序出站汇报单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../车间管理/委外工序发出单/Cj_StationEntrustInBill.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-carousel"></i>
                                                    <cite>委外工序发出单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../生产管理/生产拆箱单/Sc_PackSplitBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-cellphone"></i>
                                                    <cite>生产拆箱单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../质量管理/来料检验单/Kf_QCStockInCheckBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-diamond"></i>
                                                    <cite>来料检验单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../领料发货/收料入库/Kf_ReciveBill_Fast_AR.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-dollar"></i>
                                                    <cite>到货确认(安瑞)</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../生产管理/生产汇报单/Sc_ICMOReportBill_FastNew.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-dollar"></i>
                                                    <cite>生产汇报单</cite>
                                                </a>
                                            </li>
                                            <!--<li class="layui-col-xs3">
                                                <a lay-href="set/user/info.html">
                                                    <i class="layui-icon layui-icon-set"></i>
                                                    <cite>我的资料</cite>
                                                </a>
                                            </li>-->
                                        </ul>
                                    </div>
                                    <!--快捷方式-->
                                    <div class="FastMenu" carousel-item=""></div>
                                    <div class="layui-carousel-ind"><ul><li class="layui-this"></li><li class=""></li></ul></div><button class="layui-icon layui-carousel-arrow" lay-type="sub"></button><button class="layui-icon layui-carousel-arrow" lay-type="add"></button>
                                </div>
                            </div>
@@ -422,29 +336,106 @@
    </div>
    <script src="../../layuiadmin/layui/layui.js?t=1"></script>
    <script src="../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script>
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'console']);
        }).use(['index', 'form', 'laydate', 'table', 'element', 'console'], function () {
            var $ = layui.$;
            var element = layui.element;
            var $ = layui.jquery;
            //#region   é¡µé¢åˆå§‹åŒ–
            set_ClearBill();
            //#endregion
            //#region   é¡µé¢åˆå§‹åŒ–方法
            function set_ClearBill() {
                get_Display();
            }
            //#endregion
            //#region   é¡µé¢å…¶å®ƒæ–¹æ³•
            function get_Display() {
                //获取菜单列表数据
                $.ajax({
                    url: "http://localhost:8082/API//Web/Xt_UserFastMenu_Init",
                    type: "GET",
                    async: false,
                    data: { "HMakeName": sessionStorage["HUserName"] },
                    success: function (data) {
                        console.log(data.data);
                        FastMenu(data.data);
                    },
                    error: function (data) {
                        layer.alert("发生错误!", { icon: 5 });
                    }
                });
            }
            function FastMenu(data) {
                var liStr = '';
                //遍历生成主菜单
                for (var i = 0; i < data.length; i++) {
                    if (i == 0) {
                        liStr += '<ul class="layui-row layui-col-space10 layui-this">';
                    } else if (i % 8 == 0) {
                        liStr += '<ul class="layui-row layui-col-space10">';
                    }
                    liStr += '<li class="layui-col-xs3">';
                    if (data[i]["HPicNum"] == null || data[i]["HPicNum"] == "") {
                        liStr += '<i id="' + data[i]["HSubFuncID"] +'" class="layui-icon layui-icon-add-circle"></i>';
                    } else {
                        liStr += '<i class="layui-icon ' + data[i]["HPicNum"] + '"></i>';
                    }
                    liStr += '<a lay-href="' + data[i]["Hurl"] + '">';
                    liStr += '<cite>' + data[i]["HCaption"] + '</cite>';
                    liStr += '</a>';
                    liStr += '</li>';
                    if (i % 8 == 7) {
                        liStr += '</ul>';
                    }
                };
                if (data.length % 8 == 0) {
                    liStr += '<ul class="layui-row layui-col-space10">';
                    liStr += '<li class="layui-col-xs3">';
                    liStr += '<a lay-href="系统管理/快捷方式自定义/Xt_UserFastMenu.html">';
                    liStr += '<i class="layui-icon layui-icon-add-circle"></i>';
                    liStr += '<cite>快捷方式自定义</cite>';
                    liStr += '</a>';
                    liStr += '</li>';
                    liStr += '</ul>';
                } else {
                    liStr += '<li class="layui-col-xs3">';
                    liStr += '<a lay-href="系统管理/快捷方式自定义/Xt_UserFastMenu.html">';
                    liStr += '<i class="layui-icon layui-icon-add-circle"></i>';
                    liStr += '<cite>快捷方式自定义</cite>';
                    liStr += '</a>';
                    liStr += '</li>';
                    liStr += '</ul>';
                }
                $(".FastMenu").html(liStr);
                element.init();
                for (var i = 0; i < data.length; i++) {
                    var item = document.getElementById(data[i]["HSubFuncID"]);
                    item.addEventListener("click", function (event) {
                    }, false);
                }
            }
            //#endregion
        });
    </script>
    <style id="LAY_layadmin_theme">
        .layui-side-menu, .layadmin-pagetabs .layui-tab-title li:after, .layadmin-pagetabs .layui-tab-title li.layui-this:after, .layui-layer-admin .layui-layer-title, .layadmin-side-shrink .layui-side-menu .layui-nav > .layui-nav-item > .layui-nav-child {
            background-color: #20222A !important;
        }
        .layui-nav-tree .layui-this, .layui-nav-tree .layui-this > a, .layui-nav-tree .layui-nav-child dd.layui-this, .layui-nav-tree .layui-nav-child dd.layui-this a {
            background-color: #009688 !important;
        }
        .layui-layout-admin .layui-logo {
            background-color: #20222A !important;
        }
    </style>
</body>
</html>
</html>
WebTM/views/indexMenu.html
@@ -48,7 +48,11 @@
                    </li>
                </ul>
                <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:void(0);">
                            <cite id="MenuDefineID">菜单自定义</cite>
                        </a>
                    </li>
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:void(0);">
                            <!--<a lay-href="app/message/index.html" layadmin-event="message" lay-text="消息中心">-->
@@ -181,31 +185,46 @@
            //        icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
            //    }, function () { window.location.href = "user/login.html"; });
            //}
            //判断用户是移动端还是PC端
            var judgeMorPCflag = judgeMorPC();
            if (!judgeMorPCflag) {//移动端
                var dd = '<dd><a href="车间管理/工序流转/MES_StationInBill_PDA.html">工序进站接收单PDA</a ></dd > <dd><a href="车间管理/工序流转/MES_StationOutBill_PDA.html">工序出站汇报单PDA</a></dd>';
                $("#append").prepend(dd);
            }
            if (!judgeMorPCflag) {//移动端
                window.location.href = 'index_Mobile.html'
            }
            //获取菜单列表数据
            $.ajax({
                url: GetWEBURL() + "/Web/MenuList",
                type: "GET",
                async: false,
                success: function (data) {
                    var data = JSON.parse(data.data);
                    console.log(data);
                    MenuMain(data);
                },
                error: function (data) {
                    layer.alert("发生错误!", { icon: 5 });
            //#region é¡µé¢åˆå§‹åŒ–
            set_sideMenuDisPlay();
            //#endregion
            //#region
            //#endregion
            //#region é¡µé¢å…¶å®ƒæ–¹æ³•
            //显示侧边菜单
            function set_sideMenuDisPlay() {
                //判断用户是移动端还是PC端
                var judgeMorPCflag = judgeMorPC();
                if (!judgeMorPCflag) {//移动端
                    var dd = '<dd><a href="车间管理/工序流转/MES_StationInBill_PDA.html">工序进站接收单PDA</a ></dd > <dd><a href="车间管理/工序流转/MES_StationOutBill_PDA.html">工序出站汇报单PDA</a></dd>';
                    $("#append").prepend(dd);
                }
            });
                if (!judgeMorPCflag) {//移动端
                    window.location.href = 'index_Mobile.html'
                }
                //获取菜单列表数据
                $.ajax({
                    url: GetWEBURL() + "/Web/MenuList",
                    type: "GET",
                    async: false,
                    data: { "HMakeName": sessionStorage["HUserName"] },
                    success: function (data) {
                        var data = JSON.parse(data.data);
                        console.log(data);
                        MenuMain(data);
                    },
                    error: function (data) {
                        layer.alert("发生错误!", { icon: 5 });
                    }
                });
            }
            //遍历生成主菜单
            function MenuMain(data) {
                
@@ -248,8 +267,31 @@
                }
                return subStr;
            }
            //菜单自定义:弹出菜单自定义子页面
            Ul = document.getElementById("MenuDefineID");
            Ul.addEventListener("click", function (event) {
                layer.open({
                    type: 2
                    , area: ['90%', '90%']
                    , title: '菜单自定义'
                    , closeBtn: 1
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: '系统管理/菜单自定义/Xt_DefineMenuDisplay.html'
                    , resize: false
                    , btn: ["确定"]
                    , end: function () {
                        //刷新页面,
                        location.reload();
                    }
                })
            }, false);
            //#endregion
        });
        document.getElementById('UserName').innerHTML = sessionStorage["HUserName"];
        document.getElementById('Organization').innerHTML = sessionStorage["Organization"];
WebTM/views/²Ö´æ¹ÜÀí/²Ö¿âµ÷²¦/Kf_MoveStockBill_Fast.html
@@ -52,8 +52,8 @@
                            <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;min-width: 35px;">汇总</li>
                            <!--<li lay-id="5" style="padding:1px;">库存信息</li>
                            <li lay-id="6" style="padding:1px;min-width: 35px;">汇总</li>-->
                        </ul>
                        <div class="layui-tab-content">
                            <!--选择源单-->
@@ -93,7 +93,7 @@
                                <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="HFIFOWHNAME" id="HFIFOWHNAME" lay-verify="HFIFOWHNAME" autocomplete="off" class="layui-input">
@@ -346,13 +346,13 @@
                                <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="fj-table-qd" lay-filter="fj-table-qd"></table>
                            </div>
                            </div>-->
                        </div>
                        <!--<div class="layui-form-item" style="margin-bottom: 20px;">
            <div class="layui-row">
@@ -410,7 +410,86 @@
                , table = layui.table
                , form = layui.form
                , element = layui.element;
            var HInterID = $('#HInterID').val()
            var HBillNo = $('#HBillNo').val()
            var HBillType = '1207'
            var HMaker = sessionStorage["HUserName"]
            var HSourceFlag = sessionStorage["SourceFlag"];
            var OperationType = 0;//操作类型
            var option = [];
            $("#HSourceBillNo").focus();
            var listOption = {
                elem: '#wl-table'
                , toolbar: '#toolbarDemo'
                , cellMinWidth: 90
                , limit: 3000
                , totalRow: true
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HQty', title: '数量', width: 150, totalRow: true }
                    , { field: 'HQtyMust', title: '应收数量', width: 150, totalRow: true }
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HAuxPropName', title: '辅助属性', width: 150 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    //, { field: 'HBatchNo', title: '批次', width: 150, hide: true }
                    , { field: 'HPieceQty', title: '条码数量', width: 150, totalRow: true }
                    , { field: 'HMaterID', title: 'HMaterID', width: 150, hide: true }
                    , { field: 'HAuxPropID', title: 'HAuxPropID', width: 150, hide: true }
                    , { field: 'HSourceInterID', title: 'HSourceInterID', width: 150, hide: true }
                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 150, hide: true }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                ]]
                , 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, totalRow: true }
                    , { 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 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            }
            //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
            //$("#HSCWHID").val(sessionStorage["HWHID"]);
@@ -438,16 +517,14 @@
            $("#HStockInOrgID").val(sessionStorage["OrganizationID"]);
            $("#HStockInOrgName").val(sessionStorage["Organization"]);
            $("#HBillSubType").val(sessionStorage["HBillSubType"]);
            var HSourceFlag = sessionStorage["SourceFlag"];
            //判断是否登录 æœªç™»å½•则跳到登录页
            //if (sessionStorage.login != "login") {
            //    layer.confirm("登录失效,请重新登录!", {
            //        icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
            //    }, function () { window.location.href = "../../user/login.html"; });
            //}
            if (sessionStorage.login != "login") {
                layer.confirm("登录失效,请重新登录!", {
                    icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
                }, function () { window.location.href = "../../user/login.html"; });
            }
            //获取参数
            function getUrlVars() {
@@ -460,32 +537,58 @@
                }
                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 HSourceBillType = params[params[1]]; //用于判断源单类型
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            var OperationType = params[params[0]];  //从缓存列表中返回数据类型  1新增  2从缓存列表中返回
            var HInterID_Temp = params[params[1]];  //从缓存列表中返回单据ID
            var HSourceBillType = params[params[2]]; //用于判断源单类型
            //判断是否新增
            if (linterid == null || linterid == 0) {
                //获取最大单据号 new
                $("#HInterID").val("");
                $("#HBillNo").val("");
            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({
                    url: GetWEBURL() + "/Web/GetMAXNumPDA",
                    type: "GET",
                    data: { "HBillType": '1207' },
                    url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HBillType": HBillType },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        if (d.count == 1) {
                            $("#HInterID").val(d.data[0].HInterID);
                            $("#HBillNo").val(d.data[0].HBillNo);
                            HInterID = $('#HInterID').val()
                            HBillNo = $('#HBillNo').val()
                        }
                        else {
                            layer.msg(d.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }
                });
                //获取单据子类型
                var HBillSubType = '';
                var HStockOutOrgID = $("#HStockOutOrgID").val()//调出组织
                $.ajax({
                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
                    type: "GET",
                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HBillType": '1207', "HStockOrgID": HStockOutOrgID },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -502,43 +605,17 @@
                        layer.closeAll("loading");
                    }
                })
            }
            else {//如果修改则走下面 new
                RoadBillMain(linterid);
                RoadBillSub(linterid);
                HSourceFlag = false;
            }
            if (HSourceBillType == 1402) { //发货通知单
                $("#HBillType").val(1402);
            } else if (HSourceBillType == 1243) { //调拨申请单
                $("#HBillType").val(1243);
            } else if (HSourceBillType == 1214) { //生产发料通知单
                $("#HBillType").val(1214);
            } else if (HSourceBillType == 1604) { //委外用料清单
                $("#HBillType").val(1604);
            } else if (HSourceBillType == 1242) { //出库申请单
                $("#HBillType").val(1242);
            } else {
                $("#HBillType").val(-1);
            }
             //直接调拨  æ‰«è°ƒå‡ºä»“库--调入仓库--条码
            if ($("#HBillType").val() == -1) {
                element.tabChange('tab-MoveStockBill', '2');
                $("#HSCWHNAME").focus();//调出仓库
            }
            function RoadBillMain(linterid)//加载表头
            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);
@@ -609,7 +686,7 @@
                            $("#HBillType").attr("readonly", "readonly");
                        }
                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                        $("#HSourceBillNo").attr("disabled","true");
                        $("#HSourceBillNo").attr("disabled", "true");
                        //$("#HSourceBillNo").append.readonly = true;
                        HSourceFlag = true;
                        //$("#HWHID").val(d.data[0].HWhID);
@@ -624,8 +701,9 @@
                var HBillSubType = '';
                var HStockOutOrgID = $("#HStockOutOrgID").val()//调出组织
                $.ajax({
                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
                    type: "GET",
                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HBillType": '1207', "HStockOrgID": HStockOutOrgID },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -642,7 +720,78 @@
            }
            function RoadBillSub(linterid)//加载表体
            ////判断是否新增
            //if (HInterID_Temp == null || HInterID_Temp == 0) {
            //    //获取最大单据号 new
            //    $("#HInterID").val("");
            //    $("#HBillNo").val("");
            //    $.ajax({
            //        url: GetWEBURL() + "/Web/GetMAXNumPDA",
            //        type: "GET",
            //        data: { "HBillType": '1207' },
            //        success: function (d) {
            //            //console.log(d.data);
            //            $("#HInterID").val(d.data[0].HInterID);
            //            $("#HBillNo").val(d.data[0].HBillNo);
            //        }
            //    });
            //    //获取单据子类型
            //    var HBillSubType = '';
            //    var HStockOutOrgID = $("#HStockOutOrgID").val()//调出组织
            //    $.ajax({
            //        url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
            //        type: "GET",
            //        data: { "HBillType": '1207', "HStockOrgID": HStockOutOrgID },
            //        success: function (result) {
            //            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
            //                var data = result.data;
            //                for (var i = 0; i < data.length; i++) {
            //                    HBillSubType += '<option value="' + data[i].HNumber + '">' + data[i].HName + '</option>';
            //                }
            //                $("#HBillSubType").append(HBillSubType);
            //                if (HSourceBillType == 1402) { //发货通知单
            //                    $("#HBillSubType").val("ZJDB02_SYS"); //单据类型默认为寄售
            //                }
            //                form.render('select');
            //            }
            //            layer.closeAll("loading");
            //        }
            //    })
            //}
            //else {//如果修改则走下面 new
            //    RoadBillMain(HInterID_Temp);
            //    RoadBillSub(HInterID_Temp);
            //}
            if (HSourceBillType == 1402) { //发货通知单
                $("#HBillType").val(1402);
            } else if (HSourceBillType == 1243) { //调拨申请单
                $("#HBillType").val(1243);
            } else if (HSourceBillType == 1214) { //生产发料通知单
                $("#HBillType").val(1214);
            } else if (HSourceBillType == 1604) { //委外用料清单
                $("#HBillType").val(1604);
            } else if (HSourceBillType == 1242) { //出库申请单
                $("#HBillType").val(1242);
            } else {
                $("#HBillType").val(-1);
            }
             //直接调拨  æ‰«è°ƒå‡ºä»“库--调入仓库--条码
            if ($("#HBillType").val() == -1) {
                element.tabChange('tab-MoveStockBill', '2');
                $("#HSCWHNAME").focus();//调出仓库
            }
            function RoadBillSub(HInterID_Temp)//加载表体
            {
                table.render({
                    elem: '#wl-table'
@@ -651,7 +800,7 @@
                    , page: true
                    , limit: 100
                    , defaultToolbar: []
                    , where: { HBillID: linterid, HBillType: '1207', sWhere: '' }
                    , where: { HBillID: HInterID_Temp, HBillType: '1207', sWhere: '' }
                    , cols: [[
                          { type: 'radio' }
                        , { field: 'HQty', title: '数量', width: 150 }
@@ -952,21 +1101,46 @@
            //编辑
            form.on('submit(cmdModify)', function () {//编辑
                var sSubStr = table.cache['wl-table'];
                //if (AllowLoadData(sSubStr) != false) {//非空验证
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '明细列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
                var checkStatus = table.checkStatus('wl-table')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '明细列表'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?HInterID=' + data[0].HInterID + '&HMaterID =' + data[0].HMaterID + '&HBillType =' + data[0].HBillType, 'yes']
                        , resize: false
                        , cancel: function () {
                            //$(".layui-btn").removeClass("layui-btn-disabled");
                        }
                        , end: function () {
                            //显示表体明细
                            DisBillEntryList();
                        }
                    })
                }
                else {
                    layer.msg('请先选择一行记录,进行编辑!');
                }
                //var sSubStr = table.cache['wl-table'];
                ////if (AllowLoadData(sSubStr) != false) {//非空验证
                //layer.open({
                //    type: 2
                //    , area: ['100%', '100%']
                //    , title: '明细列表'
                //    , shade: 0.6 //遮罩透明度
                //    , maxmin: true //允许全屏最小化
                //    , anim: 0 //0-6的动画形式,-1不开启
                //    , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
                //    , resize: false
                //    , cancel: function () {
                //        //$(".layui-btn").removeClass("layui-btn-disabled");
                //    }
                //})
                // }
            });
@@ -1036,7 +1210,7 @@
                    {
                        type: "Get",
                        url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json",
                        async: true,
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "HInterID": sInterID, "HBillType": HBillType },
                        dataType: "json",
                        success: function (data) {
@@ -1072,7 +1246,7 @@
                        {
                            type: "POST",
                            url: GetWEBURL() + "/MoveStockBill/set_SaveMoveStockBill_Json", //方法所在页面和方法名
                            async: true,
                            async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                            data: { "oMain": sMainStr },
                            dataType: "json",
                            success: function (data) {
@@ -1085,7 +1259,10 @@
                                            //window.close();//关闭页面,浏览器有效,PDA无效
                                            parent.location.href = "../../../views/index.html"
                                        }//关闭
                                    }, function () { window.location.reload(); });//新增
                                    }, function () {
                                        //window.location.reload();
                                        location.replace('Kf_MoveStockBill_Fast.html?OperationType=1&HInterID=0');
                                    });//新增
                                }
                                else {
                                    layer.close(index);
@@ -1136,8 +1313,9 @@
                var HFIFOWhID = $("#HFIFOWHID").val()
                var HStockOutOrgID = $("#HStockOutOrgID").val()//调出组织
                $.ajax({
                    url: GetWEBURL() + "/WEBSController/get_SourceBarCode_MoveStock_Json",
                    type: "GET",
                    url: GetWEBURL() + "/WEBSController/get_SourceBarCode_MoveStock_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "HMaker": HMaker, "HFIFOWhID": HFIFOWhID, "HOWNERID": HStockOutOrgID },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -1178,35 +1356,38 @@
                                //扫源单成功后,光标显示到调出仓库上
                                $("#HSCWHNAME").focus();
                            } 
                            $.ajax({
                                url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                                type: "GET",
                                data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
                                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");
                                }
                            });
                            //显示表体明细
                            DisBillEntryList();
                            //$.ajax({
                            //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                            //    type: "GET",
                            //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
                            //    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");
                            //    }
                            //});
                        }
                        else {
                            playSound();
@@ -1275,41 +1456,44 @@
                    }
                    $.ajax(
                        {
                            type: "Get",
                            type: "GET",
                            url: GetWEBURL() + "/ProductIn/Delete_Json",
                            async: true,
                            async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                            data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": '1207', "HBarCode": sBarCode },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                                    $.ajax({
                                        url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                                        type: "GET",
                                        data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
                                        success: function (result) {
                                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                                listOption.data = result.data.Materlist;
                                                table.render(listOption);
                                                FIFOlistOption.data = result.data.FIFOlist;
                                                table.render(FIFOlistOption);
                                    //显示表体明细
                                    DisBillEntryList();
                                                //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");
                                        }
                                    });
                                    //$.ajax({
                                    //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                                    //    type: "GET",
                                    //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
                                    //    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");
                                    //    }
                                    //});
                                    playSound1();
                                    //清空数量
                                    $("#HQty").val("");
@@ -1344,8 +1528,9 @@
                        $('#HQty').val("");
                    }
                    $.ajax({
                        url: GetWEBURL() + "/WEBSController/get_BarCode_MoveStock_Json",
                        type: "GET",
                        url: GetWEBURL() + "/WEBSController/get_BarCode_MoveStock_Json",
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": HBillType, "HBillNo": sBillNo, "HMaker": sMaker, "HWhID": WhID, "HSPID": SPID, "HSCWHID": HSCWhID, "HSCSPID": HSCSPID, "HQty": sQty, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockInOrgID": HStockInOrgID, "HStockOutOrgID": HStockOutOrgID, "HScanStyle": HScanStyle },
                        success: function (result) {
                            if (result.count == 1) {
@@ -1488,34 +1673,38 @@
                                }
                                layer.load(3)
                                $.ajax({
                                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                                    type: "GET",
                                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
                                    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");
                                    }
                                });
                                //显示表体明细
                                DisBillEntryList();
                                //$.ajax({
                                //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                                //    type: "GET",
                                //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
                                //    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");
                                //    }
                                //});
                                playSound1();
                                //清空数量
                                $("#HQty").val("");
@@ -1528,6 +1717,49 @@
                        }
                    });
                }
            }
            //#endregion
            //#region æ˜¾ç¤ºç‰©æ–™åˆ—表信息
            function DisBillEntryList() {
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var HBillType = '1207'
                var HStockOutOrgID = $("#HStockOutOrgID").val()//调出组织
                //刷新列表信息
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
                    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");
                    }
                });
            }
            //#endregion
@@ -1685,40 +1917,43 @@
                            {
                                type: "Get",
                                url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json",
                                async: true,
                                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) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                        //显示表体明细
                                        $.ajax({
                                            url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                                            type: "GET",
                                            data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
                                            success: function (result) {
                                                if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                                    listOption.data = result.data.Materlist;
                                                    table.render(listOption);
                                                    FIFOlistOption.data = result.data.FIFOlist;
                                                    table.render(FIFOlistOption);
                                        DisBillEntryList();
                                                    //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");
                                            }
                                        });
                                        ////显示表体明细
                                        //$.ajax({
                                        //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                                        //    type: "GET",
                                        //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
                                        //    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");
                                        //    }
                                        //});
                                    }
                                    else {
                                        layer.msg(data.Message, { icon: 2 });
@@ -1745,7 +1980,7 @@
                elem: '#mx-table'
                // , url: GetWEBURL() + '/MoveStockBill/GetHBarCodeShowBillSub'
                //, toolbar: '#toolbarDemo'
                // , where: { sMsg: linterid, sMsg2: lentryid }
                // , where: { sMsg: HInterID_Temp, sMsg2: lentryid }
                , cols: [[
                    , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
                ]]
@@ -1799,77 +2034,6 @@
        });
        var listOption = {
            elem: '#wl-table'
            , toolbar: '#toolbarDemo'
            , cellMinWidth: 90
            , limit: 3000
            , totalRow: true
            , cols: [[
                { type: 'radio' }
            , { field: 'HQty', title: '数量', width: 150, totalRow: true }
            , { field: 'HQtyMust', title: '应收数量', width: 150, totalRow: true}
            , { field: 'HMaterNumber', title: '物料代码', width: 150 }
            , { field: 'HMaterName', title: '物料名称', width: 150 }
            , { field: 'HMaterModel', title: '规格型号', width: 150 }
            , { field: 'HAuxPropName', title: '辅助属性', width: 150 }
            , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
            //, { field: 'HBatchNo', title: '批次', width: 150, hide: true }
                , { field: 'HPieceQty', title: '条码数量', width: 150, totalRow: true }
            , { field: 'HMaterID', title: 'HMaterID', width: 150, hide: true }
            , { field: 'HAuxPropID', title: 'HAuxPropID', width: 150, hide: true }
            , { field: 'HSourceInterID', title: 'HSourceInterID', width: 150, hide: true }
            , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 150, hide: true }
            , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
            ]]
            , 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, totalRow: true }
                , { 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 }
                , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
            ]]
            , height: 500
            , done: function () {
                layer.closeAll("loading");
            }
        }
        //以上为layui模块
        
@@ -1986,27 +2150,27 @@
                layer.msg("没有物料明细记录!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if (bnt == 'Saver') {
                if (!typeof (sSubStr) == "undefined") {
                    for (var i = 0; i <= sSubStr.length - 1; i++) {  //判断扫码数量不能大于应收数量
                        if (parseFloat(sSubStr[i].HQtyMust) > 0) {
                            if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
                                layer.msg("数量不能大于应收数量!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                return false;
                            }
                        }
                    }
                    //for (var i = 0; i <= sSubStr.length - 1; i++) {   //判断扫码数量不能为0
                    //    if (parseFloat(sSubStr[i].HQty) == 0) {
                    //        layer.msg("外购入库记录未扫码!", { icon: 5 });
                    //        return false;
                    //    }
                    //}
                }
            }
            else {
                return true;
            }
            //if (bnt == 'Saver') {
            //    if (!typeof (sSubStr) == "undefined") {
            //        for (var i = 0; i <= sSubStr.length - 1; i++) {  //判断扫码数量不能大于应收数量
            //            if (parseFloat(sSubStr[i].HQtyMust) > 0) {
            //                if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
            //                    layer.msg("数量不能大于应收数量!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //                    return false;
            //                }
            //            }
            //        }
            //        //for (var i = 0; i <= sSubStr.length - 1; i++) {   //判断扫码数量不能为0
            //        //    if (parseFloat(sSubStr[i].HQty) == 0) {
            //        //        layer.msg("外购入库记录未扫码!", { icon: 5 });
            //        //        return false;
            //        //    }
            //        //}
            //    }
            //}
            //else {
            //    return true;
            //}
        }
        
    </script>
WebTM/views/²Ö´æ¹ÜÀí/²Ö¿âµ÷²¦/Kf_MoveStockBill_FastList.html
@@ -161,26 +161,40 @@
        //编辑
        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_MoveStockBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes']
                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, '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_MoveStockBill_Fast.html?OperationType=2&HInterID=' + data[0].HInterID + '&HSourceBillType=' + data[0].HSourceBillType, '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 () {//刷新
WebTM/views/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillList.html
@@ -203,6 +203,7 @@
                                <!--<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_Excel" id="Excel"><i class="layui-icon layui-icon-file-b"></i>Excel导入</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get-view" id="view"><i class="layui-icon layui-icon-tips"></i>预览</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get-print" id="print"><i class="layui-icon layui-icon-print"></i>打印</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_export" id="export"><i class="layui-icon layui-icon-export"></i>导出</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>按钮设置</button>
                            </div>
                        </script>
@@ -239,6 +240,8 @@
            var params = getUrlVars();
            var HDeptID = params[params[0]];
            var option = [];
            var ins;                        //用于导出excel
            //判断是否有参数传递
           
@@ -341,6 +344,10 @@
                    //列设置
                    case 'set_HideColumn':
                        get_HideColumn();
                        break;
                    //导出excel
                    case 'get_export':
                        get_Export();
                        break;
                    //按钮设置
                    case 'set_HideButton':
@@ -584,7 +591,7 @@
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            ins = table.render(option);
                            layer.close(ajaxLoad);
                            //刷新按钮显示
@@ -1119,6 +1126,18 @@
                }
            }
            //导出Execel
            function get_Export() {
                table.exportFile(ins.config.id, option.data, "xls");
            }
            //隐藏列设置
            function get_HideColumn() {
                var colName = "";
WebTM/views/ϵͳ¹ÜÀí/¿ì½Ý·½Ê½×Ô¶¨Òå/Xt_UserFastMenu.html
New file
@@ -0,0 +1,172 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Demo</title>
    <!-- è¯·å‹¿åœ¨é¡¹ç›®æ­£å¼çŽ¯å¢ƒä¸­å¼•ç”¨è¯¥ layui.css åœ°å€ -->
    <link href="//unpkg.com/layui@2.8.8/dist/css/layui.css" rel="stylesheet">
</head>
<body>
    <div class="layui-btn-container">
        <button type="button" class="layui-btn layui-btn-sm" lay-on="save">保存</button>
    </div>
    <div id="ID-tree-demo"></div>
    <!-- è¯·å‹¿åœ¨é¡¹ç›®æ­£å¼çŽ¯å¢ƒä¸­å¼•ç”¨è¯¥ layui.js åœ°å€ -->
    <script src="//unpkg.com/layui@2.8.8/dist/layui.js"></script>
    <script src="../../../layuiadmin/Scripts//jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
        layui.use(function () {
            var tree = layui.tree;
            var layer = layui.layer;
            var util = layui.util;
            var $ = layui.$;
            //#region å…¨å±€å˜é‡
            var option = {};                //树组件的渲染参数,保存树组件渲染的信息
            var saveData = [];              //存储用户设置的自定义数据,传递给后端进行保存
            var menuDefineData = [];        //以父子级结构存放树组件的自定义数据,用来赋给option
            //#endregion
            //#region åˆå§‹åŒ–页面
            set_ClearBill();                        //调用初始化界面方法,完成界面的初始化
            //#endregion
            //#region ç›‘听方法
            // æŒ‰é’®äº‹ä»¶
            util.event('lay-on', {
                save: function () {               //保存
                    saveMenuDefineData();
                }
            });
            //#endregion
            //#region å…¶å®ƒæ–¹æ³•
            //#region ç•Œé¢åˆå§‹åŒ–方法
            //初始化界面方法
            function set_ClearBill() {
                set_InitGrid();
                get_Display();
            }
            //#endregion
            //#region æ ‘组件渲染参数的初始化
            //对树组件的渲染参数进行初始化,设置除data以外的其它属性
            function set_InitGrid() {
                option = {
                    elem: '#ID-tree-demo',
                    showCheckbox: true,  // æ˜¯å¦æ˜¾ç¤ºå¤é€‰æ¡†
                    id: 'demo-id-1',
                    isJump: false, // æ˜¯å¦å…è®¸ç‚¹å‡»èŠ‚ç‚¹æ—¶å¼¹å‡ºæ–°çª—å£è·³è½¬
                    click: function (obj) {
                        //var data = obj.data;  //获取当前点击的节点数据
                        //layer.msg('状态:' + obj.state + '<br>节点数据:' + JSON.stringify(data));
                    }
                }
            }
            //#endregion
            //#region ä¿å­˜
            //保存自定义数据:获取树组件中选中的节点信息
            function saveMenuDefineData() {
                var checkedData = tree.getChecked('demo-id-1'); // èŽ·å–é€‰ä¸­èŠ‚ç‚¹çš„æ•°æ®
                saveData = [];                                  //清空保存自定义数据的列表的数据
                getSelectedData(checkedData);                   //将选中的节点的信息以列表的形式保存在saveData中
                //if (saveData.length > 7) {
                //    layer.msg('设置超额,请保证快捷方式低于8个!!');
                //    return;
                //}
                var sMainSub = JSON.stringify(saveData) + ";" + sessionStorage["HUserName"];
                var index = layer.load();
                $.ajax({
                    url: GetWEBURL() +  "/Web/Xt_UserFastMenu_Save",
                    type: "POST",
                    data: { "sMainSub": sMainSub },         //将当前用户和其自定义数据传递给后端,保存到数据库
                    success: function (data) {
                        if (data.count == 1) {
                            layer.close(index);
                            layer.msg("提交成功");
                        }
                        else {
                            layer.close(index);
                            layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (err) {
                        layer.close(index);
                        layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        layer.alert(JSON.stringify(err), { shade: 0 });
                    }
                });
            }
            //将树组件被选中的数据,从父子级结构列表以数组列表形式存放
            function getSelectedData(checkedData) {
                for (var i = 0; i < checkedData.length; i++) {
                    if (checkedData[i].children == null || checkedData[i].children.length == 0) {
                        saveData.push({ "HItemID": checkedData[i].id, "HName": checkedData[i].title });
                    } else {
                        getSelectedData(checkedData[i].children);
                    }
                }
            }
            //#endregion
            //#region æ˜¾ç¤ºç›®å½•的树组件
            //优化自定义菜单显示的实验
            function get_Display() {
                $.ajax({
                    url: GetWEBURL() +  "/Web/Xt_UserFastMenu_Display",
                    type: "GET",
                    async: false,
                    data: { "HMakeName": sessionStorage["HUserName"] },
                    success: function (res) {
                        var dt = res.data.dt;               //菜单清单的全部信息与被选中情况
                        var trees = res.data.tree;          //树组件的根节点
                        menuDefineData = trees;             //获取树组件的根节点,并通过方法getDefineData()递归添加dt中其它的子节点,并设置各节点的选中情况
                        getDefineData(dt, menuDefineData);  //为根节点添加其它子节点的数据
                        option.data = menuDefineData;       //为树组件的渲染参数添加节点数据
                        tree.render(option);                //渲染树组件
                    },
                    error: function (err) {
                    }
                });
            }
            //根据后端传递的菜单清单列表和根目录列表,递归
            function getDefineData(dt, tree) {
                for (var i = 0; i < tree.length; i++) {                     //遍历节点列表,为列表中的各节点添加子节点
                    var children = [];                                      //根节点的子节点属性children由后端传递,为null,所以此处为节点的children赋值为[]
                    for (var j = 0; j < dt.length; j++) {                   //遍历菜单清单列表,寻找当前节点的子节点
                        if (tree[i].id == dt[j].HPartentID && dt[j].HitemID != dt[j].HPartentID) {      //判断dt中当下数据是否为当前节点的子节点的数据
                            var item = { "id": dt[j].HitemID, "field": dt[j].HitemID, "title": dt[j].HName, "spread": false };
                            if (dt[j].HSelected == true) {
                                item.checked = true;
                            }
                            children.push(item);                            //收集当前节点的子节点
                        }
                    }
                    tree[i].children = children;                            //将收集的子节点列表赋给当前节点的children,即添加当前节点的子节点列表
                    for (var j = 0; j < tree[i].children.length; j++) {
                        getDefineData(dt, tree[i].children);
                    }
                }
            }
            //#endregion
            //#endregion
        });
    </script>
</body>
</html>
WebTM/views/ϵͳ¹ÜÀí/²Ëµ¥×Ô¶¨Òå/Xt_DefineMenuDisplay.html
New file
@@ -0,0 +1,169 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Demo</title>
    <!-- è¯·å‹¿åœ¨é¡¹ç›®æ­£å¼çŽ¯å¢ƒä¸­å¼•ç”¨è¯¥ layui.css åœ°å€ -->
    <link href="//unpkg.com/layui@2.8.8/dist/css/layui.css" rel="stylesheet">
</head>
<body>
    <div class="layui-btn-container">
        <button type="button" class="layui-btn layui-btn-sm" lay-on="save">保存</button>
    </div>
    <div id="ID-tree-demo"></div>
    <!-- è¯·å‹¿åœ¨é¡¹ç›®æ­£å¼çŽ¯å¢ƒä¸­å¼•ç”¨è¯¥ layui.js åœ°å€ -->
    <script src="//unpkg.com/layui@2.8.8/dist/layui.js"></script>
    <script src="../../../layuiadmin/Scripts//jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
        layui.use(function () {
            var tree = layui.tree;
            var layer = layui.layer;
            var util = layui.util;
            var $ = layui.$;
            //#region å…¨å±€å˜é‡
            var option = {};                //树组件的渲染参数,保存树组件渲染的信息
            var saveData = [];              //存储用户设置的自定义数据,传递给后端进行保存
            var menuDefineData = [];        //以父子级结构存放树组件的自定义数据,用来赋给option
            //#endregion
            //#region åˆå§‹åŒ–页面
            set_ClearBill();                        //调用初始化界面方法,完成界面的初始化
            //#endregion
            //#region ç›‘听方法
            // æŒ‰é’®äº‹ä»¶
            util.event('lay-on', {
                save: function () {               //保存
                    saveMenuDefineData();
                }
            });
            //#endregion
            //#region å…¶å®ƒæ–¹æ³•
            //#region ç•Œé¢åˆå§‹åŒ–方法
            //初始化界面方法
            function set_ClearBill() {
                set_InitGrid();
                get_Display();
            }
            //#endregion
            //#region æ ‘组件渲染参数的初始化
            //对树组件的渲染参数进行初始化,设置除data以外的其它属性
            function set_InitGrid() {
                option = {
                    elem: '#ID-tree-demo',
                    showCheckbox: true,  // æ˜¯å¦æ˜¾ç¤ºå¤é€‰æ¡†
                    id: 'demo-id-1',
                    isJump: false, // æ˜¯å¦å…è®¸ç‚¹å‡»èŠ‚ç‚¹æ—¶å¼¹å‡ºæ–°çª—å£è·³è½¬
                    click: function (obj) {
                        //var data = obj.data;  //获取当前点击的节点数据
                        //layer.msg('状态:' + obj.state + '<br>节点数据:' + JSON.stringify(data));
                    }
                }
            }
            //#endregion
            //#region ä¿å­˜
            //保存自定义数据:获取树组件中选中的节点信息
            function saveMenuDefineData() {
                var checkedData = tree.getChecked('demo-id-1'); // èŽ·å–é€‰ä¸­èŠ‚ç‚¹çš„æ•°æ®
                saveData = [];                                  //清空保存自定义数据的列表的数据
                getSelectedData(checkedData);                   //将选中的节点的信息以列表的形式保存在saveData中
                var sMainSub = JSON.stringify(saveData) + ";" + sessionStorage["HUserName"];
                var index = layer.load();
                $.ajax({
                    url: GetWEBURL() + "/Web/SaveMenuDefineSet",
                    type: "POST",
                    data: { "sMainSub": sMainSub },         //将当前用户和其自定义数据传递给后端,保存到数据库
                    success: function (data) {
                        if (data.count == 1) {
                            layer.close(index);
                            layer.msg("提交成功");
                        }
                        else {
                            layer.close(index);
                            layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (err) {
                        layer.close(index);
                        layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        layer.alert(JSON.stringify(err), { shade: 0 });
                    }
                });
            }
            //将树组件被选中的数据,从父子级结构列表以数组列表形式存放
            function getSelectedData(checkedData) {
                for (var i = 0; i < checkedData.length; i++) {
                    saveData.push({ "HItemID": checkedData[i].id, "HName": checkedData[i].title });
                    getSelectedData(checkedData[i].children);
                }
            }
            //#endregion
            //#region æ˜¾ç¤ºç›®å½•的树组件
            //优化自定义菜单显示的实验
            function get_Display() {
                $.ajax({
                    url: GetWEBURL() + "/Web/MenuDefineSet",
                    type: "GET",
                    async: false,
                    data: { "HMakeName": sessionStorage["HUserName"]},
                    success: function (res) {
                        var dt = res.data.dt;               //菜单清单的全部信息与被选中情况
                        var trees = res.data.tree;          //树组件的根节点
                        menuDefineData = trees;             //获取树组件的根节点,并通过方法getDefineData()递归添加dt中其它的子节点,并设置各节点的选中情况
                        getDefineData(dt, menuDefineData);  //为根节点添加其它子节点的数据
                        option.data = menuDefineData;       //为树组件的渲染参数添加节点数据
                        tree.render(option);                //渲染树组件
                    },
                    error: function (err) {
                    }
                });
            }
            //根据后端传递的菜单清单列表和根目录列表,递归
            function getDefineData(dt, tree) {
                for (var i = 0; i < tree.length; i++) {                     //遍历节点列表,为列表中的各节点添加子节点
                    var children = [];                                      //根节点的子节点属性children由后端传递,为null,所以此处为节点的children赋值为[]
                    for (var j = 0; j < dt.length; j++) {                   //遍历菜单清单列表,寻找当前节点的子节点
                        if (tree[i].id == dt[j].HPartentID && dt[j].HitemID != dt[j].HPartentID) {      //判断dt中当下数据是否为当前节点的子节点的数据
                            var item = { "id": dt[j].HitemID, "field": dt[j].HitemID, "title": dt[j].HName, "spread": false };
                            if (dt[j].HSelected == true) {
                                item.checked = true;
                            }
                            children.push(item);                            //收集当前节点的子节点
                        }
                    }
                    tree[i].children = children;                            //将收集的子节点列表赋给当前节点的children,即添加当前节点的子节点列表
                    if (tree[i].children.length > 0) {
                        tree[i].checked = false;
                    }
                    for (var j = 0; j < tree[i].children.length; j++) {
                        getDefineData(dt, tree[i].children);
                    }
                }
            }
            //#endregion
            //#endregion
        });
    </script>
</body>
</html>
WebTM/views/¼Æ»®¹ÜÀí/¹¤ÒÕ·Ïß/Gy_RoutingBillList.html
@@ -116,6 +116,7 @@
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>反审核</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="export"><i class="layui-icon layui-icon-export"></i>导出</button>
                            </div>
                        </script>
                    </form>
@@ -143,6 +144,7 @@
            //var sWhere = " äº§å“ä»£ç  = 'BX0002'";
            var sWhere = "";
            var option = [];
            var ins;                        //用于导出excel
            var HModName = "Gy_RoutingBillList";
            //#endregion
@@ -184,6 +186,10 @@
                        break;
                    //列设置
                    case 'set_HideColumn': get_HideColumn();
                        break;
                    //导出excel
                    case 'get_export':
                        get_Export();
                        break;
                };
            });
@@ -368,7 +374,7 @@
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            ins = table.render(option);
                            layer.close(ajaxLoad);
                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
@@ -568,6 +574,14 @@
                set_ClearQuery();
                get_Display(sWhere);
            }
            //导出Execel
            function get_Export() {
                table.exportFile(ins.config.id, option.data, "xls");
            }
            //#endregion
            //隐藏列设置
            function get_HideColumn() {
WebTM/views/³µ¼ä¹ÜÀí/¹¤Ðò³öÕ¾»ã±¨µ¥/Cj_StationOutBillList.html
@@ -157,6 +157,7 @@
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Print" id="btn-Print"><i class="layui-icon layui-icon-circle"></i>预览</button>-->
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell" id="btn-Cell"><i class="layui-icon layui-icon-ok"></i>保存列宽</button>-->
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell" id="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>默认列宽</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="export"><i class="layui-icon layui-icon-export"></i>导出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Exit" id="btn-Exit">退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                            </div>
@@ -188,7 +189,7 @@
            //公用变量
            var sWhere = "";
            var option = [];
            var ins;                        //用于导出excel
            var HModName = "Cj_StationOutBillList";
            var titleData = ["HMaterID", "HUnitID", "HSourceID","hmainid","HProcExchInterID","HProcID","HunitID","HEmpID","HGroupID","HProcExchEntryID","HSubID","HICMOInterID","选择","查询日期","成本对象","成本对象名称","HBillStatus","HBillType","HPRDORGID"];//不需要显示的字段 å¯æ‰©å±•
            //初始化表格
@@ -343,6 +344,10 @@
                        break;
                    //列设置
                    case 'set_HideColumn': get_HideColumn();
                        break;
                    //导出excel
                    case 'get_export':
                        get_Export();
                        break;
                };
            });
@@ -809,7 +814,7 @@
                                , limit: 50
                                , limits: [50, 500, 5000, 20000]
                            }
                            table.render(option);
                            ins = table.render(option);
                            //刷新表格数据
                            DisPlay_HideColumn();
@@ -868,6 +873,11 @@
                Pub_Close(2);
            }
            //导出Execel
            function get_Export() {
                table.exportFile(ins.config.id, option.data, "xls");
            }
            //列明显示下拉框
            function ColFilter() {
                var Organization = '<option  value="0" selected="selected" ></option>';
WebTM/views/³µ¼ä¹ÜÀí/¹¤Ðò½øÕ¾½ÓÊÕµ¥/Cj_StationInBillList.html
@@ -139,6 +139,7 @@
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell" id="btn-Cell"><i class="layui-icon layui-icon-ok"></i>保存列宽</button>-->
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell" id="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>默认列宽</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="export"><i class="layui-icon layui-icon-export"></i>导出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Exit" id="btn-Exit">退出</button>
                            </div>
                        </script>
@@ -169,6 +170,7 @@
            //公用变量
            var sWhere = "";
            var option = [];
            var ins;                        //用于导出excel
            var HModName = "Cj_StationInBillList";
            var titleData = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID","HInterID","HProcExchInterID","HProcExchEntryID","HICMOInterID","HICMOEntryID"];//不需要显示的字段 å¯æ‰©å±•
            //初始化表格
@@ -273,6 +275,10 @@
                        break;
                    //退出
                    case 'btn-Exit': get_Exit();
                        break;
                    //导出excel
                    case 'get_export':
                        get_Export();
                        break;
                };
            });
@@ -443,7 +449,7 @@
                                , limit: 50
                                , limits: [50, 500, 5000, 20000]
                            }
                            table.render(option);
                            ins = table.render(option);
                            //刷新表格数据
                            DisPlay_HideColumn();
@@ -650,6 +656,13 @@
                }
            }
            //导出Execel
            function get_Export() {
                table.exportFile(ins.config.id, option.data, "xls");
            }
            //退出
            function get_Exit() {
                Pub_Close(2);
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/Kf_MaterOutEntryReport_Cloth.html
@@ -238,8 +238,8 @@
            //初始化界面
            function set_ClearBill() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(7, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(7, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
@@ -269,8 +269,8 @@
            //初始化表格
            function set_InitGrid() {
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//结束日期
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(7, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                var HEndDate = Format(new Date(new Date()).setHours(7, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//结束日期
                //var HBeginDate = $("#HBeginDate").val() + ":00:00" ;//下达日期 å¼€å§‹æ—¥æœŸ
                //var HEndDate = $("#HEndDate").val()+":00:00";//结束日期
@@ -501,12 +501,12 @@
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate == '') {
                    HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                    HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(7, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                } else {
                    HBeginDate = $("#HBeginDate").val() + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                }
                if (HEndDate == '') {
                    HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//结束日期
                    HEndDate = Format(new Date(new Date()).setHours(7, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//结束日期
                } else {
                    HEndDate = $("#HEndDate").val() + ":00:00";//结束日期
                }
@@ -581,8 +581,8 @@
            //重置过滤条件
            function set_ClearQuery() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(7, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(7, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill_CheckList_New.html
@@ -164,9 +164,9 @@
                    $.ajax(
                        {
                            type: "Get",
                            url: GetWEBURL() + "/WEBSController/DeleteBillList_Json",
                            async: true,
                            data: { "HInterID": sInterID },
                            url: GetWEBURL() + "/WEBSController/DeleteBillList_BillCheck_Json",
                            async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                            data: { "HInterID": sInterID, "HBillType": HBillType,  "HStockOrgID": HStockOrgID },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†,
@@ -207,8 +207,9 @@
        function DisBillEntryList() {
            var ajaxLoad = layer.load();
            $.ajax({
                url: GetWEBURL() + '/WEBSController/GetKf_PonderationBillMain_TempList_BillCheck_Json',
                type: "GET",
                url: GetWEBURL() + '/WEBSController/GetKf_PonderationBillMain_TempList_BillCheck_Json',
                async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                data: { "HBillType": HBillType, "HMaker": HMaker, "HStockOrgID": HStockOrgID },
                success: function (data1) {
                    var col = [];
@@ -298,8 +299,9 @@
            }
            var ajaxLoad = layer.load();
            $.ajax({
                url: GetWEBURL() + '/WEBSController/GetKf_ICStockBillQueryList_Json',
                type: "GET",
                url: GetWEBURL() + '/WEBSController/GetKf_ICStockBillQueryList_Json',
                async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                data: { "HBillType": HBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo },
                success: function (data1) {
                    var col = [];
@@ -359,9 +361,9 @@
            $.ajax(
                {
                    type: "Get",
                    url: GetWEBURL() + "/WEBSController/DeleteICStockBillAndWMS_Json",
                    async: true,
                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType },
                    url: GetWEBURL() + "/WEBSController/DeleteICStockBillAndWMS_BillCheck_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill_Check_New.html
@@ -222,8 +222,9 @@
            //#region ä»Žç¼“存列表编辑功能跳转至单据模块,获取单据信息
            function RoadBillMain(linterid) {
                $.ajax({
                    url: GetWEBURL() + "/WEBSController/GetSourceBillList_BillCheck_Json",
                    type: "GET",
                    url: GetWEBURL() + "/WEBSController/GetSourceBillList_BillCheck_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HBillNo": lBillNo, "HBillType": HBillType },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
@@ -289,8 +290,9 @@
                HBillNo = $('#HBillNo').val()
                if (event.keyCode == 13) {
                    $.ajax({
                        url: GetWEBURL() + "/WEBSController/get_BillBarCode_BillCheck_Json",
                        type: "GET",
                        url: GetWEBURL() + "/WEBSController/get_BillBarCode_BillCheck_Json",
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "HBillNo": HBillNo, "HBillType": HBillType, "HMaker": HMaker, "HStockOrgID": HStockOrgID},
                        success: function (result) {
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -365,8 +367,9 @@
                    $('#HQty').val("");
                }
                $.ajax({
                    url: GetWEBURL() + "/WEBSController/get_CheckTypeByBarCode_BillCheck_Json",
                    type: "GET",
                    url: GetWEBURL() + "/WEBSController/get_CheckTypeByBarCode_BillCheck_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "sBarCode": sBarCode, "HBillID": HInterID, "HBillType": HBillType, "HBillNo": HBillNo, "HMaker": HMaker, "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sQty, "HStockOrgID": HStockOrgID },
                    success: function (result) {
                        if (result.count == 1) {
@@ -393,7 +396,7 @@
                            layer.load(3)
                        }
                        else {
                            layer.msg(result.Message, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't' });
                        }
                        layer.closeAll("loading");
                    }
@@ -407,8 +410,9 @@
            function DisBillEntryList() {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_Json',
                    type: "GET",
                    url: GetWEBURL() + '/WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_Json',
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": HInterID, "HBillType": HBillType, "sWhere": '' },
                    success: function (data1) {
                        var col = [];
@@ -522,7 +526,7 @@
                    {
                        type: "POST",
                        url: GetWEBURL() + "/WEBSController/set_SaveSellOutBill_BillCheck_Json",
                        async: true,
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "oMain": sMain },
                        dataType: "json",
                        success: function (data) {
@@ -538,14 +542,14 @@
                                });//新增
                            }
                            else {
                                layer.msg(data.Message, { icon: 5 });
                                layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                //灰度提交按钮cmdSaver
                                document.getElementById("Saver").disabled = false;
                            }
                            layer.closeAll("loading");
                        },
                        error: function (err) {
                            layer.msg("错误:" + err, { icon: 5 });
                            layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            //灰度提交按钮cmdSaver
                            document.getElementById("cmdSaver").disabled = false;
                        }
@@ -587,9 +591,9 @@
                    $.ajax(
                        {
                            type: "Get",
                            url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json",
                            async: true,
                            data: { "HInterID": HInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "HBillType": HBillType },
                            url: GetWEBURL() + "/WEBSController/set_DeleteBarCodeByEntryID_BillCheck_Json",
                            async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                            data: { "HInterID": HInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
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,102 +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({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    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 () {//选择仓库
@@ -693,7 +810,7 @@
            //        }
            //    })
            //});
            form.on('submit(HWHID_FIFO-BT)', function () {//选择先进先出仓库
            form.on('submit(HFIFOWHID-BT)', function () {//选择先进先出仓库
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
@@ -832,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: false,    //async用于控制(false)同步和(true)异步,默认的是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 () {//编辑
@@ -876,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%']
@@ -893,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('请选择一行记录,进行删除!');
                }
            });
@@ -1026,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) {
@@ -1040,7 +1144,8 @@
                                    }//关闭
                                }, function () {
                                    //sessionStorage["SourceFlag"] = false;
                                    window.location.reload();
                                    //window.location.reload();
                                    location.replace('Kf_SellOutBill_Fast.html?OperationType=1&HInterID=0');
                                });//新增
                            }
                            else {
@@ -1066,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) {      //扫仓位
@@ -1083,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) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -1113,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) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
@@ -1196,7 +1293,7 @@
            //                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
            //                    , { field: 'HBatchNo', title: '批次', width: 150 }
            //                  ]]
            //                        // , data: [linterid]
            //                        // , data: [HInterID_Temp]
            //                        // , page: true
            //                  , height: 500
            //                  , done: function () {
@@ -1213,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 }
                ]]
@@ -1273,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) {
@@ -1291,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()
@@ -1300,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()//数量
@@ -1325,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) {
@@ -1335,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();
@@ -1393,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) {
@@ -1401,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: "温馨提示" });
@@ -1460,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",
@@ -1540,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");
@@ -1723,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: "温馨提示" });
                        }
                    }
                });
            }
        });
@@ -1831,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);
@@ -1875,18 +1999,18 @@
            //    layer.msg("请先扫源单!", { icon: 5 });
            //    return false;
            //}
            if ($("#HDeptName").val() == '') {
                layer.msg("部门没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HSecManager").val() == '') {
                layer.msg("发货人没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HKeeper").val() == '') {
                layer.msg("保管人没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            //if ($("#HDeptName").val() == '') {
            //    layer.msg("部门没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //    return false;
            //}
            //if ($("#HSecManager").val() == '') {
            //    layer.msg("发货人没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //    return false;
            //}
            //if ($("#HKeeper").val() == '') {
            //    layer.msg("保管人没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //    return false;
            //}
            //if ($("#HSupName").val() == '') {
            //    layer.msg("客户没有选择!", { icon: 5 });
            //    return false;
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 () {//刷新