fix: 统计页面新功能增加,原有功能优化。

This commit is contained in:
tianyongbao
2024-06-28 13:07:22 +08:00
parent c8b5697264
commit 5c10fa3e8a
54 changed files with 10591 additions and 86 deletions

View File

@@ -114,7 +114,7 @@ const data = reactive({
rules: {
typeName: [{ required: true, message: '记账类型不能为空', trigger:['change', 'blur'] }],
accountName: [{ required: true, message: '记账账户不能为空', trigger: ['change', 'blur'] }],
amount: [{type: 'float', required: true, message: '交易金额不能为空', trigger: ['change', 'blur'] }],
amount: [{type: 'number', required: true, message: '交易金额不能为空', trigger: ['change', 'blur'] }],
dealTypeName: [{ required: true, message: '交易类型不能为空', trigger:['change', 'blur'] }],
dealCategoryName: [{ required: true, message: '交易类别不能为空', trigger: ['change', 'blur'] }],
createTime: [{ required: true, message: '交易时间不能为空', trigger: ['change', 'blur'] }]

View File

@@ -1,10 +1,17 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择记账账户" suffixIcon="search"
<view class="search-view">
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择记账账户" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择交易时间"
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="新增"
@@ -63,7 +70,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -134,6 +141,7 @@ import { listAccounts } from '@/api/invest/accounts'
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from 'dayjs'
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
@@ -206,10 +214,12 @@ function getList() {
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = date
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = date
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
@@ -301,6 +311,9 @@ function selectAccountType(item) {
})
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.endTime!=''){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
@@ -312,6 +325,7 @@ function selectAccountType(item) {
getList()
}
function resetQuery() {
queryParams.value.time = ''
queryParams.value.accountId = ''
queryParams.value.accountName = ''
queryParams.value.type = ''
@@ -374,7 +388,7 @@ function selectAccountType(item) {
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;

View File

@@ -1,10 +1,17 @@
<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"
<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>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择还款时间"
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="新增"
@@ -53,7 +60,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -117,6 +124,7 @@ import { listAccounts } from '@/api/invest/accounts'
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from 'dayjs'
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
@@ -189,10 +197,12 @@ function getList() {
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = date
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = date
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
@@ -234,6 +244,9 @@ function dictStr(val, arr) {
return str
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.endTime!=''){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
@@ -260,6 +273,7 @@ function dictStr(val, arr) {
showCreditCard.value = false
}
function resetQuery() {
queryParams.value.time = ''
queryParams.value.creditCardName = ''
queryParams.value.inAccountId = ''
queryParams.value.type = '2'
@@ -315,7 +329,6 @@ function dictStr(val, arr) {
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;

View File

@@ -1,10 +1,17 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择储蓄账户" suffixIcon="search"
<view class="search-view">
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择储蓄账户" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择转账时间"
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="新增"
@@ -48,7 +55,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -106,6 +113,7 @@ import { listAccounts } from '@/api/invest/accounts'
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from 'dayjs'
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
@@ -178,10 +186,12 @@ function getList() {
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = date
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = date
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
@@ -223,6 +233,9 @@ function dictStr(val, arr) {
return str
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.endTime!=''){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
@@ -254,6 +267,7 @@ function dictStr(val, arr) {
getList()
}
function resetQuery() {
queryParams.value.time = ''
queryParams.value.name = ''
queryParams.value.accountName = ''
queryParams.value.type = ''
@@ -309,7 +323,6 @@ function dictStr(val, arr) {
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;

View File

@@ -1,10 +1,17 @@
<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"
<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>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择交易时间"
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="新增"
@@ -53,7 +60,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -114,6 +121,7 @@ import {
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from 'dayjs'
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
@@ -179,10 +187,12 @@ function getList() {
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = date
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = date
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
@@ -243,6 +253,9 @@ function selectAccountType(item) {
})
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.endTime!=''){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
@@ -254,6 +267,7 @@ function selectAccountType(item) {
getList()
}
function resetQuery() {
queryParams.value.time = ''
queryParams.value.name = ''
queryParams.value.type = '5'
queryParams.value.dealType = ''
@@ -315,7 +329,6 @@ function selectAccountType(item) {
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;

View File

@@ -1,10 +1,17 @@
<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"
<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>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择转账时间"
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="新增"
@@ -17,7 +24,7 @@
<view v-for="item in dealTypeList" :key="item.id" class="state-item"
:class="item.selected ? 'active' : ''" @click="selectStatus(item)">{{ item.dictLabel }}</view>
</view>
<view class="select-header">还款时间</view>
<view class="select-header">转账时间</view>
<view class="selcet-content" style="padding: 0 24rpx">
<u-input
:disabled="true"
@@ -53,7 +60,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -114,6 +121,7 @@ import {
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from 'dayjs'
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
@@ -178,10 +186,12 @@ function getList() {
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = date
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = date
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
@@ -220,6 +230,9 @@ function dictStr(val, arr) {
return str
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.endTime!=''){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
@@ -231,6 +244,7 @@ function dictStr(val, arr) {
getList()
}
function resetQuery() {
queryParams.value.time = ''
queryParams.value.name = ''
queryParams.value.type = '3'
queryParams.value.dealType = ''
@@ -285,7 +299,6 @@ function dictStr(val, arr) {
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;

View File

@@ -1,10 +1,17 @@
<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"
<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>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择借贷时间"
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="新增"
@@ -48,7 +55,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -112,6 +119,7 @@ import {
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from 'dayjs'
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
@@ -176,10 +184,12 @@ function getList() {
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = date
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = date
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
@@ -218,6 +228,9 @@ function dictStr(val, arr) {
return str
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.endTime!=''){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
@@ -229,6 +242,7 @@ function dictStr(val, arr) {
getList()
}
function resetQuery() {
queryParams.value.time = ''
queryParams.value.name = ''
queryParams.value.type = '5'
queryParams.value.dealType = ''
@@ -283,7 +297,7 @@ function dictStr(val, arr) {
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;

View File

@@ -1,10 +1,17 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择POS机" suffixIcon="search"
<view class="search-view">
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择POS机" suffixIcon="search"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择刷卡时间"
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="新增"
@@ -48,7 +55,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -119,9 +126,9 @@ import {
delAccountsTransferRecord,
} from '@/api/invest/accountsTransferRecord'
import { listAccounts } from '@/api/invest/accounts'
import { getDicts } from '@/api/system/dict/data.js'
import { timeHandler } from '@/utils/common.ts'
import {onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from 'dayjs'
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
@@ -195,10 +202,12 @@ function getList() {
}
function confirm(e) {
const date = timeHandler(new Date(e.value), '-', ':')
let formatValue = 'YYYY-MM-DD'
dayjs(date).format(formatValue)
if (flag.value) {
queryParams.value.startTime = date
queryParams.value.startTime = dayjs(date).format(formatValue)
} else {
queryParams.value.endTime = date
queryParams.value.endTime = dayjs(date).format(formatValue)
}
timeShow.value = false
}
@@ -211,6 +220,9 @@ function settingCancel() {
settingPickShow.value = false
}
function searchSubmit() {
if(queryParams.value.startTime!=''&&queryParams.value.endTime!=''){
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
}
pageNum.value = 1
listData.value = []
getList()
@@ -242,6 +254,7 @@ function settingCancel() {
getList()
}
function resetQuery() {
queryParams.value.time = ''
queryParams.value.name = ''
queryParams.value.posId = ''
queryParams.value.type = '1'
@@ -304,7 +317,6 @@ function settingCancel() {
justify-content: space-between;
align-items: center;
position: relative;
margin-bottom: 24rpx;
.search-input {
background: #F5F5F5;

View File

@@ -136,9 +136,9 @@ const data = reactive({
rules: {
name: [{ type: 'string', required: true, message: '信用卡名称不能为空', trigger: ['change', 'blur'] }],
code: [{ type: 'string', required: true, message: '信用卡卡号不能为空', trigger: ['change', 'blur'] }],
billDate: [{ type: 'int', required: true, message: '账单日不能为空', trigger: ['change', 'blur'] }],
payDate: [{ type: 'int', required: true, message: '还款日不能为空', trigger: ['change', 'blur'] }],
creditLimit: [{ type: 'int', required: true, message: '信用卡额度不能为空', trigger: ['change', 'blur'] }],
billDate: [{ type: 'number', required: true, message: '账单日不能为空', trigger: ['change', 'blur'] }],
payDate: [{ type: 'number', required: true, message: '还款日不能为空', trigger: ['change', 'blur'] }],
creditLimit: [{ type: 'number', required: true, message: '信用卡额度不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, rules} = toRefs(data)

View File

@@ -0,0 +1,228 @@
<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.name" placeholder="请填写期货账户名称"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="账号" prop="code" required >
<u--input v-model="form.code" placeholder="请填写账号"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="密码" prop="password" >
<u--input v-model="form.password" placeholder="请填写密码"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="关联储蓄卡" prop="bankNameCode" @click="handleDebitCard">
<u--input v-model="form.bankNameCode" 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="tradingCenterCode" >
<u--input v-model="form.tradingCenterCode" placeholder="请填写期货交易中心账号"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="期货交易中心密码" prop="tradingCenterPassword" >
<u--input v-model="form.tradingCenterPassword" placeholder="请填写期货交易中心密码"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="资金密码" prop="fundPassword" >
<u--input v-model="form.fundPassword" placeholder="请填写资金密码"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="开户日期" prop="activationDate" @click="selectDate()">
<u--input v-model="form.activationDate" 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="commission" >
<u--input v-model="form.commission" placeholder="请填写手续费"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="保证金比例" prop="bond" >
<u--input v-model="form.bond" 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="showDebitCard" :columns="debitCardList" keyName="nameCodeAvailableLimit" @cancel="handleDebitCardCancel"
@confirm="handleDebitCardConfirm"></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 { getFutureStocks, addFutureStocks, updateFutureStocks } from '@/api/invest/futureStocks'
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 showDebitCard = ref(false)
const title = ref("期货账户管理")
const debitCardList = ref([])
const dateType = ref(1)
const data = reactive({
form: {
id: null,
name: null,
type: '1',
code: null,
password: null,
tradingCenterCode: null,
tradingCenterPassword: null,
fundPassword: null,
commission: null,
bond: null,
debitCard: null,
activationDate: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null,
remark: null
},
queryDebitCardParams: {
pageNum: 1,
type: '1',
state: '1',
pageSize: 1000
},
// dateType:'1',
rules: {
name: [{ type: 'string', required: true, message: '期货账户名称不能为空', trigger: ['change', 'blur'] }],
code: [{ type: 'string', required: true, message: '账号不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryDebitCardParams, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
if(form.value.id!=null){
title.value="期货账户管理-修改"
}else{
title.value="期货账户管理-新增"
}
getDict()
})
onReady(() => {
form.value.activationDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
form.value.effectiveDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
})
function getDict() {
// 类型
listAccounts(queryDebitCardParams.value).then((response) => {
debitCardList.value = [response.rows]
})
if(form.value.id!=null){
getFutureStocks(form.value.id).then(res => {
form.value = res.data
})
}
}
function handleDebitCard() {
if (debitCardList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '结算卡为空 ', type: 'warning'
})
} else {
showDebitCard.value = true
}
}
function handleDebitCardConfirm(e) {
form.value.bankNameCode = e.value[0].nameCodeAvailableLimit
form.value.debitCard = e.value[0].id
showDebitCard.value = false
}
function handleDebitCardCancel() {
showDebitCard.value = false
}
function selectDate(type) {
dateType.value=type
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.activationDate = dayjs(e.value).format("YYYY-MM-DD")
datePickShow.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updateFutureStocks(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/work/base/futures/list` })
}
})
})
}else {
addFutureStocks(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/work/base/futures/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,91 @@
<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.name"></u-cell>
<u-cell title="账号:" titleStyle="font-weight:bolder" :value="detailInfo.code"></u-cell>
<u-cell title="期货交易中心账号:" titleStyle="font-weight:bolder" :value="detailInfo.tradingCenterCode"></u-cell>
<u-cell title="手续费:" titleStyle="font-weight:bolder" center :value="detailInfo.commission"> </u-cell>
<u-cell title="保证金比例:" titleStyle="font-weight:bolder" :value="detailInfo.bond"></u-cell>
<u-cell title="关联储蓄卡:" titleStyle="font-weight:bolder" :value="detailInfo.bankNameCode"></u-cell>
<u-cell title="开户日期:" titleStyle="font-weight:bolder" :value="detailInfo.activationDate"></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 { getFutureStocks } from '@/api/invest/futureStocks'
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() {
getFutureStocks(id.value).then(res => {
detailInfo.value = res.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,340 @@
<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="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></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-header" @click="enterDetails(item)">
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.name+'-'+item.code " size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">期货交易中心账号</text>
<text class="row-value">{{ item.tradingCenterCode }}</text>
</view>
<view class="item-row">
<text class="row-label">手续费</text>
<text class="row-value">{{ item.commission }}</text>
</view>
<view class="item-row">
<text class="row-label">保证金比例</text>
<text class="row-value">{{ item.bond}}</text>
</view>
<view class="item-row">
<text class="row-label">关联储蓄卡</text>
<text class="row-value">{{ item.bankNameCode }}</text>
</view>
<view class="item-row">
<text class="row-label">开户日期</text>
<text class="row-value">{{ item.activationDate}}</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 { listFutureStocks, delFutureStocks} from '@/api/invest/futureStocks'
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 settingPickShow = ref(false)
const settingColumns = ref([])
const data = reactive({
queryParams: {
name: null,
type: '1'
}
})
const { queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getList()
});
onShow(() => {
if (isShow.value) {
getList()
isShow.value = false
}
});
function loadmore() {
pageNum.value += 1
if (status.value == 'loadmore') {
getList()
}
}
function getList() {
status.value = 'loading'
listFutureStocks({ 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 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 searchBlur() {
pageNum.value = 1
listData.value = []
getList()
}
function resetQuery() {
queryParams.value.name = '',
queryParams.value.type = '1'
posTypeList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
}
function enterDetails(item) {
uni.navigateTo({ url: `/pages/work/base/futures/details?id=${item.id}` })
}
function handleEdit(item) {
uni.navigateTo({ url: `/pages/work/base/futures/addEdit?id=${item.id}` })
isShow.value = true
}
function handleAdd() {
uni.navigateTo({ url: `/pages/work/base/futures/addEdit` })
isShow.value = true
}
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '你确定要删除吗',
success: function (res) {
if (res.confirm) {
delFutureStocks(item.id)
uni.navigateTo({ url: `/pages/work/base/futures/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,308 @@
<template>
<view class="container" style="paddingBottom:1rpx;">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#333333"
title="POS机管理"
>
</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="POS机名称" prop="name" required >
<u--input v-model="form.name" placeholder="请填写POS机名称"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="类型" required prop="typeName" @click="handleShowType">
<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="merchantName" required >
<u--input v-model="form.merchantName" placeholder="请填写商户名称"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="结算卡" prop="bankNameCode" required @click="handleDebitCard">
<u--input v-model="form.bankNameCode" 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="刷卡费率" required prop="rate" >
<u--input v-model="form.rate" placeholder="请填写刷卡费率"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="费率+" required prop="ratePlus" >
<u--input v-model="form.ratePlus" placeholder="请填写费率+"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="厂商" prop="manufacture" >
<u--input v-model="form.manufacture" placeholder="请填写厂商"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="支付公司" prop="payCompany" >
<u--input v-model="form.payCompany" placeholder="支付公司"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="编号" prop="code" >
<u--input v-model="form.code" placeholder="请填写编号"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="启用日期" prop="activationDate" @click="selectDate()">
<u--input v-model="form.activationDate" 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="merchantTypeName" @click="handleShowMerchantType">
<u--input v-model="form.merchantTypeName" 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="merchantCode" >
<u--input v-model="form.merchantCode" 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="showDebitCard" :columns="debitCardList" keyName="nameCodeAvailableLimit" @cancel="handleDebitCardCancel"
@confirm="handleDebitCardConfirm"></u-picker>
<u-picker itemHeight="88" :show="showType" :columns="typeList" keyName="dictLabel" @cancel="handleCancel"
@confirm="handleConfirm"></u-picker>
<u-picker itemHeight="88" :show="showMerchantType" :columns="merchantTypeList" keyName="dictLabel" @cancel="handleMerchantTypeCancel"
@confirm="handleMerchantTypeConfirm"></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 { getPosmachine, addPosmachine, updatePosmachine } from '@/api/invest/posmachine'
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 showType = ref(false)
const showMerchantType = ref(false)
const showDebitCard = ref(false)
const title = ref("POS机管理")
const typeList = ref([])
const merchantTypeList = ref([])
const debitCardList = ref([])
const dateType = ref(1)
const data = reactive({
form: {
id: null,
name: null,
type: null,
manufacture: null,
payCompany: null,
merchantName: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null,
remark: null,
code: null,
rate: null,
debitCard: null,
merchantType: null,
merchantCode: null,
ratePlus: 0,
activationDate: null
},
queryDebitCardParams: {
pageNum: 1,
type: '1',
state: '1',
pageSize: 1000
},
// dateType:'1',
rules: {
name: [{ type: 'string', required: true, message: 'POS机名称不能为空', trigger: ['change', 'blur'] }],
typeName: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
merchantName: [{ type: 'string', required: true, message: '商户名称不能为空', trigger: ['change', 'blur'] }],
rate: [{ type: 'number', required: true, message: '刷卡费率不能为空', trigger: ['change', 'blur'] }],
ratePlus: [{ type: 'number', required: true, message: '费率+不能为空', trigger: ['change', 'blur'] }],
debitCard: [{ type: 'string', required: true, message: '结算卡不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryDebitCardParams, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
if(form.value.id!=null){
title.value="POS机管理-修改"
}else{
title.value="POS机管理-新增"
}
getDict()
})
onReady(() => {
form.value.activationDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
form.value.effectiveDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
})
function getDict() {
// 类型
listAccounts(queryDebitCardParams.value).then((response) => {
debitCardList.value = [response.rows]
})
getDicts('pos_type').then(res => {
typeList.value =[res.data]
})
// 类型
getDicts('merchant_type').then(res => {
merchantTypeList.value =[res.data]
})
if(form.value.id!=null){
getPosmachine(form.value.id).then(res => {
form.value = res.data
// 类型
getDicts('pos_type').then(result => {
form.value.typeName=dictStr(form.value.type, result.data)
})
// 类型
getDicts('merchant_type').then(result => {
form.value.merchantTypeName=dictStr(form.value.merchantType, result.data)
})
})
}
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
if (item.dictValue === val) {
str = item.dictLabel
}
})
return str
}
function handleDebitCard() {
if (debitCardList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '结算卡为空 ', type: 'warning'
})
} else {
showDebitCard.value = true
}
}
function handleDebitCardConfirm(e) {
form.value.bankNameCode = e.value[0].nameCodeAvailableLimit
form.value.debitCard = e.value[0].id
showDebitCard.value = false
}
function handleDebitCardCancel() {
showDebitCard.value = false
}
function handleShowType() {
if (typeList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '类型为空 ', type: 'warning'
})
} else {
showType.value = true
}
}
function handleConfirm(e) {
form.value.typeName = e.value[0].dictLabel
form.value.type = e.value[0].dictValue
showType.value = false
}
function handleCancel() {
showType.value = false
}
function handleShowMerchantType() {
if (merchantTypeList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '商户类型为空 ', type: 'warning'
})
} else {
showMerchantType.value = true
}
}
function handleMerchantTypeConfirm(e) {
form.value.merchantTypeName = e.value[0].dictLabel
form.value.merchantType = e.value[0].dictValue
showMerchantType.value = false
}
function handleMerchantTypeCancel() {
showMerchantType.value = false
}
function selectDate(type) {
dateType.value=type
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.activationDate = dayjs(e.value).format("YYYY-MM-DD")
datePickShow.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updatePosmachine(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/work/base/posmachine/list` })
}
})
})
}else {
addPosmachine(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/work/base/posmachine/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,105 @@
<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="POS机名称:" titleStyle="font-weight:bolder" :value="detailInfo.name"></u-cell>
<u-cell title="支付公司:" titleStyle="font-weight:bolder" :value="detailInfo.payCompany"></u-cell>
<u-cell title="类型:" titleStyle="font-weight:bolder" :value="detailInfo.type"></u-cell>
<u-cell title="商户名称:" titleStyle="font-weight:bolder" center :value="detailInfo.merchantName"> </u-cell>
<u-cell title="刷卡费率:" titleStyle="font-weight:bolder" :value="detailInfo.rate"></u-cell>
<u-cell title="费率+:" titleStyle="font-weight:bolder" :value="detailInfo.ratePlus+''"></u-cell>
<u-cell title="结算卡:" titleStyle="font-weight:bolder" :value="detailInfo.bankNameCode"></u-cell>
<u-cell title="商户类型:" titleStyle="font-weight:bolder" :value="detailInfo.merchantType"></u-cell>
<u-cell title="商户码:" titleStyle="font-weight:bolder" :value="detailInfo.merchantCode"></u-cell>
<u-cell title="厂商:" titleStyle="font-weight:bolder" :value="detailInfo.manufacture"></u-cell>
<u-cell title="编号:" titleStyle="font-weight:bolder" :value="detailInfo.code"></u-cell>
<u-cell title="启用日期:" titleStyle="font-weight:bolder" :value="detailInfo.activationDate"></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 { getPosmachine } from '@/api/invest/posmachine'
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() {
getPosmachine(id.value).then(res => {
detailInfo.value = res.data
// 类型
getDicts('pos_type').then(result => {
detailInfo.value.type=dictStr(detailInfo.value.type, result.data)
})
// 类型
getDicts('merchant_type').then(result => {
detailInfo.value.merchantType=dictStr(detailInfo.value.merchantType, 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,351 @@
<template>
<view class="container">
<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" suffixIcon="search" suffixIconStyle="color: #909399">
</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>
</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.name+'-'+item.merchantName " size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">支付公司</text>
<text class="row-value">{{ item.payCompany }}</text>
</view>
<view class="item-row">
<text class="row-label">类型</text>
<text class="row-value">{{ dictStr(item.type, posTypeList) }}</text>
</view>
<view class="item-row">
<text class="row-label">刷卡费率</text>
<text class="row-value">{{ item.rate+'+'+ item.ratePlus}}</text>
</view>
<view class="item-row">
<text class="row-label">结算卡</text>
<text class="row-value">{{ item.bankNameCode }}</text>
</view>
<view class="item-row">
<text class="row-label">商户类型</text>
<text class="row-value">{{ dictStr(item.merchantType, merchantTypeList) }}</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 { listPosmachine, delPosmachine } from '@/api/invest/posmachine'
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 posTypeList = ref([])
const merchantTypeList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const data = reactive({
filterPanel: false,
queryParams: {
name: null,
type: ''
}
})
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'
listPosmachine({ 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('pos_type').then(res => {
posTypeList.value = res.data
})
// 类型
getDicts('merchant_type').then(res => {
merchantTypeList.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 searchBlur() {
pageNum.value = 1
listData.value = []
getList()
}
function resetQuery() {
queryParams.value.name = '',
queryParams.value.type = ''
posTypeList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
}
function enterDetails(item) {
uni.navigateTo({ url: `/pages/work/base/posmachine/details?id=${item.id}` })
}
function handleEdit(item) {
uni.navigateTo({ url: `/pages/work/base/posmachine/addEdit?id=${item.id}` })
isShow.value = true
}
function handleAdd() {
uni.navigateTo({ url: `/pages/work/base/posmachine/addEdit` })
isShow.value = true
}
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '你确定要删除吗',
success: function (res) {
if (res.confirm) {
delPosmachine(item.id)
uni.navigateTo({ url: `/pages/work/base/posmachine/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,212 @@
<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.name" placeholder="请填写股票账户名称"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="账号" prop="code" required >
<u--input v-model="form.code" placeholder="请填写账号"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="密码" prop="password" >
<u--input v-model="form.password" placeholder="请填写密码"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="关联储蓄卡" prop="bankNameCode" @click="handleDebitCard">
<u--input v-model="form.bankNameCode" 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="activationDate" @click="selectDate()">
<u--input v-model="form.activationDate" 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="commission" >
<u--input v-model="form.commission" 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="showDebitCard" :columns="debitCardList" keyName="nameCodeAvailableLimit" @cancel="handleDebitCardCancel"
@confirm="handleDebitCardConfirm"></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 { getFutureStocks, addFutureStocks, updateFutureStocks } from '@/api/invest/futureStocks'
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 showDebitCard = ref(false)
const title = ref("股票账户管理")
const debitCardList = ref([])
const dateType = ref(1)
const data = reactive({
form: {
id: null,
name: null,
type: '2',
code: null,
password: null,
tradingCenterCode: null,
tradingCenterPassword: null,
fundPassword: null,
commission: null,
bond: null,
debitCard: null,
activationDate: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null,
remark: null
},
queryDebitCardParams: {
pageNum: 1,
type: '1',
state: '1',
pageSize: 1000
},
// dateType:'1',
rules: {
name: [{ type: 'string', required: true, message: '股票账户名称不能为空', trigger: ['change', 'blur'] }],
code: [{ type: 'string', required: true, message: '账号不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryDebitCardParams, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
if(form.value.id!=null){
title.value="股票账户管理-修改"
}else{
title.value="股票账户管理-新增"
}
getDict()
})
onReady(() => {
form.value.activationDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
form.value.effectiveDate = dayjs(new Date().getTime()).format("YYYY-MM-DD")
})
function getDict() {
// 类型
listAccounts(queryDebitCardParams.value).then((response) => {
debitCardList.value = [response.rows]
})
if(form.value.id!=null){
getFutureStocks(form.value.id).then(res => {
form.value = res.data
})
}
}
function handleDebitCard() {
if (debitCardList.value[0].length === 0) {
proxy.$refs['uToast'].show({
message: '结算卡为空 ', type: 'warning'
})
} else {
showDebitCard.value = true
}
}
function handleDebitCardConfirm(e) {
form.value.bankNameCode = e.value[0].nameCodeAvailableLimit
form.value.debitCard = e.value[0].id
showDebitCard.value = false
}
function handleDebitCardCancel() {
showDebitCard.value = false
}
function selectDate(type) {
dateType.value=type
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.activationDate = dayjs(e.value).format("YYYY-MM-DD")
datePickShow.value = false
}
function submit() {
proxy.$refs['uForm'].validate().then(() => {
if (form.value.id != null) {
updateFutureStocks(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '修改成功', complete() {
uni.navigateTo({ url: `/pages/work/base/stocks/list` })
}
})
})
}else {
addFutureStocks(form.value).then(res => {
proxy.$refs['uToast'].show({
message: '新增成功', complete() {
uni.navigateTo({ url: `/pages/work/base/stocks/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,89 @@
<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.name"></u-cell>
<u-cell title="账号:" titleStyle="font-weight:bolder" :value="detailInfo.code"></u-cell>
<u-cell title="手续费:" titleStyle="font-weight:bolder" center :value="detailInfo.commission"> </u-cell>
<u-cell title="关联储蓄卡:" titleStyle="font-weight:bolder" :value="detailInfo.bankNameCode"></u-cell>
<u-cell title="开户日期:" titleStyle="font-weight:bolder" :value="detailInfo.activationDate"></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 { getFutureStocks } from '@/api/invest/futureStocks'
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() {
getFutureStocks(id.value).then(res => {
detailInfo.value = res.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,331 @@
<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="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></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-header" @click="enterDetails(item)">
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.name+'-'+item.code " size="30rpx" color="#333333" :bold="true"></u--text>
</view>
<view class="item-row">
<text class="row-label">关联储蓄卡</text>
<text class="row-value">{{ item.bankNameCode }}</text>
</view>
<view class="item-row">
<text class="row-label">手续费</text>
<text class="row-value">{{ item.commission }}</text>
</view>
<view class="item-row">
<text class="row-label">开户日期</text>
<text class="row-value">{{ item.activationDate}}</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 { listFutureStocks, delFutureStocks} from '@/api/invest/futureStocks'
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 settingPickShow = ref(false)
const settingColumns = ref([])
const data = reactive({
queryParams: {
name: null,
type: '2'
}
})
const { queryParams} = toRefs(data)
const windowHeight = computed(() => {
uni.getSystemInfoSync().windowHeight - 50
})
onLoad(() => {
getList()
});
onShow(() => {
if (isShow.value) {
getList()
isShow.value = false
}
});
function loadmore() {
pageNum.value += 1
if (status.value == 'loadmore') {
getList()
}
}
function getList() {
status.value = 'loading'
listFutureStocks({ 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 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 searchBlur() {
pageNum.value = 1
listData.value = []
getList()
}
function resetQuery() {
queryParams.value.name = '',
queryParams.value.type = '2'
posTypeList.value.map(ele => {
Reflect.set(ele, 'selected', false)
})
}
function enterDetails(item) {
uni.navigateTo({ url: `/pages/work/base/stocks/details?id=${item.id}` })
}
function handleEdit(item) {
uni.navigateTo({ url: `/pages/work/base/stocks/addEdit?id=${item.id}` })
isShow.value = true
}
function handleAdd() {
uni.navigateTo({ url: `/pages/work/base/stocks/addEdit` })
isShow.value = true
}
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '你确定要删除吗',
success: function (res) {
if (res.confirm) {
delFutureStocks(item.id)
uni.navigateTo({ url: `/pages/work/base/stocks/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

@@ -96,7 +96,7 @@ const data = reactive({
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: 'float', required: true, message: '账单金额不能为空', trigger: ['change', 'blur'] }],
billAmount: [{ type: 'number', required: true, message: '账单金额不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryBankCardLendParams, rules} = toRefs(data)

View File

@@ -101,6 +101,7 @@ import {
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
const datePickShow = ref(false)
const closeDatePickShow = ref(false)
const showTeam = ref(false)
const showOnlineLend = ref(false)
const title = ref("信用卡分期账单")
@@ -140,9 +141,9 @@ const data = reactive({
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: 'float', required: true, message: '分期金额不能为空', trigger: ['change', 'blur'] }],
period: [{ type: 'int', required: true, message: '分期期数不能为空', trigger: ['change', 'blur'] }],
balance: [{ type: 'float', required: true, message: '余额不能为空', trigger: ['change', 'blur'] }],
billAmount: [{ type: 'number', required: true, message: '分期金额不能为空', trigger: ['change', 'blur'] }],
period: [{ type: 'number', required: true, message: '分期期数不能为空', trigger: ['change', 'blur'] }],
balance: [{ type: 'number', required: true, message: '余额不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryBankCardLendParams, rules} = toRefs(data)

View File

@@ -81,9 +81,9 @@ const data = reactive({
form: {},
rules: {
repaymentDate: [{ type: 'string', required: true, message: '还款日期不能为空', trigger: ['change', 'blur'] }],
periods: [{ type: 'int', required: true, message: '还款期数不能为空', trigger: ['change', 'blur'] }],
interest: [{ type: 'float', required: true, message: '利息不能为空', trigger: ['change', 'blur'] }],
principal: [{ type: 'float', required: true, message: '应还本金不能为空', trigger: ['change', 'blur'] }],
periods: [{ type: 'number', required: true, message: '还款期数不能为空', trigger: ['change', 'blur'] }],
interest: [{ type: 'number', required: true, message: '利息不能为空', trigger: ['change', 'blur'] }],
principal: [{ type: 'number', required: true, message: '应还本金不能为空', trigger: ['change', 'blur'] }],
postingStateName: [{ type: 'string', required: true, message: '入账状态不能为空', trigger: ['change', 'blur'] }],
}
})
@@ -151,7 +151,7 @@ onLoad((option) => {
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
}
function datePickConfirm(e) {
form.value.createTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
form.value.repaymentDate = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
datePickShow.value = false
}
function submit() {

View File

@@ -90,7 +90,7 @@ const data = reactive({
rules: {
futureStocksName: [{ type: 'string', required: true, message: '期货账户不能为空', trigger: ['change', 'blur'] }],
billDate: [{ type: 'string', required: true, message: '账单日不能为空', trigger: ['change', 'blur'] }],
billAmount: [{ type: 'float', required: true, message: '期货收益不能为空', trigger: ['change', 'blur'] }],
billAmount: [{ type: 'number', required: true, message: '期货收益不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryFutureStocksListParams, rules} = toRefs(data)

View File

@@ -101,6 +101,7 @@ import {
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
const datePickShow = ref(false)
const closeDatePickShow = ref(false)
const showTeam = ref(false)
const showOnlineLend = ref(false)
const title = ref("网贷账单")
@@ -140,9 +141,9 @@ const data = reactive({
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'] }],
installmentAmount: [{ type: 'float', required: true, message: '借款金额不能为空', trigger: ['change', 'blur'] }],
period: [{ type: 'int', required: true, message: '借款期数不能为空', trigger: ['change', 'blur'] }],
balance: [{ type: 'float', required: true, message: '余额不能为空', trigger: ['change', 'blur'] }],
installmentAmount: [{ type: 'number', required: true, message: '借款金额不能为空', trigger: ['change', 'blur'] }],
period: [{ type: 'number', required: true, message: '借款期数不能为空', trigger: ['change', 'blur'] }],
balance: [{ type: 'number', required: true, message: '余额不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryBankCardLendParams, rules} = toRefs(data)

View File

@@ -81,9 +81,9 @@ const data = reactive({
form: {},
rules: {
repaymentDate: [{ type: 'string', required: true, message: '还款日期不能为空', trigger: ['change', 'blur'] }],
periods: [{ type: 'int', required: true, message: '还款期数不能为空', trigger: ['change', 'blur'] }],
interest: [{ type: 'float', required: true, message: '利息不能为空', trigger: ['change', 'blur'] }],
principal: [{ type: 'float', required: true, message: '应还本金不能为空', trigger: ['change', 'blur'] }],
periods: [{ type: 'number', required: true, message: '还款期数不能为空', trigger: ['change', 'blur'] }],
interest: [{ type: 'number', required: true, message: '利息不能为空', trigger: ['change', 'blur'] }],
principal: [{ type: 'number', required: true, message: '应还本金不能为空', trigger: ['change', 'blur'] }],
postingStateName: [{ type: 'string', required: true, message: '入账状态不能为空', trigger: ['change', 'blur'] }],
}
})

View File

@@ -120,7 +120,7 @@ const data = reactive({
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'] }],
installmentAmount: [{ type: 'float', required: true, message: '借款金额不能为空', trigger: ['change', 'blur'] }]
installmentAmount: [{ type: 'number', required: true, message: '借款金额不能为空', trigger: ['change', 'blur'] }]
}
})
const { form, queryBankCardLendParams, rules} = toRefs(data)

View File

@@ -90,7 +90,7 @@ const data = reactive({
rules: {
futureStocksName: [{ type: 'string', required: true, message: '股票账户不能为空', trigger: ['change', 'blur'] }],
billDate: [{ type: 'string', required: true, message: '账单日不能为空', trigger: ['change', 'blur'] }],
billAmount: [{ type: 'float', required: true, message: '股票收益不能为空', trigger: ['change', 'blur'] }],
billAmount: [{ type: 'number', required: true, message: '股票收益不能为空', trigger: ['change', 'blur'] }],
}
})
const { form, queryFutureStocksListParams, rules} = toRefs(data)

View File

@@ -77,6 +77,8 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
{ path: '/pages/work/accounts/accountDealRecord/list', text: '账户交易记录', icon: 'paperclip', permission: 'invest:accountDealRecord:list' },
{ path: '/pages/work/accounts/posTransferRecord/list', text: 'POS机刷卡记账', icon: 'reload', permission: 'invest:accountsTransferRecord:list' },
{ path: '/pages/work/accounts/creditTransferRecord/list', text: '信用卡还款', icon: 'arrow-left', permission: 'invest:accountsTransferRecord:list' },
{ path: '/pages/work/accounts/investAccountDeal/list', text: '投资交易记录', icon: 'chatboxes', permission: 'invest:accountDealRecord:list' },
{ path: '/pages/work/accounts/investTransferRecord/list', text: '投资账户记账', icon: 'auth-filled', 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/work/bill/creditCardBill/list', text: '信用卡账单', icon: 'list', permission: 'invest:creditCardBill:list' },
@@ -85,12 +87,12 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
{ path: '/pages/work/bill/creditQueryRecord/list', text: '征信查询记录', icon: 'search', permission: 'invest:creditQueryRecord:list' }
])
const baseGridList=ref([
{ path: '/pages/page1/page1', text: 'pos机管理', icon: 'shop-filled', permission: 'invest:posmachine:list' },
{ path: '/pages/work/base/posmachine/list', text: 'pos机管理', icon: 'shop-filled', permission: 'invest:posmachine:list' },
{ path: '/pages/work/base/creditCard/list', text: '信用卡管理', icon: 'wallet', permission: 'invest:bankcard:list' },
{ path: '/pages/work/base/debitCard/list', text: '储蓄卡管理', icon: 'wallet-filled', permission: 'invest:bankcard:list' },
{ path: '/pages/work/base/lend/list', text: '借贷账户管理', icon: 'upload', permission: 'invest:bankcard:list' },
{ path: '/pages/page1/page1', text: '股票账户管理', icon: 'calendar', permission: 'invest:futureStocks:list' },
{ path: '/pages/page1/page1', text: '期货账户管理', icon: 'paperplane-filled', permission: 'invest:futureStocks:list' }
{ path: '/pages/work/base/stocks/list', text: '股票账户管理', icon: 'calendar', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/base/futures/list', text: '期货账户管理', icon: 'paperplane-filled', permission: 'invest:futureStocks:list' }
])
const billGridList=ref([
{ path: '/pages/work/bill/futuresBill/list', text: '期货账单', icon: 'map', permission: 'invest:futureStocksBill:list' },