|
@@ -27,6 +27,13 @@
|
|
<el-tabs style="padding: 0 20px 40px 20px;" v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs style="padding: 0 20px 40px 20px;" v-model="activeName" @tab-click="handleClick">
|
|
<el-tab-pane label="积分兑换" name="goodsNotice">
|
|
<el-tab-pane label="积分兑换" name="goodsNotice">
|
|
<el-input clearable style="width: 200px;" size="small" v-model="goodsName" placeholder="物品名称"></el-input>
|
|
<el-input clearable style="width: 200px;" size="small" v-model="goodsName" placeholder="物品名称"></el-input>
|
|
|
|
+ <el-select clearable style="width: 200px; margin-left: 30px;" size="small" v-model="productAttribute"
|
|
|
|
+ placeholder="物品类型">
|
|
|
|
+ <el-option v-for="item in options" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-button size="small" style="margin-left: 30px;" type="primary" round @click="changeOrderByClause('asc')" icon="el-icon-top">积分</el-button>
|
|
|
|
+ <el-button size="small" style="margin-left: 30px;" type="primary" round @click="changeOrderByClause('desc')" icon="el-icon-bottom">积分</el-button>
|
|
<el-button size="small" style="margin-left: 30px;" type="primary" @click="getList('goodsNotice')">查询</el-button>
|
|
<el-button size="small" style="margin-left: 30px;" type="primary" @click="getList('goodsNotice')">查询</el-button>
|
|
<div class="list-container">
|
|
<div class="list-container">
|
|
<el-empty v-if="goodsList.length==0" :image-size="200"></el-empty>
|
|
<el-empty v-if="goodsList.length==0" :image-size="200"></el-empty>
|
|
@@ -56,8 +63,8 @@
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="礼品兑换" name="giftNotice">
|
|
<el-tab-pane label="礼品兑换" name="giftNotice">
|
|
- <el-input clearable style="width: 200px;" size="small" v-model="giftName" placeholder="物品名称"></el-input>
|
|
|
|
- <el-button size="small" style="margin-left: 30px;" type="primary" @click="getList('giftNotice')">查询</el-button>
|
|
|
|
|
|
+ <!-- <el-input clearable style="width: 200px;" size="small" v-model="giftName" placeholder="物品名称"></el-input>
|
|
|
|
+ <el-button size="small" style="margin-left: 30px;" type="primary" @click="getList('giftNotice')">查询</el-button> -->
|
|
<el-empty v-if="goodsList.length==0" :image-size="200"></el-empty>
|
|
<el-empty v-if="goodsList.length==0" :image-size="200"></el-empty>
|
|
<div v-else>
|
|
<div v-else>
|
|
<div class="tab-list">
|
|
<div class="tab-list">
|
|
@@ -100,12 +107,15 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import { integralList, festivalList, notice, welfareType } from "@/api/allApi";
|
|
|
|
|
|
+import { integralList, festivalList, notice, welfareType, integralTypes } from "@/api/allApi";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// tab 列表
|
|
// tab 列表
|
|
|
|
+ options: [],
|
|
goodsName:'',
|
|
goodsName:'',
|
|
|
|
+ productAttribute:'',
|
|
|
|
+ orderByClause:'asc',
|
|
giftName:'',
|
|
giftName:'',
|
|
choseList: [],
|
|
choseList: [],
|
|
curChosed: '',
|
|
curChosed: '',
|
|
@@ -115,11 +125,21 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ this.getIntegralTypes();
|
|
this.getWelfareList();
|
|
this.getWelfareList();
|
|
this.getList(this.activeName);
|
|
this.getList(this.activeName);
|
|
this.getNotice(this.activeName);
|
|
this.getNotice(this.activeName);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ changeOrderByClause(val){
|
|
|
|
+ this.orderByClause = val;
|
|
|
|
+ this.getList('goodsNotice');
|
|
|
|
+ },
|
|
|
|
+ getIntegralTypes(){
|
|
|
|
+ integralTypes({dictType:'mall_sku_attribute'}).then(response=>{
|
|
|
|
+ this.options = response.data.data;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getWelfareList() {
|
|
getWelfareList() {
|
|
welfareType({}).then(response => {
|
|
welfareType({}).then(response => {
|
|
console.log(response.data.data);
|
|
console.log(response.data.data);
|
|
@@ -159,7 +179,12 @@ export default {
|
|
},
|
|
},
|
|
getList(val) {
|
|
getList(val) {
|
|
if (val == 'goodsNotice') {
|
|
if (val == 'goodsNotice') {
|
|
- integralList({name:this.goodsName}).then(response => {
|
|
|
|
|
|
+ let params = {
|
|
|
|
+ name:this.goodsName,
|
|
|
|
+ productAttribute:this.productAttribute,
|
|
|
|
+ orderByClause:this.orderByClause
|
|
|
|
+ }
|
|
|
|
+ integralList(params).then(response => {
|
|
console.log(response.data.data);
|
|
console.log(response.data.data);
|
|
this.goodsList = response.data.data
|
|
this.goodsList = response.data.data
|
|
}).catch(() => {
|
|
}).catch(() => {
|