billApplication.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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 class="dialogButton">
  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. this.historyOption.searchShow = true
  91. },
  92. mounted() {
  93. },
  94. methods: {
  95. //新单打开
  96. addReceipt(row){
  97. this.detailData = {
  98. id: row.id,
  99. status: 1
  100. };
  101. this.show = false;
  102. },
  103. //编辑打开
  104. editOpen(row, status){
  105. this.detailData = {
  106. id: row.id,
  107. status: status
  108. };
  109. this.show = false;
  110. },
  111. //点击搜索按钮触发
  112. searchChange(params, done) {
  113. this.query = params;
  114. this.page.currentPage = 1;
  115. this.onLoad(this.page, params);
  116. done()
  117. },
  118. searchReset() {
  119. console.log('1')
  120. },
  121. selectionChange() {
  122. console.log('1')
  123. },
  124. currentChange() {
  125. console.log('1')
  126. },
  127. sizeChange() {
  128. console.log('1')
  129. },
  130. refreshChange() {
  131. console.log('1')
  132. },
  133. onLoad(page, params = {}) {
  134. this.loading = true;
  135. params.srcParentId = this.billId
  136. if (params.createTime != undefined) { //合同
  137. params.createStartDate = params.createTime[0]+ " " + "00:00:00";
  138. params.createEndDate = params.createTime[1] + " " + "23:59:59";
  139. this.$delete(params,'createTime')
  140. }
  141. params.flag = 1
  142. getBillList(page.currentPage, page.pageSize,params).then(res=>{
  143. this.dataList = res.data.data.records
  144. this.page.total = res.data.data.total
  145. this.loading = false;
  146. })
  147. },
  148. goBack() {
  149. this.detailData=this.$options.data().detailData
  150. this.show = true;
  151. }
  152. }
  153. }
  154. </script>
  155. <style scoped>
  156. </style>