|
@@ -1,12 +1,30 @@
|
|
|
<template>
|
|
|
- <div id="index">
|
|
|
+ <div id="detail">
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="style">
|
|
|
<el-col :span="24" class="top">
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <detaliinfo :form="form" @onSubmit="onSubmit"></detaliinfo>
|
|
|
+ <van-form>
|
|
|
+ <van-field v-model="form.product_name" name="产品名称" label="产品名称" placeholder="产品名称" readonly />
|
|
|
+ <van-field v-model="form.market_username" name="营销人名称" label="营销人名称" placeholder="营销人名称" readonly />
|
|
|
+ <van-field v-model="form.username" name="购买人名称" label="购买人名称" placeholder="购买人名称" readonly />
|
|
|
+ <van-field v-model="form.description" rows="1" autosize label="描述" type="textarea" placeholder="描述" />
|
|
|
+ <van-field name="radio" label="状态">
|
|
|
+ <template #input>
|
|
|
+ <van-radio-group v-model="form.status" direction="horizontal">
|
|
|
+ <van-radio name="0">待审核</van-radio>
|
|
|
+ <van-radio name="1">通过</van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <div style="margin: 16px;" v-if="form.status == '0'">
|
|
|
+ <van-button round block type="info" @click="onSubmit">
|
|
|
+ 提交
|
|
|
+ </van-button>
|
|
|
+ </div>
|
|
|
+ </van-form>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -15,49 +33,41 @@
|
|
|
|
|
|
<script>
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
-import detaliinfo from '@/layout/transaction/detaliinfo.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
const { mapActions: productpact } = createNamespacedHelpers('productpact');
|
|
|
export default {
|
|
|
- name: 'index',
|
|
|
+ name: 'detail',
|
|
|
props: {},
|
|
|
components: {
|
|
|
NavBar,
|
|
|
- detaliinfo, //个人信息维护
|
|
|
},
|
|
|
- data: () => ({
|
|
|
- // 头部标题
|
|
|
- title: '',
|
|
|
- // meta为true
|
|
|
- isleftarrow: '',
|
|
|
- // 返回
|
|
|
- navShow: true,
|
|
|
- // 个人信息
|
|
|
- form: {},
|
|
|
- }),
|
|
|
- created() {
|
|
|
- this.searchInfo();
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ // 头部标题
|
|
|
+ title: '',
|
|
|
+ // meta为true
|
|
|
+ isleftarrow: '',
|
|
|
+ // 返回
|
|
|
+ navShow: true,
|
|
|
+ form: {},
|
|
|
+ };
|
|
|
},
|
|
|
- computed: {
|
|
|
- ...mapState(['user']),
|
|
|
- id() {
|
|
|
- return this.$route.query.id;
|
|
|
- },
|
|
|
- role() {
|
|
|
- return this.$route.query.role;
|
|
|
- },
|
|
|
+ async created() {
|
|
|
+ await this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactionupdate: 'update' }),
|
|
|
+ ...transaction({ transactionfetch: 'fetch', transactionlist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
|
|
|
...productpact({ transactionQuery: 'query', productpactFetch: 'findpact', productpactUpdate: 'update' }),
|
|
|
- async searchInfo() {
|
|
|
- const res = await this.productpactFetch(this.id);
|
|
|
+ async search() {
|
|
|
+ let res = await this.productpactFetch(this.id);
|
|
|
if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `form`, res.data);
|
|
|
+ this.$set(this, 'form', res.data);
|
|
|
}
|
|
|
},
|
|
|
- async onSubmit({ data }) {
|
|
|
+ // 提交审核
|
|
|
+ async onSubmit() {
|
|
|
+ let data = this.form;
|
|
|
const res = await this.productpactUpdate(data);
|
|
|
if (this.$checkRes(res)) {
|
|
|
data.status = '2';
|
|
@@ -65,18 +75,27 @@ export default {
|
|
|
const arr = await this.transactionupdate(data);
|
|
|
if (this.$checkRes(arr)) {
|
|
|
this.$notify({
|
|
|
- message: '确定成功',
|
|
|
+ message: '审核成功',
|
|
|
type: 'success',
|
|
|
});
|
|
|
+ this.$router.push({ path: '/adminCenter/transaction/index' });
|
|
|
}
|
|
|
}
|
|
|
- this.$router.push({ path: './index' });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ id() {
|
|
|
+ return this.$route.query.id;
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
this.title = this.$route.meta.title;
|
|
|
this.isleftarrow = this.$route.meta.isleftarrow;
|
|
|
},
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -90,14 +109,8 @@ export default {
|
|
|
.top {
|
|
|
height: 46px;
|
|
|
overflow: hidden;
|
|
|
- position: relative;
|
|
|
- z-index: 999;
|
|
|
}
|
|
|
.main {
|
|
|
min-height: 570px;
|
|
|
}
|
|
|
-.foot {
|
|
|
- position: absolute;
|
|
|
- bottom: 0;
|
|
|
-}
|
|
|
</style>
|