|
@@ -8,6 +8,7 @@
|
|
|
<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>
|
|
@@ -15,8 +16,14 @@
|
|
|
</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" type="warn">按钮</button>
|
|
|
+ <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>
|
|
@@ -26,7 +33,8 @@
|
|
|
</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" 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>
|
|
|
+ <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>
|
|
@@ -37,7 +45,7 @@
|
|
|
</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" type="warn">按钮</button>
|
|
|
+ <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>
|
|
@@ -187,6 +195,25 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ },
|
|
|
+ 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)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|