Bläddra i källkod

活动抽奖提交

wangqiang 11 månader sedan
förälder
incheckning
b57442f748

+ 19 - 0
api/test/luckyDraw/LuckyDrawEventsService.js

@@ -0,0 +1,19 @@
+import request from '@/common/request';
+import { PUBLIC_MODULES_PATH as prefix } from "@/api/AppPath";
+
+export default class LuckyDrawEventsService {
+	list (inputForm) {
+	  return request({
+	    url: prefix + '/luckyDraw/events/list',
+	    method: 'get',
+	    data: inputForm
+	  })
+	}
+	queryById (id) {
+	  return request({
+	    url: prefix + '/luckyDraw/events/queryById',
+	    method: 'get',
+	    params: {id: id}
+	  })
+	}
+}

+ 19 - 0
api/test/luckyDraw/LuckyDrawMembersService.js

@@ -0,0 +1,19 @@
+import request from '@/common/request';
+import { PUBLIC_MODULES_PATH as prefix } from "@/api/AppPath";
+
+export default class LuckyDrawMembersService {
+	save (data) {
+	  return request({
+	    url: prefix + '/luckyDraw/member/save',
+	    method: 'post',
+	    data: data
+	  })
+	}
+	findMobilePhoneOnly (phone) {
+		return request({
+			url: prefix + '/luckyDraw/member/findMobilePhoneOnly',
+			method: 'get',
+			params: {phone: phone}
+		})
+	}
+}

+ 76 - 0
api/test/luckyDraw/LuckyDrawService.js

@@ -0,0 +1,76 @@
+import request from '@/common/request';
+import { PUBLIC_MODULES_PATH as prefix } from "@/api/AppPath";
+
+export default class LuckyDrawService {
+  save (inputForm) {
+    return request({
+      url: prefix + '/test/mobile/testMobile/save',
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  delete (ids) {
+    return request({
+      url: prefix + '/test/mobile/testMobile/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  queryById (id) {
+    return request({
+      url: prefix + '/test/mobile/testMobile/queryById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  list (params) {
+    return request({
+      url: prefix + '/luckyDraw/info/pjList',
+      method: 'get',
+      params: params
+    })
+  }
+
+  pjShowList (params) {
+    return request({
+      url: prefix + '/luckyDraw/info/pjShowList',
+      method: 'get',
+      params: params
+    })
+  }
+  
+  LuckyDraw (id,number,awardId) {
+    return request({
+      url: prefix + '/luckyDraw/info/luckyDraw',
+      method: 'post',
+      params: {id: id,number: number,awardId: awardId}
+    })
+  }
+  
+  luckyDrawAgain (id,number,awardId) {
+    return request({
+      url: prefix + '/luckyDraw/info/luckyDrawAgain',
+      method: 'post',
+      params: {id: id,number: number,awardId: awardId}
+    })
+  }
+  
+  luckyDrawClear (id,number,awardId) {
+    return request({
+      url: prefix + '/luckyDraw/info/luckyDrawClear',
+      method: 'post',
+      params: {id: id,number: number,awardId: awardId}
+    })
+  }
+
+  appShowList (params) {
+    return request({
+      url: prefix + '/luckyDraw/member/appShowList',
+      method: 'get',
+      params: params
+    })
+  }
+}

+ 433 - 0
components/uni-fab/uni-fab.vue

@@ -0,0 +1,433 @@
+<template>
+	<view>
+		<view v-if="popMenu && (leftBottom||rightBottom||leftTop||rightTop)" :class="{
+        'uni-fab--leftBottom': leftBottom,
+        'uni-fab--rightBottom': rightBottom,
+        'uni-fab--leftTop': leftTop,
+        'uni-fab--rightTop': rightTop
+      }"
+		 class="uni-fab">
+			<view :class="{
+          'uni-fab__content--left': horizontal === 'left',
+          'uni-fab__content--right': horizontal === 'right',
+          'uni-fab__content--flexDirection': direction === 'vertical',
+          'uni-fab__content--flexDirectionStart': flexDirectionStart,
+          'uni-fab__content--flexDirectionEnd': flexDirectionEnd,
+		  'uni-fab__content--other-platform': !isAndroidNvue
+        }"
+			 :style="{ width: boxWidth, height: boxHeight, backgroundColor: styles.backgroundColor }" class="uni-fab__content"
+			 elevation="5">
+				<view v-if="flexDirectionStart || horizontalLeft" class="uni-fab__item uni-fab__item--first" />
+				<view v-for="(item, index) in content" :key="index" :class="{ 'uni-fab__item--active': isShow }" class="uni-fab__item"
+				 @click="_onItemClick(index, item)">
+					<image :src="item.active ? item.selectedIconPath : item.iconPath" class="uni-fab__item-image" mode="widthFix" />
+					<text class="uni-fab__item-text" :style="{ color: item.active ? styles.selectedColor : styles.color }">{{ item.text }}</text>
+				</view>
+				<view v-if="flexDirectionEnd || horizontalRight" class="uni-fab__item uni-fab__item--first" />
+			</view>
+		</view>
+		<view :class="{
+		  'uni-fab__circle--leftBottom': leftBottom,
+		  'uni-fab__circle--rightBottom': rightBottom,
+		  'uni-fab__circle--leftTop': leftTop,
+		  'uni-fab__circle--rightTop': rightTop,
+		  'uni-fab__content--other-platform': !isAndroidNvue
+		}"
+		 class="uni-fab__circle uni-fab__plus" :style="{ 'background-color': styles.buttonColor }" @click="_onClick">
+			<view class="fab-circle-v" :class="{'uni-fab__plus--active': isShow}"></view>
+			<view class="fab-circle-h" :class="{'uni-fab__plus--active': isShow}"></view>
+		</view>
+	</view>
+</template>
+
+<script>
+	let platform = 'other'
+	// #ifdef APP-NVUE
+	platform = uni.getSystemInfoSync().platform
+	// #endif
+
+	/**
+	 * Fab 悬浮按钮
+	 * @description 点击可展开一个图形按钮菜单
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=144
+	 * @property {Object} pattern 可选样式配置项
+	 * @property {Object} horizontal = [left | right] 水平对齐方式
+	 * 	@value left 左对齐
+	 * 	@value right 右对齐
+	 * @property {Object} vertical = [bottom | top] 垂直对齐方式
+	 * 	@value bottom 下对齐
+	 * 	@value top 上对齐
+	 * @property {Object} direction = [horizontal | vertical] 展开菜单显示方式
+	 * 	@value horizontal 水平显示
+	 * 	@value vertical 垂直显示
+	 * @property {Array} content 展开菜单内容配置项
+	 * @property {Boolean} popMenu 是否使用弹出菜单
+	 * @event {Function} trigger 展开菜单点击事件,返回点击信息
+	 * @event {Function} fabClick 悬浮按钮点击事件
+	 */
+	export default {
+		name: 'UniFab',
+		props: {
+			pattern: {
+				type: Object,
+				default () {
+					return {}
+				}
+			},
+			horizontal: {
+				type: String,
+				default: 'left'
+			},
+			vertical: {
+				type: String,
+				default: 'bottom'
+			},
+			direction: {
+				type: String,
+				default: 'horizontal'
+			},
+			content: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			show: {
+				type: Boolean,
+				default: false
+			},
+			popMenu: {
+				type: Boolean,
+				default: true
+			}
+		},
+		data() {
+			return {
+				fabShow: false,
+				isShow: false,
+				isAndroidNvue: platform === 'android',
+				styles: {
+					color: '#3c3e49',
+					selectedColor: '#007AFF',
+					backgroundColor: '#fff',
+					buttonColor: '#3c3e49'
+				}
+			}
+		},
+		computed: {
+			contentWidth(e) {
+				return (this.content.length + 1) * 55 + 10 + 'px'
+			},
+			contentWidthMin() {
+				return 55 + 'px'
+			},
+			// 动态计算宽度
+			boxWidth() {
+				return this.getPosition(3, 'horizontal')
+			},
+			// 动态计算高度
+			boxHeight() {
+				return this.getPosition(3, 'vertical')
+			},
+			// 计算左下位置
+			leftBottom() {
+				return this.getPosition(0, 'left', 'bottom')
+			},
+			// 计算右下位置
+			rightBottom() {
+				return this.getPosition(0, 'right', 'bottom')
+			},
+			// 计算左上位置
+			leftTop() {
+				return this.getPosition(0, 'left', 'top')
+			},
+			rightTop() {
+				return this.getPosition(0, 'right', 'top')
+			},
+			flexDirectionStart() {
+				return this.getPosition(1, 'vertical', 'top')
+			},
+			flexDirectionEnd() {
+				return this.getPosition(1, 'vertical', 'bottom')
+			},
+			horizontalLeft() {
+				return this.getPosition(2, 'horizontal', 'left')
+			},
+			horizontalRight() {
+				return this.getPosition(2, 'horizontal', 'right')
+			}
+		},
+		watch: {
+			pattern(newValue, oldValue) {
+				//console.log(JSON.stringify(newValue))
+				this.styles = Object.assign({}, this.styles, newValue)
+			}
+		},
+		created() {
+			this.isShow = this.show
+			if (this.top === 0) {
+				this.fabShow = true
+			}
+			// 初始化样式
+			this.styles = Object.assign({}, this.styles, this.pattern)
+		},
+		methods: {
+			_onClick() {
+				this.$emit('fabClick')
+				if (!this.popMenu) {
+					return
+				}
+				// this.isShow = !this.isShow
+			},
+			open() {
+				this.isShow = true
+			},
+			close() {
+				this.isShow = false
+			},
+			/**
+			 * 按钮点击事件
+			 */
+			_onItemClick(index, item) {
+				this.$emit('trigger', {
+					index,
+					item
+				})
+			},
+			/**
+			 * 获取 位置信息
+			 */
+			getPosition(types, paramA, paramB) {
+				if (types === 0) {
+					return this.horizontal === paramA && this.vertical === paramB
+				} else if (types === 1) {
+					return this.direction === paramA && this.vertical === paramB
+				} else if (types === 2) {
+					return this.direction === paramA && this.horizontal === paramB
+				} else {
+					return this.isShow && this.direction === paramA ? this.contentWidth : this.contentWidthMin
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.uni-fab {
+		position: fixed;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		justify-content: center;
+		align-items: center;
+		z-index: 10;
+	}
+
+	.uni-fab--active {
+		opacity: 1;
+	}
+
+	.uni-fab--leftBottom {
+		left: 5px;
+		bottom: 20px;
+		/* #ifdef H5 */
+		bottom: calc(20px + var(--window-bottom));
+		/* #endif */
+		padding: 10px;
+	}
+
+	.uni-fab--leftTop {
+		left: 5px;
+		top: 30px;
+		/* #ifdef H5 */
+		top: calc(30px + var(--window-top));
+		/* #endif */
+		padding: 10px;
+	}
+
+	.uni-fab--rightBottom {
+		right: 5px;
+		bottom: 20px;
+		/* #ifdef H5 */
+		bottom: calc(20px + var(--window-bottom));
+		/* #endif */
+		padding: 10px;
+	}
+
+	.uni-fab--rightTop {
+		right: 5px;
+		top: 30px;
+		/* #ifdef H5 */
+		top: calc(30px + var(--window-top));
+		/* #endif */
+		padding: 10px;
+	}
+
+	.uni-fab__circle {
+		position: fixed;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		justify-content: center;
+		align-items: center;
+		width: 55px;
+		height: 55px;
+		background-color: #3c3e49;
+		border-radius: 55px;
+		z-index: 11;
+	}
+
+	.uni-fab__circle--leftBottom {
+		left: 15px;
+		bottom: 30px;
+		/* #ifdef H5 */
+		bottom: calc(30px + var(--window-bottom));
+		/* #endif */
+	}
+
+	.uni-fab__circle--leftTop {
+		left: 15px;
+		top: 40px;
+		/* #ifdef H5 */
+		top: calc(40px + var(--window-top));
+		/* #endif */
+	}
+
+	.uni-fab__circle--rightBottom {
+		right: 15px;
+		bottom: 30px;
+		/* #ifdef H5 */
+		bottom: calc(30px + var(--window-bottom));
+		/* #endif */
+	}
+
+	.uni-fab__circle--rightTop {
+		right: 15px;
+		top: 40px;
+		/* #ifdef H5 */
+		top: calc(40px + var(--window-top));
+		/* #endif */
+	}
+
+	.uni-fab__circle--left {
+		left: 0;
+	}
+
+	.uni-fab__circle--right {
+		right: 0;
+	}
+
+	.uni-fab__circle--top {
+		top: 0;
+	}
+
+	.uni-fab__circle--bottom {
+		bottom: 0;
+	}
+
+	.uni-fab__plus {
+		font-weight: bold;
+	}
+
+	.fab-circle-v {
+		position: absolute;
+		width: 3px;
+		height: 31px;
+		left: 26px;
+		top: 12px;
+		background-color: white;
+		transform: rotate(0deg);
+		transition: transform 0.3s;
+	}
+
+	.fab-circle-h {
+		position: absolute;
+		width: 31px;
+		height: 3px;
+		left: 12px;
+		top: 26px;
+		background-color: white;
+		transform: rotate(0deg);
+		transition: transform 0.3s;
+	}
+
+	.uni-fab__plus--active {
+		transform: rotate(135deg);
+	}
+
+	.uni-fab__content {
+		/* #ifndef APP-NVUE */
+		box-sizing: border-box;
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		border-radius: 55px;
+		overflow: hidden;
+		transition-property: width, height;
+		transition-duration: 0.2s;
+		width: 55px;
+		border-color: #DDDDDD;
+		border-width: 1rpx;
+		border-style: solid;
+	}
+
+	.uni-fab__content--other-platform {
+		border-width: 0px;
+		box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.2);
+	}
+
+	.uni-fab__content--left {
+		justify-content: flex-start;
+	}
+
+	.uni-fab__content--right {
+		justify-content: flex-end;
+	}
+
+	.uni-fab__content--flexDirection {
+		flex-direction: column;
+		justify-content: flex-end;
+	}
+
+	.uni-fab__content--flexDirectionStart {
+		flex-direction: column;
+		justify-content: flex-start;
+	}
+
+	.uni-fab__content--flexDirectionEnd {
+		flex-direction: column;
+		justify-content: flex-end;
+	}
+
+	.uni-fab__item {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		width: 55px;
+		height: 55px;
+		opacity: 0;
+		transition: opacity 0.2s;
+	}
+
+	.uni-fab__item--active {
+		opacity: 1;
+	}
+
+	.uni-fab__item-image {
+		width: 25px;
+		height: 25px;
+		margin-bottom: 3px;
+	}
+
+	.uni-fab__item-text {
+		color: #FFFFFF;
+		font-size: 12px;
+	}
+
+	.uni-fab__item--first {
+		width: 55px;
+	}
+</style>

+ 32 - 0
pages.json

@@ -202,6 +202,38 @@
 			"style": {
 				"navigationBarTitleText": "uView UI"
 			}
+		},
+		{
+			"path" : "pages/test/luckyDraw/LuckyDrawList",
+			"style" : {}
+		},
+		{
+			"path" : "pages/test/luckyDraw/LuckyDrawShowList",
+			"style" : {}
+		},
+		{
+			"path" : "pages/test/luckyDraw/LuckyDrawEvents",
+			"style" : {}
+		},
+		{
+			"path" : "pages/test/luckyDraw/LuckyDrawEventsDetail",
+			"style" : {}
+		},
+		{
+			"path" : "pages/test/luckyDraw/LuckyDrawRegister",
+			"style" : {}
+		},
+		{
+			"path" : "pages/test/luckyDraw/LuckyDrawLottery",
+			"style" : {}
+		},
+		{
+			"path" : "pages/test/luckyDraw/LuckyDrawEvents_pc",
+			"style" : {}
+		},
+		{
+			"path" : "pages/test/luckyDraw/LuckyDrawMemberList",
+			"style" : {}
 		}
     ],
 	"subPackages": [{

+ 25 - 1
pages/apps/apps.vue

@@ -55,7 +55,7 @@
 <!--						</view>-->
 <!--					</navigator>-->
 <!--				</view>-->
-				<view >
+				<view class="padding-sm">
 <!--					<view class="padding radius text-center shadow-blur bg-white">-->
 <!--						<text class="lg font-size-35 text-blue cuIcon-calendar"></text>-->
 <!--						<view class="margin-top-sm text-Abc">我的日程</view>-->
@@ -67,6 +67,30 @@
 						</view>
 					</navigator>
 				</view>
+				<view class="padding-sm">
+					<navigator hover-class="none" url="/pages/test/luckyDraw/LuckyDrawEvents_pc" >
+						<view class="padding radius text-center shadow-blur bg-white">
+							<text class="lg font-size-35 text-blue cuIcon-safe"></text>
+							<view class="margin-top-sm text-Abc">抽奖</view>
+						</view>
+					</navigator>
+				</view>
+				<view class="padding-sm">
+					<navigator hover-class="none" url="/pages/test/luckyDraw/LuckyDrawShowList" >
+						<view class="padding radius text-center shadow-blur bg-white">
+							<text class="lg font-size-35 text-blue cuIcon-safe"></text>
+							<view class="margin-top-sm text-Abc">中奖详情</view>
+						</view>
+					</navigator>
+				</view>
+				<view class="padding-sm">
+					<navigator hover-class="none" url="/pages/test/luckyDraw/LuckyDrawEvents" >
+						<view class="padding radius text-center shadow-blur bg-white">
+							<text class="lg font-size-35 text-blue cuIcon-safe"></text>
+							<view class="margin-top-sm text-Abc">活动</view>
+						</view>
+					</navigator>
+				</view>
 <!--				<view class="padding-sm">-->
 <!--					<view class="padding radius text-center shadow-blur bg-white">-->
 <!--						<text class="lg font-size-35 text-blue cuIcon-phone"></text>-->

+ 106 - 0
pages/test/luckyDraw/LuckyDrawEvents.vue

@@ -0,0 +1,106 @@
+<template>
+	<view>
+		<cu-custom :backUrl="'/pages/apps/apps'" :isBack="true" bgColor="bg-gradual-blue" >
+			<block slot="backText">返回</block>
+			<block slot="content">抽奖活动</block>
+			<block slot="right" >
+				<view  @click="back()">
+					刷新
+				</view>
+			</block>
+		</cu-custom>
+
+		<view class="cu-card article">
+			<view class="cu-item shadow" v-for="item in dataList" @click="detail(item.id, item.switchFlag)">
+				<view class="title">
+					<view class="text-cut"> {{item.name}} </view>
+				</view>
+				<view class="content">
+					<image src="/static/lucky_draw_events.jpg"
+					 mode="aspectFill"></image>
+					<view class="desc">
+						<view class="text-content"> {{item.detail}} </view>
+						<view>
+							<view :class="item.switchFlag === '1' ? 'cu-tag bg-green light sm' : 'cu-tag bg-grey light sm' ">
+								{{item.switchFlag === '1' ? '进行中' : '未开始'}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import LuckyDrawEventsService from '@/api/test/luckyDraw/LuckyDrawEventsService'
+	export default {
+		data() {
+			return {
+				dataList: [],
+				loading: false,
+				searchForm: {},
+				tablePage: {
+					total: ''
+				}
+			};
+		},
+		luckyDrawEventsService: null,
+		onLoad(option) {
+			let { is_sucess } = option
+			if (is_sucess == '200') {
+				uni.showToast({
+					title: '报名成功',
+					icon: 'sucess',
+					duration: 1500
+				})
+			}
+			this.luckyDrawEventsService = new LuckyDrawEventsService()
+			this.refreshList()
+		},
+		onShow() {
+			this.refreshList()
+		},
+		methods: {
+			refreshList() {
+			  this.loading = true
+			  this.luckyDrawEventsService.list({
+				  'current': '1',
+				  'size': '-1',
+				  ...this.searchForm
+				}).then((data) => {
+				  this.dataList = data.records
+				  this.tablePage.total = data.total
+				  this.loading = false
+				})
+				
+			},
+			// 跳转活动详情页面
+			detail(id, switchFlag) {
+				if (switchFlag === '1') {
+					// 活动进行中
+					uni.navigateTo({
+					  url: '/pages/test/luckyDraw/LuckyDrawEventsDetail?eventId='+id
+					})
+				} else {
+					// 活动未开始
+					uni.showToast({
+						title: '活动未开始,请选择进行中的项目参与',
+						icon: 'none',
+						duration: 1500
+					})
+				}
+				
+			},
+			back () {
+				uni.navigateTo({
+				  url: '/pages/test/luckyDraw/LuckyDrawEvents'
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 193 - 0
pages/test/luckyDraw/LuckyDrawEventsDetail.vue

@@ -0,0 +1,193 @@
+<template>
+	<view>
+		<view class="">
+			<cu-custom :isBack="true" bgColor="bg-gradual-blue">
+				<block slot="backText">返回</block>
+				<block slot="content">活动详情</block>
+			</cu-custom>
+		</view>
+		<view class="cu-card article">
+			<view class="cu-item shadow">
+				<!-- 活动名称 -->
+				<view class="title">
+					<view class="text-center"> {{dataDetail.name}} </view>
+				</view>
+				<!-- 活动详情 -->
+				<view class="content">
+					<view class="desc">
+						<view class="text-content-luckyDraw"> {{dataDetail.detail}} </view>
+					</view>
+				</view>
+				<!-- 图片 -->
+				<view class="content" style="margin-top: 15px;">
+					<image style="width: 100%;" src="/static/lucky_draw_events.jpg" mode="widthFix"></image>
+				</view>
+				
+				<view class=" padding-lr" :key="'00'" :id="'00'">
+					<view class="cu-bar solid-bottom bg-white">
+						<view class="action">
+<!--							<text class="cuIcon-present text-red"></text>-->
+<!--							<text class="text-red" style="margin-left: 2upx;" @click="toLottery()">-->
+<!--								中奖信息-->
+<!--							</text>-->
+						</view>
+						<view class="action">
+							<text class="text-red" style="" @click="toLuckyDrawMember()">
+								报名详情
+							</text>
+							<text class="cuIcon-friend text-red"></text>
+						</view>
+					</view>
+				</view>
+				<!-- 表单 -->
+				<form @submit="formSubmit">
+					<view class="cu-form-group margin-top">
+						<view class="title"><text class="red-color ">* </text>姓名</view>
+						<input style=" margin-top: 30px;"  placeholder="请输入姓名" name="name" v-model="inputForm.name"></input>
+					</view>
+					<view class="cu-form-group margin-top">
+						<view class="title"><text class="red-color ">* </text>部门</view>
+						<input style=" margin-top: 30px;" placeholder="请输入部门" name="officeName" v-model="inputForm.officeName"></input>
+					</view>
+					<view class="cu-form-group ">
+						<view class="title"><text class="red-color ">* </text>公司</view>
+						<picker @change="changeCompany" :value="companyIndex" :range="companyList">
+							<view class="picker" >
+								{{companyIndex > -1 ? companyList[companyIndex] : '请选择'}}
+							</view>
+						</picker>
+					</view>
+					<view class="cu-form-group ">
+						<view class="title"><text class="red-color ">* </text>电话号码</view>
+						<input style=" margin-top: 30px;" placeholder="请输入电话号码" name="phone" v-model="inputForm.phone"></input>
+					</view>
+					<view class="margin-top" style="padding-left: 7px; padding-right: 7px;">
+						<button :disabled="isSubmitting" style="width: 100%;" class='cu-btn lg bg-gradual-blue shadow' form-type="submit">
+							{{ isSubmitting ? '提交中...' : '报名' }}
+						</button>
+					</view>
+				</form>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	var  graceChecker = require("@/common/graceChecker.js");
+	import LuckyDrawEventsService from '@/api/test/luckyDraw/LuckyDrawEventsService'
+	import LuckyDrawMembersService from '@/api/test/luckyDraw/LuckyDrawMembersService.js'
+	export default {
+		data() {
+			return {
+				inputForm: {
+					name: '',
+					officeName: '',
+					companyName: '',
+					phone: '',
+					eventId: ''
+				},
+				list: [],
+				dataDetail: {},
+				companyList: [
+					'评估公司','会计师事务所','中审分所','项目公司','咨询公司','其他'
+				],
+				isSubmitting: false, // 用于控制提交按钮的状态
+				companyIndex: -1
+			};
+		},
+		luckyDrawMembersService: null,
+		luckyDrawEventsService: null,
+		onLoad(option) {
+			this.luckyDrawEventsService = new LuckyDrawEventsService()
+			this.luckyDrawMembersService = new LuckyDrawMembersService()
+			let { eventId } = option
+			this.init(eventId)
+		},
+		onReady() {
+		},
+		methods: {
+			// 数据初始化方法
+			init(id) {
+				this.luckyDrawEventsService.queryById(id).then((data) => {
+				  this.dataDetail = data
+				})
+			},
+			// 跳转活动报名页面   参数eventId为活动id
+			signUp() {
+				uni.navigateTo({
+				  url: '/pages/test/luckyDraw/LuckyDrawRegister?eventId='+this.dataDetail.id
+				})
+			},
+			// 跳转活动中奖信息页面   参数eventId为活动id
+			toLottery() {
+				uni.navigateTo({
+				  url: '/pages/test/luckyDraw/LuckyDrawShowList?eventId='+this.dataDetail.id
+				})
+			},
+			// 跳转报名详情页面   参数eventId为活动id
+			toLuckyDrawMember() {
+				uni.navigateTo({
+				  url: '/pages/test/luckyDraw/LuckyDrawMemberList?eventId='+this.dataDetail.id
+				})
+			},
+			async formSubmit(e) {
+				if (this.isSubmitting) return; // 防止多次点击提交
+				//定义表单规则
+				var rule = [
+					{name:"name", checkType : "notnull", checkRule:"",  errorMsg:"姓名不能为空"},
+					{name:"officeName", checkType : "notnull", checkRule:"",  errorMsg:"部门不能为空"},
+					{name:"companyName", checkType : "notnull", checkRule:"",  errorMsg:"公司不能为空"},
+					{name:"phone", checkType : "notnull", checkRule:"",  errorMsg:"电话号码不能为空"},
+					{name:"phone", checkType : "isMobileNumber", checkRule:"",  errorMsg:"电话号码格式不正确"}
+				];
+				//进行表单检查
+				var formData = this.inputForm;
+				var checkRes = graceChecker.check(formData, rule);
+
+				var flag = false;
+				if (checkRes) {
+
+				} else {
+					uni.showToast({ title: graceChecker.error, icon: "none" });
+				}
+				if (this.inputForm.phone) {
+					this.luckyDrawMembersService.findMobilePhoneOnly(this.inputForm.phone).then((data) => {
+						if (data !== 0) {
+							uni.showToast({
+								title: '联系电话已存在,请重新填写',
+								icon: "none",
+								duration:2000
+							})
+
+						} else {
+							this.isSubmitting = true;
+							uni.showLoading();
+							try {
+								this.inputForm.eventId = this.dataDetail.id
+								const data = this.luckyDrawMembersService.save(this.inputForm);
+								uni.showToast({ title: data, icon: "success" });
+								uni.navigateTo({
+									url: '/pages/test/luckyDraw/LuckyDrawEvents?is_sucess=200'
+								});
+							} catch (error) {
+								console.error(error);
+							} finally {
+								this.isSubmitting = false;
+								uni.hideLoading();
+							}
+						}
+					})
+				}
+			},
+			changeCompany(e){
+				this.companyIndex = e.target.value;
+				this.inputForm.companyName = this.companyList[this.companyIndex]
+			}
+		},
+	}
+</script>
+
+<style>
+</style>
+

+ 106 - 0
pages/test/luckyDraw/LuckyDrawEvents_pc.vue

@@ -0,0 +1,106 @@
+<template>
+	<view>
+		<cu-custom :backUrl="'/pages/apps/apps'" :isBack="true" bgColor="bg-gradual-blue" >
+			<block slot="backText">返回</block>
+			<block slot="content">活动抽奖</block>
+			<block slot="right" >
+				<view  @click="back()">
+					刷新
+				</view>
+			</block>
+		</cu-custom>
+
+		<view class="cu-card article">
+			<view class="cu-item shadow" v-for="item in dataList" @click="detail(item.id, item.switchFlag)">
+				<view class="title">
+					<view class="text-cut"> {{item.name}} </view>
+				</view>
+				<view class="content">
+					<image src="/static/lucky_draw_events.jpg"
+					 mode="aspectFill"></image>
+					<view class="desc">
+						<view class="text-content"> {{item.detail}} </view>
+						<view>
+							<view :class="item.switchFlag === '1' ? 'cu-tag bg-green light sm' : 'cu-tag bg-grey light sm' ">
+								{{item.switchFlag === '1' ? '进行中' : '未开始'}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import LuckyDrawEventsService from '@/api/test/luckyDraw/LuckyDrawEventsService'
+	export default {
+		data() {
+			return {
+				dataList: [],
+				loading: false,
+				searchForm: {},
+				tablePage: {
+					total: ''
+				}
+			};
+		},
+		luckyDrawEventsService: null,
+		onLoad(option) {
+			let { is_sucess } = option
+			if (is_sucess == '200') {
+				uni.showToast({
+					title: '报名成功',
+					icon: 'sucess',
+					duration: 1500
+				})
+			}
+			this.luckyDrawEventsService = new LuckyDrawEventsService()
+			this.refreshList()
+		},
+		onShow() {
+			this.refreshList()
+		},
+		methods: {
+			refreshList() {
+			  this.loading = true
+			  this.luckyDrawEventsService.list({
+				  'current': '1',
+				  'size': '-1',
+				  ...this.searchForm
+				}).then((data) => {
+				  this.dataList = data.records
+				  this.tablePage.total = data.total
+				  this.loading = false
+				})
+				
+			},
+			// 跳转活动详情页面
+			detail(id, switchFlag) {
+				if (switchFlag === '1') {
+					// 活动进行中
+					uni.navigateTo({
+					  url: '/pages/test/luckyDraw/LuckyDrawList?eventId='+id
+					})
+				} else {
+					// 活动未开始
+					uni.showToast({
+						title: '活动未开始,请选择进行中的项目参与',
+						icon: 'none',
+						duration: 1500
+					})
+				}
+				
+			},
+			back () {
+				uni.navigateTo({
+				  url: '/pages/test/luckyDraw/LuckyDrawEvents_pc'
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 221 - 0
pages/test/luckyDraw/LuckyDrawList.vue

@@ -0,0 +1,221 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-blue" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content"> 抽奖</block>
+		</cu-custom>
+		<view>
+			<view class="uni-container">
+				<uni-table ref="table" :loading="loading" stripe  emptyText="暂无更多数据" @selection-change="selectionChange">
+					<uni-tr >
+						<uni-th style="width: 50px;" @filter-change="searchChangeHandle"   field="awardsName" @sort-change="sortChangeHandle"  align="center">序号</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="awardsName" @sort-change="sortChangeHandle"  align="center">奖项名称</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="prizeName" @sort-change="sortChangeHandle"  align="center">奖品名称</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="number"  @sort-change="sortChangeHandle"  align="center">数量</uni-th>
+						<!-- <uni-th style="width: 160px;">操作</uni-th> -->
+					</uni-tr>
+					<uni-tr v-for="(row, index) in dataList" :key="index">
+						<uni-td align="center" :style="row.showFlag === '2'?'background-color: bisque;':''">
+							<span v-if="row.showFlag === '2'"><b><text class="cuIcon-present text-red"></text></b></span>
+							<span v-if="row.showFlag === '1'"><b><text class="cuIcon-peoplefill text-grey"></text></b></span>
+							<span v-if="row.showFlag === '0'"><b>{{row.serialNumber}}</b></span>
+						</uni-td>
+						<uni-td align="center" :style="row.showFlag === '2'?'background-color: bisque;':''">
+							<view class="uni-group" v-if="row.isButton === '1'">
+								<button class="uni-button" size="mini" v-if="row.luckyDrawFlag !== '1'" @click="LuckyDraw(row.eventsId,row.number,row.id)" type="warn">抽奖</button>
+								<button class="uni-button" size="mini" v-if="row.luckyDrawFlag === '1'" disabled="true" @click="LuckyDraw(row.eventsId,row.number,row.id)" type="warn">抽奖</button>
+							</view>
+							<view v-else>
+								<span v-if="row.showFlag === '2'"><b>{{row.awardsName}}</b></span>
+								<span v-if="row.showFlag === '1'"><b>{{row.awardsName}}</b></span>
+								<span v-if="row.showFlag === '0'">{{row.awardsName}}</span>
+							</view>
+						</uni-td>
+						<uni-td align="center" :style="row.showFlag === '2'?'background-color: bisque;':''">
+							<view class="uni-group" v-if="row.isButton === '1'">
+								<button class="uni-button" size="mini" v-if="row.luckyDrawAgainFlag === '1'" @click="luckyDrawAgain(row.eventsId,row.number,row.id)" type="warn">重新抽奖</button>
+								<button class="uni-button" size="mini" v-if="row.luckyDrawAgainFlag !== '1'" disabled="true" @click="luckyDrawAgain(row.eventsId,row.number,row.id)" type="warn">重新抽奖</button>
+							</view>
+							<view v-else>
+								<span v-if="row.showFlag === '2'"><b>{{row.prizeName}}</b></span>
+								<span v-if="row.showFlag === '1'"><b>{{row.prizeName}}</b></span>
+								<span v-if="row.showFlag === '0'">{{row.prizeName}}</span>
+							</view>
+							
+						</uni-td>
+						<uni-td align="center" :style="row.showFlag === '2'?'background-color: bisque;':''">
+							<view class="uni-group" v-if="row.isButton === '1'">
+								<button class="uni-button" size="mini" @click="luckyDrawClear(row.eventsId,row.number,row.id)" type="warn">清空</button>
+							</view>
+							<view v-else>
+								<span v-if="row.showFlag === '2'"><b>{{row.number}}</b></span>
+								<span v-if="row.showFlag === '1'"><b>{{row.number}}</b></span>
+								<span v-if="row.showFlag === '0'">{{row.number}}</span>
+							</view>
+						</uni-td>
+						<!-- <uni-td align="center" :style="row.showFlag === '2'?'background-color: bisque;':''">
+							<view class="uni-group">
+								<button class="uni-button" size="mini" v-if="row.luckyDrawFlag !== '1'" @click="LuckyDraw(row.eventsId,row.number,row.id)" type="warn">抽奖</button>
+								<button class="uni-button" size="mini" v-if="row.luckyDrawAgainFlag === '1'" @click="luckyDrawAgain(row.eventsId,row.number,row.id)" type="warn">重新抽奖</button>
+							</view>
+						</uni-td> -->
+					</uni-tr>
+				</uni-table>
+				<!-- <view class="uni-pagination-box">
+					<uni-pagination show-icon :page-size="tablePage.pageSize" :current="tablePage.currentPage" :total="tablePage.total" @change="currentChangeHandle" />
+				</view> -->
+			</view>
+		
+			<!-- <uni-fab
+				:pattern=" {
+							color: '#7A7E83',
+							backgroundColor: '#fff',
+							selectedColor: '#007AFF',
+							buttonColor: '#007AFF'
+						}"
+				horizontal="right"
+				vertical="bottom"
+				@fabClick="add"
+			></uni-fab> -->
+		</view>
+		</view>
+</template>
+
+<script>
+  import uniFab from '@/components/uni-fab/uni-fab.vue';
+  import TestMobileService from '@/api/test/luckyDraw/LuckyDrawService'
+  export default {
+	onShow(option) {
+		
+	},
+	components:{
+		uniFab
+	},
+    data () {
+      return {
+        searchForm: {},
+        dataList: [], // 数据列表
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    testMobileService: null,
+	onLoad(option) {
+	  this.testMobileService = new TestMobileService()
+			let { eventId } = option
+	  this.refreshList(eventId)
+	},
+    methods: {
+	  // 新增
+	  add (){
+	  	uni.navigateTo({
+	  	  url: '/pages/test/mobile/TestMobileForm'
+	  	})
+	  },
+	  // 修改
+	  edit (id) {
+	  	uni.navigateTo({
+	  	  url: '/pages/test/mobile/TestMobileForm?id='+id
+	  	})
+	  },
+      // 抽奖
+	  LuckyDraw (id,number,awardId) {
+	  	uni.showModal({
+	  		title: '提示',
+	  		content: '您确认要对该奖项进行抽奖吗',
+	  		showCancel: true,
+	  		success: (res) => {
+	  			if (res.confirm) {
+	  				this.testMobileService.LuckyDraw(id,number,awardId).then((data)=>{
+						console.log(data)
+	  					uni.showToast({
+	  						title: data.msg,
+	  						icon:"success"
+	  					})
+	  					this.refreshList(id)
+	  				})
+	  			}
+	  		}
+	  	});
+	  },
+	  /*获取数据列表 */
+	  refreshList(eventId) {
+	    this.loading = true
+	    this.testMobileService.list({
+	  	  'current': this.tablePage.currentPage,
+	  	  'size': this.tablePage.pageSize,
+	  	  'orders': this.tablePage.orders,
+	  	  'id': eventId,
+	  	  ...this.searchForm
+	  	}).then((data) => {
+	  	  this.dataList = data.records
+	  	  this.tablePage.total = data.total
+	  	  this.loading = false
+	  	})
+	  	
+	  },
+	  // 排序
+	  sortChangeHandle (column) {
+	  	this.tablePage.orders = []
+	  	if (column.order != null) {
+	  	  this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'ascending'})
+	  	}
+	  	this.refreshList()
+	  },
+	// 检索
+	  searchChangeHandle (column) {
+		this.searchForm[column.property] = column.filter
+		this.refreshList()
+	  },
+	// 分页触发
+	  currentChangeHandle (e) {
+		this.tablePage.currentPage = e.current
+		this.refreshList()
+	  },
+		luckyDrawAgain (id,number,awardId) {
+	  	uni.showModal({
+	  		title: '提示',
+	  		content: '您确认要对该奖项进行重新抽奖吗?',
+	  		showCancel: true,
+	  		success: (res) => {
+	  			if (res.confirm) {
+	  				this.testMobileService.luckyDrawAgain(id,number,awardId).then((data)=>{
+						console.log(data)
+	  					uni.showToast({
+	  						title: data.msg,
+	  						icon:"success"
+	  					})
+	  					this.refreshList(id)
+	  				})
+	  			}
+	  		}
+	  	});
+	  },
+		luckyDrawClear (id,number,awardId) {
+	  	uni.showModal({
+	  		title: '提示',
+	  		content: '您确认要清除该中将信息吗?',
+	  		showCancel: true,
+	  		success: (res) => {
+	  			if (res.confirm) {
+	  				this.testMobileService.luckyDrawClear(id,number,awardId).then((data)=>{
+						console.log(data)
+	  					uni.showToast({
+	  						title: data.msg,
+	  						icon:"success"
+	  					})
+	  					this.refreshList(id)
+	  				})
+	  			}
+	  		}
+	  	});
+	  }
+    }
+  }
+</script>
+

+ 28 - 0
pages/test/luckyDraw/LuckyDrawLottery.vue

@@ -0,0 +1,28 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content">中奖信息</block>
+		</cu-custom>
+		<text style="font-size: 60px;">✌</text>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				isCard: false
+			};
+		},
+		methods: {
+			IsCard(e) {
+				this.isCard = e.detail.value
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 98 - 0
pages/test/luckyDraw/LuckyDrawMemberList.vue

@@ -0,0 +1,98 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-blue" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content"> 报名信息</block>
+			<block slot="right" >已报名 {{dataList.length}} 人</block>
+		</cu-custom>
+		<view>
+			<view class="uni-container">
+				<uni-table ref="table" :loading="loading" stripe  emptyText="暂无更多数据" @selection-change="selectionChange">
+					<uni-tr >
+						<uni-th style="width: 50px;" @filter-change="searchChangeHandle"   field="awardsName" @sort-change="sortChangeHandle"  align="center">序号</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="awardsName" @sort-change="sortChangeHandle"  align="center">姓名</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="companyName" @sort-change="sortChangeHandle"  align="center">公司</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="prizeName" @sort-change="sortChangeHandle"  align="center">部门</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="number"  @sort-change="sortChangeHandle"  align="center">手机号</uni-th>
+					</uni-tr>
+					<uni-tr v-for="(row, index) in dataList" :key="index">
+						<uni-td align="center"><span><b>{{row.serialNumber}}</b></span></uni-td>
+						<uni-td align="center">{{row.name}}</uni-td>
+						<uni-td align="center">{{row.companyName}}</uni-td>
+						<uni-td align="center">{{row.officeName}}</uni-td>
+						<uni-td align="center">{{row.phone}}</uni-td>
+					</uni-tr>
+				</uni-table>
+			</view>
+		</view>
+		</view>
+</template>
+
+<script>
+  import uniFab from '@/components/uni-fab/uni-fab.vue';
+  import TestMobileService from '@/api/test/luckyDraw/LuckyDrawService'
+  export default {
+	onShow(option) {
+		
+	},
+	components:{
+		uniFab
+	},
+    data () {
+      return {
+        searchForm: {},
+        dataList: [], // 数据列表
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    testMobileService: null,
+	onLoad(option) {
+	  this.testMobileService = new TestMobileService()
+			let { eventId } = option
+	  this.refreshList(eventId)
+	},
+    methods: {
+	  /*获取数据列表 */
+	  refreshList(eventId) {
+	    this.loading = true
+	    this.testMobileService.appShowList({
+	  	  'current': this.tablePage.currentPage,
+	  	  'size': this.tablePage.pageSize,
+	  	  'orders': this.tablePage.orders,
+	  	  'eventId': eventId,
+	  	  ...this.searchForm
+	  	}).then((data) => {
+	  	  this.dataList = data.records
+	  	  this.tablePage.total = data.total
+	  	  this.loading = false
+	  	})
+	  	
+	  },
+	  // 排序
+	  sortChangeHandle (column) {
+	  	this.tablePage.orders = []
+	  	if (column.order != null) {
+	  	  this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'ascending'})
+	  	}
+	  	this.refreshList()
+	  },
+	// 检索
+	  searchChangeHandle (column) {
+		this.searchForm[column.property] = column.filter
+		this.refreshList()
+	  },
+	// 分页触发
+	  currentChangeHandle (e) {
+		this.tablePage.currentPage = e.current
+		this.refreshList()
+	  }
+    }
+  }
+</script>
+

+ 91 - 0
pages/test/luckyDraw/LuckyDrawRegister.vue

@@ -0,0 +1,91 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content">活动报名</block>
+		</cu-custom>
+		<form @submit="formSubmit()">
+			<view class="cu-form-group margin-top">
+				<view class="title"><text class="red-color ">* </text>姓名</view>
+				<input placeholder="请输入姓名" name="name" v-model="inputForm.name"></input>
+			</view>
+			<view class="cu-form-group ">
+				<view class="title"><text class="red-color ">* </text>部门</view>
+				<picker @change="changeOffice" :value="officeIndex" :range="officeList">
+					<view class="picker">
+						{{officeIndex>-1?officeList[officeIndex]:'请选择'}}
+					</view>
+				</picker>
+			</view>
+			<view class="cu-form-group ">
+				<view class="title"><text class="red-color ">* </text>电话号码</view>
+				<input placeholder="请输入电话号码" name="phone" v-model="inputForm.phone"></input>
+			</view>
+			<view class=" margin-top" style="padding-left: 7px;padding-right: 7px;">
+				<button style="width: 100%;" class='cu-btn lg bg-gradual-blue shadow ' form-type="submit">提交</button>
+			</view>
+		</form>
+	</view>
+</template>
+
+<script>
+	var  graceChecker = require("@/common/graceChecker.js");
+	import LuckyDrawMembersService from '@/api/test/luckyDraw/LuckyDrawMembersService.js'
+	export default {
+		data() {
+			return {
+				eventId: '',
+				inputForm: {
+					name: '',
+					officeName: '',
+					mobile: '',
+					eventId: ''
+				},
+				officeList: [
+					'工程一部','工程二部','工程三部','工程四部','工程五部','招标代理部','兴光评估','其他'
+				],
+				officeIndex: -1
+			};
+		},
+		luckyDrawMembersService: null,
+		onLoad(option) {
+			this.luckyDrawMembersService = new LuckyDrawMembersService()
+			let { eventId } = option
+			this.inputForm.eventId = eventId
+		},
+		methods: {
+			formSubmit: function(e) {
+				//定义表单规则
+				var rule = [
+					  {name:"name", checkType : "notnull", checkRule:"",  errorMsg:"姓名不能为空"},
+					  {name:"officeName", checkType : "notnull", checkRule:"",  errorMsg:"部门不能为空"},
+					  {name:"phone", checkType : "notnull", checkRule:"",  errorMsg:"电话号码不能为空"},
+					  {name:"phone", checkType : "isMobileNumber", checkRule:"",  errorMsg:"电话号码格式不正确"}
+				];
+				//进行表单检查
+				var formData = this.inputForm;
+				var checkRes = graceChecker.check(formData, rule);
+				if(checkRes){
+					uni.showLoading()
+					this.luckyDrawMembersService.save(this.inputForm).then((data) => {
+						uni.showToast({title:data, icon:"success"});
+						uni.navigateTo({
+						  url: '/pages/test/luckyDraw/LuckyDrawEvents?is_sucess='+'200'
+						})
+					}).catch((e)=>{
+					})
+				}else{
+					uni.showToast({ title: graceChecker.error, icon: "none" });
+				}
+			},
+			changeOffice(e){
+				this.officeIndex = e.target.value;
+				this.inputForm.officeName = this.officeList[this.officeIndex]
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 107 - 0
pages/test/luckyDraw/LuckyDrawShowList.vue

@@ -0,0 +1,107 @@
+<template>
+	<view>
+		<cu-custom :isBack="true" :backUrl="'/pages/apps/apps'" bgColor="bg-gradual-blue">
+			<block slot="backText">返回</block>
+			<block slot="content">抽奖结果</block>
+		</cu-custom>
+		<view>
+			<view class="uni-container">
+				<uni-table ref="table" :loading="loading" stripe  emptyText="暂无更多数据" @selection-change="selectionChange">
+					<uni-tr >
+						<uni-th style="width: 50px;" @filter-change="searchChangeHandle"   field="awardsName" @sort-change="sortChangeHandle"  align="center">序号</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="awardsName" @sort-change="sortChangeHandle"  align="center">奖项名称</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="prizeName" @sort-change="sortChangeHandle"  align="center">奖品名称</uni-th>
+						<uni-th @filter-change="searchChangeHandle"   field="number"  @sort-change="sortChangeHandle"  align="center">数量</uni-th>
+					</uni-tr>
+					<uni-tr v-for="(row, index) in dataList" :key="index">
+						<uni-td align="center" :style="row.showFlag === '2'?'background-color: bisque;':''">
+							<span v-if="row.showFlag === '2'"><b><text class="cuIcon-present text-red"></text></b></span>
+							<span v-if="row.showFlag === '1'"><b><text class="cuIcon-peoplefill text-grey"></text></b></span>
+							<span v-if="row.showFlag === '0'"><b>{{row.serialNumber}}</b></span>
+						</uni-td>
+						<uni-td align="center" :style="row.showFlag === '2'?'background-color: bisque;':''">
+							<span v-if="row.showFlag === '2'"><b>{{row.awardsName}}</b></span>
+							<span v-if="row.showFlag === '1'"><b>{{row.awardsName}}</b></span>
+							<span v-if="row.showFlag === '0'">{{row.awardsName}}</span>
+						
+						</uni-td>
+						<uni-td align="center" :style="row.showFlag === '2'?'background-color: bisque;':''">
+							<span v-if="row.showFlag === '2'"><b>{{row.prizeName}}</b></span>
+							<span v-if="row.showFlag === '1'"><b>{{row.prizeName}}</b></span>
+							<span v-if="row.showFlag === '0'">{{row.prizeName}}</span>
+						</uni-td>
+						<uni-td align="center" :style="row.showFlag === '2'?'background-color: bisque;':''">
+							<span v-if="row.showFlag === '2'"><b>{{row.number}}</b></span>
+							<span v-if="row.showFlag === '1'"><b>{{row.number}}</b></span>
+							<span v-if="row.showFlag === '0'">{{row.number}}</span>
+						</uni-td>
+					</uni-tr>
+				</uni-table>
+			</view>
+		</view>
+		</view>
+</template>
+
+<script>
+  import uniFab from '@/components/uni-fab/uni-fab.vue';
+  import TestMobileService from '@/api/test/luckyDraw/LuckyDrawService'
+  export default {
+	onShow(option) {
+		
+	},
+	components:{
+		uniFab
+	},
+    data () {
+      return {
+        searchForm: {},
+        dataList: [], // 数据列表
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    testMobileService: null,
+	onLoad(option) {
+	  this.testMobileService = new TestMobileService()
+		let { eventId } = option
+	  this.refreshList(eventId)
+	},
+    methods: {
+	  /*获取数据列表 */
+	  refreshList(eventId) {
+	    this.loading = true
+	    this.testMobileService.pjShowList({
+	  	  'current': this.tablePage.currentPage,
+	  	  'size': this.tablePage.pageSize,
+	  	  'orders': this.tablePage.orders,
+	  	  'id': eventId,
+	  	  ...this.searchForm
+	  	}).then((data) => {
+	  	  this.dataList = data.records
+	  	  this.tablePage.total = data.total
+	  	  this.loading = false
+	  	})
+	  	
+	  },
+	  // 排序
+	  sortChangeHandle (column) {
+	  	this.tablePage.orders = []
+	  	if (column.order != null) {
+	  	  this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'ascending'})
+	  	}
+	  	this.refreshList()
+	  },
+	// 检索
+	  searchChangeHandle (column) {
+		this.searchForm[column.property] = column.filter
+		this.refreshList()
+	  }
+    }
+  }
+</script>
+

BIN
static/lucky_draw_events.jpg