fnanceInfo.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <div class>
  3. <!-- 头部展示 -->
  4. <statistic :col="3">
  5. <statistic-item>
  6. <span>课程总价</span>
  7. <span>{{ totalPrice | moneyFormat }}</span>
  8. </statistic-item>
  9. <statistic-item>
  10. <span>实收笔数</span>
  11. <span>{{ feeDeductionNum }}</span>
  12. </statistic-item>
  13. <statistic-item>
  14. <span>线上课课酬</span>
  15. <span>{{ onlineClassesUnitPrice | moneyFormat }}</span>
  16. </statistic-item>
  17. <statistic-item>
  18. <span>课酬总额</span>
  19. <span>{{ totalSalary | moneyFormat }}</span>
  20. </statistic-item>
  21. <statistic-item>
  22. <span>实收总额</span>
  23. <span>{{ totalFeeDeduction | moneyFormat }}</span>
  24. </statistic-item>
  25. <statistic-item>
  26. <span>线下课课酬</span>
  27. <span>{{ offlineClassesUnitPrice | moneyFormat }}</span>
  28. </statistic-item>
  29. </statistic>
  30. <!-- 搜索栏 -->
  31. <save-form :inline="true"
  32. save-key='vipDetail-fnanceInfo'
  33. :model="searchForm" @submit='search'>
  34. <el-form-item label="时间范围">
  35. <el-date-picker v-model.trim="searchForm.time"
  36. style="width:400px;"
  37. type="daterange"
  38. range-separator="至"
  39. start-placeholder="课程开始日期"
  40. end-placeholder="课程结束日期"
  41. value-format="yyyy-MM-dd"
  42. :picker-options="{
  43. firstDayOfWeek: 1
  44. }"></el-date-picker>
  45. </el-form-item>
  46. <el-form-item>
  47. <el-button native-type="submit"
  48. type="danger">搜索</el-button>
  49. </el-form-item>
  50. </save-form>
  51. <div class="tableWrap">
  52. <el-table :header-cell-style="{background:'#EDEEF0',color:'#444'}"
  53. :data="tableList">
  54. <el-table-column label="课程编号"
  55. align="center"
  56. prop="courseScheduleId">
  57. </el-table-column>
  58. <el-table-column label="上课时间"
  59. align="center"
  60. prop="classDate">
  61. <template slot-scope="scope">
  62. <div>{{ scope.row.classDate | dateForMinFormat }}</div>
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="课时类型"
  66. align="center"
  67. prop="teachMode">
  68. <template slot-scope="scope">
  69. <div>{{ scope.row.teachMode | fitterteachMode }}</div>
  70. </template>
  71. </el-table-column>
  72. <el-table-column label="实收总额"
  73. align="center"
  74. prop="deductionFee">
  75. <template slot-scope="scope">
  76. <div>
  77. {{scope.row.deductionFee|moneyFormat}}
  78. </div>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="老师课酬"
  82. align="center"
  83. prop="actualSalary">
  84. <template slot-scope="scope">
  85. <div>
  86. {{scope.row.actualSalary|moneyFormat}}
  87. </div>
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="结算状态"
  91. align="center"
  92. prop="isSalary">
  93. <template slot-scope="scope">
  94. <div>{{ scope.row.isSalary | fitterisSalary }}</div>
  95. </template>
  96. </el-table-column>
  97. </el-table>
  98. <!-- 分页器 -->
  99. <pagination
  100. save-key='vipDetail-fnanceInfo'
  101. sync
  102. :total.sync="rules.total"
  103. :page.sync="rules.page"
  104. :limit.sync="rules.limit"
  105. :page-sizes="rules.page_size"
  106. @pagination="getList" />
  107. </div>
  108. </div>
  109. </template>
  110. <script>
  111. import pagination from "@/components/Pagination/index";
  112. import { getVipGroupSalarys, getVipGroupDetail } from "@/api/vipSeting";
  113. export default {
  114. components: { pagination },
  115. data () {
  116. return {
  117. searchForm: {
  118. time: []
  119. },
  120. tableList: [],
  121. id: "",
  122. onlineClassesUnitPrice: "",
  123. totalPrice: "",
  124. offlineClassesUnitPrice: "",
  125. totalFeeDeduction: "", // 扣费总额
  126. feeDeductionNum: "", //扣费笔数
  127. totalSalary: "", // 课酬总额
  128. rules: {
  129. // 分页规则
  130. limit: 10, // 限制显示条数
  131. page: 1, // 当前页
  132. total: 0, // 总条数
  133. page_size: [10, 20, 40, 50] // 选择限制显示条数
  134. }
  135. };
  136. },
  137. mounted () {
  138. this.__init();
  139. },
  140. activated () {
  141. this.__init();
  142. },
  143. methods: {
  144. __init () {
  145. let id = this.$route.query.id;
  146. this.id = id;
  147. this.rules.page = 1
  148. this.getList();
  149. },
  150. search () {
  151. this.rules.page = 1;
  152. this.getList();
  153. },
  154. getList () {
  155. if (!this.searchForm.time) {
  156. this.searchForm.time = [];
  157. }
  158. getVipGroupSalarys({
  159. vipGroupId: this.id,
  160. organId: null,
  161. page: this.rules.page,
  162. rows: this.rules.limit,
  163. startTime: this.searchForm.time[0] || null,
  164. endTime: this.searchForm.time[1] || null
  165. }).then(res => {
  166. if (res.code == 200) {
  167. this.tableList = res.data.pageInfo.rows;
  168. //课程总价 totalPrice
  169. this.totalPrice = res.data.baseInfo.totalCoursePrice;
  170. // 扣费总额 totalFeeDeduction
  171. this.totalFeeDeduction = res.data.baseInfo.totalFeeDeduction;
  172. //扣费笔数 feeDeductionNum
  173. this.feeDeductionNum = res.data.baseInfo.feeDeductionNum;
  174. // 课酬总额 totalSalary
  175. this.totalSalary = res.data.baseInfo.expectTotalSalary;
  176. // 线上课课酬
  177. this.onlineClassesUnitPrice =
  178. res.data.baseInfo.totalOnlineTeacherSalary;
  179. // 线下课课酬
  180. this.offlineClassesUnitPrice =
  181. res.data.baseInfo.totalOfflineTeacherSalary;
  182. this.rules.total = res.data.pageInfo.total;
  183. }
  184. });
  185. }
  186. },
  187. filters: {
  188. fitterisSalary (val) {
  189. let arr = ["未结算", "已结算"];
  190. return arr[val];
  191. },
  192. fitterteachMode (val) {
  193. if (val == "ONLINE") {
  194. return "线上课";
  195. } else if (val == "OFFLINE") {
  196. return "线下课";
  197. }
  198. }
  199. }
  200. };
  201. </script>
  202. <style lang="scss" scope>
  203. </style>