Merge remote-tracking branch 'origin/main'

This commit is contained in:
DESKTOP-369JRHT\12997 2024-10-16 09:39:11 +08:00
commit dc8d178882

View File

@ -142,7 +142,7 @@
<div class="left-box-t">
<div class="d-s" style="margin-bottom: 10px">
<div class="h-tt" style="margin-right: 15px">油品交易分析</div>
<el-dropdown placement="bottom-start" @command="editColor">
<el-dropdown placement="bottom-start" @command="editShow">
<div class="h-anniu" :class="{'q-anniu' : showTimeShow == false}" @click="showTimeShow = false ">{{ypjyTitle}} <i
class="el-icon-arrow-down el-icon--right"></i></div>
<el-dropdown-menu slot="dropdown">
@ -216,7 +216,7 @@
<div class="bottom_">
<div class="d-s">
<div class="h-tt" style="margin-right: 15px">数据统计</div>
<el-dropdown placement="bottom-start" @command="editColor">
<el-dropdown placement="bottom-start" @command="editCount">
<div class="h-anniu" :class="{'q-anniu' : countTimeShow == false}" @click="countTimeShow = false ">{{sjtjTitle}} <i
class="el-icon-arrow-down el-icon--right"></i></div>
<el-dropdown-menu slot="dropdown">
@ -368,15 +368,35 @@ export default {
sjkbStoreAmount(e){
console.log(e)
this.sjkbTitle = e
let command = e
if (command=='今日'){
let start = new Date();
start.setHours(0)
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
this.showValue = [start,new Date()]
} else if (command=='近一周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='本月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='本年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (command=='自定义'){
this.disabled = false
}
this.getStoreAmount()
},
goList() {
this.$router.push('/notificationList/index')
},
editColor(command,index){
// console.log("command",command)
// console.log("index",index.$attrs.index)
index = index.$attrs.index
// this.timeIndex = command
editShow(command){
this.disabled = true
if (command=='今日'){
let start = new Date();
@ -384,62 +404,75 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
if (index == "1"){
this.countValue = [start,new Date()]
}else if (index == "2") {
this.showValue = [start,new Date()]
}else if (index == "3") {
this.value2 = [start,new Date()]
}else if (index == "4") {
this.value1 = [start,new Date()];
}
} else if (command=='近一周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
if (index == "1"){
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "2") {
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "3") {
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "4") {
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}
} else if (command=='近一月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
if (index == "1"){
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "2") {
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "3") {
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "4") {
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}
} else if (command=='近一年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
if (index == "1"){
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "2") {
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "3") {
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (index == "4") {
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}
}else if (command=='自定义'){
this.disabled = false
}
if (index == "1") {
this.getDataCount()
}else if (index == "2") {
this.getDataShow()
}else if (index == "3") {
this.getStoreList()
},
editCount(command){
this.disabled = true
if (command=='今日'){
let start = new Date();
start.setHours(0)
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
this.showValue = [start,new Date()]
} else if (command=='近一周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='近一月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='近一年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (command=='自定义'){
this.disabled = false
}
this.getDataCount()
},
editColor(command){
this.disabled = true
if (command=='今日'){
let start = new Date();
start.setHours(0)
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
this.value2 = [start,new Date()]
} else if (command=='近一周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='近一月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
} else if (command=='近一年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (command=='自定义'){
this.disabled = false
}
this.getStoreList()
},
//
getEmployeList() {