zgq
2021-07-02 4fe1033595d41b9cceb721072a2b1f6b7d8f635f
调拨单扫码记录
4个文件已修改
1个文件已添加
1635 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Baseset/基础资料/WMSBarCodeDetailsList.html 168 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html 1383 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -15,10 +15,10 @@
      <publishTime>03/23/2021 14:14:38</publishTime>
    </File>
    <File Include="bin/WebTM.dll">
      <publishTime>07/01/2021 09:38:32</publishTime>
      <publishTime>07/02/2021 14:43:48</publishTime>
    </File>
    <File Include="bin/WebTM.pdb">
      <publishTime>07/01/2021 09:38:32</publishTime>
      <publishTime>07/02/2021 14:43:48</publishTime>
    </File>
    <File Include="layuiadmin/config.js">
      <publishTime>03/23/2021 14:14:38</publishTime>
@@ -812,6 +812,9 @@
    <File Include="views/Baseset/基础资料/Sc_ProcessPlanViewList.html">
      <publishTime>04/16/2021 14:21:33</publishTime>
    </File>
    <File Include="views/Baseset/基础资料/WMSBarCodeDetailsList.html">
      <publishTime>07/02/2021 14:43:34</publishTime>
    </File>
    <File Include="views/component/anim/index.html">
      <publishTime>03/23/2021 14:14:38</publishTime>
    </File>
@@ -1044,7 +1047,7 @@
      <publishTime>03/23/2021 14:14:38</publishTime>
    </File>
    <File Include="views/index.html">
      <publishTime>07/01/2021 09:38:09</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/index_Mobile.html">
      <publishTime>07/01/2021 09:39:42</publishTime>
@@ -1197,7 +1200,7 @@
      <publishTime>03/23/2021 14:14:38</publishTime>
    </File>
    <File Include="views/user/login.html">
      <publishTime>05/28/2021 08:53:29</publishTime>
      <publishTime>07/02/2021 09:44:36</publishTime>
    </File>
    <File Include="views/user/reg.html">
      <publishTime>03/23/2021 14:14:38</publishTime>
@@ -1245,7 +1248,7 @@
      <publishTime>04/16/2021 14:21:33</publishTime>
    </File>
    <File Include="views/仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html">
      <publishTime>03/29/2021 10:47:09</publishTime>
      <publishTime>07/02/2021 14:30:00</publishTime>
    </File>
    <File Include="views/仓存管理/仓库调拨/Kf_MoveStockBill_FastList.html">
      <publishTime>03/29/2021 10:47:31</publishTime>
@@ -1311,13 +1314,19 @@
      <publishTime>05/29/2021 15:26:46</publishTime>
    </File>
    <File Include="views/基础资料/公用基础资料/Gy_Department.html">
      <publishTime>05/10/2021 08:54:50</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/基础资料/公用基础资料/Gy_Department_Edit.html">
      <publishTime>05/06/2021 17:40:06</publishTime>
    </File>
    <File Include="views/基础资料/公用基础资料/Gy_Employee.html">
      <publishTime>05/29/2021 15:26:46</publishTime>
    </File>
    <File Include="views/基础资料/公用基础资料/Gy_EquipMent.html">
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/基础资料/公用基础资料/Gy_EquipMent_Edit.html">
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/基础资料/公用基础资料/Gy_Material.html">
      <publishTime>03/29/2021 10:48:22</publishTime>
@@ -1460,8 +1469,14 @@
    <File Include="views/基础资料/采购基础资料/Gy_Supplier.html">
      <publishTime>03/29/2021 10:48:22</publishTime>
    </File>
    <File Include="views/基础资料/采购基础资料/Gy_Supplier_Edit.html">
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/基础资料/销售基础资料/Gy_Customer.html">
      <publishTime>03/29/2021 10:48:23</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/基础资料/销售基础资料/Gy_Customer_Edit.html">
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/报工平台/ReportPlatform.html">
      <publishTime>07/01/2021 13:15:12</publishTime>
@@ -1530,7 +1545,7 @@
      <publishTime>04/08/2021 09:14:52</publishTime>
    </File>
    <File Include="views/模治具管理/模治具管理/Gy_Mould.html">
      <publishTime>04/08/2021 09:14:52</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/模治具管理/模治具管理/Kf_ProductInBillList.html">
      <publishTime>04/16/2021 14:21:33</publishTime>
@@ -1620,7 +1635,7 @@
      <publishTime>04/08/2021 09:14:52</publishTime>
    </File>
    <File Include="views/模治具管理/模治具管理/Gy_Mould.html">
      <publishTime>04/08/2021 09:14:52</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/模治具管理/模治具管理/Kf_ProductInBillList.html">
      <publishTime>04/16/2021 14:21:33</publishTime>
@@ -1824,16 +1839,25 @@
      <publishTime>06/22/2021 14:19:35</publishTime>
    </File>
    <File Include="views/系统管理/会计期间/Xt_AccountPeriodList.html">
      <publishTime>04/29/2021 16:21:52</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/系统管理/会计期间/Xt_AccountPeriod_Edit.html">
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/系统管理/单据类型/Xt_BillTypeList.html">
      <publishTime>04/29/2021 16:21:52</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/系统管理/单据类型/Xt_BillType_Edit.html">
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/系统管理/日志管理/Xt_SystemLogList.html">
      <publishTime>04/29/2021 16:21:52</publishTime>
    </File>
    <File Include="views/系统管理/模块管理/Xt_XtgnbList.html">
      <publishTime>04/29/2021 16:21:52</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/系统管理/模块管理/Xt_Xtgnb_Edit.html">
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/系统管理/用户管理/Xt_UserGroupList.html">
      <publishTime>04/29/2021 16:21:52</publishTime>
@@ -1842,7 +1866,10 @@
      <publishTime>04/29/2021 16:21:52</publishTime>
    </File>
    <File Include="views/系统管理/系统参数管理/Xt_SystemParameterList.html">
      <publishTime>04/29/2021 16:21:52</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/系统管理/系统参数管理/Xt_SystemParameter_Edit.html">
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/组装单/Sc_AssemblyBill_Fast.html">
      <publishTime>03/29/2021 10:48:24</publishTime>
@@ -1911,10 +1938,10 @@
      <publishTime>06/09/2021 13:43:30</publishTime>
    </File>
    <File Include="views/质量管理/产品入库检验单/QC_LastPieceCheckBill.html">
      <publishTime>05/24/2021 10:08:23</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/质量管理/产品入库检验单/QC_LastPieceCheckBillList.html">
      <publishTime>05/24/2021 10:08:23</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/质量管理/出厂检验单/QC_OutCompCheckBillList.html">
      <publishTime>05/24/2021 10:08:23</publishTime>
@@ -1995,10 +2022,10 @@
      <publishTime>06/09/2021 13:43:30</publishTime>
    </File>
    <File Include="views/质量管理/产品入库检验单/QC_LastPieceCheckBill.html">
      <publishTime>05/24/2021 10:08:23</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/质量管理/产品入库检验单/QC_LastPieceCheckBillList.html">
      <publishTime>05/24/2021 10:08:23</publishTime>
      <publishTime>07/02/2021 09:07:44</publishTime>
    </File>
    <File Include="views/质量管理/出厂检验单/QC_OutCompCheckBillList.html">
      <publishTime>05/24/2021 10:08:23</publishTime>
WebTM/WebTM.csproj
@@ -78,6 +78,7 @@
    <Content Include="layuiadmin\myicon\车间管理.svg" />
    <Content Include="layuiadmin\treeTable.js" />
    <Content Include="views\Baseset\HBarPlanPrint.html" />
    <Content Include="views\Baseset\基础资料\WMSBarCodeDetailsList.html" />
    <Content Include="views\Baseset\基础资料\Gy_RepairList.html" />
    <Content Include="views\Baseset\基础资料\Gy_ScrapReasonList.html" />
    <Content Include="views\Baseset\基础资料\Gy_CheckItemList.html" />
@@ -493,7 +494,6 @@
    <Content Include="views\基础资料\公用基础资料\Gy_Currency.html" />
    <Content Include="views\基础资料\采购基础资料\Gy_Supplier_Edit.html" />
    <Content Include="views\基础资料\销售基础资料\Gy_Customer_Edit.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_Unit - å¤åˆ¶.html" />
    <Content Include="views\基础资料\公用基础资料\Add_Edit_Gy_WorkCenter.html" />
    <Content Include="views\基础资料\公用基础资料\test.html" />
    <Content Include="views\基础资料\公用基础资料\Xt_ORGANIZATIONSList.html" />
@@ -580,6 +580,24 @@
    <Content Include="views\系统管理\系统参数管理\Xt_SystemParameter_Edit.html" />
    <Content Include="views\系统管理\系统参数管理\Xt_SystemParameterList.html" />
    <Content Include="views\计划管理\工艺路线\Gy_RoutingBill.html" />
    <Content Include="views\设备管理\Sb_Add_EqpConkBookBillList.html" />
    <Content Include="views\设备管理\Sb_Add_EqpMaintenanceBillList.html" />
    <Content Include="views\设备管理\Sb_Add_EqpRepairCheckBillList.html" />
    <Content Include="views\设备管理\Sb_EqpConkBookBillList.html" />
    <Content Include="views\设备管理\Sb_EqpMaintenanceBillList.html" />
    <Content Include="views\设备管理\Sb_EqpMaintenanceBillList_PDA.html" />
    <Content Include="views\设备管理\Sb_EqpRepairCheckBillList.html" />
    <Content Include="views\设备管理\Sb_EquipDotCheckBillEdit.html" />
    <Content Include="views\设备管理\Sb_EquipDotCheckBillList.html" />
    <Content Include="views\设备管理\Sb_EquipDotCheckBillList_PDA.html" />
    <Content Include="views\设备管理\Sb_EquipDotCheckPlanBillEdit.html" />
    <Content Include="views\设备管理\Sb_EquipDotCheckPlanBillList.html" />
    <Content Include="views\设备管理\Sb_EquipMaintainBillEdit.html" />
    <Content Include="views\设备管理\Sb_EquipMaintainBillList.html" />
    <Content Include="views\设备管理\Sb_EquipMaintainBillList_PDA.html" />
    <Content Include="views\设备管理\Sb_EquipMaintainPlanBillEdit.html" />
    <Content Include="views\设备管理\Sb_EquipMaintainPlanBillList.html" />
    <Content Include="views\设备管理\Sc_Add_MouldDotCheckBillList.html" />
    <Content Include="views\质量管理\巡检记录单\QC_Add_Edit_PatrolProcCheckBill.html" />
    <Content Include="views\质量管理\产品入库检验单\QC_LastPieceCheckBill.html" />
    <Content Include="views\质量管理\产品入库检验单\QC_LastPieceCheckBillList.html" />
WebTM/layuiadmin/Scripts/webConfig.js
@@ -1,7 +1,7 @@
function GetWEBURL() {
    //var WEBURL = "http://192.168.16.80:8011/";          //办公室服务器
    //var WEBURL = "http://localhost:8081/SWEAPI/";       //ch本地
    var WEBURL = "http://localhost:8085/API/";   //zgq本地
    //var WEBURL = "http://localhost:8085/API/";   //zgq本地
    //var WEBURL = "http://192.168.2.21:8081/lubaoWebAPI/";//王永波本地配置,请勿更改
     //var WEBURL = "http://101.37.171.70/API/";   //公司服务器
    //var WEBURL = "http://localhost:8080/API/";   //颜晓军本地配置
@@ -9,6 +9,7 @@
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //杨露本地配置
    //var WEBURL = "http://10.1.4.154/API/";   //江丰客户
    //var WEBURL = "http://10.1.4.155/API/";   //江丰客户NEW
    var WEBURL = "http://47.96.97.237/API/";   //zgq本地
    return WEBURL
}
WebTM/views/Baseset/»ù´¡×ÊÁÏ/WMSBarCodeDetailsList.html
New file
@@ -0,0 +1,168 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>扫码详情列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <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 type="text/css">
        .layui-form-label {
            width: 85px;
        }
    </style>
</head>
<body>
    <div id="layout1" class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body" style="padding: 15px;">
                        <form class="layui-form" action="" lay-filter="component-form-group">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="FH">返回</button>
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="Exit">退出</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <table class="layui-hide" id="mainTable"></table>
    <script type="text/html" id="barDemo">
        <!--<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , laydate = layui.laydate
                , element = layui.element;
            //获取参数
            function getUrlVars() {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for (var i = 0; i < hashes.length; i++) {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            }
            var params = getUrlVars();
            //var HInterID = params[params[0]];
            //var HBillType = params[params[2]];
            var HInterID = 367;
            var HBillType = "3789";
            form.on('submit(FH)', function () {
                var checkStatus = table.checkStatus('ck-table')
                    , data = checkStatus.data;
                parent.GetHKeeperValue(data);
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
            form.on('submit(Exit)', function () {
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
            RoadQuery(HInterID, HBillType);
            table.render({
                elem: '#mainTable'
                // , url: '/demo/table/user/'
                , toolbar: '#toolbarDemo'
                , data: []
                , cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 æ–°å¢ž
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HInterID', width: 150, title: 'HInterID', hide: true }//, hide: true
                    , { field: 'HBillType', width: 150, title: '单据类型' }
                    , { field: 'HMaterID', width: 150, title: 'HMaterID', hide: true }
                    , { field: 'HMaterNumber', width: 150, title: '产品编码' }
                    , { field: 'HMaterName', width: 150, title: '产品名称' }
                    , { field: 'HMaterModel', width: 150, title: '规格型号' }
                    , { field: 'HQty', width: 150, title: '数量' }
                    , { field: 'HQtyMust', width: 150, title: '应收数量' }
                    , { field: 'HBatchNo', width: 150, title: '批次' }
                    , { field: 'HPieceQty', width: 150, title: '件数' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
                , page: true
            });
            ///加载显示数据
            function RoadQuery(HInterID, HBillType) {
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Web/GetWMSBarCodeDetailsList",
                    async: true,
                    data: { "HInterID": HInterID, "HBillType": HBillType },
                    success: function (result) {
                        ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                        table.reload('mainTable', {
                            data: ajaxReturnData
                            , height: 'full-10'
                            , loading: false
                            , done: function (index, res) {
                            }
                        });
                    },
                    error: function (result) {
                        console.log(result);
                        //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
                    }
                });
            };
            //行内事件
            table.on('tool(mainTable)', function (obj) {
                var data = obj.data;
                if (obj.event === 'del') {
                    var _obj = obj;
                    $.ajax({
                        type: "get",
                        url: GetWEBURL() + "/Web/GetWMSBarCodeDetailsList",
                        async: true,
                        data: { "HInterID": HInterID, "HBillType": HBillType },
                        success: function (result) {
                            ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                            table.reload('mainTable', {
                                data: ajaxReturnData
                                , height: 'full-10'
                                , loading: false
                                , done: function (index, res) {
                                }
                            });
                        },
                        error: function (result) {
                            console.log(result);
                            //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
                        }
                    });
                }
            });
            //以上为layui模块
        });
    </script>
</body>
</html>
WebTM/views/²Ö´æ¹ÜÀí/²Ö¿âµ÷²¦/Kf_MoveStockBill_Fast.html
@@ -34,7 +34,7 @@
                            <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;min-width: 35px;"">汇总</li>
                            <li lay-id="5" style="padding:1px;min-width: 35px;" ">汇总</li>
                        </ul>
                        <div class="layui-tab-content">
                            <!--选择源单-->
@@ -49,9 +49,9 @@
                                                <option value="-1">手工录入</option>
                                                <option value="3720">生产任务单-投料</option>
                                                <!--<option value="1201">委外订单-投料</option>
                                <option value="1402">发货通知单</option>
                                <option value="1234">下架通知单</option>
                                <option value="1243">调拨申请单</option>-->
                                                <option value="1402">发货通知单</option>
                                                <option value="1234">下架通知单</option>
                                                <option value="1243">调拨申请单</option>-->
                                            </select>
                                            <!--<input type="text" name="cmbSourceType" id="cmbSourceType" lay-verify="cmbSourceType" autocomplete="off" class="layui-input">-->
                                        </div>
@@ -208,15 +208,15 @@
                                    </div>
                                </div>
                                <!--<div class="layui-form-item" >
                    <label class="layui-form-label" style="width:60px;padding-left:0px;">调拨类型</label>
                    <div class="layui-input-inline">
                        <select name=" HBillType" id="HBillType">
                            <option value="">仓库调拨</option>
                            <option value="">领料调拨</option>
                        </select>
                        <input type="text" name="cmbSourceType" id="cmbSourceType" lay-verify="cmbSourceType" autocomplete="off" class="layui-input">
                    </div>
                </div>-->
                                    <label class="layui-form-label" style="width:60px;padding-left:0px;">调拨类型</label>
                                    <div class="layui-input-inline">
                                        <select name=" HBillType" id="HBillType">
                                            <option value="">仓库调拨</option>
                                            <option value="">领料调拨</option>
                                        </select>
                                        <input type="text" name="cmbSourceType" id="cmbSourceType" lay-verify="cmbSourceType" autocomplete="off" class="layui-input">
                                    </div>
                                </div>-->
                            </div>
                            <!--明细信息-->
                            <div class="layui-tab-item">
@@ -268,275 +268,279 @@
            </div>
        </div>
    </div>
    <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    </script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
        var $ = layui.$
        , admin = layui.admin
        , layer = layui.layer
        , table = layui.table
        , form = layui.form
        , element = layui.element;
        $("#HBarCode").focus();
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element;
            $("#HBarCode").focus();
        //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
        $("#HSCWHID").val(sessionStorage["HWHID"]);
        $("#HSCWHNAME").val(sessionStorage["HWHName"]);
        $("#HOutStockPlaceID").val(sessionStorage["HSPID"]);
        $("#HOutStockPlaceName").val(sessionStorage["HSPName"]);
        $("#HDeptID").val(sessionStorage["HDeptID"]);
        $("#HDeptName").val(sessionStorage["HDept"]);
        $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
        $("#HSecManager").val(sessionStorage["HSecManager"]);
        $("#HKeeperID").val(sessionStorage["HKeeperID"]);
        $("#HKeeper").val(sessionStorage["HKeeper"]);
        $("#HMaker").val(sessionStorage["HUserName"]);
        $("#HMaker").hide();
        $("#HMakerID").hide();
        $("#HBillerID").val(sessionStorage["HBillerID"]);
        $("#HBillerID").hide();
            //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
            $("#HSCWHID").val(sessionStorage["HWHID"]);
            $("#HSCWHNAME").val(sessionStorage["HWHName"]);
            $("#HOutStockPlaceID").val(sessionStorage["HSPID"]);
            $("#HOutStockPlaceName").val(sessionStorage["HSPName"]);
            $("#HDeptID").val(sessionStorage["HDeptID"]);
            $("#HDeptName").val(sessionStorage["HDept"]);
            $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
            $("#HSecManager").val(sessionStorage["HSecManager"]);
            $("#HKeeperID").val(sessionStorage["HKeeperID"]);
            $("#HKeeper").val(sessionStorage["HKeeper"]);
            $("#HMaker").val(sessionStorage["HUserName"]);
            $("#HMaker").hide();
            $("#HMakerID").hide();
            $("#HBillerID").val(sessionStorage["HBillerID"]);
            $("#HBillerID").hide();
        //判断是否登录 æœªç™»å½•则跳到登录页
        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() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
            //判断是否登录 æœªç™»å½•则跳到登录页
            if (sessionStorage.login != "login") {
                layer.confirm("登录失效,请重新登录!", {
                    icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
                }, function () { window.location.href = "../../user/login.html"; });
            }
            return vars;
        }
        var params = getUrlVars();
        var linterid = params[params[0]]; //从参数中获取 å•据内码
        var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
        function  RoadBillMain(linterid)//加载表头
        {
            $.ajax({
                url: GetWEBURL() + "/Web/GetPonderationBill",
                type: "GET",
                data: { "HInterID": linterid },
                success: function (d) {
                    // console.log(d.data);
                    $("#HInterID").val(d.data[0].HInterID);
                    $("#HBillNo").val(d.data[0].HBillNo);
                    $("#HBillType").val(d.data[0].HSourceBillType);
                    $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                    //$("#HWHID").val(d.data[0].HWhID);
                    //$("#HKeeperID").val(d.data[0].HKeeperID);
                    //$("#HSecManagerID").val(d.data[0].HSecManagerID);
                    //$("#HDeptID").val(d.data[0].HDeptID);
                    //$("#HBarCode").val(d.data[0].HBarCode);
                    //$("#HQty").val(d.data[0].HQty);
            //获取参数
            function getUrlVars() {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for (var i = 0; i < hashes.length; i++) {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
            })
        }
                return vars;
            }
            var params = getUrlVars();
            var linterid = params[params[0]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            function RoadBillMain(linterid)//加载表头
            {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetPonderationBill",
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (d) {
                        // console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HBillType").val(d.data[0].HSourceBillType);
                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                        //$("#HWHID").val(d.data[0].HWhID);
                        //$("#HKeeperID").val(d.data[0].HKeeperID);
                        //$("#HSecManagerID").val(d.data[0].HSecManagerID);
                        //$("#HDeptID").val(d.data[0].HDeptID);
                        //$("#HBarCode").val(d.data[0].HBarCode);
                        //$("#HQty").val(d.data[0].HQty);
                    }
                })
            }
        function RoadBillSub(linterid)//加载表体
        {
            table.render({
                elem: '#wl-table'
            function RoadBillSub(linterid)//加载表体
            {
                table.render({
                    elem: '#wl-table'
                    , url: GetWEBURL() + '/MoveStockBill/DisBillEntryList_Webs_Json'
                    , toolbar: '#toolbarDemo'
                    , where: { HBillID: linterid, HBillType: '1207', sWhere: '' }
                    , cols: [[
                        { type: 'radio' }
                    , { field: 'HQty', 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 }
                    , { field: 'HMaterID', title: '物料内码', width: 150, hide: true }
                    , { field: 'HAuxPropID', title: '', width: 150, hide: true }
                    , { field: 'HMTONo', title: '计划跟踪号', width: 150, hide: true }
                    ]]
                        , { field: 'HQty', 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 }
                        , { field: 'HMaterID', title: '物料内码', width: 150, hide: true }
                        , { field: 'HAuxPropID', title: '', width: 150, hide: true }
                        , { field: 'HMTONo', title: '计划跟踪号', width: 150, hide: true }
                        , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                    ]]
                    , height: 500
                    , done: function () {
                        layer.closeAll("loading");
                    }
                });
            }
            //判断是否新增
            if (linterid == null || linterid == 0) {
                //获取最大单据号 new
                $("#HInterID").val("");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '1207' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                    }
                });
            }
            else {//如果修改则走下面 new
                RoadBillMain(linterid);
                RoadBillSub(linterid);
            }
            //选择调入仓库
            form.on('submit(HWHID-BT)', function () {//选择调入仓库
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '仓库列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes']
                    , resize: false
                    , cancel: function () {
                    }
                })
            });
        }
        //判断是否新增
        if (linterid == null || linterid == 0) {
            //获取最大单据号 new
            $("#HInterID").val("");
            $("#HBillNo").val("");
            $.ajax({
                url: GetWEBURL() + "/Web/GetMAXNum",
                type: "GET",
                data: { "HBillType": '1207' },
                success: function (d) {
                    //console.log(d.data);
                    $("#HInterID").val(d.data[0].HInterID);
                    $("#HBillNo").val(d.data[0].HBillNo);
                }
            //选择调入仓位
            form.on('submit(HSpID-BT)', function () {//选择调入仓位
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '仓位列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HSpID', 'yes']
                    , resize: false
                    , cancel: function () {
                    }
                })
            });
        }
        else {//如果修改则走下面 new
            RoadBillMain(linterid);
            RoadBillSub(linterid);
        }
            //选择调出仓库
            form.on('submit(HSCWHID-BT)', function () {//选择调出仓库
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '仓库列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HSCWHID', 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
        //选择调入仓库
        form.on('submit(HWHID-BT)', function () {//选择调入仓库
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '仓库列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes']
                , resize: false
                , cancel: function () {
                }
            })
        });
            //选择调出仓位
            form.on('submit(HOSpID-BT)', function () {//选择调出仓位
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '仓位列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HOSpID', 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
        //选择调入仓位
        form.on('submit(HSpID-BT)', function () {//选择调入仓位
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '仓位列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HSpID', 'yes']
                , resize: false
                , cancel: function () {
                }
            })
        });
            //选择保管
            form.on('submit(HKeeperID-BT)', function () {//选择保管
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '保管列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
        //选择调出仓库
        form.on('submit(HSCWHID-BT)', function () {//选择调出仓库
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '仓库列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HSCWHID', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
            //选择验收
            form.on('submit(HSecManagerID-BT)', function (data) {//选择验收
                var sMainStr = JSON.stringify(data.field);
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '验收列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HSecManager', 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
        //选择调出仓位
        form.on('submit(HOSpID-BT)', function () {//选择调出仓位
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '仓位列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HOSpID', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
            //选择部门
            form.on('submit(HDeptID-BT)', function () {//选择部门
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '部门列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_DepartmentList.html', 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
        //选择保管
        form.on('submit(HKeeperID-BT)', function () {//选择保管
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '保管列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
            //选择班组
            form.on('submit(ProductionTeam-BT)', function () {//选择班组
                layer.open({
                    type: 2
                    , area: ['60%', '60%']
                    , title: '班组列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_GetProductionTeamList.html', 'yes']
                    , resize: false
                    , cancel: function (index, layero) {
                    }
                })
            });
        //选择验收
        form.on('submit(HSecManagerID-BT)', function (data) {//选择验收
            var sMainStr = JSON.stringify(data.field);
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '验收列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HSecManager', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
        //选择部门
        form.on('submit(HDeptID-BT)', function () {//选择部门
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '部门列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_DepartmentList.html', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
        //选择班组
        form.on('submit(ProductionTeam-BT)', function () {//选择班组
            layer.open({
                type: 2
                , area: ['60%', '60%']
                , title: '班组列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_GetProductionTeamList.html', 'yes']
                , resize: false
                , cancel: function (index, layero) {
                }
            })
        });
        //编辑
        form.on('submit(cmdModify)', function () {//编辑
            var sSubStr = table.cache['wl-table'];
            //if (AllowLoadData(sSubStr) != false) {//非空验证
            //编辑
            form.on('submit(cmdModify)', function () {//编辑
                var sSubStr = table.cache['wl-table'];
                //if (AllowLoadData(sSubStr) != false) {//非空验证
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
@@ -550,163 +554,163 @@
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
           // }
        });
                // }
            });
        //删除
        form.on('submit(Delete)', function () {//删除
            var checkStatus = table.checkStatus('wl-table')
            , data = checkStatus.data;
            var sInterID = $('#HInterID').val()
            var sMaterID = data[0].HMaterID
            var sBillType = '1207'
            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: GetWEBURL() + "/MoveStock/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() + '/MoveStockBill/DisBillEntryList_Webs_Json'
                         , cellMinWidth: 80
                         , toolbar: '#toolbarDemo'
                         , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
                         , cols: [[
                                { type: 'radio' }
                                , { field: 'HQty', title: '数量', width: 80 }
                                , { field: 'HQtyMust', title: '应收数量', width: 80 }
                                , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                                , { field: 'HMaterName', title: '物料名称', width: 100 }
                                , { 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: 'HMaterID', title: '物料ID', 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: "温馨提示" });
                   }
               });
        });
        //退出按钮
        form.on('submit(Cancel)', function () {
            parent.location.href = "../../../views/index.html"
            //window.close();//关闭当前页
        })
        //提交
        form.on('submit(Saver)', function (data) {//提交
            //debugger;
            var sMainStr = JSON.stringify(data.field);
            var sSubStr = table.cache['wl-table'];
            var sSourceType = '-1'
            if (AllowLoadData(sSubStr, 'Saver') != false)//非空验证
            {
                var index = layer.load(3);
            //删除
            form.on('submit(Delete)', function () {//删除
                var checkStatus = table.checkStatus('wl-table')
                    , data = checkStatus.data;
                var sInterID = $('#HInterID').val()
                var sMaterID = data[0].HMaterID
                var sBillType = '1207'
                var sAuxPropID = data[0].HAuxPropID
                //var sMTONo = data[0].HMTONo
                var sMTONo = ''
                var sSourceInterID = data[0].HSourceInterID
                var sSourceEntryID = data[0].HSourceEntryID
                $.ajax(
                {
                    type: "POST",
                    url: GetWEBURL() + "/MoveStockBill/set_SaveMoveStockBill_Json", //方法所在页面和方法名
                    async: true,
                    data: { "oMain": sMainStr },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                            layer.confirm("生成调拨单" + data.Message + $("#HBillNo").val(), {
                                icon: 1, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['新增'],
                                btn2: function () {
                                    //parent.layui.admin.events.closeThisTabs();关闭页签
                                    //window.close();//关闭页面,浏览器有效,PDA无效
                                    parent.location.href = "../../../views/index.html"
                                }//关闭
                            }, function () { window.location.reload(); });//新增
                    {
                        type: "Get",
                        url: GetWEBURL() + "/MoveStock/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() + '/MoveStockBill/DisBillEntryList_Webs_Json'
                                    , cellMinWidth: 80
                                    , toolbar: '#toolbarDemo'
                                    , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
                                    , cols: [[
                                        { type: 'radio' }
                                        , { field: 'HQty', title: '数量', width: 80 }
                                        , { field: 'HQtyMust', title: '应收数量', width: 80 }
                                        , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                                        , { field: 'HMaterName', title: '物料名称', width: 100 }
                                        , { 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: 'HMaterID', title: '物料ID', 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: "温馨提示" });
                        }
                        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: "温馨提示" });
                    }
                });
                return false;
            }
        });
        //监听提交
        form.verify({
            numberOrEmpty: function (value, item) {
                // if (value != '') {
                if (!/^\d+$/.test(value)) {
                    return '不能为空或数字或者0';
                }
                //}
            }
        });
                    });
            });
        //扫条码
        $('#HBarCode').on('keydown', function (event) {  //扫条码
            var sSubStr = table.cache['wl-table'];
            var sBarCode = $('#HBarCode').val()
            var sInterID = $("#HInterID").val()
            var sBillNo = $("#HBillNo").val()
            var sQty = $("#HQty").val()
            var sHBillType = $("#HBillType").val()
            var SCWhID = $("#HSCWHID").val()//调出仓库
            var HSPID = $("#HStockPlaceID").val()//调入仓位
            var HWHID = $("#HWHID").val()//调入仓库
            var SCSPID = $("#HOutStockPlaceID").val()//调出仓位
            if (sQty == "") {
                sQty = 0;
            }
            if (event.keyCode == 13) {
                if (sBarCode != "") {
                    $('#HBarCode').val("");
                }
                if (sQty != "") {
                    $('#HQty').val("");
                }
                if ($("#HWHNAME").val() == '') {
                    layer.msg("调入仓库没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //退出按钮
            form.on('submit(Cancel)', function () {
                parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
            })
            //提交
            form.on('submit(Saver)', function (data) {//提交
                //debugger;
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = table.cache['wl-table'];
                var sSourceType = '-1'
                if (AllowLoadData(sSubStr, 'Saver') != false)//非空验证
                {
                    var index = layer.load(3);
                    $.ajax(
                        {
                            type: "POST",
                            url: GetWEBURL() + "/MoveStockBill/set_SaveMoveStockBill_Json", //方法所在页面和方法名
                            async: true,
                            data: { "oMain": sMainStr },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                                    layer.confirm("生成调拨单" + data.Message + $("#HBillNo").val(), {
                                        icon: 1, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['新增'],
                                        btn2: function () {
                                            //parent.layui.admin.events.closeThisTabs();关闭页签
                                            //window.close();//关闭页面,浏览器有效,PDA无效
                                            parent.location.href = "../../../views/index.html"
                                        }//关闭
                                    }, function () { window.location.reload(); });//新增
                                }
                                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: "温馨提示" });
                            }
                        });
                    return false;
                }
                //if ($("#HWHID").val() == $("#HSCWHID").val() && $("#HStockPlaceID").val() == $("#HOutStockPlaceID").val()) {
                //    layer.msg("调入仓库、仓位不能和调出仓库、仓位都相同!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                //    return false;
                //}
                //if ($("#HSCWHNAME").val() == '') {
                //    layer.msg("调出仓库没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                //    return false;
                //}
                if ($("#HBillNo").val() == '') {
                    layer.msg("错误的单据号!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
            });
            //监听提交
            form.verify({
                numberOrEmpty: function (value, item) {
                    // if (value != '') {
                    if (!/^\d+$/.test(value)) {
                        return '不能为空或数字或者0';
                    }
                    //}
                }
                if ($("#HInterID").val() == '') {
                    layer.msg("错误的内码!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
            });
            //扫条码
            $('#HBarCode').on('keydown', function (event) {  //扫条码
                var sSubStr = table.cache['wl-table'];
                var sBarCode = $('#HBarCode').val()
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var sQty = $("#HQty").val()
                var sHBillType = $("#HBillType").val()
                var SCWhID = $("#HSCWHID").val()//调出仓库
                var HSPID = $("#HStockPlaceID").val()//调入仓位
                var HWHID = $("#HWHID").val()//调入仓库
                var SCSPID = $("#HOutStockPlaceID").val()//调出仓位
                if (sQty == "") {
                    sQty = 0;
                }
                if (event.keyCode == 13) {
                    if (sBarCode != "") {
                        $('#HBarCode').val("");
                    }
                    if (sQty != "") {
                        $('#HQty').val("");
                    }
                    if ($("#HWHNAME").val() == '') {
                        layer.msg("调入仓库没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return false;
                    }
                    //if ($("#HWHID").val() == $("#HSCWHID").val() && $("#HStockPlaceID").val() == $("#HOutStockPlaceID").val()) {
                    //    layer.msg("调入仓库、仓位不能和调出仓库、仓位都相同!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    //    return false;
                    //}
                    //if ($("#HSCWHNAME").val() == '') {
                    //    layer.msg("调出仓库没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    //    return false;
                    //}
                    if ($("#HBillNo").val() == '') {
                        layer.msg("错误的单据号!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return false;
                    }
                    if ($("#HInterID").val() == '') {
                        layer.msg("错误的内码!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return false;
                    }
                    $.ajax({
                        url: GetWEBURL() + "/MoveStockBill/get_InfoByBarCode_Source_Json",
                        type: "GET",
@@ -730,20 +734,20 @@
                                    , totalRow: true
                                    , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
                                    , cols: [[
                                      { type: 'radio', totalRowText: '合计' }
                                    , { field: 'HQty', title: '数量', width: 150, totalRow: true }
                                    , { field: '件数', title: '件数', width: 150, totalRow: true }
                                    , { 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 }
                                    , { field: 'HMaterID', title: '物料内码', width: 150, hide: true }
                                    , { field: 'HAuxPropID', title: '', width: 150, hide: true }
                                    , { field: 'HMTONo', title: '计划跟踪号', width: 150, hide: true }
                                        { type: 'radio', totalRowText: '合计' }
                                        , { field: 'HQty', title: '数量', width: 150, totalRow: true }
                                        , { field: '件数', title: '件数', width: 150, totalRow: true }
                                        , { 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 }
                                        , { field: 'HMaterID', title: '物料内码', width: 150, hide: true }
                                        , { field: 'HAuxPropID', title: '', width: 150, hide: true }
                                        , { field: 'HMTONo', title: '计划跟踪号', width: 150, hide: true }
                                    ]]
                                    // , data: [linterid]
                                    // , page: true
@@ -766,274 +770,301 @@
                        //    alert("异常对象errorThrown: " + errorThrown);
                        //}
                    });
                }
        });
                }
            });
        //扫源单
        $('#HSourceBillNo').on('keydown', function (event) {      //扫源单
            var HSourceBillNo = $('#HSourceBillNo').val()
            var sInterID = $("#HInterID").val()
            var sBillNo = $("#HBillNo").val()
            var HSourceBillType = $("#HBillType").val()
            if (event.keyCode == 13) {
                $.ajax({
                    url: GetWEBURL() + "/MoveStockBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                    type: "GET",
                    data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.load(3);
                            element.tabChange('tab-MoveStockBill', '2');
                            table.render({
                                elem: '#wl-table'
                              , url: GetWEBURL() + '/MoveStockBill/DisBillEntryList_Webs_Json'
                              , toolbar: '#toolbarDemo'
                              , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
                              , cols: [[
                                  { type: 'radio' }
                                , { field: 'HQty', 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]
                                // , page: true
                              , height: 500
                              , done: function () {
                                  layer.closeAll("loading");
                              }
            //扫源单
            $('#HSourceBillNo').on('keydown', function (event) {      //扫源单
                var HSourceBillNo = $('#HSourceBillNo').val()
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
                var HSourceBillType = $("#HBillType").val()
                if (event.keyCode == 13) {
                    $.ajax({
                        url: GetWEBURL() + "/MoveStockBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                        type: "GET",
                        data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
                        success: function (result) {
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                layer.load(3);
                                element.tabChange('tab-MoveStockBill', '2');
                                table.render({
                                    elem: '#wl-table'
                                    , url: GetWEBURL() + '/MoveStockBill/DisBillEntryList_Webs_Json'
                                    , toolbar: '#toolbarDemo'
                                    , where: { HBillID: sInterID, HBillType: '1207', sWhere: '' }
                                    , cols: [[
                                        { type: 'radio' }
                                        , { field: 'HQty', 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]
                                    // , page: true
                                    , height: 500
                                    , done: function () {
                                        layer.closeAll("loading");
                                    }
                                });
                            }
                            else {
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            layer.closeAll("loading");
                        }
                    });
                }
            });
            $('#HStockPlaceName').on('keydown', function (event) {      //扫仓位
                var HBarCode = $('#HStockPlaceName').val()
                if (event.keyCode == 13) {
                    //判断文本框是否有数据    new
                    $.ajax({
                        url: GetWEBURL() + "/LookingFor/getSpName_Json",
                        type: "GET",
                        data: { "HBarCode": HBarCode },
                        success: function (result) {
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                $("#HStockPlaceName").val(result.data[0].HName);
                                $("#HStockPlaceID").val(result.data[0].HItemID);
                                $("#HWHID").val(result.data[0].HWHID);
                                $("#HWHNAME").val(result.data[0].HWhName);
                                element.tabChange('tab-POStockInBill', '2');
                            }
                            else {
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            layer.closeAll("loading");
                        }
                    });
                }
            });
            $('#HOutStockPlaceName').on('keydown', function (event) {      //扫仓位
                var HBarCode = $('#HOutStockPlaceName').val()
                if (event.keyCode == 13) {
                    //判断文本框是否有数据    new
                    $.ajax({
                        url: GetWEBURL() + "/LookingFor/getSpName_Json",
                        type: "GET",
                        data: { "HBarCode": HBarCode },
                        success: function (result) {
                            if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                $("#HOutStockPlaceName").val(result.data[0].HName);
                                $("#HOutStockPlaceID").val(result.data[0].HItemID);
                                $("#HSCWHNAME").val(result.data[0].HWhName);
                                $("#HSCWHID").val(result.data[0].HWHID);
                                element.tabChange('tab-POStockInBill', '2');
                            }
                            else {
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            layer.closeAll("loading");
                        }
                    });
                }
            });
            table.render({
                elem: '#mx-table'
                // , url: GetWEBURL() + '/MoveStockBill/GetHBarCodeShowBillSub'
                //, toolbar: '#toolbarDemo'
                // , where: { sMsg: linterid, sMsg2: lentryid }
                , cols: [[
                    , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
                ]]
                , page: true
                , height: 500
                , done: function () {
                }
            });
            //行内事件
            table.on('tool(mainTable)', function (obj) {
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'edit') {
                    var _obj = obj;
                    layer.open({
                        type: 2
                        , area: ['80%', '80%']
                        , title: '扫码详情列表'
                        , shade: 0.6
                        , maxmin: true
                        , anim: 0
                        , content: ['../../../views/Baseset/基础资料/WMSBarCodeDetailsList.html?HInterID=' + $("#HInterID").val() + '&HBillType=1234', 'yes']
                        , resize: false
                        , end: function () {
                            _obj.update({
                                ä¾›åº”商: subSupName
                                , HSupID: subSupID
                                , ä¾›åº”商代码: subSupNumber
                            });
                        }
                        else {
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                        layer.closeAll("loading");
                    }
                });
            }
        });
        $('#HStockPlaceName').on('keydown', function (event) {      //扫仓位
            var HBarCode = $('#HStockPlaceName').val()
            if (event.keyCode == 13) {
                //判断文本框是否有数据    new
                $.ajax({
                    url: GetWEBURL() + "/LookingFor/getSpName_Json",
                    type: "GET",
                    data: { "HBarCode": HBarCode },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            $("#HStockPlaceName").val(result.data[0].HName);
                            $("#HStockPlaceID").val(result.data[0].HItemID);
                            $("#HWHID").val(result.data[0].HWHID);
                            $("#HWHNAME").val(result.data[0].HWhName);
                            element.tabChange('tab-POStockInBill', '2');
                        }
                        else {
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                        layer.closeAll("loading");
                    }
                });
            }
        });
        $('#HOutStockPlaceName').on('keydown', function (event) {      //扫仓位
            var HBarCode = $('#HOutStockPlaceName').val()
            if (event.keyCode == 13) {
                //判断文本框是否有数据    new
                $.ajax({
                    url: GetWEBURL() + "/LookingFor/getSpName_Json",
                    type: "GET",
                    data: { "HBarCode": HBarCode },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            $("#HOutStockPlaceName").val(result.data[0].HName);
                            $("#HOutStockPlaceID").val(result.data[0].HItemID);
                            $("#HSCWHNAME").val(result.data[0].HWhName);
                            $("#HSCWHID").val(result.data[0].HWHID);
                            element.tabChange('tab-POStockInBill', '2');
                        }
                        else {
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                        layer.closeAll("loading");
                    }
                });
            }
        });
        table.render({
            elem: '#mx-table'
            // , url: GetWEBURL() + '/MoveStockBill/GetHBarCodeShowBillSub'
            //, toolbar: '#toolbarDemo'
            // , where: { sMsg: linterid, sMsg2: lentryid }
         , cols: [[
           , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
         ]]
         , page: true
         , height: 500
         , done: function () {
         }
        });
    });
    //清空表头
    //function f_ClearTitle() {
    //    $("#HBarCode").val("");
    //    $("#HSpName").val("");
    //    $("#HSpID").val("0");
    //    $("#HQty").val("0");
    //    $("#HSourceBillNo").val("");
    //    $("#HWHNAME").val("");
    //    $("#HWHID").val("0");
    //    $("#HSCWHNAME").val("");
    //    $("#HSCWHID").val("0");
    //    $("#HSupName").val("");
    //    $("#HSupID").val("0");
    //    $("#HKeeper").val("");
    //    $("#HKeeperID").val("0");
    //    $("#HSecManager").val("0");
    //    $("#HSecManagerID").val("");
    //    $("#HDeptName").val("");
    //    $("#HDeptID").val("0");
    //    $("#HBillNo").val("");
    //    $("#HInterID").val("0");
    //}
    function GetHWHValue(obj)  //返回调入仓库
    {
        $("#HWHNAME").val(obj[0].HName);
        //sessionStorage["HWHID"] = obj[0].HItemID;
        $("#HWHID").val(obj[0].HItemID);
    }
    function GetHSpValue(obj) {  //返回调入仓位
        $("#HStockPlaceName").val(obj[0].HName);
        $("#HStockPlaceID").val(obj[0].HItemID);
    }
    function GetHSCWHNAMEValue(obj)  //返回调出仓库
    {
        $("#HSCWHNAME").val(obj[0].HName);
        $("#HSCWHID").val(obj[0].HItemID);
    }
    function GetHOutStockPlaceIDValue(obj) {  //返回调出仓位
        $("#HOutStockPlaceName").val(obj[0].HName);
        $("#HOutStockPlaceID").val(obj[0].HItemID);
    }
    function GetHSupValue(obj) {  //返回供应商
        $("#HSupName").val(obj[0].HName);
        $("#HSupID").val(obj[0].HItemID);
    }
    function GetHKeeperValue(obj) {  //返回保管
        $("#HKeeper").val(obj[0].HName);
        $("#HKeeperID").val(obj[0].HItemID);
    }
    function GetHSecManagerValue(obj) {  //返回验收
        $("#HSecManager").val(obj[0].HName);
        $("#HSecManagerID").val(obj[0].HItemID);
    }
    function GetHDeptNameValue(obj) {   //返回部门
        $("#HDeptName").val(obj[0].HName);
        $("#HDeptID").val(obj[0].HItemID);
    }
    //返回班组
    function GetProductionTeamValue(obj) {   //返回班组
        if (obj.length==0) {
            layer.msg("请先选择班组", { index: 0 });
        } else {
            $("#HGroupName").val(obj[0].班组);
            $("#HGroupID").val(obj[0].HItemID);
            layer.closeAll();
        }
    }
    //function Get_CheckWhAndSP(sInterID, sHBillType, sBarCode, sHWHID, sHSPID) {   //返回部门
    //    $.ajax({
    //        type: "GET",
    //        data: { "sHInterID": sInterID, "sHBillType": sHBillType, "sBarCode": sBarCode, "sHWHID": sHWHID, "sHSPID": sHSPID },
    //        success: function (result) {
    //            if(result.count==1)
    //            {
    //               // layer.msg(result.Message, { icon: 1 });
    //                return true;
    //            }
    //            else
    //            {
    //                layer.msg(result.Message, { icon: 5 });
    //                return false;
    //            }
    //        }
    //    })
    //}
    function AllowLoadData(sSubStr,bnt) {  //非空验证
        //if ($("#HSourceBillNo").val() == '') {
        //    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 ($("#HSupName").val() == '') {
        //    layer.msg("供应商没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
        //    return false;
        //}
        if ($("#HWHNAME").val() == '') {
            layer.msg("调入仓库没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            return false;
        }
        //if ($("#HWHID").val() == $("#HSCWHID").val() && $("#HStockPlaceID").val() == $("#HOutStockPlaceID").val()) {
        //    layer.msg("调入仓库、仓位不能和调出仓库、仓位都相同!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
        //    return false;
        //}
        if ($("#HBillNo").val() == '') {
            layer.msg("错误的单据号!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            return false;
        }
        if ($("#HInterID").val() == '') {
            layer.msg("错误的内码!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            return false;
        }
        if (typeof (sSubStr) == "undefined")
        {
            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;
                //    }
                //}
            });
            //以上为layui模块
        });
        //清空表头
        //function f_ClearTitle() {
        //    $("#HBarCode").val("");
        //    $("#HSpName").val("");
        //    $("#HSpID").val("0");
        //    $("#HQty").val("0");
        //    $("#HSourceBillNo").val("");
        //    $("#HWHNAME").val("");
        //    $("#HWHID").val("0");
        //    $("#HSCWHNAME").val("");
        //    $("#HSCWHID").val("0");
        //    $("#HSupName").val("");
        //    $("#HSupID").val("0");
        //    $("#HKeeper").val("");
        //    $("#HKeeperID").val("0");
        //    $("#HSecManager").val("0");
        //    $("#HSecManagerID").val("");
        //    $("#HDeptName").val("");
        //    $("#HDeptID").val("0");
        //    $("#HBillNo").val("");
        //    $("#HInterID").val("0");
        //}
        function GetHWHValue(obj)  //返回调入仓库
        {
            $("#HWHNAME").val(obj[0].HName);
            //sessionStorage["HWHID"] = obj[0].HItemID;
            $("#HWHID").val(obj[0].HItemID);
        }
        function GetHSpValue(obj) {  //返回调入仓位
            $("#HStockPlaceName").val(obj[0].HName);
            $("#HStockPlaceID").val(obj[0].HItemID);
        }
        function GetHSCWHNAMEValue(obj)  //返回调出仓库
        {
            $("#HSCWHNAME").val(obj[0].HName);
            $("#HSCWHID").val(obj[0].HItemID);
        }
        function GetHOutStockPlaceIDValue(obj) {  //返回调出仓位
            $("#HOutStockPlaceName").val(obj[0].HName);
            $("#HOutStockPlaceID").val(obj[0].HItemID);
        }
        function GetHSupValue(obj) {  //返回供应商
            $("#HSupName").val(obj[0].HName);
            $("#HSupID").val(obj[0].HItemID);
        }
        function GetHKeeperValue(obj) {  //返回保管
            $("#HKeeper").val(obj[0].HName);
            $("#HKeeperID").val(obj[0].HItemID);
        }
        function GetHSecManagerValue(obj) {  //返回验收
            $("#HSecManager").val(obj[0].HName);
            $("#HSecManagerID").val(obj[0].HItemID);
        }
        function GetHDeptNameValue(obj) {   //返回部门
            $("#HDeptName").val(obj[0].HName);
            $("#HDeptID").val(obj[0].HItemID);
        }
        //返回班组
        function GetProductionTeamValue(obj) {   //返回班组
            if (obj.length == 0) {
                layer.msg("请先选择班组", { index: 0 });
            } else {
                $("#HGroupName").val(obj[0].班组);
                $("#HGroupID").val(obj[0].HItemID);
                layer.closeAll();
            }
        }
        else {
            return true;
        //function Get_CheckWhAndSP(sInterID, sHBillType, sBarCode, sHWHID, sHSPID) {   //返回部门
        //    $.ajax({
        //        type: "GET",
        //        data: { "sHInterID": sInterID, "sHBillType": sHBillType, "sBarCode": sBarCode, "sHWHID": sHWHID, "sHSPID": sHSPID },
        //        success: function (result) {
        //            if(result.count==1)
        //            {
        //               // layer.msg(result.Message, { icon: 1 });
        //                return true;
        //            }
        //            else
        //            {
        //                layer.msg(result.Message, { icon: 5 });
        //                return false;
        //            }
        //        }
        //    })
        //}
        function AllowLoadData(sSubStr, bnt) {  //非空验证
            //if ($("#HSourceBillNo").val() == '') {
            //    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 ($("#HSupName").val() == '') {
            //    layer.msg("供应商没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //    return false;
            //}
            if ($("#HWHNAME").val() == '') {
                layer.msg("调入仓库没有选择!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            //if ($("#HWHID").val() == $("#HSCWHID").val() && $("#HStockPlaceID").val() == $("#HOutStockPlaceID").val()) {
            //    layer.msg("调入仓库、仓位不能和调出仓库、仓位都相同!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //    return false;
            //}
            if ($("#HBillNo").val() == '') {
                layer.msg("错误的单据号!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HInterID").val() == '') {
                layer.msg("错误的内码!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if (typeof (sSubStr) == "undefined") {
                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;
            }
        }
    }
    </script>
</body>