PackCenter.aspx 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <%@ Page Language="C#" MasterPageFile="~/MasterPage/ErpView.master" AutoEventWireup="true" CodeFile="PackCenter.aspx.cs" Inherits="EDelivery_PackCenter" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
  3. <script>
  4. let productHourList = []
  5. //查询按钮
  6. function searchFn() {
  7. var form = new mini.Form("#ctl00_f_all");
  8. var data = form.getData(true, false);
  9. var s = data;
  10. grid.load({
  11. supplier: s.supplier
  12. });
  13. }
  14. //清除查询内容
  15. function clearFn() {
  16. var form = new mini.Form("#ctl00_f_all");
  17. form.clear();
  18. }
  19. function orderPTimeRenderer(e) {
  20. var grid = e.sender;
  21. var record = e.record;
  22. var tid = record.tid;
  23. var rowIndex = e.rowIndex;
  24. var html = "<div style=\"display:flex;flex-direction:column;\">";
  25. html += ("<div>" + formatCommonDate(record.createtime) + "</div>");
  26. html += "</div>";
  27. return html;
  28. }
  29. function rePackData(id) {
  30. postAjax("rePackOrderInfo", { id }, function (data) { resultShow(data, "grid.reload();"); });
  31. }
  32. function supStateRenderer(e) {
  33. var record = e.record;
  34. var html = "<div style=\"display:flex;flex-direction:column;\">";
  35. if (record.upStatus == 0) {
  36. html += ("<div style=\"color:blue;\"> 待打包 </div>");
  37. }
  38. if (record.upStatus == 1) {
  39. html += ("<div style=\"color:blue;\"> 打包中 </div>");
  40. } if (record.upStatus == 2) {
  41. html += ("<div style=\"color:blue;\"> 打包完成 </div>");
  42. } if (record.upStatus == 3) {
  43. html += ("<div style=\"color:blue;\"> 打包失败 </div>");
  44. } if (record.upStatus == 4) {
  45. html += ("<div style=\"color:blue;\"> 取消 </div>");
  46. }
  47. html += "</div>";
  48. return html;
  49. }
  50. function actionRenderer(e) {
  51. var record = e.record;
  52. var html = "";
  53. if (!!record.fileUrl) {
  54. html += getGridBtn("notify1", "下载", "downUrl('" + record.fileUrl + "','" + record.ID + "')");
  55. }
  56. if (record.upStatus == 3) {
  57. html += getGridBtn("notify", "重新打包", "rePackData(" + record.ID + ")");
  58. }
  59. return html;
  60. }
  61. function downUrl(url, id) {
  62. postAjax("addPackDownNum", { id }, function (data) {
  63. window.open(url);
  64. resultShow(data, "grid.reload();");
  65. });
  66. }
  67. </script>
  68. </asp:Content>
  69. <asp:Content ID="Content2" ContentPlaceHolderID="btn" runat="Server">
  70. </asp:Content>
  71. <asp:Content ID="Content4" ContentPlaceHolderID="content" runat="Server">
  72. <div class="mini-fit">
  73. <div id="m_grid" class="mini-datagrid" style="width: 98%;" contextmenu="#gridMenu" showemptytext="true" emptytext="暂无记录" url="../handler/sync.ashx?t=get_pack_list">
  74. <div property="columns">
  75. <div type="checkcolumn" width="20"></div>
  76. <div field="fileName" width="110" align="center" headeralign="center">名称</div>
  77. <div field="createtime" width="80" align="center" headeralign="center" renderer="orderPTimeRenderer">创建时间</div>
  78. <div field="upStatus" width="50" align="center" headeralign="center" renderer="supStateRenderer">状态</div>
  79. <div field="message" width="200" align="center" headeralign="center">说明</div>
  80. <div field="downNum" width="80" align="center" headeralign="center">下载次数</div>
  81. <div field="SupplierName" width="60" align="center" headeralign="center">车间</div>
  82. <div field="createName" width="60" align="center" headeralign="center">创建人</div>
  83. <div name="action" width="60" headeralign="center" align="center" renderer="actionRenderer" cellstyle="padding:0;">#</div>
  84. </div>
  85. </div>
  86. </div>
  87. </asp:Content>