zgq
2021-08-24 efc6e45e702dad20f86fbf48d8514db41c1f66ac
Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
9个文件已修改
3403 ■■■■ 已修改文件
WebTM/layuiadmin/Scripts/webConfig.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/Add_Edit_Gy_QCCheckClass.html 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_Add_MouldMaintainBillList.html 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_MouldMaintainBillList.html 173 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_Add_EqpMaintenanceBillList.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EquipDotCheckBillEdit.html 281 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EquipDotCheckBillList.html 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EquipDotCheckPlanBillEdit.html 2747 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EquipDotCheckPlanBillList.html 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js
@@ -1,11 +1,11 @@
function GetWEBURL() {
    //var WEBURL = "http://192.168.16.80:8011/";          //办公室服务器
    //var WEBURL = "http://localhost:8081/SWEAPI/";       //ch本地
    var WEBURL = "http://localhost:8085/API/";   //zgq本地
    //var WEBURL = "http://localhost:8085/API/";   //zgq本地
    //var WEBURL = "http://localhost:8080/API/";   //颜晓军本地配置
    //var WEBURL = "http://localhost:8082/lubao";   //颜晓军本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //杨露本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //章紫柔本地配置
    var WEBURL = "http://localhost:8082/LuBaoAPI/";    //章紫柔本地配置
    //var WEBURL = "http://10.1.4.155/API/";   //江丰客户NEW
    //var WEBURL = "http://47.96.97.237/API/";   //智云服务器
    //var WEBURL = "http://183.129.128.86:9090/API/";   //凯贝奈特客户服务器
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Add_Edit_Gy_QCCheckClass.html
@@ -134,12 +134,15 @@
            //    }, function () { window.location.href = "../../user/login.html"; });
            //}
            //#region å¤´éƒ¨å·¥å…·æ äº‹ä»¶
            //清除
            form.on('submit(Cancel)', function () {
                //sessionStorage["SourceFlag"] = false;
                parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
            })
            //保存
            form.on('submit(Saver)', function (data) {//保存
                //debugger;
                var ModRightNameAdd = 'Gy_RepairType_Edit';
@@ -216,6 +219,11 @@
                        });
                }
            });
            //退出按钮
            form.on('submit(Exit)', function () {
                Pub_Close(1);
            })
            //#endregion
            function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });
@@ -261,6 +269,7 @@
                }
            });
            //检验项目类别类别弹窗
            form.on('submit(HQCCheckClassList)', function () {
                //页面层-自定义
@@ -299,10 +308,7 @@
                });
            });
            //退出按钮
            form.on('submit(Exit)', function () {
                Pub_Close(1);
            })
        });
    </script>
</body>
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_Add_MouldMaintainBillList.html
@@ -194,7 +194,7 @@
            var option2;
            var option1;
            var sBillType = "3807";
            var TabRow = { "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": "0 ", "HManagerNumber": "", "HManagerName": "", "HRemark": "" };
            var TabRow = { "HMaintainItemID": 0, "HMaintainItemNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": "0 ", "HManagerNumber": "", "HManagerName": "", "HRemark": "" };
            var TabRow1 = { "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": "0", "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HQtyMust": "0", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "" };
            //#endregion
@@ -352,7 +352,7 @@
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        if (obj.event === 'HMaintainNumber')  //保养项目信息
                        if (obj.event === 'HMaintainItemNumber')  //保养项目信息
                        {
                            //页面层-自定义
                            layer.open({
@@ -376,7 +376,7 @@
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HMaintainItemID: checkStatus.data[0].HItemID,
                                        HMaintainNumber: checkStatus.data[0].HNumber,
                                        HMaintainItemNumber: checkStatus.data[0].HNumber,
                                        HMaintainItem: checkStatus.data[0].HName,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
@@ -642,7 +642,7 @@
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HMaintainItemID', title: '保养项目ID', edit: 'text', hide: true }
                    , { field: 'HMaintainNumber', title: '保养项目代码', edit: 'text', event: 'HMaintainNumber' }
                    , { field: 'HMaintainItemNumber', title: '保养项目代码', edit: 'text', event: 'HMaintainItemNumber' }
                    , { field: 'HMaintainItem', title: '保养项目', edit: 'text' }
                    , { field: 'HMaintainPart', title: '保养部位', edit: 'text' }
                    , { field: 'HClaim', title: '具体要求', edit: 'text' }
@@ -753,7 +753,7 @@
                    },
                    success: function (result) {
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data.h_v_Sc_MouldMaintainBillList[0];
                            var data = result.data.h_v_Sc_MouldMaintain[0];
                            form.val("component-form-group", {
                                "HBillNo": data.单据号
                                , "HDate": formatDate(data.日期)
@@ -765,6 +765,7 @@
                                , "HPlanNo": data.保养计划编号
                                , "HPlanInterID": data.保养计划内码
                                , "HMouldID": data.HMouldID
                                , "HMouldName": data.产品模具
                            });
@@ -800,8 +801,10 @@
                    data: { "HInterID": linterid },
                    success: function (result) {
                        if (result.count == 1) {
                            option.data = result.data;
                            option.data = result.list[0];
                            table.render(option);
                            option2.data = result.list[1];
                            table.render(option2);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_MouldMaintainBillList.html
@@ -75,7 +75,22 @@
                                </div>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <div class="layui-tab layui-tab-card">
                            <ul class="layui-tab-title">
                                <li class="layui-this">保养项信息</li>
                                <li>配件信息</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
                                </div>
                            </div>
                        </div>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>预览</button>-->
@@ -90,6 +105,12 @@
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>生成送货单</button>-->
                            </div>
                        </script>
                        <script type="text/html" id="xuhao">
                            {{d.LAY_TABLE_INDEX+1}}
                        </script>
                        <script type="text/html" id="xuhao1">
                            {{d.LAY_TABLE_INDEX+1}}
                        </script>
                    </form>
                </div>
@@ -119,6 +140,8 @@
            //查询条件
            var sWhere = "";
            var option = [];
            var option1 = [];
            var option2 = [];
            //#endregion
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
@@ -148,6 +171,35 @@
                };
            });
            //点击主表带出从表数据
            table.on('row(mainTable)', function (obj) { //注:tool æ˜¯å·¥å…·æ¡äº‹ä»¶åï¼Œtest æ˜¯ table åŽŸå§‹å®¹å™¨çš„å±žæ€§ lay-filter="对应的值"
                //var flag = !obj.tr.find(':checkbox:first').prop('checked');
                //obj.tr.find(':checkbox').prop('checked', flag);
                //if (flag) {
                //    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');
                //    obj.tr.next().find('.layui-form-checkbox').removeClass('layui-form-checked');
                //}
                var datas = obj.data; //获得当前行数据
                var linterid = datas.hmainid;
                $.ajax({
                    url: GetWEBURL() + 'Sc_MouldMaintainBill/Sc_MouldMaintainBillListProjectDetaiNew',
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option1.data = data1.list[0];
                            table.render(option1);
                            option2.data = data1.list[1];
                            table.render(option2);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
                    }
                });
            });
            // æŸ¥è¯¢æŒ‰é’®
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery();
@@ -160,28 +212,32 @@
         //#endregion
            //#region å½“前页面加载所有方法
            // åˆå§‹åŒ–界面
            function set_ClearBill() {
                //初始化表格
         //#region å½“前页面加载所有方法
         // åˆå§‹åŒ–界面
         function set_ClearBill() {
                //初始化表格(主表)
                set_InitGrid();
                //初始化表格(子表)
                set_InitGrid1();
                //初始化表格(子表)
                set_InitGrid2();
                //查询
                get_Display(sWhere);
            }
            //初始化表格
            //初始化表格(主)
            function set_InitGrid() {
                 option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , height: 'full-50'
                    , height: '400'
                    , page: true
                    , cellMinWidth: 90
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 160 }
                        , { field: '日期', title: '日期', width: 160, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '单据号', title: '单据号', width: 160 }
                        , { field: '单据类型', title: '单据类型', width: 160, hide: true }
                        , { field: '保养计划编号', title: '保养计划编号', width: 200 }
@@ -189,44 +245,85 @@
                        , { field: 'HMouldID', title: 'HMouldID', width: 200, hide: true }
                        , { field: '产品模具代码', title: '产品模具代码', width: 200 }
                        , { field: '产品模具', title: '产品模具', width: 200 }
                        , { field: '保养开始日期', title: '保养开始日期', width: 200 }
                        , { field: '保养结束日期', title: '保养结束日期', width: 200 }
                        , { field: '保养开始日期', title: '保养开始日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '保养结束日期', title: '保养结束日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '摘要', title: '摘要', width: 200 }
                        , { field: '内部单据号', title: '内部单据号', width: 200 }
                        , { field: '备注', title: '备注', width: 200 }
                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                        , { field: 'hmaterid', title: 'hmaterid', width: 115, hide: true }
                        , { field: '配件代码', title: '配件代码', width: 200 }
                        , { field: '配件名称', title: '配件名称', width: 200 }
                        , { field: 'hunitid', title: 'hunitid', width: 200, hide: true }
                        , { field: '单位代码', title: '单位代码', width: 200 }
                        , { field: '单位名称', title: '单位名称', width: 200 }
                        , { field: '实际用量', title: '实际用量', width: 115 }
                        , { field: '标准用量', title: '标准用量', width: 200 }
                        , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true }
                        , { 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, hide: true }
                        , { field: '制单人', title: '制单人', width: 115, hide: true }
                        , { field: '制单日期', title: '制单日期', width: 200 }
                        , { field: '制单人', title: '制单人', width: 115 }
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { 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, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '修改人', title: '修改人', width: 200 }
                        , { field: '修改日期', title: '修改日期', width: 115, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '关闭人', title: '关闭人', width: 200 }
                        , { field: '关闭日期', title: '关闭日期', width: 200 }
                        , { field: '作废人', title: '作废人', width: 200, hide: true }
                        , { field: '作废日期', title: '作废日期', width: 115, hide: true }
                        , { 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: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '作废人', title: '作废人', width: 200 }
                        , { field: '作废日期', title: '作废日期', width: 115, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                    ]]
                };
                table.render(option);
            }
            //初始化表格(子表)
            function set_InitGrid1()
            {
                var ajaxLoad = layer.load();
                option1 = {
                    elem: '#mainTable1'
                    //, toolbar: '#toolbarDemo'
                    , height: '350'
                    , page: true
                    , cellMinWidth: 90
                    , cols: [[
                        //{ type: 'checkbox', fixed: 'left' }
                        , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                        , { field: 'HMaintainItemID', title: '保养项目ID', width: 200, hide: true }
                        , { field: 'HMaintainItemNumber', title: '保养项目代码', width: 200}
                        , { field: 'HMaintainItem', title: '保养项目', width: 200}
                        , { field: 'HMaintainPart', title: '保养部位', width: 200}
                        , { field: 'HClaim', title: '具体要求', width: 200}
                        , { field: 'HManagerID', title: '负责人ID', width: 200, hide: true }
                        , { field: 'HManagerNumber', title: '负责人代码', width: 200}
                        , { field: 'HManagerName', title: '负责人', width: 200}
                        , { field: 'HRemark', title: '备注', width: 200}
                    ]]
                };
                option1.data = [];
                table.render(option1);
                layer.close(ajaxLoad);
            }
            //初始化表格(子表)
            function set_InitGrid2() {
                var ajaxLoad = layer.load();
                option2 = {
                    elem: '#mainTable2'
                    //, toolbar: '#toolbarDemo'
                    , height: '350'
                    , page: true
                    , cellMinWidth: 90
                    , cols: [[
                        //{ type: 'checkbox', fixed: 'left' }
                        , { templet: '#xuhao1', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                        , { field: 'HMaterID', title: '配件ID', width:200, hide: true }
                        , { field: 'HMaterNumber', title: '配件代码', width: 200}
                        , { field: 'HMaterName', title: '配件名称', width: 200}
                        , { field: 'HMaterSpec', title: '规格型号', width: 200}
                        , { field: 'HUnitID', title: '单位ID', width: 200, hide: true }
                        , { field: 'HUnitNumber', title: '单位代码', width: 200}
                        , { field: 'HUnitName', title: '单位名称', width: 200}
                        , { field: 'HQty', title: '实际用量', width: 200}
                        , { field: 'HQtyMust', title: '标准用量', width: 200 }
                        , { field: 'HManagerID', title: '负责人ID', width: 200, hide: true }
                        , { field: 'HManagerNumber', title: '负责人代码', width: 200}
                        , { field: 'HManagerName', title: '负责人', width: 200 }
                        , { field: 'HRemark', title: '备注', width: 200 }
                    ]]
                };
                option2.data = [];
                table.render(option2);
                layer.close(ajaxLoad);
            }
            //查询
WebTM/views/É豸¹ÜÀí/Sb_Add_EqpMaintenanceBillList.html
@@ -230,10 +230,8 @@
            //#endregion
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //初始化表单插件
            set_InitFrom();
            //初始化表格
            set_InitGrid();
            //判断操作类型
@@ -475,7 +473,7 @@
                    $.ajax(
                        {
                            type: "POST",
                            url: GetWEBURL() + "/Sb_EqpRepairWorkBill/SaveGetEqpRepairWorkBillList", //方法所在页面和方法名
                            url: GetWEBURL() + "/Sb_EqpRepairWorkBill/SaveGetEqpRepairWorkBillWebList", //方法所在页面和方法名
                            async: true,
                            data: { "msg": sMainSub },
                            dataType: "json",
@@ -853,7 +851,7 @@
                    return false;
                }
                //判断物料明细项
                if (typeof (sSubStr) == "undefined" || sSubStr == "") {
                if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") {
                    layer.msg("没有物料明细记录", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
                }
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckBillEdit.html
@@ -71,7 +71,7 @@
                                                <div class="layui-input-inline">
                                                    <input type="hidden" name="HEquipID" id="HEquipID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="text" name="HEquipName" id="HEquipName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="ProductModulList" style="width:40px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="ProductModulList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
@@ -139,13 +139,23 @@
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
    <script>
        //获取参数
        var params = get_UrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
        }
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
           //#region å…¬ç”¨å˜é‡
            //#region å…¬ç”¨å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
@@ -154,62 +164,37 @@
                , laydate = layui.laydate
                , element = layui.element;
            var option;
            var option=[];
            var sBillType = "3903";
            var TabRow = { "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode":"","HManagerName":"", "HRemark": "" };
            var Sctag = "0";
            var columns = "";
            var TabRow = { /*"HDotCheckID": 0, "HDotCheckCode": "",*/"HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" };
            var date = new Date();
            var day = date.getDate();
            var month = date.getMonth() + 1;
            var year = date.getFullYear();
            var shijian = year + "-" + month + "-" + day;
            //#endregion
           //#endregion
           //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //判断是否登录 æœªç™»å½•则跳到登录页
            //get_LoginIs();
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //初始化表单插件
            set_InitFrom();
            //初始化表格
            set_InitGrid();
            //获取页面跳转参数
            var params = get_UrlVars();
            if (typeof (params[params[0]]) == "undefined") {
                var OperationType = 1;//操作类型
            } else {
                var OperationType = params[params[0]];//操作类型
                var linterid = params[params[1]];//源单id
                var HSouceBillType = params[params[2]];//源单类型
            }
            //判断操作类型
            if (OperationType == 1) {//无源新增
                $("#HItemID").val(0);
                set_AddFNew();
            }
            else if (OperationType == 3) {//编辑
                $("#HItemID").val(linterid);//修改时主表ID
                //编辑状态时,根据内码,获取信息并写入界面
                set_EditFromGrid(linterid);
            }
            else {
                layer.alert("未知操作类型!", { icon: 5 });
            }
            //#endregion
        //#endregion
           //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
            //#region å¤´å·¥å…·æ äº‹ä»¶
            //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var rowid = 0;
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                var AddRow = table.cache['mainTable'];
                    , data = checkStatus.data;
                var NewRow = TabRow;
                switch (obj.event) {
                    //新增一行
@@ -220,16 +205,13 @@
                        break;
                }
            });
            //#endregion
            //#region è¡Œå†…事件
            //行内事件
            table.on('tool(mainTable)', function (obj) {
                set_GridDelete(obj);   //行内删除
                set_GridCellCheck(obj); //行内快捷键筛选
            });
            //#endregion
            //#region è¡¨å¤´ä¿¡æ¯è®¾å¤‡å¼¹çª—
            //表头信息设备弹窗
            form.on('submit(ProductModulList)', function () {
                //页面层-自定义
                layer.open({
@@ -263,57 +245,56 @@
                    }
                });
            });
            //#endregion
            //#region æäº¤ä¿å­˜
            // æäº¤ä¿å­˜
            form.on('submit(set_SaveBill)', 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() + "/Sb_EquipDotCheckBill/SaveEquipDotCheckBillList", //方法所在页面和方法名
                        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 {
                if (AllowLoadData(sSubStr)) {
                    $.ajax(
                        {
                            type: "POST",
                            url: GetWEBURL() + "/Sb_EquipDotCheckBill/SaveEquipDotCheckBillList", //方法所在页面和方法名
                            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(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);
                        }
                    });
                                f_alert("错误:" + err);
                                console.log("Reason" + sMainStr);
                            }
                        });
                }
            })
            //#endregion
            //#region é€€å‡ºæŒ‰é’®
            //退出按钮
            form.on('submit(Cancel)', function () {
                Pub_Close(1);
            })
            //#endregion
        //#endregion
           //#region æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //#region åˆå§‹åŒ–表单
            //#region æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //初始化表单
            function set_InitFrom() {
                laydate.render({
                    elem: '#HDate',
@@ -325,18 +306,19 @@
                    elem: '#HEndDate'
                });
            }
            //#endregion
            //#region åˆå§‹åŒ–表格
            //初始化表格
            function set_InitGrid() {
                //表头
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    //, { field: 'HDotCheckID', title: '点检项目代码', edit: 'text', hide: true }
                    //, { field: 'HDotCheckCode', title: '点检项目代码', edit: 'text', event: "HDotCheckCode" }
                    , { field: 'HDotCheckItem', title: '点检项目', edit: 'text', event: "" }
                    , { field: 'HDotCheckPart', title: '点检部位', edit: 'text', event: "" }
                    , { field: 'HClaim', title: '具体要求', edit: 'text' }
                    , { field: 'HManagerID', title: '负责人代码', edit: 'text', hide: true}
                    , { field: 'HManagerCode', title: '负责人代码', edit: 'text', event: 'HManagerCode'}
                    , { field: 'HManagerID', title: '负责人代码', edit: 'text', hide: true }
                    , { field: 'HManagerCode', title: '负责人代码', edit: 'text', event: 'HManagerCode' }
                    , { field: 'HManagerName', title: '负责人名称', edit: 'text' }
                    , { field: 'HRemark', title: '备注', event: "", edit: 'text' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150 }
@@ -345,7 +327,7 @@
                    id: 'mainTable'
                    , elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: false
                    , page: true
                    , cellMinWidth: 120
                    , height: 500
                    , cols: [columns]
@@ -354,17 +336,13 @@
                    }
                };
            }
            //#endregion
            //#region è¡¨æ ¼å¢žåŠ è¡Œäº‹ä»¶
            //增加一行事件
            function btnAddLine(NewRow) {
                table.cache["mainTable"].push(NewRow);
                option.data = table.cache["mainTable"];
                table.render(option);
            }
            //#endregion
            //#region è¡¨æ ¼å¤åˆ¶è¡Œäº‹ä»¶
            //表格复制一行事件
            function btnCopyLine(data) {
                var copydata = JSON.stringify(data);
                if (data.length <= 0) {
@@ -381,31 +359,66 @@
                    table.render(option);//将数据渲染到表格上
                }
            }
            //#endregion
            //#region è¡¨æ ¼è¡Œå†…事件删除
            // è¡¨æ ¼è¡Œå†…事件删除
            function set_GridDelete(obj) {
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                        console.log("索引为:" + rowIndex);
                        if (rowIndex === '0') {
                            layer.msg('首行无法删除!!!');
                        } else {
                            obj.del();
                            option.data = table.cache["mainTable"];//将数据绑定到data上
                            table.reload(option);
                            //obj.del();
                            //layer.close(index);
                            var oldData = table.cache["mainTable"];
                            oldData.splice(obj.tr.data('index'), 1);
                            table.reload('mainTable', { data: oldData });
                            layer.close(index);
                        }
                    });
                }
            }
            //#endregion
            //#region è¡¨æ ¼è¡Œå†…事件快捷键筛选
            // è¡¨æ ¼è¡Œå†…事件快捷键筛选
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        //if (obj.event === 'HDotCheckCode')  //点检项目代码
                        //{
                        //    //页面层-自定义
                        //    layer.open({
                        //        type: 2,
                        //        skin: 'layui-layer-rim', //加上边框
                        //        title: '物料列表',
                        //        closeBtn: 1,
                        //        shift: 2,
                        //        area: ['90%', '90%'],
                        //        maxmin: true,
                        //        content: ['../PublicPage/CheckItemInformation.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({
                        //                HDotCheckID: checkStatus.data[0].HItemID,
                        //                HDotCheckCode: checkStatus.data[0].HNumber,
                        //                HDotCheckItem: checkStatus.data[0].HName
                        //            });
                        //            layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        //        }
                        //        , btn2: function (index, layero) {
                        //            //按钮【按钮二】的回调
                        //            //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                        //        },
                        //        end: function () {
                        //        }
                        //    });
                        //}
                        if (obj.event === 'HManagerCode')  //负责人代码
                        {
                            //页面层-自定义
@@ -448,9 +461,7 @@
                    }
                })
            }
             //#endregion
            //#region èŽ·å–æœ€å¤§å•æ®å·
            //获取最大单据号及默认值赋值
            function get_MAXNum() {
                //获取最大单据号 new
                $("#HInterID").val("0");
@@ -460,36 +471,30 @@
                    type: "GET",
                    data: { "HBillType": sBillType },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(shijian);
                        $("#HBeginDate").val(shijian);
                        $("#HEndDate").val(shijian);
                        $("#HCheckBeginDate").val(shijian);
                        $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                        $("#HBeginDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                        $("#HEndDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                        $("#HInterID").val(0);
                    }
                });
            }
            //#endregion
            //#region æ— æºå•新增
            //无源单新增
            function set_AddFNew() {
                //获取最大单据号
                get_MAXNum();
                option.data = [TabRow];
                table.render(option);
            }
            //#endregion
            //#region ç¼–辑获取表头、获取表体
            //编辑获取表头、获取表体
            function set_EditFromGrid(linterid) {
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
                option.data = [TabRow];
                table.render(option);
            }
            //#endregion
            //#region ç¼–辑获取表头
            //编辑获取表头
            function set_EditForm(linterid) {
                $.ajax({
                    url: GetWEBURL() + "Sb_EquipDotCheckBill/Sb_EquipDotCheckBillListCheckDetai",
@@ -521,9 +526,7 @@
                    }
                });
            }
            //#endregion
            //#region ç¼–辑获取表体
            // ç¼–辑获取表体
            function set_EditGrid(linterid) {
                $("#HInterID").val(linterid);//修改时主表ID
                //编辑加载数据
@@ -546,9 +549,7 @@
                    }
                });
            }
            //#endregion
            //#region è¡¨å•数据编辑时间格式化
            // è¡¨å•数据编辑时间格式化
            function formatDate(date) {
                var d = new Date(date),
                    month = '' + (d.getMonth() + 1),
@@ -560,11 +561,39 @@
                return [year, month, day].join('-');
            }
           //#endregion
           //#endregion
            //数据验证
            function AllowLoadData(sSubStr) {
                if ($("#HEquipName").val() == '') {
                    layer.msg("设备没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
                }
                //判断物料明细项
                if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr == "[]") {
                    layer.msg("没有物料明细记录", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return false;
                }
                if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
                    sSubStr = JSON.parse(sSubStr);
                    for (var i = 0; i < sSubStr.length; i++) {
                        //if (sSubStr[i].HDotCheckCode == "") {
                        //    layer.msg("明细记录第" + (i + 1) + "行,点检项目代码信息为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        //    return false;
                        //}
                        if (sSubStr[i].HDotCheckItem == "") {
                            layer.msg("明细记录第" + (i + 1) + "行,点检项目代码信息为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            return false;
                        }
                        if (sSubStr[i].HManagerCode == "") {
                            layer.msg("明细记录第" + (i + 1) + "行,负责人代码信息为空!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            return false;
                        }
                        else {
                            return true;
                        }
                    }
                }
            }
            //#endregion
        });
    </script>
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckBillList.html
@@ -152,33 +152,25 @@
                        break;
                };
            });
            //#endregion
            //#region æŸ¥è¯¢æŒ‰é’®
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery();
            });
            //#endregion
            //#region é‡ç½®æŒ‰é’®
            //置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //#endregion
           //#endregion
            //#region æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //#region åˆå§‹åŒ–界面
            //初始化界面
            function set_ClearBill() {
                //初始化表格
                set_InitGrid();
                //查询
                get_Display(sWhere);
            }
            //#endregion
            //#region åˆå§‹åŒ–表格方法
            //初始化表格方法
            function set_InitGrid() {
                option = {
                    elem: '#mainTable'
@@ -227,9 +219,7 @@
                    ]]
                };
            }
            //#endregion
            //#region æŸ¥è¯¢
            //查询
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                //进入页面显示的缓存列表
@@ -252,9 +242,7 @@
                    }
                });
            }
            //#endregion
            //#region æ–°å¢ž
            //新增
            function set_AddNew() {
                layer.open({
                    type: 2,
@@ -274,9 +262,7 @@
                    }
                });
            }
            //#endregion
            //#region ç¼–辑
            //编辑
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
@@ -305,9 +291,7 @@
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
            //#region åˆ é™¤
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
@@ -345,9 +329,7 @@
                }
            }
            //#endregion
            //#region å¿«é€Ÿè¿‡æ»¤
            //快速过滤
            function get_FastQuery() {
                var HBillType = $("#HBillType").val();//单据类型
                var HBillNo = $("#HBillNo").val();//单据号
@@ -369,9 +351,7 @@
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶æ–¹æ³•
            //重置过滤条件方法
            function set_ClearQuery() {
                $("#HBillType").val("");//单据类型
                $("#HBillNo").val("");//单据号
@@ -381,9 +361,7 @@
                $("#EndHCreateDate").val("");//结束制单时间
                sWhere = "";
            }
            //#endregion
            //#region åˆ·æ–°
            //刷新
            function get_Refresh() {
                set_ClearQuery();
                get_Display(sWhere);
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckPlanBillEdit.html
@@ -64,8 +64,9 @@
                                            <div class="layui-inline">
                                                <label class="layui-form-label">设备</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HEquipID" id="HEquipID" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="ProductModulList" style="width:40px;">
                                                    <input type="text" name="HEquipName" id="HEquipName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HEquipID" id="HEquipID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="HEquipList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
@@ -146,24 +147,17 @@
    <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>
    <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 = get_UrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
        }
        var params = getUrlVars();
        var hID = params[params[0]];//编辑查看
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
@@ -177,2312 +171,60 @@
                , form = layui.form
                , laydate = layui.laydate
                , element = layui.element;
            var option;
            var sBillType = "3904";
            var TabRow = { "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HRemark": "" };
            //常规用法
            laydate.render({
                elem: '#HDate',
            });
            laydate.render({
                elem: '#HBeginDate'
            });
            laydate.render({
                elem: '#HEndDate'
            });
            //判断是否登录 æœªç™»å½•则跳到登录页
            //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'
                , height: 500
                //,url: '/demo/table/user/' //数据接口
                , page: true //开启分页
                , cols: [[ //表头
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HDotCheckItem', title: '点检项目', edit: 'text', event: "" }
                    , { field: 'HDotCheckPart', title: '点检部位', edit: 'text', event: "" }
                    , { field: 'HClaim', title: '具体要求', edit: 'text' }
                    , { field: 'HManagerID', title: '负责人代码', edit: 'text' }
                    /*, { field: 'HManagerName', title: '负责人名称', edit: 'text' }*/
                    , { field: 'HRemark', title: '备注', event: "", edit: 'text' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150 }
                ]]
                , limit: 500 //每页默认显示的数量
            };
            //判断是否新增
            if (hID == null || hID == 0) {
                //初始加载表格{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                option.data = [{ "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HRemark": "" }];
                table.render(option);
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //初始化表单插件
            set_InitFrom();
            //初始化表格
            set_InitGrid();
            //判断操作类型
            if (OperationType == 1) {//无源单
                set_AddFNew();
            }
            else if (OperationType == 3) {//编辑
                set_EditFromGrid();
            }
            else {
                $("#HInterID").val(hID);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai',
                    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 });
                    }
                });
                layer.alert("未知操作类型!", { icon: 5 });
            }
            //#endregion
            //头工具栏事件
            var rowid = 0;
            var rows = 0;
            //#region å¤´å·¥å…·æ äº‹ä»¶
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                var AddRow = table.cache['mainTable'];
                var NewRow = { "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HRemark": "" };
                    , data = checkStatus.data;
                var NewRow = TabRow;
                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('增加一行按钮!')
                    //增加一行
                    case 'btn-AddLine': set_AddLine(NewRow);
                        break;
                    case 'btn-CopyLine':
                        var copydata = JSON.stringify(data);
                        if (data.length <= 0) {
                            layer.alert("请选择需要复制的一行!");
                        }
                        else if (data.length > 1) {
                            layer.alert("只能选择复制一行!");
                        }
                        else {
                            var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
                            var copyrow = copydata2.substring(0, copydata2.length - 1);//去除末尾字符']'
                            table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
                            option.data = table.cache["mainTable"];//将数据绑定到data上
                            table.render(option);//将数据渲染到表格上
                            //layer.alert(copyrow);
                        }
                    //复制一行
                    case 'btn-CopyLine': set_CopyLine(data);
                        break;
                }
            });
            //行内事件
            table.on('tool(mainTable)', function (obj) {
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    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 });
                            layer.close(index);
                        }
                    });
                }
                if (obj.event === 'ReasonNameEvent') {
                    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_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            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_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            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_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            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
                                    });
                                }
                            })
                            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;
                    }
                }
                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;
                    }
                }
                set_GirdDelete(obj);//删除事件
                set_GridCellCheck(obj); //行内快捷键筛选(F7)
            });
            function RoadBillMain(hID)//加载表头
            {
               // alert(hID);
               // debugger;
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListCheckDetai",
                    type: "GET",
                    data: {
                        "HID": hID
                    },
                    success: function (result) {
                        //console.log(result.code)
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            //console.log(result)
                            var data = result.data.h_v_Sb_EquipDotCheckPlanBillList[0];
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HBillNo": data.单据号
                                , "HDate": formatDate(data.日期)
                                , "HInnerBillNo": data.内部单据号
                                , "HDeptID": data.HDeptID                 //验收部门
                                , "HEmpID": data.HEmpID                   //验收人
                                , "HEmpID": data.HEmpID                   //负责人
                                , "HEquipID": data.HEquipID               //设备
                                , "HCheckBeginDate": formatDate(data.发生日期)        //维修日期
                                , "HCheckResult": data.验收结论           //验收结论
                                , "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;
            //判断是否新增
            if (hID == null || hID == 0) {
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3904' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(shijian);
                        $("#HBeginDate").val(shijian);
                        $("#HEndDate").val(shijian);
                        $("#HCheckBeginDate").val(shijian);
                        $("#HInterID").val(0);
                    }
                });
            }
            else {//如果修改则走下面 new
                RoadBillMain(hID);
                /* RoadBillSub(linterid);*/
            }
            //成品模具弹窗
            form.on('submit(ProductModulList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '模具列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['60%', '70%'],
                    maxmin: true,
                    content: ['../Baseset/基础资料/Gy_ModulList.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        alert("aa");
                        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('请选择数据');
                        }
                        console.log("aa" + checkStatus.data);//选中的值
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.layer.close(index); //再执行关闭 Â  Â 
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //选择产品弹窗
            form.on('submit(HMateria-BT)', function () {//产品
                layer.open({
                    type: 2
                    , area: ['80%', '80%']
                    , title: '物料'
                    , shade: 0.6 //遮罩透明度
                    //, maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../Baseset/基础资料/Gy_MaterialList.html', 'yes']
                    , resize: false
                    , cancel: function (index, layero) {
                    }
                })
            });
            //选择工序
            form.on('submit(HProc-BT)', function () {//选择工序
                layer.open({
                    type: 2
                    , area: ['80%', '80%']
                    , title: '工序列表'
                    , shade: 0.6 //遮罩透明度
                    //, maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../Baseset/基础资料/Gy_ProcList.html', 'yes']
                    , resize: false
                    , cancel: function (index, layero) {
                    }
                })
            });
            //选择部门
            form.on('submit(HDepart-BT)', function () {//选择部门
                layer.open({
                    type: 2
                    , area: ['80%', '80%']
                    , title: '部门列表'
                    , shade: 0.6 //遮罩透明度
                    //, maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../Baseset/基础资料/Gy_DepartmentList.html', 'yes']
                    , resize: false
                    , cancel: function (index, layero) {
                    }
                })
            });
            //选择单位
            form.on('submit(HUnitID-BT)', function () {//选择单位
                layer.open({
                    type: 2
                    , area: ['666px', '666px']
                    , title: '单位列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_UnitList.html', 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
            //退出
            form.on('submit(Exit)', function (data) {//
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                parent.layer.close(index); //再执行关闭
            });
            //选择责任人
            form.on('submit(HEmployeeID-BT)', function () {//选择责任人
                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
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
            //选择责任工序
            form.on('submit(HZRProcID-BT)', function () {//选择责任工序
                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
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
            //清除
            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) {//保存
            //保存
            form.on('submit(Saver)', function (data) {
                //debugger;
                data.field.HMaker = sessionStorage["HUserName"];//制单人
                var sMainStr = JSON.stringify(data.field);
@@ -2517,135 +259,298 @@
                        }
                    });
            });
            //表头信息设备弹窗
            form.on('submit(HEquipList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '设备列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../PublicPage/EqpInformation.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('请选择数据');
                        }
                        $("#HEquipName").val(checkStatus.data[0].HName);
                        $("#HEquipID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //#endregion
            //#region å½“前页面所有方法
            //初始化表单插件
            function set_InitFrom() {
                //初始化表单插件
                laydate.render({
                    elem: '#HDate',
                });
                laydate.render({
                    elem: '#HBeginDate'
                });
                laydate.render({
                    elem: '#HEndDate'
                });
            }
            //初始化表格
            function set_InitGrid() {
                //表头
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HDotCheckItem', title: '点检项目', edit: 'text', event: "" }
                    , { field: 'HDotCheckPart', title: '点检部位', edit: 'text', event: "" }
                    , { field: 'HClaim', title: '具体要求', edit: 'text' }
                    , { field: 'HManagerID', title: '负责人代码', edit: 'text' }
                    , { field: 'HRemark', title: '备注', event: "", edit: 'text' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150 }
                ];
                option = {
                    id: 'mainTable'
                    , elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: true
                    , cellMinWidth: 120
                    , height: 500
                    , cols: [columns]
                    , done: function (res, curr, count) {
                    }
                };
            }
            //无源单新增
            function set_AddFNew() {
                //获取最大单据号
                get_MAXNum();
                option.data = [TabRow];
                table.render(option);
            }
            //获取最大单据号及默认值赋值
            function get_MAXNum() {
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": sBillType },
                    success: function (d) {
                        var myDate = new Date();
                        var aa = myDate.toLocaleDateString()
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(aa);
                        $("#HBeginDate").val(aa);
                        $("#HEndDate").val(aa);
                        $("#HInterID").val(0);
                    }
                });
            }
            //编辑
            function set_EditFromGrid() {
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
                option.data = [TabRow];
                table.render(option);
            }
            //编辑加载表头
            function set_EditForm(linterid) {
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListCheckDetai",
                    type: "GET",
                    data: {
                        "HID": linterid
                    },
                    success: function (result) {
                        //console.log(result.code)
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            //console.log(result)
                            var data = result.data.h_v_Sb_EquipDotCheckPlanBillList[0];
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HBillNo": data.单据号
                                , "HDate": formatDate(data.日期)
                                , "HInnerBillNo": data.内部单据号
                                , "HDeptID": data.HDeptID                 //验收部门
                                , "HEmpID": data.HEmpID                   //验收人
                                , "HEmpID": data.HEmpID                   //负责人
                                , "HEquipID": data.HEquipID               //设备
                                , "HCheckBeginDate": formatDate(data.发生日期)        //维修日期
                                , "HCheckResult": data.验收结论           //验收结论
                                , "HExplanation": data.摘要               //摘要
                                , "HRemark": data.表头备注                //备注
                            });
                        } else {
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.alert("发生错误!", { icon: 5 });
                    }
                });
            }
            // ç¼–辑获取表头时时间格式矫正方式
            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('-');
            }
            // ç¼–辑获取表体
            function set_EditGrid(linterid) {
                $("#HInterID").val(linterid);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai',
                    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 });
                    }
                });
            }
            //增加一行
            function set_AddLine(NewRow) {
                table.cache["mainTable"].push(NewRow);
                option.data = table.cache["mainTable"];
                table.render(option);
            }
            //复制一行
            function set_CopyLine(data) {
                var copydata = JSON.stringify(data);
                if (data.length <= 0) {
                    layer.alert("请选择需要复制的一行!");
                }
                else if (data.length > 1) {
                    layer.alert("只能选择复制一行!");
                }
                else {
                    var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
                    var copyrow = copydata2.substring(0, copydata2.length - 1);//去除末尾字符']'
                    table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
                    option.data = table.cache["mainTable"];//将数据绑定到data上
                    table.render(option);//将数据渲染到表格上
                    //layer.alert(copyrow);
                }
            }
            //行内删除事件
            function set_GirdDelete(obj) {
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    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 });
                            layer.close(index);
                        }
                    });
                }
            }
            //行内事件快捷键筛选
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        if (obj.event === 'HRepairCode')  //维修代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '维修项目列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../PublicPage/RepairItemInformation.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({
                                        HRepairID1: checkStatus.data[0].HItemID,
                                        HRepairCode: checkStatus.data[0].HNumber,
                                        HRepairName: checkStatus.data[0].HName,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        obj.event = "";
                        return false;
                    }
                })
            }
            //错误信息
            function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });
            }
            //#endregion
            //监听提交
            form.verify({
                numberOrEmpty: function (value, item) {
                    // if (value != '') {
                    if (!/^\d+$/.test(value)) {
                        return '不能为空或数字或者0';
                    }
                    //}
                }
            });
        });
        //定义全局变量
        var HReasonName, ReasonID, EmpName, SQProcName,
            ProcID, ZRProcName, QRName
            ;
        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>
        </script>
</body>
</html>
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckPlanBillList.html
@@ -106,6 +106,7 @@
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            //#region å…¬ç”¨å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
@@ -116,15 +117,16 @@
                , laydate = layui.laydate
                , util = layui.util
            var sWhere = "";
            //公用变量
            var index = layer.load(0);
            var option = [];
            //#endregion
            //初始化表格
            set_InitGrid();
            //加载数据到网格
            get_Display(sWhere);
            //头工具栏事件
            //初始化页面加载
            set_ClearBill();
            //#region å¤´å·¥å…·æ äº‹ä»¶
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                switch (obj.event) {
@@ -132,9 +134,11 @@
                    case 'btn-Add':
                        set_AddNew();
                        break;
                    //编辑
                    case 'btn-Edit':
                        set_ShowBill();
                        break;
                    //删除
                    case 'btn-Delete':
                        set_DeleteBill();
                        break;
@@ -156,35 +160,48 @@
                        break;
                };
            });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //重置过滤条件
            function set_ClearQuery() {
                $("#HNumber").val("");
                $("#HName").val("");
            }
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery(table, option);
            });
            //快速过滤
            function get_FastQuery(table, option) {
                //var HNumber = $("#HNumber").val();
                //var HName = $("#HName").val();
                //if (HNumber) {
                //    sWhere += " and èŒå‘˜ä»£ç  like '%" + HNumber + "%'";
                //}
                //if (HName) {
                //    sWhere += " and èŒå‘˜åç§° like '%" + HName + "%'";
                //}
                var index = layer.load(0);
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
            //#region å½“前页面所有方法
            //初始化页面
            function set_ClearBill() {
                //初始化表格
                set_InitGrid();
                //查询
                get_Display(sWhere);
            }
            //加载网格
            function get_Display(sWhere) {
                //进入页面显示的缓存列表
                $.ajax({
                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                    url: GetWEBURL() + '/Sb_EquipDotCheckPlanBill/GetEquipDotCheckPlanBillList',
                    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 });
                    }
                })
            }
            //初始化表格
            function set_InitGrid() {
                option = {
@@ -237,8 +254,26 @@
                    ]]
                };
            }
            var index = layer.load(0);
            //重置过滤条件
            function set_ClearQuery() {
                $("#HNumber").val("");
                $("#HName").val("");
            }
            //快速过滤
            function get_FastQuery(table, option) {
                //var HNumber = $("#HNumber").val();
                //var HName = $("#HName").val();
                //if (HNumber) {
                //    sWhere += " and èŒå‘˜ä»£ç  like '%" + HNumber + "%'";
                //}
                //if (HName) {
                //    sWhere += " and èŒå‘˜åç§° like '%" + HName + "%'";
                //}
                var index = layer.load(0);
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //新增
            function set_AddNew() {
                layer.open({
@@ -259,6 +294,7 @@
                    }
                });
            }
            //编辑
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
@@ -287,6 +323,7 @@
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
@@ -323,29 +360,9 @@
                    layer.msg('请选择一行数据删除!');
                }
            }
            //加载网格
            function get_Display(sWhere) {
                //进入页面显示的缓存列表
                $.ajax({
                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                    url: GetWEBURL() + '/Sb_EquipDotCheckPlanBill/GetEquipDotCheckPlanBillList',
                    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 });
                    }
                })
            }
            //#endregion
        });
    </script>
</body>