guhongwei 4 years ago
parent
commit
80919c2153
57 changed files with 2842 additions and 407 deletions
  1. 160 90
      src/router/index.js
  2. 10 8
      src/store/index.js
  3. 43 0
      src/store/live/cashing.js
  4. 43 0
      src/store/live/coupons.js
  5. 43 0
      src/store/live/couponsApply.js
  6. 43 0
      src/store/live/declare.js
  7. 43 0
      src/store/live/declareOrder.js
  8. 0 53
      src/store/live/policy.js
  9. 0 53
      src/store/live/policy_apply.js
  10. 0 53
      src/store/live/policy_order.js
  11. 0 58
      src/store/live/ticket.js
  12. 172 0
      src/views/adminCenter/cashing/coupons/detail.vue
  13. 105 0
      src/views/adminCenter/cashing/coupons/index.vue
  14. 86 0
      src/views/adminCenter/company/cashing/coupons/couponsResult.vue
  15. 188 0
      src/views/adminCenter/company/cashing/coupons/detail.vue
  16. 91 0
      src/views/adminCenter/company/cashing/coupons/index.vue
  17. 159 0
      src/views/adminCenter/company/coupons/apply.vue
  18. 90 0
      src/views/adminCenter/company/coupons/couponsResult.vue
  19. 191 0
      src/views/adminCenter/company/coupons/couponsResult_info.vue
  20. 13 44
      src/views/adminCenter/company/coupons/index.vue
  21. 3 3
      src/views/adminCenter/company/cognizance/detail.vue
  22. 10 10
      src/views/adminCenter/company/cognizance/index.vue
  23. 8 13
      src/views/adminCenter/company/cognizance/info.vue
  24. 0 0
      src/views/adminCenter/company/declare/parts/one.vue
  25. 0 0
      src/views/adminCenter/company/declare/parts/thr.vue
  26. 0 0
      src/views/adminCenter/company/declare/parts/two.vue
  27. 0 0
      src/views/adminCenter/company/备份/coupons/detail.vue
  28. 116 0
      src/views/adminCenter/company/备份/coupons/index.vue
  29. 0 0
      src/views/adminCenter/company/备份/coupons/info.vue
  30. 0 0
      src/views/adminCenter/company/备份/policy_apply/apply_info.vue
  31. 0 0
      src/views/adminCenter/company/备份/policy_apply/index.vue
  32. 0 0
      src/views/adminCenter/company/备份/policy_apply/order_apply.vue
  33. 0 0
      src/views/adminCenter/company/备份/policy_apply/order_index.vue
  34. 104 0
      src/views/adminCenter/coupons/apply.vue
  35. 210 0
      src/views/adminCenter/coupons/apply_check.vue
  36. 191 0
      src/views/adminCenter/coupons/apply_info.vue
  37. 200 0
      src/views/adminCenter/coupons/detail.vue
  38. 136 0
      src/views/adminCenter/coupons/index.vue
  39. 190 0
      src/views/adminCenter/declare/check.vue
  40. 6 6
      src/views/adminCenter/ticket/flow.vue
  41. 89 0
      src/views/adminCenter/declare/index.vue
  42. 30 11
      src/views/adminCenter/inter/ticket/detail.vue
  43. 64 0
      src/views/adminCenter/inter/declare/flow.vue
  44. 5 5
      src/views/adminCenter/inter/ticket/index.vue
  45. 0 0
      src/views/adminCenter/备份/order/list.vue
  46. 0 0
      src/views/adminCenter/备份/order/update.vue
  47. 0 0
      src/views/adminCenter/备份/policy/apply.vue
  48. 0 0
      src/views/adminCenter/备份/policy/apply_check.vue
  49. 0 0
      src/views/adminCenter/备份/policy/apply_info.vue
  50. 0 0
      src/views/adminCenter/备份/policy/create.vue
  51. 0 0
      src/views/adminCenter/备份/policy/list.vue
  52. 0 0
      src/views/adminCenter/备份/policy/备份/detail.vue
  53. 0 0
      src/views/adminCenter/备份/policy/备份/index.vue
  54. 0 0
      src/views/adminCenter/备份/ticket/detail.vue
  55. 0 0
      src/views/adminCenter/备份/ticket/flow.vue
  56. 0 0
      src/views/adminCenter/备份/ticket/index.vue
  57. 0 0
      src/views/adminCenter/备份/ticket/toGrant.vue

+ 160 - 90
src/router/index.js

@@ -117,67 +117,93 @@ const fwjg = [
   },
   // 服务机构-创新券
   {
-    path: '/adminCenter/policy/list',
-    name: 'admin_policy_list',
+    path: '/adminCenter/coupons',
+    name: 'admin_coupons_index',
     meta: { title: '创新券' },
-    component: () => import('../views/adminCenter/policy/list.vue'),
+    component: () => import('../views/adminCenter/coupons/index.vue'),
   },
   {
-    path: '/adminCenter/policy/create',
-    name: 'admin_policy_create',
+    path: '/adminCenter/coupons/detail',
+    name: 'admin_policy_detail',
     meta: { title: '创新券-信息管理' },
-    component: () => import('../views/adminCenter/policy/create.vue'),
+    component: () => import('../views/adminCenter/coupons/detail.vue'),
   },
   {
-    path: '/adminCenter/policy/apply',
-    name: 'admin_policy_apply',
+    path: '/adminCenter/coupons/apply',
+    name: 'admin_coupons_apply',
     meta: { title: '创新券-申领管理' },
-    component: () => import('../views/adminCenter/policy/apply.vue'),
+    component: () => import('../views/adminCenter/coupons/apply.vue'),
   },
   {
-    path: '/adminCenter/policy/apply_check',
-    name: 'admin_policy_apply_check',
+    path: '/adminCenter/coupons/apply_check',
+    name: 'admin_coupons_apply_check',
     meta: { title: '创新券-申领审核管理' },
-    component: () => import('../views/adminCenter/policy/apply_check.vue'),
+    component: () => import('../views/adminCenter/coupons/apply_check.vue'),
   },
   {
-    path: '/adminCenter/policy/apply_info',
-    name: 'admin_policy_apply_info',
-    meta: { title: '创新券-申领审核结果管理' },
-    component: () => import('../views/adminCenter/policy/apply_info.vue'),
-  },
-  // 服务机构-订单
-  {
-    path: '/adminCenter/order/list',
-    name: 'admin_order_list',
-    meta: { title: '服务订单' },
-    component: () => import('../views/adminCenter/order/list.vue'),
-  },
-  {
-    path: '/adminCenter/order/update',
-    name: 'admin_order_update',
-    meta: { title: '修改服务订单' },
-    component: () => import('../views/adminCenter/order/update.vue'),
+    path: '/adminCenter/coupons/apply_info',
+    name: 'admin_coupons_apply_info',
+    meta: { title: '创新券-申领审核结果查看' },
+    component: () => import('../views/adminCenter/coupons/apply_info.vue'),
   },
   // 服务机构-高企申报
   {
-    path: '/adminCenter/ticket',
-    name: 'admin_ticket',
+    path: '/adminCenter/declare',
+    name: 'admin_declare_index',
     meta: { title: '高企申报' },
-    component: () => import('../views/adminCenter/ticket/index.vue'),
+    component: () => import('../views/adminCenter/declare/index.vue'),
   },
   {
-    path: '/adminCenter/ticket/detail',
-    name: 'admin_ticket_detail',
-    meta: { title: '高企申报-信息管理' },
-    component: () => import('../views/adminCenter/ticket/detail.vue'),
+    path: '/adminCenter/declare/check',
+    name: 'admin_declare_check',
+    meta: { title: '高企申报-申报确认' },
+    component: () => import('../views/adminCenter/declare/check.vue'),
+  },
+  // 服务机构-兑付管理
+  {
+    path: '/adminCenter/cashing/coupons',
+    name: 'admin_cashing_coupons',
+    meta: { title: '创新券兑付' },
+    component: () => import('../views/adminCenter/cashing/coupons/index.vue'),
   },
   {
-    path: '/adminCenter/ticket/toGrant',
-    name: 'admin_ticket_toGrant',
-    meta: { title: '高企申报认定' },
-    component: () => import('../views/adminCenter/ticket/toGrant.vue'),
+    path: '/adminCenter/cashing/coupons/detail',
+    name: 'admin_cashing_coupons_detail',
+    meta: { title: '创新券兑付-审核管理' },
+    component: () => import('../views/adminCenter/cashing/coupons/detail.vue'),
   },
+  // 服务机构-订单
+  // {
+  //   path: '/adminCenter/order/list',
+  //   name: 'admin_order_list',
+  //   meta: { title: '服务订单' },
+  //   component: () => import('../views/adminCenter/order/list.vue'),
+  // },
+  // {
+  //   path: '/adminCenter/order/update',
+  //   name: 'admin_order_update',
+  //   meta: { title: '修改服务订单' },
+  //   component: () => import('../views/adminCenter/order/update.vue'),
+  // },
+  // 服务机构-高企申报
+  // {
+  //   path: '/adminCenter/ticket',
+  //   name: 'admin_ticket',
+  //   meta: { title: '高企申报' },
+  //   component: () => import('../views/adminCenter/ticket/index.vue'),
+  // },
+  // {
+  //   path: '/adminCenter/ticket/detail',
+  //   name: 'admin_ticket_detail',
+  //   meta: { title: '高企申报-信息管理' },
+  //   component: () => import('../views/adminCenter/ticket/detail.vue'),
+  // },
+  // {
+  //   path: '/adminCenter/ticket/toGrant',
+  //   name: 'admin_ticket_toGrant',
+  //   meta: { title: '高企申报认定' },
+  //   component: () => import('../views/adminCenter/ticket/toGrant.vue'),
+  // },
 ];
 // 企业
 const qy = [
@@ -201,63 +227,107 @@ const qy = [
     meta: { title: '信息发布-信息管理' },
     component: () => import('../views/adminCenter/company/product/detail.vue'),
   },
-  // 企业-高企申报
-  {
-    path: '/adminCenter/company/cognizance',
-    name: 'company_cognizance_index',
-    meta: { title: '高企申报' },
-    component: () => import('../views/adminCenter/company/cognizance/index.vue'),
-  },
-  {
-    path: '/adminCenter/company/cognizance/detail',
-    name: 'company_cognizance_detail',
-    meta: { title: '高企申报-信息管理' },
-    component: () => import('../views/adminCenter/company/cognizance/detail.vue'),
-  },
-  {
-    path: '/adminCenter/company/cognizance/info',
-    name: 'company_cognizance_info',
-    meta: { title: '高企申报-查看审核' },
-    component: () => import('../views/adminCenter/company/cognizance/info.vue'),
-  },
   // 企业-创新券申领
   {
     path: '/adminCenter/company/coupons',
     name: 'company_coupons_index',
-    meta: { title: '创新券申领' },
+    meta: { title: '创新券' },
     component: () => import('../views/adminCenter/company/coupons/index.vue'),
   },
   {
-    path: '/adminCenter/company/coupons/detail',
-    name: 'company_coupons_detail',
-    meta: { title: '创新券申领-信息管理' },
-    component: () => import('../views/adminCenter/company/coupons/detail.vue'),
+    path: '/adminCenter/company/coupons/apply',
+    name: 'company_coupons_apply',
+    meta: { title: '创新券申领' },
+    component: () => import('../views/adminCenter/company/coupons/apply.vue'),
   },
   {
-    path: '/adminCenter/company/policyApply/index',
-    name: 'company_policyApply_index',
+    path: '/adminCenter/company/coupons/couponsResult',
+    name: 'company_coupons_couponsResult',
     meta: { title: '创新券申领-审核结果' },
-    component: () => import('../views/adminCenter/company/policy_apply/index.vue'),
+    component: () => import('../views/adminCenter/company/coupons/couponsResult.vue'),
   },
   {
-    path: '/adminCenter/company/policyApply/info',
-    name: 'company_policyApply_info',
-    meta: { title: '创新券申领-审核信息结果' },
-    component: () => import('../views/adminCenter/company/policy_apply/apply_info.vue'),
+    path: '/adminCenter/company/coupons/couponsResult_info',
+    name: 'company_coupons_couponsResult_info',
+    meta: { title: '创新券申领-审核结果查看' },
+    component: () => import('../views/adminCenter/company/coupons/couponsResult_info.vue'),
   },
-  // 企业-服务订单
+  // 企业-高企申报
   {
-    path: '/adminCenter/company/policyApply/order',
-    name: 'company_policyApply_order',
-    meta: { title: '服务订单' },
-    component: () => import('../views/adminCenter/company/policy_apply/order_apply.vue'),
+    path: '/adminCenter/company/declare',
+    name: 'company_declare_index',
+    meta: { title: '高企申报' },
+    component: () => import('../views/adminCenter/company/declare/index.vue'),
   },
   {
-    path: '/adminCenter/company/policyApply/orderIndex',
-    name: 'company_policyApply_orderIndex',
-    meta: { title: '服务订单-审核结果' },
-    component: () => import('../views/adminCenter/company/policy_apply/order_index.vue'),
-  },
+    path: '/adminCenter/company/declare/detail',
+    name: 'company_declare_detail',
+    meta: { title: '高企申报-信息管理' },
+    component: () => import('../views/adminCenter/company/declare/detail.vue'),
+  },
+  {
+    path: '/adminCenter/company/declare/info',
+    name: 'company_declare_info',
+    meta: { title: '高企申报-审核结果' },
+    component: () => import('../views/adminCenter/company/declare/info.vue'),
+  },
+  // 企业-兑付管理
+  {
+    path: '/adminCenter/company/cashing/coupons',
+    name: 'company_cashing_coupons',
+    meta: { title: '创新券兑付' },
+    component: () => import('../views/adminCenter/company/cashing/coupons/index.vue'),
+  },
+  {
+    path: '/adminCenter/company/cashing/coupons/detail',
+    name: 'company_cashing_coupons_detail',
+    meta: { title: '创新券兑付-申请兑付' },
+    component: () => import('../views/adminCenter/company/cashing/coupons/detail.vue'),
+  },
+  {
+    path: '/adminCenter/company/cashing/couponsResult',
+    name: 'company_cashing_couponsResult',
+    meta: { title: '创新券兑付' },
+    component: () => import('../views/adminCenter/company/cashing/coupons/couponsResult.vue'),
+  },
+  // // 企业-创新券申领
+  // {
+  //   path: '/adminCenter/company/coupons',
+  //   name: 'company_coupons_index',
+  //   meta: { title: '创新券申领' },
+  //   component: () => import('../views/adminCenter/company/coupons/index.vue'),
+  // },
+  // {
+  //   path: '/adminCenter/company/coupons/detail',
+  //   name: 'company_coupons_detail',
+  //   meta: { title: '创新券申领-信息管理' },
+  //   component: () => import('../views/adminCenter/company/coupons/detail.vue'),
+  // },
+  // {
+  //   path: '/adminCenter/company/policyApply/index',
+  //   name: 'company_policyApply_index',
+  //   meta: { title: '创新券申领-审核结果' },
+  //   component: () => import('../views/adminCenter/company/policy_apply/index.vue'),
+  // },
+  // {
+  //   path: '/adminCenter/company/policyApply/info',
+  //   name: 'company_policyApply_info',
+  //   meta: { title: '创新券申领-审核信息结果' },
+  //   component: () => import('../views/adminCenter/company/policy_apply/apply_info.vue'),
+  // },
+  // // 企业-服务订单
+  // {
+  //   path: '/adminCenter/company/policyApply/order',
+  //   name: 'company_policyApply_order',
+  //   meta: { title: '服务订单' },
+  //   component: () => import('../views/adminCenter/company/policy_apply/order_apply.vue'),
+  // },
+  // {
+  //   path: '/adminCenter/company/policyApply/orderIndex',
+  //   name: 'company_policyApply_orderIndex',
+  //   meta: { title: '服务订单-审核结果' },
+  //   component: () => import('../views/adminCenter/company/policy_apply/order_index.vue'),
+  // },
 ];
 // 机构
 const jg = [
@@ -268,18 +338,18 @@ const jg = [
     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/declare',
+    name: 'inter_declare_index',
+    meta: { title: '高企申报' },
+    component: () => import('../views/adminCenter/inter/declare/index.vue'),
   },
   {
-    path: '/adminCenter/inter/ticket/detail',
-    name: 'inter_ticket_detail',
-    meta: { title: '高企申报-信息审核管理' },
-    component: () => import('../views/adminCenter/inter/ticket/detail.vue'),
+    path: '/adminCenter/inter/declare/detail',
+    name: 'inter_declare_detail',
+    meta: { title: '高企申报-信息审核' },
+    component: () => import('../views/adminCenter/inter/declare/detail.vue'),
   },
 ];
 // 专家

+ 10 - 8
src/store/index.js

@@ -16,10 +16,11 @@ import statistics from '@common/src/store/statistics';
 // 直播平台接口
 import adminLogin from './live/adminLogin';
 import organization from './live/organization';
-import policy from './live/policy';
-import policyApply from './live/policy_apply';
-import policyOrder from './live/policy_order';
-import ticket from './live/ticket';
+import coupons from './live/coupons';
+import couponsApply from './live/couponsApply';
+import declare from './live/declare';
+import declareOrder from './live/declareOrder';
+import cashing from './live/cashing';
 
 Vue.use(Vuex);
 
@@ -42,9 +43,10 @@ export default new Vuex.Store({
     // 直播平台接口
     adminLogin,
     organization,
-    policy,
-    ticket,
-    policyApply,
-    policyOrder,
+    coupons,
+    couponsApply,
+    declare,
+    declareOrder,
+    cashing,
   },
 });

+ 43 - 0
src/store/live/cashing.js

@@ -0,0 +1,43 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  cashing: `/api/live/v0/cysci/cashing`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.cashing}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.cashing}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.cashing}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.cashing}/update/${id}`, data);
+    return res;
+  },
+
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.cashing}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 43 - 0
src/store/live/coupons.js

@@ -0,0 +1,43 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  coupons: `/api/live/v0/cysci/coupons`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.coupons}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.coupons}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.coupons}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.coupons}/update/${id}`, data);
+    return res;
+  },
+
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.coupons}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 43 - 0
src/store/live/couponsApply.js

@@ -0,0 +1,43 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  couponsApply: `/api/live/v0/cysci/couponsApply`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.couponsApply}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.couponsApply}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.couponsApply}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.couponsApply}/update/${id}`, data);
+    return res;
+  },
+
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.couponsApply}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 43 - 0
src/store/live/declare.js

@@ -0,0 +1,43 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+import { registerCoordinateSystem } from 'echarts';
+Vue.use(Vuex);
+const api = {
+  declare: `/api/live/v0/cysci/declare`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.declare}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.declare}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.declare}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.declare}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.declare}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 43 - 0
src/store/live/declareOrder.js

@@ -0,0 +1,43 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  declareOrder: `/api/live/v0/cysci/declareOrder`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.declareOrder}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.declareOrder}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.declareOrder}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.declareOrder}/update/${id}`, data);
+    return res;
+  },
+
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.declareOrder}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 0 - 53
src/store/live/policy.js

@@ -1,53 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  interface: `/api/live/v0/cysci/policy`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.interface}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.interface}/update/${id}`, data);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-  // 获取行政区划
-  async xzqh({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/xzqh`, payload);
-    return res;
-  },
-  // 用code换该项
-  async getItemByCode({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}/name`, payload);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 53
src/store/live/policy_apply.js

@@ -1,53 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  interface: `/api/live/v0/cysci/policyApply`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.interface}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.interface}/update/${id}`, data);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-  // 获取行政区划
-  async xzqh({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/xzqh`, payload);
-    return res;
-  },
-  // 用code换该项
-  async getItemByCode({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}/name`, payload);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 53
src/store/live/policy_order.js

@@ -1,53 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  interface: `/api/live/v0/cysci/policyOrder`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.interface}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.interface}/update/${id}`, data);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-  // 获取行政区划
-  async xzqh({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/xzqh`, payload);
-    return res;
-  },
-  // 用code换该项
-  async getItemByCode({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}/name`, payload);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 58
src/store/live/ticket.js

@@ -1,58 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-import { registerCoordinateSystem } from 'echarts';
-Vue.use(Vuex);
-const api = {
-  interface: `/api/live/v0/cysci/ticket`,
-  // 管理员首页统计
-  statistics: `/api/m/main/statistics/ticket`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.interface}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.interface}/update/${id}`, data);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-  async status({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.interface}/status/${id}`, data);
-    return res;
-  },
-  async record({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}Record`, payload);
-    return res;
-  },
-  async staQuery({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.statistics}`, payload);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 172 - 0
src/views/adminCenter/cashing/coupons/detail.vue

@@ -0,0 +1,172 @@
+<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="no">
+                  <el-input v-model="form.cashing_no" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="创新券类型" prop="coupons_type">
+                  <el-input v-model="form.coupons_type" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="使用单位" prop="company_name">
+                  <el-input v-model="form.company_name" placeholder="请输入使用单位" 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" placeholder="请输入服务提供商" 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="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 { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: cashing } = createNamespacedHelpers('cashing');
+const { mapActions: coupons } = createNamespacedHelpers('coupons');
+export default {
+  name: 'detail',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {},
+    };
+  },
+  created() {
+    if (this.id) this.search();
+  },
+  methods: {
+    ...cashing(['fetch', 'update']),
+    ...coupons({ couponsFetch: 'fetch' }),
+    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;
+          data.status = '1';
+          let arr = await this.couponsFetch(data.coupons_id);
+          if (this.$checkRes(arr)) {
+            let couponsData = arr.data;
+            if (couponsData.discount_type == '全额折扣券') {
+              data.money = Number(data.money);
+              data.allowance = Number(data.money);
+              data.total = 0;
+            } else if (couponsData.discount_type == '折扣券') {
+              data.money = Number(data.money);
+              data.allowance = (Number(data.money) * Number(couponsData.scale)) / 100;
+              data.total = Number(data.money) - data.allowance;
+            } else if (couponsData.discount_type == '定额券') {
+              data.money = Number(data.money);
+              data.allowance = Number(couponsData.allowance);
+              data.total = Number(data.money - couponsData.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;
+        }
+      });
+    },
+    back() {
+      this.$router.push({ path: '/adminCenter/cashing/coupons' });
+    },
+  },
+  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>

+ 105 - 0
src/views/adminCenter/cashing/coupons/index.vue

@@ -0,0 +1,105 @@
+<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" @view="toView"> </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const { cashingresult } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: cashing } = createNamespacedHelpers('cashing');
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '审核',
+          method: 'edit',
+          display: (i) => i.status == '0',
+        },
+        {
+          label: '查看',
+          method: 'view',
+          display: (i) => i.status == '1' || i.status == '-1',
+        },
+      ],
+      fields: [
+        { label: '订单号', prop: 'cashing_no', filter: 'input' },
+        { label: '使用单位', prop: 'company_name', filter: 'input' },
+        { label: '券的类别', prop: 'coupons_type' },
+        { label: '使用单位', prop: 'company_name', filter: 'input' },
+        { label: '提交时间', prop: 'create_time' },
+        { label: '服务提供商', prop: 'mechanism_name' },
+        { label: '订单金额', prop: 'money' },
+        { label: '券抵扣金额', prop: 'allowance' },
+        { label: '应收金额', prop: 'total' },
+        {
+          label: '兑付审核状态',
+          prop: 'status',
+          format: (i) => {
+            const r = cashingresult.find((f) => f.value === i);
+            if (r) return r.label;
+            else return '';
+          },
+        },
+      ],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...cashing(['query']),
+    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/cashing/coupons/detail', query: { id: data._id } });
+    },
+    // 查看
+    toView({ data }) {
+      console.log(data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    type: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</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>

+ 86 - 0
src/views/adminCenter/company/cashing/coupons/couponsResult.vue

@@ -0,0 +1,86 @@
+<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"> </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const { cashingresult } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: cashing } = createNamespacedHelpers('cashing');
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [],
+      fields: [
+        { label: '订单号', prop: 'cashing_no', filter: 'input' },
+        { label: '使用单位', prop: 'company_name', filter: 'input' },
+        { label: '券的类别', prop: 'coupons_type' },
+        { label: '使用单位', prop: 'company_name', filter: 'input' },
+        { label: '提交时间', prop: 'create_time' },
+        { label: '服务提供商', prop: 'mechanism_name' },
+        { label: '订单金额', prop: 'money' },
+        { label: '券抵扣金额', prop: 'allowance' },
+        { label: '应收金额', prop: 'total' },
+        {
+          label: '兑付审核状态',
+          prop: 'status',
+          format: (i) => {
+            const r = cashingresult.find((f) => f.value === i);
+            if (r) return r.label;
+            else return '';
+          },
+        },
+      ],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...cashing(['query']),
+    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);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    type: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</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>

+ 188 - 0
src/views/adminCenter/company/cashing/coupons/detail.vue

@@ -0,0 +1,188 @@
+<template>
+  <div id="apply">
+    <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="12" class="text">
+                <el-form-item label="选择创新券">
+                  <el-select v-model="form.coupons_id" placeholder="" @change="changeCoupons">
+                    <el-option v-for="item in couponsapplyList" :key="item.coupons._id" :label="item.coupons.name" :value="item.coupons._id"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="使用单位" prop="company_name">
+                  <el-input v-model="form.company_name" placeholder="请输入使用单位"></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" placeholder="请输入服务提供商"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="订单金额" prop="money">
+                  <el-input type="text" oninput="value=value.replace(/[^\d]/g,'')" v-model="form.money" clearable style="width: 96%"></el-input>
+                  <span style="padding: 0 5px">元</span>
+                </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>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: declareOrder } = createNamespacedHelpers('declareOrder');
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
+const { mapActions: coupons } = createNamespacedHelpers('coupons');
+const { mapActions: cashing } = createNamespacedHelpers('cashing');
+export default {
+  name: 'apply',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {},
+      rules: {},
+      // 创新券申领成功
+      couponsapplyList: [],
+      // 创新券
+      couponsList: [],
+    };
+  },
+  created() {
+    if (this.id) this.searchOther();
+  },
+  methods: {
+    ...declareOrder(['fetch', 'update']),
+    ...couponsApply(['query']),
+    ...coupons({ couponsQuery: 'query' }),
+    ...cashing(['create']),
+    // 提交资料
+    onSubmit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          // 修改订单状态
+          let order = { id: this.id, is_pay: '1' };
+          let res = await this.update(order);
+          if (this.$checkRes(res)) {
+            // 提交兑付申请
+            let data = this.form;
+            let arr = await this.create(data);
+            if (this.$checkRes(arr)) {
+              this.$message({
+                message: '兑付申请提交完成,等待订单审核',
+                type: 'success',
+              });
+              this.back();
+            }
+          }
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    back() {
+      this.$router.push({ path: '/adminCenter/company/cashing/coupons' });
+    },
+    // 查询其他
+    async searchOther() {
+      // 查询使用单位和服务提供商
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        console.log(res.data);
+        let data = {
+          company_id: res.data.user_id,
+          company_name: res.data.name,
+          mechanism_id: res.data.mechanism_id,
+          mechanism_name: res.data.mechanism.name,
+        };
+        this.$set(this, `form`, data);
+      }
+      // 查询申领成功的优惠券
+      res = await this.query({ user_id: this.user.id });
+      if (this.$checkRes(res)) {
+        this.$set(this, `couponsapplyList`, res.data);
+      }
+      // 查询优惠券
+      res = await this.couponsQuery();
+      if (this.$checkRes(res)) {
+        this.$set(this, `couponsList`, res.data);
+      }
+    },
+    // 选择创新券,保存优惠券信息
+    changeCoupons(id) {
+      let arr = this.couponsList.find((i) => i.id === id);
+      if (arr) {
+        let data = _.cloneDeep(this.form);
+        data.coupons_name = arr.name;
+        data.coupons_type = arr.use_type;
+        this.$set(this, `form`, data);
+      }
+    },
+  },
+  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: 10px 0;
+      margin: 0 0 10px 0;
+    }
+    /deep/.el-form-item {
+      margin: 0;
+    }
+    .el-select {
+      width: 100%;
+    }
+    .formBtn {
+      text-align: center;
+      padding: 15px 0;
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 91 - 0
src/views/adminCenter/company/cashing/coupons/index.vue

@@ -0,0 +1,91 @@
+<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" @cash="toCash"> </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const { cashingispay } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: declareOrder } = createNamespacedHelpers('declareOrder');
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '我要兑付',
+          method: 'cash',
+          display: (i) => i.is_pay == '0',
+        },
+      ],
+      fields: [
+        { label: '订单号', prop: 'no' },
+        { label: '申报企业', prop: 'name', filter: 'input' },
+        { label: '中介机构', prop: 'mechanism.name' },
+        { label: '提交时间', prop: 'time' },
+        {
+          label: '兑付申请',
+          prop: 'is_pay',
+          format: (i) => {
+            const r = cashingispay.find((f) => f.value === i);
+            if (r) return r.label;
+            else return '';
+          },
+        },
+      ],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...declareOrder(['query']),
+    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);
+      }
+    },
+    // 我要兑付
+    toCash({ data }) {
+      this.$router.push({ path: '/adminCenter/company/cashing/coupons/detail', query: { id: data._id } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    type: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</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>

+ 159 - 0
src/views/adminCenter/company/coupons/apply.vue

@@ -0,0 +1,159 @@
+<template>
+  <div id="apply">
+    <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="12" class="text">
+                <el-form-item label="申请单位" prop="company">
+                  <el-input v-model="form.company" placeholder="请输入申请单位"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="申请人" prop="apply_personal">
+                  <el-input v-model="form.apply_personal" placeholder="请输入申请人"></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" placeholder="请输入联系电话"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24" class="text">
+                <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="text">
+                <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="text">
+                <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 :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 { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: organization } = createNamespacedHelpers('organization');
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
+export default {
+  name: 'apply',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {},
+      rules: {},
+    };
+  },
+  created() {
+    if (this.user.id) this.searchOther();
+  },
+  methods: {
+    ...organization(['fetch']),
+    ...couponsApply(['create']),
+    // 提交资料
+    onSubmit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          let data = this.form;
+          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/company/coupons' });
+    },
+    async searchOther() {
+      let res = await this.fetch(this.user.id);
+      if (this.$checkRes(res)) {
+        let data = {
+          company: res.data.name,
+          user_id: res.data.id,
+          phone: res.data.phone,
+          apply_personal: res.data.companyperson,
+          coupons_id: this.coupons_id,
+          qyfr: [],
+          yyzz: [],
+          qylr: [],
+          status: '0',
+        };
+        this.$set(this, `form`, data);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    coupons_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: 10px 0;
+      margin: 0 0 10px 0;
+    }
+    /deep/.el-form-item {
+      margin: 0;
+    }
+    .formBtn {
+      text-align: center;
+      padding: 15px 0;
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 90 - 0
src/views/adminCenter/company/coupons/couponsResult.vue

@@ -0,0 +1,90 @@
+<template>
+  <div id="couponsResult">
+    <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" @view="toView"> </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const { applyStatus } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
+export default {
+  name: 'couponsResult',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '查看',
+          method: 'view',
+        },
+      ],
+      fields: [
+        { label: '创新券名称', prop: 'coupons.name' },
+        { label: '申请单位', prop: 'company', filter: 'input' },
+        { label: '申请人', prop: 'apply_personal', filter: 'input' },
+        { label: '联系电话', prop: 'phone', filter: 'input' },
+        {
+          label: '审核状态',
+          prop: 'status',
+          format: (i) => {
+            const r = applyStatus.find((f) => f.value === i);
+            if (r) return r.label;
+            else return '';
+          },
+        },
+      ],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...couponsApply(['query']),
+    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);
+      }
+    },
+    // 查看
+    toView({ data }) {
+      this.$router.push({ path: '/adminCenter/company/coupons/couponsResult_info', query: { id: data._id } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    type: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</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>

+ 191 - 0
src/views/adminCenter/company/coupons/couponsResult_info.vue

@@ -0,0 +1,191 @@
+<template>
+  <div id="couponsResult_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-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.coupons.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 { applyStatus } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
+export default {
+  name: 'couponsResult_info',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {
+        coupons: {},
+      },
+      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+    };
+  },
+  created() {
+    if (this.id) this.search();
+  },
+  methods: {
+    ...couponsApply(['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/company/coupons/couponsResult' });
+    },
+    isImg(url) {
+      const arr = url.split('.');
+      const suffix = _.last(arr);
+      return this.imgList.includes(suffix);
+    },
+    toOpen(url) {
+      window.open(url);
+    },
+    getStatus(i) {
+      const r = applyStatus.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>

+ 13 - 44
src/views/adminCenter/company/coupons/index.vue

@@ -3,66 +3,47 @@
     <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" @apply="toView">
-            <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>
-            <template #custom="{ item, row }">
-              <template v-if="item.prop === 'name'">
-                <el-link type="primary" @click="dialogDetail(row)">{{ row[item.prop] }}</el-link>
-              </template>
-            </template>
-          </data-table>
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @apply="toApply"> </data-table>
         </el-col>
       </el-col>
     </el-row>
-    <el-dialog :title="detail.name" center :visible.sync="dialog" width="80%" :destroy-on-close="true" @close="toClose">
-      <info :form="detail" />
-    </el-dialog>
   </div>
 </template>
 
 <script>
-import info from './info.vue';
-const { policyType, policyStatus } = require('@common/dict/index');
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: policy } = createNamespacedHelpers('policy');
+const { mapActions: coupons } = createNamespacedHelpers('coupons');
 export default {
   name: 'index',
   props: {},
-  components: { info },
+  components: {},
   data: function () {
     return {
       list: [],
       total: 0,
       opera: [
         {
-          label: '申',
+          label: '申',
           method: 'apply',
         },
       ],
       fields: [
-        { label: '创新券类型', prop: 'type', filter: 'select' },
-        { label: '创新券名称', prop: 'name', filter: 'input', custom: true },
+        { label: '创新券名称', prop: 'name', filter: 'input' },
         { label: '折扣类型', prop: 'discount_type' },
-        { label: '使用服务类型', prop: 'use_type' },
+        { label: '适用服务类型', prop: 'use_type' },
+        { label: '所属分类', prop: 'classify' },
         { label: '期限', prop: 'limit_time' },
         { label: '补贴比例', prop: 'scale' },
+        { label: '面额', prop: 'allowance' },
         { label: '券总额度', prop: 'total_allowance' },
       ],
-      // 创新券类型
-      typeList: policyType,
-      detail: {},
-      dialog: false,
     };
   },
   created() {
     this.search();
   },
   methods: {
-    ...policy(['query', 'delete']),
+    ...coupons(['query', 'update']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
       info.status = '1';
       const res = await this.query({ skip, limit, ...info });
@@ -71,21 +52,9 @@ export default {
         this.$set(this, `total`, res.total);
       }
     },
-    // 申请创新券
-    toAdd() {
-      this.$router.push({ path: '/adminCenter/company/coupons/detail' });
-    },
-    // 查看创新券
-    toView({ data }) {
-      this.$router.push({ path: '/adminCenter/company/coupons/detail', query: { policy_id: data._id } });
-    },
-    dialogDetail(row) {
-      this.$set(this, 'detail', row);
-      this.dialog = true;
-    },
-    toClose() {
-      this.dialog = false;
-      this.detail = {};
+    // 申领创新券
+    toApply({ data }) {
+      this.$router.push({ path: '/adminCenter/company/coupons/apply', query: { id: data._id } });
     },
   },
   computed: {
@@ -95,7 +64,7 @@ export default {
     return { title: this.$route.meta.title };
   },
   watch: {
-    test: {
+    type: {
       deep: true,
       immediate: true,
       handler(val) {},

+ 3 - 3
src/views/adminCenter/company/cognizance/detail.vue

@@ -33,7 +33,7 @@ import one from './parts/one.vue';
 import two from './parts/two.vue';
 import thr from './parts/thr.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: ticket } = createNamespacedHelpers('ticket');
+const { mapActions: declare } = createNamespacedHelpers('declare');
 const { mapActions: organization } = createNamespacedHelpers('organization');
 export default {
   name: 'detail',
@@ -54,7 +54,7 @@ export default {
   },
   methods: {
     ...organization({ companyFetch: 'fetch' }),
-    ...ticket(['fetch', 'create', 'update']),
+    ...declare(['fetch', 'create', 'update']),
     async search() {
       if (this.id) {
         let res = await this.fetch(this.id);
@@ -168,7 +168,7 @@ export default {
     },
     // 返回
     back() {
-      this.$router.push({ path: '/adminCenter/company/cognizance' });
+      this.$router.push({ path: '/adminCenter/company/declare' });
     },
   },
   computed: {

+ 10 - 10
src/views/adminCenter/company/cognizance/index.vue

@@ -5,7 +5,7 @@
         <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>
+              <el-button type="primary" size="mini" @click="toAdd">高企申报申请</el-button>
             </template>
           </data-table>
         </el-col>
@@ -15,10 +15,10 @@
 </template>
 
 <script>
-const { ticketType } = require('@common/dict/index');
+const { declareStatus } = require('@common/dict/index');
 const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: ticket } = createNamespacedHelpers('ticket');
+const { mapActions: declare } = createNamespacedHelpers('declare');
 export default {
   name: 'index',
   props: {},
@@ -41,13 +41,13 @@ export default {
         },
       ],
       fields: [
-        { label: '申企业', prop: 'name', filter: true },
-        { label: '申时间', prop: 'meta.createdAt', format: (i) => moment(i).format('YYYY-MM-DD HH:mm:ss') },
+        { 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);
+            const r = declareStatus.find((f) => f.value === i);
             if (r) return r.label;
             return '未知状态';
           },
@@ -59,7 +59,7 @@ export default {
     await this.search();
   },
   methods: {
-    ...ticket(['query']),
+    ...declare(['query']),
     // 查询
     async search({ skip = 0, limit = 10, ...info } = {}) {
       info.user_id = this.user.id;
@@ -71,15 +71,15 @@ export default {
     },
     // 添加
     toAdd() {
-      this.$router.push({ path: '/adminCenter/company/cognizance/detail' });
+      this.$router.push({ path: '/adminCenter/company/declare/detail' });
     },
     // 查看资料
     toView({ data }) {
-      this.$router.push({ path: '/adminCenter/company/cognizance/info', query: { id: data._id, status: data.status } });
+      this.$router.push({ path: '/adminCenter/company/declare/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 } });
+      this.$router.push({ path: '/adminCenter/company/declare/detail', query: { id: data._id, status: data.status } });
     },
   },
   computed: {

+ 8 - 13
src/views/adminCenter/company/cognizance/info.vue

@@ -56,9 +56,10 @@
               <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-timeline-item v-for="(item, index) in data.record" :key="index" :timestamp="item.create_time" placement="top" type="success">
                     <el-card>
-                      <p>{{ item.desc || '暂无' }}</p>
+                      <p>审核状态:{{ getStatus(item.status) || '暂无' }}</p>
+                      <p>审核意见:{{ item.desc || '暂无' }}</p>
                     </el-card>
                   </el-timeline-item>
                 </el-timeline>
@@ -72,10 +73,10 @@
 </template>
 
 <script>
-const { ticketType } = require('@common/dict/index');
+const { declareStatus } = require('@common/dict/index');
 const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: ticket } = createNamespacedHelpers('ticket');
+const { mapActions: declare } = createNamespacedHelpers('declare');
 export default {
   name: 'info',
   props: {},
@@ -84,28 +85,22 @@ export default {
     return {
       data: {},
       imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-      // 意见列表
-      descList: [],
     };
   },
   async created() {
     if (this.id) await this.search();
   },
   methods: {
-    ...ticket(['fetch', 'record']),
+    ...declare(['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 });
-      if (this.$checkRes(res)) {
-        this.$set(this, `descList`, res.data);
-      }
     },
     // 返回
     back() {
-      this.$router.push({ path: '/adminCenter/company/cognizance' });
+      this.$router.push({ path: '/adminCenter/company/declare' });
     },
     getDate(date) {
       if (date) {
@@ -122,7 +117,7 @@ export default {
       return this.imgList.includes(suffix);
     },
     getStatus(i) {
-      const r = ticketType.find((f) => f.value === i);
+      const r = declareStatus.find((f) => f.value === i);
       console.log(r);
       if (r) return r.label;
     },

src/views/adminCenter/company/cognizance/parts/one.vue → src/views/adminCenter/company/declare/parts/one.vue


src/views/adminCenter/company/cognizance/parts/thr.vue → src/views/adminCenter/company/declare/parts/thr.vue


src/views/adminCenter/company/cognizance/parts/two.vue → src/views/adminCenter/company/declare/parts/two.vue


src/views/adminCenter/company/coupons/detail.vue → src/views/adminCenter/company/备份/coupons/detail.vue


+ 116 - 0
src/views/adminCenter/company/备份/coupons/index.vue

@@ -0,0 +1,116 @@
+<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" @apply="toView">
+            <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>
+            <template #custom="{ item, row }">
+              <template v-if="item.prop === 'name'">
+                <el-link type="primary" @click="dialogDetail(row)">{{ row[item.prop] }}</el-link>
+              </template>
+            </template>
+          </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+    <el-dialog :title="detail.name" center :visible.sync="dialog" width="80%" :destroy-on-close="true" @close="toClose">
+      <info :form="detail" />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import info from './info.vue';
+const { policyType, policyStatus } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: policy } = createNamespacedHelpers('policy');
+export default {
+  name: 'index',
+  props: {},
+  components: { info },
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '申请',
+          method: 'apply',
+        },
+      ],
+      fields: [
+        { label: '创新券类型', prop: 'type', filter: 'select' },
+        { label: '创新券名称', prop: 'name', filter: 'input', custom: true },
+        { label: '折扣类型', prop: 'discount_type' },
+        { label: '使用服务类型', prop: 'use_type' },
+        { label: '期限', prop: 'limit_time' },
+        { label: '补贴比例', prop: 'scale' },
+        { label: '券总额度', prop: 'total_allowance' },
+      ],
+      // 创新券类型
+      typeList: policyType,
+      detail: {},
+      dialog: false,
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...policy(['query', 'delete']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.status = '1';
+      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/company/coupons/detail' });
+    },
+    // 查看创新券
+    toView({ data }) {
+      this.$router.push({ path: '/adminCenter/company/coupons/detail', query: { policy_id: data._id } });
+    },
+    dialogDetail(row) {
+      this.$set(this, 'detail', row);
+      this.dialog = true;
+    },
+    toClose() {
+      this.dialog = false;
+      this.detail = {};
+    },
+  },
+  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;
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

src/views/adminCenter/company/coupons/info.vue → src/views/adminCenter/company/备份/coupons/info.vue


src/views/adminCenter/company/policy_apply/apply_info.vue → src/views/adminCenter/company/备份/policy_apply/apply_info.vue


src/views/adminCenter/company/policy_apply/index.vue → src/views/adminCenter/company/备份/policy_apply/index.vue


src/views/adminCenter/company/policy_apply/order_apply.vue → src/views/adminCenter/company/备份/policy_apply/order_apply.vue


src/views/adminCenter/company/policy_apply/order_index.vue → src/views/adminCenter/company/备份/policy_apply/order_index.vue


+ 104 - 0
src/views/adminCenter/coupons/apply.vue

@@ -0,0 +1,104 @@
+<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 { applyStatus } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
+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: 'coupons.name' },
+        { label: '申领企业', prop: 'company', filter: 'input' },
+        { label: '联系人', prop: 'apply_personal', filter: 'input' },
+        { label: '联系电话', prop: 'phone', filter: 'input' },
+        {
+          label: '审核状态',
+          prop: 'status',
+          format: (i) => {
+            const r = applyStatus.find((f) => f.value === i);
+            if (r) return r.label;
+            else return '';
+          },
+        },
+      ],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...couponsApply(['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/coupons/apply_check', query: { id: data._id } });
+    },
+    // 查看
+    toView({ data }) {
+      this.$router.push({ path: '/adminCenter/coupons/apply_info', query: { id: data._id } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    type: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</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>

+ 210 - 0
src/views/adminCenter/coupons/apply_check.vue

@@ -0,0 +1,210 @@
+<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.coupons.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 { applyStatus } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
+export default {
+  name: 'apply_check',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {
+        coupons: {},
+      },
+      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+      statusList: applyStatus,
+    };
+  },
+  created() {
+    if (this.id) this.search();
+  },
+  methods: {
+    ...couponsApply(['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/coupons/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>

+ 191 - 0
src/views/adminCenter/coupons/apply_info.vue

@@ -0,0 +1,191 @@
+<template>
+  <div id="apply_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-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.coupons.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 { applyStatus } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
+export default {
+  name: 'apply_info',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {
+        coupons: {},
+      },
+      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+    };
+  },
+  created() {
+    if (this.id) this.search();
+  },
+  methods: {
+    ...couponsApply(['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/coupons/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 = applyStatus.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>

+ 200 - 0
src/views/adminCenter/coupons/detail.vue

@@ -0,0 +1,200 @@
+<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="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 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 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 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 unitallowance">
+                <el-form-item label="单个企业/团队最大额度" prop="unit_allowance">
+                  <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 { discounttype, usetype, classify } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: coupons } = createNamespacedHelpers('coupons');
+export default {
+  name: 'detail',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {},
+      // 折扣类型
+      discounttypeList: discounttype,
+      // 适用服务类型
+      usetypeList: usetype,
+      // 所属分类
+      classifyList: classify,
+    };
+  },
+  created() {
+    if (this.id) this.search();
+  },
+  methods: {
+    ...coupons(['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/coupons' });
+    },
+  },
+  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;
+    }
+    /deep/.unitallowance .el-form-item__label {
+      line-height: 20px;
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 136 - 0
src/views/adminCenter/coupons/index.vue

@@ -0,0 +1,136 @@
+<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" @check="toCheck">
+            <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 { couponsStatus } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: coupons } = createNamespacedHelpers('coupons');
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '修改',
+          method: 'edit',
+          display: (item) => {
+            return item.status == '0' || item.status == '-1';
+          },
+        },
+        {
+          label: '上架',
+          method: 'check',
+          display: (item) => {
+            return item.status == '0' || item.status == '-1';
+          },
+        },
+        {
+          label: '下架',
+          method: 'check',
+          display: (item) => {
+            return item.status == '1';
+          },
+        },
+      ],
+      fields: [
+        { 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: (i) => {
+            const r = couponsStatus.find((f) => f.value === i);
+            if (r) return r.label;
+            else return '';
+          },
+        },
+      ],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...coupons(['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/coupons/detail' });
+    },
+    toEdit({ data }) {
+      this.$router.push({ path: '/adminCenter/policy/detail', 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']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    type: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</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>

+ 190 - 0
src/views/adminCenter/declare/check.vue

@@ -0,0 +1,190 @@
+<template>
+  <div id="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="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" @click="onSubmit('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: declare } = createNamespacedHelpers('declare');
+export default {
+  name: 'check',
+  props: {},
+  components: {
+    flow,
+  },
+  data: function () {
+    return {
+      form: {},
+      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+      // 意见
+      dialog: false,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...declare(['fetch', 'update']),
+    // 查询详情
+    async search() {
+      if (this.id) {
+        let res = await this.fetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `form`, res.data);
+        }
+      }
+    },
+    // 高企申报确认
+    async onSubmit(status) {
+      let data = this.form;
+      data.status = status;
+      const res = await this.update(data);
+      if (this.$checkRes(res, '高企申报成功', res.errmsg || '高企申报失败')) {
+        this.back();
+      }
+    },
+    // 查看意见
+    toFlow() {
+      this.dialog = true;
+    },
+    // 返回
+    back() {
+      this.$router.push({ path: '/adminCenter/declare' });
+    },
+    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>

+ 6 - 6
src/views/adminCenter/ticket/flow.vue

@@ -14,10 +14,10 @@
 </template>
 
 <script>
-const { ticketType } = require('@common/dict/index');
+const { declareapplyStatus } = require('@common/dict/index');
 const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: ticket } = createNamespacedHelpers('ticket');
+const { mapActions: declare } = createNamespacedHelpers('declare');
 export default {
   name: 'flow',
   props: { id: { type: String, required: true } },
@@ -25,18 +25,18 @@ export default {
   data: function () {
     return {
       list: [],
-      status: ticketType,
+      status: declareapplyStatus,
     };
   },
   created() {
     this.search();
   },
   methods: {
-    ...ticket(['record']),
+    ...declare(['fetch']),
     async search() {
-      const res = await this.record({ ticket_id: this.id });
+      const res = await this.fetch(this.id);
       if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
+        this.$set(this, `list`, res.data.record);
       }
     },
     getStep(data) {

+ 89 - 0
src/views/adminCenter/declare/index.vue

@@ -0,0 +1,89 @@
+<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" @check="toCheck"> </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const moment = require('moment');
+const { declareStatus } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: declare } = createNamespacedHelpers('declare');
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [
+        {
+          label: '申报确认',
+          method: 'check',
+        },
+      ],
+      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 = declareStatus.find((f) => f.value === i);
+            if (r) return r.label;
+            else return '';
+          },
+        },
+      ],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...declare(['query', 'delete']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      info.status = '1';
+      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/declare/check', query: { id: data._id, status: data.status } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    status: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</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>

+ 30 - 11
src/views/adminCenter/inter/ticket/detail.vue

@@ -56,8 +56,7 @@
                 <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 v-for="(i, index) in statusList" :key="`status-${index}`" :label="i.value">{{ i.label }}</el-radio>
                   </el-radio-group>
                 </el-col>
               </el-col>
@@ -87,8 +86,9 @@
 const _ = require('lodash');
 const moment = require('moment');
 import flow from './flow.vue';
+const { declareapplyStatus } = require('@common/dict/index');
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: ticket } = createNamespacedHelpers('ticket');
+const { mapActions: declare } = createNamespacedHelpers('declare');
 export default {
   name: 'detail',
   props: {},
@@ -99,6 +99,7 @@ export default {
     return {
       form: {},
       imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+      statusList: declareapplyStatus,
       // 意见
       dialog: false,
     };
@@ -107,7 +108,7 @@ export default {
     await this.search();
   },
   methods: {
-    ...ticket(['fetch', 'status', 'update']),
+    ...declare(['fetch', 'update']),
     async search() {
       if (this.id) {
         let res = await this.fetch(this.id);
@@ -116,12 +117,30 @@ export default {
         }
       }
     },
-    async onSubmit() {
-      let data = this.form;
-      const res = await this.status(data);
-      if (this.$checkRes(res, '审核成功', res.errmsg || '审核失败')) {
-        this.back();
-      }
+    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;
     },
     async toSave() {
       let data = this.form;
@@ -137,7 +156,7 @@ export default {
     },
     // 返回
     back() {
-      this.$router.push({ path: '/adminCenter/inter/ticket', query: { status: this.dataStatus } });
+      this.$router.push({ path: '/adminCenter/inter/declare', query: { status: this.dataStatus } });
     },
     isImg(url) {
       const arr = url.split('.');

+ 64 - 0
src/views/adminCenter/inter/declare/flow.vue

@@ -0,0 +1,64 @@
+<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 { declareapplyStatus } = require('@common/dict/index');
+const moment = require('moment');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: declare } = createNamespacedHelpers('declare');
+export default {
+  name: 'flow',
+  props: { id: { type: String, required: true } },
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      status: declareapplyStatus,
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...declare(['fetch']),
+    async search() {
+      const res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data.record);
+      }
+    },
+    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>

+ 5 - 5
src/views/adminCenter/inter/ticket/index.vue

@@ -12,9 +12,9 @@
 
 <script>
 const moment = require('moment');
-const { ticketType } = require('@common/dict/index');
+const { declareStatus } = require('@common/dict/index');
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: ticket } = createNamespacedHelpers('ticket');
+const { mapActions: declare } = createNamespacedHelpers('declare');
 export default {
   name: 'index',
   props: {},
@@ -36,7 +36,7 @@ export default {
           label: '状态',
           prop: 'status',
           format: (i) => {
-            const r = ticketType.find((f) => f.value === i);
+            const r = declareStatus.find((f) => f.value === i);
             if (r) return r.label;
             else return '';
           },
@@ -48,7 +48,7 @@ export default {
     console.log(this.user);
   },
   methods: {
-    ...ticket(['query', 'delete']),
+    ...declare(['query', 'delete']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
       info.status = this.status;
       const res = await this.query({ skip, limit, ...info });
@@ -58,7 +58,7 @@ export default {
       }
     },
     toEdit({ data }) {
-      this.$router.push({ path: '/adminCenter/inter/ticket/detail', query: { id: data._id, status: data.status } });
+      this.$router.push({ path: '/adminCenter/inter/declare/detail', query: { id: data._id, status: data.status } });
     },
   },
   computed: {

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


src/views/adminCenter/order/update.vue → src/views/adminCenter/备份/order/update.vue


src/views/adminCenter/policy/apply.vue → src/views/adminCenter/备份/policy/apply.vue


src/views/adminCenter/policy/apply_check.vue → src/views/adminCenter/备份/policy/apply_check.vue


src/views/adminCenter/policy/apply_info.vue → src/views/adminCenter/备份/policy/apply_info.vue


src/views/adminCenter/policy/create.vue → src/views/adminCenter/备份/policy/create.vue


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


src/views/adminCenter/policy/备份/detail.vue → src/views/adminCenter/备份/policy/备份/detail.vue


src/views/adminCenter/policy/备份/index.vue → src/views/adminCenter/备份/policy/备份/index.vue


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


src/views/adminCenter/inter/ticket/flow.vue → src/views/adminCenter/备份/ticket/flow.vue


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


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