Compare commits
9 Commits
d6a33aea3b
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| c87c999d42 | |||
| f648a7ea5e | |||
| 0ab8852656 | |||
| 03883e1b26 | |||
| b9308c1f21 | |||
| be12089ffe | |||
| e5cdf0a3dc | |||
| 51812fb0cc | |||
| 6e39a94f01 |
@@ -72,7 +72,7 @@ const AuthAPI = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 耗材列表
|
// 耗材列表分页
|
||||||
productcons(params: any) {
|
productcons(params: any) {
|
||||||
return request<any, Responseres>({
|
return request<any, Responseres>({
|
||||||
url: `/product/admin/product/cons/page`,
|
url: `/product/admin/product/cons/page`,
|
||||||
@@ -80,7 +80,14 @@ const AuthAPI = {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 耗材列表
|
||||||
|
productconsList(params: any) {
|
||||||
|
return request<any, Responseres>({
|
||||||
|
url: `/product/admin/product/cons/list`,
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
},
|
||||||
// 上下架
|
// 上下架
|
||||||
onOff(data: any) {
|
onOff(data: any) {
|
||||||
return request<any, Responseres>({
|
return request<any, Responseres>({
|
||||||
|
|||||||
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: {
|
||||||
|
|||||||
@@ -163,7 +163,6 @@ const modalConfig: IModalConfig<editRequest> = {
|
|||||||
options: options.printType,
|
options: options.printType,
|
||||||
initialValue: options.printType.map(v => v.value)
|
initialValue: options.printType.map(v => v.value)
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: "打印机状态",
|
label: "打印机状态",
|
||||||
prop: "status",
|
prop: "status",
|
||||||
@@ -174,6 +173,16 @@ const modalConfig: IModalConfig<editRequest> = {
|
|||||||
inactiveValue: 0,
|
inactiveValue: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "媒体音开关",
|
||||||
|
prop: "volumeSwitch",
|
||||||
|
type: "switch",
|
||||||
|
initialValue: 1,
|
||||||
|
attrs: {
|
||||||
|
activeValue: 1,
|
||||||
|
inactiveValue: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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')}`;
|
||||||
|
|||||||
@@ -116,7 +116,11 @@
|
|||||||
退款详情>
|
退款详情>
|
||||||
</span> -->
|
</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="color-red">退款方式:{{ detail.refundType }}</div>
|
<div class="color-red">
|
||||||
|
<span v-if="detail.refundType">
|
||||||
|
退款方式:{{ detail.refundType === "cash" ? "现金退款" : "原路退回" }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
<div></div>
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,14 +2,26 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<page-search ref="searchRef" :search-config="searchConfig" @query-click="newHandleQueryClick"
|
<page-search
|
||||||
@reset-click="handleResetClick2" />
|
ref="searchRef"
|
||||||
|
:search-config="searchConfig"
|
||||||
|
@query-click="newHandleQueryClick"
|
||||||
|
@reset-click="handleResetClick2"
|
||||||
|
/>
|
||||||
<!-- 顶部数据 -->
|
<!-- 顶部数据 -->
|
||||||
<Statistics :data="gongjiData"></Statistics>
|
<Statistics :data="gongjiData"></Statistics>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<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 ? "启用" : "禁用" }}
|
||||||
@@ -25,11 +37,22 @@
|
|||||||
<DictLabel v-model="scope.row[scope.prop]" code="gender" />
|
<DictLabel v-model="scope.row[scope.prop]" code="gender" />
|
||||||
</template>
|
</template>
|
||||||
<template #shangjia="scope">
|
<template #shangjia="scope">
|
||||||
<el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"
|
<el-switch
|
||||||
@click="handleSwitchChange(scope.row)"></el-switch>
|
v-model="scope.row[scope.prop]"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
@click="handleSwitchChange(scope.row)"
|
||||||
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
<template #isStock="scope">
|
<template #isStock="scope">
|
||||||
<el-switch disabled v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"></el-switch>
|
<el-switch
|
||||||
|
v-if="!scope.row.productId"
|
||||||
|
v-model="scope.row[scope.prop]"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
:disabled="!scope.row.type"
|
||||||
|
@click="isStockChange(scope.row)"
|
||||||
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #kucunedit="scope">
|
<template #kucunedit="scope">
|
||||||
@@ -42,16 +65,29 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #tuikuantuihui="scope">
|
<template #tuikuantuihui="scope">
|
||||||
<el-switch v-if="!scope.row.productId" v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"
|
<el-switch
|
||||||
@click="handleSwitchhaocai(scope.row)"></el-switch>
|
v-if="!scope.row.productId"
|
||||||
|
v-model="scope.row[scope.prop]"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
@click="handleSwitchhaocai(scope.row)"
|
||||||
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
<template #sellOut="scope">
|
<template #sellOut="scope">
|
||||||
<el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"
|
<el-switch
|
||||||
@click="handleSwitchChangeTwo(scope.row)"></el-switch>
|
v-model="scope.row[scope.prop]"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
@click="handleSwitchChangeTwo(scope.row)"
|
||||||
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
<template #mobile="scope">
|
<template #mobile="scope">
|
||||||
<el-text>{{ scope.row[scope.prop] }}</el-text>
|
<el-text>{{ scope.row[scope.prop] }}</el-text>
|
||||||
<copy-button v-if="scope.row[scope.prop]" :text="scope.row[scope.prop]" style="margin-left: 2px" />
|
<copy-button
|
||||||
|
v-if="scope.row[scope.prop]"
|
||||||
|
:text="scope.row[scope.prop]"
|
||||||
|
style="margin-left: 2px"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #consumables="scope">
|
<template #consumables="scope">
|
||||||
<template v-if="scope.row.type != null">
|
<template v-if="scope.row.type != null">
|
||||||
@@ -74,7 +110,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>
|
||||||
@@ -121,16 +161,31 @@
|
|||||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||||
<el-table-column label="耗材名称" prop="consInfoId">
|
<el-table-column label="耗材名称" prop="consInfoId">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-select v-model="scope.row.consInfoId" reserve-keyword placeholder="请输入关键词"
|
<el-select
|
||||||
@change="selectionChange($event, scope.row)">
|
filterable
|
||||||
<el-option v-for="item in options" :key="item.id" :label="item.conName" :value="item.id"></el-option>
|
v-model="scope.row.consInfoId"
|
||||||
|
reserve-keyword
|
||||||
|
placeholder="请输入关键词"
|
||||||
|
@change="selectionChange($event, scope.row)"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.id * 1"
|
||||||
|
:label="item.conName"
|
||||||
|
:value="item.id * 1"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div> -->
|
<!-- <div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单位" prop="conUnit">
|
<el-table-column label="单位" prop="conUnit">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-input v-model="scope.row.conUnit" readonly disabled placeholder="请选择耗材"></el-input>
|
<el-input
|
||||||
|
v-model="scope.row.conUnit"
|
||||||
|
readonly
|
||||||
|
disabled
|
||||||
|
placeholder="请选择耗材"
|
||||||
|
></el-input>
|
||||||
<!-- <el-select v-model="scope.row.conUnit" reserve-keyword placeholder="请输入关键词">
|
<!-- <el-select v-model="scope.row.conUnit" reserve-keyword placeholder="请输入关键词">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in returnConUnits(scope.row.consInfoId)"
|
v-for="item in returnConUnits(scope.row.consInfoId)"
|
||||||
@@ -149,13 +204,20 @@
|
|||||||
<el-table-column label="操作" width="100">
|
<el-table-column label="操作" width="100">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div class="table_btn_wrap">
|
<div class="table_btn_wrap">
|
||||||
<div class="btn sub" v-if="haocaiData.consList.length > 1"
|
<div
|
||||||
@click="haocaiData.consList.splice(scope.$index, 1)">
|
class="btn sub"
|
||||||
|
v-if="haocaiData.consList.length > 1"
|
||||||
|
@click="haocaiData.consList.splice(scope.$index, 1)"
|
||||||
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<RemoveFilled />
|
<RemoveFilled />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn add" v-if="scope.$index == haocaiData.consList.length - 1" @click="createItem(scope.row)">
|
<div
|
||||||
|
class="btn add"
|
||||||
|
v-if="scope.$index == haocaiData.consList.length - 1"
|
||||||
|
@click="createItem(scope.row)"
|
||||||
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<CirclePlusFilled />
|
<CirclePlusFilled />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@@ -255,8 +317,8 @@ onMounted(async () => {
|
|||||||
// 获取耗材列表
|
// 获取耗材列表
|
||||||
gethaocaiList();
|
gethaocaiList();
|
||||||
|
|
||||||
const res = await UserAPI.getPage()
|
const res = await UserAPI.getPage();
|
||||||
form.warnLine = res.warnLine || ''
|
form.warnLine = res.warnLine || "";
|
||||||
// console.log('contentRef.value===', res);
|
// console.log('contentRef.value===', res);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -310,7 +372,7 @@ function getTongji(params: IObject | undefined) {
|
|||||||
|
|
||||||
// 显示批量导入
|
// 显示批量导入
|
||||||
function handleUploadClick() {
|
function handleUploadClick() {
|
||||||
importDataRef.value.show()
|
importDataRef.value.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出商品
|
// 导出商品
|
||||||
@@ -342,13 +404,25 @@ function createItem(val: IObject) {
|
|||||||
haocaiData.value.consList.push(item);
|
haocaiData.value.consList.push(item);
|
||||||
}
|
}
|
||||||
// 上架
|
// 上架
|
||||||
function handleSwitchChange(data: any) {
|
async function handleSwitchChange(data: any) {
|
||||||
|
console.log(data);
|
||||||
let obj = {
|
let obj = {
|
||||||
type: data.productId ? "sku" : "product",
|
type: data.productId ? "sku" : "product",
|
||||||
id: data.id,
|
id: data.id,
|
||||||
isSale: data.isSale,
|
isSale: data.isSale,
|
||||||
};
|
};
|
||||||
UserAPI.onOff(obj);
|
await UserAPI.onOff(obj);
|
||||||
|
ElMessage.success("修改成功!");
|
||||||
|
|
||||||
|
if (data.productId) {
|
||||||
|
//sku
|
||||||
|
contentRef.value?.fetchPageData();
|
||||||
|
} else {
|
||||||
|
//product
|
||||||
|
data.skuList.map((v) => {
|
||||||
|
v.isSale = data.isSale;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 售罄
|
// 售罄
|
||||||
function handleSwitchChangeTwo(data: any) {
|
function handleSwitchChangeTwo(data: any) {
|
||||||
@@ -358,6 +432,7 @@ function handleSwitchChangeTwo(data: any) {
|
|||||||
isSoldOut: data.isSoldStock,
|
isSoldOut: data.isSoldStock,
|
||||||
};
|
};
|
||||||
UserAPI.markIsSoldOut(obj);
|
UserAPI.markIsSoldOut(obj);
|
||||||
|
ElMessage.success("修改成功!");
|
||||||
}
|
}
|
||||||
function handleSwitchChangethree(data: any) {
|
function handleSwitchChangethree(data: any) {
|
||||||
let obj = {
|
let obj = {
|
||||||
@@ -368,6 +443,18 @@ function handleSwitchChangethree(data: any) {
|
|||||||
UserAPI.markIsSoldOut(obj);
|
UserAPI.markIsSoldOut(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function isStockChange(data: any) {
|
||||||
|
console.log(data);
|
||||||
|
let obj = {
|
||||||
|
type: "product",
|
||||||
|
id: data.id,
|
||||||
|
isSale: data.isStock,
|
||||||
|
optType: "stock",
|
||||||
|
};
|
||||||
|
await UserAPI.onOff(obj);
|
||||||
|
ElMessage.success("修改成功!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 退款退回
|
// 退款退回
|
||||||
async function handleSwitchhaocai(row: IObject) {
|
async function handleSwitchhaocai(row: IObject) {
|
||||||
let res = await UserAPI.refundToStock({ isReturn: row.isRefundStock, id: row.id });
|
let res = await UserAPI.refundToStock({ isReturn: row.isRefundStock, id: row.id });
|
||||||
@@ -398,7 +485,7 @@ async function handleToolbarClick(name: string) {
|
|||||||
ElMessage.success("操作成功,数据正在后台同步中...");
|
ElMessage.success("操作成功,数据正在后台同步中...");
|
||||||
}
|
}
|
||||||
if (name === "upload") {
|
if (name === "upload") {
|
||||||
importDataRef.value.show()
|
importDataRef.value.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function confirm() {
|
async function confirm() {
|
||||||
@@ -451,8 +538,8 @@ async function handleOperatClick(data: IOperatData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function gethaocaiList() {
|
async function gethaocaiList() {
|
||||||
let res = await UserAPI.productcons({ id: route.query.id });
|
let res = await UserAPI.productconsList({ id: route.query.id });
|
||||||
options.value = res.records;
|
options.value = res || [];
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
|||||||
table: {
|
table: {
|
||||||
border: true,
|
border: true,
|
||||||
highlightCurrentRow: true,
|
highlightCurrentRow: true,
|
||||||
|
expandRowKeys: [],
|
||||||
rowKey: 'id',
|
rowKey: 'id',
|
||||||
treeProps: {
|
treeProps: {
|
||||||
children: 'skuList' // 指定子节点存储的字段为 customChildren
|
children: 'skuList' // 指定子节点存储的字段为 customChildren
|
||||||
|
|||||||
@@ -40,15 +40,25 @@
|
|||||||
</el-button> -->
|
</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="u-flex u-p-b-15 u-font-14 u-m-t-16">
|
<div class="u-flex" style="justify-content: space-between">
|
||||||
<div v-for="(item, key) in status" :key="key" class="state u-m-r-24">
|
<div class="u-flex u-p-b-15 u-font-14 u-m-t-16">
|
||||||
<span
|
<div v-for="(item, key) in status" :key="key" class="state u-m-r-24">
|
||||||
class="dot"
|
<span
|
||||||
:style="{
|
class="dot"
|
||||||
backgroundColor: status[key] ? status[key].type : '',
|
:style="{
|
||||||
}"
|
backgroundColor: status[key] ? status[key].type : '',
|
||||||
/>
|
}"
|
||||||
{{ item.label }}
|
/>
|
||||||
|
{{ item.label }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="color: #3f9eff; font-weight: 700; padding-right: 30px">
|
||||||
|
<span style="color: #333; font-weight: 400">未结账:</span>
|
||||||
|
<span>{{ totalOrder }}笔</span>
|
||||||
|
<span>|</span>
|
||||||
|
<span>{{ totalPerson }}人</span>
|
||||||
|
<span>|</span>
|
||||||
|
<span>¥{{ totalMoney }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -363,7 +373,7 @@ function addTableShow(item) {
|
|||||||
const tableList = ref([]);
|
const tableList = ref([]);
|
||||||
const tablequery = reactive({
|
const tablequery = reactive({
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 100,
|
size: 300,
|
||||||
});
|
});
|
||||||
|
|
||||||
async function tableInit() {
|
async function tableInit() {
|
||||||
@@ -371,6 +381,35 @@ async function tableInit() {
|
|||||||
tableList.value = res.records;
|
tableList.value = res.records;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const totalOrder = computed(() => {
|
||||||
|
return tableList.value.reduce((pre, cur) => {
|
||||||
|
if (cur.status == "unsettled") {
|
||||||
|
return pre + 1;
|
||||||
|
}
|
||||||
|
return pre;
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
const totalPerson = computed(() => {
|
||||||
|
return tableList.value.reduce((pre, cur) => {
|
||||||
|
if (cur.status == "unsettled") {
|
||||||
|
return pre + cur.personNum;
|
||||||
|
}
|
||||||
|
return pre;
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
const totalMoney = computed(() => {
|
||||||
|
return tableList.value
|
||||||
|
.reduce((pre, cur) => {
|
||||||
|
if (cur.status == "unsettled") {
|
||||||
|
return pre + cur.orderAmount;
|
||||||
|
}
|
||||||
|
return pre;
|
||||||
|
}, 0)
|
||||||
|
.toFixed(2);
|
||||||
|
});
|
||||||
|
|
||||||
// 区域
|
// 区域
|
||||||
let areaMap = ref({});
|
let areaMap = ref({});
|
||||||
const refAddEara = ref(null);
|
const refAddEara = ref(null);
|
||||||
|
|||||||