From 2a39eca42a9dab43189be5436054b1243c3e918c Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 10 八月 2023 15:58:19 +0800
Subject: [PATCH] 定额申请单:添加子表重复校验,子表做颜色区分,子表单元格根据宽度隐藏内容,取消分页,添加合计行,根据物料、工序、资源带出原工价,取消上一行下一行

---
 WebTM/views/工资管理/定额申请/Pay_ProcPriceRequestBill.html |  302 ++++++++++++++++++++++++-------------------------
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user   |    2 
 2 files changed, 149 insertions(+), 155 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index b843b4d..7415899 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -2670,7 +2670,7 @@
       <publishTime>04/11/2023 16:34:43</publishTime>
     </File>
     <File Include="views/宸ヨ祫绠$悊/瀹氶鐢宠/Pay_ProcPriceRequestBill.html">
-      <publishTime>07/25/2023 15:25:28</publishTime>
+      <publishTime>08/10/2023 15:51:10</publishTime>
     </File>
     <File Include="views/宸ヨ祫绠$悊/瀹氶鐢宠/Pay_ProcPriceRequestBillList.html">
       <publishTime>07/24/2023 14:56:05</publishTime>
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBill.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBill.html"
index bd7f009..3b04601 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBill.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBill.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,14 +75,14 @@
                                 <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>
@@ -96,7 +96,7 @@
                                     </div>
                                     <div class="layui-row">
                                         <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="HDeptName" name="HDeptName" id="HDeptName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                 <input type="hidden" name="HDeptID" id="HDeptID" lay-verify="HDeptID" value="0">
@@ -224,8 +224,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>
                 </form>
@@ -335,9 +335,9 @@
             //#region 鎿嶄綔鎸夐挳瑙﹀彂浜嬩欢
             //#region 淇濆瓨鎻愪氦
             form.on('submit(btnSave)', function (data) {//鎻愪氦
-                //if (AllowLoadData(data)) {
+                if (AllowLoadData(data)) {
                     set_AddNew(data);
-                //}
+                }
             });
             //#endregion
 
@@ -573,41 +573,39 @@
                 option = {
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
-                    , 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: 'HMaterID', title: '鐗╂枡ID', hide: true }
+                        , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+                        , { field: 'RowID', title: '琛屽彿', hide: true, style: 'background-color: #f9f9f9;' }                                                   //琛屾爣璇嗭紝鐢ㄤ簬涓嬩竴琛屻�佷笂涓�琛岃瘑鍒墍鍦ㄨ
+                        , { field: 'HMaterID', title: '鐗╂枡ID', hide: true, style: 'background-color: #f9f9f9;' }
                         , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', edit: 'text', event: "HMaterNumber" }     //f7
-                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О' }
-                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿' }
-                        , { field: 'HProcID', title: '宸ュ簭ID', hide: true }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProcID', title: '宸ュ簭ID', hide: true, style: 'background-color: #f9f9f9;' }
                         , { field: 'HProcNumber', title: '宸ュ簭浠g爜', edit: 'text', event: "HProcNumber" }     //f7
-                        , { field: 'HProcName', title: '宸ュ簭鍚嶇О' }
-                        , { field: 'HSourceID', title: '璧勬簮ID', hide: true }
+                        , { field: 'HProcName', title: '宸ュ簭鍚嶇О', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HSourceID', title: '璧勬簮ID', hide: true, style: 'background-color: #f9f9f9;' }
                         , { field: 'HSourceNumber', title: '璧勬簮浠g爜', edit: 'text', event: "HSourceNumber" }     //f7
-                        , { field: 'HSourceName', title: '璧勬簮鍚嶇О' }
-                        , { field: 'HOldPrice', title: '鍘熷崟浠�'}
+                        , { field: 'HSourceName', title: '璧勬簮鍚嶇О', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HOldPrice', title: '鍘熷崟浠�', style: 'background-color: #f9f9f9;'}
                         , { field: 'HPrice', title: '鍗曚环', edit: 'text' }
-                        , { field: 'HOldFixPrice', title: '鍘熷皬鏃跺畾棰�' }
+                        , { field: 'HOldFixPrice', title: '鍘熷皬鏃跺畾棰�', style: 'background-color: #f9f9f9;' }
                         , { field: 'HFixPrice', title: '灏忔椂瀹氶', edit: 'text' }
                         , { field: 'HBeginDate', title: '寮�濮嬫棩鏈�', event: "HBeginDate" }
                         , { field: 'HEndDate', title: '缁撴潫鏃ユ湡', event: "HEndDate" }
                         , { field: 'HCostFlag', title: '鎴愭湰榛樿鏍囪', templet: "#HCostFlag" }
                         , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
-                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�' }
-                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�' }
-                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿' }
-                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷' }
-                        , { field: 'HRelationQty', title: '鍏宠仈鏁伴噺' }
-                        , { field: 'HRelationMoney', title: '鍏宠仈閲戦' }
-                        , { field: 'HCloseMan', title: '琛屽叧闂汉' }
-                        , { field: 'HEntryCloseDate', title: '琛屽叧闂椂闂�' }
+                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', hide: true, style: 'background-color: #f9f9f9;' }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', hide: true, style: 'background-color: #f9f9f9;' }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', hide: true, style: 'background-color: #f9f9f9;' }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', hide: true, style: 'background-color: #f9f9f9;' }
+                        , { field: 'HRelationQty', title: '鍏宠仈鏁伴噺', hide: true, style: 'background-color: #f9f9f9;' }
+                        , { field: 'HRelationMoney', title: '鍏宠仈閲戦', hide: true, style: 'background-color: #f9f9f9;' }
+                        , { field: 'HCloseMan', title: '琛屽叧闂汉', hide: true, style: 'background-color: #f9f9f9;' }
+                        , { field: 'HEntryCloseDate', title: '琛屽叧闂椂闂�', hide: true, style: 'background-color: #f9f9f9;' }
                         , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
                     ]]
                 }
@@ -895,24 +893,12 @@
                     layer.msg("鍗曟嵁鍙蜂笉鑳戒负绌�!");
                     return false;
                 }
-                if ($("#HInnerBillNo").val() == "") {
-                    layer.msg("鍐呴儴鍗曟嵁鍙蜂笉鑳戒负绌�!");
+                if ($("#HDate").val() == "") {
+                    layer.msg("鏃ユ湡涓嶈兘涓虹┖!");
                     return false;
                 }
-                if ($("#HGroupName").val() == "") {
-                    layer.msg("鐝粍鏈�夋嫨!");
-                    return false;
-                }
-                if ($("#HDeptName").val() == "") {
+                if ($("#HDeptID").val() == "0") {
                     layer.msg("閮ㄩ棬鏈�夋嫨!");
-                    return false;
-                }
-                if ($("#HEmpName").val() == "") {
-                    layer.msg("涓荤鏈�夋嫨!");
-                    return false;
-                }
-                if ($("#HPayTypeName").val() == "") {
-                    layer.msg("宸ヨ祫绫诲瀷鏈�夋嫨!");
                     return false;
                 }
                 //#endregion
@@ -921,18 +907,18 @@
                 var temp;                               //璁板綍闇�瑕佹楠岀殑灞炴�х殑鍊硷紝鐢ㄤ簬妫�楠�
                 var ref = /^\d+(\.\d+)?$/;          //鍒ゆ柇鏄惁鏄潪璐熸诞鐐规暟
                 var ref1 = /^\d+$/;            //鍒ゆ柇鏄惁鏄潪璐熸暣鏁�
-                var value1 = ["HTimes", "HQty", "HPrice", "HPriceRate", "HSubsidyQty", "HSubsidyMoney", "HSubsidyTotal", "HDeuctTotal", "HPackQty", "HPackPrice", "HPackMoney", "HMoney"];  //瀛愯〃闇�瑕佽繘琛屾诞鐐规暟楠岃瘉鐨勫睘鎬ф竻鍗�
-                var value1_ = ["宸ユ椂", "鏁伴噺", "宸ヤ环", "瀹氶娴姩姣旂巼", "琛ヨ创鏁伴噺", "琛ヨ创閲戦", "琛ヨ创鍚堣", "鎵f灏忚", "鍖呰鏁伴噺", "鍖呰鍗曚环", "鍖呰閲戦", "閲戦"];  ////瀛愯〃闇�瑕佽繘琛屾诞鐐规暟楠岃瘉鐨勫睘鎬ф竻鍗曞搴旂殑鍒楀悕娓呭崟
-                var value2 = ["HICMOInterID", "HProcReportInterID", "HProcReportEntryID", "HProcPlanInterID", "HProcPlanEntryID"];  //瀛愯〃闇�瑕佹暣鏁版楠岀殑灞炴�ф竻鍗�
-                var value2_ = ["鐢熶骇浠诲姟鍗旾D", "宸ュ簭姹囨姤鍗旾D", "宸ュ簭姹囨姤鍗曞瓙ID", "宸ュ簭璁″垝鍗旾D", "宸ュ簭璁″垝鍗曞瓙ID"]; //瀛愯〃闇�瑕佹暣鏁版楠岀殑灞炴�ф竻鍗曞搴旂殑鍒楀悕娓呭崟
-                var value3 = ["HMaterNumber", "HProcNumber", "HEmpNumber", "HPackMaterName"];       //瀛愯〃闇�瑕佽繘琛岄潪绌烘楠岀殑灞炴�ф竻鍗�
-                var value3_ = ["鐗╂枡", "宸ュ簭", "鑱屽憳", "鍖呰鏂瑰紡"];                                 //瀛愯〃闇�瑕佽繘琛岄潪绌烘楠岀殑灞炴�ф竻鍗曞搴旂殑鍒楀悕娓呭崟
+                var value1 = ["HOldPrice", "HPrice", "HOldFixPrice", "HFixPrice"];  //瀛愯〃闇�瑕佽繘琛屾诞鐐规暟楠岃瘉鐨勫睘鎬ф竻鍗�
+                var value1_ = ["鍘熷崟浠�", "鍗曚环", "鍘熷皬鏃跺畾棰�", "灏忔椂瀹氶"];  ////瀛愯〃闇�瑕佽繘琛屾诞鐐规暟楠岃瘉鐨勫睘鎬ф竻鍗曞搴旂殑鍒楀悕娓呭崟
+                var value2 = [];  //瀛愯〃闇�瑕佹暣鏁版楠岀殑灞炴�ф竻鍗�
+                var value2_ = []; //瀛愯〃闇�瑕佹暣鏁版楠岀殑灞炴�ф竻鍗曞搴旂殑鍒楀悕娓呭崟
+                var value3 = ["HMaterID", "HProcID", "HSourceID"];       //瀛愯〃闇�瑕佽繘琛岄潪绌烘楠岀殑灞炴�ф竻鍗�
+                var value3_ = ["鐗╂枡", "宸ュ簭", "璧勬簮"];                                 //瀛愯〃闇�瑕佽繘琛岄潪绌烘楠岀殑灞炴�ф竻鍗曞搴旂殑鍒楀悕娓呭崟
                 for (var i = 0; i < option.data.length; i++) {
                     if (option.data[i] != "") {
                         //闈炵┖妫�楠�
                         for (var j = 0; j < value3.length; j++) {
                             temp = option.data[i][value3[j]] + "";
-                            if (temp == "") {
+                            if (temp == "0") {
                                 layer.msg("绗�" + (i + 1) + "琛�:" + value3_[j] + "鏈�夋嫨!");
                                 return false;
                             }
@@ -960,6 +946,18 @@
                             }
                         }
                     }
+                }
+                //#endregion
+
+                //#region 瀛愯〃鍏抽敭瀛楁閲嶅妫�楠�
+                var num = [];
+                for (var i = 0; i < option.data.length; i++) {
+                    temp = option.data[i]["HMaterID"] + "|" + option.data[i]["HProcID"] + "|" + option.data[i]["HSourceID"];
+                    if ($.inArray(temp, num) != -1) {
+                        layer.msg("绗�" + (i + 1) + "琛岋細鐗╂枡銆佸伐搴忋�佽祫婧愰噸澶嶏紝璇烽噸鏂伴�夋嫨锛�");
+                        return false;
+                    }
+                    num.push(temp);
                 }
                 //#endregion
                 return true;
@@ -1060,13 +1058,29 @@
                                     if (checkStatus.data.length != 1) {
                                         return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                                     }
-                                    //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
-                                    obj.update({
-                                        "HMaterID": checkStatus.data[0].HItemID
-                                        , "HMaterNumber": checkStatus.data[0].HNumber
-                                        , "HMaterName": checkStatus.data[0].HName
-                                        , "HMaterModel": checkStatus.data[0].HModel
-                                    })
+                                    //鑾峰彇宸ヤ环
+                                    var HMaterID = checkStatus.data[0].HItemID;
+                                    var HProcID = obj.data.hasOwnProperty("HProcID") ? obj.data.HProcID + "" : "0";
+                                    var HSourceID = obj.data.hasOwnProperty("HSourceID") ? obj.data.HSourceID + "" : "0";
+                                    var HOldPrice = subTable_GetHPrice(HMaterID, HProcID, HSourceID);
+
+                                    if (HOldPrice != -1) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            "HMaterID": checkStatus.data[0].HItemID
+                                            , "HMaterNumber": checkStatus.data[0].HNumber
+                                            , "HMaterName": checkStatus.data[0].HName
+                                            , "HMaterModel": checkStatus.data[0].HModel
+                                            , "HOldPrice": HOldPrice
+                                        })
+                                    } else {
+                                        obj.update({
+                                            "HMaterID": checkStatus.data[0].HItemID
+                                            , "HMaterNumber": checkStatus.data[0].HNumber
+                                            , "HMaterName": checkStatus.data[0].HName
+                                            , "HMaterModel": checkStatus.data[0].HModel
+                                        })
+                                    }
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
                             })
@@ -1092,12 +1106,27 @@
                                     if (checkStatus.data.length != 1) {
                                         return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                                     }
+                                    //鑾峰彇宸ヤ环
+                                    var HMaterID = obj.data.hasOwnProperty("HMaterID") ? obj.data.HMaterID + "" : "0";
+                                    var HProcID = checkStatus.data[0].HItemID;
+                                    var HSourceID = obj.data.hasOwnProperty("HSourceID") ? obj.data.HSourceID + "" : "0";
+                                    var HOldPrice = subTable_GetHPrice(HMaterID, HProcID, HSourceID);
+
                                     //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
-                                    obj.update({
-                                        "HProcID": checkStatus.data[0].HItemID
-                                        , "HProcNumber": checkStatus.data[0].宸ュ簭浠g爜
-                                        , "HProcName": checkStatus.data[0].宸ュ簭
-                                    })
+                                    if (HOldPrice != -1) {
+                                        obj.update({
+                                            "HProcID": checkStatus.data[0].HItemID
+                                            , "HProcNumber": checkStatus.data[0].宸ュ簭浠g爜
+                                            , "HProcName": checkStatus.data[0].宸ュ簭
+                                            , "HOldPrice": HOldPrice
+                                        })
+                                    } else {
+                                        obj.update({
+                                            "HProcID": checkStatus.data[0].HItemID
+                                            , "HProcNumber": checkStatus.data[0].宸ュ簭浠g爜
+                                            , "HProcName": checkStatus.data[0].宸ュ簭
+                                        })
+                                    }
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
                             })
@@ -1123,12 +1152,27 @@
                                     if (checkStatus.data.length != 1) {
                                         return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                                     }
+                                    //鑾峰彇宸ヤ环
+                                    var HMaterID = obj.data.hasOwnProperty("HMaterID") ? obj.data.HMaterID + "" : "0";
+                                    var HProcID = obj.data.hasOwnProperty("HProcID") ? obj.data.HProcID + "" : "0";
+                                    var HSourceID = checkStatus.data[0].HItemID;
+                                    var HOldPrice = subTable_GetHPrice(HMaterID, HProcID, HSourceID);
+
                                     //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
-                                    obj.update({
-                                        "HSourceID": checkStatus.data[0].HItemID
-                                        , "HSourceNumber": checkStatus.data[0].鐢熶骇璧勬簮浠g爜
-                                        , "HSourceName": checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О
-                                    })
+                                    if (HOldPrice != -1) {
+                                        obj.update({
+                                            "HSourceID": checkStatus.data[0].HItemID
+                                            , "HSourceNumber": checkStatus.data[0].鐢熶骇璧勬簮浠g爜
+                                            , "HSourceName": checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О
+                                            , "HOldPrice": HOldPrice
+                                        })
+                                    } else {
+                                        obj.update({
+                                            "HSourceID": checkStatus.data[0].HItemID
+                                            , "HSourceNumber": checkStatus.data[0].鐢熶骇璧勬簮浠g爜
+                                            , "HSourceName": checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О
+                                        })
+                                    }
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
                             })
@@ -1138,83 +1182,6 @@
                     }
 
                 })
-                //#endregion
-
-                //#region 澶辩劍瑙﹀彂浜嬩欢
-                //$(document).off('change', ".layui-table-edit").on('change', '.layui-table-edit', function (e) {
-                //    var fieldList = ["HQty", "HPrice", "HPriceRate", "HSubsidyQty", "HSubsidyTotal", "HDeuctTotal", "HPackQty", "HPackPrice"];  //缁戝畾璇ヤ簨浠剁殑鍏冪礌鐨別vent灞炴�у�兼竻鍗�
-                //    if ($.inArray(obj.event, fieldList) >= 0) {
-                //        //鑾峰彇change鍚庣殑鏂板��
-                //        var HQty = obj.data.HQty;                                       //鏁伴噺
-                //        var HPrice = obj.data.HPrice;                                 //宸ヤ环
-                //        var HPriceRate = obj.data.HPriceRate;                     //瀹氶娴姩姣旂巼
-                //        var HSubsidyQty = obj.data.HSubsidyQty;                  //琛ヨ创鏁伴噺
-                //        var HSubsidyTotal = obj.data.HSubsidyTotal;            //琛ヨ创鍚堣
-                //        var HDeuctTotal = obj.data.HDeuctTotal;                  //鎵f灏忚
-                //        var HPackQty = obj.data.HPackQty;                           //鍖呰鏁伴噺
-                //        var HPackPrice = obj.data.HPackPrice;                     //鍖呰鍗曚环
-                //        var valueList = [];
-                //        valueList.push(HQty);
-                //        valueList.push(HPrice);
-                //        valueList.push(HPriceRate);
-                //        valueList.push(HSubsidyQty);
-                //        valueList.push(HSubsidyTotal);
-                //        valueList.push(HDeuctTotal);
-                //        valueList.push(HPackQty);
-                //        valueList.push(HPackPrice);
-                //        //妫�楠屾暟鎹牸寮�
-                //        var temp;                           //瀛樺偍闇�瑕佹牎楠岀殑鏁版嵁
-                //        var ref = /^\d+(\.\d+)?$/;          //姝e垯琛ㄨ揪寮�-鏍¢獙鏄惁涓洪潪璐熸暟瀛�
-                //        for (var i = 0; i < valueList.length; i++) {
-                //            temp = valueList[i] + "";
-                //            if (temp == "") {
-                //                //valueList[i] = 0;
-                //                layer.msg("鏁版嵁涓嶅彲浠ヤ负绌�!");
-                //                //鑻ユ牎楠屽瓨鍦ㄩ棶棰橈紝鍒欏皢鍊煎彉鏇翠负change鍓嶇殑鍊�
-                //                //HQty = valueList[0];
-                //                //HPrice = valueList[1];
-                //                //HPriceRate = valueList[2];
-                //                //HSubsidyQty = valueList[3];
-                //                //HSubsidyTotal = valueList[4];
-                //                //HDeuctTotal = valueList[5];
-                //                //HPackQty = valueList[6];
-                //                //HPackPrice = valueList[7];
-                //                return;
-                //            } else if (!ref.test(temp)) {
-                //                //valueList[i] = 0;
-                //                layer.msg("璇疯緭鍏ラ潪璐熸暟瀛楋紒")
-                //                //鑻ユ牎楠屽瓨鍦ㄩ棶棰橈紝鍒欏皢鍊煎彉鏇翠负change鍓嶇殑鍊�
-                //                //HQty = valueList[0];
-                //                //HPrice = valueList[1];
-                //                //HPriceRate = valueList[2];
-                //                //HSubsidyQty = valueList[3];
-                //                //HSubsidyTotal = valueList[4];
-                //                //HDeuctTotal = valueList[5];
-                //                //HPackQty = valueList[6];
-                //                //HPackPrice = valueList[7];
-                //                return;
-                //            }
-                //        }
-                //        var baseSum = HQty * HPrice * HPriceRate;
-                //        var HSubsidyMoney = HSubsidyQty * HPrice;                                                   //琛ヨ创閲戦
-                //        var HPackMoney = HPackQty * HPackPrice;                                                     //鍖呰閲戦
-                //        var HMoney = baseSum + HSubsidyMoney + HSubsidyTotal + HSubsidyTotal + HPackMoney - HDeuctTotal;                //閲戦 = 鏁伴噺*宸ヤ环*棰濆畾娴姩姣旂巼 + 琛ヨ创鏁伴噺*宸ヤ环 + 琛ヨ创鍚堣 + 鍖呰鏁伴噺*鍖呰鍗曚环 - 鎵f灏忚
-                //        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
-                //        //obj.update({
-                //        //    "HQty": HQty
-                //        //    , "HPrice": HPrice
-                //        //    , "HPriceRate": HPriceRate
-                //        //    , "HSubsidyQty": HSubsidyQty
-                //        //    , "HSubsidyMoney": HSubsidyMoney
-                //        //    , "HSubsidyTotal": HSubsidyTotal
-                //        //    , "HDeuctTotal": HDeuctTotal
-                //        //    , "HPackQty": HPackQty
-                //        //    , "HPackPrice": HPackPrice
-                //        //    , "HPackMoney": HPackMoney
-                //        //    , "HMoney": HMoney
-                //        //})
-                //    }
-                //});
                 //#endregion
             }
             //#endregion
@@ -1264,7 +1231,7 @@
                     success: function (data1) {
                         if (data1.data.length != 0) {
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["琛屽彿", "鐗╂枡ID", "宸ュ簭ID", "鑱屽憳ID", "鍖呰绫诲瀷ID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            var titleData = ["琛屽彿", "鐗╂枡ID", "宸ュ簭ID", "鑱屽憳ID", "璧勬簮ID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "婧愬崟鍗曞彿", "婧愬崟绫诲瀷", "鍏宠仈鏁伴噺", "鍏宠仈閲戦", "琛屽叧闂汉", "琛屽叧闂椂闂�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
 
                             dataCol = data1.data[0].HGridString.split(',');
 
@@ -1280,9 +1247,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) {
@@ -1351,11 +1318,38 @@
                 form.render('checkbox');
             }
             //#endregion
+
+            //#region 瀛愯〃鐗╂枡銆佸伐搴忓甫鍑哄伐浠�
+            function subTable_GetHPrice(HMaterID, HProcID, HSourceID) {
+                var HPrice;
+                if (HMaterID != "0" && HProcID != "0") {
+                    $.ajax({
+                        type: "Get",
+                        url: GetWEBURL() + "/Pay_SingleBalBill/get_HPrice_BaseMaterHProcHSource",
+                        async: false,
+                        data: { "HMaterID": HMaterID, "HProcID": HProcID, "HSourceID": HSourceID },
+                        success: function (res) {
+                            if (res.count == 1) {
+                                HPrice = res.data;
+                            }
+                            else {
+                                layer.msg(res.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                HPrice = 0;
+                            }
+                        },
+                        error: function (err) {
+                            layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            HPrice = 0;
+                        }
+                    });
+                    return HPrice;
+                } else {
+                    HPrice = -1;
+                    return HPrice;
+                }
+            }
             //#endregion
-
-
-
-
+            //#endregion
         });
 
 

--
Gitblit v1.9.1