|
@@ -59,12 +59,25 @@
|
|
|
type="text"
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
|
- v-has-permi="['course:checkinActivity:edit']">修改</el-button>
|
|
|
|
|
|
|
+ v-has-permi="['course:checkinActivity:edit']"
|
|
|
|
|
+ :disabled="scope.row.status === 1">修改</el-button>
|
|
|
<el-button size="mini"
|
|
<el-button size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
|
- v-has-permi="['course:checkinActivity:remove']">删除</el-button>
|
|
|
|
|
|
|
+ v-has-permi="['course:checkinActivity:remove']"
|
|
|
|
|
+ :disabled="scope.row.status === 1">删除</el-button>
|
|
|
|
|
+ <el-button size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-document-copy"
|
|
|
|
|
+ @click="handleCopy(scope.row)"
|
|
|
|
|
+ v-has-permi="['course:checkinActivity:add']"
|
|
|
|
|
+ v-if="scope.row.status === 2">复制活动</el-button>
|
|
|
|
|
+ <el-button size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-gift"
|
|
|
|
|
+ @click="handlePrizeRecord(scope.row)"
|
|
|
|
|
+ v-has-permi="['course:checkinReceive:query']">奖品记录</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -87,11 +100,11 @@
|
|
|
<el-form-item label="活动时间" prop="timeRange">
|
|
<el-form-item label="活动时间" prop="timeRange">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="form.timeRange"
|
|
v-model="form.timeRange"
|
|
|
- type="datetimerange"
|
|
|
|
|
|
|
+ type="daterange"
|
|
|
range-separator="至"
|
|
range-separator="至"
|
|
|
- start-placeholder="开始时间"
|
|
|
|
|
- end-placeholder="结束时间"
|
|
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
size="small"
|
|
size="small"
|
|
|
style="width: 100%">
|
|
style="width: 100%">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
@@ -146,7 +159,7 @@
|
|
|
|
|
|
|
|
<el-form-item v-if="form.prizeType === 1" label="红包金额" prop="redpacketAmount"
|
|
<el-form-item v-if="form.prizeType === 1" label="红包金额" prop="redpacketAmount"
|
|
|
:rules="{ required: true, message: '红包金额不能为空', trigger: 'blur' }">
|
|
:rules="{ required: true, message: '红包金额不能为空', trigger: 'blur' }">
|
|
|
- <el-input-number v-model="form.redpacketAmount" :min="0.01" :precision="2" :step="0.1" size="small" style="width: 200px" />
|
|
|
|
|
|
|
+ <el-input-number v-model="form.redpacketAmount" :min="0.1" :precision="2" :step="0.1" size="small" style="width: 200px" />
|
|
|
<span style="margin-left: 10px; color: #999;">元</span>
|
|
<span style="margin-left: 10px; color: #999;">元</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
@@ -176,6 +189,77 @@
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 复制活动对话框 -->
|
|
|
|
|
+ <el-dialog title="复制活动" :visible.sync="copyOpen" width="500px" append-to-body>
|
|
|
|
|
+ <el-form :model="copyForm" ref="copyForm" :rules="copyRules" label-width="120px">
|
|
|
|
|
+ <el-form-item label="新活动时间" prop="timeRange">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="copyForm.timeRange"
|
|
|
|
|
+ type="daterange"
|
|
|
|
|
+ range-separator="至"
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ style="width: 100%">
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="copyOpen = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="submitCopy">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 奖品领取记录对话框 -->
|
|
|
|
|
+ <el-dialog :title="'奖品领取记录 - ' + prizeRecordTitle" :visible.sync="prizeRecordOpen" width="900px" append-to-body>
|
|
|
|
|
+ <el-tabs v-model="prizeRecordType" @tab-click="handlePrizeRecordTabChange">
|
|
|
|
|
+ <el-tab-pane label="红包记录" name="redpacket">
|
|
|
|
|
+ <el-table v-loading="prizeRecordLoading" :data="prizeRecordList" border style="width: 100%">
|
|
|
|
|
+ <el-table-column label="ID" align="center" prop="receiveId" min-width="80" />
|
|
|
|
|
+ <el-table-column label="用户昵称" align="center" prop="userNickName" min-width="120" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="企业名" align="center" prop="companyName" min-width="150" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="红包金额" align="center" prop="redpacketAmount" min-width="100">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span>{{ scope.row.redpacketAmount }} 元</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="领取状态" align="center" prop="receiveStatus" min-width="100">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag v-if="scope.row.receiveStatus === 0" type="info">未领取</el-tag>
|
|
|
|
|
+ <el-tag v-else-if="scope.row.receiveStatus === 1" type="success">已领取</el-tag>
|
|
|
|
|
+ <el-tag v-else-if="scope.row.receiveStatus === 2" type="danger">领取失败</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="领取时间" align="center" prop="receiveTime" min-width="160" />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </el-tab-pane>
|
|
|
|
|
+ <el-tab-pane label="积分商品记录" name="goods">
|
|
|
|
|
+ <el-table v-loading="prizeRecordLoading" :data="prizeRecordList" border style="width: 100%">
|
|
|
|
|
+ <el-table-column label="ID" align="center" prop="receiveId" min-width="80" />
|
|
|
|
|
+ <el-table-column label="用户昵称" align="center" prop="userNickName" min-width="120" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="企业名" align="center" prop="companyName" min-width="150" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="积分商品名" align="center" prop="goodsName" min-width="150" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="领取状态" align="center" prop="receiveStatus" min-width="100">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag v-if="scope.row.receiveStatus === 0" type="info">未领取</el-tag>
|
|
|
|
|
+ <el-tag v-else-if="scope.row.receiveStatus === 1" type="success">已领取</el-tag>
|
|
|
|
|
+ <el-tag v-else-if="scope.row.receiveStatus === 2" type="danger">领取失败</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="领取时间" align="center" prop="receiveTime" min-width="160" />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </el-tab-pane>
|
|
|
|
|
+ </el-tabs>
|
|
|
|
|
+ <pagination
|
|
|
|
|
+ v-show="prizeRecordTotal>0"
|
|
|
|
|
+ :total="prizeRecordTotal"
|
|
|
|
|
+ :page.sync="prizeRecordQuery.pageNum"
|
|
|
|
|
+ :limit.sync="prizeRecordQuery.pageSize"
|
|
|
|
|
+ @pagination="getPrizeRecordList"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -233,6 +317,29 @@ export default {
|
|
|
{ required: true, message: "参与项目不能为空", trigger: "change" }
|
|
{ required: true, message: "参与项目不能为空", trigger: "change" }
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ copyOpen: false,
|
|
|
|
|
+ copyForm: {
|
|
|
|
|
+ activityId: null,
|
|
|
|
|
+ timeRange: []
|
|
|
|
|
+ },
|
|
|
|
|
+ copyRules: {
|
|
|
|
|
+ timeRange: [
|
|
|
|
|
+ { required: true, message: "新活动时间不能为空", trigger: "change" }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ // 奖品领取记录
|
|
|
|
|
+ prizeRecordOpen: false,
|
|
|
|
|
+ prizeRecordTitle: "",
|
|
|
|
|
+ prizeRecordType: "redpacket",
|
|
|
|
|
+ prizeRecordLoading: false,
|
|
|
|
|
+ prizeRecordList: [],
|
|
|
|
|
+ prizeRecordTotal: 0,
|
|
|
|
|
+ prizeRecordQuery: {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ activityId: null,
|
|
|
|
|
+ prizeType: 1
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
@@ -391,6 +498,64 @@ export default {
|
|
|
this.msgSuccess("删除成功");
|
|
this.msgSuccess("删除成功");
|
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
|
},
|
|
},
|
|
|
|
|
+ handleCopy(row) {
|
|
|
|
|
+ this.copyForm.activityId = row.activityId;
|
|
|
|
|
+ this.copyForm.timeRange = [];
|
|
|
|
|
+ this.copyOpen = true;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ if (this.$refs.copyForm) {
|
|
|
|
|
+ this.$refs.copyForm.clearValidate();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ submitCopy() {
|
|
|
|
|
+ this.$refs.copyForm.validate(valid => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ activityId: this.copyForm.activityId,
|
|
|
|
|
+ startTime: this.copyForm.timeRange[0],
|
|
|
|
|
+ endTime: this.copyForm.timeRange[1]
|
|
|
|
|
+ };
|
|
|
|
|
+ request({
|
|
|
|
|
+ url: '/course/checkinActivity/copy',
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ data: params
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.msgSuccess("复制成功");
|
|
|
|
|
+ this.copyOpen = false;
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ handlePrizeRecord(row) {
|
|
|
|
|
+ this.prizeRecordTitle = row.activityName;
|
|
|
|
|
+ this.prizeRecordQuery.activityId = row.activityId;
|
|
|
|
|
+ this.prizeRecordQuery.pageNum = 1;
|
|
|
|
|
+ this.prizeRecordType = "redpacket";
|
|
|
|
|
+ this.prizeRecordQuery.prizeType = 1;
|
|
|
|
|
+ this.prizeRecordOpen = true;
|
|
|
|
|
+ this.getPrizeRecordList();
|
|
|
|
|
+ },
|
|
|
|
|
+ handlePrizeRecordTabChange() {
|
|
|
|
|
+ this.prizeRecordQuery.prizeType = this.prizeRecordType === "redpacket" ? 1 : 2;
|
|
|
|
|
+ this.prizeRecordQuery.pageNum = 1;
|
|
|
|
|
+ this.getPrizeRecordList();
|
|
|
|
|
+ },
|
|
|
|
|
+ getPrizeRecordList() {
|
|
|
|
|
+ this.prizeRecordLoading = true;
|
|
|
|
|
+ request({
|
|
|
|
|
+ url: '/course/checkinActivity/prizeRecord',
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ params: this.prizeRecordQuery
|
|
|
|
|
+ }).then(response => {
|
|
|
|
|
+ this.prizeRecordList = response.rows || [];
|
|
|
|
|
+ this.prizeRecordTotal = response.total || 0;
|
|
|
|
|
+ this.prizeRecordLoading = false;
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.prizeRecordLoading = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
cancel() {
|
|
cancel() {
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.reset();
|
|
this.reset();
|