guhongwei 4 lat temu
rodzic
commit
690f503efb

+ 19 - 0
src/router/index.js

@@ -159,6 +159,12 @@ const fwjg = [
     meta: { title: '高企申报-申报确认' },
     component: () => import('../views/adminCenter/declare/check.vue'),
   },
+  {
+    path: '/adminCenter/declare/cash_check',
+    name: 'admin_declare_cash_check',
+    meta: { title: '高企申报-审核兑付' },
+    component: () => import('../views/adminCenter/declare/cash_check.vue'),
+  },
   // 服务机构-研发补贴,奖励兑现
   {
     path: '/adminCenter/reward',
@@ -278,6 +284,19 @@ const qy = [
     meta: { title: '高企申报-审核结果' },
     component: () => import('../views/adminCenter/company/declare/info.vue'),
   },
+  {
+    path: '/adminCenter/company/declare/cashing',
+    name: 'company_declare_cashing',
+    meta: { title: '高企申报-兑付申请' },
+    component: () => import('../views/adminCenter/company/declare/cashing.vue'),
+  },
+  {
+    path: '/adminCenter/company/declare/cashing_info',
+    name: 'company_declare_cashing_info',
+    meta: { title: '高企申报-兑付结果' },
+    component: () => import('../views/adminCenter/company/declare/cashing_info.vue'),
+  },
+
   // 企业-研发补贴,奖励兑现
   {
     path: '/adminCenter/company/reward',

+ 0 - 4
src/store/index.js

@@ -19,10 +19,8 @@ import organization from './live/organization';
 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';
 import reward from './live/reward';
-import rewardOrder from './live/rewardOrder';
 
 Vue.use(Vuex);
 
@@ -48,9 +46,7 @@ export default new Vuex.Store({
     coupons,
     couponsApply,
     declare,
-    declareOrder,
     cashing,
     reward,
-    rewardOrder,
   },
 });

+ 4 - 1
src/store/live/cashing.js

@@ -29,11 +29,14 @@ const actions = {
     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;
   },
+  async fromFetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.cashing}/from/${payload}`);
+    return res;
+  },
 };
 export default {
   namespaced: true,

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

@@ -1,43 +0,0 @@
-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 - 43
src/store/live/rewardOrder.js

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

+ 243 - 0
src/views/adminCenter/company/declare/cashing.vue

@@ -0,0 +1,243 @@
+<template>
+  <div id="cashing">
+    <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="no">
+                  <el-input v-model="form.no" placeholder="" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="兑付单位" prop="company">
+                  <el-input v-model="form.company" placeholder="" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="申请人" prop="apply_person">
+                  <el-input v-model="form.apply_person" 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="12" class="text">
+                <el-form-item label="选择创新券">
+                  <el-select v-model="form.coupons_id" placeholder="">
+                    <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="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="file">
+                <el-col :span="24" class="file_title"> 相关附件 </el-col>
+                <el-col :span="24" class="file_info">
+                  <el-col :span="24" class="info_tit">1.创新券服务合同 </el-col>
+                  <el-col :span="24" class="info_upl">
+                    <e-upload url="/files/cysci/contract/upload" :limit="1" v-model="form.contract" type="text"></e-upload>
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="file_info">
+                  <el-col :span="24" class="info_tit">2.官方受理通知书 </el-col>
+                  <el-col :span="24" class="info_upl">
+                    <e-upload url="/files/cysci/accept/upload" :limit="1" v-model="form.accept" type="text"></e-upload>
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="file_info">
+                  <el-col :span="24" class="info_tit">3.官方缴费证明 </el-col>
+                  <el-col :span="24" class="info_upl">
+                    <e-upload url="/files/cysci/cost/upload" :limit="1" v-model="form.cost" type="text"></e-upload>
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="file_info">
+                  <el-col :span="24" class="info_tit">4.服务结果证明 </el-col>
+                  <el-col :span="24" class="info_upl">
+                    <e-upload url="/files/cysci/result/upload" :limit="1" v-model="form.result" type="text"></e-upload>
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="file_info">
+                  <el-col :span="24" class="info_tit">5.其他能够证明服务真实发生的材料 </el-col>
+                  <el-col :span="24" class="info_upl">
+                    <e-upload url="/files/cysci/result_else/upload" :limit="1" v-model="form.result_else" type="text"></e-upload>
+                  </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('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');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: organization } = createNamespacedHelpers('organization');
+const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
+const { mapActions: mapCashing } = createNamespacedHelpers('cashing');
+export default {
+  name: 'cashing',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      form: {},
+      rules: {},
+      // 创新券
+      couponsapplyList: [],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...organization({ orgFetch: 'fetch' }),
+    ...couponsApply({ couapplyQuery: 'query' }),
+    ...mapCashing(['create']),
+    async search() {
+      let res = await this.orgFetch(this.user.id);
+      if (this.$checkRes(res)) {
+        let data = {
+          no: this.searchno(),
+          declare_id: this.id,
+          user_id: res.data.id,
+          company: res.data.name,
+          apply_person: res.data.companyperson,
+          phone: res.data.phone,
+          create_time: moment().format('YYYY-MM-DD HH:mm:ss'),
+          contract: [],
+          accept: [],
+          cost: [],
+          result: [],
+          result_else: [],
+        };
+        this.$set(this, `form`, data);
+      }
+      // 查询申领创新券列表
+      res = await this.couapplyQuery({ user_id: this.user.id });
+      if (this.$checkRes(res)) {
+        this.$set(this, `couponsapplyList`, res.data);
+      }
+    },
+    onSubmit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          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/declare' });
+    },
+    // 创建订单号
+    searchno() {
+      let one = moment().format('YYYYMMDD');
+      let two = moment(one, 'YYYY-MM-DD HH:mm:ss').valueOf();
+      let thr = 'DF';
+      let data = one + two + thr;
+      return 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;
+  .one {
+    .top {
+      text-align: right;
+      margin: 0 0 15px 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%;
+    }
+    .file {
+      .file_title {
+        font-size: 16px;
+        font-weight: bold;
+        padding: 0 16px;
+        margin: 0 0 10px 0;
+      }
+      .file_info {
+        border-bottom: 1px dashed #ccc;
+        margin: 0 0 10px 0;
+        padding: 0 0 15px 0;
+        .info_tit {
+          font-size: 14px;
+          color: #666;
+          padding: 0 30px;
+          margin: 0 0 10px 0;
+        }
+        .info_upl {
+          padding: 0 30px;
+        }
+      }
+    }
+    .formBtn {
+      text-align: center;
+      padding: 15px 0;
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 259 - 0
src/views/adminCenter/company/declare/cashing_info.vue

@@ -0,0 +1,259 @@
+<template>
+  <div id="cashing_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="view" v-if="form.status == '1'">查看凭证</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="12" class="text">
+                <el-col :span="3" class="left"> 订单号</el-col>
+                <el-col :span="21" class="right">
+                  {{ form.no }}
+                </el-col>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-col :span="3" class="left"> 兑付单位</el-col>
+                <el-col :span="21" class="right">
+                  {{ form.company }}
+                </el-col>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-col :span="3" class="left"> 申请人</el-col>
+                <el-col :span="21" class="right">
+                  {{ form.apply_person }}
+                </el-col>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-col :span="3" class="left"> 联系电话</el-col>
+                <el-col :span="21" class="right">
+                  {{ form.phone }}
+                </el-col>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-col :span="3" class="left"> 创新券</el-col>
+                <el-col :span="21" class="right">
+                  {{ form.coupons_id }}
+                </el-col>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-col :span="3" class="left"> 订单金额</el-col>
+                <el-col :span="21" class="right"> {{ form.money }}元 </el-col>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-col :span="3" class="left"> 券抵扣金额</el-col>
+                <el-col :span="21" class="right"> {{ form.allowance }}元 </el-col>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-col :span="3" class="left"> 应收金额</el-col>
+                <el-col :span="21" class="right"> {{ form.total }}元 </el-col>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-col :span="3" class="left"> 最后提交时间</el-col>
+                <el-col :span="21" class="right">
+                  {{ form.create_time }}
+                </el-col>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-col :span="3" class="left"> 最后审核时间</el-col>
+                <el-col :span="21" class="right">
+                  {{ form.end_time }}
+                </el-col>
+              </el-col>
+              <el-col :span="24" class="file">
+                <el-col :span="24" class="file_title"> 相关附件 </el-col>
+                <el-col :span="24" class="text">
+                  <el-col :span="24" class="left">1.创新券服务合同</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.contract" :key="`contract-${index}`">
+                      <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
+                      <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
+                    </el-col>
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="text">
+                  <el-col :span="24" class="left">2.官方缴费证明</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.accept" :key="`accept-${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="24" class="left">3.创新券服务合同</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.cost" :key="`cost-${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="24" class="left">4.服务结果证明</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.result" :key="`result-${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="24" class="left">5.其他能够证明服务真实发生的材料</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.result_else" :key="`result_else-${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>
+              <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>
+    <el-dialog title="凭证" :visible.sync="dialog" width="43%" :before-close="handleClose">
+      <div class="dialog">
+        <el-button type="primary" size="mini" @click="download">下载凭证</el-button>
+        <div id="demo">
+          <info :form="form"></info>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import info from './parts/info.vue';
+import htmlToPdf from '@/unit/htmlToPdf.js';
+const { cashStatus } = require('@common/dict/couindex');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mapCashing } = createNamespacedHelpers('cashing');
+export default {
+  name: 'cashing_info',
+  props: {},
+  components: { info },
+  data: function () {
+    return {
+      form: {},
+      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+      statusList: cashStatus,
+      // 凭证
+      dialog: false,
+    };
+  },
+  created() {
+    if (this.id) this.search();
+  },
+  methods: {
+    ...mapCashing(['fromFetch']),
+    async search() {
+      let res = await this.fromFetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+      }
+    },
+    back() {
+      this.$router.push({ path: '/adminCenter/company/declare' });
+    },
+    isImg(url) {
+      const arr = url.split('.');
+      const suffix = _.last(arr);
+      return this.imgList.includes(suffix);
+    },
+    toOpen(url) {
+      window.open(url);
+    },
+    getStatus(i) {
+      const r = cashStatus.find((f) => f.value === i);
+      if (r) return r.label;
+    },
+    // 查看凭证
+    view() {
+      this.dialog = true;
+    },
+    handleClose() {
+      this.dialog = false;
+    },
+    download() {
+      htmlToPdf.downloadPDF(document.querySelector('#demo'), '凭证');
+    },
+  },
+  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;
+  .one {
+    .top {
+      text-align: right;
+      margin: 0 0 15px 0;
+    }
+    .down {
+      .text {
+        padding: 10px 0;
+        border-bottom: 1px dashed #333;
+        .left {
+          text-align: left;
+        }
+        .right {
+          img {
+            width: 200px;
+            height: 200px;
+            border: 1px solid #ccc;
+          }
+        }
+        .desc {
+          margin: 10px 0 0 0;
+        }
+      }
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 21 - 6
src/views/adminCenter/company/declare/index.vue

@@ -3,7 +3,7 @@
     <el-row>
       <el-col :span="24" class="main">
         <el-col :span="24" class="one">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @edit="toEdit">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @edit="toEdit" @cash="toCash" @cashview="cashview">
             <template #selfbtn>
               <el-button type="primary" size="mini" @click="toAdd">高企申报申请</el-button>
             </template>
@@ -54,9 +54,16 @@ export default {
         },
         {
           label: '我要兑付',
-          method: 'cashing',
+          method: 'cash',
           display: (item) => {
-            return item.status == '3';
+            return item.status == '3' && item.is_cashing == '0';
+          },
+        },
+        {
+          label: '查看兑付详情',
+          method: 'cashview',
+          display: (item) => {
+            return item.is_cashing == '1';
           },
         },
       ],
@@ -117,18 +124,26 @@ export default {
         this.$set(this, `mediumList`, res.data);
       }
     },
-    // 添加
+    // 高企申请
     toAdd() {
       this.$router.push({ path: '/adminCenter/company/declare/detail' });
     },
-    // 查看申请详情
+    // 查看详情
     toView({ data }) {
       this.$router.push({ path: '/adminCenter/company/declare/info', query: { id: data._id, status: data.status } });
     },
-    // 重申
+    // 高企重申
     toEdit({ data }) {
       this.$router.push({ path: '/adminCenter/company/declare/detail', query: { id: data._id, status: data.status } });
     },
+    // 高企兑付
+    toCash({ data }) {
+      this.$router.push({ path: '/adminCenter/company/declare/cashing', query: { id: data._id } });
+    },
+    // 查看兑付详情
+    cashview({ data }) {
+      this.$router.push({ path: '/adminCenter/company/declare/cashing_info', query: { id: data._id } });
+    },
   },
   computed: {
     ...mapState(['user']),

+ 122 - 0
src/views/adminCenter/company/declare/parts/info.vue

@@ -0,0 +1,122 @@
+<template>
+  <div id="info">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-col :span="24" class="top">
+            <el-col :span="24" class="title"> 科技创新券兑付凭证 </el-col>
+          </el-col>
+          <el-col :span="24" class="down">
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 订单号 </el-col>
+              <el-col :span="18" class="down_info_ri no">{{ form.no || '暂无' }} </el-col>
+            </el-col>
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 兑付单位 </el-col>
+              <el-col :span="18" class="down_info_ri">{{ form.company || '暂无' }} </el-col>
+            </el-col>
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 申请人 </el-col>
+              <el-col :span="18" class="down_info_ri">{{ form.apply_person || '暂无' }} </el-col>
+            </el-col>
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 联系电话 </el-col>
+              <el-col :span="18" class="down_info_ri">{{ form.phone || '暂无' }} </el-col>
+            </el-col>
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 创新券 </el-col>
+              <el-col :span="18" class="down_info_ri">{{ form.coupons_id || '暂无' }} </el-col>
+            </el-col>
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 订单金额 </el-col>
+              <el-col :span="18" class="down_info_ri">{{ form.money || '暂无' }} </el-col>
+            </el-col>
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 券抵扣金额 </el-col>
+              <el-col :span="18" class="down_info_ri">{{ form.allowance || '暂无' }} </el-col>
+            </el-col>
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 应收金额 </el-col>
+              <el-col :span="18" class="down_info_ri">{{ form.total || '暂无' }} </el-col>
+            </el-col>
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 最后提交时间 </el-col>
+              <el-col :span="18" class="down_info_ri">{{ form.create_time || '暂无' }} </el-col>
+            </el-col>
+            <el-col :span="12" class="down_info">
+              <el-col :span="6" class="down_info_le"> 最后审核时间 </el-col>
+              <el-col :span="18" class="down_info_ri">{{ form.end_time || '暂无' }} </el-col>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'info',
+  props: {
+    form: { type: Object },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    .top {
+      text-align: center;
+      margin: 15px 0;
+      .title {
+        font-weight: bold;
+        text-align: center;
+        color: #000000;
+      }
+    }
+    .down {
+      .down_info {
+        .down_info_le {
+          font-size: 14px;
+          text-align: center;
+          padding: 10px 0;
+          border: 1px solid #000;
+          color: #000000;
+        }
+        .down_info_ri {
+          font-size: 14px;
+          text-align: center;
+          padding: 10px 0;
+          border: 1px solid #000;
+          color: #000000;
+        }
+        .no {
+          color: #ff0000;
+          font-weight: bold;
+        }
+      }
+    }
+  }
+}
+</style>

+ 312 - 0
src/views/adminCenter/declare/cash_check.vue

@@ -0,0 +1,312 @@
+<template>
+  <div id="cash_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" :rules="rules" ref="form" label-width="100px">
+              <el-col :span="12" class="text">
+                <el-form-item label="订单号" prop="no">
+                  <el-input v-model="form.no" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="兑付单位" prop="company">
+                  <el-input v-model="form.company" placeholder="" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="申请人" prop="apply_person">
+                  <el-input v-model="form.apply_person" placeholder="" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="联系电话" prop="phone">
+                  <el-input v-model="form.phone" placeholder="" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="选择创新券">
+                  <el-select v-model="form.coupons_id" placeholder="" disabled>
+                    <el-option v-for="item in couponsapplyList" :key="item._id" :label="item.name" :value="item._id"> </el-option>
+                  </el-select>
+                </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%" disabled></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%" disabled></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">
+                  <el-input type="text" oninput="value=value.replace(/[^\d]/g,'')" v-model="form.total" clearable style="width: 96%" disabled></el-input>
+                  <span style="padding: 0 5px">元</span>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="最后提交时间" prop="create_time">
+                  <el-input v-model="form.create_time" placeholder="" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12" class="text">
+                <el-form-item label="最后审核时间" prop="end_time">
+                  <el-input v-model="form.end_time" placeholder="" disabled></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24" class="file">
+                <el-col :span="24" class="file_title"> 相关附件 </el-col>
+                <el-col :span="24" class="text">
+                  <el-col :span="24" class="left">1.创新券服务合同</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.contract" :key="`contract-${index}`">
+                      <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
+                      <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
+                    </el-col>
+                  </el-col>
+                </el-col>
+                <el-col :span="24" class="text">
+                  <el-col :span="24" class="left">2.官方缴费证明</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.accept" :key="`accept-${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="24" class="left">3.创新券服务合同</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.cost" :key="`cost-${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="24" class="left">4.服务结果证明</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.result" :key="`result-${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="24" class="left">5.其他能够证明服务真实发生的材料</el-col>
+                  <el-col :span="24" class="right">
+                    <el-col :span="4" v-for="(i, index) in form.result_else" :key="`result_else-${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>
+              <el-col :span="24" class="text">
+                <el-col :span="1" class="left"> 审核状态</el-col>
+                <el-col :span="23" 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" v-if="form.status == '0'">
+                <el-col :span="1" class="left"> 审核意见</el-col>
+                <el-col :span="23" 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" v-if="form.status == '0'">
+                <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>
+    <el-dialog title="意见" :visible.sync="dialog" :destroy-on-close="true">
+      <flow :list="recordList"></flow>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import flow from './cash_flow.vue';
+const moment = require('moment');
+const { cashStatus } = require('@common/dict/couindex');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: coupons } = createNamespacedHelpers('coupons');
+const { mapActions: mapCashing } = createNamespacedHelpers('cashing');
+export default {
+  name: 'cash_check',
+  props: {},
+  components: {
+    flow,
+  },
+  data: function () {
+    return {
+      form: {},
+      rules: {},
+      couponsapplyList: [],
+      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+      statusList: cashStatus,
+      // 意见
+      dialog: false,
+      recordList: [],
+    };
+  },
+  created() {
+    this.searchOther();
+    if (this.id) this.search();
+  },
+  methods: {
+    ...coupons({ couponsQuery: 'query' }),
+    ...mapCashing(['fromFetch', 'update']),
+    async search() {
+      let res = await this.fromFetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+        this.$set(this, `recordList`, res.data.record);
+      }
+    },
+    onSubmit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          let data = this.form;
+          data.status = '1';
+          data.end_time = this.nowDate();
+          let arr = this.couponsapplyList.find((i) => i.id == data.coupons_id);
+          if (this.$checkRes(arr)) {
+            if (arr.discount_type == '全额折扣券') {
+              data.money = Number(data.money);
+              data.allowance = Number(data.money);
+              data.total = 0;
+            } else if (arr.discount_type == '折扣券') {
+              data.money = Number(data.money);
+              data.allowance = (Number(data.money) * Number(arr.scale)) / 100;
+              data.total = Number(data.money) - data.allowance;
+            } else if (arr.discount_type == '定额券') {
+              data.money = Number(data.money);
+              data.allowance = Number(arr.allowance);
+              data.total = Number(data.money - arr.allowance);
+            }
+          }
+          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;
+        }
+      });
+    },
+    back() {
+      this.$router.push({ path: '/adminCenter/declare' });
+    },
+    // 最后审核时间
+    nowDate() {
+      return moment().format('YYYY-MM-DD HH:mm:ss');
+    },
+    // 审核列表整合
+    getRecord(data) {
+      let arr = [{ status: data.status, desc: data.desc, desc_time: moment().format('YYYY-MM-DD HH:mm:ss') }];
+      return arr;
+    },
+    isImg(url) {
+      const arr = url.split('.');
+      const suffix = _.last(arr);
+      return this.imgList.includes(suffix);
+    },
+    toOpen(url) {
+      window.open(url);
+    },
+    // 查询其他
+    async searchOther() {
+      let res = await this.couponsQuery();
+      if (this.$checkRes(res)) {
+        this.$set(this, `couponsapplyList`, res.data);
+      }
+    },
+    // 查看意见
+    toFlow() {
+      this.dialog = true;
+    },
+  },
+  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;
+  .one {
+    .top {
+      text-align: right;
+      margin: 0 0 15px 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;
+      }
+      .file {
+        padding: 0 15px;
+        .file_title {
+          font-size: 16px;
+          font-weight: bold;
+          margin: 10px 0 0 0;
+        }
+      }
+    }
+  }
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>

+ 53 - 0
src/views/adminCenter/declare/cash_flow.vue

@@ -0,0 +1,53 @@
+<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 { cashStatus } = require('@common/dict/couindex');
+const moment = require('moment');
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'flow',
+  props: { list: { type: Array } },
+  components: {},
+  data: function () {
+    return {
+      status: cashStatus,
+    };
+  },
+  created() {},
+  methods: {
+    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, 'desc_time')).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>

+ 12 - 1
src/views/adminCenter/declare/index.vue

@@ -3,7 +3,7 @@
     <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 :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @check="toCheck" @cashedit="cashedit">
             <template #options="{ item }">
               <template v-if="item.prop === 'medium_id'">
                 <el-option v-for="(i, index) in mediumList" :key="`medium-${index}`" :label="i.name" :value="i.id"></el-option>
@@ -38,6 +38,13 @@ export default {
             return item.status == '2';
           },
         },
+        {
+          label: '兑付审核/查看',
+          method: 'cashedit',
+          display: (item) => {
+            return item.is_cashing == '1';
+          },
+        },
       ],
       fields: [
         { label: '申请单位', prop: 'company', filter: 'input' },
@@ -99,6 +106,10 @@ export default {
     toCheck({ data }) {
       this.$router.push({ path: '/adminCenter/declare/check', query: { id: data._id, status: data.status } });
     },
+    // 审核兑付
+    cashedit({ data }) {
+      this.$router.push({ path: '/adminCenter/declare/cash_check', query: { id: data._id } });
+    },
   },
   computed: {
     ...mapState(['user']),