Compare commits
2 Commits
f648a7ea5e
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| 209be704e1 | |||
| c87c999d42 |
@@ -7,8 +7,8 @@ VITE_APP_BASE_API=/dev-api
|
|||||||
# 接口地址
|
# 接口地址
|
||||||
|
|
||||||
# VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 测试
|
# VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 测试
|
||||||
# VITE_APP_API_URL=https://cashier.sxczgkj.com/ # 正式
|
VITE_APP_API_URL=https://cashier.sxczgkj.com/ # 正式
|
||||||
VITE_APP_API_URL=http://192.168.1.42/ # 本地
|
# VITE_APP_API_URL=http://192.168.1.42/ # 本地
|
||||||
VITE_APP_API_PHP_URL=http://192.168.1.42:8000 #php抖音美团测试环境
|
VITE_APP_API_PHP_URL=http://192.168.1.42:8000 #php抖音美团测试环境
|
||||||
VITE_APP_API_PHP_IMPORT_URL=http://192.168.1.42:8789 #本地php批量导入
|
VITE_APP_API_PHP_IMPORT_URL=http://192.168.1.42:8789 #本地php批量导入
|
||||||
# VITE_APP_API_PHP_IMPORT_URL=https://diftcs.sxczgkj.com #本地线上php批量导入
|
# VITE_APP_API_PHP_IMPORT_URL=https://diftcs.sxczgkj.com #本地线上php批量导入
|
||||||
|
|||||||
BIN
src/assets/index_bg.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
src/assets/index_quick1.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
src/assets/index_quick2.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
src/assets/index_quick3.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/index_quick4.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
src/assets/index_quick5.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
src/assets/index_quick6.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
@@ -24,61 +24,17 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "/",
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "/index",
|
redirect: '/index',
|
||||||
meta: {
|
|
||||||
title: "数据中心",
|
|
||||||
icon: "数据统计",
|
|
||||||
alwaysShow: true,
|
|
||||||
},
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "index",
|
path: 'index',
|
||||||
component: () => import("@/views/data/index.vue"),
|
component: () => import('@/views/index/index.vue'),
|
||||||
name: "",
|
name: 'index',
|
||||||
meta: {
|
meta: {
|
||||||
title: "经营数据",
|
title: '首页',
|
||||||
affix: false,
|
icon: 'homepage',
|
||||||
keepAlive: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "sales",
|
|
||||||
name: "",
|
|
||||||
component: () => import("@/views/data/sales.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "销售统计",
|
|
||||||
affix: false,
|
|
||||||
keepAlive: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "table",
|
|
||||||
name: "",
|
|
||||||
component: () => import("@/views/data/table.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "台桌统计",
|
|
||||||
affix: false,
|
|
||||||
keepAlive: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "finance",
|
|
||||||
name: "",
|
|
||||||
component: () => import("@/views/data/finance.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "财务报表"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "work",
|
|
||||||
name: "workStatistics",
|
|
||||||
component: () => import("@/views/data/work.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "收银交班记录",
|
|
||||||
affix: false,
|
|
||||||
keepAlive: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -91,9 +47,79 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
component: () => import("@/views/error/404.vue"),
|
component: () => import("@/views/error/404.vue"),
|
||||||
meta: { hidden: true },
|
meta: { hidden: true },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
// path: "/",
|
||||||
|
// component: Layout,
|
||||||
|
// redirect: "/index",
|
||||||
|
// meta: {
|
||||||
|
// title: "数据中心",
|
||||||
|
// icon: "数据统计",
|
||||||
|
// alwaysShow: true,
|
||||||
|
// },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: "index",
|
||||||
|
// component: () => import("@/views/data/index.vue"),
|
||||||
|
// name: "",
|
||||||
|
// meta: {
|
||||||
|
// title: "经营数据",
|
||||||
|
// affix: false,
|
||||||
|
// keepAlive: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "sales",
|
||||||
|
// name: "",
|
||||||
|
// component: () => import("@/views/data/sales.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "销售统计",
|
||||||
|
// affix: false,
|
||||||
|
// keepAlive: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "table",
|
||||||
|
// name: "",
|
||||||
|
// component: () => import("@/views/data/table.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "台桌统计",
|
||||||
|
// affix: false,
|
||||||
|
// keepAlive: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "finance",
|
||||||
|
// name: "",
|
||||||
|
// component: () => import("@/views/data/finance.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "财务报表"
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "work",
|
||||||
|
// name: "workStatistics",
|
||||||
|
// component: () => import("@/views/data/work.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "收银交班记录",
|
||||||
|
// affix: false,
|
||||||
|
// keepAlive: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "401",
|
||||||
|
// component: () => import("@/views/error/401.vue"),
|
||||||
|
// meta: { hidden: true },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "404",
|
||||||
|
// component: () => import("@/views/error/404.vue"),
|
||||||
|
// meta: { hidden: true },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
// path: "/shop",
|
// path: "/shop",
|
||||||
// component: Layout,
|
// component: Layout,
|
||||||
// meta: {
|
// meta: {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import printerApi, { type addRequest } from "@/api/account/printer";
|
|||||||
import { options } from './config'
|
import { options } from './config'
|
||||||
|
|
||||||
import type { IModalConfig } from "@/components/CURD/types";
|
import type { IModalConfig } from "@/components/CURD/types";
|
||||||
|
import { c } from "vite/dist/node/moduleRunnerTransport.d-CXw_Ws6P";
|
||||||
|
|
||||||
const modalConfig: IModalConfig<addRequest> = {
|
const modalConfig: IModalConfig<addRequest> = {
|
||||||
pageName: "sys:user",
|
pageName: "sys:user",
|
||||||
@@ -15,9 +16,13 @@ const modalConfig: IModalConfig<addRequest> = {
|
|||||||
},
|
},
|
||||||
formAction: function (data) {
|
formAction: function (data) {
|
||||||
let obj = { ...data }
|
let obj = { ...data }
|
||||||
|
console.log("打印类型", data);
|
||||||
obj.printType = data.printType.join(',')
|
obj.printType = data.printType.join(',')
|
||||||
obj.categoryIds = JSON.stringify(data.categoryIdsArr)
|
obj.categoryIds = JSON.stringify(data.categoryIdsArr)
|
||||||
obj.categoryList = JSON.stringify(data.categoryIdsArr)
|
obj.categoryList = JSON.stringify(data.categoryIdsArr)
|
||||||
|
if (data.classifyPrint == 0) {
|
||||||
|
obj.categoryIds = ''
|
||||||
|
}
|
||||||
// obj.categoryIds = '[' + data.categoryIdsArr.join(',') + ']'
|
// obj.categoryIds = '[' + data.categoryIdsArr.join(',') + ']'
|
||||||
return printerApi.add(obj);
|
return printerApi.add(obj);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ const modalConfig: IModalConfig<editRequest> = {
|
|||||||
obj.categoryIds = JSON.stringify(data.categoryIdsArr)
|
obj.categoryIds = JSON.stringify(data.categoryIdsArr)
|
||||||
obj.categoryList = JSON.stringify(data.categoryIdsArr)
|
obj.categoryList = JSON.stringify(data.categoryIdsArr)
|
||||||
}
|
}
|
||||||
|
if (data.classifyPrint == 0) {
|
||||||
|
obj.categoryIds = ''
|
||||||
|
}
|
||||||
return printerApi.edit(obj);
|
return printerApi.edit(obj);
|
||||||
},
|
},
|
||||||
beforeSubmit(data) {
|
beforeSubmit(data) {
|
||||||
|
|||||||
@@ -2,23 +2,35 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<page-search ref="searchRef" :search-config="searchConfig" @query-click="handleQueryClick"
|
<page-search
|
||||||
@reset-click="handleResetClick" />
|
ref="searchRef"
|
||||||
|
:search-config="searchConfig"
|
||||||
|
@query-click="handleQueryClick"
|
||||||
|
@reset-click="handleResetClick"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<page-content ref="contentRef" :content-config="contentConfig" @add-click="handleAddClick"
|
<page-content
|
||||||
@edit-click="handleEditClick" @export-click="handleExportClick" @search-click="handleSearchClick"
|
ref="contentRef"
|
||||||
@toolbar-click="handleToolbarClick" @operat-click="handleOperatClick" @filter-change="handleFilterChange">
|
:content-config="contentConfig"
|
||||||
|
@add-click="handleAddClick"
|
||||||
|
@edit-click="handleEditClick"
|
||||||
|
@export-click="handleExportClick"
|
||||||
|
@search-click="handleSearchClick"
|
||||||
|
@toolbar-click="handleToolbarClick"
|
||||||
|
@operat-click="handleOperatClick"
|
||||||
|
@filter-change="handleFilterChange"
|
||||||
|
>
|
||||||
<template #status="scope">
|
<template #status="scope">
|
||||||
<el-tag :type="scope.row[scope.prop] == 1 ? 'success' : 'info'">
|
<el-tag :type="scope.row[scope.prop] == 1 ? 'success' : 'info'">
|
||||||
{{ scope.row[scope.prop] == 1 ? "启用" : "禁用" }}
|
{{ scope.row[scope.prop] == 1 ? "启用" : "禁用" }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #contentType="scope">
|
<template #contentType="scope">
|
||||||
{{ scope.row.contentType == 'yxyPrinter' ? "云想印" : "飞鹅" }}
|
{{ scope.row.contentType == "yxyPrinter" ? "云想印" : "飞鹅" }}
|
||||||
</template>
|
</template>
|
||||||
<template #subType="scope">
|
<template #subType="scope">
|
||||||
{{ scope.row.subType == 'label' ? "标签" : "小票" }}
|
{{ scope.row.subType == "label" ? "标签" : "小票" }}
|
||||||
</template>
|
</template>
|
||||||
<template #caozuo="scope">
|
<template #caozuo="scope">
|
||||||
{{ scope }}
|
{{ scope }}
|
||||||
@@ -28,8 +40,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #operate="scope">
|
<template #operate="scope">
|
||||||
<div v-if="scope.row.connectionType != 'USB'">
|
<div v-if="scope.row.connectionType != 'USB'">
|
||||||
<el-button @click="handleEditClick(scope.row)" icon="Edit" type="primary" link>编辑</el-button>
|
<el-button @click="handleEditClick(scope.row)" icon="Edit" type="primary" link>
|
||||||
<el-button @click="handdeleteevent(scope.row)" icon="Delete" type="danger" link>删除</el-button>
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="handdeleteevent(scope.row)" icon="Delete" type="danger" link>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template #mobile="scope">
|
<!-- <template #mobile="scope">
|
||||||
@@ -55,7 +71,11 @@
|
|||||||
</page-modal>
|
</page-modal>
|
||||||
|
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<page-modal ref="editModalRef" :modal-config="editModalConfig" @submit-click="handleSubmitClick">
|
<page-modal
|
||||||
|
ref="editModalRef"
|
||||||
|
:modal-config="editModalConfig"
|
||||||
|
@submit-click="handleSubmitClick"
|
||||||
|
>
|
||||||
<template #gender="scope">
|
<template #gender="scope">
|
||||||
<Dict v-model="scope.formData[scope.prop]" code="gender" v-bind="scope.attrs" />
|
<Dict v-model="scope.formData[scope.prop]" code="gender" v-bind="scope.attrs" />
|
||||||
</template>
|
</template>
|
||||||
@@ -98,11 +118,11 @@ const {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPrinterType();
|
getPrinterType();
|
||||||
});
|
});
|
||||||
let PrinterTypeList = ref([])
|
let PrinterTypeList = ref([]);
|
||||||
// 获取商品分类
|
// 获取商品分类
|
||||||
async function getPrinterType() {
|
async function getPrinterType() {
|
||||||
let res = await UserAPI.getPrinterType();
|
let res = await UserAPI.getPrinterType();
|
||||||
PrinterTypeList.value = res.records
|
PrinterTypeList.value = res.records;
|
||||||
}
|
}
|
||||||
function handdeleteevent(item) {
|
function handdeleteevent(item) {
|
||||||
ElMessageBox.confirm("确认删除?", "警告", {
|
ElMessageBox.confirm("确认删除?", "警告", {
|
||||||
@@ -114,7 +134,6 @@ function handdeleteevent(item) {
|
|||||||
ElMessage.success("删除成功");
|
ElMessage.success("删除成功");
|
||||||
handleQueryClick();
|
handleQueryClick();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
@@ -127,11 +146,15 @@ async function handleEditClick(row: IObject) {
|
|||||||
editModalRef.value?.setModalVisible();
|
editModalRef.value?.setModalVisible();
|
||||||
// 根据id获取数据进行填充
|
// 根据id获取数据进行填充
|
||||||
let data = await UserAPI.get(row.id);
|
let data = await UserAPI.get(row.id);
|
||||||
data.printType = data.printType.split(',');
|
data.printType = data.printType.split(",");
|
||||||
|
|
||||||
if (data.categoryIds) {
|
if (data.categoryIds) {
|
||||||
data.categoryIdsArr = JSON.parse(data.categoryIds)
|
data.categoryIdsArr = JSON.parse(data.categoryIds);
|
||||||
|
} else {
|
||||||
|
data.categoryIdsArr = [];
|
||||||
}
|
}
|
||||||
|
console.log(data.categoryIdsArr);
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
data.classifyPrint = data.classifyPrint * 1;
|
data.classifyPrint = data.classifyPrint * 1;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,111 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="gyq_container">
|
||||||
<h1>Index</h1>
|
<div class="item_wrap">
|
||||||
|
<div class="title">您好,欢迎登录</div>
|
||||||
|
<div class="item_list">
|
||||||
|
<div class="item" v-for="(item, index) in quickStore.quickMenus" :key="item.id" @click="menuClick(item.menuId)">
|
||||||
|
<img class="icon" :src="icons[index + 1]" alt="">
|
||||||
|
{{ returnMenuName(item.menuId) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, nextTick } from "vue";
|
||||||
|
import { useQuickStore, usePermissionStore, useUserStore } from "@/store";
|
||||||
|
|
||||||
|
import icon1 from "@/assets/index_quick1.png";
|
||||||
|
import icon2 from "@/assets/index_quick2.png";
|
||||||
|
import icon3 from "@/assets/index_quick3.png";
|
||||||
|
import icon4 from "@/assets/index_quick4.png";
|
||||||
|
import icon5 from "@/assets/index_quick5.png";
|
||||||
|
import icon6 from "@/assets/index_quick6.png";
|
||||||
|
|
||||||
|
const icons = {
|
||||||
|
1: icon1,
|
||||||
|
2: icon2,
|
||||||
|
3: icon3,
|
||||||
|
4: icon4,
|
||||||
|
5: icon5,
|
||||||
|
6: icon6,
|
||||||
|
};
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const quickStore = useQuickStore();
|
||||||
|
const permissionStore = usePermissionStore();
|
||||||
|
|
||||||
|
function returnMenuName(menuId) {
|
||||||
|
return permissionStore.returnMenuName(menuId);
|
||||||
|
}
|
||||||
|
|
||||||
|
function menuClick(menuId) {
|
||||||
|
permissionStore.menuJump(menuId);
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await nextTick();
|
||||||
|
console.log('quickStore.quickMenus', quickStore.quickMenus);
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.gyq_container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: url('@/assets/index_bg.png') no-repeat center center / cover;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item_wrap {
|
||||||
|
padding-left: 300px;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 40px;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item_list {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-template-rows: repeat(2, 1fr);
|
||||||
|
grid-column-gap: 90px;
|
||||||
|
grid-row-gap: 90px;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 152px;
|
||||||
|
height: 83px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background: linear-gradient(115deg, #9EC4FF 5.9%, #6668E8 111.62%);
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #fff;
|
||||||
|
padding-left: 30px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
transform: translateY(-10px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
position: absolute;
|
||||||
|
left: -30px;
|
||||||
|
top: -20px;
|
||||||
|
width: 83px;
|
||||||
|
height: 78px;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -74,12 +74,19 @@ const accountList = reactive([
|
|||||||
{ username: "19107220837", type: 'danger', label: '快乐时光店铺' },
|
{ username: "19107220837", type: 'danger', label: '快乐时光店铺' },
|
||||||
// { username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' },
|
// { username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' },
|
||||||
{ username: "18821670757", type: 'success', label: '高歌的小店' },
|
{ username: "18821670757", type: 'success', label: '高歌的小店' },
|
||||||
|
{ username: "18821670757", staffUserName: '18821670758', type: 'primary', label: '高歌的小店的员工-张三' },
|
||||||
{ username: "191123456", type: 'primary', label: '酸橘子' },
|
{ username: "191123456", type: 'primary', label: '酸橘子' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 快捷模拟登录
|
// 快捷模拟登录
|
||||||
function accountHandle(item) {
|
function accountHandle(item) {
|
||||||
state.loginForm.username = item.username;
|
state.loginForm.username = item.username;
|
||||||
|
if (item.staffUserName) {
|
||||||
|
state.loginForm.loginType = 1
|
||||||
|
state.loginForm.staffUserName = item.staffUserName
|
||||||
|
} else {
|
||||||
|
state.loginForm.loginType = 0
|
||||||
|
}
|
||||||
state.loginForm.code = 666666
|
state.loginForm.code = 666666
|
||||||
const d = new Date();
|
const d = new Date();
|
||||||
state.loginForm.password = `czg${d.getHours().toString().padStart(2, '0')}${d.getMinutes().toString().padStart(2, '0')}`;
|
state.loginForm.password = `czg${d.getHours().toString().padStart(2, '0')}${d.getMinutes().toString().padStart(2, '0')}`;
|
||||||
|
|||||||