From 2dce2189361aff402def3fcb4fbcaaea92b1da18 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 30 五月 2025 19:34:52 +0800
Subject: [PATCH] 器具主档维护:编辑页面 复制时 不复制 模具编号、条码编号。 编辑页面 当前仓库、当前仓位、组织、器具可用状态 不可修改

---
 WebTM/views/质量管理/质量报表/QC_MoistureContentDataLedger.html |  481 ++++++++++++++++++++++------------------------------
 1 files changed, 204 insertions(+), 277 deletions(-)

diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_MoistureContentDataLedger.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_MoistureContentDataLedger.html"
index a76b152..aeeacf4 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_MoistureContentDataLedger.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_MoistureContentDataLedger.html"
@@ -34,120 +34,64 @@
                                 <div class="layui-inline">
                                     <label class="layui-form-label">寮�濮嬫棩鏈�</label>
                                     <div class="layui-input-block">
-                                        <input type="date" class="layui-input ForFilteringSchemes" id="HDate">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate">
                                     </div>
                                 </div>
                                 <div class="layui-inline">
                                     <label class="layui-form-label">缁撴潫鏃ユ湡</label>
                                     <div class="layui-input-block">
-                                        <input type="date" class="layui-input ForFilteringSchemes" id="HDate1">
+                                        <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate">
                                     </div>
                                 </div>
                                 <div class="layui-inline">
                                     <label class="layui-form-label" style="width: 85px;">鍒ゅ畾缁撴灉</label>
                                     <div class="layui-input-block" style="margin-left: 120px; width: 85px;">
-                                        <select name="HMonth" id="HMonth" lay-verify="HMonth">
-                                            <option value="鍚堟牸">鍚堟牸</option>
-                                            <option value="涓嶅悎鏍�">涓嶅悎鏍�</option>
+                                        <select name="HResult" id="HResult" lay-verify="HResult">
+                                            <option value="-1">鍏ㄩ儴</option>
+                                            <option value="1">鍚堟牸</option>
+                                            <option value="0">涓嶅悎鏍�</option>
                                         </select>
                                     </div>
                                 </div>
                                 <div class="layui-inline">
-                                    <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
-                                    <div class="layui-input-block" style="margin-left: 120px; width: 125px;">
-                                        <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
-                                            <!--鍔ㄦ�佹覆鏌撳勾浠�-->
-                                        </select>
+                                    <label class="layui-form-label" style="width: 85px; padding: 9px 18px;">鐢熶骇璧勬簮</label>
+                                    <div class="layui-input-block" style="margin-left: 77px;">
+                                        <input type="text" class="layui-input" name="HSourceName" id="HSourceName" lay-verify="HSourceName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+                                        <input type="hidden" class="layui-input" name="HSourceID" lay-verify="HSourceID" id="HSourceID" value="0">
+                                        <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHSource" id="btnHSource" style="padding: 0 10px;float: right;margin-right: 3px;">
+                                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                        </button>
                                     </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" style="padding: 0px; margin-left: 6%;">
-                                    <div class="layui-row" style="margin-top:10px;margin-left:5%;">
-
-                                    </div>
-                                    <div class="layui-row" style="margin-top: 10px; margin-bottom: 10px ">
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">杩囨护</label>
-                                            <div class="layui-input-block">
-                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
-                                                </select>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
-                                                <option value="0" selected="selected"></option>
-                                                <option value="=">=</option>
-                                                <option value=">=">>=</option>
-                                                <option value=">">></option>
-                                                <option value="<="><=</option>
-                                                <option value="<"><</option>
-                                                <option value="<>"><></option>
-                                                <option value="7">鍖呭惈</option>
-                                                <option value="8">宸﹀寘鍚�</option>
-                                                <option value="9">鍙冲寘鍚�</option>
-                                                <option value="10">涓嶅寘鍚�</option>
+                                <div class="layui-row" style="margin-top:5px;margin-left:82px;margin-bottom:5px;">
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label" style="width: 85px;">鏄惁閲忎骇</label>
+                                        <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                            <select name="HBatchWork" id="HBatchWork" lay-verify="HBatchWork">
+                                                <option value="">璇烽�夋嫨</option>
+                                                <option value="1">閲忎骇</option>
+                                                <option value="0">闈為噺浜�</option>
                                             </select>
                                         </div>
-                                        <div class="layui-inline">
-                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
-                                        </div>
                                     </div>
-                                    <div class="layui-row" style=" margin-top: 10px;">
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">杩囨护</label>
-                                            <div class="layui-input-block">
-                                                <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
-                                                </select>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
-                                                <option value="0" selected="selected"></option>
-                                                <option value="=">=</option>
-                                                <option value=">=">>=</option>
-                                                <option value=">">></option>
-                                                <option value="<="><=</option>
-                                                <option value="<"><</option>
-                                                <option value="<>"><></option>
-                                                <option value="7">鍖呭惈</option>
-                                                <option value="8">宸﹀寘鍚�</option>
-                                                <option value="9">鍙冲寘鍚�</option>
-                                                <option value="10">涓嶅寘鍚�</option>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label" style="width: 85px;">椤圭洰鍙�</label>
+                                        <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                            <select name="HProject" id="HProject" class=" ForFilteringSchemes" lay-verify="HProject">
+                                                <!--鍔ㄦ�佹覆鏌撶粍缁�-->
                                             </select>
                                         </div>
-                                        <div class="layui-inline">
-                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
-                                        </div>
                                     </div>
-
-                                    <div class="layui-row" style=" margin-top: 10px;">
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label">杩囨护</label>
-                                            <div class="layui-input-block">
-                                                <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
-                                                </select>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
-                                                <option value="0" selected="selected"></option>
-                                                <option value="=">=</option>
-                                                <option value=">=">>=</option>
-                                                <option value=">">></option>
-                                                <option value="<="><=</option>
-                                                <option value="<"><</option>
-                                                <option value="<>"><></option>
-                                                <option value="7">鍖呭惈</option>
-                                                <option value="8">宸﹀寘鍚�</option>
-                                                <option value="9">鍙冲寘鍚�</option>
-                                                <option value="10">涓嶅寘鍚�</option>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label" style="width: 85px;">浜嬩笟閮�</label>
+                                        <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                            <select name="HDivisionName" id="HDivisionName" class=" ForFilteringSchemes" lay-verify="HDivisionName">
+                                                <!--鍔ㄦ�佹覆鏌撶粍缁�-->
                                             </select>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
                                         </div>
                                     </div>
                                 </div>
@@ -156,13 +100,13 @@
                         <div class="layui-tab layui-tab-card">
                             <div class="layui-tab-content">
                                 <div class="layui-tab-item layui-show">
-                                    <!--杩涘嚭绔欒褰�-->
                                     <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                                 </div>
                             </div>
                         </div>
                         <script type="text/html" id="toolbarDemo1">
                             <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
                             </div>
                         </script>
@@ -192,7 +136,8 @@
             , soulTable = layui.soulTable
         var sWhere = "";
         var option = [];
-        var HModName = "QC_QualityStatisticsDailyReport";
+        var ins;                //鐢ㄤ簬瀵煎嚭excel
+        var HModName = "QC_MoistureContentDataLedger";
         var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
 
         //#endregion
@@ -214,6 +159,9 @@
                 //鍒楄缃�
                 case 'set_HideColumn': get_HideColumn();
                     break;
+                //瀵煎嚭鎸夐挳
+                case 'btn_Export': btn_Export();
+                    break;
             };
         });
 
@@ -227,81 +175,49 @@
             set_ClearQuery();
         });
 
+
+        //閫夋嫨鐢熶骇璧勬簮
+        form.on('submit(btnHSource)', function () {
+            btnHSource();
+        });
+
         //#endregion
 
         //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
 
         // 鍒濆鍖栫晫闈�
         function set_ClearBill() {
-            Year();
-            DeptName();
-            Organ();
-            //set_InitGrid();
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            Get_HProject(); //鑾峰彇椤圭洰鍙�
+            GetGy_Division();//鑾峰彇浜嬩笟閮�
             //鏌ヨ
             get_FastQuery();
         }
 
-        //骞�
-        function Year() {
-            var yyyy = new Date().getFullYear();
-            var YearOption = "";
-            for (var i = 0; i <= 10; i++) {
-                YearOption += '<option  style="color:blue;" value="' + (yyyy - 5 + i) + '">' + (yyyy - 5 + i) + '</option>';
-            }
-            $("#HYear").append(YearOption);
-            $("#HYear").val(yyyy);
-            $("#HMonth").val(new Date().getMonth()+1);
-            form.render('select');
-        }
-
-        //鐢熶骇杞﹂棿
-        function DeptName() {
-            //鑾峰彇杞﹂棿鍒�
-            var HDeptName = '<option value="0" style="color:red;" selected>鍏ㄩ儴杞﹂棿</option>';
-            $.ajax({
-                type: "get",
-                url: GetWEBURL() + "/Sc_ICMOBill/GetHDeptList",
-                async: false,
-                data: { "HOrgID": sessionStorage["OrganizationID"] },
-                success: function (result) {
-                    if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                        var data = result.data;
-                        for (var i = 0; i < data.length; i++) {
-                            if (i == 0)
-                                HDeptName += '<option  style="color:blue;"  value="' + data[i].HItemID + '" >' + data[i].HName + '</option>';
-                            else
-                                HDeptName += '<option  style="color:blue;" value="' + data[i].HItemID + '">' + data[i].HName + '</option>';
-
-                        }
-                        $("#HDeptName").append(HDeptName);
-                        form.render('select');
+        //鐢熶骇璧勬簮閫夋嫨椤甸潰
+        function btnHSource() {
+            layer.open({
+                type: 2//寮圭獥绫诲瀷
+                , skin: 'layui-layer-rim' //鍔犱笂杈规
+                , area: ['90%', '90%']//澶у皬
+                , title: '鐢熶骇璧勬簮鍒楄〃'//鏍囬
+                , shift: 2//寮瑰嚭鍔ㄧ敾
+                , content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.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('璇烽�夋嫨鏁版嵁');
                     }
-                    layer.closeAll("loading");
-                }
-            })
-        }
+                    //鑾峰彇鏁版嵁
+                    $("#HSourceID").val(checkStatus.data[0].HItemID);
+                    $("#HSourceName").val(checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О);
 
-
-        //鑾峰彇缁勭粐
-        function Organ() {
-            //鑾峰彇鐧诲綍椤电粍缁囧垪
-            $.ajax({
-                type: "get",
-                url: GetWEBURL() + "/Web/GetOrganizations",
-                async: false,
-                success: function (result) {
-                    var Organization = "";
-                    if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                        var data = result.data;
-                        for (var i = 0; i < data.length; i++) {
-                            Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
-                        }
-                        $("#HOrgID").append(Organization);
-                        $("#HOrgID").val(sessionStorage["OrganizationID"])
-                        form.render('select');
-                    }
-                    layer.closeAll("loading");
+                    layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                 }
+                , btn2: function (index, layero) { }
             })
         }
 
@@ -309,35 +225,22 @@
 
             var columns = [];
             columns.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
-            columns.push({ field: '宸ュ簭', title: '宸ュ簭', sort: true, width: 90});
-            columns.push({ field: '鍒ゅ畾缁撴灉', title: '鍒ゅ畾缁撴灉', sort: true, width: 110 });
-            columns.push({ field: '涓嶈壇鍘熷洜', title: '涓嶈壇鍘熷洜', sort: true, width: 110 });
-            columns.push({ field: '鎬昏', title: '鎬昏', sort: true, totalRow: true, width: 90});
-
-            //鑾峰彇骞�
-            var yyyy = $("#HYear").val();
-            //鑾峰彇鏈堜唤
-            var MM = $("#HMonth").val();
-            //鑾峰彇寮�濮嬫湀浠界殑鏈�澶уぉ鏁�
-            var SumMonth = new Date(yyyy, MM, 0).getDate(); //鍔ㄦ�佷袱鏈堜箣宸�
-
-            for (var i = 0; i < SumMonth; i++) {
-                columns.push({ field: Format(yyyy + '/' + MM + '/' + (i + 1), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (i + 1), 'MM.dd'), width: 80 })
-            }
-
+            columns.push({ field: '鏃ユ湡', title: '鏃ユ湡', sort: true, width: 180});
+            columns.push({ field: '鏈哄彴鍙�', title: '鏈哄彴鍙�', sort: true, width: 110 });
+            columns.push({ field: '鍙栨牱閲嶉噺', title: '鍙栨牱閲嶉噺', sort: true, totalRow: true, width: 110 });
+            columns.push({ field: '娴嬮噺缁撴灉', title: '娴嬮噺缁撴灉', sort: true, width: 110});
+            columns.push({ field: '鍒ゅ畾缁撴灉', title: '鍒ゅ畾缁撴灉', sort: true, width: 110});
+            columns.push({ field: '妫�娴嬩汉', title: '妫�娴嬩汉', sort: true, width: 110});
+            columns.push({ field: '澶囨敞', title: '澶囨敞', sort: true, width: 110});
             option = {
                 elem: '#mainTable'
                 , toolbar: '#toolbarDemo1'
                 , height: 'full-50'
                 , page: true
-                //, cellMinWidth: 'auto'
                 , totalRow: true
                 , limit: 500
                 , data:[]
-                , limits: [50, 500, 5000, 20000]
-                //, done: function (res, curr, count) {
-                //    soulTable.render(this);
-                //}
+                , limits: [50, 500, 5000, 20000]               
                 , cols: [columns]
             };
             table.render(option);
@@ -348,23 +251,65 @@
 
             var ajaxLoad = layer.load();
             $.ajax({
-                url: GetWEBURL() + '/QC_CustomerAppealReport/QC_QualityStatisticsDailyReport',
+                url: GetWEBURL() + '/QC_CustomerAppealReport/QC_MoistureContentDataLedger',
                 type: "GET",
                 async: false,
                 data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                 success: function (data1) {
                     if (data1.count == 1) {
 
-                        option.data=data1.data
-                        table.render(option);
+                        if (data1.list.length > 0) {
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' });
+                            for (var i = 0; i < data.length; i++) {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        case 'long':
+                                        case 'Int32':
+                                        case 'Int64':
+                                        case 'double':
+                                        case 'Decimal':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 140, totalRow: true });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
 
-                        //鍒锋柊琛ㄦ牸鏁版嵁
-                        DisPlay_HideColumn();
-
-                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
-                            ColFilter();
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo1'
+                                , height: 'full-50'
+                                , page: true
+                                , totalRow: true
+                                , limit: 500
+                                , data: data1.data
+                                , limits: [50, 500, 5000, 20000]                               
+                                , cols: [col]
+                            };
+                        } else {
+                            set_InitGrid();
+                            option.data = data1.data
                         }
 
+                        table.render(option);
+                        ins = table.render(option);
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
                         layer.close(ajaxLoad);
                     } else {
                         layer.close(ajaxLoad);
@@ -379,115 +324,97 @@
 
         // 蹇�熻繃婊�
         function get_FastQuery() {
-            var HYear = $("#HYear").val();
-            var HMonth = $("#HMonth").val();
-            var HDeptName = $("#HDeptName").val();
-            var HOrgID = $("#HOrgID").val();
-
-            var ColName = $("#ColName").val();//澶嶉�夋
-            var Comparator = $("#Comparator").val()
-            var ColContent = $("#ColContent").val();
-            var ColName1 = $("#ColName1").val();//澶嶉�夋
-            var Comparator1 = $("#Comparator1").val()
-            var ColContent1 = $("#ColContent1").val();
-            var ColName2 = $("#ColName2").val();//澶嶉�夋
-            var Comparator2 = $("#Comparator2").val()
-            var ColContent2 = $("#ColContent2").val();
-
-            if (ColName != 0 && Comparator != 0) {
-                var com = "";
-                switch (Comparator) {
-                    case "7":
-                        com = "like'%" + ColContent + "%'";
-                        break;
-                    case "8":
-                        com = "like'%" + ColContent + "'";
-                        break;
-                    case "9":
-                        com = "like'" + ColContent + "%'";
-                        break;
-                    case "10":
-                        com = "not like'%" + ColContent + "%'";
-                        break;
-                    default:
-                        com = "" + Comparator + "'" + ColContent + "'";
-                        break;
-                }
-                sWhere += " and " + ColName + " " + com;
-            }
-            if (ColName1 != 0 && Comparator1 != 0) {
-                var com1 = "";
-                switch (Comparator1) {
-                    case "7":
-                        com1 = "like'%" + ColContent1 + "%'";
-                        break;
-                    case "8":
-                        com1 = "like'%" + ColContent1 + "'";
-                        break;
-                    case "9":
-                        com1 = "like'" + ColContent1 + "%'";
-                        break;
-                    case "10":
-                        com1 = "not like'%" + ColContent1 + "%'";
-                        break;
-                    default:
-                        com1 = "" + Comparator1 + "'" + ColContent1 + "'";
-                        break;
-                }
-                sWhere += " and " + ColName1 + " " + com1;
-            }
-            if (ColName2 != 0 && Comparator2 != 0) {
-                var com2 = "";
-                switch (Comparator2) {
-                    case "7":
-                        com2 = "like'%" + ColContent2 + "%'";
-                        break;
-                    case "8":
-                        com2 = "like'%" + ColContent2 + "'";
-                        break;
-                    case "9":
-                        com2 = "like'" + ColContent2 + "%'";
-                        break;
-                    case "10":
-                        com2 = "not like'%" + ColContent2 + "%'";
-                        break;
-                    default:
-                        com2 = "" + Comparator2 + "'" + ColContent2 + "'";
-                        break;
-                }
-                sWhere += " and " + ColName2 + " " + com2;
-            }
-
-
+            var HBeginDate = $("#HBeginDate").val();
+            var HEndDate = $("#HEndDate").val();
+            var HResult = $("#HResult").val();
+            var HSourceID = $("#HSourceID").val();
+            var HProject = $("#HProject").val();//椤圭洰鍙�
+            var HBatchWork = $("#HBatchWork").val();//鏄惁閲忎骇
+            var HDivisionName = $("#HDivisionName").val();//浜嬩笟閮�
+        
             sWhere = {
-                HYear: HYear
-                , HMonth: HMonth
-                , HDeptName: HDeptName
-                , HOrgID: HOrgID
+                HBeginDate: HBeginDate
+                ,HEndDate: HEndDate
+                , HResult: HResult
+                , HSourceID: HSourceID
+                , HProject: HProject
+                , HBatchWork: HBatchWork
+                , HDivisionName: HDivisionName
             }
-            set_InitGrid();
+            //set_InitGrid();
             get_Display(JSON.stringify(sWhere));
             sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
         }
 
         function set_ClearQuery() {
-            $("#HICMOBillNo").val("");
-            $("#HBardCode").val("");
-            $("#HProcExchBillNo").val("");
-            $("#ColContent1").val("");
-            $("#ColName1").val("0");
-            $("#Comparator1").val("0");
-            $("#ColContent2").val("");
-            $("#ColName2").val("0");
-            $("#Comparator2").val("0");
-            $("#ColContent").val("");
-            $("#ColName").val("0");
-            $("#Comparator").val("0");
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            $("#HResult").val("");
+            $("#HSourceID").val("");
+            $("#HProject").val("");
+            $("#HBatchWork").val("");
+            $("#HDivisionName").val("");           
             form.render('select');
 
             sWhere = "";
         }
 
+        //#region 鑾峰彇椤圭洰鍙�
+        function Get_HProject() {
+            //鑾峰彇椤圭洰鍙�
+            var HProjectList = '<option value="" style="color:red;" selected></option>';
+            $.ajax({
+                type: "get",
+                url: GetWEBURL() + "/Gy_Material/Get_HProject",
+                async: false,
+                data: { "HOrgID": sessionStorage["OrganizationID"] },
+                success: function (result) {
+                    if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                        var data = result.data;
+                        for (var i = 0; i < data.length; i++) {
+                            HProjectList += '<option  style="color:blue;"  value="' + data[i].HName + '" >' + data[i].HName + '</option>';
+                        }
+                        $("#HProject").append(HProjectList);
+                        form.render('select');
+
+                    }
+                    layer.closeAll("loading");
+                }
+            })
+        }
+        //#endregion
+
+        //#region 鑾峰彇浜嬩笟閮�
+        function GetGy_Division() {
+            //鑾峰彇浜嬩笟閮�
+            var HDivisionList = '<option value="" style="color:red;" selected></option>';
+            $.ajax({
+                type: "get",
+                url: GetWEBURL() + "/Gy_Material/Get_Gy_Division",
+                async: false,
+                data: { "HOrgID": sessionStorage["OrganizationID"] },
+                success: function (result) {
+                    if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                        var data = result.data;
+                        for (var i = 0; i < data.length; i++) {
+                            HDivisionList += '<option  style="color:blue;"  value="' + data[i].HName + '" >' + data[i].HName + '</option>';
+                        }
+                        $("#HDivisionName").append(HDivisionList);
+                        form.render('select');
+
+                    }
+                    layer.closeAll("loading");
+                }
+            })
+        }
+        //#endregion
+
+        //#region 瀵煎嚭Execel
+        function btn_Export() {
+            table.exportFile(ins.config.id, option.data, "xls");
+        }
+        //#endregion
+
         //闅愯棌鍒楄缃�
         function get_HideColumn() {
             var colName = "";

--
Gitblit v1.9.1