/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ModuleMaster/production/pcb_short.aspx
273 строки
10 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="PCB_short.aspx.vb" Inherits="capa" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Production status</title> <script src="../Scripts/jquery-1.9.1.min.js"></script> <script src="../Scripts/bootstrap.js"></script> <script src="../Scripts/popover.js"></script> <style> .spinner { position: relative ; top: 0; left: 0; right: 0; bottom: 0; margin: auto; } .spinner_big { position: absolute ; top: 0; left: 0; right: 0; bottom: 0; margin: auto; } #blink { -webkit-animation: blink 2s linear infinite; animation: blink 2s linear infinite; } @-webkit-keyframes blink { 50% { color: rgb(255, 0, 0); } } @keyframes blink { 50% { color: rgb(255, 0, 0); } } @font-face { font-family: "Agency FB"; src: url('../fonts/AGENCYB.TTF'); } html, body, form { width: 100%; height: 100%; background-color: transparent; font-family: 'Agency FB', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 18pt !important; margin: 0; } table { width: 100%; height: 100%; text-align : center; } #report td { height: 7%; font-size: 20pt; } .remark { font-size: 20pt !important; } .time { font-size: 40pt !important; } th{ background-color: steelblue; color: white; font-size: 26pt; } .footer td{ background-color: steelblue; color: white; font-size: 26pt; } caption { color: White; font-weight: bold; background-color: DarkGray; } </style> </head> <body> <form id="form1" runat="server"> <div> <%-- FITST TABLE ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- --%> <table border="0"> <tr> <td style="width:50%; text-align:right; vertical-align: bottom "> <asp:Label ID="stock_date_time" runat="server" Text="PCB stock last updated on: "></asp:Label> <asp:Label ID="date_time" runat="server" Text=""></asp:Label> <asp:Image ID="spinner" runat="server" ImageUrl="../Images/Gears/giphy.gif" Style="display:inline" ClientIDMode="Static" class="spinner" Height="30px" Visible="false" /> </td> <td style="vertical-align:middle; text-align:left; width:5px"> <asp:Button ID="Stock" runat="server" Text="Update stock right now" /> </td> </tr> </table> <asp:Image ID="spinner_big" runat="server" ImageUrl="../Images/Gears/giphy.gif" Style="display:none" ClientIDMode="Static" class="spinner_big" /> <asp:HiddenField ID="HiddenField" runat="server" /> <asp:GridView ID="report" runat="server" CellPadding="4" ForeColor="#333333" Style="margin: 0 auto;" AutoGenerateColumns="true" HorizontalAlign="Center" EditIndex="-1"> <AlternatingRowStyle BackColor="White" /> <EditRowStyle BackColor="#2461BF" /> <EmptyDataRowStyle BackColor="Red" /> <FooterStyle BackColor="#229EE5" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#229EE5" Font-Bold="True" ForeColor="White" /> <PagerSettings Mode="NumericFirstLast" PageButtonCount="5" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" VerticalAlign="Middle" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <SortedAscendingCellStyle BackColor="#F5F7FB" /> <SortedAscendingHeaderStyle BackColor="#6D95E1" /> <SortedDescendingCellStyle BackColor="#E9EBEF" /> <SortedDescendingHeaderStyle BackColor="#4870BE" /> <%-- <Columns> <asp:BoundField DataField="year" Visible="true" HeaderText="Year" /> <asp:BoundField DataField="Model" Visible="true" HeaderText="Model"/> <asp:BoundField DataField="Planner's TackTime" Visible="true" HeaderText="Planner's TackTime"/> <asp:BoundField DataField="Line" Visible="true" HeaderText="Line"/> <asp:BoundField DataField="Catalog Capa" Visible="true" HeaderText="Catalog Capa"/> <asp:BoundField DataField="Catalog TackTime" Visible="true" HeaderText="Catalog TackTime"/> <asp:BoundField DataField="Upload date" Visible="true" HeaderText="Upload date"/> </Columns>--%> </asp:GridView> <asp:SqlDataSource ID="queue" runat="server" ConnectionString="<%$ ConnectionStrings:CATVConnectionString %>" SelectCommand=""> </asp:SqlDataSource> </div> <script type="text/javascript"> var timeID; $("#Stock").click(function () { alert('Stock data will be extracted from G-ERP. It can takes up to 15 minutes. The page will be reloaded automatically when it\'s done'); $("#spinner_big").css("display", "inline"); clearInterval(timeID); //$("#form1").submit() }) $(document).ready(function () { timeID = setInterval(Stock_changed, 60000); }) function Stock_changed() { var request = $.ajax({ url: ("../handlers/PCB_short_stock_updated_trigger.ashx"), data: { stock_date: $("#HiddenField").val() } }); request.done(SaveDataSuccess); request.fail(SaveDataFail); }; function SaveDataSuccess(result) { if (result == 'changed') { $("#spinner_big").css("display", "inline") clearInterval(timeID); window.location.replace(window.location.href); //alert("Stock changed"); } else { //alert("Stock is the same"); } }; function SaveDataFail(result) { alert("Handler end up with error"); }; ///Редактирование комментария var text = ''; var cell; $(".remark").dblclick(function () { bindEditEvent($(this)); }); function bindEditEvent(c) { if (cell != null) { cancelEdit(cell) } cell = c; text = c.text(); var mode = ''; if (!$.trim(c.text())) { mode = "insert"; } else { mode = "update"; } c.html("<input type=\"search\" name=\"foo\" type=\"text\" id=\"foo\" value=\"" + c.text() + "\">" + "<br><img id='saveChanges' src='../images/buttons/set2/save.png' class='buttonImage icon_small' />" + " <img id='cancelChanges' src='../images/buttons/set2/no.png' class='buttonImage icon_small' />"); $("#saveChanges").click(function (e) { SaveComment(mode, c.attr("id")); }); $("#cancelChanges").bind("click", function (e) { cancelEdit(c); }); $("#foo").focus(); bindSubmit("#foo", mode, c.attr("id")); }; function SaveComment(mode, id) { //alert(mode); var request = $.ajax({ url: ("../handlers/PCB_short_comment.ashx"), data: { mode: mode, value: $("#foo").val(), id: id } }); request.done(SaveCommentSuccess); request.fail(SaveCommentFail); }; function SaveCommentSuccess(result) { if (result == 'ok') { document.location.reload(); } else alert("Data procession failed"); }; function SaveCommentFail(result) { alert("Data procession failed"); cell = null; }; function cancelEdit(c) { c.html(text); c = null; }; function bindSubmit(controlName, mode, id) { $(controlName).bind('keydown', function (e) { if ((e.which == 13) && (e.shiftKey == false)) { e.preventDefault(); SaveComment(mode, id); return false; } }); }; </script> </form> </body> </html>