|
|
@@ -9,6 +9,14 @@
|
|
|
</el-button>
|
|
|
</page-title>
|
|
|
<div class="filters-container">
|
|
|
+ <el-select v-model="caseStatus" placeholder="状态" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in caseStatusOptions"
|
|
|
+ :label="item.label"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
<el-input
|
|
|
placeholder="搜索..."
|
|
|
v-model="search"
|
|
|
@@ -30,13 +38,13 @@
|
|
|
:height="tableHeight"
|
|
|
>
|
|
|
<el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
|
|
|
- <el-table-column prop="id" label="ID" width="100"> </el-table-column>
|
|
|
- <el-table-column prop="store.storeName" label="店铺名称"> </el-table-column>
|
|
|
- <el-table-column prop="collection.name" label="卡牌主题"> </el-table-column>
|
|
|
- <el-table-column prop="customName" label="福袋名称"> </el-table-column>
|
|
|
- <el-table-column prop="boxPrice" label="每盒单价"> </el-table-column>
|
|
|
+ <el-table-column prop="cardCaseId" label="ID" width="100"> </el-table-column>
|
|
|
+ <el-table-column prop="storeName" label="店铺名称"> </el-table-column>
|
|
|
+ <el-table-column prop="caseName" label="卡牌主题"> </el-table-column>
|
|
|
+ <el-table-column prop="caseName" label="福袋名称"> </el-table-column>
|
|
|
+ <el-table-column prop="price" label="每盒单价"> </el-table-column>
|
|
|
<el-table-column prop="caseStatus" label="卡箱状态" :formatter="caseStatusFormatter"> </el-table-column>
|
|
|
- <el-table-column prop="startTime" label="创建时间"> </el-table-column>
|
|
|
+ <el-table-column prop="endTime" label="创建时间"> </el-table-column>
|
|
|
<el-table-column label="操作" align="center" fixed="right" min-width="150">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
|
|
|
@@ -99,8 +107,9 @@ export default {
|
|
|
return {
|
|
|
multipleMode: false,
|
|
|
search: '',
|
|
|
- url: '/cardCase/all',
|
|
|
+ url: '/cardCase/showCasesMA2',
|
|
|
downloading: false,
|
|
|
+ caseStatus: 'PROGRESS',
|
|
|
caseStatusOptions: [
|
|
|
{ label: '未审核', value: 'UNDO' },
|
|
|
{ label: '待开始', value: 'WAIT' },
|
|
|
@@ -122,10 +131,24 @@ export default {
|
|
|
}
|
|
|
return '';
|
|
|
},
|
|
|
- beforeGetData() {
|
|
|
- let data = { search: this.search };
|
|
|
- data.sort = 'createdAt,desc';
|
|
|
- return data;
|
|
|
+ getData() {
|
|
|
+ let data = {
|
|
|
+ page: this.page - 1,
|
|
|
+ size: this.pageSize,
|
|
|
+ seriesId: 103,
|
|
|
+ caseStatus: this.caseStatus
|
|
|
+ };
|
|
|
+ this.$http
|
|
|
+ .get(this.url, data, { body: 'json' })
|
|
|
+ .then(res => {
|
|
|
+ this.tableData = res.content;
|
|
|
+ this.totalPages = res.totalPages;
|
|
|
+ this.totalElements = res.totalElements;
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
},
|
|
|
toggleMultipleMode(multipleMode) {
|
|
|
this.multipleMode = multipleMode;
|
|
|
@@ -145,7 +168,7 @@ export default {
|
|
|
this.$router.push({
|
|
|
path: '/cardCaseEdit',
|
|
|
query: {
|
|
|
- id: row.id
|
|
|
+ id: row.cardCaseId
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -185,7 +208,7 @@ export default {
|
|
|
deleteRow(row) {
|
|
|
this.$alert('下架后将无法在小程序中展示,确认下架吗?', '警告', { type: 'error' })
|
|
|
.then(() => {
|
|
|
- return this.$http.get(`/cardCase/softDelete`, { caseId: row.id });
|
|
|
+ return this.$http.get(`/cardCase/softDelete`, { caseId: row.cardCaseId });
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.$message.success('下架成功');
|
|
|
@@ -200,7 +223,7 @@ export default {
|
|
|
cancel(row) {
|
|
|
this.$alert('流单后本订单下的所有付款后订单将发起退款且自动通过,是否确认流单?', '警告', { type: 'error' })
|
|
|
.then(() => {
|
|
|
- return this.$http.post(`/cardCase/cancel`, { caseId: row.id });
|
|
|
+ return this.$http.post(`/cardCase/cancel`, { caseId: row.cardCaseId });
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.$message.success('流单成功');
|
|
|
@@ -215,7 +238,7 @@ export default {
|
|
|
reviveRow(row) {
|
|
|
this.$alert('开放后拼箱将开放购买,确认开放购买吗?', '提示', { type: 'success' })
|
|
|
.then(() => {
|
|
|
- return this.$http.get(`/cardCase/revive`, { caseId: row.id });
|
|
|
+ return this.$http.get(`/cardCase/revive`, { caseId: row.cardCaseId });
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.$message.success('开放成功');
|