fengdong777 2 years ago
parent
commit
c8b657d821
  1. 0
      cd
  2. 384
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/layout/components/Sidebar/index.vue
  3. 131
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/router/index.js
  4. 15
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/BrandMessage.vue
  5. 15
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/CuisineMessage.vue
  6. 15
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/GroupMessage.vue
  7. 15
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/MaterialMessage.vue
  8. 15
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/ShopMessage.vue
  9. 322
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/inquireStatistics/index.vue
  10. 17
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/parameterSet/dataSet.vue
  11. 17
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/parameterSet/footSet.vue

384
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/layout/components/Sidebar/index.vue

@ -1,174 +1,248 @@
<template>
<div :class="{'has-logo':showLogo}">
<div :class="{ 'has-logo': showLogo }">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText"
:unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false"
mode="vertical">
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
<el-menu
:default-active="activeMenu"
:background-color="variables.menuBg"
:text-color="variables.menuText"
:unique-opened="false"
:active-text-color="variables.menuActiveText"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="route in routes"
:key="route.path"
:item="route"
:base-path="route.path"
/>
</el-menu>
</el-scrollbar>
</div>
</template>
<script>
import {
mapGetters
} from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
import {
getrolemenus,
loginDetails
} from '@/api/system/Role/role.js'
import {
getStorage
} from '@/utils/auth'
export default {
components: {
SidebarItem,
Logo
},
data() {
return {
YongHuid: [],
// routes: [],
params: {
sourceSid: '9d048c07-7677-4774-9177-aa02b049ff06',
userSid: '',
},
routes: [{
alwaysShow: true,
component: 'index',
meta: {
icon: "el-icon-menu",
title: "原油类型"
},
name: "/oilType/index",
path: "/oilType/index"
import { mapGetters } from "vuex";
import Logo from "./Logo";
import SidebarItem from "./SidebarItem";
import variables from "@/styles/variables.scss";
import { getrolemenus, loginDetails } from "@/api/system/Role/role.js";
import { getStorage } from "@/utils/auth";
export default {
components: {
SidebarItem,
Logo,
},
data() {
return {
YongHuid: [],
// routes: [],
params: {
sourceSid: "9d048c07-7677-4774-9177-aa02b049ff06",
userSid: "",
},
routes: [
{
alwaysShow: true,
meta: {
icon: "el-icon-menu",
title: "基础数据",
},
{
alwaysShow: true,
component: 'index',
meta: {
icon: "el-icon-menu",
title: "油罐类型"
name: "/essentialData",
path: "/essentialData",
children: [
{
alwaysShow: true,
component: "BrandMessage",
meta: {
icon: "el-icon-help",
title: "品牌信息",
},
name: "/essentialData/BrandMessage",
path: "/essentialData/BrandMessage",
},
name: "/oilTank/index",
path: "/oilTank/index"
},
{
alwaysShow: true,
component: 'index',
meta: {
icon: "el-icon-menu",
title: "出入库记录"
{
alwaysShow: true,
component: "CuisineMessage",
meta: {
icon: "el-icon-help",
title: "菜单信息",
},
name: "/essentialData/CuisineMessage",
path: "/essentialData/CuisineMessage",
},
{
alwaysShow: true,
component: "GroupMessage",
meta: {
icon: "el-icon-help",
title: "集团信息",
},
name: "/essentialData/GroupMessage",
path: "/essentialData/GroupMessage",
},
name: "/inAndOutBound/index",
path: "/inAndOutBound/index"
{
alwaysShow: true,
component: "MaterialMessage",
meta: {
icon: "el-icon-help",
title: "物料信息",
},
name: "/essentialData/MaterialMessage",
path: "/essentialData/MaterialMessage",
},
{
alwaysShow: true,
component: "ShopMessage",
meta: {
icon: "el-icon-help",
title: "门店信息",
},
name: "/essentialData/ShopMessage",
path: "/essentialData/ShopMessage",
},
],
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-menu",
title: "查询与统计",
},
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/project/index",
// path: "/project/index"
// },
]
}
name: "/inquireStatistics/index",
path: "/inquireStatistics/index",
},
{
alwaysShow: true,
meta: {
icon: "el-icon-menu",
title: "参数设置",
},
name: "/parameterSet",
path: "/parameterSet",
children: [
{
alwaysShow: true,
component: "dataSet",
meta: {
icon: "el-icon-help",
title: "定时采集数据设置",
},
name: "/parameterSet/dataSet",
path: "/parameterSet/dataSet",
},
{
alwaysShow: true,
component: "footSet",
meta: {
icon: "el-icon-help",
title: "食材消耗比设置",
},
name: "/parameterSet/footSet",
path: "/parameterSet/footSet",
},
]
},
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/project/index",
// path: "/project/index"
// },
],
};
},
computed: {
...mapGetters(["sidebar"]),
// routes() {
// f4d2e507-c4ed-451c-b364-04c08f962045
// console.log('78979789', this.$router.options.routes)
// return this.$router.options.routes
// },
activeMenu() {
// const route = this.$route
// const {
// meta,
// path
// } = route
// // if set path, the sidebar will highlight the path you set
// if (meta.activeMenu) {
// return meta.activeMenu
// }
return "/index";
},
computed: {
...mapGetters([
'sidebar'
]),
// routes() {
// f4d2e507-c4ed-451c-b364-04c08f962045
// console.log('78979789', this.$router.options.routes)
// return this.$router.options.routes
// },
activeMenu() {
// const route = this.$route
// const {
// meta,
// path
// } = route
// // if set path, the sidebar will highlight the path you set
// if (meta.activeMenu) {
// return meta.activeMenu
// }
return "/index"
},
showLogo() {
return this.$store.state.settings.sidebarLogo
},
variables() {
return variables
},
isCollapse() {
return !this.sidebar.opened
}
showLogo() {
return this.$store.state.settings.sidebarLogo;
},
created() {
this.postHuoquyonghu()
variables() {
return variables;
},
methods: {
//
postHuoquyonghu() {
// var token = getStorage()
// loginDetails(token).then((response) => {
// console.log('resss', response)
// if (response.code === '200') {
// this.YongHuid = response.data
// this.params.userSid = this.YongHuid.sid
// getrolemenus(this.params).then((res) => {
// const userRoles = this.resRouter(res.data)
this.routes.push({
path: '*',
redirect: '/404',
hidden: true
})
console.log('左侧菜单', this.routes)
return this.routes
// })
// }
// })
},
resRouter(menus) {
//
for (var i = 0; i < menus.length; i++) {
if (menus[i].children && menus[i].children.length != 0) {
this.resRouter(menus[i].children)
}
if (menus[i].children.length == 0) {
delete menus[i].children
delete menus[i].redirect
}
if (menus[i].component == '') {
console.log('55555', menus[i])
menus[i] = {
path: menus[i].path,
component: '',
redirect: menus[i].path,
children: [menus[i]],
}
} else {
// menus[i] = {
// path: menus[i].path,
// component: '',
// redirect: menus[i].path,
// children: [menus[i]],
// }
}
isCollapse() {
return !this.sidebar.opened;
},
},
created() {
this.postHuoquyonghu();
},
methods: {
//
postHuoquyonghu() {
// var token = getStorage()
// loginDetails(token).then((response) => {
// console.log('resss', response)
// if (response.code === '200') {
// this.YongHuid = response.data
// this.params.userSid = this.YongHuid.sid
// getrolemenus(this.params).then((res) => {
// const userRoles = this.resRouter(res.data)
this.routes.push({
path: "*",
redirect: "/404",
hidden: true,
});
console.log("左侧菜单", this.routes);
return this.routes;
// })
// }
// })
},
resRouter(menus) {
//
for (var i = 0; i < menus.length; i++) {
if (menus[i].children && menus[i].children.length != 0) {
this.resRouter(menus[i].children);
}
this.routes = menus
console.log('左侧菜单', this.routes)
return menus
},
if (menus[i].children.length == 0) {
delete menus[i].children;
delete menus[i].redirect;
}
if (menus[i].component == "") {
console.log("55555", menus[i]);
menus[i] = {
path: menus[i].path,
component: "",
redirect: menus[i].path,
children: [menus[i]],
};
} else {
// menus[i] = {
// path: menus[i].path,
// component: '',
// redirect: menus[i].path,
// children: [menus[i]],
// }
}
}
this.routes = menus;
console.log("左侧菜单", this.routes);
return menus;
},
}
},
};
</script>

131
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/router/index.js

@ -46,46 +46,101 @@ export const constantRoutes = [
}
}]
},
{
path: 'oilType',
component: Layout,
redirect: '/oilType',
children: [{
path: '/oilType/index',
component: () => import('@/views/oilType/index.vue'),
name: 'index',
meta: {
title: '原油类型',
noCache: true
}
}]
},{
path: 'oilTank',
component: Layout,
redirect: '/oilTank',
children: [{
path: '/oilTank/index',
component: () => import('@/views/oilTank/index.vue'),
name: 'index',
{
path: '/inquireStatistics',
component: Layout,
redirect: '/inquireStatistics',
children: [{
path: '/inquireStatistics/index',
component: () => import('@/views/inquireStatistics/index.vue'),
name: 'index',
meta: {
title: '查询与统计',
noCache: true
}
}]
}, {
path: '/essentialData',
component: Layout,
redirect: '/essentialData/GroupMessage',
meta: {
title: '油罐类型',
noCache: true
}
}]
},{
path: 'inAndOutBound',
component: Layout,
redirect: '/inAndOutBound',
children: [{
path: '/inAndOutBound/index',
component: () => import('@/views/inAndOutBound/index.vue'),
name: 'index',
title: '基础数据'
},
children: [
{
path: '/essentialData/BrandMessage',
component: () => import('@/views/essentialData/BrandMessage.vue'),
name: 'BrandMessage',
meta: {
title: '品牌信息',
noCache: true
}
},
{
path: '/essentialData/CuisineMessage',
component: () => import('@/views/essentialData/CuisineMessage.vue'),
name: 'CuisineMessage',
meta: {
title: '菜品信息',
noCache: true
}
},
{
path: '/essentialData/GroupMessage',
component: () => import('@/views/essentialData/GroupMessage.vue'),
name: 'GroupMessage',
meta: {
title: '集团信息',
noCache: true
}
},
{
path: '/essentialData/MaterialMessage',
component: () => import('@/views/essentialData/MaterialMessage.vue'),
name: 'MaterialMessage',
meta: {
title: '物料信息',
noCache: true
}
},
{
path: '/essentialData/ShopMessage',
component: () => import('@/views/essentialData/ShopMessage.vue'),
name: 'ShopMessage',
meta: {
title: '门店信息',
noCache: true
}
},
]
}, {
path: '/parameterSet',
component: Layout,
redirect: '/parameterSet/dataSet',
meta: {
title: '出入库记录',
noCache: true
}
}]
},
title: '参数设置'
},
children: [
{
path: '/parameterSet/dataSet',
component: () => import('@/views/parameterSet/dataSet.vue'),
name: 'dataSet',
meta: {
title: '定时采集数据设置',
noCache: true
}
},
{
path: '/parameterSet/footSet',
component: () => import('@/views/parameterSet/footSet.vue'),
name: 'footSet',
meta: {
title: '食材消耗比(成本占比)设置',
noCache: true
}
},
]
},
...codemenu,
{
path: '/404',

15
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/BrandMessage.vue

@ -0,0 +1,15 @@
.<template>
<div>
<h1>品牌信息</h1>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

15
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/CuisineMessage.vue

@ -0,0 +1,15 @@
.<template>
<div>
<h1>菜品信息</h1>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

15
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/GroupMessage.vue

@ -0,0 +1,15 @@
.<template>
<div>
<h1>集团信息</h1>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

15
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/MaterialMessage.vue

@ -0,0 +1,15 @@
.<template>
<div>
<h1>物料信息</h1>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

15
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/ShopMessage.vue

@ -0,0 +1,15 @@
.<template>
<div>
<h1>门店信息</h1>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

322
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/inquireStatistics/index.vue

@ -0,0 +1,322 @@
<template>
<el-tabs class="my-tabs" type="card">
<el-tab-pane label="品牌信息">
<div class="search">
<el-form ref="queryParams" :inline="true" :model="queryParams" class="tab-header">
<span style="font-size: 16px;font-weight: 500">品牌</span>
<el-select
v-model="queryParams.params.brand"
placeholder="请选择品牌"
style="width: 120px;margin-left: 10px;"
@change="blur"
>
<el-option
v-for="(item, i) in tableData"
:key="i"
:label="item.city"
:value="item.city"
/>
</el-select>
<span style="font-size: 16px;font-weight: 500;margin-left: 10px;">门店</span>
<el-select
v-model="queryParams.params.store"
placeholder="请选择门店"
style="width: 120px;margin-left: 10px;"
:disabled="chooseStore"
@change="store"
>
<el-option
v-for="(item, i) in tableData"
:key="i"
:label="item.address"
:value="item.address"
/>
</el-select>
<el-form-item label="到货日期" style="margin-left: 10px;margin-top: 3px;">
<el-date-picker
v-model="queryParams.params.applyStartDate"
type="date"
clearable
value-format="yyyy-MM-dd"
placeholder="选择日期"
/>
<span style="padding: 0 8px"></span>
<el-date-picker
v-model="queryParams.params.applyStartDate1"
type="date"
clearable
value-format="yyyy-MM-dd"
placeholder="选择日期"
/>
</el-form-item>
<el-button
type="primary"
size="small"
icon="el-icon-search"
@click="dosearch"
>查询</el-button
>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetQuery"
>重置</el-button
>
</el-form>
</div>
<div class="container">
<el-table v-loading="tableLoading" :data="tableData" border style="width: 100%">
<el-table-column label="序号" width="55px" type="index" align="center"></el-table-column>
<el-table-column prop="name" label="厂家" width="100px" align="center">
</el-table-column>
<el-table-column prop="city" label="品牌" align="center" width="100px">
</el-table-column>
<el-table-column prop="address" label="门店" align="center" width="150px">
</el-table-column>
<el-table-column prop="date" label="日期" sortable align="center" width="100px">
</el-table-column>
<el-table-column prop="zip" label="销售额" align="center" width="100px">
</el-table-column>
<el-table-column prop="" label="油类成本占比" align="center" width="150px">
</el-table-column>
<el-table-column prop="" label="米类成本占比" align="center" width="150px">
</el-table-column>
<el-table-column prop="" label="面类成本占比" align="center" width="150px">
</el-table-column>
<el-table-column prop="" label="合计成本金额" align="center" width="150px">
</el-table-column>
<el-table-column prop="" label="是否还款" align="center" width="100px"></el-table-column>
<el-table-column fixed="right" width="200px" label="明细信息" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="purchase(scope.row)"
>
采购
</el-button>
<el-button type="primary" size="mini" @click="market(scope.row)">
销售
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<pagination
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
@pagination="loadList"
/>
</div>
<!-- 销售详细信息 -->
<el-dialog
:title="dialogTitle + '详细信息'"
:visible.sync="editDialog"
width="40%"
>
<table class="e-table" cellspacing="0">
<tr>
<td>学生姓名</td>
</tr>
<tr>
<td>学号ID</td>
</tr>
<tr>
<td>性别</td>
</tr>
<tr>
<td>所属班级</td>
</tr>
<tr>
<td>系别</td>
</tr>
<tr>
<td>专业</td>
</tr>
</table>
<div style="margin-top: 20px; text-align: center">
<el-button type="primary" @click="save()">保存</el-button>
</div>
</el-dialog>
</div>
</el-tab-pane>
<!-- 采购详细信息 -->
<el-dialog
:title="dialogTitle + '详细信息'"
:visible.sync="entry"
width="40%"
>
<table class="e-table" cellspacing="0">
<tr>
<td>学号ID</td>
</tr>
<tr>
<td>四级()</td>
</tr>
<tr>
<td>六级()</td>
</tr>
<tr>
<td>计算机()</td>
</tr>
</table>
<div style="margin-top: 20px; text-align: center">
<el-button type="primary">保存</el-button>
</div>
</el-dialog>
</el-tabs>
</template>
<script>
export default {
data() {
return {
dialogTitle: "",
editDialog: false,
entry: false,
tableLoading: false,
chooseStore:true,
form: {},
formBackup: Object.assign({}, this.form),
page: {
total: 0, //
current: 1, //
size: 10, //
params: {
current: 1, //
size: 10,
},
},
tableData: [],
student: {},
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
applyStartDate: "",
applyStartDate1: "",
brand:'',
store:'',
},
},
tableData: [
{
date: "2016-05-02",
name: "中鸿记",
province: "上海",
city: "熟溢香",
address: "熟溢香振头店",
zip: 50893,
},
{
date: "2016-05-04",
name: "中鸿记",
province: "上海",
city: "熟溢香",
address: "熟溢香欢乐街店",
zip: 20033,
},
{
date: "2016-05-01",
name: "中鸿记",
province: "上海",
city: "馍馍卤",
address: "馍馍卤大学城店",
zip: 78955,
},
{
date: "2016-05-03",
name: "中鸿记",
province: "上海",
city: "馍馍卤",
address: "馍馍卤雅清街店",
zip: 35890,
},
{
date: "2016-05-05",
name: "中鸿记",
province: "上海",
city: "馍馍卤",
address: "馍馍卤振岗店",
zip: 15890,
},
],
};
},
mounted() {},
methods: {
resetSearch() {
//
this.page = {
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
psid: "",
sourceId: "",
sourceName: "",
},
};
this.getPageList();
},
getPageList() {},
loadList() {
this.tableLoading = true
},
reset() {
this.form = {};
},
//
blur(){
console.log(this.queryParams.params.brand);
if(this.queryParams.params.brand){
this.chooseStore=false
}
},
store(){
console.log(777777777);
},
purchase(row) {
this.dialogTitle = "采购";
this.entry = true;
},
market(row) {
this.dialogTitle = "销售";
this.editDialog = true;
this.form = Object.assign({}, row);
},
//
dosearch() {
console.log(this.queryParams.params);
},
resetQuery() {
this.chooseStore=true
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
applyStartDate: "",
applyStartDate1: "",
brand:'',
store:'',
},
};
},
},
};
</script>
<style scoped="scoped" lang="scss">
.my-tabs {
margin-top: 10px;
}
</style>

17
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/parameterSet/dataSet.vue

@ -0,0 +1,17 @@
.<template>
<div>
<h3>
定时采集数据设置
</h3>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

17
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/parameterSet/footSet.vue

@ -0,0 +1,17 @@
.<template>
<div>
<h3>
食材消耗比(成本占比)设置
</h3>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
Loading…
Cancel
Save