index.vue 12 KB

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