Преглед на файлове

Merge branch 'master' of http://git.cc-lotus.info/service-platform/web-test

guhongwei преди 5 години
родител
ревизия
949e7d64cd

+ 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, //头部

+ 65 - 3
src/layout/enterprise/context.vue

@@ -6,6 +6,49 @@
           <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-link :underline="false" @click="deteles(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">
@@ -27,7 +70,9 @@
                           </el-col>
                           <el-col :span="6" class="fbListCenterR">
                             <el-col :span="24" class="bainji">
-                              <el-link :underline="false" @click="deteles(item)">彻底删除</el-link>
+                              <el-link :underline="false" @click="deteles(item)">删除</el-link>
+                              <el-link :underline="false" @click="success(item)">审核通过</el-link>
+                              <el-link :underline="false" @click="shibai(item)">审核失败</el-link>
                             </el-col>
                           </el-col>
                         </el-col>
@@ -69,7 +114,7 @@
                           </el-col>
                           <el-col :span="6" class="fbListCenterR">
                             <el-col :span="24" class="bainji">
-                              <el-link :underline="false" @click="deteles(item)">彻底删除</el-link>
+                              <el-link :underline="false" @click="deteles(item)">删除</el-link>
                             </el-col>
                           </el-col>
                         </el-col>
@@ -111,7 +156,7 @@
                           </el-col>
                           <el-col :span="6" class="fbListCenterR">
                             <el-col :span="24" class="bainji">
-                              <el-link :underline="false" @click="deteles(item)">彻底删除</el-link>
+                              <el-link :underline="false" @click="deteles(item)">删除</el-link>
                             </el-col>
                           </el-col>
                         </el-col>
@@ -157,6 +202,8 @@ export default {
     total1: null,
     total2: null,
     total3: null,
+    faqilist: null,
+    totalfaqi: null,
 
     // gonggeiData: null,
   },
@@ -176,6 +223,17 @@ export default {
     messFabu() {
       this.$router.push({ path: '/enterprise/enterprisexuqiu' });
     },
+
+    success(item) {
+      this.$emit('success', { item });
+    },
+
+    shibai(item) {
+      this.$emit('shibai', { item });
+    },
+    jiaoyisuccess(item) {
+      this.$emit('jiaoyisuccess', { item });
+    },
     handleClick(tab, event) {
       console.log(tab, event);
     },
@@ -197,6 +255,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>

+ 12 - 7
src/layout/supermarket/detali.vue

@@ -2,9 +2,9 @@
   <div id="policyrightcont">
     <el-row>
       <el-col :span="24" class="info">
-        <el-col :span="24" class="infoTop">
+        <!-- <el-col :span="24" class="infoTop">
           <span>详情页面</span>
-        </el-col>
+        </el-col> -->
         <el-col :span="24" class="infoMiddle">
           <el-col :span="8" class="infoImage">
             <el-carousel trigger="click" height="400px">
@@ -72,8 +72,8 @@
 
             <el-form-item label="产品参数:">
               <el-table :data="policyInfo.product_args" border style="width: 100%">
-                <el-table-column prop="arg_name" label="参数名称"> </el-table-column>
-                <el-table-column prop="memo" label="参数内容"> </el-table-column>
+                <el-table-column prop="arg_name" label="参数名称" :show-overflow-tooltip="true"> </el-table-column>
+                <el-table-column prop="memo" label="参数内容" :show-overflow-tooltip="true"> </el-table-column>
               </el-table>
             </el-form-item>
           </el-form>
@@ -145,13 +145,15 @@ p {
   font-family: 微软雅黑;
   color: rgba(1, 1, 1, 0.7);
   width: 57%;
+  font-size: 16px;
 }
 .infoRight p:first-child {
   font-size: 25px;
-  margin: 20px 0 30px 0;
+  padding: 20px 0 20px 0;
 }
 .infoType {
   font-size: 20px;
+  padding: 20px 0;
 }
 .infoType span:first-child {
   font-weight: bolder;
@@ -168,7 +170,7 @@ p {
   line-height: 60px;
   margin: 30px 0 30px 0;
   width: 90%;
-  padding: 0 30px;
+  padding: 0 20px;
   font-size: 28px;
   color: #fe0000;
 }
@@ -177,7 +179,7 @@ p {
   font-size: 18px;
 }
 .infoStatus {
-  margin: 30px 0 30px 0;
+  padding: 30px 0 30px 0;
 }
 .infoStatus span:nth-child(2) {
   display: inline-block;
@@ -194,6 +196,9 @@ p {
   color: rgba(1, 1, 1, 0.7);
   font-size: 18px;
 }
+/deep/.el-table {
+  max-width: 95%;
+}
 /deep/.el-table th {
   background-color: #f3f3f3;
   color: rgba(1, 1, 1, 0.5);

+ 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',

+ 44 - 2
src/views/enterprise/enterprisedg.vue

@@ -13,6 +13,12 @@
       @handleCurrentChange1="change2"
       @handleCurrentChange2="change3"
       @deletes="deleteData"
+      :faqilist="faqilist"
+      :totalfaqi="totalfaqi"
+      @handleCurrentChangefaqi="handleCurrentChangefaqi"
+      @jiaoyisuccess="jiaoyisuccess"
+      @shibai="shibai"
+      @success="success"
     ></enterprisedg-detail>
   </div>
 </template>
@@ -42,6 +48,8 @@ export default {
     total1: 1,
     total2: 1,
     total3: 1,
+    totalfaqi: 1,
+    faqilist: [],
     dinggou1: [],
     dinggou2: [],
     dinggou3: [],
@@ -51,12 +59,23 @@ export default {
     this.jiaoyi1();
     this.jiaoyi2();
     this.jiaoyi3();
+    this.faqijiaoyi();
   },
   computed: {},
   methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete' }),
+    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
     ...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 +109,30 @@ export default {
         this.$set(this, `total3`, res.total);
       }
     },
-
+    //审核
+    async jiaoyisuccess({ item }) {
+      item.status = '1';
+      let res = await this.shenheupdate(item);
+      this.jiaoyi1();
+      this.$checkRes(res, '同意成功', '审核失败');
+    },
+    async shibai({ item }) {
+      item.status = '3';
+      let res = await this.shenheupdate(item);
+      this.$checkRes(res, '审核成功', '审核失败');
+      this.jiaoyi3();
+    },
+    async success({ item }) {
+      item.status = '2';
+      let res = await this.shenheupdate(item);
+      this.$checkRes(res, '审核成功', '审核失败');
+      this.jiaoyi2();
+    },
+    //分页
+    async handleCurrentChangefaqi({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.faqijiaoyi();
+    },
     async change1({ skip, limit, currentPage }) {
       this.$set(this, `skip`, skip);
       this.jiaoyi1();

+ 2 - 1
src/views/enterprise/enterprisefabu.vue

@@ -41,6 +41,7 @@ const { mapActions: mapSite } = createNamespacedHelpers('site');
 const { mapActions: mapRecruit } = createNamespacedHelpers('market');
 const { mapActions: marketproduct } = createNamespacedHelpers('marketproduct');
 const { mapActions: transaction } = createNamespacedHelpers('transaction');
+const { mapActions: login } = createNamespacedHelpers('login');
 
 export default {
   name: 'adviserList',
@@ -92,7 +93,7 @@ export default {
     ...mapRecruit({ columnList: 'query', columnInfo: 'fetch' }),
     ...marketproduct({ productList: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete' }),
     ...transaction({ list: 'query', columnInfo: 'fetch', marketcerate: 'create', delete: 'delete', shenheupdate: 'update' }),
-
+    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
     // 查询列表
     async searchInfo({ skip = 0, limit = 3, ...info } = {}) {
       skip = this.skip;

+ 2 - 1
src/views/enterprise/enterprisejb.vue

@@ -7,7 +7,7 @@
 <script>
 import enterprisejbDetail from '@/components/enterprise/enterprisejb.vue';
 import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
-
+const { mapActions: login } = createNamespacedHelpers('login');
 const { mapActions: market } = createNamespacedHelpers('market');
 export default {
   name: 'adviserList',
@@ -36,6 +36,7 @@ export default {
   },
   methods: {
     ...market(['fetch']),
+    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
     // 查询基本信息
     async searchInfo() {
       let res = await this.fetch(this.user.userid);

+ 2 - 1
src/views/enterprise/enterprisexuqiu.vue

@@ -18,6 +18,7 @@ import enterprisexuqiuDetail from '@/components/enterprise/enterprisexuqiu.vue';
 import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
 const { mapActions: mapMarkettype } = createNamespacedHelpers('markettype');
 const { mapActions: mapMarketproduct } = createNamespacedHelpers('marketproduct');
+const { mapActions: login } = createNamespacedHelpers('login');
 
 export default {
   name: 'adviserList',
@@ -62,7 +63,7 @@ export default {
   methods: {
     ...mapMarkettype({ markettypeList: 'query' }),
     ...mapMarketproduct({ productFetch: 'fetch', productCreate: 'create', productUpdate: 'update' }),
-
+    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
     async searchInfo() {
       if (this.$route.query.id) {
         const res = await this.productFetch(this.id);

+ 2 - 0
src/views/enterprise/enterprisexx.vue

@@ -8,6 +8,7 @@
 import enterprisexxDetail from '@/components/enterprise/enterprisexx.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapSite } = createNamespacedHelpers('site');
+const { mapActions: login } = createNamespacedHelpers('login');
 export default {
   name: 'adviserList',
   props: {},
@@ -29,6 +30,7 @@ export default {
   created() {},
   computed: {},
   methods: {
+    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
     async onsaveClick({ id }) {
       console.log(id);
       if (id === '基本信息') {

+ 2 - 0
src/views/enterprise/xiugai.vue

@@ -9,6 +9,7 @@ import xiugaiDetail from '@/components/enterprise/xiugai.vue';
 import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
 const { mapActions: mapSite } = createNamespacedHelpers('site');
 const { mapActions: mapMarket } = createNamespacedHelpers('market');
+const { mapActions: login } = createNamespacedHelpers('login');
 export default {
   name: 'adviserList',
   props: {},
@@ -33,6 +34,7 @@ export default {
     ...mapState(['user']),
   },
   methods: {
+    ...login({ logout: 'logout', transactiondtetle: 'delete' }),
     ...mapMarket({ userFetch: 'fetch', userCreate: 'create', userUpdate: 'update' }),
     async onsaveClick({ id }) {
       console.log(id);