index.vue 12 KB

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