Explorar el Código

点检配置详情

lilei hace 4 años
padre
commit
fb2cd5f18b

+ 12 - 90
pages/spotCheckConfigure/spotCheckDetail/evaluateItemDetail.vue

@@ -1,101 +1,23 @@
 <template>
-	<view class="kp-details">
-		<!-- 考评项 -->
-		<view class="kp-tabsBox">
-			<view class="kp-tabs">
-				<view class="active">
-					<view>正常营业</view>
-					<view>(4项)</view>
-				</view>
-				<view>
-					<view>正常营业</view>
-					<view>(4项)</view>
-				</view>
-				<view>
-					<view>正常营业</view>
-					<view>(4项)</view>
-				</view>
-			</view>
-			<view class="kp-items">
-				<view>
-					<view v-for="item in items" :key="item.id" class="checkbox-item">
-						{{item.name}}
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
+	<uni-check-list :listData="list" titleKeys="targetName" types="views"></uni-check-list>
 </template>
 
 <script>
-	export default{
-		data(){
-			return{
-				items: [
-					{name:"正常营业"},
-					{name:"干净整洁"},
-					{name:"晨会正常"},
-				]
+	export default {
+		data() {
+			return {
+				list: [],
 			}
 		},
-		methods:{
+		onLoad(options) {
+			this.list = JSON.parse(options.item)
+		},
+		methods: {
+			
 		}
 	}
 </script>
 
-<style lang="scss">
-	page{
-		height: 100%;
-		background: #F8F8F8;
-	}
-	.kp-details{
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		.kp-tabsBox{
-			flex-grow: 1;
-			overflow: auto;
-			display: flex;
-			.kp-tabs{
-				width: 30%;
-				text-align: center;
-				margin: 15upx;
-				> view{
-					padding: 15upx;
-					background: #fff;
-					border-radius: 6upx;
-					box-shadow: 1px 2px 3px #eee;
-					margin-bottom: 15upx;
-					> view{
-						&:last-child{
-							color: #666;
-						}
-					}
-				}
-				> view.active{
-					background: #00aaff;
-					color: #fff;
-					> view{
-						&:last-child{
-							color: #fff;
-						}
-					}
-				}
-			}
-			.kp-items{
-				width: 70%;
-				margin: 15upx 15upx 15upx 6upx;
-			}
-		}
-		.checkbox-item{
-			width:100%;
-			padding: 15upx;
-			border-radius: 6upx;
-			box-shadow: 1px 2px 3px #eee;
-			background: #fff;
-			display: flex;
-			justify-content: space-between;
-			margin-bottom: 15upx;
-		}
-	}
+<style>
+
 </style>

+ 0 - 56
pages/spotCheckConfigure/spotCheckDetail/evaluateStoreDetail.vue

@@ -1,56 +0,0 @@
-<template>
-	<!-- <uni-check-list :listData="list" types="checkbox" @ok="chooseOk" :showArrow="false">
-	</uni-check-list> -->
-	<view class="store-all">
-		<view>
-			<view v-for="item in items" :key="item.id" class="checkbox-item">
-				{{item.name}}
-			</view>
-		</view>
-	</view>
-	
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				items: [
-					{name:"常青二路"},
-					{name:"世家星城"},
-					{name:"咸宁东路"},
-				]
-			}
-		},
-		methods: {
-		}
-	}
-</script>
-
-<style lang="scss">
-	page{
-		height: 100%;
-	}
-	.store-all{
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		.uni-list{
-			width: 100%;
-			flex-grow: 1;
-			overflow: auto;
-			
-		}
-		
-	}
-	.checkbox-item{
-		width:100%;
-		padding: 15upx 30upx;
-		border-bottom: 1px solid #eee;
-		background: #fff;
-		display: flex;
-		justify-content: space-between;
-		margin-bottom: 15upx;
-	}
-	
-</style>

+ 5 - 5
pages/spotCheckConfigure/spotCheckDetail/spotCheckDetail.vue

@@ -28,14 +28,14 @@
 			<view class="content-item">
 				<text>考评指标</text>
 				<view style="color: #007AFF;" >
-					{{pageData.assessTargetIds.length}} 项 
+					{{pageData.assessTargetList.length}} 项 
 					<u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888" @click="openZBpage"></u-icon>
 				</view>
 			</view>
 			<view class="content-item">
 				<text>考评门店</text>
 				<view style="color: #007AFF;">
-					{{pageData.storeIdList.length}} 个 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888" @click="viewStores"></u-icon>
+					{{pageData.storeList.length}} 个 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888" @click="viewStores"></u-icon>
 				</view>
 			</view>
 			<view class="content-item">
@@ -77,15 +77,15 @@
 			},
 			// 考评指标选择
 			openZBpage() {
-				let item = this.pageData.assessTargetIds
+				let item = this.pageData.assessTargetList
 				if(item.length>0){
 					uni.navigateTo({
-						url: '/pages/userCenter/viewStores?item='+encodeURIComponent(JSON.stringify(item))
+						url: '/pages/spotCheckConfigure/spotCheckDetail/evaluateItemDetail?item='+encodeURIComponent(JSON.stringify(item))
 					})
 				}
 			},
 			viewStores(){
-				let item = this.pageData.storeIdList
+				let item = this.pageData.storeList
 				if(item.length>0){
 					uni.navigateTo({
 						url: '/pages/userCenter/viewStores?item='+encodeURIComponent(JSON.stringify(item))