From 7f2dd9faa89eef563937b1fdf19cc00f060da6be Mon Sep 17 00:00:00 2001
From: cclu <1106109051@qq.com>
Date: Wed, 16 Aug 2023 10:46:05 +0800
Subject: [PATCH] =?UTF-8?q?=E9=9D=99=E6=80=81=E5=AE=8C=E6=88=90=E7=89=88?=
=?UTF-8?q?=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/utils.js | 1 +
pages.json | 14 +
pages/examine/index.vue | 3 +-
pages/index/index.vue | 6 +-
pages/newamine/index.vue | 524 +++++++++++++++++---
pages/revenue/expenditureDetail.vue | 454 +++++++++++++++++
pages/revenue/incomeDetail.vue | 456 +++++++++++++++++
pages/revenue/index.vue | 141 +++++-
static/images/newExamine/OK.svg | 13 +
static/images/newExamine/error.svg | 13 +
static/images/revenueBox/allInCome.png | Bin 0 -> 33056 bytes
static/images/revenueBox/buySum.svg | 46 ++
static/images/revenueBox/expenditure.png | Bin 0 -> 31637 bytes
static/images/revenueBox/fistBg.svg | 9 +
static/images/revenueBox/monthSum.png | Bin 0 -> 65058 bytes
static/images/revenueBox/moreIcon.svg | 13 +
static/images/revenueBox/operateManager.svg | 46 ++
static/images/revenueBox/operateSum.svg | 44 ++
static/images/revenueBox/otherBg.svg | 9 +
static/images/revenueBox/otherBuy.svg | 49 ++
static/images/revenueBox/otherSum.svg | 49 ++
static/images/revenueBox/secondBg.svg | 9 +
static/images/revenueBox/selfOperat.svg | 42 ++
static/images/revenueBox/thirdBg.svg | 9 +
static/images/revenueBox/yearRevenue.png | Bin 0 -> 69938 bytes
static/images/revenueBox/yearSum.png | Bin 0 -> 73556 bytes
26 files changed, 1838 insertions(+), 112 deletions(-)
create mode 100644 pages/revenue/expenditureDetail.vue
create mode 100644 pages/revenue/incomeDetail.vue
create mode 100644 static/images/newExamine/OK.svg
create mode 100644 static/images/newExamine/error.svg
create mode 100644 static/images/revenueBox/allInCome.png
create mode 100644 static/images/revenueBox/buySum.svg
create mode 100644 static/images/revenueBox/expenditure.png
create mode 100644 static/images/revenueBox/fistBg.svg
create mode 100644 static/images/revenueBox/monthSum.png
create mode 100644 static/images/revenueBox/moreIcon.svg
create mode 100644 static/images/revenueBox/operateManager.svg
create mode 100644 static/images/revenueBox/operateSum.svg
create mode 100644 static/images/revenueBox/otherBg.svg
create mode 100644 static/images/revenueBox/otherBuy.svg
create mode 100644 static/images/revenueBox/otherSum.svg
create mode 100644 static/images/revenueBox/secondBg.svg
create mode 100644 static/images/revenueBox/selfOperat.svg
create mode 100644 static/images/revenueBox/thirdBg.svg
create mode 100644 static/images/revenueBox/yearRevenue.png
create mode 100644 static/images/revenueBox/yearSum.png
diff --git a/common/utils.js b/common/utils.js
index d653766..1061be3 100644
--- a/common/utils.js
+++ b/common/utils.js
@@ -253,6 +253,7 @@ async function getFieldEnumByField(params) {
}
+
// 得到这个月有多少天
function getThisMonthDay(value){
let date = new Date(value)
diff --git a/pages.json b/pages.json
index d09bdbb..1323756 100644
--- a/pages.json
+++ b/pages.json
@@ -91,6 +91,20 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "incomeDetail",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "expenditureDetail",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
+ }
}
]
},
diff --git a/pages/examine/index.vue b/pages/examine/index.vue
index a8338f0..b144a0d 100644
--- a/pages/examine/index.vue
+++ b/pages/examine/index.vue
@@ -709,6 +709,7 @@ export default {
})
const realDate = new Date(this.lastDay)
let realMonth = realDate.getMonth() + 1
+ let realDay = realDate.getDate()
const date = time ? new Date(time) :new Date(this.searchTime)
let y = date.getFullYear()
@@ -733,7 +734,7 @@ export default {
m = '0' + m
}
startTime=`${y}-${m}-01`
- endTime=`${y}-${m}-${d}`
+ endTime=`${y}-${m}-${realDay}`
}
const res = await request.$webGet(`CommercialApi/Examine/WeChat_GetExamineList`,{
diff --git a/pages/index/index.vue b/pages/index/index.vue
index c3dcf89..26425f5 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -16,8 +16,8 @@
{{ single }}
-
-
+
+
@@ -1464,7 +1464,6 @@ export default {
}
})
this.examineObj = obj
-
})
},
// 获得日常巡检数据
@@ -4195,6 +4194,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
background: #EBEEEE;
border-radius: 10rpx;
position: relative;
+ overflow: hidden;
.progress{
position: absolute;
top: 0;left: 0;
diff --git a/pages/newamine/index.vue b/pages/newamine/index.vue
index 6dcb958..7072cdb 100644
--- a/pages/newamine/index.vue
+++ b/pages/newamine/index.vue
@@ -9,12 +9,22 @@
-
+
- 2023/08/09
+
+
+ {{ singleDay }}
+
+
+
+
+
+ {{ single }}
+
+
-
+
@@ -38,7 +48,7 @@
- 92
+ {{examineObj.A || '0'}}
优秀/个
@@ -46,7 +56,7 @@
- 92
+ {{examineObj.B || '0'}}
良好/个
@@ -54,7 +64,7 @@
- 92
+ {{examineObj.C || '0'}}
一般/个
@@ -68,11 +78,11 @@
- 17
+ {{dailyExamineObj.RectifyCount||'0'}}
整改中/个
- 6
+ {{dailyExamineObj.UnRectifyCount||'0' }}
未整改/个
@@ -80,7 +90,7 @@
- 92.81%
+ {{dailyExamineObj.CompleteRate?dailyExamineObj.CompleteRate + '%' :'-' }}
达标率/全省
@@ -95,9 +105,9 @@
服务区排名
-
+
排序
-
+
@@ -110,6 +120,7 @@
+ {{index + 1}}
{{item.SERVERPART_NAME}}
{{item.EXAMINE_MQUARTER!=='0'?item.EXAMINE_MQUARTER==='1'?'一'+'季度':item.EXAMINE_MQUARTER==='2'?'二'+'季度':item.EXAMINE_MQUARTER==='3'?'三'+'季度':'四' + '季度':'月度'}}
@@ -136,7 +147,7 @@
服务区排名
-
+
排序
@@ -148,9 +159,10 @@
-
+
+ {{index+1}}
黄山服务区
@@ -183,40 +195,71 @@
{{item.SERVERPART_NAME.split('服务区')[0]}}
-
+
-
+
{{item.REGION_NAME}}
分
+
+
+
+ 前厅
+
+
+
+
+
+ {{item.EXAMINE_PERSON}}
+
+
+
+ {{item.EXAMINE_OPERATEDATE}}
+
-
-
-
- {{subItem.EXAMINE_PERSON}}
-
-
-
- {{subItem.EXAMINE_OPERATEDATE}}
-
-
-
-
-
- 便利店
+
+
+
+
+
+
+ 便利店
+
+
+ -2分
+
-
- -2分
+ 便利店标签内容与信息不符, 酒类商品无温馨提示;
+
+
- 便利店标签内容与信息不符, 酒类商品无温馨提示;
-
-
-
+
+
+
+
+ 前
+
+ 这是整改前的问题描述,这是整改前的问题描述, 这是整改前的问题描述; 这是整改前的问题描述;
+
+
+
+
+
+ 后
+ 2023/05/11 14:21:03
+
+ 这是整改前的问题描述,这是整改前的问题描述, 这是整改前的问题描述; 这是整改前的问题描述;
+
+
+
+
+
+
-
+
@@ -261,6 +304,7 @@ import request from '@/util/index.js'
import uniPopup from '@/components/uni-popup'
import Store from "../../store/store";
import YearCharts from "./component/yearCharts.vue";
+import {timestampToTimeMonth} from "../../util/dateTime";
export default {
components:{
YearCharts,
@@ -310,14 +354,26 @@ export default {
rate:0,
currentObj:{},// 考核弹出框的内容
selectMenu:0,// 选中左侧菜单的第几个
+ single:'', // 开始时间的月份
+ singleDay:'',// 开始时间的日期
+ startDate:'',
+ startDateDay:'',
+ endData:'',
+ dailyExamineObj:{},//考核数据
+ examineObj:{},
+ useInfo:{},
+ sortType:'sequence',// reverse倒序 sequence正序
}
},
onLoad(query){
console.log('query',query)
+ // 判断从哪里点击进去的 首页 还是用户页面
this.come = query.come
+ // 首页跳转时带上的 判断是默认选中考核 还是巡检
if (query.type){
this.selectTab = Number(query.type)
}
+ // 首页的时间
if (query.time){
this.queryTime = query.time
}
@@ -329,23 +385,29 @@ export default {
// 先拿到首页的时间 作为调用接口的统一时间 存的lastDay存当前月份的具体日期切换回本月的日期判断有用
this.searchTime = new Date()
this.lastDay = uni.getStorageSync('lastDay')
- // 拿到当前时间
- const date = new Date()
- let month = date.getMonth() + 1
- // 滚动的月份列表
- let list = []
- this.monthList.forEach((item)=>{
- if (item.value<=month){
- list.push(item)
- }
- })
- this.monthList = list
- // 日历数组
- // this.dateList = this.$util.getThisMonthDateList(date)
- console.log('this.dateList',this.dateList)
+ // 顶部时间显示的月份的
+ this.single = timestampToTimeMonth((new Date(this.lastDay).getTime()))
+ // 顶部时间显示到日期的
+ this.singleDay = this.lastDay
+ // 顶部时间的开始时间
+ const start = new Date(this.lastDay)
+ this.startDate = `${start.getFullYear()}-01`
+ this.startDateDay = `${start.getFullYear()}-01-01`
+ // 时间选择器的结束时间
+ this.endData = new Date()
+ // 拿到用户的信息
+ let userInfo = uni.getStorageSync('vuex')
+ userInfo = JSON.parse(userInfo)
+ this.useInfo = JSON.parse(JSON.stringify(userInfo))
+ // 该页面全部接口接上之后可以删除
setTimeout(()=>{
this.rate = 92.81
},100)
+
+ // 拿到顶部的考核数据详情
+ this.handleGetDailyPatrol()
+ // 获取月度考核数据
+ this.handleGetExamine()
},
onReady(){
// 只有在页面已经渲染好了 才能把选中的日期 移到可视区域里面
@@ -353,16 +415,26 @@ export default {
_this.getThisMonth()
},
methods:{
+ handleSort(){
+ if (this.sortType==='sequence'){
+ this.sortType = 'reverse'
+ this.serviceList = this.serviceList.reverse()
+ }else{
+ this.sortType = 'sequence'
+ this.serviceList = this.serviceList.reverse()
+ }
+ },
handleDetail(item,index){
this.selectMenu = index
console.log(item)
this.handleGetExamineDetail(item.list[0],true)
},
- handleOpenDetail(item){
- console.log('item',item)
+ handleOpenPopup(){
+ this.showPop = true
},
// 拿到当前月份 用于页面一开始自动滚动到相对应的月份
getThisMonth(){
+ // 判断是否有传入的时间 如果有就以传入的时间为准 反之以当前时间为准
const date = this.queryTime ? new Date(this.queryTime): new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
@@ -462,10 +534,171 @@ export default {
this.showPop = true
}
},
+ // 拿到考核和巡检上面的详情
+ handleGetDailyPatrol(){
+ console.log('this.lastDay',this.lastDay)
+ console.log('this.selectMonth',this.selectMonth)
+ const date = new Date(this.lastDay)
+ let obj ={
+ start:'',
+ end:''
+ }
+ if (this.selectMonth === date.getMonth()+1){
+ const date = new Date(this.singleDay)
+ let y = date.getFullYear()
+ let m = date.getMonth() + 1
+ if(m<10){
+ m='0'+m
+ }
+ obj.start = `${y}-${m}-01`
+ }else{
+ const date = new Date(this.singleDay)
+ let y = date.getFullYear()
+ let m = date.getMonth() + 1
+ if(m<10){
+ m='0'+m
+ }
+ obj.start = `${y}-${m}-01`
+ let d = this.$util.getThisMonthDay(this.singleDay)
+ if (d<10){
+ d = '0'+ d
+ }
+ obj.end = `${y}-${m}-${d}`
+ }
+ const req = {
+ StartDate:obj.start,
+ EndDate:obj && obj.end?obj.end:this.singleDay,
+ provinceCode:this.useInfo.userData.ProvinceCode || '340000'
+ }
+ request.$webGet('CommercialApi/Examine/GetPatrolAnalysis',req).then(res=>{
+ this.dailyExamineObj = res.Result_Data
+ console.log('this.dailyExamineObj',this.dailyExamineObj)
+ })
+ },
+ // 获取月度考核数据
+ handleGetExamine(){
+ let date = this.$util.cutDate(this.single, 'YYYYMM')
+ const req = {
+ DataType:1,
+ StartMonth: date,
+ EndMonth: date,
+ provinceCode:this.useInfo.userData.ProvinceCode || '340000'
+ }
+
+ request.$webGet('CommercialApi/Examine/GetExamineAnalysis',req).then(res=>{
+ let obj={
+ A:0,
+ B:0,
+ C:0
+ }
+ res.Result_Data.List.forEach(item=>{
+ if(item.data==="A"){
+ obj.A+=Number(item.value)
+ }else if(item.data==="B"){
+ obj.B+=Number(item.value)
+ }else if(item.data==="C"){
+ obj.C+=Number(item.value)
+ }
+ })
+ this.examineObj = obj
+ })
+ },
+ bindDateChange(e){
+ console.log('e',e)
+ const date = new Date(e.detail.value)
+ this.selectMonth = date.getMonth() + 1
+ if (this.selectTab===1){
+ this.single = e.detail.value
+ this.handleGetExamine()
+ }else if(this.selectTab===2){
+ this.singleDay = e.detail.value
+ this.handleGetDailyPatrol()
+ }
+ },
handleChangeChild(subItem){
console.log('subItem',subItem)
subItem.showChild = !subItem.showChild
},
+ // 增加日期
+ handleAddDate(type){
+ const nowDate = new Date(this.lastDay)
+ let nowMonth = nowDate.getMonth() + 1
+ let nowDay = nowDate.getDate()
+ // 1 是减 2是加
+ if (type===1){
+ if (this.selectTab===1){
+ const date = new Date(this.single)
+ let y = date.getFullYear()
+ let m = date.getMonth() + 1
+ m = m -1
+ if (m!==0){
+ if (m<10){
+ m = '0'+m
+ }
+ this.single = `${y}-${m}`
+ }
+ }else if(this.selectTab===2){
+ const date = new Date(this.singleDay)
+ let y = date.getFullYear()
+ let m = date.getMonth() + 1
+ if (m<10){
+ m = '0'+m
+ }
+ let d = date.getDate() - 1
+ if (d<=0){
+ let month = Number(m) - 1
+ if (month!==0){
+ if (month<10){
+ month = '0'+month
+ }
+ d = this.$util.getThisMonthDay(`${y}-${month}`)
+ this.singleDay = `${y}-${month}-${d}`
+ }
+ }else{
+ if (d<10){
+ d = '0' + d
+ }
+ this.singleDay = `${y}-${m}-${d}`
+ }
+ }
+ }else{
+ if (this.selectTab===1){
+ const date = new Date(this.single)
+ let y = date.getFullYear()
+ let m = date.getMonth() + 1
+ m = m + 1
+ if (m>nowMonth){
+ return
+ }
+ if (m<10){
+ m = '0'+m
+ }
+ this.single = `${y}-${m}`
+ }else if(this.selectTab===2){
+ const date = new Date(this.singleDay)
+ let y = date.getFullYear()
+ let m = date.getMonth() + 1
+
+ let d = date.getDate() + 1
+ if (nowMonth===m && d>nowDay){
+ return
+ }else{
+ if (nowMonth>m){
+ let allDay = this.$util.getThisMonthDay(`${y}-${m<10?'0'+m:m}`)
+ if (allDay
+
+
+
+
+
+
+ 服务区自营小计
+
+
+
+
+ 39.67%
+
+
+
+
+ 119.01
+ 2022年完成/万元
+
+
+ 32.54%
+ 成本比
+
+
+
+
+ 119.01
+ 2022年完成/万元
+
+
+ 32.54%
+ 成本比
+
+
+
+
+
+
+
+
+
+ {{index + 1}}
+ 餐饮小吃
+
+
+
+ 46.47
+ 2022年完成/万元
+
+
+ 100.00
+ 2023年预计/万元
+
+
+ 46.47%
+ 完成率
+
+
+
+
+
+
+
+
+ 分公司收入小计
+
+
+
+
+ 39.67%
+
+
+
+
+ 119.01
+ 2022年完成/万元
+
+
+ 32.54%
+ 成本比
+
+
+
+
+ 119.01
+ 2022年完成/万元
+
+
+ 32.54%
+ 成本比
+
+
+
+
+
+
+
+
+
+ {{index + 1}}
+ 餐饮小吃
+
+
+
+ 46.47
+ 2022年完成/万元
+
+
+ 100.00
+ 2023年预计/万元
+
+
+ 46.47%
+ 完成率
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/revenue/incomeDetail.vue b/pages/revenue/incomeDetail.vue
new file mode 100644
index 0000000..754e945
--- /dev/null
+++ b/pages/revenue/incomeDetail.vue
@@ -0,0 +1,456 @@
+
+
+
+
+
+
+
+ 服务区自营小计
+
+
+
+
+ 39.67%
+
+
+
+
+ 119.01
+ 2022年完成/万元
+
+
+ 32.54%
+ 成本比
+
+
+
+
+ 119.01
+ 2022年完成/万元
+
+
+ 32.54%
+ 成本比
+
+
+
+
+
+
+
+
+
+ {{index+1}}
+ 餐饮小吃
+
+
+
+ 46.47
+ 2022年完成/万元
+
+
+ 100.00
+ 2023年预计/万元
+
+
+ 46.47%
+ 完成率
+
+
+
+
+
+
+
+
+ 分公司收入小计
+
+
+
+
+ 39.67%
+
+
+
+
+ 119.01
+ 2022年完成/万元
+
+
+ 32.54%
+ 成本比
+
+
+
+
+ 119.01
+ 2022年完成/万元
+
+
+ 32.54%
+ 成本比
+
+
+
+
+
+
+
+
+
+ {{index + 1}}
+ 餐饮小吃
+
+
+
+ 46.47
+ 2022年完成/万元
+
+
+ 100.00
+ 2023年预计/万元
+
+
+ 46.47%
+ 完成率
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/revenue/index.vue b/pages/revenue/index.vue
index 9a779b9..52d5e07 100644
--- a/pages/revenue/index.vue
+++ b/pages/revenue/index.vue
@@ -9,6 +9,8 @@