orderInfo.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <!--
  2. * @Description: 新增/编辑弹框
  3. -->
  4. <template>
  5. <el-dialog
  6. :title="subTitle"
  7. v-if="isShow"
  8. :visible.sync="isShow"
  9. width="90%"
  10. append-to-body
  11. :close-on-click-modal="false"
  12. @close="cancel"
  13. >
  14. <div class="dialog">
  15. <!-- 表格 -->
  16. <el-button type="primary" style="margin-bottom: 10px;" @click="handleExport">导出</el-button>
  17. <div class="app-container-table-info">
  18. <el-table ref="tables" v-loading="isLoading" height="500px" :data="orderList" border>
  19. <el-table-column label="序号" align="center" type="index" width="60"></el-table-column>
  20. <el-table-column label="业务订单号" align="center" prop="orderId" width="170" />
  21. <el-table-column label="演出日期" align="center" prop="performDate" />
  22. <el-table-column label="演出时段" align="center" prop="performInterval" />
  23. <el-table-column label="实收金额" align="center" prop="realPrice">
  24. <template slot-scope="scope">
  25. <span>¥{{ scope.row.realPrice }}</span>
  26. </template>
  27. </el-table-column>
  28. <el-table-column label="核销金额" align="center" prop="usedPrice">
  29. <template slot-scope="scope">
  30. <span>¥{{ scope.row.usedPrice }}</span>
  31. </template>
  32. </el-table-column>
  33. <el-table-column label="退款金额" align="center" prop="refundPrice ">
  34. <template slot-scope="scope">
  35. <span>¥{{ scope.row.refundPrice }}</span>
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="下单时间" align="center" prop="createTime" width="150" >
  39. <template slot-scope="scope">
  40. <span>{{ parseTime(scope.row.createTime) }}</span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="支付时间" align="center" prop="payTime" width="150" >
  44. <template slot-scope="scope">
  45. <span>{{ parseTime(scope.row.payTime) }}</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="支付方式" align="center" prop="payWay">
  49. <template slot-scope="scope">
  50. <dict-tag :options="dict.type.pay_way_type" :value="scope.row.payWay"/>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="是否其他团队代付" align="center" prop="ifRepay">
  54. <template slot-scope="scope">
  55. <el-tag type="danger" v-if="scope.row.ifRepay == '0'">否</el-tag>
  56. <el-tag type="success" v-else-if="scope.row.ifRepay == '1'">是</el-tag>
  57. <span v-else></span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="是否有子订单" align="center" prop="hasChildOrder">
  61. <template slot-scope="scope">
  62. <el-tag type="danger" v-if="scope.row.hasChildOrder == '0'">否</el-tag>
  63. <el-tag type="success" v-else-if="scope.row.hasChildOrder == '1'">是</el-tag>
  64. </template>
  65. </el-table-column>
  66. </el-table>
  67. <pagination
  68. v-show="total>0"
  69. :total="total"
  70. :page.sync="queryParams.pageNum"
  71. :limit.sync="queryParams.pageSize"
  72. @pagination="getList"
  73. />
  74. <div class="cal-info">
  75. 查询结果:订单笔数<span class="text-price">{{ statInfo.orderNum }}</span>笔,
  76. 实收金额总额:<span class="text-price">¥{{ statInfo.realTotalPrice }}</span>,
  77. 核销金额总额:<span class="text-price">¥{{ statInfo.usedTotalPrice }}</span>,
  78. 退款金额总额:<span class="text-price">¥{{ statInfo.refundTotalPrice }}</span>,
  79. </div>
  80. </div>
  81. </div>
  82. </el-dialog>
  83. </template>
  84. <script>
  85. import {
  86. orderInfoList,
  87. downOrderListXls
  88. } from '@/api/financeMr/reconciliation'
  89. import { exportExcel } from '@/utils/exportexcel'
  90. export default {
  91. name: "OrderInfo",
  92. dicts: ['order_status_type','pay_way_type'],
  93. data() {
  94. return {
  95. model: "ORDER",
  96. isShow: false,
  97. loading: false,
  98. isLoading: false,
  99. subTitle: "订单详情",
  100. orderList: [],
  101. handleExportLoading: false,
  102. statInfo: {},
  103. queryParams: {
  104. pageNum: 1,
  105. pageSize: 10,
  106. teamId: '',
  107. },
  108. total:0,
  109. };
  110. },
  111. methods: {
  112. // 打开弹框
  113. openDialog(title, obj, queryForm) {
  114. console.log(queryForm,'queryForm');
  115. this.isShow = true;
  116. this.subTitle = title;
  117. this.queryParams.teamId = obj.teamId;
  118. this.queryParams.startDate = queryForm.startDate || '';
  119. this.queryParams.endDate = queryForm.endDate || '';
  120. this.getList();
  121. },
  122. /** 获取子订单 */
  123. getList() {
  124. this.loading = true;
  125. orderInfoList(this.queryParams).then(res => {
  126. this.orderList = res.data.pageList.rows;
  127. this.total = res.data.pageList.total;
  128. this.statInfo = res.data.statInfo;
  129. this.isLoading = false;
  130. }).catch(()=>{
  131. this.orderList = [];
  132. this.statInfo = {};
  133. this.isLoading = false;
  134. })
  135. },
  136. // 导出报表
  137. handleExport() {
  138. this.$confirm('您确定要导出当前查询的数据吗?', '提示', {
  139. confirmButtonText: '确定 ',
  140. cancelButtonText: '取消 ',
  141. type: 'warning'
  142. })
  143. .then(() => {
  144. this.handleExportLoading = true;
  145. downOrderListXls({
  146. teamId: this.queryParams.teamId,
  147. startDate: this.queryParams.startDate,
  148. endDate: this.queryParams.endDate,
  149. })
  150. .then((res) => {
  151. exportExcel(res, '对公对账', '.xlsx');
  152. this.handleExportLoading = false;
  153. })
  154. .catch((error) => {
  155. // console.log("error===",error)
  156. this.handleExportLoading = false;
  157. });
  158. })
  159. .catch(() => {
  160. this.$message.info('您已取消导出!');
  161. });
  162. },
  163. // 关闭弹框
  164. cancel() {
  165. this.queryParams.pageNum = 1;
  166. this.queryParams.pageSize = 10;
  167. this.isShow = false;
  168. },
  169. },
  170. };
  171. </script>
  172. <style lang="scss" scoped>
  173. .dialog {
  174. padding: 0 10px;
  175. max-height: 85vh;
  176. overflow-y: auto;
  177. .cal-info {
  178. font-size: 16px;
  179. margin-top: 15px;
  180. .text-price {
  181. color: blue;
  182. }
  183. }
  184. }
  185. </style>