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',
name: "receiveManager",
component: () => import("../views/moneyManage/receiveDetail/receiveManage.vue"),
component: () => import("../views/moneyManage/receiveDetail/receiveFinance.vue"),
meta: { permissionId: [67, 79] }
},
{//地区财务

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

@ -190,8 +190,7 @@
</template>
</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>
<el-link v-if="activeTab == 'wait'" style="color: #2741DE;"
@click="openAuditForm(scope.row)">审核
@ -202,16 +201,16 @@
</el-link>
<el-link
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>
</template>
</el-table-column>
</el-table>
</div>
<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>
</div>
</el-card>
@ -455,19 +454,17 @@
<el-text style="width:4vw;">产品数量</el-text>
<el-input style="padding-right: 10px; width:10.5vw;" v-model="refundFormData.goodNum"
placeholder="请输入产品数量" disabled />
<span style="color: #999999;">{{ productUnit }}</span>
</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 />
</div>
<div style="padding-right: 5px; display: flex;">
<div style=" display: flex; align-items: center;justify-content: center; ">
<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 />
</div>
</div>
@ -605,16 +602,28 @@ const textContent = ref('')
//退
const refundDialog = ref(false)
const refundFormData = ref({})
const openRefundDialog = () => {
refundDialog.value = true
closeConfirmRefund()
}
const closeRefundForm = () => {
refundDialog.value = false
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. =====================
//退
const openRefundConfirm = () => {
const openRefundConfirm = (row) => {
textContent.value = '将要对该订单退款!'
refundConfirmDialog.value = true
refundFormData.value = { ...row }
ifRefundGold()
console.log(row);
}
const closeConfirmRefund = () => {
@ -1027,6 +1040,9 @@ onMounted(async () => {
window.history.back();
});
}
//
const bgImg = new Image();
bgImg.src = '/src/assets/收款明细撤回背景.png';
});
// 2.10 使
@ -1306,6 +1322,37 @@ const handlePagination = (type, val) => {
font-weight: 800;
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 { adminData, menuTree } = storeToRefs(adminStore);
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
import { tr } from 'element-plus/es/locales.mjs'
// ref
const Ref = ref(null)
@ -35,7 +36,7 @@ const addRole = ref({
market: ''
})
const addRoleMarket = ref([])
const channelList = ref(['美股', '港股', 'hc第一频道'])
const getRoleList = async function (val) {
if (!findMenuById(menuTree.value, permissionMapping.view_role_information)) {
ElMessage.error('无此权限')
@ -196,7 +197,8 @@ const handleAddRole = async function () {
"roleName": addRole.value.roleName,
"menuIds": finalCheckedKeys,
"fatherId": addRole.value.parentId,
"market": addRole.value.market
"market": addRole.value.market,
channel: addRole.value.channel
}
})
if (res.code === 200) {
@ -317,6 +319,7 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => {
//
if (allCheckedNodes.length === 0) {
permissionEditRoleObj.value.checkedKeys = []
ifHasChannel.value = false
return
}
@ -326,13 +329,22 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => {
console.log('编辑角色选中的权限ID:', checkedKeys)
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 { checkedKeys, checkedNodes: allCheckedNodes } = checkedInfo
//
if (allCheckedNodes.length === 0) {
addRole.value.checkedKeys = []
ifHasChannel.value = false
return
}
@ -348,6 +360,12 @@ const handleCheckChange = async (checkedNodes, checkedInfo) => {
// Set
addRole.value.checkedKeys = Array.from(allKeys)
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) => {
if (!Array.isArray(treeData)) return false
@ -413,18 +431,38 @@ const collectIds2 = (tree) => {
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) {
console.log('row', row)
console.log('row.tree', row.tree)
let EditIds = collectIdsAll(row.tree)
console.log(EditIds);
permissionEditRoleObj.value = {}
permissionEditRoleObj.value.id = row.id
permissionEditRoleObj.value.roleName = row.roleName
permissionEditRoleObj.value.market = row.market
permissionEditRoleObj.value.parentId = row.fatherId
permissionEditRoleObj.value.parentName = row.fatherName
permissionEditRoleObj.value.channel = row.channel
if (EditIds.includes(124)) {
ifHasChannel.value = true
} else {
ifHasChannel.value = false
}
try {
let roleId = permissionEditRoleObj.value.parentId;
// id
@ -636,9 +674,9 @@ onMounted(async function () {
</div>
<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>
</el-card>
</div>
@ -686,6 +724,11 @@ onMounted(async function () {
<span style="color: #999;">暂无数据</span>
</div>
</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>
<div>
@ -729,6 +772,12 @@ onMounted(async function () {
<span style="color: #999;">暂无数据</span>
</div>
</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>
<div>

Loading…
Cancel
Save