tb-car-filing-list.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>车辆备案-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!-- 所有的 css & js 资源 -->
  9. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  10. <link rel="stylesheet" href="../../static/sa.css">
  11. <script src="../../static/kj/vue.min.js"></script>
  12. <script src="../../static/kj/element-ui/index.js"></script>
  13. <script src="../../static/kj/httpVueLoader.js"></script>
  14. <script src="../../static/kj/jquery.min.js"></script>
  15. <script src="../../static/kj/layer/layer.js"></script>
  16. <script src="../../static/sa.js"></script>
  17. </head>
  18. <body>
  19. <div class="vue-box" style="display: none;" :style="'display: block;'">
  20. <div class="c-panel">
  21. <!-- ------------- 检索参数 ------------- -->
  22. <div class="c-title">检索参数</div>
  23. <el-form ref="form" :model='p' @submit.native.prevent>
  24. <sa-item type="text" name="车牌号" v-model="p.carNo"></sa-item>
  25. <sa-item type="enum" name="类型" v-model="p.type" :jv="{1: '临时', 2: '内部'}" jtype="2" def="不限">
  26. </sa-item>
  27. <sa-item type="text" name="联系人" v-model="p.driverName"></sa-item>
  28. <sa-item type="text" name="联系电话" v-model="p.driverContact"></sa-item>
  29. <sa-item type="enum" name="审核状态" v-model="p.judgeState" :jv="{0: '未审核', 1: '通过',2:'不通过'}" jtype="4"
  30. def="全部">
  31. </sa-item>
  32. <div>
  33. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  34. <el-button type="info" icon="el-icon-refresh"
  35. @click="p.carNo='',p.type='',p.driverName='',p.driverContact='',p.judgeState='',f5()">重置
  36. </el-button>
  37. <el-button type="primary" icon="el-icon-plus" @click="add"
  38. v-if="sa.isAuth('tb-car-filing-add')">新增</el-button>
  39. </div>
  40. </el-form>
  41. <!-- ------------- 数据列表 ------------- -->
  42. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 5px;">
  43. <sa-td name="序号" type="index"></sa-td>
  44. <sa-td name="所属部门" prop="departmentName" width="130"></sa-td>
  45. <sa-td name="备案组织" prop="deptName" width="150"></sa-td>
  46. <sa-td name="备案场所" prop="venuesName" width="150"></sa-td>
  47. <sa-td name="车牌号" prop="carNo"></sa-td>
  48. <sa-td name="类型" prop="type" type="enum" :jv="{1: '临时', 2: '内部'}"></sa-td>
  49. <sa-td name="联系人" prop="driverName"></sa-td>
  50. <sa-td name="联系电话" prop="driverContact" width="120"></sa-td>
  51. <sa-td name="审核状态" prop="judgeState" type="enum" :jv="{0: '未审核', 1: '通过', 2: '不通过'}"></sa-td>
  52. <sa-td name="审核时间" prop="judgeTime" not="-" width="140"></sa-td>
  53. <sa-td name="创建时间" prop="createTime" width="140"></sa-td>
  54. <sa-td name="更新时间" prop="updateTime" width="140"></sa-td>
  55. <el-table-column label="操作" fixed="right" width="240px">
  56. <template slot-scope="s">
  57. <el-button v-if="sa.isAuth('tb-car-filing-judge')&&s.row.judgeState==0" class="c-btn"
  58. type="success" @click="judgeFn(s.row)">审核
  59. </el-button>
  60. <el-button class="c-btn" type="success" @click="get(s.row)">查看
  61. </el-button>
  62. <el-button v-if="sa.isAuth('tb-car-filing-edit')" class="c-btn" type="primary"
  63. @click="update(s.row)">修改
  64. </el-button>
  65. <el-button v-if="sa.isAuth('tb-car-filing-del')" class="c-btn" type="danger"
  66. @click="del(s.row)">删除
  67. </el-button>
  68. </template>
  69. </el-table-column>
  70. </el-table>
  71. <!-- ------------- 分页 ------------- -->
  72. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  73. </sa-item>
  74. </div>
  75. </div>
  76. <script>
  77. var app = new Vue({
  78. components: {
  79. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  80. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  81. },
  82. el: '.vue-box',
  83. data: {
  84. p: { // 查询参数
  85. carNo: '', // 车牌号
  86. type: '', // 类型(1=临时,2=内部)
  87. driverName: '', // 联系人
  88. driverContact: '', // 联系电话
  89. driverIdCard: '', // 联系人身份证
  90. visit: '', // 状态
  91. judgeState: '', // 备注
  92. pageNo: 1, // 当前页
  93. pageSize: 10, // 页大小
  94. sortType: 0 // 排序方式
  95. },
  96. dataCount: 0,
  97. dataList: [], // 数据集合
  98. },
  99. methods: {
  100. judgeFn(data) {
  101. sa.showIframe('审核', 'tb-car-filing-judge.html?id=' + data.id, '700px', '70%');
  102. },
  103. // 刷新
  104. f5: function() {
  105. sa.ajax('/TbCarFiling/getList', sa.removeNull(this.p), function(res) {
  106. this.dataList = res.data; // 数据
  107. this.dataCount = res.dataCount; // 数据总数
  108. sa.f5TableHeight(); // 刷新表格高度
  109. }.bind(this));
  110. },
  111. // 查看
  112. get: function(data) {
  113. sa.showIframe('数据详情', 'tb-car-filing-info.html?id=' + data.id, '700px', '90%');
  114. },
  115. // 查看 - 根据选中的
  116. getBySelect: function(data) {
  117. var selection = this.$refs['data-table'].selection;
  118. if (selection.length == 0) {
  119. return sa.msg('请选择一条数据')
  120. }
  121. this.get(selection[0]);
  122. },
  123. // 修改
  124. update: function(data) {
  125. sa.showIframe('修改数据', 'tb-car-filing-add.html?id=' + data.id, '900px', '90%');
  126. },
  127. // 新增
  128. add: function(data) {
  129. sa.showIframe('新增数据', 'tb-car-filing-add.html?id=-1', '900px', '80%');
  130. },
  131. // 删除
  132. del: function(data) {
  133. sa.confirm('是否删除,此操作不可撤销', function() {
  134. sa.ajax('/TbCarFiling/delete?id=' + data.id, function(res) {
  135. sa.arrayDelete(this.dataList, data);
  136. sa.ok('删除成功');
  137. sa.f5TableHeight(); // 刷新表格高度
  138. }.bind(this))
  139. }.bind(this));
  140. },
  141. // 批量删除
  142. deleteByIds: function() {
  143. // 获取选中元素的id列表
  144. let selection = this.$refs['data-table'].selection;
  145. let ids = sa.getArrayField(selection, 'id');
  146. if (selection.length == 0) {
  147. return sa.msg('请至少选择一条数据')
  148. }
  149. // 提交删除
  150. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  151. sa.ajax('/TbCarFiling/deleteByIds', {
  152. ids: ids.join(',')
  153. }, function(res) {
  154. sa.arrayDelete(this.dataList, selection);
  155. sa.ok('删除成功');
  156. sa.f5TableHeight(); // 刷新表格高度
  157. }.bind(this))
  158. }.bind(this));
  159. },
  160. },
  161. created: function() {
  162. this.f5();
  163. sa.onInputEnter();
  164. }
  165. })
  166. </script>
  167. </body>
  168. </html>