feat(靓号审批页): 驳回操作新增弹窗,以便于填写备注

This commit is contained in:
hzj 2025-12-12 20:05:24 +08:00
parent 1f1965fb67
commit fb74a242fa
3 changed files with 261 additions and 106 deletions

View File

@ -1,76 +1,76 @@
import request from '@/utils/request' import request from "@/utils/request";
export function login(data) { export function login(data) {
return request({ return request({
url: '/account/token', url: "/account/token",
method: 'post', method: "post",
data data
}) });
} }
export function getInfo() { export function getInfo() {
return request({ return request({
url: '/account/info', url: "/account/info",
method: 'get' method: "get"
}) });
} }
export function logout() { export function logout() {
return request({ return request({
url: '/mock/user/logout', url: "/mock/user/logout",
method: 'post' method: "post"
}) });
} }
// 获取账号菜单 // 获取账号菜单
export function getAccountMenus() { export function getAccountMenus() {
return request({ return request({
url: '/account/menus', url: "/account/menus",
method: 'get' method: "get"
}) });
} }
// 获取按钮权限 // 获取按钮权限
export function getButtonPermissions() { export function getButtonPermissions() {
return request({ return request({
url: '/account/buttons/aliases', url: "/account/buttons/aliases",
method: 'get' method: "get"
}) });
} }
// 用户道具流水列表 // 用户道具流水列表
export function userPropsTable(params) { export function userPropsTable(params) {
return request({ return request({
url: '/running/water/user/props/page', url: "/running/water/user/props/page",
method: 'get', method: "get",
params params
}) });
} }
// 用户购买麦位类型流水列表 // 用户购买麦位类型流水列表
export function userPropsMikeType(params) { export function userPropsMikeType(params) {
return request({ return request({
url: '/room-mike-type/page', url: "/room-mike-type/page",
method: 'get', method: "get",
params params
}) });
} }
// 用户靓号申请列表 // 用户靓号申请列表
export function userBeautifulNumberApplyTable(params) { export function userBeautifulNumberApplyTable(params) {
return request({ return request({
url: '/beautiful/number/apply/page', url: "/beautiful/number/apply/page",
method: 'get', method: "get",
params params
}) });
} }
// 处理靓号申请状态 // 处理靓号申请状态
export function handleBeautifulNumberApplyState(id, state) { export function handleBeautifulNumberApplyState(id, state, remark) {
return request({ return request({
url: `/beautiful/number/apply/handle/${id}/${state}`, url: `/beautiful/number/apply/handle/${id}/${state}?remark=${remark}`,
method: 'get' method: "get"
}) });
} }
// ////////////////////////////////////////////////////// 用户银行卡 start //////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////// 用户银行卡 start ////////////////////////////////////////////////////////////////
@ -78,52 +78,52 @@ export function handleBeautifulNumberApplyState(id, state) {
// 根据团队id获得银行卡列表. // 根据团队id获得银行卡列表.
export function listBankCardTable(userId) { export function listBankCardTable(userId) {
return request({ return request({
url: '/user/bank-card/list/user-id/' + userId, url: "/user/bank-card/list/user-id/" + userId,
method: 'get' method: "get"
}) });
} }
// 团队通过银行卡. // 团队通过银行卡.
export function listUserPassBankCards(userId) { export function listUserPassBankCards(userId) {
return request({ return request({
url: '/user/bank-card/pass-list', url: "/user/bank-card/pass-list",
method: 'get', method: "get",
params: { userId } params: { userId }
}) });
} }
// 修改银行卡资料 // 修改银行卡资料
export function updateBankCard(data) { export function updateBankCard(data) {
return request({ return request({
url: '/user/bank-card/update', url: "/user/bank-card/update",
method: 'post', method: "post",
data data
}) });
} }
// 添加银行卡资料 // 添加银行卡资料
export function addBankCard(data) { export function addBankCard(data) {
return request({ return request({
url: '/user/bank-card/add', url: "/user/bank-card/add",
method: 'post', method: "post",
data data
}) });
} }
// 根据银行卡id删除. // 根据银行卡id删除.
export function deleteBankCard(bankCardId) { export function deleteBankCard(bankCardId) {
return request({ return request({
url: '/user/bank-card/delete/' + bankCardId, url: "/user/bank-card/delete/" + bankCardId,
method: 'get' method: "get"
}) });
} }
// 切换使用中的银行卡. // 切换使用中的银行卡.
export function useBankCard(bankCardId) { export function useBankCard(bankCardId) {
return request({ return request({
url: '/user/bank-card/use/' + bankCardId, url: "/user/bank-card/use/" + bankCardId,
method: 'get' method: "get"
}) });
} }
// ////////////////////////////////////////////////////// 用户银行卡 end //////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////// 用户银行卡 end ////////////////////////////////////////////////////////////////
@ -131,24 +131,24 @@ export function useBankCard(bankCardId) {
// 用户密码日志列表 // 用户密码日志列表
export function userPasswordLog(params) { export function userPasswordLog(params) {
return request({ return request({
url: '/user-password-log/page', url: "/user-password-log/page",
method: 'get', method: "get",
params params
}) });
} }
// 用户上传专属礼物分页列表 // 用户上传专属礼物分页列表
export function pageUserCustomGift(params) { export function pageUserCustomGift(params) {
return request({ return request({
url: '/user/custom-gift', url: "/user/custom-gift",
method: 'get', method: "get",
params params
}) });
} }
// 切换用户上传专属礼物状态 // 切换用户上传专属礼物状态
export function switchStatus(id, status) { export function switchStatus(id, status) {
return request({ return request({
url: `/user/custom-gift/${id}/${status}`, url: `/user/custom-gift/${id}/${status}`,
method: 'get' method: "get"
}) });
} }

View File

@ -0,0 +1,98 @@
<template>
<el-dialog
title="申请处理"
:visible="true"
width="30%"
:before-close="handleClose"
>
<el-form
ref="form"
v-loading="loading"
:model="form"
:rules="formRules"
label-width="80px"
>
<el-form-item label="备注" prop="remark">
<el-input
v-model.trim="form.remark"
type="textarea"
@keyup.native="descriptionKeyup"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submit()">提交</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
import {
userBeautifulNumberApplyTable,
handleBeautifulNumberApplyState
} from "@/api/user";
export default {
name: "ApplyHandle",
props: {
visible: {
type: Boolean,
default: false
},
userId: {
type: String,
required: true
}
},
data() {
const commonRules = [
{ required: true, message: "必填字段不可为空", trigger: "blur" }
];
return {
loading: false,
form: {
id: this.userId,
state: 2,
remark: ""
},
formRules: {
remark: commonRules
}
};
},
methods: {
//
handleClose() {
this.$emit("close");
},
//
submit() {
const that = this;
that.$refs.form.validate(valid => {
if (!valid) {
console.error("error submit!!");
return false;
}
that.loading = true;
handleBeautifulNumberApplyState(
that.form.id,
that.form.state,
that.form.remark
)
.then(res => {
that.loading = false;
that.$emit("success");
})
.catch(er => {
console.error(er);
that.loading = false;
});
});
}
}
};
</script>

View File

@ -1,6 +1,8 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏 -->
<div class="filter-container"> <div class="filter-container">
<!-- 系统选择框 -->
<el-select <el-select
v-model="listQuery.sysOrigin" v-model="listQuery.sysOrigin"
placeholder="系统" placeholder="系统"
@ -15,13 +17,13 @@
:value="item.value" :value="item.value"
> >
<span style="float: left;"> <span style="float: left;">
<sys-origin-icon <sys-origin-icon :icon="item.value" :desc="item.value"
:icon="item.value" /></span>
:desc="item.value"
/></span>
<span style="float: left;margin-left:10px">{{ item.label }}</span> <span style="float: left;margin-left:10px">{{ item.label }}</span>
</el-option> </el-option>
</el-select> </el-select>
<!-- 用户ID -->
<div class="filter-item"> <div class="filter-item">
<account-input <account-input
v-model="listQuery.userId" v-model="listQuery.userId"
@ -29,6 +31,8 @@
placeholder="用户ID" placeholder="用户ID"
/> />
</div> </div>
<!-- 搜索按钮 -->
<el-button <el-button
class="filter-item" class="filter-item"
type="primary" type="primary"
@ -39,6 +43,8 @@
搜索 搜索
</el-button> </el-button>
</div> </div>
<!-- 数据列表 -->
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="list" :data="list"
@ -46,6 +52,7 @@
fit fit
highlight-current-row highlight-current-row
> >
<!-- 来源系统 -->
<el-table-column prop="sysOrigin" label="来源系统" align="center"> <el-table-column prop="sysOrigin" label="来源系统" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<sys-origin-icon <sys-origin-icon
@ -54,7 +61,11 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="id" label="ID" align="center" />
<!-- ID -->
<el-table-column prop="applyAccount" label="ID" align="center" />
<!-- 申请人 -->
<el-table-column label="申请人" align="center"> <el-table-column label="申请人" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
@ -66,6 +77,8 @@
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
<!-- 状态 -->
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="0 == scope.row.state">待处理</span> <span v-if="0 == scope.row.state">待处理</span>
@ -73,6 +86,8 @@
<span v-if="2 == scope.row.state" style="color:red">驳回</span> <span v-if="2 == scope.row.state" style="color:red">驳回</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 创建时间 -->
<el-table-column <el-table-column
prop="createTime" prop="createTime"
label="创建时间" label="创建时间"
@ -83,20 +98,27 @@
{{ scope.row.createTime | dateFormat }} {{ scope.row.createTime | dateFormat }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 操作 -->
<el-table-column fixed="right" label="操作" align="center"> <el-table-column fixed="right" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
:disabled="scope.row.state != 0"
@click.native="handleApply(scope.row.id, 1)" @click.native="handleApply(scope.row.id, 1)"
>同意</el-button> >同意</el-button
>
<el-button <el-button
type="text" type="text"
@click.native="handleApply(scope.row.id, 2)" :disabled="scope.row.state != 0"
>驳回</el-button> @click.native="showRejectWindow(scope.row.id)"
>驳回</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页按钮 -->
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@ -110,94 +132,129 @@
:user-id="thatSelectedUserId" :user-id="thatSelectedUserId"
@close="userDeatilsDrawerVisible = false" @close="userDeatilsDrawerVisible = false"
/> />
<!-- 驳回窗口 -->
<apply-handle
v-if="RejectWindowVisible"
:user-id="RejectTargetID"
@success="renderDataSuccess"
@close="RejectWindowVisible = false"
/>
</div> </div>
</template> </template>
<script> <script>
import { pickerOptions } from "@/constant/el-const";
import { mapGetters } from "vuex";
import { import {
userBeautifulNumberApplyTable, userBeautifulNumberApplyTable,
handleBeautifulNumberApplyState handleBeautifulNumberApplyState
} from '@/api/user' } from "@/api/user";
import Pagination from '@/components/Pagination'
import { pickerOptions } from '@/constant/el-const' import Pagination from "@/components/Pagination";
import { mapGetters } from 'vuex' import ApplyHandle from "./components/applyHandle.vue";
export default { export default {
name: 'BeautifulNumberApply', name: "BeautifulNumberApply",
components: { Pagination }, components: { Pagination, ApplyHandle },
data() { data() {
return { return {
searchDisabled: false, searchDisabled: false,
pickerOptions, pickerOptions,
userDeatilsDrawerVisible: false, userDeatilsDrawerVisible: false,
thatSelectedUserId: '', thatSelectedUserId: "",
familyMemberDialogVisible: false, familyMemberDialogVisible: false,
thatSelectedFamilyId: '', thatSelectedFamilyId: "",
list: [], list: [],
total: 0, total: 0,
rangeDate: [], rangeDate: [],
listQuery: { listQuery: {
cursor: 1, cursor: 1,
limit: 20, limit: 20,
userId: '', userId: "",
sysOrigin: '' sysOrigin: ""
}, },
listLoading: true listLoading: true,
} RejectWindowVisible: false, //
// id
RejectTargetID: ""
};
}, },
computed: { computed: {
...mapGetters(['permissionsSysOriginPlatforms']) ...mapGetters(["permissionsSysOriginPlatforms"])
}, },
created() { created() {
const that = this const that = this;
const querySystem = this.permissionsSysOriginPlatforms[0] const querySystem = this.permissionsSysOriginPlatforms[0];
if (!querySystem) { if (!querySystem) {
return return;
} }
that.listQuery.sysOrigin = querySystem.value that.listQuery.sysOrigin = querySystem.value;
that.renderData() that.renderData();
}, },
methods: { methods: {
renderData(isClean) { renderData(isClean) {
const that = this const that = this;
if (isClean === true) { if (isClean === true) {
that.list = [] that.list = [];
that.listQuery.cursor = 1 that.listQuery.cursor = 1;
} }
that.listLoading = true that.listLoading = true;
userBeautifulNumberApplyTable(that.listQuery).then(res => { userBeautifulNumberApplyTable(that.listQuery).then(res => {
const { body } = res const { body } = res;
that.total = body.total || 0 that.total = body.total || 0;
that.list = body.records that.list = body.records;
that.listLoading = false that.listLoading = false;
}) });
}, },
handleSearch() { handleSearch() {
this.renderData(true) this.renderData(true);
}, },
queryUserDetails(id) { queryUserDetails(id) {
this.userDeatilsDrawerVisible = true this.userDeatilsDrawerVisible = true;
this.thatSelectedUserId = id this.thatSelectedUserId = id;
}, },
handleApply(id, state) {
const that = this //
that.listLoading = true handleApply(id, state, remark) {
handleBeautifulNumberApplyState(id, state) const that = this;
that.listLoading = true;
handleBeautifulNumberApplyState(id, state, remark)
.then(res => { .then(res => {
that.listLoading = false that.listLoading = false;
that.$message({ that.$message({
message: 'Successful', message: "Successful",
type: 'success' type: "success"
}) });
that.renderData() that.renderData();
}) })
.catch(er => { .catch(er => {
console.error(er) console.error(er);
that.listLoading = false that.listLoading = false;
}) });
},
//
showRejectWindow(id) {
const that = this;
that.RejectTargetID = id;
that.RejectWindowVisible = true;
},
//
renderDataSuccess() {
const that = this;
that.RejectWindowVisible = false;
this.$message({
message: "Successful",
type: "success"
});
this.renderData();
} }
} }
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.store-table-expand { .store-table-expand {