From d8a95c4b1553e577331b42b6548b4c960b10e99d Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期六, 11 五月 2024 11:58:43 +0800
Subject: [PATCH] 派车记录
---
admin/src/views/business/internalMember.vue | 52 ++++++++++++++++++++++++++++++++++------------------
1 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/admin/src/views/business/internalMember.vue b/admin/src/views/business/internalMember.vue
index 21cc600..a192b7c 100644
--- a/admin/src/views/business/internalMember.vue
+++ b/admin/src/views/business/internalMember.vue
@@ -39,7 +39,7 @@
<template v-slot:menu>
<div style="width: 100%; height: 50px; background: rgba(242, 242, 242, 1); line-height: 50px; text-align: center; font-size: 14px;">浼佷笟缁勭粐鏋舵瀯</div>
<div style="width: 100%; height: calc(100vh - 170px); overflow-y: scroll;">
- <Tree :list="companyTree" :defaultProps="{name: 'name', status: 'status', children: 'childList', id: 'erpId'}" @callback="callback" />
+ <Tree :list="companyTree" :defaultProps="{name: 'name', status: 'fsStatus', children: 'childList', id: 'id'}" @callback="callback" />
</div>
</template>
<!-- 琛ㄦ牸鍜屽垎椤� -->
@@ -107,17 +107,16 @@
<el-button @click="$refs.cardOpeningRecord.open('寮�鍗¤褰�', row.id)" type="text">{{row.memberCardCount || '0'}}</el-button>
</template>
</el-table-column>
-<!-- <el-table-column-->
-<!-- v-if="containPermissions(['business:member:update', 'business:member:delete'])"-->
-<!-- label="鎿嶄綔"-->
-<!-- min-width="120"-->
-<!-- fixed="right"-->
-<!-- >-->
-<!-- <template slot-scope="{row}">-->
-<!-- <el-button type="text" @click="$refs.operaMemberWindow.open('缂栬緫浜哄憳淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:member:update']">缂栬緫</el-button>-->
-<!-- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">鍒犻櫎</el-button>-->
-<!-- </template>-->
-<!-- </el-table-column>-->
+ <el-table-column
+ v-if="containPermissions(['business:member:update', 'business:member:delete','business:empower:create'])"
+ label="鎿嶄綔"
+ min-width="120"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button type="text" @click="empower(row.id)" v-permissions="['business:empower:create']">閲嶆柊鎺堟潈</el-button>
+ </template>
+ </el-table-column>
</el-table>
<pagination
@size-change="handleSizeChange"
@@ -138,7 +137,7 @@
import cardOpeningRecord from '@/components/business/cardOpeningRecord'
import Tree from '@/components/common/Tree'
import { fetchList } from '@/api/business/company'
-import { memberSync } from '@/api/business/member'
+import { memberSync, roleAuth } from '@/api/business/member'
export default {
name: 'internalMember',
extends: BaseTable,
@@ -173,19 +172,36 @@
this.getfindCompanyTreePage()
},
methods: {
+ empower(id) {
+ var that = this
+ this.$confirm('纭畾閲嶆柊鎺堟潈鍚�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ roleAuth(id)
+ .then(res => {
+ that.search()
+ })
+ }).catch(() => {
+
+ });
+ },
// 鑾峰彇缁勭粐鏍�
getfindCompanyTreePage () {
fetchList(1)
.then(res => {
- res[0].fsStatus = 1
- this.companyTree = res
- // this.searchForm.erpOrgId = res[0].erpId
- this.search()
+ if (res && res.length > 0) {
+ res[0].fsStatus = 1
+ this.companyTree = res
+ // this.searchForm.erpOrgId = res[0].erpId
+ this.search()
+ }
})
},
// 鍚屾淇℃伅
async synchronous () {
- this.$dialog.actionConfirm('鎿嶄綔纭鎻愰啋', '鎮ㄧ‘璁ゅ悓姝ュ叏閮ㄤ俊鎭悧锛�')
+ this.$dialog.actionConfirm('璇ユ搷浣滈檷瑙﹀彂鍏ㄥ憳淇℃伅鏇存柊鍜岄噸鏂颁笅鍙戯紒璇疯皑鎱庢搷浣�', '鎮ㄧ‘璁ゅ叏閲忓悓姝ュ唴閮ㄤ汉鍛樹俊鎭悧锛�')
.then(() => {
this.loading = true
memberSync({})
--
Gitblit v1.9.3