billDetails.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. </basic-container>
  31. </template>
  32. <script>
  33. import option from "./configuration/mainList.json";
  34. import { getBillList } from "@/api/financialManagement/paymentRequest";
  35. export default {
  36. data() {
  37. return {
  38. loading : false,
  39. form: {},
  40. search:{},
  41. show:true,
  42. detailData:{},
  43. option: option,
  44. parentId:0,
  45. dataList: [],
  46. page: {
  47. pageSize: 10,
  48. pagerCount: 5,
  49. total: 0,
  50. },
  51. query:{},
  52. configuration:{
  53. multipleChoices:false,
  54. multiple:false,
  55. disabled:false,
  56. searchShow:true,
  57. collapseTags:false,
  58. clearable:true,
  59. placeholder:'请点击右边按钮选择',
  60. dicData:[]
  61. },
  62. breakConfiguration:{
  63. multipleChoices:false,
  64. multiple:false,
  65. disabled:false,
  66. searchShow:true,
  67. collapseTags:false,
  68. clearable:true,
  69. placeholder:'请点击右边按钮选择',
  70. dicData:[]
  71. },
  72. }
  73. },
  74. created() {
  75. },
  76. mounted() {
  77. // option.height = window.innerHeight - 200 ;
  78. },
  79. methods: {
  80. //新单打开
  81. addReceipt(row){
  82. this.detailData = {
  83. id: row.id,
  84. status: 1
  85. };
  86. this.show = false;
  87. },
  88. //编辑打开
  89. editOpen(row, status){
  90. this.detailData = {
  91. id: row.id,
  92. status: status
  93. };
  94. this.show = false;
  95. },
  96. rowDel(row, index, done) {
  97. if(row.id){
  98. this.$confirm("确定将选择数据删除?", {
  99. confirmButtonText: "确定",
  100. cancelButtonText: "取消",
  101. type: "warning"
  102. }).then(() => {
  103. remove(row.id).then(res =>{
  104. if(res.data.success){
  105. this.$message.success("操作成功!");
  106. this.onLoad(this.page);
  107. }
  108. })
  109. });
  110. }
  111. },
  112. //点击搜索按钮触发
  113. searchChange(params, done) {
  114. this.query = params;
  115. this.page.currentPage = 1;
  116. this.onLoad(this.page, params);
  117. done()
  118. },
  119. searchReset() {
  120. console.log('1')
  121. },
  122. selectionChange() {
  123. console.log('1')
  124. },
  125. currentChange() {
  126. console.log('1')
  127. },
  128. sizeChange() {
  129. console.log('1')
  130. },
  131. refreshChange() {
  132. this.onLoad(this.page);
  133. },
  134. onLoad(page, params = {}) {
  135. this.loading = true;
  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. getBillList(page.currentPage, page.pageSize,params).then(res=>{
  142. this.dataList = res.data.data.records
  143. this.page.total = res.data.data.total
  144. this.loading = false;
  145. })
  146. },
  147. goBack() {
  148. this.detailData=this.$options.data().detailData
  149. this.show = true;
  150. }
  151. }
  152. }
  153. </script>
  154. <style scoped>
  155. </style>