zhangdan 4 years ago
parent
commit
0f44941348

+ 118 - 0
components/select/v-select.vue

@@ -0,0 +1,118 @@
+<template>
+	<picker @change="toChange" :value="index" :range="datalist" range-key="dispName">
+		<view style="display: flex;align-items: center;">
+			<input class="form-input" :disabled="disabled" v-model="selected" placeholder-class="form-input-placeholder" :placeholder="getPlaceholderText" />
+			<uni-icons type="arrowright"></uni-icons>
+		</view>
+	</picker>
+</template>
+
+<script>
+import { getLookUpDatas, listLookUp } from '@/api/data'
+export default {
+  name: 'v-select',
+  data () {
+    return {
+      selected: '',
+      datalist: [],
+      placeholderText: '请选择',
+      lookUp: [],
+	  index: 0
+    }
+  },
+  props: {
+    disabled: {
+      type: [Boolean, String],
+      default: false
+    },
+    multiple: {
+      type: [Boolean, String],
+      default: false
+    },
+    value: [String, Number, Array],
+    code: {
+      type: String,
+      required: true
+    },
+    placeholder: {
+      type: String,
+      default: ''
+    },
+    size: [String]
+  },
+  computed: {
+    getVal () {
+      return this.value
+    },
+    getPlaceholderText () {
+      let _this = this
+      for (let i = 0; i < _this.lookUp.length; i++) {
+        if (_this.lookUp[i].code == _this.code) {
+          if (this.placeholder === '') _this.placeholderText = _this.lookUp[i].name
+          break
+        }
+      }
+      return _this.placeholderText
+    }
+  },
+  created () {
+    if (this.code) {
+      if (this.placeholder) {
+        this.placeholderText = this.placeholder
+      }
+      getLookUpDatas({
+        type: this.code
+      }).then(result => {
+		  console.log(result, 'result')
+        if (result && result.status + '' === '200') {
+          this.datalist = result.data
+          
+        }
+      })
+    } else {
+      // console.log('请确认传递类型')
+    }
+    // 获取所有数据字典
+    this.lookUp = this.$store.state.vuex_allLookUp
+  },
+  methods: {
+    getDataList (){
+      return this.datalist
+    },
+    getOptionName (val) {
+      return this.datalist.find((item) => {
+        return item.code == val
+      })
+    },
+    getCodeByName (dispName) {
+      return this.datalist.find((item) => {
+        return item.dispName == dispName
+      })
+    },
+	resetVal(){
+		this.selected = ''
+		this.index = 0
+	},
+	// 赋值
+	setVal(code){
+		let index = this.datalist.findIndex(item=>{
+			return item.code == code
+		})
+		console.log(this.datalist,code,index)
+		this.index = index
+		this.selected = this.datalist[index].dispName
+	},
+    toChange (e) {
+		console.log('picker发送选择改变,携带值为', e.target.value)
+		this.index = e.target.value
+		this.selected = this.datalist[this.index].dispName
+        this.$emit('itemChange', this.datalist[this.index].code)
+    }
+  }
+
+}
+</script>
+
+<style scoped>
+
+</style>

+ 156 - 0
components/uni-multiple-picker/uni-multiple-picker.vue

@@ -0,0 +1,156 @@
+<template>
+	<u-popup v-model="isShow" class="uni-multiple-picker" @close="cancel" mode="bottom">
+		<view class="u-multiple-picker-header flex justify_between align_center">
+			<text class="multiple-picker-btn" @click="cancel">取消</text>
+			<text class="multiple-picker-btn color-blue" @click="confirm">确定</text>
+		</view>
+		<u-row class="choose-info">
+			<u-col :span="3">当前已选:</u-col>
+			<u-col :span="9" class="choose-info-item">{{nowChooseItem}}</u-col>
+		</u-row>
+		<scroll-view class="picker-content" scroll-y>
+			<view class="picker-main">
+				<view class="picker-main-item" v-for="(item, index) in listData" :key="item.id" @click="chooseItem(index)">
+					<view class="item-name">{{item.name}}</view>
+					<u-icon v-show="item.checked==true" class="item-icon" name="checkbox-mark" color="#2979ff" size="28"></u-icon>
+				</view>
+				<view v-if="listData && listData.length == 0">
+					<u-empty text="数据为空" mode="list" :img-width="200" :margin-top="-60"></u-empty>
+				</view>
+			</view>
+		</scroll-view>
+	</u-popup>
+</template>
+
+<script>
+	export default{
+		props: {
+			show: {
+				type: Boolean,
+				default: false
+			},
+			dataList: {
+				type: Array,
+				default: ()=>{
+					return []
+				}
+			}
+		},
+		watch: {
+			show (newValue, oldValue) {
+				this.isShow = newValue
+			},
+			dataList (newValue, oldValue) {
+				this.listData = newValue
+				this.init()
+			},
+		},
+		computed: {
+			nowChooseItem: function() {
+				let str = ''
+				this.listData.map(item => {
+					if(item.checked){
+						str += item.name + ',';
+					}
+				})
+				str = str == '' ? '' : str.substring(0,str.length - 1)
+				return str
+			},
+			nowChooseItemArr: function() {
+				let arr = []
+				this.listData.map(item => {
+					if(item.checked){
+						arr.push({id: item.id, name: item.name})
+					}
+				})
+				return arr
+			},
+		},
+		data(){
+			return{
+				isShow: this.show,
+				listData: this.dataList || [],
+			}
+		},
+		methods: {
+			init(){
+				this.listData.map((item, ind) => {
+					this.$set(this.listData[ind], 'checked', false)
+				})
+			},
+			//  选择
+			chooseItem(ind){
+				this.$set(this.listData[ind], 'checked', !this.listData[ind].checked)
+			},
+			//  确定
+			confirm(){
+				this.$emit('confirm', this.nowChooseItemArr)
+			},
+			//  取消
+			cancel(){
+				this.$emit('cancel')
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.uni-multiple-picker{
+		.u-multiple-picker-header{
+			padding: 20upx 30upx;
+			position: relative;
+			display: flex;
+			justify-content: space-between;
+			.multiple-picker-btn{
+				color: rgb(96, 98, 102);
+			}
+			.color-blue{
+				color: #2979ff;
+			}
+		}
+		.u-multiple-picker-header:after{
+			content: "";
+			position: absolute;
+			border-bottom: 1px solid #eaeef1;
+			-webkit-transform: scaleY(.5);
+			transform: scaleY(.5);
+			bottom: 0;
+			right: 0;
+			left: 0;
+		}
+		.choose-info{
+			padding: 14upx 30upx 14upx;
+			color: rgb(96, 98, 102);
+			.choose-info-item{
+				color: #2979ff;
+			}
+		}
+		.picker-content{
+			height: 300upx;
+			padding: 6upx 0 20upx;
+			position: relative;
+			.picker-main{
+				position: absolute;
+				top: 50%;
+				left: 50%;
+				transform: translate(-50%,-50%);
+				width: 100%;
+				max-height: 300upx;
+				.picker-main-item{
+					position: relative;
+					padding: 0 30upx;
+					.item-name{
+						padding: 14upx 0;
+						text-align: center;
+						// border-bottom: 1upx dashed #efefef;
+					}
+					.item-icon{
+						position: absolute;
+						right: 100upx;
+						top: 19upx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 33 - 58
pages.json

@@ -37,24 +37,6 @@
 				"navigationBarTitleText": "智能巡店"
 			}
 		},
-		{
-			"path": "pages/videoShopTour/videoShopTour",  //  视频巡店
-			"style": {
-				"navigationBarTitleText": "视频巡店"
-			}
-		},
-		{
-			"path": "pages/searchPage/searchPage",  //  搜索 - 根据门店名称搜索
-			"style": {
-				"navigationBarTitleText": "搜索"
-			}
-		},
-		{
-			"path": "pages/organization/organization",  //  搜索 - 根据组织机构搜索
-			"style": {
-				"navigationBarTitleText": "搜索"
-			}
-		},
 		{
 		    "path" : "pages/shopTour/shopTour",
 		    "style" : {
@@ -121,27 +103,15 @@
 		    "style": {
 		    	"navigationStyle": "custom" ,// 隐藏系统导航栏
 		    	"navigationBarTextStyle": "white", // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
-		    	"navigationBarTitleText": "我的巡店"
+		    	"navigationBarTitleText": "预览"
 		    }
 		},
-		{
-		    "path" : "pages/shopTourRecord/shopTourRecord",  //  巡店记录
-		    "style" : {
-				"navigationBarTitleText": "巡店记录"
-			}
-		},
 		{
 		    "path" : "pages/shopTourDetails/shopTourDetails",  //  现场巡店-巡店详情
 		    "style" : {
 				"navigationBarTitleText": "巡店详情"
 			}
 		},
-		{
-		    "path" : "pages/spotCheckDetails/spotCheckDetails",  //  点检详情
-		    "style" : {
-				"navigationBarTitleText": "点检详情"
-			}
-		},
 		{
 		    "path" : "pages/spotCheckConfigure/spotCheckList",
 		    "style": {
@@ -160,6 +130,36 @@
 		    	"navigationBarTitleText": "新增点检任务"
 		    }
 		},
+		{
+		    "path" : "pages/spotCheckConfigure/spotCheckDetail/spotCheckDetail",
+		    "style": {
+		    	"navigationBarTitleText": "点检任务详情"
+		    }
+		},
+		{
+		    "path" : "pages/spotCheckConfigure/spotCheckDetail/evaluateItemDetail",
+		    "style": {
+		    	"navigationBarTitleText": "考评指标详情"
+		    }
+		},
+		{
+		    "path" : "pages/spotCheckConfigure/spotCheckDetail/evaluateStoreDetail",
+		    "style": {
+		    	"navigationBarTitleText": "考评门店详情"
+		    }
+		},
+		{
+		    "path" : "pages/spotCheckConfigure/evaluateItem",
+		    "style": {
+		    	"navigationBarTitleText": "考评指标"
+		    }
+		},
+		{
+		    "path" : "pages/spotCheckConfigure/evaluateStore",
+		    "style": {
+		    	"navigationBarTitleText": "考评门店"
+		    }
+		},
 		{
             "path" : "pages/userCenter/userCenter",
             "style" : {
@@ -167,9 +167,9 @@
 			}
         },
 		{
-			"path": "pages/userCenter/personInfo",		//  我的>个人信息
+			"path": "pages/userCenter/personInfo",		//  我的>员工信息
 			"style": {
-				"navigationBarTitleText": "个人信息"
+				"navigationBarTitleText": "员工信息"
 			}
 		},
 		{
@@ -184,31 +184,6 @@
 				"navigationBarTitleText": "修改密码"
 			}
 		}
-        ,{
-            "path" : "pages/userCenter/viewStores",
-            "style" : {
-				"navigationBarTitleText": "可点检门店"
-			}
-        },
-		{
-			"path": "pages/toDoList/toDoList",		//  待办单>待办单列表
-			"style": {
-				"navigationStyle": "custom" ,// 隐藏系统导航栏
-				"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
-			}
-		}
-        ,{
-            "path" : "pages/spotCheckCenter/spotChecking",
-            "style" : {
-				"navigationBarTitleText": "点检中心"
-			}
-        }
-        ,{
-            "path" : "pages/spotCheckCenter/spotCheckResult",
-            "style" : {
-				"navigationBarTitleText": "点检结果"
-			}
-        }
     ],
 	"globalStyle": {
 		"navigationBarTitleText": "智能巡店",

+ 228 - 31
pages/spotCheckConfigure/addSpotCheck.vue

@@ -2,57 +2,243 @@
 	<view class="pageInfo">
 		<view>
 			<u-form :model="form" ref="uForm">
-				<u-form-item label="任务名称" label-width="160rpx"><u-input v-model="form.name" /></u-form-item>
-				<u-form-item label="任务周期" label-width="160rpx"><u-select v-model="form.name" :show="show" mode="single-column" :list="list" @confirm="confirm"></u-select>
-				<!-- <u-icon name="arrow-right" @click="openSeleteType"></u-icon> -->
+				<u-form-item label="任务名称" label-width="160rpx" prop="name">
+					<u-input v-model="form.name" maxlength="30"/>
 				</u-form-item>
-				<u-form-item label="执行日期" label-width="160rpx"><u-input v-model="form.intro" /></u-form-item>
-				<u-form-item label="执行时间" label-width="160rpx"><u-input v-model="form.intro" /></u-form-item>
-				<u-form-item label="开始时间" label-width="160rpx"></u-form-item>
-				<u-form-item label="结束时间" label-width="160rpx"><u-input v-model="form.intro" /></u-form-item>
-				<u-form-item label="执行类型" label-width="160rpx"><u-input v-model="form.intro" /></u-form-item>
-				<u-form-item label="考评指标" label-width="160rpx"><u-input v-model="form.intro" /></u-form-item>
-				<u-form-item label="考评门店" label-width="160rpx"><u-input v-model="form.intro" /></u-form-item>
-				<u-form-item label="任务有效天数" label-width="180rpx"><u-input v-model="form.intro" /></u-form-item>
+				<u-form-item label="任务周期" label-width="160rpx" prop="cycleType"><v-select  ref="cycleType" code="BUSINESS_EXPERIRENCE_CONTENT_CLS" placeholder="请选择任务周期" v-model="form.cycleType"></v-select>
+				</u-form-item>
+				<u-form-item label="执行日期" label-width="160rpx" prop="buildTime">
+					<view style="width: 100%;" @tap="choosePartMark">
+						<input v-show="markArr && markArr.length == 0" disabled placeholder-class="form-input-placeholder" placeholder="请选择执行日期" />
+						<u-tag
+							v-show="markArr && markArr.length != 0"
+							v-for="(item, index) in markArr"
+							:key="item.id"
+							:text="item.name"
+							size="mini"
+							style="margin: 6upx 0 6upx 6upx;"
+						/>
+					</view>
+					<!-- <view @click="onShowPickerBegin('date')" style="color: rgb(192,196,204);">{{date ? date : '请选择执行日期'}}</view>
+					<mx-date-picker class="beginTime" :show="showPickerBegin" :type="type" :value="form.beginTime" :show-tips="true"  @confirm="onSelectedBegin" @cancel="onSelectedBegin"/> -->
+				</u-form-item>
+				<u-form-item label="执行时间" label-width="160rpx" prop="zxTime">
+					<view @click="onShowPickerTime('time')" style="color: rgb(192,196,204);">{{time ? time : '请选择执行时间'}}</view>
+					<mx-date-picker class="beginTime" :show="showPickerTime" type="time" :value="form.zxTime" :show-tips="true"  @confirm="onSelectedTime" @cancel="onSelectedTime"/>
+				</u-form-item>
+				<u-form-item label="开始日期" label-width="160rpx" prop="startDate">
+					<view @click="onShowPickerBegin('date')" style="color: rgb(192,196,204);">{{form.startDate ? form.startDate : '请选择开始日期'}}</view>
+					<mx-date-picker class="beginTime" :show="showPickerBegin" :type="type" :value="form.startDate" :show-tips="true"  @confirm="onSelectedBegin" @cancel="onSelectedBegin"/>
+				</u-form-item>
+				<u-form-item label="结束日期" label-width="160rpx" prop="endDate">
+					<view @click="onShowPickerEnd('date')" style="color: rgb(192,196,204);">{{form.endDate ? form.endDate : '请选择结束日期'}}</view>
+					<mx-date-picker class="beginTime" :show="showPickerEnd" :type="type" :value="form.endDate" :show-tips="true"  @confirm="onSelectedEnd" @cancel="onSelectedEnd"/>
+				</u-form-item>
+				<u-form-item label="执行类型" label-width="160rpx" prop="zxType">
+					<v-select  ref="contentCls" code="BUSINESS_EXPERIRENCE_CONTENT_CLS" placeholder="请选择执行类型">
+					</v-select>
+				</u-form-item>
+				<u-form-item label="考评指标" label-width="160rpx" prop="assessList">
+					<view style="color:rgb(192,196,204); width: 100%;" @click="openZBpage">{{form.assessList ?form.assessList :'请选择考评指标'}}</view>
+					<u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888" @click="openZBpage"></u-icon>
+				</u-form-item>
+				<u-form-item label="考评门店" label-width="160rpx" prop="storeList">
+					<view style="color:rgb(192,196,204); width: 100%;" @click="openMDpage">{{form.storeList ?form.storeList :'请选择考评门店'}}</view>
+					<u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888" @click="openMDpage"></u-icon>
+				</u-form-item>
+				<u-form-item label="任务有效天数" label-width="180rpx" prop="effectiveDay">
+					<u-input v-model="form.effectiveDay" placeholder="请输入任务有效天数"/>
+				</u-form-item>
+				<!-- <u-form-item label="执行时间" label-width="160rpx" prop="zxTime">
+					<view @click="onShowPickerTime('time')" style="color: rgb(192,196,204);">{{time ? time : '请选择执行时间'}}</view>
+					<mx-date-picker class="beginTime" :show="showPickerTime" type="time" :value="form.zxTime" :show-tips="true"  @confirm="onSelectedTime" @cancel="onSelectedTime"/>
+				</u-form-item> -->
 			</u-form>
 			<view class="btns">
 				<u-button class="confirmBtn" type="primary" size="medium" @click="submit">提交</u-button>
-				<u-button class="cancelBtn" size="medium" @click="submit">取消</u-button>
+				<u-button class="cancelBtn" size="medium" @click="cancel">取消</u-button>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import vSelect  from  '@/components/select/v-select.vue' 
+	import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
 	export default{
+		components: {
+			vSelect,MxDatePicker
+		},
 		data(){
+			// const currentDate = this.getDate({
+			// 	format: true
+			// })
 			return{
+				showPickerBegin: false,	// 默认是否显示开始日期的日期组件
+				showPickerEnd:false,	// 默认是否显示结束日期的日期组件
+				showPickerTime:false,	// 默认是否显示时间的时间组件
+				date:'',	
+				time:'',
+				type:"date",
 				form: {
-					name: '',
-					intro: '',
-					sex: ''
+					name: '',		// 任务名称
+					cycleType: '',	// 周期类型
+					buildTime:'',	// 执行日期
+					zxTime:'',		// 执行时间	
+					zxType:'',		// 执行类型
+					startDate:'',  	// 开始日期
+					endDate:'',		// 结束日期
+					assessList:'',	// 考评指标
+					storeList:'',	// 考评门店
+					effectiveDay:''	// 任务有效天数
 				},
-				show: false,
-				list: [
-					{
-						value: '1',
-						label: '江'
-					},
-					{
-						value: '2',
-						label: '湖'
-					}
-				],
-				mode: 'date'
+				markList: [], //  配件标签数据列表
+				markArr: [], //  配件标签  已选 数据
+				isPartMark: false,
+				rules: {
+					name: [{ required: true, message: '请输入名称30个字以内',trigger: 'blur'}],
+					cycleType:[{required: true, message: '请选择任务周期',trigger: 'blur'}],
+					buildTime: [{ required: true, message: '请选择执行日期',trigger: 'blur'}],
+					zxTime: [{ required: true, message: '请选择执行时间',trigger: 'blur'}],
+					zxType: [{ required: true, message: '请选择执行类型',trigger: 'blur'}],
+					startDate: [{ required: true, message: '请选择开始日期',trigger: 'blur'}],
+					endDate: [{ required: true, message: '请选择结束日期',trigger: 'blur'}],
+					assessList: [{ required: true, message: '请选择考评指标',trigger: 'blur'}],
+					storeList: [{ required: true, message: '请选择考评门店',trigger: 'blur'}],
+					effectiveDay: [{ required: true, message: '请输入任务有效天数',trigger:  'blur'}],
+				}
+				// // date: currentDate,
+				// dateMode: 'date',
+				// dateShow: false,
 			}
 		},
+		// computed: {
+		//         startDate() {
+		//             return this.getDate('start');
+		//         },
+		//         endDate() {
+		//             return this.getDate('end');
+		//         }
+		//     },
+		onReady() {
+				this.$refs.uForm.setRules(this.rules);
+			},
 		methods:{
-			confirm(e){
+			//  显示开始日期选择
+			onShowPickerBegin(type){
+				this.type = type
+				this.showPickerBegin = true
+				this.form.startDate = this[type]
+			},
+			//  日期选择
+			onSelectedBegin(e) {
 				console.log(e)
+				this.showPickerBegin = false
+				if(e) {
+					this[this.type] = e.value
+					// this[this.form.startDate] = e.value
+					console.log(this[this.form.startDate],'------------日期',this[this.type])
+				}
+			},
+			//  显示结束日期选择
+			onShowPickerEnd(type){
+				this.type = type
+				this.showPickerEnd = true
+				this.form.endDate = this[type]
+			},
+			//  日期选择
+			onSelectedEnd(e) {
+				this.showPickerEnd = false
+				if(e) {
+					this[this.type] = e.value
+					console.log('------------日期',this[this.type])
+				}
+			},
+			// 执行时间选择
+			onShowPickerTime(type){
+				this.type = type
+				this.showPickerTime = true
+				this.form.zxTime = this[type]
+			},
+			//  日期选择
+			onSelectedTime(e) {
+				this.showPickerTime = false
+				if(e) {
+					this[this.type] = e.value
+				}
+			},
+	// 		dateChange(e){
+	// 			this.form.entryDate = e.result
+	// 		},
+	// 		confirm(e){
+	// 			console.log(e)
+	// 		},
+	// 		openSeleteType(){
+	// 			this.show=true
+	// 		},
+	// 		bindDateChange: function(e) {
+	// 			this.date = e.target.value
+	// 		},
+	// 		getDate(type) {
+	// 			const date = new Date();
+	// 			let year = date.getFullYear();
+	// 			let month = date.getMonth() + 1;
+	// 			let day = date.getDate();
+	
+	// 			if (type === 'start') {
+	// 				year = year - 60;
+	// 			} else if (type === 'end') {
+	// 				year = year + 2;
+	// 			}
+	// 			month = month > 9 ? month : '0' + month;;
+	// 			day = day > 9 ? day : '0' + day;
+	// 			return `${year}-${month}-${day}`;
+	// 		},
+			//  选择配件标签
+			choosePartMark() {
+				this.isPartMark = false;
+				this.$nextTick(function() {
+					this.isPartMark = true;
+				});
+			},
+			// 确认
+			markConfirm(arr) {
+				this.markArr = arr;
+				let arrId = [];
+				arr.map(item => {
+					arrId.push({ id: item.id });
+				});
+				this.formData.labels = arrId;
+				this.isPartMark = false;
+			},
+			//  取消  配件标签
+			markCancel() {
+				this.isPartMark = false;
+			},
+			openZBpage(){
+				uni.navigateTo({
+					url:"/pages/spotCheckConfigure/evaluateItem"
+				})
+			},
+			openMDpage(){
+				uni.navigateTo({
+					url:"/pages/spotCheckConfigure/evaluateStore"
+				})
+			},
+			// 提交
+			submit() {
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						console.log('验证通过');
+					} else {
+						console.log('验证失败');
+					}
+				});
+			},
+			// 取消
+			cancel(){
+				this.$refs.uForm.resetFields(this.rules);
 			},
-			openSeleteType(){
-				this.show=true
-			}
 		}
 	}
 </script>
@@ -63,6 +249,16 @@
 	};
 	.pageInfo{
 		padding:0 40upx;
+		.form-input-placeholder {
+			font-size: 28upx;
+			color:rgb(192,196,204) ;
+		}
+		// .beginTime{
+		// 	z-index:999;
+		// }
+		.beginTime{
+			z-index: 999999 !important;
+		}
 		.btns{
 			text-align: center;
 			padding: 50upx 0;
@@ -73,5 +269,6 @@
 				margin-left:20upx;
 			}
 		}
+		
 	}
 </style>

+ 199 - 0
pages/spotCheckConfigure/evaluateItem.vue

@@ -0,0 +1,199 @@
+<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>
+					<u-checkbox-group @change="checkboxGroupChange" >
+						<u-checkbox 
+							@change="checkboxChange" 
+							shape="square"
+							v-model="item.checked" 
+							v-for="(item, index) in list" :key="index" 
+							:name="item.name"
+						/>
+					</u-checkbox-group>
+				</view> -->
+				<view>
+					<checkbox-group @change="checkboxChange" class="checkbox-group">
+						<label v-for="item in items" :key="item.value" >
+							<view  class="checkbox-item">
+								<view class="item-name">{{item.name}}</view>
+								<view>
+									<checkbox :value="item.value" :checked="item.checked" />
+								</view>
+							</view>
+						</label>
+					</checkbox-group>
+				</view>
+			</view>
+		</view>
+		<!-- 选择按钮 -->
+		<view class="kp-ok">
+			提交
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				type:'info',
+				size:'mini',
+				val:'选择',
+				checked:true,
+				// list: [
+				// 	{
+				// 		name: 'apple',
+				// 		checked: false,
+				// 		disabled: false
+				// 	},
+				// 	{
+				// 		name: 'banner',
+				// 		checked: false,
+				// 		disabled: false
+				// 	},
+				// 	{
+				// 		name: 'orange',
+				// 		checked: false,
+				// 		disabled: false
+				// 	}
+				// ]
+				items: [{
+						value: 'USA',
+						name: '美国'
+					},
+					{
+						value: 'CHN',
+						name: '中国',
+						checked: 'true'
+					},
+					{
+						value: 'BRA',
+						name: '巴西'
+					},
+					{
+						value: 'JPN',
+						name: '日本'
+					},
+					{
+						value: 'ENG',
+						name: '英国'
+					},
+					{
+						value: 'FRA',
+						name: '法国'
+					}
+				]
+			}
+		},
+		methods:{
+			// radioChange(e){
+			// 	console.log(e)
+			// 	this.radioVal=false
+			// }
+			checkboxChange: function (e) {
+				var items = this.items,
+					values = e.detail.value;
+				for (var i = 0, lenI = items.length; i < lenI; ++i) {
+					const item = items[i]
+					if(values.includes(item.value)){
+						this.$set(item,'checked',true)
+					}else{
+						this.$set(item,'checked',false)
+					}
+				}
+			}
+			// checkboxChange(e) {
+			// 	//console.log(e);
+			// },
+			// // 选中任一checkbox时,由checkbox-group触发
+			// checkboxGroupChange(e) {
+			// 	// console.log(e);
+			// },
+		}
+	}
+</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;
+				> view{
+					.checkbox-group{
+						.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;
+						}
+					}
+				}
+			}
+		}
+		.kp-ok{
+			text-align: center;
+			padding: 26upx;
+			background: #55aaff;
+			color: #fff;
+			font-size: 18px;
+		}
+	}
+</style>

+ 112 - 0
pages/spotCheckConfigure/evaluateStore.vue

@@ -0,0 +1,112 @@
+<template>
+	<!-- <uni-check-list :listData="list" types="checkbox" @ok="chooseOk" :showArrow="false">
+	</uni-check-list> -->
+	<view class="store-all">	
+		<view class="uni-list">
+			<checkbox-group @change="checkboxChange" class="checkbox-group">
+				<label  v-for="item in items" :key="item.value" >
+					<view  class="checkbox-item">
+						<view class="item-name">{{item.name}}</view>
+						<view>
+							<checkbox :value="item.value" :checked="item.checked" />
+						</view>
+					</view>
+				</label>
+			</checkbox-group>
+		</view>
+		<!-- 提交 -->
+		<view class="kp-ok" @click="submit">
+			提交
+		</view>
+	</view>
+	
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				items: [{
+						value: 'USA',
+						name: '美国'
+					},
+					{
+						value: 'CHN',
+						name: '中国',
+						checked: 'true'
+					},
+					{
+						value: 'BRA',
+						name: '巴西'
+					},
+					{
+						value: 'JPN',
+						name: '日本'
+					},
+					{
+						value: 'ENG',
+						name: '英国'
+					},
+					{
+						value: 'FRA',
+						name: '法国'
+					}
+				]
+			}
+		},
+		methods: {
+			// 改变checkbox的选中状态
+			checkboxChange(e) {
+				var items = this.items,
+					values = e.detail.value;
+				for (var i = 0, lenI = items.length; i < lenI; ++i) {
+					const item = items[i]
+					if(values.includes(item.value)){
+						this.$set(item,'checked',true)
+					}else{
+						this.$set(item,'checked',false)
+					}
+					console.log(item,'--------------')
+				}
+				
+			},
+			submit(){
+				console.log('-------tijiao')
+			}
+		}
+	}
+</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;
+			}
+		}
+		
+		.kp-ok{
+			text-align: center;
+			padding: 26upx;
+			background: #55aaff;
+			color: #fff;
+			font-size: 18px;
+		}
+	}
+	
+</style>

+ 101 - 0
pages/spotCheckConfigure/spotCheckDetail/evaluateItemDetail.vue

@@ -0,0 +1,101 @@
+<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>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				items: [
+					{name:"正常营业"},
+					{name:"干净整洁"},
+					{name:"晨会正常"},
+				]
+			}
+		},
+		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>

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

@@ -0,0 +1,56 @@
+<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>

+ 116 - 0
pages/spotCheckConfigure/spotCheckDetail/spotCheckDetail.vue

@@ -0,0 +1,116 @@
+<template>
+	<view class="container">
+		<view class="content">
+			<view class="content-item">
+				<text>任务名称</text>
+				<view>111</view>
+			</view>
+			<view class="content-item">
+				<text>任务周期</text>
+				<view>天</view>
+			</view>
+			<view class="content-item">
+				<text>执行日期</text>
+				<view>2020/10/10</view>
+			</view>
+			<view class="content-item">
+				<text>执行时间</text>
+				<view>09:00</view>
+			</view>
+			<view class="content-item">
+				<text>开始日期</text>
+				<view>2020/10/10</view>
+			</view>
+			<view class="content-item">
+				<text>结束日期</text>
+				<view>2020/10/11</view>
+			</view>
+			<view class="content-item">
+				<text>考评类型</text>
+				<view>点检</view>
+			</view>
+			<view class="content-item" @click="viewItem">
+				<text>考评指标</text>
+				<view style="color: #007AFF;" >
+					12个 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
+				</view>
+			</view>
+			<view class="content-item" @click="viewStores">
+				<text>考评门店</text>
+				<view style="color: #007AFF;">
+					12个 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
+				</view>
+			</view>
+			<view class="content-item">
+				<text>任务有效期天数</text>
+				<view>3天</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			// const currentDate = this.getDate({
+			// 	format: true
+			// })
+			return{
+				pageData:null,		// 接受上个页面传的数据
+				show: false,		// 是否显示消息提醒弹窗
+				content: '',		// 消息提醒内容
+				title:'',			// 消息提醒标题
+				showCancelButton:''	// 是否显示确认框的取消按钮  true 显示  false不显示
+			}
+		},
+		onLoad() {
+		},
+		// 判断员工性别
+		filters: {
+			sexFilter(sexTypeVal){
+				console.log(sexTypeVal,'---')
+				if(sexTypeVal == 1){
+					return '男'
+				}
+				if(userTypeVal == 0){
+					return '女'
+				}
+			}
+		},
+		methods:{
+			// 查看已选考评门店详情
+			viewStores(){
+				uni.navigateTo({
+					url: '/pages/spotCheckConfigure/spotCheckDetail/evaluateStoreDetail'
+				})
+			},
+			// 查看已选考评指标详情
+			viewItem(){
+				uni.navigateTo({
+					url: '/pages/spotCheckConfigure/spotCheckDetail/evaluateItemDetail'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.container{
+		color:#666;
+		font-size: 28rpx;
+		.content{
+			position: relative;
+			background-color: #FFFFFF;
+			margin-bottom: 60rpx;
+			.content-item{
+				display: flex;
+				justify-content: space-between;
+				padding: 30rpx;
+				border-bottom: 1px solid #e5e5e5;
+				> view{
+					color: #666;
+				}
+			}
+		}
+	}
+</style>

+ 19 - 3
pages/spotCheckConfigure/spotCheckList.vue

@@ -23,9 +23,9 @@
 				<view class="itemName">
 					<span>{{item.time}}</span>
 					<span>
-						<u-button v-if="item.checked==false"type="warning" size="mini" style="margin-right: 15upx;">查看</u-button>
-						<u-button type="primary" size="mini" style="margin-right: 15upx;">编辑</u-button>
-						<u-button type="error" size="mini">删除</u-button>
+						<u-button v-if="item.checked==false" type="warning" size="mini" style="margin-right: 15upx;" @click="handetail">查看</u-button>
+						<u-button type="primary" size="mini" style="margin-right: 15upx;" @click="handedit">编辑</u-button>
+						<u-button type="error" size="mini" @click="handelete">删除</u-button>
 					</span>
 					
 				</view>
@@ -72,6 +72,22 @@
 				uni.navigateTo({
 					url:'/pages/spotCheckConfigure/addSpotCheck'
 				})
+			},
+			// 查看详情
+			handetail(){
+				uni.navigateTo({
+					url:'/pages/spotCheckConfigure/spotCheckDetail/spotCheckDetail'
+				})
+			},
+			// 编辑
+			handedit(){
+				uni.navigateTo({
+					url:'/pages/spotCheckConfigure/addSpotCheck'
+				})
+			},
+			// 删除
+			handelete(){
+				
 			}
 		}
 	}