guhongwei 4 년 전
부모
커밋
670e67ec12

+ 36 - 17
src/router/index.js

@@ -244,14 +244,21 @@ const web = [
         path: '/adminCenter/ticket',
         name: 'admin_ticket',
         meta: { title: '创新劵服务管理' },
-        component: () => import('../views/adminCenter/ticket/status.vue'),
+        component: () => import('../views/adminCenter/ticket/index.vue'),
       },
       {
         path: '/adminCenter/ticket/detail',
         name: 'admin_ticket_detail',
-        meta: { title: '创新劵服务管理' },
+        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',
@@ -301,25 +308,37 @@ const web = [
         meta: { title: '高企认定' },
         component: () => import('../views/adminCenter/company/cognizance/index.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/company/cognizance/detail',
+        name: 'company_cognizance_detail',
+        meta: { title: '高企认定-信息管理' },
+        component: () => import('../views/adminCenter/company/cognizance/detail.vue'),
       },
       {
-        path: '/adminCenter/inter/ticket/detail',
-        name: 'inter_ticket_detail',
-        meta: { title: '创新券审核管理' },
-        component: () => import('../views/adminCenter/inter/ticket/detail.vue'),
+        path: '/adminCenter/company/cognizance/info',
+        name: 'company_cognizance_info',
+        meta: { title: '高企认定-查看审核' },
+        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/experts/basic',

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

@@ -0,0 +1,214 @@
+<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="back">返回</el-button>
+          </el-col>
+          <el-col :span="24" class="down">
+            <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+              <el-col :span="24" class="name">
+                <el-form-item label="企业名称" prop="name">
+                  <el-input v-model="form.name" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <one :form="form"></one>
+              <two :form="form"></two>
+              <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-col>
+            </el-form>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import one from './parts/one.vue';
+import two from './parts/two.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: ticket } = createNamespacedHelpers('ticket');
+const { mapActions: organization } = createNamespacedHelpers('organization');
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    one,
+    two,
+  },
+  data: function () {
+    return {
+      form: {},
+      rules: {},
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...organization({ companyFetch: 'fetch' }),
+    ...ticket(['fetch', 'create', 'update']),
+    async search() {
+      if (this.id) {
+        let res = await this.fetch(this.id);
+        if (this.$checkRes(res)) {
+          res.data = this.searchMaterial(res.data);
+          this.$set(this, `form`, res.data);
+          console.log(res.data);
+        }
+      } else {
+        let res = await this.companyFetch(this.user.id);
+        if (this.$checkRes(res)) {
+          let data = {
+            user_id: res.data.id,
+            name: res.data.name,
+            qyfr: [],
+            yyzz: [],
+            qylr: [],
+          };
+          this.$set(this, `form`, data);
+        }
+      }
+    },
+    async onSubmit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          let data = this.form;
+          data.material = this.oneMap();
+          data.medium_material = this.twoMap();
+          if (this.id) {
+            data.status = this.searchStatus(data.status);
+            let res = await this.update(data);
+            if (this.$checkRes(res)) {
+              this.$message({
+                message: '高企认证服务重申成功,请耐心等待结果',
+                type: 'success',
+              });
+              this.back();
+            }
+          } else {
+            let res = await this.create(data);
+            if (this.$checkRes(res)) {
+              this.$message({
+                message: '高企认证服务申报成功,请耐心等待结果',
+                type: 'success',
+              });
+              this.back();
+            }
+          }
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 企业资质资料重组
+    oneMap() {
+      let data = _.cloneDeep(this.form);
+      const arr = ['qyfr', 'yyzz', 'qylr'];
+      const res = [];
+      for (const key of arr) {
+        const e = data[key];
+        if (e.length <= 0) continue;
+        const head = _.head(e);
+        res.push(head);
+      }
+      return res;
+    },
+    // 企业准备订单
+    twoMap() {
+      let data = _.cloneDeep(this.form);
+      const arr = ['qyfr1', 'yyzz1', 'qylr1'];
+      const res = [];
+      for (const key of arr) {
+        const e = data[key];
+        if (e.length <= 0) continue;
+        const head = _.head(e);
+        res.push(head);
+      }
+      return res;
+    },
+    // 资质信息处理,订单
+    searchMaterial(data) {
+      if (data.material.length > 0) {
+        data.qyfr = [data.material[0]];
+        data.yyzz = [data.material[1]];
+        data.qylr = [data.material[2]];
+      } else {
+        data.qyfr = [];
+        data.yyzz = [];
+        data.qylr = [];
+      }
+      if (data.medium_material.length > 0) {
+        data.qyfr1 = [data.medium_material[0]];
+        data.yyzz1 = [data.medium_material[1]];
+        data.qylr1 = [data.medium_material[2]];
+      } else {
+        data.qyfr1 = [];
+        data.yyzz1 = [];
+        data.qylr1 = [];
+      }
+      return data;
+    },
+    // 处理状态
+    searchStatus(data) {
+      if (data == '0') return '0';
+      else if (data == '-1') return '0';
+      else if (data == '1') return '2';
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/adminCenter/company/cognizance' });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+    status() {
+      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;
+  .one {
+    .top {
+      text-align: right;
+      margin: 0 0 15px 0;
+    }
+  }
+  .down {
+    .name {
+      border-bottom: 1px dashed #ccc;
+      margin: 0 0 10px 0;
+    }
+    .formBtn {
+      text-align: center;
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 83 - 5
src/views/adminCenter/company/cognizance/index.vue

@@ -1,22 +1,91 @@
 <template>
   <div id="index">
     <el-row>
-      <el-col :span="24" class="main"> test </el-col>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @edit="toEdit">
+            <template #selfbtn>
+              <el-button type="primary" size="mini" @click="toAdd">添加高企认证服务</el-button>
+            </template>
+          </data-table>
+        </el-col>
+      </el-col>
     </el-row>
   </div>
 </template>
 
 <script>
+const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: ticket } = createNamespacedHelpers('ticket');
+
 export default {
   name: 'index',
   props: {},
   components: {},
   data: function () {
-    return {};
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '查看',
+          method: 'view',
+        },
+        {
+          label: '编辑申请',
+          method: 'edit',
+          // display: (item) => {
+          //   return item.status == '-1' || item.status == '1' || item.status == '-3' || item.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) => {
+            if (i == '0') return '资质审查中';
+            else if (i == '1') return '企业准备订单';
+            else if (i == '-1') return '资质审查失败';
+            else if (i == '2') return '信息资料审查中';
+            else if (i == '3') return '企业订单入库';
+            else if (i == '-3') return '信息资料审查失败';
+            else if (i == '4') return '创新券领取成功';
+          },
+        },
+      ],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...ticket(['query']),
+    // 查询
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.user_id = this.user.id;
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 添加
+    toAdd() {
+      this.$router.push({ path: '/adminCenter/company/cognizance/detail' });
+    },
+    // 查看资料
+    toView({ data }) {
+      this.$router.push({ path: '/adminCenter/company/cognizance/info', query: { id: data._id, status: data.status } });
+    },
+    // 修改申请
+    toEdit({ data }) {
+      this.$router.push({ path: '/adminCenter/company/cognizance/detail', query: { id: data._id, status: data.status } });
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
   },
@@ -33,4 +102,13 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<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>

+ 190 - 0
src/views/adminCenter/company/cognizance/info.vue

@@ -0,0 +1,190 @@
+<template>
+  <div id="info">
+    <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="back">返回</el-button>
+          </el-col>
+          <el-col :span="24" class="down">
+            <el-col :span="24" class="text">
+              <el-col :span="2" class="left"> 企业名称:</el-col>
+              <el-col :span="22" class="right">
+                {{ data.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(data.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 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-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 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-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 data.contract" :key="`contract-${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="22" class="right">
+                {{ getStatus(data.status) }}
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="text">
+              <el-col :span="24" class="left"> 审核意见:</el-col>
+              <el-col :span="24" class="right desc">
+                <el-timeline>
+                  <el-timeline-item v-for="(item, index) in descList" :key="index" :timestamp="item.create_time" placement="top">
+                    <el-card>
+                      <p>{{ item.desc }}</p>
+                    </el-card>
+                  </el-timeline-item>
+                </el-timeline>
+              </el-col>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const moment = require('moment');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: ticket } = createNamespacedHelpers('ticket');
+
+export default {
+  name: 'info',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      data: {},
+      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+      // 意见列表
+      descList: [],
+    };
+  },
+  async created() {
+    if (this.id) await this.search();
+  },
+  methods: {
+    ...ticket(['fetch', 'record']),
+    async search() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `data`, res.data);
+      }
+      res = await this.record({ ticket_id: this.id, status: this.status });
+      if (this.$checkRes(res)) {
+        this.$set(this, `descList`, res.data);
+      }
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/adminCenter/company/cognizance' });
+    },
+    getDate(date) {
+      if (date) {
+        let newDate = moment(date.createdAt).format('YYYY-MM-DD');
+        if (newDate) return newDate;
+      }
+    },
+    toOpen(url) {
+      window.open(url);
+    },
+    isImg(url) {
+      const arr = url.split('.');
+      const suffix = _.last(arr);
+      return this.imgList.includes(suffix);
+    },
+    getStatus(i) {
+      if (i == '0') return '资质审查中';
+      else if (i == '1') return '企业准备订单';
+      else if (i == '-1') return '资质审查失败';
+      else if (i == '2') return '信息资料审查中';
+      else if (i == '3') return '企业订单入库';
+      else if (i == '-3') return '信息资料审查失败';
+      else if (i == '4') return '创新券领取成功';
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+    status() {
+      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;
+  .one {
+    .top {
+      text-align: right;
+      margin: 0 0 15px 0;
+    }
+    .down {
+      .text {
+        padding: 10px 0;
+        border-bottom: 1px dashed #333;
+        .left {
+          text-align: left;
+        }
+        .right {
+          img {
+            width: 200px;
+            height: 200px;
+            border: 1px solid #ccc;
+          }
+        }
+        .desc {
+          margin: 10px 0 0 0;
+        }
+      }
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 82 - 0
src/views/adminCenter/company/cognizance/parts/one.vue

@@ -0,0 +1,82 @@
+<template>
+  <div id="one">
+    <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="qyfr">
+              <e-upload url="/files/cysci/qyfr_file/upload" :limit="1" v-model="form.qyfr" type="text"></e-upload>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24" class="file">
+            <el-form-item label="企业营业执照" prop="yyzz">
+              <e-upload url="/files/cysci/yyzz_file/upload" :limit="1" v-model="form.yyzz" type="text"></e-upload>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24" class="file">
+            <el-form-item label="企业利润表" prop="qylr">
+              <e-upload url="/files/cysci/qylr_file/upload" :limit="1" v-model="form.qylr" type="text"></e-upload>
+            </el-form-item>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'one',
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  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>

+ 106 - 0
src/views/adminCenter/company/cognizance/parts/two.vue

@@ -0,0 +1,106 @@
+<template>
+  <div id="two">
+    <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="选择中介">
+              <el-select v-model="form.mechanism_id" placeholder="">
+                <el-option v-for="item in mechanismList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24" class="file">
+            <el-form-item label="法人复印件" prop="qyfr1">
+              <e-upload url="/files/cysci/qyfr1_file/upload" :limit="1" v-model="form.qyfr1" type="text"></e-upload>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24" class="file">
+            <el-form-item label="企业营业执照" prop="yyzz1">
+              <e-upload url="/files/cysci/yyzz1_file/upload" :limit="1" v-model="form.yyzz1" type="text"></e-upload>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24" class="file">
+            <el-form-item label="企业利润表" prop="qylr1">
+              <e-upload url="/files/cysci/qylr1_file/upload" :limit="1" v-model="form.qylr1" type="text"></e-upload>
+            </el-form-item>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mechanism } = createNamespacedHelpers('mechanism');
+export default {
+  name: 'two',
+  props: {
+    form: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  components: {},
+  data: function () {
+    return {
+      mechanismList: [],
+    };
+  },
+  async created() {
+    await this.searchOther();
+  },
+  methods: {
+    ...mechanism(['query']),
+    // 查询其他
+    async searchOther() {
+      let res = await this.query();
+      if (this.$checkRes(res)) {
+        this.$set(this, `mechanismList`, res.data);
+      }
+    },
+  },
+  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;
+      .el-select {
+        width: 100%;
+      }
+    }
+  }
+}
+</style>

+ 1 - 0
src/views/adminCenter/company/备份/ticket/index.vue

@@ -42,6 +42,7 @@
 const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: ticket } = createNamespacedHelpers('ticket');
+
 export default {
   name: 'index',
   props: {},

BIN
src/views/adminCenter/inter.rar


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

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

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

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

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

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

+ 0 - 41
src/views/adminCenter/inter/ticket/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>

+ 130 - 105
src/views/adminCenter/ticket/detail.vue

@@ -1,113 +1,113 @@
 <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-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-radio-group v-model="form.status">
+                    <el-radio label="1">通过</el-radio>
+                    <el-radio label="-1">拒绝</el-radio>
+                  </el-radio-group>
+                </el-col>
+              </el-col>
+              <el-col :span="24" class="text">
+                <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')">提交申请</el-button>
+              </el-col>
+            </el-form>
           </el-col>
-        </el-row>
-      </el-form-item>
-      <template v-if="statusData !== '0' && statusData !== '1' && statusData !== '-1'">
-        <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="statusData !== '0' && statusData !== '1' && statusData !== '-1' && statusData !== '2' && statusData !== '-3'">
-          <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.contract" :key="`contract-${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>
-      </template>
-      <el-form-item label="审核意见" v-if="statusData === '0' || statusData === '3'">
-        <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="statusData === '0'">
-        <el-radio-group v-model="form.status">
-          <el-radio label="1">通过</el-radio>
-          <el-radio label="-1">拒绝</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-row type="flex" justify="space-around">
-        <el-col :span="2">
-          <el-button v-if="statusData === '0'" type="primary" @click="toStatus()" :disabled="!form.status">保存审核结果</el-button>
-          <el-button v-if="statusData === '3'" type="primary" @click="toStatus('4')">确认</el-button>
         </el-col>
-      </el-row>
-    </el-form>
+      </el-col>
+    </el-row>
     <el-dialog title="意见" :visible.sync="dialog" :destroy-on-close="true">
-      <flow :id="data._id"></flow>
+      <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 },
+  components: {
+    flow,
+  },
   data: function () {
     return {
-      data: {
-        material: [],
-        medium_material: [],
-        contract: [],
-      },
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
       form: {},
+      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+      // 意见
       dialog: false,
     };
   },
-  created() {
-    if (this.id) this.search();
+  async created() {
+    await this.search();
   },
   methods: {
     ...ticket(['fetch', 'status']),
     async search() {
-      const res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `data`, res.data);
+      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();
       }
     },
+    // 查看意见
+    toFlow() {
+      this.dialog = true;
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/adminCenter/ticket', query: { status: this.dataStatus } });
+    },
     isImg(url) {
       const arr = url.split('.');
       const suffix = _.last(arr);
@@ -116,44 +116,69 @@ export default {
     toOpen(url) {
       window.open(url);
     },
-    async toStatus(status) {
-      const dup = _.cloneDeep(this.form);
-      dup.opera_id = this.user._id;
-      dup.id = this.data._id;
-      if (status) dup.status = status;
-      const res = await this.status(dup);
-      if (this.$checkRes(res, '审核成功', res.errmsg || '审核失败')) {
-        this.toBack();
+    getDate(date) {
+      if (date) {
+        let newDate = moment(date.createdAt).format('YYYY-MM-DD');
+        if (newDate) return newDate;
       }
     },
-    toBack() {
-      this.$router.push(`/adminCenter/ticket`);
-    },
-    toFlow() {
-      this.dialog = true;
-    },
   },
   computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-    statusData() {
-      return this.$route.query.status;
-    },
+    ...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>
-/deep/.el-dialog__body {
-  height: 500px;
-  overflow-y: auto;
+.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>

+ 41 - 21
src/views/adminCenter/inter/ticket/list.vue

@@ -1,6 +1,12 @@
 <template>
-  <div id="list">
-    <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit"> </data-table>
+  <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>
 
@@ -10,10 +16,8 @@ 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' },
-  },
+  name: 'index',
+  props: {},
   components: {},
   data: function () {
     return {
@@ -21,14 +25,14 @@ export default {
       total: 0,
       opera: [
         {
-          label: '审核',
+          label: '查看',
           method: 'edit',
-          display: (i) => i.status === '2',
+          // display: (i) => i.status !== '0' && i.status !== '3',
         },
         {
-          label: '上传合同',
+          label: '审核',
           method: 'edit',
-          display: (i) => i.status === '3',
+          // display: (i) => i.status === '0' || i.status === '3',
         },
       ],
       fields: [
@@ -46,33 +50,49 @@ export default {
       ],
     };
   },
-  created() {
-    this.search();
-  },
+  created() {},
   methods: {
     ...ticket(['query', 'delete']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info, status: this.status });
+      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, `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 } });
+      this.$router.push({ path: '/adminCenter/ticket/detail', query: { id: data._id, status: data.status } });
     },
   },
   computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
+    ...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></style>
+<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>

+ 47 - 53
src/views/adminCenter/inter/ticket/detail.vue

@@ -24,49 +24,49 @@
           </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>
+      <template v-if="statusData !== '0' && statusData !== '1' && statusData !== '-1'">
+        <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>
-        </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-form-item>
+        <el-form-item label="合同" v-if="statusData !== '0' && statusData !== '1' && statusData !== '-1' && statusData !== '2' && statusData !== '-3'">
+          <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.contract" :key="`contract-${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>
-        </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-form-item>
+      </template>
+      <el-form-item label="审核意见" v-if="statusData === '0' || statusData === '3'">
         <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-form-item label="审核" v-if="statusData === '0'">
         <el-radio-group v-model="form.status">
-          <el-radio label="3">通过</el-radio>
-          <el-radio label="-3">拒绝</el-radio>
+          <el-radio label="1">通过</el-radio>
+          <el-radio label="-1">拒绝</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-button v-if="statusData === '0'" type="primary" @click="toStatus()" :disabled="!form.status">保存审核结果</el-button>
+          <el-button v-if="statusData === '3'" type="primary" @click="toStatus('4')">确认</el-button>
         </el-col>
       </el-row>
     </el-form>
@@ -77,8 +77,8 @@
 </template>
 
 <script>
-import flow from '../../ticket/flow.vue';
 const _ = require('lodash');
+// import flow from './flow.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: ticket } = createNamespacedHelpers('ticket');
 export default {
@@ -101,7 +101,7 @@ export default {
     if (this.id) this.search();
   },
   methods: {
-    ...ticket(['fetch', 'status', 'update']),
+    ...ticket(['fetch', 'status']),
     async search() {
       const res = await this.fetch(this.id);
       if (this.$checkRes(res)) {
@@ -119,39 +119,28 @@ export default {
     async toStatus(status) {
       const dup = _.cloneDeep(this.form);
       dup.opera_id = this.user._id;
-      dup.id = this.id;
+      dup.id = this.data._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`);
+      this.$router.push(`/adminCenter/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}`;
     },
+    statusData() {
+      return this.$route.query.status;
+    },
     id() {
       return this.$route.query.id;
     },
@@ -162,4 +151,9 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+/deep/.el-dialog__body {
+  height: 500px;
+  overflow-y: auto;
+}
+</style>

+ 71 - 0
src/views/adminCenter/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>

src/views/adminCenter/ticket/list.vue → src/views/adminCenter/ticket备份/list.vue


src/views/adminCenter/ticket/status.vue → src/views/adminCenter/ticket备份/status.vue


+ 4 - 1
src/views/index.vue

@@ -4,7 +4,10 @@
       <el-col :span="24" class="main">
         <div class="w_1200">
           <el-col :span="24" class="one">
-            <el-col :span="24" class="top"> 环南湖科创先导区双创服务平台 </el-col>
+            <el-col :span="24" class="top">
+              环南湖科创先导区双创服务平台
+              <el-button @click="$router.push({ path: '/login' })">登录</el-button>
+            </el-col>
             <el-col :span="24" class="down">
               <el-col :span="4" class="down_1 down_one">
                 <div class="hexagon-menu clear">