From e8aa5b7991595f8b5bdb3e862cfa668cf96fa0ff Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 25 十一月 2024 17:34:26 +0800
Subject: [PATCH] 1

---
 WebTM/views/项目管理/工程项目/PM_ProjectEndBillMainList.html |  193 +++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 181 insertions(+), 12 deletions(-)

diff --git "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectEndBillMainList.html" "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectEndBillMainList.html"
index 026ea56..5c01b62 100644
--- "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectEndBillMainList.html"
+++ "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectEndBillMainList.html"
@@ -14,6 +14,7 @@
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
     <script src="../../../layuiadmin/PubCustom.js"></script>
     <script src="../../../layuiadmin/soulTable.slim.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
 
 
 </head>
@@ -85,6 +86,60 @@
                                             <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
                                         </div>
                                     </div>
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName1" id="ColName1" lay-filter="ColName1" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator1" id="Comparator1" 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>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent1" id="ColContent1">
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style="margin-top:5px">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName2" id="ColName2" lay-filter="ColName2" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator2" id="Comparator2" 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>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent2" id="ColContent2">
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -132,6 +187,13 @@
             var option = [];
             var sWhere = "";
             var HModName = "PM_ProjectEndBillMain";
+
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "4761";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+            //#endregion
+
 
             //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
             var titleData = ["HInterID", "HBillStatus", "HProjectID", "HPMTeamID", "HPMEmpID", "HWorkEmpID", "HCusID", "HManagerID", "HOrgID", "HEntryID","HTestEmp"];
@@ -264,6 +326,33 @@
             });
             //#endregion
 
+
+            form.on('tool(maintable)', function (obj) {
+                var data = obj.data;
+                if (obj.event == '鍗曟嵁鍙�') {
+                    var a = data[i].hmainid.toString();
+                    layer.open({
+                        Type: 2,
+                        area:['80%','80%'],
+                        title: '缂栬緫' + HPageTitle,
+                        closeBtn: 1,
+                        maxmin: true,
+                        shade: 0.6,
+                        anim: 0,
+                        content: '../../椤圭洰绠$悊/宸ョ▼椤圭洰/PM_ProjectEndBillMain.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=',
+                        resize: false,
+                        end: function () {
+                                get_FastQuery(table, option);
+
+                            }
+                        , cancel: function () {
+
+                        }
+                     
+                    })
+
+                }
+            })
             //#endregion
 
             //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
@@ -296,7 +385,7 @@
                     , totalRow: true
                     //, cellMinWidth: 90
                     , limit: 50
-                    , limits: [50, 500, 5000, 50000]
+                    , limits: [50, 500, 5000, 20000]
                     , done: function (res, curr, count) {
                         soulTable.render(this);
                     }
@@ -318,6 +407,8 @@
                         if (data1.count == 1) {
                             var data = [];
                             var col = [];
+                            var tolalArray=[];
+
                             //缁欑┖鐨勬暟缁勮祴鍊�
                             for (var key in data1.list) {
                                 data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
@@ -327,6 +418,11 @@
                             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 if ($.inArray(data[i].name, tolalArray)>-1) {
+                                    col.push({ filed: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 150 });
+
+                                } else if (data[i].name == '鍗曟嵁鍙�') {
+                                    col.push({ filed: data[i].id, title: data[i].name ,align: 'center', sort: true, width: 150, event:'鍗曟嵁鍙�' })
                                 }
                                
                                 else {
@@ -345,6 +441,23 @@
                                         default:
                                             col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                     }
+                                }
+                            }
+
+                            option = {
+                                elem: '#mainTable'                    // 浣跨敤#mainTable浣滀负琛ㄦ牸鐨凞OM鍏冪礌 
+                                , toolbar: '#toolbarDemo'                //鍔犺浇tolbardemo杩欎釜琛ㄦ牸
+                                , cols: [col]                            // 椤甸潰鏄剧ず
+                                , data: data1.data                        //  琛ㄦ牸鏁版嵁
+                                , height: 800                           //琛ㄦ牸楂樺害涓�800
+                                , page: true                            // 寮�鍚垎椤�  
+                                , totalRow: true                               // 鏄惁鏄剧ず鍚堣琛�
+                                , cellMinWidth: 90                      // 鍗曞厓鏍兼渶灏忓搴�  
+                                , limit: 50                               // 榛樿姣忛〉鏄剧ず鐨勬潯鏁�  
+                                , limits: [50, 500, 5000, 20000]               // 鍙�夌殑姣忛〉鏄剧ず鏉℃暟
+                                //res浠庢湇鍔″櫒杩斿洖鐨勬暟鎹�  curr褰撳墠椤电爜鏄剧ず褰撳墠椤电爜鏁版嵁  count锛氳繖閫氬父琛ㄧず鏁版嵁鐨勬�绘潯鏁� 鍒嗛〉鎺т欢
+                                , done: function (res, curr, count) {       // 鍥炶皟璋冪敤鏄剧ず褰撳墠椤电爜鏁版嵁鍜屾暟鎹�绘潯鏁�
+                                    soulTable.render(this);              // 濡傛灉soulTable.render鏄敤浜庨噸鏂版覆鏌撹〃鏍肩殑   閲嶆柊娓叉煋琛ㄦ牸
                                 }
                             }
                             option.cols = [col];
@@ -385,6 +498,13 @@
                 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) {
@@ -405,6 +525,48 @@
                             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 = "" + Comparator + "'" + ColContent + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName2 + " " + com2;
                 }
                 
                 if (HBillNo) {
@@ -429,7 +591,12 @@
                 $("#HName").val("");
                 $("#HReceiveEmp").val("");
                 $("#HBillStatus").val("");
-             
+                $("#ColContent2").val("");
+                $("#ColName2").val("0");
+                $("#Comparator2").val("0");
+                $("#ColContent1").val("");
+                $("#ColName1").val("0");
+                $("#Comparator1").val("0");
                 $("#ColContent").val("");
                 $("#ColName").val("0");
                 $("#Comparator").val("0");
@@ -445,7 +612,7 @@
                     type: 2
                     , skin: 'layui-layer-rim' //鍔犱笂杈规
                     , area: ['100%', '100%']
-                    , title: '宸ヤ綔浠诲姟鍒楄〃-鏂板'
+                    , title: '鏂板' + HPageTitle
                     , shift: 0//寮瑰嚭鍔ㄧ敾
                     , content: '../../椤圭洰绠$悊/宸ョ▼椤圭洰/PM_ProjectEndBillMain.html?OperationType=1&linterid=0&HSouceBillType='
                     ,btn: ['纭畾'],
@@ -467,7 +634,7 @@
                     layer.open({
                         type: 2
                         , area: ['100%', '100%']
-                        , title: '宸ヤ綔浠诲姟鍒楄〃-缂栬緫'
+                        , title: '缂栬緫' + HPageTitle
                         , shift: 0//寮瑰嚭鍔ㄧ敾
                         , content: '../../椤圭洰绠$悊/宸ョ▼椤圭洰/PM_ProjectEndBillMain.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
                         , btn: ['纭畾'],
@@ -544,7 +711,7 @@
                         $.ajax({
                             url: GetWEBURL() + '/PM_ProjectBill/CheckPM_ProjectEndBillMain',
                             type: "GET",
-                            data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] },
+                            data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] },
                             success: function (result) {
                                 if (result.count == 1) {
                                     layer.msg(result.Message, { icon: 1 });
@@ -574,7 +741,7 @@
                         $.ajax({
                             url: GetWEBURL() + '/PM_ProjectBill/CheckPM_ProjectEndBillMain',
                             type: "GET",
-                            data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] },
+                            data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] },
                             success: function (result) {
                                 if (result.count == 1) {
                                     layer.msg(result.Message, { icon: 1 });
@@ -604,7 +771,7 @@
                         $.ajax({
                             url: GetWEBURL() + '/PM_ProjectBill/ClosePM_ProjectEndBillMain',
                             type: "GET",
-                            data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] },
+                            data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] },
                             success: function (result) {
                                 if (result.count == 1) {
 
@@ -635,7 +802,7 @@
                         $.ajax({
                             url: GetWEBURL() + '/PM_ProjectBill/ClosePM_ProjectEndBillMain',
                             type: "GET",
-                            data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] },
+                            data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] },
                             success: function (result) {
                                 if (result.count == 1) {
 
@@ -740,8 +907,7 @@
                         if (data1.data.length != 0) {
 
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            //var titleData = ["鍗曟嵁ID", "HMouldID", "hsubid", "HManagerID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
-
+                            //var titleData = ["鍗曟嵁ID", "HMouldID", "hsubid", "HManagerID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�   var titleData = ["HInterID", "HBillStatus", "HProjectID", "HPMTeamID", "HPMEmpID", "HWorkEmpID", "HCusID", "HManagerID", "HOrgID", "HEntryID","HTestEmp"];
                             dataCol = data1.data[0].HGridString.split(',');
 
                             for (var i = 0; i < option.cols[0].length - 1; i++) {
@@ -812,8 +978,7 @@
                 })
             }
             //#endregion
-
-            //#region 浠绘剰瀛楁杩囨护锛氬垪鍚嶆樉绀轰笅鎷夋
+            //#region 鍒楁槑鏄剧ず涓嬫媺妗�
             function ColFilter() {
                 var Organization = '<option  value="0" selected="selected" ></option>';
                 for (var i = 1; i < option.cols[0].length; i++) {
@@ -823,6 +988,10 @@
                 }
                 $("#ColName").empty();
                 $("#ColName").append(Organization);
+                $("#ColName1").empty();
+                $("#ColName1").append(Organization);
+                $("#ColName2").empty();
+                $("#ColName2").append(Organization);
                 form.render('select');
             }
             //#endregion

--
Gitblit v1.9.1