From 619330fd6833ebe18ff8ce5695ade08f37c74f4f Mon Sep 17 00:00:00 2001
From: 沈泽 <211959439@qq.com>
Date: 星期二, 12 十月 2021 16:55:36 +0800
Subject: [PATCH] 1

---
 WebTM/views/工资管理/工资结算单(其他)/Pay_OtherBalBill.html |  113 ++++++++++++++++++++++++++++++++++++++++++++------------
 WebTM/layuiadmin/Scripts/webConfig.js            |    2 
 2 files changed, 90 insertions(+), 25 deletions(-)

diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index cbef40e..802a542 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -12,7 +12,7 @@
     //var WEBURL = "http://183.129.128.86:9090/API/";   //鍑礉濂堢壒瀹㈡埛鏈嶅姟鍣ㄥ缃�
     //var WEBURL = "http://192.168.1.253:8080/API/";   //鍑礉濂堢壒瀹㈡埛鏈嶅姟鍣ㄥ唴缃�
     //var WEBURL = "http://220.189.218.154:8092/API/";   //涓镐簳鍥涚淮灏旀湇鍔″櫒
-    var WEBURL = "http://localhost/API/";
+    //var WEBURL = "http://localhost/API/";
     return WEBURL
 }
 
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\345\205\266\344\273\226\051/Pay_OtherBalBill.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\345\205\266\344\273\226\051/Pay_OtherBalBill.html"
index 9baa79b..e7be70b 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\345\205\266\344\273\226\051/Pay_OtherBalBill.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\345\205\266\344\273\226\051/Pay_OtherBalBill.html"
@@ -63,7 +63,7 @@
                                             <label class="layui-form-label">鍗曟嵁鍙�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
-                                                <input type="hidden" name="HInterID" id="HInterID" value="0">
+                                                <input id="HInterID" name="HInterID" type="hidden" />
                                                 <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID">
                                             </div>
                                         </div>
@@ -139,9 +139,19 @@
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">宸ヨ祫绫诲瀷</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HPayType" id="HPayType" style="padding-left: 32px;">
+                                                <input type="text" name="HPayTypeName" id="HPayTypeName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HPayID" id="HPayID" class="layui-input" value="" style="float:left;width:150px;">
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="PayType" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
                                             </div>
                                         </div>
+                                        <!--<div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">宸ヨ祫绫诲瀷</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HPayType" id="HPayType" style="padding-left: 32px;">
+                                            </div>
+                                        </div>-->
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">鎽樿</label>
                                             <div class="layui-input-inline">
@@ -240,6 +250,7 @@
             </div>
         </div>
     </div>
+
     <script type="text/html" id="barDemo">
         <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
         <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
@@ -249,6 +260,7 @@
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>-->
     <script>
+
         layui.config({
             base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
         }).extend({
@@ -278,6 +290,9 @@
                 elem: '#HDate'
 
             });
+
+
+
             //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
             //if (sessionStorage.login != "login") {
             //    layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
@@ -296,8 +311,8 @@
                     , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
                     , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
                     , { field: 'HMaterCode', title: '鐗╂枡浠g爜', edit: 'text', event: 'HMaterCheck', width: 100 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', edit: 'text', width: 100 }
-                    , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', edit: 'text', width: 190 }
+                    //, { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
                     , { field: 'HProcID', title: 'HProcID', edit: 'text', width: 100, hide: true }
                     , { field: 'HProcNumber', title: '宸ュ簭浠g爜', edit: 'text', event: "HProcCheck", width: 100 }
                     , { field: 'HProcName', title: '宸ュ簭鍚嶇О', edit: 'text', width: 100 }
@@ -320,9 +335,17 @@
             };
             //鍒ゆ柇鏄惁鏂板
             if (OperationType == 1) {
+                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HMaker").val(sessionStorage["HUserName"]);
+                $("#HCheckDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HChecker").val(sessionStorage["HUserName"]);
+                $("#HCloseDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HCloseMan").val(sessionStorage["HUserName"]);
+                $("#HUpDateDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HDeleteDate").val(Format(new Date(), "yyyy-MM-dd"));
                 //鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                 option.data = [{
-                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HProcID": "","HProcNumber": "", "HProcName": ""
+                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HProcID": "", "HProcNumber": "", "HProcName": ""
                     , "HEmpID": "", "HEmpNumber": "", "HEmpName": "", "HTimes": 0, "HQty": 0, "HPrice": 0, "HMoney": 0
                     , "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0, "HSourceBillType": "", "HCloseDate": 0, "HRemark": ""
                 }];
@@ -332,7 +355,7 @@
                 $("#HInterID").val(hID);//淇敼鏃朵富琛↖D
                 //缂栬緫鍔犺浇鏁版嵁
                 $.ajax({
-                    url: GetWEBURL() + '/Pay_OtherBalBill/Pay_OtherBalBillListProjectDetai',
+                    url: GetWEBURL() + 'Pay_OtherBalBill/Pay_OtherBalBillListProjectDetai',
                     type: "GET",
                     data: { "sqlWhere": "and hmainid=" + hID },
                     success: function (result) {
@@ -435,13 +458,13 @@
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
                                         HMaterID: checkStatus.data[0].HItemID,
-                                        HMaterCode: checkStatus.data[0].鐗╂枡浠g爜,
-                                        HMaterName: checkStatus.data[0].鐗╂枡,
+                                        HMaterCode: checkStatus.data[0].HNumber,
+                                        HMaterName: checkStatus.data[0].HName,
 
-                                        //HDesignLife: 0,  //璁捐瀵垮懡
-                                        //HLeaveLife: 0,   //鍓╀綑瀵垮懡
-                                        //HQty: 1,         //瀹炴敹鏁伴噺
-                                        //HMoney: 0,       //閲戦
+                                        HDesignLife: 0,  //璁捐瀵垮懡
+                                        HLeaveLife: 0,   //鍓╀綑瀵垮懡
+                                        HQty: 1,         //瀹炴敹鏁伴噺
+                                        HMoney: 0,       //閲戦
                                     });
 
                                     layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -637,7 +660,7 @@
                 //alert(hID);
                 //鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪
                 $.ajax({
-                    url: GetWEBURL() + "Pay_OtherBalBill/Pay_OtherBalBillListCheckDetail",
+                    url: GetWEBURL() + "/Pay_OtherBalBill/Pay_OtherBalBillListCheckDetail",
                     type: "GET",
                     data: {
                         "HID": hID
@@ -657,6 +680,8 @@
                                 , "HEmpName": data.鑱屽憳         //涓荤鍚嶇О
                                 , "HDeptID": data.HDeptID                 //閮ㄩ棬ID
                                 , "HDeptName": data.閮ㄩ棬                //閮ㄩ棬鍚嶇О
+                                , "HPayID": data.HPayID
+                                , "HPayTypeName": data.宸ヨ祫绫诲瀷
                                 , "HSourceBillType": ""                   //婧愬崟绫诲瀷
                                 , "Box2": ""                               //閫夊崟鍙�
                                 , "HExplanation": data.鎽樿              //鎽樿
@@ -798,8 +823,45 @@
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-                        $("#HDeptName").val(checkStatus.data[0].閮ㄩ棬);
+                        $("#HDeptName").val(checkStatus.data[0].HName);
                         $("#HDeptID").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+            //琛ㄥご淇℃伅宸ヨ祫绫诲瀷寮圭獥
+            form.on('submit(PayType)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '宸ヨ祫绫诲瀷鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../../views/宸ヨ祫绠$悊/Gy_WorkPayTypeBillList.html?Type=HPayTypeID', '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('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HPayTypeName").val(checkStatus.data[0].宸ヨ祫绫诲瀷);
+                        $("#HPayID").val(checkStatus.data[0].HItemID);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
                     , btn2: function (index, layero) {
@@ -827,6 +889,17 @@
                 }
             });
 
+
+
+
+
+
+            //form.on('submit(Cancel)', function () {
+            //    //sessionStorage["SourceFlag"] = false;
+            //    parent.location.href = "../../../views/index.html"
+            //    //window.close();//鍏抽棴褰撳墠椤�
+            //})
+
             function formatDate(date) {
                 var d = new Date(date),
                     month = '' + (d.getMonth() + 1),
@@ -848,21 +921,13 @@
                 var index = layer.load();
                 $.ajax({
                     type: "POST",
-                    url: GetWEBURL() + "/Pay_SingleBalBill/AddBill",
-                    //url:"http://localhost:12761/Gy_RoutingBill/AddBill",
+                    url: GetWEBURL() + "/Pay_OtherBalBill/AddBill",
                     async: true,
                     data: { "sMainSub": sMainSub },
                     dataType: "json",
                     success: function (data) {
                         if (data.count == 1) {
-                            //layer.confirm(data.Message, {
-                            //    icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'],
-                            //    btn2: function () {
-                            //        //parent.layui.admin.events.closeThisTabs();鍏抽棴椤电
-                            //        //window.close();//鍏抽棴椤甸潰锛屾祻瑙堝櫒鏈夋晥锛孭DA鏃犳晥
-                            //        parent.location.href = "../../../views/index.html"
-                            //    }//鍏抽棴
-                            //}, function () { window.location.reload(); });//鏂板
+
                             layer.close(index);
                             layer.msg("鎻愪氦鎴愬姛");
                         }

--
Gitblit v1.9.1