guhongwei 4 years ago
parent
commit
86dd58a46b

+ 1 - 5
src/components/supermaket/supermarketlistDetail.vue

@@ -61,11 +61,7 @@ export default {
   data: () => ({}),
   created() {},
   computed: {},
-  methods: {
-    clickList({ id }) {
-      console.log(id);
-    },
-  },
+  methods: {},
 };
 </script>
 

+ 2 - 10
src/layout/supermarket/detali.vue

@@ -296,10 +296,6 @@
               </el-col>
             </el-col>
           </el-col>
-          <!-- <el-col :span="24" class="anniu" v-if="displayBtn">
-              <el-button type="primary" size="mini" v-if="this.user.uid != detailInfo.userid" @click="btnPhone()">交流洽谈</el-button>
-              <el-button type="success" size="mini" v-if="this.user.uid != detailInfo.userid" @click="onSubmit()">供求对接</el-button>
-            </el-col> -->
         </el-col>
         <el-col :span="24" class="main1" v-else-if="totaltype === '2'">
           <el-col :span="24" class="top">
@@ -389,10 +385,6 @@
               </el-col>
             </el-col>
           </el-col>
-          <!-- <el-col :span="24" class="anniu" v-if="displayBtn">
-              <el-button type="primary" size="mini" v-if="this.user.uid != detailInfo.userid" @click="btnPhone()">交流洽谈</el-button>
-              <el-button type="success" size="mini" v-if="this.user.uid != detailInfo.userid" @click="onSubmit()">供求对接</el-button>
-            </el-col> -->
         </el-col>
       </el-col>
     </el-row>
@@ -490,7 +482,7 @@ export default {
     }
   }
   .main {
-    margin: 10px 0 0 0;
+    padding: 10px 10px;
     .top {
       height: 360px;
       overflow: hidden;
@@ -534,7 +526,7 @@ export default {
     }
   }
   .main1 {
-    margin: 10px 0 0 0;
+    padding: 10px 10px;
     .top {
       height: 160px;
       overflow: hidden;

+ 4 - 33
src/views/supermaket/supermarketdetail.vue

@@ -6,11 +6,9 @@
       :contentList="contentList"
       :total="total"
       :columnName="columnName"
-      @fetch="fetchInfo"
       :display="display"
       :policyInfo="policyInfo"
       :totaltype="totaltype1"
-      @onSubmit="onSubmit"
     ></supermarketlist-detail>
   </div>
 </template>
@@ -32,27 +30,24 @@ export default {
   },
   data: () => ({
     info: {},
-    policyInfo: {},
     display: 'detail',
+    policyInfo: {},
     columnName: '',
     contentList: [],
-    total: 1,
+    total: 0,
     skip: '',
     totaltype1: '',
   }),
   async created() {
+    this.$set(this, `totaltype1`, this.$route.query.totaltype);
     this.searchSite();
     this.searchinfos();
-    this.$set(this, `totaltype1`, this.totaltype);
   },
   computed: {
+    ...mapState(['user']),
     id() {
       return this.$route.query.id;
     },
-    ...mapState(['user']),
-    totaltype() {
-      return this.$route.query.totaltype;
-    },
   },
   methods: {
     ...mapSite(['showInfo']),
@@ -69,37 +64,13 @@ export default {
         this.$message.error(res.errmsg ? res.errmsg : 'error');
       }
     },
-    fetchInfo() {},
     async searchinfos() {
-      // console.log(this.totaltype);
       this.display = 'detail';
       const res = await this.fetch(this.id);
       this.$set(this, `policyInfo`, res.data);
     },
     async handleCurrentChange({ skip, limit, currentPage }) {
       this.$set(this, `skip`, skip);
-      this.search();
-    },
-    async onSubmit() {
-      console.log(this.user.uid);
-      let form = {};
-      form.userid = this.user.uid;
-      form.username = this.user.name;
-      form.product_id = this.policyInfo.id;
-      form.product_name = this.policyInfo.name;
-      form.market_userid = this.policyInfo.userid;
-      form.market_username = this.policyInfo.contact_user;
-      form.status = '0';
-      console.log(form);
-      let res = await this.transactioncreate(form);
-      this.$checkRes(res, '发起交易成功', '交易失败');
-      let shenhe = {};
-      shenhe.result = '0';
-      shenhe.transaction_id = res.data.id;
-      shenhe.userid = this.policyInfo.userid;
-      shenhe.product_id = this.policyInfo.userid;
-      console.log(shenhe);
-      let ress = await this.tranauditcreate(shenhe);
     },
   },
 };