index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <template>
  2. <div class="content main">
  3. <organ-tree @organId="currentOrganId"></organ-tree>
  4. <div class="content-right">
  5. <div class="search">
  6. <el-radio-group v-model="chargeStatus" @change="changeRadio" class="zz-tab-button">
  7. <el-radio-button label="1">未交账单</el-radio-button>
  8. <el-radio-button label="2">已交账单</el-radio-button>
  9. </el-radio-group>
  10. <el-input
  11. clearable
  12. placeholder="输入费用名称"
  13. class="search-input"
  14. v-trim
  15. v-model.trim="mixins_query.chargeName"
  16. ></el-input>
  17. <el-button
  18. class="search-btn"
  19. type="primary"
  20. @click="mixins_search()"
  21. :disabled="mixins_onQuery"
  22. :loading="mixins_onQuery"
  23. icon="el-icon-search"
  24. >搜索</el-button
  25. >
  26. <div class="search-icon">
  27. <el-tooltip
  28. v-show="chargeStatus == 1 && chiData.type === 'room'"
  29. class="item"
  30. effect="light"
  31. placement="bottom"
  32. content="临时收款"
  33. >
  34. <i class="zoniot_font zoniot-icon-linshishoukuan" @click="collections('temporary')"></i>
  35. </el-tooltip>
  36. <el-tooltip v-show="chargeStatus == 1" class="item" effect="light" placement="bottom" content="批量收款">
  37. <i class="zoniot_font zoniot-icon-piliangshoukuan" @click="collections('bulk')"></i>
  38. </el-tooltip>
  39. <el-tooltip class="item" effect="light" placement="bottom" content="导出">
  40. <i class="zoniot_font zoniot-icon-daochu2" @click="exportExcel"></i>
  41. </el-tooltip>
  42. </div>
  43. </div>
  44. <zz-table
  45. v-if="statusTable"
  46. :settings="{ showCheckbox: chargeStatus == 1, showIndex: chargeStatus == 2, stripe: true }"
  47. :cols="cols"
  48. :loading="mixins_onQuery"
  49. :data="mixins_list"
  50. :pageset="mixins_pageset"
  51. @page-change="pageChange"
  52. @selection-change="selectionChange"
  53. >
  54. <template slot-scope="scope" slot="opt">
  55. <div class="opt">
  56. <el-tooltip v-show="chargeStatus == 1" class="item" effect="light" placement="bottom" content="收款">
  57. <i class="zoniot_font zoniot-icon-shoukuan" @click="collections('single', scope.row)"></i>
  58. </el-tooltip>
  59. <el-tooltip v-show="chargeStatus == 2" class="item" effect="light" placement="bottom" content="详情">
  60. <i class="zoniot_font zoniot-icon-xiangqing" @click="lookDetails(scope.row)"></i>
  61. </el-tooltip>
  62. <!-- <el-tooltip v-show="chargeStatus == 2" class="item" effect="light" placement="bottom" content="打印">
  63. <i class="zoniot_font zoniot-icon-dayin" @click="deleteRow(scope.row)"></i>
  64. </el-tooltip> -->
  65. </div>
  66. </template>
  67. </zz-table>
  68. </div>
  69. </div>
  70. </template>
  71. <script>
  72. import list from '@/utils/list.js';
  73. export default {
  74. mixins: [list],
  75. data() {
  76. return {
  77. currentId: '',
  78. cols: [
  79. {
  80. label: '订单号',
  81. prop: 'billNumber'
  82. },
  83. {
  84. label: '住户',
  85. prop: 'residentName'
  86. },
  87. {
  88. label: '费用名称',
  89. prop: 'chargeType',
  90. format(val) {
  91. if (val == '1') {
  92. return '物业费';
  93. } else if (val == '2') {
  94. return '水费';
  95. } else if (val == '3') {
  96. return '电费';
  97. } else if (val == '4') {
  98. return '车位费';
  99. } else if (val == '5') {
  100. return '二次供水费';
  101. }
  102. }
  103. },
  104. {
  105. label: '账期',
  106. prop: 'paymentDays'
  107. },
  108. {
  109. label: '费用金额(元)',
  110. prop: 'amount'
  111. },
  112. {
  113. label: '滞纳金(元)',
  114. prop: 'lateFee'
  115. },
  116. {
  117. label: '应收金额(元)',
  118. prop: 'receivableAmount'
  119. },
  120. {
  121. label: '缴费状态',
  122. prop: 'chargeStatus',
  123. format(val) {
  124. if (val == '1') {
  125. return '未缴费';
  126. } else if (val == '2') {
  127. return '已缴费';
  128. }
  129. }
  130. },
  131. {
  132. label: '操作',
  133. prop: 'id',
  134. slot: 'opt'
  135. }
  136. ],
  137. chargeStatus: 1,
  138. chiData: {
  139. type: '',
  140. value: '',
  141. address: ''
  142. },
  143. mixins_post: 'post',
  144. selectRow: [],
  145. statusTable: true
  146. };
  147. },
  148. methods: {
  149. collections(todo, row) {
  150. new Promise((resolve) => {
  151. let title = '',
  152. hideStar,
  153. height = '230px',
  154. width = '900px';
  155. if (todo == 'temporary') {
  156. title = '设置收费项目';
  157. hideStar = false;
  158. height = '230px';
  159. width = '550px';
  160. } else if (todo == 'bulk') {
  161. if (!this.selectRow.length) {
  162. this.$message.error('您尚未选择要收款项,请选择后再操作批量');
  163. return;
  164. }
  165. title = '批量收款';
  166. hideStar = true;
  167. height = '528px';
  168. width = '900px';
  169. } else if (todo == 'single') {
  170. title = '收款';
  171. hideStar = true;
  172. height = '614px';
  173. width = '614px';
  174. }
  175. this.$store.dispatch('addPopup', {
  176. url: '/payService/propertyFee/stepPage/' + todo + '.vue',
  177. // url: '/payService/propertyFee/stepPage/single.vue',
  178. width: width,
  179. height: height,
  180. props: {
  181. data: row,
  182. selectRow: this.selectRow,
  183. chiData: this.chiData,
  184. tabList: todo,
  185. callback: resolve
  186. },
  187. hideStar: hideStar,
  188. title: title
  189. });
  190. }).then(() => {
  191. this.mixins_search();
  192. });
  193. },
  194. lookDetails(row) {
  195. new Promise((resolve) => {
  196. this.$store.dispatch('addPopup', {
  197. url: '/payService/propertyFee/stepPage/details.vue',
  198. width: '615px',
  199. height: '581px',
  200. props: {
  201. id: row.id,
  202. callback: resolve
  203. },
  204. showConfirmButton: true,
  205. showCancelButton: true,
  206. hideStar: true,
  207. title: '账单详情'
  208. });
  209. }).then(() => {
  210. this.mixins_search();
  211. });
  212. },
  213. selectionChange(val) {
  214. this.selectRow = val;
  215. },
  216. currentOrganId(data) {
  217. this.currentId = data || '';
  218. },
  219. changeRadio() {
  220. this.statusTable = false;
  221. this.$nextTick(() => {
  222. this.statusTable = true;
  223. });
  224. this.mixins_query.chargeStatus = this.chargeStatus;
  225. this.mixins_search();
  226. },
  227. exportExcel() {
  228. this.__exportExcel('/sc-charge/charge/report/export/excel', this.mixins_query);
  229. }
  230. },
  231. watch: {
  232. currentId(newValue, oldValue) {
  233. this.mixins_query.communityId = '';
  234. this.mixins_query.buildingId = '';
  235. this.mixins_query.unitName = '';
  236. this.mixins_query.houseId = '';
  237. if (newValue.type) {
  238. this.chiData.type = newValue.type;
  239. if (newValue.type === 'community') {
  240. this.mixins_query.communityId = newValue.value;
  241. this.chiData.value = newValue.value;
  242. this.chiData.address = newValue.name;
  243. } else if (newValue.type === 'building') {
  244. this.mixins_query.communityId = newValue.communityId;
  245. this.mixins_query.buildingId = newValue.buildingId;
  246. this.chiData.value = newValue.buildingId;
  247. this.chiData.address = newValue.name;
  248. } else if (newValue.type === 'unit') {
  249. this.mixins_query.communityId = newValue.communityId;
  250. this.mixins_query.buildingId = newValue.buildingId;
  251. this.mixins_query.unitName = newValue.unitId;
  252. this.chiData.value = newValue.unitId;
  253. this.chiData.address = newValue.name;
  254. } else if (newValue.type === 'room') {
  255. this.mixins_query.communityId = newValue.communityId;
  256. this.mixins_query.buildingId = newValue.buildingId;
  257. this.mixins_query.unitName = newValue.unitId;
  258. this.mixins_query.houseId = newValue.roomId;
  259. this.chiData.value = newValue.roomId;
  260. this.chiData.address = newValue.name;
  261. }
  262. }
  263. this.mixins_search();
  264. }
  265. },
  266. created() {
  267. this.mixins_dataUrl = '/sc-charge/charge/bill/page'; // 分页查询接口
  268. this.mixins_query = {
  269. chargeStatus: this.chargeStatus
  270. };
  271. }
  272. };
  273. </script>
  274. <style lang='scss' scoped >
  275. @import '@assets/css/public-style.scss';
  276. .search {
  277. .zz-tab-button {
  278. margin-right: 20px;
  279. }
  280. }
  281. </style>