fix:功能调整
This commit is contained in:
@@ -14,7 +14,7 @@ const config = {
|
|||||||
// 应用logo
|
// 应用logo
|
||||||
logo: "/static/logo.png",
|
logo: "/static/logo.png",
|
||||||
// 官方网站
|
// 官方网站
|
||||||
site_url: "http://ruoyi.vip",
|
site_url: "http://www.qdintc.com",
|
||||||
// 政策协议
|
// 政策协议
|
||||||
agreements: [{
|
agreements: [{
|
||||||
title: "隐私政策",
|
title: "隐私政策",
|
||||||
|
|||||||
@@ -70,7 +70,21 @@
|
|||||||
}
|
}
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
"path": "pages/work/accounts/accountDealRecord/index",
|
"path": "pages/work/accounts/accountDealRecord/list",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "账户交易记录"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{
|
||||||
|
"path": "pages/work/accounts/accountDealRecord/details",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "账户交易记录详情"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{
|
||||||
|
"path": "pages/work/accounts/accountDealRecord/addEdit",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "账户交易记录"
|
"navigationBarTitleText": "账户交易记录"
|
||||||
}
|
}
|
||||||
@@ -308,8 +322,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/statistic/index",
|
"pagePath": "pages/statistic/index",
|
||||||
"iconPath": "static/images/tabbar/work.png",
|
"iconPath": "static/images/tabbar/statistic.png",
|
||||||
"selectedIconPath": "static/images/tabbar/work_.png",
|
"selectedIconPath": "static/images/tabbar/statistic_.png",
|
||||||
"text": "统计分析"
|
"text": "统计分析"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ const captchaEnabled = ref(true); // 是否开启验证码
|
|||||||
const useWxLogin = ref(false); // 是否使用微信登录
|
const useWxLogin = ref(false); // 是否使用微信登录
|
||||||
const globalConfig = ref(config);
|
const globalConfig = ref(config);
|
||||||
const loginForm = ref({
|
const loginForm = ref({
|
||||||
username: "admin",
|
username: "",
|
||||||
password: "admin123",
|
password: "",
|
||||||
code: "",
|
code: "",
|
||||||
uuid: ''
|
uuid: ''
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
<view class="mine-actions grid col-4 text-center">
|
<view class="mine-actions grid col-4 text-center">
|
||||||
<view class="action-item" @click="handleJiaoLiuQun">
|
<view class="action-item" @click="handleJiaoLiuQun">
|
||||||
<view class="iconfont icon-friendfill text-pink icon"></view>
|
<view class="iconfont icon-friendfill text-pink icon"></view>
|
||||||
<text class="text">交流群</text>
|
<text class="text">企业微信</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="action-item" @click="handleBuilding">
|
<view class="action-item" @click="handleService">
|
||||||
<view class="iconfont icon-service text-blue icon"></view>
|
<view class="iconfont icon-service text-blue icon"></view>
|
||||||
<text class="text">在线客服</text>
|
<text class="text">在线客服</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<view class="iconfont icon-community text-mauve icon"></view>
|
<view class="iconfont icon-community text-mauve icon"></view>
|
||||||
<text class="text">反馈社区</text>
|
<text class="text">反馈社区</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="action-item" @click="handleBuilding">
|
<view class="action-item" @click="handleUs">
|
||||||
<view class="iconfont icon-dianzan text-green icon"></view>
|
<view class="iconfont icon-dianzan text-green icon"></view>
|
||||||
<text class="text">点赞我们</text>
|
<text class="text">点赞我们</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -101,8 +101,6 @@ uni.$on('refresh', () => {
|
|||||||
avatar.value = userStore.avatar;
|
avatar.value = userStore.avatar;
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(avatar.value)
|
|
||||||
|
|
||||||
function handleToInfo() {
|
function handleToInfo() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages_mine/pages/info/index'
|
url: '/pages_mine/pages/info/index'
|
||||||
@@ -155,7 +153,7 @@ function handleAbout() {
|
|||||||
};
|
};
|
||||||
function handleJiaoLiuQun() {
|
function handleJiaoLiuQun() {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: 'QQ群:133713780',
|
title: '17753252359',
|
||||||
mask: false,
|
mask: false,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 1000
|
duration: 1000
|
||||||
@@ -163,13 +161,28 @@ function handleJiaoLiuQun() {
|
|||||||
};
|
};
|
||||||
function handleBuilding() {
|
function handleBuilding() {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '模块建设中~',
|
title: '谢谢反馈~',
|
||||||
|
mask: false,
|
||||||
|
icon: "none",
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function handleService() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请电联:17753252359~',
|
||||||
|
mask: false,
|
||||||
|
icon: "none",
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function handleUs() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '谢谢点赞!',
|
||||||
mask: false,
|
mask: false,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 1000
|
duration: 1000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
const billGridList=ref([
|
const billGridList=ref([
|
||||||
{ path: '/pages/page1/page1', text: '账户总览', icon: 'person-filled', permission: 'invest:accountAnalysis:list' },
|
{ path: '/pages/page1/page1', text: '账户总览', icon: 'person-filled', permission: 'invest:accountAnalysis:list' },
|
||||||
{ path: '/pages/page1/page1', text: '收益统计分析', icon: 'arrow-down', permission: 'invest:investAnalysis:list' },
|
{ path: '/pages/page1/page1', text: '收益统计分析', icon: 'arrow-down', permission: 'invest:investAnalysis:list' },
|
||||||
{ path: '/pages/page1/page1', text: '期货统计分析', icon: 'down', permission: 'invest:futuresAnalysis:list' },
|
{ path: '/pages/page1/page1', text: '期货统计分析', icon: 'settings', permission: 'invest:futuresAnalysis:list' },
|
||||||
{ path: '/pages/page1/page1', text: '股票统计分析', icon: 'left', permission: 'invest:stocksAnalysis:list' },
|
{ path: '/pages/page1/page1', text: '股票统计分析', icon: 'left', permission: 'invest:stocksAnalysis:list' },
|
||||||
{ path: '/pages/page1/page1', text: '网贷待还统计', icon: 'cloud-upload', permission: 'invest:onlineLendAnalysis:list' },
|
{ path: '/pages/page1/page1', text: '网贷待还统计', icon: 'cloud-upload', permission: 'invest:onlineLendAnalysis:list' },
|
||||||
{ path: '/pages/page1/page1', text: '网贷已还统计', icon: 'download', permission: 'invest:onlineLendSettledAnalysis:list' },
|
{ path: '/pages/page1/page1', text: '网贷已还统计', icon: 'download', permission: 'invest:onlineLendSettledAnalysis:list' },
|
||||||
|
|||||||
301
src/pages/work/accounts/accountDealRecord/addEdit.vue
Normal file
301
src/pages/work/accounts/accountDealRecord/addEdit.vue
Normal file
@@ -0,0 +1,301 @@
|
|||||||
|
<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="typeName" required @click="handleAccountType">
|
||||||
|
<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="accountName" required @click="handleAccountName">
|
||||||
|
<u--input v-model="form.accountName" 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="dealTypeName" required @click="handleDealType">
|
||||||
|
<u--input v-model="form.dealTypeName" 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="createTime" required @click="selectDate()">
|
||||||
|
<u--input v-model="form.createTime" 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="amount" required >
|
||||||
|
<u--input v-model="form.amount" placeholder="请填写交易金额"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="交易类别" prop="dealCategoryName" required @click="handleDealCategory">
|
||||||
|
<u--input v-model="form.dealCategoryName" disabled disabledColor="#ffffff" placeholder="请选择交易类别"
|
||||||
|
inputAlign="right" border="none"></u--input>
|
||||||
|
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="备注" prop="remark" labelPosition="top">
|
||||||
|
<u--textarea v-model="form.remark" placeholder="请填写备注" border="none" autoHeight inputAlign="right" count
|
||||||
|
maxlength="20000" style="padding:18rpx 0;"></u--textarea>
|
||||||
|
</u-form-item>
|
||||||
|
</u--form>
|
||||||
|
<view class="form-btn">
|
||||||
|
<u-button type="primary" text="提交" @click="submit"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast"></u-toast>
|
||||||
|
<u-picker itemHeight="88" :show="showAccountType" :columns="accountTypeList" keyName="dictLabel" @cancel="handleAccountTypeCancel"
|
||||||
|
@confirm="handleAccountTypeConfirm"></u-picker>
|
||||||
|
<u-picker itemHeight="88" :show="showAccountName" :columns="accountNameList" keyName="nameCode" @cancel="handleAccountNameCancel"
|
||||||
|
@confirm="handleAccountNameConfirm"></u-picker>
|
||||||
|
<u-picker itemHeight="88" :show="showDealCategory" :columns="dealCategoryList" keyName="dictLabel" @cancel="handleDealCategoryCancel"
|
||||||
|
@confirm="handleDealCategoryConfirm"></u-picker>
|
||||||
|
<u-picker itemHeight="88" :show="showDealType" :columns="dealTypeList" keyName="dictLabel" @cancel="handleDealTypeCancel"
|
||||||
|
@confirm="handleDealTypeConfirm"></u-picker>
|
||||||
|
<u-datetime-picker
|
||||||
|
:show="datePickShow"
|
||||||
|
mode="datetime"
|
||||||
|
ref="createTimeRef"
|
||||||
|
@cancel="datePickShow=false"
|
||||||
|
@confirm="datePickConfirm"
|
||||||
|
itemHeight="88"
|
||||||
|
></u-datetime-picker>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {getAccountDealRecord, addAccountDealRecord, updateAccountDealRecord } from '@/api/invest/accountDealRecord'
|
||||||
|
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 showAccountType = ref(false)
|
||||||
|
const showAccountName = ref(false)
|
||||||
|
const showDealCategory = ref(false)
|
||||||
|
const showDealType = ref(false)
|
||||||
|
const title = ref("账户交易记录")
|
||||||
|
const accountTypeList = ref([])
|
||||||
|
const accountNameList = ref([])
|
||||||
|
const dealCategoryList = ref([])
|
||||||
|
const dealTypeList = ref([])
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryAccountParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
state: '1',
|
||||||
|
type: '',
|
||||||
|
pageSize: 1000
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
type: [{ required: true, message: '记账类型不能为空', trigger:['change', 'blur'] }],
|
||||||
|
accountId: [{ required: true, message: '记账账户不能为空', trigger: ['change', 'blur'] }],
|
||||||
|
amount: [{type: 'string', required: true, message: '交易金额不能为空', trigger: ['change', 'blur'] }],
|
||||||
|
dealType: [{ required: true, message: '交易类型不能为空', trigger:['change', 'blur'] }],
|
||||||
|
dealCategory: [{ required: true, message: '交易类别不能为空', trigger: ['change', 'blur'] }],
|
||||||
|
createTime: [{ required: true, message: '交易时间不能为空', trigger: ['change', 'blur'] }]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const { form, queryAccountParams, rules} = toRefs(data)
|
||||||
|
|
||||||
|
|
||||||
|
onLoad((option) => {
|
||||||
|
form.value.id = option.id
|
||||||
|
if(form.value.id!=null){
|
||||||
|
title.value="账户交易记录-修改"
|
||||||
|
}else{
|
||||||
|
title.value="账户交易记录-新增"
|
||||||
|
}
|
||||||
|
getDict()
|
||||||
|
})
|
||||||
|
onReady(() => {
|
||||||
|
// proxy.$refs['uForm'].setRules(rules.value)
|
||||||
|
})
|
||||||
|
function getDict() {
|
||||||
|
// 类型
|
||||||
|
getDicts('account_type').then(res => {
|
||||||
|
accountTypeList.value =[res.data]
|
||||||
|
})
|
||||||
|
// 类型
|
||||||
|
getDicts('deal_type').then(res => {
|
||||||
|
dealTypeList.value =[res.data]
|
||||||
|
})
|
||||||
|
// 类型
|
||||||
|
getDicts('deal_category').then(res => {
|
||||||
|
dealCategoryList.value =[res.data]
|
||||||
|
})
|
||||||
|
listAccounts(queryAccountParams.value).then((response) => {
|
||||||
|
accountNameList.value = [response.rows]
|
||||||
|
})
|
||||||
|
if(form.value.id!=null){
|
||||||
|
getAccountDealRecord(form.value.id).then(res => {
|
||||||
|
form.value = res.data
|
||||||
|
// 记账类型
|
||||||
|
getDicts('account_type').then(result => {
|
||||||
|
form.value.typeName=dictStr(form.value.type, result.data)
|
||||||
|
})
|
||||||
|
// 交易类型
|
||||||
|
getDicts('deal_type').then(result => {
|
||||||
|
form.value.dealTypeName=dictStr(form.value.dealType, result.data)
|
||||||
|
})
|
||||||
|
// 交易类别
|
||||||
|
getDicts('deal_category').then(result => {
|
||||||
|
form.value.dealCategoryName=dictStr(form.value.dealCategory, result.data)
|
||||||
|
})
|
||||||
|
queryAccountParams.value.type = ""
|
||||||
|
listAccounts(queryAccountParams.value).then((response) => {
|
||||||
|
accountNameList.value = [response.rows]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function dictStr(val, arr) {
|
||||||
|
let str = ''
|
||||||
|
arr.map(item => {
|
||||||
|
if (item.dictValue === val) {
|
||||||
|
str = item.dictLabel
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleAccountType() {
|
||||||
|
if (accountTypeList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '记账类型为空 ', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showAccountType.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function handleAccountTypeConfirm(e) {
|
||||||
|
form.value.typeName = e.value[0].dictLabel
|
||||||
|
form.value.type = e.value[0].dictValue
|
||||||
|
queryAccountParams.value.type = form.value.type
|
||||||
|
form.value.accountId = null
|
||||||
|
form.value.accountName = null
|
||||||
|
listAccounts(queryAccountParams.value).then((response) => {
|
||||||
|
accountNameList.value = [response.rows]
|
||||||
|
})
|
||||||
|
showAccountType.value = false
|
||||||
|
|
||||||
|
}
|
||||||
|
function handleAccountTypeCancel() {
|
||||||
|
showAccountType.value = false
|
||||||
|
}
|
||||||
|
function handleAccountName() {
|
||||||
|
if (accountNameList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '记账账户为空 ', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showAccountName.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function handleAccountNameConfirm(e) {
|
||||||
|
form.value.accountName = e.value[0].nameCode
|
||||||
|
form.value.accountId = e.value[0].id
|
||||||
|
showAccountName.value = false
|
||||||
|
}
|
||||||
|
function handleAccountNameCancel() {
|
||||||
|
showAccountName.value = false
|
||||||
|
}
|
||||||
|
function handleDealCategory() {
|
||||||
|
if (accountTypeList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '交易类别为空 ', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showDealCategory.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function handleDealCategoryConfirm(e) {
|
||||||
|
form.value.dealCategoryName = e.value[0].dictLabel
|
||||||
|
form.value.dealCategory = e.value[0].dictValue
|
||||||
|
showDealCategory.value = false
|
||||||
|
}
|
||||||
|
function handleDealCategoryCancel() {
|
||||||
|
showDealCategory.value = false
|
||||||
|
}
|
||||||
|
function handleDealType() {
|
||||||
|
if (dealTypeList.value[0].length === 0) {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '交易类型为空 ', type: 'warning'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
showDealType.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function handleDealTypeConfirm(e) {
|
||||||
|
form.value.dealTypeName = e.value[0].dictLabel
|
||||||
|
form.value.dealType = e.value[0].dictValue
|
||||||
|
showDealType.value = false
|
||||||
|
}
|
||||||
|
function handleDealTypeCancel() {
|
||||||
|
showDealType.value = false
|
||||||
|
}
|
||||||
|
function selectDate() {
|
||||||
|
datePickShow.value = true
|
||||||
|
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
|
||||||
|
}
|
||||||
|
function datePickConfirm(e) {
|
||||||
|
form.value.createTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss")
|
||||||
|
datePickShow.value = false
|
||||||
|
}
|
||||||
|
function submit() {
|
||||||
|
proxy.$refs['uForm'].validate().then(() => {
|
||||||
|
if (form.value.id != null) {
|
||||||
|
updateAccountDealRecord(form.value).then(res => {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '修改成功', complete() {
|
||||||
|
uni.navigateTo({ url: `/pages/work/accounts/accountDealRecord/list` })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
addAccountDealRecord(form.value).then(res => {
|
||||||
|
proxy.$refs['uToast'].show({
|
||||||
|
message: '新增成功', complete() {
|
||||||
|
uni.navigateTo({ url: `/pages/work/accounts/accountDealRecord/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>
|
||||||
107
src/pages/work/accounts/accountDealRecord/details.vue
Normal file
107
src/pages/work/accounts/accountDealRecord/details.vue
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container" style="paddingBottom:1rpx;">
|
||||||
|
<u-navbar
|
||||||
|
leftIconSize="40rpx"
|
||||||
|
leftIconColor="#333333"
|
||||||
|
title="账户交易记录详情"
|
||||||
|
>
|
||||||
|
</u-navbar>
|
||||||
|
<view class="section">
|
||||||
|
<!-- <view class="section-title">{{ detailInfo.name }}</view> -->
|
||||||
|
<u-cell-group>
|
||||||
|
<u-cell title="账户名称:" titleStyle="font-weight:bolder" :value="detailInfo.accountName"></u-cell>
|
||||||
|
<u-cell title="账户类型:" titleStyle="font-weight:bolder" :value="detailInfo.type"></u-cell>
|
||||||
|
<u-cell title="交易类型:" titleStyle="font-weight:bolder" :value="detailInfo.dealType"></u-cell>
|
||||||
|
<u-cell title="交易类别:" titleStyle="font-weight:bolder" :value="detailInfo.dealCategory"></u-cell>
|
||||||
|
<u-cell title="交易金额:" titleStyle="font-weight:bolder" :value="detailInfo.amount"></u-cell>
|
||||||
|
<u-cell title="当前余额:" titleStyle="font-weight:bolder" :value="detailInfo.currentBalance"></u-cell>
|
||||||
|
<u-cell title="交易时间:" titleStyle="font-weight:bolder" :value="detailInfo.createTime"></u-cell>
|
||||||
|
<u-cell title="备注:" titleStyle="font-weight:bolder" :value="detailInfo.remark" center> </u-cell>
|
||||||
|
|
||||||
|
</u-cell-group>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<u-toast ref="uToast"></u-toast>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getAccountDealRecord} from '@/api/invest/accountDealRecord'
|
||||||
|
import {onLoad} from "@dcloudio/uni-app";
|
||||||
|
import { getDicts } from '@/api/system/dict/data.js'
|
||||||
|
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() {
|
||||||
|
getAccountDealRecord(id.value).then(res => {
|
||||||
|
detailInfo.value = res.data
|
||||||
|
// 类型
|
||||||
|
getDicts('account_type').then(result => {
|
||||||
|
detailInfo.value.type=dictStr(detailInfo.value.type, result.data)
|
||||||
|
})
|
||||||
|
// 类型
|
||||||
|
getDicts('deal_type').then(result => {
|
||||||
|
detailInfo.value.dealType=dictStr(detailInfo.value.dealType, result.data)
|
||||||
|
})
|
||||||
|
// 类型
|
||||||
|
getDicts('deal_category').then(result => {
|
||||||
|
detailInfo.value.dealCategory=dictStr(detailInfo.value.dealCategory, 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>
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="work-container">
|
|
||||||
交易记录
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
|
||||||
503
src/pages/work/accounts/accountDealRecord/list.vue
Normal file
503
src/pages/work/accounts/accountDealRecord/list.vue
Normal file
@@ -0,0 +1,503 @@
|
|||||||
|
<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">
|
||||||
|
<template slot="prefix">
|
||||||
|
<u-icon name="search" color="#B8B8B8" size="48"></u-icon>
|
||||||
|
</template>
|
||||||
|
</u--input>
|
||||||
|
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||||
|
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||||
|
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
|
||||||
|
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
|
||||||
|
<u-transition :show="filterPanel" mode="fade">
|
||||||
|
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||||
|
<view class="filter-panel-content">
|
||||||
|
<view class="filter-title">记账类型</view>
|
||||||
|
<view class="state-list">
|
||||||
|
<view v-for="item in accountTypeList" :key="item.id" class="state-item"
|
||||||
|
:class="item.selected ? 'active' : ''" @click="selectAccountType(item)">{{ item.dictLabel }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter-title">交易类型</view>
|
||||||
|
<view class="state-list">
|
||||||
|
<view v-for="item in dealTypeList" :key="item.id" class="state-item"
|
||||||
|
:class="item.selected ? 'active' : ''" @click="selectDealType(item)">{{ item.dictLabel }}</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="filter-title">交易类别</view>
|
||||||
|
<view class="state-list">
|
||||||
|
<view v-for="item in dealCategoryList" :key="item.id" class="state-item"
|
||||||
|
:class="item.selected ? 'active' : ''" @click="selectDealCategory(item)">{{ item.dictLabel }}</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="select-header">交易时间</view>
|
||||||
|
<view class="selcet-content" style="padding: 0 24rpx">
|
||||||
|
<u-input
|
||||||
|
:disabled="true"
|
||||||
|
:disabledColor="'#fff'"
|
||||||
|
class="dateInput"
|
||||||
|
border="surround"
|
||||||
|
v-model="queryParams.startTime"
|
||||||
|
placeholder="请选择开始时间"
|
||||||
|
>
|
||||||
|
<template v-slot:suffix>
|
||||||
|
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
|
||||||
|
</template>
|
||||||
|
</u-input>
|
||||||
|
<u-input
|
||||||
|
:disabled="true"
|
||||||
|
:disabledColor="'#fff'"
|
||||||
|
class="dateInput"
|
||||||
|
border="surround"
|
||||||
|
v-model="queryParams.endTime"
|
||||||
|
placeholder="请选择结束时间"
|
||||||
|
>
|
||||||
|
<template v-slot:suffix>
|
||||||
|
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
|
||||||
|
</template>
|
||||||
|
</u-input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="btn-box">
|
||||||
|
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||||
|
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||||
|
</view>
|
||||||
|
<u-datetime-picker
|
||||||
|
:closeOnClickOverlay="true"
|
||||||
|
:show="timeShow"
|
||||||
|
v-model="time"
|
||||||
|
mode="datetime"
|
||||||
|
@close="openOrCloseDate"
|
||||||
|
@cancel="openOrCloseDate"
|
||||||
|
@confirm="confirm"
|
||||||
|
></u-datetime-picker>
|
||||||
|
</view>
|
||||||
|
</u-transition>
|
||||||
|
</view>
|
||||||
|
</u-sticky>
|
||||||
|
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
|
||||||
|
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||||
|
<view class="list-item">
|
||||||
|
<view class="item-header" @click="enterDetails(item)">
|
||||||
|
<u--text suffixIcon="arrow-right" lines="1" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
|
||||||
|
:text="item.accountName" size="36rpx" color="#333333" :bold="true"></u--text>
|
||||||
|
</view>
|
||||||
|
<view class="item-row">
|
||||||
|
<text class="row-label">记账类型:</text>
|
||||||
|
<text class="row-value">{{ dictStr(item.type, accountTypeList) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item-row">
|
||||||
|
<text class="row-label">交易时间:</text>
|
||||||
|
<text class="row-value">{{ item.createTime }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item-row">
|
||||||
|
<text class="row-label">交易金额:</text>
|
||||||
|
<text class="row-value">{{ item.amount }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item-row">
|
||||||
|
<text class="row-label">当前余额:</text>
|
||||||
|
<text class="row-value">{{ item.currentBalance }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item-row">
|
||||||
|
<text class="row-label">交易类型:</text>
|
||||||
|
<text class="row-value">{{ dictStr(item.dealType, dealTypeList) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item-row">
|
||||||
|
<text class="row-label">交易类别:</text>
|
||||||
|
<text class="row-value">{{ dictStr(item.dealCategory, dealCategoryList) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item-row">
|
||||||
|
<text class="row-label">备注:</text>
|
||||||
|
<text class="row-value">{{ item.remark }}</text>
|
||||||
|
</view>
|
||||||
|
<view 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 {
|
||||||
|
listAccountDealRecord,
|
||||||
|
delAccountDealRecord,
|
||||||
|
} from '@/api/invest/accountDealRecord'
|
||||||
|
import { getDicts } from '@/api/system/dict/data.js'
|
||||||
|
import { timeHandler } from '@/utils/common.ts'
|
||||||
|
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||||
|
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||||
|
import {reactive ,toRefs,ref,computed }from "vue";
|
||||||
|
const pageNum = ref(1)
|
||||||
|
const listData = ref([])
|
||||||
|
const isShow = ref(false)
|
||||||
|
const status = ref('loadmore')
|
||||||
|
const accountTypeList = ref([])
|
||||||
|
const dealTypeList = ref([])
|
||||||
|
const dealCategoryList = ref([])
|
||||||
|
const settingPickShow = ref(false)
|
||||||
|
const settingColumns = ref([])
|
||||||
|
const timeShow= ref(false)
|
||||||
|
const flag= ref(true)
|
||||||
|
const time =ref( Number(new Date()))
|
||||||
|
const data = reactive({
|
||||||
|
filterPanel: false,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: null,
|
||||||
|
type: null,
|
||||||
|
time: '',
|
||||||
|
accountId: null,
|
||||||
|
dealType: null,
|
||||||
|
dealCategory: null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const { filterPanel, queryParams} = toRefs(data)
|
||||||
|
const windowHeight = computed(() => {
|
||||||
|
uni.getSystemInfoSync().windowHeight - 50
|
||||||
|
})
|
||||||
|
onLoad(() => {
|
||||||
|
getDict()
|
||||||
|
getList()
|
||||||
|
});
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
if (isShow.value) {
|
||||||
|
getList()
|
||||||
|
isShow.value = false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function openOrCloseDate(data) {
|
||||||
|
timeShow.value = !timeShow.value
|
||||||
|
flag.value = data
|
||||||
|
}
|
||||||
|
function loadmore() {
|
||||||
|
pageNum.value += 1
|
||||||
|
if (status.value == 'loadmore') {
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getList() {
|
||||||
|
status.value = 'loading'
|
||||||
|
listAccountDealRecord({ pageSize: 10, pageNum: pageNum.value, ...queryParams.value }).then(res => {
|
||||||
|
listData.value = listData.value.concat(res.rows)
|
||||||
|
if (listData.length < res.total) {
|
||||||
|
status.value = 'loadmore'
|
||||||
|
} else {
|
||||||
|
status.value = 'nomore'
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
status.value = 'nomore'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function confirm(e) {
|
||||||
|
const date = timeHandler(new Date(e.value), '-', ':')
|
||||||
|
if (flag.value) {
|
||||||
|
queryParams.value.startTime = date
|
||||||
|
} else {
|
||||||
|
queryParams.value.endTime = date
|
||||||
|
}
|
||||||
|
timeShow.value = false
|
||||||
|
}
|
||||||
|
function getDict() {
|
||||||
|
// 记账类型类型
|
||||||
|
getDicts('account_type').then(res => {
|
||||||
|
accountTypeList.value = res.data
|
||||||
|
})
|
||||||
|
// 交易类型
|
||||||
|
getDicts('deal_type').then(res => {
|
||||||
|
dealTypeList.value = res.data
|
||||||
|
})
|
||||||
|
// 交易类别
|
||||||
|
getDicts('deal_category').then(res => {
|
||||||
|
dealCategoryList.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function settingConfirm(e) {
|
||||||
|
queryParams.value.settingId = e.value[0].settingId
|
||||||
|
queryParams.value.settingName = e.value[0].settingName
|
||||||
|
settingPickShow.value = false
|
||||||
|
}
|
||||||
|
function settingCancel() {
|
||||||
|
settingPickShow.value = false
|
||||||
|
}
|
||||||
|
function dictStr(val, arr) {
|
||||||
|
let str = ''
|
||||||
|
arr.map(item => {
|
||||||
|
if (item.dictValue === val) {
|
||||||
|
str = item.dictLabel
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
function selectAccountType(item) {
|
||||||
|
queryParams.value.type = item.dictValue
|
||||||
|
accountTypeList.value.map(ele => {
|
||||||
|
if (ele.dictValue == item.dictValue) {
|
||||||
|
ele.selected = true
|
||||||
|
Reflect.set(ele, 'selected', true)
|
||||||
|
} else {
|
||||||
|
Reflect.set(ele, 'selected', false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function selectDealType(item) {
|
||||||
|
queryParams.value.dealType = item.dictValue
|
||||||
|
dealTypeList.value.map(ele => {
|
||||||
|
if (ele.dictValue == item.dictValue) {
|
||||||
|
ele.selected = true
|
||||||
|
Reflect.set(ele, 'selected', true)
|
||||||
|
} else {
|
||||||
|
Reflect.set(ele, 'selected', false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function selectDealCategory(item) {
|
||||||
|
queryParams.value.dealCategory = item.dictValue
|
||||||
|
dealCategoryList.value.map(ele => {
|
||||||
|
if (ele.dictValue == item.dictValue) {
|
||||||
|
ele.selected = true
|
||||||
|
Reflect.set(ele, 'selected', true)
|
||||||
|
} else {
|
||||||
|
Reflect.set(ele, 'selected', false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function searchSubmit() {
|
||||||
|
pageNum.value = 1
|
||||||
|
listData.value = []
|
||||||
|
getList()
|
||||||
|
filterPanel.value = false
|
||||||
|
}
|
||||||
|
function searchBlur() {
|
||||||
|
pageNum.value = 1
|
||||||
|
listData.value = []
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
function resetQuery() {
|
||||||
|
queryParams.value.name = ''
|
||||||
|
queryParams.value.type = ''
|
||||||
|
queryParams.value.dealType = ''
|
||||||
|
queryParams.value.startTime = ''
|
||||||
|
queryParams.value.endTime = ''
|
||||||
|
queryParams.value.dealCategory = ''
|
||||||
|
accountTypeList.value.map(ele => {
|
||||||
|
Reflect.set(ele, 'selected', false)
|
||||||
|
})
|
||||||
|
dealTypeList.value.map(ele => {
|
||||||
|
Reflect.set(ele, 'selected', false)
|
||||||
|
})
|
||||||
|
dealCategoryList.value.map(ele => {
|
||||||
|
Reflect.set(ele, 'selected', false)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function enterDetails(item) {
|
||||||
|
uni.navigateTo({ url: `/pages/work/accounts/accountDealRecord/details?id=${item.id}` })
|
||||||
|
}
|
||||||
|
function handleEdit(item) {
|
||||||
|
uni.navigateTo({ url: `/pages/work/accounts/accountDealRecord/addEdit?id=${item.id}` })
|
||||||
|
isShow.value = true
|
||||||
|
}
|
||||||
|
function handleAdd() {
|
||||||
|
uni.navigateTo({ url: `/pages/work/accounts/accountDealRecord/addEdit` })
|
||||||
|
isShow.value = true
|
||||||
|
}
|
||||||
|
function handleDelete(item) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '你确定要删除吗',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
delAccountDealRecord(item.id)
|
||||||
|
uni.navigateTo({ url: `/pages/work/accounts/accountDealRecord/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>
|
||||||
@@ -63,10 +63,10 @@ const journeyTypeList = ref([])
|
|||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ type: 'string', required: true, message: '请输入标题', trigger: ['change', 'blur'] }],
|
name: [{ type: 'string', required: true, message: '标题不能为空', trigger: ['change', 'blur'] }],
|
||||||
createTime: [{ type: 'string', required: true, message: '请选择记录时间', trigger: ['change', 'blur'] }],
|
createTime: [{ type: 'string', required: true, message: '记录时间不能为空', trigger: ['change', 'blur'] }],
|
||||||
type: [{ type: 'string', required: true, message: '请选择类型', trigger: ['change', 'blur'] }],
|
type: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
|
||||||
remark: [{ type: 'string', required: true, message: '请输入内容', trigger: ['change', 'blur'] }],
|
remark: [{ type: 'string', required: true, message: '内容不能为空', trigger: ['change', 'blur'] }],
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const { form, rules} = toRefs(data)
|
const { form, rules} = toRefs(data)
|
||||||
@@ -84,17 +84,30 @@ onLoad((option) => {
|
|||||||
proxy.$refs['uForm'].setRules(rules.value)
|
proxy.$refs['uForm'].setRules(rules.value)
|
||||||
})
|
})
|
||||||
function getDict() {
|
function getDict() {
|
||||||
// 工单状态
|
// 类型
|
||||||
getDicts('journey_type').then(res => {
|
getDicts('journey_type').then(res => {
|
||||||
journeyTypeList.value =[res.data]
|
journeyTypeList.value =[res.data]
|
||||||
})
|
})
|
||||||
if(form.value.id!=null){
|
if(form.value.id!=null){
|
||||||
getHeartJourney(form.value.id).then(res => {
|
getHeartJourney(form.value.id).then(res => {
|
||||||
form.value = res.data
|
form.value = res.data
|
||||||
|
// 类型
|
||||||
|
getDicts('journey_type').then(result => {
|
||||||
|
form.value.typeName=dictStr(form.value.type, result.data)
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function dictStr(val, arr) {
|
||||||
|
let str = ''
|
||||||
|
arr.map(item => {
|
||||||
|
if (item.dictValue === val) {
|
||||||
|
str = item.dictLabel
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
function handleShowTeam() {
|
function handleShowTeam() {
|
||||||
if (journeyTypeList.value[0].length === 0) {
|
if (journeyTypeList.value[0].length === 0) {
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
>
|
>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<view class="section">
|
<view class="section">
|
||||||
<!-- <view class="section-title">{{ detailInfo.name }}</view> -->
|
<u-cell-group>
|
||||||
<uni-cellItem title="标题:" :value="detailInfo.name"></uni-cellItem>
|
<u-cell title="标题:" titleStyle="font-weight:bolder" :value="detailInfo.name"></u-cell>
|
||||||
<uni-cellItem title="记录时间:" :value="detailInfo.createTime"></uni-cellItem>
|
<u-cell title="记录时间:" titleStyle="font-weight:bolder" :value="detailInfo.createTime"></u-cell>
|
||||||
<uni-cellItem title="内容:"></uni-cellItem>
|
<u-cell title="内容:" titleStyle="font-weight:bolder" center :value="detailInfo.remark"> </u-cell>
|
||||||
<view class="content">{{ detailInfo.remark }}</view>
|
</u-cell-group>
|
||||||
</view>
|
</view>
|
||||||
<u-toast ref="uToast"></u-toast>
|
<u-toast ref="uToast"></u-toast>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ function getList() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
function getDict() {
|
function getDict() {
|
||||||
// 工单状态
|
// 类型
|
||||||
getDicts('journey_type').then(res => {
|
getDicts('journey_type').then(res => {
|
||||||
journeyTypeList.value = res.data
|
journeyTypeList.value = res.data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="work-container">
|
<view class="work-container">
|
||||||
|
|
||||||
|
<!-- 宫格组件 -->
|
||||||
|
<uni-section title="常用功能" type="line"></uni-section>
|
||||||
|
<view class="grid-body">
|
||||||
|
<uni-grid :column="4" :showBorder="false">
|
||||||
|
<uni-grid-item v-for="(item, index) in commonGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons :type="item.icon" size="30"></uni-icons>
|
||||||
|
<text class="text">{{ item.text }}</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
</uni-grid>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 宫格组件 -->
|
<!-- 宫格组件 -->
|
||||||
<uni-section title="基础信息" v-show="auth.hasPermi('invest:bankcard:list')" type="line"></uni-section>
|
<uni-section title="基础信息" v-show="auth.hasPermi('invest:bankcard:list')" type="line"></uni-section>
|
||||||
<view class="grid-body">
|
<view class="grid-body">
|
||||||
@@ -14,7 +27,7 @@
|
|||||||
</uni-grid>
|
</uni-grid>
|
||||||
</view>
|
</view>
|
||||||
<!-- 宫格组件 -->
|
<!-- 宫格组件 -->
|
||||||
<uni-section title="账单管理" v-show="auth.hasPermi('invest:creditQueryRecord:list')" type="line"></uni-section>
|
<uni-section title="账单管理" v-show="auth.hasPermi('invest:installmentHistory:list')" type="line"></uni-section>
|
||||||
<view class="grid-body">
|
<view class="grid-body">
|
||||||
<uni-grid :column="4" :showBorder="false">
|
<uni-grid :column="4" :showBorder="false">
|
||||||
<uni-grid-item v-for="(item, index) in billGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
<uni-grid-item v-for="(item, index) in billGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
||||||
@@ -59,6 +72,17 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
|
|||||||
|
|
||||||
// 也可以使用下面的方式
|
// 也可以使用下面的方式
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
const commonGridList=ref([
|
||||||
|
{ path: '/pages/work/heartJourney/list', text: '心路历程', icon: 'heart', permission: 'invest:heartJourney:list' },
|
||||||
|
{ path: '/pages/work/accounts/accountDealRecord/list', text: '账户交易记录', icon: 'paperclip', permission: 'invest:accountDealRecord:list' },
|
||||||
|
{ path: '/pages/page1/page1', text: 'POS机刷卡记账', icon: 'reload', permission: 'invest:accountsTransferRecord:list' },
|
||||||
|
{ path: '/pages/page1/page1', text: '信用卡还款', icon: 'arrow-left', permission: 'invest:accountsTransferRecord:list' },
|
||||||
|
{ path: '/pages/page1/page1', text: '储蓄账户记账', icon: 'tune', permission: 'invest:accountsTransferRecord:list' },
|
||||||
|
{ path: '/pages/work/accounts/accounts/index', text: '记账账户', icon: 'staff', permission: 'invest:accounts:list' },
|
||||||
|
{ path: '/pages/page1/page1', text: '网贷账单', icon: 'settings', permission: 'invest:installmentHistory:list' },
|
||||||
|
{ path: '/pages/page1/page1', text: '信用卡分期账单', icon: 'bars', permission: 'invest:installmentHistory:list' },
|
||||||
|
{ path: '/pages/page1/page1', text: '征信查询记录', icon: 'search', permission: 'invest:creditQueryRecord:list' }
|
||||||
|
])
|
||||||
const baseGridList=ref([
|
const baseGridList=ref([
|
||||||
{ path: '/pages/work/base/pos/index', text: 'pos机管理', icon: 'shop-filled', permission: 'invest:posmachine:list' },
|
{ path: '/pages/work/base/pos/index', text: 'pos机管理', icon: 'shop-filled', permission: 'invest:posmachine:list' },
|
||||||
{ path: '/pages/work/base/credit/index', text: '信用卡管理', icon: 'wallet', permission: 'invest:bankcard:list' },
|
{ path: '/pages/work/base/credit/index', text: '信用卡管理', icon: 'wallet', permission: 'invest:bankcard:list' },
|
||||||
@@ -84,7 +108,7 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
|
|||||||
{ path: '/pages/page1/page1', text: '投资交易记录', icon: 'chatboxes', permission: 'invest:accountDealRecord:list' },
|
{ path: '/pages/page1/page1', text: '投资交易记录', icon: 'chatboxes', permission: 'invest:accountDealRecord:list' },
|
||||||
{ path: '/pages/page1/page1', text: '储蓄账户记账', icon: 'tune', permission: 'invest:accountsTransferRecord:list' },
|
{ path: '/pages/page1/page1', text: '储蓄账户记账', icon: 'tune', permission: 'invest:accountsTransferRecord:list' },
|
||||||
{ path: '/pages/page1/page1', text: '借贷账户记账', icon: 'link', permission: 'invest:accountsTransferRecord:list' },
|
{ path: '/pages/page1/page1', text: '借贷账户记账', icon: 'link', permission: 'invest:accountsTransferRecord:list' },
|
||||||
{ path: '/pages/page1/page1', text: '账户交易记录', icon: 'paperclip', permission: 'invest:accountDealRecord:list' }
|
{ path: '/pages/work/accounts/accountDealRecord/list', text: '账户交易记录', icon: 'paperclip', permission: 'invest:accountDealRecord:list' }
|
||||||
])
|
])
|
||||||
const heartJourneyGridList=ref([
|
const heartJourneyGridList=ref([
|
||||||
{ path: '/pages/work/heartJourney/list', text: '心路历程', icon: 'heart', permission: 'invest:heartJourney:list' }
|
{ path: '/pages/work/heartJourney/list', text: '心路历程', icon: 'heart', permission: 'invest:heartJourney:list' }
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="about-container">
|
<view class="about-container">
|
||||||
<view class="header-section text-center">
|
<view class="header-section text-center">
|
||||||
<image style="width: 150rpx;height: 150rpx;" src="/static/logo200.png" mode="widthFix">
|
<image style="width: 150rpx;height: 150rpx;" src="/static/intc.jpg" mode="widthFix">
|
||||||
</image>
|
</image>
|
||||||
<uni-title type="h2" title="若依移动端"></uni-title>
|
<uni-title type="h2" title="智聪科技记账平台"></uni-title>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="content-section">
|
<view class="content-section">
|
||||||
@@ -17,13 +17,13 @@
|
|||||||
<view class="list-cell list-cell-arrow">
|
<view class="list-cell list-cell-arrow">
|
||||||
<view class="menu-item-box">
|
<view class="menu-item-box">
|
||||||
<view>官方邮箱</view>
|
<view>官方邮箱</view>
|
||||||
<view class="text-right">ruoyi@xx.com</view>
|
<view class="text-right">qdintc@126com</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-cell list-cell-arrow">
|
<view class="list-cell list-cell-arrow">
|
||||||
<view class="menu-item-box">
|
<view class="menu-item-box">
|
||||||
<view>服务热线</view>
|
<view>服务热线</view>
|
||||||
<view class="text-right">400-999-9999</view>
|
<view class="text-right">17753252359</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-cell list-cell-arrow">
|
<view class="list-cell list-cell-arrow">
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="copyright">
|
<view class="copyright">
|
||||||
<view>Copyright © 2022 ruoyi.vip All Rights Reserved.</view>
|
<view>Copyright © 2024 智聪科技 All Rights Reserved.</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -20,19 +20,16 @@
|
|||||||
|
|
||||||
const list =ref([{
|
const list =ref([{
|
||||||
icon: 'iconfont icon-github',
|
icon: 'iconfont icon-github',
|
||||||
title: '若依问题',
|
title: '智聪科技问题',
|
||||||
childList: [{
|
childList: [{
|
||||||
title: '若依开源吗?',
|
title: '智聪科技免费吗?',
|
||||||
content: '开源'
|
content: '免费'
|
||||||
}, {
|
}, {
|
||||||
title: '若依可以商用吗?',
|
title: '智聪科技官网地址多少?',
|
||||||
content: '可以'
|
content: 'http://www.qdintc.com'
|
||||||
}, {
|
}, {
|
||||||
title: '若依官网地址多少?',
|
title: '智聪科技文档地址多少?',
|
||||||
content: 'http://ruoyi.vip'
|
content: 'http://www.qdintc.com/doc'
|
||||||
}, {
|
|
||||||
title: '若依文档地址多少?',
|
|
||||||
content: 'http://doc.ruoyi.vip'
|
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,18 +7,18 @@
|
|||||||
<view>修改密码</view>
|
<view>修改密码</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-cell list-cell-arrow" @click="handleToUpgrade">
|
<!-- <view class="list-cell list-cell-arrow" @click="handleToUpgrade">
|
||||||
<view class="menu-item-box">
|
<view class="menu-item-box">
|
||||||
<view class="iconfont icon-refresh menu-icon"></view>
|
<view class="iconfont icon-refresh menu-icon"></view>
|
||||||
<view>检查更新</view>
|
<view>检查更新</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="list-cell list-cell-arrow" @click="handleCleanTmp">
|
<!-- <view class="list-cell list-cell-arrow" @click="handleCleanTmp">
|
||||||
<view class="menu-item-box">
|
<view class="menu-item-box">
|
||||||
<view class="iconfont icon-clean menu-icon"></view>
|
<view class="iconfont icon-clean menu-icon"></view>
|
||||||
<view>清理缓存</view>
|
<view>清理缓存</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-list menu">
|
<view class="cu-list menu">
|
||||||
<view class="cu-item item-box">
|
<view class="cu-item item-box">
|
||||||
|
|||||||
BIN
src/static/images/tabbar/statistic.png
Normal file
BIN
src/static/images/tabbar/statistic.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
BIN
src/static/images/tabbar/statistic_.png
Normal file
BIN
src/static/images/tabbar/statistic_.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
BIN
src/static/intc.jpg
Normal file
BIN
src/static/intc.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -51,4 +51,34 @@ export function tansParams(params:any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
// 时间返回 yyyy-mm-dd hh:mm:ss
|
||||||
|
export function timeHandler(d, unit1, unit2) {
|
||||||
|
const year = d.getFullYear()
|
||||||
|
const month = addZero(d.getMonth() + 1)
|
||||||
|
const day = addZero(d.getDate())
|
||||||
|
const hours = addZero(d.getHours())
|
||||||
|
const minute = addZero(d.getMinutes())
|
||||||
|
const second = addZero(d.getSeconds())
|
||||||
|
const time = year + unit1 + month + unit1 + day + ' ' + hours + unit2 + minute + unit2 + second
|
||||||
|
return time
|
||||||
|
}
|
||||||
|
// 时间返回 mm-dd hh:mm
|
||||||
|
export function timeHandler2(d, unit1, unit2) {
|
||||||
|
const year = d.getFullYear()
|
||||||
|
const month = addZero(d.getMonth() + 1)
|
||||||
|
const day = addZero(d.getDate())
|
||||||
|
const hours = addZero(d.getHours())
|
||||||
|
const minute = addZero(d.getMinutes())
|
||||||
|
const second = addZero(d.getSeconds())
|
||||||
|
const time = month + unit1 + day + ' ' + hours + unit2 + minute
|
||||||
|
return time
|
||||||
|
}
|
||||||
|
export function addZero(num) {
|
||||||
|
if (num < 10) {
|
||||||
|
return '0' + num
|
||||||
|
} else {
|
||||||
|
return num
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user