优化器具分布式调入单单据和列表、器具分布式调入单据和列表、其他入库单单据和列表、其他出库单单据和列表,及其相关按钮功能
6个文件已修改
4835 ■■■■■ 已修改文件
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldMoveStockStepOutBill.html 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldMoveStockStepOutBillList.html 728 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldOtherOutBillEdit.html 2511 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldOtherOutBillList.html 235 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_MouldOtherInBill.html 1219 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_MouldOtherInBillList.html 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldMoveStockStepOutBill.html
@@ -37,7 +37,7 @@
                                <li class="layui-this">基本信息</li>-->
                                <!--<li>其他信息</li>-->
                                <!--</ul>-->
                                <h1 style="text-align:center;"><b>器具分布式调出单</b></h1>
                                <h1 style="text-align:center;"><b>模具分布式调出单</b></h1>
                                <div class="layui-tab-content">
                                    <div class="layui-tab-item layui-show">
                                        <div class="layui-form-item">
@@ -71,10 +71,8 @@
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">验收员</label>
                                                <label class="layui-form-label">领料人</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value="" style="float:left;width:150px;">
@@ -84,7 +82,7 @@
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">保管员</label>
                                                <label class="layui-form-label">发料人</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;">
@@ -93,6 +91,10 @@
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">部门</label>
                                                <div class="layui-input-inline">
@@ -112,15 +114,14 @@
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">选单号</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:150px;">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">摘要</label>
                                                <div class="layui-input-inline">
@@ -164,7 +165,8 @@
    <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>//获取参数
    <script>
        //获取参数
        function getUrlVars() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
@@ -174,11 +176,22 @@
                vars[hash[0]] = hash[1];
            }
            return vars;
        }
        var params = getUrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
            var closeType = 2;  //关闭类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
            var closeType = params[params[3]];  //关闭类型
        }
        var hID = params[params[0]];//编辑查看
@@ -215,26 +228,27 @@
                , page: true //开启分页
                , cols: [[ //表头
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" ,width: 100}
                    , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true}
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 100 }
                    , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
                    , { field: 'HMaterCode', title: '模具代码', edit: 'text', event: 'HMaterCode', width: 100 }
                    , { field: 'HMaterName', title: '模具名称', edit: 'text', width: 100}
                    , { field: 'HMaterName', title: '模具名称', edit: 'text', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100 }
                    , { field: 'HBatchNo', title: '批次', edit: 'text', width: 100 }
                    , { field: 'HDesignLife', title: '设计寿命', edit: 'text', width: 100}
                    , { field: 'HLeaveLife', title: '剩余寿命', edit: 'text', width: 100}
                    , { field: 'HBatchNo', title: '批次', edit: 'text', width: 100 }
                    , { field: 'HDesignLife', title: '设计寿命', edit: 'text', width: 100 }
                    , { field: 'HLeaveLife', title: '剩余寿命', edit: 'text', width: 100 }
                    , { field: 'HUseLife', title: '累积使用寿命', edit: 'text', width: 100 }
                    , { field: 'HQtyMust', title: '应发数量', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '实发数量', edit: 'text', width: 100}
                    , { field: 'HPrice', title: '单价', edit: 'text', width: 100}
                    , { field: 'HMoney', title: '金额', edit: 'text', width: 100}
                    , { field: 'HWHID', title: 'HWHID', edit: 'text', width: 100, hide: true}
                    , { field: 'HQty', title: '实发数量', edit: 'text', width: 100 }
                    , { field: 'HPrice', title: '单价', edit: 'text', width: 100 }
                    , { field: 'HMoney', title: '金额', edit: 'text', width: 100 }
                    , { field: 'HWHID', title: 'HWHID', edit: 'text', width: 100, hide: true }
                    , { field: 'HWHCode', title: '发料仓库代码', edit: 'text', event: 'HWHCode', width: 100 }
                    , { field: 'HWHName', title: '发料仓库', edit: 'text', width: 100 }
                    , { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true}
                    , { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true }
                    , { field: 'HSPCode', title: '仓位代码', edit: 'text', event: 'HSPCode', width: 100 }
                    , { field: 'HSPName', title: '仓位', edit: 'text', width: 100 }
                    , { field: 'HRemark', title: '表体备注', edit: 'text', width: 100}
                    , { field: 'HRemark', title: '表体备注', edit: 'text', width: 100 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
                , limit: 500 //每页默认显示的数量
            };
@@ -248,7 +262,7 @@
                $("#HInterID").val(hID);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'Sc_MouldMoveStockStepOutBill/Sc_MouldMoveStockStepOutBillListCheckDetai',
                    url: GetWEBURL() + '/Sc_MouldMoveStockStepOutBill/Sc_MouldMoveStockStepOutBillListProjectDetai',
                    type: "GET",
                    data: { "sqlWhere": "and hmainid=" + hID },
                    success: function (result) {
@@ -268,6 +282,8 @@
                });
            }
            //头工具栏事件
            var rowid = 0;
            var rows = 0;
@@ -283,7 +299,7 @@
                        option.data = table.cache["mainTable"];
                        table.render(option);
                        rows++;
                        layer.msg('增加一行按钮!')
                        //layer.msg('增加一行按钮!')
                        break;
                    case 'btn-CopyLine':
                        var copydata = JSON.stringify(data);
@@ -309,21 +325,19 @@
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                    layer.confirm('真的删除行吗?', function (index) {
                        console.log("索引为:" + rowIndex);
                        if (rowIndex === '0') {
                            layer.msg('首行无法删除!!!');
                        } else {
                            //obj.del();
                            //layer.close(index);
                            var oldData = table.cache["mainTable"];
                            oldData.splice(obj.tr.data('index'), 1);
                            table.reload('mainTable', { data: oldData });
                            obj.del();
                            option.data = table.cache["mainTable"];//将数据绑定到data上
                            table.reload(option);
                            layer.close(index);
                        }
                    });
                }
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        if (obj.event === 'HMaterCode')  //模具信息
@@ -372,7 +386,7 @@
                                }
                            });
                        }
                        if (obj.event === 'HWHCode')  //仓库代码
                        {
                            //页面层-自定义
@@ -384,13 +398,13 @@
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../PublicPage/WareHouseInformation.html', 'yes'],
                                content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
@@ -458,7 +472,7 @@
                        return false;
                    }
                })
                })
            });
            //监听单元格编辑
@@ -531,7 +545,8 @@
                //alert(hID);
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Sc_MouldMoveStockStepOutBill/Sc_MouldMoveStockStepOutBillListCheckDetai",
                    url: GetWEBURL() + "/Sc_MouldMoveStockStepOutBill/Sc_MouldMoveStockStepOutBillListCheckDetai",
                    type: "GET",
                    data: {
                        "HID": hID
                    },
@@ -552,7 +567,7 @@
                                , "HKeeperName": data.发料人            //保管员名称
                                , "HDeptID": data.HDeptID                 //部门ID
                                , "HDeptName": data.部门                //部门名称
                                , "HSourceBillType":""                   //源单类型
                                , "HSourceBillType": ""                   //源单类型
                                , "XDH": ""                               //选单号
                                , "HExplanation": data.摘要              //摘要
                                , "HRemark": data.表头备注                    //备注
@@ -582,7 +597,7 @@
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3841' },
                    data: { "HBillType": '3840' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HBillNo").val(d.data[0].HBillNo);
@@ -607,13 +622,13 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/WareHouseInformation.html', 'yes'],
                    content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
@@ -641,7 +656,7 @@
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '仓库列表',
                    title: '领料人列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
@@ -679,7 +694,7 @@
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '仓库列表',
                    title: '发料人列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
@@ -750,20 +765,33 @@
            });
            form.on('submit(Exit)', function (data) {//
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                parent.layer.close(index); //再执行关闭
            //退出
            form.on('submit(Exit)', function (data) {
                if (closeType == 0) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                }
                if (closeType == 1) {
                    //关闭弹窗
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                } else if (closeType == 2) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                }
            });
            form.on('submit(Cancel)', function () {
                //sessionStorage["SourceFlag"] = false;
                parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
            })
            //form.on('submit(Cancel)', function () {
            //    //sessionStorage["SourceFlag"] = false;
            //    parent.location.href = "../../../views/index.html"
            //    //window.close();//关闭当前页
            //})
            function formatDate(date) {
                var d = new Date(date),
@@ -788,7 +816,7 @@
                $.ajax(
                    {
                        type: "POST",
                        url: GetWEBURL() + "/Sc_MouldProdOutBill/SaveGetMouldProdOutBillList", //方法所在页面和方法名
                        url: GetWEBURL() + "/Sc_MouldMoveStockStepOutBill/SaveGetMouldMoveStockStepOutBillList", //方法所在页面和方法名
                        async: true,
                        data: { "msg": sMainSub },
                        dataType: "json",
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldMoveStockStepOutBillList.html
@@ -2,12 +2,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>器具分布式调出单据列表</title>
    <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, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <!--<script src="../../../layuiadmin/layui/layui.js"></script>-->
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
@@ -15,10 +16,10 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <style >
        .layui-form-select .layui-input {
            padding-right: 15px;
            cursor: pointer;
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
</head>
@@ -30,20 +31,15 @@
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-colla-title layui-inline">
                                <!--<div class="layui-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>
                                </div>-->
                                <div class="layui-inline">
                                    <label class="layui-form-label">状态</label>
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
                                        <select name="HStatus" lay-filter="HStatus" style="width:190px;">
                                            <option value="-1" selected="selected">全部</option>
                                            <option value="0">未审核</option>
                                            <option value="1">已审核</option>
                                            <option value="2">已关闭</option>
                                        </select>
                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                    </div>
                                </div>
                                <div class="layui-inline">
@@ -62,19 +58,14 @@
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-colla-content">
                                <!--<div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width: 85px;">单据号</label>
                                        <div class="layui-input-block" style="margin-left: 120px;">
                                            <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                        </div>
                                    </div>
                                </div>
                                </div>-->
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
@@ -92,7 +83,10 @@
            </div>
        </div>
    </div>
    <!--<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/' //静态资源所在路径
@@ -110,36 +104,17 @@
                , util = layui.util
            //查询条件
            var sWhere = "";
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            var option = [];
            //初始化界面
            set_ClearBill();
            //#endregion
            //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
            //#region å¤´å·¥å…·æ äº‹ä»¶
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //新增按钮
                    case 'btn-Add': set_AddNew();
                        break;
                    //编辑按钮
                    case 'btn-Edit': set_ShowBill();
                        break;
                    //删除按钮
                    case 'btn-Delete': set_DeleteBill();
                        break;
                    //刷新
                    case 'get_Refresh': get_Refresh();
                        break;
                    //退出按钮
                    case 'get_Exit': Pub_Close(2);
                        break;
                };
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                //清空过滤条件
                set_ClearQuery();
            });
            //#endregion
@@ -149,12 +124,7 @@
            });
            //#endregion
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                //清空过滤条件
                set_ClearQuery();
            });
            //#endregion
            //#region åˆå§‹åŒ–界面
            function set_ClearBill() {
                //初始化表格
                set_InitGrid();
@@ -162,179 +132,226 @@
                get_Display(sWhere);
            }
            //#endregion
            //#region åˆ·æ–°
            function get_Refresh() {
                sWhere = "";
                get_Display(sWhere);
            }
             //#endregion
            //#region åˆå§‹åŒ–表格方法
            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
            function set_InitGrid() {
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                 columns = [
                     { type: 'checkbox', fixed: 'left' }
                    , { field: 'hmainid', title: '单据ID', hide: true }
                    , { field: '日期', title: '日期', width: 180 }
                     , { field: '单据号', title: '单据号', width: 190 }
                     , { field: 'HDeptID', title: 'HDeptID', width: 160, hide: false }
                    , { field: '部门代码', title: '部门代码', width: 200 }
                    , { field: '部门', title: '部门', width: 200 }
                     , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 200, hide: true }
                    , { field: '验收员代码', title: '验收员代码', width: 200 }
                    , { field: '验收员', title: '验收员', width: 200 }
                     , { field: 'hkeeperid', title: 'hkeeperid', width: 200, hide: true }
                    , { field: '保管员代码', title: '保管员代码', width: 200 }
                    , { field: '保管员', title: '保管员', width: 200 }
                     , { field: 'hwhid', title: 'hwhid', width: 200, hide: true }
                    , { field: '仓库代码', title: '仓库代码', width: 200 }
                    , { field: '仓库', title: '仓库', width: 200 }
                    , { field: '摘要', title: '摘要', width: 115, hide: true }
                    , { field: '表头备注', title: '表头备注', width: 200 }
                    , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                     , { field: 'hmaterid', title: 'hmaterid', width: 200, hide: true }
                    , { field: '模具代码', title: '模具代码', width: 115 }
                    , { field: '模具名称', title: '模具名称', width: 200 }
                    , { field: '条码编号', title: '条码编号', width: 200 }
                    //, { field: '模具品类', title: '模具品类', width: 200 }
                    //, { field: '收料仓库代码', title: '收料仓库代码', width: 200 }
                    //, { field: '收料仓库', title: '收料仓库', width: 200 }
                     , { field: 'HSPID', title: '仓位代码', width: 200, hide: false }
                    //, { field: '仓位代码', title: '仓位代码', width: 200 }
                    //, { field: '仓位', title: '仓位', width: 200 }
                    , { field: '设计寿命', title: '设计寿命', width: 200 }
                    , { field: '累计使用寿命', title: '累计使用寿命', width: 200 }
                    , { field: '本次使用寿命', title: '本次使用寿命', width: 200 }
                    , { field: '剩余寿命', title: '剩余寿命', width: 200 }
                    //, { field: '最后生产产品', title: '最后生产产品', width: 200 }
                    //, { field: '退库类型', title: '退库类型', width: 200 }
                    , { field: '模具新规格', title: '模具新规格', width: 200 }
                    , { field: '表体备注', title: '表体备注', width: 200 }
                    , { field: '关联数量', title: '关联数量', width: 200 }
                    , { field: 'HBillType', title: 'HBillType', width: 200, hide: true }
                    , { field: '红蓝单标记', title: '红蓝单标记', width: 200 }
                    , { field: '制单人', title: '制单人', width: 200 }
                     , { field: '制单日期', title: '制单日期', width: 180, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd HH:mm:ss')}}</div>"  }
                    , { field: '审核人', title: '审核人', width: 200 }
                     , { field: '审核日期', title: '审核日期', width: 200, templet: "<div>{{d.审核日期 ==null ? '':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '修改人', title: '修改人', width: 200 }
                     , { field: '修改日期', title: '修改日期', width: 180, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '关闭人', title: '关闭人', width: 200 }
                     , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '作废人', title: '作废人', width: 200 }
                     , { field: '作废日期', title: '作废日期', width: 200, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                    , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                    , { field: '源单单号', title: '源单单号', width: 200 }
                    , { field: '源单类型', title: '源单类型', width: 200 }
                ];
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: true
                    //, cellMinWidth: 120
                    , totalRow: true
                    , limit: 10
                    , height: 'full-50'
                    , cols: [columns]
                    , limits: [50, 500, 1000, 5000]
                    , done: function (res, curr, count) {
                    }
                    , page: true
                    , cellMinWidth: 90
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 125, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '单据号', title: '单据号', width: 195 }
                        , { field: '单据类型', title: '单据类型', width: 110 }
                        , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
                        , { field: '仓库代码', title: '仓库代码', width: 125 }
                        , { field: '仓库', title: '仓库', width: 125 }
                        , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
                        , { field: '领料人代码', title: '领料人代码', width: 180 }
                        , { field: '领料人', title: '领料人', width: 125 }
                        , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true }
                        , { field: '发料人代码', title: '发料人代码', width: 180 }
                        , { field: '发料人', title: '发料人', width: 125 }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                        , { field: '部门代码', title: '部门代码', width: 115 }
                        , { field: '部门', title: '部门', width: 125 }
                        , { field: '摘要', title: '摘要', width: 125 }
                        , { field: '表头备注', title: '表头备注', width: 125 }
                        , { field: '内部单据号', title: '内部单据号', width: 115 }
                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                        , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
                        , { field: '模具代码', title: '模具代码', width: 125 }
                        , { field: '模具名称', title: '模具名称', width: 125 }
                        , { field: '规格型号', title: '规格型号', width: 125 }
                        , { field: 'Hunitid', title: 'Hunitid', width: 200, hide: true }
                        , { field: '计量单位代码', title: '计量单位代码', width: 125 }
                        , { field: '计量单位', title: '计量单位', width: 125 }
                        , { field: 'HWHSonID', title: 'HWHSonID', width: 200, hide: true }
                        , { field: '发料仓库代码', title: '发料仓库代码', width: 125 }
                        , { field: '发料仓库', title: '发料仓库', width: 125 }
                        , { field: 'HSPID', title: 'HSPID', width: 200, hide: true }
                        , { field: '仓位代码', title: '仓位代码', width: 125 }
                        , { field: '仓位', title: '仓位', width: 125 }
                        , { field: '应发数量', title: '应发数量', width: 125 }
                        , { field: '实发数量', title: '实发数量', width: 125 }
                        , { field: '单价', title: '单价', width: 125 }
                        , { field: '金额', title: '金额', width: 125 }
                        , { field: '设计寿命', title: '设计寿命', width: 125 }
                        , { field: '累积使用寿命', title: '累积使用寿命', width: 125 }
                        , { field: '剩余寿命', title: '剩余寿命', width: 125 }
                        , { field: '关联数量', title: '关联数量', width: 125 }
                        , { field: '表体备注', title: '表体备注', width: 125 }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 125 }
                        , { field: '制单人', title: '制单人', width: 125 }
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '审核人', title: '审核人', width: 125 }
                        , { field: '审核日期', title: '审核日期', width: 200, templet: "<div>{{d.审核日期 ==null ? '':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '修改人', title: '修改人', width: 125 }
                        , { field: '修改日期', title: '修改日期', width: 200, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '关闭人', title: '关闭人', width: 125 }
                        , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '作废人', title: '作废人', width: 125 }
                        , { field: '作废日期', title: '作废日期', width: 200, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '行关闭人', title: '行关闭人', width: 125 }
                        , { field: '关闭类型', title: '关闭类型', width: 125 }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                        , { field: '源单单号', title: '源单单号', width: 125 }
                        , { field: '源单类型', title: '源单类型', width: 125 }
                    ]]
                };
                ////设置列宽
                //var colWidth = getColumnsWidth();
                //if (colWidth == "" || colWidth == []) {
                //}
                //else {
                //    $.each(columns, function (x, m) {
                //        m["width"] = colWidth[x];
                //    });
                //}
            }
            ////#region èŽ·å–åˆ—å®½
            //function getColumnsWidth() {
            //    var result = [];
            //    var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
            //    //获取列宽
            //    $.ajax({
            //        url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList',
            //        async: false,
            //        type: "Get",
            //        dataType: "json",
            //        data: { "colNum": colNum, "Name": Name },
            //        success: function (data1) {
            //            if (data1.code == 1) {
            //                result = data1.data;
            //            }
            //            else if (data1.code == -1) {
            //            }
            //            else {
            //                layer.alert(data1.Message, { icon: 5 });
            //            }
            //        }, error: function (e) {
            //            layer.alert(e.Message, { icon: 5 });
            //        }
            //    });
            //    return result;
            //}
            ////#endregion
            //#region åŠ è½½ç½‘æ ¼
            function get_Display(sWhere) {
                //加载网格
                var index = layer.load(0);//遮罩
            //进入页面显示的缓存列表
            $.ajax({
                url: GetWEBURL() + '/Sc_MouldMoveStockStepOutBill/GetMouldMoveStockStepOutBillList',
                type: "GET",
                data: { "sWhere": sWhere},
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        table.render(option);
                        layer.close(index);
                    } else {
                        layer.close(index);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Sc_MouldMoveStockStepOutBill/GetMouldMoveStockStepOutBill',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                }, error: function () {
                    layer.close(index);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
                });
            }
            //#endregion
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                switch (obj.event) {
                    case 'btn-Add':
                        //页面层-自定义
                        layer.open({
                            type: 2,
                            skin: 'layui-layer-rim', //加上边框
                            title: '新增器具分布式调出单',
                            closeBtn: 1,
                            shift: 2,
                            area: ['100%', '100%'],
                            maxmin: true,
                            content: '../模治具仓库管理/Sc_MouldMoveStockStepOutBill.html',
                            end: function () {
                                //刷新页面,
                                location.reload();
                            },
                            success: function (layero, index) {
                            }
                        });
                        break;
                    case 'btn-Edit':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        if (checkStatus.data.length === 1) {
                            var hID = data[0].hmainid.toString();
                            //if (AllowLoadData(sSubStr) != false) {//非空验证
                            layer.open({
                                type: 2
                                , area: ['100%', '100%']
                                , title: '编辑器具分布式调出单'
                                , closeBtn: 1
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: '../模治具仓库管理/Sc_MouldMoveStockStepOutBill.html?hID=' + hID
                                , resize: false,
                                end: function () {
                                    //刷新页面,
                                    location.reload();
                                }
                                , cancel: function () {
                                    //$(".layui-btn").removeClass("layui-btn-disabled");
                                }
                            })
                        } else {
                            layer.msg('请选择一行数据编辑!');
                        }
                        break;
                    case 'btn-Delete':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        if (checkStatus.data.length === 1) {
                            var InterID = data[0].hmainid.toString();
                            //逻辑删除方法
                            layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                                $.ajax({
                                    type: "GET",
                                    url: GetWEBURL() + "Sc_MouldMoveStockStepOutBill/DeltetMouldMoveStockStepOutBil", //方法所在页面和方法名
                                    data: { "HInterID": InterID },
                                    success: function (result) {
                                        if (result.count == 1) {
                                            layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                                // å¾—到frame索引
                                                var index = layer.getFrameIndex(window.name);
                                                //关闭当前frame
                                                layer.close(index);
                                                //修改为功后刷新界面
                                                window.location.reload();
                                            });
                                        } else {
                                            layer.alert(result.code + result.Message, { icon: 5 });
                                        }
                                    }, error: function () {
                                        layer.alert("接口请求失败!", { icon: 5 });
                                    }
                                });
                            })
                        }
                        else {
                            layer.msg('请选择一行数据删除!');
                        }
                        break;
                    //刷新
                    case 'get_Refresh': get_Refresh();
                        break;
                    //退出按钮
                    case 'get_Exit': Pub_Close(2);
                        break;
                };
            });
            ////进入页面显示的缓存列表
            //$.ajax({
            //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
            //    url: GetWEBURL() + '/Sc_MouldProdOutBill/GetMouldProdOutBill',
            //    type: "GET",
            //    data: { "sWhere": sWhere},
            //    success: function (data1) {
            //        if (data1.count == 1) {
            //            option.data = data1.data;
            //            table.render(option);
            //            layer.close(index);
            //        } else {
            //            layer.close(index);
            //            layer.alert(data1.code + data1.Message, { icon: 5 });
            //        }
            //    }, error: function () {
            //        layer.close(index);
            //        layer.alert("接口请求失败!", { icon: 5 });
            //    }
            //});
            //#region å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery(table, option) {
                var Status = $("select[name='Status']").val();//状态
                var HDate = $("#HBeginDate").val();//开始日期
                var HDate1 = $("#HEndDate").val();//结束日期
                var HBillNo = $("#HBillNo").val(); //单据号
                if (Status) {
                    switch (Status) {
                        case '-1':   //全部
                            sWhere += "";
                            break;
                        case '0':    //未审核
                            sWhere += " and å®¡æ ¸äºº=''";
                            break;
                        case '1':    //已审核
                            sWhere += " and å®¡æ ¸äºº<>''";
                            break;
                        case '2':    //已关闭
                            sWhere += " and å…³é—­äºº<>''";
                        default:
                    }
                }
                var HBillNo = $("#HBillNo").val();//单据号
                if (HDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HDate + "'";
                }
@@ -344,286 +361,49 @@
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                var index = layer.load(0);
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶
            function set_ClearQuery() {
                $("#HDate").val("");//开始日期
                $("#HDate1").val("");//结束日期
                $("#HBillNo").val("");//单据号
                sWhere = "";
            }
            //#endregion
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶
            function set_ClearQuery() {
                $('#Status').find("option[value='-1']").attr("selected", true);
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HBillNo").val("");
            }
            //#endregion
            //#region æ–°å¢ž
            function set_AddNew() {
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    area: ['100%', '100%'],
                    title: '器具分布式调出单据列表-新增',
                    shift: 0,
                    content: '../模治具仓库管理/Sc_Add_MouldMoveStockStepOutBill.html',
                    end: function () {
                        //刷新页面,
                        location.reload();
                    }
                });
            //#region åˆ·æ–°
            function get_Refresh() {
                set_ClearQuery();
                get_Display(sWhere);
            }
            //#endregion
            //修改按钮
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '器具分布式调出单据列表'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['Sc_Add_MouldMoveStockStepOutBill.html?HInterID=' + data[0].hinterid + '&HType=Modify', 'yes']
                        , resize: false,
                        end: function () {
                            //刷新页面
                            location.reload();
                        }
                        , cancel: function () {
                        }
                    })
                }
                else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            ////监听行双击事件
            //table.on('rowDouble(mainTable)', function (obj) {
            //    layer.alert("双击事件", { icon: 1 });
            //});
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                var ModRightNameDelete = 'Sc_MouldOtherInBill_Delete'
                var data = obj.data //获得当前行数据
                    , layEvent = obj.event; //获得 lay-event å¯¹åº”的值
                layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "Sc_ICMOReportBill/DeltetICMOReportBill", //方法所在页面和方法名
                        data: { "HItemID": checkStatus.data[0].HItemID, "User": sessionStorage["HUserName"], "ModRightNameDelete": ModRightNameDelete },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    window.location.reload();
                                });
                            }
                            else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                })
            }
            //#endregion
            //laydate.render({
            //    elem: '#HDate'
            //    , type: 'datetime'
            //    , trigger: 'click'
            //    , format:'yyyy-MM-dd HH:mm'
            //});
            //#region å®¡æ ¸
            function set_CheckBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //#region åå®¡æ ¸
            function set_AbandonCheck() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据反审核!');
                }
            }
            //#endregion
            //#region é¢„览
            function get_PrintReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    layer.alert("我是打印按钮!单据主ID是:" + InterID);
                    //window.open("../生产工序管理/工序汇报单/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b");
                    window.open("../../基础资料/公用基础资料/HBarPlanPrint.html?linterid=" + InterID + "&Type=HDepartMent" + "&OpenTmp=b");
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //#endregion
            //#region ä¿å­˜åˆ—宽
            function set_SaveGridColWidth() {
                var arr = [];
                // åˆ—æ•°
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                for (var i = 0; i <= colNum; i++) {
                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
                    var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width();
                    if (colName != "" && colName != null) {
                        arr.push(colWidth == -1 ? 200 : colWidth);
                    }
                }
                arr.unshift(40); //首位追加
                $.ajax({
                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
                    async: false,
                    type: "POST",
                    dataType: "json",
                    data: { "myMap": JSON.stringify(arr), "Name": Name },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.alert(data1.Message, { icon: 1 });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                //设置赋值列宽
                var colWidth = getColumnsWidth();
                if (colWidth == "" || colWidth == []) {
                }
                else {
                    $.each(columns, function (x, m) {
                        m["width"] = colWidth[x];
                    });
                }
                location.reload();
            }
            //#endregion
            //#region é»˜è®¤åˆ—宽
            function set_DefaultGridColWidth() {
                var arr = [];
                // åˆ—æ•°
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                for (var i = 0; i <= colNum; i++) {
                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
                    if (colName != "" && colName != null) {
                        arr.push(200);   //默认宽度200
                    }
                }
                arr.unshift(40); //首位追加
                $.ajax({
                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
                    async: false,
                    type: "POST",
                    dataType: "json",
                    data: { "myMap": JSON.stringify(arr), "Name": Name },
                    success: function (data1) {
                        if (data1.count == 1) {
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                //设置赋值列宽
                var colWidth = getColumnsWidth();
                if (colWidth == "" || colWidth == []) {
                }
                else {
                    $.each(columns, function (x, m) {
                        m["width"] = colWidth[x];
                    });
                }
                //get_FastQuery(table, option);
                location.reload();
            }
            //#endregion
            //以上是layui模块
        });
    </script>
</body>
</html>
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldOtherOutBillEdit.html
@@ -2,7 +2,7 @@
<html>
<head>
    <meta charset="utf-8" />
    <title>新增/编辑模治具其他出库单</title>
    <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">
@@ -37,7 +37,7 @@
                                <li class="layui-this">基本信息</li>-->
                                <!--<li>其他信息</li>-->
                                <!--</ul>-->
                                <h1 style="text-align:center;"><b>模治具其他出库单</b></h1>
                                <h1 style="text-align:center;"><b>其他出库单</b></h1>
                                <div class="layui-tab-content">
                                    <div class="layui-tab-item layui-show">
                                        <div class="layui-form-item">
@@ -64,69 +64,64 @@
                                            <div class="layui-inline">
                                                <label class="layui-form-label">模具仓库</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HWHName" id="HWHName" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="WareHouse" style="width:40px;">
                                                    <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="WareHouse" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">领料人</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="HSecManagerList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">发料人</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">验收员</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="HSecManagerList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">保管员</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="HKeeperList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            <!--<div class="layui-inline">
                                                <label class="layui-form-label">负责人</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="HManagerList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>-->
                                            <div class="layui-inline">
                                                <label class="layui-form-label">部门</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="Department" style="width:40px;">
                                                    <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="Department" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">源单类型</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HSourceBillType" id="HSourceBillType" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <select name="HSourceBillType" lay-filter="aihao" id="HSourceBillType">
                                                        <option value="生产任务单">生产任务单</option>
                                                        <option value="手工录入">手工录入</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">选单号</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="XDH" id="XDH" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:150px;">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">摘要</label>
                                                <div class="layui-input-inline">
@@ -171,7 +166,7 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
//获取参数
        //获取参数
        function getUrlVars() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
@@ -181,11 +176,22 @@
                vars[hash[0]] = hash[1];
            }
            return vars;
        }
        var params = getUrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
            var closeType = 2;  //关闭类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
            var closeType = params[params[3]];  //关闭类型
        }
        var hID = params[params[0]];//编辑查看
@@ -222,93 +228,61 @@
                , page: true //开启分页
                , cols: [[ //表头
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" ,width: 100}
                    , { field: 'HMaterID', title: '模具代码', edit: 'text', width: 100}
                    , { field: 'HMaterName', title: '模具名称', edit: 'text', width: 100}
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100}
                    //, { field: 'HPropertyID', title: '辅助属性代码', edit: 'text', width: 100}
                    //, { field: 'HPropertyName', title: '辅助属性名称', edit: 'text', width: 100}
                    //, { field: 'HSecUnitID', title: '辅助计量单位代码', edit: 'text', width: 100}
                    //, { field: 'HSecUnitName', title: '辅助计量单位名称', edit: 'text', width: 100}
                    //, { field: 'HUnitID', title: '计量单位代码', edit: 'text', width: 100}
                    //, { field: 'HUnitName', title: '计量单位名称', edit: 'text', width: 100}
                    , { field: 'HBatchNo', title: '批次', edit: 'text', width: 100}
                    , { field: 'HDesignLife', title: '设计寿命', edit: 'text', width: 100}
                    , { field: 'HLeaveLife', title: '剩余寿命', edit: 'text', width: 100}
                    , { field: 'HUseLife', title: '使用寿命', edit: 'text', width: 100}
                    , { field: 'HQty', title: '实收数量', edit: 'text', width: 100}
                    , { field: 'HPrice', title: '单价', edit: 'text', width: 100}
                    , { field: 'HMoney', title: '金额', edit: 'text', width: 100}
                    , { field: 'HWHID', title: '模具仓库代码', edit: 'text', width: 100}
                    , { field: 'HWHName', title: '模具仓库名称', edit: 'text', width: 100 }
                    //, { field: 'HSPID', title: '仓位代码', edit: 'text', width: 100}
                    //, { field: 'HSPName', title: '仓位名称', edit: 'text', width: 100}
                    , { field: 'HRemark', title: '备注', edit: 'text', width: 100}
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 100 }
                    , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
                    , { field: 'HMaterCode', title: '模具代码', edit: 'text', event: 'HMaterCode', width: 100 }
                    , { field: 'HMaterName', title: '模具名称', edit: 'text', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100 }
                    , { field: 'HBatchNo', title: '批次', edit: 'text', width: 100 }
                    , { field: 'HDesignLife', title: '设计寿命', edit: 'text', width: 100 }
                    , { field: 'HLeaveLife', title: '剩余寿命', edit: 'text', width: 100 }
                    , { field: 'HUseLife', title: '累积使用寿命', edit: 'text', width: 100 }
                    , { field: 'HQtyMust', title: '应发数量', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '实发数量', edit: 'text', width: 100 }
                    , { field: 'HPrice', title: '单价', edit: 'text', width: 100 }
                    , { field: 'HMoney', title: '金额', edit: 'text', width: 100 }
                    , { field: 'HWHID', title: 'HWHID', edit: 'text', width: 100, hide: true }
                    , { field: 'HWHCode', title: '发料仓库代码', edit: 'text', event: 'HWHCode', width: 100 }
                    , { field: 'HWHName', title: '发料仓库', edit: 'text', width: 100 }
                    , { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true }
                    , { field: 'HSPCode', title: '仓位代码', edit: 'text', event: 'HSPCode', width: 100 }
                    , { field: 'HSPName', title: '仓位', edit: 'text', width: 100 }
                    , { field: 'HRemark', title: '表体备注', edit: 'text', width: 100 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
                , limit: 500 //每页默认显示的数量
            };
            //判断是否新增
            //if (hID == null || hID == 0) {
            //    //初始加载表格{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
            //    option.data = [{ "HMaterID": 0, "HMaterName": "", "HMaterSpec": "","HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHName": "", "HRemark": "" }];
            //    table.render(option);
            //}
            //else {
            //    $("#HInterID").val(hID);//修改时主表ID
            //    //编辑加载数据
            //    var ajaxLoad = layer.load();
            //    $.ajax({
            //        url: GetWEBURL() + 'Sc_MouldOtherOutBill/Sc_MouldOtherOutBillListCheckDetai',
            //        type: "GET",
            //        data: { "HID":  hID },
            //        success: function (result) {
            //            //console.log(result);
            //            //console.log('gouba' + result);
            //            if (result.code == 1) {
            //                option.data = result.data;
            //                layer.close(ajaxLoad);
            //            } else {
            //                layer.close(ajaxLoad);
            //                layer.alert(result.code + result.Message, { icon: 5 });
            //            }
            //        }, error: function () {
            //            layer.close(ajaxLoad);
            //            layer.alert("接口请求失败!", { icon: 5 });
            //        }
            //    });
            //}
            var date = new Date();
            var day = date.getDate();
            var month = date.getMonth() + 1;
            var year = date.getFullYear();
            var shijian = year + "-" + month + "-" + day;
            //判断是否新增
            if (hID == null || hID == 0) {
                option.data = [{ "HMaterID": 0, "HMaterName": "", "HMaterSpec": "","HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHName": "", "HRemark": "" }];
                //初始加载表格{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" }];
                table.render(option);
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
            }
            else {
                $("#HInterID").val(hID);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    url: GetWEBURL() + '/Sc_MouldOtherOutBill/Sc_MouldOtherOutBillListProjectDetai',
                    type: "GET",
                    data: { "HBillType": '3828' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(shijian);
                        $("#HInterID").val(0);
                    data: { "sqlWhere": "and hmainid=" + hID },
                    success: function (result) {
                        //console.log(result);
                        //console.log('gouba' + result);
                        if (result.count == 1) {
                            option.data = result.data;
                            table.render(option);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index0);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            else {//如果修改则走下面 new
                RoadBillMain(hID);
                /* RoadBillSub(linterid);*/
            }
            //头工具栏事件
            var rowid = 0;
@@ -317,7 +291,7 @@
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                var AddRow = table.cache['mainTable'];
                var NewRow = { "HMaterID": 0, "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHName": "", "HRemark": "" };
                var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" };
                switch (obj.event) {
                    case 'btn-AddLine':
                        //table.cache["mainTable"].push(AddRow[rows]);
@@ -325,7 +299,7 @@
                        option.data = table.cache["mainTable"];
                        table.render(option);
                        rows++;
                        layer.msg('增加一行按钮!')
                        //layer.msg('增加一行按钮!')
                        break;
                    case 'btn-CopyLine':
                        var copydata = JSON.stringify(data);
@@ -351,2015 +325,254 @@
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                    layer.confirm('真的删除行吗?', function (index) {
                        console.log("索引为:" + rowIndex);
                        if (rowIndex === '0') {
                            layer.msg('首行无法删除!!!');
                        } else {
                            //obj.del();
                            //layer.close(index);
                            var oldData = table.cache["mainTable"];
                            oldData.splice(obj.tr.data('index'), 1);
                            table.reload('mainTable', { data: oldData });
                            obj.del();
                            option.data = table.cache["mainTable"];//将数据绑定到data上
                            table.reload(option);
                            layer.close(index);
                        }
                    });
                }
                if (obj.event === 'ReasonNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择不良原因
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        if (obj.event === 'HMaterCode')  //模具信息
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '模具列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../PublicPage/MouldInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HMaterID: checkStatus.data[0].HItemID,
                                        HMaterCode: checkStatus.data[0].HNumber,
                                        HMaterName: checkStatus.data[0].HName,
                                        HMaterSpec: checkStatus.data[0].HModel,
                                        HDesignLife: 0,  //设计寿命
                                        HLeaveLife: 0,   //剩余寿命
                                        HQty: 1,         //实收数量
                                        HMoney: 0,       //金额
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择不良原因
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        if (obj.event === 'HWHCode')  //仓库代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '仓库列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HWHID: checkStatus.data[0].HItemID,
                                        HWHCode: checkStatus.data[0].HNumber,
                                        HWHName: checkStatus.data[0].HName,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择不良原因
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        if (obj.event === 'HSPCode')  //仓位代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '仓位列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../PublicPage/WareLocationInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HSPID: checkStatus.data[0].HItemID,
                                        HSPCode: checkStatus.data[0].HNumber,
                                        HSPName: checkStatus.data[0].HName,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                            });
                        }
                        obj.event = "";
                        return false;
                    }
                }
                else if (obj.event === 'EmpNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择责任人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                    }
                }
                else if (obj.event === 'SQProcNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择申请工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '申请工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                    }
                }
                else if (obj.event === 'ZRProcNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择责任工序
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '责任工序列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                    }
                }
                else if (obj.event === 'BadQtyEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            break;
                        case "1":
                            break;
                        case "2":
                            break;
                        case "3":
                            break;
                        case "4":
                            break;
                        case "5":
                            break;
                        case "6":
                            break;
                        case "7":
                            break;
                        case "8":
                            break;
                        case "9":
                            break;
                        case "10":
                            break;
                        case "11":
                            break;
                        case "12":
                            break;
                        case "13":
                            break;
                        case "14":
                            break;
                        case "15":
                            break;
                        case "16":
                            //$(obj.tr).find(".layui-table-edit").keyup(function () {
                            //    var $input = $(this), val = $input.val();
                            //    if (!val) val = "1";
                            //    $input.val(val.replace(/[^\d]/g, ''));
                            //});
                            break;
                    }
                }
                else if (obj.event === 'RemarkEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            break;
                        case "1":
                            break;
                        case "2":
                            break;
                        case "3":
                            break;
                        case "4":
                            break;
                        case "5":
                            break;
                        case "6":
                            break;
                        case "7":
                            break;
                        case "8":
                            break;
                        case "9":
                            break;
                        case "10":
                            break;
                        case "11":
                            break;
                        case "12":
                            break;
                        case "13":
                            break;
                        case "14":
                            break;
                        case "15":
                            break;
                        case "16":
                            break;
                    }
                }
                else if (obj.event === 'PSProcNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择不良确认人
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '职员列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                    }
                }
                else if (obj.event === 'CloseManEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            break;
                        case "1":
                            break;
                        case "2":
                            break;
                        case "3":
                            break;
                        case "4":
                            break;
                        case "5":
                            break;
                        case "6":
                            break;
                        case "7":
                            break;
                        case "8":
                            break;
                        case "9":
                            break;
                        case "10":
                            break;
                        case "11":
                            break;
                        case "12":
                            break;
                        case "13":
                            break;
                        case "14":
                            break;
                        case "15":
                            break;
                        case "16":
                            break;
                    }
                }
                })
            });
            //监听单元格编辑
            table.on('edit(mainTable)', function (obj) {
                // å•元格编辑之前的值
                var oldText = $(this).prev().text();
                var value = obj.value //得到修改后的值
                    , data = obj.data //得到所在行所有键值
                    , field = obj.field; //得到字段
                //layer.msg('[ID: ' + data.id + '] ' + field + ' å­—段更改为:' + value);
                switch (field) {
                    case "HDesignLife":  //设计寿命
                        value = isNaN(value) ? 0 : value;
                        var HUseLife = isNaN(data.HUseLife) ? 0 : data.HUseLife;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HDesignLife: value,                          //设计寿命
                            HLeaveLife: value - HUseLife,           //剩余寿命=设计寿命-使用寿命
                        });
                        break;
                    case "HLeaveLife":  //剩余寿命
                        var HDesignLife = isNaN(data.HDesignLife) ? 0 : data.HDesignLife;
                        var HUseLife = isNaN(data.HUseLife) ? 0 : data.HUseLife;
                        //同步更新表格和缓存对应的值
                        obj.tr.find('td[data-field=HLeaveLife] input').val(HDesignLife - HUseLife);
                        obj.update({
                            HLeaveLife: HDesignLife - HUseLife,   //剩余寿命=设计寿命-使用寿命
                        });
                        break;
                    case "HUseLife":    //使用寿命
                        var HDesignLife = isNaN(data.HDesignLife) ? 0 : data.HDesignLife;
                        value = isNaN(value) ? 0 : value;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HLeaveLife: HDesignLife - value, //剩余寿命=设计寿命-使用寿命
                        });
                        break;
                    case "HQty":        //实发数量
                        value = isNaN(value) ? 0 : value;
                        var HPrice = isNaN(data.HPrice) ? 0 : data.HPrice;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HMoney: value * HPrice, //金额=实收数量*单价
                        });
                        break;
                    case "HPrice":      //单价
                        value = isNaN(value) ? 0 : value;
                        var HQty = isNaN(data.HQty) ? 0 : data.HQty;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HMoney: value * HQty, //金额=实收数量*单价
                        });
                        break;
                    case "HMoney":     //金额
                        var HPrice = isNaN(data.HPrice) ? 0 : data.HPrice;
                        var HQty = isNaN(data.HQty) ? 0 : data.HQty;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HMoney: HPrice * HQty, //金额=实收数量*单价
                        });
                        break;
                    default:
                }
            });
            function RoadBillMain(hID)//加载表头
            {
                $("#HInterID").val(hID);//修改时主表ID
                //alert(hID);
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Sc_MouldOtherOutBill/Sc_MouldOtherOutBillListCheckDetai",
                    url: GetWEBURL() + "/Sc_MouldOtherOutBill/Sc_MouldOtherOutBillListCheckDetai",
                    type: "GET",
                    data: {
                        "HID": hID
                    },
                    success: function (result) {
                        option.data = [{ "HMaterID": 0, "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHName": "", "HRemark": "" }];
                        table.render(option);
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data.h_v_Sc_MouldOtherOutBillList[0];
                            //form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                            //    "HBillNo": data.单据号
                            //    , "HDate": formatDate(data.日期)
                            //    , "HInnerBillNo": data.内部单据号
                            //    , "HWHID": data.HWHID                    //仓库ID
                            //    , "HWHName": data.仓库名称               //仓库名称
                            //    , "HSecManagerID": data.HSecManagerID    //验收员ID
                            //    , "HSecManagerName": data.验收人     //验收员名称
                            //    , "HKeeperID": data.HKeeperID            //保管员ID
                            //    , "HKeeperName": data.保管员        //保管员名称
                            //    , "HManagerName": data.负责人名称        //负责人名称
                            //    , "HDeptID": data.HDeptID                 //部门ID
                            //    , "HDeptName": data.部门             //部门名称
                            //    , "HSourceBillType":""                   //源单类型
                            //    , "XDH": ""                               //选单号
                            //    , "HExplanation": data.摘要              //摘要
                            //    , "HRemark": data.表头备注                    //备注
                            //});
                            console.info(data);
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HBillNo": data.单据号
                                , "HDate": formatDate(data.日期)
                                , "HInnerBillNo": data.内部单据号
                                , "HWHID": data.HWHID                    //仓库ID
                                , "HWHName": data.仓库                   //仓库名称
                                , "HSecManagerID": data.hsecmanagerid    //验收员ID
                                , "HSecManagerName": data.领料人         //验收员名称
                                , "HKeeperID": data.hkeeperid            //保管员ID
                                , "HKeeperName": data.发料人            //保管员名称
                                , "HDeptID": data.HDeptID                 //部门ID
                                , "HDeptName": data.部门                //部门名称
                                , "HSourceBillType": ""                   //源单类型
                                , "XDH": ""                               //选单号
                                , "HExplanation": data.摘要              //摘要
                                , "HRemark": data.表头备注                    //备注
                            });
                            $("#HBillNo").val(data.单据号);
                            $("#HDate").val(formatDate(data.日期));
                            $("#HInnerBillNo").val(data.内部单据号);
                            $("#HWHID").val(data.HWHID);
                            $("#HWHName").val(data.仓库);
                            $("#HManagerID").val(data.HManagerID);
                            $("#HManagerName").val(data.验收人);
                            $("#HKeeperID").val(data.HKeeperID);
                            $("#HKeeperName").val(data.保管员);
                            $("#HDeptID").val(data.HDeptID);
                            $("#HDeptName").val(data.部门);
                            $("#HExplanation").val(data.摘要);
                            $("#HRemark").val(data.表头备注);
                        } else {
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
@@ -2370,6 +583,33 @@
            }
            var date = new Date();
            var day = date.getDate();
            var month = date.getMonth() + 1;
            var year = date.getFullYear();
            var shijian = year + "-" + month + "-" + day;
            //判断是否新增
            if (hID == null || hID == 0) {
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3828' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(shijian);
                        $("#HInterID").val(0);
                    }
                });
            }
            else {//如果修改则走下面 new
                RoadBillMain(hID);
                /* RoadBillSub(linterid);*/
            }
            //表头信息仓库弹窗
            form.on('submit(WareHouse)', function () {
@@ -2382,13 +622,13 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/WareHouseInformation.html', 'yes'],
                    content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
@@ -2409,14 +649,14 @@
                });
            });
            //表头信息验收员弹窗
            form.on('submit(HSecManagerList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '仓库列表',
                    title: '领料人列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
@@ -2454,7 +694,7 @@
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '仓库列表',
                    title: '发料人列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
@@ -2485,44 +725,6 @@
                    }
                });
            });
            //表头信息负责人弹窗
            form.on('submit(HManagerList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '负责人列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/UserInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HManagerName").val(checkStatus.data[0].HName);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //表头信息部门弹窗
            form.on('submit(Department)', function () {
@@ -2563,20 +765,33 @@
            });
            form.on('submit(Exit)', function (data) {//
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                parent.layer.close(index); //再执行关闭
            //退出
            form.on('submit(Exit)', function (data) {
                if (closeType == 0) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                }
                if (closeType == 1) {
                    //关闭弹窗
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                } else if (closeType == 2) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                }
            });
            form.on('submit(Cancel)', function () {
                //sessionStorage["SourceFlag"] = false;
                parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
            })
            //form.on('submit(Cancel)', function () {
            //    //sessionStorage["SourceFlag"] = false;
            //    parent.location.href = "../../../views/index.html"
            //    //window.close();//关闭当前页
            //})
            function formatDate(date) {
                var d = new Date(date),
@@ -2596,12 +811,12 @@
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sMainSub = sMainStr + ';' + sSubStr;
                $.ajax(
                    {
                        type: "POST",
                        url: GetWEBURL() + "/Sc_MouldOtherOutBill/SaveMouldOtherOutBillList", //方法所在页面和方法名
                        url: GetWEBURL() + "/Sc_MouldOtherOutBill/SaveGetMouldOtherOutBillList", //方法所在页面和方法名
                        async: true,
                        data: { "msg": sMainSub },
                        dataType: "json",
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldOtherOutBillList.html
@@ -2,12 +2,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>模治具其他出库单</title>
    <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, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <!--<script src="../../../layuiadmin/layui/layui.js"></script>-->
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
@@ -15,6 +16,7 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
@@ -81,6 +83,10 @@
            </div>
        </div>
    </div>
    <!--<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/' //静态资源所在路径
@@ -99,6 +105,7 @@
            //查询条件
            var sWhere = "";
            var option = [];
            //初始化界面
            set_ClearBill();
@@ -137,65 +144,73 @@
                    , cellMinWidth: 90
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: 'hmainid', hide: true }
                        , { field: '日期', title: '日期', width: 160 }
                        , { field: '单据号', title: '单据号', width: 160 }
                        , { field: 'HWHID', title: 'HWHID', width: 160, hide: true}
                        , { field: '仓库代码', title: '仓库代码', width: 160, hide: true }
                        , { field: '仓库', title: '仓库', width: 200 }
                        , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true }
                        , { field: '验收人代码', title: '验收人代码', width: 200 }
                        , { field: '验收人', title: '验收人', width: 200 }
                        , { field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 125, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '单据号', title: '单据号', width: 195 }
                        , { field: '单据类型', title: '单据类型', width: 110 }
                        , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
                        , { field: '仓库代码', title: '仓库代码', width: 125 }
                        , { field: '仓库', title: '仓库', width: 125 }
                        , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
                        , { field: '领料人代码', title: '领料人代码', width: 180 }
                        , { field: '领料人', title: '领料人', width: 125 }
                        , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true }
                        , { field: '保管员代码', title: '保管员代码', width: 200 }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true}
                        , { field: '部门代码', title: '部门代码', width: 200 }
                        , { field: '部门', title: '部门', width: 115 }
                        //, { field: '模具代码', title: '模具代码', width: 200 }
                        //, { field: '模具名称', title: '模具名称', width: 200 }
                        , { field: '条码编号', title: '条码编号', width: 200 }
                        //, { field: '模具品类', title: '模具品类', width: 200 }
                        //, { field: '模具仓库', title: '模具仓库', width: 200 }
                        , { field: '发料人代码', title: '发料人代码', width: 180 }
                        , { field: '发料人', title: '发料人', width: 125 }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                        , { field: '部门代码', title: '部门代码', width: 115 }
                        , { field: '部门', title: '部门', width: 125 }
                        , { field: '摘要', title: '摘要', width: 125 }
                        , { field: '表头备注', title: '表头备注', width: 125 }
                        , { field: '内部单据号', title: '内部单据号', width: 115 }
                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                        , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
                        , { field: '模具代码', title: '模具代码', width: 125 }
                        , { field: '模具名称', title: '模具名称', width: 125 }
                        , { field: '规格型号', title: '规格型号', width: 125 }
                        , { field: 'Hunitid', title: 'Hunitid', width: 200, hide: true }
                        , { field: '计量单位代码', title: '计量单位代码', width: 125 }
                        , { field: '计量单位', title: '计量单位', width: 125 }
                        , { field: 'HWHSonID', title: 'HWHSonID', width: 200, hide: true }
                        , { field: '发料仓库代码', title: '发料仓库代码', width: 125 }
                        , { field: '发料仓库', title: '发料仓库', width: 125 }
                        , { field: 'HSPID', title: 'HSPID', width: 200, hide: true }
                        , { field: '仓位', title: '仓位', width: 200 }
                        , { field: '设计寿命', title: '设计寿命', width: 200 }
                        , { field: '累积使用寿命', title: '累积使用寿命', width: 200 }
                        , { field: '剩余寿命', title: '剩余寿命', width: 200 }
                        , { field: '表体备注', title: '表体备注', width: 200 }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 200 }
                        , { field: '行关闭人', title: '行关闭人', width: 115, hide: true }
                        , { field: '关闭类型', title: '关闭类型', width: 200 }
                        , { field: '关联数量', title: '关联数量', width: 200 }
                        , { field: 'hsupid', title: 'hsupid', width: 200, hide: true}
                        , { field: '模具供应商代码', title: '模具供应商代码', width: 200 }
                        , { field: '模具供应商', title: '模具供应商', width: 200 }
                        , { field: '摘要', title: '摘要', width: 200 }
                        , { field: '表头备注', title: '表头备注', width: 200 }
                        , { field: '内部单据号', title: '内部单据号', width: 200, hide: true }
                        , { field: '制单人', title: '制单人', width: 115, hide: true }
                        , { field: '制单日期', title: '制单日期', width: 200 }
                        , { field: '审核人', title: '审核人', width: 200 }
                        , { field: '审核日期', title: '审核日期', width: 200, hide: true }
                        , { field: '修改人', title: '修改人', width: 200, hide: true }
                        , { field: '修改日期', title: '修改日期', width: 115, hide: true }
                        , { field: '关闭人', title: '关闭人', width: 200 }
                        , { field: '关闭日期', title: '关闭日期', width: 200 }
                        , { field: '作废人', title: '作废人', width: 200, hide: true }
                        , { field: '作废日期', title: '作废日期', width: 115, hide: true }
                        , { field: '仓位代码', title: '仓位代码', width: 125 }
                        , { field: '仓位', title: '仓位', width: 125 }
                        , { field: '应发数量', title: '应发数量', width: 125 }
                        , { field: '实发数量', title: '实发数量', width: 125 }
                        , { field: '单价', title: '单价', width: 125 }
                        , { field: '金额', title: '金额', width: 125 }
                        , { field: '设计寿命', title: '设计寿命', width: 125 }
                        , { field: '累积使用寿命', title: '累积使用寿命', width: 125 }
                        , { field: '剩余寿命', title: '剩余寿命', width: 125 }
                        , { field: '关联数量', title: '关联数量', width: 125 }
                        , { field: '表体备注', title: '表体备注', width: 125 }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 125 }
                        , { field: '制单人', title: '制单人', width: 125 }
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '审核人', title: '审核人', width: 125 }
                        , { field: '审核日期', title: '审核日期', width: 200, templet: "<div>{{d.审核日期 ==null ? '':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '修改人', title: '修改人', width: 125 }
                        , { field: '修改日期', title: '修改日期', width: 200, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '关闭人', title: '关闭人', width: 125 }
                        , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '作废人', title: '作废人', width: 125 }
                        , { field: '作废日期', title: '作废日期', width: 200, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '行关闭人', title: '行关闭人', width: 125 }
                        , { field: '关闭类型', title: '关闭类型', width: 125 }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                        , { field: '源单单号', title: '源单单号', width: 200 }
                        , { field: '源单类型', title: '源单类型', width: 200 }
                        //, { field: 'hbilltype', title: 'hbilltype', width: 200 }
                        , { field: '源单单号', title: '源单单号', width: 125 }
                        , { field: '源单类型', title: '源单类型', width: 125 }
                    ]]
                };
            }
            //进入页面显示的缓存列表
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Sc_MouldProdMoveBillList/GetMouldOtherOutBillList',
                    url: GetWEBURL() + '/Sc_MouldOtherOutBill/GetMouldOtherOutBill',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    success: function (data1) {
@@ -213,7 +228,6 @@
                    }
                });
            }
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
@@ -223,12 +237,12 @@
                        layer.open({
                            type: 2,
                            skin: 'layui-layer-rim', //加上边框
                            title: '新增模治具其他出库单 ',
                            closeBtn: false,
                            title: '新增其他出库单',
                            closeBtn: 1,
                            shift: 2,
                            area: ['100%', '100%'],
                            maxmin: true,
                            content: '../模治具仓库管理/Sc_MouldOtherOutBillEdit.html',
                            content: '../模治具管理/Sc_MouldOtherOutBillEdit.html',
                            end: function () {
                                //刷新页面,
                                location.reload();
@@ -247,11 +261,12 @@
                            layer.open({
                                type: 2
                                , area: ['100%', '100%']
                                , title: '编辑模治具其他出库单 '
                                , title: '编辑其他出库单'
                                , closeBtn: 1
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: '../模治具仓库管理/Sc_MouldOtherOutBillEdit.html?hID=' + hID
                                , content: '../模治具管理/Sc_MouldOtherOutBillEdit.html?hID=' + hID
                                , resize: false,
                                end: function () {
                                    //刷新页面,
@@ -271,14 +286,13 @@
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        if (checkStatus.data.length === 1) {
                            var HInterID = data[0].hmainid.toString();
                            var InterID = data[0].hmainid.toString();
                            //逻辑删除方法
                            layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                                $.ajax({
                                    type: "GET",
                                    url: GetWEBURL() + "/Sc_MouldOtherOutBill/DeltetMouldOtherOutBillList", //方法所在页面和方法名
                                    data: { "HInterID": HInterID },
                                    url: GetWEBURL() + "Sc_MouldOtherOutBill/DeltetMouldOtherOutBill", //方法所在页面和方法名
                                    data: { "HInterID": InterID },
                                    success: function (result) {
                                        if (result.count == 1) {
                                            layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -311,6 +325,28 @@
                        break;
                };
            });
            ////进入页面显示的缓存列表
            //$.ajax({
            //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
            //    url: GetWEBURL() + '/Sc_MouldProdOutBill/GetMouldProdOutBill',
            //    type: "GET",
            //    data: { "sWhere": sWhere},
            //    success: function (data1) {
            //        if (data1.count == 1) {
            //            option.data = data1.data;
            //            table.render(option);
            //            layer.close(index);
            //        } else {
            //            layer.close(index);
            //            layer.alert(data1.code + data1.Message, { icon: 5 });
            //        }
            //    }, error: function () {
            //        layer.close(index);
            //        layer.alert("接口请求失败!", { icon: 5 });
            //    }
            //});
            //#region å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery(table, option) {
                var HDate = $("#HBeginDate").val();//开始日期
@@ -346,87 +382,6 @@
            //#endregion
            ////进入页面显示的缓存列表
            //$.ajax({
            //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
            //    url: GetWEBURL() + '/Sc_MouldOtherOutBill/GetMouldOtherOutBillList',
            //    type: "GET",
            //    data: { "sWhere": sWhere },
            //    success: function (data1) {
            //        if (data1.count == 1) {
            //            option.data = data1.data;
            //            table.render(option);
            //            layer.close(index);
            //        } else {
            //            layer.close(index);
            //            layer.alert(data1.code + data1.Message, { icon: 5 });
            //        }
            //    }, error: function () {
            //        layer.close(index);
            //        layer.alert("接口请求失败!", { icon: 5 });
            //    }
            //});
            //重置按钮
            //form.on('submit(btnReSearch)', function (data) {
            //    $("#HBillType").val("");//单据类型
            //    $("#HBillNo").val("");//单据号
            //    $("#HSourceBillNo").val("");//源单号
            //    $("#HCreateBy").val("");//制单人
            //    $("#BenginHCreateDate").val("");//开始制单时间
            //    $("#EndHCreateDate").val("");//结束制单时间
            //    $("#btnSearch").click();
            //});
            ////查询按钮
            //form.on('submit(btnSearch)', function (data) {//选择仓位
            //    //var HBillType = $("#HBillType").val();//单据类型
            //    //var HBillNo = $("#HBillNo").val();//单据号
            //    //var HCreateBy = $("#HCreateBy").val();//制单人
            //    //var BenginHCreateDate = $("#BenginHCreateDate").val();//开始制单时间
            //    //var EndHCreateDate = $("#EndHCreateDate").val();//结束制单时间
            //    //if (HBillNo) {
            //    //    sWhere += " and HBillNo like '%" + HBillNo + "%'";
            //    //}
            //    //if (HCreateBy) {
            //    //    sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
            //    //}
            //    //if (BenginHCreateDate) {
            //    //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
            //    //}
            //    //if (EndHCreateDate) {
            //    //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
            //    //}
            //    var index = layer.load(0);
            //    $.ajax({
            //        //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
            //        url: GetWEBURL() + '/Sc_MouldOtherOutBill/GetMouldOtherOutBillList',
            //        type: "GET",
            //        data: { "sWhere": sWhere },
            //        success: function (data1) {
            //            if (data1.count == 1) {
            //                option.data = data1.data;
            //                table.render(option);
            //                layer.close(index);
            //                layer.alert("查询成功", { icon: 1 });
            //            } else {
            //                layer.close(index);
            //                layer.alert(data1.code + data1.Message, { icon: 5 });
            //            }
            //        }, error: function () {
            //            layer.close(index);
            //            layer.alert("接口失效!", { icon: 5 });
            //        }
            //    });
            //    //调用接口后清空sWhere缓存
            //    sWhere = "";
            //    //$("#HBillType").val("");//单据类型
            //    //$("#HBillNo").val("");//单据号
            //    //$("#HSourceBillNo").val("");//源单号
            //    //$("#HCreateBy").val("");//制单人
            //    //$("#BenginHCreateDate").val("");//开始制单时间
            //    //$("#EndHCreateDate").val("");//结束制单时间
            //});
            ////监听行双击事件
            //table.on('rowDouble(mainTable)', function (obj) {
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_MouldOtherInBill.html
@@ -2,260 +2,198 @@
<html>
<head>
    <meta charset="utf-8" />
    <title>新建/编辑模具其他入库单</title>
    <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">
    <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 src="../../../layuiadmin/PubCustom.js"></script>
    <style type="text/css">
        /*begin æ­¤æ ·å¼ç”¨äºŽæ¶ˆé™¤è¡Œå…ƒç´ ä¸­å¸ƒå±€å®½åº¦ä¸å¤Ÿçš„问题*/
        .layui-form-item .layui-inline {
            margin-top: 5px;
            margin-bottom: 5px;
            margin-right: 0px;
        .layui-form-label {
            width: 85px;
        }
        /*end*/
    </style>
</head>
<body>
    <div class="layui-fluid" style="padding: 0;">
        <div class="layui-card" style="padding: 15px;">
            <div class="layui-card-body" style="padding: 1px;">
                <form class="layui-form" action="" lay-filter="component-form-group" style="background-color:white;">
                    <div class="layui-card-header">
                        <div class="layui-btn-group">
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_AddNew" id="set_AddNew">新增</button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CopyBill" id="set_CopyBill">复制</button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">审核</button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">反审核</button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_DeleteBill" id="set_DeleteBill">删除</button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="get_PrintReport" id="get_PrintReport">预览</button>
                            <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">保存</button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">退出</button>
    <div id="layout1" class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <form id="form0" class="layui-form" lay-filter="component-form-group" action="">
                        <div class="layui-card-header">
                            <div class="layui-btn-group">
                                <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">保存</button>
                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">退出</button>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill">
                        <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>
                        </ul>
                        <div class="layui-tab-content">
                            <!--基本信息-->
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item" style="padding-top: 10px;">
                                    <div class="layui-row">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">单据号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
                                                <input type="hidden" name="HInterID" id="HInterID">
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="date" class="layui-input" name="HDate" id="HDate" style="padding-left: 32px;">
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">内部单据号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="date" class="layui-input" name="HInnerBillNo" id="HInnerBillNo" style="padding-left: 32px;">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">仓库</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HWHName" id="HWHName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HWHID" id="HWHID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">验收</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HSecManagerName" id="HSecManagerName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HSecManagerID" id="HSecManagerID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">保管员</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HKeeperName" id="HKeeperName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HKeeperID" id="HKeeperID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">部门</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HDeptName" id="HDeptName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HDeptID" id="HDeptID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">源单类型</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HSourceBillType" id="HSourceBillType" style="padding-left: 32px;">
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">选单号</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HSourceBillNo" id="HSourceBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HSourceBillID" id="HSourceBillID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">摘要</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HExplanation" id="HExplanation" style="padding-left: 32px;">
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">备注</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HRemark" id="HRemark" style="padding-left: 32px;">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!--其他信息-->
                                <div class="layui-tab-item">
                                    <div class="layui-form-item">
                                        <div class="layui-row">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label" style="width: 85px;">制单人</label>
                                                <div class="layui-input-block" style="margin-left: 120px;">
                                                    <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
                        <div class="layui-card-body">
                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                                <!--<ul class="layui-tab-title">
                                <li class="layui-this">基本信息</li>-->
                                <!--<li>其他信息</li>-->
                                <!--</ul>-->
                                <h1 style="text-align:center;"><b>其他入库单</b></h1>
                                <div class="layui-tab-content">
                                    <div class="layui-tab-item layui-show">
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">单据号</label>
                                                <div class="layui-input-inline">
                                                    <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" readonly="readonly" autocomplete="off">
                                                    <input id="HInterID" name="HInterID" type="hidden" />
                                                    <input id="HMaker" name="HMaker" type="hidden" /><!--制单人-->
                                                </div>
                                            </div>
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label" style="width: 85px;">审核人</label>
                                                <div class="layui-input-block" style="margin-left: 120px;">
                                                    <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">日期</label>
                                                <div class="layui-input-inline">
                                                    <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
                                                </div>
                                            </div>
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label" style="width: 85px;">关闭人</label>
                                                <div class="layui-input-block" style="margin-left: 120px;">
                                                    <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">内部单据号</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HInnerBillNo" id="HInnerBillNo" class="layui-input">
                                                </div>
                                            </div>
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label" style="width: 85px;">修改人</label>
                                                <div class="layui-input-block" style="margin-left: 120px;">
                                                    <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">模具仓库</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="WareHouse" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">领料人</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="HSecManagerList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">发料人</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label" style="width: 85px;">制单日期</label>
                                                <div class="layui-input-block" style="margin-left: 120px;">
                                                    <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">部门</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="Department" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label" style="width: 85px;">审核日期</label>
                                                <div class="layui-input-block" style="margin-left: 120px;">
                                                    <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">源单类型</label>
                                                <div class="layui-input-inline">
                                                    <select name="HSourceBillType" lay-filter="aihao" id="HSourceBillType">
                                                        <option value="生产任务单">生产任务单</option>
                                                        <option value="手工录入">手工录入</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label" style="width: 85px;">关闭日期</label>
                                                <div class="layui-input-block" style="margin-left: 120px;">
                                                    <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label" style="width: 85px;">修改日期</label>
                                                <div class="layui-input-block" style="margin-left: 120px;">
                                                    <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">选单号</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:150px;">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-tab-item">
                                    <div class="layui-form-item">
                                        <div class="layui-upload">
                                            <button type="button" class="layui-btn" id="testList">选择文件</button><input class="layui-upload-file" type="file" accept="" name="file" multiple="">
                                            <div class="layui-upload-list">
                                                <table class="layui-table">
                                                    <thead>
                                                        <tr>
                                                            <th>文件名</th>
                                                            <th>大小</th>
                                                            <th>状态</th>
                                                            <th>操作</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody id="ProImgByList">
                                                    </tbody>
                                                </table>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">摘要</label>
                                                <div class="layui-input-inline">
                                                    <textarea placeholder="请输入摘要" class="layui-textarea" name="HExplanation" id="HExplanation"></textarea>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">备注</label>
                                                <div class="layui-input-inline">
                                                    <textarea placeholder="请输入维备注" class="layui-textarea" name="HRemark" id="HRemark"></textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                    <script type="text/html" id="toolbarDemo">
                        <div class="layui-btn-container">
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>增加一行</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>复制一行</button>
                        </div>
                    </script>
                    <script type="text/html" id="xuhao">
                        {{d.LAY_TABLE_INDEX+1}}
                    </script>
                    <!--隐藏字段-->
                    <input type="hidden" name="HInnerBillNo" id="HInnerBillNo" value="">
                </form>
             </div>
                        <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>增加一行</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>复制一行</button>
                            </div>
                        </script>
                        <script type="text/html" id="xuhao">
                            {{d.LAY_TABLE_INDEX+1}}
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <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 type="text/html" id="HSupColor">
        {{#  if(d.HSupFlag === "true"){ }}
        <span style="color: white;background-color:#5FB878;">{{ d.HSupFlag }}</span>
        {{#  } else { }}
        <span style="color: white;background-color:red;">{{ d.HSupFlag }}</span>
        {{#  } }}
    </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>
        //获取参数
        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();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
            var closeType = 2;  //关闭类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
            var closeType = params[params[3]];  //关闭类型
        }
        var hID = params[params[0]];//编辑查看
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
@@ -267,126 +205,109 @@
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , laydate = layui.laydate
                , element = layui.element;
            //常规用法
            laydate.render({
                elem: '#HDate'
            });
            //判断是否登录 æœªç™»å½•则跳到登录页
            if (sessionStorage.login != "login") {
                layer.confirm("登录失效,请重新登录!", {
                    icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
                }, function () { window.location.href = "../../user/login.html"; });
            }
            var params = getUrlVars();
            //获取参数
            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 linterid = params[params[0]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            //判断是否新增
            if (linterid == null || linterid == 0) {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3795' },
                    success: function (d) {
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
                    }
                });
            }
            else {//如果修改则走下面 new
                RoadBillMain(linterid);
                //RoadBillSub(linterid);
            }
            //初始表格数据
            var rowdata = [{
                "HMaterID": "0", "HMaterName": "", "HMaterNumber": "", "HMaterModel": "", "HPropertyNumber": "", "HPropertyName": "", "HSecUnitNumber": "", "HSecUnitName": ""
                , "HSecUnitRate": "0", "HUnitNumber": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": "0", "HLeaveLife": "0", "HUseLife": "0", "HQtyMust": "0", "HQty": "0"
                , "HPrice": "0", "HMoney": "0", "HWHNumber": "", "HWHName": "", "HSPNumber": "", "HSPName": "", "HSPGroupNumber": "", "HSPGroupName": "", "HNewModel": ""
                , "HWallThickness": "", "HHardness": "", "HLastProdModel": "", "HDiameter": "0", "HBackFlag": ""
            }];
            //if (sessionStorage.login != "login") {
            //    layer.confirm("登录失效,请重新登录!", {
            //        icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
            //    }, function () { window.location.href = "../../user/login.html"; });
            //}
            var tableReload = table.reload;
            var option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
                , limit: 500 //每页默认显示的数量
                , cellMinWidth: 90
                , height: 500
                //,url: '/demo/table/user/' //数据接口
                , page: true //开启分页
                , cols: [[ //表头
                    { type: 'checkbox', totalRowText: '合计行' }
                    , { type: 'numbers', title: '序号', totalRow: true }
                    , { field: 'HMaterID', title: '模具ID', edit: 'text', hide: true }
                    , { field: 'HMaterNumber', title: '模具代码', edit: 'text' }
                    , { field: 'HMaterName', title: '模具名称', edit: 'text'}
                    , { field: 'HMaterModel', title: '规格型号', edit: 'text'}
                    , { field: 'HPropertyNumber', title: '辅助属性代码', edit: 'text', width: 110 }
                    , { field: 'HPropertyName', title: '辅助属性名称', edit: 'text', width: 110 }
                    , { field: 'HSecUnitNumber', title: '辅助计量单位代码', edit: 'text', width: 110 }
                    , { field: 'HSecUnitName', title: '辅助计量单位名称', edit: 'text', width: 110 }
                    , { field: 'HSecUnitRate', title: '换算率', edit: 'text' }
                    , { field: 'HUnitNumber', title: '计量单位代码', edit: 'text', width: 110 }
                    , { field: 'HUnitName', title: '计量单位名称', edit: 'text', width: 110 }
                    , { field: 'HBatchNo', title: '批次', edit: 'text', width: 110 }
                    , { field: 'HDesignLife', title: '设计寿命', edit: 'text' }
                    , { field: 'HLeaveLife', title: '剩余寿命', edit: 'text' }
                    , { field: 'HUseLife', title: '使用寿命', edit: 'text' }
                    , { field: 'HQtyMust', title: '应收数量', edit: 'text' }
                    , { field: 'HQty', title: '实收数量', edit: 'text' }
                    , { field: 'HPrice', title: '单价', edit: 'text' }
                    , { field: 'HMoney', title: '金额', edit: 'text' }
                    , { field: 'HWHNumber', title: '收料仓库代码', edit: 'text', width: 110 }
                    , { field: 'HWHName', title: '收料仓库名称', edit: 'text' }
                    , { field: 'HSPNumber', title: '仓位代码', edit: 'text' }
                    , { field: 'HSPName', title: '仓位名称', edit: 'text' }
                    , { field: 'HSPGroupNumber', title: '仓位组代码', edit: 'text' }
                    , { field: 'HSPGroupName', title: '仓位组名称', edit: 'text' }
                    , { field: 'HNewModel', title: '新规格', edit: 'text' }
                    , { field: 'HWallThickness', title: '壁厚', edit: 'text' }
                    , { field: 'HHardness', title: '硬度', edit: 'text' }
                    , { field: 'HLastProdModel', title: '最后生产产品', edit: 'text' }
                    , { field: 'HDiameter', title: '直径', edit: 'text' }
                    , { field: 'HBackFlag', title: '退库类型', edit: 'text' }
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 100 }
                    , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
                    , { field: 'HMaterCode', title: '模具代码', edit: 'text', event: 'HMaterCode', width: 100 }
                    , { field: 'HMaterName', title: '模具名称', edit: 'text', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100 }
                    , { field: 'HBatchNo', title: '批次', edit: 'text', width: 100 }
                    , { field: 'HDesignLife', title: '设计寿命', edit: 'text', width: 100 }
                    , { field: 'HLeaveLife', title: '剩余寿命', edit: 'text', width: 100 }
                    , { field: 'HUseLife', title: '累积使用寿命', edit: 'text', width: 100 }
                    , { field: 'HQtyMust', title: '应发数量', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '实发数量', edit: 'text', width: 100 }
                    , { field: 'HPrice', title: '单价', edit: 'text', width: 100 }
                    , { field: 'HMoney', title: '金额', edit: 'text', width: 100 }
                    , { field: 'HWHID', title: 'HWHID', edit: 'text', width: 100, hide: true }
                    , { field: 'HWHCode', title: '发料仓库代码', edit: 'text', event: 'HWHCode', width: 100 }
                    , { field: 'HWHName', title: '发料仓库', edit: 'text', width: 100 }
                    , { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true }
                    , { field: 'HSPCode', title: '仓位代码', edit: 'text', event: 'HSPCode', width: 100 }
                    , { field: 'HSPName', title: '仓位', edit: 'text', width: 100 }
                    , { field: 'HRemark', title: '表体备注', edit: 'text', width: 100 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
                , limit: 500 //每页默认显示的数量
            };
            //初始加载表格
            option.data = rowdata;
            table.render(option);
            //判断是否新增
            if (hID == null || hID == 0) {
                //初始加载表格{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" }];
                table.render(option);
            }
            else {
                $("#HInterID").val(hID);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + '/Sc_MouldOtherInBill/Sc_MouldOtherInBillListProjectDetai',
                    type: "GET",
                    data: { "sqlWhere": "and hmainid=" + hID },
                    success: function (result) {
                        //console.log(result);
                        //console.log('gouba' + result);
                        if (result.count == 1) {
                            option.data = result.data;
                            table.render(option);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index0);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //头工具栏事件
            var rowid = 0;
            var rows = 0;
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                //新增行表格数据
                var NewRow = {
                    "HMaterID": "0", "HMaterName": "", "HMaterNumber": "", "HMaterModel": "", "HPropertyNumber": "", "HPropertyName": "", "HSecUnitNumber": "", "HSecUnitName": ""
                    , "HSecUnitRate": "0", "HUnitNumber": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": "0", "HLeaveLife": "0", "HUseLife": "0", "HQtyMust": "0", "HQty": "0"
                    , "HPrice": "0", "HMoney": "0", "HWHNumber": "", "HWHName": "", "HSPNumber": "", "HSPName": "", "HSPGroupNumber": "", "HSPGroupName": "", "HNewModel": ""
                    , "HWallThickness": "", "HHardness": "", "HLastProdModel": "", "HDiameter": "0", "HBackFlag": ""
                };
                    , data = checkStatus.data;;
                var AddRow = table.cache['mainTable'];
                var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" };
                switch (obj.event) {
                    case 'btn-AddLine':
                        //table.cache["mainTable"].push(AddRow[rows]);
                        table.cache["mainTable"].push(NewRow);
                        option.data = table.cache["mainTable"];
                        table.render(option);
                        rows++;
                        //layer.msg('增加一行按钮!')
                        break;
                    case 'btn-CopyLine':
                        var copydata = JSON.stringify(data);
                        if (data.length <= 0) {
                            layer.msg("请选择需要复制的一行!");
                            layer.alert("请选择需要复制的一行!");
                        }
                        else if (data.length > 1) {
                            layer.msg("只能选择复制一行!");
                            layer.alert("只能选择复制一行!");
                        }
                        else {
                            var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
@@ -399,7 +320,6 @@
                        break;
                }
            });
            //行内事件
            table.on('tool(mainTable)', function (obj) {
                var data = obj.data;
@@ -417,97 +337,515 @@
                        }
                    });
                }
            });
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        if (obj.event === 'HMaterCode')  //模具信息
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '模具列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../PublicPage/MouldInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
            //保存提交
            form.on('submit(btnSave)', function (data) {//提交
                //var tableData = data.field;
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sMainSub = sMainStr + ';' + sSubStr;
                var ModRightNameAdd = 'Sc_MouldOtherInBill';
                var user = sessionStorage["HUserName"];
                var sBillModeify = sMainStr + ';' + linterid + ';' + user + ';' + ModRightNameAdd;
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HMaterID: checkStatus.data[0].HItemID,
                                        HMaterCode: checkStatus.data[0].HNumber,
                                        HMaterName: checkStatus.data[0].HName,
                                        HMaterSpec: checkStatus.data[0].HModel,
                var index = layer.load();
                if (HType == "Modify") {
                    $.ajax({
                        type: "POST",
                        //url: GetWEBURL() + "/Sc_MouldOtherInBill/AddBill1",
                        url: "http://localhost:12761/Sc_MouldOtherInBill/AddBill1",
                        async: true,
                        data: { "oMain": sBillModeify },
                        dataType: "json",
                        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: "温馨提示" });
                                        HDesignLife: 0,  //设计寿命
                                        HLeaveLife: 0,   //剩余寿命
                                        HQty: 1,         //实收数量
                                        HMoney: 0,       //金额
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                    });
                }
                else {
                    $.ajax({
                        type: "POST",
                        //url: GetWEBURL() + "/Sc_MouldOtherInBill/AddBill",
                        url: "http://localhost:12761/Sc_MouldOtherInBill/AddBill",
                        async: true,
                        data: { "sMainSub": sMainSub },
                        dataType: "json",
                        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: "温馨提示" });
                        if (obj.event === 'HWHCode')  //仓库代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '仓库列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HWHID: checkStatus.data[0].HItemID,
                                        HWHCode: checkStatus.data[0].HNumber,
                                        HWHName: checkStatus.data[0].HName,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                    });
                }
            });
                        if (obj.event === 'HSPCode')  //仓位代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '仓位列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../PublicPage/WareLocationInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
            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);
                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HSPID: checkStatus.data[0].HItemID,
                                        HSPCode: checkStatus.data[0].HNumber,
                                        HSPName: checkStatus.data[0].HName,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        obj.event = "";
                        return false;
                    }
                })
            });
            //监听单元格编辑
            table.on('edit(mainTable)', function (obj) {
                // å•元格编辑之前的值
                var oldText = $(this).prev().text();
                var value = obj.value //得到修改后的值
                    , data = obj.data //得到所在行所有键值
                    , field = obj.field; //得到字段
                //layer.msg('[ID: ' + data.id + '] ' + field + ' å­—段更改为:' + value);
                switch (field) {
                    case "HDesignLife":  //设计寿命
                        value = isNaN(value) ? 0 : value;
                        var HUseLife = isNaN(data.HUseLife) ? 0 : data.HUseLife;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HDesignLife: value,                          //设计寿命
                            HLeaveLife: value - HUseLife,           //剩余寿命=设计寿命-使用寿命
                        });
                        break;
                    case "HLeaveLife":  //剩余寿命
                        var HDesignLife = isNaN(data.HDesignLife) ? 0 : data.HDesignLife;
                        var HUseLife = isNaN(data.HUseLife) ? 0 : data.HUseLife;
                        //同步更新表格和缓存对应的值
                        obj.tr.find('td[data-field=HLeaveLife] input').val(HDesignLife - HUseLife);
                        obj.update({
                            HLeaveLife: HDesignLife - HUseLife,   //剩余寿命=设计寿命-使用寿命
                        });
                        break;
                    case "HUseLife":    //使用寿命
                        var HDesignLife = isNaN(data.HDesignLife) ? 0 : data.HDesignLife;
                        value = isNaN(value) ? 0 : value;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HLeaveLife: HDesignLife - value, //剩余寿命=设计寿命-使用寿命
                        });
                        break;
                    case "HQty":        //实发数量
                        value = isNaN(value) ? 0 : value;
                        var HPrice = isNaN(data.HPrice) ? 0 : data.HPrice;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HMoney: value * HPrice, //金额=实收数量*单价
                        });
                        break;
                    case "HPrice":      //单价
                        value = isNaN(value) ? 0 : value;
                        var HQty = isNaN(data.HQty) ? 0 : data.HQty;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HMoney: value * HQty, //金额=实收数量*单价
                        });
                        break;
                    case "HMoney":     //金额
                        var HPrice = isNaN(data.HPrice) ? 0 : data.HPrice;
                        var HQty = isNaN(data.HQty) ? 0 : data.HQty;
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HMoney: HPrice * HQty, //金额=实收数量*单价
                        });
                        break;
                    default:
                }
            });
            function RoadBillMain(hID)//加载表头
            {
                //alert(hID);
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "/Sc_MouldOtherInBill/Sc_MouldOtherInBillListCheckDetai",
                    type: "GET",
                    data: {
                        "HID": hID
                    },
                    success: function (result) {
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data.h_v_Sc_MouldOtherInBillList[0];
                            console.info(data);
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HBillNo": data.单据号
                                , "HDate": formatDate(data.日期)
                                , "HInnerBillNo": data.内部单据号
                                , "HWHID": data.HWHID                    //仓库ID
                                , "HWHName": data.仓库                   //仓库名称
                                , "HSecManagerID": data.hsecmanagerid    //验收员ID
                                , "HSecManagerName": data.领料人         //验收员名称
                                , "HKeeperID": data.hkeeperid            //保管员ID
                                , "HKeeperName": data.发料人            //保管员名称
                                , "HDeptID": data.HDeptID                 //部门ID
                                , "HDeptName": data.部门                //部门名称
                                , "HSourceBillType": ""                   //源单类型
                                , "XDH": ""                               //选单号
                                , "HExplanation": data.摘要              //摘要
                                , "HRemark": data.表头备注                    //备注
                            });
                        } else {
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.alert("发生错误!", { icon: 5 });
                    }
                });
            }
            var date = new Date();
            var day = date.getDate();
            var month = date.getMonth() + 1;
            var year = date.getFullYear();
            var shijian = year + "-" + month + "-" + day;
            form.on('submit(Cancel)', function () {
                //sessionStorage["SourceFlag"] = false;
                parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
            })
            //判断是否新增
            if (hID == null || hID == 0) {
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3827' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(shijian);
                        $("#HInterID").val(0);
                    }
                });
            }
            else {//如果修改则走下面 new
                RoadBillMain(hID);
                /* RoadBillSub(linterid);*/
            }
            //表头信息仓库弹窗
            form.on('submit(WareHouse)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '仓库列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HWHName").val(checkStatus.data[0].HName);
                        $("#HWHID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //表头信息验收员弹窗
            form.on('submit(HSecManagerList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '领料人列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/UserInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HSecManagerName").val(checkStatus.data[0].HName);
                        $("#HSecManagerID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //表头信息保管员弹窗
            form.on('submit(HKeeperList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '发料人列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/UserInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HKeeperName").val(checkStatus.data[0].HName);
                        $("#HKeeperID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //表头信息部门弹窗
            form.on('submit(Department)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '部门列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/DeptInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HDeptName").val(checkStatus.data[0].HName);
                        $("#HDeptID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //退出
            form.on('submit(Exit)', function (data) {
                if (closeType == 0) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                }
                if (closeType == 1) {
                    //关闭弹窗
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                } else if (closeType == 2) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                }
            });
            //form.on('submit(Cancel)', function () {
            //    //sessionStorage["SourceFlag"] = false;
            //    parent.location.href = "../../../views/index.html"
            //    //window.close();//关闭当前页
            //})
            function formatDate(date) {
                var d = new Date(date),
                    month = '' + (d.getMonth() + 1),
                    day = '' + d.getDate(),
                    year = d.getFullYear();
                if (month.length < 2) month = '0' + month;
                if (day.length < 2) day = '0' + day;
                return [year, month, day].join('-');
            }
            form.on('submit(Saver)', function (data) {//保存
                //debugger;
                data.field.HMaker = sessionStorage["HUserName"];//制单人
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sMainSub = sMainStr + ';' + sSubStr;
                $.ajax(
                    {
                        type: "POST",
                        url: GetWEBURL() + "/Sc_MouldOtherInBill/SaveGetMouldOtherInBillList", //方法所在页面和方法名
                        async: true,
                        data: { "msg": sMainSub },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
                                    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                    parent.layer.close(index); //再执行关闭 Â  Â  Â  Â  Â Â  Â Â Â  Â 
                                });
                            }
                            else {
                                f_alert(data.Message);
                                console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
                            }
                            layer.closeAll("loading");
                        },
                        error: function (err) {
                            f_alert("错误:" + err);
                            console.log("Reason" + sMainStr);
                        }
                    });
            });
            function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });
            }
            //监听提交
            form.verify({
@@ -526,6 +864,113 @@
        var HReasonName, ReasonID, EmpName, SQProcName,
            ProcID, ZRProcName, QRName
            ;
    </script>
        function GetHReasonValue(obj)  //返回不良原因
        {
            HReasonName = obj[0].HName;
            ReasonID = obj[0].HItemID;
        }
        //返回物料
        function GetHMaterNameValue(obj) {  //返回物料
            $("#HMater").val(obj[0].HName);
            $("#HMaterID").val(obj[0].HItemID);
            $("#HMaterNumber").val(obj[0].HNumber);
        }
        //返回工序
        function GetHProcValue(obj) {  //返回工序
            $("#HProcName").val(obj[0].工序);
            $("#HProcID").val(obj[0].HItemID);
            $("#HProcNumber").val(obj[0].工序代码);
        }
        function GetHDeptNameValue(obj) {  //返回部门
            $("#HDepName").val(obj[0].HName);
            $("#HDeptID").val(obj[0].HItemID);
            $("#HDeptNumber").val(obj[0].HNumber);
        }
        //返回单位
        function GetHUnitNameValue(obj) {
            $("#HUName").val(obj[0].HName);
            $("#HUnitID").val(obj[0].HItemID);
            $("#HUnitNumber").val(obj[0].HNumber);
        }
        function GetHKeeperValue(obj) {  //返回责任人
            EmpName = obj[0].HName;
            // $("#HEmpName").val(obj[0].HName);
            //$("#HItemID").val(obj[0].HItemID);
        }
        //function GetHProcValue(obj) {  //返回申请工序
        //    SQProcName = obj[0].工序;
        //    ProcID = obj[0].HItemID;
        //    //$("#HSQProcName").val(obj[0].工序);
        //    //$("#HProcID").val(obj[0].HItemID);
        //}
        function GetHZRValue(obj) {   //返回责任工序
            ZRProcName = obj[0].工序;
            //$("#HZRProcName").val(obj[0].工序);
            //$("#HItemID").val(obj[0].HItemID);
        }
        //HWorker
        function GetHWorkerValue(obj) {  //返回不良确认人
            QRName = obj[0].HName;
            //$("#HQRName").val(obj[0].HName);
            //$("#HItemID").val(obj[0].HItemID);
        }
        function AllowLoadData(sSubStr) {  //非空验证
            //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 ($("#HWHNAME").val() == '') {
            //    layer.msg("仓库没有选择!", { icon: 5 });
            //    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 (!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' });
                //            return false;
                //        }
                //    }
                //}
                for (var i = 0; i <= sSubStr.length - 1; i++) {   //判断扫码数量不能为0
                    if (parseFloat(sSubStr[i].HQty) > 0) {
                        s = 1;
                    }
                }
                if (s == 0) {
                    layer.msg("产品入库记录未扫码", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
                }
            }
            else {
                return true;
            }
        }</script>
</body>
</html>
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_MouldOtherInBillList.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>模治具模具其他入库单列表</title>
    <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, maximum-scale=1">
@@ -210,7 +210,7 @@
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Sc_MouldOtherInBill/GetMouldOtherInBillList',
                    url: GetWEBURL() + '/Sc_MouldOtherInBill/GetMouldOtherInBill',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    success: function (data1) {
@@ -237,7 +237,7 @@
                        layer.open({
                            type: 2,
                            skin: 'layui-layer-rim', //加上边框
                            title: '新增模具领用单',
                            title: '新增其他入库单',
                            closeBtn: 1,
                            shift: 2,
                            area: ['100%', '100%'],
@@ -261,7 +261,7 @@
                            layer.open({
                                type: 2
                                , area: ['100%', '100%']
                                , title: '编辑模具领用单'
                                , title: '编辑其他入库单'
                                , closeBtn: 1
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
@@ -286,13 +286,13 @@
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        if (checkStatus.data.length === 1) {
                            var HItemID = data[0].HItemID.toString();
                            var InterID = data[0].hmainid.toString();
                            //逻辑删除方法
                            layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                                $.ajax({
                                    type: "GET",
                                    url: GetWEBURL() + "Sc_ICMOReportBill/DeltetICMOReportBill", //方法所在页面和方法名
                                    data: { "HItemID": HItemID },
                                    url: GetWEBURL() + "Sc_MouldOtherInBill/DeltetMouldOtherInBill", //方法所在页面和方法名
                                    data: { "HInterID": InterID },
                                    success: function (result) {
                                        if (result.count == 1) {
                                            layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {