tb-car-filing-list.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. <div class="c-item" v-if="sa.isAdmin()">
  25. <label class="c-label">备案组织:</label>
  26. <el-select v-model="p.deptId">
  27. <el-option label="请选择" v-for="(item,index) in deptList" :key="item.id" :label="item.name"
  28. :value="item.id"></el-option>
  29. </el-select>
  30. </div>
  31. <sa-item type="text" name="车牌号" v-model="p.carNo"></sa-item>
  32. <sa-item type="text" name="联系人" v-model="p.driverName"></sa-item>
  33. <sa-item type="text" name="联系电话" v-model="p.driverContact"></sa-item>
  34. <div class="c-item">
  35. <label class="c-label">审核状态:</label>
  36. <el-select v-model="p.judgeState">
  37. <el-option label="全部" value=""></el-option>
  38. <el-option label="未审核" :value="0"></el-option>
  39. <el-option label="通过" :value="1"></el-option>
  40. <el-option label="不通过" :value="2"></el-option>
  41. </el-select>
  42. </div>
  43. <div>
  44. <el-button type="primary" icon="el-icon-search" @click="f5()">查询</el-button>
  45. <el-button type="info" icon="el-icon-refresh"
  46. @click="p.pageNo = 1;p.deptId='';p.carNo='';p.driverName='';p.driverContact=''; p.judgeState='';f5()">
  47. 重置
  48. </el-button>
  49. <el-button type="primary" icon="el-icon-plus" @click="add"
  50. v-if="sa.isAuth('tb-car-filing-add')">新增</el-button>
  51. <el-button type="primary" icon="el-icon-upload" v-if="sa.isAuth('tb-car-filing-export')"
  52. @click='exportFn'>
  53. 导出</el-button>
  54. </div>
  55. </el-form>
  56. <!-- ------------- 数据列表 ------------- -->
  57. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 5px;">
  58. <sa-td name="序号" type="index"></sa-td>
  59. <sa-td name="所属单位" prop="departmentName" width="130"></sa-td>
  60. <sa-td name="备案组织" prop="deptName" width="150"></sa-td>
  61. <sa-td name="备案场所" prop="venuesName" width="150"></sa-td>
  62. <sa-td name="车牌号" prop="carNo"></sa-td>
  63. <sa-td name="联系人" prop="driverName"></sa-td>
  64. <sa-td name="商铺" prop="shopCode"></sa-td>
  65. <sa-td name="联系电话" prop="driverContact" width="120"></sa-td>
  66. <sa-td name="审核状态" prop="judgeState" type="enum" :jv="{0: '未审核', 1: '通过', 2: '不通过'}"></sa-td>
  67. <sa-td name="审核时间" prop="judgeTime" not="-" width="140"></sa-td>
  68. <sa-td name="创建时间" prop="createTime" width="140"></sa-td>
  69. <sa-td name="更新时间" prop="updateTime" width="140"></sa-td>
  70. <el-table-column label="操作" fixed="right" width="240px">
  71. <template slot-scope="s">
  72. <el-button v-if="sa.isAuth('tb-car-filing-judge')&&s.row.judgeState==0" class="c-btn"
  73. type="success" @click="judgeFn(s.row)">审核
  74. </el-button>
  75. <el-button class="c-btn" type="success" @click="get(s.row)">查看
  76. </el-button>
  77. <el-button v-if="sa.isAuth('tb-car-filing-edit')" class="c-btn" type="primary"
  78. @click="update(s.row)">修改
  79. </el-button>
  80. <el-button v-if="sa.isAuth('tb-car-filing-del')" class="c-btn" type="danger"
  81. @click="del(s.row)">删除
  82. </el-button>
  83. </template>
  84. </el-table-column>
  85. </el-table>
  86. <!-- ------------- 分页 ------------- -->
  87. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  88. </sa-item>
  89. </div>
  90. </div>
  91. <script>
  92. var app = new Vue({
  93. components: {
  94. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  95. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  96. },
  97. el: '.vue-box',
  98. data: {
  99. p: { // 查询参数
  100. carNo: '', // 车牌号
  101. type: '', // 类型(1=临时,2=内部)
  102. driverName: '', // 联系人
  103. driverContact: '', // 联系电话
  104. driverIdCard: '', // 联系人身份证
  105. deptId: '', // 状态
  106. judgeState: '', // 备注
  107. pageNo: 1, // 当前页
  108. pageSize: 10, // 页大小
  109. sortType: 0 // 排序方式
  110. },
  111. dataCount: 0,
  112. deptList: [],
  113. dataList: [], // 数据集合
  114. },
  115. methods: {
  116. exportFn() {
  117. sa.confirm('是否导出符合筛选条件的车辆备案信息?', function() {
  118. sa.ajax('/TbCarFiling/export', sa.removeNull(this.p), function(res) {
  119. window.location.href = res.data;
  120. }.bind(this))
  121. }.bind(this));
  122. },
  123. getDeptList() {
  124. sa.ajax('/TbDept/getList', {
  125. pageNo: 1,
  126. pageSize: 100
  127. }, function(resp) {
  128. let list = resp.data;
  129. this.deptList = list;
  130. }.bind(this))
  131. },
  132. judgeFn(data) {
  133. sa.showIframe('审核', 'tb-car-filing-judge.html?id=' + data.id, '700px', '70%');
  134. },
  135. // 刷新
  136. f5: function() {
  137. sa.ajax('/TbCarFiling/getList', sa.removeNull(this.p), function(res) {
  138. this.dataList = res.data; // 数据
  139. this.dataCount = res.dataCount; // 数据总数
  140. sa.f5TableHeight(); // 刷新表格高度
  141. }.bind(this));
  142. },
  143. // 查看
  144. get: function(data) {
  145. sa.showIframe('数据详情', 'tb-car-filing-info.html?id=' + data.id, '700px', '90%');
  146. },
  147. // 查看 - 根据选中的
  148. getBySelect: function(data) {
  149. var selection = this.$refs['data-table'].selection;
  150. if (selection.length == 0) {
  151. return sa.msg('请选择一条数据')
  152. }
  153. this.get(selection[0]);
  154. },
  155. // 修改
  156. update: function(data) {
  157. sa.showIframe('修改数据', 'tb-car-filing-add.html?id=' + data.id, '900px', '90%');
  158. },
  159. // 新增
  160. add: function(data) {
  161. sa.showIframe('新增数据', 'tb-car-filing-add.html?id=-1', '900px', '80%');
  162. },
  163. // 删除
  164. del: function(data) {
  165. sa.confirm('是否删除,此操作不可撤销', function() {
  166. sa.ajax('/TbCarFiling/delete?id=' + data.id, function(res) {
  167. sa.arrayDelete(this.dataList, data);
  168. sa.ok('删除成功');
  169. sa.f5TableHeight(); // 刷新表格高度
  170. }.bind(this))
  171. }.bind(this));
  172. },
  173. // 批量删除
  174. deleteByIds: function() {
  175. // 获取选中元素的id列表
  176. let selection = this.$refs['data-table'].selection;
  177. let ids = sa.getArrayField(selection, 'id');
  178. if (selection.length == 0) {
  179. return sa.msg('请至少选择一条数据')
  180. }
  181. // 提交删除
  182. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  183. sa.ajax('/TbCarFiling/deleteByIds', {
  184. ids: ids.join(',')
  185. }, function(res) {
  186. sa.arrayDelete(this.dataList, selection);
  187. sa.ok('删除成功');
  188. sa.f5TableHeight(); // 刷新表格高度
  189. }.bind(this))
  190. }.bind(this));
  191. },
  192. },
  193. created: function() {
  194. this.f5();
  195. sa.onInputEnter();
  196. if (sa.isAdmin()) {
  197. this.getDeptList();
  198. }
  199. }
  200. })
  201. </script>
  202. </body>
  203. </html>