From 658ddc3d7505dbcf8508571bdd4a4f1efe0569a1 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期五, 10 九月 2021 14:44:47 +0800
Subject: [PATCH] 设备点检计划单、编辑点检计划+设备点检记录单、编辑点检记录

---
 WebTM/views/设备管理/Sb_EquipDotCheckPlanBillList.html |  114 ++++++++-------
 WebTM/views/设备管理/Sb_EquipDotCheckBillEdit.html     |   86 +++++------
 WebTM/views/设备管理/Sb_EquipDotCheckBillList.html     |   58 ++++----
 WebTM/views/设备管理/Sb_EquipDotCheckPlanBillEdit.html |  113 ++++++++++-----
 4 files changed, 205 insertions(+), 166 deletions(-)

diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillEdit.html"
index ba09076..4fb7b44 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/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: '鐐规椤圭洰浠g爜', edit: 'text', hide: true }
-                    //, { field: 'HDotCheckCode', title: '鐐规椤圭洰浠g爜', edit: 'text', event: "HDotCheckCode" }
+                    , { field: 'HDotCheckItemID', title: '鐐规椤圭洰ID', edit: 'text', hide: true }
+                    , { field: 'HDotCheckCode', title: '鐐规椤圭洰浠g爜', 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')  //鐐规椤圭洰浠g爜
-                        //{
-                        //    //椤甸潰灞�-鑷畾涔�
-                        //    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鐨別lem:"#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); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
-                        //        }
-                        //        , btn2: function (index, layero) {
-                        //            //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
-                        //            //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
-                        //        },
-                        //        end: function () {
-                        //        }
-                        //    });
-                        //}
+                        if (obj.event === 'HDotCheckCode')  //鐐规椤圭洰浠g爜
+                        {
+                            //椤甸潰灞�-鑷畾涔�
+                            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鐨別lem:"#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); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                                , btn2: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                                    //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                                },
+                                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) + "琛�,鐐规椤圭洰浠g爜淇℃伅涓虹┖!", { 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) + "琛�,鐐规椤圭洰浠g爜淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                             return false;
                         }
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillList.html"
index 6e67cdb..b58571e 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/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 = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
             }
             //閲嶇疆杩囨护鏉′欢鏂规硶
             function set_ClearQuery() {
-                $("#HBillType").val("");//鍗曟嵁绫诲瀷
+                //$("#HBillType").val("");//鍗曟嵁绫诲瀷
                 $("#HBillNo").val("");//鍗曟嵁鍙�
                 $("#HSourceBillNo").val("");//婧愬崟鍙�
                 $("#HCreateBy").val("");//鍒跺崟浜�
                 $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
                 $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
                 sWhere = "";
+                $("#btnSearch").click();
             }
             //鍒锋柊
             function get_Refresh() {
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
index f448fc9..376442a 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/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: '鐐规椤圭洰浠g爜', 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 @@
                     }
                 });
             }
-            // 缂栬緫鑾峰彇琛ㄥご鏃舵椂闂存牸寮忕煫姝f柟寮�
-            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);//淇敼鏃朵富琛↖D
@@ -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 });
                     }
                 });
+            }
+            // 缂栬緫鑾峰彇琛ㄥご鏃舵椂闂存牸寮忕煫姝f柟寮�
+            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')  //缁翠慨浠g爜
+                        if (obj.event === 'HDotCheckCode')  //鐐规椤圭洰浠g爜
                         {
                             //椤甸潰灞�-鑷畾涔�
                             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鐨別lem:"#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); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                                 }
                                 , btn2: function (index, layero) {
@@ -529,11 +530,45 @@
                                     //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
                                 },
                                 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鐨別lem:"#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); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                                , btn2: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                                    //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                                },
+                                end: function () {
+                                }
+                            });
+                        }
                         obj.event = "";
                         return false;
 
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillList.html"
index 863570f..8e3cad0 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/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: '璁惧浠g爜', title: '璁惧浠g爜', 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 鑱屽憳浠g爜 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 = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
             }
@@ -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 () {
                             //鍒锋柊椤甸潰,

--
Gitblit v1.9.1