fix: 新功能增加,原有功能优化。

This commit is contained in:
tianyongbao
2024-06-15 15:52:47 +08:00
parent 2f1175183f
commit 7ce6161b01
33 changed files with 4630 additions and 86 deletions

View File

@@ -217,6 +217,101 @@
"style": {
"navigationBarTitleText": "心路历程"
}
}
,
{
"path": "pages/work/bill/creditQueryRecord/list",
"style": {
"navigationBarTitleText": "征信记录查询"
}
} ,
{
"path": "pages/work/bill/creditQueryRecord/details",
"style": {
"navigationBarTitleText": "征信记录查询详情"
}
},
{
"path": "pages/work/bill/creditQueryRecord/analysis",
"style": {
"navigationBarTitleText": "征信记录查询统计"
}
}
,
{
"path": "pages/work/bill/creditQueryRecord/addEdit",
"style": {
"navigationBarTitleText": "征信记录查询"
}
},
{
"path": "pages/work/bill/creditCardBill/list",
"style": {
"navigationBarTitleText": "信用卡账单"
}
} ,
{
"path": "pages/work/bill/creditCardBill/details",
"style": {
"navigationBarTitleText": "信用卡账单明细"
}
}
,
{
"path": "pages/work/bill/creditCardBill/addEdit",
"style": {
"navigationBarTitleText": "信用卡账单"
}
},
{
"path": "pages/work/bill/onlineLendHistory/list",
"style": {
"navigationBarTitleText": "网贷账单"
}
} ,
{
"path": "pages/work/bill/onlineLendHistory/details",
"style": {
"navigationBarTitleText": "网贷账单还款明细"
}
}
,
{
"path": "pages/work/bill/onlineLendHistory/addEdit",
"style": {
"navigationBarTitleText": "网贷账单"
}
},
{
"path": "pages/work/bill/onlineLendHistory/detailsAddEdit",
"style": {
"navigationBarTitleText": "网贷账单还款明细"
}
},
{
"path": "pages/work/bill/creditInstallmentHistory/list",
"style": {
"navigationBarTitleText": "信用卡分期账单"
}
} ,
{
"path": "pages/work/bill/creditInstallmentHistory/details",
"style": {
"navigationBarTitleText": "信用卡分期账单还款明细"
}
}
,
{
"path": "pages/work/bill/creditInstallmentHistory/addEdit",
"style": {
"navigationBarTitleText": "信用卡分期账单"
}
},
{
"path": "pages/work/bill/creditInstallmentHistory/detailsAddEdit",
"style": {
"navigationBarTitleText": "信用卡分期账单还款明细"
}
},
{
"path": "pages/work/accounts/investTransferRecord/list",

View File

@@ -52,7 +52,7 @@
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showAccountType" :columns="accountTypeList" keyName="dictLabel" @cancel="handleAccountTypeCancel"
@confirm="handleAccountTypeConfirm"></u-picker>
<u-picker itemHeight="88" :show="showAccountName" :columns="accountNameList" keyName="nameCode" @cancel="handleAccountNameCancel"
<u-picker itemHeight="88" :show="showAccountName" :columns="accountNameList" keyName="nameCodeAvailableLimit" @cancel="handleAccountNameCancel"
@confirm="handleAccountNameConfirm"></u-picker>
<u-picker itemHeight="88" :show="showDealCategory" :columns="dealCategoryList" keyName="dictLabel" @cancel="handleDealCategoryCancel"
@confirm="handleDealCategoryConfirm"></u-picker>
@@ -233,7 +233,7 @@ getDicts('deal_category').then(result => {
}
}
function handleAccountNameConfirm(e) {
form.value.accountName = e.value[0].nameCode
form.value.accountName = e.value[0].nameCodeAvailableLimit
form.value.accountId = e.value[0].id
showAccountName.value = false
}

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入账户名称" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
@@ -111,7 +108,7 @@
<text class="row-value">{{ item.remark }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">查看</view>
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view> -->
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入名称" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入名称" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
@@ -84,9 +81,9 @@
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">查看</view >
<!-- <view class="btn filling" @click="handleEdit(item)">修改</view> -->
<!-- <view class="btn filling" @click="handleDelete(item)">删除</view> -->
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view > -->
<!-- <view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view> -->
</view>
</view>
</u-list-item>

View File

@@ -45,9 +45,9 @@
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showDebitCard" :columns="debitCardList" keyName="nameCode" @cancel="handleDebitCardCancel"
<u-picker itemHeight="88" :show="showDebitCard" :columns="debitCardList" keyName="nameCodeAvailableLimit" @cancel="handleDebitCardCancel"
@confirm="handleDebitCardConfirm"></u-picker>
<u-picker itemHeight="88" :show="showCreditCard" :columns="bankCardLendList" keyName="nameCode" @cancel="handleCreditCardCancel"
<u-picker itemHeight="88" :show="showCreditCard" :columns="bankCardLendList" keyName="nameCodeAvailableLimit" @cancel="handleCreditCardCancel"
@confirm="handleCreditCardConfirm"></u-picker>
<u-picker itemHeight="88" :show="showDealType" :columns="dealTypeList" keyName="dictLabel" @cancel="handleDealTypeCancel"
@confirm="handleDealTypeConfirm"></u-picker>
@@ -167,7 +167,7 @@ onLoad((option) => {
}
}
function handleDebitCardConfirm(e) {
form.value.outAccountName = e.value[0].nameCode
form.value.outAccountName = e.value[0].nameCodeAvailableLimit
form.value.outAccountId = e.value[0].id
showDebitCard.value = false
}
@@ -184,7 +184,7 @@ function handleCreditCard() {
}
}
function handleCreditCardConfirm(e) {
form.value.inAccountName = e.value[0].nameCode
form.value.inAccountName = e.value[0].nameCodeAvailableLimit
form.value.inAccountId= e.value[0].id
showCreditCard.value = false
}

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入信用卡名称" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
@@ -94,8 +91,8 @@
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">查看</view>
<view class="btn filling" @click="handleEdit(item)">修改</view>
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view> -->
<!-- <view class="btn filling" @click="handleEdit(item)">修改</view> -->
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
@@ -235,7 +232,7 @@ function dictStr(val, arr) {
}
function resetQuery() {
queryParams.value.name = ''
queryParams.value.type = ''
queryParams.value.type = '2'
queryParams.value.dealType = ''
queryParams.value.startTime = ''
queryParams.value.endTime = ''

View File

@@ -40,9 +40,9 @@
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showOutAccount" :columns="outAccountList" keyName="nameCode" @cancel="handleOutAccountCancel"
<u-picker itemHeight="88" :show="showOutAccount" :columns="outAccountList" keyName="nameCodeAvailableLimit" @cancel="handleOutAccountCancel"
@confirm="handleOutAccountConfirm"></u-picker>
<u-picker itemHeight="88" :show="showInAccount" :columns="inAccountList" keyName="nameCode" @cancel="handleInAccountCancel"
<u-picker itemHeight="88" :show="showInAccount" :columns="inAccountList" keyName="nameCodeAvailableLimit" @cancel="handleInAccountCancel"
@confirm="handleInAccountConfirm"></u-picker>
<u-datetime-picker
:show="datePickShow"
@@ -147,7 +147,7 @@ onLoad((option) => {
}
}
function handleOutAccountConfirm(e) {
form.value.outAccountName = e.value[0].nameCode
form.value.outAccountName = e.value[0].nameCodeAvailableLimit
form.value.outAccountId = e.value[0].id
showOutAccount.value = false
@@ -165,7 +165,7 @@ function handleInAccount() {
}
}
function handleInAccountConfirm(e) {
form.value.inAccountName = e.value[0].nameCode
form.value.inAccountName = e.value[0].nameCodeAvailableLimit
form.value.inAccountId = e.value[0].id
showInAccount.value = false
}

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入储蓄账户名称" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
@@ -84,7 +81,7 @@
<text class="row-value">{{ item.amount }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">查看</view>
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view> -->
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>

View File

@@ -40,7 +40,7 @@
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showAccountName" :columns="accountNameList" keyName="nameCode" @cancel="handleAccountNameCancel"
<u-picker itemHeight="88" :show="showAccountName" :columns="accountNameList" keyName="nameCodeAvailableLimit" @cancel="handleAccountNameCancel"
@confirm="handleAccountNameConfirm"></u-picker>
<u-picker itemHeight="88" :show="showDealType" :columns="dealTypeList" keyName="dictLabel" @cancel="handleDealTypeCancel"
@confirm="handleDealTypeConfirm"></u-picker>
@@ -159,7 +159,7 @@ onLoad((option) => {
}
}
function handleAccountNameConfirm(e) {
form.value.accountName = e.value[0].nameCode
form.value.accountName = e.value[0].nameCodeAvailableLimit
form.value.accountId = e.value[0].id
showAccountName.value = false
}

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入投资账户名称" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
@@ -94,8 +91,8 @@
<text class="row-value">{{ item.remark }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">查看</view>
<view class="btn filling" @click="handleEdit(item)">修改</view>
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view> -->
<!-- <view class="btn filling" @click="handleEdit(item)">修改</view> -->
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
@@ -258,11 +255,11 @@ function selectAccountType(item) {
}
function resetQuery() {
queryParams.value.name = ''
queryParams.value.type = ''
queryParams.value.type = '5'
queryParams.value.dealType = ''
queryParams.value.startTime = ''
queryParams.value.endTime = ''
queryParams.value.dealCategory = ''
queryParams.value.dealCategory = '2'
accountTypeList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入投资账户名称" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
@@ -94,8 +91,8 @@
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">查看</view>
<view class="btn filling" @click="handleEdit(item)">修改</view>
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view> -->
<!-- <view class="btn filling" @click="handleEdit(item)">修改</view> -->
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
@@ -235,7 +232,7 @@ function dictStr(val, arr) {
}
function resetQuery() {
queryParams.value.name = ''
queryParams.value.type = ''
queryParams.value.type = '3'
queryParams.value.dealType = ''
queryParams.value.startTime = ''
queryParams.value.endTime = ''

View File

@@ -49,9 +49,9 @@
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showOutAccount" :columns="outAccountList" keyName="nameCode" @cancel="handleOutAccountCancel"
<u-picker itemHeight="88" :show="showOutAccount" :columns="outAccountList" keyName="nameCodeAvailableLimit" @cancel="handleOutAccountCancel"
@confirm="handleOutAccountConfirm"></u-picker>
<u-picker itemHeight="88" :show="showInAccount" :columns="inAccountList" keyName="nameCode" @cancel="handleInAccountCancel"
<u-picker itemHeight="88" :show="showInAccount" :columns="inAccountList" keyName="nameCodeAvailableLimit" @cancel="handleInAccountCancel"
@confirm="handleInAccountConfirm"></u-picker>
<u-picker itemHeight="88" :show="showDealType" :columns="dealTypeList" keyName="dictLabel" @cancel="handleDealTypeCancel"
@confirm="handleDealTypeConfirm"></u-picker>
@@ -174,7 +174,7 @@ onLoad((option) => {
}
}
function handleOutAccountConfirm(e) {
form.value.outAccountName = e.value[0].nameCode
form.value.outAccountName = e.value[0].nameCodeAvailableLimit
form.value.outAccountId = e.value[0].id
showOutAccount.value = false
@@ -192,7 +192,7 @@ function handleInAccount() {
}
}
function handleInAccountConfirm(e) {
form.value.inAccountName = e.value[0].nameCode
form.value.inAccountName = e.value[0].nameCodeAvailableLimit
form.value.inAccountId = e.value[0].id
showInAccount.value = false
}

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入借贷账户名称" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
@@ -93,7 +90,7 @@
<text class="row-value">{{ item.commission }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">查看</view>
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view> -->
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
@@ -233,7 +230,7 @@ function dictStr(val, arr) {
}
function resetQuery() {
queryParams.value.name = ''
queryParams.value.type = ''
queryParams.value.type = '5'
queryParams.value.dealType = ''
queryParams.value.startTime = ''
queryParams.value.endTime = ''

View File

@@ -50,7 +50,7 @@
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showPosMachine" :columns="posMachineList" keyName="nameMerchantName" @cancel="handlePosMachineCancel"
@confirm="handlePosMachineConfirm"></u-picker>
<u-picker itemHeight="88" :show="showCreditCard" :columns="bankCardLendList" keyName="nameCode" @cancel="handleCreditCardCancel"
<u-picker itemHeight="88" :show="showCreditCard" :columns="bankCardLendList" keyName="nameCodeAvailableLimit" @cancel="handleCreditCardCancel"
@confirm="handleCreditCardConfirm"></u-picker>
<u-datetime-picker
:show="datePickShow"
@@ -180,7 +180,7 @@ function handleCreditCard() {
}
}
function handleCreditCardConfirm(e) {
form.value.outAccountName = e.value[0].nameCode
form.value.outAccountName = e.value[0].nameCodeAvailableLimit
form.value.outAccountId = e.value[0].id
showCreditCard.value = false
}

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入POS机或信用卡名称" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
@@ -100,7 +97,7 @@
<text class="row-value">{{ item.actualAmount }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">查看</view>
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view> -->
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
@@ -212,7 +209,7 @@ function settingCancel() {
}
function resetQuery() {
queryParams.value.name = ''
queryParams.value.type = ''
queryParams.value.type = '1'
queryParams.value.dealType = ''
queryParams.value.startTime = ''
queryParams.value.endTime = ''

View File

@@ -0,0 +1,236 @@
<template>
<view class="container" style="paddingBottom:1rpx;">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#333333"
title="信用卡账单"
>
</u-navbar>
<view class="section">
<view class="section-title">{{ title}}</view>
<view class="form-view">
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
<u-form-item label="信用卡" prop="creditCardName" required @click="handleCreditCard">
<u--input v-model="form.creditCardName" disabled disabledColor="#ffffff" placeholder="请选择信用卡"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="账单日" prop="billDate" required @click="selectDate()">
<u--input v-model="form.billDate" disabled disabledColor="#ffffff" placeholder="请选择账单日" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="账单金额" prop="billAmount" required >
<u--input v-model="form.billAmount" placeholder="请填写账单金额"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="账单状态" prop="billStateName" required @click="handleShowTeam">
<u--input v-model="form.billStateName" disabled disabledColor="#ffffff" placeholder="请选择账单状态"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="备注" prop="remark" required labelPosition="top">
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
</u--form>
<view class="form-btn">
<u-button type="primary" text="提交" @click="submit"></u-button>
</view>
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showTeam" :columns="billStateList" keyName="dictLabel" @cancel="handleCancel"
@confirm="handleConfirm"></u-picker>
<u-datetime-picker
:show="datePickShow"
mode="date"
ref="createTimeRef"
@cancel="datePickShow=false"
@confirm="datePickConfirm"
itemHeight="88"
></u-datetime-picker>
<u-picker itemHeight="88" :show="showCreditCard" :columns="bankCardLendList" keyName="nameCodeAvailableLimit" @cancel="handleCreditCardCancel"
@confirm="handleCreditCardConfirm"></u-picker>
</view>
</template>
<script setup>
import {getCreditCardBill, addCreditCardBill, updateCreditCardBill } from '@/api/invest/creditCardBill'
import { getDicts } from '@/api/system/dict/data.js'
import { listAccounts } from '@/api/invest/accounts'
const { proxy } = getCurrentInstance()
import dayjs from 'dayjs'
import {onLoad,onReady} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
const datePickShow = ref(false)
const showTeam = ref(false)
const showCreditCard = ref(false)
const title = ref("信用卡账单")
const bankCardLendList = ref([])
const billStateList = ref([])
const data = reactive({
form: {
id: null,
name: null,
billDate: null,
creditCardId: null,
billDatePeriod: null,
billAmount: 0,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
billState: null,
remark: null,
delFlag: null
},
queryBankCardLendParams: {
pageNum: 1,
type: '2',
state: '1',
pageSize: 1000
},
rules: {
creditCardName: [{ type: 'string', required: true, message: '信用卡不能为空', trigger: ['change', 'blur'] }],
billDate: [{ type: 'string', required: true, message: '账单日不能为空', trigger: ['change', 'blur'] }],
billStateName: [{ type: 'string', required: true, message: '账单状态不能为空', trigger: ['change', 'blur'] }],
billAmount: [{ type: 'string', required: true, message: '账单金额不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryBankCardLendParams, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
if(form.value.id!=null){
title.value="信用卡账单-修改"
}else{
title.value="信用卡账单-新增"
}
getDict()
})
onReady(() => {
form.value.billDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
})
function getDict() {
// 账单状态
getDicts('bill_state').then(res => {
billStateList.value =[res.data]
})
listAccounts(queryBankCardLendParams.value).then((response) => {
bankCardLendList.value = [response.rows]
})
if(form.value.id!=null){
getCreditCardBill(form.value.id).then(res => {
form.value = res.data
form.value.creditCardName = res.data.bankNameCode
// 类型
getDicts('bill_state').then(result => {
form.value.billStateName=dictStr(form.value.billState, result.data)
})
})
}
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function handleShowTeam() {
if (billStateList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '账单状态为空 ', type: 'warning'
})
} else {
showTeam.value = true
}
}
function handleConfirm(e) {
form.value.billStateName = e.value[0].dictLabel
form.value.billState = e.value[0].dictValue
showTeam.value = false
}
function handleCancel() {
showTeam.value = false
}
function handleCreditCard() {
if (bankCardLendList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '信用卡为空 ', type: 'warning'
})
} else {
showCreditCard.value = true
}
}
function handleCreditCardConfirm(e) {
form.value.creditCardName = e.value[0].nameCodeAvailableLimit
form.value.creditCardId= e.value[0].id
showCreditCard.value = false
}
function handleCreditCardCancel() {
showCreditCard.value = false
}
function selectDate() {
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.createTime = dayjs(e.value).format("YYYY-MM-DD")
datePickShow.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updateCreditCardBill(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/creditCardBill//list` })
}
})
})
}else {
addCreditCardBill(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/creditCardBill//list` })
}
})
})
}
})
}
</script>
<style lang="scss" scoped>
.section {
margin: 24rpx;
padding: 16rpx 24rpx;
background-color: #fff;
border-radius: 8rpx;
.section-title {
width: 360rpx;
color: #333333;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
}
.form-view {
padding: 20rpx 0rpx 0 10rpx;
.form-btn {
padding-top: 20rpx;
}
}
}
</style>

View File

@@ -0,0 +1,425 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.time" border="false" disabled placeholder="请输入时间" class="search-input"
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="filter-title">交易类别</view>
<view class="state-list">
<view v-for="item in dealCategoryList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectDealCategory(item)">{{ item.dictLabel }}</view>
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
</view>
<u-datetime-picker
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
></u-datetime-picker>
</view>
</u-transition>
</view>
</u-sticky>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header" @click="enterDetails(item)">
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.accountName+'交易金额:'+item.amount" size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">记账类型</text>
<text class="row-value">{{ dictStr(item.type, accountTypeList) }}</text>
</view>
<view class="item-row">
<text class="row-label">交易时间</text>
<text class="row-value">{{ item.createTime }}</text>
</view>
<view class="item-row">
<text class="row-label">交易金额</text>
<text class="row-value">{{ item.amount }}</text>
</view>
<view class="item-row">
<text class="row-label">当前余额</text>
<text class="row-value">{{ item.currentBalance }}</text>
</view>
<view class="item-row">
<text class="row-label">交易类型</text>
<text class="row-value">{{ dictStr(item.dealType, dealTypeList) }}</text>
</view>
<view class="item-row">
<text class="row-label">交易类别</text>
<text class="row-value">{{ dictStr(item.dealCategory, dealCategoryList) }}</text>
</view>
<view class="item-row">
<text class="row-label">备注</text>
<text class="row-value">{{ item.remark }}</text>
</view>
</view>
</u-list-item>
<view>
</view>
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
</u-list>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
</view>
</template>
<script setup>
import {
listAccountDealRecord,
} from '@/api/invest/accountDealRecord'
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const status = ref('loadmore')
const accountTypeList = ref([])
const dealTypeList = ref([])
const dealCategoryList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const timeShow= ref(false)
const flag= ref(true)
const time =ref( Number(new Date()))
const data = reactive({
filterPanel: false,
queryParams: {
name: null,
type: null,
time: '',
accountId: null,
dealType: null,
dealCategory: null
}
})
const { filterPanel, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad((option) => {
queryParams.value.accountId = option.id
queryParams.value.time = option.billDatePeriod
queryParams.value.startTime = option.billDatePeriod.split('~')[0]
queryParams.value.endTime = option.billDatePeriod.split('~')[1]
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
getList()
isShow.value = false
}
});
function openOrCloseDate(data) {
timeShow.value = !timeShow.value
flag.value = data
}
function loadmore() {
pageNum.value += 1
if (status.value == 'loadmore') {
getList()
}
}
function getList() {
status.value = 'loading'
listAccountDealRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
if (listData.value.length < res.total) {
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
status.value = 'nomore'
})
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
if (flag.value) {
queryParams.value.startTime = date
} else {
queryParams.value.endTime = date
}
timeShow.value = false
}
function getDict() {
// 记账类型类型
getDicts('account_type').then(res => {
accountTypeList.value = res.data
})
// 交易类型
getDicts('deal_type').then(res => {
dealTypeList.value = res.data
})
// 交易类别
getDicts('deal_category').then(res => {
dealCategoryList.value = res.data
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function selectDealType(item) {
queryParams.value.dealType = item.dictValue
dealTypeList.value.map(ele => {
if (ele.dictValue == item.dictValue) {
ele.selected = true
Reflect.set(ele, 'selected', true)
} else {
Reflect.set(ele, 'selected', false)
}
})
}
function selectDealCategory(item) {
queryParams.value.dealCategory = item.dictValue
dealCategoryList.value.map(ele => {
if (ele.dictValue == item.dictValue) {
ele.selected = true
Reflect.set(ele, 'selected', true)
} else {
Reflect.set(ele, 'selected', false)
}
})
}
function searchSubmit() {
pageNum.value = 1
listData.value = []
getList()
filterPanel.value = false
}
function searchBlur() {
pageNum.value = 1
listData.value = []
getList()
}
function resetQuery() {
queryParams.value.name = ''
queryParams.value.type = ''
queryParams.value.dealType = ''
queryParams.value.startTime = ''
queryParams.value.endTime = ''
queryParams.value.dealCategory = ''
accountTypeList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
dealTypeList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
dealCategoryList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
}
function enterDetails(item) {
uni.navigateTo({ url: `/pages/work/accounts/accountDealRecord/details?id=${item.id}` })
}
</script>
<style lang="scss" scoped>
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -0,0 +1,417 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.creditCardName" border="false" type="select" @click="handleCreditCard" placeholder="请选择信用卡" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="filter-title">账单状态</view>
<view class="state-list">
<view v-for="item in billStateList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectStatus(item)">{{ item.dictLabel }}</view>
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
</view>
</view>
</u-transition>
</view>
</u-sticky>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header" @click="enterDetails(item)">
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.bankNameCode" size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">账单名称</text>
<text class="row-value">{{ item.name }}</text>
</view>
<view class="item-row">
<text class="row-label">账单状态</text>
<text class="row-value">{{ dictStr(item.billState, billStateList) }}</text>
</view>
<view class="item-row">
<text class="row-label">账单日</text>
<text class="row-value">{{ item.billDate }}</text>
</view>
<view class="item-row">
<text class="row-label">账单周期</text>
<text class="row-value">{{ item.billDatePeriod }}</text>
</view>
<view class="item-row">
<text class="row-label">账单金额</text>
<text class="row-value">{{ item.billAmount }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">账单明细</view >
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
</u-list-item>
<view>
</view>
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
</u-list>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showCreditCard" :columns="bankCardLendList" keyName="nameCode" @cancel="handleCreditCardCancel"
@confirm="handleCreditCardConfirm"></u-picker>
</view>
</template>
<script setup>
import { listCreditCardBill, delCreditCardBill } from '@/api/invest/creditCardBill'
import { getDicts } from '@/api/system/dict/data.js'
import { listAccounts } from '@/api/invest/accounts'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const status = ref('loadmore')
const billStateList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const showCreditCard = ref(false)
const bankCardLendList = ref([])
const data = reactive({
filterPanel: false,
queryBankCardLendParams: {
pageNum: 1,
type: '2',
state: '1',
pageSize: 100
},
queryParams: {
creditCardId: null,
name: '',
type: '',
}
})
const { filterPanel, queryBankCardLendParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
getList()
isShow.value = false
}
});
function loadmore() {
pageNum.value += 1
if (status.value == 'loadmore') {
getList()
}
}
function getList() {
status.value = 'loading'
listCreditCardBill({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
if (listData.value.length < res.total) {
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
status.value = 'nomore'
})
}
function getDict() {
listAccounts(queryBankCardLendParams.value).then((response) => {
bankCardLendList.value = [response.rows]
})
// 账单状态
getDicts('bill_state').then(res => {
billStateList.value = res.data
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function selectStatus(item) {
queryParams.value.billState = item.dictValue
billStateList.value.map(ele => {
if (ele.dictValue == item.dictValue) {
ele.selected = true
Reflect.set(ele, 'selected', true)
} else {
Reflect.set(ele, 'selected', false)
}
})
}
function handleCreditCard() {
if (bankCardLendList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '信用卡为空 ', type: 'warning'
})
} else {
showCreditCard.value = true
}
}
function handleCreditCardConfirm(e) {
queryParams.value.creditCardName = e.value[0].nameCode
queryParams.value.creditCardId= e.value[0].id
showCreditCard.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleCreditCardCancel() {
showCreditCard.value = false
}
function searchSubmit() {
pageNum.value = 1
listData.value = []
getList()
filterPanel.value = false
}
function searchBlur() {
pageNum.value = 1
listData.value = []
getList()
}
function resetQuery() {
queryParams.value.name = '',
queryParams.value.creditCardName = '',
queryParams.value.creditCardId= '',
queryParams.value.type = ''
billStateList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
}
function enterDetails(item) {
uni.navigateTo({ url: `/pages/work/bill/creditCardBill/details?id=${item.creditCardId}&billDatePeriod=${item.billDatePeriod}` })
}
function handleEdit(item) {
uni.navigateTo({ url: `/pages/work/bill/creditCardBill/addEdit?id=${item.id}` })
isShow.value = true
}
function handleAdd() {
uni.navigateTo({ url: `/pages/work/bill/creditCardBill/addEdit` })
isShow.value = true
}
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '你确定要删除吗',
success: function (res) {
if (res.confirm) {
delCreditCardBill(item.id)
uni.navigateTo({ url: `/pages/work/bill/creditCardBill/list` })
} else if (res.cancel) {
console.log('取消');
}
}
});
}
</script>
<style lang="scss" scoped>
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -0,0 +1,291 @@
<template>
<view class="container" style="paddingBottom:1rpx;">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#333333"
title="信用卡分期账单"
>
</u-navbar>
<view class="section">
<view class="section-title">{{ title}}</view>
<view class="form-view">
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
<u-form-item label="信用卡" prop="onlineLendName" required @click="handleOnlineLend">
<u--input v-model="form.onlineLendName" disabled disabledColor="#ffffff" placeholder="请选择信用卡"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="分期金额" prop="installmentAmount" required >
<u--input v-model="form.installmentAmount" placeholder="请填写分期金额"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="分期日期" prop="installmentDate" required @click="selectDate()">
<u--input v-model="form.installmentDate" disabled disabledColor="#ffffff" placeholder="请选择分期日期" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="分期期数" prop="period" required >
<u--input v-model="form.period" placeholder="请填写分期期数"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="余额" prop="balance" required >
<u--input v-model="form.balance" placeholder="请填写余额"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="结清状态" prop="settleStateName" required @click="handleShowTeam">
<u--input v-model="form.settleStateName" disabled disabledColor="#ffffff" placeholder="请选择结清状态"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="总利息" prop="totalInterest" >
<u--input v-model="form.totalInterest" placeholder="请填写总利息"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="已还期数" prop="repaidPeriod" >
<u--input v-model="form.repaidPeriod" placeholder="请填写已还期数"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="利率" prop="interestRate" >
<u--input v-model="form.interestRate" placeholder="请填写利率"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="关闭日期" prop="closeDate" @click="selectCloseDate()">
<u--input v-model="form.closeDate" disabled disabledColor="#ffffff" placeholder="请选择关闭日期" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="备注" prop="remark" labelPosition="top">
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
</u--form>
<view class="form-btn">
<u-button type="primary" text="提交" @click="submit"></u-button>
</view>
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showTeam" :columns="settleStateList" keyName="dictLabel" @cancel="handleCancel"
@confirm="handleConfirm"></u-picker>
<u-datetime-picker
:show="datePickShow"
mode="date"
ref="createTimeRef"
@cancel="datePickShow=false"
@confirm="datePickConfirm"
itemHeight="88"
></u-datetime-picker>
<u-datetime-picker
:show="closeDatePickShow"
mode="date"
ref="closeTimeRef"
@cancel="closeDatePickShow=false"
@confirm="closeDatePickConfirm"
itemHeight="88"
></u-datetime-picker>
<u-picker itemHeight="88" :show="showOnlineLend" :columns="bankCardLendList" keyName="nameCode" @cancel="handleOnlineLendCancel"
@confirm="handleOnlineLendConfirm"></u-picker>
</view>
</template>
<script setup>
import {
getInstallmentHistory,
addInstallmentHistory,
updateInstallmentHistory
} from '@/api/invest/installmentHistory'
import { getDicts } from '@/api/system/dict/data.js'
import { listAccounts } from '@/api/invest/accounts'
const { proxy } = getCurrentInstance()
import dayjs from 'dayjs'
import {onLoad,onReady} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
const datePickShow = ref(false)
const showTeam = ref(false)
const showOnlineLend = ref(false)
const title = ref("信用卡分期账单")
const bankCardLendList = ref([])
const settleStateList = ref([])
const data = reactive({
form: {
id: null,
name: null,
type: '2',
code: null,
balance: null,
bankCardLendId: null,
installmentAmount: null,
installmentDate: null,
period: null,
repaidPeriod: null,
totalInterest: null,
interestRate: null,
dueDate: null,
closeDate: null,
state: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null,
remark: null
},
queryBankCardLendParams: {
pageNum: 1,
type: '2',
state: '1',
pageSize: 1000
},
rules: {
onlineLendName: [{ type: 'string', required: true, message: '信用卡不能为空', trigger: ['change', 'blur'] }],
billDate: [{ type: 'string', required: true, message: '分期日期不能为空', trigger: ['change', 'blur'] }],
settleStateName: [{ type: 'string', required: true, message: '结清状态不能为空', trigger: ['change', 'blur'] }],
billAmount: [{ type: 'string', required: true, message: '分期金额不能为空', trigger: ['change', 'blur'] }],
period: [{ type: 'string', required: true, message: '分期期数不能为空', trigger: ['change', 'blur'] }],
balance: [{ type: 'string', required: true, message: '余额不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryBankCardLendParams, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
if(form.value.id!=null){
title.value="信用卡分期账单-修改"
}else{
title.value="信用卡分期账单-新增"
}
getDict()
})
onReady(() => {
form.value.installmentDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
})
function getDict() {
// 账单状态
getDicts('settle_state').then(res => {
settleStateList.value =[res.data]
})
listAccounts(queryBankCardLendParams.value).then((response) => {
bankCardLendList.value = [response.rows]
})
if(form.value.id!=null){
getInstallmentHistory(form.value.id).then(res => {
form.value = res.data
form.value.onlineLendName = res.data.bankName
// 类型
getDicts('settle_state').then(result => {
form.value.settleStateName=dictStr(form.value.state, result.data)
})
})
}
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function handleShowTeam() {
if (settleStateList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '结清状态为空 ', type: 'warning'
})
} else {
showTeam.value = true
}
}
function handleConfirm(e) {
form.value.settleStateName = e.value[0].dictLabel
form.value.state = e.value[0].dictValue
showTeam.value = false
}
function handleCancel() {
showTeam.value = false
}
function handleOnlineLend() {
if (bankCardLendList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '信用卡为空 ', type: 'warning'
})
} else {
showOnlineLend.value = true
}
}
function handleOnlineLendConfirm(e) {
form.value.onlineLendName = e.value[0].nameCode
form.value.bankCardLendId= e.value[0].id
showOnlineLend.value = false
}
function handleOnlineLendCancel() {
showOnlineLend.value = false
}
function selectDate() {
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.installmentDate = dayjs(e.value).format("YYYY-MM-DD")
datePickShow.value = false
}
function selectCloseDate() {
closeDatePickShow.value = true
proxy.$refs['closeTimeRef'].innerValue = new Date().getTime()
}
function closeDatePickConfirm(e) {
form.value.closeDate = dayjs(e.value).format("YYYY-MM-DD")
closeDatePickShow.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updateInstallmentHistory(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` })
}
})
})
}else {
addInstallmentHistory(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` })
}
})
})
}
})
}
</script>
<style lang="scss" scoped>
.section {
margin: 24rpx;
padding: 16rpx 24rpx;
background-color: #fff;
border-radius: 8rpx;
.section-title {
width: 360rpx;
color: #333333;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
}
.form-view {
padding: 20rpx 0rpx 0 10rpx;
.form-btn {
padding-top: 20rpx;
}
}
}
</style>

View File

@@ -0,0 +1,363 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.name" border="false" disabled ="false" type="select" v-show="true" >
</u-input>
<!-- <u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon> -->
<u-icon name="checkmark-circle-fill" color="#666666" size="28" style="margin-left:10px" label="总利息汇总"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleUpdateInterest()"></u-icon>
</view>
</u-sticky>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-row">
<text class="row-label">还款日期</text>
<text class="row-value">{{ item.repaymentDate }}</text>
</view>
<view class="item-row">
<text class="row-label">入账状态</text>
<text class="row-value">{{ dictStr(item.postingState, postingStateList) }}</text>
</view>
<view class="item-row">
<text class="row-label">还款期数</text>
<text class="row-value">{{ item.periods }}</text>
</view>
<view class="item-row">
<text class="row-label">还款金额</text>
<text class="row-value">{{ item.currentAmount }}</text>
</view>
<view class="item-row">
<text class="row-label">应还本金</text>
<text class="row-value">{{ item.principal }}</text>
</view>
<view class="item-row">
<text class="row-label">利息</text>
<text class="row-value">{{ item.interest }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
</u-list-item>
<view>
</view>
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
</u-list>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
</view>
</template>
<script setup>
import {
listInstallmentDetail,
delInstallmentDetail
} from '@/api/invest/installmentDetail'
import {
getInstallmentHistory,
updateInstallmentHistory
} from '@/api/invest/installmentHistory'
import { getDicts } from '@/api/system/dict/data.js'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const status = ref('loadmore')
const postingStateList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const data = reactive({
form: {},
queryParams: {
name: null,
type: null,
time: '',
installmentHistoryId: null,
dealType: null,
dealCategory: null
}
})
const { queryParams,form} = toRefs(data)
onLoad((option) => {
queryParams.value.installmentHistoryId = option.id
queryParams.value.name = option.name
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
getList()
isShow.value = false
}
});
function loadmore() {
pageNum.value += 1
if (status.value == 'loadmore') {
getList()
}
}
function getList() {
status.value = 'loading'
listInstallmentDetail({ pageSize: 100, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
if (listData.value.length < res.total) {
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
status.value = 'nomore'
})
}
function getDict() {
// 交易类型
getDicts('posting_state').then(res => {
postingStateList.value = res.data
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
/** 总利息按钮操作 */
function handleUpdateInterest() {
let totalInterest = 0
for (let i = 0; i < listData.value.length; i++) {
if (listData.value[i].interest) {
totalInterest = totalInterest + listData.value[i].interest
}
}
getInstallmentHistory(queryParams.value.installmentHistoryId).then((response) => {
form.value = response.data
form.value.totalInterest = totalInterest
if (form.value.id != null) {
updateInstallmentHistory(form.value).then((response) => {
uni.showToast({
title: '总利息汇总成功!',
duration: 2000
});
})
}
})
}
function handleEdit(item) {
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${queryParams.value.installmentHistoryId}&name=${queryParams.value.name}` })
isShow.value = true
}
// function handleAdd() {
// uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/addEdit` })
// isShow.value = true
// }
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '你确定要删除吗',
success: function (res) {
if (res.confirm) {
delInstallmentDetail(item.id)
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/details?id=${queryParams.value.installmentHistoryId}&name=${queryParams.value.name}` })
} else if (res.cancel) {
console.log('取消');
}
}
});
}
</script>
<style lang="scss" scoped>
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -0,0 +1,206 @@
<template>
<view class="container" style="paddingBottom:1rpx;">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#333333"
title="信用卡分期账单还款明细"
>
</u-navbar>
<view class="section">
<view class="section-title">{{ title}}</view>
<view class="form-view">
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
<u-form-item label="还款日期" prop="repaymentDate" required @click="selectDate()">
<u--input v-model="form.repaymentDate" disabled disabledColor="#ffffff" placeholder="请选择还款日期" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="还款期数" prop="periods" required >
<u--input v-model="form.periods" placeholder="请填写还款期数"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="还款金额" prop="currentAmount" >
<u--input v-model="form.currentAmount" placeholder="请填写还款金额"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="应还本金" prop="principal" required >
<u--input v-model="form.principal" placeholder="请填写应还本金"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="利息" prop="interest" required >
<u--input v-model="form.interest" placeholder="请填写利息"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="入账状态" prop="postingStateName" required @click="handleShowTeam">
<u--input v-model="form.postingStateName" disabled disabledColor="#ffffff" placeholder="请选择入账状态"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="备注" prop="remark" labelPosition="top">
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
</u--form>
<view class="form-btn">
<u-button type="primary" text="提交" @click="submit"></u-button>
</view>
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showTeam" :columns="postingStateList" keyName="dictLabel" @cancel="handleCancel"
@confirm="handleConfirm"></u-picker>
<u-datetime-picker
:show="datePickShow"
mode="date"
ref="createTimeRef"
@cancel="datePickShow=false"
@confirm="datePickConfirm"
itemHeight="88"
></u-datetime-picker>
</view>
</template>
<script setup>
import {
getInstallmentDetail,
addInstallmentDetail,
updateInstallmentDetail
} from '@/api/invest/installmentDetail'
import { getDicts } from '@/api/system/dict/data.js'
const { proxy } = getCurrentInstance()
import dayjs from 'dayjs'
import {onLoad,onReady} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
const datePickShow = ref(false)
const showTeam = ref(false)
const title = ref("信用卡分期账单还款明细")
const postingStateList = ref([])
const data = reactive({
form: {},
rules: {
repaymentDate: [{ type: 'string', required: true, message: '还款日期不能为空', trigger: ['change', 'blur'] }],
// periods: [{ type: 'string', required: true, message: '还款期数不能为空', trigger: ['change', 'blur'] }],
// interest: [{ type: 'string', required: true, message: '利息不能为空', trigger: ['change', 'blur'] }],
// principal: [{ type: 'string', required: true, message: '应还本金不能为空', trigger: ['change', 'blur'] }],
postingStateName: [{ type: 'string', required: true, message: '入账状态不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
form.value.installmentHistoryId = option.installmentHistoryId
form.value.name = option.name
if(form.value.id!=null){
title.value="信用卡分期账单还款明细-修改"
}else{
title.value="信用卡分期账单还款明细-新增"
}
getDict()
})
onReady(() => {
form.value.createTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
})
function getDict() {
// 类型
getDicts('posting_state').then(res => {
postingStateList.value =[res.data]
})
if(form.value.id!=null){
getInstallmentDetail(form.value.id).then(res => {
form.value = res.data
// 类型
getDicts('posting_state').then(result => {
form.value.postingStateName=dictStr(form.value.postingState, result.data)
})
})
}
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function handleShowTeam() {
if (postingStateList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '入账状态为空 ', type: 'warning'
})
} else {
showTeam.value = true
}
}
function handleConfirm(e) {
form.value.postingStateName = e.value[0].dictLabel
form.value.postingState = e.value[0].dictValue
showTeam.value = false
}
function handleCancel() {
showTeam.value = false
}
function selectDate() {
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.createTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
datePickShow.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updateInstallmentDetail(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${form.value.installmentHistoryId}&name=${form.value.name}` })
}
})
})
}else {
addInstallmentDetail(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${form.value.installmentHistoryId}&name=${form.value.name}` })
}
})
})
}
})
}
</script>
<style lang="scss" scoped>
.section {
margin: 24rpx;
padding: 16rpx 24rpx;
background-color: #fff;
border-radius: 8rpx;
.section-title {
width: 360rpx;
color: #333333;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
}
.form-view {
padding: 20rpx 0rpx 0 10rpx;
.form-btn {
padding-top: 20rpx;
}
}
}
</style>

View File

@@ -0,0 +1,452 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.onlineLendName" border="false" type="select" @click="handleOnlineLend" placeholder="请选择信用卡" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="filter-title">结清状态</view>
<view class="state-list">
<view v-for="item in settleStateList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectStatus(item)">{{ item.dictLabel }}</view>
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
</view>
</view>
</u-transition>
</view>
</u-sticky>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header" @click="enterDetails(item)">
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.bankNameCode" size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">分期金额</text>
<text class="row-value">{{ item.installmentAmount }}</text>
</view>
<view class="item-row">
<text class="row-label">结清状态</text>
<text class="row-value">{{ dictStr(item.state, settleStateList) }}</text>
</view>
<view class="item-row">
<text class="row-label">分期日期</text>
<text class="row-value">{{ item.installmentDate }}</text>
</view>
<view class="item-row">
<text class="row-label">分期期数</text>
<text class="row-value">{{ item.period }}</text>
</view>
<view class="item-row">
<text class="row-label">已还期数</text>
<text class="row-value">{{ item.repaidPeriod }}</text>
</view>
<view class="item-row">
<text class="row-label">总利息</text>
<text class="row-value">{{ item.totalInterest }}</text>
</view>
<view class="item-row">
<text class="row-label">年化利率</text>
<text class="row-value">{{ item.interestRate }}</text>
</view>
<view class="item-row">
<text class="row-label">计算利率</text>
<text class="row-value">{{ item.calculateInterestRate }}</text>
</view>
<view class="item-row">
<text class="row-label">余额</text>
<text class="row-value">{{ item.balance }}</text>
</view>
<view class="item-row">
<text class="row-label">剩余本金</text>
<text class="row-value">{{ item.outstandingPrincipal }}</text>
</view>
<view class="item-row">
<text class="row-label">剩余利息</text>
<text class="row-value">{{ item.outstandingInterest }}</text>
</view>
<view class="item-row">
<text class="row-label">到期日期</text>
<text class="row-value">{{ item.dueDate }}</text>
</view>
<view class="item-row">
<text class="row-label">最近还款日</text>
<text class="row-value">{{ parseTime(item.repaymentDate, '{y}-{m}-{d}') }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">还款明细</view >
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
</u-list-item>
<view>
</view>
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
</u-list>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showOnlineLend" :columns="bankCardLendList" keyName="nameCode" @cancel="handleOnlineLendCancel"
@confirm="handleOnlineLendConfirm"></u-picker>
</view>
</template>
<script setup>
import {
listInstallmentHistory,
delInstallmentHistory
} from '@/api/invest/installmentHistory'
import { getDicts } from '@/api/system/dict/data.js'
import { listAccounts } from '@/api/invest/accounts'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const status = ref('loadmore')
const settleStateList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const showOnlineLend = ref(false)
const bankCardLendList = ref([])
const data = reactive({
filterPanel: false,
queryBankCardLendParams: {
pageNum: 1,
type: '2',
state: '1',
pageSize: 100
},
queryParams: {
name: null,
type: '2',
bankCardLendId: null,
state: '0'
}
})
const { filterPanel, queryBankCardLendParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
getList()
isShow.value = false
}
});
function loadmore() {
pageNum.value += 1
if (status.value == 'loadmore') {
getList()
}
}
function getList() {
status.value = 'loading'
listInstallmentHistory({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
if (listData.value.length < res.total) {
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
status.value = 'nomore'
})
}
function getDict() {
listAccounts(queryBankCardLendParams.value).then((response) => {
bankCardLendList.value = [response.rows]
})
// 账单状态
getDicts('settle_state').then(res => {
settleStateList.value = res.data
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function selectStatus(item) {
queryParams.value.state = item.dictValue
settleStateList.value.map(ele => {
if (ele.dictValue == item.dictValue) {
ele.selected = true
Reflect.set(ele, 'selected', true)
} else {
Reflect.set(ele, 'selected', false)
}
})
}
function handleOnlineLend() {
if (bankCardLendList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '网贷机构为空 ', type: 'warning'
})
} else {
showOnlineLend.value = true
}
}
function handleOnlineLendConfirm(e) {
queryParams.value.onlineLendName = e.value[0].nameCode
queryParams.value.bankCardLendId= e.value[0].id
showOnlineLend.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleOnlineLendCancel() {
showOnlineLend.value = false
}
function searchSubmit() {
pageNum.value = 1
listData.value = []
getList()
filterPanel.value = false
}
function searchBlur() {
pageNum.value = 1
listData.value = []
getList()
}
function resetQuery() {
queryParams.value.bankCardLendId = '',
queryParams.value.state= '0',
queryParams.value.type = '3'
settleStateList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
}
function enterDetails(item) {
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/details?id=${item.id}&name=${item.bankNameCode}` })
}
function handleEdit(item) {
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/addEdit?id=${item.id}` })
isShow.value = true
}
function handleAdd() {
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/addEdit` })
isShow.value = true
}
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '你确定要删除吗',
success: function (res) {
if (res.confirm) {
delInstallmentHistory(item.id)
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/list` })
} else if (res.cancel) {
console.log('取消');
}
}
});
}
</script>
<style lang="scss" scoped>
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -0,0 +1,187 @@
<template>
<view class="container" style="paddingBottom:1rpx;">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#333333"
title="征信记录查询"
>
</u-navbar>
<view class="section">
<view class="section-title">{{ title}}</view>
<view class="form-view">
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
<u-form-item label="查询机构" prop="name" required >
<u--input v-model="form.queryInstitution" placeholder="请填写查询机构"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="查询原因" prop="typeName" required @click="handleShowTeam">
<u--input v-model="form.typeName" disabled disabledColor="#ffffff" placeholder="请选择查询原因"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="查询日期" prop="queryDate" required @click="selectDate()">
<u--input v-model="form.queryDate" disabled disabledColor="#ffffff" placeholder="请选择查询日期" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="备注" prop="remark" required labelPosition="top">
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
</u--form>
<view class="form-btn">
<u-button type="primary" text="提交" @click="submit"></u-button>
</view>
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showTeam" :columns="typeList" keyName="dictLabel" @cancel="handleCancel"
@confirm="handleConfirm"></u-picker>
<u-datetime-picker
:show="datePickShow"
mode="date"
ref="createTimeRef"
@cancel="datePickShow=false"
@confirm="datePickConfirm"
itemHeight="88"
></u-datetime-picker>
</view>
</template>
<script setup>
import {
getCreditQueryRecord,
addCreditQueryRecord,
updateCreditQueryRecord
} from '@/api/invest/creditQueryRecord'
import { getDicts } from '@/api/system/dict/data.js'
const { proxy } = getCurrentInstance()
import dayjs from 'dayjs'
import {onLoad,onReady} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
const datePickShow = ref(false)
const showTeam = ref(false)
const title = ref("征信记录查询")
const typeList = ref([])
const data = reactive({
form: {},
rules: {
queryInstitution: [{ type: 'string', required: true, message: '查询机构不能为空', trigger: ['change', 'blur'] }],
queryDate: [{ type: 'string', required: true, message: '查询日期不能为空', trigger: ['change', 'blur'] }],
typeName: [{ type: 'string', required: true, message: '查询原因不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
if(form.value.id!=null){
title.value="征信记录查询-修改"
}else{
title.value="征信记录查询-新增"
}
getDict()
})
onReady(() => {
form.value.queryDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
})
function getDict() {
// 类型
getDicts('credit_report_type').then(res => {
typeList.value =[res.data]
})
if(form.value.id!=null){
getCreditQueryRecord(form.value.id).then(res => {
form.value = res.data
// 类型
getDicts('credit_report_type').then(result => {
form.value.typeName=dictStr(form.value.type, result.data)
})
})
}
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function handleShowTeam() {
if (typeList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '查询原因为空 ', type: 'warning'
})
} else {
showTeam.value = true
}
}
function handleConfirm(e) {
form.value.typeName = e.value[0].dictLabel
form.value.type = e.value[0].dictValue
showTeam.value = false
}
function handleCancel() {
showTeam.value = false
}
function selectDate() {
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.queryDate = dayjs(e.value).format("YYYY-MM-DD")
datePickShow.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updateCreditQueryRecord(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/list` })
}
})
})
}else {
addCreditQueryRecord(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/list` })
}
})
})
}
})
}
</script>
<style lang="scss" scoped>
.section {
margin: 24rpx;
padding: 16rpx 24rpx;
background-color: #fff;
border-radius: 8rpx;
.section-title {
width: 360rpx;
color: #333333;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
}
.form-view {
padding: 20rpx 0rpx 0 10rpx;
.form-btn {
padding-top: 20rpx;
}
}
}
</style>

View File

@@ -0,0 +1,83 @@
<template>
<view class="container" style="paddingBottom:1rpx;">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#333333"
title="征信查询记录统计"
>
</u-navbar>
<view class="section">
<u-cell-group>
<u-cell title="近1个月查询次数:" titleStyle="font-weight:bolder" :value="detailInfo.lastOneMonths"></u-cell>
<u-cell title="近2个月查询次数:" titleStyle="font-weight:bolder" :value="detailInfo.lastTwoMonths"></u-cell>
<u-cell title="近3个月查询次数" titleStyle="font-weight:bolder" :value="detailInfo.lastThreeMonths"></u-cell>
<u-cell title="近6个月查询次数" titleStyle="font-weight:bolder" :value="detailInfo.lastSixMonths"></u-cell>
<u-cell title="近1年查询次数:" titleStyle="font-weight:bolder" center :value="detailInfo.lastOneYears"> </u-cell>
<u-cell title="近2年查询次数:" titleStyle="font-weight:bolder" center :value="detailInfo.lastTwoYears"> </u-cell>
<u-cell title="总查询次数:" titleStyle="font-weight:bolder" center :value="detailInfo.lastAllYears"> </u-cell>
</u-cell-group>
</view>
<u-toast ref="uToast"></u-toast>
</view>
</template>
<script setup>
import { getCreditRecordAnalysis} from '@/api/invest/creditQueryRecord'
import {onLoad} from "@dcloudio/uni-app";
import {reactive ,toRefs,ref }from "vue";
const id = ref('')
const data = reactive({
detailInfo: {}
})
const {detailInfo} = toRefs(data)
onLoad((option) => {
id.value = option.id
getInfo()
})
function getInfo() {
const today = new Date()
const queryDateStart= today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
getCreditRecordAnalysis({queryDateStart: queryDateStart}).then(res => {
detailInfo.value = res.data
})
}
</script>
<style lang="scss" scoped>
.section {
margin: 24rpx;
padding: 16rpx 24rpx;
background-color: #fff;
border-radius: 8rpx;
.section-title {
width: 280rpx;
color: #333333;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
}
.content {
width: 647rpx;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: left;
}
.img-con {
display: flex;
flex-wrap: wrap;
gap: 20rpx
}
.form-view {
padding: 20rpx 0rpx 0 10rpx;
.form-btn {
padding-top: 20rpx;
}
}
}
</style>

View File

@@ -0,0 +1,97 @@
<template>
<view class="container" style="paddingBottom:1rpx;">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#333333"
title="征信查询记录详情"
>
</u-navbar>
<view class="section">
<u-cell-group>
<u-cell title="查询机构:" titleStyle="font-weight:bolder" :value="detailInfo.queryInstitution"></u-cell>
<u-cell title="查询日期:" titleStyle="font-weight:bolder" :value="detailInfo.queryDate"></u-cell>
<u-cell title="查询原因:" titleStyle="font-weight:bolder" :value="detailInfo.type"></u-cell>
<u-cell title="查询类型:" titleStyle="font-weight:bolder" :value="detailInfo.queryType"></u-cell>
<u-cell title="内容:" titleStyle="font-weight:bolder" center :value="detailInfo.remark"> </u-cell>
</u-cell-group>
</view>
<u-toast ref="uToast"></u-toast>
</view>
</template>
<script setup>
import { getCreditQueryRecord} from '@/api/invest/creditQueryRecord'
import { getDicts } from '@/api/system/dict/data.js'
import {onLoad} from "@dcloudio/uni-app";
import {reactive ,toRefs,ref,computed }from "vue";
const id = ref('')
const data = reactive({
detailInfo: {}
})
const {detailInfo} = toRefs(data)
onLoad((option) => {
id.value = option.id
getInfo()
})
function getInfo() {
getCreditQueryRecord(id.value).then(res => {
detailInfo.value = res.data
// 类型
getDicts('credit_report_type').then(result => {
detailInfo.value.type=dictStr(detailInfo.value.type, result.data)
})
// 类型
getDicts('credit_query_type').then(result => {
detailInfo.value.queryType=dictStr(detailInfo.value.queryType, result.data)
})
})
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
</script>
<style lang="scss" scoped>
.section {
margin: 24rpx;
padding: 16rpx 24rpx;
background-color: #fff;
border-radius: 8rpx;
.section-title {
width: 280rpx;
color: #333333;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
}
.content {
width: 647rpx;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: left;
}
.img-con {
display: flex;
flex-wrap: wrap;
gap: 20rpx
}
.form-view {
padding: 20rpx 0rpx 0 10rpx;
.form-btn {
padding-top: 20rpx;
}
}
}
</style>

View File

@@ -0,0 +1,411 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入查询机构" class="search-input"
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
<u-icon name="clock-fill" color="#666666" size="28" style="margin-left:10px" label="统计"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleQueryAnalysis()"></u-icon>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="filter-title">查询原因</view>
<view class="state-list">
<view v-for="item in typeList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectStatus(item)">{{ item.dictLabel }}</view>
</view>
<view class="filter-title">查询类型</view>
<view class="state-list">
<view v-for="item in queryTypeList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectQueryTypeList(item)">{{ item.dictLabel }}</view>
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
</view>
</view>
</u-transition>
</view>
</u-sticky>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header" @click="enterDetails(item)">
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.queryInstitution" size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">查询日期</text>
<text class="row-value">{{ item.queryDate }}</text>
</view>
<view class="item-row">
<text class="row-label">查询原因</text>
<text class="row-value">{{ dictStr(item.type, typeList) }}</text>
</view>
<view class="item-row">
<text class="row-label">查询类型</text>
<text class="row-value">{{ dictStr(item.queryType, queryTypeList) }}</text>
</view>
<view class="item-row">
<text class="row-label">备注</text>
<text class="row-value">{{ item.remark }}</text>
</view>
<view class="operate" >
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view > -->
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
</u-list-item>
<view>
</view>
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
</u-list>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
</view>
</template>
<script setup>
import {
listCreditQueryRecord,
delCreditQueryRecord
} from '@/api/invest/creditQueryRecord'
import { getDicts } from '@/api/system/dict/data.js'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const status = ref('loadmore')
const typeList = ref([])
const queryTypeList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const data = reactive({
filterPanel: false,
queryParams: {
queryInstitution: null,
type: null,
queryType: null
}
})
const { filterPanel, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
getList()
isShow.value = false
}
});
function loadmore() {
pageNum.value += 1
if (status.value == 'loadmore') {
getList()
}
}
function getList() {
status.value = 'loading'
listCreditQueryRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
if (listData.value.length < res.total) {
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
status.value = 'nomore'
})
}
function getDict() {
// 类型
getDicts('credit_report_type').then(res => {
typeList.value = res.data
})
// 类型
getDicts('credit_query_type').then(res => {
queryTypeList.value = res.data
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function selectStatus(item) {
queryParams.value.type = item.dictValue
typeList.value.map(ele => {
if (ele.dictValue == item.dictValue) {
ele.selected = true
Reflect.set(ele, 'selected', true)
} else {
Reflect.set(ele, 'selected', false)
}
})
}
function selectQueryTypeList(item) {
queryParams.value.queryType = item.dictValue
queryTypeList.value.map(ele => {
if (ele.dictValue == item.dictValue) {
ele.selected = true
Reflect.set(ele, 'selected', true)
} else {
Reflect.set(ele, 'selected', false)
}
})
}
function searchSubmit() {
pageNum.value = 1
listData.value = []
getList()
filterPanel.value = false
}
function searchBlur() {
pageNum.value = 1
listData.value = []
getList()
}
function resetQuery() {
queryParams.value.queryType = '',
queryParams.value.queryInstitution = ''
queryParams.value.type = ''
typeList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
queryTypeList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
}
function enterDetails(item) {
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/details?id=${item.id}` })
}
function handleEdit(item) {
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/addEdit?id=${item.id}` })
isShow.value = true
}
function handleAdd() {
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/addEdit` })
isShow.value = true
}
function handleQueryAnalysis() {
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/analysis` })
isShow.value = true
}
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '你确定要删除吗',
success: function (res) {
if (res.confirm) {
delCreditQueryRecord(item.id)
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/list` })
} else if (res.cancel) {
console.log('取消');
}
}
});
}
</script>
<style lang="scss" scoped>
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -0,0 +1,291 @@
<template>
<view class="container" style="paddingBottom:1rpx;">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#333333"
title="网贷账单"
>
</u-navbar>
<view class="section">
<view class="section-title">{{ title}}</view>
<view class="form-view">
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
<u-form-item label="网贷机构" prop="onlineLendName" required @click="handleOnlineLend">
<u--input v-model="form.onlineLendName" disabled disabledColor="#ffffff" placeholder="请选择网贷机构"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="借款金额" prop="installmentAmount" required >
<u--input v-model="form.installmentAmount" placeholder="请填写借款金额"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="借款日期" prop="installmentDate" required @click="selectDate()">
<u--input v-model="form.installmentDate" disabled disabledColor="#ffffff" placeholder="请选择借款日期" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="借款期数" prop="period" required >
<u--input v-model="form.period" placeholder="请填写借款期数"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="余额" prop="balance" required >
<u--input v-model="form.balance" placeholder="请填写余额"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="结清状态" prop="settleStateName" required @click="handleShowTeam">
<u--input v-model="form.settleStateName" disabled disabledColor="#ffffff" placeholder="请选择结清状态"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="总利息" prop="totalInterest" >
<u--input v-model="form.totalInterest" placeholder="请填写总利息"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="已还期数" prop="repaidPeriod" >
<u--input v-model="form.repaidPeriod" placeholder="请填写已还期数"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="利率" prop="interestRate" >
<u--input v-model="form.interestRate" placeholder="请填写利率"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="关闭日期" prop="closeDate" @click="selectCloseDate()">
<u--input v-model="form.closeDate" disabled disabledColor="#ffffff" placeholder="请选择关闭日期" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="备注" prop="remark" labelPosition="top">
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
</u--form>
<view class="form-btn">
<u-button type="primary" text="提交" @click="submit"></u-button>
</view>
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showTeam" :columns="settleStateList" keyName="dictLabel" @cancel="handleCancel"
@confirm="handleConfirm"></u-picker>
<u-datetime-picker
:show="datePickShow"
mode="date"
ref="createTimeRef"
@cancel="datePickShow=false"
@confirm="datePickConfirm"
itemHeight="88"
></u-datetime-picker>
<u-datetime-picker
:show="closeDatePickShow"
mode="date"
ref="closeTimeRef"
@cancel="closeDatePickShow=false"
@confirm="closeDatePickConfirm"
itemHeight="88"
></u-datetime-picker>
<u-picker itemHeight="88" :show="showOnlineLend" :columns="bankCardLendList" keyName="nameCode" @cancel="handleOnlineLendCancel"
@confirm="handleOnlineLendConfirm"></u-picker>
</view>
</template>
<script setup>
import {
getInstallmentHistory,
addInstallmentHistory,
updateInstallmentHistory
} from '@/api/invest/installmentHistory'
import { getDicts } from '@/api/system/dict/data.js'
import { listAccounts } from '@/api/invest/accounts'
const { proxy } = getCurrentInstance()
import dayjs from 'dayjs'
import {onLoad,onReady} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
const datePickShow = ref(false)
const showTeam = ref(false)
const showOnlineLend = ref(false)
const title = ref("网贷账单")
const bankCardLendList = ref([])
const settleStateList = ref([])
const data = reactive({
form: {
id: null,
name: null,
type: '3',
code: null,
balance: null,
bankCardLendId: null,
installmentAmount: null,
installmentDate: null,
period: null,
repaidPeriod: null,
totalInterest: null,
interestRate: null,
dueDate: null,
closeDate: null,
state: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null,
remark: null
},
queryBankCardLendParams: {
pageNum: 1,
type: '3',
state: '1',
pageSize: 1000
},
rules: {
onlineLendName: [{ type: 'string', required: true, message: '网贷机构不能为空', trigger: ['change', 'blur'] }],
billDate: [{ type: 'string', required: true, message: '借款日期不能为空', trigger: ['change', 'blur'] }],
settleStateName: [{ type: 'string', required: true, message: '结清状态不能为空', trigger: ['change', 'blur'] }],
billAmount: [{ type: 'string', required: true, message: '借款金额不能为空', trigger: ['change', 'blur'] }],
period: [{ type: 'string', required: true, message: '借款期数不能为空', trigger: ['change', 'blur'] }],
balance: [{ type: 'string', required: true, message: '余额不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryBankCardLendParams, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
if(form.value.id!=null){
title.value="网贷账单-修改"
}else{
title.value="网贷账单-新增"
}
getDict()
})
onReady(() => {
form.value.installmentDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
})
function getDict() {
// 账单状态
getDicts('settle_state').then(res => {
settleStateList.value =[res.data]
})
listAccounts(queryBankCardLendParams.value).then((response) => {
bankCardLendList.value = [response.rows]
})
if(form.value.id!=null){
getInstallmentHistory(form.value.id).then(res => {
form.value = res.data
form.value.onlineLendName = res.data.bankName
// 类型
getDicts('settle_state').then(result => {
form.value.settleStateName=dictStr(form.value.state, result.data)
})
})
}
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function handleShowTeam() {
if (settleStateList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '结清状态为空 ', type: 'warning'
})
} else {
showTeam.value = true
}
}
function handleConfirm(e) {
form.value.settleStateName = e.value[0].dictLabel
form.value.state = e.value[0].dictValue
showTeam.value = false
}
function handleCancel() {
showTeam.value = false
}
function handleOnlineLend() {
if (bankCardLendList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '网贷机构为空 ', type: 'warning'
})
} else {
showOnlineLend.value = true
}
}
function handleOnlineLendConfirm(e) {
form.value.onlineLendName = e.value[0].nameCode
form.value.bankCardLendId= e.value[0].id
showOnlineLend.value = false
}
function handleOnlineLendCancel() {
showOnlineLend.value = false
}
function selectDate() {
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.installmentDate = dayjs(e.value).format("YYYY-MM-DD")
datePickShow.value = false
}
function selectCloseDate() {
closeDatePickShow.value = true
proxy.$refs['closeTimeRef'].innerValue = new Date().getTime()
}
function closeDatePickConfirm(e) {
form.value.closeDate = dayjs(e.value).format("YYYY-MM-DD")
closeDatePickShow.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updateInstallmentHistory(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` })
}
})
})
}else {
addInstallmentHistory(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` })
}
})
})
}
})
}
</script>
<style lang="scss" scoped>
.section {
margin: 24rpx;
padding: 16rpx 24rpx;
background-color: #fff;
border-radius: 8rpx;
.section-title {
width: 360rpx;
color: #333333;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
}
.form-view {
padding: 20rpx 0rpx 0 10rpx;
.form-btn {
padding-top: 20rpx;
}
}
}
</style>

View File

@@ -0,0 +1,363 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.name" border="false" disabled ="false" type="select" v-show="true" >
</u-input>
<!-- <u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon> -->
<u-icon name="checkmark-circle-fill" color="#666666" size="28" style="margin-left:10px" label="总利息汇总"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleUpdateInterest()"></u-icon>
</view>
</u-sticky>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-row">
<text class="row-label">还款日期</text>
<text class="row-value">{{ item.repaymentDate }}</text>
</view>
<view class="item-row">
<text class="row-label">入账状态</text>
<text class="row-value">{{ dictStr(item.postingState, postingStateList) }}</text>
</view>
<view class="item-row">
<text class="row-label">还款期数</text>
<text class="row-value">{{ item.periods }}</text>
</view>
<view class="item-row">
<text class="row-label">还款金额</text>
<text class="row-value">{{ item.currentAmount }}</text>
</view>
<view class="item-row">
<text class="row-label">应还本金</text>
<text class="row-value">{{ item.principal }}</text>
</view>
<view class="item-row">
<text class="row-label">利息</text>
<text class="row-value">{{ item.interest }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
</u-list-item>
<view>
</view>
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
</u-list>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
</view>
</template>
<script setup>
import {
listInstallmentDetail,
delInstallmentDetail
} from '@/api/invest/installmentDetail'
import {
getInstallmentHistory,
updateInstallmentHistory
} from '@/api/invest/installmentHistory'
import { getDicts } from '@/api/system/dict/data.js'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const status = ref('loadmore')
const postingStateList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const data = reactive({
form: {},
queryParams: {
name: null,
type: null,
time: '',
installmentHistoryId: null,
dealType: null,
dealCategory: null
}
})
const { queryParams,form} = toRefs(data)
onLoad((option) => {
queryParams.value.installmentHistoryId = option.id
queryParams.value.name = option.name
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
getList()
isShow.value = false
}
});
function loadmore() {
pageNum.value += 1
if (status.value == 'loadmore') {
getList()
}
}
function getList() {
status.value = 'loading'
listInstallmentDetail({ pageSize: 100, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
if (listData.value.length < res.total) {
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
status.value = 'nomore'
})
}
function getDict() {
// 交易类型
getDicts('posting_state').then(res => {
postingStateList.value = res.data
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
/** 总利息按钮操作 */
function handleUpdateInterest() {
let totalInterest = 0
for (let i = 0; i < listData.value.length; i++) {
if (listData.value[i].interest) {
totalInterest = totalInterest + listData.value[i].interest
}
}
getInstallmentHistory(queryParams.value.installmentHistoryId).then((response) => {
form.value = response.data
form.value.totalInterest = totalInterest
if (form.value.id != null) {
updateInstallmentHistory(form.value).then((response) => {
uni.showToast({
title: '总利息汇总成功!',
duration: 2000
});
})
}
})
}
function handleEdit(item) {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${queryParams.value.installmentHistoryId}&name=${queryParams.value.name}` })
isShow.value = true
}
// function handleAdd() {
// uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/addEdit` })
// isShow.value = true
// }
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '你确定要删除吗',
success: function (res) {
if (res.confirm) {
delInstallmentDetail(item.id)
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/details?id=${queryParams.value.installmentHistoryId}&name=${queryParams.value.name}` })
} else if (res.cancel) {
console.log('取消');
}
}
});
}
</script>
<style lang="scss" scoped>
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -0,0 +1,204 @@
<template>
<view class="container" style="paddingBottom:1rpx;">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#333333"
title="网贷账单还款明细"
>
</u-navbar>
<view class="section">
<view class="section-title">{{ title}}</view>
<view class="form-view">
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
<u-form-item label="还款日期" prop="repaymentDate" required @click="selectDate()">
<u--input v-model="form.repaymentDate" disabled disabledColor="#ffffff" placeholder="请选择还款日期" inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="还款期数" prop="periods" required >
<u--input v-model="form.periods" placeholder="请填写还款期数"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="还款金额" prop="currentAmount" >
<u--input v-model="form.currentAmount" placeholder="请填写还款金额"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="应还本金" prop="principal" required >
<u--input v-model="form.principal" placeholder="请填写应还本金"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="利息" prop="interest" required >
<u--input v-model="form.interest" placeholder="请填写利息"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="入账状态" prop="postingStateName" required @click="handleShowTeam">
<u--input v-model="form.postingStateName" disabled disabledColor="#ffffff" placeholder="请选择入账状态"
inputAlign="right" border="none"></u--input>
<u-icon slot="right" name="arrow-down"></u-icon>
</u-form-item>
<u-form-item label="备注" prop="remark" labelPosition="top">
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
</u-form-item>
</u--form>
<view class="form-btn">
<u-button type="primary" text="提交" @click="submit"></u-button>
</view>
</view>
</view>
<u-toast ref="uToast"></u-toast>
<u-picker itemHeight="88" :show="showTeam" :columns="postingStateList" keyName="dictLabel" @cancel="handleCancel"
@confirm="handleConfirm"></u-picker>
<u-datetime-picker
:show="datePickShow"
mode="date"
ref="createTimeRef"
@cancel="datePickShow=false"
@confirm="datePickConfirm"
itemHeight="88"
></u-datetime-picker>
</view>
</template>
<script setup>
import {
getInstallmentDetail,
addInstallmentDetail,
updateInstallmentDetail
} from '@/api/invest/installmentDetail'
import { getDicts } from '@/api/system/dict/data.js'
const { proxy } = getCurrentInstance()
import dayjs from 'dayjs'
import {onLoad,onReady} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
const datePickShow = ref(false)
const showTeam = ref(false)
const title = ref("网贷账单还款明细")
const postingStateList = ref([])
const data = reactive({
form: {},
rules: {
repaymentDate: [{ type: 'string', required: true, message: '还款日期不能为空', trigger: ['change', 'blur'] }],
// periods: [{ type: 'string', required: true, message: '还款期数不能为空', trigger: ['change', 'blur'] }],
// interest: [{ type: 'string', required: true, message: '利息不能为空', trigger: ['change', 'blur'] }],
// principal: [{ type: 'string', required: true, message: '应还本金不能为空', trigger: ['change', 'blur'] }],
postingStateName: [{ type: 'string', required: true, message: '入账状态不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
form.value.installmentHistoryId = option.installmentHistoryId
form.value.name = option.name
if(form.value.id!=null){
title.value="网贷账单还款明细-修改"
}else{
title.value="网贷账单还款明细-新增"
}
getDict()
})
onReady(() => {
form.value.createTime = dayjs(new Date().getTime()).format("YYYY-MM-DD HH:mm:ss")
})
function getDict() {
// 类型
getDicts('posting_state').then(res => {
postingStateList.value =[res.data]
})
if(form.value.id!=null){
getInstallmentDetail(form.value.id).then(res => {
form.value = res.data
// 类型
getDicts('posting_state').then(result => {
form.value.postingStateName=dictStr(form.value.postingState, result.data)
})
})
}
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function handleShowTeam() {
if (postingStateList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '入账状态为空 ', type: 'warning'
})
} else {
showTeam.value = true
}
}
function handleConfirm(e) {
form.value.postingStateName = e.value[0].dictLabel
form.value.postingState = e.value[0].dictValue
showTeam.value = false
}
function handleCancel() {
showTeam.value = false
}
function selectDate() {
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.createTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
datePickShow.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updateInstallmentDetail(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${form.value.installmentHistoryId}&name=${form.value.name}` })
}
})
})
}else {
addInstallmentDetail(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${queryParams.value.installmentHistoryId}&name=${queryParams.value.name}` })
}
})
})
}
})
}
</script>
<style lang="scss" scoped>
.section {
margin: 24rpx;
padding: 16rpx 24rpx;
background-color: #fff;
border-radius: 8rpx;
.section-title {
width: 360rpx;
color: #333333;
line-height: 44rpx;
font-size: 30rpx;
border-left: 6rpx solid #2681FF;
padding-left: 26rpx;
}
.form-view {
padding: 20rpx 0rpx 0 10rpx;
.form-btn {
padding-top: 20rpx;
}
}
}
</style>

View File

@@ -0,0 +1,452 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.onlineLendName" border="false" type="select" @click="handleOnlineLend" placeholder="请选择网贷机构" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="filter-title">结清状态</view>
<view class="state-list">
<view v-for="item in settleStateList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectStatus(item)">{{ item.dictLabel }}</view>
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
</view>
</view>
</u-transition>
</view>
</u-sticky>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header" @click="enterDetails(item)">
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.bankNameCode" size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">借款金额</text>
<text class="row-value">{{ item.installmentAmount }}</text>
</view>
<view class="item-row">
<text class="row-label">结清状态</text>
<text class="row-value">{{ dictStr(item.state, settleStateList) }}</text>
</view>
<view class="item-row">
<text class="row-label">借款日期</text>
<text class="row-value">{{ item.installmentDate }}</text>
</view>
<view class="item-row">
<text class="row-label">借款期数</text>
<text class="row-value">{{ item.period }}</text>
</view>
<view class="item-row">
<text class="row-label">已还期数</text>
<text class="row-value">{{ item.repaidPeriod }}</text>
</view>
<view class="item-row">
<text class="row-label">总利息</text>
<text class="row-value">{{ item.totalInterest }}</text>
</view>
<view class="item-row">
<text class="row-label">年化利率</text>
<text class="row-value">{{ item.interestRate }}</text>
</view>
<view class="item-row">
<text class="row-label">计算利率</text>
<text class="row-value">{{ item.calculateInterestRate }}</text>
</view>
<view class="item-row">
<text class="row-label">余额</text>
<text class="row-value">{{ item.balance }}</text>
</view>
<view class="item-row">
<text class="row-label">剩余本金</text>
<text class="row-value">{{ item.outstandingPrincipal }}</text>
</view>
<view class="item-row">
<text class="row-label">剩余利息</text>
<text class="row-value">{{ item.outstandingInterest }}</text>
</view>
<view class="item-row">
<text class="row-label">到期日期</text>
<text class="row-value">{{ item.dueDate }}</text>
</view>
<view class="item-row">
<text class="row-label">最近还款日</text>
<text class="row-value">{{ parseTime(item.repaymentDate, '{y}-{m}-{d}') }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">还款明细</view >
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>
</view>
</u-list-item>
<view>
</view>
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
</u-list>
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
<u-picker itemHeight="88" :show="showOnlineLend" :columns="bankCardLendList" keyName="nameCode" @cancel="handleOnlineLendCancel"
@confirm="handleOnlineLendConfirm"></u-picker>
</view>
</template>
<script setup>
import {
listInstallmentHistory,
delInstallmentHistory
} from '@/api/invest/installmentHistory'
import { getDicts } from '@/api/system/dict/data.js'
import { listAccounts } from '@/api/invest/accounts'
import {onLoad,onShow} from "@dcloudio/uni-app";
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const status = ref('loadmore')
const settleStateList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const showOnlineLend = ref(false)
const bankCardLendList = ref([])
const data = reactive({
filterPanel: false,
queryBankCardLendParams: {
pageNum: 1,
type: '3',
state: '1',
pageSize: 100
},
queryParams: {
name: null,
type: '3',
bankCardLendId: null,
state: '0'
}
})
const { filterPanel, queryBankCardLendParams, queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getDict()
getList()
});
onShow(() => {
if (isShow.value) {
getList()
isShow.value = false
}
});
function loadmore() {
pageNum.value += 1
if (status.value == 'loadmore') {
getList()
}
}
function getList() {
status.value = 'loading'
listInstallmentHistory({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
listData.value = listData.value.concat(res.rows)
if (listData.value.length < res.total) {
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
status.value = 'nomore'
})
}
function getDict() {
listAccounts(queryBankCardLendParams.value).then((response) => {
bankCardLendList.value = [response.rows]
})
// 账单状态
getDicts('settle_state').then(res => {
settleStateList.value = res.data
})
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
settingPickShow.value = false
}
function settingCancel() {
settingPickShow.value = false
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function selectStatus(item) {
queryParams.value.state = item.dictValue
settleStateList.value.map(ele => {
if (ele.dictValue == item.dictValue) {
ele.selected = true
Reflect.set(ele, 'selected', true)
} else {
Reflect.set(ele, 'selected', false)
}
})
}
function handleOnlineLend() {
if (bankCardLendList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '网贷机构为空 ', type: 'warning'
})
} else {
showOnlineLend.value = true
}
}
function handleOnlineLendConfirm(e) {
queryParams.value.onlineLendName = e.value[0].nameCode
queryParams.value.bankCardLendId= e.value[0].id
showOnlineLend.value = false
pageNum.value = 1
listData.value = []
getList()
}
function handleOnlineLendCancel() {
showOnlineLend.value = false
}
function searchSubmit() {
pageNum.value = 1
listData.value = []
getList()
filterPanel.value = false
}
function searchBlur() {
pageNum.value = 1
listData.value = []
getList()
}
function resetQuery() {
queryParams.value.bankCardLendId = '',
queryParams.value.state= '0',
queryParams.value.type = '3'
settleStateList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
}
function enterDetails(item) {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/details?id=${item.id}&name=${item.bankNameCode}` })
}
function handleEdit(item) {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/addEdit?id=${item.id}` })
isShow.value = true
}
function handleAdd() {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/addEdit` })
isShow.value = true
}
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '你确定要删除吗',
success: function (res) {
if (res.confirm) {
delInstallmentHistory(item.id)
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/list` })
} else if (res.cancel) {
console.log('取消');
}
}
});
}
</script>
<style lang="scss" scoped>
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;
color: #333333;
margin-right: 36rpx;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
}
}
.operate {
display: flex;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@@ -3,10 +3,7 @@
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入标题" class="search-input"
@blur="searchBlur">
<template slot="prefix">
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
</template>
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
@@ -49,7 +46,7 @@
<text class="row-value">{{ item.remark }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="enterDetails(item)">查看</view >
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view > -->
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
</view>

View File

@@ -2,7 +2,7 @@
<view class="work-container">
<!-- 宫格组件 -->
<uni-section title="常用功能" type="line"></uni-section>
<uni-section title="常用功能" v-show="auth.hasPermi('invest:accountDealRecord:list')" type="line"></uni-section>
<view class="grid-body">
<uni-grid :column="4" :showBorder="false">
<uni-grid-item v-for="(item, index) in commonGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
@@ -79,9 +79,10 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
{ path: '/pages/work/accounts/creditTransferRecord/list', text: '信用卡还款', icon: 'arrow-left', permission: 'invest:accountsTransferRecord:list' },
{ path: '/pages/work/accounts/debitTransferRecord/list', text: '储蓄账户记账', icon: 'tune', permission: 'invest:accountsTransferRecord:list' },
{ path: '/pages/work/accounts/accounts/commonList', text: '记账账户', icon: 'staff', permission: 'invest:accounts:list' },
{ path: '/pages/page1/page1', text: '网贷账单', icon: 'settings', permission: 'invest:installmentHistory:list' },
{ path: '/pages/page1/page1', text: '信用卡分期账单', icon: 'bars', permission: 'invest:installmentHistory:list' },
{ path: '/pages/page1/page1', text: '征信查询记录', icon: 'search', permission: 'invest:creditQueryRecord:list' }
{ path: '/pages/work/bill/creditCardBill/list', text: '信用卡账单', icon: 'list', permission: 'invest:creditCardBill:list' },
{ path: '/pages/work/bill/onlineLendHistory/list', text: '网贷账单', icon: 'settings', permission: 'invest:installmentHistory:list' },
{ path: '/pages/work/bill/creditInstallmentHistory/list', text: '信用卡分期账单', icon: 'bars', permission: 'invest:installmentHistory:list' },
{ path: '/pages/work/bill/creditQueryRecord/list', text: '征信查询记录', icon: 'search', permission: 'invest:creditQueryRecord:list' }
])
const baseGridList=ref([
{ path: '/pages/work/base/pos/index', text: 'pos机管理', icon: 'shop-filled', permission: 'invest:posmachine:list' },
@@ -94,11 +95,11 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
const billGridList=ref([
{ path: '/pages/page1/page1', text: '期货账单', icon: 'map', permission: 'invest:futureStocksBill:list' },
{ path: '/pages/page1/page1', text: '股票账单', icon: 'paperplane', permission: 'invest:futureStocksBill:list' },
{ path: '/pages/page1/page1', text: '网贷账单', icon: 'settings', permission: 'invest:installmentHistory:list' },
{ path: '/pages/page1/page1', text: '信用卡账单', icon: 'list', permission: 'invest:creditCardBill:list' },
{ path: '/pages/page1/page1', text: '信用卡分期账单', icon: 'bars', permission: 'invest:installmentHistory:list' },
{ path: '/pages/work/bill/onlineLendHistory/list', text: '网贷账单', icon: 'settings', permission: 'invest:installmentHistory:list' },
{ path: '/pages/work/bill/creditCardBill/list', text: '信用卡账单', icon: 'list', permission: 'invest:creditCardBill:list' },
{ path: '/pages/work/bill/creditInstallmentHistory/list', text: '信用卡分期账单', icon: 'bars', permission: 'invest:installmentHistory:list' },
{ path: '/pages/page1/page1', text: '人情账单', icon: 'staff-filled', permission: 'invest:installmentHistory:list' },
{ path: '/pages/page1/page1', text: '征信查询记录', icon: 'search', permission: 'invest:creditQueryRecord:list' }
{ path: '/pages/work/bill/creditQueryRecord/list', text: '征信查询记录', icon: 'search', permission: 'invest:creditQueryRecord:list' }
])
const accountGridList=ref([
{ path: '/pages/work/accounts/accounts/list', text: '记账账户', icon: 'staff', permission: 'invest:accounts:list' },