index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px">
  4. <el-form-item label="班次号" prop="classesNo">
  5. <el-input
  6. v-model="queryParams.classesNo"
  7. placeholder="请输入班次号"
  8. clearable
  9. size="small"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item label="开始时间" prop="startDate">
  14. <el-date-picker clearable size="small" style="width: 200px"
  15. v-model="queryParams.startDate"
  16. type="date"
  17. value-format="yyyy-MM-dd"
  18. placeholder="选择开始时间">
  19. </el-date-picker>
  20. </el-form-item>
  21. <el-form-item label="结束时间" prop="endDate">
  22. <el-date-picker clearable size="small" style="width: 200px"
  23. v-model="queryParams.endDate"
  24. type="date"
  25. value-format="yyyy-MM-dd"
  26. placeholder="选择结束时间">
  27. </el-date-picker>
  28. </el-form-item>
  29. <el-form-item label="油站名称" prop="stationName">
  30. <el-input
  31. v-model="queryParams.stationName"
  32. placeholder="请输入油站名称"
  33. clearable
  34. size="small"
  35. @keyup.enter.native="handleQuery"
  36. />
  37. </el-form-item>
  38. <el-form-item label="班结人" prop="classesMan">
  39. <el-input
  40. v-model="queryParams.classesMan"
  41. placeholder="请输入班结人"
  42. clearable
  43. size="small"
  44. @keyup.enter.native="handleQuery"
  45. />
  46. </el-form-item>
  47. <el-form-item>
  48. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  49. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  50. </el-form-item>
  51. </el-form>
  52. <el-table v-loading="loading" :data="summaryList" >
  53. <el-table-column label="班结主键id" align="center" prop="id" v-if="false" />
  54. <el-table-column label="班次号" align="center" prop="classesNo" />
  55. <el-table-column label="班次开始时间" align="center" prop="startDate" width="180">
  56. <template slot-scope="scope">
  57. <span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="班次结束时间" align="center" prop="endDate" width="180">
  61. <template slot-scope="scope">
  62. <span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="油站id" align="center" prop="stationId" v-if="false" />
  66. <el-table-column label="油站名称" align="center" prop="stationName" />
  67. <el-table-column label="订单数" align="center" prop="orderNum" />
  68. <el-table-column label="小票数量" align="center" prop="printNum" />
  69. <el-table-column label="销量L" align="center" prop="saleLiters" />
  70. <el-table-column label="销售额元" align="center" prop="saleAmt" />
  71. <el-table-column label="微信销售金额" align="center" prop="wxAmt" />
  72. <el-table-column label="支付宝销售金额" align="center" prop="zfbAmt" />
  73. <el-table-column label="电子卡销售金额" align="center" prop="dzkAmt" />
  74. <el-table-column label="班结人" align="center" prop="classesMan" />
  75. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  76. <template slot-scope="scope">
  77. <router-link :to="{path:'/station/structure',query:{classesNo:scope.row.classesNo,stationId:scope.row.stationId}}" class="link-type">
  78. <span>查看</span>
  79. </router-link>
  80. <el-button
  81. size="mini"
  82. type="text"
  83. icon="el-icon-edit"
  84. @click="handleUpdate(scope.row)"
  85. v-hasPermi="['customer:setting:edit']"
  86. >查看</el-button>
  87. </template>
  88. </el-table-column>
  89. </el-table>
  90. <pagination
  91. v-show="total>0"
  92. :total="total"
  93. :page.sync="queryParams.pageNum"
  94. :limit.sync="queryParams.pageSize"
  95. @pagination="getList"
  96. />
  97. </div>
  98. </template>
  99. <script>
  100. import { listSummary } from "@/api/station/summary";
  101. export default {
  102. name: "Summary",
  103. data() {
  104. return {
  105. // 遮罩层
  106. loading: true,
  107. // 选中数组
  108. ids: [],
  109. // 非单个禁用
  110. single: true,
  111. // 非多个禁用
  112. multiple: true,
  113. // 显示搜索条件
  114. showSearch: true,
  115. // 总条数
  116. total: 0,
  117. // 【请填写功能名称】表格数据
  118. summaryList: [],
  119. // 弹出层标题
  120. title: "",
  121. // 是否显示弹出层
  122. open: false,
  123. // 查询参数
  124. queryParams: {
  125. pageNum: 1,
  126. pageSize: 10,
  127. classesNo: null,
  128. startDate: null,
  129. endDate: null,
  130. stationId: null,
  131. stationName: null,
  132. orderNum: null,
  133. printNum: null,
  134. saleLiters: null,
  135. saleAmt: null,
  136. wxAmt: null,
  137. zfbAmt: null,
  138. dzkAmt: null,
  139. classesMan: null
  140. },
  141. // 表单参数
  142. form: {},
  143. // 表单校验
  144. rules: {
  145. }
  146. };
  147. },
  148. created() {
  149. this.getList();
  150. },
  151. methods: {
  152. /** 查询【请填写功能名称】列表 */
  153. getList() {
  154. this.loading = true;
  155. listSummary(this.queryParams).then(response => {
  156. this.summaryList = response.rows;
  157. this.total = response.total;
  158. this.loading = false;
  159. });
  160. },
  161. // 取消按钮
  162. cancel() {
  163. this.open = false;
  164. this.reset();
  165. },
  166. // 表单重置
  167. reset() {
  168. this.form = {
  169. id: null,
  170. classesNo: null,
  171. startDate: null,
  172. endDate: null,
  173. stationId: null,
  174. stationName: null,
  175. orderNum: null,
  176. printNum: null,
  177. saleLiters: null,
  178. saleAmt: null,
  179. wxAmt: null,
  180. zfbAmt: null,
  181. dzkAmt: null,
  182. classesMan: null
  183. };
  184. this.resetForm("form");
  185. },
  186. /** 搜索按钮操作 */
  187. handleQuery() {
  188. this.queryParams.pageNum = 1;
  189. this.getList();
  190. },
  191. /** 重置按钮操作 */
  192. resetQuery() {
  193. this.resetForm("queryForm");
  194. this.handleQuery();
  195. }
  196. }
  197. };
  198. </script>