guhongwei 4 years ago
parent
commit
d56cce5ebc

+ 15 - 3
src/views/dynamic/dealDetail.vue

@@ -15,13 +15,13 @@
               <el-col :span="22" class="infoMess">
                 <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
                   <el-tab-pane label="正在洽谈" name="first">
-                    <zzqt :zzqtList="zzqtList" :total="zzqtTotal"></zzqt>
+                    <zzqt :zzqtList="zzqtList" :total="zzqtTotal" @onclick="onclick"></zzqt>
                   </el-tab-pane>
                   <el-tab-pane label="达成意向" name="second">
-                    <dcyx :dcyxList="dcyxList" :total="dxyxTotal"></dcyx>
+                    <dcyx :dcyxList="dcyxList" :total="dxyxTotal" @onclick="onclick"></dcyx>
                   </el-tab-pane>
                   <el-tab-pane label="交易完成" name="third">
-                    <jywc :jywcList="jywcList" :total="jywcTotal"></jywc>
+                    <jywc :jywcList="jywcList" :total="jywcTotal" @onclick="onclick"></jywc>
                   </el-tab-pane>
                 </el-tabs>
               </el-col>
@@ -43,6 +43,7 @@ import dcyx from './parts/dcyx.vue';
 import jywc from './parts/jywc.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: transaction } = createNamespacedHelpers('transaction');
+const { mapActions: product } = createNamespacedHelpers('enterpriseproject');
 export default {
   name: 'dealDetail',
   props: {},
@@ -67,6 +68,7 @@ export default {
   },
   methods: {
     ...transaction(['productquery']),
+    ...product({ list: 'newquery', newfetch: 'newfetch' }),
     async search() {
       let res = await this.productquery({ product_id: this.id });
       if (this.$checkRes(res)) {
@@ -81,6 +83,16 @@ export default {
         this.$set(this, `jywcTotal`, jywc.length);
       }
     },
+    async onclick(product_id) {
+      const res = await this.newfetch(product_id);
+      if (res.data.totaltype == '0') {
+        this.$router.push({ path: '/market/marketlists', query: { totaltype: 0, id: product_id, column_name: '技术供求', display: 2 } });
+      } else if (res.data.totaltype == '1') {
+        this.$router.push({ path: '/market/marketlists', query: { totaltype: 1, id: product_id, column_name: '科技产品', display: 2 } });
+      } else if (res.data.totaltype == '2') {
+        this.$router.push({ path: '/market/marketlists', query: { totaltype: 2, id: product_id, column_name: '科技产品', display: 2 } });
+      }
+    },
     handleClick(tab, event) {
       console.log(tab, event);
     },

+ 10 - 0
src/views/dynamic/parts/dcyx.vue

@@ -6,6 +6,13 @@
           <el-table-column prop="product_name" label="产品名称" align="center"> </el-table-column>
           <el-table-column prop="username" label="营销人" align="center"> </el-table-column>
           <el-table-column prop="market_username" label="购买人" align="center"> </el-table-column>
+          <el-table-column label="操作" width="100" align="center" fixed="right">
+            <template slot-scope="scoped">
+              <el-tooltip class="item" effect="dark" content="我要对接" placement="bottom">
+                <el-button type="text" size="mini" @click.native="onclick(scoped.row.product_id)"><i class="el-icon-view"></i></el-button>
+              </el-tooltip>
+            </template>
+          </el-table-column>
         </el-table>
         <el-col :span="24" class="page">
           <el-pagination
@@ -42,6 +49,9 @@ export default {
   },
   created() {},
   methods: {
+    onclick(product_id) {
+      this.$emit('onclick', product_id);
+    },
     search(page = 1) {
       this.$set(this, `list`, this.origin[page - 1]);
     },

+ 10 - 0
src/views/dynamic/parts/jywc.vue

@@ -6,6 +6,13 @@
           <el-table-column prop="product_name" label="产品名称" align="center"> </el-table-column>
           <el-table-column prop="username" label="营销人" align="center"> </el-table-column>
           <el-table-column prop="market_username" label="购买人" align="center"> </el-table-column>
+          <el-table-column label="操作" width="100" align="center" fixed="right">
+            <template slot-scope="scoped">
+              <el-tooltip class="item" effect="dark" content="我要对接" placement="bottom">
+                <el-button type="text" size="mini" @click.native="onclick(scoped.row.product_id)"><i class="el-icon-view"></i></el-button>
+              </el-tooltip>
+            </template>
+          </el-table-column>
         </el-table>
         <el-col :span="24" class="page">
           <el-pagination
@@ -42,6 +49,9 @@ export default {
   },
   created() {},
   methods: {
+    onclick(product_id) {
+      this.$emit('onclick', product_id);
+    },
     search(page = 1) {
       this.$set(this, `list`, this.origin[page - 1]);
     },

+ 10 - 0
src/views/dynamic/parts/zzqt.vue

@@ -6,6 +6,13 @@
           <el-table-column prop="product_name" label="产品名称" align="center"> </el-table-column>
           <el-table-column prop="username" label="营销人" align="center"> </el-table-column>
           <el-table-column prop="market_username" label="购买人" align="center"> </el-table-column>
+          <el-table-column label="操作" width="100" align="center" fixed="right">
+            <template slot-scope="scoped">
+              <el-tooltip class="item" effect="dark" content="我要对接" placement="bottom">
+                <el-button type="text" size="mini" @click.native="onclick(scoped.row.product_id)"><i class="el-icon-view"></i></el-button>
+              </el-tooltip>
+            </template>
+          </el-table-column>
         </el-table>
         <el-col :span="24" class="page">
           <el-pagination
@@ -42,6 +49,9 @@ export default {
   },
   created() {},
   methods: {
+    onclick(product_id) {
+      this.$emit('onclick', product_id);
+    },
     search(page = 1) {
       this.$set(this, `list`, this.origin[page - 1]);
     },