From 3b45bfc7f2d3fc95a574cbd6fcdaaf17fbc6168b Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 16 八月 2023 11:19:12 +0800
Subject: [PATCH] 工作任务汇报:必填标识,取消上一行下一行,子表不可编辑做颜色标识,子表单元格内容随单元格大小隐藏内容,子表重复校验,取消分页,增加合计行

---
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user |    2 
 WebTM/views/项目管理/工作任务/PM_WorkTaskReportBill.html  |   79 ++++++++++++++++++++++++---------------
 2 files changed, 49 insertions(+), 32 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index e57593f..609d44b 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -4428,7 +4428,7 @@
       <publishTime>07/14/2023 15:45:18</publishTime>
     </File>
     <File Include="views/椤圭洰绠$悊/宸ヤ綔浠诲姟/PM_WorkTaskReportBill.html">
-      <publishTime>07/25/2023 15:45:08</publishTime>
+      <publishTime>08/16/2023 11:12:04</publishTime>
     </File>
     <File Include="views/椤圭洰绠$悊/宸ヤ綔浠诲姟/PM_WorkTaskReportBillList.html">
       <publishTime>07/14/2023 10:59:09</publishTime>
diff --git "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskReportBill.html" "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskReportBill.html"
index 9efdef5..df973f5 100644
--- "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskReportBill.html"
+++ "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskReportBill.html"
@@ -14,7 +14,7 @@
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
     <script src="../../../layuiadmin/PubCustom.js"></script>
-    <style>
+    <!--<style>
         .main-btn { /*澶撮儴涓绘寜閽�*/
             padding: 0 2px; /*璋冩暣鎸夐挳宸﹀彸绌洪殭澶у皬*/
             height: 30px;
@@ -44,7 +44,7 @@
         .layui-form-label {
             width: 25%;
         }
-    </style>
+    </style>-->
 
 </head>
 <body>
@@ -75,20 +75,20 @@
                                 <div class="layui-form-item" style="padding-top: 10px;">
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍗曟嵁鍙�*</label>
+                                            <label class="layui-form-label" style="width: 85px;">鍗曟嵁鍙�<label style="color:red"> * </label></label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鏃ユ湡</label>
+                                            <label class="layui-form-label" style="width: 85px;">鏃ユ湡<label style="color:red"> * </label></label>
                                             <div class="layui-input-block" style="margin-left: 120px; width:180px;">
                                                 <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">姹囨姤浜�*</label>
+                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">姹囨姤浜�<label style="color:red"> * </label></label>
                                             <div class="layui-input-block" style="margin-left: 77px;">
                                                 <input type="text" class="layui-input" lay-verify="HReportEmpName" name="HReportEmpName" id="HReportEmpName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                 <input type="hidden" name="HReportEmpID" id="HReportEmpID" lay-verify="HReportEmpID" value="0">
@@ -100,7 +100,7 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">澶囨敞<label style="color:red"> * </label></label>
+                                            <label class="layui-form-label" style="width: 85px;">澶囨敞</label>
                                             <div class="layui-input-block" style="margin-left: 120px; width: 501px;">
                                                 <input type="text" class="layui-input" lay-verify="HRemark" name="HRemark" id="HRemark">
                                             </div>
@@ -108,7 +108,7 @@
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">缁勭粐*</label>
+                                            <label class="layui-form-label" style="width: 85px;">缁勭粐<label style="color:red"> * </label></label>
                                             <div class="layui-input-block" style="margin-left: 120px; width: 501px;">
                                                 <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
                                                     <!--鍔ㄦ�佹覆鏌撶粍缁�-->
@@ -237,8 +237,8 @@
                                         <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
                                         <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
                                         <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
-                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_up"><i class="layui-icon layui-icon-form"></i>涓婁竴琛�</button>
-                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_under"><i class="layui-icon layui-icon-form"></i>涓嬩竴琛�</button>
+                                        <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn_up"><i class="layui-icon layui-icon-form"></i>涓婁竴琛�</button>
+                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_under"><i class="layui-icon layui-icon-form"></i>涓嬩竴琛�</button>-->
                                     </div>
                                 </script>
                             </div>
@@ -592,22 +592,23 @@
                 option = {
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
-                    , page: true
-                    , limit: 500
-                    , limits: [50, 500, 5000, 50000]
+                    //, page: true
+                    //, limit: 500
+                    //, limits: [50, 500, 5000, 50000]
+                    , totalRow: true
                     , cellMinWidth: 120
                     , height: 400
                     , cols: [[
                         { type: 'checkbox', totalRowText: '鍚堣琛�' }
-                        , { type: 'numbers', title: '搴忓彿', totalRow: true }
-                        , { field: 'RowID', title: '琛屽彿', hide: true }                                                   //琛屾爣璇嗭紝鐢ㄤ簬涓嬩竴琛屻�佷笂涓�琛岃瘑鍒墍鍦ㄨ
-                        , { field: 'HProNumber', title: '椤圭洰浠g爜'}
-                        , { field: 'HProjectStageID', title: '椤圭洰闃舵ID', hide: true }
-                        , { field: 'HProjectStageName', title: '椤圭洰闃舵' }     //f7
+                        , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+                        , { field: 'RowID', title: '琛屽彿', hide: true, style: 'background-color: #f9f9f9;' }                                                   //琛屾爣璇嗭紝鐢ㄤ簬涓嬩竴琛屻�佷笂涓�琛岃瘑鍒墍鍦ㄨ
+                        , { field: 'HProNumber', title: '椤圭洰浠g爜', style: 'background-color: #f9f9f9;'}
+                        , { field: 'HProjectStageID', title: '椤圭洰闃舵ID', hide: true, style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProjectStageName', title: '椤圭洰闃舵', style: 'background-color: #f9f9f9;' }     //f7
                         , { field: 'HName', title: '浠诲姟鍚嶇О', edit: 'text', event: "HName" }
-                        , { field: 'HTaskNote', title: '浠诲姟鎻忚堪' }
-                        , { field: 'HType', title: '浠诲姟绫诲瀷'}
-                        , { field: 'HRelTimes', title: '鑰楃敤宸ユ椂', edit: 'text' }
+                        , { field: 'HTaskNote', title: '浠诲姟鎻忚堪', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HType', title: '浠诲姟绫诲瀷', style: 'background-color: #f9f9f9;'}
+                        , { field: 'HRelTimes', title: '鑰楃敤宸ユ椂', edit: 'text', totalRow: true }
                         , { field: 'HReportNote', title: '姹囨姤鍐呭', edit: 'text' }
                         , { field: 'HAdv', title: '浼樺寲寤鸿', edit: 'text' }
                         , { field: 'HRemarkSub', title: '澶囨敞', edit: 'text' }
@@ -910,7 +911,12 @@
                     return false;
                 }
 
-                if ($("#HReportEmpName").val() == "") {
+                if ($("#HDate").val() == "") {
+                    layer.msg("鏃ユ湡涓嶈兘涓虹┖!");
+                    return false;
+                }
+
+                if ($("#HReportEmpID").val() == "0") {
                     layer.msg("姹囨姤浜烘湭閫夋嫨!");
                     return false;
                 }
@@ -920,16 +926,15 @@
                 var num = [];
                 for (var i = 0; i < option.data.length; i++) {
                     if (option.data[i] != "") {
-                        ////椤圭洰闃舵閲嶅妫�楠�
-                        //if ($.inArray(option.data[i]["HProjectStageID"], num) == -1) {
-                        //    num.push(option.data[i]["HProjectStageID"]);
-                        //} else {
-                        //    layer.msg("绗�" + (i + 1) + "琛�,椤圭洰闃舵:" + option.data[i]["HProjectStageName"] + "閲嶅!");
-                        //    return false;
-                        //}
                         //椤圭洰闃舵闈炵┖妫�楠�
-                        if (option.data[i]["HProjectStageName"] == "") {
+                        if (option.data[i]["HProjectStageID"] == "0") {
                             layer.msg("绗�" + (i + 1) + "琛�:椤圭洰闃舵涓嶈兘涓虹┖!");
+                            return false;
+                        }
+
+                        //浠诲姟鍚嶇О闈炵┖妫�楠�
+                        if (option.data[i]["HName"] == "") {
+                            layer.msg("绗�" + (i + 1) + "琛�:浠诲姟鍚嶇О涓嶈兘涓虹┖!");
                             return false;
                         }
 
@@ -946,6 +951,18 @@
                             }
                         }
                     }
+                }
+                //#endregion
+
+                //#region 瀛愯〃鍏抽敭瀛楁閲嶅妫�楠�
+                var num = [];
+                for (var i = 0; i < option.data.length; i++) {
+                    temp = option.data[i]["HProNumber"] + "|" + option.data[i]["HProjectStageID"] + "|" + option.data[i]["HName"];
+                    if ($.inArray(temp, num) != -1) {
+                        layer.msg("绗�" + (i + 1) + "琛岋細椤圭洰浠g爜銆侀」鐩樁娈点�佷换鍔″悕绉伴噸澶嶏紝璇烽噸鏂伴�夋嫨锛�");
+                        return false;
+                    }
+                    num.push(temp);
                 }
                 //#endregion
                 return true;
@@ -1189,9 +1206,9 @@
                                 }
                                 //璁剧疆鍐呭瀛椾綋澶у皬
                                 if (data1.data[0].HFontSize != 0) {
-                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                                    option.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
                                 } else {
-                                    option.cols[0][i + 1]["style"] = "font-size:100%";
+                                    option.cols[0][i + 1]["style"] += "font-size:100%";
                                 }
                                 //璁剧疆鍒楀
                                 //if (data1.data[0].HColumnWidth != 0) {

--
Gitblit v1.9.1