guhongwei 4 年之前
父節點
當前提交
a061b75970

+ 6 - 6
src/router/index.js

@@ -335,16 +335,16 @@ const qy = [
     component: () => import('../views/adminCenter/company/cashing/coupons/couponsResult_info.vue'),
     component: () => import('../views/adminCenter/company/cashing/coupons/couponsResult_info.vue'),
   },
   },
   {
   {
-    path: '/adminCenter/company/cashing/rewardResult',
-    name: 'company_cashing_rewardResult',
+    path: '/adminCenter/company/cashing/reward/rewardResult',
+    name: 'company_cashing_reward_rewardResult',
     meta: { title: '政策服务兑付' },
     meta: { title: '政策服务兑付' },
-    component: () => import('../views/adminCenter/company/cashing/coupons/rewardResult.vue'),
+    component: () => import('../views/adminCenter/company/cashing/reward/rewardResult.vue'),
   },
   },
   {
   {
-    path: '/adminCenter/company/cashing/rewardResult_info',
-    name: 'company_cashing_rewardResult_info',
+    path: '/adminCenter/company/cashing/reward/rewardResult_info',
+    name: 'company_cashing_reward_rewardResult_info',
     meta: { title: '政策服务兑付-审核结果' },
     meta: { title: '政策服务兑付-审核结果' },
-    component: () => import('../views/adminCenter/company/cashing/coupons/rewardResult_info.vue'),
+    component: () => import('../views/adminCenter/company/cashing/reward/rewardResult_info.vue'),
   },
   },
 ];
 ];
 // 机构
 // 机构

+ 1 - 1
src/views/adminCenter/company/cashing/coupons/rewardResult.vue

@@ -61,7 +61,7 @@ export default {
       }
       }
     },
     },
     toView({ data }) {
     toView({ data }) {
-      this.$router.push({ path: '/adminCenter/company/cashing/rewardResult_info', query: { id: data._id, type: data.type } });
+      this.$router.push({ path: '/adminCenter/company/cashing/reward/rewardResult_info', query: { id: data._id, type: data.type } });
     },
     },
   },
   },
   computed: {
   computed: {

+ 1 - 1
src/views/adminCenter/company/cashing/coupons/rewardResult_info.vue

@@ -168,7 +168,7 @@ export default {
       if (r) return r.label;
       if (r) return r.label;
     },
     },
     back() {
     back() {
-      this.$router.push({ path: '/adminCenter/company/cashing/rewardResult', query: { type: this.type } });
+      this.$router.push({ path: '/adminCenter/company/cashing/reward/rewardResult', query: { type: this.type } });
     },
     },
     // 判断钱
     // 判断钱
     getMoney(data) {
     getMoney(data) {

+ 0 - 187
src/views/adminCenter/备份/order/list.vue

@@ -1,187 +0,0 @@
-<template>
-  <div id="list">
-    <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"
-            @confirm="confirm"
-            @cancel="cancel"
-            @reduct="toReduct"
-          >
-          </data-table>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const moment = require('moment');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: policyOrder } = createNamespacedHelpers('policyOrder');
-const { mapActions: policy } = createNamespacedHelpers('policy');
-export default {
-  name: 'list',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        {
-          label: '修改',
-          method: 'edit',
-          display: (item) => {
-            return item.status == '0';
-          },
-        },
-        {
-          label: '确认订单',
-          method: 'confirm',
-          display: (item) => {
-            return item.status == '0';
-          },
-        },
-        {
-          label: '取消订单',
-          method: 'cancel',
-          display: (item) => {
-            return item.status == '0';
-          },
-        },
-        {
-          label: '还原订单',
-          method: 'reduct',
-          display: (item) => {
-            return item.status == '1' || item.status == '2';
-          },
-        },
-      ],
-      fields: [
-        { label: '订单号', prop: 'no', filter: 'input' },
-        { label: '订单名称', prop: 'name', filter: 'input' },
-        { label: '服务类型', prop: 'policy_user_type' },
-        { label: '所属单位', prop: 'mechanism_person', filter: 'input' },
-        { label: '购买单位', prop: 'user_name' },
-        { label: '订单总金额', prop: 'money' },
-        { label: '创新券抵扣金额', prop: 'allowance' },
-        { label: '应收金额', prop: 'total' },
-        { label: '提交时间', prop: 'meta.updateAt', format: (i) => moment(i).format('YYYY-MM-DD HH:mm:ss') },
-        {
-          label: '信息状态',
-          prop: 'status',
-          format: (item) => {
-            return item === '0' ? '待确认' : item === '1' ? '订单已确认' : item === '2' ? '订单已取消' : '未识别';
-          },
-        },
-      ],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...policyOrder(['query', 'update']),
-    ...policy({ policyFetch: 'fetch' }),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      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/order/update', query: { id: data._id } });
-    },
-    // 确认订单
-    async confirm({ data }) {
-      data.status = '1';
-      let arr = await this.policyFetch(data.policy_id);
-      if (this.$checkRes(arr)) {
-        let policyData = arr.data;
-        if (policyData.discount_type == '全额折扣券') {
-          data.money = Number(data.money);
-          data.allowance = Number(data.money);
-          data.total = 0;
-        } else if (policyData.discount_type == '折扣券') {
-          data.money = Number(data.money);
-          data.allowance = (Number(data.money) * Number(policyData.scale)) / 100;
-          data.total = Number(data.money) - data.allowance;
-        } else if (policyData.discount_type == '定额券') {
-          data.money = Number(data.money);
-          data.allowance = Number(policyData.allowance);
-          data.total = Number(data.money - policyData.allowance);
-        }
-      }
-      let res = await this.update(data);
-      if (this.$checkRes(res)) {
-        this.$message({
-          message: '订单确认成功',
-          type: 'success',
-        });
-        this.search();
-      }
-    },
-    // 取消订单
-    async cancel({ data }) {
-      data.status = '2';
-      let res = await this.update(data);
-      if (this.$checkRes(res)) {
-        this.$message({
-          message: '订单取消成功',
-          type: 'success',
-        });
-        this.search();
-      }
-    },
-    // 还原订单
-    async toReduct({ data }) {
-      data.status = '0';
-      data.allowance = 0;
-      data.total = 0;
-      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: {
-    type: {
-      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>

+ 0 - 248
src/views/adminCenter/备份/order/update.vue

@@ -1,248 +0,0 @@
-<template>
-  <div id="update">
-    <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" ref="form" label-width="100px">
-              <el-col :span="24" class="text">
-                <el-form-item label="需求描述" prop="req_desc">
-                  <el-input v-model="form.req_desc" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="订单号" prop="no">
-                  <el-input v-model="form.no" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="订单名称" prop="name">
-                  <el-input v-model="form.name" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="服务机构" prop="mechanism_person">
-                  <el-input v-model="form.mechanism_person" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="联系人" prop="mechanism_name">
-                  <el-input v-model="form.mechanism_name" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="联系电话" prop="mechanism_mobile">
-                  <el-input v-model="form.mechanism_mobile" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="需方机构名称" prop="user_name">
-                  <el-input v-model="form.user_name" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="联系人" prop="person">
-                  <el-input v-model="form.person" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="联系电话" prop="phone">
-                  <el-input v-model="form.phone" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="电子邮箱" prop="email">
-                  <el-input v-model="form.email" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="订单总金额" prop="money">
-                  <el-input v-model="form.money"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="创新券抵扣额" prop="allowance">
-                  <el-input v-model="form.allowance" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="应收金额" prop="total">
-                  <el-input v-model="form.total" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-form-item label="备注" prop="remark">
-                  <el-input v-model="form.remark" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
-                </el-form-item>
-              </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="oneSubmit('form')">提交保存</el-button>
-                <el-button type="primary" size="mini" @click="twoSubmit('form')">确认订单</el-button>
-              </el-col>
-            </el-form>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const { mapActions: policyOrder } = createNamespacedHelpers('policyOrder');
-const { mapActions: policy } = createNamespacedHelpers('policy');
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'update',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {},
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...policyOrder(['fetch', 'update']),
-    ...policy({ policyFetch: 'fetch' }),
-    async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
-    },
-    // 提交保存
-    oneSubmit(formName) {
-      this.$refs[formName].validate(async (valid) => {
-        if (valid) {
-          let data = this.form;
-          let res = await this.update(data);
-          if (this.$checkRes(res)) {
-            this.$message({
-              message: '订单修改成功',
-              type: 'success',
-            });
-            this.back();
-          }
-        } else {
-          console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-    // 确认订单
-    twoSubmit(formName) {
-      this.$refs[formName].validate(async (valid) => {
-        if (valid) {
-          let data = this.form;
-          data.status = '1';
-          let arr = await this.policyFetch(data.policy_id);
-          if (this.$checkRes(arr)) {
-            let policyData = arr.data;
-            if (policyData.discount_type == '全额折扣券') {
-              data.money = Number(data.money);
-              data.allowance = Number(data.money);
-              data.total = 0;
-            } else if (policyData.discount_type == '折扣券') {
-              data.money = Number(data.money);
-              data.allowance = (Number(data.money) * Number(policyData.scale)) / 100;
-              data.total = Number(data.money) - data.allowance;
-            } else if (policyData.discount_type == '定额券') {
-              data.money = Number(data.money);
-              data.allowance = Number(policyData.allowance);
-              data.total = Number(data.money - policyData.allowance);
-            }
-          }
-          let res = await this.update(data);
-          if (this.$checkRes(res)) {
-            this.$message({
-              message: '订单确认成功',
-              type: 'success',
-            });
-            this.back();
-          }
-        } else {
-          console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-    // 确认订单,计算金额
-    // async searchMoney(data) {
-    //   let res = await this.policyFetch(data.policy_id);
-    //   if (this.$checkRes(res)) {
-    //     let policyData = res.data;
-    //     if (policyData.discount_type == '全额折扣券') {
-    //       data.money = Number(data.money);
-    //       data.allowance = Number(data.money);
-    //       data.total = 0;
-    //     } else if (policyData.discount_type == '折扣券') {
-    //       data.money = Number(data.money);
-    //       data.allowance = (Number(data.money) * Number(policyData.scale)) / 100;
-    //       data.total = Number(data.money) - data.allowance;
-    //     } else if (policyData.discount_type == '定额券') {
-    //       data.money = Number(data.money);
-    //       data.allowance = Number(policyData.allowance);
-    //       data.total = Number(data.money - policyData.allowance);
-    //     }
-    //   }
-    //   return data;
-    // },
-    back() {
-      this.$router.push({ path: '/adminCenter/order/list' });
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
-  },
-  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 {
-    .text {
-      border-bottom: 1px dashed #ccc;
-      padding: 15px 0;
-    }
-    /deep/.el-form-item {
-      margin: 0;
-    }
-    .el-select {
-      width: 100%;
-    }
-    .formBtn {
-      text-align: center;
-      padding: 10px 0;
-    }
-  }
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

+ 0 - 109
src/views/adminCenter/备份/policy/apply.vue

@@ -1,109 +0,0 @@
-<template>
-  <div id="list">
-    <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" @check="toCheck" @view="toView"> </data-table>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const { policyStatus } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: policyApply } = createNamespacedHelpers('policyApply');
-export default {
-  name: 'list',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        {
-          label: '审核',
-          method: 'check',
-          display: (item) => {
-            return item.status == '0';
-          },
-        },
-        {
-          label: '查看',
-          method: 'view',
-          display: (item) => {
-            return item.status == '1' || item.status == '2';
-          },
-        },
-      ],
-      fields: [
-        { label: '所属创新券', prop: 'policy.name' },
-        { label: '申领企业', prop: 'company', filter: 'input' },
-        { label: '联系人', prop: 'apply_personal' },
-        { label: '联系电话', prop: 'phone' },
-        {
-          label: '审核状态',
-          prop: 'status',
-          format: (i) => {
-            const r = policyStatus.find((f) => f.value === i);
-            if (r) return r.label;
-            else return '';
-          },
-        },
-      ],
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...policyApply(['query', 'update']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    // 审核
-    toCheck({ data }) {
-      this.$router.push({ path: '/adminCenter/policy/apply_check', query: { id: data._id } });
-    },
-    // 查看
-    toView({ data }) {
-      this.$router.push({ path: '/adminCenter/policy/apply_info', query: { id: data._id } });
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    type: {
-      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>

+ 0 - 210
src/views/adminCenter/备份/policy/apply_check.vue

@@ -1,210 +0,0 @@
-<template>
-  <div id="apply_check">
-    <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" 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.policy.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">
-                  {{ form.company }}
-                </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 申请人</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.apply_personal }}
-                </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 联系电话</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.phone }}
-                </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.qyfr" :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 form.yyzz" :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 form.qylr" :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="22" class="right">
-                  <el-radio-group v-model="form.status">
-                    <el-radio v-for="(i, index) in statusList" :key="`status-${index}`" :label="i.value">{{ i.label }}</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" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></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-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-const moment = require('moment');
-const { policyStatus } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: policyApply } = createNamespacedHelpers('policyApply');
-export default {
-  name: 'apply_check',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {
-        policy: {},
-      },
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-      statusList: policyStatus,
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...policyApply(['fetch', 'update']),
-    async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
-    },
-    onSubmit(formName) {
-      this.$refs[formName].validate(async (valid) => {
-        if (valid) {
-          let data = this.form;
-          let newRecord = this.getRecord(data);
-          data.record = data.record.concat(newRecord);
-          let res = await this.update(data);
-          if (this.$checkRes(res)) {
-            this.$message({
-              message: '创新券申领审核成功',
-              type: 'success',
-            });
-            this.back();
-          }
-        } else {
-          console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-    // 审核列表整合
-    getRecord(data) {
-      let arr = [{ status: data.status, desc: data.desc, desc_time: moment().format('YYYY-MM-DD HH:mm:ss') }];
-      return arr;
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/policy/apply' });
-    },
-    isImg(url) {
-      const arr = url.split('.');
-      const suffix = _.last(arr);
-      return this.imgList.includes(suffix);
-    },
-    toOpen(url) {
-      window.open(url);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
-  },
-  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 {
-    .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;
-      }
-    }
-    .formBtn {
-      text-align: center;
-      padding: 10px 0;
-    }
-  }
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

+ 0 - 191
src/views/adminCenter/备份/policy/apply_info.vue

@@ -1,191 +0,0 @@
-<template>
-  <div id="apply_check">
-    <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" 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.policy.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">
-                  {{ form.company }}
-                </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 申请人</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.apply_personal }}
-                </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 联系电话</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.phone }}
-                </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.qyfr" :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 form.yyzz" :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 form.qylr" :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="22" class="right">
-                  {{ getStatus(form.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>
-                    <!-- TODO: type需要判断是成功还是失败,返回对应的值 -->
-                    <el-timeline-item v-for="(item, index) in form.record" :key="index" :timestamp="item.desc_time" placement="top" type="success">
-                      <el-card>
-                        <p>审核状态:{{ getStatus(item.status) || '暂无' }}</p>
-                        <p>审核意见:{{ item.desc || '暂无' }}</p>
-                      </el-card>
-                    </el-timeline-item>
-                  </el-timeline>
-                </el-col>
-              </el-col>
-            </el-form>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-const moment = require('moment');
-const { policyStatus } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: policyApply } = createNamespacedHelpers('policyApply');
-export default {
-  name: 'apply_check',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {
-        policy: {},
-      },
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...policyApply(['fetch', 'update']),
-    async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/policy/apply' });
-    },
-    isImg(url) {
-      const arr = url.split('.');
-      const suffix = _.last(arr);
-      return this.imgList.includes(suffix);
-    },
-    toOpen(url) {
-      window.open(url);
-    },
-    getStatus(i) {
-      const r = policyStatus.find((f) => f.value === i);
-      console.log(r);
-      if (r) return r.label;
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
-  },
-  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 {
-    .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;
-      }
-    }
-    .formBtn {
-      text-align: center;
-      padding: 10px 0;
-    }
-  }
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

+ 0 - 211
src/views/adminCenter/备份/policy/create.vue

@@ -1,211 +0,0 @@
-<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" ref="form" label-width="100px">
-              <el-col :span="12" class="text">
-                <el-form-item label="创新券类型" prop="type">
-                  <el-select v-model="form.type" placeholder="">
-                    <el-option v-for="(item, index) in typeList" :key="index" :label="item" :value="item"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="创新券名称" prop="name">
-                  <el-input v-model="form.name"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="折扣类型" prop="discount_type">
-                  <el-select v-model="form.discount_type" placeholder="">
-                    <el-option v-for="(item, index) in discounttypeList" :key="index" :label="item" :value="item"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="适用服务类型" prop="use_type">
-                  <el-select v-model="form.use_type" placeholder="">
-                    <el-option v-for="(item, index) in usetypeList" :key="index" :label="item" :value="item"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="所属分类" prop="classify">
-                  <el-select v-model="form.classify" placeholder="">
-                    <el-option v-for="(item, index) in classifyList" :key="index" :label="item" :value="item"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="期限" prop="limit_time">
-                  <el-input v-model="form.limit_time" style="width: 94%"></el-input>
-                  <span style="padding: 0 5px">个月</span>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="抵扣比例" prop="scale">
-                  <!-- <el-input v-model="form.scale" style="width: 96%"></el-input> -->
-                  <el-input type="text" oninput="value=value.replace(/[^\d]/g,'')" v-model="form.scale" clearable style="width: 96%"></el-input>
-                  <span style="padding: 0 5px">%</span>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="面额" prop="allowance">
-                  <!-- <el-input v-model.number="form.allowance" type="number" style="width: 96%" :suffix-icon="false"></el-input> -->
-                  <el-input type="text" oninput="value=value.replace(/[^\d]/g,'')" v-model="form.allowance" clearable style="width: 96%"></el-input>
-                  <span style="padding: 0 5px">元</span>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="券总额度" prop="total_allowance">
-                  <!-- <el-input v-model.number="form.total_allowance" style="width: 96%"></el-input> -->
-                  <el-input type="text" oninput="value=value.replace(/[^\d]/g,'')" v-model="form.total_allowance" clearable style="width: 96%"></el-input>
-                  <span style="padding: 0 5px">元</span>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12" class="text">
-                <el-form-item label="单个企业/团队最大额度" prop="unit_allowance" label-width="200px">
-                  <!-- <el-input v-model.number="form.unit_allowance" style="width: 96%"></el-input> -->
-                  <el-input type="text" oninput="value=value.replace(/[^\d]/g,'')" v-model="form.unit_allowance" clearable style="width: 96%"></el-input>
-                  <span style="padding: 0 5px">元</span>
-                </el-form-item>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-form-item label="描述" prop="desc">
-                  <el-input v-model="form.desc" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
-                </el-form-item>
-              </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-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-const { policyType, discounttype, usetype, classify } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: policy } = createNamespacedHelpers('policy');
-export default {
-  name: 'detail',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {},
-      // 创新券类型
-      typeList: policyType,
-      // 折扣类型
-      discounttypeList: discounttype,
-      // 适用服务类型
-      usetypeList: usetype,
-      // 所属分类
-      classifyList: classify,
-    };
-  },
-  created() {
-    console.log(this.user);
-    if (this.id) this.search();
-  },
-  methods: {
-    ...policy(['fetch', 'create', 'update']),
-    async search() {
-      const res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
-    },
-    onSubmit(formName) {
-      this.$refs[formName].validate(async (valid) => {
-        if (valid) {
-          let data = this.form;
-          data.user_id = this.user.id;
-          if (this.id) {
-            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;
-        }
-      });
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/policy/list' });
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
-  },
-  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 {
-    .text {
-      border-bottom: 1px dashed #ccc;
-      padding: 15px 0;
-    }
-    /deep/.el-form-item {
-      margin: 0;
-    }
-    .el-select {
-      width: 100%;
-    }
-    .formBtn {
-      text-align: center;
-      padding: 10px 0;
-    }
-  }
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

+ 0 - 144
src/views/adminCenter/备份/policy/list.vue

@@ -1,144 +0,0 @@
-<template>
-  <div id="list">
-    <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" @check="toCheck">
-            <template #selfbtn>
-              <el-button type="primary" size="mini" @click="toAdd">添加创新券</el-button>
-            </template>
-            <template #options="{ item }">
-              <template v-if="item.prop === 'type'">
-                <el-option v-for="(i, index) in typeList" :key="`type-${index}`" :label="i" :value="i"></el-option>
-              </template>
-            </template>
-          </data-table>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const { policyType } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: policy } = createNamespacedHelpers('policy');
-export default {
-  name: 'list',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        {
-          label: '修改',
-          method: 'edit',
-        },
-        {
-          label: '上架',
-          method: 'check',
-          display: (item) => {
-            return item.status == '0' || item.status == '-1';
-          },
-        },
-        {
-          label: '下架',
-          method: 'check',
-          display: (item) => {
-            return item.status == '1';
-          },
-        },
-      ],
-      fields: [
-        { label: '创新券类型', prop: 'type', filter: 'select' },
-        { label: '创新券名称', prop: 'name', filter: 'input' },
-        { label: '折扣类型', prop: 'discount_type' },
-        { label: '适用服务类型', prop: 'use_type' },
-        { label: '所属分类', prop: 'classify' },
-        { label: '期限', prop: 'limit_time' },
-        { label: '补贴比例', prop: 'scale' },
-        { label: '面额', prop: 'allowance' },
-        { label: '券总额度', prop: 'total_allowance' },
-        {
-          label: '信息状态',
-          prop: 'status',
-          format: (item) => {
-            return item === '0' ? '待上架' : item === '1' ? '上架' : '下架';
-          },
-        },
-      ],
-      // 创新券类型
-      typeList: policyType,
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...policy(['query', 'update']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const 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/policy/create' });
-    },
-    toEdit({ data }) {
-      this.$router.push({ path: '/adminCenter/policy/create', query: { id: data._id } });
-    },
-    // 上架/下架
-    async toCheck({ data }) {
-      data.status = this.getStatus(data.status);
-      let res = await this.update(data);
-      if (this.$checkRes(res)) {
-        this.$message({
-          message: `创新券${data.status == '0' ? '待上架' : data.status == '1' ? '上架' : data.status == '-1' ? '下架' : '未识别'}成功`,
-          type: 'success',
-        });
-        this.search();
-      }
-    },
-    // 过滤状态
-    getStatus(data) {
-      if (data == '0') return '1';
-      else if (data == '1') return '-1';
-      else if (data == '-1') return '1';
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    type: {
-      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>

+ 0 - 197
src/views/adminCenter/备份/policy/备份/detail.vue

@@ -1,197 +0,0 @@
-<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" 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.company }}
-                </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 申请人</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.apply_personal }}
-                </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 申请类型</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.type }}
-                </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.qyfr" :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 form.yyzz" :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 form.qylr" :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="22" class="right">
-                  <el-radio-group v-model="form.status">
-                    <el-radio v-for="(i, index) in statusList" :key="`status-${index}`" :label="i.value">{{ i.label }}</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" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></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-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-const { policyStatus } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: policy } = createNamespacedHelpers('policy');
-export default {
-  name: 'detail',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {},
-      statusList: policyStatus,
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...policy(['fetch', 'create', 'update']),
-    async search() {
-      const res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
-    },
-    onSubmit(formName) {
-      this.$refs[formName].validate(async (valid) => {
-        if (valid) {
-          let data = this.form;
-          let res = await this.update(data);
-          if (this.$checkRes(res)) {
-            this.$message({
-              message: '政策服务审核成功',
-              type: 'success',
-            });
-            this.back();
-          }
-        } else {
-          console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-    isImg(url) {
-      const arr = url.split('.');
-      const suffix = _.last(arr);
-      return this.imgList.includes(suffix);
-    },
-    toOpen(url) {
-      window.open(url);
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/policy', query: { type: this.type } });
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  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 {
-    .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;
-      }
-    }
-    .formBtn {
-      text-align: center;
-      padding: 10px 0;
-    }
-  }
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

+ 0 - 103
src/views/adminCenter/备份/policy/备份/index.vue

@@ -1,103 +0,0 @@
-<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">
-            <template #options="{ item }">
-              <template v-if="item.prop === 'type'">
-                <el-option v-for="(i, index) in typeList" :key="`type-${index}`" :label="i" :value="i"></el-option>
-              </template>
-            </template>
-          </data-table>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const { policyType, policyStatus } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: policy } = createNamespacedHelpers('policy');
-export default {
-  name: 'index',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        {
-          label: '审核/查看',
-          method: 'edit',
-        },
-      ],
-      fields: [
-        { label: '申请单位', prop: 'company', filter: 'input' },
-        { label: '申请类型', prop: 'type' },
-        { label: '申请人', prop: 'apply_personal' },
-        { label: '联系电话', prop: 'phone' },
-        {
-          label: '审核状态',
-          prop: 'status',
-          format: (i) => {
-            const r = policyStatus.find((f) => f.value === i);
-            if (r) return r.label;
-            else return '';
-          },
-        },
-        { label: '建议', prop: 'desc', showTip: true },
-      ],
-      typeList: policyType,
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...policy(['query', 'delete']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      info.type = this.type;
-      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/policy/detail', query: { id: data._id, type: this.type } });
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    type: {
-      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>

+ 0 - 199
src/views/adminCenter/备份/ticket/detail.vue

@@ -1,199 +0,0 @@
-<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" v-if="dataStatus == '1' || dataStatus == '2'">
-                <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="formBtn">
-                <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 === '1'" @click="toStatus('2')">高企申报确认</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']),
-    // 查询详情
-    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 toStatus(status) {
-      let data = this.form;
-      data.status = status;
-      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);
-      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;
-      }
-    },
-  },
-  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>

+ 0 - 64
src/views/adminCenter/备份/ticket/flow.vue

@@ -1,64 +0,0 @@
-<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 { ticketType } = require('@common/dict/index');
-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: ticketType,
-    };
-  },
-  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>

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

@@ -1,96 +0,0 @@
-<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" @grant="toGrant"> </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 != '5',
-        },
-      ],
-      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/ticket/detail', query: { id: data._id, status: data.status } });
-    },
-    toGrant({ data }) {
-      this.$router.push({ path: '/adminCenter/ticket/toGrant', 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>

+ 0 - 179
src/views/adminCenter/备份/ticket/toGrant.vue

@@ -1,179 +0,0 @@
-<template>
-  <div id="toGrant">
-    <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">
-              <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">
-                    <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="formBtn">
-                  <el-button type="danger" size="mini" @click="back">取消保存</el-button>
-                  <el-button type="primary" size="mini" @click="onSubmit('5')">提交保存</el-button>
-                </el-col>
-              </el-form>
-            </el-col>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-const moment = require('moment');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: ticket } = createNamespacedHelpers('ticket');
-export default {
-  name: 'toGrant',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {},
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-    };
-  },
-  async created() {
-    await this.search();
-  },
-  methods: {
-    ...ticket(['fetch', 'status']),
-    // 查询详情
-    async search() {
-      if (this.id) {
-        let res = await this.fetch(this.id);
-        if (this.$checkRes(res)) {
-          this.$set(this, `form`, res.data);
-        }
-      }
-    },
-    // 审核
-    async onSubmit(status) {
-      let data = this.form;
-      data.status = status;
-      const res = await this.status(data);
-      if (this.$checkRes(res, '创新券发放成功', res.errmsg || '创新券发放失败')) {
-        this.back();
-      }
-    },
-    // 返回
-    back() {
-      this.$router.push({ path: '/adminCenter/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;
-      }
-    },
-  },
-  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>