guhongwei 4 年之前
父節點
當前提交
020c461eda

+ 11 - 81
src/router/index.js

@@ -178,45 +178,6 @@ const fwjg = [
     meta: { title: '政策服务-审核管理' },
     component: () => import('../views/adminCenter/reward/detail.vue'),
   },
-  // 服务机构-兑付管理
-  // 创新券
-  {
-    path: '/adminCenter/cashing/coupons',
-    name: 'admin_cashing_coupons',
-    meta: { title: '创新券兑付' },
-    component: () => import('../views/adminCenter/cashing/coupons/index.vue'),
-  },
-  {
-    path: '/adminCenter/cashing/coupons/detail',
-    name: 'admin_cashing_coupons_detail',
-    meta: { title: '创新券兑付-审核管理' },
-    component: () => import('../views/adminCenter/cashing/coupons/detail.vue'),
-  },
-  {
-    path: '/adminCenter/cashing/coupons/result',
-    name: 'admin_cashing_coupons_result',
-    meta: { title: '创新券兑付-审核结果查看' },
-    component: () => import('../views/adminCenter/cashing/coupons/result.vue'),
-  },
-  // 研发补贴,奖励兑现
-  {
-    path: '/adminCenter/cashing/reward',
-    name: 'admin_cashing_reward',
-    meta: { title: '政策服务兑付' },
-    component: () => import('../views/adminCenter/cashing/reward/index.vue'),
-  },
-  {
-    path: '/adminCenter/cashing/reward/detail',
-    name: 'admin_cashing_reward_detail',
-    meta: { title: '政策服务兑付-审核管理' },
-    component: () => import('../views/adminCenter/cashing/reward/detail.vue'),
-  },
-  {
-    path: '/adminCenter/cashing/reward/result',
-    name: 'admin_cashing_reward_result',
-    meta: { title: '政策服务兑付-审核结果查看' },
-    component: () => import('../views/adminCenter/cashing/reward/result.vue'),
-  },
 ];
 // 企业
 const qy = [
@@ -311,53 +272,22 @@ const qy = [
     component: () => import('../views/adminCenter/company/reward/detail.vue'),
   },
   {
-    path: '/adminCenter/company/reward/result',
-    name: 'company_reward_result',
+    path: '/adminCenter/company/reward/info',
+    name: 'company_reward_info',
     meta: { title: '政策服务-审核结果' },
-    component: () => import('../views/adminCenter/company/reward/result.vue'),
-  },
-  {
-    path: '/adminCenter/company/reward/order',
-    name: 'company_reward_order',
-    meta: { title: '政策服务-我要兑付' },
-    component: () => import('../views/adminCenter/company/reward/order.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/cashing/couponsResult_info',
-    name: 'company_cashing_couponsResult_info',
-    meta: { title: '创新券兑付-审核结果' },
-    component: () => import('../views/adminCenter/company/cashing/coupons/couponsResult_info.vue'),
+    component: () => import('../views/adminCenter/company/reward/info.vue'),
   },
   {
-    path: '/adminCenter/company/cashing/reward/rewardResult',
-    name: 'company_cashing_reward_rewardResult',
-    meta: { title: '政策服务兑付' },
-    component: () => import('../views/adminCenter/company/cashing/reward/rewardResult.vue'),
+    path: '/adminCenter/company/reward/cashing',
+    name: 'company_reward_cashing',
+    meta: { title: '政策服务-兑付申请' },
+    component: () => import('../views/adminCenter/company/reward/cashing.vue'),
   },
   {
-    path: '/adminCenter/company/cashing/reward/rewardResult_info',
-    name: 'company_cashing_reward_rewardResult_info',
-    meta: { title: '政策服务兑付-审核结果' },
-    component: () => import('../views/adminCenter/company/cashing/reward/rewardResult_info.vue'),
+    path: '/adminCenter/company/reward/cashing_info',
+    name: 'company_reward_cashing_info',
+    meta: { title: '政策服务-兑付结果' },
+    component: () => import('../views/adminCenter/company/reward/cashing_info.vue'),
   },
 ];
 // 机构

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

@@ -1,329 +0,0 @@
-<template>
-  <div id="detail">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="one">
-          <el-col :span="24" class="top">
-            <el-button type="primary" size="mini" @click="back">返回</el-button>
-          </el-col>
-          <el-col :span="24" class="down">
-            <el-form :model="form" ref="form" label-width="100px">
-              <el-col :span="12" class="text">
-                <el-form-item label="订单号" prop="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="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">
-                    <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="file_info">
-                  <el-col :span="24" class="info_tit">2.官方受理通知书 </el-col>
-                  <el-col :span="24" class="info_upl">
-                    <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="file_info">
-                  <el-col :span="24" class="info_tit">3.官方缴费证明 </el-col>
-                  <el-col :span="24" class="info_upl">
-                    <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="file_info">
-                  <el-col :span="24" class="info_tit">4.服务结果证明 </el-col>
-                  <el-col :span="24" class="info_upl">
-                    <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="file_info">
-                  <el-col :span="24" class="info_tit">5.其他能够证明服务真实发生的材料 </el-col>
-                  <el-col :span="24" class="info_upl">
-                    <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="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">
-                <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">
-                <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 moment = require('moment');
-const { cashingresult } = require('@common/dict/index');
-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: {},
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-      statusList: cashingresult,
-    };
-  },
-  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';
-          data.end_time = this.nowDate();
-          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 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;
-    },
-    // 最后审核时间
-    nowDate() {
-      return moment().format('YYYY-MM-DD HH:mm:ss');
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/cashing/coupons' });
-    },
-    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;
-        color: #666;
-      }
-      .right {
-        padding: 0 10px;
-        img {
-          width: 200px;
-          height: 200px;
-          border: 1px solid #ccc;
-        }
-      }
-      .desc {
-        margin: 10px 0 0 0;
-      }
-    }
-    /deep/.el-form-item {
-      margin: 0;
-    }
-    .el-select {
-      width: 100%;
-    }
-    .formBtn {
-      text-align: center;
-      padding: 10px 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>

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

@@ -1,107 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="one">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit" @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: 'end_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 }) {
-      this.$router.push({ path: '/adminCenter/cashing/coupons/result', 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>

+ 0 - 255
src/views/adminCenter/cashing/reward/detail.vue

@@ -1,255 +0,0 @@
-<template>
-  <div id="detail">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="one">
-          <el-col :span="24" class="top">
-            <el-button type="primary" size="mini" @click="back">返回</el-button>
-          </el-col>
-          <el-col :span="24" class="down">
-            <el-form :model="form" ref="form" label-width="100px">
-              <el-col :span="12" class="text">
-                <el-form-item label="订单号" prop="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="type">
-                  <el-input v-model="form.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="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="total">
-                  <el-input v-model="form.total"></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">
-                <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">
-                <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 moment = require('moment');
-const { cashingresult } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: rewardOrder } = createNamespacedHelpers('rewardOrder');
-export default {
-  name: 'detail',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {},
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-      statusList: cashingresult,
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...rewardOrder(['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;
-          data.status = '1';
-          data.end_time = this.nowDate();
-          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;
-    },
-    // 最后审核时间
-    nowDate() {
-      return moment().format('YYYY-MM-DD HH:mm:ss');
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/cashing/reward', query: { type: this.type } });
-    },
-    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;
-    },
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    test: {
-      deep: true,
-      immediate: true,
-      handler(val) {},
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.main {
-  border-radius: 10px;
-  box-shadow: 0 0 5px #cccccc;
-  padding: 20px;
-  .top {
-    text-align: right;
-    margin: 0 0 10px 0;
-  }
-  .down {
-    .text {
-      padding: 10px 0;
-      border-bottom: 1px dashed #333;
-      .left {
-        text-align: left;
-        color: #666;
-      }
-      .right {
-        padding: 0 10px;
-        img {
-          width: 200px;
-          height: 200px;
-          border: 1px solid #ccc;
-        }
-      }
-      .desc {
-        margin: 10px 0 0 0;
-      }
-    }
-    /deep/.el-form-item {
-      margin: 0;
-    }
-    .el-select {
-      width: 100%;
-    }
-    .formBtn {
-      text-align: center;
-      padding: 10px 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>

+ 0 - 107
src/views/adminCenter/cashing/reward/index.vue

@@ -1,107 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="one">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @edit="toEdit" @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: rewardOrder } = createNamespacedHelpers('rewardOrder');
-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: 'no', filter: 'input' },
-        { label: '兑付类型', prop: 'type' },
-        { label: '使用企业', prop: 'company_name' },
-        { label: '最后提交时间', prop: 'create_time' },
-        { label: '最后审核时间', prop: 'end_time' },
-        { label: '订单金额', prop: 'money' },
-        { label: '应收金额', prop: 'total' },
-        {
-          label: '兑付审核状态',
-          prop: 'status',
-          format: (i) => {
-            const r = cashingresult.find((f) => f.value === i);
-            if (r) return r.label;
-            else return '';
-          },
-        },
-      ],
-    };
-  },
-  created() {},
-  methods: {
-    ...rewardOrder(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      info.type = this.type;
-      const res = await this.query({ skip, limit, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-    // 审核
-    toEdit({ data }) {
-      this.$router.push({ path: '/adminCenter/cashing/reward/detail', query: { id: data._id, type: data.type } });
-    },
-    // 查看
-    toView({ data }) {
-      this.$router.push({ path: '/adminCenter/cashing/reward/result', query: { id: data._id, type: data.type } });
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    type: {
-      deep: true,
-      immediate: true,
-      handler(val) {
-        this.search();
-      },
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.main {
-  border-radius: 10px;
-  box-shadow: 0 0 5px #cccccc;
-  padding: 20px;
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

+ 0 - 235
src/views/adminCenter/cashing/reward/result.vue

@@ -1,235 +0,0 @@
-<template>
-  <div id="result">
-    <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.no || '暂无' }}
-                </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 兑付类型</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.type || '暂无' }}
-                </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 使用单位</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.company_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.create_time || '暂无' }}
-                </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.end_time || '暂无' }}
-                </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 订单金额</el-col>
-                <el-col :span="22" class="right"> {{ getMoney(form.money) }}元 </el-col>
-              </el-col>
-              <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 应收金额</el-col>
-                <el-col :span="22" class="right"> {{ getMoney(form.total) }}元 </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>
-                    <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 { cashingresult } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: rewardOrder } = createNamespacedHelpers('rewardOrder');
-export default {
-  name: 'result',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {},
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...rewardOrder(['fetch']),
-    async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
-    },
-    getStatus(i) {
-      const r = cashingresult.find((f) => f.value === i);
-      if (r) return r.label;
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/cashing/reward', query: { type: this.type } });
-    },
-    // 判断钱
-    getMoney(data) {
-      if (data == undefined) return '暂无';
-      else return data;
-    },
-    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;
-    },
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    test: {
-      deep: true,
-      immediate: true,
-      handler(val) {},
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.main {
-  border-radius: 10px;
-  box-shadow: 0 0 5px #cccccc;
-  padding: 20px;
-  .one {
-    .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;
-        }
-      }
-      .file {
-        .file_title {
-          font-size: 16px;
-          font-weight: bold;
-          margin: 10px 0 0 0;
-        }
-      }
-    }
-  }
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

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

@@ -1,138 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="one">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView" @vouc="toVouc"> </data-table>
-        </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 { cashingresult } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: cashing } = createNamespacedHelpers('cashing');
-export default {
-  name: 'index',
-  props: {},
-  components: {
-    info,
-  },
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        {
-          label: '查看结果',
-          method: 'view',
-          display: (i) => i.status == '1' || i.status == '-1',
-        },
-        {
-          label: '查看凭证',
-          method: 'vouc',
-          display: (i) => i.status == '1',
-        },
-      ],
-      fields: [
-        { label: '订单号', prop: 'cashing_no', 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 '';
-          },
-        },
-      ],
-      dialog: false,
-      form: {},
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...cashing(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      info.company_id = this.user.id;
-      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/cashing/couponsResult_info', query: { id: data._id } });
-    },
-    // 查看凭证
-    toVouc({ data }) {
-      this.$set(this, `form`, data);
-      this.dialog = true;
-    },
-    handleClose() {
-      this.dialog = false;
-    },
-    download() {
-      htmlToPdf.downloadPDF(document.querySelector('#demo'), '凭证');
-    },
-  },
-  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;
-}
-.dialog {
-  #demo {
-    width: 100%;
-    height: 600px;
-    // border: 1px solid #ccc;
-  }
-  .el-button {
-    margin: 0 0 10px 0;
-  }
-}
-/deep/.el-dialog__body {
-  padding: 20px;
-}
-</style>

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

@@ -1,256 +0,0 @@
-<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-col :span="24" class="down_left">
-              <el-col :span="24" class="down_left_info">
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 订单号</el-col>
-                  <el-col :span="22" class="down_left_info_textri">
-                    {{ form.cashing_no || '暂无' }}
-                  </el-col>
-                </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 券的类别</el-col>
-                  <el-col :span="22" class="down_left_info_textri">
-                    {{ form.coupons_type || '暂无' }}
-                  </el-col>
-                </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 使用单位</el-col>
-                  <el-col :span="22" class="down_left_info_textri">
-                    {{ form.company_name || '暂无' }}
-                  </el-col>
-                </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 最后提交时间</el-col>
-                  <el-col :span="22" class="down_left_info_textri">
-                    {{ form.create_time || '暂无' }}
-                  </el-col>
-                </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 最后审核时间</el-col>
-                  <el-col :span="22" class="down_left_info_textri">
-                    {{ form.end_time || '暂无' }}
-                  </el-col>
-                </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 服务提供商</el-col>
-                  <el-col :span="22" class="down_left_info_textri">
-                    {{ form.mechanism_name || '暂无' }}
-                  </el-col>
-                </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 订单金额</el-col>
-                  <el-col :span="22" class="down_left_info_textri"> {{ getMoney(form.money) }}元 </el-col>
-                </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 券抵扣金额</el-col>
-                  <el-col :span="22" class="down_left_info_textri"> {{ getMoney(form.allowance) }}元 </el-col>
-                </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 应收金额</el-col>
-                  <el-col :span="22" class="down_left_info_textri"> {{ getMoney(form.total) }}元 </el-col>
-                </el-col>
-                <el-col :span="24" class="file_title"> 相关附件 </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="24" class="down_left_info_textle">1.创新券服务合同</el-col>
-                  <el-col :span="24" class="down_left_info_textri">
-                    <el-col :span="4" v-for="(i, index) in form.contract" :key="`contract-${index}`">
-                      <el-image v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)"></el-image>
-                      <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="down_left_info_text">
-                  <el-col :span="24" class="down_left_info_textle">2.官方缴费证明</el-col>
-                  <el-col :span="24" class="down_left_info_textri">
-                    <el-col :span="4" v-for="(i, index) in form.accept" :key="`accept-${index}`">
-                      <el-image v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)"></el-image>
-                      <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="down_left_info_text">
-                  <el-col :span="24" class="down_left_info_textle">3.创新券服务合同</el-col>
-                  <el-col :span="24" class="down_left_info_textri">
-                    <el-col :span="4" v-for="(i, index) in form.cost" :key="`cost-${index}`">
-                      <el-image v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)"></el-image>
-                      <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="down_left_info_text">
-                  <el-col :span="24" class="down_left_info_textle">4.服务结果证明</el-col>
-                  <el-col :span="24" class="down_left_info_textri">
-                    <el-col :span="4" v-for="(i, index) in form.result" :key="`result-${index}`">
-                      <el-image v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)"></el-image>
-                      <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="down_left_info_text">
-                  <el-col :span="24" class="down_left_info_textle">5.其他能够证明服务真实发生的材料</el-col>
-                  <el-col :span="24" class="down_left_info_textri">
-                    <el-col :span="4" v-for="(i, index) in form.result_else" :key="`result_else-${index}`">
-                      <el-image v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)"></el-image>
-                      <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="down_left_info_text">
-                  <el-col :span="2" class="down_left_info_textle"> 审核状态:</el-col>
-                  <el-col :span="22" class="down_left_info_textri">
-                    {{ getStatus(form.status) }}
-                  </el-col>
-                </el-col>
-                <el-col :span="24" class="down_left_info_text">
-                  <el-col :span="24" class="down_left_info_textle"> 审核意见:</el-col>
-                  <el-col :span="24" class="down_left_info_textri desc">
-                    <el-timeline>
-                      <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-col>
-            </el-col>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-const moment = require('moment');
-const { cashingresult } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: cashing } = createNamespacedHelpers('cashing');
-export default {
-  name: 'couponsResult_info',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {},
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...cashing(['fetch']),
-    async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
-    },
-    getStatus(i) {
-      const r = cashingresult.find((f) => f.value === i);
-      if (r) return r.label;
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/company/cashing/couponsResult' });
-    },
-    // 判断钱
-    getMoney(data) {
-      if (data == undefined) return '未计算';
-      else return data;
-    },
-    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;
-  .one {
-    .top {
-      text-align: right;
-      margin: 0 0 10px 0;
-    }
-    .down {
-      .down_left {
-        border: 1px solid #000;
-        padding: 10px;
-        border-radius: 5px;
-        margin: 0 15px 0 0;
-        .down_left_tit {
-          text-align: center;
-          font-size: 16px;
-          font-weight: bold;
-          border-bottom: 1px solid #409eff;
-          padding: 10px 0;
-        }
-        .down_left_info {
-          .down_left_info_text {
-            padding: 10px 0;
-            border-bottom: 1px dashed #333;
-            .down_left_info_textle {
-              text-align: left;
-            }
-            .down_left_info_textri {
-              img {
-                width: 200px;
-                height: 200px;
-                border: 1px solid #ccc;
-              }
-            }
-            .desc {
-              margin: 10px 0 0 0;
-            }
-          }
-
-          .file_title {
-            font-size: 16px;
-            font-weight: bold;
-            margin: 10px 0 0 0;
-          }
-        }
-      }
-    }
-  }
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

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

@@ -1,92 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24" class="main">
-        <el-col :span="24" class="one">
-          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @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 } = {}) {
-      info.user_id = this.user.id;
-      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>

+ 0 - 110
src/views/adminCenter/company/cashing/reward/parts/info.vue

@@ -1,110 +0,0 @@
-<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="13" class="title"> {{ form.type }}兑付凭证 </el-col>
-            <el-col :span="11" class="no"> NO.{{ form.no }} </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">{{ form.company_name || '暂无' }} </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.type || '暂无' }} </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.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: right;
-        color: #000000;
-      }
-      .no {
-        font-size: 12px;
-        color: #ff0000;
-        font-weight: bold;
-        text-align: right;
-        padding: 0 5px;
-      }
-    }
-    .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;
-        }
-      }
-    }
-  }
-}
-</style>

+ 0 - 138
src/views/adminCenter/company/cashing/reward/rewardResult.vue

@@ -1,138 +0,0 @@
-<template>
-  <div id="rewardResult">
-    <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" @vouc="toVouc"> </data-table>
-        </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 { cashingresult } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: rewardOrder } = createNamespacedHelpers('rewardOrder');
-export default {
-  name: 'rewardResult',
-  props: {},
-  components: { info },
-  data: function () {
-    return {
-      list: [],
-      total: 0,
-      opera: [
-        {
-          label: '查看结果',
-          method: 'view',
-          display: (i) => i.status == '1' || i.status == '-1',
-        },
-        {
-          label: '查看凭证',
-          method: 'vouc',
-          display: (i) => i.status == '1',
-        },
-      ],
-      fields: [
-        { label: '订单号', prop: 'no', filter: 'input' },
-        { label: '兑付类型', prop: 'type' },
-        { label: '使用企业', prop: 'company_name' },
-        { label: '最后提交时间', prop: 'create_time' },
-        { label: '最后审核时间', prop: 'end_time' },
-        { label: '订单金额', prop: 'money' },
-        { label: '应收金额', prop: 'total' },
-        {
-          label: '兑付审核状态',
-          prop: 'status',
-          format: (i) => {
-            const r = cashingresult.find((f) => f.value === i);
-            if (r) return r.label;
-            else return '';
-          },
-        },
-      ],
-      dialog: false,
-      form: {},
-    };
-  },
-  created() {},
-  methods: {
-    ...rewardOrder(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      info.type = this.type;
-      info.company_id = this.user.id;
-      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/cashing/reward/rewardResult_info', query: { id: data._id, type: data.type } });
-    },
-    // 查看凭证
-    toVouc({ data }) {
-      this.$set(this, `form`, data);
-      this.dialog = true;
-    },
-    handleClose() {
-      this.dialog = false;
-    },
-    download() {
-      htmlToPdf.downloadPDF(document.querySelector('#demo'), '凭证');
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    type: {
-      deep: true,
-      immediate: true,
-      handler(val) {
-        this.search();
-      },
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.main {
-  border-radius: 10px;
-  box-shadow: 0 0 5px #cccccc;
-  padding: 20px;
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-.dialog {
-  #demo {
-    width: 100%;
-    height: 600px;
-  }
-  .el-button {
-    margin: 0 0 10px 0;
-  }
-}
-/deep/.el-dialog__body {
-  padding: 20px;
-}
-</style>

+ 0 - 254
src/views/adminCenter/company/cashing/reward/rewardResult_info.vue

@@ -1,254 +0,0 @@
-<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-col :span="24" class="down_left">
-              <el-col :span="24" class="down_leftInfo">
-                <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.no || '暂无' }}
-                    </el-col>
-                  </el-col>
-                  <el-col :span="24" class="text">
-                    <el-col :span="2" class="left"> 兑付类型</el-col>
-                    <el-col :span="22" class="right">
-                      {{ form.type || '暂无' }}
-                    </el-col>
-                  </el-col>
-                  <el-col :span="24" class="text">
-                    <el-col :span="2" class="left"> 使用企业</el-col>
-                    <el-col :span="22" class="right">
-                      {{ form.company_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.create_time || '暂无' }}
-                    </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.end_time || '暂无' }}
-                    </el-col>
-                  </el-col>
-                  <el-col :span="24" class="text">
-                    <el-col :span="2" class="left"> 订单金额</el-col>
-                    <el-col :span="22" class="right"> {{ getMoney(form.money) }}元 </el-col>
-                  </el-col>
-                  <el-col :span="24" class="text">
-                    <el-col :span="2" class="left"> 应收金额</el-col>
-                    <el-col :span="22" class="right"> {{ getMoney(form.total) }}元 </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>
-                        <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-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-const _ = require('lodash');
-const moment = require('moment');
-import htmlToPdf from '@/unit/htmlToPdf.js';
-const { cashingresult } = require('@common/dict/index');
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: rewardOrder } = createNamespacedHelpers('rewardOrder');
-export default {
-  name: 'couponsResult_info',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {},
-      imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...rewardOrder(['fetch']),
-    async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
-    },
-    getStatus(i) {
-      const r = cashingresult.find((f) => f.value === i);
-      if (r) return r.label;
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/company/cashing/reward/rewardResult', query: { type: this.type } });
-    },
-    // 判断钱
-    getMoney(data) {
-      if (data == undefined) return '未计算';
-      else return data;
-    },
-    isImg(url) {
-      const arr = url.split('.');
-      const suffix = _.last(arr);
-      return this.imgList.includes(suffix);
-    },
-    toOpen(url) {
-      window.open(url);
-    },
-    //pdf下载
-    download() {
-      htmlToPdf.downloadPDF(document.querySelector('#demo'), '凭证');
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    test: {
-      deep: true,
-      immediate: true,
-      handler(val) {},
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.main {
-  border-radius: 10px;
-  box-shadow: 0 0 5px #cccccc;
-  padding: 20px;
-  .one {
-    .top {
-      text-align: right;
-      margin: 0 0 10px 0;
-    }
-    .down {
-      .down_left {
-        .down_leftTix {
-          text-align: center;
-          font-size: 16px;
-          font-weight: bold;
-          border-bottom: 1px solid #409eff;
-          padding: 10px 0;
-        }
-        .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;
-          }
-        }
-      }
-      .file {
-        .file_title {
-          font-size: 16px;
-          font-weight: bold;
-          margin: 10px 0 0 0;
-          // text-align: center;
-        }
-      }
-    }
-  }
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

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

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

+ 79 - 83
src/views/adminCenter/company/cashing/coupons/detail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="apply">
+  <div id="cashing">
     <el-row>
       <el-col :span="24" class="main">
         <el-col :span="24" class="one">
@@ -9,20 +9,30 @@
           <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 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_name">
-                  <el-input v-model="form.company_name" placeholder="请输入使用单位"></el-input>
+                <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="mechanism_name">
-                  <el-input v-model="form.mechanism_name" placeholder="请输入服务提供商"></el-input>
+                <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">
@@ -65,8 +75,8 @@
                 </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-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>
@@ -77,72 +87,42 @@
 </template>
 
 <script>
+const _ = require('lodash');
+const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: declareOrder } = createNamespacedHelpers('declareOrder');
+const { mapActions: organization } = createNamespacedHelpers('organization');
 const { mapActions: couponsApply } = createNamespacedHelpers('couponsApply');
-const { mapActions: coupons } = createNamespacedHelpers('coupons');
-const { mapActions: cashing } = createNamespacedHelpers('cashing');
+const { mapActions: mapCashing } = createNamespacedHelpers('cashing');
 export default {
-  name: 'apply',
+  name: 'cashing',
   props: {},
   components: {},
   data: function () {
     return {
       form: {},
       rules: {},
-      // 创新券申领成功
-      couponsapplyList: [],
       // 创新券
-      couponsList: [],
+      couponsapplyList: [],
     };
   },
   created() {
-    if (this.id) this.searchOther();
+    this.search();
   },
   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);
+    ...organization({ orgFetch: 'fetch' }),
+    ...couponsApply({ couapplyQuery: 'query' }),
+    ...mapCashing(['create']),
+    async search() {
+      let res = await this.orgFetch(this.user.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,
+          no: this.searchno(),
+          reward_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: [],
@@ -151,26 +131,40 @@ export default {
         };
         this.$set(this, `form`, data);
       }
-      // 查询申领成功的优惠券
-      res = await this.query({ user_id: this.user.id });
+      // 查询申领创新券列表
+      res = await this.couapplyQuery({ 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);
-      }
+    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: {
@@ -197,9 +191,11 @@ export default {
   border-radius: 10px;
   box-shadow: 0 0 5px #cccccc;
   padding: 20px;
-  .top {
-    text-align: right;
-    margin: 0 0 10px 0;
+  .one {
+    .top {
+      text-align: right;
+      margin: 0 0 15px 0;
+    }
   }
   .down {
     .text {
@@ -213,10 +209,6 @@ export default {
     .el-select {
       width: 100%;
     }
-    .formBtn {
-      text-align: center;
-      padding: 15px 0;
-    }
     .file {
       .file_title {
         font-size: 16px;
@@ -239,6 +231,10 @@ export default {
         }
       }
     }
+    .formBtn {
+      text-align: center;
+      padding: 15px 0;
+    }
   }
 }
 .main:hover {

+ 89 - 62
src/views/adminCenter/cashing/coupons/result.vue

@@ -1,60 +1,67 @@
 <template>
-  <div id="result">
+  <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="24" class="text">
-                <el-col :span="2" class="left"> 订单号</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.cashing_no || '暂无' }}
+              <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="24" class="text">
-                <el-col :span="2" class="left"> 券的类别</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.coupons_type || '暂无' }}
+              <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="24" class="text">
-                <el-col :span="2" class="left"> 使用单位</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.company_name || '暂无' }}
+              <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="24" class="text">
-                <el-col :span="2" class="left"> 最后提交时间</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.create_time || '暂无' }}
+              <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="24" class="text">
-                <el-col :span="2" class="left"> 最后审核时间</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.end_time || '暂无' }}
+              <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="24" class="text">
-                <el-col :span="2" class="left"> 服务提供商</el-col>
-                <el-col :span="22" class="right">
-                  {{ form.mechanism_name || '暂无' }}
-                </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="24" class="text">
-                <el-col :span="2" class="left"> 订单金额</el-col>
-                <el-col :span="22" class="right"> {{ getMoney(form.money) }}元 </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="24" class="text">
-                <el-col :span="2" class="left"> 券抵扣金额</el-col>
-                <el-col :span="22" class="right"> {{ getMoney(form.allowance) }}元 </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="24" class="text">
-                <el-col :span="2" class="left"> 应收金额</el-col>
-                <el-col :span="22" class="right"> {{ getMoney(form.total) }}元 </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>
@@ -105,7 +112,7 @@
                 </el-col>
               </el-col>
               <el-col :span="24" class="text">
-                <el-col :span="2" class="left"> 审核状态</el-col>
+                <el-col :span="2" class="left"> 审核状态</el-col>
                 <el-col :span="22" class="right">
                   {{ getStatus(form.status) }}
                 </el-col>
@@ -114,6 +121,7 @@
                 <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>
@@ -128,47 +136,52 @@
         </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>
-const _ = require('lodash');
-const moment = require('moment');
-const { cashingresult } = require('@common/dict/index');
+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: cashing } = createNamespacedHelpers('cashing');
+const { mapActions: mapCashing } = createNamespacedHelpers('cashing');
+const { mapActions: coupons } = createNamespacedHelpers('coupons');
 export default {
-  name: 'result',
+  name: 'cashing_info',
   props: {},
-  components: {},
+  components: { info },
   data: function () {
     return {
       form: {},
       imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
+      statusList: cashStatus,
+      // 凭证
+      dialog: false,
     };
   },
   created() {
     if (this.id) this.search();
   },
   methods: {
-    ...cashing(['fetch']),
+    ...mapCashing(['fromFetch']),
+    ...coupons(['fetch']),
     async search() {
-      let res = await this.fetch(this.id);
+      let res = await this.fromFetch(this.id);
       if (this.$checkRes(res)) {
+        this.searchOther(res.data);
         this.$set(this, `form`, res.data);
       }
     },
-    getStatus(i) {
-      const r = cashingresult.find((f) => f.value === i);
-      if (r) return r.label;
-    },
     back() {
-      this.$router.push({ path: '/adminCenter/cashing/coupons' });
-    },
-    // 判断钱
-    getMoney(data) {
-      if (data == undefined) return '暂无';
-      else return data;
+      this.$router.push({ path: '/adminCenter/company/declare' });
     },
     isImg(url) {
       const arr = url.split('.');
@@ -178,6 +191,27 @@ export default {
     toOpen(url) {
       window.open(url);
     },
+    getStatus(i) {
+      const r = cashStatus.find((f) => f.value === i);
+      if (r) return r.label;
+    },
+    // 查询创新券
+    async searchOther(data) {
+      let res = await this.fetch(data.coupons_id);
+      if (this.$checkRes(res)) {
+        data.coupons_id = res.data.name;
+      }
+    },
+    // 查看凭证
+    view() {
+      this.dialog = true;
+    },
+    handleClose() {
+      this.dialog = false;
+    },
+    download() {
+      htmlToPdf.downloadPDF(document.querySelector('#demo'), '凭证');
+    },
   },
   computed: {
     ...mapState(['user']),
@@ -206,7 +240,7 @@ export default {
   .one {
     .top {
       text-align: right;
-      margin: 0 0 10px 0;
+      margin: 0 0 15px 0;
     }
     .down {
       .text {
@@ -226,13 +260,6 @@ export default {
           margin: 10px 0 0 0;
         }
       }
-      .file {
-        .file_title {
-          font-size: 16px;
-          font-weight: bold;
-          margin: 10px 0 0 0;
-        }
-      }
     }
   }
 }

+ 7 - 7
src/views/adminCenter/company/reward/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" @view="toView">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @view="toView" @cash="toCash">
             <template #selfbtn>
               <el-button type="primary" size="mini" @click="toAdd">{{ type }}申请</el-button>
             </template>
@@ -33,9 +33,9 @@ export default {
         },
         {
           label: '我要兑付',
-          method: 'cashing',
+          method: 'cash',
           display: (item) => {
-            return item.status == '1';
+            return item.status == '3' && item.is_cashing == '0';
           },
         },
       ],
@@ -85,10 +85,10 @@ export default {
     toView({ data }) {
       this.$router.push({ path: '/adminCenter/company/reward/result', query: { id: data.id, type: data.type } });
     },
-    // // 我要兑付
-    // toPay({ data }) {
-    //   this.$router.push({ path: '/adminCenter/company/reward/order', query: { id: data.id, type: data.type } });
-    // },
+    // 我要兑付
+    toCash({ data }) {
+      this.$router.push({ path: '/adminCenter/company/reward/cashing', query: { id: data._id } });
+    },
   },
   computed: {
     ...mapState(['user']),

+ 2 - 2
src/views/adminCenter/company/reward/result.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="result">
+  <div id="info">
     <el-row>
       <el-col :span="24" class="main">
         <el-col :span="24" class="one">
@@ -93,7 +93,7 @@ const { rewardStatus } = require('@common/dict/couindex');
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: reward } = createNamespacedHelpers('reward');
 export default {
-  name: 'result',
+  name: 'info',
   props: {},
   components: {},
   data: function () {

+ 0 - 205
src/views/adminCenter/company/reward/order.vue

@@ -1,205 +0,0 @@
-<template>
-  <div id="order">
-    <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="type">
-                  <el-input v-model="form.type" placeholder="" 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="money">
-                  <el-input v-model="form.money" placeholder=""></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="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 { mapActions: reward } = createNamespacedHelpers('reward');
-const { mapActions: rewardOrder } = createNamespacedHelpers('rewardOrder');
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'order',
-  props: {},
-  components: {},
-  data: function () {
-    return {
-      form: {},
-      rules: {},
-    };
-  },
-  created() {
-    if (this.id) this.search();
-  },
-  methods: {
-    ...reward(['fetch']),
-    ...rewardOrder(['create']),
-    async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        let data = {
-          type: res.data.type,
-          company_id: res.data.user_id,
-          company_name: res.data.company,
-          contract: [],
-          accept: [],
-          cost: [],
-          result: [],
-          result_else: [],
-        };
-        this.$set(this, `form`, data);
-      }
-    },
-    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: `${this.type}兑付申请成功,请耐心等待结果`,
-              type: 'success',
-            });
-            this.back();
-          }
-        } else {
-          console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-    back() {
-      this.$router.push({ path: '/adminCenter/company/reward', query: { type: this.type } });
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    id() {
-      return this.$route.query.id;
-    },
-    type() {
-      return this.$route.query.type;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  watch: {
-    test: {
-      deep: true,
-      immediate: true,
-      handler(val) {},
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.main {
-  border-radius: 10px;
-  box-shadow: 0 0 5px #cccccc;
-  padding: 20px;
-  .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 {
-        .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;
-          }
-        }
-      }
-    }
-  }
-}
-.main:hover {
-  box-shadow: 0 0 5px #409eff;
-}
-</style>

+ 22 - 18
src/views/adminCenter/company/cashing/coupons/parts/info.vue

@@ -4,30 +4,37 @@
       <el-col :span="24" class="main">
         <el-col :span="24" class="one">
           <el-col :span="24" class="top">
-            <el-col :span="13" class="title"> 科技创新券兑付凭证 </el-col>
-            <el-col :span="11" class="no"> NO.{{ form.cashing_no }} </el-col>
+            <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">{{ form.company_name || '暂无' }} </el-col>
+              <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.mechanism_name || '暂无' }} </el-col>
+              <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.coupons_type || '暂无' }} </el-col>
+              <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.allowance || '暂无' }} </el-col>
+              <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>
@@ -84,16 +91,9 @@ export default {
       margin: 15px 0;
       .title {
         font-weight: bold;
-        text-align: right;
+        text-align: center;
         color: #000000;
       }
-      .no {
-        font-size: 12px;
-        color: #ff0000;
-        font-weight: bold;
-        text-align: right;
-        padding: 0 5px;
-      }
     }
     .down {
       .down_info {
@@ -111,6 +111,10 @@ export default {
           border: 1px solid #000;
           color: #000000;
         }
+        .no {
+          color: #ff0000;
+          font-weight: bold;
+        }
       }
     }
   }

+ 1 - 1
src/views/adminCenter/declare/cash_check.vue

@@ -142,7 +142,7 @@
 </template>
 
 <script>
-import flow from './cash_flow.vue';
+import flow from './parts/cash_flow.vue';
 const moment = require('moment');
 const { cashStatus } = require('@common/dict/couindex');
 import { mapState, createNamespacedHelpers } from 'vuex';

+ 1 - 1
src/views/adminCenter/declare/check.vue

@@ -78,7 +78,7 @@
 <script>
 const _ = require('lodash');
 const moment = require('moment');
-import flow from './flow.vue';
+import flow from './parts/flow.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: declare } = createNamespacedHelpers('declare');
 export default {

src/views/adminCenter/declare/cash_flow.vue → src/views/adminCenter/declare/parts/cash_flow.vue


src/views/adminCenter/declare/flow.vue → src/views/adminCenter/declare/parts/flow.vue