guhongwei 3 år sedan
förälder
incheckning
5baa2643ab
1 ändrade filer med 8 tillägg och 15 borttagningar
  1. 8 15
      src/views/transaction/index.vue

+ 8 - 15
src/views/transaction/index.vue

@@ -8,16 +8,16 @@
       </el-col>
     </el-row>
     <el-dialog title="备案信息" width="40%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
-      <data-form :data="pact" :fields="formFields" :rules="rules" @save="toSave">
+      <data-form :data="form" :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 v-if="item.model == 'contact'">
+            <el-image :src="form.contact"></el-image>
           </template>
         </template>
         <template #radios="{item}">
           <template v-if="item.model === 'status'">
-            <el-radio label="3">审核通过</el-radio>
-            <el-radio label="4">审核拒绝</el-radio>
+            <el-radio label="3">交易通过</el-radio>
+            <el-radio label="4">交易拒绝</el-radio>
           </template>
         </template>
       </data-form>
@@ -63,7 +63,7 @@ export default {
           format: i => {
             let word = '正在洽谈';
             if (i == '1') word = '达成意向';
-            else if (i == '2') word = '交易备案';
+            else if (i == '2') word = '备案';
             else if (i == '3') word = '交易完成';
             else if (i == '4') word = '交易失败';
             return word;
@@ -75,10 +75,8 @@ export default {
       // 交易备案
       dialog: false,
       form: {},
-      pact: {},
       formFields: [
-        { label: '备案图片', model: 'file_path', custom: true },
-        { label: '备案描述', model: 'desc', type: 'textarea' },
+        { label: '备案图片', model: 'contact', custom: true },
         { label: '交易状态', model: 'status', type: 'radio' },
       ],
       rules: {},
@@ -100,16 +98,11 @@ export default {
     // 交易备案
     toCheck({ data }) {
       this.$set(this, `form`, data);
-      this.$set(this, `pact`, data.pact);
       this.dialog = true;
     },
     // 提交
     async toSave({ data }) {
-      let newData = {
-        status: data.status,
-        id: this.form.id,
-      };
-      let res = await this.update(newData);
+      let res = await this.update(data);
       if (this.$checkRes(res)) {
         this.$message({
           message: '信息审核成功',