feat: 银行基础信息管理,储蓄卡、信用卡修改。
This commit is contained in:
44
src/api/invest/bankBaseInfo.js
Normal file
44
src/api/invest/bankBaseInfo.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询银行基础信息列表
|
||||||
|
export function listBankBaseInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/invest/bankBaseInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询银行基础信息详细
|
||||||
|
export function getBankBaseInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/invest/bankBaseInfo/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增银行基础信息
|
||||||
|
export function addBankBaseInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/invest/bankBaseInfo',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改银行基础信息
|
||||||
|
export function updateBankBaseInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/invest/bankBaseInfo',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除银行基础信息
|
||||||
|
export function delBankBaseInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/invest/bankBaseInfo/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -577,6 +577,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
|
{
|
||||||
|
"path": "pages/work/base/bankBaseInfo/list",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "银行基础信息管理"
|
||||||
|
}
|
||||||
|
} ,
|
||||||
|
{
|
||||||
|
"path": "pages/work/base/bankBaseInfo/details",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "银行基础信息详情"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{
|
||||||
|
"path": "pages/work/base/bankBaseInfo/addEdit",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "银行基础信息管理"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,
|
||||||
{
|
{
|
||||||
"path": "pages/work/bill/creditQueryRecord/list",
|
"path": "pages/work/bill/creditQueryRecord/list",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
272
src/pages/work/base/bankBaseInfo/addEdit.vue
Normal file
272
src/pages/work/base/bankBaseInfo/addEdit.vue
Normal file
@@ -0,0 +1,272 @@
|
|||||||
|
<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="bankName" required>
|
||||||
|
<u--input v-model="form.bankName" placeholder="请填写银行全称"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="银行简称" prop="bankShortName" required>
|
||||||
|
<u--input v-model="form.bankShortName" placeholder="请填写银行简称"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="银行类型" required prop="bankTypeName" @click="handleShowBankType">
|
||||||
|
<u--input v-model="form.bankTypeName" 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="multiAccountConsolidatedName" required @click="handleShowAccounting">
|
||||||
|
<u--input v-model="form.multiAccountConsolidatedName" 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="englishShortName">
|
||||||
|
<u--input v-model="form.englishShortName" placeholder="请填写英文简称"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="归属省份" prop="province">
|
||||||
|
<u--input v-model="form.province" placeholder="请填写归属省份"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="归属城市" prop="city">
|
||||||
|
<u--input v-model="form.city" placeholder="请填写归属城市"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="统一社会信用代码" prop="unifiedCreditCode">
|
||||||
|
<u--input v-model="form.unifiedCreditCode" placeholder="请填写统一社会信用代码"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="排序" prop="orderNum">
|
||||||
|
<u--input v-model.number="form.orderNum" type="number" placeholder="请填写排序"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</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="showBankType" :columns="bankTypeList" keyName="dictLabel" @cancel="handleBankTypeCancel"
|
||||||
|
@confirm="handleBankTypeConfirm"></u-picker>
|
||||||
|
<u-picker itemHeight="88" :show="showAccounting" :columns="accountingList" keyName="dictLabel" @cancel="handleAccountingCancel"
|
||||||
|
@confirm="handleAccountingConfirm"></u-picker>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getBankBaseInfo, addBankBaseInfo, updateBankBaseInfo } from '@/api/invest/bankBaseInfo'
|
||||||
|
import { getDicts } from '@/api/system/dict/data.js'
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
import { reactive, toRefs, ref, getCurrentInstance } from "vue";
|
||||||
|
|
||||||
|
const showBankType = ref(false)
|
||||||
|
const showAccounting = ref(false)
|
||||||
|
const title = ref("银行基础信息管理")
|
||||||
|
const bankTypeList = ref([])
|
||||||
|
const accountingList = ref([])
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {
|
||||||
|
id: null,
|
||||||
|
bankName: null,
|
||||||
|
bankShortName: null,
|
||||||
|
bankType: null,
|
||||||
|
bankTypeName: null,
|
||||||
|
englishShortName: null,
|
||||||
|
province: null,
|
||||||
|
city: null,
|
||||||
|
unifiedCreditCode: null,
|
||||||
|
multiAccountConsolidated: '0',
|
||||||
|
multiAccountConsolidatedName: null,
|
||||||
|
orderNum: 0,
|
||||||
|
remark: null
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
bankName: [{ type: 'string', required: true, message: '银行全称不能为空', trigger: ['change', 'blur'] }],
|
||||||
|
bankShortName: [{ type: 'string', required: true, message: '银行简称不能为空', trigger: ['change', 'blur'] }],
|
||||||
|
bankTypeName: [{ type: 'string', required: true, message: '银行类型不能为空', trigger: ['change', 'blur'] }],
|
||||||
|
multiAccountConsolidatedName: [{ 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()
|
||||||
|
})
|
||||||
|
|
||||||
|
function getDict() {
|
||||||
|
// 银行类型
|
||||||
|
getDicts('bank_type').then(res => {
|
||||||
|
bankTypeList.value = [res.data]
|
||||||
|
})
|
||||||
|
// 是否合并出账
|
||||||
|
getDicts('is_accounting').then(res => {
|
||||||
|
accountingList.value = [res.data]
|
||||||
|
})
|
||||||
|
|
||||||
|
if (form.value.id != null) {
|
||||||
|
getBankBaseInfo(form.value.id).then(res => {
|
||||||
|
form.value = res.data
|
||||||
|
|
||||||
|
// 银行类型
|
||||||
|
getDicts('bank_type').then(result => {
|
||||||
|
form.value.bankTypeName = dictStr(form.value.bankType, result.data)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 是否合并出账
|
||||||
|
getDicts('is_accounting').then(result => {
|
||||||
|
form.value.multiAccountConsolidatedName = dictStr(form.value.multiAccountConsolidated, result.data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function dictStr(val, arr) {
|
||||||
|
let str = ''
|
||||||
|
arr.map(item => {
|
||||||
|
if (item.dictValue === val) {
|
||||||
|
str = item.dictLabel
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleShowBankType() {
|
||||||
|
if (bankTypeList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '银行类型为空', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showBankType.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleBankTypeConfirm(e) {
|
||||||
|
form.value.bankTypeName = e.value[0].dictLabel
|
||||||
|
form.value.bankType = e.value[0].dictValue
|
||||||
|
showBankType.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleBankTypeCancel() {
|
||||||
|
showBankType.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleShowAccounting() {
|
||||||
|
if (accountingList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '信用卡多账户合并出账为空', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showAccounting.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleAccountingConfirm(e) {
|
||||||
|
form.value.multiAccountConsolidatedName = e.value[0].dictLabel
|
||||||
|
form.value.multiAccountConsolidated = e.value[0].dictValue
|
||||||
|
showAccounting.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleAccountingCancel() {
|
||||||
|
showAccounting.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function submit() {
|
||||||
|
proxy.$refs['uForm'].validate().then(() => {
|
||||||
|
if (form.value.id != null) {
|
||||||
|
updateBankBaseInfo(form.value).then(res => {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '修改成功', complete() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addBankBaseInfo(form.value).then(res => {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '新增成功', complete() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.section {
|
||||||
|
margin: 24rpx;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
padding: 16rpx 24rpx;
|
||||||
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 1.2;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
width: 6rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 3rpx;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-view {
|
||||||
|
padding: 24rpx;
|
||||||
|
|
||||||
|
.form-btn {
|
||||||
|
padding-top: 16rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.form-btn .u-button {
|
||||||
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
||||||
|
border: none !important;
|
||||||
|
border-radius: 24rpx !important;
|
||||||
|
height: 80rpx !important;
|
||||||
|
box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.4) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-btn .u-button__text {
|
||||||
|
font-size: 30rpx !important;
|
||||||
|
font-weight: 500 !important;
|
||||||
|
letter-spacing: 2rpx !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
267
src/pages/work/base/bankBaseInfo/details.vue
Normal file
267
src/pages/work/base/bankBaseInfo/details.vue
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<u-navbar
|
||||||
|
leftIconSize="40rpx"
|
||||||
|
leftIconColor="#333333"
|
||||||
|
title="银行基础信息详情"
|
||||||
|
>
|
||||||
|
</u-navbar>
|
||||||
|
|
||||||
|
<view class="detail-card">
|
||||||
|
<view class="card-header">
|
||||||
|
<view class="header-icon">
|
||||||
|
<uni-icons type="home-filled" size="24" color="#ffffff"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="header-info">
|
||||||
|
<text class="bank-name">{{ detailInfo.bankName }}<text class="bank-short-name" v-if="detailInfo.bankShortName">({{ detailInfo.bankShortName }})</text></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="card-body">
|
||||||
|
<view class="info-section">
|
||||||
|
<view class="section-title">
|
||||||
|
<view class="title-icon"></view>
|
||||||
|
<text>基本信息</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-list">
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">银行全称</text>
|
||||||
|
<text class="item-value">{{ detailInfo.bankName || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">银行简称</text>
|
||||||
|
<text class="item-value">{{ detailInfo.bankShortName || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">银行类型</text>
|
||||||
|
<text class="item-value">{{ detailInfo.bankTypeText || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">英文简称</text>
|
||||||
|
<text class="item-value">{{ detailInfo.englishShortName || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">信用卡多账户合并出账</text>
|
||||||
|
<text class="item-value">{{ detailInfo.multiAccountConsolidatedText || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">排序</text>
|
||||||
|
<text class="item-value orange">{{ detailInfo.orderNum }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="info-section">
|
||||||
|
<view class="section-title">
|
||||||
|
<view class="title-icon"></view>
|
||||||
|
<text>归属信息</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-list">
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">归属省份</text>
|
||||||
|
<text class="item-value">{{ detailInfo.province || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">归属城市</text>
|
||||||
|
<text class="item-value">{{ detailInfo.city || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">统一社会信用代码</text>
|
||||||
|
<text class="item-value">{{ detailInfo.unifiedCreditCode || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="info-section" v-if="detailInfo.remark">
|
||||||
|
<view class="section-title">
|
||||||
|
<view class="title-icon"></view>
|
||||||
|
<text>备注</text>
|
||||||
|
</view>
|
||||||
|
<view class="remark-content">
|
||||||
|
<text>{{ detailInfo.remark }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<u-toast ref="uToast"></u-toast>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getBankBaseInfo } from '@/api/invest/bankBaseInfo'
|
||||||
|
import { getDicts } from '@/api/system/dict/data.js'
|
||||||
|
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() {
|
||||||
|
getBankBaseInfo(id.value).then(res => {
|
||||||
|
detailInfo.value = res.data
|
||||||
|
|
||||||
|
// 银行类型
|
||||||
|
getDicts('bank_type').then(result => {
|
||||||
|
detailInfo.value.bankTypeText = dictStr(detailInfo.value.bankType, result.data)
|
||||||
|
})
|
||||||
|
|
||||||
|
// 是否合并出账
|
||||||
|
getDicts('is_accounting').then(result => {
|
||||||
|
detailInfo.value.multiAccountConsolidatedText = dictStr(detailInfo.value.multiAccountConsolidated, 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>
|
||||||
|
.container {
|
||||||
|
background: #f5f7fa;
|
||||||
|
padding-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-card {
|
||||||
|
margin: 24rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 16rpx 20rpx;
|
||||||
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
|
|
||||||
|
.header-icon {
|
||||||
|
width: 48rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
backdrop-filter: blur(10rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-info {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.bank-name {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.2;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
.bank-short-name {
|
||||||
|
color: rgba(255, 255, 255, 0.85);
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
padding: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-section {
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.title-icon {
|
||||||
|
width: 6rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
|
border-radius: 3rpx;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #2c3e50;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-list {
|
||||||
|
.list-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
background: #f8f9fa;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
margin-bottom: 12rpx;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-label {
|
||||||
|
color: #7f8c8d;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-value {
|
||||||
|
color: #2c3e50;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
&.orange {
|
||||||
|
color: #fa8c16;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.remark-content {
|
||||||
|
padding: 20rpx;
|
||||||
|
background: #f8f9fa;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #2c3e50;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
670
src/pages/work/base/bankBaseInfo/list.vue
Normal file
670
src/pages/work/base/bankBaseInfo/list.vue
Normal file
@@ -0,0 +1,670 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||||
|
<view class="search-view">
|
||||||
|
<u--input v-model="queryParams.bankName" border="false" placeholder="请输入银行名称" class="search-input"
|
||||||
|
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
|
||||||
|
</u--input>
|
||||||
|
<view class="filter-btn" @click="filterPanel = !filterPanel">
|
||||||
|
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
|
||||||
|
<text>筛选</text>
|
||||||
|
</view>
|
||||||
|
<view class="add-btn" @click="handleAdd()">
|
||||||
|
<uni-icons type="plusempty" size="18" color="#667eea"></uni-icons>
|
||||||
|
<text>新增</text>
|
||||||
|
</view>
|
||||||
|
<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 bankTypeList" :key="item.id" class="state-item"
|
||||||
|
:class="item.selected ? 'active' : ''" @click="selectBankType(item)">{{ item.dictLabel }}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="filter-title">信用卡多账户合并出账</view>
|
||||||
|
<view class="state-list">
|
||||||
|
<view v-for="item in accountingList" :key="item.id" class="state-item"
|
||||||
|
:class="item.selected ? 'active' : ''" @click="selectAccounting(item)">{{ item.dictLabel }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="btn-box">
|
||||||
|
<view class="btn-reset" @click="resetQuery()">
|
||||||
|
<uni-icons type="reload" size="16" color="#909399"></uni-icons>
|
||||||
|
<text>重置</text>
|
||||||
|
</view>
|
||||||
|
<view class="btn-confirm" @click="searchSubmit()">
|
||||||
|
<uni-icons type="checkmarkempty" size="16" color="#ffffff"></uni-icons>
|
||||||
|
<text>确定</text>
|
||||||
|
</view>
|
||||||
|
</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" @click="enterDetails(item)">
|
||||||
|
<view class="item-header">
|
||||||
|
<view class="bank-name-section">
|
||||||
|
<view class="bank-icon">
|
||||||
|
<uni-icons type="home-filled" size="20" color="#ffffff"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="bank-info">
|
||||||
|
<text class="bank-name">{{ item.bankName }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-section">
|
||||||
|
<text class="order-value"><text class="order-label">排序</text>{{ item.orderNum }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="card-body">
|
||||||
|
<view class="info-row">
|
||||||
|
<view class="info-item" v-if="dictStr(item.bankType, bankTypeList) || true">
|
||||||
|
<text class="info-label">银行类型</text>
|
||||||
|
<text class="info-value">{{ dictStr(item.bankType, bankTypeList) || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="item.bankShortName || true">
|
||||||
|
<text class="info-label">银行简称</text>
|
||||||
|
<text class="info-value">{{ item.bankShortName || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="item.province || true">
|
||||||
|
<text class="info-label">归属省份</text>
|
||||||
|
<text class="info-value">{{ item.province || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="item.city || true">
|
||||||
|
<text class="info-label">归属城市</text>
|
||||||
|
<text class="info-value">{{ item.city || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="item.englishShortName || true">
|
||||||
|
<text class="info-label">英文简称</text>
|
||||||
|
<text class="info-value">{{ item.englishShortName || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="dictStr(item.multiAccountConsolidated, accountingList) || true">
|
||||||
|
<text class="info-label">信用卡多账户合并出账</text>
|
||||||
|
<text class="info-value">{{ dictStr(item.multiAccountConsolidated, accountingList) || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item info-item-full" v-if="item.remark">
|
||||||
|
<text class="info-label">备注</text>
|
||||||
|
<text class="info-value">{{ item.remark }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="operate" @click.stop>
|
||||||
|
<view class="btn-edit" @click="handleEdit(item)">
|
||||||
|
<uni-icons type="compose" size="16" color="#667eea"></uni-icons>
|
||||||
|
<text>修改</text>
|
||||||
|
</view>
|
||||||
|
<view class="btn-delete" @click="handleDelete(item)">
|
||||||
|
<uni-icons type="trash" size="16" color="#f5576c"></uni-icons>
|
||||||
|
<text>删除</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-list-item>
|
||||||
|
<view>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="status" loadingIcon="semicircle" height="88" fontSize="32rpx" @loadmore="loadmore" />
|
||||||
|
</u-list>
|
||||||
|
</view>
|
||||||
|
<!-- 悬停按钮返回工作台-->
|
||||||
|
<suspend></suspend>
|
||||||
|
<refresh></refresh>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { listBankBaseInfo, delBankBaseInfo } from '@/api/invest/bankBaseInfo'
|
||||||
|
import { getDicts } from '@/api/system/dict/data.js'
|
||||||
|
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||||
|
import { reactive, toRefs, ref, computed } from "vue";
|
||||||
|
|
||||||
|
const pageNum = ref(1)
|
||||||
|
const listData = ref([])
|
||||||
|
const isShow = ref(false)
|
||||||
|
const status = ref('loadmore')
|
||||||
|
const bankTypeList = ref([])
|
||||||
|
const accountingList = ref([])
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
filterPanel: false,
|
||||||
|
queryParams: {
|
||||||
|
bankName: null,
|
||||||
|
bankType: '',
|
||||||
|
multiAccountConsolidated: ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const { filterPanel, queryParams } = toRefs(data)
|
||||||
|
const windowHeight = computed(() => {
|
||||||
|
return uni.getSystemInfoSync().windowHeight - 50
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
getDict()
|
||||||
|
getList()
|
||||||
|
});
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
if (isShow.value) {
|
||||||
|
listData.value = []
|
||||||
|
getList()
|
||||||
|
isShow.value = false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function loadmore() {
|
||||||
|
pageNum.value += 1
|
||||||
|
if (status.value == 'loadmore') {
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getList() {
|
||||||
|
status.value = 'loading'
|
||||||
|
listBankBaseInfo({ 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('bank_type').then(res => {
|
||||||
|
bankTypeList.value = res.data
|
||||||
|
})
|
||||||
|
// 是否合并出账
|
||||||
|
getDicts('is_accounting').then(res => {
|
||||||
|
accountingList.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function dictStr(val, arr) {
|
||||||
|
let str = ''
|
||||||
|
arr.map(item => {
|
||||||
|
if (item.dictValue === val) {
|
||||||
|
str = item.dictLabel
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectBankType(item) {
|
||||||
|
queryParams.value.bankType = item.dictValue
|
||||||
|
bankTypeList.value.map(ele => {
|
||||||
|
if (ele.dictValue == item.dictValue) {
|
||||||
|
ele.selected = true
|
||||||
|
Reflect.set(ele, 'selected', true)
|
||||||
|
} else {
|
||||||
|
Reflect.set(ele, 'selected', false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectAccounting(item) {
|
||||||
|
queryParams.value.multiAccountConsolidated = item.dictValue
|
||||||
|
accountingList.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.bankName = ''
|
||||||
|
queryParams.value.bankType = ''
|
||||||
|
queryParams.value.multiAccountConsolidated = ''
|
||||||
|
bankTypeList.value.map(ele => {
|
||||||
|
Reflect.set(ele, 'selected', false)
|
||||||
|
})
|
||||||
|
accountingList.value.map(ele => {
|
||||||
|
Reflect.set(ele, 'selected', false)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function enterDetails(item) {
|
||||||
|
uni.navigateTo({ url: `/pages/work/base/bankBaseInfo/details?id=${item.id}` })
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleEdit(item) {
|
||||||
|
uni.navigateTo({ url: `/pages/work/base/bankBaseInfo/addEdit?id=${item.id}` })
|
||||||
|
isShow.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleAdd() {
|
||||||
|
uni.navigateTo({ url: `/pages/work/base/bankBaseInfo/addEdit` })
|
||||||
|
isShow.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleDelete(item) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '确认删除',
|
||||||
|
content: '确定要删除这条记录吗?',
|
||||||
|
confirmText: '删除',
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmColor: '#f5576c',
|
||||||
|
cancelColor: '#909399',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
delBankBaseInfo(item.id).then(() => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '删除成功',
|
||||||
|
icon: 'success'
|
||||||
|
})
|
||||||
|
pageNum.value = 1
|
||||||
|
listData.value = []
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-view {
|
||||||
|
padding: 12rpx 32rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
z-index: 100;
|
||||||
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
background: rgba(102, 126, 234, 0.08);
|
||||||
|
color: #333333;
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||||
|
height: 66rpx !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6rpx;
|
||||||
|
padding: 12rpx 24rpx;
|
||||||
|
background: rgba(102, 126, 234, 0.08);
|
||||||
|
border-radius: 24rpx;
|
||||||
|
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.95);
|
||||||
|
background: rgba(102, 126, 234, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #667eea;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-icons {
|
||||||
|
color: #667eea;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6rpx;
|
||||||
|
padding: 12rpx 24rpx;
|
||||||
|
background: rgba(102, 126, 234, 0.08);
|
||||||
|
border-radius: 24rpx;
|
||||||
|
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.95);
|
||||||
|
background: rgba(102, 126, 234, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #667eea;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-icons {
|
||||||
|
color: #667eea;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-panel {
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 96rpx;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
z-index: 999;
|
||||||
|
|
||||||
|
.filter-panel-content {
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 0 30rpx 30rpx;
|
||||||
|
border-radius: 16rpx 16rpx 0 0;
|
||||||
|
|
||||||
|
.filter-title {
|
||||||
|
color: #2c3e50;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 32rpx 0 24rpx 20rpx;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
width: 6rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
|
border-radius: 3rpx;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.state-list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 16rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.state-item {
|
||||||
|
padding: 0 32rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
border: 2rpx solid #e8edf3;
|
||||||
|
border-radius: 34rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 68rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
|
border: 2rpx solid transparent;
|
||||||
|
color: #ffffff;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-box {
|
||||||
|
display: flex;
|
||||||
|
gap: 20rpx;
|
||||||
|
padding: 24rpx 30rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||||
|
|
||||||
|
.btn-reset,
|
||||||
|
.btn-confirm {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 8rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.98);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-reset {
|
||||||
|
flex: 1;
|
||||||
|
background: #f5f7fa;
|
||||||
|
border: 2rpx solid #dcdfe6;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-confirm {
|
||||||
|
flex: 1;
|
||||||
|
background: #667eea;
|
||||||
|
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.2);
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-item {
|
||||||
|
margin: 10rpx 24rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.98);
|
||||||
|
box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 16rpx 24rpx;
|
||||||
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
|
|
||||||
|
.bank-name-section {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-icon {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
background: rgba(255, 255, 255, 0.25);
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-info {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4rpx;
|
||||||
|
|
||||||
|
.bank-name {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.2;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bank-short-name {
|
||||||
|
color: rgba(255, 255, 255, 0.85);
|
||||||
|
font-size: 22rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-section {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
.order-value {
|
||||||
|
color: #fa8c16;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
.order-label {
|
||||||
|
color: rgba(255, 255, 255, 0.85);
|
||||||
|
font-size: 22rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
padding: 24rpx;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 24rpx;
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.info-item {
|
||||||
|
flex: 0 0 calc(50% - 12rpx);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4rpx;
|
||||||
|
min-width: 0;
|
||||||
|
margin-bottom: -5rpx;
|
||||||
|
|
||||||
|
&.info-item-full {
|
||||||
|
flex: 0 0 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-label {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #667eea;
|
||||||
|
font-weight: 500;
|
||||||
|
background: rgba(102, 126, 234, 0.08);
|
||||||
|
padding: 6rpx 12rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-value {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 500;
|
||||||
|
flex: 1;
|
||||||
|
line-height: 1.5;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(.info-item-full) .info-value {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.operate {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 16rpx 24rpx 24rpx;
|
||||||
|
gap: 8rpx;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
|
||||||
|
.btn-edit,
|
||||||
|
.btn-delete {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 4rpx;
|
||||||
|
padding: 0 14rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
white-space: nowrap;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-edit {
|
||||||
|
background: rgba(102, 126, 234, 0.1);
|
||||||
|
color: #667eea;
|
||||||
|
border: 1rpx solid rgba(102, 126, 234, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-delete {
|
||||||
|
background: rgba(245, 87, 108, 0.1);
|
||||||
|
color: #f5576c;
|
||||||
|
border: 1rpx solid rgba(245, 87, 108, 0.3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -11,6 +11,11 @@
|
|||||||
<view class="form-view">
|
<view class="form-view">
|
||||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||||
|
<u-form-item label="银行" required prop="bankName" @click="handleShowBank">
|
||||||
|
<u--input v-model="form.bankName" 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="name" required >
|
<u-form-item label="信用卡名称" prop="name" required >
|
||||||
<u--input v-model="form.name" placeholder="请填写信用卡名称"
|
<u--input v-model="form.name" placeholder="请填写信用卡名称"
|
||||||
inputAlign="right" border="none"></u--input>
|
inputAlign="right" border="none"></u--input>
|
||||||
@@ -54,6 +59,16 @@
|
|||||||
inputAlign="right" border="none"></u--input>
|
inputAlign="right" border="none"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
|
<u-form-item label="卡片等级" prop="cardTierName" @click="handleShowCardTier">
|
||||||
|
<u--input v-model="form.cardTierName" 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="cardFace">
|
||||||
|
<u--input v-model="form.cardFace" placeholder="请填写卡面"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item label="开户行" prop="openingBank" >
|
<u-form-item label="开户行" prop="openingBank" >
|
||||||
<u--input v-model="form.openingBank" placeholder="请填写开户行"
|
<u--input v-model="form.openingBank" placeholder="请填写开户行"
|
||||||
inputAlign="right" border="none"></u--input>
|
inputAlign="right" border="none"></u--input>
|
||||||
@@ -97,6 +112,10 @@
|
|||||||
@confirm="handleIsZeroBillConfirm"></u-picker>
|
@confirm="handleIsZeroBillConfirm"></u-picker>
|
||||||
<u-picker itemHeight="88" :show="showStatus" :columns="statusList" keyName="dictLabel" @cancel="handleStatusCancel"
|
<u-picker itemHeight="88" :show="showStatus" :columns="statusList" keyName="dictLabel" @cancel="handleStatusCancel"
|
||||||
@confirm="handleStatusConfirm"></u-picker>
|
@confirm="handleStatusConfirm"></u-picker>
|
||||||
|
<u-picker itemHeight="88" :show="showBank" :columns="bankList" keyName="bankName" @cancel="handleBankCancel"
|
||||||
|
@confirm="handleBankConfirm"></u-picker>
|
||||||
|
<u-picker itemHeight="88" :show="showCardTier" :columns="cardTierList" keyName="dictLabel" @cancel="handleCardTierCancel"
|
||||||
|
@confirm="handleCardTierConfirm"></u-picker>
|
||||||
<u-datetime-picker
|
<u-datetime-picker
|
||||||
:show="datePickShow"
|
:show="datePickShow"
|
||||||
mode="date"
|
mode="date"
|
||||||
@@ -112,6 +131,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { getBankcardLend, addBankcardLend, updateBankcardLend } from '@/api/invest/bankcardlend'
|
import { getBankcardLend, addBankcardLend, updateBankcardLend } from '@/api/invest/bankcardlend'
|
||||||
import { getDicts } from '@/api/system/dict/data.js'
|
import { getDicts } from '@/api/system/dict/data.js'
|
||||||
|
import { listBankBaseInfo } from '@/api/invest/bankBaseInfo'
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import {onLoad,onReady} from "@dcloudio/uni-app";
|
import {onLoad,onReady} from "@dcloudio/uni-app";
|
||||||
@@ -126,6 +146,10 @@ const isZeroBillList = ref([])
|
|||||||
const showStatus = ref(false)
|
const showStatus = ref(false)
|
||||||
const statusList = ref([])
|
const statusList = ref([])
|
||||||
const dateType = ref(1)
|
const dateType = ref(1)
|
||||||
|
const showBank = ref(false)
|
||||||
|
const bankList = ref([])
|
||||||
|
const showCardTier = ref(false)
|
||||||
|
const cardTierList = ref([])
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
@@ -153,10 +177,16 @@ const data = reactive({
|
|||||||
nextBillDateTime: null,
|
nextBillDateTime: null,
|
||||||
isZeroBill: null,
|
isZeroBill: null,
|
||||||
status: '1',
|
status: '1',
|
||||||
statusName: '正常使用'
|
statusName: '正常使用',
|
||||||
|
bankId: null,
|
||||||
|
bankName: null,
|
||||||
|
cardTier: null,
|
||||||
|
cardTierName: null,
|
||||||
|
cardFace: null
|
||||||
},
|
},
|
||||||
// dateType:'1',
|
// dateType:'1',
|
||||||
rules: {
|
rules: {
|
||||||
|
bankName: [{ type: 'string', required: true, message: '银行不能为空', trigger: ['change', 'blur'] }],
|
||||||
name: [{ type: 'string', required: true, message: '信用卡名称不能为空', trigger: ['change', 'blur'] }],
|
name: [{ type: 'string', required: true, message: '信用卡名称不能为空', trigger: ['change', 'blur'] }],
|
||||||
code: [{ type: 'string', required: true, message: '信用卡卡号不能为空', trigger: ['change', 'blur'] }],
|
code: [{ type: 'string', required: true, message: '信用卡卡号不能为空', trigger: ['change', 'blur'] }],
|
||||||
billDate: [{ type: 'number', required: true, message: '账单日不能为空', trigger: ['change', 'blur'] }],
|
billDate: [{ type: 'number', required: true, message: '账单日不能为空', trigger: ['change', 'blur'] }],
|
||||||
@@ -196,6 +226,14 @@ onLoad((option) => {
|
|||||||
getDicts('account_status').then(res => {
|
getDicts('account_status').then(res => {
|
||||||
statusList.value =[res.data]
|
statusList.value =[res.data]
|
||||||
})
|
})
|
||||||
|
// 卡片等级
|
||||||
|
getDicts('card_tier').then(res => {
|
||||||
|
cardTierList.value =[res.data]
|
||||||
|
})
|
||||||
|
// 获取银行列表
|
||||||
|
listBankBaseInfo({ pageSize: 1000, pageNum: 1 }).then(res => {
|
||||||
|
bankList.value = [res.rows]
|
||||||
|
})
|
||||||
if(form.value.id!=null){
|
if(form.value.id!=null){
|
||||||
getBankcardLend(form.value.id).then(res => {
|
getBankcardLend(form.value.id).then(res => {
|
||||||
form.value = res.data
|
form.value = res.data
|
||||||
@@ -212,6 +250,17 @@ onLoad((option) => {
|
|||||||
getDicts('account_status').then(result => {
|
getDicts('account_status').then(result => {
|
||||||
form.value.statusName=dictStr(form.value.status, result.data)
|
form.value.statusName=dictStr(form.value.status, result.data)
|
||||||
})
|
})
|
||||||
|
// 卡片等级
|
||||||
|
getDicts('card_tier').then(result => {
|
||||||
|
form.value.cardTierName=dictStr(form.value.cardTier, result.data)
|
||||||
|
})
|
||||||
|
// 银行名称
|
||||||
|
listBankBaseInfo({ pageSize: 1000, pageNum: 1 }).then(res => {
|
||||||
|
const bank = res.rows.find(item => item.id === form.value.bankId)
|
||||||
|
if (bank) {
|
||||||
|
form.value.bankName = bank.bankName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -279,6 +328,42 @@ onLoad((option) => {
|
|||||||
showStatus.value = false
|
showStatus.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleShowBank() {
|
||||||
|
if (bankList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '银行列表为空 ', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showBank.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function handleBankConfirm(e) {
|
||||||
|
form.value.bankName = e.value[0].bankName
|
||||||
|
form.value.bankId = e.value[0].id
|
||||||
|
showBank.value = false
|
||||||
|
}
|
||||||
|
function handleBankCancel() {
|
||||||
|
showBank.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleShowCardTier() {
|
||||||
|
if (cardTierList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '卡片等级为空 ', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showCardTier.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function handleCardTierConfirm(e) {
|
||||||
|
form.value.cardTierName = e.value[0].dictLabel
|
||||||
|
form.value.cardTier = e.value[0].dictValue
|
||||||
|
showCardTier.value = false
|
||||||
|
}
|
||||||
|
function handleCardTierCancel() {
|
||||||
|
showCardTier.value = false
|
||||||
|
}
|
||||||
|
|
||||||
function selectDate(type) {
|
function selectDate(type) {
|
||||||
dateType.value=type
|
dateType.value=type
|
||||||
datePickShow.value = true
|
datePickShow.value = true
|
||||||
|
|||||||
@@ -40,6 +40,18 @@
|
|||||||
<text class="item-label">账户状态</text>
|
<text class="item-label">账户状态</text>
|
||||||
<text class="item-value" :class="getStatusClass(detailInfo.status, detailInfo.statusText)">{{ detailInfo.statusText }}</text>
|
<text class="item-value" :class="getStatusClass(detailInfo.status, detailInfo.statusText)">{{ detailInfo.statusText }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">银行</text>
|
||||||
|
<text class="item-value">{{ detailInfo.bankName || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">卡片等级</text>
|
||||||
|
<text class="item-value">{{ detailInfo.cardTierText || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">卡面</text>
|
||||||
|
<text class="item-value">{{ detailInfo.cardFace || '-' }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -112,6 +124,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { getBankcardLend} from '@/api/invest/bankcardlend'
|
import { getBankcardLend} from '@/api/invest/bankcardlend'
|
||||||
import { getDicts } from '@/api/system/dict/data.js'
|
import { getDicts } from '@/api/system/dict/data.js'
|
||||||
|
import { listBankBaseInfo } from '@/api/invest/bankBaseInfo'
|
||||||
import {onLoad} from "@dcloudio/uni-app";
|
import {onLoad} from "@dcloudio/uni-app";
|
||||||
import {reactive ,toRefs,ref,computed }from "vue";
|
import {reactive ,toRefs,ref,computed }from "vue";
|
||||||
const id = ref('')
|
const id = ref('')
|
||||||
@@ -163,6 +176,17 @@ onLoad((option) => {
|
|||||||
// 类型
|
// 类型
|
||||||
getDicts('account_status').then(result => {
|
getDicts('account_status').then(result => {
|
||||||
detailInfo.value.statusText=dictStr(detailInfo.value.status, result.data)
|
detailInfo.value.statusText=dictStr(detailInfo.value.status, result.data)
|
||||||
|
})
|
||||||
|
// 卡片等级
|
||||||
|
getDicts('card_tier').then(result => {
|
||||||
|
detailInfo.value.cardTierText=dictStr(detailInfo.value.cardTier, result.data)
|
||||||
|
})
|
||||||
|
// 银行名称
|
||||||
|
listBankBaseInfo({ pageSize: 1000, pageNum: 1 }).then(res => {
|
||||||
|
const bank = res.rows.find(item => item.id === detailInfo.value.bankId)
|
||||||
|
if (bank) {
|
||||||
|
detailInfo.value.bankName = bank.bankName
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,10 @@
|
|||||||
<view class="info-item" v-if="dictStr(item.status, statusList) || true">
|
<view class="info-item" v-if="dictStr(item.status, statusList) || true">
|
||||||
<text class="info-label">账户状态</text>
|
<text class="info-label">账户状态</text>
|
||||||
<text class="info-value" :class="getStatusClass(item.status, dictStr(item.status, statusList))">{{ dictStr(item.status, statusList) || '--' }}</text>
|
<text class="info-value" :class="getStatusClass(item.status, dictStr(item.status, statusList))">{{ dictStr(item.status, statusList) || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="item.bankName || true">
|
||||||
|
<text class="info-label">银行</text>
|
||||||
|
<text class="info-value">{{ item.bankName || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item" v-if="item.billDateName || true">
|
<view class="info-item" v-if="item.billDateName || true">
|
||||||
<text class="info-label">账单日</text>
|
<text class="info-label">账单日</text>
|
||||||
@@ -72,6 +76,15 @@
|
|||||||
<text class="info-label">0账单操作</text>
|
<text class="info-label">0账单操作</text>
|
||||||
<text class="info-value">{{ dictStr(item.isZeroBill, isZeroBillList) || '--' }}</text>
|
<text class="info-value">{{ dictStr(item.isZeroBill, isZeroBillList) || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="info-item" v-if="dictStr(item.cardTier, cardTierList) || true">
|
||||||
|
<text class="info-label">卡片等级</text>
|
||||||
|
<text class="info-value">{{ dictStr(item.cardTier, cardTierList) || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="item.cardFace || true">
|
||||||
|
<text class="info-label">卡面</text>
|
||||||
|
<text class="info-value">{{ item.cardFace || '--' }}</text>
|
||||||
|
</view>
|
||||||
<view class="info-item info-item-full" v-if="item.remark">
|
<view class="info-item info-item-full" v-if="item.remark">
|
||||||
<text class="info-label">备注</text>
|
<text class="info-label">备注</text>
|
||||||
<text class="info-value">{{ item.remark }}</text>
|
<text class="info-value">{{ item.remark }}</text>
|
||||||
@@ -128,6 +141,7 @@ const status = ref('loadmore')
|
|||||||
const isNextBillDateList = ref([])
|
const isNextBillDateList = ref([])
|
||||||
const isZeroBillList = ref([])
|
const isZeroBillList = ref([])
|
||||||
const statusList = ref([])
|
const statusList = ref([])
|
||||||
|
const cardTierList = ref([])
|
||||||
const settingPickShow = ref(false)
|
const settingPickShow = ref(false)
|
||||||
const settingColumns = ref([])
|
const settingColumns = ref([])
|
||||||
const flag = ref('list')
|
const flag = ref('list')
|
||||||
@@ -187,6 +201,10 @@ function getDict() {
|
|||||||
getDicts('account_status').then(res => {
|
getDicts('account_status').then(res => {
|
||||||
statusList.value = res.data
|
statusList.value = res.data
|
||||||
})
|
})
|
||||||
|
// 卡片等级
|
||||||
|
getDicts('card_tier').then(res => {
|
||||||
|
cardTierList.value = res.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
function settingConfirm(e) {
|
function settingConfirm(e) {
|
||||||
queryParams.value.settingId = e.value[0].settingId
|
queryParams.value.settingId = e.value[0].settingId
|
||||||
|
|||||||
@@ -11,6 +11,11 @@
|
|||||||
<view class="form-view">
|
<view class="form-view">
|
||||||
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
|
||||||
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">
|
||||||
|
<u-form-item label="银行" prop="bankName" @click="handleShowBank">
|
||||||
|
<u--input v-model="form.bankName" 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="name" required >
|
<u-form-item label="储蓄账户名称" prop="name" required >
|
||||||
<u--input v-model="form.name" placeholder="请填写储蓄账户名称"
|
<u--input v-model="form.name" placeholder="请填写储蓄账户名称"
|
||||||
inputAlign="right" border="none"></u--input>
|
inputAlign="right" border="none"></u--input>
|
||||||
@@ -33,6 +38,16 @@
|
|||||||
inputAlign="right" border="none"></u--input>
|
inputAlign="right" border="none"></u--input>
|
||||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
|
<u-form-item label="卡片等级" prop="cardTierName" @click="handleShowCardTier">
|
||||||
|
<u--input v-model="form.cardTierName" 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="cardFace">
|
||||||
|
<u--input v-model="form.cardFace" placeholder="请填写卡面"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
<u-form-item label="开户行" prop="openingBank" >
|
<u-form-item label="开户行" prop="openingBank" >
|
||||||
<u--input v-model="form.openingBank" placeholder="请填写开户行"
|
<u--input v-model="form.openingBank" placeholder="请填写开户行"
|
||||||
inputAlign="right" border="none"></u--input>
|
inputAlign="right" border="none"></u--input>
|
||||||
@@ -60,6 +75,10 @@
|
|||||||
@confirm="handleConfirm"></u-picker>
|
@confirm="handleConfirm"></u-picker>
|
||||||
<u-picker itemHeight="88" :show="showStatus" :columns="statusList" keyName="dictLabel" @cancel="handleStatusCancel"
|
<u-picker itemHeight="88" :show="showStatus" :columns="statusList" keyName="dictLabel" @cancel="handleStatusCancel"
|
||||||
@confirm="handleStatusConfirm"></u-picker>
|
@confirm="handleStatusConfirm"></u-picker>
|
||||||
|
<u-picker itemHeight="88" :show="showBank" :columns="bankList" keyName="bankName" @cancel="handleBankCancel"
|
||||||
|
@confirm="handleBankConfirm"></u-picker>
|
||||||
|
<u-picker itemHeight="88" :show="showCardTier" :columns="cardTierList" keyName="dictLabel" @cancel="handleCardTierCancel"
|
||||||
|
@confirm="handleCardTierConfirm"></u-picker>
|
||||||
<u-datetime-picker
|
<u-datetime-picker
|
||||||
:show="datePickShow"
|
:show="datePickShow"
|
||||||
mode="date"
|
mode="date"
|
||||||
@@ -75,6 +94,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { getBankcardLend, addBankcardLend, updateBankcardLend } from '@/api/invest/bankcardlend'
|
import { getBankcardLend, addBankcardLend, updateBankcardLend } from '@/api/invest/bankcardlend'
|
||||||
import { getDicts } from '@/api/system/dict/data.js'
|
import { getDicts } from '@/api/system/dict/data.js'
|
||||||
|
import { listBankBaseInfo } from '@/api/invest/bankBaseInfo'
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import {onLoad,onReady} from "@dcloudio/uni-app";
|
import {onLoad,onReady} from "@dcloudio/uni-app";
|
||||||
@@ -87,6 +107,10 @@ const debitTypeList = ref([])
|
|||||||
const dateType = ref(1)
|
const dateType = ref(1)
|
||||||
const showStatus = ref(false)
|
const showStatus = ref(false)
|
||||||
const statusList = ref([])
|
const statusList = ref([])
|
||||||
|
const showBank = ref(false)
|
||||||
|
const bankList = ref([])
|
||||||
|
const showCardTier = ref(false)
|
||||||
|
const cardTierList = ref([])
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
@@ -110,7 +134,12 @@ const data = reactive({
|
|||||||
remark: null,
|
remark: null,
|
||||||
debitType: null,
|
debitType: null,
|
||||||
status: '1',
|
status: '1',
|
||||||
statusName: '正常使用'
|
statusName: '正常使用',
|
||||||
|
bankId: null,
|
||||||
|
bankName: null,
|
||||||
|
cardTier: null,
|
||||||
|
cardTierName: null,
|
||||||
|
cardFace: null
|
||||||
},
|
},
|
||||||
// dateType:'1',
|
// dateType:'1',
|
||||||
rules: {
|
rules: {
|
||||||
@@ -145,6 +174,14 @@ onLoad((option) => {
|
|||||||
getDicts('account_status').then(res => {
|
getDicts('account_status').then(res => {
|
||||||
statusList.value =[res.data]
|
statusList.value =[res.data]
|
||||||
})
|
})
|
||||||
|
// 卡片等级
|
||||||
|
getDicts('card_tier').then(res => {
|
||||||
|
cardTierList.value =[res.data]
|
||||||
|
})
|
||||||
|
// 获取银行列表
|
||||||
|
listBankBaseInfo({ pageSize: 1000, pageNum: 1 }).then(res => {
|
||||||
|
bankList.value = [res.rows]
|
||||||
|
})
|
||||||
if(form.value.id!=null){
|
if(form.value.id!=null){
|
||||||
getBankcardLend(form.value.id).then(res => {
|
getBankcardLend(form.value.id).then(res => {
|
||||||
form.value = res.data
|
form.value = res.data
|
||||||
@@ -156,6 +193,17 @@ onLoad((option) => {
|
|||||||
// 类型
|
// 类型
|
||||||
getDicts('account_status').then(result => {
|
getDicts('account_status').then(result => {
|
||||||
form.value.statusName=dictStr(form.value.status, result.data)
|
form.value.statusName=dictStr(form.value.status, result.data)
|
||||||
|
})
|
||||||
|
// 卡片等级
|
||||||
|
getDicts('card_tier').then(result => {
|
||||||
|
form.value.cardTierName=dictStr(form.value.cardTier, result.data)
|
||||||
|
})
|
||||||
|
// 银行名称
|
||||||
|
listBankBaseInfo({ pageSize: 1000, pageNum: 1 }).then(res => {
|
||||||
|
const bank = res.rows.find(item => item.id === form.value.bankId)
|
||||||
|
if (bank) {
|
||||||
|
form.value.bankName = bank.bankName
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -205,6 +253,46 @@ onLoad((option) => {
|
|||||||
showStatus.value = false
|
showStatus.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleShowBank() {
|
||||||
|
if (bankList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '银行列表为空 ', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showBank.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function handleBankConfirm(e) {
|
||||||
|
form.value.bankName = e.value[0].bankName
|
||||||
|
form.value.bankId = e.value[0].id
|
||||||
|
// 新增时自动赋值账户名称
|
||||||
|
if (!form.value.id) {
|
||||||
|
form.value.name = e.value[0].bankName
|
||||||
|
}
|
||||||
|
showBank.value = false
|
||||||
|
}
|
||||||
|
function handleBankCancel() {
|
||||||
|
showBank.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleShowCardTier() {
|
||||||
|
if (cardTierList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '卡片等级为空 ', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showCardTier.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function handleCardTierConfirm(e) {
|
||||||
|
form.value.cardTierName = e.value[0].dictLabel
|
||||||
|
form.value.cardTier = e.value[0].dictValue
|
||||||
|
showCardTier.value = false
|
||||||
|
}
|
||||||
|
function handleCardTierCancel() {
|
||||||
|
showCardTier.value = false
|
||||||
|
}
|
||||||
|
|
||||||
function selectDate(type) {
|
function selectDate(type) {
|
||||||
dateType.value=type
|
dateType.value=type
|
||||||
datePickShow.value = true
|
datePickShow.value = true
|
||||||
|
|||||||
@@ -36,6 +36,18 @@
|
|||||||
<text class="item-label">账户状态</text>
|
<text class="item-label">账户状态</text>
|
||||||
<text class="item-value" :class="getStatusClass(detailInfo.status, detailInfo.statusText)">{{ detailInfo.statusText }}</text>
|
<text class="item-value" :class="getStatusClass(detailInfo.status, detailInfo.statusText)">{{ detailInfo.statusText }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">银行</text>
|
||||||
|
<text class="item-value">{{ detailInfo.bankName || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">卡片等级</text>
|
||||||
|
<text class="item-value">{{ detailInfo.cardTierText || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<text class="item-label">卡面</text>
|
||||||
|
<text class="item-value">{{ detailInfo.cardFace || '-' }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -79,6 +91,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { getBankcardLend} from '@/api/invest/bankcardlend'
|
import { getBankcardLend} from '@/api/invest/bankcardlend'
|
||||||
import { getDicts } from '@/api/system/dict/data.js'
|
import { getDicts } from '@/api/system/dict/data.js'
|
||||||
|
import { listBankBaseInfo } from '@/api/invest/bankBaseInfo'
|
||||||
import {onLoad} from "@dcloudio/uni-app";
|
import {onLoad} from "@dcloudio/uni-app";
|
||||||
import {reactive ,toRefs,ref,computed }from "vue";
|
import {reactive ,toRefs,ref,computed }from "vue";
|
||||||
const id = ref('')
|
const id = ref('')
|
||||||
@@ -115,6 +128,17 @@ onLoad((option) => {
|
|||||||
// 类型
|
// 类型
|
||||||
getDicts('account_status').then(result => {
|
getDicts('account_status').then(result => {
|
||||||
detailInfo.value.statusText=dictStr(detailInfo.value.status, result.data)
|
detailInfo.value.statusText=dictStr(detailInfo.value.status, result.data)
|
||||||
|
})
|
||||||
|
// 卡片等级
|
||||||
|
getDicts('card_tier').then(result => {
|
||||||
|
detailInfo.value.cardTierText=dictStr(detailInfo.value.cardTier, result.data)
|
||||||
|
})
|
||||||
|
// 银行名称
|
||||||
|
listBankBaseInfo({ pageSize: 1000, pageNum: 1 }).then(res => {
|
||||||
|
const bank = res.rows.find(item => item.id === detailInfo.value.bankId)
|
||||||
|
if (bank) {
|
||||||
|
detailInfo.value.bankName = bank.bankName
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,19 @@
|
|||||||
<text class="info-label">有效期</text>
|
<text class="info-label">有效期</text>
|
||||||
<text class="info-value">{{ item.effectiveDate || '--' }}</text>
|
<text class="info-value">{{ item.effectiveDate || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item info-item-full" v-if="item.openingBank || true">
|
<view class="info-item" v-if="item.bankName || true">
|
||||||
|
<text class="info-label">银行</text>
|
||||||
|
<text class="info-value">{{ item.bankName || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="dictStr(item.cardTier, cardTierList) || true">
|
||||||
|
<text class="info-label">卡片等级</text>
|
||||||
|
<text class="info-value">{{ dictStr(item.cardTier, cardTierList) || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="item.cardFace || true">
|
||||||
|
<text class="info-label">卡面</text>
|
||||||
|
<text class="info-value">{{ item.cardFace || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item" v-if="item.openingBank || true">
|
||||||
<text class="info-label">开户行</text>
|
<text class="info-label">开户行</text>
|
||||||
<text class="info-value">{{ item.openingBank || '--' }}</text>
|
<text class="info-value">{{ item.openingBank || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -131,6 +143,7 @@ const isShow = ref(false)
|
|||||||
const status = ref('loadmore')
|
const status = ref('loadmore')
|
||||||
const debitTypeList = ref([])
|
const debitTypeList = ref([])
|
||||||
const statusList = ref([])
|
const statusList = ref([])
|
||||||
|
const cardTierList = ref([])
|
||||||
const settingPickShow = ref(false)
|
const settingPickShow = ref(false)
|
||||||
const settingColumns = ref([])
|
const settingColumns = ref([])
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
@@ -186,6 +199,10 @@ function getDict() {
|
|||||||
getDicts('account_status').then(res => {
|
getDicts('account_status').then(res => {
|
||||||
statusList.value = res.data
|
statusList.value = res.data
|
||||||
})
|
})
|
||||||
|
// 卡片等级
|
||||||
|
getDicts('card_tier').then(res => {
|
||||||
|
cardTierList.value = res.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
function settingConfirm(e) {
|
function settingConfirm(e) {
|
||||||
queryParams.value.settingId = e.value[0].settingId
|
queryParams.value.settingId = e.value[0].settingId
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
|
|||||||
{ path: '/pages/work/base/financials/list', text: '理财账户管理', icon: 'star', color: 'linear-gradient(135deg, #f6d365 0%, #fda085 100%)', permission: 'invest:futureStocks:list' },
|
{ path: '/pages/work/base/financials/list', text: '理财账户管理', icon: 'star', color: 'linear-gradient(135deg, #f6d365 0%, #fda085 100%)', permission: 'invest:futureStocks:list' },
|
||||||
{ path: '/pages/work/base/stocks/list', text: '股票账户管理', icon: 'arrow-up', color: 'linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%)', permission: 'invest:futureStocks:list' },
|
{ path: '/pages/work/base/stocks/list', text: '股票账户管理', icon: 'arrow-up', color: 'linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%)', permission: 'invest:futureStocks:list' },
|
||||||
{ path: '/pages/work/base/futures/list', text: '期货账户管理', icon: 'fire', color: 'linear-gradient(135deg, #fc5c65 0%, #fd79a8 100%)', permission: 'invest:futureStocks:list' },
|
{ path: '/pages/work/base/futures/list', text: '期货账户管理', icon: 'fire', color: 'linear-gradient(135deg, #fc5c65 0%, #fd79a8 100%)', permission: 'invest:futureStocks:list' },
|
||||||
|
{ path: '/pages/work/base/bankBaseInfo/list', text: '银行基础信息', icon: 'home', color: 'linear-gradient(135deg, #5b51d8 0%, #6b21a8 100%)', permission: 'invest:bankBaseInfo:list' },
|
||||||
|
|
||||||
])
|
])
|
||||||
const billGridList=ref([
|
const billGridList=ref([
|
||||||
|
|||||||
Reference in New Issue
Block a user