沈泽
2021-09-10 7d57d520febeded35e08f557732d656404dbde17
Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
8个文件已修改
1207 ■■■■ 已修改文件
WebTM/layuiadmin/layui/css/ReportPlatform.css 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/IpadIndex.html 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/上料防错单/Sc_Add_MaterToSourceBillList.html 799 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产上料单/Sc_MaterToSourceBillList.html 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EquipDotCheckBillEdit.html 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EquipDotCheckBillList.html 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EquipDotCheckPlanBillEdit.html 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EquipDotCheckPlanBillList.html 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/layui/css/ReportPlatform.css
@@ -52,7 +52,7 @@
.cns {
    border: 1px solid #5FB878;
    height: 140px;
    height: 160px;
    border-radius: 5px;
}
WebTM/views/IpadIndex.html
@@ -82,9 +82,9 @@
                                html1 += '<dd>';
                                html1 += '<h1 style="display:none;"><span>资源ID:</span><span id="eqpid' + i + '">' + LoadData[i - 1].HSourceID + '</span></h1>';
                                html1 += '<h1><span>设备编号:</span><span id="eqp' + i + '">' + LoadData[i - 1].HSourceName + '</span></h1>';
                                html1 += '<h1><span>当前工单:</span><span id="po' + i + '">' + (LoadData[i - 1].HSourceBillNo == null ? '' : LoadData[i - 1].HSourceBillNo) + '</span></h1>';
                                html1 += '<h1><span>产品名称:</span><span id="ptn' + i + '">' + (LoadData[i - 1].HName == null ? '' : LoadData[i - 1].HName) + '</span></h1>';
                                html1 += '<h1><span>产品规格:</span><span id="pts' + i + '">' + (LoadData[i - 1].HModel == null ? '' : LoadData[i - 1].HModel) + '</span></h1>';
                                //html1 += '<h1><span>当前工单:</span><span id="po' + i + '">' + (LoadData[i - 1].HSourceBillNo == null ? '' : LoadData[i - 1].HSourceBillNo) + '</span></h1>';
                                //html1 += '<h1><span>产品名称:</span><span id="ptn' + i + '">' + (LoadData[i - 1].HName == null ? '' : LoadData[i - 1].HName) + '</span></h1>';
                                //html1 += '<h1><span>产品规格:</span><span id="pts' + i + '">' + (LoadData[i - 1].HModel == null ? '' : LoadData[i - 1].HModel) + '</span></h1>';
                                html1 += '<h1><span>负责人:</span><span id="us' + i + '">' + LoadData[i - 1].HEmpName + '</span></h1>';
                                html1 += '</dd>';
                                html1 += '</dl>';
@@ -175,6 +175,7 @@
                                html1 += '<h1><span>工单号:</span><span id="wk' + (i + 1) + '">' + LoadData1[i].HICMOBillNo + '</span></h1>';
                                html1 += '<h1><span>产品名称:</span><span id="ptn' + (i + 1) + '">' + LoadData1[i].HMaterName + '</span></h1>';
                                html1 += '<h1><span>产品型号:</span><span id="pts' + (i + 1) + '">' + LoadData1[i].HModel + '</span></h1>';
                                html1 += '<h1><span>计划数量:</span><span>' + LoadData1[i].HDatePlanQty + '</span><span style="margin-left:20px;">汇报总数:</span><span>' + LoadData1[i].HDateFinishQty+'</span></h1>';
                                switch (LoadData1[i].HICMOStatus) {
                                    case "待生产":
                                        html1 += '<h1><span>当前状态:</span><span class="gj_icon color_border3"></span><span>' + LoadData1[i].HICMOStatus + '</span></h1>';
WebTM/views/Éú²ú¹ÜÀí/ÉÏÁÏ·À´íµ¥/Sc_Add_MaterToSourceBillList.html
@@ -383,7 +383,8 @@
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
             //#region å…¬ç”¨å˜é‡
            //#region å…¬ç”¨å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
@@ -396,7 +397,7 @@
            var option2;
            //#endregion
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //初始化表单插件
            set_InitFrom();
@@ -418,302 +419,9 @@
                layer.alert("未知操作类型!", { icon: 5 });
            }
            //初始化插件
            function set_InitFrom() {
                //日期时间选择器
                laydate.render({
                    elem: '#HDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HMakeDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HUpDateDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HCheckDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HCloseDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HDeleteDate'
                    , type: 'datetime'
                });
            }
            //#endregion
            //初始化表格
            function set_InitGrid() {
                Table1();  //保养项列表
                Table2();  //配件项列表
            }
            //初始化配料列表
            function Table1() {
                //表头
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HBarCode', title: '扫描条码', edit: 'text', hide: true }
                    , { field: 'HMaterID', title: '物料ID', edit: 'text', hide: true }
                    , { field: 'HNumber', title: '物料代码', edit: 'text' }
                    , { field: 'HName', title: '物料名称', edit: 'text' }
                    , { field: 'HModel', title: '规格型号', edit: 'text' }
                    , { field: 'HUnitID', title: '单位ID', edit: 'text', hide: true }
                    , { field: 'HUnitName', title: '单位', edit: 'text' }
                    , { field: 'HMQty', title: '配料数量', edit: 'text' }
                    , { field: 'HQty', title: '实配数量', edit: 'text' }
                ];
                option = {
                    id: 'mainTable'
                    , elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , defaultToolbar: false  //是否显示右侧工具栏
                    , page: false
                    , cellMinWidth: 120
                    , height: 350
                    , cols: [columns]
                    , done: function (res, curr, count) {
                    }
                };
            }
            //初始化配件项列表
            function Table2() {
                //表头
                columns1 = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao1', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HMouldID', title: '治具ID', edit: 'text', hide: true}
                    , { field: 'HMouldNumber', title: '治具代码', edit: 'text' }
                    , { field: 'HMouldName', title: '治具名称', edit: 'text' }
                    , { field: 'HMouldSpec', title: '规格型号', edit: 'text' }
                ];
                option2 = {
                    id: 'mainTable1'
                    , elem: '#mainTable1'
                    , toolbar: '#toolbarDemo1'
                    , defaultToolbar: false  //是否显示右侧工具栏
                    , page: false
                    , cellMinWidth: 120
                    , height: 350
                    , cols: [columns1]
                    , done: function (res, curr, count) {
                    }
                };
            }
            //无源单新增
            function set_AddFNew()
            {
                //加源单类型区分(可以写不同的方法)
            }
            //有源单新增
            function set_AddNew() {
                get_MAXNum();
                set_SourceAdd();
                option.data = [];
                option2.data = [];
                table.render(option);
                table.render(option2);
            }
            //编辑
            function set_EditFromGrid()
            {
                $("#HInterID").val(linterid);//修改时主表ID
                refSav = "Update";
                $('#HMaterCode').attr("disabled", true);
                $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                $('#HMaterName').attr("disabled", true);
                $('#HMaterSpec').attr("disabled", true);
                $('#HBeginDate').attr("disabled", true);
                $('#HSourceName').attr("disabled", true);
                $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                $('#HMainSourceBillNo').attr("disabled", true);
                $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true);
                $('#SourceType').attr("disabled", true);
                form.render('select');
                $('#HICMOBillNo').attr("disabled", true);
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
            }
            //编辑获取表头
            function set_EditForm(linterid) {
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Sc_MouldMaintainBill/Sc_MouldMaintainBillListCheckDetai",
                    type: "GET",
                    data: {
                        "HID": linterid
                    },
                    success: function (result) {
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data.h_v_Sc_MouldMaintain[0];
                            form.val("component-form-group", {
                                "HBillNo": data.单据号
                                , "HDate": formatDate(data.日期)
                                , "HInnerBillNo": data.内部单据号
                                , "HBeginDate": formatDate(data.保养开始日期)
                                , "HEndDate": formatDate(data.保养结束日期)
                                , "HExplanation": data.摘要
                                , "HRemark": data.备注
                                , "HPlanNo": data.保养计划编号
                                , "HPlanInterID": data.保养计划内码
                                , "HMouldID": data.HMouldID
                                , "HMouldName": 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() + 'Sc_MouldMaintainBill/Sc_MouldMaintainBillListProjectDetaiNew',
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (result) {
                        if (result.count == 1) {
                            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 });
                        }
                    }, error: function () {
                        layer.close(index0);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //有源单新增
            function set_SourceAdd() {
                refSav = "Add";
                //初始基本信息赋值
                $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //单据日期
                $("#HWorkReportDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //报工日期
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //制单日期
                $("#HMaker").val(sessionStorage["HUserName"]);     //制单人
                //加源单类型区分(可以写不同的方法)
                $('#HICMOBillNo').attr("disabled", true);
                $('#HSourceBillNo').attr("disabled", true);
                $('#HProcExchBillNo').attr("disabled", true);
                $('#HProcName').attr("disabled", true);
                $('#HMaterCode').attr("disabled", true);
                $('#HMaterList').addClass("layui-btn-disabled").attr("disabled",true);
                $('#HMaterName').attr("disabled", true);
                $('#HMaterSpec').attr("disabled", true);
                $('#HPlanQty').attr("disabled", true);
                $('#HSourceName').attr("disabled", true);
                $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                $('#HWorkBeginDate').attr("disabled", true);
                $('#HWorkReportDate').attr("disabled", true);
                $.ajax(
                    {
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MaterToSourceBill/GetMESMaterToSourceFrom", //方法所在页面和方法名
                        async: true,
                        data: {
                            "HSourceInterID": HSourceInterID,
                            "HSourceEntryID": HSourceEntryID,
                            "HSourceBillNo": HSourceBillNo,
                            "HSourceBillType": HBillType
                        },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1)// è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            {
                                var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID;
                                $("#HProcID").val(LoadData[0].HProcID); //当前工序ID
                                $("#HProcName").val(LoadData[0].HProcName); //当前工序
                                $("#HMaterID").val(LoadData[0].HMaterID); //产品ID
                                $("#HMaterCode").val(LoadData[0].HMaterNumber); //产品代码
                                $("#HMaterName").val(LoadData[0].HMaterName); //产品名称
                                $("#HMaterSpec").val(LoadData[0].HModel); //产品规格
                                $("#HSourceID").val(LoadData[0].HSourceID); //生产资源ID
                                $("#HSourceName").val(LoadData[0].HSourceName); //生产资源
                                $("#HSourceBillNo").val(LoadData[0].HICMOBillNo); //源单单号(暂时取值订单编号)
                                $("#HSourceInterID").val(LoadData[0].HSourceInterID); //源单主内码(取值HInterID)
                                $("#HSourceEntryID").val(LoadData[0].HSourceEntryID); //源单子内码(源单行号)
                                $("#HSourceBillType").val(HSourceBillType); //源单类型
                                $("#HGroupID").val(LoadData[0].HDeptID); //班组ID
                                $("#HGroupName").val(LoadData[0].HDeptName); //班组
                                $("#HICMOInterID").val(LoadData[0].HICMOInterID); //生产订单ID
                                $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //生产订单子ID
                                $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //生产订单号
                                $("#HWorkBeginDate").val(LoadData[0].HBeginDate); //开工时间
                                $("#HPlanQty").val(LoadData[0].HDatePlanQty); //订单数量
                            }
                            else {
                                layer.alert(data.Message, { icon: 5 });
                            }
                        },
                        error: function (err) {
                            layer.alert(err, { icon: 5 });
                        }
                    });
            }
            //获取最大单据号及默认值赋值
            function get_MAXNum() {
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3786' },
                    success: function (d) {
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HInterID").val(0);
                    }
                });
            }
            //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
            //新增保存
            form.on('submit(Add)', function (data) {
@@ -732,7 +440,7 @@
            form.on('submit(Saver)', function (data) {
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sSubStr1 = JSON.stringify(table.cache['mainTable1']);
                var sMainSub = sMainStr + ';' + sSubStr + ';' + refSav;
@@ -749,17 +457,18 @@
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            $("#HInterID").val(data.HInterID);//获取提交成功返回的单据主ID
                            layer.confirm(data.Message, {icon: 1,
                            layer.confirm(data.Message, {
                                icon: 1,
                                btn: ['确认']
                            }, function (index) {
                                    if (data.Verify == "Y") //自动审核
                                    {
                                        layer.close(index);
                                        SaveVerify(); //审核
                                    }
                                    else {
                                        layer.close(index);
                                    }
                                if (data.Verify == "Y") //自动审核
                                {
                                    layer.close(index);
                                    SaveVerify(); //审核
                                }
                                else {
                                    layer.close(index);
                                }
                            });
                        }
                        else {
@@ -782,72 +491,6 @@
                ReVerIfySaver();
            });
            //审核提交
            function SaveVerify()
            {
                var InterID = $("#HInterID").val();
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sSubStr1 = JSON.stringify(table.cache['mainTable1']);
                if (!AllowLoadData(sSubStr, sSubStr1))//数据验证
                {
                    return false;
                }
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Sc_MaterToSourceBill/AuditProcessReportList", //方法所在页面和方法名
                    async: true,
                    data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) {
                                //layer.close(layer.index);
                                //window.parent.location.reload();
                            });
                        }
                        else {
                            layer.alert(data.Message, { icon: 5 })
                        }
                    },
                    error: function (err) {
                        layer.alert(err, { icon: 5 })
                    }
                })
            }
            //反审核提交
            function ReVerIfySaver() {
                var InterID = $("#HInterID").val();
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sSubStr1 = JSON.stringify(table.cache['mainTable1']);
                if (!AllowLoadData(sSubStr, sSubStr1))//数据验证
                {
                    return false;
                }
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Sc_MaterToSourceBill/AuditProcessReportList", //方法所在页面和方法名
                    async: true,
                    data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) {
                                //layer.close(layer.index);
                                //window.parent.location.reload();
                            });
                        }
                        else {
                            layer.alert(data.Message, { icon: 5 })
                        }
                    },
                    error: function (err) {
                        layer.alert(err, { icon: 5 })
                    }
                })
            }
            //退出
            form.on('submit(Exit)', function (data) {
                Pub_Close(1);
@@ -868,7 +511,7 @@
                    $.ajax({
                        url: GetWEBURL() + "/Sc_MaterToSourceBill/get_CheckTypeByBarCode_Json",
                        type: "GET",
                        data: { "HBarCode": HBarCode, "HSourceID": "111", "HICMOInterID": "100030", "HICMOEntryID": "100050"},
                        data: { "HBarCode": HBarCode, "HSourceID": "111", "HICMOInterID": "100030", "HICMOEntryID": "100050" },
                        success: function (result) {
                            console.info(result);
                            if (result.count == 1) {
@@ -876,8 +519,7 @@
                                    $("#HSourceID").val(result.data.Gy_Source[0].HItemID);
                                    $("#HSourceName").val(result.data.Gy_Source[0].HName);
                                }
                                if (result.Verify == '用料清单物料条码')
                                {
                                if (result.Verify == '用料清单物料条码') {
                                    //回写用料清单数据列表
                                    // æºæ•°æ®
                                    tableBak = table.cache.mainTable;
@@ -889,8 +531,7 @@
                                        option.data = table.cache["mainTable"];
                                        table.render(option);
                                    }
                                    else
                                    {
                                    else {
                                        // åŽ»é‡(不能有相同扫码物料)
                                        for (var i = 0; i < tableBak.length; i++) {
                                            console.log(tableBak[i].HMaterID, result.data[0].HMaterID);
@@ -1116,7 +757,7 @@
                var AddRow = table.cache['mainTable'];
                switch (obj.event) {
                    //删除一行
                    case 'btn-DeleteLine': btnDeleteLine(checkStatus,data, obj);
                    case 'btn-DeleteLine': btnDeleteLine(checkStatus, data, obj);
                        break;
                }
            });
@@ -1133,6 +774,405 @@
                        break;
                }
            });
            //#endregion
            //#region æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //初始化插件
            function set_InitFrom() {
                //日期时间选择器
                laydate.render({
                    elem: '#HDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HMakeDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HUpDateDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HCheckDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HCloseDate'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#HDeleteDate'
                    , type: 'datetime'
                });
            }
            //初始化表格
            function set_InitGrid() {
                Table1();  //保养项列表
                Table2();  //配件项列表
            }
            //初始化配料列表
            function Table1() {
                //表头
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HBarCode', title: '扫描条码', edit: 'text', hide: true }
                    , { field: 'HMaterID', title: '物料ID', edit: 'text', hide: true }
                    , { field: 'HNumber', title: '物料代码', edit: 'text' }
                    , { field: 'HName', title: '物料名称', edit: 'text' }
                    , { field: 'HModel', title: '规格型号', edit: 'text' }
                    , { field: 'HUnitID', title: '单位ID', edit: 'text', hide: true }
                    , { field: 'HUnitName', title: '单位', edit: 'text' }
                    , { field: 'HMQty', title: '配料数量', edit: 'text' }
                    , { field: 'HQty', title: '实配数量', edit: 'text' }
                ];
                option = {
                    id: 'mainTable'
                    , elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , defaultToolbar: false  //是否显示右侧工具栏
                    , page: false
                    , cellMinWidth: 120
                    , height: 350
                    , cols: [columns]
                    , done: function (res, curr, count) {
                    }
                };
            }
            //初始化配件项列表
            function Table2() {
                //表头
                columns1 = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao1', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HMouldID', title: '治具ID', edit: 'text', hide: true}
                    , { field: 'HMouldNumber', title: '治具代码', edit: 'text' }
                    , { field: 'HMouldName', title: '治具名称', edit: 'text' }
                    , { field: 'HMouldSpec', title: '规格型号', edit: 'text' }
                ];
                option2 = {
                    id: 'mainTable1'
                    , elem: '#mainTable1'
                    , toolbar: '#toolbarDemo1'
                    , defaultToolbar: false  //是否显示右侧工具栏
                    , page: false
                    , cellMinWidth: 120
                    , height: 350
                    , cols: [columns1]
                    , done: function (res, curr, count) {
                    }
                };
            }
            //无源单新增
            function set_AddFNew()
            {
               //加源单类型区分(可以写不同的方法)
                refSav = "Add";
                //初始基本信息赋值
                $("#form0")[0].reset();
                layui.form.render();
                get_MAXNum();
                $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //单据日期
                $("#HWorkReportDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //报工日期
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //制单日期
                $("#HMaker").val(sessionStorage["HUserName"]);     //制单人
            }
            //有源单新增
            function set_AddNew() {
                get_MAXNum();
                set_SourceAdd();
                option.data = [];
                option2.data = [];
                table.render(option);
                table.render(option2);
            }
            //编辑
            function set_EditFromGrid()
            {
                $("#HInterID").val(linterid);//修改时主表ID
                refSav = "Update";
                $('#HMaterCode').attr("disabled", true);
                $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                $('#HMaterName').attr("disabled", true);
                $('#HMaterSpec').attr("disabled", true);
                $('#HBeginDate').attr("disabled", true);
                $('#HSourceName').attr("disabled", true);
                $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                $('#HMainSourceBillNo').attr("disabled", true);
                $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true);
                $('#SourceType').attr("disabled", true);
                form.render('select');
                $('#HICMOBillNo').attr("disabled", true);
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
            }
            //编辑获取表头
            function set_EditForm(linterid) {
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Sc_MaterToSourceBill/Sc_MaterToSourceBillListCheckDetai",
                    type: "GET",
                    data: {
                        "HID": linterid
                    },
                    success: function (result) {
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data.h_v_Sc_MaterToSourceBillMain[0];
                            form.val("component-form-group", {
                                "HInterID": data.hmainid
                                , "HBillNo": data.单据号
                                , "HDate": formatDate(data.日期)
                                , "HPlanQty":"0"
                                , "HICMOBillNo": data.任务单号
                                , "HICMOInterID": data.HICMOInterID
                                , "HICMOEntryID": data.HICMOEntryID
                                , "HProcExchBillNo": data.工序流转卡号
                                , "HProcExchQty": ""
                                , "HSourceInterID": data.HMainSourceInterID
                                , "HSourceEntryID": data.HMainSourceEntryID
                                , "HSourceBillNo": data.HMainSourceBillNo
                                , "HSourceBillType": data.HMainSourceBillType
                                , "HProcName":""
                                , "HProcID": "0"
                                , "HMaterCode": data.产品代码
                                , "HMaterID": data.HMaterID
                                , "HMaterName": data.产品名称
                                , "HMaterSpec": data.规格型号
                                , "HSourceID": data.HSourceID
                                , "HSourceName": data.生产资源
                                , "HGroupName": data.生产班组
                                , "HGroupID": data.HGroupID
                                , "HWorkerName": data.操作工
                                , "HWorkerID": data.HWorkerID
                                , "HMaker": data.制单人                                            //制单人
                                , "HMakeDate": formatDate(data.制单日期)                           //制单日期
                                , "HUpDater": sessionStorage["HUserName"]                          //修改人
                                , "HUpDateDate": Format(new Date(), "yyyy-MM-dd hh:mm:ss")         //修改日期
                                , "HChecker": data.审核人                                          //审核人
                                , "HCheckDate": formatDate(data.审核日期)                          //审核日期
                                , "HCloseMan": data.关闭人                                         //关闭人
                                , "HCloseDate": formatDate(data.关闭日期)                          //关闭日期
                                , "HDeleteMan": data.作废人                                        //作废人
                                , "HDeleteDate": formatDate(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() + 'Sc_MaterToSourceBill/Sc_MaterToSourceBillListProjectDetai',
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (result) {
                        if (result.count == 1) {
                            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 });
                        }
                    }, error: function () {
                        layer.close(index0);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //有源单新增
            function set_SourceAdd() {
                refSav = "Add";
                //初始基本信息赋值
                $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //单据日期
                $("#HWorkReportDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //报工日期
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //制单日期
                $("#HMaker").val(sessionStorage["HUserName"]);     //制单人
                //加源单类型区分(可以写不同的方法)
                $('#HICMOBillNo').attr("disabled", true);
                $('#HSourceBillNo').attr("disabled", true);
                $('#HProcExchBillNo').attr("disabled", true);
                $('#HProcName').attr("disabled", true);
                $('#HMaterCode').attr("disabled", true);
                $('#HMaterList').addClass("layui-btn-disabled").attr("disabled",true);
                $('#HMaterName').attr("disabled", true);
                $('#HMaterSpec').attr("disabled", true);
                $('#HPlanQty').attr("disabled", true);
                $('#HSourceName').attr("disabled", true);
                $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                $('#HWorkBeginDate').attr("disabled", true);
                $('#HWorkReportDate').attr("disabled", true);
                $.ajax(
                    {
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MaterToSourceBill/GetMESMaterToSourceFrom", //方法所在页面和方法名
                        async: true,
                        data: {
                            "HSourceInterID": HSourceInterID,
                            "HSourceEntryID": HSourceEntryID,
                            "HSourceBillNo": HSourceBillNo,
                            "HSourceBillType": HBillType
                        },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1)// è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            {
                                var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID;
                                $("#HProcID").val(LoadData[0].HProcID); //当前工序ID
                                $("#HProcName").val(LoadData[0].HProcName); //当前工序
                                $("#HMaterID").val(LoadData[0].HMaterID); //产品ID
                                $("#HMaterCode").val(LoadData[0].HMaterNumber); //产品代码
                                $("#HMaterName").val(LoadData[0].HMaterName); //产品名称
                                $("#HMaterSpec").val(LoadData[0].HModel); //产品规格
                                $("#HSourceID").val(LoadData[0].HSourceID); //生产资源ID
                                $("#HSourceName").val(LoadData[0].HSourceName); //生产资源
                                $("#HSourceBillNo").val(LoadData[0].HICMOBillNo); //源单单号(暂时取值订单编号)
                                $("#HSourceInterID").val(LoadData[0].HSourceInterID); //源单主内码(取值HInterID)
                                $("#HSourceEntryID").val(LoadData[0].HSourceEntryID); //源单子内码(源单行号)
                                $("#HSourceBillType").val(HSourceBillType); //源单类型
                                $("#HGroupID").val(LoadData[0].HDeptID); //班组ID
                                $("#HGroupName").val(LoadData[0].HDeptName); //班组
                                $("#HICMOInterID").val(LoadData[0].HICMOInterID); //生产订单ID
                                $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //生产订单子ID
                                $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //生产订单号
                                $("#HWorkBeginDate").val(LoadData[0].HBeginDate); //开工时间
                                $("#HPlanQty").val(LoadData[0].HDatePlanQty); //订单数量
                            }
                            else {
                                layer.alert(data.Message, { icon: 5 });
                            }
                        },
                        error: function (err) {
                            layer.alert(err, { icon: 5 });
                        }
                    });
            }
            //获取最大单据号及默认值赋值
            function get_MAXNum() {
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3786' },
                    success: function (d) {
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HInterID").val(0);
                    }
                });
            }
            //审核提交
            function SaveVerify()
            {
                var InterID = $("#HInterID").val();
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sSubStr1 = JSON.stringify(table.cache['mainTable1']);
                if (!AllowLoadData(sSubStr, sSubStr1))//数据验证
                {
                    return false;
                }
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Sc_MaterToSourceBill/AuditProcessReportList", //方法所在页面和方法名
                    async: true,
                    data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) {
                                //layer.close(layer.index);
                                //window.parent.location.reload();
                            });
                        }
                        else {
                            layer.alert(data.Message, { icon: 5 })
                        }
                    },
                    error: function (err) {
                        layer.alert(err, { icon: 5 })
                    }
                })
            }
            //反审核提交
            function ReVerIfySaver() {
                var InterID = $("#HInterID").val();
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sSubStr1 = JSON.stringify(table.cache['mainTable1']);
                if (!AllowLoadData(sSubStr, sSubStr1))//数据验证
                {
                    return false;
                }
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Sc_MaterToSourceBill/AuditProcessReportList", //方法所在页面和方法名
                    async: true,
                    data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) {
                                //layer.close(layer.index);
                                //window.parent.location.reload();
                            });
                        }
                        else {
                            layer.alert(data.Message, { icon: 5 })
                        }
                    },
                    error: function (err) {
                        layer.alert(err, { icon: 5 })
                    }
                })
            }
            //删除行
            function btnDeleteLine(checkStatus,data) {
@@ -1182,6 +1222,7 @@
                });
            }
            //#endregion
            //以上为layui模块
        });
WebTM/views/Éú²ú¹ÜÀí/Éú²úÉÏÁϵ¥/Sc_MaterToSourceBillList.html
@@ -152,7 +152,7 @@
                    case 'btn-Audit': set_CheckBill();
                        break;
                    //反审核按钮
                    case 'btn-DeAudit': set_DeCheckBill();
                    case 'btn-DeAudit': set_AbandonCheck();
                        break;
                    //退出
                    case 'get_Exit': Pub_Close(2);
@@ -199,12 +199,14 @@
                    , page: true
                    , cellMinWidth: 120
                    , cols: [[
                        { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                        , { field: '日期', title: '日期', templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '单据号', title: '单据号' }
                        , { field: 'HBillType', title: 'HBillType', hide: true }
                        , { field: '工序流转卡号', title: '工序流转卡号' }
                        , { field: '任务单号', title: '任务单号' }
                        , { field: 'HBillType', title: 'HBillType', hide: true }
                        , { field: 'HBillStatus', title: '单据状态', hide: true }
                        , { field: '工序流转卡号', title: '工序流转卡号' }
                        , { field: 'HSourceID', title: 'HSourceID', hide: true }
                        , { field: '生产资源代码', title: '生产资源代码' }
                        , { field: '生产资源', title: '生产资源' }
@@ -221,19 +223,9 @@
                        , { field: '表头备注', title: '表头备注' }
                        , { field: 'hsubid', title: 'hsubid', hide: true }
                        , { field: 'HMaterID', title: 'HMaterID', hide: true }
                        , { field: '物料代码', title: '物料代码' }
                        , { field: '物料名称', title: '物料名称' }
                        , { field: '产品代码', title: '产品代码' }
                        , { field: '产品名称', title: '产品名称' }
                        , { field: '规格型号', title: '规格型号' }
                        , { field: 'HUnitID', title: 'HUnitID', hide: true }
                        , { field: '计量单位代码', title: '计量单位代码' }
                        , { field: '计量单位名称', title: '计量单位名称' }
                        , { field: '数量', title: '数量' }
                        , { field: '件量', title: '件量' }
                        , { field: '扫描时间', title: '扫描时间', templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '条形码', title: '条形码' }
                        , { field: '箱号条码', title: '箱号条码' }
                        , { field: '源单单号', title: '源单单号' }
                        , { field: '表体备注', title: '表体备注' }
                        , { field: '制单人', title: '制单人' }
                        , { field: '制单日期', title: '制单日期', templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '审核人', title: '审核人' }
@@ -407,7 +399,7 @@
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MESBeginWorkBill/AuditProcessReportList", //方法所在页面和方法名
                        url: GetWEBURL() + "/Sc_MaterToSourceBill/AuditProcessReportList", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
@@ -442,7 +434,7 @@
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MESBeginWorkBill/AuditProcessReportList", //方法所在页面和方法名
                        url: GetWEBURL() + "/Sc_MaterToSourceBill/AuditProcessReportList", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckBillEdit.html
@@ -70,7 +70,7 @@
                                                <label class="layui-form-label">设备</label>
                                                <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;">
                                                    <input type="text" name="HEquipName" id="HEquipName" class="layui-input" value="" style="float:left;width:150px;" readonly="readonly">
                                                    <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>
@@ -166,7 +166,7 @@
            var option=[];
            var sBillType = "3903";
            var TabRow = { /*"HDotCheckID": 0, "HDotCheckCode": "",*/"HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" };
            var TabRow = { "HDotCheckItemID": 0, "HDotCheckCode": "","HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" };
            //#endregion
@@ -312,8 +312,8 @@
                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: 'HDotCheckItemID', title: '点检项目ID', 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' }
@@ -383,42 +383,42 @@
            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 === '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({
                                        HDotCheckItemID: 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')  //负责人代码
                        {
                            //页面层-自定义
@@ -575,11 +575,7 @@
                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 == "") {
                        if (sSubStr[i].HDotCheckCode == "" || sSubStr[i].HDotCheckItemID == "") {
                            layer.msg("明细记录第" + (i + 1) + "行,点检项目代码信息为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            return false;
                        }
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckBillList.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>设备点检记录单列表</title>
    <title>设备点检记录单列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@@ -37,7 +37,7 @@
                                            <option value="ZHSJ">上架归还单</option>
                                        </select>
                                    </div>
                                </div>
                                </div>-->
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
@@ -49,30 +49,29 @@
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
                                    </div>
                                </div>-->
                                </div>
                                <div class="layui-inline">
                                    <div class="layui-inline">
                                        <span>其他条件></span>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>-->
                                <!--<div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">开始时间</label>
                                        <div class="layui-input-block">
                                            <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">结束时间</label>
                                        <div class="layui-input-block">
                                            <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
                                        </div>
                                    </div>
                                </div>-->
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
@@ -331,35 +330,36 @@
            }
            //快速过滤
            function get_FastQuery() {
                var HBillType = $("#HBillType").val();//单据类型
                //var HBillType = $("#HBillType").val();//单据类型
                var HBillNo = $("#HBillNo").val();//单据号
                var HCreateBy = $("#HCreateBy").val();//制单人
                var BenginHCreateDate = $("#BenginHCreateDate").val();//开始制单时间
                var EndHCreateDate = $("#EndHCreateDate").val();//结束制单时间
                if (HBillNo) {
                    sWhere += " and HBillNo like '%" + HBillNo + "%'";
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HCreateBy) {
                    sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
                    sWhere += " and åˆ¶å•人 like '%" + HCreateBy + "%'";
                }
                if (BenginHCreateDate) {
                    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + BenginHCreateDate + "'";
                }
                if (EndHCreateDate) {
                    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + EndHCreateDate + "'";
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //重置过滤条件方法
            function set_ClearQuery() {
                $("#HBillType").val("");//单据类型
                //$("#HBillType").val("");//单据类型
                $("#HBillNo").val("");//单据号
                $("#HSourceBillNo").val("");//源单号
                $("#HCreateBy").val("");//制单人
                $("#BenginHCreateDate").val("");//开始制单时间
                $("#EndHCreateDate").val("");//结束制单时间
                sWhere = "";
                $("#btnSearch").click();
            }
            //刷新
            function get_Refresh() {
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckPlanBillEdit.html
@@ -173,7 +173,7 @@
                , element = layui.element;
            var option;
            var sBillType = "3904";
            var TabRow = { "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HRemark": "" };
            var TabRow = { "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" };
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //初始化表单插件
@@ -319,10 +319,14 @@
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HDotCheckItemID', title: '点检项目ID', 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' }
                    , { 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 }
                ];
@@ -359,9 +363,9 @@
                        var myDate = new Date();
                        var aa = myDate.toLocaleDateString()
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(aa);
                        $("#HBeginDate").val(aa);
                        $("#HEndDate").val(aa);
                        $("#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);
                    }
                });
@@ -391,15 +395,14 @@
                                "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.表头备注                //备注
                                , "HEquipName": data.设备名称
                                , "HEquipID": data.设备ID
                                , "HCycleUnit": data.周期单位
                                , "HCheckCycle": data.点检周期
                                , "HBeginDate":data.开始日期
                                , "HEndDate": data.结束日期
                                , "HExplanation": data.摘要
                                ,"HRemark":data.表头备注
                            });
                        } else {
@@ -410,18 +413,6 @@
                    }
                });
            }
            // ç¼–辑获取表头时时间格式矫正方式
            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
@@ -429,7 +420,7 @@
                $.ajax({
                    url: GetWEBURL() + 'Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai',
                    type: "GET",
                    data: { "sqlWhere": "and hmainid=" + hID },
                    data: { "sqlWhere": "and hmainid=" + linterid },
                    success: function (result) {
                        console.log(result);
                        //console.log('gouba' + result);
@@ -445,6 +436,18 @@
                        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_AddLine(NewRow) {
@@ -490,25 +493,24 @@
                    });
                }
            }
            //行内事件快捷键筛选
            // è¡¨æ ¼è¡Œå†…事件快捷键筛选
            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')  //维修代码
                        if (obj.event === 'HDotCheckCode')  //点检项目代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '维修项目列表',
                                title: '物料列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../PublicPage/RepairItemInformation.html', 'yes'],
                                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"
@@ -517,11 +519,10 @@
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HRepairID1: checkStatus.data[0].HItemID,
                                        HRepairCode: checkStatus.data[0].HNumber,
                                        HRepairName: checkStatus.data[0].HName,
                                        HDotCheckItemID: checkStatus.data[0].HItemID,
                                        HDotCheckCode: checkStatus.data[0].HNumber,
                                        HDotCheckItem: checkStatus.data[0].HName
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
@@ -529,11 +530,45 @@
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        if (obj.event === 'HManagerCode')  //负责人代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '物料列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../PublicPage/UserInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HManagerID: checkStatus.data[0].HItemID,
                                        HManagerCode: checkStatus.data[0].HNumber,
                                        HManagerName: checkStatus.data[0].HName
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        obj.event = "";
                        return false;
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckPlanBillList.html
@@ -29,15 +29,15 @@
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">单据类型</label>
                                    <div class="layui-input-block">
                                        <select name="HBillType" id="HBillType">
                                            <option value="">所有</option>
                                            <option value="ZHXJ">下架找货单</option>
                                            <option value="ZHSJ">上架归还单</option>
                                        </select>
                                    </div>
                                </div>
        <label class="layui-form-label">单据类型</label>
        <div class="layui-input-block">
            <select name="HBillType" id="HBillType">
                <option value="">所有</option>
                <option value="ZHXJ">下架找货单</option>
                <option value="ZHSJ">上架归还单</option>
            </select>
        </div>
    </div>-->
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
@@ -49,30 +49,24 @@
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
                                    </div>
                                </div>-->
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>-->
                                <!--<div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">开始时间</label>
                                        <div class="layui-input-block">
                                            <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">结束时间</label>
                                        <div class="layui-input-block">
                                            <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
                                        </div>
                                    </div>
                                </div>-->
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
@@ -213,14 +207,14 @@
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: 'hmainid', 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 }
                        , { field: '设备名称', title: '设备名称', width: 200, hide: true }
                        , { field: '表头备注', title: '表头备注', width: 200, hide: true }
                        , { 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 }
@@ -237,15 +231,15 @@
                        , { field: '关闭类型', title: '关闭类型', width: 200 }
                        , { field: '表体备注', title: '表体备注', width: 200, hide: true }
                        , { field: '制单人', title: '制单人', width: 115, hide: true }
                        , { field: '制单日期', title: '制单日期', 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: 200, hide: true }
                        , { field: '审核日期', title: '审核日期', width: 200, hide: true, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '修改人', title: '修改人', width: 200, hide: true }
                        , { field: '修改日期', title: '修改日期', width: 115, hide: true }
                        , { field: '修改日期', title: '修改日期', width: 115, hide: true, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { 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, hide: true }
                        , { field: '作废日期', title: '作废日期', width: 115, hide: true }
                        , { field: '作废日期', title: '作废日期', width: 115, hide: true, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                        , { field: '源单单号', title: '源单单号', width: 200 }
@@ -257,20 +251,34 @@
            //重置过滤条件
            function set_ClearQuery() {
                $("#HNumber").val("");
                $("#HName").val("");
                //$("#HBillType").val("");//单据类型
                $("#HBillNo").val("");//单据号
                $("#HSourceBillNo").val("");//源单号
                $("#HCreateBy").val("");//制单人
                $("#BenginHCreateDate").val("");//开始制单时间
                $("#EndHCreateDate").val("");//结束制单时间
                sWhere = "";
                $("#btnSearch").click();
            }
            //快速过滤
            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);
            function get_FastQuery() {
                //var HBillType = $("#HBillType").val();//单据类型
                var HBillNo = $("#HBillNo").val();//单据号
                var HCreateBy = $("#HCreateBy").val();//制单人
                var BenginHCreateDate = $("#BenginHCreateDate").val();//开始制单时间
                var EndHCreateDate = $("#EndHCreateDate").val();//结束制单时间
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HCreateBy) {
                    sWhere += " and åˆ¶å•人 like '%" + HCreateBy + "%'";
                }
                if (BenginHCreateDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + BenginHCreateDate + "'";
                }
                if (EndHCreateDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + EndHCreateDate + "'";
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
@@ -284,7 +292,7 @@
                    shift: 2,
                    area: ['100%', '100%'],
                    maxmin: true,
                    content: '../设备管理/Sb_EquipDotCheckPlanBillEdit.html',
                    content: '../设备管理/Sb_EquipDotCheckPlanBillEdit.html?OperationType=1&linterid=&HSouceBillType=',
                    end: function () {
                        //刷新页面,
                        location.reload();
@@ -299,7 +307,7 @@
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    var linterid = data[0].hmainid.toString();
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
@@ -308,7 +316,7 @@
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../设备管理/Sb_EquipDotCheckPlanBillEdit.html?hID=' + hID
                        , content: '../设备管理/Sb_EquipDotCheckPlanBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
                        , resize: false,
                        end: function () {
                            //刷新页面,