Browse Source

5.11

master
fengdong777 2 years ago
parent
commit
1104ede90e
  1. 34
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/api/Zhj/inquireStatistics/index.js
  2. 2
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/layout/components/Sidebar/index.vue
  3. 215
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-ui/src/views/inquireStatistics/index.vue

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

@ -1,7 +1,6 @@
import request from '@/utils/request' import request from '@/utils/request'
// 接口文档名称:潜在客户信息 // 查询
// Pc端客户基础信息条件分页查询数据的列表
export function listPage(data) { export function listPage(data) {
return request({ return request({
url: '/dbCenter/crawlAmount/listPage', url: '/dbCenter/crawlAmount/listPage',
@ -13,16 +12,27 @@ export function listPage(data) {
}) })
} }
// 客户查询 // 查询采购数据
export function listPageByOrgPathSid(data) { export function selectPurchaseList(data) {
return request({ return request({
url: '/crm/v1/crmcustomertemp/listPageByOrgPathSid', url: '/dbCenter/crawlPurchase/selectPurchaseList',
method: 'post', method: 'post',
data: data, data: data,
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
}) })
}
// 查询销售数据
export function selectSalesDishes(data) {
return request({
url: '/dbCenter/crawlDishes/selectSalesDishes',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
} }
// 添加 已改 // 添加 已改

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

@ -3,7 +3,7 @@
<logo v-if="showLogo" :collapse="isCollapse" /> <logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu <el-menu
:default-active="activeMenu" :default-active="$route.path"
:background-color="variables.menuBg" :background-color="variables.menuBg"
:text-color="variables.menuText" :text-color="variables.menuText"
:unique-opened="false" :unique-opened="false"

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

@ -1,17 +1,15 @@
<template> <template>
<el-tabs class="my-tabs" type="card"> <div class="app-container">
<el-tab-pane label="品牌信息">
<div class="search"> <div class="search">
<el-form ref="queryParams" :inline="true" :model="queryParams" class="tab-header"> <el-form ref="queryParams" :inline="true" :model="queryParams" class="tab-header">
<span style="font-size: 16px;font-weight: 500">品牌</span> <span style="font-size: 16px;font-weight: 500">品牌</span>
<el-select <el-select
v-model="queryParams.params.name" v-model="queryParams.params.brandName"
placeholder="请选择品牌" placeholder="请选择品牌"
style="width: 120px;margin-left: 10px;" style="width: 120px;margin-left: 10px;"
@change="blur"
> >
<el-option <el-option
v-for="(item, i) in tableData" v-for="(item, i) in ListName"
:key="i" :key="i"
:label="item.name" :label="item.name"
:value="item.name" :value="item.name"
@ -22,11 +20,9 @@
v-model="queryParams.params.storeName" v-model="queryParams.params.storeName"
placeholder="请选择门店" placeholder="请选择门店"
style="width: 120px;margin-left: 10px;" style="width: 120px;margin-left: 10px;"
:disabled="chooseStore"
@change="store"
> >
<el-option <el-option
v-for="(item, i) in tableData" v-for="(item, i) in apparatusListName"
:key="i" :key="i"
:label="item.storeName" :label="item.storeName"
:value="item.storeName" :value="item.storeName"
@ -66,7 +62,7 @@
</el-form> </el-form>
</div> </div>
<div class="container"> <div class="container">
<el-table v-loading="tableLoading" :data="tableData" border style="width: 100%"> <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" type="index" align="center"></el-table-column>
<el-table-column prop="enpName" label="厂家" width="100px" align="center"> <el-table-column prop="enpName" label="厂家" width="100px" align="center">
</el-table-column> </el-table-column>
@ -78,13 +74,13 @@
</el-table-column> </el-table-column>
<el-table-column prop="salesAmount" label="销售额" align="center" width="100px"> <el-table-column prop="salesAmount" label="销售额" align="center" width="100px">
</el-table-column> </el-table-column>
<el-table-column prop="oils" label="油类成本占比" align="center" width="150px"> <el-table-column prop="oils" label="油类成本占比" align="center" width="150px" :formatter="to2">
</el-table-column> </el-table-column>
<el-table-column prop="rice" label="米类成本占比" align="center" width="150px"> <el-table-column prop="rice" label="米类成本占比" align="center" width="150px" :formatter="to2">
</el-table-column> </el-table-column>
<el-table-column prop="face" label="面类成本占比" align="center" width="150px"> <el-table-column prop="face" label="面类成本占比" align="center" width="150px" :formatter="to2">
</el-table-column> </el-table-column>
<el-table-column prop="totalCount" label="合计成本金额" align="center" width="150px"> <el-table-column prop="totalCount" label="合计成本金额" align="center" width="150px" :formatter="to2">
</el-table-column> </el-table-column>
<el-table-column fixed="right" width="200px" label="明细信息" align="center"> <el-table-column fixed="right" width="200px" label="明细信息" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -109,79 +105,101 @@
:total="queryParams.total" :total="queryParams.total"
:page.sync="queryParams.current" :page.sync="queryParams.current"
:limit.sync="queryParams.size" :limit.sync="queryParams.size"
@pagination="loadList" @pagination="pagination"
/> />
</div> </div>
<!-- 销售详细信息 --> <!-- 销售详细信息 -->
<el-dialog <el-dialog
:title="dialogTitle + '详细信息'" :title="dialogTitle + '详细信息'"
:visible.sync="editDialog" :visible.sync="editDialog"
width="40%" width="70%"
> >
<table class="e-table" cellspacing="0"> <el-table ref="datalist" @mouseover.native="mouseEnter()" @mouseout.native="mouseLeave()" :data="tableXiaoshou" height="420" border style="width: 100%">
<tr> <el-table-column
<td>学生姓名</td> property="dataDate"
</tr> label="数据日期"
<tr> ></el-table-column>
<td>学号ID</td> <el-table-column
</tr> property="storeName"
<tr> label="门店名称"
<td>性别</td> ></el-table-column>
</tr> <el-table-column
<tr> property="dishesName"
<td>所属班级</td> label="菜品名称"
</tr> ></el-table-column>
<tr> <el-table-column
<td>系别</td> property="salesCount"
</tr> label="数量"
<tr> ></el-table-column>
<td>专业</td> <el-table-column
</tr> property="unit"
</table> label="规格单位"
<div style="margin-top: 20px; text-align: center"> ></el-table-column>
<el-button type="primary" @click="save()">保存</el-button> <el-table-column
</div> property="salesPrice"
label="单价(元)"
></el-table-column>
</el-table>
</el-dialog> </el-dialog>
</div> </div>
</el-tab-pane>
<!-- 采购详细信息 --> <!-- 采购详细信息 -->
<el-dialog <el-dialog
:title="dialogTitle + '详细信息'" :title="dialogTitle + '详细信息'"
:visible.sync="entry" :visible.sync="entry"
width="40%" width="70%"
> >
<table class="e-table" cellspacing="0"> <el-table ref="datalist" @mouseover.native="mouseEnter()" @mouseout.native="mouseLeave()" :data="tableCaigou" height="420" border style="width: 100%">
<tr> <el-table-column
<td>学号ID</td> property="dataDate"
</tr> label="数据日期"
<tr> ></el-table-column>
<td>四级()</td> <el-table-column
</tr> property="storeName"
<tr> label="门店名称"
<td>六级()</td> ></el-table-column>
</tr> <el-table-column
<tr> property="purchaseDate"
<td>计算机()</td> label="采购日期"
</tr> ></el-table-column>
</table> <el-table-column
<div style="margin-top: 20px; text-align: center"> property="materialName"
<el-button type="primary">保存</el-button> label="物料名称"
</div> ></el-table-column>
<!-- <el-table-column
property="unit"
label="规格单位"
></el-table-column> -->
<el-table-column
property="purchaseCount"
label="采购数量"
></el-table-column>
<el-table-column
property="purchaseAmount"
label="采购金额(元)"
></el-table-column>
<el-table-column
property="taxPrice"
label="含税单位"
></el-table-column>
</el-table>
</el-dialog> </el-dialog>
</el-tabs> </div>
</template> </template>
<script> <script>
import {listPage} from '@/api/Zhj/inquireStatistics/index.js' import {listPage,selectPurchaseList,selectSalesDishes} from '@/api/Zhj/inquireStatistics/index.js'
export default { export default {
data() { data() {
return { return {
rollPx:1,
rolltime:50,
dialogTitle: "", dialogTitle: "",
editDialog: false, editDialog: false,
entry: false, entry: false,
tableLoading: false, tableLoading: false,
chooseStore:true,
form: {}, form: {},
rolltimmer:'',
formBackup: Object.assign({}, this.form), formBackup: Object.assign({}, this.form),
page: { page: {
total: 0, // total: 0, //
@ -192,7 +210,11 @@ export default {
size: 10, size: 10,
}, },
}, },
apparatusListName:{},
ListName:{},
tableData: [], tableData: [],
tableCaigou:[],
tableXiaoshou:[],
student: {}, student: {},
queryParams: { queryParams: {
current: 1, current: 1,
@ -232,11 +254,25 @@ export default {
}; };
this.getPageList(this.queryParams); this.getPageList(this.queryParams);
}, },
to2(row,col,val){
return parseFloat(val).toFixed(2)
},
getPageList(data) { getPageList(data) {
const _this=this
listPage(data).then((res) => { listPage(data).then((res) => {
this.tableData=res.data.records _this.tableData=res.data.records
this.apparatusListName = this.uniqueName(_this.tableData)
this.ListName = this.uniqueName1(_this.tableData)
}) })
}, },
uniqueName(arr) {
const res = new Map();
return arr.filter((arr) => !res.has(arr.storeName) && res.set(arr.storeName, 1));
},
uniqueName1(arr) {
const res = new Map();
return arr.filter((arr) => !res.has(arr.name) && res.set(arr.name, 1));
},
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
}, },
@ -244,29 +280,33 @@ export default {
this.form = {}; this.form = {};
}, },
// //
blur(){ // blur(){
if(this.queryParams.params.name){ // if(this.queryParams.params.name){
this.chooseStore=false // this.chooseStore=false
} // }
}, // },
store(){ // store(){
console.log(777777777); // console.log(777777777);
}, // },
purchase(row) { purchase(row) {
this.dialogTitle = "采购"; this.dialogTitle = "采购";
this.entry = true; this.entry = true;
selectPurchaseList(row).then((res)=>{
this.tableCaigou=res.data
})
}, },
market(row) { market(row) {
this.dialogTitle = "销售"; this.dialogTitle = "销售";
this.editDialog = true; this.editDialog = true;
this.form = Object.assign({}, row); selectSalesDishes(row).then((res)=>{
this.tableXiaoshou=res.data
})
}, },
// //
dosearch() { dosearch() {
this.getPageList(this.queryParams); this.getPageList(this.queryParams);
}, },
resetQuery() { resetQuery() {
this.getPageList(this.queryParams);
this.chooseStore=true this.chooseStore=true
this.queryParams = { this.queryParams = {
current: 1, current: 1,
@ -279,14 +319,45 @@ export default {
store:'', store:'',
}, },
}; };
this.getPageList(this.queryParams);
}, },
autoRoll(stop){
if(stop){
clearInterval(this.rolltimmer);
return;
}
const table=this.$refs.datalist;
const divData=table.bodyWrapper;
this.rolltimmer=setInterval(()=>{
divData.scrollTop+=this.rollPx;
if(divData.clientHeight+divData.scrollTop>=divData.scrollHeight){
divData.scrollTop=0;
}
},this.rolltime);
},
//
mouseEnter(time){
this.autoRoll(true);
},
//
mouseLeave(){
this.autoRoll();
},
}, },
}; };
</script> </script>
<style scoped="scoped" lang="scss"> <style scoped="scoped" >
/deep/ .el-dialog__title{
color: #000;
font-size: 24px;
}
.my-tabs { .my-tabs {
margin-top: 10px; margin-top: 10px;
} }
.container{
padding: 10px;
}
</style> </style>
Loading…
Cancel
Save