店铺调整
This commit is contained in:
parent
490dd68ed7
commit
8d3eedf507
@ -2,7 +2,7 @@ export interface AccountQuery {
|
|||||||
current: number;
|
current: number;
|
||||||
size: number;
|
size: number;
|
||||||
type: string | number;
|
type: string | number;
|
||||||
tenantName: string;
|
storeName: string;
|
||||||
}
|
}
|
||||||
export interface VersionList {
|
export interface VersionList {
|
||||||
createBy: number;
|
createBy: number;
|
||||||
|
30
src/api/agent/index.ts
Normal file
30
src/api/agent/index.ts
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import { AccountQuery } from './types';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
import { VersionAdd } from './types';
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 查询租户账户列表
|
||||||
|
export function getList(query: AccountQuery): AxiosPromise {
|
||||||
|
return request({
|
||||||
|
url: '/system/tenant/account/list',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 查询租户账户列表
|
||||||
|
export function getDel(query: string): AxiosPromise {
|
||||||
|
return request({
|
||||||
|
url: '/system/tenant/account/list',
|
||||||
|
method: 'delete',
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 添加
|
||||||
|
export function postAdd(query: VersionAdd): AxiosPromise {
|
||||||
|
return request({
|
||||||
|
url: '/system/tenant/account/list',
|
||||||
|
method: 'delete',
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
29
src/api/agent/types.ts
Normal file
29
src/api/agent/types.ts
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
export interface AccountQuery {
|
||||||
|
current: number;
|
||||||
|
size: number;
|
||||||
|
type: string | number;
|
||||||
|
storeName: string;
|
||||||
|
}
|
||||||
|
export interface VersionList {
|
||||||
|
createBy: number;
|
||||||
|
createTime: string;
|
||||||
|
id: number;
|
||||||
|
integralBalance: string;
|
||||||
|
moneyBalance: string;
|
||||||
|
revenue: string;
|
||||||
|
tenantId: number;
|
||||||
|
totalIntegralBalance: string;
|
||||||
|
type: number;
|
||||||
|
updateBy: number;
|
||||||
|
updateTime: string;
|
||||||
|
wallet: string;
|
||||||
|
}
|
||||||
|
export interface VersionAdd {
|
||||||
|
platformType: string;
|
||||||
|
versionCode: string;
|
||||||
|
versionName: string;
|
||||||
|
downloadUrl: string;
|
||||||
|
isForceUpdate: string;
|
||||||
|
releaseNotes: string;
|
||||||
|
status: string;
|
||||||
|
}
|
@ -11,7 +11,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商家名称" prop="type">
|
<el-form-item label="商家名称" prop="type">
|
||||||
<el-input v-model="queryParams.tenantName" placeholder="请输入商家名称" />
|
<el-input v-model="queryParams.storeName" placeholder="请输入商家名称" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
@ -22,11 +22,11 @@
|
|||||||
</transition>
|
</transition>
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-table :data="devices" border style="width: 100%; height: 100%; font-size: 14px">
|
<el-table :data="devices" border style="width: 100%; height: 100%; font-size: 14px">
|
||||||
<el-table-column label="名称" align="center" prop="tenantId" :show-overflow-tooltip="true" />
|
<el-table-column label="账户名称" align="center" prop="storeName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="累计积分余额" align="center" prop="totalIntegralBalance" :show-overflow-tooltip="true" />
|
<el-table-column label="钱包" align="center" prop="wallet" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="现金余额" align="center" prop="moneyBalance" :show-overflow-tooltip="true" />
|
<el-table-column label="应收" align="center" prop="revenue" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="钱包余额" align="center" prop="wallet" :show-overflow-tooltip="true" />
|
<el-table-column label="积分" align="center" prop="integralBalance" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="累计收益" align="center" prop="revenue" width="180" />
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||||
<el-table-column label="账户类型" align="center" prop="type" width="180">
|
<el-table-column label="账户类型" align="center" prop="type" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.type === 1 ? '商家' : scope.row.type === 2 ? '代理' : '平台' }}
|
{{ scope.row.type === 1 ? '商家' : scope.row.type === 2 ? '代理' : '平台' }}
|
||||||
@ -43,15 +43,6 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-dialog v-model="showRefuteDialog" title="添加" width="600px" append-to-body>
|
|
||||||
<el-form> </el-form>
|
|
||||||
<template #footer>
|
|
||||||
<span class="dialog-footer">
|
|
||||||
<el-button @click="showRefuteDialog = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="handleAdd">添加</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -67,7 +58,7 @@ const queryParams = ref<AccountQuery>({
|
|||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
type: '',
|
type: '',
|
||||||
tenantName: ''
|
storeName: ''
|
||||||
});
|
});
|
||||||
//列表
|
//列表
|
||||||
const devices = ref<VersionList[]>([]);
|
const devices = ref<VersionList[]>([]);
|
||||||
@ -89,7 +80,7 @@ const resetQuery = () => {
|
|||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
type: '',
|
type: '',
|
||||||
tenantName: ''
|
storeName: ''
|
||||||
};
|
};
|
||||||
getListList();
|
getListList();
|
||||||
};
|
};
|
||||||
|
153
src/views/agent/index.vue
Normal file
153
src/views/agent/index.vue
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="true" class="search">
|
||||||
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="类型" prop="type">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择类型" clearable @keyup.enter="handleQuery">
|
||||||
|
<el-option label="商家" value="1" />
|
||||||
|
<el-option label="代理" value="2" />
|
||||||
|
<el-option label="平台" value="3" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商家名称" prop="type">
|
||||||
|
<el-input v-model="queryParams.storeName" placeholder="请输入商家名称" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-table :data="devices" border style="width: 100%; height: 100%; font-size: 14px">
|
||||||
|
<el-table-column label="账户名称" align="center" prop="storeName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="钱包" align="center" prop="wallet" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="应收" align="center" prop="revenue" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="积分" align="center" prop="integralBalance" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||||
|
<el-table-column label="账户类型" align="center" prop="type" width="180">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.type === 1 ? '商家' : scope.row.type === 2 ? '代理' : '平台' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block">
|
||||||
|
<pagination
|
||||||
|
v-if="totalref > 0"
|
||||||
|
:total="totalref"
|
||||||
|
v-model:page="queryParams.current"
|
||||||
|
v-model:limit="queryParams.size"
|
||||||
|
@pagination="getListList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-dialog v-model="showRefuteDialog" title="添加" width="600px" append-to-body>
|
||||||
|
<el-form> </el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="showRefuteDialog = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="handleAdd">添加</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Online" lang="ts">
|
||||||
|
import { AccountQuery, VersionList, VersionAdd } from '@/api/agent/types';
|
||||||
|
import { getList, postAdd } from '@/api/agent/index';
|
||||||
|
import { propTypes } from '@/utils/propTypes';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { sys_device_type } = toRefs<any>(proxy?.useDict('sys_device_type'));
|
||||||
|
//查询参数
|
||||||
|
const queryParams = ref<AccountQuery>({
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
type: '',
|
||||||
|
storeName: ''
|
||||||
|
});
|
||||||
|
//列表
|
||||||
|
const devices = ref<VersionList[]>([]);
|
||||||
|
//总条数
|
||||||
|
const totalref = ref<number>(0);
|
||||||
|
const getListList = async () => {
|
||||||
|
const res = await getList(queryParams.value);
|
||||||
|
if (res.code === 200) {
|
||||||
|
devices.value = res.data.records;
|
||||||
|
totalref.value = res.data.total;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleQuery = () => {
|
||||||
|
getListList();
|
||||||
|
};
|
||||||
|
const showRefuteDialog = ref(false);
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryParams.value = {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
type: '',
|
||||||
|
storeName: ''
|
||||||
|
};
|
||||||
|
getListList();
|
||||||
|
};
|
||||||
|
const headDate = ref<VersionAdd>({
|
||||||
|
platformType: '',
|
||||||
|
versionCode: '',
|
||||||
|
versionName: '',
|
||||||
|
downloadUrl: '',
|
||||||
|
isForceUpdate: null,
|
||||||
|
releaseNotes: '',
|
||||||
|
status: null
|
||||||
|
});
|
||||||
|
const handleAdd = async () => {
|
||||||
|
const res = await postAdd(headDate.value);
|
||||||
|
if (res.code === 200) {
|
||||||
|
ElMessage.success('添加成功');
|
||||||
|
headDate.value = {
|
||||||
|
platformType: '',
|
||||||
|
versionCode: '',
|
||||||
|
versionName: '',
|
||||||
|
downloadUrl: '',
|
||||||
|
isForceUpdate: null,
|
||||||
|
releaseNotes: '',
|
||||||
|
status: null
|
||||||
|
};
|
||||||
|
showRefuteDialog.value = false;
|
||||||
|
getListList();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 修改
|
||||||
|
// const handleStatusChange = async (row: any) => {
|
||||||
|
// const obj = {
|
||||||
|
// id: row.id,
|
||||||
|
// status: row.status == 1 ? 0 : 1
|
||||||
|
// };
|
||||||
|
// const res = await getupdate(obj);
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// ElMessage.success('修改成功');
|
||||||
|
// getListList();
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
const handldDelOnline = (row: any) => {
|
||||||
|
ElMessageBox.confirm('确定要删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async () => {
|
||||||
|
const obj = {
|
||||||
|
id: row.id
|
||||||
|
};
|
||||||
|
// const res = await getDel({ id: row.id });
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// ElMessage.success('删除成功');
|
||||||
|
// getListList();
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getListList();
|
||||||
|
});
|
||||||
|
</script>
|
@ -27,7 +27,7 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:tenant:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@ -47,15 +47,15 @@
|
|||||||
<el-table-column width="180" label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column width="180" label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="增加规则" placement="top">
|
<el-tooltip content="增加规则" placement="top">
|
||||||
<el-button v-hasPermi="['system:tenant:edit']" link type="primary" @click="funseach(scope.row)">
|
<el-button link type="primary" @click="funseach(scope.row)">
|
||||||
<el-icon><Plus /></el-icon>
|
<el-icon><Plus /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-tooltip content="修改" placement="top">
|
||||||
<el-button v-hasPermi="['system:tenant:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="删除" placement="top">
|
<el-tooltip content="删除" placement="top">
|
||||||
<el-button v-hasPermi="['system:tenant:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -97,7 +97,7 @@
|
|||||||
<!-- 查看模板 -->
|
<!-- 查看模板 -->
|
||||||
<el-dialog v-model="sexDialog.visible" :title="sexDialog.title" width="800px" append-to-body>
|
<el-dialog v-model="sexDialog.visible" :title="sexDialog.title" width="800px" append-to-body>
|
||||||
<el-form ref="secformRef" :model="secform" v-if="mul == '1'">
|
<el-form ref="secformRef" :model="secform" v-if="mul == '1'">
|
||||||
<el-button v-hasPermi="['system:tenant:add']" type="primary" plain icon="Plus" @click="addform" style="margin-bottom: 10px">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="addform" style="margin-bottom: 10px">新增</el-button>
|
||||||
<el-row :gutter="20" v-for="(item, index) in templateDetailList" :key="index">
|
<el-row :gutter="20" v-for="(item, index) in templateDetailList" :key="index">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="种类:" :prop="'templateDetailList[' + index + '].rateName'">
|
<el-form-item label="种类:" :prop="'templateDetailList[' + index + '].rateName'">
|
||||||
@ -113,14 +113,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
<el-form-item label="" prop="templateType">
|
<el-form-item label="" prop="templateType">
|
||||||
<el-button v-hasPermi="['system:tenant:remove']" link type="primary" icon="Delete" @click="deleteList(index, item.id)"></el-button>
|
<el-button link type="primary" icon="Delete" @click="deleteList(index, item.id)"></el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- //区间 -->
|
<!-- //区间 -->
|
||||||
<el-form ref="constdfromRef" :model="secform" :rules="constfrules" v-else>
|
<el-form ref="constdfromRef" :model="secform" :rules="constfrules" v-else>
|
||||||
<el-button v-hasPermi="['system:tenant:add']" type="primary" plain icon="Plus" @click="conadd" style="margin-bottom: 10px">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="conadd" style="margin-bottom: 10px">新增</el-button>
|
||||||
<el-row :gutter="20" v-for="(item, index) in constdfrom" :key="index">
|
<el-row :gutter="20" v-for="(item, index) in constdfrom" :key="index">
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<el-form-item label="小于:" :prop="'constdfrom[' + index + '].minAmount'">
|
<el-form-item label="小于:" :prop="'constdfrom[' + index + '].minAmount'">
|
||||||
@ -139,7 +139,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1">
|
<el-col :span="1">
|
||||||
<el-form-item label="" prop="templateType">
|
<el-form-item label="" prop="templateType">
|
||||||
<el-button v-hasPermi="['system:tenant:remove']" link type="primary" icon="Delete" @click="condele(index, item.id)"></el-button>
|
<el-button link type="primary" icon="Delete" @click="condele(index, item.id)"></el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -340,7 +340,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="租户套餐:" prop="packageId">
|
<el-form-item label="租户套餐:" prop="packageId">
|
||||||
<el-select v-model="form.packageId" :disabled="!!form.tenantId" placeholder="请选择租户套餐" clearable style="width: 100%">
|
<el-select v-model="form.packageId" placeholder="请选择租户套餐" clearable style="width: 100%">
|
||||||
<el-option v-for="item in packageList" :key="item.packageId" :label="item.packageName" :value="item.packageId" />
|
<el-option v-for="item in packageList" :key="item.packageId" :label="item.packageName" :value="item.packageId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user