提交 e6b93222 作者: 郁骅焌

审核

上级 b5f17afd
import auth from './auth' import auth from './auth'
import cache from './cache' import cache from './cache'
import modal from './modal' import modal from './modal'
import download from './download' import download from './download'
import tab from './tab'
export default {
install(Vue) { export default {
// 认证对象 install(Vue) {
Vue.prototype.$auth = auth Vue.prototype.$tab = tab
// 缓存对象 // 认证对象
Vue.prototype.$cache = cache Vue.prototype.$auth = auth
// 模态框对象 // 缓存对象
Vue.prototype.$modal = modal Vue.prototype.$cache = cache
// 下载文件 // 模态框对象
Vue.prototype.$download = download Vue.prototype.$modal = modal
} // 下载文件
} Vue.prototype.$download = download
}
}
import store from '@/store'
import router from '@/router';
export default {
// 刷新当前tab页签
refreshPage(obj) {
const { path, query, matched } = router.currentRoute;
if (obj === undefined) {
matched.forEach((m) => {
if (m.components && m.components.default && m.components.default.name) {
if (!['Layout', 'ParentView'].includes(m.components.default.name)) {
obj = { name: m.components.default.name, path: path, query: query };
}
}
});
}
return store.dispatch('tagsView/delCachedView', obj).then(() => {
const { path, query } = obj
router.replace({
path: '/redirect' + path,
query: query
})
})
},
// 关闭当前tab页签,打开新页签
closeOpenPage(obj) {
store.dispatch("tagsView/delView", router.currentRoute);
if (obj !== undefined) {
return router.push(obj);
}
},
// 关闭指定tab页签
closePage(obj) {
if (obj === undefined) {
return store.dispatch('tagsView/delView', router.currentRoute).then(({ lastPath }) => {
return router.push(lastPath || '/');
});
}
return store.dispatch('tagsView/delView', obj);
},
// 关闭所有tab页签
closeAllPage() {
return store.dispatch('tagsView/delAllViews');
},
// 关闭左侧tab页签
closeLeftPage(obj) {
return store.dispatch('tagsView/delLeftTags', obj || router.currentRoute);
},
// 关闭右侧tab页签
closeRightPage(obj) {
return store.dispatch('tagsView/delRightTags', obj || router.currentRoute);
},
// 关闭其他tab页签
closeOtherPage(obj) {
return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
},
// 添加tab页签
openPage(title, url, params) {
var obj = { path: url, meta: { title: title } }
store.dispatch('tagsView/addView', obj);
return router.push({ path: url, query: params });
},
// 修改tab页签
updatePage(obj) {
return store.dispatch('tagsView/updateVisitedView', obj);
}
}
<template>
<div class="app-container">
<el-card class="card-layout">
<div class="detail-info">
<el-row>
<el-col :span="12">优惠券标题:{{ detail.couponTitle }}</el-col>
</el-row>
<el-row>
<el-col :span="12">优惠券分类:{{ detail.categoryName }}</el-col>
</el-row>
<el-row>
<el-col :span="12">优惠券类型:<dict-tag style="display: inline-block;" :options="dict.type.coupon_type" :value="detail.couponType" /></el-col>
</el-row>
<el-row>
<el-col :span="12">有效期:{{detail.validityType === '1' ? `${detail.validityStartDate} ~ ${detail.validityEndDate}` : `领取后${detail.validityNum}天内`}}</el-col>
</el-row>
<el-row>
<el-col :span="12">库存:{{ detail.issued }}</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="detail-label">领券限制:</div>
<div class="detail-value">
<div>每人总共可领取 {{detail.receiveTotal === -1 ? '不限制' : `${detail.receiveTotal}张`}} </div>
<div>每人每日可领取 {{detail.receiveDay === -1 ? '不限制' : `${detail.receiveDay}张`}} </div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="12">适用门店:{{ detail.storeName }}</el-col>
</el-row>
<el-row>
<el-col :span="12">优惠券照片:<ImagePreview :src="detail.url || ''" :src-list="[detail.url]" /></el-col>
</el-row>
<el-row>
<el-col :span="12">使用须知:{{ detail.remarks }}</el-col>
</el-row>
<el-row v-if="detail.couponType === 'team'">
<el-col :span="12">套餐名称:{{ detail.mealTitle }}</el-col>
</el-row>
<el-row v-if="detail.couponType === 'team'">
<el-col :span="12">套餐原价:{{ detail.originalPrice }}</el-col>
</el-row>
<el-row v-if="detail.couponType === 'team'">
<el-col :span="12">折扣价:{{ detail.presentPrice }}</el-col>
</el-row>
<el-row v-if="detail.couponType === 'team'">
<el-col :span="12">备注:{{ detail.mealRemarks }}</el-col>
</el-row>
<template v-if="detail.couponType === 'team'">
<el-row v-for="(item, index) in detail.couponDetailList" :key="index">
<el-col :span="12">
<div style="width: 100%;">
<div>{{item.category}}</div>
<el-table :data="item.list" style="width: 100%;" size="small">
<el-table-column label="菜品" prop="foodName">
</el-table-column>
<el-table-column label="份数" prop="foodNum">
</el-table-column>
<el-table-column label="价格" prop="foodPrice">
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</template>
<el-row>
<el-col :span="12">每日发放限制:{{ detail.grant === -1 ? '不限制' : `${detail.grant}张` }}</el-col>
</el-row>
<!-- <el-row>
<el-col :span="12">
<div class="detail-label">默认决策:</div>
<div class="detail-value">
<div v-for="(item, index) in detail.defaultPolicy" :key="index">
{{ item.groupName }}
{{ item.fieldZhName }}
等于
{{ item.fieldValue }}
</div>
</div>
</el-col>
<el-col :span="12">创建人:{{ detail.createBy }}</el-col>
</el-row> -->
</div>
</el-card>
</div>
</template>
<script>
import { auditDetail } from '@/api/coupon/audit.js'
export default {
name: 'CouponAuditAudit',
dicts: ['coupon_type', 'examine_status'],
data() {
return {
detail: {},
form: {}
}
},
mounted() {
this.getDetail()
},
methods: {
getDetail() {
auditDetail(this.$route.query.id).then(res => {
this.detail = res.data
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-info {
width: 90%;
margin-top: 26px;
font-size: 14px;
line-height: 3;
&:first-child {
margin-top: 0;
}
.el-col {
display: flex;
}
}
</style>
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<el-card class="card-layout"> <el-card class="card-layout">
<div class="detail-title"> <div class="detail-title">
<div>状态: <dict-tag style="display: inline-block;" :options="dict.type.examine_status" :value="detail.examineStatus" /></div> <div>状态: <dict-tag style="display: inline-block;" :options="dict.type.examine_status" :value="detail.examineStatus" /></div>
<div style="margin-left: 120px;">审核时间: {{ detail.examineTime }}</div>
</div> </div>
</el-card> </el-card>
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
text: '审核', text: '审核',
icon: 'el-icon-edit', icon: 'el-icon-edit',
noShow: [{key: 'examineStatus', val: [1, 2]}], noShow: [{key: 'examineStatus', val: [1, 2]}],
fun: (row) => this.handleEdit(row) fun: (row) => this.handleAudit(row)
}, },
{ {
text: '查看', text: '查看',
...@@ -159,6 +159,12 @@ export default { ...@@ -159,6 +159,12 @@ export default {
async handleDelete(row) { async handleDelete(row) {
}, },
handleAudit(row) {
this.$tab.closePage({ name: 'CouponAuditAudit' })
this.$nextTick(() => {
this.$router.push({ name: 'CouponAuditAudit', query: { id: row.id }})
})
},
// 查询详情 // 查询详情
handleDetail(row) { handleDetail(row) {
this.$router.push({ path: '/coupon/couponAuditDetail/' + row.id }) this.$router.push({ path: '/coupon/couponAuditDetail/' + row.id })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论