guhongwei %!s(int64=4) %!d(string=hai) anos
pai
achega
93c1d17ce0

+ 0 - 165
src/views/adminCenter/inter/ticket copy 2/detail.vue

@@ -1,165 +0,0 @@
-<template>
-  <div id="detail">
-    <el-form ref="form" label-width="150px">
-      <el-row type="flex" justify="space-between" style="padding: 10px">
-        <el-col :span="2">
-          <el-button type="primary" size="mini" @click="toFlow">查看意见</el-button>
-        </el-col>
-        <el-col :span="2">
-          <el-button type="primary" size="mini" @click="toBack">返回</el-button>
-        </el-col>
-      </el-row>
-      <el-form-item label="企业名称">{{ data.name }}</el-form-item>
-      <el-form-item label="资料">
-        <template #label>
-          <el-row>
-            <el-col :span="24">资料</el-col>
-            <el-col :span="24">(图片点击放大)</el-col>
-          </el-row>
-        </template>
-        <el-row :gutter="10">
-          <el-col :span="4" v-for="(i, index) in data.material" :key="`material-${index}`">
-            <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
-            <el-link v-else :key="`material-${index}`" type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
-          </el-col>
-        </el-row>
-      </el-form-item>
-      <el-form-item label="中介机构审核资料">
-        <template #label>
-          <el-row>
-            <el-col :span="24">中介机构审核资料</el-col>
-            <el-col :span="24">(图片点击放大)</el-col>
-          </el-row>
-        </template>
-        <el-row :gutter="10">
-          <el-col :span="4" v-for="(i, index) in data.medium_material" :key="`medium_material-${index}`">
-            <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
-            <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
-          </el-col>
-        </el-row>
-      </el-form-item>
-      <el-form-item label="合同" v-if="data.status === '3'">
-        <template #label>
-          <el-row>
-            <el-col :span="24">合同</el-col>
-            <el-col :span="24">(图片点击放大)</el-col>
-          </el-row>
-        </template>
-        <e-upload
-          url="/files/cysci/contract_file/upload"
-          type="text"
-          :limit="2"
-          v-model="data.contract"
-          :remove="fileRemove"
-          :extra="{ user_id: user._id }"
-        ></e-upload>
-      </el-form-item>
-      <el-form-item label="审核意见" v-if="data.status === '2'">
-        <el-input v-model="form.desc" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></el-input>
-      </el-form-item>
-      <el-form-item label="审核" v-if="data.status === '2'">
-        <el-radio-group v-model="form.status">
-          <el-radio label="3">通过</el-radio>
-          <el-radio label="-3">拒绝</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-row type="flex" justify="space-around">
-        <el-col :span="2">
-          <el-button type="primary" @click="toStatus()" :disabled="!form.status" v-if="data.status === '2'">保存审核结果</el-button>
-          <el-button type="primary" @click="toSave()" v-if="data.status === '3'">上传合同</el-button>
-        </el-col>
-      </el-row>
-    </el-form>
-    <el-dialog title="意见" :visible.sync="dialog" :destroy-on-close="true">
-      <flow :id="data._id"></flow>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import flow from '../../ticket/flow.vue';
-const _ = require('lodash');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: ticket } = createNamespacedHelpers('ticket');
-export default {
-  name: 'detail',
-  props: {},
-  components: { flow },
-  data: function () {
-    return {
-      data: {
-        material: [],
-        medium_material: [],
-        contract: [],
-      },
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-      form: {},
-      dialog: false,
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...ticket(['fetch', 'status', 'update']),
-    async search() {
-      const res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `data`, res.data);
-      }
-    },
-    isImg(url) {
-      const arr = url.split('.');
-      const suffix = _.last(arr);
-      return this.imgList.includes(suffix);
-    },
-    toOpen(url) {
-      window.open(url);
-    },
-    async toStatus(status) {
-      const dup = _.cloneDeep(this.form);
-      dup.opera_id = this.user._id;
-      dup.id = this.id;
-      if (status) dup.status = status;
-      const res = await this.status(dup);
-      if (this.$checkRes(res, '审核成功', res.errmsg || '审核失败')) {
-        this.toBack();
-      }
-    },
-    async toSave() {
-      const dup = _.cloneDeep(this.data);
-      const res = await this.update(dup);
-      if (this.$checkRes(res, '上传成功', res.errmsg || '上传失败')) {
-        // this.toBack();
-      }
-    },
-    toBack() {
-      this.$router.push(`/adminCenter/inter/ticket`);
-    },
-    toFlow() {
-      this.dialog = true;
-    },
-    fileRemove(file) {
-      if (file.user_id === this.user._id) {
-        return { result: true };
-      } else {
-        return { result: false, msg: '不允许删除自己上传以外的合同' };
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-    id() {
-      return this.$route.query.id;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 41
src/views/adminCenter/inter/ticket copy 2/index.vue

@@ -1,41 +0,0 @@
-<template>
-  <div id="index">
-    <el-tabs type="border-card" v-model="active">
-      <el-tab-pane v-for="(i, index) in tabs" :key="`tabs-${index}`" :label="i.label" :name="i.status" :lazy="true">
-        <list :status="i.status"></list>
-      </el-tab-pane>
-    </el-tabs>
-  </div>
-</template>
-
-<script>
-import list from './list.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'index',
-  props: {},
-  components: { list },
-  data: function () {
-    return {
-      active: '2',
-      tabs: [
-        { label: '待审核', status: '2' },
-        { label: '上传合同', status: '3' },
-      ],
-    };
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 78
src/views/adminCenter/inter/ticket copy 2/list.vue

@@ -1,78 +0,0 @@
-<template>
-  <div id="list">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit"> </data-table>
-  </div>
-</template>
-
-<script>
-const moment = require('moment');
-const { ticketType } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: ticket } = createNamespacedHelpers('ticket');
-export default {
-  name: 'list',
-  props: {
-    status: { type: String, default: '2' },
-  },
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        {
-          label: '审核',
-          method: 'edit',
-          display: (i) => i.status === '2',
-        },
-        {
-          label: '上传合同',
-          method: 'edit',
-          display: (i) => i.status === '3',
-        },
-      ],
-      fields: [
-        { label: '企业', prop: 'name', filter: true },
-        { label: '申请时间', prop: 'meta.createdAt', format: (i) => moment(i).format('YYYY-MM-DD HH:mm:ss') },
-        {
-          label: '状态',
-          prop: 'status',
-          format: (i) => {
-            const r = ticketType.find((f) => f.value === i);
-            if (r) return r.label;
-            else return '';
-          },
-        },
-      ],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...ticket(['query', 'delete']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, status: this.status });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data || [{}]);
-        this.$set(this, `total`, res.total);
-      }
-      this.loading = false;
-    },
-    toEdit({ data }) {
-      this.$router.push({ path: '/adminCenter/inter/ticket/detail', query: { id: data._id, status: data.status } });
-    },
-  },
-  computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 24 - 3
src/views/adminCenter/ticket/detail.vue

@@ -40,6 +40,15 @@
                 </el-col>
                 </el-col>
               </el-col>
               </el-col>
               <el-col :span="24" class="text">
               <el-col :span="24" class="text">
+                <el-col :span="2" class="left"> 合同:</el-col>
+                <el-col :span="20" class="right">
+                  <el-col :span="4" v-for="(i, index) in form.contract" :key="`medium_material-${index}`">
+                    <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
+                    <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
+                  </el-col>
+                </el-col>
+              </el-col>
+              <el-col :span="24" class="text" v-if="dataStatus == '0'">
                 <el-col :span="2" class="left"> 资质审核:</el-col>
                 <el-col :span="2" class="left"> 资质审核:</el-col>
                 <el-col :span="20" class="right">
                 <el-col :span="20" class="right">
                   <el-radio-group v-model="form.status">
                   <el-radio-group v-model="form.status">
@@ -48,15 +57,16 @@
                   </el-radio-group>
                   </el-radio-group>
                 </el-col>
                 </el-col>
               </el-col>
               </el-col>
-              <el-col :span="24" class="text">
+              <el-col :span="24" class="text" v-if="dataStatus === '0' || dataStatus === '3'">
                 <el-col :span="2" class="left"> 审核意见:</el-col>
                 <el-col :span="2" class="left"> 审核意见:</el-col>
                 <el-col :span="22" class="right">
                 <el-col :span="22" class="right">
                   <el-input v-model="form.desc" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></el-input>
                   <el-input v-model="form.desc" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></el-input>
                 </el-col>
                 </el-col>
               </el-col>
               </el-col>
               <el-col :span="24" class="formBtn">
               <el-col :span="24" class="formBtn">
-                <el-button type="danger" size="mini" @click="back">取消申请</el-button>
-                <el-button type="primary" size="mini" @click="onSubmit('form')">提交申请</el-button>
+                <el-button type="danger" size="mini" @click="back">取消保存</el-button>
+                <el-button type="primary" size="mini" v-if="dataStatus === '0'" @click="onSubmit()">提交保存</el-button>
+                <el-button type="primary" size="mini" v-if="dataStatus === '3'" @click="toStatus('4')">高企认证确认</el-button>
               </el-col>
               </el-col>
             </el-form>
             </el-form>
           </el-col>
           </el-col>
@@ -94,6 +104,7 @@ export default {
   },
   },
   methods: {
   methods: {
     ...ticket(['fetch', 'status']),
     ...ticket(['fetch', 'status']),
+    // 查询详情
     async search() {
     async search() {
       if (this.id) {
       if (this.id) {
         let res = await this.fetch(this.id);
         let res = await this.fetch(this.id);
@@ -102,6 +113,7 @@ export default {
         }
         }
       }
       }
     },
     },
+    // 审核
     async onSubmit() {
     async onSubmit() {
       let data = this.form;
       let data = this.form;
       const res = await this.status(data);
       const res = await this.status(data);
@@ -109,6 +121,15 @@ export default {
         this.back();
         this.back();
       }
       }
     },
     },
+    // 高企认证确认
+    async toStatus(status) {
+      let data = this.form;
+      data.status = status;
+      const res = await this.status(data);
+      if (this.$checkRes(res, '高企认证成功', res.errmsg || '高企认证失败')) {
+        this.back();
+      }
+    },
     // 查看意见
     // 查看意见
     toFlow() {
     toFlow() {
       this.dialog = true;
       this.dialog = true;