|
@@ -1,24 +1,36 @@
|
|
|
<template>
|
|
|
- <div id="quotaDetail">
|
|
|
+ <div id="detail">
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <el-col :span="24" class="one">
|
|
|
- <el-image :src="coupons"></el-image>
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <top topType="2" @back="back"></top>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="two">
|
|
|
- <van-cell title="创新券类型" :value="getWord(form, 'coupons.coupons_type')" />
|
|
|
- <van-cell title="创新券名称" :value="getWord(form, 'coupons.name')" />
|
|
|
- <van-cell title="折扣类型" :value="getWord(form, 'coupons.discount_type')" />
|
|
|
- <van-cell title="抵扣比例" :value="getWord(form, 'coupons.scale') + '%'" v-if="form.coupons && form.coupons.discount_type == '折扣券'" />
|
|
|
- <van-cell title="面额" :value="getWord(form, 'coupons.allowance') + '元'" v-if="form.coupons && form.coupons.discount_type == '定额券'" />
|
|
|
- <van-cell title="适用服务类型" :value="getWord(form, 'coupons.use_type')" />
|
|
|
- <van-cell title="所属分类" :value="getWord(form, 'coupons.classify')" />
|
|
|
- <van-cell title="券总额度" :value="getWord(form, 'coupons.total_allowance') + '元'" />
|
|
|
- <van-cell title="使用期限" :value="getWord(form, 'coupons.limit_time') + '个月'" />
|
|
|
- <van-swipe-cell class="desc">
|
|
|
- <p>描述:</p>
|
|
|
- <p>{{ getWord(form, 'coupons.desc') || '暂无' }}</p>
|
|
|
- </van-swipe-cell>
|
|
|
+ <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }">
|
|
|
+ <el-col :span="24" class="one">
|
|
|
+ <el-image :src="coupons"></el-image>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="two">
|
|
|
+ <van-cell title="申请单位" :value="getWord(form, 'company')" />
|
|
|
+ <van-cell title="申请人" :value="getWord(form, 'apply_person')" />
|
|
|
+ <van-cell title="联系电话" :value="getWord(form, 'phone')" />
|
|
|
+ <van-cell title="申领金额" :value="getWord(form, 'apply_money')" />
|
|
|
+ <van-cell title="实际申领金额" :value="getWord(form, 'actual_money')" />
|
|
|
+ <van-cell title="创新券类型" :value="getWord(form, 'coupons.coupons_type')" />
|
|
|
+ <van-cell title="创新券名称" :value="getWord(form, 'coupons.name')" />
|
|
|
+ <van-cell title="折扣类型" :value="getWord(form, 'coupons.discount_type')" />
|
|
|
+ <van-cell title="抵扣比例" :value="getWord(form, 'coupons.scale') + '%'" v-if="form.coupons && form.coupons.discount_type == '折扣券'" />
|
|
|
+ <van-cell title="面额" :value="getWord(form, 'coupons.allowance') + '元'" v-if="form.coupons && form.coupons.discount_type == '定额券'" />
|
|
|
+ <van-cell title="适用服务类型" :value="getWord(form, 'coupons.use_type')" />
|
|
|
+ <van-cell title="所属分类" :value="getWord(form, 'coupons.classify')" />
|
|
|
+ <van-cell title="券总额度" :value="getWord(form, 'coupons.total_allowance') + '元'" />
|
|
|
+ <van-cell title="使用期限" :value="getWord(form, 'coupons.limit_time') + '个月'" />
|
|
|
+ <van-cell title="是否使用" :value="getWord(form, 'is_use')" />
|
|
|
+ <van-cell title="审核状态" :value="getWord(form, 'status')" />
|
|
|
+ <van-swipe-cell class="desc">
|
|
|
+ <p>描述:</p>
|
|
|
+ <p>{{ getWord(form, 'coupons.desc') || '暂无' }}</p>
|
|
|
+ </van-swipe-cell>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -26,21 +38,26 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import top from '@/layout/common/top.vue';
|
|
|
const _ = require('lodash');
|
|
|
+const { isuse, couponsapplyStatus } = require('@/plugins/couindex');
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
|
|
|
export default {
|
|
|
- name: 'quotaDetail',
|
|
|
+ name: 'index',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ top,
|
|
|
+ },
|
|
|
data: function () {
|
|
|
return {
|
|
|
+ clientHeight: '',
|
|
|
coupons: require('@a/coupons.jpg'),
|
|
|
form: {},
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- this.search();
|
|
|
+ async created() {
|
|
|
+ if (this.id) await this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
...couponsApply(['fetch']),
|
|
@@ -51,9 +68,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getWord(data, model) {
|
|
|
- return _.get(data, model, '');
|
|
|
+ if (model == 'status') {
|
|
|
+ let status = couponsapplyStatus.find((i) => i.value == data.status);
|
|
|
+ if (status) data.status = status.label;
|
|
|
+ return _.get(data, model, '暂无');
|
|
|
+ } else if (model == 'is_use') {
|
|
|
+ let use = isuse.find((i) => i.value == data.is_use);
|
|
|
+ if (use) data.is_use = use.label;
|
|
|
+ return _.get(data, model, '暂无');
|
|
|
+ } else {
|
|
|
+ return _.get(data, model, '暂无');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 返回
|
|
|
+ back() {
|
|
|
+ this.$router.push({ path: '/cashing/quota' });
|
|
|
},
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 40;
|
|
|
+ this.$set(this, `clientHeight`, clientHeight);
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
id() {
|
|
@@ -63,32 +98,48 @@ export default {
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ id: {
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {},
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
.main {
|
|
|
- .one {
|
|
|
- margin: 0 0 5px 0;
|
|
|
- .el-image {
|
|
|
- width: 100%;
|
|
|
- height: 180px;
|
|
|
- /deep/.el-image__inner {
|
|
|
- border-radius: 8px;
|
|
|
- }
|
|
|
- }
|
|
|
+ .top {
|
|
|
+ height: 40px;
|
|
|
+ overflow: hidden;
|
|
|
+ border-bottom: 1px solid #f9f9f9;
|
|
|
}
|
|
|
- .two {
|
|
|
- .desc {
|
|
|
- background-color: #fff;
|
|
|
- padding: 10px 15px;
|
|
|
- font-size: 14px;
|
|
|
- p:nth-child(1) {
|
|
|
- margin: 0 0 5px 0;
|
|
|
+ .info {
|
|
|
+ overflow-x: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ .one {
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ .el-image {
|
|
|
+ width: 100%;
|
|
|
+ height: 180px;
|
|
|
+ /deep/.el-image__inner {
|
|
|
+ border-radius: 8px;
|
|
|
+ }
|
|
|
}
|
|
|
- p:nth-child(2) {
|
|
|
- text-indent: 1rem;
|
|
|
- color: #969799;
|
|
|
+ }
|
|
|
+ .two {
|
|
|
+ .desc {
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 10px 15px;
|
|
|
+ font-size: 14px;
|
|
|
+ p:nth-child(1) {
|
|
|
+ margin: 0 0 5px 0;
|
|
|
+ }
|
|
|
+ p:nth-child(2) {
|
|
|
+ text-indent: 1rem;
|
|
|
+ color: #969799;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|