This commit is contained in:
parent
83b1ed2eb6
commit
470b4f540d
|
@ -1,4 +0,0 @@
|
||||||
NODE_ENV = 'development'
|
|
||||||
|
|
||||||
# Base API
|
|
||||||
VITE_APP_BASE_URL=''
|
|
|
@ -1,3 +0,0 @@
|
||||||
NODE_ENV = 'production'
|
|
||||||
# Base API
|
|
||||||
VITE_APP_BASE_URL=''
|
|
File diff suppressed because it is too large
Load Diff
|
@ -5,12 +5,22 @@ export function getConfig() {
|
||||||
return request.get({ url: '/config/getConfig' })
|
return request.get({ url: '/config/getConfig' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//字典数据
|
||||||
|
export function getDictData(params: any) {
|
||||||
|
return request.get({ url: '/config/dict', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 工作台统计数据
|
||||||
|
|
||||||
|
// 首页图表统计
|
||||||
|
export function merchantInfo() {
|
||||||
|
return request.get({ url: '/workbench/merchantInfo' })
|
||||||
|
}
|
||||||
|
|
||||||
// 工作台主页
|
// 工作台主页
|
||||||
export function getWorkbench() {
|
export function getWorkbench() {
|
||||||
return request.get({ url: '/workbench/index' })
|
return request.get({ url: '/workbench/index' })
|
||||||
}
|
}
|
||||||
|
|
||||||
//字典数据
|
|
||||||
export function getDictData(params: any) {
|
|
||||||
return request.get({ url: '/config/dict', params })
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 商户列表
|
||||||
|
export function merchantList(params: any) {
|
||||||
|
return request.get({ url: '/merchant.merchant/lists', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改商户相关信息
|
||||||
|
export function merchantUpdate(params: any) {
|
||||||
|
return request.post({ url: '/merchant.merchant/changeMerchant', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 单商户查询
|
||||||
|
export function merchantDetail(params: any) {
|
||||||
|
return request.post({ url: '/merchant.merchant/detail', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获取记录人 子管理员
|
||||||
|
export function childManagement(params: any) {
|
||||||
|
return request.get({ url: '/record.record/info', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 商户管理员绑定
|
||||||
|
export function merchantBind(params: any) {
|
||||||
|
return request.post({ url: '/merchant.merchant/merchantPermision', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 商户分类
|
||||||
|
export function merchantCate(params: any) {
|
||||||
|
return request.get({ url: '/merchant.merchant/merchantCate', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 督导相关
|
||||||
|
export function storeSuper(params: any) {
|
||||||
|
return request.post({ url: '/merchant.merchant/storeSuper', params })
|
||||||
|
}
|
||||||
|
|
|
@ -23,4 +23,15 @@ export function apiRecordDelete(params: any) {
|
||||||
// 跟踪记录表详情
|
// 跟踪记录表详情
|
||||||
export function apiRecordDetail(params: any) {
|
export function apiRecordDetail(params: any) {
|
||||||
return request.get({ url: '/record.record/detail', params })
|
return request.get({ url: '/record.record/detail', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取记录分类
|
||||||
|
export function recordAll(params: any) {
|
||||||
|
return request.get({ url: '/record.record/all', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取记录人
|
||||||
|
export function recordInfo(params: any) {
|
||||||
|
return request.get({ url: '/record.record/info', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ import type { App } from 'vue'
|
||||||
import 'highlight.js/styles/github.css'
|
import 'highlight.js/styles/github.css'
|
||||||
import hljs from 'highlight.js/lib/common'
|
import hljs from 'highlight.js/lib/common'
|
||||||
import hljsVuePlugin from '@highlightjs/vue-plugin'
|
import hljsVuePlugin from '@highlightjs/vue-plugin'
|
||||||
console.log(hljs)
|
|
||||||
export default (app: App<Element>) => {
|
export default (app: App<Element>) => {
|
||||||
app.use(hljsVuePlugin)
|
app.use(hljsVuePlugin)
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,6 +147,7 @@ export class Axios {
|
||||||
requestOptions: opt
|
requestOptions: opt
|
||||||
}
|
}
|
||||||
const { urlPrefix } = opt
|
const { urlPrefix } = opt
|
||||||
|
|
||||||
// 拼接请求前缀如api
|
// 拼接请求前缀如api
|
||||||
if (urlPrefix) {
|
if (urlPrefix) {
|
||||||
axioxConfig.url = `${urlPrefix}${config.url}`
|
axioxConfig.url = `${urlPrefix}${config.url}`
|
||||||
|
|
|
@ -1,130 +1,130 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login flex flex-col">
|
<div class="login flex flex-col">
|
||||||
<div class="flex-1 flex items-center justify-center">
|
<div class="flex-1 flex items-center justify-center">
|
||||||
<div class="login-card flex rounded-md">
|
<div class="login-card flex rounded-md">
|
||||||
<div class="flex-1 h-full hidden md:inline-block">
|
<div class="flex-1 h-full hidden md:inline-block">
|
||||||
<image-contain :src="config.login_image" :width="400" height="100%" />
|
<image-contain :src="config.login_image" :width="400" height="100%" />
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="login-form bg-body flex flex-col justify-center px-10 py-10 md:w-[400px] w-[375px] flex-none mx-auto"
|
|
||||||
>
|
|
||||||
<div class="text-center text-3xl font-medium mb-8">{{ config.web_name }}</div>
|
|
||||||
<el-form ref="formRef" :model="formData" size="large" :rules="rules">
|
|
||||||
<el-form-item prop="account">
|
|
||||||
<el-input
|
|
||||||
v-model="formData.account"
|
|
||||||
placeholder="请输入账号"
|
|
||||||
@keyup.enter="handleEnter"
|
|
||||||
>
|
|
||||||
<template #prepend>
|
|
||||||
<icon name="el-icon-User" />
|
|
||||||
</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="password">
|
|
||||||
<el-input
|
|
||||||
ref="passwordRef"
|
|
||||||
v-model="formData.password"
|
|
||||||
show-password
|
|
||||||
placeholder="请输入密码"
|
|
||||||
@keyup.enter="handleLogin"
|
|
||||||
>
|
|
||||||
<template #prepend>
|
|
||||||
<icon name="el-icon-Lock" />
|
|
||||||
</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div class="mb-5">
|
|
||||||
<el-checkbox v-model="remAccount" label="记住账号"></el-checkbox>
|
|
||||||
</div>
|
|
||||||
<el-button type="primary" size="large" :loading="isLock" @click="lockLogin">
|
|
||||||
登录
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<layout-footer />
|
<div
|
||||||
|
class="login-form bg-body flex flex-col justify-center px-10 py-10 md:w-[400px] w-[375px] flex-none mx-auto"
|
||||||
|
>
|
||||||
|
<div class="text-center text-3xl font-medium mb-8">{{ config.web_name }}</div>
|
||||||
|
<el-form ref="formRef" :model="formData" size="large" :rules="rules">
|
||||||
|
<el-form-item prop="account">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.account"
|
||||||
|
placeholder="请输入账号"
|
||||||
|
@keyup.enter="handleEnter"
|
||||||
|
>
|
||||||
|
<template #prepend>
|
||||||
|
<icon name="el-icon-User" />
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password">
|
||||||
|
<el-input
|
||||||
|
ref="passwordRef"
|
||||||
|
v-model="formData.password"
|
||||||
|
show-password
|
||||||
|
placeholder="请输入密码"
|
||||||
|
@keyup.enter="handleLogin"
|
||||||
|
>
|
||||||
|
<template #prepend>
|
||||||
|
<icon name="el-icon-Lock" />
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="mb-5">
|
||||||
|
<el-checkbox v-model="remAccount" label="记住账号"></el-checkbox>
|
||||||
|
</div>
|
||||||
|
<el-button type="primary" size="large" :loading="isLock" @click="lockLogin">
|
||||||
|
登录
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<layout-footer />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, reactive, ref, shallowRef } from 'vue'
|
import { computed, onMounted, reactive, ref, shallowRef } from "vue";
|
||||||
import type { InputInstance, FormInstance } from 'element-plus'
|
import type { InputInstance, FormInstance } from "element-plus";
|
||||||
import LayoutFooter from '@/layout/components/footer.vue'
|
import LayoutFooter from "@/layout/components/footer.vue";
|
||||||
import useAppStore from '@/stores/modules/app'
|
import useAppStore from "@/stores/modules/app";
|
||||||
import useUserStore from '@/stores/modules/user'
|
import useUserStore from "@/stores/modules/user";
|
||||||
import cache from '@/utils/cache'
|
import cache from "@/utils/cache";
|
||||||
import { ACCOUNT_KEY } from '@/enums/cacheEnums'
|
import { ACCOUNT_KEY } from "@/enums/cacheEnums";
|
||||||
import { PageEnum } from '@/enums/pageEnum'
|
import { PageEnum } from "@/enums/pageEnum";
|
||||||
import { useLockFn } from '@/hooks/useLockFn'
|
import { useLockFn } from "@/hooks/useLockFn";
|
||||||
const passwordRef = shallowRef<InputInstance>()
|
const passwordRef = shallowRef<InputInstance>();
|
||||||
const formRef = shallowRef<FormInstance>()
|
const formRef = shallowRef<FormInstance>();
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore();
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore();
|
||||||
const route = useRoute()
|
const route = useRoute();
|
||||||
const router = useRouter()
|
const router = useRouter();
|
||||||
const remAccount = ref(false)
|
const remAccount = ref(false);
|
||||||
const config = computed(() => appStore.config)
|
const config = computed(() => appStore.config);
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
account: '',
|
account: "admin",
|
||||||
password: ''
|
password: "123456",
|
||||||
})
|
});
|
||||||
const rules = {
|
const rules = {
|
||||||
account: [
|
account: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入账号',
|
message: "请输入账号",
|
||||||
trigger: ['blur']
|
trigger: ["blur"],
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入密码',
|
message: "请输入密码",
|
||||||
trigger: ['blur']
|
trigger: ["blur"],
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
};
|
||||||
// 回车按键监听
|
// 回车按键监听
|
||||||
const handleEnter = () => {
|
const handleEnter = () => {
|
||||||
if (!formData.password) {
|
if (!formData.password) {
|
||||||
return passwordRef.value?.focus()
|
return passwordRef.value?.focus();
|
||||||
}
|
}
|
||||||
handleLogin()
|
handleLogin();
|
||||||
}
|
};
|
||||||
// 登录处理
|
// 登录处理
|
||||||
const handleLogin = async () => {
|
const handleLogin = async () => {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate();
|
||||||
// 记住账号,缓存
|
// 记住账号,缓存
|
||||||
cache.set(ACCOUNT_KEY, {
|
cache.set(ACCOUNT_KEY, {
|
||||||
remember: remAccount.value,
|
remember: remAccount.value,
|
||||||
account: remAccount.value ? formData.account : ''
|
account: remAccount.value ? formData.account : "",
|
||||||
})
|
});
|
||||||
await userStore.login(formData)
|
await userStore.login(formData);
|
||||||
const {
|
const {
|
||||||
query: { redirect }
|
query: { redirect },
|
||||||
} = route
|
} = route;
|
||||||
const path = typeof redirect === 'string' ? redirect : PageEnum.INDEX
|
const path = typeof redirect === "string" ? redirect : PageEnum.INDEX;
|
||||||
router.push(path)
|
router.push(path);
|
||||||
}
|
};
|
||||||
const { isLock, lockFn: lockLogin } = useLockFn(handleLogin)
|
const { isLock, lockFn: lockLogin } = useLockFn(handleLogin);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const value = cache.get(ACCOUNT_KEY)
|
const value = cache.get(ACCOUNT_KEY);
|
||||||
if (value?.remember) {
|
if (value?.remember) {
|
||||||
remAccount.value = value.remember
|
remAccount.value = value.remember;
|
||||||
formData.account = value.account
|
formData.account = value.account;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.login {
|
.login {
|
||||||
background-image: url('./images/login_bg.png');
|
background-image: url("./images/login_bg.png");
|
||||||
@apply min-h-screen bg-no-repeat bg-center bg-cover;
|
@apply min-h-screen bg-no-repeat bg-center bg-cover;
|
||||||
.login-card {
|
.login-card {
|
||||||
height: 400px;
|
height: 400px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,66 +4,31 @@
|
||||||
<el-page-header :content="$route.meta.title" @back="$router.back()" />
|
<el-page-header :content="$route.meta.title" @back="$router.back()" />
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="mt-4 !border-none" shadow="never">
|
<el-card class="mt-4 !border-none" shadow="never">
|
||||||
<el-form
|
<el-form ref="formRef" class="ls-form" :model="formData" label-width="85px" :rules="rules">
|
||||||
ref="formRef"
|
|
||||||
class="ls-form"
|
|
||||||
:model="formData"
|
|
||||||
label-width="85px"
|
|
||||||
:rules="rules"
|
|
||||||
>
|
|
||||||
<div class="xl:flex">
|
<div class="xl:flex">
|
||||||
<div>
|
<div>
|
||||||
<el-form-item label="文章标题" prop="title">
|
<el-form-item label="文章标题" prop="title">
|
||||||
<div class="w-80">
|
<div class="w-80">
|
||||||
<el-input
|
<el-input v-model="formData.title" placeholder="请输入文章标题" type="textarea"
|
||||||
v-model="formData.title"
|
:autosize="{ minRows: 3, maxRows: 3 }" maxlength="64" show-word-limit clearable />
|
||||||
placeholder="请输入文章标题"
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 3, maxRows: 3 }"
|
|
||||||
maxlength="64"
|
|
||||||
show-word-limit
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文章栏目" prop="cid">
|
<el-form-item label="文章栏目" prop="cid">
|
||||||
<el-select
|
<el-select class="w-80" v-model="formData.cid" placeholder="请选择文章栏目" clearable>
|
||||||
class="w-80"
|
<el-option v-for="item in optionsData.article_cate" :key="item.id" :label="item.name"
|
||||||
v-model="formData.cid"
|
:value="item.id" />
|
||||||
placeholder="请选择文章栏目"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in optionsData.article_cate"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文章简介" prop="desc">
|
<el-form-item label="文章简介" prop="desc">
|
||||||
<div class="w-80">
|
<div class="w-80">
|
||||||
<el-input
|
<el-input v-model="formData.desc" placeholder="请输入文章简介" type="textarea"
|
||||||
v-model="formData.desc"
|
:autosize="{ minRows: 3, maxRows: 6 }" :maxlength="200" show-word-limit clearable />
|
||||||
placeholder="请输入文章简介"
|
|
||||||
type="textarea"
|
|
||||||
:autosize="{ minRows: 3, maxRows: 6 }"
|
|
||||||
:maxlength="200"
|
|
||||||
show-word-limit
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="摘要" prop="abstract">
|
<el-form-item label="摘要" prop="abstract">
|
||||||
<div class="w-80">
|
<div class="w-80">
|
||||||
<el-input
|
<el-input type="textarea" :autosize="{ minRows: 6, maxRows: 6 }"
|
||||||
type="textarea"
|
v-model="formData.abstract" maxlength="200" show-word-limit clearable />
|
||||||
:autosize="{ minRows: 6, maxRows: 6 }"
|
|
||||||
v-model="formData.abstract"
|
|
||||||
maxlength="200"
|
|
||||||
show-word-limit
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文章封面" prop="image">
|
<el-form-item label="文章封面" prop="image">
|
||||||
|
|
|
@ -0,0 +1,124 @@
|
||||||
|
<style lang="scss">
|
||||||
|
.w-80 {
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<template>
|
||||||
|
<div class="article-edit">
|
||||||
|
<el-card class="!border-none" shadow="never">
|
||||||
|
<el-page-header :content="$route.meta.title" @back="$router.back()" />
|
||||||
|
</el-card>
|
||||||
|
<el-card class="mt-4 !border-none" shadow="never">
|
||||||
|
<el-form ref="formRef" class="ls-form" :model="formData" label-width="100px" :rules="rules">
|
||||||
|
<div class="form-wrap">
|
||||||
|
<el-form-item label="商户名称" prop="mer_name">
|
||||||
|
<el-input class="w-80" v-model="formData.mer_name" placeholder="请输入商户名称" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="真实姓名" prop="real_name">
|
||||||
|
<el-input class="w-80" v-model="formData.real_name" placeholder="请输入真实姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="总采购金额" prop="purchase_amount">
|
||||||
|
<el-input class="w-80" v-model="formData.purchase_amount" placeholder="请输入总采购金额" readonly />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="总销售金额" prop="sale_amount">
|
||||||
|
<el-input class="w-80" v-model="formData.sale_amount" placeholder="请输入总销售金额" readonly />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="手机号" prop="service_phone">
|
||||||
|
<el-input class="w-80" v-model="formData.service_phone" placeholder="请输入手机号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="评分" prop="product_score">
|
||||||
|
<el-input class="w-80" v-model="formData.product_score" placeholder="请输入评分" type="number"
|
||||||
|
maxlength="1" max="5" min="1" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="店铺类型" prop="type_name">
|
||||||
|
<el-select class="w-80" v-model="formData.type_name" placeholder="请输入店铺类型">
|
||||||
|
<el-option :label="item.type_name" :value="item.mer_type_id" v-for="item in merchantData"
|
||||||
|
:key="item.mer_type_id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="地址" prop="mer_address">
|
||||||
|
<el-input class="w-80" v-model="formData.mer_address" placeholder="请输入地址" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<footer-btns>
|
||||||
|
<el-button type="primary" @click="handleSave">保存</el-button>
|
||||||
|
</footer-btns>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="articleListsEdit">
|
||||||
|
import type { FormInstance } from 'element-plus'
|
||||||
|
import { merchantDetail, merchantUpdate, merchantCate } from "@/api/merchant";
|
||||||
|
import { articleDetail, articleEdit, articleAdd, articleCateAll } from '@/api/article'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const formData = ref({
|
||||||
|
mer_id: "",//商户id
|
||||||
|
mer_name: "",//商户名称
|
||||||
|
mer_avatar: "",//商户头像
|
||||||
|
real_name: "",//商户姓名
|
||||||
|
mer_address: "",//商户地址
|
||||||
|
purchase_amount: "",//总采购金额
|
||||||
|
sale_amount: "",//销售总金额
|
||||||
|
service_phone: "",//手机号
|
||||||
|
product_score: "",//评分
|
||||||
|
type_name: "",//店铺类型
|
||||||
|
goods_num: "",//店铺商品数
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const formRef = shallowRef<FormInstance>()
|
||||||
|
const rules = reactive({
|
||||||
|
mer_name: [{ required: true, message: '请输入商户名称', trigger: 'blur' }],
|
||||||
|
real_name: [{ required: true, message: '请输入商户姓名', trigger: 'blur' }],
|
||||||
|
mer_address: [{ required: true, message: '请输入商户地址', trigger: 'blur' }],
|
||||||
|
service_phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
|
||||||
|
product_score: [{ required: true, message: '请输入评分', trigger: 'blur' }],
|
||||||
|
type_name: [{ required: true, message: '请输入店铺类型', trigger: 'blur' }],
|
||||||
|
})
|
||||||
|
|
||||||
|
const getDetails = async () => {
|
||||||
|
const data = await merchantDetail({
|
||||||
|
mer_id: route.query.id
|
||||||
|
});
|
||||||
|
|
||||||
|
formData.value = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 商户分类
|
||||||
|
const merchantData: any = ref([]);
|
||||||
|
const getMerchantCate = async () => {
|
||||||
|
merchantData.value = await merchantCate("");
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSave = async () => {
|
||||||
|
await formRef.value?.validate()
|
||||||
|
if (route.query.id) {
|
||||||
|
await merchantUpdate(formData.value)
|
||||||
|
} else {
|
||||||
|
await articleAdd(formData.value)
|
||||||
|
}
|
||||||
|
router.back()
|
||||||
|
}
|
||||||
|
|
||||||
|
route.query.id && getDetails();
|
||||||
|
getMerchantCate();
|
||||||
|
</script>
|
|
@ -0,0 +1,778 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="!border-none" shadow="never">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
class="mb-[-16px] mt-[16px]"
|
||||||
|
:model="queryParams"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item label="商户名称">
|
||||||
|
<el-input
|
||||||
|
class="w-[280px]"
|
||||||
|
v-model="queryParams.mer_name"
|
||||||
|
placeholder="请输入商户名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="resetPage"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="真实姓名">
|
||||||
|
<el-input
|
||||||
|
class="w-[280px]"
|
||||||
|
v-model="queryParams.real_name"
|
||||||
|
placeholder="请输入真实姓名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="resetPage"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="商户地址">
|
||||||
|
<el-input
|
||||||
|
class="w-[280px]"
|
||||||
|
v-model="queryParams.mer_address"
|
||||||
|
placeholder="请输入地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="resetPage"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="店铺类型">
|
||||||
|
<el-select
|
||||||
|
placeholder="请输入店铺类型"
|
||||||
|
v-model="queryParams.type_id"
|
||||||
|
@keyup.enter="resetPage"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in merchantData"
|
||||||
|
:label="item.type_name"
|
||||||
|
:value="item.mer_type_id"
|
||||||
|
:key="item.mer_type_id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
|
<el-button @click="resetParams">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="!border-none mt-4" shadow="never">
|
||||||
|
<div class="toolbar">
|
||||||
|
<el-button type="primary" @click="onBindBatch" size="small"> 批量绑定 </el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
ref="tableRef"
|
||||||
|
size="large"
|
||||||
|
v-loading="pager.loading"
|
||||||
|
:data="pager.lists"
|
||||||
|
@selection-change="onSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column label="商户名称" prop="mer_name" min-width="220" />
|
||||||
|
<el-table-column label="真实姓名" prop="real_name" min-width="100" />
|
||||||
|
<el-table-column label="总采购金额" prop="purchase_amount" min-width="100" />
|
||||||
|
<el-table-column label="总销售金额" prop="sale_amount" min-width="100" />
|
||||||
|
<el-table-column label="手机号" prop="service_phone" min-width="120" />
|
||||||
|
<el-table-column label="评分" prop="product_score" min-width="100" />
|
||||||
|
<el-table-column label="店铺类型" prop="type_name" min-width="120" />
|
||||||
|
<el-table-column label="店铺商品数" prop="goods_num" min-width="110" />
|
||||||
|
<el-table-column label="地址" prop="mer_address" min-width="220" />
|
||||||
|
<el-table-column label="操作" width="200" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-perms="['merchant.merchant/edit', 'merchant.merchant/add:edit']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
>
|
||||||
|
<router-link
|
||||||
|
:to="{
|
||||||
|
path: getRoutePath('merchant.merchant/add:edit'),
|
||||||
|
query: {
|
||||||
|
id: row.mer_id,
|
||||||
|
},
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</router-link>
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
v-perms="['merchant.merchant/share']"
|
||||||
|
type="primary"
|
||||||
|
@click="onBind(row)"
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
商户分配
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
<el-button type="primary" @click="onMonitor(row)" link size="small">
|
||||||
|
督导情况
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="flex justify-end mt-4">
|
||||||
|
<pagination v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 商户绑定 -->
|
||||||
|
<Popup
|
||||||
|
ref="popupRef"
|
||||||
|
title="商户绑定"
|
||||||
|
:async="true"
|
||||||
|
width="550px"
|
||||||
|
@confirm="handleSubmit"
|
||||||
|
@close="onClose"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" class="ls-form" :model="bindForm" label-width="110px">
|
||||||
|
<el-form-item label="已选商户">
|
||||||
|
<el-select class="w-80" v-model="bindForm.merchant_ids" multiple disabled>
|
||||||
|
<el-option
|
||||||
|
v-for="item in pager.lists"
|
||||||
|
:key="item.mer_id"
|
||||||
|
:value="item.mer_id"
|
||||||
|
:label="item.mer_name"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="子管理员" prop="admin_id">
|
||||||
|
<el-select class="w-80" v-model="bindForm.admin_id" placeholder="请选择管理员">
|
||||||
|
<el-option
|
||||||
|
v-for="item in children"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</Popup>
|
||||||
|
|
||||||
|
<!-- 督导情况 -->
|
||||||
|
<Popup
|
||||||
|
ref="monitorRef"
|
||||||
|
title="督导情况"
|
||||||
|
:async="true"
|
||||||
|
width="70%"
|
||||||
|
@confirm="onBindSubmit"
|
||||||
|
@close="onClose"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :model="monitorForm" label-width="180px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="督导师"
|
||||||
|
prop="supervisor"
|
||||||
|
:rules="{ required: true, message: '督导师不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.supervisor"
|
||||||
|
placeholder="请输入督导师"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="成活率"
|
||||||
|
prop="supervisor_rate"
|
||||||
|
:rules="{ required: true, message: '成活率不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input-number
|
||||||
|
v-model="monitorForm.supervisor_rate"
|
||||||
|
placeholder="请输入成活率"
|
||||||
|
controls-position="right"
|
||||||
|
:min="0.01"
|
||||||
|
:max="100"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="督导员"
|
||||||
|
prop="administrator"
|
||||||
|
:rules="{ required: true, message: '督导员不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.administrator"
|
||||||
|
placeholder="请输入督导员"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="成活率"
|
||||||
|
prop="survival_rate"
|
||||||
|
:rules="{ required: true, message: '成活率不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input-number
|
||||||
|
v-model="monitorForm.survival_rate"
|
||||||
|
placeholder="请输入成活率"
|
||||||
|
controls-position="right"
|
||||||
|
:min="0.01"
|
||||||
|
:max="100"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="运营对接人"
|
||||||
|
prop="operate"
|
||||||
|
:rules="{ required: true, message: '运营对接人不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.operate"
|
||||||
|
placeholder="请输入运营对接人"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="成活率"
|
||||||
|
prop="operate_rate"
|
||||||
|
:rules="{ required: true, message: '运营对接人不能为空', trigger: 'blur' }"
|
||||||
|
>
|
||||||
|
<el-input-number
|
||||||
|
v-model="monitorForm.operate_rate"
|
||||||
|
placeholder="请输入成活率"
|
||||||
|
controls-position="right"
|
||||||
|
:min="0.01"
|
||||||
|
:max="100"
|
||||||
|
:step="1"
|
||||||
|
:precision="2"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="监督人商户总体情况"
|
||||||
|
prop="condition"
|
||||||
|
:rules="{
|
||||||
|
required: true,
|
||||||
|
message: '监督人商户总体情况不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.condition"
|
||||||
|
placeholder="请输入监督人商户总体情况"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="商户总更新">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.saleGoodsNum"
|
||||||
|
placeholder="请输入商户总更新"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="总销售金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.survival_rate"
|
||||||
|
placeholder="请输入总销售金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="上周错售金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.lastWeekSale"
|
||||||
|
placeholder="请输入上周错售金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="本周错售金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.nowWeekSale"
|
||||||
|
placeholder="请输入本周错售金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="平台销售金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.saleMoney"
|
||||||
|
placeholder="请输入平台销售金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="平台销售占比">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.platformRate"
|
||||||
|
placeholder="请输入平台销售占比"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="总采购金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.saleTarget"
|
||||||
|
placeholder="请输入总采购金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="上七日采购金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.lastProcurePrice"
|
||||||
|
placeholder="请输入lastProcurePrice"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="近七日采购金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.procurePrice"
|
||||||
|
placeholder="请输入近七日采购金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="近7日销售情况">
|
||||||
|
<el-table :data="monitorForm.salePaySeven">
|
||||||
|
<el-table-column label="时间" prop="time" align="center" />
|
||||||
|
<el-table-column label="金额" prop="money" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="近七日采购情况">
|
||||||
|
<el-table :data="monitorForm.saleSeven">
|
||||||
|
<el-table-column label="时间" prop="time" align="center" />
|
||||||
|
<el-table-column label="金额" prop="money" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="销售采购占比">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.procureRate"
|
||||||
|
placeholder="请输入近七日采购情况"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="当日商户云仓采购">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.ycProcurement"
|
||||||
|
placeholder="请输入当日商户云仓采购"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="云仓采购总金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.allProcurement"
|
||||||
|
placeholder="请输入当日商户云仓采购"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="云仓采购占比">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.yunBuyRate"
|
||||||
|
placeholder="请输入当日商户云仓采购"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="日云仓采购占比">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.yunRate"
|
||||||
|
placeholder="请输入当日商户云仓采购"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="30%云仓采购差额总金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.differenceTotal"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="当天比百分之30的云仓比">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.differenceYunRate"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="商品总数">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.saleNum"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="商品分类">
|
||||||
|
<el-table :data="monitorForm.storeCates">
|
||||||
|
<el-table-column label="名称" prop="cate_name" align="center" />
|
||||||
|
<el-table-column label="数量" prop="cate_count" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="商户个人邀请总数">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.ownSpreadNum"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="可扩展量">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.merNum"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="总扩展数量">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.allSpreadNum"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="扩展成活占比">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.StoresaveRate"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="商户扩展量">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.daySpread"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="商品销售金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.payPriceDay"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="店铺采购金额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.procurePriceDay"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="日云仓采购对比">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.yunBuyRateDay"
|
||||||
|
placeholder="请输入30%云仓采购差额总金额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="日云仓采购对比">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.goodsToday"
|
||||||
|
placeholder="商品更新"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="补贴总额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.incomeAllSubsidies"
|
||||||
|
placeholder="补贴总额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="补贴余额">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.incomeBalanceSubsidies"
|
||||||
|
placeholder="补贴总额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="当日补贴">
|
||||||
|
<el-input
|
||||||
|
v-model="monitorForm.incomeTodaySubsides"
|
||||||
|
placeholder="补贴总额"
|
||||||
|
readonly
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</Popup>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="merchantList">
|
||||||
|
import {
|
||||||
|
merchantList,
|
||||||
|
childManagement,
|
||||||
|
merchantBind,
|
||||||
|
merchantCate,
|
||||||
|
storeSuper,
|
||||||
|
merchantUpdate,
|
||||||
|
} from "@/api/merchant";
|
||||||
|
import { usePaging } from "@/hooks/usePaging";
|
||||||
|
import { getRoutePath } from "@/router";
|
||||||
|
import feedback from "@/utils/feedback";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import Popup from "@/components/popup/index.vue";
|
||||||
|
|
||||||
|
const monitorRef: any = ref(null); //监督弹框引用
|
||||||
|
const formRef: any = ref(null); //监督表单引用
|
||||||
|
const popupRef = shallowRef<InstanceType<typeof Popup>>(); //商户分配引用
|
||||||
|
const tableRef: any = ref(null); //表格引用
|
||||||
|
const emit = defineEmits(["success", "close"]);
|
||||||
|
|
||||||
|
// 查询参数
|
||||||
|
const queryParams = reactive({
|
||||||
|
mer_name: "",
|
||||||
|
real_name: "",
|
||||||
|
mer_address: "",
|
||||||
|
purchase_amount: "",
|
||||||
|
sale_amount: "",
|
||||||
|
type_id: "",
|
||||||
|
product_score: "",
|
||||||
|
});
|
||||||
|
|
||||||
|
// 绑定表
|
||||||
|
const bindForm: any = reactive({
|
||||||
|
id: "",
|
||||||
|
merchant_ids: [],
|
||||||
|
type: 1,
|
||||||
|
admin_id: "",
|
||||||
|
merchant_names: [],
|
||||||
|
});
|
||||||
|
|
||||||
|
// 绑定商户
|
||||||
|
const onBind = (e: any) => {
|
||||||
|
popupRef.value?.open();
|
||||||
|
bindForm.merchant_ids.push(e.mer_id);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 批量绑定
|
||||||
|
const onBindBatch = async () => {
|
||||||
|
if (!selectData.value || selectData.value.length === 0)
|
||||||
|
return await feedback.notifyError("请至少选择一条记录!");
|
||||||
|
popupRef.value?.open();
|
||||||
|
selectData.value.forEach((item) => {
|
||||||
|
bindForm.merchant_ids.push(item);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 绑定提交
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
if (!bindForm.admin_id) return feedback.msgError("请选择子管理员!");
|
||||||
|
await merchantBind(bindForm);
|
||||||
|
popupRef.value?.close();
|
||||||
|
onClose();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭dialog
|
||||||
|
const onClose = () => {
|
||||||
|
bindForm.merchant_ids = [];
|
||||||
|
tableRef.value?.clearSelection();
|
||||||
|
monitorRef.value?.close();
|
||||||
|
popupRef.value?.close();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 选中的商户行
|
||||||
|
const selectData = ref<any[]>([]);
|
||||||
|
const onSelectionChange = (val: any[]) => {
|
||||||
|
selectData.value = val.map(({ mer_id }) => mer_id);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 督导情况
|
||||||
|
const onMonitor = async (row: any) => {
|
||||||
|
let detail = await storeSuper({ mer_id: row.mer_id });
|
||||||
|
monitorForm.value = detail;
|
||||||
|
monitorRef.value?.open();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 督导情况提交
|
||||||
|
const onBindSubmit = async () => {
|
||||||
|
await formRef.value?.validate();
|
||||||
|
await merchantUpdate(monitorForm.value);
|
||||||
|
monitorRef.value?.close();
|
||||||
|
emit("success");
|
||||||
|
};
|
||||||
|
|
||||||
|
// 督导表
|
||||||
|
const monitorForm: any = ref({
|
||||||
|
administrator: "", //督导员
|
||||||
|
administrator_rate: "", //督导员成活率
|
||||||
|
supervisor: "", //督导师
|
||||||
|
supervisor_rate: "", //督导师成活率
|
||||||
|
operate: "", //运营
|
||||||
|
operate_rate: "", //成活率
|
||||||
|
condition: "", //监督人商户总体情况
|
||||||
|
survival_rate: "", //成活率
|
||||||
|
saleGoodsNum: "", //商户总更新
|
||||||
|
totalSale: "", //总销售金额
|
||||||
|
lastWeekSale: "", //上周错售金额
|
||||||
|
nowWeekSale: "", //本周错售金额
|
||||||
|
salePaySeven: "", //近七日销售情况
|
||||||
|
saleMoney: "", //平台销售金额
|
||||||
|
platformRate: "", //平台销售占比
|
||||||
|
saleTarget: "", //总采购金额
|
||||||
|
lastProcurePrice: "", //上七日采购金额
|
||||||
|
procurePrice: "", //近七日采购金额
|
||||||
|
saleSeven: "", //七日采购情况
|
||||||
|
procureRate: "", //销售采购占比
|
||||||
|
ycProcurement: "", //当日商户云仓采购
|
||||||
|
allProcurement: "", //云仓采购总金额
|
||||||
|
yunBuyRate: "", //云仓采购占比
|
||||||
|
yunRate: "", //日云仓采购占比
|
||||||
|
differenceTotal: "", //30%云仓采购差额总金额
|
||||||
|
differenceYunRate: "", //当天比百分之30的云仓比
|
||||||
|
saleNum: "", //商品总数
|
||||||
|
storeCates: "", //商品分类
|
||||||
|
ownSpreadNum: "", //商户个人邀请总数
|
||||||
|
merNum: "", //可扩展量
|
||||||
|
allSpreadNum: "", //总扩展数量
|
||||||
|
StoresaveRate: "", //扩展成活占比
|
||||||
|
daySpread: "", //商户扩展量
|
||||||
|
payPriceDay: "", //商品销售金额
|
||||||
|
procurePriceDay: "", //店铺采购金额
|
||||||
|
yunBuyRateDay: "", //日云仓采购对比
|
||||||
|
goodsToday: "", //商品更新
|
||||||
|
incomeAllSubsidies: "", //补贴总额
|
||||||
|
incomeBalanceSubsidies: "", //补贴余额
|
||||||
|
incomeTodaySubsides: "", //当日补贴
|
||||||
|
});
|
||||||
|
|
||||||
|
// 列表
|
||||||
|
const { pager, getLists, resetPage, resetParams } = usePaging({
|
||||||
|
fetchFun: merchantList,
|
||||||
|
params: queryParams,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 商户分类
|
||||||
|
const merchantData: any = ref([]);
|
||||||
|
const getMerchantCate = async () => {
|
||||||
|
merchantData.value = await merchantCate("");
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取子管理员
|
||||||
|
const children: any = ref([]);
|
||||||
|
const getChildManagement = async () => {
|
||||||
|
children.value = await childManagement("");
|
||||||
|
};
|
||||||
|
|
||||||
|
getLists();
|
||||||
|
|
||||||
|
// 子管理
|
||||||
|
getChildManagement();
|
||||||
|
|
||||||
|
// 商户类型
|
||||||
|
getMerchantCate();
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.toolbar {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.el-row {
|
||||||
|
height: 70vh;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 2px;
|
||||||
|
}
|
||||||
|
.el-input-number {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -6,19 +6,35 @@
|
||||||
<el-form-item label="主题" prop="theme">
|
<el-form-item label="主题" prop="theme">
|
||||||
<el-input v-model="formData.theme" clearable placeholder="请输入主题" />
|
<el-input v-model="formData.theme" clearable placeholder="请输入主题" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="商户名称" prop="merchant_id">
|
||||||
|
<el-select placeholder="请选择商户" v-model="formData.merchant_id" style="width:100%;">
|
||||||
|
<el-option v-for="(item, indx) in recordData" :key="item.id" :value="item.id"
|
||||||
|
:label="item.name"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="记录类型" prop="rid">
|
<el-form-item label="记录类型" prop="rid">
|
||||||
<el-input v-model="formData.rid" clearable placeholder="请输入记录类型" />
|
<el-select placeholder="请选择记录类型" v-model="formData.rid" style="width:100%;">
|
||||||
|
<el-option v-for="(item, indx) in recordData" :key="item.id" :value="item.id"
|
||||||
|
:label="item.name"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="记录人" prop="admin_id">
|
<el-form-item label="记录人" prop="admin_id">
|
||||||
<el-input v-model="formData.admin_id" clearable placeholder="请输入记录人" />
|
<el-select placeholder="请选择记录人" v-model="formData.admin_id" style="width:100%;">
|
||||||
|
<el-option v-for="(item, indx) in recordInfo" :key="item.id" :value="item.id"
|
||||||
|
:label="item.name"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="跟进时间" prop="flow_time">
|
||||||
|
<el-date-picker v-model="formData.flow_time" type="date" placeholder="请选择跟进时间" style="width: 100%;">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
|
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="更进时间" prop="flow_time">
|
|
||||||
<el-input v-model="formData.flow_time" clearable placeholder="请输入更进时间" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,11 +45,16 @@ import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { apiRecordAdd, apiRecordEdit, apiRecordDetail } from '@/api/record'
|
import { apiRecordAdd, apiRecordEdit, apiRecordDetail } from '@/api/record'
|
||||||
import { timeFormat } from '@/utils/util'
|
import { timeFormat } from '@/utils/util'
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue';
|
||||||
|
import { defineProps } from 'vue'
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
recordData: {
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
type: Array as PropType<any[]>,
|
||||||
default: () => ({})
|
default: () => []
|
||||||
|
},
|
||||||
|
recordInfo: {
|
||||||
|
type: Array as PropType<any[]>,
|
||||||
|
default: () => []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['success', 'close'])
|
const emit = defineEmits(['success', 'close'])
|
||||||
|
@ -41,7 +62,6 @@ const formRef = shallowRef<FormInstance>()
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||||
const mode = ref('add')
|
const mode = ref('add')
|
||||||
|
|
||||||
|
|
||||||
// 弹窗标题
|
// 弹窗标题
|
||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑跟踪记录表' : '新增跟踪记录表'
|
return mode.value == 'edit' ? '编辑跟踪记录表' : '新增跟踪记录表'
|
||||||
|
@ -55,10 +75,9 @@ const formData = reactive({
|
||||||
admin_id: '',
|
admin_id: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
flow_time: '',
|
flow_time: '',
|
||||||
|
merchant_id: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 表单验证
|
// 表单验证
|
||||||
const formRules = reactive<any>({
|
const formRules = reactive<any>({
|
||||||
theme: [{
|
theme: [{
|
||||||
|
@ -68,17 +87,21 @@ const formRules = reactive<any>({
|
||||||
}],
|
}],
|
||||||
rid: [{
|
rid: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入记录类型',
|
message: '请选择商户记录类型',
|
||||||
trigger: ['blur']
|
trigger: ['change']
|
||||||
}],
|
}],
|
||||||
admin_id: [{
|
admin_id: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入记录人',
|
message: '请选择商户记录人',
|
||||||
trigger: ['blur']
|
trigger: ['change']
|
||||||
|
}],
|
||||||
|
merchant_id: [{
|
||||||
|
required: true,
|
||||||
|
message: '请选择商户',
|
||||||
|
trigger: ['change']
|
||||||
}],
|
}],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
|
@ -87,10 +110,9 @@ const setFormData = async (data: Record<any, any>) => {
|
||||||
formData[key] = data[key]
|
formData[key] = data[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
const getDetail = async (row: Record<string, any>) => {
|
||||||
const data = await apiRecordDetail({
|
const data = await apiRecordDetail({
|
||||||
id: row.id
|
id: row.id
|
||||||
|
@ -129,3 +151,9 @@ defineExpose({
|
||||||
getDetail
|
getDetail
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.el-input__wrapper {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -6,21 +6,25 @@
|
||||||
<el-input class="w-[280px]" v-model="queryParams.theme" clearable placeholder="请输入主题" />
|
<el-input class="w-[280px]" v-model="queryParams.theme" clearable placeholder="请输入主题" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="记录类型" prop="rid">
|
<el-form-item label="记录类型" prop="rid">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.rid" clearable placeholder="请输入记录类型" />
|
<el-select placeholder="请选择记录类型" v-model="queryParams.rid" class="w-[280px]">
|
||||||
|
<el-option v-for="item in recordList" :key="item.id" :value="item.id"
|
||||||
|
:label="item.name"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="记录人" prop="admin_id">
|
<el-form-item label="记录人" prop="admin_id">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.admin_id" clearable placeholder="请输入记录人" />
|
<el-select placeholder="请选择记录人" v-model="queryParams.admin_id" class="w-[280px]">
|
||||||
|
<el-option v-for="item in recordInfoList" :key="item.id" :value="item.id"
|
||||||
|
:label="item.name"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="商户" prop="merchant_id">
|
<el-form-item label="商户" prop="merchant_id">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.merchant_id" clearable placeholder="请选择商户" />
|
<el-input class="w-[280px]" v-model="queryParams.merchant_id" clearable placeholder="请选择商户" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="跟进时间" prop="flow_time">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.remark" clearable placeholder="请输入备注" />
|
<el-date-picker class="w-[280px]" v-model="queryParams.flow_time" type="date" placeholder="请选择跟进时间">
|
||||||
</el-form-item>
|
</el-date-picker>
|
||||||
<el-form-item label="更进时间" prop="flow_time">
|
|
||||||
<el-input class="w-[280px]" v-model="queryParams.flow_time" clearable placeholder="请输入更进时间" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -44,8 +48,8 @@
|
||||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="主题" prop="theme" show-overflow-tooltip />
|
<el-table-column label="主题" prop="theme" show-overflow-tooltip />
|
||||||
<el-table-column label="记录类型" prop="rid" show-overflow-tooltip />
|
<el-table-column label="记录类型" prop="cate_name" show-overflow-tooltip />
|
||||||
<el-table-column label="记录人" prop="admin_id" show-overflow-tooltip />
|
<el-table-column label="记录人" prop="admin_info" show-overflow-tooltip />
|
||||||
<el-table-column label="商户" prop="merchant_name" show-overflow-tooltip />
|
<el-table-column label="商户" prop="merchant_name" show-overflow-tooltip />
|
||||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||||
<el-table-column label="更进时间" prop="flow_time" show-overflow-tooltip />
|
<el-table-column label="更进时间" prop="flow_time" show-overflow-tooltip />
|
||||||
|
@ -67,22 +71,23 @@
|
||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
|
||||||
|
<edit-popup v-if="showEdit" ref="editRef" :record-info="recordInfoList" :record-data="recordList"
|
||||||
|
@success="getLists" @close="showEdit = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="recordLists">
|
<script lang="ts" setup name="recordLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiRecordLists, apiRecordDelete } from '@/api/record'
|
import { apiRecordLists, apiRecordDelete, recordAll, recordInfo } from '@/api/record'
|
||||||
import { timeFormat } from '@/utils/util'
|
import { timeFormat } from '@/utils/util'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false);
|
||||||
|
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
|
@ -102,8 +107,17 @@ const handleSelectionChange = (val: any[]) => {
|
||||||
selectData.value = val.map(({ id }) => id)
|
selectData.value = val.map(({ id }) => id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取字典数据
|
// 获取所有记录类型
|
||||||
const { dictData } = useDictData('')
|
const recordList: any = ref([]);
|
||||||
|
recordAll("").then(res => {
|
||||||
|
recordList.value = res;
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取记录人
|
||||||
|
const recordInfoList: any = ref([]);
|
||||||
|
recordInfo("").then(res => {
|
||||||
|
recordInfoList.value = res;
|
||||||
|
})
|
||||||
|
|
||||||
// 分页相关
|
// 分页相关
|
||||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
|
|
@ -43,6 +43,5 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
const onConfirm = (value: string) => {
|
const onConfirm = (value: string) => {
|
||||||
console.log(value)
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -20,11 +20,7 @@
|
||||||
<a :href="workbenchData.version.channel.website" target="_blank">
|
<a :href="workbenchData.version.channel.website" target="_blank">
|
||||||
<el-button type="success" size="small">官网</el-button>
|
<el-button type="success" size="small">官网</el-button>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a class="ml-3" :href="workbenchData.version.channel.gitee" target="_blank">
|
||||||
class="ml-3"
|
|
||||||
:href="workbenchData.version.channel.gitee"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
<el-button type="danger" size="small">Gitee</el-button>
|
<el-button type="danger" size="small">Gitee</el-button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,32 +39,32 @@
|
||||||
|
|
||||||
<div class="flex flex-wrap">
|
<div class="flex flex-wrap">
|
||||||
<div class="w-1/2 md:w-1/4">
|
<div class="w-1/2 md:w-1/4">
|
||||||
<div class="leading-10">销售额</div>
|
<div class="leading-10">本周订单总数</div>
|
||||||
<div class="text-6xl">{{ workbenchData.today.today_sales }}</div>
|
<div class="text-6xl">{{ merchantInfoData.order.nowWeekOrders }}</div>
|
||||||
<div class="text-tx-secondary text-xs">
|
<!-- <div class="text-tx-secondary text-xs">
|
||||||
总:{{ workbenchData.today.total_sales }}
|
总:{{ workbenchData.today.total_sales }}
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="w-1/2 md:w-1/4">
|
<div class="w-1/2 md:w-1/4">
|
||||||
<div class="leading-10">成交订单</div>
|
<div class="leading-10">上周订单总数</div>
|
||||||
<div class="text-6xl">{{ workbenchData.today.order_num }}</div>
|
<div class="text-6xl">{{ merchantInfoData.order.lastWeekOrders }}</div>
|
||||||
<div class="text-tx-secondary text-xs">
|
<!-- <div class="text-tx-secondary text-xs">
|
||||||
总:{{ workbenchData.today.order_sum }}
|
总:{{ workbenchData.today.order_sum }}
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="w-1/2 md:w-1/4">
|
<div class="w-1/2 md:w-1/4">
|
||||||
<div class="leading-10">新增用户</div>
|
<div class="leading-10">本周销售总额(元)</div>
|
||||||
<div class="text-6xl">{{ workbenchData.today.today_new_user }}</div>
|
<div class="text-6xl">{{ merchantInfoData.amount.nowWeekAmount }}</div>
|
||||||
<div class="text-tx-secondary text-xs">
|
<!-- <div class="text-tx-secondary text-xs">
|
||||||
总:{{ workbenchData.today.total_new_user }}
|
总:{{ workbenchData.today.total_new_user }}
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="w-1/2 md:w-1/4">
|
<div class="w-1/2 md:w-1/4">
|
||||||
<div class="leading-10">新增访问量</div>
|
<div class="leading-10">上周销售总额(元)</div>
|
||||||
<div class="text-6xl">{{ workbenchData.today.today_visitor }}</div>
|
<div class="text-6xl">{{ merchantInfoData.amount.lastWeekAmount }}</div>
|
||||||
<div class="text-tx-secondary text-xs">
|
<!-- <div class="text-tx-secondary text-xs">
|
||||||
总:{{ workbenchData.today.total_visitor }}
|
总:{{ workbenchData.today.total_visitor }}
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -79,11 +75,8 @@
|
||||||
<span>常用功能</span>
|
<span>常用功能</span>
|
||||||
</template>
|
</template>
|
||||||
<div class="flex flex-wrap">
|
<div class="flex flex-wrap">
|
||||||
<div
|
<div v-for="item in workbenchData.menu" class="md:w-[12.5%] w-1/4 flex flex-col items-center"
|
||||||
v-for="item in workbenchData.menu"
|
:key="item">
|
||||||
class="md:w-[12.5%] w-1/4 flex flex-col items-center"
|
|
||||||
:key="item"
|
|
||||||
>
|
|
||||||
<router-link :to="item.url" class="mb-3 flex flex-col items-center">
|
<router-link :to="item.url" class="mb-3 flex flex-col items-center">
|
||||||
<image-contain width="40px" height="40px" :src="item?.image" />
|
<image-contain width="40px" height="40px" :src="item?.image" />
|
||||||
<div class="mt-2">{{ item.name }}</div>
|
<div class="mt-2">{{ item.name }}</div>
|
||||||
|
@ -95,14 +88,22 @@
|
||||||
<div class="md:flex">
|
<div class="md:flex">
|
||||||
<el-card class="flex-1 !border-none md:mr-4 mb-4" shadow="never">
|
<el-card class="flex-1 !border-none md:mr-4 mb-4" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<span>访问量趋势图</span>
|
<span>本周商品销售数量</span>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<v-charts
|
<v-charts style="height: 350px" :option="merchantInfoData.echartOptionNowWeek" :autoresize="true" />
|
||||||
style="height: 350px"
|
</div>
|
||||||
:option="workbenchData.visitorOption"
|
</el-card>
|
||||||
:autoresize="true"
|
</div>
|
||||||
/>
|
|
||||||
|
<div class="md:flex">
|
||||||
|
<el-card class="flex-1 !border-none md:mr-4 mb-4" shadow="never">
|
||||||
|
<template #header>
|
||||||
|
<span>上周周商品销售数量</span>
|
||||||
|
</template>
|
||||||
|
<div>
|
||||||
|
<v-charts style="height: 350px" :option="merchantInfoData.echartOptionLastWeek"
|
||||||
|
:autoresize="true" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -110,8 +111,112 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="workbench">
|
<script lang="ts" setup name="workbench">
|
||||||
import { getWorkbench } from '@/api/app'
|
import { getWorkbench, merchantInfo } from '@/api/app'
|
||||||
import vCharts from 'vue-echarts'
|
import { orderBy } from 'lodash-es';
|
||||||
|
import vCharts from 'vue-echarts';
|
||||||
|
|
||||||
|
// 商品统计表单
|
||||||
|
const merchantInfoData = ref({
|
||||||
|
// 订单数
|
||||||
|
order: {
|
||||||
|
nowWeekOrders: 0,
|
||||||
|
lastWeekOrders: 0
|
||||||
|
},
|
||||||
|
|
||||||
|
// 平台交易额
|
||||||
|
amount: {
|
||||||
|
nowWeekAmount: 0,
|
||||||
|
lastWeekAmount: 0
|
||||||
|
},
|
||||||
|
|
||||||
|
// echarts 本周数据配置项
|
||||||
|
echartOptionNowWeek: {
|
||||||
|
tooltip: { show: true },
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: [],
|
||||||
|
axisLabel: {
|
||||||
|
show: true,
|
||||||
|
rotate: 45
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: [],
|
||||||
|
type: 'bar',
|
||||||
|
barMaxWidth: 30,
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
// echarts 上周数据配置项
|
||||||
|
echartOptionLastWeek: {
|
||||||
|
tooltip: { show: true },
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: [],
|
||||||
|
axisLabel: {
|
||||||
|
show: true,
|
||||||
|
rotate: 45
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: [],
|
||||||
|
type: 'bar',
|
||||||
|
barMaxWidth: 30,
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 获取商品销量统计
|
||||||
|
const getMerchangeInfo = () => {
|
||||||
|
merchantInfo().then(res => {
|
||||||
|
// 订单
|
||||||
|
merchantInfoData.value.order.nowWeekOrders = res.nowWeekOrderNum;
|
||||||
|
merchantInfoData.value.order.lastWeekOrders = res.lastWeekOrderNum;
|
||||||
|
|
||||||
|
// 销售额
|
||||||
|
merchantInfoData.value.amount.nowWeekAmount = res.nowWeekMoney;
|
||||||
|
merchantInfoData.value.amount.lastWeekAmount = res.lastWeekMoney;
|
||||||
|
|
||||||
|
// 本周商品销售数量
|
||||||
|
let nameArr: any = [], dataArr: any = [];
|
||||||
|
res.nowWeekGoods.map((item: any) => {
|
||||||
|
nameArr.push(item.store_name ? item.store_name : '-');
|
||||||
|
dataArr.push(item.product_count);
|
||||||
|
});
|
||||||
|
merchantInfoData.value.echartOptionNowWeek.xAxis.data = nameArr;
|
||||||
|
merchantInfoData.value.echartOptionNowWeek.series[0].data = dataArr;
|
||||||
|
|
||||||
|
|
||||||
|
// 上周商品销售数量
|
||||||
|
let nameArr1: any = [], dataArr1: any = [];
|
||||||
|
res.lastWeekGoods.map((item: any) => {
|
||||||
|
nameArr1.push(item.store_name || '-');
|
||||||
|
dataArr1.push(item.product_count);
|
||||||
|
});
|
||||||
|
merchantInfoData.value.echartOptionLastWeek.xAxis.data = nameArr1;
|
||||||
|
merchantInfoData.value.echartOptionLastWeek.series[0].data = dataArr1;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const workbenchData: any = reactive({
|
const workbenchData: any = reactive({
|
||||||
version: {
|
version: {
|
||||||
|
@ -186,7 +291,8 @@ const getData = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData()
|
getData();
|
||||||
|
getMerchangeInfo();
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue