@@ -107,11 +140,11 @@
-
已完成:
+
已完成:
{{item.Revenue_Amount}}
-
计划:
+
计划:
{{item.Budget_Amount }}
@@ -130,19 +163,34 @@ export default {
type:'', //类别
dataList:[],
id:'',
+ showNotice:false,
+ showNoticeYear:false,
info:{},
month:0,//传入的月份
- item:{}//月份的时候传入的整个片区信息
+ item:{},//月份的时候传入的整个片区信息
+ itemText:'',//片区显示的文字
+ monthText:'',//月份显示的文字
+ lastDay:'',
+ second:false
}
},
onLoad(option){
- console.log('option',option)
- this.type = option.type
- if (option.id){
- this.id =option.id
- }
+ // 从缓存中拿到选中的时间
+ this.lastDay = uni.getStorageSync('lastDay')
+ // 判断是否是第二次进入页面,因为月份的片区 再点进去展示的月份的服务区 需要的参数会不一样
+ if (option.second==='true'){
+ this.second = true
+ }
+ // 拿到上一个页面带来的参数
+ this.type = option.type
+ if (option.id){
+ this.id =option.id
+ }
+ // 拿到传入的月份
this.month = Number(option.month)
- let date = new Date()
+ // 取全局的时间
+ console.log('this.lastDay',this.lastDay)
+ let date = new Date(this.lastDay)
let y = date.getFullYear()
let m = date.getMonth() + 1
let d = date.getDate()
@@ -152,92 +200,191 @@ export default {
if (d<10){
d = '0' + d
}
+ console.log('d',d)
+ // 判断如果是当前月份的话 就拿到当前时间,不是当前月份的话 就拿那个月的最后一天
if (option.month){
- if (m === Number(option.month)){
+ if (Number(m) === Number(option.month)){
this.date = `${y}-${m}-${d}`
+ console.log('this.date',this.date)
}else{
+ let month
+ if (this.month<10){
+ month = '0' + this.month
+ }else{
+ month = this.month
+ }
//月份不是当前月
- let mayDate = `${y}-${option.month}`
+ let mayDate = `${y}-${month}`
+ console.log('mayDate',mayDate)
let addDay = this.$util.getThisMonthDay(mayDate)
- this.date = `${y}-${option.month}-${addDay}`
+ console.log('addDay',addDay)
+ this.date = `${mayDate}-${addDay}`
}
}
- if (option.item){
- this.item = JSON.parse(option.item)
- }
-
+ console.log('this.date',this.date)
+ // 直接把上一个页面点进的片区属性全部拿来
+ if (option.item){
+ this.item = JSON.parse(option.item)
+ }
+ // 如果是第二次进入 那么调用的方法也不一样 做个判断
+ if (option.second==='true'){
+ this.getDateSecond()
+ }else{
this.getDateList()
+ }
+ // 拿到问号里面的文字
+ this.handleNoticeText()
},
onShow(){
+ // 判断让小程序页面标题展示相应的名字
+ if (this.second){
+ uni.setNavigationBarTitle({
+ title: `${this.month}月${this.item.Serverpart_Name}自营计划`,
+ })
+ }else{
if (this.type==='year'){
- //每个月片区的列表
- uni.setNavigationBarTitle({
- title: `${this.month}月自营计划`,
- })
+ //每个月片区的列表
+ uni.setNavigationBarTitle({
+ title: `${this.month}月自营计划`,
+ })
}else{
- //片区进来服务区的列表
- uni.setNavigationBarTitle({
- title: `${this.item.Serverpart_Name}本月自营计划`,
- })
+ //片区进来服务区的列表
+ uni.setNavigationBarTitle({
+ title: `${this.item.Serverpart_Name}本月自营计划`,
+ })
}
-
+ }
},
methods:{
- async getDateList(){
- if (this.type==='year'){
- let req = {
- StatisticsDate:this.date,
- ProvinceCode:'340000',
- StatisticsType:1
- }
- const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
- data.Result_Data.RegionBudgetList.forEach(item=>{
- let num = item.Serverpart_Name.indexOf('片区')
- console.log(num)
- if (num!==-1){
- item.name = item.Serverpart_Name.slice(0,num)
- item.unit = item.Serverpart_Name.slice(num,100)
- }else{
- item.name = item.Serverpart_Name
- }
- item.Revenue_Amount = this.$util.fmoney(item.Revenue_Amount)
- item.Budget_Amount = this.$util.fmoney(item.Budget_Amount)
- })
- this.info = data.Result_Data
- this.info.Budget_Amount = this.$util.fmoney(this.info.Budget_Amount)
- this.info.Revenue_Amount = this.$util.fmoney(this.info.Revenue_Amount)
- this.dataList = data.Result_Data.RegionBudgetList
-
- console.log('data',data)
- }else{
- let time = uni.getStorageSync('lastDay')
- let req = {
- StatisticsDate:time,
- ProvinceCode:'340000',
- StatisticsType:4,
- SPRegionTypeID:this.id
- }
- const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
- data.Result_Data.RegionBudgetList.forEach(item=>{
- let num = item.Serverpart_Name.indexOf('服务区')
- console.log(num)
- if (num!==-1){
- item.name = item.Serverpart_Name.slice(0,num)
- item.unit = item.Serverpart_Name.slice(num,100)
- }else{
- item.name = item.Serverpart_Name
- }
- item.Revenue_Amount = this.$util.fmoney(item.Revenue_Amount)
- item.Budget_Amount = this.$util.fmoney(item.Budget_Amount)
- })
- this.info = data.Result_Data
- this.info.Budget_Amount = this.$util.fmoney(this.info.Budget_Amount)
- this.info.Revenue_Amount = this.$util.fmoney(this.info.Revenue_Amount)
- this.dataList = data.Result_Data.RegionBudgetList
-
- console.log('data',data)
- }
+ async getDateSecond(){
+ let req = {
+ StatisticsDate:this.date,
+ ProvinceCode:'340000',
+ StatisticsType:4,
+ SPRegionTypeID:this.id
}
+ const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
+ data.Result_Data.RegionBudgetList.forEach(item=>{
+ let num = item.Serverpart_Name.indexOf('服务区')
+ console.log(num)
+ if (num!==-1){
+ item.name = item.Serverpart_Name.slice(0,num)
+ item.unit = item.Serverpart_Name.slice(num,100)
+ }else{
+ item.name = item.Serverpart_Name
+ }
+ item.Revenue_Amount = this.$util.fmoney(item.Revenue_Amount)
+ item.Budget_Amount = this.$util.fmoney(item.Budget_Amount)
+ })
+ this.info = data.Result_Data
+ this.info.Budget_Amount = this.$util.fmoney(this.info.Budget_Amount)
+ this.info.Revenue_Amount = this.$util.fmoney(this.info.Revenue_Amount)
+ this.dataList = data.Result_Data.RegionBudgetList
+ },
+ // 当从年份点进来的时候 片区列表的每一项都可以再次点击 进入到当月的 这个片区下的服务区的列表数据
+ handleDetail(item){
+ uni.navigateTo({
+ url:`/pages/commercialBI/planDetail?type=month&item=${JSON.stringify(item)}&id=${item.Serverpart_ID}&second=${true}&month=${this.month}`
+ })
+ },
+ async handleNoticeText(){
+ let date = new Date(this.lastDay)
+ let y = date.getFullYear()
+ let m = date.getMonth() + 1
+ if(m<10){
+ m = '0'+m
+ }
+ let req = {}
+ if (this.type==='year'){
+ req = {
+ SearchParameter:{
+ STATISTICS_DATE:`${m}`,
+ ANALYSISINS_TYPE:'1012',
+ ANALYSISINS_FORMAT:'3000'
+ },
+ PageIndex:1,
+ PageSize:10
+ }
+ }else{
+ req = {
+ SearchParameter:{
+ STATISTICS_DATE:`${y}-${m}`,
+ ANALYSISINS_TYPE:'1011',
+ ANALYSISINS_FORMAT:'3000',
+ SPREGIONTYPE_ID:this.item.Serverpart_ID
+ },
+ PageIndex:1,
+ PageSize:10
+ }
+ }
+ console.log('req222',req)
+ const data = await request.$webPost('CommercialApi/Analysis/GetANALYSISINSList',req)
+ this.monthText = data.Result_Data.List[0].ANALYSIS_CONTENT
+ this.itemText = data.Result_Data.List[0].ANALYSIS_CONTENT
+ },
+ handleShowNotice(){
+ this.showNotice = true
+ },
+ handleNoShowNotice(){
+ this.showNotice = false
+ },
+ handleShowNoticeYear(){
+ this.showNoticeYear = true
+ },
+ handleNoShowNoticeYear(){
+ this.showNoticeYear = false
+ },
+ async getDateList(){
+ if (this.type==='year'){
+ let req = {
+ StatisticsDate:this.date,
+ ProvinceCode:'340000',
+ StatisticsType:1
+ }
+ console.log('req111',req)
+ const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
+ data.Result_Data.RegionBudgetList.forEach(item=>{
+ let num = item.Serverpart_Name.indexOf('片区')
+ console.log(num)
+ if (num!==-1){
+ item.name = item.Serverpart_Name.slice(0,num)
+ item.unit = item.Serverpart_Name.slice(num,100)
+ }else{
+ item.name = item.Serverpart_Name
+ }
+ item.Revenue_Amount = this.$util.fmoney(item.Revenue_Amount)
+ item.Budget_Amount = this.$util.fmoney(item.Budget_Amount)
+ })
+ this.info = data.Result_Data
+ this.info.Budget_Amount = this.$util.fmoney(this.info.Budget_Amount)
+ this.info.Revenue_Amount = this.$util.fmoney(this.info.Revenue_Amount)
+ this.dataList = data.Result_Data.RegionBudgetList
+ }else{
+ let time = uni.getStorageSync('lastDay')
+ let req = {
+ StatisticsDate:time,
+ ProvinceCode:'340000',
+ StatisticsType:4,
+ SPRegionTypeID:this.id
+ }
+ const data = await request.$webGet('CommercialApi/Revenue/GetProvinceRevenueBudget',req)
+ data.Result_Data.RegionBudgetList.forEach(item=>{
+ let num = item.Serverpart_Name.indexOf('服务区')
+ if (num!==-1){
+ item.name = item.Serverpart_Name.slice(0,num)
+ item.unit = item.Serverpart_Name.slice(num,100)
+ }else{
+ item.name = item.Serverpart_Name
+ }
+ item.Revenue_Amount = this.$util.fmoney(item.Revenue_Amount)
+ item.Budget_Amount = this.$util.fmoney(item.Budget_Amount)
+ })
+ this.info = data.Result_Data
+ this.info.Budget_Amount = this.$util.fmoney(this.info.Budget_Amount)
+ this.info.Revenue_Amount = this.$util.fmoney(this.info.Revenue_Amount)
+ this.dataList = data.Result_Data.RegionBudgetList
+ }
+ }
}
}
@@ -252,12 +399,217 @@ export default {
width: 100%;
box-sizing: border-box;
padding-bottom: calc(8px + env(safe-area-inset-bottom)) ;
+ .thisMonth{
+ margin-bottom: 12px;
+ .titleTop{
+ display: flex;
+ align-items: center;
+ position: relative;
+ .title {
+ font-size: 32rpx;
+ font-family: PingFangSC-Semibold, PingFang SC;
+ font-weight: 600;
+ color: #160002;
+ line-height: 44rpx;
+ }
+ .question{
+ width: 16px;
+ height: 16px;
+ margin-left: 4px;
+ display: flex;
+ align-items: center;
+ image{
+ width: 100%;
+ height: 100%;
+ }
+ }
+ .titleTopNotice{
+ position: absolute;
+ padding: 12px;
+ left:35%;
+ top: 0;
+ width: 50vw;
+ background: #FFFFFF;
+ box-shadow: 0 10px 10px 0 rgba(22,0,2,0.1);
+ z-index: 9999;
+ }
+ .meng{
+ width: 100vw;
+ height: 100vh;
+ position: fixed;
+ top: 0;left: 0;
+ }
+ }
+ .box {
+ width: 100%;
+ padding: 12px 16px;
+ box-sizing: border-box;
+ border-radius: 8px;
+ background: #f5f2f2;
+ margin-top: 12px;
+ .top {
+ width: 100%;
+ display: flex;
+ .big {
+ width: 40px;
+ height: 40px;
+ background: #ffffff;
+ border-radius: 8px;
+ border: 1px solid #ebebeb;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-right: 8px;
+ .icon {
+ width: 20px;
+ height: 20px;
+ }
+ }
+ .text {
+ width: calc(100% - 60px);
+ padding: 2px 0;
+ .textTop{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .left{
+ display: flex;
+ align-items: center;
+ .number {
+ font-size: 36rpx;
+ font-family: DINAlternate-Bold, DINAlternate;
+ font-weight: bold;
+ color: #150002;
+ line-height: 40rpx;
+ }
+ .desc{
+ display: flex;
+ align-items: center;
+ margin-left: 8px;
+ font-size: 14px;
+ color: #FF7043;
+ .success{
+ width: 20px;
+ height: 20px;
+ margin-right: 4px;
+ }
+ }
+ }
+ .right{
+ flex: 1;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ .comparePlan{
+ font-size: 24rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #a69e9f;
+ line-height: 36rpx;
+ white-space: nowrap;
+ }
+ .box2{
+ display: flex;
+ align-items: center;
+ .text{
+ font-size: 14px;
+ font-family: DINAlternate-Bold, DINAlternate;
+ color: #150002;
+ font-weight: bold;
+
+ line-height: 40rpx;
+ }
+ .addIcon {
+ width: 16px;
+ height: 16px;
+ margin-right: 2px;
+ }
+ }
+ }
+ }
+
+ .progressPlan{
+ width: 100%;
+ height: 8px;
+ border-radius: 5px;
+ background: #fff;
+ margin-top: 8px;
+ position: relative;
+ overflow: hidden;
+ .trans{
+ height: 8px;
+ position: absolute;
+ left: 0;top: 0;
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+ background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_orange.png")no-repeat 100% 100%;
+ }
+ .transYear{
+ height: 8px;
+ position: absolute;
+ left: 0;top: 0;
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+ background: url("https://eshangtech.com/ShopICO/ahyd-BID/index/progress_blue.png")no-repeat 100% 100%;
+ }
+ //.img{
+ // width: 100%;
+ // height: 100%;
+ // position: absolute;
+ // top: 0;
+ // left: 0;
+ // z-index:1;
+ //}
+ //.pro{
+ // height: 100%;
+ // position: absolute;
+ // top: 0;right: 0;
+ // background: #fff;
+ // z-index:2;
+ //}
+
+ }
+ }
+ }
+ .bottom {
+ display: flex;
+ margin-top: 16px;
+ padding-left: 48px;
+ .success {
+ .text {
+ font-size: 28rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #786b6c;
+ line-height: 40rpx;
+ margin-bottom: 2px;
+ .unit {
+ font-size: 28rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #a69e9f;
+ line-height: 40rpx;
+ margin-left: 2px;
+ }
+ }
+ .money {
+ font-size: 28rpx;
+ font-family: DINAlternate-Bold, DINAlternate;
+ font-weight: 600;
+ color: #160002;
+ line-height: 40rpx;
+ }
+ }
+ }
+ }
+ }
.list{
width: 100%;
box-sizing: border-box;
padding: 12px;
background: #F5F5F5;
margin-bottom: 12px;
+ border-radius: 8px;
.top{
display: flex;
align-items: center;
@@ -271,12 +623,13 @@ export default {
margin-right: 8px;
}
.title{
- font-size: 14px;
- font-family: PingFangSC-Semibold, PingFang SC;
- font-weight: 600;
- color: #150002;
- line-height: 20px;
+ font-size: 12px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #a69e9f;
+ line-height: 18px;
.name{
+ color: #150002;
font-size: 18px;
}
}
@@ -343,21 +696,21 @@ export default {
.success {
width: calc(50% - 4px);
display: flex;
- p{
+ align-items: center;
+ .text{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #a69e9f;
- line-height: 18px;
+ line-height: 20px;
}
.money {
margin-left: 8px;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
- color: #160002;
+ color: #a69e9f;
line-height: 20px;
-
}
}
}
diff --git a/pages/commercialBI/planMonth.vue b/pages/commercialBI/planMonth.vue
index 6390c93..c056e49 100644
--- a/pages/commercialBI/planMonth.vue
+++ b/pages/commercialBI/planMonth.vue
@@ -6,7 +6,7 @@
-
+
{{monthNoticeText}}