index.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="订单号">
  5. <el-input
  6. v-model="queryParams.orderId"
  7. placeholder="请输入订单号"
  8. clearable
  9. style="width: 240px;"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item label="购票人手机号" label-width="100px">
  14. <el-input
  15. v-model="queryParams.memberMobile"
  16. placeholder="请输入购票人手机号"
  17. clearable
  18. style="width: 240px;"
  19. @keyup.enter.native="handleQuery"
  20. />
  21. </el-form-item>
  22. <el-form-item label="剧目名称">
  23. <el-input
  24. v-model="queryParams.performName"
  25. placeholder="请输入剧目名称"
  26. clearable
  27. style="width: 240px;"
  28. @keyup.enter.native="handleQuery"
  29. />
  30. </el-form-item>
  31. <el-form-item label="订单状态">
  32. <el-select
  33. v-model="queryParams.status"
  34. placeholder="订单状态"
  35. clearable
  36. style="width: 100%"
  37. >
  38. <el-option
  39. v-for="dict in statusMapList"
  40. :key="dict.value"
  41. :label="dict.name"
  42. :value="dict.value"
  43. />
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item label="购票渠道">
  47. <el-select
  48. v-model="queryParams.source"
  49. placeholder="购票渠道"
  50. clearable
  51. style="width: 100%"
  52. >
  53. <el-option
  54. v-for="dict in sourceMapList"
  55. :key="dict.value"
  56. :label="dict.name"
  57. :value="dict.value"
  58. />
  59. </el-select>
  60. </el-form-item>
  61. <el-form-item label="支付时间">
  62. <el-date-picker
  63. v-model="queryParams.time"
  64. type="daterange"
  65. value-format="yyyy-MM-dd"
  66. range-separator="至"
  67. start-placeholder="开始日期"
  68. end-placeholder="结束日期">
  69. </el-date-picker>
  70. </el-form-item>
  71. <el-form-item>
  72. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  73. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  74. </el-form-item>
  75. </el-form>
  76. <el-row :gutter="10" class="mb8">
  77. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  78. </el-row>
  79. <el-table ref="tables" v-loading="loading" :data="dataList" border>
  80. <el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
  81. <el-table-column label="订单号" align="center" prop="id" />
  82. <el-table-column label="购票人手机号" align="center" prop="memberMobile" />
  83. <el-table-column label="剧目名称" align="center" prop="performName" />
  84. <el-table-column label="票务名称" align="center" prop="goodsName" />
  85. <el-table-column label="票务类型" align="center" prop="seatTypeName" />
  86. <el-table-column label="购票渠道" align="center" prop="type">
  87. <template slot-scope="scope">
  88. <span>{{ sourceList[scope.row.source] }}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="购票数量" align="center" prop="quantity" />
  92. <el-table-column label="支付总额" align="center" prop="orderPrice">
  93. <template slot-scope="scope">
  94. <span>¥{{ scope.row.orderPrice }}</span>
  95. </template>
  96. </el-table-column>
  97. <!-- <el-table-column label="优惠信息" align="center" prop="refundReason" />-->
  98. <el-table-column label="支付方式" align="center" prop="type">
  99. <template slot-scope="scope">
  100. <span>{{ payWayList[scope.row.payWay] }}</span>
  101. </template>
  102. </el-table-column>
  103. <el-table-column label="支付时间" align="center" prop="payTime" width="160" >
  104. <template slot-scope="scope">
  105. <span>{{ parseTime(scope.row.payTime) }}</span>
  106. </template>
  107. </el-table-column>
  108. <el-table-column label="订单状态" align="center" prop="type">
  109. <template slot-scope="scope">
  110. <span>{{statusList[scope.row.status]}}</span>
  111. </template>
  112. </el-table-column>
  113. <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
  114. <template slot-scope="scope">
  115. <el-button
  116. size="mini"
  117. type="text"
  118. @click="openDetails(scope.row)"
  119. v-hasPermi="['orderMr:orderMr:details']"
  120. >详情</el-button>
  121. </template>
  122. </el-table-column>
  123. </el-table>
  124. <pagination
  125. v-show="total>0"
  126. :total="total"
  127. :page.sync="queryParams.pageNum"
  128. :limit.sync="queryParams.pageSize"
  129. @pagination="getList"
  130. />
  131. <!-- 详情 -->
  132. <details-dia ref="detailsDia" @getList="getList"></details-dia>
  133. </div>
  134. </template>
  135. <script>
  136. import { pageList } from '@/api/order/orderMr'
  137. import detailsDia from "./dialog/details.vue";
  138. export default {
  139. name: "agreement",
  140. dicts: ['agreement_type'],
  141. components: { detailsDia },
  142. data() {
  143. return {
  144. // 遮罩层
  145. loading: true,
  146. // 选中数组
  147. ids: [],
  148. // 非单个禁用
  149. single: true,
  150. // 非多个禁用
  151. multiple: true,
  152. // 显示搜索条件
  153. showSearch: true,
  154. // 总条数
  155. total: 0,
  156. // 用户表格数据
  157. dataList: null,
  158. // 弹出层标题
  159. title: "",
  160. // 是否显示弹出层
  161. open: false,
  162. // 日期范围
  163. dateRange: [],
  164. // 查询参数
  165. queryParams: {
  166. pageNum: 1,
  167. pageSize: 10,
  168. },
  169. statusList: {
  170. 0: '待支付',
  171. 2: '超时取消',
  172. 3: '待使用',
  173. 4: '退款中',
  174. 5: '己退款',
  175. 6: '退款失败',
  176. 7: '己使用',
  177. 8: '己超期',
  178. 9: '关闭',
  179. },
  180. statusMapList: [
  181. {id: 1, name: '待支付', value: 0},
  182. {id: 2, name: '超时取消', value: 2},
  183. {id: 3, name: '待使用', value: 3},
  184. {id: 4, name: '退款中', value: 4},
  185. {id: 5, name: '己退款', value: 5},
  186. {id: 6, name: '退款失败', value: 6},
  187. {id: 7, name: '己使用', value: 7},
  188. {id: 8, name: '己超期', value: 8},
  189. {id: 9, name: '关闭', value: 9},
  190. ],
  191. payList: {
  192. 0: '未支付',
  193. 1: '已支付',
  194. 2: '支付中',
  195. 3: '支付失败',
  196. 4: '支付退款',
  197. },
  198. payWayList: {
  199. 'cahsh': '现金',
  200. 'wecaht.applet': '微信小程序支付',
  201. 'alipay': '支付宝',
  202. 'wecaht.h5': '微信公众号支付',
  203. 'meituan': '美团支付',
  204. },
  205. sourceList: {
  206. 1: '小程序',
  207. 2: '公众号',
  208. 3: '美团',
  209. 4: '携程',
  210. 5: '团购',
  211. },
  212. sourceMapList: [
  213. {id: 1, name: '小程序', value: 1},
  214. {id: 2, name: '公众号', value: 2},
  215. {id: 3, name: '美团', value: 3},
  216. {id: 4, name: '携程', value: 4},
  217. {id: 5, name: '团购', value: 5},
  218. ],
  219. visibleStatus: false,
  220. newObj: {},
  221. visibleType: ''
  222. };
  223. },
  224. created() {
  225. this.getList();
  226. },
  227. methods: {
  228. /** 查询列表 */
  229. getList() {
  230. this.loading = true;
  231. pageList(this.addDateRange(this.queryParams, this.dateRange))
  232. .then(response => {
  233. this.dataList = response.data.rows;
  234. this.total = response.data.total;
  235. this.loading = false;
  236. });
  237. },
  238. // 取消按钮
  239. cancel() {
  240. this.open = false;
  241. },
  242. /** 搜索按钮操作 */
  243. handleQuery() {
  244. this.queryParams.pageNum = 1;
  245. if(this.queryParams.time){
  246. this.queryParams.payBeginTime = this.queryParams.time[0];
  247. this.queryParams.payEndTime = this.queryParams.time[1];
  248. }
  249. this.getList();
  250. },
  251. /** 重置按钮操作 */
  252. resetQuery() {
  253. this.dateRange = [];
  254. this.$set(this.queryParams, 'orderId', '');
  255. this.$set(this.queryParams, 'status', '');
  256. this.$set(this.queryParams, 'memberMobile', '');
  257. this.$set(this.queryParams, 'source', '');
  258. this.$set(this.queryParams, 'performName', '');
  259. this.$set(this.queryParams, 'payBeginTime', '');
  260. this.$set(this.queryParams, 'payEndTime', '');
  261. this.$set(this.queryParams, 'time', '');
  262. this.queryParams.pageNum = 1;
  263. this.handleQuery();
  264. },
  265. /** 详情按钮操作 */
  266. openDetails(row, type) {
  267. this.$refs["detailsDia"].openDialog("详情", row, type);
  268. },
  269. }
  270. };
  271. </script>