paymentSettle.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <basic-container v-if="show">
  3. <avue-crud :option="option"
  4. :data="dataList"
  5. ref="crud"
  6. v-model="form"
  7. :page.sync="page"
  8. :search.sync="search"
  9. :table-loading="loading"
  10. @search-change="searchChange"
  11. @search-reset="searchReset"
  12. @selection-change="selectionChange"
  13. @current-change="currentChange"
  14. @size-change="sizeChange"
  15. @refresh-change="refreshChange"
  16. @on-load="onLoad">
  17. <template slot="corpIdSearch">
  18. <select-component
  19. v-model="search.corpId"
  20. :configuration="configuration"
  21. ></select-component>
  22. </template>
  23. <template slot="menuLeft">
  24. <el-button type="primary"
  25. size="small"
  26. icon="el-icon-plus"
  27. @click="addReceipt">新 单
  28. </el-button>
  29. <el-button size="small"
  30. type="info"
  31. @click.stop="openReport()"
  32. >导出报表
  33. </el-button>
  34. </template>
  35. <template slot-scope="scope" slot="menu">
  36. <el-button
  37. type="text"
  38. size="small"
  39. @click.stop="editOpen(scope.row, 2)"
  40. >编辑
  41. </el-button>
  42. <el-button
  43. type="text"
  44. size="small"
  45. @click.stop="rowDel(scope.row, scope.index)"
  46. >删除
  47. </el-button>
  48. </template>
  49. </avue-crud>
  50. </basic-container>
  51. <detail-page
  52. ref="detail"
  53. @goBack="goBack"
  54. :detailData="detailData"
  55. v-else
  56. ></detail-page>
  57. </template>
  58. <script>
  59. import option from "./configuration/mainList.json";
  60. import {getList ,remove} from "@/api/financialManagement/financialManagement"
  61. import detailPage from "./paymentSettleDetailsPage";
  62. export default {
  63. data() {
  64. return {
  65. loading : false,
  66. form: {},
  67. search:{},
  68. show:true,
  69. detailData:{},
  70. option: option,
  71. parentId:0,
  72. dataList: [],
  73. page: {
  74. pageSize: 10,
  75. pagerCount: 5,
  76. total: 0,
  77. },
  78. query:{},
  79. configuration:{
  80. multipleChoices:false,
  81. multiple:false,
  82. disabled:false,
  83. searchShow:true,
  84. collapseTags:false,
  85. clearable:true,
  86. placeholder:'请点击右边按钮选择',
  87. dicData:[]
  88. },
  89. }
  90. },
  91. created() {
  92. if(this.$route.query.params){
  93. this.detailData={
  94. params:this.$route.query.params
  95. }
  96. this.show = false;
  97. this.$store.commit("PAY_IN_DETAIL");
  98. }
  99. },
  100. components:{
  101. detailPage
  102. },
  103. mounted() {
  104. // this.option.height = window.innerHeight - 200;
  105. },
  106. methods: {
  107. //新单打开
  108. addReceipt(row){
  109. this.detailData = {
  110. id: row.id,
  111. status: 1
  112. };
  113. this.show = false;
  114. this.$store.commit("PAY_IN_DETAIL");
  115. },
  116. //编辑打开
  117. editOpen(row, status){
  118. this.detailData = {
  119. id: row.id,
  120. status: status
  121. };
  122. this.show = false;
  123. this.$store.commit("PAY_IN_DETAIL");
  124. },
  125. rowDel(row, index, done) {
  126. if(row.id){
  127. this.$confirm("确定将选择数据删除?", {
  128. confirmButtonText: "确定",
  129. cancelButtonText: "取消",
  130. type: "warning"
  131. }).then(() => {
  132. remove(row.id).then(res =>{
  133. if(res.data.success){
  134. this.$message.success("操作成功!");
  135. this.onLoad(this.page);
  136. }
  137. })
  138. });
  139. }
  140. },
  141. //点击搜索按钮触发
  142. searchChange(params, done) {
  143. this.query = params;
  144. this.page.currentPage = 1;
  145. this.onLoad(this.page, params);
  146. done()
  147. },
  148. searchReset() {
  149. console.log('1')
  150. },
  151. selectionChange() {
  152. console.log('1')
  153. },
  154. currentChange() {
  155. console.log('1')
  156. },
  157. sizeChange() {
  158. console.log('1')
  159. },
  160. refreshChange() {
  161. console.log('1')
  162. },
  163. onLoad(page, params = {}) {
  164. params.billType = "付费"
  165. if (params.settlementDate != undefined) { //合同
  166. params.settlementStartDate = params.settlementDate[0]+ " " + "00:00:00";
  167. params.settlementEndDate = params.settlementDate[1] + " " + "23:59:59";
  168. this.$delete(params,'settlementDate')
  169. }
  170. this.loading = true
  171. getList(page.currentPage, page.pageSize,params).then(res =>{
  172. this.dataList = res.data.data.records
  173. this.page.total = res.data.data.total
  174. this.loading = false
  175. })
  176. },
  177. goBack() {
  178. this.detailData=this.$options.data().detailData
  179. this.show = true;
  180. }
  181. }
  182. }
  183. </script>
  184. <style scoped>
  185. </style>