parking_order.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <template>
  2. <div class="body-wrapper">
  3. <el-tabs v-model="activeName">
  4. <el-tab-pane label="支付订单查询" name="支付订单查询">
  5. <el-form class="form-wrapper" :inline="true" :model="formInline1" style="margin-bottom: 20px;">
  6. <el-row>
  7. <el-col :span="6">
  8. <el-form-item label="订单号:">
  9. <el-input v-model="formInline1.orderNo" placeholder="请输入"></el-input>
  10. </el-form-item>
  11. </el-col>
  12. <el-col :span="6">
  13. <el-form-item label="车牌号:">
  14. <el-input v-model="formInline1.plateNo" placeholder="请输入"></el-input>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="6">
  18. <el-form-item label="泊位号:">
  19. <el-input v-model="formInline1.parkingNo" placeholder="请输入"></el-input>
  20. </el-form-item>
  21. </el-col>
  22. <!-- <el-col :span="6">-->
  23. <!-- <el-form-item label="支付日期:">-->
  24. <!-- <el-date-picker-->
  25. <!-- v-model="formInline1.payTime"-->
  26. <!-- type="date"-->
  27. <!-- placeholder="选择日期">-->
  28. <!-- </el-date-picker>-->
  29. <!-- </el-form-item>-->
  30. <!-- </el-col>-->
  31. <el-col :span="6">
  32. <el-form-item>
  33. <el-button type="primary" class="query-btn" @click="onSubmit1" icon="el-icon-search">查询</el-button>
  34. </el-form-item>
  35. </el-col>
  36. </el-row>
  37. </el-form>
  38. <el-table border :row-class-name="rowClassName" :data="tableData1" v-loading="loading1">
  39. <el-table-column v-for="(item, index) in columns1" :key="index" :label="item.label" :prop="item.key">
  40. </el-table-column>
  41. </el-table>
  42. <div class="table-pagination">
  43. <el-pagination layout="total, prev, pager, next, jumper" :total="total1" @current-change="handlePageChange1"
  44. :current-page.sync="pageNum1" :page-size.sync="pageSize1">
  45. </el-pagination>
  46. </div>
  47. </el-tab-pane>
  48. <el-tab-pane label="欠费订单查询" name="欠费订单查询">
  49. <el-form class="form-wrapper" :inline="true" :model="formInline2" style="margin-bottom: 20px;">
  50. <el-row>
  51. <el-col :span="8">
  52. <el-form-item label="订单号: ">
  53. <el-input v-model="formInline2.orderNo" placeholder="请输入"></el-input>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="8">
  57. <el-form-item label="车牌号: ">
  58. <el-input v-model="formInline2.plateNo" placeholder="请输入"></el-input>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="8">
  62. <el-form-item>
  63. <el-button type="primary" class="query-btn" @click="onSubmit2" icon="el-icon-search">查询</el-button>
  64. </el-form-item>
  65. </el-col>
  66. </el-row>
  67. </el-form>
  68. <el-table border :row-class-name="rowClassName" :data="tableData2" v-loading="loading2">
  69. <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
  70. </el-table-column>
  71. </el-table>
  72. <div class="table-pagination">
  73. <el-pagination layout="total, prev, pager, next, jumper" :total="total1" @current-change="handlePageChange2"
  74. :current-page.sync="pageNum2" :page-size.sync="pageSize2">
  75. </el-pagination>
  76. </div>
  77. </el-tab-pane>
  78. <el-tab-pane label="查询预付订单信息" name="查询预付订单信息">
  79. <el-form class="form-wrapper" :inline="true" :model="formInline4" style="margin-bottom: 20px;">
  80. <el-row>
  81. <el-col :span="8">
  82. <el-form-item label="订单号:">
  83. <el-input v-model="formInline4.orderNo" placeholder="请输入"></el-input>
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="8">
  87. <el-form-item label="车牌号:">
  88. <el-input v-model="formInline4.plateNo" placeholder="请输入"></el-input>
  89. </el-form-item>
  90. </el-col>
  91. <el-col :span="8">
  92. <el-form-item>
  93. <el-button type="primary" class="query-btn" @click="onSubmit4" icon="el-icon-search">查询</el-button>
  94. </el-form-item>
  95. </el-col>
  96. </el-row>
  97. </el-form>
  98. <el-table border :row-class-name="rowClassName" :data="tableData4" v-loading="loading4">
  99. <el-table-column v-for="(item, index) in columns4" :key="index" :label="item.label" :prop="item.key">
  100. </el-table-column>
  101. </el-table>
  102. <div class="table-pagination">
  103. <el-pagination layout="total, prev, pager, next, jumper" :total="total4" @current-change="handlePageChange4"
  104. :current-page.sync="pageNum4" :page-size.sync="pageSize4">
  105. </el-pagination>
  106. </div>
  107. </el-tab-pane>
  108. </el-tabs>
  109. </div>
  110. </template>
  111. <script>
  112. import api from "@/api/audit.js";
  113. import dictionary from "@/util/dictionary";
  114. import api_z from "@/api/article_z.js";
  115. export default {
  116. components: {},
  117. data() {
  118. return {
  119. loading1: false,
  120. loading2: false,
  121. loading4: false,
  122. activeName: '支付订单查询',
  123. columns1: [
  124. {
  125. label: '订单号',
  126. key: 'orderNo'
  127. },
  128. {
  129. label: '支付时间',
  130. key: 'outTime'
  131. },
  132. {
  133. label: '支付金额',
  134. key: 'payAmount'
  135. },
  136. {
  137. label: '停车场',
  138. key: 'parkName'
  139. },
  140. {
  141. label: '泊位号',
  142. key: 'parkingNo'
  143. },
  144. {
  145. label: '车牌号',
  146. key: 'plateNo'
  147. },
  148. {
  149. label: '入场日期',
  150. key: 'inTime'
  151. },
  152. {
  153. label: '出场日期',
  154. key: 'outTime'
  155. }
  156. ],
  157. tableData1: [],
  158. total1: 0,
  159. pageSize1: 10,
  160. pageNum1: 1,
  161. formInline1: {
  162. orderNo: '',
  163. payTime:''
  164. },
  165. columns2: [
  166. {
  167. label: '欠费订单号',
  168. key: 'orderNo'
  169. },
  170. {
  171. label: '车牌号',
  172. key: 'plateNo'
  173. },
  174. {
  175. label: '修改日期',
  176. key: 'updateTime'
  177. },
  178. {
  179. label: '欠费金额',
  180. key: ''
  181. }
  182. ],
  183. tableData2: [],
  184. total2: 0,
  185. pageSize2: 10,
  186. pageNum2: 1,
  187. formInline2: {
  188. orderNo: '',
  189. plateNo:''
  190. },
  191. columns4: [
  192. {
  193. label: '订单号',
  194. key: 'orderNo'
  195. },
  196. {
  197. label: '车牌号',
  198. key: 'plateNo'
  199. },
  200. {
  201. label: '所属停车场',
  202. key: 'parkName'
  203. },
  204. {
  205. label: '预约时间',
  206. key: 'appointmentTime'
  207. },
  208. {
  209. label: '金额',
  210. key: 'payAmount'
  211. },
  212. {
  213. label: '支付方式',
  214. key: 'payWay'
  215. },
  216. {
  217. label: '支付状态',
  218. key: 'payStatus'
  219. },
  220. {
  221. label: '支付时间',
  222. key: 'payTime'
  223. },
  224. ],
  225. tableData4: [],
  226. total4: 0,
  227. pageSize4: 10,
  228. pageNum4: 1,
  229. formInline4: {
  230. orderNo:'',
  231. plateNo: ''
  232. }
  233. }
  234. },
  235. mounted() {
  236. this.getTableData1()
  237. this.getTableData2()
  238. this.getTableData4()
  239. },
  240. watch: {
  241. },
  242. methods: {
  243. rowClassName({ rowIndex }) {
  244. // 偶数行和奇数行分别返回不同的类名,也可以根据实际需求基于rowData进行条件判断
  245. return rowIndex % 2 === 0 ? 'even-row' : 'odd-row';
  246. },
  247. onSubmit1() {
  248. this.pageNum1 = 1
  249. this.getTableData1()
  250. },
  251. onSubmit2() {
  252. this.pageNum2 = 1
  253. this.getTableData2()
  254. },
  255. onSubmit4() {
  256. this.pageNum4 = 1
  257. this.getTableData4()
  258. },
  259. handlePageChange1() {
  260. this.getTableData1()
  261. },
  262. getTableData1() {
  263. this.loading1 = true
  264. const {pageNum1, pageSize1} = this
  265. api_z.queryParkingOrderByPage({current: pageNum1, size: pageSize1, ...this.formInline1}).then(res => {
  266. this.tableData1 = (res.data.records || []).map(item => ({...item, carType: dictionary.typeMap[item.carType]}))
  267. this.total1 = res.data.total
  268. this.loading1 = false
  269. })
  270. },
  271. handlePageChange2() {
  272. this.getTableData2()
  273. },
  274. getTableData2() {
  275. this.loading2 = true
  276. const {pageNum2, pageSize2} = this
  277. api_z.queryParkingOrderArrearsByPage({current: pageNum2, size: pageSize2, ...this.formInline2}).then(res => {
  278. this.tableData2 = res.data.records || []
  279. this.total2 = res.data.total
  280. this.loading2 = false
  281. })
  282. },
  283. handlePageChange4() {
  284. this.getTableData4()
  285. },
  286. getTableData4() {
  287. this.loading4= true
  288. const {pageNum4, pageSize4} = this
  289. api.orderListByPage({current: pageNum4, size: pageSize4, ...this.formInline4}).then(res => {
  290. this.tableData4 = res.data.records || []
  291. this.total4 = res.data.total
  292. this.loading4 = false
  293. })
  294. }
  295. }
  296. }
  297. </script>
  298. <style lang="scss" scoped>
  299. .body-wrapper {
  300. .form-wrapper {
  301. .el-form-item {
  302. margin-bottom: 0px;
  303. }
  304. }
  305. .button-block{
  306. text-align: right;
  307. margin-bottom: 20px;
  308. }
  309. .table-pagination{
  310. text-align: right;
  311. }
  312. .search-card{
  313. margin-bottom: 20px;
  314. text-align: center;
  315. .input-wrapper{
  316. width: 36%;
  317. }
  318. }
  319. }
  320. </style>