tb-pass-record-list.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>放行日志-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css & js 资源 -->
  8. <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
  11. <script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
  12. <script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>
  13. <script src="https://unpkg.com/jquery@3.4.1/dist/jquery.js"></script>
  14. <script src="https://www.layuicdn.com/layer-v3.1.1/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. </head>
  17. <body>
  18. <div class="vue-box" style="display: none;" :style="'display: block;'">
  19. <div class="c-panel">
  20. <!-- ------------- 检索参数 ------------- -->
  21. <div class="c-title">检索参数</div>
  22. <el-form ref="form" :model='p' @submit.native.prevent>
  23. <sa-item type="text" name="企业名称" v-model="p.customerName"></sa-item>
  24. <sa-item type="text" name="车牌号码" v-model="p.cardNo"></sa-item>
  25. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  26. <br />
  27. </el-form>
  28. <!-- ------------- 快捷按钮 ------------- -->
  29. <sa-item type="fast-btn" show="reset"></sa-item>
  30. <!-- ------------- 数据列表 ------------- -->
  31. <el-table class="data-table" ref="data-table" :data="dataList" >
  32. <sa-td type="selection"></sa-td>
  33. <!-- <sa-td name="主键" prop="id" type="num"></sa-td>-->
  34. <!-- <sa-td name="业务id" prop="businessId" ></sa-td>-->
  35. <!-- <sa-td name="客户id" prop="customerId" ></sa-td>-->
  36. <sa-td name="企业名称" prop="customerName" ></sa-td>
  37. <sa-td name="车牌号码" prop="cardNo" ></sa-td>
  38. <sa-td name="入场时间" prop="inTime" ></sa-td>
  39. <sa-td name="出场时间" prop="outTime" ></sa-td>
  40. <sa-td name="状态" prop="status" type="enum" :jv="{1: '未入场', 2: '已入场', 3: '已出场'}"></sa-td>
  41. <sa-td name="更新时间" prop="updateTime" ></sa-td>
  42. <!-- <el-table-column label="操作" fixed="right" width="240px">-->
  43. <!-- <template slot-scope="s">-->
  44. <!-- <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>-->
  45. <!-- </template>-->
  46. <!-- </el-table-column>-->
  47. </el-table>
  48. <!-- ------------- 分页 ------------- -->
  49. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  50. </div>
  51. </div>
  52. <script>
  53. var app = new Vue({
  54. components: {
  55. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  56. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  57. },
  58. el: '.vue-box',
  59. data: {
  60. p: { // 查询参数
  61. id: '', // 主键
  62. businessId: '', // 业务id
  63. customerId: '', // 客户id
  64. customerName: '', // 客户名称
  65. cardNo: '', // 车牌号
  66. status: '', // 状态(=未入场, 2=已入场, 3=已出场)
  67. inTime: '', // 进境时间
  68. outTime: '', // 离境时间
  69. updateTime: '', // 更新时间
  70. pageNo: 1, // 当前页
  71. pageSize: 10, // 页大小
  72. sortType: 9 // 排序方式
  73. },
  74. dataCount: 0,
  75. dataList: [], // 数据集合
  76. },
  77. methods: {
  78. // 刷新
  79. f5: function() {
  80. sa.ajax('/TbPassRecord/getList', sa.removeNull(this.p), function(res) {
  81. this.dataList = res.data; // 数据
  82. this.dataCount = res.dataCount; // 数据总数
  83. sa.f5TableHeight(); // 刷新表格高度
  84. }.bind(this));
  85. },
  86. // 查看
  87. get: function(data) {
  88. sa.showIframe('数据详情', 'tb-pass-record-info.html?id=' + data.id, '1050px', '90%');
  89. },
  90. // 查看 - 根据选中的
  91. getBySelect: function(data) {
  92. var selection = this.$refs['data-table'].selection;
  93. if(selection.length == 0) {
  94. return sa.msg('请选择一条数据')
  95. }
  96. this.get(selection[0]);
  97. },
  98. },
  99. created: function() {
  100. this.f5();
  101. sa.onInputEnter();
  102. }
  103. })
  104. </script>
  105. </body>
  106. </html>