|
@@ -7,13 +7,17 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-dialog title="交易备案" width="40%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
|
|
|
|
- <data-form :data="form" :fields="formFields" :rules="rules" @save="toSave">
|
|
|
|
|
|
+ <el-dialog title="备案信息" width="40%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
|
|
|
|
+ <data-form :data="pact" :fields="formFields" :rules="rules" @save="toSave">
|
|
|
|
+ <template #custom="{item,form}">
|
|
|
|
+ <template v-if="item.model == 'file_path'">
|
|
|
|
+ <el-image :src="form.file_path"></el-image>
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
<template #radios="{item}">
|
|
<template #radios="{item}">
|
|
<template v-if="item.model === 'status'">
|
|
<template v-if="item.model === 'status'">
|
|
- <el-radio label="0">待审核</el-radio>
|
|
|
|
- <el-radio label="1">审核通过</el-radio>
|
|
|
|
- <el-radio label="2">审核拒绝</el-radio>
|
|
|
|
|
|
+ <el-radio label="3">审核通过</el-radio>
|
|
|
|
+ <el-radio label="4">审核拒绝</el-radio>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</data-form>
|
|
</data-form>
|
|
@@ -25,6 +29,7 @@
|
|
import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
import dataForm from '@common/src/components/frame/form.vue';
|
|
import dataForm from '@common/src/components/frame/form.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
export default {
|
|
export default {
|
|
metaInfo() {
|
|
metaInfo() {
|
|
return { title: this.$route.meta.title };
|
|
return { title: this.$route.meta.title };
|
|
@@ -60,60 +65,16 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- list: [
|
|
|
|
- {
|
|
|
|
- product: '产品名称产品名称产品名称',
|
|
|
|
- s_name: '长春市福瑞科技有限公司',
|
|
|
|
- s_phone: '17319450324',
|
|
|
|
- d_name: '长春市福瑞科技有限公司',
|
|
|
|
- d_phone: '17319450324',
|
|
|
|
- status: '0',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- product: '产品名称产品名称产品名称',
|
|
|
|
- s_name: '长春市福瑞科技有限公司',
|
|
|
|
- s_phone: '17319450324',
|
|
|
|
- d_name: '长春市福瑞科技有限公司',
|
|
|
|
- d_phone: '17319450324',
|
|
|
|
- status: '1',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- product: '产品名称产品名称产品名称',
|
|
|
|
- s_name: '长春市福瑞科技有限公司',
|
|
|
|
- s_phone: '17319450324',
|
|
|
|
- d_name: '长春市福瑞科技有限公司',
|
|
|
|
- d_phone: '17319450324',
|
|
|
|
- status: '2',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- product: '产品名称产品名称产品名称',
|
|
|
|
- s_name: '长春市福瑞科技有限公司',
|
|
|
|
- s_phone: '17319450324',
|
|
|
|
- d_name: '长春市福瑞科技有限公司',
|
|
|
|
- d_phone: '17319450324',
|
|
|
|
- status: '3',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- product: '产品名称产品名称产品名称',
|
|
|
|
- s_name: '长春市福瑞科技有限公司',
|
|
|
|
- s_phone: '17319450324',
|
|
|
|
- d_name: '长春市福瑞科技有限公司',
|
|
|
|
- d_phone: '17319450324',
|
|
|
|
- status: '4',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ list: [],
|
|
total: 0,
|
|
total: 0,
|
|
// 交易备案
|
|
// 交易备案
|
|
dialog: false,
|
|
dialog: false,
|
|
form: {},
|
|
form: {},
|
|
|
|
+ pact: {},
|
|
formFields: [
|
|
formFields: [
|
|
- { label: '产品名称', model: 'product' },
|
|
|
|
- { label: '供给者姓名', model: 's_name' },
|
|
|
|
- { label: '供给者电话', model: 's_phone' },
|
|
|
|
- { label: '需求者姓名', model: 'd_name' },
|
|
|
|
- { label: '需求者电话', model: 'd_phone' },
|
|
|
|
|
|
+ { label: '备案图片', model: 'file_path', custom: true },
|
|
|
|
+ { label: '备案描述', model: 'desc', type: 'textarea' },
|
|
{ label: '交易状态', model: 'status', type: 'radio' },
|
|
{ label: '交易状态', model: 'status', type: 'radio' },
|
|
- { label: '备案描述', model: 'description', type: 'textarea' },
|
|
|
|
],
|
|
],
|
|
rules: {},
|
|
rules: {},
|
|
};
|
|
};
|
|
@@ -122,16 +83,36 @@ export default {
|
|
await this.search();
|
|
await this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ ...transaction(['query', 'step']),
|
|
// 查询列表
|
|
// 查询列表
|
|
- async search({ skip = 0, limit = 10, ...info } = {}) {},
|
|
|
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
|
+ let res = await this.query({ skip, limit, ...info });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 交易备案
|
|
// 交易备案
|
|
toCheck({ data }) {
|
|
toCheck({ data }) {
|
|
- console.log(data);
|
|
|
|
|
|
+ this.$set(this, `form`, data);
|
|
|
|
+ this.$set(this, `pact`, data.pact);
|
|
this.dialog = true;
|
|
this.dialog = true;
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
- toSave({ data }) {
|
|
|
|
- console.log(data);
|
|
|
|
|
|
+ async toSave({ data }) {
|
|
|
|
+ let newData = {
|
|
|
|
+ status: data.status,
|
|
|
|
+ id: this.form.id,
|
|
|
|
+ };
|
|
|
|
+ let res = await this.step(newData);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '信息审核成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ });
|
|
|
|
+ this.handleClose();
|
|
|
|
+ this.search();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 取消
|
|
// 取消
|
|
handleClose() {
|
|
handleClose() {
|