1.31 财务分析,财务数据模块完善,产业链桑基图展示

This commit is contained in:
尚政杰
2026-01-31 17:19:16 +08:00
parent 1c13386dfc
commit 0a2dab4936
527 changed files with 3390 additions and 604 deletions

View File

@@ -0,0 +1 @@
"use strict";const t=require("../../common/vendor.js"),e=require("../../common/assets.js"),a={name:"LCCalendar",data:()=>({weekList:["日","一","二","三","四","五","六"],monthDateList:[],selectMonthIndex:0,selectMonth:"",selectDateStr:"",startDateStr:"",endDateStr:""}),created(){let t=new Date,e=t.getFullYear(),a=t.getMonth()+1,s=t.getDate();this.selectMonthIndex=240+a-1,this.selectMonth=e+"年"+a+"月",this.startDateStr=e+"-"+(a>9?a:"0"+a)+"-01",this.endDateStr=this.selectDateStr=e+"-"+(a>9?a:"0"+a)+"-"+(s>9?s:"0"+s),this.generateMonthDateListData(),this.$emit("date-change",this.selectDateStr)},methods:{getYesterdayDateData(){let t=new Date(new Date);t.setDate(t.getDate()-1);let e=t.getFullYear(),a=t.getMonth()+1,s=t.getDate();this.selectDateStr=e+"-"+(a>9?a:"0"+a)+"-"+(s>9?s:"0"+s),this.$emit("date-change",this.selectDateStr)},generateMonthDateListData(){let t=new Date,e=t.getFullYear(),a=t.getMonth()+1,s=t.getDate(),n=[];for(var h=e-20;h<e+20;h++)for(var o=0;o<12;o++){let t=new Date(h,o+1,0),r=new Date(h,o+1,0);r.setDate(1);let l=t.getDate(),D=r.getDay()+1,c=[];for(var i=1;i<=l;i++){let t=new Date(h,o+1,0);t.setDate(i);let n=t.getMonth()+1,r=t.getDate(),D=t.getTime(),d=h+"-"+(n>9?n:"0"+n)+"-"+(r>9?r:"0"+r);c.push({date:d,year:h,month:n,day:r,isToday:h==e&&n==a&&r==s,isCurrentMonth:!0,isLastDay:r==l,timestamp:D})}for(i=0;i<D-1;i++){let t=h,e=o;o<1&&(t=h-1,e=12);let a=new Date(t,e,0).getDate(),s=new Date(t,e-1,a-i),n=s.getMonth()+1,r=s.getDate(),l=s.getTime(),D=t+"-"+(n>9?n:"0"+n)+"-"+(r>9?r:"0"+r);c.unshift({date:D,year:t,month:n,day:r,isToday:!1,isCurrentMonth:!1,isLastDay:!1,timestamp:l})}let d=new Date(h,o+1,1),g=new Date(d-864e5).getDay()+1;for(i=1;i<8-g;i++){let t=h,e=o;e>11&&(e=0,t++);let a=new Date(t,e+1,i),s=a.getMonth()+1,n=a.getDate(),r=a.getTime(),l=t+"-"+(s>9?s:"0"+s)+"-"+(n>9?n:"0"+n);c.push({date:l,year:t,month:s,day:n,isToday:!1,isCurrentMonth:!1,isLastDay:!1,timestamp:r})}n.push(c)}this.monthDateList=n},clickPreMonth(){if(this.selectMonthIndex>0){this.selectMonthIndex--;let t=this.monthDateList[this.selectMonthIndex],e="",a="";for(let n of t)if(n.isCurrentMonth){e=n.year,a=n.month;break}let s="";for(let n of t)if(n.isLastDay){s=n.day;break}this.selectMonth=e+"年"+a+"月",this.startDateStr=e+"-"+(a>9?a:"0"+a)+"-01",this.endDateStr=e+"-"+(a>9?a:"0"+a)+"-"+s,console.log("点击上个月")}},clickNextMonth(){if(this.selectMonthIndex<this.monthDateList.length-1){this.selectMonthIndex++;let t=this.monthDateList[this.selectMonthIndex],e="",a="";for(let n of t)if(n.isCurrentMonth){e=n.year,a=n.month;break}let s="";for(let n of t)if(n.isLastDay){s=n.day;break}this.selectMonth=e+"年"+a+"月",this.startDateStr=e+"-"+(a>9?a:"0"+a)+"-01",this.endDateStr=e+"-"+(a>9?a:"0"+a)+"-"+s,console.log("点击下个月")}},monthChange(t){let e=(new Date).getFullYear(),a=t.detail.value,s=parseInt(a.split("-")[0]),n=parseInt(a.split("-")[1]);this.selectMonthIndex=12*(s-(e-20))+n-1,this.selectMonth=s+"年"+n+"月",this.startDateStr=s+"-"+(n>9?n:"0"+n)+"-01";let h=new Date(s,n,0);this.endDateStr=s+"-"+(n>9?n:"0"+n)+"-"+h.getDate(),console.log("月份变更")},clickSelectDate(t){t.isCurrentMonth&&this.selectDateStr!=t.date&&(this.selectDateStr=t.date,this.chgStockData=t,console.log("点击某天"),this.$emit("date-change",this.selectDateStr))}}};const s=t._export_sfc(a,[["render",function(a,s,n,h,o,i){return{a:e._imports_0$1,b:t.o((t=>i.clickPreMonth())),c:t.t(o.selectMonth),d:t.o(((...t)=>i.monthChange&&i.monthChange(...t))),e:e._imports_1$2,f:t.o((t=>i.clickNextMonth())),g:t.f(o.weekList,((e,a,s)=>({a:t.t(e),b:a}))),h:t.f(o.monthDateList[o.selectMonthIndex],((e,a,s)=>t.e({a:e.date==o.selectDateStr},e.date==o.selectDateStr?{b:t.t(e.day),c:t.n("date select up")}:t.e({d:!e.isCurrentMonth},e.isCurrentMonth?{f:t.t(e.day),g:t.n("date up")}:{e:t.t(e.day)}),{h:a,i:t.o((t=>i.clickSelectDate(e)),a)})))}}]]);wx.createComponent(s);

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="dateC"><view class="yearMonthC flex"><view class="btn" bindtap="{{b}}"><image class="icon" src="{{a}}" mode="widthFix"></image></view><view class="yearMonth flex1"><picker mode="date" fields="month" bindchange="{{d}}"><view style="display:flex;align-items:center;justify-content:center"><view style="color:#2B2B2B;font-size:32rpx;font-weight:bold">{{c}}</view></view></picker></view><view class="btn" bindtap="{{f}}"><image class="icon" src="{{e}}" mode="widthFix"></image></view></view><view style="display:grid;grid-template-columns:repeat(7, 1fr);gap:17rpx;margin:20rpx 0"><view wx:for="{{g}}" wx:for-item="item" wx:key="b" style="display:flex;align-items:center;justify-content:center;font-size:24rpx;color:#292621;font-weight:500">{{item.a}}</view></view><view class="monthDateList" style="display:grid;grid-template-columns:repeat(7, 1fr);gap:17rpx"><view wx:for="{{h}}" wx:for-item="item" wx:key="h" class="item" bindtap="{{item.i}}"><block wx:if="{{item.a}}"><view class="{{item.c}}">{{item.b}}</view></block><block wx:else><block wx:if="{{item.d}}"><view class="date notCurrentMonth">{{item.e}}</view></block><block wx:else><view class="{{item.g}}"><view>{{item.f}}</view></view></block></block></view></view></view>

View File

@@ -0,0 +1 @@
.dateC{background-color:#fff;box-sizing:border-box}.dateC .yearMonthC{background-color:#f7f7f7;height:70rpx;border-radius:35rpx}.dateC .yearMonthC .btn{padding:0 32rpx}.dateC .yearMonthC .btn .icon{width:13rpx;height:auto}.dateC .yearMonthC .yearMonth{font-size:32rpx;font-weight:500;color:#070707;text-align:center}.dateC .weekList .item{line-height:72rpx;font-size:26rpx;font-weight:500;color:#a7a7a7;text-align:center}.dateC .monthDateList .item{height:72rpx}.dateC .monthDateList .item .date{background-color:#f8f8f8;padding:10rpx 0;border-radius:10rpx;font-size:26rpx;font-weight:700;color:#2a2a2a;display:flex;align-items:center;justify-content:center;flex-direction:column;height:100%}.dateC .monthDateList .item .date .chg{font-size:18rpx}.dateC .monthDateList .item .date .chg.up{color:#ec3440}.dateC .monthDateList .item .date .chg.down{color:#38a169}.dateC .monthDateList .item .date.up{background-color:#f8f8f8}.dateC .monthDateList .item .date.down{background-color:#cef1de}.dateC .monthDateList .item .date.select.up{background-color:#f2c367;color:#fff}.dateC .monthDateList .item .date.select.up .chg{color:#fff}.dateC .monthDateList .item .date.select.down{background-color:#38a169;color:#fff}.dateC .monthDateList .item .date.select.down .chg{color:#fff}.dateC .monthDateList .item .date.notCurrentMonth{background-color:#fcfcfc;color:#999}