铸源星,优惠券,能量
This commit is contained in:
parent
aff27335bf
commit
d14e2c9eab
|
@ -199,6 +199,36 @@ const marketingRouter =
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'energy',
|
||||
name: 'energy',
|
||||
meta: {
|
||||
title: '能量管理',
|
||||
noCache: true
|
||||
},
|
||||
redirect: 'noRedirect',
|
||||
component: () => import('@/views/marketing/energy/index'),
|
||||
children: [
|
||||
{
|
||||
path: 'energyConfig',
|
||||
name: 'energyConfig',
|
||||
meta: {
|
||||
title: '能量配置',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/marketing/energy/energyConfig/index')
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
name: 'energyList',
|
||||
meta: {
|
||||
title: '能量列表',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/marketing/energy/energyGoods/index.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'allDiscount',
|
||||
name: 'allDiscount',
|
||||
|
|
|
@ -0,0 +1,201 @@
|
|||
<template>
|
||||
<div class="divBox">
|
||||
<div class="selCard">
|
||||
<el-form size="small" label-width="85px" :inline="true">
|
||||
<el-form-item label="是否显示:">
|
||||
<el-select
|
||||
v-model="tableFrom.status"
|
||||
placeholder="请选择"
|
||||
class="selWidth"
|
||||
clearable
|
||||
@change="getList"
|
||||
>
|
||||
<el-option label="显示" :value="1" />
|
||||
<el-option label="不显示" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-card class="mt14">
|
||||
<div class="mb14">
|
||||
<el-button size="small" type="primary" @click="addSpike">添加配置</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="seckill_time_id" label="编号" min-width="100" />
|
||||
<el-table-column prop="title" label="名称" min-width="120" />
|
||||
<el-table-column label="开始时间(整数小时)" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.start_time }} :00</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间(整点)" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.end_time }} :00</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图片" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
style="width: 36px; height: 36px"
|
||||
:src="scope.row.pic"
|
||||
:preview-src-list="[scope.row.pic]"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-text="启用"
|
||||
inactive-text="禁用"
|
||||
@click.native="onchangeIsShow(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="90" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
class="mr10"
|
||||
@click="handleEdit(scope.row.seckill_time_id)"
|
||||
>编辑</el-button>
|
||||
<el-button type="text" size="small" @click="handleDelete(scope.row.seckill_time_id,scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
background
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {
|
||||
spikeConfigLstApi,
|
||||
spikeConfigDeleteApi,
|
||||
spikeConfigurationApi,
|
||||
spikeConfigUpdateApi,
|
||||
spikeConfigStatusApi
|
||||
} from '@/api/marketing'
|
||||
import { roterPre } from '@/settings'
|
||||
export default {
|
||||
name: 'CouponList',
|
||||
data() {
|
||||
return {
|
||||
Loading: false,
|
||||
dialogVisible: false,
|
||||
roterPre: roterPre,
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
status: ""
|
||||
},
|
||||
tableFromIssue: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
coupon_id: 0
|
||||
},
|
||||
issueData: {
|
||||
data: [],
|
||||
total: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 添加秒杀配置
|
||||
addSpike() {
|
||||
this.$modalForm(spikeConfigurationApi().then()).then(() =>
|
||||
this.getList()
|
||||
)
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(id) {
|
||||
this.$modalForm(spikeConfigUpdateApi(id).then()).then(() =>
|
||||
this.getList()
|
||||
)
|
||||
},
|
||||
// 删除
|
||||
handleDelete(id, idx) {
|
||||
this.$modalSure().then(() => {
|
||||
spikeConfigDeleteApi(id)
|
||||
.then(({ message }) => {
|
||||
this.$message.success(message)
|
||||
this.tableData.data.splice(idx, 1)
|
||||
})
|
||||
.catch(({ message }) => {
|
||||
this.$message.error(message)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
// 列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
console.log(this.tableFrom)
|
||||
spikeConfigLstApi(this.tableFrom)
|
||||
.then((res) => {
|
||||
this.tableData.data = res.data.list
|
||||
this.tableData.total = res.data.count
|
||||
this.listLoading = false
|
||||
})
|
||||
.catch((res) => {
|
||||
this.listLoading = false
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
},
|
||||
// 修改状态
|
||||
onchangeIsShow(row) {
|
||||
spikeConfigStatusApi(row.seckill_time_id, row.status )
|
||||
.then(({ message }) => {
|
||||
this.$message.success(message)
|
||||
this.getList()
|
||||
})
|
||||
.catch(({ message }) => {
|
||||
this.$message.error(message)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@/styles/form.scss';
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<router-view />
|
||||
</template>
|
|
@ -175,10 +175,10 @@
|
|||
}}
|
||||
</div>
|
||||
</li>
|
||||
<!-- <li class="item">
|
||||
<li class="item">
|
||||
<div>优惠券金额:</div>
|
||||
<div class="value">{{ orderDetailList.coupon_price ? orderDetailList.coupon_price : '-' }}</div>
|
||||
</li> -->
|
||||
</li>
|
||||
<li v-if="orderDetailList.integral" class="item">
|
||||
<div>铸源星抵扣:</div>
|
||||
<div class="value">
|
||||
|
|
|
@ -74,6 +74,9 @@
|
|||
退货金额:{{ orderDatalist.refund_good_price }}
|
||||
</div>
|
||||
<div class="description-term">退折扣:{{ orderDatalist.amount }}</div>
|
||||
<div class="description-term">
|
||||
退铸源星:{{ orderDatalist.integral }}
|
||||
</div>
|
||||
<div class="description-term">
|
||||
退运费金额:{{ orderDatalist.refund_postage }}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue