|
@@ -2,12 +2,13 @@
|
|
<div id="index">
|
|
<div id="index">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24" class="main animate__animated animate__backInRight">
|
|
<el-col :span="24" class="main animate__animated animate__backInRight">
|
|
- <el-col :span="24" class="one"> <span>活动标题</span> </el-col>
|
|
|
|
|
|
+ <el-col :span="24" class="one"> <span>平台活动商品</span> </el-col>
|
|
<el-col :span="24" class="two">
|
|
<el-col :span="24" class="two">
|
|
- <!-- <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1> -->
|
|
|
|
|
|
+ <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="thr">
|
|
<el-col :span="24" class="thr">
|
|
<el-button type="primary" size="mini" @click="toAdd()">新增</el-button>
|
|
<el-button type="primary" size="mini" @click="toAdd()">新增</el-button>
|
|
|
|
+ <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="four">
|
|
<el-col :span="24" class="four">
|
|
<data-table
|
|
<data-table
|
|
@@ -37,7 +38,7 @@ export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
props: {},
|
|
props: {},
|
|
components: {
|
|
components: {
|
|
- // search1: () => import('./parts/search-1.vue'),
|
|
|
|
|
|
+ search1: () => import('./parts/search-2.vue'),
|
|
},
|
|
},
|
|
data: function () {
|
|
data: function () {
|
|
const that = this;
|
|
const that = this;
|
|
@@ -45,8 +46,17 @@ export default {
|
|
// 列表
|
|
// 列表
|
|
opera: [{ label: '删除', method: 'del', confirm: true, type: 'danger' }],
|
|
opera: [{ label: '删除', method: 'del', confirm: true, type: 'danger' }],
|
|
fields: [
|
|
fields: [
|
|
- { label: '活动标题', model: 'title' },
|
|
|
|
- { label: '活动时间', model: 'act_time.value' },
|
|
|
|
|
|
+ { label: '商品名称', model: 'goods.name' },
|
|
|
|
+ { label: '店铺名称', model: 'shop.name' },
|
|
|
|
+ {
|
|
|
|
+ label: '状态',
|
|
|
|
+ model: 'status',
|
|
|
|
+ format: (i) => {
|
|
|
|
+ let data = that.statusList.find((f) => f.value == i);
|
|
|
|
+ if (data) return data.label;
|
|
|
|
+ else return '暂无';
|
|
|
|
+ },
|
|
|
|
+ },
|
|
],
|
|
],
|
|
list: [],
|
|
list: [],
|
|
total: 0,
|
|
total: 0,
|
|
@@ -54,9 +64,12 @@ export default {
|
|
searchForm: {},
|
|
searchForm: {},
|
|
// 多选值
|
|
// 多选值
|
|
selected: [],
|
|
selected: [],
|
|
|
|
+ // 状态
|
|
|
|
+ statusList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
|
|
+ await this.searchOther();
|
|
await this.search();
|
|
await this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -73,7 +86,7 @@ export default {
|
|
},
|
|
},
|
|
// 新增
|
|
// 新增
|
|
toAdd() {
|
|
toAdd() {
|
|
- this.$router.push({ path: '/system/act/goosDetail' });
|
|
|
|
|
|
+ this.$router.push({ path: '/system/act/goodsDetail' });
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
async toDel({ data }) {
|
|
async toDel({ data }) {
|
|
@@ -92,6 +105,19 @@ export default {
|
|
handleSelect(data) {
|
|
handleSelect(data) {
|
|
this.$set(this, `selected`, data);
|
|
this.$set(this, `selected`, data);
|
|
},
|
|
},
|
|
|
|
+ // 查询其他信息
|
|
|
|
+ async searchOther() {
|
|
|
|
+ let res;
|
|
|
|
+ // 是否使用
|
|
|
|
+ res = await this.dictQuery({ code: 'platformAct_goods_status' });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `statusList`, res.data);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 返回
|
|
|
|
+ toBack() {
|
|
|
|
+ window.history.go('-1');
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
@@ -124,6 +150,8 @@ export default {
|
|
margin: 0 0 10px 0;
|
|
margin: 0 0 10px 0;
|
|
}
|
|
}
|
|
.thr {
|
|
.thr {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
margin: 0 0 10px 0;
|
|
margin: 0 0 10px 0;
|
|
}
|
|
}
|
|
}
|
|
}
|