|
@@ -0,0 +1,82 @@
|
|
|
|
+<template>
|
|
|
|
+ <div id="columnDetail">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24" class="top">
|
|
|
|
+ <topInfo :topTitle="topTitle"></topInfo>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="main">
|
|
|
|
+ <jiaoyidetail :form="form" @submitDate="onSubmit"></jiaoyidetail>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import topInfo from '@/layout/public/top.vue';
|
|
|
|
+import jiaoyidetail from '@/layout/enterprise/jiaoyidetail.vue';
|
|
|
|
+import { createNamespacedHelpers, mapState } from 'vuex';
|
|
|
|
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
|
+export default {
|
|
|
|
+ name: 'columnDetail',
|
|
|
|
+ props: {},
|
|
|
|
+ components: {
|
|
|
|
+ jiaoyidetail,
|
|
|
|
+ topInfo,
|
|
|
|
+ },
|
|
|
|
+ data: () => ({
|
|
|
|
+ topTitle: '交易',
|
|
|
|
+ form: {},
|
|
|
|
+ xinxi: {},
|
|
|
|
+ }),
|
|
|
|
+ created() {
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState(['user']),
|
|
|
|
+
|
|
|
|
+ id() {
|
|
|
|
+ return this.$route.query.id;
|
|
|
|
+ },
|
|
|
|
+ oneid() {
|
|
|
|
+ return this.$route.query.oneid;
|
|
|
|
+ },
|
|
|
|
+ twoid() {
|
|
|
|
+ return this.$route.query.twoid;
|
|
|
|
+ },
|
|
|
|
+ name() {
|
|
|
|
+ return this.$route.query.name;
|
|
|
|
+ },
|
|
|
|
+ keyWord() {
|
|
|
|
+ let meta = this.$route.meta;
|
|
|
|
+ let main = meta.title || '';
|
|
|
|
+ return main;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactionupdate: 'update' }),
|
|
|
|
+ async search() {
|
|
|
|
+ let transaction_id = this.id;
|
|
|
|
+ const res = await this.transactionsfetch(transaction_id);
|
|
|
|
+ console.log(res.data);
|
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
|
+ },
|
|
|
|
+ async onSubmit({ data }) {
|
|
|
|
+ console.log(data);
|
|
|
|
+ console.log(data.status);
|
|
|
|
+
|
|
|
|
+ let res = await this.transactionupdate(data);
|
|
|
|
+ this.$checkRes(res, '审核成功', '审核失败');
|
|
|
|
+ this.$router.push({ path: '/enterprise/transaction' });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+.main {
|
|
|
|
+ padding: 20px;
|
|
|
|
+ margin: 10px 20px;
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
+ width: 96%;
|
|
|
|
+}
|
|
|
|
+</style>
|