Commit b4c3f5b1 by crushh

update: dist

parent 397f5ede
......@@ -14,7 +14,7 @@
</div>
<div class="tips" style="font-size:14px">
没有适用规则?<el-button type="text" size="small" @click="$router.push('/addRule')">
去新建上架规则({{ tableDate.length }}/20)
去新建上架规则({{ totalCount }}/20)
</el-button>
</div>
</div>
......@@ -51,7 +51,7 @@
</template>
</el-table-column>
</el-table>
<div class="pagination-conteiner" style="padding:10px 0 0 0;" v-if="tableDate.length>5">
<div class="pagination-conteiner" style="padding:10px 0 0 0;" v-if="totalCount>5">
<div class="pagination">
<el-pagination
layout="prev, pager, next"
......@@ -105,8 +105,9 @@ export default {
this.getList();
},
getList () {
request.get('/api-integral-mall/list-rule', { params: { ruleTitle: this.ruleTitle } }).then(async (res) => {
this.tableDate = res.data.result || [];
request.get('/api-integral-mall/page-rule', { params: this.relateForm }).then(async (res) => {
this.tableDate = res.data.result.result || [];
this.totalCount = res.data.result.totalCount;
for (let i = 0; i < this.tableDate.length; i++) {
const item = this.tableDate[i];
if (item.memberType == 3) {
......
......@@ -40,6 +40,7 @@
<el-table
ref="table"
:data="tableDate"
v-loading="loading"
style="width: 100%"
>
<el-table-column
......@@ -218,8 +219,12 @@
</div>
</template>
</el-table-column>
<el-table-column property="proType" label="商品类型" width="100" />
<el-table-column property="costValue" label="成本" width="100" />
<el-table-column property="proType" label="商品类型" width="100">
<template slot-scope="{row}">
{{ row.proType|filterProType }}
</template>
</el-table-column>
<el-table-column property="costValue" label="成本(元)" width="100" />
<el-table-column property="virtualStock" label="当前库存" width="100" />
<el-table-column property="ruleTitle" label="是否已关联规则" min-width="120">
<template slot-scope="{row}">
......@@ -255,6 +260,24 @@ import request from '@/service/request.js';
import getInputVal from '@/utils/common.js';
export default {
filters: {
filterProType (val) {
console.log(val);
let str = '';
switch (val) {
case 1:
str = '优惠券';
break;
case 2:
str = '优惠券';
break;
case 3:
str = '礼品';
break;
}
return str;
},
},
data () {
return {
......@@ -287,10 +310,13 @@ export default {
},
methods: {
getList () {
this.loading = true;
request.get('/api-integral-mall/list-rule', { params: { ruleTitle: this.ruleTitle } }).then(res => {
console.log(res.data.result);
this.tableDate = res.data.result || [];
}).finally(_ => {
this.loading = false;
});
},
relatingDetail (integralMallProRuleId, type) {
......@@ -306,13 +332,13 @@ export default {
this.getRelatingGoodsTable();
},
delRelating (integralMallProRuleId) {
this.loading = true;
this.$confirm('上架规则删除后,无法被商品关联使用,是否确认删除?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.loading = true;
request.post('/api-integral-mall/del-rule', { integralMallProRuleId }).then(res => {
this.$message.success('删除成功');
this.getList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment