list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. <template>
  2. <a-card size="small" :bordered="false" class="financialCollectionList-wrap">
  3. <a-spin :spinning="spinning" tip="Loading...">
  4. <!-- 标签页 -->
  5. <a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="financialCollectionList-tabs ">
  6. <a-tab-pane v-for="item in tabPaneData" :key="item.bizType" :id="'finacialColl-tabs-'+item.bizType">
  7. <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
  8. </a-tab-pane>
  9. </a-tabs>
  10. <!-- 搜索条件 -->
  11. <div ref="tableSearch" class="table-page-search-wrapper">
  12. <a-form layout="inline" @keyup.enter.native="searchForm">
  13. <a-row :gutter="15">
  14. <a-col :md="6" :sm="24">
  15. <a-form-item label="收款单号"><a-input id="financialCollectionList-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入收款单号" /></a-form-item>
  16. </a-col>
  17. <a-col :md="6" :sm="24">
  18. <a-form-item label="关联单号"><a-input id="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
  19. </a-col>
  20. <a-col :md="6" :sm="24">
  21. <a-form-item label="商户名称">
  22. <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientNameCurrent" allowClear placeholder="请输入商户名称" />
  23. </a-form-item>
  24. </a-col>
  25. <template v-if="advanced">
  26. <a-col :md="6" :sm="24">
  27. <a-form-item label="单据状态">
  28. <v-select
  29. v-model="queryParam.billState"
  30. ref="settleState"
  31. @change="setIsHomeNav($route.name, null)"
  32. id="financialCollectionList-billState"
  33. code="SETTLE_RECEIVE_STATUS"
  34. placeholder="请选择单据状态"
  35. allowClear
  36. ></v-select>
  37. </a-form-item>
  38. </a-col>
  39. <a-col :md="6" :sm="24">
  40. <a-form-item label="创建时间">
  41. <rangeDate id="financialCollectionList-createDate" ref="createDate" @change="createDateChange" />
  42. </a-form-item>
  43. </a-col>
  44. <a-col :md="6" :sm="24">
  45. <a-form-item label="审核时间">
  46. <rangeDate id="financialCollectionList-rangeDate" ref="rangeDate" @change="dateChange" />
  47. </a-form-item>
  48. </a-col>
  49. <a-col :md="6" :sm="24">
  50. <a-form-item label="收款时间">
  51. <rangeDate id="financialCollectionList-settleDate" ref="settleDate" @change="settleChange" />
  52. </a-form-item>
  53. </a-col>
  54. </template>
  55. <a-col :md="6" :sm="24">
  56. <span class="table-page-search-submitButtons">
  57. <a-button type="primary" @click="searchForm()" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
  58. <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="financialCollectionList-reset">重置</a-button>
  59. <a @click="advanced = !advanced" style="margin-left: 5px" id="financialCollectionList-advanced">
  60. {{ advanced ? '收起' : '展开' }}
  61. <a-icon :type="advanced ? 'up' : 'down'" />
  62. </a>
  63. </span>
  64. </a-col>
  65. </a-row>
  66. </a-form>
  67. </div>
  68. <!-- alert -->
  69. <a-alert type="info" style="margin-bottom:10px">
  70. <div slot="message">
  71. <strong>{{ totalData&&(totalData.count || totalData.count==0) ? totalData.count : '--' }}</strong>
  72. 条记录,应收金额合计
  73. <strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount) : '--' }}</strong>
  74. ,其中已收金额
  75. <strong>{{ totalData&&(totalData.settledAmount || totalData.settledAmount==0) ? toThousands(totalData.settledAmount) : '--' }}</strong>
  76. ,待收金额
  77. <strong>{{ totalData&&(totalData.unsettleAmount || totalData.unsettleAmount==0) ? toThousands(totalData.unsettleAmount) : '--' }}</strong>
  78. ,退款中金额
  79. <strong>{{ totalData&&(totalData.refundingAmount || totalData.refundingAmount==0) ? toThousands(totalData.refundingAmount) : '--' }}</strong>
  80. ,已退金额
  81. <strong>{{ totalData&&(totalData.refundedAmount || totalData.refundedAmount==0) ? toThousands(totalData.refundedAmount) : '--' }}</strong>
  82. <a-tooltip placement="bottom" title="实收金额=已收金额-退款中金额-已退金额">,<span style="color:#ED1c24;">实收金额</span><a-icon type="question-circle" style="margin:0 10px 0 5px;color:#ED1c24;"/></a-tooltip>
  83. <strong style="color:#ED1c24;" v-if="receivedPriceFlag">{{ '¥'+receivedPrice }}</strong>
  84. <span style="color:#ED1c24;" v-else>--</span>
  85. </div>
  86. </a-alert>
  87. <div v-if="$hasPermissions('B_financialCollectionPl')" style="margin-bottom: 10px">
  88. <a-button type="primary" id="financialCollectionList-export" :loading="loading" @click="enableFundAccount ? handleSettleAcountPay(null,1) : handleCollection()">批量收款</a-button>
  89. <span style="margin-left: 8px" v-if="$hasPermissions('B_financialCollectionPl')">
  90. <template v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
  91. <template v-if="selectTotalAmount">,合计{{ toThousands(selectTotalAmount) }}</template>
  92. </span>
  93. </div>
  94. <!-- 列表 -->
  95. <s-table
  96. class="sTable fixPagination"
  97. ref="table"
  98. :style="{ height: tableHeight+84.5+'px' }"
  99. size="small"
  100. :rowKey="record => record.id"
  101. :row-selection="$hasPermissions('B_financialCollectionPl') ? { columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: (record.settleState == 'SETTLED' ||record.billState=='REFUNDING' ||record.billState=='REFUNDED')} }) } : null"
  102. @rowSelection="rowSelectionFun"
  103. :columns="columns"
  104. :data="loadData"
  105. :scroll="{ y: tableHeight }"
  106. :defaultLoadData="false"
  107. bordered
  108. >
  109. <!-- 关联单号 -->
  110. <template slot="bizNo" slot-scope="text, record">
  111. <span class="table-td-link" :id="'financialCollectionList-detail-'+record.id" @click="handleDetail(record)">{{ record.bizNo }}</span>
  112. </template>
  113. <!-- 客户名称 -->
  114. <template slot="customerName" slot-scope="text, record">
  115. <span v-if="record.settleClientType&&record.settleClientType=='CUSTOMER'">{{ record.settleClientNameCurrent||'--' }}</span>
  116. <span v-else>{{ record.settleClientName||'--' }}</span>
  117. </template>
  118. <!-- 操作 -->
  119. <template slot="action" slot-scope="text, record">
  120. <a-button
  121. size="small"
  122. type="link"
  123. class="button-primary"
  124. v-if="record.settleState == 'SETTLED' && $hasPermissions('B_financialCollectionDetail')"
  125. @click="handleVoucher(record)"
  126. :id="'financialCollectionList-voucher-'+record.id"
  127. >凭证</a-button>
  128. <a-button
  129. size="small"
  130. type="link"
  131. :loading="loading"
  132. class="button-error"
  133. v-if="(record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED') && $hasPermissions('B_financialCollectionSing')"
  134. @click="enableFundAccount ? handleSettleAcountPay(record,0) : handleCollectionSing(record)"
  135. :id="'financialCollectionList-pay-'+record.id">收款</a-button>
  136. <span v-if="!(record.settleState == 'SETTLED' && $hasPermissions('B_financialCollectionDetail')) && !((record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED') && $hasPermissions('B_financialCollectionSing'))">--</span>
  137. </template>
  138. </s-table>
  139. </a-spin>
  140. <!-- 详情 -->
  141. <detail-modal :openModal="openModal" ref="detailModal" @close="openModal = false" />
  142. <!-- 关联单号详情 -->
  143. <a-modal
  144. centered
  145. class="outboundOrderDetail-modal"
  146. :footer="null"
  147. :maskClosable="false"
  148. :bodyStyle="{padding:'12px'}"
  149. :title="curBizTitle"
  150. v-model="openDetailModal"
  151. v-if="openDetailModal&&fcBizType!='SPARE_PARTS_RETURN'"
  152. @cancel="handleDetailClose"
  153. width="80%">
  154. <div style="max-height: 700px;overflow-y: auto;">
  155. <!-- 销售单 -->
  156. <salesDetailModal v-if="fcBizType=='SELL'" :outBizSn="orderSn" />
  157. <!-- 采购退货 -->
  158. <pushOrderDetailModal v-if="fcBizType=='PURCHASE_RETURN'&&!$hasPermissions('M_purchaseReturn_outSnycList')" :outBizSn="orderSn" />
  159. <pushOrderOutSyncDetailModal v-if="fcBizType=='PURCHASE_RETURN'&&$hasPermissions('M_purchaseReturn_outSnycList')" :outBizSn="orderSn"></pushOrderOutSyncDetailModal>
  160. <!-- 店内调出 -->
  161. <storeTransferOutDetailModal v-if="fcBizType=='STORE_CALL_OUT'" :outBizSn="orderSn"></storeTransferOutDetailModal>
  162. <!-- 连锁调出 -->
  163. <chainTransferOutDetailModal v-if="fcBizType=='LINKAGE_CALL_OUT'" :outBizSn="orderSn" />
  164. </div>
  165. </a-modal>
  166. <!-- 散件退货 -->
  167. <bulkReturnGoods-detail-modal :openModal="openBulkReturnDetailModal" :itemSn="orderSn" @close="handleDetailClose" />
  168. <!-- 收付款弹框 -->
  169. <settleModal ref="settleModal" @ok="settleAcountPay" :openModal="openSettleModal" @close="openSettleModal=false"></settleModal>
  170. </a-card>
  171. </template>
  172. <script>
  173. import { commonMixin } from '@/utils/mixin'
  174. import { mapActions } from 'vuex'
  175. import { STable, VSelect } from '@/components'
  176. import detailModal from './detailModal.vue'
  177. import settleModal from '../settleModal/settleModal.vue'
  178. import rangeDate from '@/views/common/rangeDate.vue'
  179. import salesDetailModal from '@/views/salesManagement/salesQuery/detail.vue'
  180. // 同步采购退货单详情
  181. import pushOrderDetailModal from '@/views/purchasingManagement/purchaseReturn/detail.vue'
  182. // 不同步采购退货单
  183. import pushOrderOutSyncDetailModal from '@/views/purchasingManagement/purchaseReturnOutSync/detail.vue'
  184. import chainTransferOutDetailModal from '@/views/allocationManagement/chainTransferOut/detail.vue'
  185. import storeTransferOutDetailModal from '@/views/allocationManagement/storeTransferOut/detail.vue'
  186. import bulkReturnGoodsDetailModal from '@/views/bulkManagement/bulkReturnGoods/detailModal.vue'
  187. import { settleReceiptQuery, queryByTypeSum, settleReceiptMoney, settleReceiptQuerySum } from '@/api/settleReceipt'
  188. export default {
  189. name: 'FinancialCollectionList',
  190. components: { STable, VSelect, detailModal, rangeDate, settleModal, pushOrderDetailModal, pushOrderOutSyncDetailModal, salesDetailModal, chainTransferOutDetailModal, bulkReturnGoodsDetailModal, storeTransferOutDetailModal },
  191. mixins: [commonMixin],
  192. data () {
  193. const _this = this
  194. return {
  195. spinning: false,
  196. advanced: true, // 高级搜索 展开/关闭
  197. disabled: false, // 查询、重置按钮是否可操作
  198. openModal: false, // 单据详情弹框
  199. openDetailModal: false, // 打开关联单号详情弹框
  200. openSettleModal: false, // 打开收款弹框
  201. openBulkReturnDetailModal: false, // 散件退货弹框
  202. enableFundAccount: false, // 是否开启资金账户管理
  203. tableHeight: 0, // 表格高度
  204. curBizType: 'ALL', // 单据类型,默认全部
  205. curBizTitle: '', // 关联单号详情弹框标题
  206. fcBizType: '', // 关联类型
  207. orderSn: null, // 单据sn
  208. // 查询参数
  209. queryParam: {
  210. bizType: 'ALL', // 单据类型
  211. settleNo: '', // 收款单号
  212. bizNo: '', // 关联单号
  213. settleClientNameCurrent: '', // 客户名称
  214. billState: '', // 单据状态
  215. auditBeginDate: '', // 审核开始时间
  216. auditEndDate: '', // 审核结束时间
  217. settleBeginDate: '', // 结算开始时间
  218. settleEndDate: ''// 结算结束时间
  219. },
  220. // 总计
  221. totalData: {
  222. settledAmount: 0, // 已收金额
  223. totalAmount: 0, // 应收金额
  224. unsettleAmount: 0, // 待收金额
  225. count: 0// 总数量
  226. },
  227. // 表头
  228. columns: [
  229. { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
  230. { title: '收款单号', dataIndex: 'settleNo', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
  231. { title: '关联单号', dataIndex: 'bizNo', scopedSlots: { customRender: 'bizNo' }, width: '16%', align: 'center' },
  232. { title: '商户名称', width: '15%', align: 'center', scopedSlots: { customRender: 'customerName' } },
  233. { title: '应收金额', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
  234. { title: '已收金额', dataIndex: 'settledAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
  235. { title: '待收金额', dataIndex: 'unsettleAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
  236. { title: '收款类型', dataIndex: 'bizName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
  237. { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
  238. { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
  239. { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
  240. { title: '收款时间', dataIndex: 'settleTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
  241. { title: '退款时间', dataIndex: 'refundData', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
  242. { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' }
  243. ],
  244. loading: false,
  245. // 加载数据方法 必须为 Promise 对象
  246. loadData: parameter => {
  247. this.disabled = true
  248. this.spinning = true
  249. return settleReceiptQuery(Object.assign(parameter, this.queryParam)).then(res => {
  250. let data
  251. if (res.status == 200) {
  252. data = res.data
  253. const no = (data.pageNo - 1) * data.pageSize
  254. for (var i = 0; i < data.list.length; i++) {
  255. data.list[i].no = no + i + 1
  256. }
  257. this.disabled = false
  258. this.totalData.count = data.count || 0
  259. // 查询总计
  260. this.settleReceiptQuerySum(Object.assign(parameter, this.queryParam))
  261. }
  262. this.spinning = false
  263. return data
  264. })
  265. },
  266. tabPaneData: [], // tab列表
  267. rowSelectionInfo: null// 已选数据
  268. }
  269. },
  270. computed: {
  271. // 已选总金额
  272. selectTotalAmount () {
  273. let ret = 0
  274. if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRows) {
  275. this.rowSelectionInfo.selectedRows.map(item => {
  276. ret = ret + item.unsettleAmount
  277. })
  278. }
  279. return ret ? Number(ret).toFixed(2) : 0
  280. },
  281. // 实收金额判断
  282. receivedPriceFlag () {
  283. const isShow = this.totalData && (this.totalData.settledAmount || this.totalData.settledAmount == 0) && (this.totalData.refundingAmount || this.totalData.refundingAmount == 0) && (this.totalData.refundedAmount || this.totalData.refundedAmount == 0)
  284. return isShow
  285. },
  286. // 实收金额
  287. receivedPrice () {
  288. const numInfo = this.totalData.settledAmount - this.totalData.refundingAmount - this.totalData.refundedAmount
  289. return numInfo.toFixed(2)
  290. }
  291. },
  292. methods: {
  293. ...mapActions(['GetSettleAccountState']),
  294. // 关联单详情弹框关闭
  295. handleDetailClose () {
  296. this.openDetailModal = false
  297. this.openBulkReturnDetailModal = false
  298. this.orderSn = null
  299. },
  300. // 查看关联单详情
  301. handleDetail (row) {
  302. this.orderSn = row.bizSn
  303. this.fcBizType = row.bizType
  304. this.curBizTitle = row.bizTypeDictValue + '详情'
  305. if (row.bizType == 'SPARE_PARTS_RETURN') {
  306. this.openBulkReturnDetailModal = true
  307. } else {
  308. this.openDetailModal = true
  309. }
  310. },
  311. // 表格选中项
  312. rowSelectionFun (obj) {
  313. this.rowSelectionInfo = obj || null
  314. },
  315. // 审核时间 change
  316. dateChange (date) {
  317. this.queryParam.auditBeginDate = date[0]
  318. this.queryParam.auditEndDate = date[1]
  319. },
  320. // 创建时间
  321. createDateChange (date) {
  322. this.queryParam.beginDate = date[0]
  323. this.queryParam.endDate = date[1]
  324. },
  325. // 结算时间
  326. settleChange (date) {
  327. this.queryParam.settleBeginDate = date[0]
  328. this.queryParam.settleEndDate = date[1]
  329. },
  330. // 总计数据
  331. settleReceiptQuerySum (params) {
  332. settleReceiptQuerySum(params).then(res => {
  333. if (res.status == 200) {
  334. this.totalData = Object.assign(this.totalData, res.data)
  335. const tab = this.tabPaneData.find(item => item.bizType == this.queryParam.bizType)
  336. tab.countNum = this.totalData.count || 0
  337. }
  338. })
  339. },
  340. // 获取类型
  341. queryByTypeSum () {
  342. queryByTypeSum({}).then(res => {
  343. if (res.data && res.status == 200) {
  344. this.tabPaneData = res.data
  345. if (this.curBizType == 'ALL') {
  346. this.queryParam.bizType = res.data[0].bizType
  347. }
  348. this.$refs.table.refresh(true)
  349. }
  350. })
  351. },
  352. // 凭证弹框
  353. handleVoucher (row) {
  354. this.$refs.detailModal.getDetail(row.id)
  355. this.openModal = true
  356. },
  357. // 开启结算账户功能收款, type:0 单条收款,1 批量收款
  358. handleSettleAcountPay (row, type) {
  359. this.openSettleModal = true
  360. const data = {
  361. totalAmount: type ? this.selectTotalAmount : row && row.unsettleAmount || 0,
  362. settleClientNameCurrent: type ? '' : row && row.settleClientNameCurrent || '',
  363. title: '收款',
  364. type,
  365. row
  366. }
  367. this.$nextTick(() => {
  368. this.$refs.settleModal.setData(data)
  369. })
  370. },
  371. // 去收款
  372. settleAcountPay (form, data) {
  373. const _this = this
  374. const params =
  375. {
  376. 'settleIds': data.type ? _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys : [data.row.id]
  377. }
  378. // 资金管理开启
  379. if (this.enableFundAccount) {
  380. params.settleStyleSn = form.settleStyleSn
  381. params.settleAccountSn = form.settleAccountSn
  382. }
  383. _this.loading = true
  384. _this.spinning = true
  385. settleReceiptMoney(params).then(res => {
  386. _this.loading = false
  387. if (res.status == 200) {
  388. _this.$message.success(res.message)
  389. _this.$refs.table.refresh()
  390. _this.$refs.table.clearSelected() // 清空表格选中项
  391. _this.spinning = false
  392. } else {
  393. _this.spinning = false
  394. }
  395. })
  396. },
  397. // 收款
  398. handleCollectionSing (row) {
  399. const _this = this
  400. this.$confirm({
  401. title: '提示',
  402. content: <div style="text-align:center"><p style="margin-top:20px;">{row.settleClientNameCurrent}</p><p>收款单号:{row.settleNo},合计{ this.toThousands(row.unsettleAmount) }</p><p>确认收款吗?</p></div>,
  403. centered: true,
  404. closable: true,
  405. class: 'confirm-center',
  406. onOk () {
  407. _this.settleAcountPay(null, { type: 0, row: row })
  408. }
  409. })
  410. },
  411. // 选择类型
  412. handleTabChange (key) {
  413. this.queryParam.bizType = key
  414. this.$refs.table.refresh(true)
  415. this.curBizType = key
  416. },
  417. // 批量收款
  418. handleCollection () {
  419. if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
  420. this.$message.warning('请在列表勾选后再进行批量操作!')
  421. return
  422. }
  423. const _this = this
  424. this.$confirm({
  425. title: '提示',
  426. content: <div style="text-align:center"><p style="margin-top:20px;">共计{this.rowSelectionInfo.selectedRowKeys.length}单,合计金额{ this.toThousands(this.selectTotalAmount) } </p><p>确认批量收款吗?</p></div>,
  427. centered: true,
  428. closable: true,
  429. class: 'confirm-center',
  430. onOk () {
  431. _this.settleAcountPay(null, { type: 1, row: null })
  432. }
  433. })
  434. },
  435. // 重置
  436. resetSearchForm () {
  437. this.resetData()
  438. this.$refs.table.refresh(true)
  439. },
  440. // 查询
  441. searchForm () {
  442. this.$refs.table.clearSelected() // 清空表格选中项
  443. this.$refs.table.refresh(true)
  444. },
  445. // 重置查询条件数据
  446. resetData () {
  447. if (this.advanced) {
  448. this.$refs.rangeDate.resetDate()
  449. this.$refs.createDate.resetDate()
  450. this.$refs.settleDate.resetDate()
  451. }
  452. this.$refs.table.clearSelected() // 清空表格选中项
  453. this.queryParam = {
  454. bizType: this.curBizType,
  455. settleNo: '',
  456. bizNo: '',
  457. settleClientNameCurrent: '',
  458. billState: '',
  459. beginDate: '',
  460. endDate: '',
  461. auditBeginDate: '',
  462. auditEndDate: '',
  463. settleBeginDate: '',
  464. settleEndDate: ''
  465. }
  466. },
  467. // 初始化页面
  468. pageInit () {
  469. const _this = this
  470. this.$nextTick(() => { // 页面渲染完成后的回调
  471. _this.setTableH()
  472. })
  473. this.queryByTypeSum()
  474. },
  475. // 表格高度计算
  476. setTableH () {
  477. const tableSearchH = this.$refs.tableSearch.offsetHeight
  478. this.tableHeight = window.innerHeight - tableSearchH - 330
  479. }
  480. },
  481. watch: {
  482. advanced (newValue, oldValue) {
  483. const _this = this
  484. this.$nextTick(() => { // 页面渲染完成后的回调
  485. _this.setTableH()
  486. })
  487. },
  488. '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
  489. this.setTableH()
  490. }
  491. },
  492. mounted () {
  493. if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
  494. this.resetData()
  495. this.pageInit()
  496. }
  497. },
  498. activated () {
  499. // 是否从首页点击进入
  500. const isHomeNav = this.getIsHomeNav()[this.$route.name]
  501. // 待办查询
  502. if (isHomeNav && isHomeNav.type == 'todo') {
  503. this.resetData()
  504. this.curBizType = isHomeNav.pageParams.bizType
  505. this.$refs.createDate.resetDate([isHomeNav.pageParams.beginDate, isHomeNav.pageParams.endDate])
  506. this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
  507. this.pageInit()
  508. } else {
  509. // 如果是新页签打开,则重置当前页面
  510. if (this.$store.state.app.isNewTab) {
  511. this.curBizType = 'ALL'
  512. this.resetData()
  513. this.pageInit()
  514. }
  515. }
  516. // 结算账户状态查询
  517. if (this.$hasPermissions('M_fundAccountList') && this.$hasPermissions('B_fundAccountEnable')) {
  518. this.GetSettleAccountState().then(res => {
  519. if (res.status == 200) {
  520. this.enableFundAccount = res.data.functionEnableFlag == 1
  521. }
  522. })
  523. }
  524. },
  525. beforeRouteEnter (to, from, next) {
  526. next(vm => {})
  527. }
  528. }
  529. </script>
  530. <style lang="less">
  531. .financialCollectionList-wrap{
  532. .financialCollectionList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
  533. height: 30px!important;
  534. }
  535. .financialCollectionList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
  536. height: 30px!important;
  537. }
  538. .financialCollectionList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
  539. line-height: 26px!important;
  540. height: 30px!important;
  541. }
  542. }
  543. </style>