优化积分中心新增类型
This commit is contained in:
parent
438c11c324
commit
da1812f78b
|
|
@ -139,5 +139,6 @@ export default {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="query.status" placeholder="状态" style="width: 140px;">
|
||||
<el-option label="待自取" value="waiting"></el-option>
|
||||
<el-option label="已完成" value="done"></el-option>
|
||||
<el-option :label="item.label" :value="item.value" v-for="item in statusList"
|
||||
:key="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -54,27 +54,38 @@
|
|||
</div>
|
||||
<div class="head-container">
|
||||
<el-table :data="tableData.list" v-loading="tableData.loading">
|
||||
<el-table-column label="订单编号" prop="orderNo"></el-table-column>
|
||||
<el-table-column label="用户名" prop="memberName">
|
||||
<el-table-column label="订单编号" prop="orderNo" width="200"></el-table-column>
|
||||
<el-table-column label="用户名" prop="memberName" width="200">
|
||||
<template v-slot="scope">
|
||||
<div class="goods_info">
|
||||
<el-image :src="scope.row.avatarUrl" style="width:40px;height:40px;flex-shrink: 0;"
|
||||
:preview-src-list="avatarUrlList" />
|
||||
:preview-src-list="avatarUrlList">
|
||||
<div slot="error" class="image-slot">
|
||||
<i class="el-icon-folder-delete"></i>
|
||||
</div>
|
||||
</el-image>
|
||||
<span>{{ scope.row.memberName }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品" prop="pointsGoodsName">
|
||||
<el-table-column label="商品" prop="pointsGoodsName" width="200">
|
||||
<template v-slot="scope">
|
||||
<div class="goods_info">
|
||||
<el-image :src="scope.row.goodsImageUrl" style="width:40px;height:40px;flex-shrink: 0;"
|
||||
:preview-src-list="srcList" />
|
||||
:preview-src-list="srcList">
|
||||
<div slot="error" class="image-slot">
|
||||
<i class="el-icon-folder-delete"></i>
|
||||
</div>
|
||||
</el-image>
|
||||
<span>{{ scope.row.pointsGoodsName }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用积分" prop="spendPoints"></el-table-column>
|
||||
<el-table-column label="支付金额" prop="extraPaymentAmount"></el-table-column>
|
||||
<el-table-column label="支付方式" prop="payMethod"></el-table-column>
|
||||
<el-table-column label="实际支付时间" prop="payTime" width="200"></el-table-column>
|
||||
<el-table-column label="下单时间" prop="createTime" width="200"></el-table-column>
|
||||
<el-table-column label="领取方式" prop="pickupMethod">
|
||||
<template v-slot="scope">
|
||||
<el-tag type="success" effect="plain" disable-transitions
|
||||
|
|
@ -88,18 +99,27 @@
|
|||
<template v-slot="scope">
|
||||
<el-tag type="warning" disable-transitions v-if="scope.row.status == 'waiting'">待自取</el-tag>
|
||||
<el-tag type="success" disable-transitions v-if="scope.row.status == 'done'">已完成</el-tag>
|
||||
<el-tag type="warning" disable-transitions v-if="scope.row.status == 'unpaid'">待支付</el-tag>
|
||||
<el-tag type="info" disable-transitions v-if="scope.row.status == 'cancel'">已取消</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单时间" prop="createTime"></el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<el-table-column label="取消/退款" prop="cancelOrRefundTime" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" icon="el-icon-finished" disabled
|
||||
v-if="scope.row.status == 'done'">已完成</el-button>
|
||||
<template v-else>
|
||||
<template v-if="scope.row.status == 'cancel'">
|
||||
<div>{{ scope.row.cancelOrRefundTime }}</div>
|
||||
<div>{{ scope.row.cancelOrRefundReason }}</div>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<template v-if="scope.row.status == 'waiting'">
|
||||
<el-popconfirm title="确定核销吗?" @confirm="confirmOrder(scope.row.couponCode)">
|
||||
<el-button type="text" icon="el-icon-finished" slot="reference">待核销</el-button>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
<el-button type="text" icon="el-icon-finished" disabled v-else>{{
|
||||
scope.row.status | statusFilter }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -114,9 +134,28 @@
|
|||
|
||||
<script>
|
||||
import { exchangeRecordPage, exchangeRecordTotal, recordCheckout } from '@/api/points.js'
|
||||
const statusList = [
|
||||
{
|
||||
value: 'unpaid',
|
||||
label: '待支付'
|
||||
},
|
||||
{
|
||||
value: 'waiting',
|
||||
label: '待自取'
|
||||
},
|
||||
{
|
||||
value: 'done',
|
||||
label: '已完成'
|
||||
},
|
||||
{
|
||||
value: 'cancel',
|
||||
label: '已取消'
|
||||
},
|
||||
]
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusList,
|
||||
srcList: [],
|
||||
avatarUrlList: [],
|
||||
countData: {
|
||||
|
|
@ -141,6 +180,11 @@ export default {
|
|||
},
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
statusFilter(t) {
|
||||
return statusList.find(item => item.value == t).label
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.resetQuery = { ...this.query }
|
||||
this.getTableData()
|
||||
|
|
|
|||
|
|
@ -4,21 +4,35 @@
|
|||
<el-form-item label="是否消费赠送积分">
|
||||
<el-switch v-model.trim="form.enableRewards" :active-value="1" :inactive-value="0"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="费赠送积分" prop="consumeAmount" v-if="form.enableRewards">
|
||||
<el-input v-model="form.consumeAmount" style="width: 250px;"
|
||||
@input="inputFilterInt($event, 'consumeAmount')">
|
||||
<template slot="prepend">每消费</template>
|
||||
<template slot="append">元赠送1积分</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<template v-if="form.enableRewards">
|
||||
<el-form-item label="适用群体">
|
||||
<el-radio-group v-model="form.rewardsGroup">
|
||||
<el-radio label="all">全部</el-radio>
|
||||
<el-radio label="vip">仅会员</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="费赠送积分" prop="consumeAmount">
|
||||
<el-input v-model="form.consumeAmount" style="width: 250px;"
|
||||
@input="inputFilterInt($event, 'consumeAmount')">
|
||||
<template slot="prepend">每消费</template>
|
||||
<template slot="append">元赠送1积分</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="开启下单积分抵扣" style="margin-top: 50px;">
|
||||
<el-switch v-model.trim="form.enableDeduction" :active-value="1" :inactive-value="0"></el-switch>
|
||||
</el-form-item>
|
||||
<template v-if="form.enableDeduction">
|
||||
<el-form-item label="下单积分抵扣门槛" prop="minDeductionPoint">
|
||||
<el-input v-model="form.minDeductionPoint" style="width: 150px;"
|
||||
@input="inputFilterInt($event, 'minDeductionPoint')">
|
||||
<template slot="append">积分</template>
|
||||
<el-form-item label="适用群体">
|
||||
<el-radio-group v-model="form.deductionGroup">
|
||||
<el-radio label="all">全部</el-radio>
|
||||
<el-radio label="vip">仅会员</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单实付抵扣门槛" prop="minPaymentAmount">
|
||||
<el-input v-model="form.minPaymentAmount" style="width: 150px;"
|
||||
@input="inputFilterInt($event, 'minPaymentAmount')">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单最高抵扣比例" prop="maxDeductionRatio">
|
||||
|
|
@ -95,10 +109,12 @@ export default {
|
|||
loading: false,
|
||||
form: {
|
||||
id: '',
|
||||
rewardsGroup: 'all',
|
||||
deductionGroup: 'all',
|
||||
enableRewards: 1,
|
||||
consumeAmount: "",
|
||||
enableDeduction: 1,
|
||||
minDeductionPoint: "",
|
||||
minPaymentAmount: "",
|
||||
maxDeductionRatio: "",
|
||||
equivalentPoints: "",
|
||||
enablePointsMall: 1,
|
||||
|
|
@ -112,7 +128,7 @@ export default {
|
|||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
minDeductionPoint: [
|
||||
minPaymentAmount: [
|
||||
{
|
||||
required: true,
|
||||
message: ' ',
|
||||
|
|
|
|||
|
|
@ -999,10 +999,10 @@ export default {
|
|||
res.map(item => item.saleAmount)
|
||||
];
|
||||
|
||||
console.log(p1);
|
||||
console.log(p2);
|
||||
// console.log(p1);
|
||||
// console.log(p2);
|
||||
|
||||
this.initProduceChart(p1, p2);
|
||||
// this.initProduceChart(p1, p2);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,10 +184,8 @@ export default {
|
|||
merchantName: this.loginForm.merchantName,
|
||||
username: this.loginForm.username,
|
||||
}))
|
||||
|
||||
|
||||
// this.$router.push({ path: this.redirect || '/' })
|
||||
window.location.href = './'
|
||||
this.$router.push({ path: this.redirect || '/' })
|
||||
// window.location.replace = './'
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
this.getCode()
|
||||
|
|
|
|||
Loading…
Reference in New Issue