wuhongyu 5 rokov pred
rodič
commit
cdea8d6107

+ 31 - 9
src/views/dynamic/dealDetail.vue

@@ -10,8 +10,12 @@
               <el-step title="交易完成" description="交易完成"></el-step>
             </el-steps>
           </el-col>
-          <el-col :span="message">
-            {{ dealDetails.content }}
+          <el-col :span="24" class="info">
+            <p>营销人: {{ dealDetails.market_username }}</p>
+            <p>购买人: {{ dealDetails.username }}</p>
+
+            <p>产品名称: {{ dealDetails.product_name }}</p>
+            <p>说明: {{ dealDetails.description }}</p>
           </el-col>
         </el-col>
       </div>
@@ -20,19 +24,31 @@
 </template>
 
 <script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('transaction');
 export default {
   name: 'dealDetail',
   props: {},
   components: {},
   data: () => ({
-    dealDetails: {
-      status: 2,
-      content: '信息',
-    },
+    dealDetails: {},
   }),
-  created() {},
-  computed: {},
-  methods: {},
+  created() {
+    this.search();
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  methods: {
+    ...mapActions(['fetch']),
+    async search() {
+      let res = await this.fetch(this.id);
+      res.data.status = parseInt(res.data.status);
+      this.$set(this, `dealDetails`, res.data);
+    },
+  },
 };
 </script>
 
@@ -47,4 +63,10 @@ export default {
   min-height: 600px;
   margin: 30px 0;
 }
+.info {
+  min-height: 500px;
+}
+.info p {
+  padding: 20px 0 20px 0;
+}
 </style>

+ 3 - 2
src/views/dynamic/parts/down-pie.vue

@@ -63,8 +63,9 @@ export default {
       let res = await this.query();
       let rooms = await this.countRoom();
       if (this.$checkRes(res)) {
-        let arr = _.chunk(res.data, 6);
-        this.$set(this, `tableData`, arr[0]);
+        let arr = res.data.filter(f => f.status != '3');
+        let newArr = _.chunk(arr, 6);
+        this.$set(this, `tableData`, newArr[0]);
         let taking = rooms.errcode == 0 ? rooms.total : 0;
         let s1 = res.data.filter(f => f.status == '1'); //达成意向
         let s2 = res.data.filter(f => f.status == '2'); //对接完成