waybill.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <div class="waybill">
  3. <el-card>
  4. <!-- 头部细节部分 -->
  5. <div class="title">
  6. <el-row class="bottom">
  7. <el-col :span="24">
  8. <div class="grid-content bg-purple-dark">
  9. <!-- <el-button type="primary" @click="addRoleList = true">新增</el-button> -->
  10. </div>
  11. </el-col>
  12. </el-row>
  13. </div>
  14. <!-- 头部细节部分结束 -->
  15. <!-- 表格部分 -->
  16. <template>
  17. <el-table
  18. v-loading="loading"
  19. ref="multipleTable"
  20. :data="roletable"
  21. border
  22. tooltip-effect="dark"
  23. style="width: 100%">
  24. <el-table-column
  25. label="序号"
  26. type="index"
  27. width="40"
  28. show-overflow-tooltip>
  29. </el-table-column>
  30. <el-table-column
  31. prop="num"
  32. label="运单编号"
  33. show-overflow-tooltip>
  34. </el-table-column>
  35. <el-table-column
  36. prop="plateNumber"
  37. label="车牌号"
  38. show-overflow-tooltip>
  39. </el-table-column>
  40. <el-table-column
  41. prop="status"
  42. label="运单状态"
  43. show-overflow-tooltip>
  44. </el-table-column>
  45. <el-table-column
  46. prop="isHistory"
  47. label="运单类型"
  48. show-overflow-tooltip>
  49. </el-table-column>
  50. <el-table-column
  51. label="开始运单创建时间"
  52. show-overflow-tooltip>
  53. <template slot-scope="scope" show-overflow-tooltip>
  54. <span>{{scope.row.startBillCreateTime | fmtDate}}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column
  58. prop="realDestAddr"
  59. label="运单实际目的地"
  60. show-overflow-tooltip>
  61. </el-table-column>
  62. <el-table-column
  63. label="运单结束创建时间"
  64. show-overflow-tooltip>
  65. <template slot-scope="scope" show-overflow-tooltip>
  66. <span>{{scope.row.endBillCreateTime | fmtDate}}</span>
  67. </template>
  68. </el-table-column>
  69. <el-table-column
  70. prop="appKey"
  71. label="appKey"
  72. show-overflow-tooltip>
  73. </el-table-column>
  74. <el-table-column
  75. prop="company"
  76. label="公司名称"
  77. show-overflow-tooltip>
  78. </el-table-column>
  79. </el-table>
  80. </template>
  81. <!-- 分页 -->
  82. <div class="block">
  83. <el-pagination
  84. @size-change="handleSizeChange"
  85. @current-change="handleCurrentChange"
  86. :current-page="current"
  87. :page-sizes="[6, 8, 10]"
  88. :page-size="pagesize"
  89. layout="total, sizes, prev, pager, next, jumper"
  90. :total="total">
  91. </el-pagination>
  92. </div>
  93. </el-card>
  94. </div>
  95. </template>
  96. <script type="text/javascript">
  97. export default{
  98. data() {
  99. return {
  100. loading: true,
  101. roletable: [],
  102. formList: {
  103. "roleId": "",
  104. "permissionIds": []
  105. },
  106. current: 1,
  107. pagesize: 10,
  108. total: 0,
  109. }
  110. },
  111. created() {
  112. this.loadData();
  113. },
  114. methods: {
  115. // 请求查询数据
  116. async loadData() {
  117. const response = await this.$http.get(`app/billRecord?&current=${this.current}&size=${this.pagesize}`);
  118. if (response.data.code === 1) {
  119. this.loading = false;
  120. this.roletable = response.data.responseData.records;
  121. this.total = response.data.responseData.total;
  122. }
  123. },
  124. // 分页方法
  125. handleSizeChange(val) {
  126. this.pagesize = val;
  127. this.loadData();
  128. console.log(`每页 ${val} 条`);
  129. },
  130. handleCurrentChange(val) {
  131. this.current = val;
  132. this.loadData();
  133. console.log(`当前页: ${val}`);
  134. },
  135. }
  136. };
  137. </script>
  138. <style scoped>
  139. .waybill .title{
  140. font-size: 5px;
  141. margin-bottom: 20px;
  142. }
  143. .waybill .text {
  144. font-size: 14px;
  145. display: inline-block;
  146. }
  147. .waybill input {
  148. margin-left: 10px;
  149. margin-right: 10px;
  150. width: 150px;
  151. }
  152. .waybill select {
  153. border-radius: 3px;
  154. width: 150px;
  155. }
  156. .waybill .middle {
  157. margin-top: 20px;
  158. margin-bottom:20px;
  159. }
  160. .waybill .bottom {
  161. margin-bottom: 20px;
  162. }
  163. .waybill .el-button--primary {
  164. background-color: #5885f7 !important;
  165. border-color: #5885f7 !important;
  166. }
  167. .waybill .el-button {
  168. padding: 4px 20px !important;
  169. }
  170. .waybill .block {
  171. font-size: 5px;
  172. text-align: center;
  173. margin-top: 15px;
  174. }
  175. </style>