actualReceipts.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <div class="content main">
  3. <zz-table
  4. :settings="{ stripe: true }"
  5. :cols="cols"
  6. :data="mixins_list"
  7. :pageset="mixins_pageset"
  8. @page-change="pageChange"
  9. @selection-change="selectionChange"
  10. >
  11. <template slot-scope="scope" slot="payBeginTime">
  12. {{ typeTimeTransition(scope.row.payBeginTime, scope.row.payEndTime) }}
  13. </template>
  14. <template slot-scope="scope" slot="opt">
  15. <div class="opt">
  16. <el-tooltip class="item" effect="light" placement="bottom" content="详情">
  17. <i class="zoniot_font zoniot-icon-xiangqing" @click="lookDetails(scope.row)"></i>
  18. </el-tooltip>
  19. <el-tooltip class="item" effect="light" placement="bottom" content="打印收据">
  20. <i class="zoniot_font zoniot-icon-xiangqing" @click="palys(scope.row.id)"></i>
  21. </el-tooltip>
  22. <el-tooltip v-if="scope.row.printStatus !== 0" class="item" effect="light" placement="bottom" content="收据作废">
  23. <i class="zoniot_font zoniot-icon-shanchu redText" @click="deluserbyidFn(scope.row.id)"></i>
  24. </el-tooltip>
  25. </div>
  26. </template>
  27. </zz-table>
  28. </div>
  29. </template>
  30. <script>
  31. import list from '@/utils/list.js';
  32. import { getLodop } from '@utils/LodopFuncs.js';
  33. export default {
  34. mixins: [list],
  35. data() {
  36. return {
  37. mixins_querys: {
  38. chargeType: ''
  39. },
  40. cols: [
  41. {
  42. label: '收据号',
  43. prop: 'receiptNumber'
  44. },
  45. {
  46. label: '地址',
  47. prop: 'assets'
  48. },
  49. {
  50. label: '业主',
  51. prop: 'clientName',
  52. width: '100'
  53. },
  54. {
  55. label: '费用名称',
  56. prop: 'chargeName',
  57. width: '200'
  58. },
  59. {
  60. label: '计费时间',
  61. prop: 'paymentDays'
  62. },
  63. {
  64. label: '应收金额(元)',
  65. prop: 'receivableAmount'
  66. },
  67. {
  68. label: '实收金额(元)',
  69. prop: 'receivedAmount'
  70. },
  71. {
  72. label: '付款方式',
  73. prop: 'payTypeDict'
  74. },
  75. {
  76. label: '缴费时间',
  77. prop: 'chargeDate'
  78. },
  79. {
  80. label: '打印状态',
  81. prop: 'printStatus',
  82. format(val) {
  83. if (val == 0) {
  84. return '<span class="redText">未打印</span>';
  85. } else if (val == 1) {
  86. return '<span class="greenText">已打印</span>';
  87. }
  88. }
  89. },
  90. {
  91. label: '备注',
  92. prop: 'remark'
  93. },
  94. {
  95. label: '操作',
  96. prop: 'id',
  97. slot: 'opt'
  98. }
  99. ],
  100. mixins_post: 'get'
  101. };
  102. },
  103. methods: {
  104. editAmount(row) {
  105. new Promise((resolve) => {
  106. this.$store.dispatch('addPopup', {
  107. url: '/payService/propertyFee/stepPage/editAmount.vue',
  108. width: '550px',
  109. height: '180px',
  110. props: {
  111. data: row,
  112. callback: resolve
  113. },
  114. title: '修改应收金额'
  115. });
  116. }).then(() => {
  117. this.mixins_search();
  118. });
  119. },
  120. effectiveDateToggle(va) {
  121. let arr = va;
  122. if (!arr) {
  123. arr = ['', ''];
  124. }
  125. this.mixins_query.startTime = arr[0];
  126. this.mixins_query.endTime = arr[1];
  127. },
  128. lookDetails(row) {
  129. new Promise((resolve) => {
  130. this.$store.dispatch('addPopup', {
  131. url: '/payService/propertyFee/stepPage/detailsTable.vue',
  132. width: '1000px',
  133. height: '581px',
  134. props: {
  135. id: row.id,
  136. callback: resolve
  137. },
  138. showConfirmButton: true,
  139. showCancelButton: true,
  140. hideStar: true,
  141. title: '缴费详情'
  142. });
  143. }).then(() => {
  144. this.mixins_search();
  145. });
  146. },
  147. selectionChange(val) {
  148. this.selectRow = val;
  149. },
  150. currentOrganId(data) {
  151. this.currentId = data || '';
  152. },
  153. typeTimeTransition(start, end) {
  154. let text = '';
  155. if (!!end) {
  156. let f = new Date(start).getMonth(),
  157. l = new Date(end).getMonth();
  158. if (f == l) {
  159. text = `${this.$moment(new Date(start)).format('YYYY年M月')}`;
  160. } else {
  161. text = `${this.$moment(new Date(start)).format('YYYY年M月')}-${this.$moment(new Date(end)).format('YYYY年M月')}`;
  162. }
  163. }
  164. return text;
  165. },
  166. getListData() {
  167. this.mixins_query.communityId = this.$parent.mixins_query.communityId;
  168. this.mixins_query.buildingId = this.$parent.mixins_query.buildingId;
  169. this.mixins_query.houseId = this.$parent.mixins_query.houseId;
  170. this.mixins_query.unitName = this.$parent.mixins_query.unitName;
  171. this.mixins_search();
  172. },
  173. palys(id) {
  174. this.$http.post('/sc-charge/charge/receipt/print?id=' + id).then(({ data, msg, status }) => {
  175. if (status == 0) {
  176. var LODOP; //声明为全局变量
  177. LODOP = getLodop();
  178. LODOP.PRINT_INIT('凤凰天誉专用收据');
  179. LODOP.ADD_PRINT_TABLE(30, 40, '90%', 200, data);
  180. //LODOP.SET_PRINT_STYLEA(0,"Top2Offset",-40); //这句可让次页起点向上移
  181. LODOP.SET_PRINT_PAGESIZE(1, 2410, 1000, '');
  182. //LODOP.SET_PRINT_STYLEA(0,"LinkedItem",-1);
  183. LODOP.PREVIEW();
  184. } else {
  185. this.$message.error(msg);
  186. }
  187. });
  188. }
  189. },
  190. created() {
  191. this.mixins_dataUrl = '/sc-charge/charge/receipt/page'; // 分页查询接口
  192. this.mixins_query = {};
  193. this.mixins_search();
  194. }
  195. };
  196. </script>
  197. <style lang='scss' scoped >
  198. @import '@assets/css/public-style.scss';
  199. .search {
  200. .zz-tab-button {
  201. margin-right: 20px;
  202. }
  203. .width120 {
  204. width: rem(120);
  205. }
  206. }
  207. </style>