wuhongyu 4 years ago
parent
commit
690bc5bac5

+ 16 - 28
src/views/adminCenter/transaction/index.vue

@@ -5,7 +5,7 @@
         <el-col :span="24" class="leftTop"> <span>|</span> <span>交易审核</span> </el-col>
         <el-col :span="24" class="info">
           <span v-if="view">
-            <list :recruitInfo="recruitInfo" :total="total" @handleCurrentChange="handleCurrentChange" @shareBtn="shareBtn" @deleteBtn="deleteBtn"></list>
+            <list :recruitInfo="recruitInfo" :total="total" @handleCurrentChange="handleCurrentChange" @shareBtn="shareBtn"></list>
           </span>
           <span v-else>
             <detail :form="form" @submitDate="onSubmit"></detail>
@@ -20,11 +20,10 @@
 import list from './parts/list.vue';
 import detail from './parts/detail.vue';
 import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
-const { mapActions: product } = createNamespacedHelpers('market');
 const { mapActions: tranaudit } = createNamespacedHelpers('tranaudit');
 const { mapActions: transactions } = createNamespacedHelpers('transaction');
 const { mapActions: productpact } = createNamespacedHelpers('productpact');
-
+const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'recruit',
   props: {},
@@ -33,20 +32,14 @@ export default {
     detail,
   },
   data: () => ({
-    form: {},
+    topTitle: '审核信息',
     view: true,
+    recruitInfo: [],
     total: 1,
     currentPage: 0,
     pageSize: 10,
-    tranList: [
-      {
-        title: 'zxlfcjsdl',
-      },
-    ],
-    topTitle: '审核信息',
-    recruitInfo: [],
-    total: 1,
     skip: '',
+    form: {},
   }),
   created() {
     this.search();
@@ -57,26 +50,21 @@ export default {
       this.searchinfo(id), (this.view = false);
     },
     // 删除
-    async deleteBtn(id) {
-      s;
-      const res = await this.transactiondetele(id);
-      this.$checkRes(res, '删除成功', '删除失败');
-      this.search();
-    },
-    ...product(['query', 'delete', 'fetch', 'update']),
+    // async deleteBtn(id) {
+    //   const res = await this.transactiondetele(id);
+    //   this.$checkRes(res, '删除成功', '删除失败');
+    //   this.search();
+    // },
+
     ...productpact({ transactionQuery: 'query', productpactFetch: 'findpact', productpactUpdate: 'update' }),
     ...tranaudit({ tranauditList: 'query', tranauditListupdate: 'update' }),
     ...transactions({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
+    ...dock({ dockQuery: 'query' }),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      if (this.user.role == '4') {
-        skip = this.skip;
-        let dockid = '5efc62dc0830555c780788a7';
-        const res = await this.transactionslist({ skip, dockid, limit, ...info });
-        this.$set(this, `recruitInfo`, res.data);
-        this.$set(this, `total`, res.total);
-      } else {
-        skip = this.skip;
-        const res = await this.transactionslist({ skip, limit, ...info });
+      skip = this.skip;
+      let docklist = await this.dockQuery({ uid: this.user.uid });
+      for (const dock of docklist.data) {
+        const res = await this.transactionslist({ skip, dockid: dock.id, limit, ...info });
         this.$set(this, `recruitInfo`, res.data);
         this.$set(this, `total`, res.total);
       }

+ 4 - 4
src/views/adminCenter/transaction/parts/list.vue

@@ -28,7 +28,7 @@
               <el-table-column label="操作" align="center">
                 <template slot-scope="scoped">
                   <el-button v-if="scoped.row.status == 4" type="primary" size="mini" @click="shareBtn(scoped.row.id)">审核 </el-button>
-                  <el-button type="danger" size="mini" @click="handleDelete(scoped.row.id)">删除</el-button>
+                  <!-- <el-button type="danger" size="mini" @click="handleDelete(scoped.row.id)">删除</el-button> -->
                 </template>
               </el-table-column>
             </el-table>
@@ -71,9 +71,9 @@ export default {
       this.$emit('shareBtn', id);
     },
 
-    handleDelete(id) {
-      this.$emit('deleteBtn', id);
-    },
+    // handleDelete(id) {
+    //   this.$emit('deleteBtn', id);
+    // },
     handleEdit(row) {
       this.$emit('edit', { data: row });
     },