Browse Source

5.12

master
fengdong777 2 years ago
parent
commit
5718d79c02
  1. 58
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/api/Zhj/essentialData/index.js
  2. 24
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/api/Zhj/inquireStatistics/index.js
  3. 36
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/layout/components/Sidebar/index.vue
  4. 139
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/BrandMessage.vue
  5. 135
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/CuisineMessage.vue
  6. 138
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/GroupMessage.vue
  7. 143
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/MaterialMessage.vue
  8. 141
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/essentialData/ShopMessage.vue
  9. 144
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/inquireStatistics/index.vue

58
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/api/Zhj/essentialData/index.js

@ -0,0 +1,58 @@
import request from '@/utils/request'
// 查询集团信息
export function selectEnpInfo(data) {
return request({
url: '/dbCenter/enpInfo/selectEnpInfo ',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 查询品牌信息
export function selectEnpBrandList(data) {
return request({
url: '/dbCenter/enpBrand/selectEnpBrandList',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 查询门店信息
export function selectEnpStoreList(data) {
return request({
url: '/dbCenter/enpStore/selectEnpStoreList',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 查询菜品信息
export function selectDishesInfoList(data) {
return request({
url: '/dbCenter/dishesInfo/selectDishesInfoList',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 查询物料信息
export function selectMaterialInfoList(data) {
return request({
url: '/dbCenter/materialInfo/selectMaterialInfoList',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}

24
yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/api/Zhj/inquireStatistics/index.js

@ -36,9 +36,9 @@ return request({
}
// 添加 已改
export function savePcCustomerInfo(data) {
export function handCrawl(data) {
return request({
url: '/crm/v1/crmcustomertemp/save',
url: '/dbCenter/crawlAmount/handCrawl',
data: data,
method: 'post',
headers: {
@ -46,23 +46,3 @@ export function savePcCustomerInfo(data) {
}
})
}
// -- 修改 已改
export function updatePcCustomerInfo(data) {
return request({
url: '/crm/v1/crmcustomertemp/update/' + data.sid,
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 详情、编辑回显 已改
export function getPcCustomerInfoBySid(data) {
return request({
url: '/crm/v1/crmcustomertemp/fetchSid/' + data,
method: 'get'
})
}

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

@ -52,6 +52,16 @@ export default {
name: "/essentialData",
path: "/essentialData",
children: [
{
alwaysShow: true,
component: "GroupMessage",
meta: {
icon: "el-icon-help",
title: "集团信息",
},
name: "/essentialData/GroupMessage",
path: "/essentialData/GroupMessage",
},
{
alwaysShow: true,
component: "BrandMessage",
@ -64,23 +74,23 @@ export default {
},
{
alwaysShow: true,
component: "CuisineMessage",
component: "ShopMessage",
meta: {
icon: "el-icon-help",
title: "菜单信息",
title: "门店信息",
},
name: "/essentialData/CuisineMessage",
path: "/essentialData/CuisineMessage",
name: "/essentialData/ShopMessage",
path: "/essentialData/ShopMessage",
},
{
alwaysShow: true,
component: "GroupMessage",
component: "CuisineMessage",
meta: {
icon: "el-icon-help",
title: "集团信息",
title: "菜品信息",
},
name: "/essentialData/GroupMessage",
path: "/essentialData/GroupMessage",
name: "/essentialData/CuisineMessage",
path: "/essentialData/CuisineMessage",
},
{
alwaysShow: true,
@ -92,16 +102,6 @@ export default {
name: "/essentialData/MaterialMessage",
path: "/essentialData/MaterialMessage",
},
{
alwaysShow: true,
component: "ShopMessage",
meta: {
icon: "el-icon-help",
title: "门店信息",
},
name: "/essentialData/ShopMessage",
path: "/essentialData/ShopMessage",
},
],
},
{

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

@ -1,15 +1,138 @@
.<template>
<div>
<h1>品牌信息</h1>
<template>
<div class="app-container">
<div class="search">
<el-form :inline="true" class="tab-header">
<span style="font-size: 16px; font-weight: 500">品牌:</span>
<el-input
v-model="page.params.name"
style="width: 150px; margin-left: 10px"
/>
<el-button
type="primary"
size="small"
style="margin-left: 10px"
icon="el-icon-search"
@click="dosearch"
>查询</el-button
>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetSearch"
>重置</el-button
>
</el-form>
</div>
<div class="listconadd" style="padding: 20px">
<el-table
v-loading="tableLoading"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
label="序号"
width="55px"
:index="indexMethod"
type="index"
align="center"
></el-table-column>
<el-table-column prop="enpName" label="集团名称" align="center">
</el-table-column>
<el-table-column prop="name" label="品牌名称" align="center">
</el-table-column>
<el-table-column
prop="enpCode"
label="企业编码"
align="center"
>
</el-table-column>
</el-table>
<div class="pages">
<div class="tit" />
<pagination
:total="page.total"
:page.sync="page.current"
:limit.sync="page.size"
@pagination="getPageList"
/>
</div>
</div>
</div>
</template>
<script>
<script>
import { selectEnpBrandList } from "@/api/Zhj/essentialData/index.js";
import Pagination from '@/components/pagination'
export default {
}
components: {
Pagination
},
data() {
return {
tableLoading: false,
form: {},
page: {
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
},
tableData: [],
};
},
mounted() {},
created() {
this.getPageList();
},
methods: {
getPageList() {
this.tableLoading = true;
selectEnpBrandList(this.page)
.then((res) => {
this.tableLoading = false;
if (res.data.pages!=0) {
this.page.total = res.data.total;
this.tableData = res.data.records;
} else {
this.$message({
type: "warning",
message: "该集团暂无该品牌",
});
}
})
.catch(() => {
this.tableLoading = false;
});
},
//
dosearch() {
this.getPageList();
},
indexMethod(index) {
var pagestart = (this.page.current - 1) * this.page.size;
var pageindex = index + 1 + pagestart;
return pageindex;
},
resetSearch() {
this.page ={
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
}
this.getPageList();
}
},
};
</script>
<style>
<style scoped="scoped" >
</style>

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

@ -1,15 +1,134 @@
.<template>
<div>
<h1>菜品信息</h1>
<template>
<div class="app-container">
<div class="search">
<el-form :inline="true" class="tab-header">
<span style="font-size: 16px; font-weight: 500">菜品:</span>
<el-input
v-model="page.params.name"
style="width: 150px; margin-left: 10px"
/>
<el-button
type="primary"
size="small"
style="margin-left: 10px"
icon="el-icon-search"
@click="dosearch"
>查询</el-button
>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetSearch"
>重置</el-button
>
</el-form>
</div>
<div class="listconadd" style="padding: 20px">
<el-table
v-loading="tableLoading"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
label="序号"
width="55px"
:index="indexMethod"
type="index"
align="center"
></el-table-column>
<el-table-column prop="name" label="菜品名称" align="center">
</el-table-column>
<el-table-column prop="unit" label="规格单位(个)" align="center">
</el-table-column>
<el-table-column prop="sellingPrice" label="销售单价" align="center">
</el-table-column>
</el-table>
<div class="pages">
<div class="tit" />
<pagination
:total="page.total"
:page.sync="page.current"
:limit.sync="page.size"
@pagination="getPageList"
/>
</div>
</div>
</div>
</template>
<script>
<script>
import { selectDishesInfoList } from "@/api/Zhj/essentialData/index.js";
import Pagination from '@/components/pagination'
export default {
}
components: {
Pagination
},
data() {
return {
tableLoading: false,
form: {},
page: {
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
},
tableData: [],
};
},
mounted() {},
created() {
this.getPageList();
},
methods: {
getPageList() {
this.tableLoading = true;
selectDishesInfoList(this.page)
.then((res) => {
this.tableLoading = false;
if (res.data.pages!=0) {
this.page.total = res.data.total;
this.tableData = res.data.records;
} else {
this.$message({
type: "warning",
message: "暂无该菜品",
});
}
})
.catch(() => {
this.tableLoading = false;
});
},
//
dosearch() {
this.getPageList();
},
indexMethod(index) {
var pagestart = (this.page.current - 1) * this.page.size;
var pageindex = index + 1 + pagestart;
return pageindex;
},
resetSearch() {
this.page ={
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
}
this.getPageList();
}
},
};
</script>
<style>
<style scoped="scoped" >
</style>

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

@ -1,15 +1,137 @@
.<template>
<div>
<h1>集团信息</h1>
<template>
<div class="app-container">
<div class="search">
<el-form :inline="true" class="tab-header">
<span style="font-size: 16px; font-weight: 500">集团:</span>
<el-input
v-model="page.params.name"
style="width: 150px; margin-left: 10px"
/>
<el-button
type="primary"
size="small"
style="margin-left: 10px"
icon="el-icon-search"
@click="dosearch"
>查询</el-button
>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetSearch"
>重置</el-button
>
</el-form>
</div>
<div class="listconadd" style="padding: 20px">
<el-table
v-loading="tableLoading"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
label="序号"
width="55px"
:index="indexMethod"
type="index"
align="center"
></el-table-column>
<el-table-column prop="name" label="集团名称" align="center">
</el-table-column>
<el-table-column
prop="code"
label="企业编码"
align="center"
>
</el-table-column>
</el-table>
<div class="pages">
<div class="tit" />
<pagination
:total="page.total"
:page.sync="page.current"
:limit.sync="page.size"
@pagination="getPageList"
/>
</div>
</div>
</div>
</template>
<script>
<script>
import { selectEnpInfo } from "@/api/Zhj/essentialData/index.js";
import Pagination from '@/components/pagination'
export default {
}
components: {
Pagination
},
data() {
return {
tableLoading: false,
form: {},
page: {
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
},
tableData: [],
};
},
mounted() {},
created() {
this.getPageList();
},
methods: {
getPageList() {
this.tableLoading = true;
selectEnpInfo(this.page)
.then((res) => {
this.tableLoading = false;
if (res.data.pages!=0) {
this.page.total = res.data.total;
this.tableData = res.data.records;
} else {
this.$message({
type: "warning",
message: "暂无该集团",
});
}
})
.catch(() => {
this.tableLoading = false;
});
},
//
dosearch() {
this.getPageList();
},
indexMethod(index) {
var pagestart = (this.page.current - 1) * this.page.size;
var pageindex = index + 1 + pagestart;
return pageindex;
},
resetSearch() {
this.page ={
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
}
this.getPageList();
}
},
};
</script>
<style>
<style scoped="scoped" >
</style>

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

@ -1,15 +1,140 @@
.<template>
<div>
<h1>物料信息</h1>
<template>
<div class="app-container">
<div class="search">
<el-form :inline="true" class="tab-header">
<span style="font-size: 16px; font-weight: 500">物料:</span>
<el-input
v-model="page.params.name"
style="width: 150px; margin-left: 10px"
/>
<el-button
type="primary"
size="small"
style="margin-left: 10px"
icon="el-icon-search"
@click="dosearch"
>查询</el-button
>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetSearch"
>重置</el-button
>
</el-form>
</div>
</template>
<div class="listconadd" style="padding: 20px">
<el-table
v-loading="tableLoading"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
label="序号"
width="55px"
:index="indexMethod"
type="index"
align="center"
></el-table-column>
<el-table-column prop="code" label="物料编码" align="center">
</el-table-column>
<el-table-column prop="name" label="物料名称" align="center">
</el-table-column>
<el-table-column prop="unit" label="规格单位" align="center">
</el-table-column>
<el-table-column
prop="taxPrice"
label="含税单价"
align="center"
>
</el-table-column>
</el-table>
<script>
export default {
<div class="pages">
<div class="tit" />
<pagination
:total="page.total"
:page.sync="page.current"
:limit.sync="page.size"
@pagination="getPageList"
/>
</div>
</div>
</div>
</template>
<script>
import { selectMaterialInfoList } from "@/api/Zhj/essentialData/index.js";
import Pagination from '@/components/pagination'
export default {
components: {
Pagination
},
data() {
return {
tableLoading: false,
form: {},
page: {
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
},
tableData: [],
};
},
mounted() {},
created() {
this.getPageList();
},
methods: {
getPageList() {
this.tableLoading = true;
selectMaterialInfoList(this.page)
.then((res) => {
this.tableLoading = false;
if (res.data.pages!=0) {
this.page.total = res.data.total;
this.tableData = res.data.records;
} else {
this.$message({
type: "warning",
message: "暂无该物料",
});
}
})
.catch(() => {
this.tableLoading = false;
});
},
//
dosearch() {
this.getPageList();
},
indexMethod(index) {
var pagestart = (this.page.current - 1) * this.page.size;
var pageindex = index + 1 + pagestart;
return pageindex;
},
resetSearch() {
this.page ={
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
}
this.getPageList();
}
</script>
},
};
</script>
<style>
<style scoped="scoped" >
</style>
</style>

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

@ -1,15 +1,140 @@
.<template>
<div>
<h1>门店信息</h1>
<template>
<div class="app-container">
<div class="search">
<el-form :inline="true" class="tab-header">
<span style="font-size: 16px; font-weight: 500">门店:</span>
<el-input
v-model="page.params.name"
style="width: 150px; margin-left: 10px"
/>
<el-button
type="primary"
size="small"
style="margin-left: 10px"
icon="el-icon-search"
@click="dosearch"
>查询</el-button
>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetSearch"
>重置</el-button
>
</el-form>
</div>
<div class="listconadd" style="padding: 20px">
<el-table
v-loading="tableLoading"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
label="序号"
width="55px"
:index="indexMethod"
type="index"
align="center"
></el-table-column>
<el-table-column prop="enpName" label="集团名称" align="center">
</el-table-column>
<el-table-column prop="brandName" label="品牌名称" align="center">
</el-table-column>
<el-table-column prop="name" label="门店名称" align="center">
</el-table-column>
<el-table-column
prop="enpCode"
label="企业编码"
align="center"
>
</el-table-column>
</el-table>
<div class="pages">
<div class="tit" />
<pagination
:total="page.total"
:page.sync="page.current"
:limit.sync="page.size"
@pagination="getPageList"
/>
</div>
</div>
</div>
</template>
<script>
<script>
import { selectEnpStoreList } from "@/api/Zhj/essentialData/index.js";
import Pagination from '@/components/pagination'
export default {
}
components: {
Pagination
},
data() {
return {
tableLoading: false,
form: {},
page: {
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
},
tableData: [],
};
},
mounted() {},
created() {
this.getPageList();
},
methods: {
getPageList() {
this.tableLoading = true;
selectEnpStoreList(this.page)
.then((res) => {
this.tableLoading = false;
if (res.data.pages!=0) {
this.page.total = res.data.total;
this.tableData = res.data.records;
} else {
this.$message({
type: "warning",
message: "暂无该门店",
});
}
})
.catch(() => {
this.tableLoading = false;
});
},
//
dosearch() {
this.getPageList();
},
indexMethod(index) {
var pagestart = (this.page.current - 1) * this.page.size;
var pageindex = index + 1 + pagestart;
return pageindex;
},
resetSearch() {
this.page ={
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
},
}
this.getPageList();
}
},
};
</script>
<style>
<style scoped="scoped" >
</style>

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

@ -56,14 +56,22 @@
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetQuery"
@click="resetSearch"
>重置</el-button
>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
style="margin-left: 108px;"
@click="captruedatas()"
>手动抓取</el-button
>
</el-form>
</div>
<div class="listconadd" style="padding: 20px;">
<el-table v-loading="tableLoading" :default-sort = "{prop: 'date', order: 'descending'}" :data="tableData" border style="width: 100%" >
<el-table-column label="序号" width="55px" type="index" align="center"></el-table-column>
<el-table-column label="序号" width="55px" :index="indexMethod" type="index" align="center"></el-table-column>
<el-table-column prop="enpName" label="厂家" width="100px" align="center">
</el-table-column>
<el-table-column prop="name" label="品牌" align="center" width="100px">
@ -105,7 +113,7 @@
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
@pagination="pagination"
@pagination="getPageList"
/>
</div>
<!-- 销售详细信息 -->
@ -184,12 +192,43 @@
></el-table-column>
</el-table>
</el-dialog>
<!-- 手动抓取数据 -->
<el-dialog
:title="dialogTitle + '数据'"
:visible.sync="captrue"
width="40%">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="活动时间" required>
<el-col :span="11">
<el-form-item>
<el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="选择日期" v-model="ruleForm.time" style="width: 100%;"></el-date-picker>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="活动性质" prop="type">
<el-checkbox-group v-model="ruleForm.type">
<el-checkbox label="美食/餐厅线上活动" name="salesAmount"></el-checkbox>
<el-checkbox label="地推活动" name="purchase"></el-checkbox>
<el-checkbox label="线下主题活动" name="salesDishes"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
<el-button @click="resetForm('ruleForm')">重置</el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
import {listPage,selectPurchaseList,selectSalesDishes} from '@/api/Zhj/inquireStatistics/index.js'
import {listPage,selectPurchaseList,selectSalesDishes,handCrawl} from '@/api/Zhj/inquireStatistics/index.js'
import Pagination from '@/components/pagination'
export default {
components: {
Pagination
},
data() {
return {
rollPx:1,
@ -198,24 +237,24 @@ export default {
editDialog: false,
entry: false,
tableLoading: false,
captrue:false,
form: {},
rolltimmer:'',
formBackup: Object.assign({}, this.form),
page: {
total: 0, //
current: 1, //
size: 10, //
params: {
current: 1, //
size: 10,
},
},
apparatusListName:{},
ListName:{},
tableData: [],
tableCaigou:[],
tableXiaoshou:[],
student: {},
captrueData:{},
ruleForm:{
time:'',
type:{
salesAmount:'',purchase:'',
salesDishes:''
}
},
queryParams: {
current: 1,
size: 10,
@ -227,44 +266,63 @@ export default {
endTime: "",
},
},
rules: {
type: [
{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
],
}
};
},
mounted() {
this.getPageList(this.queryParams);
},
methods: {
pagination(val) {
//
this.page.current = val.pageNum;
this.page.size = val.pageSize;
this.getPageList(this.queryParams);
created() {
this.getPageList()
},
methods: {
resetSearch() {
//
this.page = {
this.queryParams = {
total: 0, //
current: 1, //
size: 10, //
params: {
StoreName: "",
name:'',
brandName:'',
fromTime: "",
endTime: "",
},
};
this.getPageList(this.queryParams);
this.getPageList();
},
to2(row,col,val){
return parseFloat(val).toFixed(2)
},
getPageList(data) {
getPageList() {
this.tableLoading = true
const _this=this
listPage(data).then((res) => {
listPage(this.queryParams).then((res) => {
this.tableLoading = false
if (res.success) {
this.queryParams.total = res.data.total
_this.tableData=res.data.records
this.apparatusListName = this.uniqueName(_this.tableData)
this.ListName = this.uniqueName1(_this.tableData)
} else {
// resp.code
_this.tableData = []
this.queryParams.total = 0
}
}).catch(() => {
this.tableLoading = false
})
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
uniqueName(arr) {
const res = new Map();
return arr.filter((arr) => !res.has(arr.storeName) && res.set(arr.storeName, 1));
@ -273,9 +331,6 @@ export default {
const res = new Map();
return arr.filter((arr) => !res.has(arr.name) && res.set(arr.name, 1));
},
loadList() {
this.tableLoading = true
},
reset() {
this.form = {};
},
@ -304,22 +359,7 @@ export default {
},
//
dosearch() {
this.getPageList(this.queryParams);
},
resetQuery() {
this.chooseStore=true
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
applyStartDate: "",
applyStartDate1: "",
brand:'',
store:'',
},
};
this.getPageList(this.queryParams);
this.getPageList();
},
autoRoll(stop){
if(stop){
@ -343,6 +383,22 @@ export default {
mouseLeave(){
this.autoRoll();
},
//
captruedatas(){
this.dialogTitle = "抓取";
this.captrue=true
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
handCrawl(this.ruleForm).then((res)=>{
console.log(this.ruleForm);
console.log(res);
})
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
}
},
};
</script>

Loading…
Cancel
Save