|
@@ -1,8 +1,229 @@
|
|
<template>
|
|
<template>
|
|
|
|
+ <div>
|
|
|
|
+ <a-card size="small" :bordered="false" class="searchBoxNormal">
|
|
|
|
+ <!-- 搜索条件 -->
|
|
|
|
+ <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
+ <a-row :gutter="15">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="创建时间">
|
|
|
|
+ <rangeDate id="manualEntryForm-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="业务单号">
|
|
|
|
+ <a-input id="manualEntryForm-dealerName" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入业务单号"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="客户名称">
|
|
|
|
+ <a-input id="accountStatement-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客户名称"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
|
+ <a-form-item label="借贷类型">
|
|
|
|
+ <v-select
|
|
|
|
+ v-model="queryParam.status"
|
|
|
|
+ ref="status"
|
|
|
|
+ id="conFrontModal-status"
|
|
|
|
+ code="FINANCE_BOOK_STATE"
|
|
|
|
+ placeholder="请选择借贷类型"
|
|
|
|
+ allowClear></v-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
|
+ <a-form-item label="状态">
|
|
|
|
+ <v-select
|
|
|
|
+ v-model="queryParam.status"
|
|
|
|
+ ref="status"
|
|
|
|
+ id="conFrontModal-status"
|
|
|
|
+ code="FINANCE_BOOK_STATE"
|
|
|
|
+ placeholder="请选择状态"
|
|
|
|
+ allowClear></v-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="manualEntryForm-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="manualEntryForm-reset">重置</a-button>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-form>
|
|
|
|
+ </div>
|
|
|
|
+ </a-card>
|
|
|
|
+ <a-card size="small" :bordered="false" class="manualEntryForm-wrap">
|
|
|
|
+ <!-- 操作按钮 -->
|
|
|
|
+ <div class="table-operator">
|
|
|
|
+ <div class="flex-center">
|
|
|
|
+ <a-button type="primary" v-if="$hasPermissions('B_fc_new')" @click="handleAdd">调账</a-button>
|
|
|
|
+ <div class="tongji-bar"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div></div>
|
|
|
|
+ </div>
|
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <s-table
|
|
|
|
+ class="sTable fixPagination"
|
|
|
|
+ ref="table"
|
|
|
|
+ :style="{ height: tableHeight+80+'px' }"
|
|
|
|
+ size="small"
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ :scroll="{ y: tableHeight }"
|
|
|
|
+ :pageSize="30"
|
|
|
|
+ :defaultLoadData="false"
|
|
|
|
+ bordered>
|
|
|
|
+ <template slot="actions" slot-scope="text, record">
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ class="button-info"
|
|
|
|
+ >
|
|
|
|
+ 审核状态
|
|
|
|
+ </a-button>
|
|
|
|
+ </template>
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-spin>
|
|
|
|
+ </a-card>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { commonMixin } from '@/utils/mixin'
|
|
|
|
+import { STable, VSelect } from '@/components'
|
|
|
|
+import { financeBookQueryPage } from '@/api/financeBook.js'
|
|
|
|
+import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
|
+export default {
|
|
|
|
+ name: 'AccountStatementBillList',
|
|
|
|
+ mixins: [commonMixin],
|
|
|
|
+ components: { STable, VSelect, rangeDate },
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ spinning: false,
|
|
|
|
+ exportLoading: false,
|
|
|
|
+ tableHeight: 0,
|
|
|
|
+ queryParam: { // 查询条件
|
|
|
|
+ beginDate: '',
|
|
|
|
+ endDate: '',
|
|
|
|
+ bookNo: '',
|
|
|
|
+ dealerName: '',
|
|
|
|
+ status: undefined
|
|
|
|
+ },
|
|
|
|
+ creatDate: [], // 创建时间
|
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
|
+ advanced: true,
|
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
|
+ loadData: parameter => {
|
|
|
|
+ this.disabled = true
|
|
|
|
+ this.spinning = true
|
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
|
+ return financeBookQueryPage(params).then(res => {
|
|
|
|
+ let data
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ data = res.data
|
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
|
+ }
|
|
|
|
+ this.total = data.count || 0
|
|
|
|
+ this.disabled = false
|
|
|
|
+ }
|
|
|
|
+ this.spinning = false
|
|
|
|
+ return data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ total: 0 // 合计
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 根据权限显示列表字段
|
|
|
|
+ computed: {
|
|
|
|
+ columns () {
|
|
|
|
+ const arr = [
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '业务单号', dataIndex: 'payerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '客户名称', dataIndex: 'payerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '借方', dataIndex: 'productCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? this.toThousands(text, 2) : '--') } },
|
|
|
|
+ { title: '贷方', dataIndex: 'productCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? this.toThousands(text, 2) : '--') } },
|
|
|
|
+ { title: '备注', dataIndex: 'remarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '审核时间', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '状态', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'actions' }, width: '8%', align: 'center' }
|
|
|
|
+ ]
|
|
|
|
+ return arr
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ // 重置
|
|
|
|
+ resetSearchForm () {
|
|
|
|
+ this.queryParam.beginDate = ''
|
|
|
|
+ this.queryParam.endDate = ''
|
|
|
|
+ this.queryParam.nameLike = ''
|
|
|
|
+ this.queryParam.dealerType1 = undefined
|
|
|
|
+ this.queryParam.dealerType2 = undefined
|
|
|
|
+ this.queryParam.dealerLevel = undefined
|
|
|
|
+ this.queryParam.subareaAreaSn = undefined
|
|
|
|
+ this.queryParam.subareaSn = undefined
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ },
|
|
|
|
+ // 调账
|
|
|
|
+ handleAdd () {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ pageInit () {
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
|
+ _this.setTableH()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ setTableH () {
|
|
|
|
+ const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 250
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ advanced (newValue, oldValue) {
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
|
+ _this.setTableH()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
|
+ this.setTableH()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mounted () {
|
|
|
|
+ if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
|
+ this.pageInit()
|
|
|
|
+ this.resetSearchForm()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ activated () {
|
|
|
|
+ // 如果是新页签打开,则重置当前页面
|
|
|
|
+ if (this.$store.state.app.isNewTab) {
|
|
|
|
+ this.pageInit()
|
|
|
|
+ this.resetSearchForm()
|
|
|
|
+ }
|
|
|
|
+ // 仅刷新列表,不重置页面
|
|
|
|
+ if (this.$store.state.app.updateList) {
|
|
|
|
+ this.pageInit()
|
|
|
|
+ this.$refs.table.refresh()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
|
+ next(vm => {})
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
|
-</style>
|
|
|
|
|
|
+<style lang="less">
|
|
|
|
+ .manualEntryForm-wrap{
|
|
|
|
+ .active{
|
|
|
|
+ color: #ed1c24;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+ .common{
|
|
|
|
+ color: rgba(0, 0, 0);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|