123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854 |
- <template>
- <div class="app-container">
- <!-- <div class="title-container">
- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
- </div> -->
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="未认领的实收款" name="notClaim">
- <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList"
- :pageSizes="pageSizes">
- <template slot="left">
- <PermissionButton menu-code="_views_finance_real_fund_create" class-name="filter-item" type="success"
- icon="el-icon-circle-plus-outline" :page-jump="false" round style="float: left"
- @click="createdRealFundDialog = true" />
- <el-input v-model="listQuery.keyword" placeholder="关键字搜索..." clearable
- style="margin-left: 20px;width: 300px;float: left;">
- </el-input>
- <el-date-picker style="margin-left: 20px;float: left;" v-model="payDate" type="daterange" align="center"
- unlink-panels range-separator="至" start-placeholder="到账时日(开始)" end-placeholder="到账时日(结束)"
- :picker-options="pickerOptions" value-format="yyyy-MM-dd">
- </el-date-picker>
- <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList"
- v-loading.fullscreen.lock="loading" round>搜索
- </el-button>
- <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置
- </el-button>
- <el-button class="filter-item" style="margin-left: 10px;float: left;" type="info" @click="exportData()"
- round>导出
- </el-button>
- </template>
- <el-table ref="table" size="medium" slot="table" :data="pageData.records" show-summary border
- :summary-method="getSummaries" fit stripe highlight-current-row :header-row-style="{ color: '#333333' }"
- style="
- border-left: 1px solid #ebeced;
- border-right: 1px solid #ebeced;
- color: #333333;">
- <el-table-column label="付款方" align="center" width='250'>
- <template slot-scope="{row}">
- <span>{{ row.payer }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column label="付款银行" align="center" width='100' >
- <template slot-scope="{row}">
- <span>{{ row.payerBank?row.payerBank:'-' }}</span>
- </template>
- </el-table-column> -->
- <el-table-column label="付款金额(元)" align="center" prop="amount">
- <template slot-scope="{row}">
- <span>{{ row.amount }}</span>
- </template>
- </el-table-column>
- <el-table-column label="到账时日" align="center">
- <template slot-scope="{row}">
- <span>{{ row.payDatetime }}</span>
- </template>
- </el-table-column>
- <el-table-column label="已认领(元)" align="center" prop="claimAmount">
- <template slot-scope="{row}">
- <span style="color:green">{{ row.claimAmount }}</span>
- </template>
- </el-table-column>
- <el-table-column label="未认领(元)" align="center" prop="notClaimAmount">
- <template slot-scope="{row}">
- <span style="color:red">{{ row.notClaimAmount }}</span>
- </template>
- </el-table-column>
- <el-table-column label="录入人" align="center">
- <template slot-scope="{row}">
- <span>{{ row.creator }}</span>
- </template>
- </el-table-column>
- <el-table-column label="录入时间" align="center" width='170'>
- <template slot-scope="{row}">
- <span>{{ row.created }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column label="全部认领" align="center" >
- <template slot-scope="{row}">
- <i v-if="row.notClaimAmount<=0" style="font-size:20px; color:green" class="el-icon-success"></i>
- <i v-else style="font-size:20px; color:RGB(255,106,106)" class="el-icon-warning"></i>
- </template>
- </el-table-column> -->
- <el-table-column label="备注" align="center" width='170'>
- <template slot-scope="{row}">
- <span>{{ row.remark }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="150">
- <template slot-scope="{row}">
- <PermissionButton menu-code="_views_real_fund_edit" class-name="filter-item" type="text"
- :page-jump="false" @click="detail(row.id)" />
- <PermissionButton menu-code="_views_real_fund_remove" class-name="filter-item" type="text"
- :page-jump="false" @click="remove(row.id)" />
- </template>
- </el-table-column>
- </el-table>
- </y-page-list-layout>
- </el-tab-pane>
- <el-tab-pane label="已认领的实收款" name="realClaimed">
- <y-page-list-layout :page-list="pageData2" :page-para="listQuery2" :get-page-list="getList2"
- :pageSizes="pageSizes">
- <template slot="left">
- <el-input v-model="listQuery2.keyword" placeholder="付款方、认领人、到账金额、认领金额、备注" clearable
- style="margin-left: 20px;width: 300px;float: left;">
- </el-input>
- <el-date-picker style="margin-left: 20px;float: left;" v-model="payDate2" type="daterange" align="center"
- unlink-panels range-separator="至" start-placeholder="到账时日(开始)" end-placeholder="到账时日(结束)"
- :picker-options="pickerOptions" value-format="yyyy-MM-dd">
- </el-date-picker>
- <el-date-picker style="margin-left: 20px;float: left;" v-model="claimDate2" type="daterange" align="center"
- unlink-panels range-separator="至" start-placeholder="认领时日(开始)" end-placeholder="认领时日(结束)"
- :picker-options="pickerOptions" value-format="yyyy-MM-dd">
- </el-date-picker>
- <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList2"
- v-loading.fullscreen.lock="loading" round>搜索
- </el-button>
- <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch2()">重置
- </el-button>
- <el-button class="filter-item" style="margin-left: 10px;float: left;" type="info" @click="exportData2()"
- round>导出
- </el-button>
- </template>
- <el-table ref="table" size="medium" slot="table" :data="pageData2.records" show-summary border
- :summary-method="getSummaries" fit stripe highlight-current-row :header-row-style="{ color: '#333333' }"
- style="
- border-left: 1px solid #ebeced;
- border-right: 1px solid #ebeced;
- color: #333333;">
- <el-table-column label="付款方" align="center" width='250'>
- <template slot-scope="{row}">
- <span>{{ row.payer }}</span>
- </template>
- </el-table-column>
- <el-table-column label="到账时日" align="center">
- <template slot-scope="{row}">
- <span>{{ row.payDatetime }}</span>
- </template>
- </el-table-column>
- <el-table-column label="付款金额(元)" align="center" prop="amount">
- <template slot-scope="{row}">
- <span>{{ row.amount }}</span>
- </template>
- </el-table-column>
- <el-table-column label="已认领(元)" align="center" prop="claimAmount">
- <template slot-scope="{row}">
- <span style="color:green">{{ row.claimAmount }}</span>
- </template>
- </el-table-column>
- <el-table-column label="未认领(元)" align="center" prop="notClaimAmount">
- <template slot-scope="{row}">
- <span style="color:red">{{ row.amount-row.claimAmount }}</span>
- </template>
- </el-table-column>
- <el-table-column label="认领人" align="center" prop="claimUser">
- <template slot-scope="{row}">
- <span>{{ row.claimUser }}</span>
- </template>
- </el-table-column>
- <el-table-column label="认领时间" align="center" width='170' prop="claimDate">
- <template slot-scope="{row}">
- <span>{{ row.claimDate }}</span>
- </template>
- </el-table-column>
- <el-table-column label="录入人" align="center">
- <template slot-scope="{row}">
- <span>{{ row.creator }}</span>
- </template>
- </el-table-column>
- <el-table-column label="到账时间" align="center" width='170'>
- <template slot-scope="{row}">
- <span>{{ row.payDatetime }}</span>
- </template>
- </el-table-column>
- <el-table-column label="备注" align="center" width='170'>
- <template slot-scope="{row}">
- <span>{{ row.remark }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="150">
- <template slot-scope="{row}">
- <PermissionButton menu-code="_views_real_fund_edit" class-name="filter-item" type="text"
- :page-jump="false" @click="detail(row.id)" />
- <PermissionButton menu-code="_views_claim_list" class-name="filter-item" type="text"
- :page-jump="false" @click="clamiList(row.id,row.payer,row.amount)" />
- </template>
- </el-table-column>
- </el-table>
- </y-page-list-layout>
- </el-tab-pane>
- <el-tab-pane label="认领记录流水" name="claimed">
- <y-page-list-layout :page-list="pageData1" :page-para="listQuery1" :get-page-list="getList1"
- :pageSizes="pageSizes">
- <template slot="left">
- <el-input v-model="listQuery1.keyword" placeholder="关键字搜索..." clearable
- style="margin-left: 20px;width: 300px;float: left;">
- </el-input>
- <el-select style="margin-left: 20px;float: left;" v-model="listQuery1.businessType" placeholder="业务类型" clearable>
- <el-option value="ITEM_BUSINESS" label="土规业务">土规业务</el-option>
- <el-option value="MAJOR_BUSINESS" label="大中型业务">大中型业务</el-option>
- <el-option value="PERSONAL_BUSINESS" label="个贷业务">个贷业务</el-option>
- <el-option value="ASSET_BUSINESS" label="资产业务">资产业务</el-option>
- </el-select>
- <el-date-picker style="margin-left: 20px;float: left;" v-model="payDate1" type="daterange" align="center"
- unlink-panels range-separator="至" start-placeholder="到账时日(开始)" end-placeholder="到账时日(结束)"
- :picker-options="pickerOptions" value-format="yyyy-MM-dd">
- </el-date-picker>
- <el-date-picker style="margin-left: 20px;float: left;" v-model="claimDate" type="daterange" align="center"
- unlink-panels range-separator="至" start-placeholder="认领时日(开始)" end-placeholder="认领时日(结束)"
- :picker-options="pickerOptions" value-format="yyyy-MM-dd">
- </el-date-picker>
-
- <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList1"
- v-loading.fullscreen.lock="loading" round>搜索
- </el-button>
- <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch1()">重置
- </el-button>
- <el-button class="filter-item" style="margin-left: 10px;float: left;" type="info" @click="exportData1()"
- round>导出
- </el-button>
- </template>
- <el-table ref="table" size="medium" slot="table" :data="pageData1.records" show-summary border
- :summary-method="getSummaries" fit stripe highlight-current-row :header-row-style="{ color: '#333333' }"
- style="
- border-left: 1px solid #ebeced;
- border-right: 1px solid #ebeced;
- color: #333333;">
- <el-table-column label="付款方" align="center" width='250'>
- <template slot-scope="{row}">
- <span>{{ row.payer }}</span>
- </template>
- </el-table-column>
- <el-table-column label="付款金额(元)" align="center" prop="amount" width='120'>
- <template slot-scope="{row}">
- <span>{{ row.amount }}</span>
- </template>
- </el-table-column>
- <el-table-column label="到账时日" align="center" width='120'>
- <template slot-scope="{row}">
- <span>{{ row.payDatetime }}</span>
- </template>
- </el-table-column>
- <el-table-column label="认领金额(元)" align="center" prop="claimAmount" width='120'>
- <template slot-scope="{row}">
- <span style="color:green">{{ row.claimAmount }}</span>
- </template>
- </el-table-column>
- <el-table-column label="认领人" align="center">
- <template slot-scope="{row}">
- <span>{{ row.claimUser }}</span>
- </template>
- </el-table-column>
- <el-table-column label="认领时间" align="center" width='170'>
- <template slot-scope="{row}">
- <span>{{ row.claimDatetime }}</span>
- </template>
- </el-table-column>
- <el-table-column label="业务类型" align="center" width='120'>
- <template slot-scope="{row}">
- <span>{{ row.businessType }}</span>
- </template>
- </el-table-column>
- <el-table-column label="项目编号" align="center" width='170'>
- <template slot-scope="{row}">
- <span>{{ row.orderId }}</span>
- </template>
- </el-table-column>
- <el-table-column label="录入人" align="center">
- <template slot-scope="{row}">
- <span>{{ row.creator }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column label="录入时间" align="center" width='170'>
- <template slot-scope="{row}">
- <span>{{ row.created }}</span>
- </template>
- </el-table-column> -->
- <el-table-column label="备注" align="center" width='170'>
- <template slot-scope="{row}">
- <span>{{ row.remark }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="150">
- <template slot-scope="{row}">
- <el-button @click="removeClaim(scope.row.id)" type="text" size="small">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </y-page-list-layout>
- </el-tab-pane>
- </el-tabs>
- <el-dialog :visible.sync="createdRealFundDialog" width="45%" center custom-class="doWarehouseClass"
- @closed="cleanFund">
- <el-form ref="realFund" :model="realFund">
- <el-divider content-position="left">实收款信息</el-divider>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="24" :span="6">
- <el-form-item label="付款方名称:" prop="payer" :rules="{ required: true, message: '付款方名称不能为空', trigger: 'blur' }"
- label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="realFund.payer" class="filter-item" />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="付款金额(元):" prop="amount"
- :rules="{ required: true, message: '付款金额不能为空', trigger: 'blur' }" label-width="140px"
- class="postInfo-container-item">
- <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="realFund.amount"
- type="number" style="width:100%" class="filter-item" />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="到账时间:" prop="payDatetime"
- :rules="{ required: true, message: '到账时间不能为空', trigger: 'blur' }" label-width="140px"
- class="postInfo-container-item">
- <el-date-picker v-model="realFund.payDatetime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"
- style="width:100%">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="付款银行:" prop="payerBank" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="realFund.payerBank" class="filter-item" />
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" :span="6">
- <el-form-item label="付款银行账号:" prop="payerAccount" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="realFund.payerAccount" class="filter-item" />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :xs="24" :sm="12" :lg="24" :span="6">
- <el-form-item label="备注:" prop="remark" label-width="140px" class="postInfo-container-item">
- <el-input v-model.trim="realFund.remark" class="filter-item" type="textarea" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="createdRealFundDialog = false">取 消</el-button>
- <el-button type="primary" @click="saveRealFund()">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog :visible.sync="claimListDialog" width="90%" center custom-class="doWarehouseClass">
- <div style="margin-bottom:20px;font-size:20px;">
- <span>付款方:</span><span style="color:red;font-weight:bold">{{ payer }}</span><span
- style="margin-left:20px">付款金额:</span><span style="color:red;font-weight:bold">{{ amount }}¥</span><span
- style="margin-left:20px">的认领记录:</span>
- </div>
- <parentTable :data="claimListData" border stripe :isBoard=300 style="width: 100%">
- <el-table-column align="center" prop="businessType" label="业务类型" width="180">
- </el-table-column>
- <el-table-column show-overflow-tooltip align="center" prop="orderName" label="订单名称" width="300">
- </el-table-column>
- <el-table-column show-overflow-tooltip align="center" prop="orderId" label="订单号" width="250">
- </el-table-column>
- <el-table-column show-overflow-tooltip align="center" prop="productionNo" label="产品号" width="250">
- </el-table-column>
- <el-table-column align="center" prop="shouldAmount" label="应收金额(元)">
- <template slot-scope="{row}">
- <span>{{ row.productionShouldAmount ? row.productionShouldAmount : row.shouldAmount }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="claimAmount" label="认领金额(元)">
- <template slot-scope="{row}">
- <span style="color: red;">{{ row.claimAmount }}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="claimName" label="认领人">
- </el-table-column>
- <el-table-column align="center" prop="created" width="180" label="认领时间">
- </el-table-column>
- <el-table-column align="center" label="操作">
- <template slot-scope="scope">
- <el-button @click="removeClaim(scope.row.id)" type="text" size="small">删除</el-button>
- </template>
- </el-table-column>
- </parentTable>
- </el-dialog>
- </div>
- </template>
- <script>
- import YPageListLayout from '@/components/YPageListLayout'
- import Breadcrumb from '@/components/Breadcrumb'
- import excelImport from "@/components/excelImport.vue";
- export default {
- name: 'financeRealFund',
- components: {
- Breadcrumb,
- YPageListLayout,
- excelImport
- },
- data() {
- return {
- activeName: 'notClaim',
- pageData: { records: [] },
- pageData1: { records: [] },
- pageData2: { records: [] },
- listQuery: {
- page: 1,
- size: 1000,
- descs: 'id',
- keyword: null,
- startDate: null,
- endDate: null,
- notFinished: true
- },
- listQuery2: {
- page: 1,
- size: 1000,
- descs: 'id',
- keyword: null,
- startDate: null,
- endDate: null,
- },
- listQuery1: {
- page: 1,
- size: 1000,
- descs: 'id',
- keyword: null,
- startDate: null,
- endDate: null,
- xStartDate: null,
- xEndDate: null,
- businessType:null
- },
- createdRealFundDialog: false,
- claimListDialog: false,
- payDate: '',
- payDate1: '',
- payDate2: '',
- claimListData: null,
- realFund: {
- id: null,
- payer: null,
- payerBank: null,
- payerAccount: null,
- amount: null,
- claimAmount: null,
- notClaimAmount: null,
- payDatetime: null,
- remark: null,
- created: null,
- creator: null
- },
- payer: null,
- amount: null,
- pickerOptions: {
- shortcuts: [{
- text: '最近一周',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近一个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近三个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
- picker.$emit('pick', [start, end]);
- }
- }]
- },
- loading: false,
- pageSizes: [10, 20, 30, 50, 100, 200, 500, 1000],
- claimDate:[],
- claimDate2:[]
- }
- },
- created() {
- this.claimDate.push(this.getDefaultStartDate());
- this.claimDate.push(this.getDefaultEndDate());
- this.claimDate2.push(this.getDefaultStartDate());
- this.claimDate2.push(this.getDefaultEndDate());
- this.getList();
- },
- methods: {
- handleClick(tab, event) {
- if (tab.name ==='notClaim'){
- this.getList();
- }
- if (tab.name ==='claimed'){
- this.getList1();
- }
- if (tab.name ==='realClaimed'){
- this.getList2();
- }
- },
- getDefaultStartDate() {
- let currentDate = new Date();
- let currentYear = currentDate.getFullYear();
- var currentMonth = String(currentDate.getMonth()).padStart(2, "0");
- if (currentMonth=='00'){
- currentYear = currentYear-1;
- currentMonth = 12
- }
- return currentYear + '-' + currentMonth + '-' + '23'
- },
- getDefaultEndDate() {
- const currentDate = new Date();
- const currentYear = currentDate.getFullYear();
- var currentMonth = String(currentDate.getMonth() + 1).padStart(2, "0");
- return currentYear + '-' + currentMonth + '-' + '22'
- },
- resetSearch() {
- this.$router.push({ query: {} });
- this.payDate = '';
- this.listQuery = {
- current: 1,
- size: 1000,
- descs: 'id',
- notFinished: true
- }
- this.getList()
- },
- resetSearch2() {
- this.$router.push({ query: {} });
- this.claimDate2 = [this.getDefaultStartDate(), this.getDefaultEndDate()];
- this.payDate2 = '';
- this.listQuery2 = {
- current: 1,
- size: 1000,
- descs: 'id',
- }
- this.getList2()
- },
- searchList() {
- // 重置分页
- this.listQuery.page = 1
- this.listQuery.size = 1000
- if (this.payDate) {
- this.listQuery.startDate = this.payDate[0];
- this.listQuery.endDate = this.payDate[1];
- }
- this.getList()
- },
- searchList2() {
- // 重置分页
- this.listQuery2.page = 1
- this.listQuery2.size = 1000
- if (this.payDate2) {
- this.listQuery2.startDate = this.payDate2[0];
- this.listQuery2.endDate = this.payDate2[1];
- }
- if (this.claimDate2){
- this.listQuery2.xStartDate = this.claimDate2[0];
- this.listQuery2.xEndDate = this.claimDate2[1];
- }
- this.getList2()
- },
- getList() {
- let loadingInstance = this.$loading({ fullscreen: true });
- this.$api.financeRealFund.list(Object.assign({}, this.listQuery)).then(res => {
- if (res.code === 200) {
- loadingInstance.close();
- this.pageData = res.data;
- }
- })
- setTimeout(() => {
- this.loading = false;
- }, 500);
- },
- getList2() {
- let loadingInstance = this.$loading({ fullscreen: true });
- if (this.claimDate2) {
- this.listQuery2.xStartDate = this.claimDate2[0] + ' 00:00:00';
- this.listQuery2.xEndDate = this.claimDate2[1] + ' 23:59:59';
- }
- this.$api.financeRealFund.realClaimed(Object.assign({}, this.listQuery2)).then(res => {
- if (res.code === 200) {
- loadingInstance.close();
- this.pageData2 = res.data;
- }
- })
- setTimeout(() => {
- this.loading = false;
- }, 500);
- },
- saveRealFund() {
- this.$refs.realFund.validate(valid => {
- if (valid) {
- if (this.realFund.id) {
- console.log(this.realFund)
- this.$api.financeRealFund.edit(this.realFund).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '修改实收款信息成功',
- type: 'success',
- duration: 2000
- });
- this.getList();
- this.createdRealFundDialog = false;
- } else {
- this.$notify({
- title: '失败',
- message: '修改实收款信息失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- } else {
- this.$api.financeRealFund.add(this.realFund).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '录入实收款信息成功',
- type: 'success',
- duration: 2000
- });
- this.getList();
- this.createdRealFundDialog = false;
- } else {
- this.$notify({
- title: '失败',
- message: '录入实收款信息失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- }
- }
- })
- },
- clamiList(id, payer, amount) {
- this.claimListDialog = true;
- this.payer = payer;
- this.amount = amount;
- this.$api.financeClaim.getList(id).then(res => {
- if (res.code === 200) {
- this.claimListData = res.data;
- }
- })
- },
- detail(id) {
- this.createdRealFundDialog = true;
- this.$api.financeRealFund.detail(id).then(res => {
- if (res.code === 200) {
- this.realFund = res.data
- }
- })
- },
- remove(id) {
- this.$confirm('请确认是否删除此回款记录?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- center: true
- }).then(() => {
- this.$api.financeRealFund.delete(id).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '实收款信息已删除',
- type: 'success',
- duration: 2000
- });
- this.getList();
- } else {
- this.$notify({
- title: '失败',
- message: '实收款信息删除失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- })
- },
- removeClaim(id) {
- this.$confirm('请确认是否删除此条认领记录?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- center: true
- }).then(() => {
- if (id) {
- this.$api.financeClaim.delete(id).then(res => {
- if (res.code === 200 && res.data) {
- this.$notify({
- title: '成功',
- message: '删除认领记录成功',
- type: 'success',
- duration: 2000
- });
- this.$api.financeClaim.getList(id).then(res => {
- if (res.code === 200) {
- this.claimListData = res.data;
- }
- })
- this.getList();
- } else {
- this.$notify({
- title: '失败',
- message: '删除认领记录失败',
- type: 'error',
- duration: 2000
- });
- }
- })
- }
- })
- },
- cleanFund() {
- this.realFund.id = null;
- this.realFund.payer = null;
- this.realFund.payerBank = null;
- this.realFund.payerAccount = null;
- this.realFund.amount = null;
- this.realFund.claimAmount = null;
- this.realFund.payDatetime = null;
- this.realFund.remark = null;
- this.realFund.created = null;
- this.realFund.creator = null;
- },
- exportData() {
- this.$utils.exportUtil(
- "/financeRealFund/export", this.listQuery,
- "导出"
- );
- },
- getSummaries(param) {
- const { columns, data } = param;
- const sums = [];
- columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = '合计';
- return;
- }
- const values = data.map(item => Number(item[column.property]));
- if (!values.every(value => isNaN(value))) {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr);
- if (!isNaN(value)) {
- return prev + curr;
- } else {
- return prev;
- }
- }, 0).toFixed(2);
- sums[index] += ' 元';
- } else {
- sums[index] = '-';
- }
- });
- return sums;
- },
- getList1(){
- let loadingInstance = this.$loading({ fullscreen: true });
- if (this.claimDate) {
- this.listQuery1.xStartDate = this.claimDate[0] + ' 00:00:00';
- this.listQuery1.xEndDate = this.claimDate[1] + ' 23:59:59';
- }
- this.$api.financeClaim.claimPage(Object.assign({}, this.listQuery1)).then(res => {
- if (res.code === 200) {
- loadingInstance.close();
- this.pageData1 = res.data;
- }
- })
- },
- searchList1() {
- // 重置分页
- this.listQuery1.page = 1
- this.listQuery1.size = 1000
-
- if (this.payDate1) {
- this.listQuery1.startDate = this.payDate1[0];
- this.listQuery1.endDate = this.payDate1[1];
- }
- if (this.claimDate){
- this.listQuery1.xStartDate = this.claimDate[0];
- this.listQuery1.xEndDate = this.claimDate[1];
- }
- this.getList1()
- },
- resetSearch1() {
- this.$router.push({ query: {} });
- this.claimDate = [this.getDefaultStartDate(), this.getDefaultEndDate()];
- this.payDate1 = '';
- this.listQuery1 = {
- current: 1,
- size: 500,
- descs: 'id',
- }
- this.getList1()
- },
- exportData1() {
- this.$utils.exportUtil(
- "/financeClaim/export", this.listQuery1,
- "导出"
- );
- },
- exportData2() {
- this.$utils.exportUtil(
- "/financeRealFund/export", this.listQuery2,
- "导出"
- );
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- /deep/.doWarehouseClass {
- border-radius: 10px;
- }
- .redPoint {
- color: red;
- position: absolute;
- top: 8px;
- left: 5px;
- }
- </style>
|