Browse Source

Merge branch 'milestone-20251104-现金二期' of http://39.101.133.168:8807/huangqizhen/gold-vue into milestone-20251104-现金二期

zhangrenyuan/feature-20251104133449-现金管理二期
ZhangYong 3 weeks ago
parent
commit
31f280d10d
  1. 92
      src/components/dialogs/MessageDialog.vue
  2. 4
      src/components/dialogs/changePassword.vue
  3. 8
      src/views/audit/bean/beanAudit.vue
  4. 55
      src/views/home.vue
  5. 8
      src/views/moneyManage/receiveDetail/receiveService.vue

92
src/components/dialogs/MessageDialog.vue

@ -0,0 +1,92 @@
<script setup>
import { ref, onMounted } from 'vue'
import API from '@/util/http.js' //
const emit = defineEmits(['close', 'update-dot'])
const dialogRef = ref(null)
//
const messages = ref([])
//
async function getMessages() {
try {
const res = await API({ url: '/getMessages', method: 'GET' })
if (res.code === 200) {
messages.value = res.data
//
const hasUnread = messages.value.some(msg => !msg.read)
// emit('update-dot', false)
}else {
// emit('update-dot', false)
}
} catch (e) {
emit('update-dot', false)
console.error('获取消息失败:', e)
}
}
onMounted(() => {
getMessages()
})
function closeDialog() {
emit('close')
}
</script>
<template>
<dialog class="message-dialog" open>
<div class="dialog-content">
<h3>消息中心</h3>
<div v-if="messages.length > 0">
<!-- <div
v-for="msg in messages"
:key="msg.id"
class="msg-item"
:class="{ unread: !msg.read }"
>
{{ msg.title }}
</div>-->
<div>
测试测试
</div>
</div>
<div v-else>测试测试</div>
<div class="dialog-footer">
<el-button type="primary" @click="closeDialog">关闭</el-button>
</div>
</div>
</dialog>
</template>
<style scoped>
.message-dialog {
border: none;
border-radius: 10px;
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
width: 380px;
z-index: 99999;
}
.dialog-content {
padding: 20px;
}
.msg-item {
padding: 6px 0;
}
.msg-item.unread {
font-weight: bold;
color: #409eff;
}
.dialog-footer {
text-align: right;
margin-top: 20px;
}
::backdrop {
background-color: rgba(0, 0, 0, 0.4);
}
</style>

4
src/components/changePassword.vue → src/components/dialogs/changePassword.vue

@ -4,8 +4,8 @@
import {ref, reactive, computed, watch, onMounted} from 'vue' import {ref, reactive, computed, watch, onMounted} from 'vue'
import {CircleCloseFilled, SuccessFilled} from '@element-plus/icons-vue' import {CircleCloseFilled, SuccessFilled} from '@element-plus/icons-vue'
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
import API from '@/util/http'
import PasswordSuccess from './PasswordSuccess.vue';
import API from '@/util/http.js'
import PasswordSuccess from '../PasswordSuccess.vue';
import router from "@/router/index.js"; import router from "@/router/index.js";
// //

8
src/views/audit/bean/beanAudit.vue

@ -173,6 +173,9 @@ const reason = ref('')
const rejectRow = ref({ const rejectRow = ref({
id: null id: null
})// })//
const passRow = ref({
id: null
})//
const popconfirmRef = ref(null) const popconfirmRef = ref(null)
// //
@ -337,13 +340,14 @@ const showApproveDialog = (row) => {
ElMessage.error('暂无权限') ElMessage.error('暂无权限')
return return
} }
passRow.value.id = row.id
approveDialogVisible.value = true approveDialogVisible.value = true
} }
// //
// 使handleApproveConfirm使handleApprove // 使handleApproveConfirm使handleApprove
// handleApprove // handleApprove
const handleApproveConfirm = async (row) => {
const handleApproveConfirm = async function() {// rowrow
if (!hasbeanWaitThough) { if (!hasbeanWaitThough) {
ElMessage.error('暂无权限') ElMessage.error('暂无权限')
return return
@ -351,7 +355,7 @@ const handleApproveConfirm = async (row) => {
clicked.value = true clicked.value = true
try { try {
const params = { const params = {
id: row.id,
id: passRow.value.id,
auditName: adminData.value.adminName auditName: adminData.value.adminName
} }
await API({ url: '/beanAudit/status1', data: params }) await API({ url: '/beanAudit/status1', data: params })

55
src/views/home.vue

@ -4,10 +4,12 @@ import { computed, ref } from 'vue'
import {useRoute, useRouter} from 'vue-router' import {useRoute, useRouter} from 'vue-router'
import {ElMessage} from 'element-plus' import {ElMessage} from 'element-plus'
import dmmn from '../assets/link.png' import dmmn from '../assets/link.png'
import ChangePassword from '@/components/changePassword.vue'
import ChangePassword from '@/components/dialogs/changePassword.vue'
import {useAdminStore} from '@/store' import {useAdminStore} from '@/store'
import {storeToRefs} from 'pinia' import {storeToRefs} from 'pinia'
import {filterMenu, getRoutePath} from "@/utils/menuUtils.js"; import {filterMenu, getRoutePath} from "@/utils/menuUtils.js";
import {Bell} from '@element-plus/icons-vue'
import SettingsIcon from '@/assets/blue.png'; import SettingsIcon from '@/assets/blue.png';
// 使import.meta.globSVG // 使import.meta.globSVG
@ -51,11 +53,11 @@ const getIconPath = (menuName) => {
} }
// ----------------------------------- // -----------------------------------
// //
import API from '@/util/http.js' // HTTP
import API from '@/util/http.js'
import MessageDialog from "@/components/dialogs/MessageDialog.vue"; // HTTP
// //
const refreshData = async () => { const refreshData = async () => {
@ -151,6 +153,7 @@ const pwdRef = ref()
const openChangePassword = () => { const openChangePassword = () => {
showPasswordDialog.value = true showPasswordDialog.value = true
} }
// //
function onPwdDialogClosed() { function onPwdDialogClosed() {
// resetFields // resetFields
@ -173,6 +176,17 @@ const toggleFlag = () => {
console.log('flag', newFlag) console.log('flag', newFlag)
} }
//
// MessageDialog
const showMessageDialog = ref(false)
//
const openMessageDialog = () => {
showMessageDialog.value = true
}
//
const messageDot = ref(true)
</script> </script>
<template> <template>
@ -245,6 +259,7 @@ const toggleFlag = () => {
</el-menu> </el-menu>
</div> </div>
<div style="display: flex">
<!-- 底部固定的设置中心 --> <!-- 底部固定的设置中心 -->
<div class="settings-container"> <div class="settings-container">
<el-dropdown placement="top-start"> <el-dropdown placement="top-start">
@ -270,6 +285,17 @@ const toggleFlag = () => {
</template> </template>
</el-dropdown> </el-dropdown>
</div> </div>
<!-- 消息提示 -->
<div class="message-container">
<el-badge :is-dot="messageDot" class="item">
<el-icon @click="openMessageDialog" style="cursor: pointer;">
<Bell/>
</el-icon>
</el-badge>
</div>
</div>
</el-aside> </el-aside>
</div> </div>
@ -316,6 +342,15 @@ const toggleFlag = () => {
<el-dialog v-model="showPasswordDialog" :center="true" width="470px" @closed="onPwdDialogClosed"> <el-dialog v-model="showPasswordDialog" :center="true" width="470px" @closed="onPwdDialogClosed">
<ChangePassword ref="pwdRef" @confirm="showPasswordDialog = false"/> <ChangePassword ref="pwdRef" @confirm="showPasswordDialog = false"/>
</el-dialog> </el-dialog>
<MessageDialog
v-if="showMessageDialog"
@close="showMessageDialog = false"
@update-dot="messageDot = $event"
/>
</div> </div>
</template> </template>
@ -355,6 +390,7 @@ const toggleFlag = () => {
flex-shrink: 0; flex-shrink: 0;
} }
.logo { .logo {
display: flex; display: flex;
align-items: center; align-items: center;
@ -362,6 +398,7 @@ const toggleFlag = () => {
height: 12vh; height: 12vh;
} }
/* 中间可滚动菜单容器 */ /* 中间可滚动菜单容器 */
.menu-scroll-container { .menu-scroll-container {
flex: 1; flex: 1;
@ -376,6 +413,12 @@ const toggleFlag = () => {
align-items: center; /* 垂直居中 */ align-items: center; /* 垂直居中 */
} }
.message-container {
padding: 10px 50px 10px 50px; /* 上,右, 下,左 */
display: flex;
align-items: center; /* 垂直居中 */
}
/* 调整下拉菜单的样式,确保它向上弹出 */ /* 调整下拉菜单的样式,确保它向上弹出 */
.el-dropdown-link:focus { .el-dropdown-link:focus {
@ -383,12 +426,14 @@ const toggleFlag = () => {
outline: none; outline: none;
text-decoration: none; text-decoration: none;
} }
.el-dropdown-link { .el-dropdown-link {
display: flex; display: flex;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
gap: 10px; /* 图标和文字左右间距 */ gap: 10px; /* 图标和文字左右间距 */
} }
.sidebar-layout { .sidebar-layout {
width: 15vw; width: 15vw;
height: 100%; height: 100%;
@ -439,7 +484,6 @@ const toggleFlag = () => {
} }
/* 确保el-menu撑满容器 */ /* 确保el-menu撑满容器 */
.sidebar-layout .el-menu { .sidebar-layout .el-menu {
width: 100%; width: 100%;
@ -456,6 +500,7 @@ const toggleFlag = () => {
::v-deep(.el-menu-item:hover) { ::v-deep(.el-menu-item:hover) {
background: #E5EBFE; background: #E5EBFE;
} }
/* 子菜单展开时和背景同色 */ /* 子菜单展开时和背景同色 */
::v-deep(.el-sub-menu__title), ::v-deep(.el-sub-menu__title),
::v-deep(.el-menu-item) { ::v-deep(.el-menu-item) {
@ -470,7 +515,6 @@ const toggleFlag = () => {
} }
/* 确保全局el-container适应容器 */ /* 确保全局el-container适应容器 */
:deep(.el-container) { :deep(.el-container) {
/* vue3的深度选择器,用于覆盖element-plus的默认样式 */ /* vue3的深度选择器,用于覆盖element-plus的默认样式 */
@ -480,7 +524,6 @@ const toggleFlag = () => {
} }
/* 为侧边栏和主内容区域添加滚动条样式 */ /* 为侧边栏和主内容区域添加滚动条样式 */
.menu-scroll-container, .menu-scroll-container,
.el-main { .el-main {

8
src/views/moneyManage/receiveDetail/receiveService.vue

@ -363,6 +363,14 @@
<el-radio value="1">部分退款</el-radio> <el-radio value="1">部分退款</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="add-item" v-show="refundFormData.goodsName === '金币充值' && refundFormData.refundModel === '1'">
<el-text style="width:4vw;">永久金币</el-text>
<el-input v-model="refundFormData.aaa" style="width:5vw;" />&nbsp;&nbsp;
</div>
<div class="add-item" v-show="refundFormData.goodsName === '金币充值' && refundFormData.refundModel === '1'">
<el-text style="width:4vw;">免费金币</el-text>
<el-input v-model="refundFormData.bbb" style="width:5vw;" />&nbsp;&nbsp;
</div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">退款理由</el-text> <el-text style="width:4vw;">退款理由</el-text>
<el-input v-model="refundFormData.refundReason" style="width:10vw;" :rows="5" maxlength="150" <el-input v-model="refundFormData.refundReason" style="width:10vw;" :rows="5" maxlength="150"

Loading…
Cancel
Save