billApplication.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <basic-container>
  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="costTypeSearch">
  24. <breakdown-select
  25. v-model="search.costType"
  26. :configuration="breakConfiguration"
  27. ></breakdown-select>
  28. </template>
  29. </avue-crud>
  30. <div style="padding: 10px;display: flex;justify-content: flex-end;">
  31. <span slot="footer" class="dialog-footer" >
  32. <el-button @click="$emit('choceApplication')">关闭</el-button>
  33. </span>
  34. </div>
  35. </basic-container>
  36. </template>
  37. <script>
  38. import option from "./config/application.json";
  39. import { getBillList } from "@/api/financialManagement/paymentRequest";
  40. export default {
  41. name: "billApplication",
  42. props:{
  43. billId:{
  44. type:String
  45. },
  46. choceApplication: {
  47. type: Function
  48. }
  49. },
  50. data() {
  51. return {
  52. loading : false,
  53. form: {},
  54. search:{},
  55. show:true,
  56. detailData:{},
  57. option: option,
  58. parentId:0,
  59. dataList: [],
  60. page: {
  61. pageSize: 10,
  62. pagerCount: 5,
  63. total: 0,
  64. },
  65. query:{},
  66. configuration:{
  67. multipleChoices:false,
  68. multiple:false,
  69. disabled:false,
  70. searchShow:true,
  71. collapseTags:false,
  72. clearable:true,
  73. placeholder:'请点击右边按钮选择',
  74. dicData:[]
  75. },
  76. breakConfiguration:{
  77. multipleChoices:false,
  78. multiple:false,
  79. disabled:false,
  80. searchShow:true,
  81. collapseTags:false,
  82. clearable:true,
  83. placeholder:'请点击右边按钮选择',
  84. dicData:[]
  85. },
  86. }
  87. },
  88. created() {
  89. },
  90. mounted() {
  91. option.height = window.innerHeight - 200 ;
  92. },
  93. methods: {
  94. //新单打开
  95. addReceipt(row){
  96. this.detailData = {
  97. id: row.id,
  98. status: 1
  99. };
  100. this.show = false;
  101. },
  102. //编辑打开
  103. editOpen(row, status){
  104. this.detailData = {
  105. id: row.id,
  106. status: status
  107. };
  108. this.show = false;
  109. },
  110. //点击搜索按钮触发
  111. searchChange(params, done) {
  112. this.query = params;
  113. this.page.currentPage = 1;
  114. this.onLoad(this.page, params);
  115. done()
  116. },
  117. searchReset() {
  118. console.log('1')
  119. },
  120. selectionChange() {
  121. console.log('1')
  122. },
  123. currentChange() {
  124. console.log('1')
  125. },
  126. sizeChange() {
  127. console.log('1')
  128. },
  129. refreshChange() {
  130. console.log('1')
  131. },
  132. onLoad(page, params = {}) {
  133. this.loading = true;
  134. params.srcParentId = this.billId
  135. if (params.createTime != undefined) { //合同
  136. params.createStartDate = params.createTime[0]+ " " + "00:00:00";
  137. params.createEndDate = params.createTime[1] + " " + "23:59:59";
  138. this.$delete(params,'createTime')
  139. }
  140. getBillList(page.currentPage, page.pageSize,params).then(res=>{
  141. this.dataList = res.data.data.records
  142. this.page.total = res.data.data.total
  143. this.loading = false;
  144. })
  145. },
  146. goBack() {
  147. this.detailData=this.$options.data().detailData
  148. this.show = true;
  149. }
  150. }
  151. }
  152. </script>
  153. <style scoped>
  154. </style>