You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.7 KiB

3 weeks ago
  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Index.cshtml";
  4. }
  5. <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
  6. <script src="~/Content/js/select2/select2.min.js"></script>
  7. <script>
  8. var id = decodeURI($.request("id"));
  9. var batchCode = decodeURI($.request("batchCode"));
  10. $(function () {
  11. debugger;
  12. gridList();
  13. })
  14. function gridList() {
  15. debugger;
  16. var $gridList = $("#gridList");
  17. $gridList.dataGrid({
  18. url: "/BBWMS/IQCQuality/GetInspectionFile?id=" + id + "&batchCode=" + batchCode,
  19. height: $(window).height() - 50,
  20. width: $(window).height() - 200,
  21. cellEdit: true,
  22. colModel: [
  23. { label: "主键", name: "ID", hidden: true, key: true },
  24. {
  25. label: '检验文件', name: 'FileCode', width: 150, align: 'left',
  26. formatter: function (cellvalue, options, rowObject) {
  27. var html = "";
  28. if (cellvalue != "" && cellvalue != null) {
  29. html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>";
  30. }
  31. return html;
  32. }
  33. },
  34. ],
  35. viewrecords: true,
  36. rowNum: 200,
  37. });
  38. }
  39. </script>
  40. <form id="form1">
  41. <div class="gridPanel">
  42. <table id="gridList"></table>
  43. @*<div id="gridPager"></div>*@
  44. </div>
  45. </form>