orderAllBox.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <!--
  2. * @Description: 新增/编辑弹框
  3. * @Author: Sugar.
  4. * @Date: 2023-11-24 13:55:00
  5. * @LastEditors: Sugar.
  6. * @LastEditTime: 22023-11-24 13:55:00
  7. * @FilePath: \cattle_webui\src\views\team\teamMr\AddOrEditDialog.vue
  8. * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
  9. -->
  10. <template>
  11. <el-dialog
  12. :visible.sync="open"
  13. width="95%"
  14. append-to-body
  15. :close-on-click-modal="false"
  16. @close="cancel"
  17. >
  18. <div class="dialog">
  19. <div class="app-container-table-box">
  20. <div style="width: 100%;display: flex;justify-content: center;font-size: 20px;"><span>{{ teamName + '团队订单' }}</span></div>
  21. <div class="app-container-table-info">
  22. <el-table ref="tables" height="calc( 80vh - 90px )" v-loading="loading" :data="dataList" border>
  23. <el-table-column label="序号" align="center" :fixed="fixed" type="index" width="60"></el-table-column>
  24. <el-table-column label="订单号" align="center" :fixed="fixed" prop="id" />
  25. <el-table-column label="票务名称" align="center" :fixed="fixed" prop="goodsName" />
  26. <el-table-column label="座位类型" align="center" :fixed="fixed" prop="seatTypeName" />
  27. <el-table-column label="场次时间" align="center" prop="performDate" />
  28. <el-table-column label="场次" width="120" align="center" prop="timeSnapshot">
  29. <template slot-scope="scope">
  30. <span>{{ scope.row.timeSnapshot }} <br /> ({{ scope.row.performTimeStart + '-' + scope.row.performTimeEnd }})</span>
  31. </template>
  32. </el-table-column>
  33. <el-table-column label="团购数量" align="center" prop="quantity" />
  34. <!-- <el-table-column label="支付总额" align="center" prop="orderPrice">
  35. <template slot-scope="scope">
  36. <span>¥{{ scope.row.orderPrice }}</span>
  37. </template>
  38. </el-table-column> -->
  39. <el-table-column label="应收金额" align="center" prop="orderPrice">
  40. <template slot-scope="scope">
  41. <span>¥{{ scope.row.orderPrice }}</span>
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="实收金额" align="center" prop="realPrice">
  45. <template slot-scope="scope">
  46. <span>¥{{ scope.row.realPrice }}</span>
  47. </template>
  48. </el-table-column>
  49. <el-table-column label="支付方式" align="center" prop="type">
  50. <template slot-scope="scope">
  51. <dict-tag :options="dict.type.pay_way_type" :value="scope.row.payWay"/>
  52. </template>
  53. </el-table-column>
  54. <el-table-column label="支付时间" align="center" prop="payTime" width="160" >
  55. <template slot-scope="scope">
  56. <span>{{ parseTime(scope.row.payTime) }}</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="订单状态" align="center" prop="type">
  60. <template slot-scope="scope">
  61. <dict-tag :options="dict.type.order_status_type" :value="scope.row.status"/>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="已核销票数" align="center" prop="usedTotal">
  65. <template slot-scope="scope">
  66. <span>{{ scope.row.usedTotal }}</span>
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="已核销金额" align="center" prop="usedPriceTotal">
  70. <template slot-scope="scope">
  71. <span>{{ scope.row.usedPriceTotal }}</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="退票数量" align="center" prop="refundTotal">
  75. <template slot-scope="scope">
  76. <span>{{ scope.row.refundTotal }}</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="退票金额" align="center" prop="refundPriceTotal">
  80. <template slot-scope="scope">
  81. <span>{{ scope.row.refundPriceTotal }}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="是否成功开票" align="center">
  85. <template slot-scope="scope">
  86. <el-tag type="danger" v-if="scope.row.ifSuccessInvoice == '0'">否</el-tag>
  87. <el-tag type="success" v-else-if="scope.row.ifSuccessInvoice == '1'">是</el-tag>
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="开票时间" align="center" prop="invoiceTime">
  91. <template slot-scope="scope">
  92. <span>{{ scope.row.invoiceTime }}</span>
  93. </template>
  94. </el-table-column>
  95. <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
  96. <template slot-scope="scope">
  97. <el-button
  98. size="mini"
  99. type="text"
  100. @click="openDetails(scope.row)"
  101. >详情</el-button>
  102. </template>
  103. </el-table-column>
  104. </el-table>
  105. </div>
  106. <pagination
  107. v-show="total>0"
  108. :total="total"
  109. :page.sync="queryParams.pageNum"
  110. :limit.sync="queryParams.pageSize"
  111. @pagination="getSelectByIdApi"
  112. />
  113. </div>
  114. </div>
  115. <!-- 详情 -->
  116. <details-dia ref="detailsDia"></details-dia>
  117. </el-dialog>
  118. </template>
  119. <script>
  120. import { pageList } from '@/api/order/groupBuyingMr';
  121. import detailsDia from "./details";
  122. export default {
  123. name: "addAndEdit",
  124. components: {
  125. detailsDia
  126. },
  127. dicts: ['order_form_type','order_status_type','pay_way_type'],
  128. data() {
  129. return {
  130. title: "编辑",
  131. model: "EDIT",
  132. activeName: '01',
  133. open: false,
  134. loading: false,
  135. // 用户表格数据
  136. dataList: [],
  137. total: 0,
  138. // 查询参数
  139. queryParams: {
  140. pageNum: 1,
  141. pageSize: 10,
  142. },
  143. fixed: 'left',
  144. teamName: null,
  145. };
  146. },
  147. methods: {
  148. /**
  149. * 打开弹框
  150. * @date 2023-11-22
  151. * @param {any} obj
  152. * @returns {any}
  153. */
  154. openDialog(title, obj) {
  155. this.open = true;
  156. this.title = title;
  157. this.reset();
  158. if (obj){
  159. this.queryParams = {
  160. pageNum: 1,
  161. pageSize: 10,
  162. teamId: obj.id,
  163. }
  164. this.teamName = obj.name
  165. this.getSelectByIdApi(obj);
  166. }else{
  167. this.$nextTick(() => {
  168. this.$refs["form"].clearValidate();
  169. });
  170. }
  171. },
  172. /** 获取详情 */
  173. getSelectByIdApi() {
  174. this.loading = true;
  175. let params = {...this.addDateRange(this.queryParams)};
  176. pageList(params)
  177. .then(response => {
  178. this.dataList = response.data.rows;
  179. this.total = response.data.total;
  180. this.loading = false;
  181. });
  182. },
  183. reset() {
  184. this.form = {}
  185. if(this.$refs["form"]) {
  186. this.$refs["form"].clearValidate();
  187. }
  188. },
  189. /**
  190. * 关闭弹框
  191. * @date 2023-11-22
  192. * @returns {any}
  193. */
  194. cancel() {
  195. this.reset();
  196. this.open = false;
  197. },
  198. /** 详情按钮操作 */
  199. openDetails(row, type) {
  200. this.$refs["detailsDia"].openDialog("详情", row, type);
  201. },
  202. },
  203. };
  204. </script>
  205. <style lang="scss" scoped>
  206. .dialog {
  207. height: 80vh;
  208. overflow-y: auto;
  209. }
  210. .dialog {
  211. padding: 0 30px;
  212. .upload-btn {
  213. width: 100px;
  214. height: 100px;
  215. background-color: #fbfdff;
  216. border: dashed 1px #c0ccda;
  217. border-radius: 5px;
  218. i {
  219. font-size: 30px;
  220. margin-top: 20px;
  221. }
  222. &-text {
  223. margin-top: -10px;
  224. }
  225. }
  226. .avatar {
  227. cursor: pointer;
  228. }
  229. }
  230. ::v-deep .avatar-uploader .el-upload {
  231. border: 1px dashed #d9d9d9;
  232. border-radius: 6px;
  233. cursor: pointer;
  234. position: relative;
  235. overflow: hidden;
  236. }
  237. ::v-deep .avatar-uploader .el-upload:hover {
  238. border-color: #409EFF;
  239. }
  240. ::v-deep .avatar-uploader-icon {
  241. font-size: 28px;
  242. color: #8c939d;
  243. width: 100px;
  244. height: 100px;
  245. line-height: 100px;
  246. text-align: center;
  247. }
  248. ::v-deep .avatar {
  249. width: 100px;
  250. height: 100px;
  251. display: block;
  252. }
  253. </style>