-
-
{{thisMonth}}月业态充盈度
-
-
-
-
- {{ single }}
-
-
-
-
-
-
-
-
+
+
+
@@ -70,398 +99,227 @@ import ConsumptionLevel from "./components/format/consumLevel.vue";
import BandNumber from "./components/format/bandNumber.vue";
import NoData from "./components/noData.vue";
import commercialType from "./commercialType.vue";
+import { tableList, wrapTreeNode } from '@/util/dateTime/index'
export default {
name: "businessPortrait",
components: {NoData, BandNumber, ConsumptionLevel, BandLevel, FillingDegree, analyse, headerTop,commercialType},
data() {
return {
- topBg:'linear-gradient(180deg, #C6C1F0 0%, #CECBF3 100%);',//顶部组件的悬浮背景色
- labelList:['女性','高消费','喜爱奶茶','浙江','20-30岁','江苏'],//标签
- title:'业态品牌',//页面标题
- bgColor: '180deg, #459FFF 0%, #473AFF 100%',
- bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/formatPortraitBg.svg',//背景图片路径
- page:'/pages/commercialBI/formatPortrait',
- time: '',//跳转携带的时间
- menu: {},//手机配置信息
- fillDegreeList:[],//业态充盈度
- bandLevelList:[],//品牌消费水平
- consumLevelList:[],//业态消费水平
- brandLabelList:[],//品牌指数标签列表
- brandLabelListNoChange:[],//把第一次进来请求到的标签列表存起来
- brandInfoList:[],//品牌指数列表
- brandInfoListNoChange:[],//把第一次请求到的全部品牌指数列表存起来
- serviceInfo:{}, //当前服务区信息
- backType:'',//返回的页面类型
- analyseInfo:{
- analysisins_type: 1501 // 传给headTop组件的
- },
- selectKey:'',//有数据的话
- str:'',
- isClick:true,//图表是否能点击
- single:'',//显示时间
- thisMonth:'',//几月
- endData:'', // 结束时间
+ topBg:'linear-gradient(180deg, #C6C1F0 0%, #CECBF3 100%);',//顶部组件的悬浮背景色
+ labelList:['女性','高消费','喜爱奶茶','浙江','20-30岁','江苏'],//标签
+ title:'业态品牌',//页面标题
+ bgColor: '180deg, #459FFF 0%, #473AFF 100%',
+ bgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/formatPortraitBg.svg',//背景图片路径
+ page:'/pages/commercialBI/formatPortrait',
+ time: '',//跳转携带的时间
+ menu: {},//手机配置信息
+ fillDegreeList:[],//业态充盈度
+ bandLevelList:[],//品牌消费水平
+ consumLevelList:[],//业态消费水平
+ brandLabelList:[],//品牌指数标签列表
+ brandLabelListNoChange:[],//把第一次进来请求到的标签列表存起来
+ brandInfoList:[],//品牌指数列表
+ brandInfoListNoChange:[],//把第一次请求到的全部品牌指数列表存起来
+ serviceInfo:{}, //当前服务区信息
+ backType:'',//返回的页面类型
+ analyseInfo:{
+ analysisins_type: 1501 // 传给headTop组件的
+ },
+ selectKey:'',//有数据的话
+ str:'',
+ isClick:true,//图表是否能点击
+ single:'',//显示时间
+ thisMonth:'',//几月
+ endData:'', // 结束时间
+
+ tabList:[{label:'餐饮主食',img:'https://eshangtech.com/ShopICO/ahyd-BID/brand/food.svg',value:1},
+ {label:'休闲小吃',img:'https://eshangtech.com/ShopICO/ahyd-BID/brand/snack.svg',value:2},
+ {label:'生活零售',img:'https://eshangtech.com/ShopICO/ahyd-BID/brand/lifeRetail.svg',value:3},
+ {label:'汽车服务',img:'https://eshangtech.com/ShopICO/ahyd-BID/brand/carService.svg',value:4},
+ {label:'司乘体验',img:'https://eshangtech.com/ShopICO/ahyd-BID/brand/drivingExperience.svg',value:5}],
+ selectTab:1,
+ navList:[{label:'全部',value:''},{label:'中餐馆',value:''},{label:'中式快餐',value:''},{label:'西式快餐',value:''},{label:'西式快餐',value:''},{label:'西式快餐',value:''},{label:'西式快餐',value:''},{label:'西式快餐',value:''}],
+ showFilterBox:false,// 是否显示分类的悬浮框
+ treeList: [],// 树列表完整内容 有子级
+ selectNav:0,// 选中的type
+ filterTop:'',// 点击的纵坐标
+ tableList:[],// 列表数据
+ brandType:[],// 品牌类型的枚举列表
+ searchText:'',// 顶部搜索框的内容
+ scrollTop:0,// 滚动条位置
+ oldScrollTop:0,// 滚动条位置记录的
+ currentNav:'',// 当前选中的nav的id
+ status:{},// 设备信息
}
},
onLoad(option) {
- let serviceInfo = JSON.parse(option.serviceInfo)
- this.backType = option.type
- this.serviceInfo = serviceInfo
- //跳转的时候带上时间
- this.time = option.time
- this.endData = new Date()
+ this.handleGetTreeList()
+ //枚举
+ this.handleBrandType()
},
onShow(){
- let storeTime = uni.getStorageSync('lastDay')
- if (storeTime){
- this.time = storeTime
- }
- this.single = this.$util.getThisMonthHave(this.time)
- const date = new Date(this.single)
- let m = date.getMonth() + 1
- if (m<10){
- m = '0' + m
- }
- this.thisMonth = m
- let storeServiceInfo = uni.getStorageSync('currentService')
- if (storeServiceInfo){
- this.serviceInfo = storeServiceInfo
- }
- // 获取手机参数对页面进行适配
- let systemInfo = uni.getSystemInfoSync()
- // 把获取到的手机参数保存
- uni.setStorageSync('phoneInfo', systemInfo)
- this.statusBarHeight = Number(systemInfo.statusBarHeight)
- this.menu = uni.getMenuButtonBoundingClientRect()
- if (!storeServiceInfo){
- this.nearestService()
- }
- //业态充盈度
- this.getFillDegreeList()
- // //品牌消费水平
- // this.getBandLevelList()
- // //业态消费水平
- // this.getConsumLevelList()
- //品牌指数列表
- this.getBrandInfoList()
+ let systemInfo = uni.getSystemInfoSync()
+ this.status = systemInfo
+ this.menu = uni.getMenuButtonBoundingClientRect()
+ console.log('systemInfo',systemInfo)
},
onUnload() {
this.$util.addUserBehavior()
},
methods:{
- bindDateChange(e){
- const date = new Date(e.detail.value)
- const nowDate = new Date()
- let nowMonth = nowDate.getMonth() + 1
- let m = date.getMonth() + 1
-
- this.single = e.detail.value
- let d
- if (nowMonth === m){
- let nowYear = nowDate.getFullYear()
- let nowMonth = nowDate.getMonth() +1
- if (nowMonth<10){
- nowMonth = '0'+ nowMonth
- }
- let nowDay = nowDate.getDate() - 1
- if (nowDay<10){
- nowDay = '0'+ nowDay
- }
- this.time = `${nowYear}-${nowMonth}-${nowDay}`
- d = nowDay
- }else{
- d = this.$util.getThisMonthDay(e.detail.value)
- this.time = e.detail.value + '-' + d
- }
- if (m<10){
- m = '0' + m
- }
- this.thisMonth = m
- this.endTime = e.detail.value + '-' + d
- this.onRefresh()
- console.log('this.time',this.time)
- },
- onRefresh(){
- //业态充盈度
- this.getFillDegreeList()
- //品牌指数列表
- this.getBrandInfoList()
- },
- async changeLabel(item){
- console.log('item',item)
- let list = this.brandLabelList
- list.forEach(selectItem=>{
- selectItem[5] = false
+ // 拿到树状列表
+ async handleGetTreeList(){
+ const data = await request.$webGet('EShangApiMain/BaseInfo/GetBusinessTradeTree',{})
+ const treeTable = wrapTreeNode(data.Result_Data.List);
+ this.treeList = treeTable
+ console.log('treeTable',treeTable)
+ const list = tableList({...data.Result_Data, List: treeTable})
+ this.tabList.forEach((item,index)=>{
+ item.label = list.data[index].AUTOSTATISTICS_NAME
+ item.value = list.data[index].AUTOSTATISTICS_ID
})
- list.forEach(selectItem=>{
- if (item[3] === selectItem[3]){
- selectItem[5] = true
- }else{
- selectItem[5] = false
+ // 默认选中
+ this.selectTab = list.data[0].AUTOSTATISTICS_ID
+ this.handleChangeTab(list.data[0].AUTOSTATISTICS_ID)
+ },
+ handleScroll(e){
+ this.oldScrollTop = e.detail.scrollTop
+ },
+ //点击跳转服务区
+ handleGoSelectService(){
+ uni.navigateTo({
+ url:`/pages/map/index?page=${this.page}&chartType=${true}&serviceInfo=${JSON.stringify(this.serviceInfo)}`
+ })
+ },
+ //返回上一级s
+ handleBack(){
+ if (this.backType==='userCenter'){
+ uni.switchTab({
+ url: '/pages/userCenter/userCenter'
+ })
+ }else{
+ uni.switchTab({
+ url: '/pages/index/index'
+ })
+ }
+ },
+ // 拿到枚举列表
+ async handleBrandType(){
+ const req ={
+ FieldExplainField: 'BRAND_TYPE',
+ sessionName: 'BRAND_TYPE'
+ }
+ const data = await request.$webGet('EShangApiMain/FrameWork/GetFieldEnumTree',req)
+ const list = wrapTreeNode(data.Result_Data.List)
+ console.log('枚举',list)
+ this.brandType = list
+ },
+ handleChangeTab(value){
+ this.selectTab = value
+ this.scrollTop = this.oldScrollTop
+ this.$nextTick(() =>{
+ this.scrollTop = 0
+ });
+ let list = []
+ this.treeList.forEach(item=>{
+ if (item.AUTOSTATISTICS_ID===value){
+ list = item.children
}
})
- this.brandLabelList = list
- let req = {
- ProvinceCode:'340000',
- Serverpart_ID:this.serviceInfo.Serverpart_ID,
- Statistics_Date:this.time,
- BusinessTradeIds:item[3],
- }
- let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
- this.brandInfoList =totalData.Result_Data.ShopBrandList
- this.$forceUpdate()
- // 如果要多选 就下面注释的这段
- // let str = ''
- // list.forEach(selectItem=>{
- // if (item[3] === selectItem[3]){
- // if (selectItem[4]){
- // selectItem[4] = false
- // }else{
- // selectItem[4] = true
- // }
- // }
- // })
- // this.brandLabelList = list
- // let req
- // let str1 = ''
- // let str2 = ''
- // // if(item[2] === '1000'){
- // this.brandLabelList.forEach(selectItem=>{
- // if (selectItem[2] === '1000'){
- // if (selectItem[4]){
- // if (str1 === ''){
- // str1 = selectItem[3]
- // }else{
- // str1+=',' + selectItem[3]
- // }
- // }
- // }else if(selectItem[2] === '2000'){
- // if (selectItem[4]){
- // if (str2 === ''){
- // str2 = selectItem[3]
- // }else{
- // str2+=',' + selectItem[3]
- // }
- // }
- // }
- // })
- // // }else if(item[2] === '2000'){
- // // this.brandLabelList.forEach(selectItem=>{
- // // if (selectItem[2] === '2000'){
- // // if (selectItem[4]){
- // // if (str2 === ''){
- // // str2 = selectItem[3]
- // // }else{
- // // str2+=',' + selectItem[3]
- // // }
- // // }
- // // }
- // // })
- // // }
- // if (str1 && !str2){
- // req = {
- // ProvinceCode:'340000',
- // Serverpart_ID:this.serviceInfo.Serverpart_ID,
- // Statistics_Date:this.time,
- // BusinessTradeIds:str1,
- // }
- // }else if(!str1 && str2){
- // req = {
- // ProvinceCode:'340000',
- // Serverpart_ID:this.serviceInfo.Serverpart_ID,
- // Statistics_Date:this.time,
- // BrandType:str2,
- // }
- // }else if(str1 && str2){
- // req = {
- // ProvinceCode:'340000',
- // Serverpart_ID:this.serviceInfo.Serverpart_ID,
- // Statistics_Date:this.time,
- // BusinessTradeIds:str1,
- // BrandType:str2,
- // }
- // }
+ let navList = []
+ let count = 0
+ list.forEach(item=>{
+ count+=item.STATISTICS_TYPE
+ navList.push({label:item.AUTOSTATISTICS_NAME,value:item.AUTOSTATISTICS_ID,count:item.STATISTICS_TYPE})
+ })
+ navList.unshift({label:'全部',value: value,count: count})
+ this.navList = navList
+ this.selectNav = this.navList[0].value
+ this.currentNav = 'item' + this.navList[0].value
+ this.handleGetList(this.navList[0].value)
},
- // 业态充盈的改变事件
- async handleChangeBandLevel(key){
- uni.showLoading({
- title: '加载中...'
- })
- let req
- if (key===false){
- req = {
- ProvinceCode:'340000',
- Serverpart_ID:this.serviceInfo.Serverpart_ID,
- Statistics_Date:this.time
- }
- this.selectKey = ''
- }else{
- req = {
- ProvinceCode:'340000',
- Serverpart_ID:this.serviceInfo.Serverpart_ID,
- Statistics_Date:this.time,
- BusinessTradeIds:key
- }
- this.selectKey = key
- }
- let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
- if (totalData.Result_Data){
- this.brandLabelList = totalData.Result_Data.BrandTag
- this.brandInfoList =totalData.Result_Data.ShopBrandList
- uni.hideLoading()
- }
-
- },
- async nearestService(){
- let seat = uni.getStorageSync('seatInfo');
- let req = {
- longitude:seat.longitude,
- Province_Code:'340000',
- latitude:seat.latitude,
- }
- const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
- let res = {
- SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
- SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
- Serverpart_ID:data.Result_Data.List[0].SERVERPART_ID,
- longitude:data.Result_Data.List[0].SERVERPART_X,
- latitude:data.Result_Data.List[0].SERVERPART_Y,
- }
- uni.setStorageSync('currentService',res)
- },
- async getFillDegreeList(){
- const req = {
- ProvinceCode:'340000',
- StatisticsDate:this.time,
- serverpartId:this.serviceInfo.Serverpart_ID,
- BusinessTradeIds:-1
- }
- const data = await request.$webGet('CommercialApi/Revenue/GetBusinessTradeRevenue',req)
- let res = []
- let all = 0
- data.Result_Data.BusinessTradeRank.forEach((item,index)=>{
- if (index<=10){
- res.push({name:`${item.name} ${item.value}%`,value:Number(item.value),key:item.key})
- all+=Number(item.value)
- }else if(index===11){
- res.push({name:`其他${(100-all).toFixed(2)}%`,value:Number((100 - all).toFixed(2)),key:item.key})
- }
- })
- let result= {
- series: [
- {
- data:res
- }
- ]
- };
- let obj = {
- result:result,
- Abundant:data.Result_Data.Abundant//是否盈足
- }
- // let res = {
- // series: [
- // {
- // data: [{"name":"商超","value":27.6},
- // {"name":"水果饮品","value":20.7},
- // {"name":"餐饮","value":15.5},
- // {"name":"小吃","value":11.9},
- // {"name":"地方特产","value":8.4},
- // {"name":"连锁品牌","value":7.2},
- // {"name":"粽子","value":5.6},
- // {"name":"箱包工艺","value":3.1}]
- // }
- // ]
- // }
- this.fillDegreeList = obj
- },
- async getBandLevelList(){
-
- let req = {
- ProvinceCode:'340000',
- StatisticsDate:this.time,
- ServerpartId:this.serviceInfo.Serverpart_ID,
- ShowWholeBrand:false
- }
- let res =[]
- let totalData = await request.$webGet('CommercialApi/Revenue/GetBusinessBrandLevel',req)
- totalData.Result_Data.legend.forEach(item=>{
- res.push({name:item,small:0,normal:0,big:0})
- })
- res.forEach((item,index)=>{
- totalData.Result_Data.ColumnList.forEach((subItem,subIndex)=>{
- if (subItem.name==='低消费'){
- item.small = subItem.data[index]
- }else if(subItem.name==='普通消费'){
- item.normal = subItem.data[index]
- }else if(subItem.name==='高消费'){
- item.big = subItem.data[index]
- }
- })
- })
- // let res=[{name:'五芳斋',big:'14.8',normal:'41.7',small:'43.5'},
- // {name:'驿佰购',big:'44.1',normal:'31.7',small:'24.2'},
- // {name:'老娘舅',big:'15.2',normal:'70.1',small:'14.5'},
- // {name:'吉祥馄饨',big:'25.2',normal:'39.9',small:'34.7'}]
- this.bandLevelList = res
- },
- async getConsumLevelList(){
-
- let req = {
- ProvinceCode:'340000',
- StatisticsDate:this.time,
- ServerpartId:this.serviceInfo.Serverpart_ID,
- ShowWholeTrade:false
- }
- let res = {
- categories:[],
- series:[]
- }
- let totalData = await request.$webGet('CommercialApi/Revenue/GetBusinessTradeLevel',req)
- res.categories = totalData.Result_Data.legend
- totalData.Result_Data.ColumnList.forEach(item=>{
- res.series.push({name:item.name,data:item.data})
- })
- // let res = {
- // categories:["商超","餐饮","水果饮品","小吃","连锁品牌"],
- // series: [
- // {
- // name: "低消费",
- // textColor: "#FFFFFF",
- // data: [18,27,21,24,6]
- // },
- // {
- // name: "普通消费",
- // textColor: "#FFFFFF",
- // data: [18,27,21,24,6]
- // },
- // {
- // name: "高消费",
- // textColor: "#FFFFFF",
- // data: [64,46,58,52,88]
- // },
- // ]
- // }
- this.consumLevelList = res
- },
- async getBrandInfoList(){
- let req = {
- ProvinceCode:'340000',
- Serverpart_ID:this.serviceInfo.Serverpart_ID,
- Statistics_Date:this.time
- }
- let totalData = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
- this.brandLabelList = totalData.Result_Data.BrandTag
- this.brandLabelListNoChange = totalData.Result_Data.BrandTag
- this.brandInfoList =totalData.Result_Data.ShopBrandList
- this.brandInfoListNoChange = totalData.Result_Data.ShopBrandList
- console.log('this.brandInfoList',this.brandInfoList)
-
- // let res = [{icon:'',name:'老娘舅',company:'老娘舅餐饮股份有限公司',type:0,time:'2019.03-2022.03',label:["中式快餐","30-40岁男性"],info:[9,8,8]},
- // {icon:'',name:'老乡鸡',company:'老乡鸡餐饮股份有限公司',type:1,time:'2019.03-2022.03',label:["中式快餐","30-40岁男性"],info:[9,9,9]},
- // {icon:'',name:'永和大王',company:'永和大王餐饮股份有限公司',type:2,time:'2019.03-2022.03',label:["中式快餐","30-40岁男性"],info:[8,8,8]}]
-
+ // 跳转详情
+ handleToDetail(obj){
+ uni.navigateTo({
+ url: `/pages/commercialBI/formatDetail?detail=${JSON.stringify(obj)}`
+ })
+ },
+ // 显示分类的悬浮框
+ handleShowFilter(e){
+ console.log('e',e)
+ this.filterTop = e.detail.y + 15
+ this.showFilterBox = true
+ },
+ // 点击蒙层关闭悬浮框
+ handleClose(){
+ this.showFilterBox = false
+ },
+ // 切换选中的类型
+ handleChangeNavSelect(value){
+ console.log('value',value)
+ this.selectNav = value
+ this.scrollTop = this.oldScrollTop
+ this.$nextTick(() =>{
+ this.scrollTop = 0
+ });
+ this.currentNav = 'item' + value
+ this.handleGetList(value)
+ },
+ // 拿到类型的品牌列表
+ async handleGetList(id){
+ uni.showLoading({
+ title: '正在加载...'
+ })
+ const req = {
+ SearchParameter:{
+ BRAND_INDUSTRY: id,
+ BRAND_STATE:1
+ },
+ PageIndex: 1,
+ PageSize: 999999,
}
+ const data = await request.$webPost('EShangApiMain/BaseInfo/GetBrandList',req)
+ console.log('datalist',data)
+ // BRAND_TYPE
+ data.Result_Data.List.forEach(item=>{
+ this.brandType.forEach(subItem=>{
+ if (item.BRAND_TYPE === subItem.value){
+ item.BRAND_TYPENAME = subItem.label
+ }
+ })
+ })
+ this.tableList = data.Result_Data.List
+ uni.hideLoading()
+ },
+ // 搜索框的值
+ async onSearch(){
+ uni.showLoading({
+ title: '正在加载...'
+ })
+ const req = {
+ keyWord: {
+ Key: 'BRAND_NAME',
+ value: this.searchText,
+ },
+ SearchParameter:{
+ BRAND_STATE:1,
+ },
+ PageIndex: 1,
+ PageSize: 999999,
+ }
+ const data = await request.$webPost('EShangApiMain/BaseInfo/GetBrandList',req)
+ console.log('data',data)
+ data.Result_Data.List.forEach(item=>{
+ this.brandType.forEach(subItem=>{
+ if (item.BRAND_TYPE === subItem.value){
+ item.BRAND_TYPENAME = subItem.label
+ }
+ })
+ })
+ this.tableList = data.Result_Data.List
+ uni.hideLoading()
+ }
}
}
@@ -470,123 +328,391 @@ export default {
.main {
width: 100vw;
min-height: 100vh;
- .charts{
+ background: #fff;
+ .header{
+ height: 272px;
+ //background: linear-gradient(135deg, #7660FF 0%, #A0BAFD 31%, #B8D2FF 47%, #CAD9FF 66%, #BCB6FF 100%);
+ width: 100vw;
+ background: url("https://eshangtech.com/ShopICO/ahyd-BID/brand/headerBg.svg")no-repeat;
+ background-size: cover;
+ .box{
+ padding: 0 16px;
+ position: absolute;
+ box-sizing: border-box;
+ width: 100%;
+ display: flex;
+ align-items: center;
+ transform: translateY(-50%);
+ .icon{
+ width: 24px;
+ height: 24px;
+ .img{
+ width: 100%;
+ height: 100%;
+ }
+ }
+ .search{
+ width: 180px;
+ height: 32px;
+ background: #F4F4FF;
+ border-radius: 17px;
+ box-sizing: border-box;
+ padding: 0 12px;
+ border: 1px solid #F8F8FF;
+ margin-left: 8px;
+ line-height: 32px;
+ }
+
+ }
+ .serviceArea{
+ width: calc(100% - 32px);
+ position: absolute;
+ box-sizing: border-box;
+ padding-left: 16px;
+ .picker{
+ .selectService{
+ display: flex;
+ align-items: center;
+ .img{
+ width: 40px;
+ height: 40px;
+ z-index: 2;
+ }
+ .select{
+ //min-width: 174px;
+ height: 32px;
+ background: #F8F8FA;
+ border-radius: 0 16px 16px 0;
+ transform: translateX(-20px);
+ box-sizing: border-box;
+ padding-left: 25px;
+ padding-right: 25px;
+ display: flex;
+ align-items: center;
+ position: relative;
+ .content{
+ display: flex;
+ align-items: center;
+ .uni-input{
+ padding: 0;
+ background: transparent;
+ font-size: 14px;
+ font-family: PingFangSC-Semibold, PingFang SC;
+ font-weight: 600;
+ color: #160002;
+ height: 40px;
+ line-height: 40px;
+ }
+ .area{
+ font-size: 14px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #786B6C;
+ line-height: 40px;
+ margin-left: 4px;
+ }
+ .rightArrow{
+ width: 24px;
+ height: 12px;
+ position: absolute;
+ right: 0px;
+ }
+ }
+
+ }
+ }
+ }
+ }
+ }
+ .charts{
+ width: 100%;
+ //height: calc(100vh - 272px);
+ border-top-left-radius: 16px;
+ border-top-right-radius: 16px;
+ overflow: hidden;
+ background: #fff;
+ transform: translateY(-16px);
+ .top{
+ width: 100%;
+ height: 100px;
+ background: linear-gradient(180deg, #F1F1FF 0%, #FEFEFF 95%, #FFFFFF 100%);
+ box-shadow: 0 20px 20px 0 rgba(231,231,255,0.6);
+ box-sizing: border-box;
+ padding: 16px 15px;
+ display: flex;
+ .topItem{
+ width: 20%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ box-sizing: border-box;
+ padding: 10px;
+ .icon{
+ width: 35px;
+ height: 35px;
+ margin-bottom: 5px;
+ }
+ .text{
+ font-size: 11px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 500;
+ color: #5C5773;
+ line-height: 18px
+ }
+ }
+ .bg{
+ background: linear-gradient(180deg, #E6DFFF 0%, #F0F0FF 100%);
+ border-radius: 5px;
+ .text{
+ color: #683FF6!important;
+ font-weight: 600;
+ }
+ }
+ }
+ .nav{
+ width: 100vw;
+ height: 48px;
+ box-sizing: border-box;
+ padding-top: 20px;
+ position: relative;
+ background: linear-gradient(180deg, #F1F1FF 0%,#FFFFFF 100%);
+ .navList{
width: 100%;
box-sizing: border-box;
- padding: 28px 16px 24px;
- background: #fff;
- .chartsItem{
- .top{
- display: flex;
- justify-content: space-between;
- align-items: center;
- .title{
- font-size: 17px;
- font-family: PingFangSC-Semibold, PingFang SC;
- font-weight: 600;
- color: #160002;
- line-height: 24px;
- .unit{
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #786B6C;
- line-height: 20px;
- margin-left: 4px;
- }
- }
- .time{
- margin-bottom: 4px;
- .select{
- margin-left: 8px;
- display: inline-block;
- .time {
- display: flex;
- align-items: center;
- margin-right: 4px;
- .day {
- font-size: 32rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #782717;
- line-height: 44rpx;
- margin-right: 4px;
- }
- .uni-input {
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #ae664e;
- line-height: 36rpx;
- }
- .icon {
- width: 24px;
- height: 16px;
- }
- }
- }
- }
- }
- .title{
- font-size: 17px;
- font-family: PingFangSC-Semibold, PingFang SC;
- font-weight: 600;
- color: #160002;
- line-height: 24px;
- .unit{
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #786B6C;
- line-height: 20px;
- margin-left: 4px;
- }
- }
- .labelList{
- display: flex;
- align-items: center;
- flex-flow: wrap;
- margin-top: 12px;
- .labelItem{
- border-radius: 4px;
- padding:2px 6px;
- margin-right: 6px;
- margin-bottom: 6px;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- .icon{
- width: 16px;
- height: 16px;
- margin-right: 4px;
- }
- .name{
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #160002;
- line-height: 20px;
- .number{
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #A69E9F;
- line-height: 20px;
- margin-left: 4px;
- }
- }
- }
- .labelItemSelect{
- border:1px solid #ccc;
- background: rgba(202, 208, 218, 0.5)
- }
- .labelItemUnSelect{
- border:1px solid #ccc;
- background: rgba(237, 239, 244, 0.2)
-
- }
- }
+ padding: 0 44px 0 16px;
+ white-space: nowrap;
+ .navItem{
+ height: 22px;
+ display: inline-block;
+ padding: 3px 10px;
+ background: #F3F3F9;
+ font-size: 14px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #5C5773;
+ line-height: 22px;
+ border-radius: 4px;
+ margin-right: 8px;
+ .count{
+ line-height: 22px;
+ font-size: 11px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #9D99B0;
+ margin-left: 2px;
+ }
}
+ .bg{
+ background: #683FF6!important;
+ color: #fff!important;
+ .selectCount{
+ color: #C2B2FB!important;;
+ }
+ }
+ ::-webkit-scrollbar {
+ width: 4px;
+ height: 4px;
+ color:transparent;
+ }
+
+ /*定义滚动条轨道 内阴影+圆角*/
+ ::-webkit-scrollbar-track {
+ border-radius: 10px;
+ background-color:transparent;
+ }
+
+ /*定义滑块 内阴影+圆角*/
+ ::-webkit-scrollbar-thumb {
+ border-radius: 10px;
+ background-color:transparent;
+ }
+ }
+ .filter{
+ width: 56px;
+ height: 28px;
+ background: #F7F7FF;
+ box-shadow: -8rpx 0rpx 8rpx 0rpx rgba(40,0,179,0.06);
+ position: absolute;
+ right: 0;top: 20px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 999;
+ .more{
+ width: 16px;
+ height: 16px;
+ }
+ }
}
+ .list{
+ width: 100%;
+ box-sizing: border-box;
+ padding: 12px 16px calc( env(safe-area-inset-bottom) + 12px);
+ .listItem{
+ width: 100%;
+ box-sizing: border-box;
+ padding: 12px;
+ display: flex;
+ overflow: hidden;
+ position: relative;
+ background: linear-gradient(45deg, #F7FCFF 0%, #F8F9FF 100%);
+ border-radius: 6px;
+ border: 1px solid #F6F6FF;
+ margin-bottom: 12px;
+ .left{
+ width: 88px;
+ height: 88px;
+ border-radius: 8px;
+ overflow: hidden;
+ .logo{
+ width: 100%;
+ height: 100%;
+ }
+ }
+ .right{
+ height: 88px;
+ margin-left: 12px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ .title{
+ display: inline-block;
+ width: 150px;
+ font-size: 16px;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 600;
+ color: #051433;
+ line-height: 22px;
+ //margin-bottom: 4px;
+ }
+ .labelList{
+ //margin-bottom: 8px;
+ display: flex;
+ flex-flow: nowrap;
+ .labelItem{
+ white-space: nowrap;
+ display: inline-block;
+ padding: 1px 8px;
+ margin-right: 8px;
+ background: linear-gradient(270deg, rgba(90, 199, 255, 0.15) 0%, rgba(90, 193, 255, 0.15) 100%);
+ border-radius: 2px;
+ }
+ }
+ .suggest{
+ padding: 0 8px;
+ background: linear-gradient(90deg, RGBA(222, 231, 255, 1) 0%, RGBA(241, 246, 255, 1) 100%);
+ border-radius: 2px;
+ .value{
+ font-size: 14px;
+ font-family: DINAlternate-Bold, DINAlternate;
+ font-weight: bold;
+ color: #396CFF;
+ line-height: 16px;
+ margin-right: 4px;
+ }
+ .text{
+ font-size: 12px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #8995B5;
+ line-height: 18px;
+ }
+ }
+ }
+ .type{
+ position: absolute;
+ top: 0;right: 0;
+ background: linear-gradient(135deg, #77A1FF 0%, #7967FF 100%);
+ border-radius: 0rpx 10rpx 0rpx 10rpx;
+ padding: 0 8px;
+ display: flex;
+ align-items: center;
+ //border-image: linear-gradient(227deg, rgba(255, 255, 255, 1), rgba(234, 240, 255, 1), rgba(255, 255, 255, 0)) 1 1;
+ .typeIcon{
+ width: 14px;
+ height: 14px;
+ }
+ .text{
+ font-size: 12px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #E3DEFF;
+ line-height: 18px;
+ margin-left: 4px;
+ }
+ .number{
+ font-size: 14px;
+ font-family: DINAlternate-Bold, DINAlternate;
+ font-weight: bold;
+ color: #FFFFFF;
+ margin-left: 8px;
+ }
+ }
+ }
+ ::-webkit-scrollbar {
+ width: 4px;
+ height: 4px;
+ color:transparent;
+ }
+
+ /*定义滚动条轨道 内阴影+圆角*/
+ ::-webkit-scrollbar-track {
+ border-radius: 10px;
+ background-color:transparent;
+ }
+
+ /*定义滑块 内阴影+圆角*/
+ ::-webkit-scrollbar-thumb {
+ border-radius: 10px;
+ background-color:transparent;
+ }
+ }
+ }
+ .meng{
+ position: relative;
+ width: 100vw;
+ height: 100vh;
+ top: -100vh;left: 0;
+ .filterBox{
+ width: calc(100vw - 32px);
+ background: #FFFFFF;
+ box-shadow: 0 0 30px 0 rgba(22,4,82,0.13);
+ border-radius: 6px;
+ box-sizing: border-box;
+ padding: 12px;
+ position: fixed;
+ top: 0;left: 16px;
+ .filterItem{
+ z-index: 200;
+ display: inline-block;
+ background: #F3F3F9;
+ border-radius: 4px;
+ padding: 3px 10px;
+ font-size: 14px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #5C5773;
+ margin-right: 8px;
+ margin-bottom: 8px;
+ .count{
+ font-size: 14px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #9D99B0;
+ margin-left: 2px;
+ }
+ }
+ .bg{
+ background: #683FF6!important;
+ color: #fff!important;
+ .selectCount{
+ color: #C2B2FB!important;;
+ }
+ }
+ }
+
+ }
+
}
diff --git a/pages/commercialBI/shopDetail.vue b/pages/commercialBI/shopDetail.vue
new file mode 100644
index 0000000..dcb32db
--- /dev/null
+++ b/pages/commercialBI/shopDetail.vue
@@ -0,0 +1,743 @@
+
+
+
+
+
+
+ 经营项目
+ ({{`${serviceList.length}`}})
+
+
+
+
+
+
+
+
+
+
{{item.SERVERPART_NAME}}
+
+
+ {{typeObj[item.SERVERPART_TYPE]}}
+
+
+
+
+ {{item.SECTIONFLOW_NUM}}
+ 断面流量
+
+
+
+
+
+
+
{{item.BUSINESSPROJECT_NAME || '-'}}
+
+
+
+
+
+
+ {{item.PROJECT_AMOUNT || '0'}}
+ ( 万元 )
+
+
+
+
+
+
+
+
+
+ {{item.SERVERPARTSHOP_NAME || '-'}}
+
+
+
+
+ {{ item.PROJECT_STARTDATE && item.PROJECT_ENDDATE ?`${item.PROJECT_STARTDATE}-${item.PROJECT_ENDDATE}`:'-' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/commercialBI/yearPlan.vue b/pages/commercialBI/yearPlan.vue
index 8ae9698..9c25253 100644
--- a/pages/commercialBI/yearPlan.vue
+++ b/pages/commercialBI/yearPlan.vue
@@ -146,7 +146,7 @@ export default{
this.searchTime = uni.getStorageSync('lastDay')
this.lastDay = uni.getStorageSync('lastDay')
// 拿到当前时间
- const date = new Date(this.searchTime)
+ const date = new Date(this.lastDay)
let month = date.getMonth() + 1
// 滚动的月份列表
// 超过当前月份的内容不显示 下同
@@ -159,34 +159,40 @@ export default{
// this.handleAreaDetailList()
},
onReady(){
+ // 默认把月份选择在当前相对应的月份
this.getThisMonth()
},
methods:{
// 横向月份选择器的初始值
getThisMonth(){
- const date = new Date()
+ // 拿到当前的搜索时间 来判断默认选中第几个月份
+ const date = new Date(this.searchTime)
const month = date.getMonth() + 1
this.selectMonth = month
this.selectMonthId = `item${month}`
},
// 点击月份切换月份
handleSelectMonth(value){
+ // 切换月份的时候 改变月份的值 改变选中的id 显示的卡片详情
this.selectMonth = value
this.selectMonthId = `item${value}`
this.selectDetail = value - 1
},
// 月份信息详情的滚动
+ // 由于点击月份的切换会让卡片详情的滑块列表滚动 所以在这加事件就可以
handleDetailScroll(e){
// 月份详情卡片滚动改变选中的月份和选中的滑动id
const date = new Date(this.lastDay)
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
+ // 滚动 就等于改变月份 月份详情卡片的id
this.selectDetail = e.detail.current
this.selectMonth = this.selectDetail + 1
this.selectMonthId = `item${this.selectDetail<5?1:this.selectDetail}`
// 当月份和首页传入的时间的月份一致的话 时间就是首页的时间 反之就是之前月份的最后一天
if (month === this.selectMonth){
+ // 兼容ios 时间月份和日期小于10的必须加上0 不然ios就会报错
if (month<10){
month = '0' + month
}
@@ -199,6 +205,7 @@ export default{
let d = this.$util.getThisMonthDay(`${year}-${m}`)
this.searchTime = `${year}-${m}-${d}`
}
+ // 用新的时间去请求 得到新的数据
this.handleAreaDetailList()
},
async handleAreaDetailList(){
diff --git a/pages/examine/index.vue b/pages/examine/index.vue
index 7bbe306..466d9be 100644
--- a/pages/examine/index.vue
+++ b/pages/examine/index.vue
@@ -51,7 +51,7 @@
{{item.SERVERPART_NAME}}
- {{selectMonth%3===0?`${Math.abs(selectMonth/3)===1?'一':Math.abs(selectMonth/3)===2?'二':Math.abs(selectMonth/3)===3?'三':'四'}季度`:'月度'}}
+ {{item.EXAMINE_MQUARTER!=='0'?item.EXAMINE_MQUARTER==='1'?'一'+'季度':item.EXAMINE_MQUARTER==='2'?'二'+'季度':item.EXAMINE_MQUARTER==='3'?'三'+'季度':'四' + '季度':'月度'}}
@@ -285,10 +285,10 @@ export default {
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
// 先拿到首页的时间 作为调用接口的统一时间 存的lastDay存当前月份的具体日期切换回本月的日期判断有用
- this.searchTime = uni.getStorageSync('lastDay')
+ this.searchTime = new Date()
this.lastDay = uni.getStorageSync('lastDay')
// 拿到当前时间
- const date = new Date(this.searchTime)
+ const date = new Date()
let month = date.getMonth() + 1
// 滚动的月份列表
let list = []
@@ -300,7 +300,7 @@ export default {
this.monthList = list
// 日历数组
this.dateList = this.$util.getThisMonthDateList(date)
- console.log('this.dateList1',this.dateList)
+ console.log('this.dateList',this.dateList)
// 获得片区列表
this.getAreaList()
},
@@ -327,9 +327,12 @@ export default {
this.selectMonth = month
this.current='item'+month
// 日期选择器
+ if (day<10){
+ day = '0' + day
+ }
this.selectDate = `${year}-${month}-${day}`
+ console.log('this.selectDate',this.selectDate)
this.currentDate = 'item'+`${year}-${month}-${showDay}`
- console.log('this.currentDate',this.currentDate)
},
// 是否显示弹出框
handleShowPopup(value,obj){
@@ -362,7 +365,6 @@ export default {
},
// 点击月份改变选中月份
handleSelectMonth(value){
- console.log('value',value)
this.selectMonth = value
// 当前时间
const nowDate = new Date()
@@ -371,17 +373,16 @@ export default {
nowMonth = '0' + nowMonth
}
// 搜索时间
- console.log('this.searchTime',this.searchTime)
const date = new Date(this.searchTime)
let y = date.getFullYear()
// 如果当前的时间 和 选中的时间一样 那么 搜索的时间就是当前时间的前一天 否则就是当前月份的最后一天
if (nowMonth === this.selectMonth){
- this.searchTime = this.lastDay
+ // this.searchTime = this.lastDay
+ this.searchTime = new Date()
}else{
let howDay = this.$util.getThisMonthDay(`${y}-${this.selectMonth}`)
this.searchTime = `${y}-${this.selectMonth}-${howDay}`
}
- console.log(' this.searchTime', this.searchTime)
let howDay = this.$util.getThisMonthDay(`${y}-${this.selectMonth}`)
const listDate = new Date(`${y}-${this.selectMonth}`)
let listY = listDate.getFullYear()
@@ -396,22 +397,15 @@ export default {
}
// 月份改变之后 重新渲染选择日期的数组
this.dateList = list
- console.log('this.dateList',this.dateList)
// 当月份改变了之后 日期栏也会根据当前选中的时间 选择新月份默认的时间
- console.log('this.selectDate',this.selectDate)
- console.log('111',`${y}-${this.selectMonth}`)
this.selectDate = this.$util.handleReduceAMonth(`${this.selectDate}`,`${y}-${this.selectMonth}`)
- console.log('this.selectDate2',this.selectDate)
// 日期的自动滚动设置
const selectTime = new Date(this.selectDate)
let selectY = selectTime.getFullYear()
let selectM = selectTime.getMonth() + 1
- console.log('selectTime',selectTime)
// 要让选中的日期展示在最右边 不展示最左边
let selectD = selectTime.getDate() - 4 > 0?selectTime.getDate() - 4:1
- console.log('selectD',selectD)
this.currentDate = 'item' + `${selectY}-${selectM<10?'0'+selectM:selectM}-${selectD<10?'0'+selectD:selectD}`
- console.log('this.currentDate',this.currentDate)
if (this.selectTab===1){
// 选中的是考核管理 调用拿到考核管理的列表
@@ -448,12 +442,10 @@ export default {
},
// 选择日期的方法
handleChangeDate(value){
- console.log('value',value)
- let time = `${value.split('-')[0]}-${value.split('-')[1]<10?'0'+value.split('-')[1]:value.split('-')[1]}-${value.split('-')[2]}`
const date = new Date()
let m = date.getMonth() +1
let d = date.getDate()
- const selectDay = new Date(time)
+ const selectDay = new Date(value)
let selectM = selectDay.getMonth() +1
let selectD = selectDay.getDate()
if (d < selectD && m <= selectM){
@@ -528,6 +520,9 @@ export default {
m = '0' + m
}
let d = date.getDate()
+ if (d<10){
+ d = '0' + d
+ }
let startTime = `${y}-${m}-01`
let endTime = `${y}-${m}-${d}`
diff --git a/pages/index/index.vue b/pages/index/index.vue
index f74a88d..0819e32 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -487,10 +487,8 @@ export default {
user:{
// 新用户刚进来的时候可能onLoad会执行不了 监听他的user变化确保能请求
handler:function (value){
- console.log('value',value)
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
- console.log('userInfo11',userInfo)
if (this.isReturn===true){
// 无权限就会跳转到无数据的页面
if (userInfo.userData.AuthorityInfo['89a1f248-2113-4d57-84b1-c2e6edb9e8ee']===1){
@@ -526,7 +524,6 @@ export default {
}
if (!this.isReturn){
this.getData(this.option)
- console.log('watch')
this.handleNoticeMonth()
this.handleNoticeYear()
}
@@ -577,11 +574,12 @@ export default {
if (d - 8 <0){
let k = 8 - d
m = m - 1
- const time = `${y}-${m}`
+ if (m<10){
+ m = '0' + m
+ }
+ const time = `${y}-${m}`
+ console.log('time',time)
howDay = this.$util.getThisMonthDay(time)
- if (m<10){
- m = '0' + m
- }
this.startDate = `${y}-${m}-${howDay - k}`
}else{
if (m<10){
@@ -611,9 +609,7 @@ export default {
url:`/pages/commercialBI/noData?type=noAuthor`
})
}
- console.log('onLoad',this.isReturn)
if (!this.isReturn){
- console.log('onLoad2',this.isReturn)
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
// 判断是否有投诉建议的悬浮框弹出
@@ -780,15 +776,15 @@ export default {
this.showNoticeYear = false
},
handlePlanPageGo(type){
- this.$util.toNextRoute('navigateTo', `/pages/commercialBI/yearPlan`)
- // if (!this.isReturn){
- // this.$util.toNextRoute('navigateTo', `/pages/commercialBI/planMonth?lastDay=${this.lastDay}&type=${type}`)
- // }else{
- // uni.showToast({
- // title: '暂无权限请联系管理员',
- // icon: 'none'
- // })
- // }
+ // this.$util.toNextRoute('navigateTo', `/pages/commercialBI/yearPlan`)
+ if (!this.isReturn){
+ this.$util.toNextRoute('navigateTo', `/pages/commercialBI/planMonth?lastDay=${this.lastDay}&type=${type}`)
+ }else{
+ uni.showToast({
+ title: '暂无权限请联系管理员',
+ icon: 'none'
+ })
+ }
},
handlePage(){
if (!this.isReturn){
@@ -810,7 +806,8 @@ export default {
})
}
},
- getData(option){
+ // option是请求的参数 type是否是切换时间
+ getData(option,type){
//老代码
if (this.user.Membership_Id){
uni.showLoading({
@@ -819,15 +816,19 @@ export default {
}
//判断是否从推送进来
if (option.ProvinceCode) { // 从推送进入
+ console.log('推送')
this.theRequest = option
option.time = this.$util.cutDate(option.time, 'YYYY-MM-DD')
option.month = this.$util.cutDate(option.time, 'YYYYMM')
- this.lastDay = this.$util.cutDate(option.time, 'YYYY-MM-DD')
- //修改时间选择器里面的时间
- this.single = timestampToTime((new Date(this.lastDay).getTime()))
- //显示当前选择的时间是星期几
- const date = new Date(this.lastDay)
- this.thisDay = getThisDay(date.getDay())
+ console.log('type',type)
+ if (!type){
+ this.lastDay = this.$util.cutDate(option.time, 'YYYY-MM-DD')
+ //修改时间选择器里面的时间
+ this.single = timestampToTime((new Date(this.lastDay).getTime()))
+ //显示当前选择的时间是星期几
+ const date = new Date(this.lastDay)
+ this.thisDay = getThisDay(date.getDay())
+ }
// 老项目的请求数据的那部分
this.initData()
//根据新页面请求数据的方法
@@ -890,10 +891,10 @@ export default {
},
// 改变时间触发的方法 ,改变页面的内容数据
- onRefresh(){
+ onRefresh(type){
// 有权限就让他刷新 不没权限的时候下拉刷新不会调用
if (!this.isReturn){
- this.getData(this.option)
+ this.getData(this.option,type)
}
},
getUnUpLoadList(){
@@ -941,7 +942,7 @@ export default {
this.carInfo.Vehicle_Count = res.Result_Data.Vehicle_Count?res.Result_Data.Vehicle_Count:'-'
})
},
- initYesterdayData(){
+ async initYesterdayData(){
let flag1 = false
let flag2 = false
let flag3 = false
@@ -1002,15 +1003,23 @@ export default {
Statistics_Date: this.lastDay,
ShowCompareRate:true
}
- request.$webGet('CommercialApi/Revenue/GetMallDeliver',todayData).then(res=>{
- // 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
- this.lastDayBillCount = res.Result_Data
- this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
- this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
- this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price)
- this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
- flag2 = true
- })
+ const data = await request.$webGet('CommercialApi/Revenue/GetMallDeliver',todayData)
+ this.lastDayBillCount = data.Result_Data
+ this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
+ this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
+ this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price)
+ this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
+ flag2 = true
+ // .then(res=>{
+ // console.log('flag2',res)
+ // // 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
+ // this.lastDayBillCount = res.Result_Data
+ // this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
+ // this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
+ // this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price)
+ // this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
+ // flag2 = true
+ // })
// 暂时调用不到的方法
//昨日的订单配送
// const deliveData = {
@@ -1075,6 +1084,8 @@ export default {
this.showTableData = result.RevenuePushModel
this.showTableData.compared = result.GrowthRate
// 只有接口全面通了 才可以处理数据显示
+ console.log('flag2',flag2)
+ console.log('flag3',flag3)
if (flag2 && flag3 ){
this.todayAmount()
}
@@ -1103,10 +1114,13 @@ export default {
// 顶部的时间组件切换时间触发的方法
bindDateChange(e){
let isOnRefresh = false
+ console.log('this.startDate',this.startDate)
+ console.log('this.noChangeLastDay',this.noChangeLastDay)
let startTime = new Date(this.startDate).getTime()
let endTime = new Date(this.noChangeLastDay).getTime() - 8 * 3600 * 1000 //结束时间戳
const date = new Date(e.detail.value).getTime() - 8 * 3600 * 1000
let startDate = new Date(this.startDate)
+ console.log('startDate',startDate)
let startMonth = startDate.getMonth() + 1
let startDay = startDate.getDate()
let endDate = new Date(this.noChangeLastDay)
@@ -1118,14 +1132,18 @@ export default {
}else{
isOnRefresh = true
}
+ console.log('isOnRefresh',isOnRefresh)
+ console.log('timestampToTime(date)',timestampToTime(date))
// 符合要求的时间可以请求数据 不符合的弹出提示
if (isOnRefresh){
this.single = timestampToTime(date)
this.lastDay = e.detail.value
uni.setStorageSync('lastDay',this.lastDay)
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
- this.onRefresh()
+ this.onRefresh(true)
}else{
+ console.log('startMonth',startMonth)
+ console.log('startDay',startDay)
uni.showModal({
title: `数据看板仅支持查看${startMonth}.${startDay}-${endMonth}.${endDay}的数据,更多数据请登陆商业综合平台查看`,
icon:'none',
diff --git a/pages/plan/areaPlanMonth.vue b/pages/plan/areaPlanMonth.vue
index 2a94339..33d18af 100644
--- a/pages/plan/areaPlanMonth.vue
+++ b/pages/plan/areaPlanMonth.vue
@@ -29,38 +29,44 @@
{{item.label}}
-
+
-
-
- {{item.Serverpart_Name}}
-
+
+
+
+ {{item.Serverpart_Name}}
+
+
+
+
+
+
+
-
-
-
-
+
+
+ {{item.Revenue_Amount}}
+ 本月已完成/元
+
+
+ {{item.Growth_Rate>0?'+':''}}{{item.Growth_Rate}}%
+ 比计划
+
-
-
-
- {{item.Revenue_Amount}}
- 本月已完成/元
+
+
-
- {{item.Growth_Rate>0?'+':''}}{{item.Growth_Rate}}%
- 比计划
+
+ 计划完成/元
+ {{item.Budget_Amount}}
-
-
-
-
- 计划完成/元
- {{item.Budget_Amount}}
-
+
+
+ 暂无数据
+
@@ -145,7 +151,6 @@ export default {
if (value===1){
this.serviceDetailShowList = this.serviceDetailList
}else if (value===2){
- console.log(111)
this.serviceDetailShowList = this.serviceDetailList.filter(item=>item.Growth_Rate>0)
}else if (value===3){
this.serviceDetailShowList = this.serviceDetailList.filter(item=>item.Growth_Rate<0)
@@ -154,7 +159,6 @@ export default {
// 拿到列表数据
async handleAreaMonthPlan(){
uni.showLoading({title:'正在加载'})
- console.log('this.searchTime',this.searchTime)
const req = {
StatisticsDate:this.searchTime,
ProvinceCode:'340000',
@@ -163,6 +167,7 @@ export default {
}
const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
this.serviceDetailList = data.Result_Data.RegionBudgetList
+ // 对数组中的实际营收额和计划营收额进行格式化处理
this.serviceDetailList.forEach(item=>{
for (let key in item){
for (let key in item){
@@ -175,7 +180,6 @@ export default {
// 因为会有筛选 所以要有一个全部的数组 和一个显示的数组
this.serviceDetailShowList = this.serviceDetailList
uni.hideLoading()
- console.log('this.serviceDetailList',this.serviceDetailList)
},
handleBack(){
uni.navigateBack({
@@ -190,7 +194,7 @@ export default {
hidePopup(){
this.showPop = false
},
- // 修改当前选中的片区
+ // 修改当前选中的片区 改变片区之后 重新调用拿到列表的数据
handleChangeArea(item){
// 选择的片区名称和片区id
this.selectAreaValue = item.value
@@ -215,18 +219,15 @@ export default {
})
this.areaList = list
this.areaList.forEach(item=>{
- console.log('item',item)
if (item.value === this.selectAreaValue){
this.selectAreaValue = item.value
this.selectAreaName = item.label
}
})
- console.log('this.areaList',this.areaList)
}
},
// 点击跳转详情页
goPage(item){
- console.log('item',item)
this.$util.toNextRoute('navigateTo', '/pages/plan/servicePlanMonth?id='+item.Serverpart_ID+'&search='+this.searchTime+'&obj=' + JSON.stringify(item) +'&selectAreaValue='
+this.selectAreaValue)
}
@@ -489,6 +490,18 @@ export default {
}
}
}
+ .noData{
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ .img{
+ width: 80px;
+ height: 80px;
+ }
+ }
}
}
.popup{
diff --git a/pages/plan/servicePlanMonth.vue b/pages/plan/servicePlanMonth.vue
index e64b646..c5b74d0 100644
--- a/pages/plan/servicePlanMonth.vue
+++ b/pages/plan/servicePlanMonth.vue
@@ -121,17 +121,19 @@
-
+
{{thirdItem.node.ACCOUNT_CODE}}
@@ -152,7 +154,7 @@
{{thirdItem.node.BUDGETDETAIL_AMOUNT || '-'}}
-
+
@@ -192,9 +194,9 @@ export default {
monthList:[{label:'1月',value:1},{label:'2月',value:2},{label:'3月',value:3},{label:'4月',value:4},{label:'5月',value:5},{label:'6月',value:6},{label:'7月',value:7}, {label:'8月',value:8},{label:'9月',value:9},{label:'10月',value:10},{label:'11月',value:11},{label:'12月',value:12}],
selectMonth:0,// 选中的月份
selectMonthId:'',// 选中月份的id
- swiperList:[{label:1111},{label:2222},{label:3333},{label:4444},{label:5555},{label:6666},{label:7777},{label:8888},{label:9999},{label:1010}, {label:11111111},{label:1212}],
+ swiperList:[{},{},{},{},{},{},{},{},{},{}, {},{}],
selectDetail:0,// 放大的月份详情
- detailList:[{list:[1,2,3]},{list:[1,2,3]},{list:[1,2,3]},{list:[1,2,3]}],
+ detailList:[],
serviceId:'',// 服务区ID
showPop:false,// 是否显示popup
selectAreaValue:'',// 选择的片区ID
@@ -204,10 +206,11 @@ export default {
}
},
onLoad(query){
- console.log(query)
+ console.log('query',query)
// query 有id searchTime 片区名称和片区内码
// 获取手机参数对页面进行适配
this.menu = uni.getMenuButtonBoundingClientRect()
+ // 处理上个页面传入的数据
// 先拿到首页的时间 作为调用接口的统一时间 存的lastDay存当前月份的具体日期切换回本月的日期判断有用
if (query.search){
this.searchTime = query.search
@@ -225,19 +228,22 @@ export default {
}
this.lastDay = uni.getStorageSync('lastDay')
// 拿到当前时间
- console.log('this.searchTime',this.searchTime)
const date = new Date(this.searchTime)
let month = date.getMonth() + 1
+ // 月份列表的显示和详情卡片的滑块列表 还是得用首页的时间 不然选择前面月份 后续比当前月份小的月份不会显示
+ const nowDate = new Date(this.lastDay)
+ let nowMonth = nowDate.getMonth() + 1
// 滚动的月份列表
- this.monthList = this.monthList.filter(item=>item.value<=month)
+ this.monthList = this.monthList.filter(item=>item.value<=nowMonth)
// 详情卡片的滑动列表
- this.swiperList = this.swiperList.filter((item,index)=>indexindex{
@@ -328,7 +333,6 @@ export default {
}
}
})
- console.log('this.detailList',this.detailList)
},
// 获取服务区详情信息
async handleServiceDetail(){
@@ -347,6 +351,7 @@ export default {
let d = this.$util.getThisMonthDay(this.searchTime)
reqTime=`${y}-${m}-${d}`
}
+ // 如果是当前月份 传入当前时间 之前月份传入月份的最后一天 之后月份不会显示 不做判断
let req = {
Province_Code:'340000',
Statistics_Date:reqTime,
@@ -356,10 +361,8 @@ export default {
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueBudget',req)
this.serviceDetailObj = data.Result_Data
for (let key in this.serviceDetailObj){
- for (let key in this.serviceDetailObj){
- if (key==='RevenueMonth_Amount' || key==='BudgetMonth_Amount'){
- this.serviceDetailObj[key] = this.$util.fmoney(this.serviceDetailObj[key])
- }
+ if (key==='RevenueMonth_Amount' || key==='BudgetMonth_Amount'){
+ this.serviceDetailObj[key] = this.$util.fmoney(this.serviceDetailObj[key])
}
}
uni.hideLoading()
@@ -377,13 +380,14 @@ export default {
item.children = this.editData(item.children)
if (item.node.ShowRevenue_Amount){
item.node.REVENUE_AMOUNT = item.node.REVENUE_AMOUNT ? this.$util.fmoney(item.node.REVENUE_AMOUNT ) :''
- item.node.REVENUE_AMOUNT = this.$util.fmoney(item.node.REVENUE_AMOUNT)
+ item.node.BUDGETDETAIL_AMOUNT = item.node.BUDGETDETAIL_AMOUNT? this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT ) :''
}
}else{
+ // 下面注释的这句 有的时候可以显示空白内容
item.children = [{},{},{}]
- if (item.node.REVENUE_AMOUNT ){
+ if (item.node.REVENUE_AMOUNT){
item.node.REVENUE_AMOUNT = item.node.REVENUE_AMOUNT ? this.$util.fmoney(item.node.REVENUE_AMOUNT ) :''
- item.node.REVENUE_AMOUNT = this.$util.fmoney(item.node.REVENUE_AMOUNT)
+ item.node.BUDGETDETAIL_AMOUNT = item.node.BUDGETDETAIL_AMOUNT? this.$util.fmoney(item.node.BUDGETDETAIL_AMOUNT ) :''
}else{
item.node.REVENUE_AMOUNT = '-'
}
@@ -404,7 +408,10 @@ export default {
// 选择的片区名称和片区id
this.selectServiceId = item.value
this.selectServiceName = item.label.split('服务区')[0]
+ // 详情卡片信息接口调用
this.handleServiceDetail()
+ // 服务区详情列表接口调用
+ this.getServiceDetail()
// 关闭弹出框方法
this.hidePopup()
},
diff --git a/pages/projectWarning/components/listUnit.vue b/pages/projectWarning/components/listUnit.vue
index bf7159b..10bb84a 100644
--- a/pages/projectWarning/components/listUnit.vue
+++ b/pages/projectWarning/components/listUnit.vue
@@ -7,7 +7,6 @@
{{item.BUSINESSPROJECT_NAME}}
-
{{item.PROJECTWARNING_STATE===1000?'待切换':item.PROJECTWARNING_STATE===2000?'审核中':item.PROJECTWARNING_STATE===9000?'已切换':item.PROJECTWARNING_STATE===9999?'暂不切换':''}}
{{item.PROJECTWARNING_STATE===1000?'待切换':item.PROJECTWARNING_STATE===2000?'审核中':item.PROJECTWARNING_STATE===9000?'已切换':item.PROJECTWARNING_STATE===9999?'暂不切换':''}}
@@ -24,15 +23,18 @@
-
- 预计
- {{item.EXPIREDAYS}}
- 天
-
-
- 已切换
- 完成保底
-
+
+
+ 已切换
+
+
+
+ 预计
+ {{item.EXPIREDAYS}}
+ 天
+
+ 完成保底
+
@@ -46,7 +48,8 @@
{{item.BUSINESS_TYPE===1000?'合作经营':item.BUSINESS_TYPE===2000?'固定租金':''}}
- {{item.WARNING_DATE}}
+
+ {{item.SWITCH_DATE?item.CHANG_DATE:item.WARNING_DATE}}
diff --git a/pages/projectWarning/detail.vue b/pages/projectWarning/detail.vue
index 4450896..2ed3e16 100644
--- a/pages/projectWarning/detail.vue
+++ b/pages/projectWarning/detail.vue
@@ -59,11 +59,14 @@
{{dataDetail.PROJECTWARNING_DESC}}:
- 是否依合同将分润比例进行切换:
+ 是否依合同将分润比例进行切换:
驿达{{YDValue|| '-'}}%,
商家{{SJValue|| '-'}}%
?
+
+ {{ `切换日期默认设定:` }}{{configTime}}
+
@@ -107,6 +110,7 @@ export default {
desc:[],// 详情给的备注
type:true,// 是否从推送进
storeList:[],// 记录列表
+ configTime:''
}
},
onLoad(query){
@@ -114,19 +118,24 @@ export default {
let systemInfo = uni.getSystemInfoSync()
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
- console.log('this.menu',this.menu)
this.PROJECTWARNING_ID = query.id
this.handleGetDetail()
this.useDate = Store.state.userData
- console.log('this.useDate',this.useDate)
if (query.type==='no'){
this.type = false
}
this.handleStore()
+ const date= new Date()
+ let m = date.getMonth() + 1
+ if (m === 12){
+ m = 1
+ }else{
+ m = m + 1
+ }
+ this.configTime = `${m}月1日0点`
},
//页面关闭
onUnload() {
- console.log('页面关闭')
// 记录用户行为
this.$util.addUserBehaviorNew()
},
@@ -141,7 +150,6 @@ export default {
}).then(res=>{
uni.hideLoading()
this.dataDetail = res.Result_Data
- console.log('this.dataDetail',this.dataDetail)
// 金额加上千分号
for (let key in this.dataDetail){
if (key==='REVENUEDAILY_AMOUNT' || key==='REVENUE_AMOUNT' || key==='ROYALTY_PRICE' || key==='SUBROYALTY_PRICE' || key==='TICKET_FEE' || key==='MINTURNOVER'){
@@ -155,8 +163,6 @@ export default {
this.desc[0] = this.dataDetail.PROJECTWARNING_DESC.split('【')[0]
this.desc[1] = this.dataDetail.PROJECTWARNING_DESC.split('【')[1].split(',')[1]
}
- console.log('this.time',this.time)
- console.log('this.desc',this.desc)
})
},
handleStore(){
@@ -170,7 +176,6 @@ export default {
SortStr: "APPROVED_DATE desc"
}).then(res=>{
this.storeList = res.Result_Data.List
- console.log('this.storeList',this.storeList)
})
},
// 暂不切换比例
@@ -212,7 +217,6 @@ export default {
if (this.dataDetail.PROJECTWARNING_STATE===1000){
this.handleBack()
}
- console.log('res')
uni.showToast({
title: res.Result_Desc,
icon: 'none'
diff --git a/pages/projectWarning/index.vue b/pages/projectWarning/index.vue
index 4773072..4afddef 100644
--- a/pages/projectWarning/index.vue
+++ b/pages/projectWarning/index.vue
@@ -35,11 +35,11 @@
日期
- {{searchTime[0]}}
+ {{'请选择开始时间'}}
-
- {{searchTime[1]}}
+ {{'请选择结束时间'}}
确定
@@ -58,8 +58,8 @@ import UniPop from '@/components/uni-popup.vue'
export default {
components: {ListUnit,UniPop},
data() {
- let stime = this.$util.cutDate(new Date(), 'YYYY-MM-DD', -6)
- let etime = this.$util.cutDate(new Date(), 'YYYY-MM-DD')
+ let stime = ''
+ let etime = ''
return {
menuList: [
{ //列表头部菜单选项标签
@@ -119,6 +119,7 @@ export default {
onShow(){
this.pageData.pageIndex = 1
this.handleGetList()
+ this.pageData.isEnd = false
},
onReachBottom () {
if (!this.pageData.isEnd){
@@ -161,7 +162,7 @@ export default {
WARNING_DATE_Start:this.searchTime[0],// 提醒日期(查询条件)
WARNING_DATE_End:this.searchTime[1],// 提醒日期(查询条件)
PROJECTWARNING_STATE:'',// 审批状态
- PROJECTWARNING_STATES:'',// 审批状态(查询条件)
+ PROJECTWARNING_STATES:this.activeType===1?'1000,2000':this.activeType===2?'9000':'',// 审批状态(查询条件)
RECORD_DATE:'',// 记录时间
PROJECTWARNING_DESC:'',// 备注说明
REVENUE_AMOUNT:'',// 营收金额
@@ -189,18 +190,38 @@ export default {
} else {
//筛选数据(请根据实际业务修改)
let list = res.Result_Data.List.filter(p => {
+ if (p.SWITCH_DATE){
+ const date = new Date(p.SWITCH_DATE)
+ const y = date.getFullYear()
+ let m = date.getMonth() + 1
+ let d = date.getDate()
+ if (m<10){
+ m = '0'+m
+ }
+ if (d<10){
+ d = '0'+d
+ }
+ p.CHANG_DATE = `${y}-${m}-${d}`
+ }
if (this.activeType === 1) {
- return p.BUSINESS_TYPE === 1000
+ return p.PROJECTWARNING_STATE === 1000 || p.PROJECTWARNING_STATE === 2000
} else if (this.activeType === 2) {
- return p.BUSINESS_TYPE === 9000
+ return p.PROJECTWARNING_STATE === 9000
} else {
return true
}
+
})
+ console.log('list',list)
if (list.length > 0) {
this.TotalCount = res.Result_Data.TotalCount
if (this.pageData.pageIndex === 1) {
this.pageList = list
+ if (list.length {
+ const node = { ...item.node };
+
+ if (item.children && item.children.length > 0) {
+ node.children = wrapTreeNode(item.children);
+ }
+ return node
+ });
+ return wrapData;
+}
+
+export function tableList(list) {
+ return {
+ data: list.List || [],
+ current: list.PageIndex || 1,
+ pageSize: list.pageSize || 10,
+ total: list.TotalCount || 0,
+ otherData: list?.OtherData || '',
+ success: true,
+ };
+}