纽威
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.

83 lines
3.2 KiB

3 years ago
  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Index.cshtml";
  4. }
  5. <script>
  6. $(function () {
  7. gridList();
  8. })
  9. function gridList() {
  10. var $gridList = $("#gridList");
  11. $gridList.dataGrid({
  12. url: "/ProductManage/SaleOrderView/GetGridJson",
  13. height: $(window).height() - 96,
  14. colModel: [
  15. { label: "主键", name: "cSOCode", hidden: true, key: true },
  16. { label: "订单号", name: "cSOCode", width: 120, align: 'left' },
  17. {
  18. label: '订单日期', name: 'dDate', width: 100, align: 'left',
  19. formatter: "date", formatoptions: { srcformat: 'Y-m-d H:i', newformat: 'Y-m-d H:i' }
  20. },
  21. { label: "业务类型", name: "cBusType", width: 120, align: 'left' },
  22. { label: "销售类型", name: "cSTName", width: 120, align: 'left' },
  23. { label: "客户简称", name: "cCusName", width: 120, align: 'left' },
  24. { label: "销售部门", name: "cDepName", width: 120, align: 'left' },
  25. { label: "税率", name: "iTaxRate", width: 120, align: 'left' },
  26. { label: "币种", name: "cexch_name", width: 120, align: 'left' },
  27. { label: "汇率", name: "iExchRate", width: 120, align: 'left' },
  28. { label: "备注", name: "cMemo", width: 120, align: 'left' }
  29. ],
  30. pager: "#gridPager",
  31. sortname: 'cSOCode desc',
  32. multiselect: true,
  33. viewrecords: true
  34. });
  35. $("#btn_search").click(function () {
  36. $gridList.jqGrid('setGridParam', {
  37. postData: { keyword: $("#txt_keyword").val() },
  38. }).trigger('reloadGrid');
  39. });
  40. }
  41. function btn_details() {
  42. var keyValue = $("#gridList").jqGrid('getGridParam', 'selrow');
  43. $.modalOpen({
  44. id: "Details",
  45. title: "Details",
  46. url: "/ProductManage/SaleOrderView/Details?keyValue=" + keyValue,
  47. width: "1500px",
  48. height: "800px",
  49. btn: null,
  50. });
  51. }
  52. </script>
  53. <div class="topPanel">
  54. <div class="toolbar">
  55. <div class="btn-group">
  56. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  57. <a id="NF-Details" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_details()"><i class="fa fa-search-plus"></i>Look Details</a>
  58. </div>
  59. <script>$('.toolbar').authorizeButton()</script>
  60. </div>
  61. <div class="search">
  62. <table>
  63. <tr>
  64. <td>
  65. <div class="input-group">
  66. <input id="txt_keyword" type="text" class="form-control" placeholder="Order No" style="width: 100px;">
  67. <span class="input-group-btn">
  68. <button id="btn_search" type="button" style="margin-left:10px;" class="btn btn-primary"><i class="fa fa-search"></i></button>
  69. </span>
  70. </div>
  71. </td>
  72. </tr>
  73. </table>
  74. </div>
  75. </div>
  76. <div class="gridPanel">
  77. <table id="gridList"></table>
  78. <div id="gridPager"></div>
  79. </div>