From e01b56dff67628c7bfaca6f488c89970989e824c Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 31 七月 2023 15:24:37 +0800
Subject: [PATCH] 工资结算单(个人):部分问题修改

---
 WebTM/views/工资管理/工资结算单(个人)/Pay_SingleBalBillEdit.html |  213 ++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 145 insertions(+), 68 deletions(-)

diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillEdit.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillEdit.html"
index 8027f02..4cd313d 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillEdit.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillEdit.html"
@@ -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;">鍐呴儴鍗曟嵁鍙�<label style="color:red"> * </label></label>
+                                            <label class="layui-form-label" style="width: 85px;">鍐呴儴鍗曟嵁鍙�</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" lay-verify="HInnerBillNo" name="HInnerBillNo" id="HInnerBillNo">
                                             </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="HGroupName" name="HGroupName" id="HGroupName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                 <input type="hidden" name="HGroupID" id="HGroupID" lay-verify="HGroupID" value="0">
@@ -106,7 +106,7 @@
                                             </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="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">
@@ -116,7 +116,7 @@
                                             </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>
                                             <div class="layui-input-block" style="margin-left: 77px;">
                                                 <input type="text" class="layui-input" lay-verify="HEmpName" name="HEmpName" id="HEmpName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                 <input type="hidden" name="HEmpID" id="HEmpID" lay-verify="HEmpID" value="0">
@@ -128,7 +128,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="HPayTypeName" name="HPayTypeName" id="HPayTypeName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                 <input type="hidden" name="HPayTypeID" id="HPayTypeID" lay-verify="HPayTypeID" value="0">
@@ -159,7 +159,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="HExplanation" name="HExplanation" id="HExplanation">
                                             </div>
@@ -167,7 +167,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>
@@ -277,8 +277,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>
@@ -833,14 +833,13 @@
                 option = {
                     elem: '#mainTable'
                     , toolbar: '#toolbarDemo'
-                    , page: true
-                    , limit: 500
-                    , limits: [50, 500, 5000, 50000]
+                    , page: false
+                    , totalRow: true
                     , cellMinWidth: 120
                     , height: 400
                     , cols: [[
                         { type: 'checkbox', totalRowText: '鍚堣琛�' }
-                        , { type: 'numbers', title: '搴忓彿', totalRow: true }
+                        , { type: 'numbers', title: '搴忓彿'}
                         , { field: 'RowID', title: '琛屽彿', hide: true }                                                   //琛屾爣璇嗭紝鐢ㄤ簬涓嬩竴琛屻�佷笂涓�琛岃瘑鍒墍鍦ㄨ
                         , { field: 'HMaterID', title: '鐗╂枡ID', hide: true }
                         , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', edit: 'text', event: "HMaterNumber" }     //f7
@@ -856,34 +855,34 @@
                         , { field: 'HQty', title: '鏁伴噺', edit: 'text' }
                         , { field: 'HPrice', title: '宸ヤ环', edit: 'text'}
                         , { field: 'HPriceRate', title: '瀹氶娴姩姣旂巼', edit: 'text' }
-                        , { field: 'HSubsidyQty', title: '琛ヨ创鏁伴噺', edit: 'text' }
-                        , { field: 'HSubsidyMoney', title: '琛ヨ创閲戦'}
-                        , { field: 'HSubsidyTotal', title: '琛ヨ创鍚堣', edit: 'text' }
-                        , { field: 'HDeuctTotal', title: '鎵f灏忚', edit: 'text' }
-                        , { field: 'HPackQty', title: '鍖呰鏁伴噺', edit: 'text' }
-                        , { field: 'HPackPrice', title: '鍖呰鍗曚环', edit: 'text' }
-                        , { field: 'HPackMoney', title: '鍖呰閲戦'}
+                        , { field: 'HSubsidyQty', title: '琛ヨ创鏁伴噺', hide: true }
+                        , { field: 'HSubsidyMoney', title: '琛ヨ创閲戦', hide: true}
+                        , { field: 'HSubsidyTotal', title: '琛ヨ创鍚堣', hide: true }
+                        , { field: 'HDeuctTotal', title: '鎵f灏忚', hide: true }
+                        , { field: 'HPackQty', title: '鍖呰鏁伴噺', hide: true }
+                        , { field: 'HPackPrice', title: '鍖呰鍗曚环', hide: true }
+                        , { field: 'HPackMoney', title: '鍖呰閲戦', hide: true}
                         , { field: 'HPackMaterID', title: '鍖呰绫诲瀷ID', hide: true }
                         //, { field: 'HPackMaterNumber', title: '鍖呰绫诲瀷浠g爜' }     //f7
-                        , { field: 'HPackMaterName', title: '鍖呰绫诲瀷', edit: 'text', event: "HPackMaterName" }
-                        , { field: 'HMoney', title: '閲戦'}
-                        , { field: 'HICMOInterID', title: '鐢熶骇浠诲姟鍗旾D', edit: 'text' }
-                        , { field: 'HICMOBillNo', title: '鐢熶骇浠诲姟鍗曞彿', edit: 'text' }
-                        , { field: 'HProcReportInterID', title: '宸ュ簭姹囨姤鍗旾D', edit: 'text' }
-                        , { field: 'HProcReportEntryID', title: '宸ュ簭姹囨姤鍗曞瓙ID', edit: 'text' }
-                        , { field: 'HProcReportBillNo', title: '宸ュ簭姹囨姤鍗曞彿', edit: 'text' }
-                        , { field: 'HProcPlanInterID', title: '宸ュ簭璁″垝鍗旾D', edit: 'text' }
-                        , { field: 'HProcPlanEntryID', title: '宸ュ簭璁″垝鍗曞瓙ID', edit: 'text' }
-                        , { field: 'HProcPlanBillNo', title: '宸ュ簭璁″垝鍗曞彿', edit: 'text' }
+                        , { field: 'HPackMaterName', title: '鍖呰绫诲瀷', hide: true, event: "HPackMaterName" }
+                        , { field: 'HMoney', title: '閲戦', totalRow:true }
+                        , { field: 'HICMOInterID', title: '鐢熶骇浠诲姟鍗旾D', hide: true }
+                        , { field: 'HICMOBillNo', title: '鐢熶骇浠诲姟鍗曞彿', hide: true }
+                        , { field: 'HProcReportInterID', title: '宸ュ簭姹囨姤鍗旾D', hide: true }
+                        , { field: 'HProcReportEntryID', title: '宸ュ簭姹囨姤鍗曞瓙ID', hide: true }
+                        , { field: 'HProcReportBillNo', title: '宸ュ簭姹囨姤鍗曞彿', hide: true }
+                        , { field: 'HProcPlanInterID', title: '宸ュ簭璁″垝鍗旾D', hide: true }
+                        , { field: 'HProcPlanEntryID', title: '宸ュ簭璁″垝鍗曞瓙ID', hide: true }
+                        , { field: 'HProcPlanBillNo', title: '宸ュ簭璁″垝鍗曞彿', hide: true }
                         , { 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 }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', hide: true }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', hide: true }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', hide: true }
+                        , { field: 'HRelationQty', title: '鍏宠仈鏁伴噺', hide: true }
+                        , { field: 'HRelationMoney', title: '鍏宠仈閲戦', hide: true }
+                        , { field: 'HCloseMan', title: '琛屽叧闂汉', hide: true }
+                        , { field: 'HEntryCloseDate', title: '琛屽叧闂椂闂�', hide: true }
                         , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
                     ]]
                 }
@@ -950,7 +949,7 @@
                     , shift: 2                                          //寮瑰嚭鍔ㄧ敾
                     , area: ["90%", "90%"]                              //绐椾綋澶у皬
                     , maxmin: true                                      //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-                    , content: ["../../../views/Baseset/鍩虹璧勬枡/Gy_GetProductionTeamList.html?Type=HGroupID", "yes"]
+                    , content: ["../../../views/鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_Group.html?Type=HGroupID", "yes"]
                     , btn: ["纭畾", "鍙栨秷"]
                     , btn1: function (index, laero) {
                         //鎸夐挳涓�  鐨勫洖璋�
@@ -961,8 +960,11 @@
                             return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                         }
 
-                        $("#HGroupID").val(checkStatus.data[0].HItemID);//鍐呯爜
-                        $("#HGroupName").val(checkStatus.data[0].鐝粍);//鍚嶇О
+                        $("#HGroupID").val(checkStatus.data[0].HItemID);//鐝粍鍐呯爜
+                        $("#HGroupName").val(checkStatus.data[0].鐝粍鍚嶇О);//鐝粍鍚嶇О
+                        $("#HDeptID").val(checkStatus.data[0].HDeptID);//閮ㄩ棬浠g爜
+                        $("#HDeptName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);//閮ㄩ棬鍚嶇О
+                        
                         layer.close(index);//鍏抽棴寮圭獥
                     }
                     , btn2: function (index, layero) { }
@@ -1053,6 +1055,12 @@
                         if (checkStatus.data.length != 1) {
                             return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
                         }
+                        var HStopFlag = checkStatus.data[0].绂佺敤鏍囪;
+                        if (HStopFlag == 'Y') {
+                            layer.msg("璇ュ伐璧勭被鍨嬪凡琚鐢紝璇烽噸鏂伴�夋嫨锛�");
+                            return;
+                        }
+
 
                         $("#HPayTypeID").val(checkStatus.data[0].HItemID);//鍐呯爜
                         $("#HPayTypeName").val(checkStatus.data[0].宸ヨ祫绫诲瀷鍚嶇О);//鍚嶇О
@@ -1284,23 +1292,19 @@
                     layer.msg("鍗曟嵁鍙蜂笉鑳戒负绌�!");
                     return false;
                 }
-                if ($("#HInnerBillNo").val() == "") {
-                    layer.msg("鍐呴儴鍗曟嵁鍙蜂笉鑳戒负绌�!");
+                if ($("#HDate").val() == "") {
+                    layer.msg("鏃ユ湡涓嶈兘涓虹┖!");
                     return false;
                 }
-                if ($("#HGroupName").val() == "") {
+                if ($("#HGroupID").val() == "0") {
                     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() == "") {
+                if ($("#HPayTypeID").val() == "0") {
                     layer.msg("宸ヨ祫绫诲瀷鏈�夋嫨!");
                     return false;
                 }
@@ -1314,14 +1318,14 @@
                 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 value3 = ["HMaterID", "HProcID", "HEmpID"];       //瀛愯〃闇�瑕佽繘琛岄潪绌烘楠岀殑灞炴�ф竻鍗�
+                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;
                             }
@@ -1348,8 +1352,17 @@
                                 return false;
                             }
                         }
+                        //鐗规畩妫�楠�
+                        temp = option.data[i]["HQty"] + "";
+                        if (temp == "0") {
+                            layer.msg("绗�" + (i + 1) + "琛�:鏁伴噺涓嶈兘涓�0!")
+                            return false;
+                        }
                     }
                 }
+                //#endregion
+
+                //#region 瀛愯〃鍏抽敭瀛楁閲嶅妫�楠�
                 //#endregion
                 return true;
             }
@@ -1446,13 +1459,30 @@
                                     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 HPrice = subTable_GetHPrice(HMaterID, HProcID, HSourceID);
+
+                                    if (HPrice != -1) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            "HMaterID": checkStatus.data[0].HItemID
+                                            , "HMaterNumber": checkStatus.data[0].HNumber
+                                            , "HMaterName": checkStatus.data[0].HName
+                                            , "HMaterModel": checkStatus.data[0].HModel
+                                            , "HPrice": HPrice
+                                        })
+                                    } 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);//鍏抽棴寮圭獥
                                 }
                             })
@@ -1478,12 +1508,28 @@
                                     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 HPrice = subTable_GetHPrice(HMaterID, HProcID, HSourceID);
+
                                     //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
-                                    obj.update({
-                                        "HProcID": checkStatus.data[0].HItemID
-                                        , "HProcNumber": checkStatus.data[0].宸ュ簭浠g爜
-                                        , "HProcName": checkStatus.data[0].宸ュ簭
-                                    })
+                                    if (HPrice != -1) {
+                                        obj.update({
+                                            "HProcID": checkStatus.data[0].HItemID
+                                            , "HProcNumber": checkStatus.data[0].宸ュ簭浠g爜
+                                            , "HProcName": checkStatus.data[0].宸ュ簭
+                                            , "HPrice": HPrice
+                                        })
+                                    } else {
+                                        obj.update({
+                                            "HProcID": checkStatus.data[0].HItemID
+                                            , "HProcNumber": checkStatus.data[0].宸ュ簭浠g爜
+                                            , "HProcName": checkStatus.data[0].宸ュ簭
+                                        })
+                                    }
                                     layer.close(index);//鍏抽棴寮圭獥
                                 }
                             })
@@ -1603,7 +1649,7 @@
                     success: function (data1) {
                         if (data1.data.length != 0) {
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["琛屽彿","鐗╂枡ID","宸ュ簭ID","鑱屽憳ID","鍖呰绫诲瀷ID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            var titleData = ["琛屽彿","鐗╂枡ID","宸ュ簭ID","鑱屽憳ID","鍖呰绫诲瀷ID","琛ヨ创鏁伴噺","琛ヨ创閲戦","琛ヨ创鍚堣","鎵f灏忚","鍖呰鏁伴噺","鍖呰鍗曚环","鍖呰閲戦","鍖呰绫诲瀷ID","鍖呰绫诲瀷","鐢熶骇浠诲姟鍗旾D","鐢熶骇浠诲姟鍗曞彿","宸ュ簭姹囨姤鍗旾D","宸ュ簭姹囨姤鍗曞瓙ID","宸ュ簭姹囨姤鍗曞彿","宸ュ簭璁″垝鍗旾D","宸ュ簭璁″垝鍗曞瓙ID","宸ュ簭璁″垝鍗曞彿","婧愬崟涓诲唴鐮�","婧愬崟瀛愬唴鐮�","婧愬崟鍗曞彿","婧愬崟绫诲瀷","鍏宠仈鏁伴噺","鍏宠仈閲戦","琛屽叧闂汉","琛屽叧闂椂闂�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
 
                             dataCol = data1.data[0].HGridString.split(',');
 
@@ -1676,6 +1722,37 @@
             }
             //#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