wuhongyu 5 tahun lalu
induk
melakukan
01a02ec265

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

@@ -39,6 +39,8 @@
               :total4="total4"
               :total5="total5"
               :total6="total6"
+              :faqilist="faqilist"
+              :totalfaqi="totalfaqi"
             ></contextfabuxx>
           </el-col>
         </div>
@@ -77,6 +79,8 @@ export default {
     Transactionlist: null, //交易中
     jiaoyilist: null,
     jiaoyilist1: null,
+    faqilist: null,
+    totalfaqi: null,
     // gonggeiData: null,
   },
   components: {

+ 58 - 0
src/layout/enterprise/contextfabuxx.vue

@@ -152,6 +152,46 @@
                   </el-col>
                 </el-tab-pane>
 
+                <el-tab-pane label="发起交易" name="fgffadqdfa">
+                  <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="20"> </el-col>
+                        <el-col :span="4">
+                          {{ 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 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" v-for="(item, index) in Transactionlist" :key="index">
                     <el-col class="xqborder">
@@ -173,6 +213,8 @@
                         <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="success(item)">审核通过</el-link>
+                            <el-link :underline="false" @click="shibai(item)">审核失败</el-link>
                           </el-col>
                         </el-col>
                       </el-col>
@@ -435,6 +477,8 @@ export default {
     total4: null,
     total5: null,
     total6: null,
+    faqilist: null,
+    totalfaqi: null,
 
     // gonggeiData: null,
   },
@@ -451,7 +495,16 @@ export default {
     deteles(item) {
       this.$emit('deteles', { item });
     },
+    success(item) {
+      this.$emit('success', { item });
+    },
 
+    shibai(item) {
+      this.$emit('shibai', { item });
+    },
+    jiaoyisuccess(item) {
+      this.$emit('jiaoyisuccess', { item });
+    },
     handleDelete(item) {
       this.$emit('handleDelete', { item });
     },
@@ -503,6 +556,11 @@ export default {
       console.log(currentPage);
       this.$emit('handleCurrentChange6', { 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>

+ 49 - 14
src/views/enterprise/enterprisefabu.vue

@@ -22,6 +22,15 @@
       :jiaoyilist1="jiaoyilist1"
       @deteles="deteles"
       @handleDelete="handleDelete"
+      @shibai="shibai"
+      @success="success"
+      @jiaoyisuccess="jiaoyisuccess"
+      :faqilist="faqilist"
+      :totalfaqi="totalfaqi"
+      @handleCurrentChangefaqi="handleCurrentChangefaqi"
+      @handleCurrentChange4="handleCurrentChange4"
+      @handleCurrentChange5="handleCurrentChange5"
+      @handleCurrentChange6="handleCurrentChange6"
     ></enterprisefabu-detail>
   </div>
 </template>
@@ -57,6 +66,8 @@ export default {
     tatalstatus1: 1,
     tatalstatus2: 1,
     skip: '',
+    faqilist: [],
+    totalfaqi: 1,
   }),
   created() {
     this.searchSite();
@@ -66,6 +77,7 @@ export default {
     this.jiaoyi1();
     this.jiaoyi2();
     this.jiaoyi3();
+    this.faqijiaoyi();
   },
   computed: {
     ...mapState(['user']),
@@ -74,7 +86,7 @@ export default {
     ...mapSite(['showInfo']),
     ...mapRecruit({ columnList: 'query', columnInfo: 'fetch' }),
     ...marketproduct({ productList: 'query', columnInfo: 'fetch', marketcerate: 'create', productdeltet: 'delete' }),
-    ...transaction({ list: 'query', columnInfo: 'fetch', marketcerate: 'create', delete: 'delete' }),
+    ...transaction({ list: 'query', columnInfo: 'fetch', marketcerate: 'create', delete: 'delete', shenheupdate: 'update' }),
 
     // 查询站点信息
     async searchSite() {
@@ -119,7 +131,16 @@ export default {
         this.$set(this, `tatalstatus2`, res.total);
       }
     },
-
+    async faqijiaoyi({ skip = 0, limit = 3, ...info } = {}) {
+      let status = 0;
+      skip = this.skip;
+      const res = await this.list({ 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;
@@ -131,7 +152,6 @@ export default {
         this.$set(this, `total4`, res.total);
       }
     },
-
     async jiaoyi2({ skip = 0, limit = 3, ...info } = {}) {
       let status = 2;
       skip = this.skip;
@@ -139,37 +159,35 @@ export default {
       const res = await this.list({ skip, limit, status, ...info });
       console.log(res);
       if (this.$checkRes(res)) {
-        this.$set(this, `jiaoyilist`, res.data);
+        this.$set(this, `jiaoyilist1`, res.data);
         this.$set(this, `total5`, res.total);
       }
     },
-
     async jiaoyi3({ skip = 0, limit = 3, ...info } = {}) {
       let status = 3;
       skip = this.skip;
       console.log();
       const res = await this.list({ skip, limit, status, ...info });
-      console.log(res);
       if (this.$checkRes(res)) {
-        this.$set(this, `jiaoyilist1`, res.data);
-        console.log(res);
-
+        this.$set(this, `jiaoyilist`, res.data);
         this.$set(this, `total6`, res.total);
       }
     },
-
     //分页
+    async handleCurrentChangefaqi({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.faqijiaoyi();
+    },
+
     async handleCurrentChange({ skip, limit, currentPage }) {
       this.$set(this, `skip`, skip);
       this.searchInfo();
     },
-
     async handleCurrentChange1({ skip, limit, currentPage }) {
       this.$set(this, `skip`, skip);
       console.log(skip);
       this.searchstatus1();
     },
-
     async handleCurrentChange2({ skip, limit, currentPage }) {
       this.$set(this, `skip`, skip);
       this.searchstaus2();
@@ -186,7 +204,6 @@ export default {
       this.$set(this, `skip`, skip);
       this.jiaoyi3();
     },
-
     // 删除信息
     async deleteData({ item }) {
       const res = await this.productdeltet(item.id);
@@ -201,7 +218,25 @@ export default {
       const res = await this.productdeltet(item.id);
       this.$checkRes(res, '删除成功', '删除失败');
     },
-
+    //审核
+    async jiaoyisuccess({ item }) {
+      item.status = '1';
+      let res = await this.shenheupdate(item);
+      this.faqijiaoyi();
+      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 onsaveClick({ id }) {
       if (id === '基本信息') {
         this.$router.push({ path: '/enterprise/enterprisejb' });