|
@@ -2,6 +2,28 @@
|
|
|
<view class="content">
|
|
|
<view style="height: 20rpx;background: #F4F5F7;"></view>
|
|
|
<view class="box">
|
|
|
+ <view class="boxLine2" v-if="yuedu&&yueduData.isMall==1">
|
|
|
+ <view class="cgline">
|
|
|
+ <view class="cglineName">当月采购额</view>
|
|
|
+ <view class="cglineRight">¥{{yueduData.month}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="cgline">
|
|
|
+ <view class="cglineName">当月欧洲维修采购额</view>
|
|
|
+ <view class="cglineRight">¥{{yueduData.eurMonth}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="cgline">
|
|
|
+ <view class="cglineName">当年总采购额</view>
|
|
|
+ <view class="cglineRight">¥{{yueduData.year}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="cgline">
|
|
|
+ <view class="cglineName">总采购额完成率</view>
|
|
|
+ <view class="cglineRight">{{yueduData.yearPercent}}%</view>
|
|
|
+ </view>
|
|
|
+ <view class="cgline">
|
|
|
+ <view class="cglineName">欧洲维修占比</view>
|
|
|
+ <view class="cglineRight" :class="{green:yueduData.level==1,yellow:yueduData.level==2,red:yueduData.level==3,}">{{yueduData.eurPercent}}%</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="boxLine" v-for="(item,index) in categoryList[index1].sectionList[index2].itemList">
|
|
|
<view class="boxLineTop">
|
|
|
<view class="itemName">{{item.itemName}}</view>
|
|
@@ -51,15 +73,24 @@
|
|
|
index2:'',
|
|
|
categoryList:'',
|
|
|
pickerItem:'',
|
|
|
+ yuedu:false,
|
|
|
+ shopId:'',
|
|
|
+ yueduData:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
|
var name = opt.name;
|
|
|
+ this.shopId=opt.shopId;
|
|
|
+ if(name=='月度采购金额'){
|
|
|
+ this.yuedu=true;
|
|
|
+ this.getqueryMonthPurchase()
|
|
|
+ }
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: name
|
|
|
})
|
|
|
this.index1=opt.index1;
|
|
|
this.index2=opt.index2;
|
|
|
+
|
|
|
console.log(this.$store.state.categoryList)
|
|
|
this.categoryList=this.$store.state.categoryList;
|
|
|
this.categoryList[this.index1].sectionList.forEach(v=>{
|
|
@@ -244,10 +275,30 @@
|
|
|
}
|
|
|
//return false;
|
|
|
this.categoryList[this.index1].sectionList[this.index2].check=true;
|
|
|
+ if(this.yuedu){
|
|
|
+ if(this.yueduData.isMall==1){
|
|
|
+ this.categoryList[this.index1].sectionList[this.index2].isPurchase=1;
|
|
|
+ this.categoryList[this.index1].sectionList[this.index2].year=this.yueduData.year;
|
|
|
+ this.categoryList[this.index1].sectionList[this.index2].eurYear=this.yueduData.eurYear;
|
|
|
+ this.categoryList[this.index1].sectionList[this.index2].month=this.yueduData.month;
|
|
|
+ this.categoryList[this.index1].sectionList[this.index2].eurMonth=this.yueduData.eurMonth;
|
|
|
+ this.categoryList[this.index1].sectionList[this.index2].eurPercent=this.yueduData.eurPercent;
|
|
|
+ this.categoryList[this.index1].sectionList[this.index2].yearPercent=this.yueduData.yearPercent;
|
|
|
+ this.categoryList[this.index1].sectionList[this.index2].level=this.yueduData.level;
|
|
|
+ }
|
|
|
+ }
|
|
|
uni.navigateBack({
|
|
|
delta:1
|
|
|
})
|
|
|
this.$store.commit('mutationsCategoryList',this.categoryList)
|
|
|
+ },
|
|
|
+ getqueryMonthPurchase(){
|
|
|
+ this.$http('accompany/SuperCheckSheet/queryMonthPurchase', {
|
|
|
+ shopId:this.shopId,
|
|
|
+
|
|
|
+ }, 'GET').then(res => {
|
|
|
+ this.yueduData=res.data
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -371,4 +422,33 @@
|
|
|
margin-top: 24rpx;
|
|
|
margin-left: 24rpx;
|
|
|
}
|
|
|
+ .boxLine2{
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ }
|
|
|
+ .cgline{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 15rpx 0;
|
|
|
+ }
|
|
|
+ .cglineName{
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #666666;
|
|
|
+ line-height: 40rpx;
|
|
|
+ }
|
|
|
+ .cglineRight{
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #3C3C3C;
|
|
|
+ line-height: 40rpx;
|
|
|
+ }
|
|
|
+ .green{
|
|
|
+ color:#00A040 ;
|
|
|
+ }
|
|
|
+ .yellow{
|
|
|
+ color: #F19D01;
|
|
|
+ }
|
|
|
+ .red{
|
|
|
+ color:#FF3B30 ;
|
|
|
+ }
|
|
|
</style>
|