From ba1068ace2141a07c3b8af169a93012b29d2ea4a Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期一, 26 八月 2024 09:45:46 +0800
Subject: [PATCH] 1

---
 WebTM/views/系统管理/单据类型/Xt_BillType_Edit.html |  221 +++++++++++++------------------------------------------
 1 files changed, 52 insertions(+), 169 deletions(-)

diff --git "a/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\345\215\225\346\215\256\347\261\273\345\236\213/Xt_BillType_Edit.html" "b/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\345\215\225\346\215\256\347\261\273\345\236\213/Xt_BillType_Edit.html"
index ee9dd4f..04acbaf 100644
--- "a/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\345\215\225\346\215\256\347\261\273\345\236\213/Xt_BillType_Edit.html"
+++ "b/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\345\215\225\346\215\256\347\261\273\345\236\213/Xt_BillType_Edit.html"
@@ -21,12 +21,8 @@
             <div class="layui-card-body" style="padding: 1px;">
                 <form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
                     <div style="padding: 10px;">
-                         <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="Saver">淇濆瓨</button>
-                         <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="Add">鏂板</button>
-                         <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="Check">瀹℃牳</button>
-                         <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="FCheck">鍙嶅鏍�</button>
+                         <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="Saver">淇濆瓨</button>                         
                          <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="Cancel">閫�鍑�</button>
-                         <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="print">鎵撳嵃</button>
                     </div>
                     <div class="layui-form-item" style="padding-top: 10px;">
                         <div class="layui-row">
@@ -60,12 +56,6 @@
                                 <label class="layui-form-label">鏁版嵁搴撳瓙琛�</label>
                                 <div class="layui-input-inline">
                                     <input type="text" name="HEntryTable" id="HEntryTable" lay-verify="HEntryTable" autocomplete="off" placeholder="" class="layui-input">
-                                </div>
-                            </div>
-                            <div class="layui-inline">
-                                <label class="layui-form-label">妯″潡鍚�</label>
-                                <div class="layui-input-inline">
-                                    <input type="text" name="HTemplate" id="HTemplate" lay-verify="HTemplate" autocomplete="off" placeholder="" class="layui-input">
                                 </div>
                             </div>
                         </div>
@@ -187,11 +177,9 @@
                 , util = layui.util
             var sWhere = "";
 
-
             $("#HCreator").val(sessionStorage["HUserName"]);//鍒涘缓浜�
 
-
-            //鑾峰彇鍙傛暟
+            //鑾峰彇閾炬帴鍙傛暟
             function getUrlVars() {
                 var vars = [], hash;
                 var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
@@ -203,134 +191,57 @@
                 return vars;
             }
 
-            ////鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
-            //if (sessionStorage.login != "login") {
-            //    layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
-            //        icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
-            //    }, function () { window.location.href = "../../user/login.html"; });
-            //}
-
+            //鑾峰彇 閫掑叆鍙傛暟
             var params = getUrlVars();
-            var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
-            var HType = params[params[1]];    //鍗曟嵁鐘舵��
-            var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+            var hID = params[params[0]];//缂栬緫鏌ョ湅
+            var OperationType = params[params[1]];//1 鏂板 2澶嶅埗 3缂栬緫 4娴佹按鍙锋柊澧�
 
-
-
-            if (HType == "Modify") {
+            if (OperationType == 1) {
+                //鑾峰緱鏈�澶у崟鎹彿
+                $.ajax({
+                    url: GetWEBURL() + "/Xt_BillType/GetMAXBillID",
+                    type: "GET",
+                    data: {},
+                    success: function (d) {
+                        $("#HInterID").val(d.data[0].hitemid);
+                    }
+                });
+            }
+            else if (OperationType == 3) {
+                //鑾峰彇鍗曟嵁淇℃伅
                 $.ajax({
                     url: GetWEBURL() + "/Xt_BillType/xg",
                     //url: "http://localhost:12761/Xt_BillType/xg",
                     type: "GET",
                     data: {
-                        "HInterID": linterid
+                        "HInterID": hID
                     },
                     success: function (d) {
                         ajaxReturnData = JSON.parse(JSON.stringify(d)).data;
                         $("#HNumber").val(d.data[0].HNumber);
                         $("#HName").val(d.data[0].HName);
                         $("#HRemark").val(d.data[0].HRemark);
+                        $("#HTemplate").val(d.data[0].HTemplate);
+                        $("#HHeadTable").val(d.data[0].HHeadTable);
+                        $("HEntryTable").val(d.data[0].HEntryTable);
+                        $("#HViewName").val(d.data[0].HViewName);
+                        $("#HRightName").val(d.data[0].HRightName);
                         $("#HUpDater").val(sessionStorage["HUserName"]);//淇敼浜�
-                        //table.reload(layTableId, {
-                        //    data: ajaxReturnData
-                        //});
                     }
 
                 });
             }
-            else {
-                $.ajax({
-                    url: GetWEBURL() + "/Xt_BillType/GetMAXBillID",
-                    type: "GET",
-                    data: { },
-                    success: function (d) {
-                        $("#HInterID").val(d.data[0].hitemid);
-                    }
-                });
-                //Initialization();
-            }
-
-
-            //閫夋嫨楠屾敹
-            form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
-                var sMainStr = JSON.stringify(data.field);
-                layer.open({
-                    type: 2
-                    , area: ['100%', '100%']
-                    , title: '楠屾敹鍒楄〃'
-                    , shade: 0.6 //閬僵閫忔槑搴�
-                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
-                    , resize: false
-                    , cancel: function () {
-                        //$(".layui-btn").removeClass("layui-btn-disabled");
-                    }
-                })
-            });
-
-            ////閫夋嫨鍒涘缓缁勭粐
-            //form.on('submit(HCreateOrgID-BT)', function (data) {//閫夋嫨鍒涘缓缁勭粐
-            //    var sMainStr = JSON.stringify(data.field);
-            //    layer.open({
-            //        type: 2
-            //        , area: ['100%', '100%']
-            //        , title: '缁勭粐'
-            //        , shade: 0.6 //閬僵閫忔槑搴�
-            //        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-            //        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-            //        , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
-            //        , resize: false
-            //        , cancel: function () {
-            //            //$(".layui-btn").removeClass("layui-btn-disabled");
-            //        }
-            //    })
-            //});
-
-
-            //鑾峰彇鏈�澶у熀纭�璧勬枡ID
-            $.ajax({
-                url: GetWEBURL() + "/Xt_BillType/GetMAXBillID",
-                type: "GET",
-                data: { },
-                success: function (d) {
-                    //console.log(d.data);
-                    $("#HInterID").val(d.data[0].hitemid);
-                }
-            });
-
-            //鎵撳嵃Printing
-            form.on("submit(print)", function (data) {
-                layer.alert("鎴戞槸鎵撳嵃鎸夐挳锛佸崟鎹富ID鏄細" + linterid);
-                //window.open("../鐢熶骇宸ュ簭绠$悊/宸ュ簭姹囨姤鍗�/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b");
-                window.open("HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b");
-
-            });
-
-            //鏂板
-            form.on('submit(Add)', function () {
-                window.location.reload();
-                $("#HCreator").val(sessionStorage["HUserName"]);//鍒涘缓浜�
-            });
-
-            //瀹℃牳
-            form.on('submit(Check)', function () {
-                
-            });
-
 
             //閫�鍑�
             form.on('submit(Cancel)', function () {
                 layer.confirm('鎮ㄧ‘瀹氳鍏抽棴鏈〉鍚楋紵', { icon: 3, title: '鎻愮ず' }, function (index) {
-                    parent.location.href = "../../../views/index.html";
+                    /*parent.location.href = "../../../views/index.html";*/
+                    parent.layer.closeAll();
                 });
             });
 
-
-
             //鎻愪氦
             form.on('submit(Saver)', function (data) {//鎻愪氦
-
                 var HNumber = $("#HNumber").val();
                 if (HNumber == null || HNumber == undefined || HNumber == "") {
 
@@ -347,62 +258,18 @@
                 }
                 var ModRightNameAdd = 'Xt_BillType_Edit';
                 var user = sessionStorage["HUserName"];
-
-
                 var oMain = JSON.stringify(data.field)
-                var sBillModeify = oMain + ';' + linterid + ';' + user + ';' + ModRightNameAdd;
+                var sBillModeify = oMain + ';' + hID + ';' + user + ';' + ModRightNameAdd;
                 var index = layer.load();
-                if (HType == "Modify") {
-                    $.ajax({
-                        type: "POST",
-                        url: GetWEBURL() + "/'Xt_BillType/AddBill1",
-                        //url: "http://localhost:12761/'Xt_BillType/AddBill1",
-                        async: true,
-                        data: { "oMain": sBillModeify},
-                        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("淇濆瓨鎴愬姛");
-                            }
-                            else {
-                                layer.close(index);
-                                layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                            }
-                        },
-                        error: function (err) {
-                            layer.close(index);
-                            layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                        }
-                    });
-                }
-                else
-                {
+                if (OperationType == 1) {
                     $.ajax({
                         type: "POST",
                         url: GetWEBURL() + "/Xt_BillType/AddBill",
-                        //url: "http://localhost:12761/Xt_BillType/AddBill",
                         async: true,
                         data: { "oMain": oMain },
                         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("鎻愪氦鎴愬姛");
                             }
@@ -417,9 +284,31 @@
                         }
                     });
                 }
+                //淇敼
+                else if (OperationType == 3) {
+                    $.ajax({
+                        type: "POST",
+                        url: GetWEBURL() + "Xt_BillType/AddBill1",
+                        async: true,
+                        data: { "oMain": sBillModeify},
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) {
+                                layer.close(index);
+                                layer.msg("淇濆瓨鎴愬姛");
+                            }
+                            else {
+                                layer.close(index);
+                                layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                        },
+                        error: function (err) {
+                            layer.close(index);
+                            layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        }
+                    });
+                }
             });
-
-
 
         });
         //浠ヤ笂涓簂ayui妯″潡
@@ -428,12 +317,6 @@
             $("#HSecManager").val(obj[0].HName);
             $("#HSecManagerID").val(obj[0].HItemID);
         }
-
-
-
-
-
     </script>
-
 </body>
 </html>

--
Gitblit v1.9.1