From 07cf94734c36d4eae6ddbc4dd338bf5af81a2193 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 28 十月 2024 16:11:39 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/views/生产管理/工单/Sc_MyTicketList.html |  218 +++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 173 insertions(+), 45 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\267\245\345\215\225/Sc_MyTicketList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\267\245\345\215\225/Sc_MyTicketList.html"
index 5b3b3d6..b7dde12 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\267\245\345\215\225/Sc_MyTicketList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\267\245\345\215\225/Sc_MyTicketList.html"
@@ -28,15 +28,15 @@
                         <div style="padding: 10px; ">
                             <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_view" lay-filter="btn_view">棰勮</button>
                             <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_refresh" lay-filter="btn_refresh">鍒锋柊</button>
-                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_view" lay-filter="btn_start">寮�宸�</button>
-                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_view" lay-filter="btn_report">姹囨姤</button>
+                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_start" lay-filter="btn_start">寮�宸�</button>
+                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="btn_report" lay-filter="btn_report">姹囨姤</button>
                             <button type="button" class="layui-btn layui-btn-normal" lay-submit="" style="display:none;" id="get_Exit" lay-filter="get_Exit">閫�鍑�</button>
                         </div>
-                        <div class="layui-tab layui-tab-card" style="margin-top:20px;">
+                        <div class="layui-tab layui-tab-card" style="margin-top:20px;" lay-filter="tab-TabTest">
                             <ul class="layui-tab-title">
-                                <li class="layui-this">鏈紑宸�</li>
-                                <li>宸插畬宸�</li>
-                                <li>姝e湪鐢熶骇</li>
+                                <li lay-id="1" class="layui-this">鏈紑宸�</li>
+                                <li lay-id="2">宸插畬宸�</li>
+                                <li lay-id="3">姝e湪鐢熶骇</li>
                             </ul>
                             <div class="layui-tab-content">
                                 <div class="layui-tab-item layui-show">
@@ -83,8 +83,8 @@
             var option_finish = ""; //宸插畬宸�
             var option_proc = ""; //姝e湪鐢熶骇
             var ins;
-
-
+            var TableTab = "mainTable_notStart";  //鍒濆鍖栭〉闈㈡椂榛樿涓� 鈥滄湭寮�宸モ�� 椤电
+            var cur_title = "鏈紑宸�"; //褰撳墠閫変腑椤电
             //#endregion
 
             //#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -92,7 +92,7 @@
             //
             var HModName = "Sc_MyTicketList";
             //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� 锛堟垜涓诲鐨勶級
-            var titleData = ["HInterID","HEntryID"];
+            var titleData = ["HInterID","HEntryID","HSourceID","HMaterID","HDeptID","婧愬崟瀛愬唴鐮�","婧愬崟绫诲瀷","鍗曟嵁绫诲瀷"];
             //鍒濆鍖栫晫闈�
             set_ClearBill();
             //#endregion
@@ -103,10 +103,39 @@
                 get_print();
             });
 
+            //寮�宸�
+            form.on('submit(btn_start)', function (data) {
+                get_start();
+            });
+
+            //姹囨姤
+            form.on('submit(btn_report)', function (data) {
+                get_report();
+            });
+
             //閫�鍑�
             form.on('submit(get_Exit)', function (data) {
                 Pub_Close(2);
             });
+
+            //鍒锋柊
+            form.on('submit(btn_refresh)', function (data) {
+                get_Refresh();
+            });
+
+            
+            //鐩戝惉褰撳墠澶勪簬鍝竴涓〉绛撅紝浼� HModName 鍊�
+            element.on('tab(tab-TabTest)', function (data) {
+                HMaterInfo = table.cache['mainTable'];
+                cur_title = data.elem.context.innerText;
+                if (cur_title == "鏈紑宸�") {
+                    TableTab = "mainTable_notStart";
+                } else if (cur_title == "宸插畬宸�") {
+                    TableTab = "mainTable_finish";
+                } else if (cur_title == "姝e湪鐢熶骇") {
+                    TableTab = "mainTable_proc";
+                }
+            })
             //#endregion
 
             //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
@@ -130,9 +159,9 @@
 
             //鍒濆鍖栨湭寮�宸ュ垪琛�
             function set_InitGrid_notStart() {
-                option = {
+                option_notStart = {
                     elem: '#mainTable_notStart'
-                    , toolbar: '#toolbarDemo'
+                    //, toolbar: '#toolbarDemo'
                     , page: true
                     , height: 300
                     , cellMinWidth: 90
@@ -145,7 +174,7 @@
 
             //鍒濆鍖栧凡瀹屽伐鍒楄〃
             function set_InitGrid_finish() {
-                option2 = {
+                option_finish = {
                     elem: '#mainTable_finish'
                     , page: false
                     , height: 500
@@ -157,7 +186,7 @@
 
             //鍒濆鍖栨鍦ㄧ敓浜у垪琛�
             function set_InitGrid_proc() {
-                option2 = {
+                option_proc = {
                     elem: '#mainTable_proc'
                     , page: false
                     , height: 500
@@ -173,10 +202,10 @@
                 var ajaxLoad = layer.load();
 
                 $.ajax({
-                    url: GetWEBURL() + '/PM_ReportController/PM_ProjectBillMYList',
+                    url: GetWEBURL() + '/Sc_MyTicket/list',
                     type: "GET",
                     async: false,
-                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    data: { "HSourceID": sessionStorage["HSourceID"], "user": sessionStorage["HUserName"] },
                     success: function (data1) {
                         if (data1.count == 1) {
                             var data = [];
@@ -205,38 +234,53 @@
                             }
 
                             //鍔ㄦ�佹樉绀哄垪鍚�
-                            option = {
-                                elem: '#mainTable'
-                                , toolbar: '#toolbarDemo'
+                            option_notStart = {
+                                elem: '#mainTable_notStart'
+                                //, toolbar: '#toolbarDemo'
                                 , cols: [col]
-                                , data: data1.data.h_p_My_PM_ProjectReportBill
+                                , data: data1.data.h_p_Sc_MyICMOWorkBill
                                 , height: 'full-80'
                                 , page: true
                                 , limits: [50, 500, 5000, 50000]
                                 , limit: 50
                                 , cellMinWidth: 90
                             }
-                            table.render(option);
-                            ins = table.render(option);
-                            option1 = {
-                                elem: '#mainTable1'
-                                , toolbar: '#toolbarDemo'
+                            table.render(option_notStart);
+                            ins = table.render(option_notStart);
+
+                            option_finish = {
+                                elem: '#mainTable_finish'
+                                //, toolbar: '#toolbarDemo'
                                 , cols: [col]
-                                , data: data1.data.h_p_My_PM_ProjectReportBill1
+                                , data: data1.data.h_p_Sc_MyICMOWorkBill1
                                 , height: 'full-80'
                                 , page: true
                                 , limits: [50, 500, 5000, 50000]
                                 , limit: 50
                                 , cellMinWidth: 90
                             }
-                            table.render(option1);
+                            table.render(option_finish);
+
+                            option_proc = {
+                                elem: '#mainTable_proc'
+                                //, toolbar: '#toolbarDemo'
+                                , cols: [col]
+                                , data: data1.data.h_p_Sc_MyICMOWorkBill2
+                                , height: 'full-80'
+                                , page: true
+                                , limits: [50, 500, 5000, 50000]
+                                , limit: 50
+                                , cellMinWidth: 90
+                            }
+                            table.render(option_proc);
+
                             //鍒锋柊鎸夐挳鏄剧ず
                             var btns = document.getElementsByTagName("button");     //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
-                            var HBillType = "PM_ProjectBillMainMy";
+                            var HBillType = "鎴戠殑宸ュ崟";
                             Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
 
                             //鍒锋柊琛ㄦ牸鏁版嵁
-                            DisPlay_HideColumn();
+                            //DisPlay_HideColumn();
 
                             layer.close(ajaxLoad);
                             if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
@@ -257,20 +301,109 @@
             }
             //#endregion
 
+
+            //#region 鍒锋柊
+            function get_Refresh() {
+                get_FastQuery();
+            }
+            //#endregion
+
+            //#region 寮�宸�
+            function get_start() {                
+                var checkStatus = table.checkStatus("mainTable_notStart")
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.open({
+                        type: 2,
+                        skin: 'layui-layer-rim', //鍔犱笂杈规
+                        title: '鏂板寮�宸ュ崟',
+                        closeBtn: 1,
+                        shift: 2,
+                        area: ['100%', '100%'],
+                        maxmin: true,
+                        content: '../../鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
+                        end: function () {
+
+                        },
+                        success: function (dom, index) {
+                            var deliverData = [];
+                            deliverData.push({
+                                "HBillType": data[0].鍗曟嵁绫诲瀷,
+                                "HSourceInterID": data[0].HInterID,
+                                "HSourceEntryID": data[0].婧愬崟瀛愬唴鐮�,
+                                "HSourceBillNo": data[0].婧愬崟鍗曞彿,
+                                "HSourceBillType": data[0].婧愬崟绫诲瀷
+                            });
+
+                            //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
+                            var iframe = window['layui-layer-iframe' + index];
+                            //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
+                            iframe.edit(deliverData);
+                        }
+                    });
+                } else {
+                    layer.msg('璇峰湪 鏈紑宸� 椤电涓�夋嫨涓�琛屾暟鎹紑宸ワ紒');
+                }                
+            }
+            //#endregion
+
+            //#region 姹囨姤
+            function get_report() {
+                var checkStatus = table.checkStatus("mainTable_proc")
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.open({
+                        type: 2,
+                        skin: 'layui-layer-rim', //鍔犱笂杈规
+                        title: '鏂板浜ч噺姹囨姤鍗�',
+                        closeBtn: 1,
+                        shift: 2,
+                        area: ['100%', '100%'],
+                        maxmin: true,
+                        content: '../../鐢熶骇绠$悊/浜ч噺姹囨姤鍗�/Sc_Add_ProductReportBillList.html?OperationType=2&linterid=&HSouceBillType=',
+                        end: function () {
+
+                        },
+                        success: function (dom, index) {
+                            var deliverData = [];
+                            deliverData.push({
+                                "HBillType": data[0].鍗曟嵁绫诲瀷,
+                                "HSourceInterID": data[0].HInterID,
+                                "HSourceEntryID": data[0].婧愬崟瀛愬唴鐮�,
+                                "HSourceBillNo": data[0].婧愬崟鍗曞彿,
+                                "HSourceBillType": data[0].婧愬崟绫诲瀷
+                            });
+
+                            //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
+                            var iframe = window['layui-layer-iframe' + index];
+                            //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
+                            iframe.edit(deliverData);
+                        },
+                    });
+                } else {
+                    layer.msg('璇峰湪 姝e湪鐢熶骇 椤电涓�夋嫨涓�琛屾暟鎹紑宸ワ紒');
+                }                  
+            }
+            //#endregion
+            
             //#region 棰勮
             function get_print() {
-                var activeTab =getActiveTab();
-                if (activeTab=="鎴戜富瀵肩殑") {
-                    var checkStatus = table.checkStatus('mainTable')
-                        , data = checkStatus.data,
-                        Num = 1;
-                } else if (activeTab == "鎴戝弬涓庣殑") {
-                    var checkStatus = table.checkStatus('mainTable1')
-                        , data = checkStatus.data,
-                        Num = 2;
+                var activeTab = getActiveTab();
+
+                if (activeTab=="鏈紑宸�") {
+                    var checkStatus = table.checkStatus('mainTable_notStart')
+                        , data = checkStatus.data;
+                } else if (activeTab == "宸插畬宸�") {
+                    var checkStatus = table.checkStatus('mainTable_finish')
+                        , data = checkStatus.data;
+                } else if (activeTab == "姝e湪鐢熶骇"){
+                    var checkStatus = table.checkStatus('mainTable_proc')
+                        , data = checkStatus.data;
                 }
 
-                if (checkStatus.data.length == 1) {
+                if (checkStatus.data.length > 0) {
                     var linterid = [];
 
                     for (var i = 0; i < data.length; i++) {
@@ -283,12 +416,12 @@
                         , shade: 0.6 //閬僵閫忔槑搴�
                         , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
                         , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + linterid.toString() + "|" + Num + '&MyMsg=' + linterid.toString() + '&Type=PM_ProjectBillMainMy', 'yes']
+                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + linterid.toString() + '&MyMsg=' + linterid.toString() + '&Type=Sc_MyTicketList', 'yes']
                         , resize: false
                     })
                 }
                 else {
-                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+                    layer.msg('璇烽�夋嫨鏁版嵁鎵撳嵃锛�');
                 }
             }
 
@@ -438,11 +571,6 @@
             //#endregion
             //浠ヤ笂鏄痩ayui妯″潡
         });
-
-
-
-
     </script>
-
 </body>
 </html>

--
Gitblit v1.9.1