Browse Source

Merge branch 'zhangyong/milestone-20250913-现金管理二期' into milestone-20251104-现金二期

zhangrenyuan/feature-20251104133449-现金管理二期
ZhangYong 3 weeks ago
parent
commit
28c5289ba2
  1. 2
      src/router/index.js
  2. 79
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  3. 1174
      src/views/moneyManage/receiveDetail/receiveManage.vue
  4. 61
      src/views/permissions/rolePermission.vue

2
src/router/index.js

@ -319,7 +319,7 @@ const routes = [
{ {
path: 'receiveManager', path: 'receiveManager',
name: "receiveManager", name: "receiveManager",
component: () => import("../views/moneyManage/receiveDetail/receiveManage.vue"),
component: () => import("../views/moneyManage/receiveDetail/receiveFinance.vue"),
meta: { permissionId: [67, 79] } meta: { permissionId: [67, 79] }
}, },
{//地区财务 {//地区财务

79
src/views/moneyManage/receiveDetail/receiveFinance.vue

@ -190,8 +190,7 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 地区财务表格操作待审核审核已通过编辑 --> <!-- 地区财务表格操作待审核审核已通过编辑 -->
<el-table-column fixed="right" label="操作" width="120px"
v-if="activeTab != 'reject' && activeTab != 'done'">
<el-table-column fixed="right" label="操作" width="120px" v-if="activeTab != 'reject'">
<template #default=scope> <template #default=scope>
<el-link v-if="activeTab == 'wait'" style="color: #2741DE;" <el-link v-if="activeTab == 'wait'" style="color: #2741DE;"
@click="openAuditForm(scope.row)">审核 @click="openAuditForm(scope.row)">审核
@ -202,16 +201,16 @@
</el-link> </el-link>
<el-link <el-link
v-else-if="activeTab == 'done' && scope.row.status == 4 && startsWith(scope.row.orderCode, 'GOLDCOIN')" v-else-if="activeTab == 'done' && scope.row.status == 4 && startsWith(scope.row.orderCode, 'GOLDCOIN')"
style="color: #2741DE;" @click="openRefundConfirm">退款
style="color: #2741DE;" @click="openRefundConfirm(scope.row)">退款
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="pagination"> <div class="pagination">
<el-pagination background :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total"
@size-change="handlePagination('size', $event)"
<el-pagination background :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize"
:page-sizes="[5, 10, 20, 50, 100]" layout="total, sizes, prev, pager, next, jumper"
:total="total" @size-change="handlePagination('size', $event)"
@current-change="handlePagination('page', $event)"></el-pagination> @current-change="handlePagination('page', $event)"></el-pagination>
</div> </div>
</el-card> </el-card>
@ -455,19 +454,17 @@
<el-text style="width:4vw;">产品数量</el-text> <el-text style="width:4vw;">产品数量</el-text>
<el-input style="padding-right: 10px; width:10.5vw;" v-model="refundFormData.goodNum" <el-input style="padding-right: 10px; width:10.5vw;" v-model="refundFormData.goodNum"
placeholder="请输入产品数量" disabled /> placeholder="请输入产品数量" disabled />
<span style="color: #999999;">{{ productUnit }}</span>
</div> </div>
<div v-show="isRefundGold" style="margin-bottom: 15px; ">
<div style=" display: flex; ">
<span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">永久金币</span>
<el-input style="padding-right: 10px; height: 30px; width: 110px; margin-bottom: 10px"
<div v-show="isRefundGold" style="display: flex; margin-bottom: 10px;">
<div style=" display: flex; align-items: center;justify-content: center; ">
<span style="color: #999999; white-space: nowrap;">永久金币</span>
<el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundFormData.permanentGold" disabled /> v-model="refundFormData.permanentGold" disabled />
</div> </div>
<div style="padding-right: 5px; display: flex;">
<div style=" display: flex; align-items: center;justify-content: center; ">
<span <span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">免费金币</span>
<el-input style="padding-right: 10px; height: 30px; width: 110px;"
style="color: #999999; white-space: nowrap;">免费金币</span>
<el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundFormData.freeGold" disabled /> v-model="refundFormData.freeGold" disabled />
</div> </div>
</div> </div>
@ -605,16 +602,28 @@ const textContent = ref('')
//退 //退
const refundDialog = ref(false) const refundDialog = ref(false)
const refundFormData = ref({})
const openRefundDialog = () => { const openRefundDialog = () => {
refundDialog.value = true refundDialog.value = true
closeConfirmRefund() closeConfirmRefund()
} }
const closeRefundForm = () => { const closeRefundForm = () => {
refundDialog.value = false refundDialog.value = false
refundFormData.value = {} refundFormData.value = {}
} }
const isRefundGold = ref(false)
const ifRefundGold = () => {
if (refundFormData.value.goodsName === '金币充值') {
isRefundGold.value = true
refundFormData.value.goodNum = 0
} else {
isRefundGold.value = false
}
}
// //
@ -627,9 +636,13 @@ const paytypeOptions = ref([...paytypeList]);
// ===================== 2. ===================== // ===================== 2. =====================
//退 //退
const openRefundConfirm = () => {
const openRefundConfirm = (row) => {
textContent.value = '将要对该订单退款!' textContent.value = '将要对该订单退款!'
refundConfirmDialog.value = true refundConfirmDialog.value = true
refundFormData.value = { ...row }
ifRefundGold()
console.log(row);
} }
const closeConfirmRefund = () => { const closeConfirmRefund = () => {
@ -1027,6 +1040,9 @@ onMounted(async () => {
window.history.back(); window.history.back();
}); });
} }
//
const bgImg = new Image();
bgImg.src = '/src/assets/收款明细撤回背景.png';
}); });
// 2.10 使 // 2.10 使
@ -1306,6 +1322,37 @@ const handlePagination = (type, val) => {
font-weight: 800; font-weight: 800;
padding-bottom: 15px; padding-bottom: 15px;
} }
.refundDialog {
.left {
width: 50%;
height: 70vh;
min-height: 700px;
padding: 0 2vw;
.add-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.image {
width: 4vw !important;
height: 4vw !important;
}
}
.right {
width: 50%;
height: 50vh;
.add-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
}
} }
// //

1174
src/views/moneyManage/receiveDetail/receiveManage.vue
File diff suppressed because it is too large
View File

61
src/views/permissions/rolePermission.vue

@ -9,6 +9,7 @@ import { storeToRefs } from "pinia"
const adminStore = useAdminStore(); const adminStore = useAdminStore();
const { adminData, menuTree } = storeToRefs(adminStore); const { adminData, menuTree } = storeToRefs(adminStore);
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js" import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
import { tr } from 'element-plus/es/locales.mjs'
// ref // ref
const Ref = ref(null) const Ref = ref(null)
@ -35,7 +36,7 @@ const addRole = ref({
market: '' market: ''
}) })
const addRoleMarket = ref([]) const addRoleMarket = ref([])
const channelList = ref(['美股', '港股', 'hc第一频道'])
const getRoleList = async function (val) { const getRoleList = async function (val) {
if (!findMenuById(menuTree.value, permissionMapping.view_role_information)) { if (!findMenuById(menuTree.value, permissionMapping.view_role_information)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
@ -196,7 +197,8 @@ const handleAddRole = async function () {
"roleName": addRole.value.roleName, "roleName": addRole.value.roleName,
"menuIds": finalCheckedKeys, "menuIds": finalCheckedKeys,
"fatherId": addRole.value.parentId, "fatherId": addRole.value.parentId,
"market": addRole.value.market
"market": addRole.value.market,
channel: addRole.value.channel
} }
}) })
if (res.code === 200) { if (res.code === 200) {
@ -317,6 +319,7 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => {
// //
if (allCheckedNodes.length === 0) { if (allCheckedNodes.length === 0) {
permissionEditRoleObj.value.checkedKeys = [] permissionEditRoleObj.value.checkedKeys = []
ifHasChannel.value = false
return return
} }
@ -326,13 +329,22 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => {
console.log('编辑角色选中的权限ID:', checkedKeys) console.log('编辑角色选中的权限ID:', checkedKeys)
console.log('选中的节点数量:', allCheckedNodes.length) console.log('选中的节点数量:', allCheckedNodes.length)
if (checkedKeys.includes(124) || checkedKeys.includes(125) || checkedKeys.includes(126) || checkedKeys.includes(127)) {
ifHasChannel.value = true
} else {
ifHasChannel.value = false
}
}; };
//
const ifHasChannel = ref(false)
const handleCheckChange = async (checkedNodes, checkedInfo) => { const handleCheckChange = async (checkedNodes, checkedInfo) => {
const { checkedKeys, checkedNodes: allCheckedNodes } = checkedInfo const { checkedKeys, checkedNodes: allCheckedNodes } = checkedInfo
// //
if (allCheckedNodes.length === 0) { if (allCheckedNodes.length === 0) {
addRole.value.checkedKeys = [] addRole.value.checkedKeys = []
ifHasChannel.value = false
return return
} }
@ -348,6 +360,12 @@ const handleCheckChange = async (checkedNodes, checkedInfo) => {
// Set // Set
addRole.value.checkedKeys = Array.from(allKeys) addRole.value.checkedKeys = Array.from(allKeys)
console.log('新增角色包含所有父级的选中项:', addRole.value.checkedKeys) console.log('新增角色包含所有父级的选中项:', addRole.value.checkedKeys)
if (addRole.value.checkedKeys.includes(124)) {
ifHasChannel.value = true
console.log('勾选了频道');
} else {
ifHasChannel.value = false
}
} }
const selectParentNodes = (treeData, nodeId, checkedKeys) => { const selectParentNodes = (treeData, nodeId, checkedKeys) => {
if (!Array.isArray(treeData)) return false if (!Array.isArray(treeData)) return false
@ -413,18 +431,38 @@ const collectIds2 = (tree) => {
return ids return ids
} }
const collectIdsAll = (tree) => {
let ids = []
tree.forEach((node) => {
ids.push(node.id)
// children children
if (node.children || node.children.length === 0) {
ids = ids.concat(collectIdsAll(node.children))
}
})
return ids
}
// //
const permissionEditRoleInit = async function (row) { const permissionEditRoleInit = async function (row) {
console.log('row', row) console.log('row', row)
console.log('row.tree', row.tree) console.log('row.tree', row.tree)
let EditIds = collectIdsAll(row.tree)
console.log(EditIds);
permissionEditRoleObj.value = {} permissionEditRoleObj.value = {}
permissionEditRoleObj.value.id = row.id permissionEditRoleObj.value.id = row.id
permissionEditRoleObj.value.roleName = row.roleName permissionEditRoleObj.value.roleName = row.roleName
permissionEditRoleObj.value.market = row.market permissionEditRoleObj.value.market = row.market
permissionEditRoleObj.value.parentId = row.fatherId permissionEditRoleObj.value.parentId = row.fatherId
permissionEditRoleObj.value.parentName = row.fatherName permissionEditRoleObj.value.parentName = row.fatherName
permissionEditRoleObj.value.channel = row.channel
if (EditIds.includes(124)) {
ifHasChannel.value = true
} else {
ifHasChannel.value = false
}
try { try {
let roleId = permissionEditRoleObj.value.parentId; let roleId = permissionEditRoleObj.value.parentId;
// id // id
@ -636,9 +674,9 @@ onMounted(async function () {
</div> </div>
<div style="margin-top: 20px;display: flex;"> <div style="margin-top: 20px;display: flex;">
<el-pagination background :current-page="getRoleObj.pageNum" :page-size="getRoleObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="roleTotal" @size-change="handleRolePageSizeChange"
@current-change="handleRoleCurrentChange"></el-pagination>
<el-pagination background :current-page="getRoleObj.pageNum" :page-size="getRoleObj.pageSize"
:page-sizes="[5, 10, 20, 50, 100]" layout="total, sizes, prev, pager, next, jumper" :total="roleTotal"
@size-change="handleRolePageSizeChange" @current-change="handleRoleCurrentChange"></el-pagination>
</div> </div>
</el-card> </el-card>
</div> </div>
@ -686,6 +724,11 @@ onMounted(async function () {
<span style="color: #999;">暂无数据</span> <span style="color: #999;">暂无数据</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-show="ifHasChannel" prop="channel" label="频道名称:" required>
<el-select v-model="addRole.channel" placeholder="请选择频道" style="width: 220px" clearable>
<el-option v-for="item in channelList" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-form> </el-form>
<div> <div>
@ -729,6 +772,12 @@ onMounted(async function () {
<span style="color: #999;">暂无数据</span> <span style="color: #999;">暂无数据</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-show="ifHasChannel" prop="channel" label="频道名称:" required>
<el-select v-model="permissionEditRoleObj.channel" placeholder="请选择频道" style="width: 220px" clearable>
<el-option v-for="item in channelList" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-form> </el-form>
<div> <div>

Loading…
Cancel
Save