1
yangle
2024-05-13 1c6a4c87cc53dfe72d4af0cff53e627d406589eb
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_Add_MouldDotCheckPlanBillList.html
@@ -102,7 +102,7 @@
                                                    <label class="layui-form-label" style="width:95px;">器具点检规程<label style="color:red"> * </label></label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="HMouldDotCheckRuleName" id="HMouldDotCheckRuleName" class="layui-input" value="" style="float:left;width:150px;">
                                                        <input type="hidden" name="HMouldDotCheckRuleID" id="HMouldDotCheckRuleID" class="layui-input" value="" style="float:left;width:150px;">
                                                        <input type="hidden" name="HMouldDotCheckRuleID" id="HMouldDotCheckRuleID" class="layui-input" value="0" style="float:left;width:150px;">
                                                        <button type="button" lay-submit="" class="layui-btn" lay-filter="btnHMouldDotCheckRule" style="width:40px;">
                                                            <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                        </button>
@@ -296,7 +296,7 @@
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                var NewRow = { "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" };
                var NewRow = { "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" };
                switch (obj.event) {
                    //增加一行
                    case 'btn-AddLine': set_AddLine(NewRow);
@@ -398,6 +398,10 @@
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HDotCheckItemID', title: '点检项目ID', edit: 'text', hide: true }
                    , { field: 'HDotCheckItem', title: '点检项目', edit: 'text', event: "HDotCheckCode" }
                    , { field: 'HDotCheckItemClassID', title: '点检项目分类ID', edit: 'text', hide: true }
                    , { field: 'HDotCheckItemClassName', title: '点检项目分类', edit: 'text', event: 'HDotCheckItemClassName' }
                    , { field: 'HDotCheckItemMethodID', title: '点检方法ID', edit: 'text', hide: true }
                    , { field: 'HDotCheckItemMethodName', title: '点检方法', edit: 'text', event: 'HDotCheckItemMethodName' }
                    , { field: 'HDotCheckPart', title: '点检部位', edit: 'text', event: "" }
                    , { field: 'HClaim', title: '具体要求', edit: 'text' }
                    , { field: 'HManagerID', title: '负责人代码', edit: 'text', hide: true }
@@ -431,21 +435,21 @@
                    success: function (result) {
                        if (result != null) {
                            if (result.count == 1) {
                                var BYData = result.list[0];//点检
                                var DJData = result.list[0];//点检
                                var PJData = result.list[1];//配件
                                var rowdate1 = layui.table.cache["mainTable"];
                                var rowdate2 = layui.table.cache["mainTable1"];
                                option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
                                option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
                                table.render(option);
                                if (BYData.length != 0)  //表体数据不为空时
                                if (DJData.length != 0)  //表体数据不为空时
                                {
                                    buttonArr = [];//清空数组
                                    for (var i = 0; i < BYData.length; i++) {
                                    for (var i = 0; i < DJData.length; i++) {
                                        var checkrow = {
                                            "HDotCheckItemID": BYData[i].HDotCheckItemID, "HDotCheckItem": BYData[i].HDotCheckItem, "HDotCheckPart": BYData[i].HDotCheckPart,
                                            "HClaim": BYData[i].HClaim, "HManagerID": BYData[i].HManagerID, "HManagerCode": BYData[i].HManagerNumber,
                                            "HManagerName": BYData[i].HManagerName, "HRemark": BYData[i].HRemark
                                            "HDotCheckItemID": DJData[i].点检项目ID, "HDotCheckItem": DJData[i].点检项目, "HDotCheckPart": DJData[i].点检部位,
                                            "HClaim": DJData[i].具体要求, "HManagerID": DJData[i].负责人ID, "HManagerCode": DJData[i].负责人代码,
                                            "HManagerName": DJData[i].负责人名称, "HRemark": DJData[i].子备注, "HDotCheckItemClassID": DJData[i].HDotCheckItemClassID, "HDotCheckItemClassName": DJData[i].点检项目分类名称, "HDotCheckItemMethodID": DJData[i].HDotCheckItemMethodID, "HDotCheckItemMethodName": DJData[i].点检方法名称
                                        };
                                        buttonArr.push(checkrow);  //将之前的数据存储
                                    }
@@ -466,7 +470,7 @@
            function set_AddFNew() {
                //获取最大单据号
                get_MAXNum();
                option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
                option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
                table.render(option);
            }
            //获取最大单据号及默认值赋值
@@ -494,7 +498,7 @@
            function set_EditFromGrid() {
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
                option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
                option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
                table.render(option);
            }
            //编辑加载表头
@@ -544,9 +548,14 @@
                    type: "GET",
                    data: { "sqlWhere": "and HInterID=" + linterid },
                    success: function (result) {
                        //console.log('gouba' + result);
                        if (result.count == 1) {
                            option.data = result.list[0];
                            var data = result.data;
                            var subarr = [];
                            for (var i = 0; i < data.length; i++) {
                                subarr.push({ "HDotCheckItemID": data[i].点检项目ID, "HDotCheckCode": "", "HDotCheckItem": data[i].点检项目, "HDotCheckPart": data[i].点检部位, "HClaim": data[i].具体要求, "HManagerID": data[i].负责人ID, "HManagerCode": data[i].负责代码, "HManagerName": data[i].负责人名称, "HRemark": data[i].表体备注, "HDotCheckItemClassID": data[i].HDotCheckItemClassID, "HDotCheckItemClassName": data[i].点检项目分类名称, "HDotCheckItemMethodID": data[i].HDotCheckItemMethodID, "HDotCheckItemMethodName": data[i].点检方法名称 });
                            }
                            option.data = subarr;
                            table.render(option);
                        } else {
@@ -654,7 +663,9 @@
                                    obj.update({
                                        HDotCheckItemID: checkStatus.data[0].HItemID,
                                        HDotCheckCode: checkStatus.data[0].点检项目代码,
                                        HDotCheckItem: checkStatus.data[0].点检项目名称
                                        HDotCheckItem: checkStatus.data[0].点检项目名称,
                                        HDotCheckItemClassID: checkStatus.data[0].HDotCheckItemClassID,
                                        HDotCheckItemClassName: checkStatus.data[0].点检项目分类名称,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
@@ -702,6 +713,73 @@
                                }
                            });
                        }
                        if (obj.event === 'HDotCheckItemClassName')  //点检项目分类
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '点检项目分类列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true
                                , content: ['../../基础资料/基础资料/Gy_DotCheckItemClassList.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({
                                        HDotCheckItemClassID: checkStatus.data[0].HItemID,
                                        HDotCheckItemClassName: checkStatus.data[0].点检项目分类名称
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                }
                            });
                        }
                        if (obj.event === 'HDotCheckItemMethodName')  //点检方法
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '点检方法列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true
                                , content: ['../../基础资料/基础资料/Gy_DotCheckItemMethodList.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({
                                        HDotCheckItemMethodID: checkStatus.data[0].HItemID,
                                        HDotCheckItemMethodName: checkStatus.data[0].点检方法名称
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                }
                            });
                        }
                        obj.event = "";
                        return false;