wuhongyu 5 years ago
parent
commit
eb1ac59613

+ 4 - 0
src/layout/enterprise/appointment.vue

@@ -55,6 +55,9 @@
               </template>
             </el-table-column>
           </el-table>
+          <el-col :span="24">
+            <page :total="total" position="right"></page>
+          </el-col>
         </el-col>
       </el-col>
     </el-col>
@@ -69,6 +72,7 @@ export default {
   name: 'technical',
   props: {
     resultTable: null,
+    total: null,
   },
   components: {},
   data: () => ({

+ 11 - 7
src/layout/enterprise/look.vue

@@ -15,7 +15,11 @@
         <el-col :span="24" class="infoLeft">
           <el-table :data="resultTable" stripe style="width: 96%" border>
             <el-table-column prop="user_name" label="用户名称"> </el-table-column>
-            <el-table-column prop="buyer" label="买家/卖家" :show-overflow-tooltip="true"> </el-table-column>
+            <el-table-column label="买家/卖家" :show-overflow-tooltip="true">
+              <template slot-scope="scoped">
+                {{ scoped.row.buyer === '0' ? '买家' : scoped.row.buyer === '1' ? '卖家' : '' }}
+              </template>
+            </el-table-column>
             <el-table-column prop="contact" label="联系人" :show-overflow-tooltip="true"> </el-table-column>
             <el-table-column prop="contact_tel" label="联系人电话" :show-overflow-tooltip="true"> </el-table-column>
             <el-table-column prop="email" label="邮箱" :show-overflow-tooltip="true"> </el-table-column>
@@ -29,11 +33,11 @@
 
             <el-table-column label="操作">
               <template slot-scope="scope">
-                <el-button size="mini" type="text" @click.prevent="success(scope.row.id)">
+                <el-button size="mini" type="text" @click.prevent="success(scope.row)">
                   <el-tooltip class="item" effect="dark" content="审核通过" placement="top-start"><i class="el-icon-refresh"></i></el-tooltip>
                 </el-button>
 
-                <el-button size="mini" type="text" @click.prevent="shibai(scope.row.id)">
+                <el-button size="mini" type="text" @click.prevent="shibai(scope.row)">
                   <el-tooltip class="item" effect="dark" content="审核拒绝" placement="top-start"><i class="el-icon-refresh"></i></el-tooltip>
                 </el-button>
                 <el-button size="mini" type="text" @click.prevent="deleteRow(scope.row.id)">
@@ -81,11 +85,11 @@ export default {
       this.$router.push({ path: '/enterprise/duijiedetail' });
     },
 
-    shibai(id) {
-      this.$emit('shibai', id);
+    shibai(row) {
+      this.$emit('shibai', row);
     },
-    success(id) {
-      this.$emit('success', id);
+    success(row) {
+      this.$emit('success', row);
     },
     deleteRow(id) {
       this.$emit('deleteRow', id);

+ 16 - 2
src/views/enterprise/look.vue

@@ -88,8 +88,22 @@ export default {
     async toLogin() {
       this.$router.push({ path: '/' });
     },
-    async success() {},
-    async shibai() {},
+    async success(row) {
+      row.status = '1';
+      row.dock_id = this.data.id;
+      row.id = data._id;
+      console.log(row);
+      let res = await this.update(row);
+      this.$checkRes(res, '通过审核', '添加失败');
+    },
+    async shibai(row) {
+      row.status = '2';
+      row.dock_id = this.data.id;
+      row.id = data._id;
+      console.log(row);
+      let res = await this.update(row);
+      this.$checkRes(res, '审核拒绝', '添加失败');
+    },
     async deleteRow(id) {
       const res = await this.delete(id);
       if (this.$checkRes(res, '删除成功', res.errmsg || '删除失败')) this.search();