guhongwei 4 năm trước cách đây
mục cha
commit
b30b6ad495

+ 18 - 25
src/router/index.js

@@ -252,13 +252,6 @@ const web = [
         meta: { title: '创新劵服务-信息管理' },
         component: () => import('../views/adminCenter/ticket/detail.vue'),
       },
-      // {
-      //   path: '/adminCenter/ticket',
-      //   name: 'admin_ticket',
-      //   meta: { title: '创新劵服务管理' },
-      //   component: () => import('../views/adminCenter/ticket/status.vue'),
-      // },
-
       // 企业信息
       {
         path: '/adminCenter/company/basic',
@@ -321,24 +314,24 @@ const web = [
         component: () => import('../views/adminCenter/company/cognizance/info.vue'),
       },
       // 中介机构
-      // {
-      //   path: '/adminCenter/inter/basic',
-      //   name: 'inter_basic_index',
-      //   meta: { title: '机构基本信息' },
-      //   component: () => import('../views/adminCenter/inter/basic/index.vue'),
-      // },
-      // {
-      //   path: '/adminCenter/inter/ticket',
-      //   name: 'inter_ticket_index',
-      //   meta: { title: '创新券审核管理' },
-      //   component: () => import('../views/adminCenter/inter/ticket/index.vue'),
-      // },
-      // {
-      //   path: '/adminCenter/inter/ticket/detail',
-      //   name: 'inter_ticket_detail',
-      //   meta: { title: '创新券审核管理' },
-      //   component: () => import('../views/adminCenter/inter/ticket/detail.vue'),
-      // },
+      {
+        path: '/adminCenter/inter/basic',
+        name: 'inter_basic_index',
+        meta: { title: '机构基本信息' },
+        component: () => import('../views/adminCenter/inter/basic/index.vue'),
+      },
+      {
+        path: '/adminCenter/inter/ticket',
+        name: 'inter_ticket_index',
+        meta: { title: '高企认证审核管理' },
+        component: () => import('../views/adminCenter/inter/ticket/index.vue'),
+      },
+      {
+        path: '/adminCenter/inter/ticket/detail',
+        name: 'inter_ticket_detail',
+        meta: { title: '高企认证-信息审核管理' },
+        component: () => import('../views/adminCenter/inter/ticket/detail.vue'),
+      },
       // 专家用户
       {
         path: '/adminCenter/experts/basic',

+ 5 - 0
src/views/adminCenter/company/cognizance/detail.vue

@@ -15,6 +15,7 @@
               </el-col>
               <one :form="form"></one>
               <two :form="form"></two>
+              <thr :form="form"></thr>
               <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>
@@ -30,6 +31,7 @@
 <script>
 import one from './parts/one.vue';
 import two from './parts/two.vue';
+import thr from './parts/thr.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: ticket } = createNamespacedHelpers('ticket');
 const { mapActions: organization } = createNamespacedHelpers('organization');
@@ -39,6 +41,7 @@ export default {
   components: {
     one,
     two,
+    thr,
   },
   data: function () {
     return {
@@ -159,6 +162,8 @@ export default {
       if (data == '0') return '0';
       else if (data == '-1') return '0';
       else if (data == '1') return '2';
+      else if (data == '-3') return '2';
+      else if (data == '3') return '3';
     },
     // 返回
     back() {

+ 88 - 0
src/views/adminCenter/company/cognizance/parts/thr.vue

@@ -0,0 +1,88 @@
+<template>
+  <div id="thr">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-col :span="24" class="down_1text"><span>合同资料上传</span></el-col>
+          <el-col :span="24" class="file">
+            <el-form-item label="上传合同" prop="contract">
+              <e-upload
+                url="/files/cysci/contract_file/upload"
+                :limit="2"
+                v-model="form.contract"
+                type="text"
+                :remove="fileRemove"
+                :extra="{ user_id: user._id }"
+              ></e-upload>
+            </el-form-item>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'thr',
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    // 删除合同之前判断
+    fileRemove(file) {
+      if (file.user_id === this.user._id) {
+        return { result: true };
+      } else {
+        return { result: false, msg: '不允许删除自己上传以外的合同' };
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    form: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    border-bottom: 1px dashed #ccc;
+    margin: 0 0 10px 0;
+    .down_1text {
+      font-weight: bold;
+      margin: 0 0 10px 0;
+      span {
+        display: inline-block;
+        background-color: #242f42;
+        color: #fff;
+        padding: 8px;
+        border-radius: 10px;
+      }
+    }
+    .file {
+      border: 1px dashed #ccc;
+      padding: 10px 50% 10px 0;
+    }
+  }
+}
+</style>

BIN
src/views/adminCenter/inter.rar


+ 95 - 0
src/views/adminCenter/inter/basic/index.vue

@@ -0,0 +1,95 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-col :span="24" class="text"> 基本信息 </el-col>
+          <el-col :span="24" class="form"> <one :form="form" :rules="rules"></one> </el-col>
+          <el-col :span="24" class="btn">
+            <el-button type="primary" @click="onSubmit">保存信息</el-button>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import one from './parts/one.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mechanism } = createNamespacedHelpers('mechanism');
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    one,
+  },
+  data: function () {
+    return {
+      form: {},
+      rules: {},
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mechanism(['fetch', 'update']),
+    async search() {
+      if (this.user.id) {
+        let res = await this.fetch(this.user.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `form`, res.data);
+        }
+      }
+    },
+    async onSubmit() {
+      let data = this.form;
+      let res = await this.update(data);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '修改信息成功',
+          type: 'success',
+        });
+        this.search();
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  border-radius: 10px;
+  box-shadow: 0 0 5px #cccccc;
+  padding: 20px;
+  .one {
+    .text {
+      height: 40px;
+      line-height: 40px;
+      border-bottom: 1px dashed #000;
+      margin: 0 0 10px 0;
+    }
+    .btn {
+      text-align: center;
+      padding: 15px 0;
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 76 - 0
src/views/adminCenter/inter/basic/parts/one.vue

@@ -0,0 +1,76 @@
+<template>
+  <div id="one">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+          <el-col :span="12">
+            <el-form-item label="机构名称" prop="name">
+              <el-input v-model="form.name" placeholder="请输入机构名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="联系人" prop="contacts">
+              <el-input v-model="form.contacts" placeholder="请输入contacts"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="联系电话" prop="phone">
+              <el-input v-model="form.phone" :disabled="true" placeholder="请输入联系电话"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="电子邮箱" prop="email">
+              <el-input v-model="form.email" placeholder="请输入电子邮箱"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="联系地址" prop="address">
+              <el-input v-model="form.address" placeholder="请输入联系地址"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="所属行业" prop="industry">
+              <el-input v-model="form.industry" placeholder="请输入所属行业"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'one',
+  props: {
+    form: { type: Object },
+    rules: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-input__inner {
+  border: 1px solid #333;
+}
+</style>

+ 125 - 0
src/views/adminCenter/inter/basic/parts/two.vue

@@ -0,0 +1,125 @@
+<template>
+  <div id="one">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+          <el-col :span="12">
+            <el-form-item label="注册类型" prop="companytype">
+              <el-input v-model="form.companytype" placeholder="请输入注册类型"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="注册时间" prop="companydate">
+              <el-date-picker v-model="form.companydate" placeholder="请选择" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date"> </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="注册资金" prop="companycapital">
+              <el-input v-model="form.companycapital" placeholder="请输入注册资金"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="企业法人" prop="companyperson">
+              <el-input v-model="form.companyperson" placeholder="请输入企业法人"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="企业总收入" prop="sndqyzsr">
+              <el-input v-model="form.sndqyzsr" placeholder="请输入上年度企业总收入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="研发费用" prop="sndyffy">
+              <el-input v-model="form.sndyffy" placeholder="请输入上年度研发费用"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="企业总人数" prop="companytotal">
+              <el-input v-model="form.companytotal" placeholder="请输入企业总人数"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="研发人数" prop="zjzyfrs">
+              <el-input v-model="form.zjzyfrs" placeholder="请输入专&兼职研发人数"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="企业简介" prop="companybrief">
+              <el-input
+                v-model="form.companybrief"
+                placeholder="请输入企业简介"
+                type="textarea"
+                maxlength="300"
+                :autosize="{ minRows: 4, maxRows: 6 }"
+                show-word-limit
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="主要产品" prop="mainproduct">
+              <el-input
+                v-model="form.mainproduct"
+                placeholder="请输入主要产品"
+                type="textarea"
+                maxlength="300"
+                :autosize="{ minRows: 4, maxRows: 6 }"
+                show-word-limit
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="资质&荣誉" prop="qualifications">
+              <el-input
+                v-model="form.qualifications"
+                placeholder="请输入企业资质&荣誉"
+                type="textarea"
+                maxlength="300"
+                :autosize="{ minRows: 4, maxRows: 6 }"
+                show-word-limit
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'one',
+  props: {
+    form: { type: Object },
+    rules: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-input__inner {
+  border: 1px solid #333;
+}
+/deep/.el-textarea__inner {
+  border: 1px solid #333;
+}
+</style>

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

@@ -0,0 +1,165 @@
+<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>

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

@@ -0,0 +1,41 @@
+<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>

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

@@ -0,0 +1,78 @@
+<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>

+ 221 - 0
src/views/adminCenter/inter/ticket/detail.vue

@@ -0,0 +1,221 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-col :span="24" class="top">
+            <el-button type="primary" size="mini" @click="toFlow">查看意见</el-button>
+            <el-button type="primary" size="mini" @click="back">返回</el-button>
+          </el-col>
+          <el-col :span="24" class="down">
+            <el-form :model="form" ref="form" label-width="100px">
+              <el-col :span="24" class="text">
+                <el-col :span="2" class="left"> 企业名称:</el-col>
+                <el-col :span="22" class="right">
+                  {{ form.name }}
+                </el-col>
+              </el-col>
+              <el-col :span="24" class="text">
+                <el-col :span="2" class="left"> 申领时间:</el-col>
+                <el-col :span="22" class="right">
+                  {{ getDate(form.meta) }}
+                </el-col>
+              </el-col>
+              <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.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-col>
+              </el-col>
+              <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.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-col>
+              </el-col>
+              <el-col :span="24" class="text">
+                <el-col :span="2" class="left"> 合同上传</el-col>
+                <el-col :span="20" class="right">
+                  <e-upload
+                    url="/files/cysci/contract_file/upload"
+                    type="text"
+                    :limit="2"
+                    v-model="form.contract"
+                    :remove="fileRemove"
+                    :extra="{ user_id: user._id }"
+                  ></e-upload>
+                </el-col>
+              </el-col>
+              <el-col :span="24" class="text" v-if="form.status == '2'">
+                <el-col :span="2" class="left"> 信息资料审核:</el-col>
+                <el-col :span="20" class="right">
+                  <el-radio-group v-model="form.status">
+                    <el-radio label="3">通过</el-radio>
+                    <el-radio label="-3">拒绝</el-radio>
+                  </el-radio-group>
+                </el-col>
+              </el-col>
+              <el-col :span="24" class="text" v-if="form.status == '2'">
+                <el-col :span="2" class="left"> 审核意见:</el-col>
+                <el-col :span="22" class="right">
+                  <el-input v-model="form.desc" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></el-input>
+                </el-col>
+              </el-col>
+              <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')" v-if="form.status == '2'">提交保存</el-button>
+                <el-button type="primary" size="mini" @click="toSave('form')" v-else>保存合同</el-button>
+              </el-col>
+            </el-form>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+    <el-dialog title="意见" :visible.sync="dialog" :destroy-on-close="true">
+      <flow :id="form._id"></flow>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+const moment = require('moment');
+import flow from './flow.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: ticket } = createNamespacedHelpers('ticket');
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    flow,
+  },
+  data: function () {
+    return {
+      form: {},
+      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+      // 意见
+      dialog: false,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...ticket(['fetch', 'status', 'update']),
+    async search() {
+      if (this.id) {
+        let res = await this.fetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `form`, res.data);
+        }
+      }
+    },
+    async onSubmit() {
+      let data = this.form;
+      const res = await this.status(data);
+      if (this.$checkRes(res, '审核成功', res.errmsg || '审核失败')) {
+        this.back();
+      }
+    },
+    async toSave() {
+      let data = this.form;
+      const res = await this.update(data);
+      if (this.$checkRes(res, '上传成功', res.errmsg || '上传失败')) {
+        this.back();
+      }
+    },
+    // 查看意见
+    toFlow() {
+      this.dialog = true;
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/adminCenter/inter/ticket', query: { status: this.dataStatus } });
+    },
+    isImg(url) {
+      const arr = url.split('.');
+      const suffix = _.last(arr);
+      return this.imgList.includes(suffix);
+    },
+    toOpen(url) {
+      window.open(url);
+    },
+    getDate(date) {
+      if (date) {
+        let newDate = moment(date.createdAt).format('YYYY-MM-DD');
+        if (newDate) return newDate;
+      }
+    },
+    fileRemove(file) {
+      if (file.user_id === this.user._id) {
+        return { result: true };
+      } else {
+        return { result: false, msg: '不允许删除自己上传以外的合同' };
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+    dataStatus() {
+      return this.$route.query.status;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  border-radius: 10px;
+  box-shadow: 0 0 5px #cccccc;
+  padding: 20px;
+  .top {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+  .down {
+    border: 1px solid #ccc;
+    border-radius: 10px;
+    padding: 15px;
+    .text {
+      padding: 10px 0;
+      border-bottom: 1px dashed #333;
+      .left {
+        text-align: left;
+      }
+      .right {
+        img {
+          width: 200px;
+          height: 200px;
+          border: 1px solid #ccc;
+        }
+      }
+    }
+    .formBtn {
+      padding: 10px 0;
+      text-align: center;
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 71 - 0
src/views/adminCenter/inter/ticket/flow.vue

@@ -0,0 +1,71 @@
+<template>
+  <div id="flow">
+    <el-card v-for="(i, index) in list" :key="`flow-${index}`" style="margin: 10px">
+      <template #header>
+        <el-row type="flex" :gutter="10" justify="space-between">
+          <el-col :span="8">{{ getStep(i) }}</el-col>
+          <el-col :span="5">{{ getTime(i) }}</el-col>
+        </el-row>
+      </template>
+      意见:
+      <p>{{ i.desc }}</p>
+    </el-card>
+  </div>
+</template>
+
+<script>
+const moment = require('moment');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: ticket } = createNamespacedHelpers('ticket');
+export default {
+  name: 'flow',
+  props: { id: { type: String, required: true } },
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      status: [
+        { value: '0', label: '申请' },
+        { value: '1', label: '资质审核成功' },
+        { value: '-1', label: '资质审查失败' },
+        { value: '2', label: '企业填写资料完成,信息资料审查中' },
+        { value: '3', label: '中介机构审核成功' },
+        { value: '-3', label: '信息资料审查失败' },
+        { value: '4', label: '创新劵领取成功' },
+      ],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...ticket(['record']),
+    async search() {
+      const res = await this.record({ ticket_id: this.id });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+      }
+    },
+    getStep(data) {
+      const { status } = data;
+      const r = this.status.find((f) => f.value === status);
+      if (r) return r.label;
+      else return '未知步骤';
+    },
+    getTime(data) {
+      return moment(_.get(data, 'meta.createdAt')).format('YYYY-MM-DD HH:mm:ss');
+    },
+  },
+  computed: {
+    ...mapState(['user', 'menuParams']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 93 - 0
src/views/adminCenter/inter/ticket/index.vue

@@ -0,0 +1,93 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit"> </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </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: 'index',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '审核',
+          method: 'edit',
+          // display: (i) => i.status !== '0' && 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() {},
+  methods: {
+    ...ticket(['query', 'delete']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.status = this.status;
+      const res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    toEdit({ data }) {
+      this.$router.push({ path: '/adminCenter/inter/ticket/detail', query: { id: data._id, status: data.status } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    status() {
+      return this.$route.query.status;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    status: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  border-radius: 10px;
+  box-shadow: 0 0 5px #cccccc;
+  padding: 20px;
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 9 - 0
src/views/adminCenter/ticket/detail.vue

@@ -30,6 +30,15 @@
                   </el-col>
                 </el-col>
               </el-col>
+              <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.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-col>
+              </el-col>
               <el-col :span="24" class="text">
                 <el-col :span="2" class="left"> 资质审核:</el-col>
                 <el-col :span="20" class="right">