瀏覽代碼

geng更新

wuhongyu 5 年之前
父節點
當前提交
98951a8f1a

+ 4 - 0
src/components/enterprise/enterpisedg.vue

@@ -21,6 +21,8 @@
               :dinggou1="dinggou1"
               :dinggou2="dinggou2"
               :dinggou3="dinggou3"
+              :faqilist="faqilist"
+              :totalfaqi="totalfaqi"
             ></context>
           </el-col>
         </div>
@@ -48,6 +50,8 @@ export default {
     total1: null,
     total2: null,
     total3: null,
+    faqilist: null,
+    totalfaqi: null,
   },
   components: {
     heads, //头部

+ 48 - 0
src/layout/enterprise/context.vue

@@ -6,6 +6,48 @@
           <el-tab-pane label="我的订购" name="first">
             <el-row style="padding: 0 20px;">
               <el-tabs v-model="activeNameFirst" @tab-click="handleClickFirst">
+                <el-tab-pane label="发起交易" name="fgffadqdfa">
+                  <el-col :span="24" class="info">
+                    <el-col :span="24" v-for="(item, index) in faqilist" :key="index">
+                      <el-col class="xqborder">
+                        <el-col :span="24" class="fbListTop">
+                          <el-col :span="21"> </el-col>
+                          <el-col :span="3">
+                            {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
+                          </el-col>
+                        </el-col>
+                        <el-col :span="24" class="fbListCenter">
+                          <el-col :span="6" class="fbListCenterC">
+                            <p class="textOver">产品:{{ item.product_name }}</p>
+                            <p>营销人名称:{{ item.market_username }}</p>
+                            <p>购买人名称:{{ item.username }}</p>
+                          </el-col>
+                          <el-col :span="6" class="fbListCenterTwo">
+                            <el-col :span="24">说明:{{ item.description }}</el-col>
+                          </el-col>
+                          <el-col :span="6" class="fbListCenterR">
+                            <el-col :span="24" class="bainji">
+                              <el-link :underline="false" @click="jiaoyisuccess(item)">同意交易</el-link>
+                            </el-col>
+                          </el-col>
+                        </el-col>
+                      </el-col>
+                    </el-col>
+                  </el-col>
+                  <el-col class="page" :span="24">
+                    <el-pagination
+                      @size-change="handleSizeChange"
+                      @current-change="handleCurrentChangefaqi"
+                      :current-page="currentPage"
+                      background
+                      layout="total,  prev, pager, next, jumper"
+                      :total="totalfaqi"
+                      :page-size="pageSize"
+                    >
+                    </el-pagination>
+                  </el-col>
+                </el-tab-pane>
+
                 <el-tab-pane label="交易中" name="fgrrsss">
                   <el-col :span="24" class="info">
                     <el-col :span="24" v-for="(item, index) in dinggou1" :key="index">
@@ -157,6 +199,8 @@ export default {
     total1: null,
     total2: null,
     total3: null,
+    faqilist: null,
+    totalfaqi: null,
 
     // gonggeiData: null,
   },
@@ -197,6 +241,10 @@ export default {
       console.log(currentPage);
       this.$emit('handleCurrentChange2', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
     },
+    handleCurrentChangefaqi(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChangefaqi', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
+    },
   },
 };
 </script>

+ 4 - 4
src/layout/enterprise/contextfabuxx.vue

@@ -158,7 +158,7 @@
                   </el-col>
                 </el-tab-pane>
 
-                <el-tab-pane label="发起交易" name="fgffadqdfa">
+                <!-- <el-tab-pane label="发起交易" name="fgffadqdfa">
                   <el-col :span="24" class="info">
                     <el-col :span="24" v-for="(item, index) in faqilist" :key="index">
                       <el-col class="xqborder">
@@ -284,8 +284,8 @@
                     >
                     </el-pagination>
                   </el-col>
-                </el-tab-pane>
-
+                </el-tab-pane> -->
+<!-- 
                 <el-tab-pane label="交易取消" name="fgrr">
                   <el-col :span="24" class="info">
                     <el-col :span="24" v-for="(item, index) in jiaoyilist" :key="index">
@@ -326,7 +326,7 @@
                     >
                     </el-pagination>
                   </el-col>
-                </el-tab-pane>
+                </el-tab-pane> -->
               </el-tabs>
             </el-row>
           </el-tab-pane>

+ 15 - 25
src/router/index.js

@@ -114,31 +114,6 @@ const live = [
         component: () => import('../views/hall/liveApply.vue'),
       },
 
-      //企业-基本信息
-      {
-        path: '/enterprise/enterprisejb',
-        name: 'enterprisefabu',
-        component: () => import('../views/enterprise/enterprisejb.vue'),
-      },
-      //企业-发布信息列表
-      {
-        path: '/enterprise/enterprisefabu',
-        name: 'enterprisefabu',
-        component: () => import('../views/enterprise/enterprisefabu.vue'),
-      },
-
-      // 企业-需求发布
-      {
-        path: '/enterprise/enterprisexuqiu',
-        name: 'enterprisexuqiu',
-        component: () => import('../views/enterprise/enterprisexuqiu.vue'),
-      },
-      //企业-订购
-      {
-        path: '/enterprise/enterprisedg',
-        name: 'enterprisedg',
-        component: () => import('../views/enterprise/enterprisedg.vue'),
-      },
       {
         path: '/market/contact',
         name: 'contact',
@@ -172,6 +147,21 @@ const live = [
     name: 'enterprisedg',
     component: () => import('../views/enterprise/xiugai.vue'),
   },
+
+  //企业-基本信息
+  {
+    path: '/enterprise/enterprisejb',
+    name: 'enterprisefabu',
+    component: () => import('../views/enterprise/enterprisejb.vue'),
+  },
+
+  // //企业-发布信息列表
+  {
+    path: '/enterprise/enterprisefabu',
+    name: 'enterprisefabu',
+    component: () => import('../views/enterprise/enterprisefabu.vue'),
+  },
+
   {
     path: '/direct',
     name: 'live_direct',

+ 22 - 1
src/views/enterprise/enterprisedg.vue

@@ -13,6 +13,9 @@
       @handleCurrentChange1="change2"
       @handleCurrentChange2="change3"
       @deletes="deleteData"
+      :faqilist="faqilist"
+      :totalfaqi="totalfaqi"
+      @handleCurrentChangefaqi="handleCurrentChangefaqi"
     ></enterprisedg-detail>
   </div>
 </template>
@@ -42,6 +45,8 @@ export default {
     total1: 1,
     total2: 1,
     total3: 1,
+    totalfaqi: 1,
+    faqilist: [],
     dinggou1: [],
     dinggou2: [],
     dinggou3: [],
@@ -51,12 +56,24 @@ export default {
     this.jiaoyi1();
     this.jiaoyi2();
     this.jiaoyi3();
+    this.faqijiaoyi();
   },
   computed: {},
   methods: {
     ...transaction({ transactionList: 'query', transactiondtetle: 'delete' }),
     ...login({ logout: 'logout', transactiondtetle: 'delete' }),
     // 查询
+
+    async faqijiaoyi({ skip = 0, limit = 3, ...info } = {}) {
+      let status = 0;
+      skip = this.skip;
+      const res = await this.transactionList({ skip, limit, status, ...info });
+      console.log(res.total);
+      if (this.$checkRes(res)) {
+        this.$set(this, `faqilist`, res.data);
+        this.$set(this, `totalfaqi`, res.total);
+      }
+    },
     async jiaoyi1({ skip = 0, limit = 3, ...info } = {}) {
       let status = 1;
       skip = this.skip;
@@ -90,7 +107,11 @@ export default {
         this.$set(this, `total3`, res.total);
       }
     },
-
+    //分页
+    async handleCurrentChangefaqi({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.faqijiaoyi();
+    },
     async change1({ skip, limit, currentPage }) {
       this.$set(this, `skip`, skip);
       this.jiaoyi1();