Browse Source

月度采购金额

twt 3 years ago
parent
commit
a51dddd474

+ 28 - 4
operatingCompany/pages/entryReport/entered.vue

@@ -126,7 +126,7 @@
 			},
 			goTx(item,i,index){
 				uni.navigateTo({
-					url:'entryredItem?name='+item.checkName+'&index1='+i+'&index2='+index
+					url:'entryredItem?name='+item.checkName+'&index1='+i+'&index2='+index+'&shopId='+this.shopId
 				})
 				
 			},
@@ -191,7 +191,16 @@
 								isRequired:v.isRequired,
 								itemList:[]
 							}
-							
+							if(v.isPurchase){
+								sectionListobj.isPurchase=v.isPurchase
+								sectionListobj.year=v.year
+								sectionListobj.eurYear=v.eurYear
+								sectionListobj.month=v.month
+								sectionListobj.eurMonth=v.eurMonth
+								sectionListobj.eurPercent=v.eurPercent
+								sectionListobj.yearPercent=v.yearPercent
+								sectionListobj.level=v.level
+							}
 							
 							v.itemList.forEach(i=>{
 								//if()
@@ -203,6 +212,7 @@
 									keyType:i.keyType,
 									keyValue:i.keyValue,
 								}
+								
 								if(!itemObj.itemValue&&itemObj.itemValue!==0){
 									itemObj.itemValue=''
 								}
@@ -241,14 +251,18 @@
 					}
 					uni.showLoading({ });
 					var checkTime=this.date;//+' 00:00:00'
-					this.$http('accompany/SuperCheckSheet/addSuperCheckSheet', {
+					var params={
 						shopID:this.shopId,
 						shopName:this.ShopName,
 						checkTime:checkTime,
 						packageID:this.packageID,
 						packageName:this.packageName,
 						categoryList:JSON.stringify(categoryList)
-					}, 'POST').then(res => {
+					}
+					//if(this.yuedu)
+					this.$http('accompany/SuperCheckSheet/addSuperCheckSheet', 
+						params
+					, 'POST').then(res => {
 						this.sheetID=res.data;
 						this.editType=2;
 						uni.navigateTo({
@@ -288,6 +302,16 @@
 							id:v.id,
 							itemList:[]
 						}
+						if(v.isPurchase){
+							sectionListobj.isPurchase=v.isPurchase
+							sectionListobj.year=v.year
+							sectionListobj.eurYear=v.eurYear
+							sectionListobj.month=v.month
+							sectionListobj.eurMonth=v.eurMonth
+							sectionListobj.eurPercent=v.eurPercent
+							sectionListobj.yearPercent=v.yearPercent
+							sectionListobj.level=v.level
+						}
 						/* if(v.isRequired==1){
 							if(!v.check){
 								go=false

+ 80 - 0
operatingCompany/pages/entryReport/entryredItem.vue

@@ -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>

+ 9 - 2
operatingCompany/pages/entryReport/opinion.vue

@@ -12,8 +12,12 @@
 				<view class="lineContRight"  @click="pickerClick(item)">
 					<picker mode="multiSelector" @change="bindPickerChange" @columnchange="columnchange" :value="index" :range="array"
 						 range-key="title">
-						<view class="timeNoSpan" v-if="!item.checkName">{{title}}</view>
-					    <view v-else>{{item.categoryName}}-{{item.checkName}}</view>
+						 <view class="uni-picker">
+							 <view class="timeNoSpan jcxTitle" v-if="!item.checkName">{{title}}</view>
+							 <view v-else class="jcxTitle">{{item.categoryName}}-{{item.checkName}}</view>
+							 <image src="../../static/img/jiantou.png" mode="" class="jiantouImg"></image>
+						 </view>
+						
 					</picker>
 					
 				</view>
@@ -475,4 +479,7 @@
 		font-size: 24rpx;
 		padding: 0 24rpx;
 	}
+	.jcxTitle{
+		width: 500rpx;
+	}
 </style>

+ 56 - 3
operatingCompany/pages/reportManage/reportDetail.vue

@@ -105,6 +105,29 @@
 								
 							</view>
 						</view>
+						<!-- 月度采购金额 -->
+						<view class="boxLine2" v-if="list.isPurchase==1">
+							<view class="cgline">
+								<view class="cglineName">当月采购额</view>
+								<view class="cglineRight">¥{{list.month}}</view>
+							</view>
+							<view class="cgline">
+								<view class="cglineName">当月欧洲维修采购额</view>
+								<view class="cglineRight">¥{{list.eurMonth}}</view>
+							</view>
+							<view class="cgline">
+								<view class="cglineName">当年总采购额</view>
+								<view class="cglineRight">¥{{list.year}}</view>
+							</view>
+							<view class="cgline">
+								<view class="cglineName">总采购额完成率</view>
+								<view class="cglineRight">{{list.yearPercent}}%</view>
+							</view>
+							<view class="cgline">
+								<view class="cglineName">欧洲维修占比</view>
+								<view class="cglineRight" :class="{green:list.level==1,yellow:list.level==2,red:list.level==3,}">{{list.eurPercent}}%</view>
+							</view>
+						</view>
 					</view>
 				</view>
 				
@@ -113,10 +136,11 @@
 			<view class="suggestList" v-if="tabIndex==2">
 				<view class="suggestLine" v-for="(item,index) in info.suggestList">
 					<view class="suggestLineTop">建议({{index+1}})</view>
-					<view class="suggestCont">{{item.suggest}}</view>
-					<view class="suggestCont" style="padding-top: 0;">
-						<view class="">检测项:{{item.categoryName}}-{{item.checkName}}</view>
+					<view class="suggestCont" style="color: #666666;font-size: 26rpx;">
+						<view class="">{{item.categoryName}}-{{item.checkName}}</view>
 					</view>
+					<view class="suggestCont"  style="padding-top: 0;">{{item.suggest}}</view>
+					
 					<view class="suggestLineBottom" style="padding-bottom: 20rpx;border-bottom: 1px solid #EEEEEE;">
 						<view class="suggestLineBottomTxt">预计完成日期:{{item.orderFinishTime.slice(0,item.orderFinishTime.length-8)}}</view>
 						<view class="suggestLineBottomTxt">负责人:{{item.managerName}}</view>
@@ -987,4 +1011,33 @@
 	.remarksLineTopXxbox{
 		padding-top: 5rpx;
 	}
+	.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>