feat: add order

This commit is contained in:
2025-10-08 18:13:53 +08:00
parent a290db8b35
commit 39b9e0c6f4
4 changed files with 61 additions and 56 deletions

View File

@@ -2,7 +2,7 @@ import request from '@/axios';
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: '/kiosk/order/list', url: '/kiosk/order/page',
method: 'get', method: 'get',
params: { params: {
...params, ...params,

View File

@@ -102,7 +102,7 @@ export default {
//角色ID //角色ID
roleId: '', roleId: '',
//用户名 //用户名
username: 'admin', username: '',
//密码 //密码
password: '', password: '',
//账号类型 //账号类型

View File

@@ -31,7 +31,7 @@
<el-button <el-button
icon="el-icon-setting" icon="el-icon-setting"
@click="handleRole" @click="handleRole"
v-if="userInfo.authority.includes('admin')" v-if="userInfo.authority.includes('admin')||userInfo.authority.includes('manager')"
plain plain
>Authority >Authority
</el-button> </el-button>
@@ -41,7 +41,7 @@
type="primary" type="primary"
text text
icon="el-icon-setting" icon="el-icon-setting"
v-if="userInfo.authority.includes('admin')" v-if="userInfo.authority.includes('admin')||userInfo.authority.includes('manager')"
plain plain
style="border: 0; background-color: transparent !important" style="border: 0; background-color: transparent !important"
@click.stop="handleRowRole(row)" @click.stop="handleRowRole(row)"

View File

@@ -38,7 +38,7 @@
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="$refs.crud.rowAdd()" @click="$refs.crud.rowAdd()"
>Add >Add
</el-button> </el-button>
<el-button <el-button
type="danger" type="danger"
@@ -46,39 +46,39 @@
icon="el-icon-delete" icon="el-icon-delete"
v-if="permission.user_delete && !auditMode" v-if="permission.user_delete && !auditMode"
@click="handleDelete" @click="handleDelete"
>Delete >Delete
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-operation" icon="el-icon-operation"
v-if="userInfo.authority.includes('admin') && !auditMode" v-if="(userInfo.authority.includes('admin') || userInfo.authority.includes('manager')) && !auditMode"
@click="handleAudit" @click="handleAudit"
>Audit >Audit
</el-button> </el-button>
<el-button <el-button
type="success" type="success"
plain plain
icon="el-icon-check" icon="el-icon-check"
v-if="userInfo.authority.includes('admin') && auditMode" v-if="(userInfo.authority.includes('admin') || userInfo.authority.includes('manager'))&& auditMode"
@click="handleAuditPass" @click="handleAuditPass"
>Pass >Pass
</el-button> </el-button>
<el-button <el-button
type="danger" type="danger"
plain plain
icon="el-icon-close" icon="el-icon-close"
v-if="userInfo.authority.includes('admin') && auditMode" v-if="(userInfo.authority.includes('admin') || userInfo.authority.includes('manager')) && auditMode"
@click="handleAuditRefuse" @click="handleAuditRefuse"
>Reject >Reject
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-refresh-left" icon="el-icon-refresh-left"
v-if="userInfo.authority.includes('admin') && auditMode" v-if="(userInfo.authority.includes('admin') || userInfo.authority.includes('manager')) && auditMode"
@click="handleAuditBack" @click="handleAuditBack"
>Back >Back
</el-button> </el-button>
<el-button <el-button
type="info" type="info"
@@ -86,7 +86,7 @@
v-if="permission.user_role && !auditMode" v-if="permission.user_role && !auditMode"
icon="el-icon-user" icon="el-icon-user"
@click="handleGrant" @click="handleGrant"
>Role >Role
</el-button> </el-button>
<el-button <el-button
type="info" type="info"
@@ -94,7 +94,7 @@
v-if="permission.user_reset && !auditMode" v-if="permission.user_reset && !auditMode"
icon="el-icon-refresh" icon="el-icon-refresh"
@click="handleReset" @click="handleReset"
>Reset >Reset
</el-button> </el-button>
<el-button <el-button
type="info" type="info"
@@ -102,7 +102,7 @@
v-if="userInfo.authority.includes('admin') && !auditMode" v-if="userInfo.authority.includes('admin') && !auditMode"
icon="el-icon-setting" icon="el-icon-setting"
@click="handlePlatform" @click="handlePlatform"
>Platform >Platform
</el-button> </el-button>
<el-button <el-button
type="info" type="info"
@@ -110,7 +110,7 @@
v-if="userInfo.authority.includes('admin') && !auditMode" v-if="userInfo.authority.includes('admin') && !auditMode"
icon="el-icon-coordinate" icon="el-icon-coordinate"
@click="handleLock" @click="handleLock"
>Unlock >Unlock
</el-button> </el-button>
<el-button <el-button
type="success" type="success"
@@ -118,7 +118,7 @@
v-if="userInfo.authority.includes('admin') && !auditMode" v-if="userInfo.authority.includes('admin') && !auditMode"
icon="el-icon-upload" icon="el-icon-upload"
@click="handleImport" @click="handleImport"
>Import >Import
</el-button> </el-button>
<el-button <el-button
type="warning" type="warning"
@@ -126,7 +126,7 @@
v-if="userInfo.authority.includes('admin') && !auditMode" v-if="userInfo.authority.includes('admin') && !auditMode"
icon="el-icon-download" icon="el-icon-download"
@click="handleExport" @click="handleExport"
>Export >Export
</el-button> </el-button>
</template> </template>
<template #menu="{ row, index, size }"> <template #menu="{ row, index, size }">
@@ -136,7 +136,7 @@
icon="el-icon-view" icon="el-icon-view"
v-if="this.permission.user_view" v-if="this.permission.user_view"
@click.stop="$refs.crud.rowView(row, index)" @click.stop="$refs.crud.rowView(row, index)"
>View >View
</el-button> </el-button>
<el-button <el-button
text text
@@ -144,18 +144,23 @@
icon="el-icon-edit" icon="el-icon-edit"
v-if="this.permission.user_edit" v-if="this.permission.user_edit"
@click.stop="$refs.crud.rowEdit(row, index)" @click.stop="$refs.crud.rowEdit(row, index)"
>Edit >Edit
</el-button> </el-button>
<el-dropdown @command="command => handleDropdownCommand(command, row, index)"> <el-dropdown @command="command => handleDropdownCommand(command, row, index)">
<el-button text type="primary" icon="el-icon-setting">More</el-button> <el-button text type="primary" icon="el-icon-setting">More</el-button>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item command="setLeader" v-if="userInfo.authority.includes('admin')"> <el-dropdown-item command="setLeader" v-if="userInfo.authority.includes('admin')">
<el-icon><circle-close v-if="row.isLeader === 1" /><user v-else /></el-icon> <el-icon>
<circle-close v-if="row.isLeader === 1" />
<user v-else />
</el-icon>
{{ row.isLeader === 1 ? 'Cancel leader' : 'Set leader' }} {{ row.isLeader === 1 ? 'Cancel leader' : 'Set leader' }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item command="delete" v-if="this.permission.user_delete"> <el-dropdown-item command="delete" v-if="this.permission.user_delete">
<el-icon><delete /></el-icon> <el-icon>
<delete />
</el-icon>
Delete Delete
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
@@ -250,7 +255,7 @@ import {
auditPass, auditPass,
auditRefuse, auditRefuse,
setLeader, setLeader,
getLeaderList, getLeaderList
} from '@/api/system/user'; } from '@/api/system/user';
import { exportBlob } from '@/api/common'; import { exportBlob } from '@/api/common';
import { getDeptTree } from '@/api/system/dept'; import { getDeptTree } from '@/api/system/dept';
@@ -284,20 +289,20 @@ export default {
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0, total: 0
}, },
platformPage: { platformPage: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0, total: 0
}, },
init: { init: {
roleTree: [], roleTree: [],
deptTree: [], deptTree: []
}, },
props: { props: {
label: 'title', label: 'title',
value: 'key', value: 'key'
}, },
roleGrantList: [], roleGrantList: [],
roleTreeObj: [], roleTreeObj: [],
@@ -312,7 +317,7 @@ export default {
platformForm: {}, platformForm: {},
platformOption: platformOption, platformOption: platformOption,
excelForm: {}, excelForm: {},
excelOption: excelOption, excelOption: excelOption
}; };
}, },
watch: { watch: {
@@ -326,7 +331,7 @@ export default {
const column = this.findObject(this.excelOption.column, 'excelFile'); const column = this.findObject(this.excelOption.column, 'excelFile');
column.action = `/blade-system/user/import-user?isCovered=${this.excelForm.isCovered}`; column.action = `/blade-system/user/import-user?isCovered=${this.excelForm.isCovered}`;
} }
}, }
}, },
computed: { computed: {
...mapGetters(['userInfo', 'permission']), ...mapGetters(['userInfo', 'permission']),
@@ -335,7 +340,7 @@ export default {
addBtn: this.validData(this.permission.user_add, false), addBtn: this.validData(this.permission.user_add, false),
viewBtn: false, viewBtn: false,
delBtn: false, delBtn: false,
editBtn: false, editBtn: false
}; };
}, },
platformPermissionList() { platformPermissionList() {
@@ -343,7 +348,7 @@ export default {
addBtn: false, addBtn: false,
viewBtn: false, viewBtn: false,
delBtn: false, delBtn: false,
editBtn: this.validData(this.permission.user_edit, false), editBtn: this.validData(this.permission.user_edit, false)
}; };
}, },
ids() { ids() {
@@ -352,7 +357,7 @@ export default {
ids.push(ele.id); ids.push(ele.id);
}); });
return ids.join(','); return ids.join(',');
}, }
}, },
mounted() { mounted() {
// 非租户模式默认加载管理组数据 // 非租户模式默认加载管理组数据
@@ -365,7 +370,7 @@ export default {
created() { created() {
// 创建脱敏工具实例 // 创建脱敏工具实例
this.sensitiveManager = sensitive.create({ this.sensitiveManager = sensitive.create({
fields: ['phone', 'email'], // 配置需要脱敏的字段 fields: ['phone', 'email'] // 配置需要脱敏的字段
}); });
}, },
methods: { methods: {
@@ -387,7 +392,7 @@ export default {
this.$confirm(tip, { this.$confirm(tip, {
confirmButtonText: 'Confirm', confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel', cancelButtonText: 'Cancel',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return setLeader(row.id); return setLeader(row.id);
@@ -395,7 +400,7 @@ export default {
.then(() => { .then(() => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: message, message: message
}); });
this.onLoad(this.page); this.onLoad(this.page);
}); });
@@ -424,7 +429,7 @@ export default {
this.roleBox = false; this.roleBox = false;
this.$message({ this.$message({
type: 'success', type: 'success',
message: 'Success!', message: 'Success!'
}); });
this.onLoad(this.page); this.onLoad(this.page);
}); });
@@ -440,7 +445,7 @@ export default {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: 'success', type: 'success',
message: 'Success!', message: 'Success!'
}); });
done(); done();
}, },
@@ -463,7 +468,7 @@ export default {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: 'success', type: 'success',
message: 'Success!', message: 'Success!'
}); });
done(); done();
}, },
@@ -477,7 +482,7 @@ export default {
this.$confirm('Confirmation for Delete?', { this.$confirm('Confirmation for Delete?', {
confirmButtonText: 'Confirm', confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel', cancelButtonText: 'Cancel',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return remove(row.id); return remove(row.id);
@@ -486,7 +491,7 @@ export default {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: 'success', type: 'success',
message: 'Success!', message: 'Success!'
}); });
}); });
}, },
@@ -516,7 +521,7 @@ export default {
this.$confirm('Confirmation for DEL?', { this.$confirm('Confirmation for DEL?', {
confirmButtonText: 'Confirm', confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel', cancelButtonText: 'Cancel',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return remove(this.ids); return remove(this.ids);
@@ -525,7 +530,7 @@ export default {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: 'success', type: 'success',
message: 'Success!', message: 'Success!'
}); });
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}); });
@@ -542,7 +547,7 @@ export default {
this.$confirm('确定将选择数据通过审核?', { this.$confirm('确定将选择数据通过审核?', {
confirmButtonText: 'Confirm', confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel', cancelButtonText: 'Cancel',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return auditPass(this.ids); return auditPass(this.ids);
@@ -551,7 +556,7 @@ export default {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: 'success', type: 'success',
message: 'Success!', message: 'Success!'
}); });
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}); });
@@ -564,7 +569,7 @@ export default {
this.$confirm('确定将选择数据拒绝审核?', { this.$confirm('确定将选择数据拒绝审核?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return auditRefuse(this.ids); return auditRefuse(this.ids);
@@ -573,7 +578,7 @@ export default {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: 'success', type: 'success',
message: 'Success!', message: 'Success!'
}); });
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}); });
@@ -590,7 +595,7 @@ export default {
this.$confirm('确定将选择账号密码重置为初始密码?', { this.$confirm('确定将选择账号密码重置为初始密码?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return resetPassword(this.ids); return resetPassword(this.ids);
@@ -598,7 +603,7 @@ export default {
.then(() => { .then(() => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功!', message: '操作成功!'
}); });
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}); });
@@ -628,7 +633,7 @@ export default {
this.$confirm('确定将选择账号解封?', { this.$confirm('确定将选择账号解封?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return unlock(this.ids); return unlock(this.ids);
@@ -636,7 +641,7 @@ export default {
.then(() => { .then(() => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功!', message: '操作成功!'
}); });
}); });
}, },
@@ -655,7 +660,7 @@ export default {
this.$confirm('是否导出用户数据?', '提示', { this.$confirm('是否导出用户数据?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}).then(() => { }).then(() => {
NProgress.start(); NProgress.start();
exportBlob( exportBlob(
@@ -731,7 +736,7 @@ export default {
this.platformOnLoad(this.platformPage); this.platformOnLoad(this.platformPage);
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功!', message: '操作成功!'
}); });
done(); done();
}, },
@@ -789,8 +794,8 @@ export default {
this.platformLoading = false; this.platformLoading = false;
this.selectionClear(); this.selectionClear();
}); });
}, }
}, }
}; };
</script> </script>