|
@@ -0,0 +1,210 @@
|
|
|
+<template>
|
|
|
+ <div id="apply_check">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <el-col :span="24" class="one">
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <el-button type="primary" size="mini" @click="back">返回</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="down">
|
|
|
+ <el-form :model="form" ref="form" label-width="100px">
|
|
|
+ <el-col :span="24" class="text">
|
|
|
+ <el-col :span="2" class="left"> 所属创新券</el-col>
|
|
|
+ <el-col :span="22" class="right">
|
|
|
+ {{ form.policy.name }}
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="text">
|
|
|
+ <el-col :span="2" class="left"> 申请单位</el-col>
|
|
|
+ <el-col :span="22" class="right">
|
|
|
+ {{ form.company }}
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="text">
|
|
|
+ <el-col :span="2" class="left"> 申请人</el-col>
|
|
|
+ <el-col :span="22" class="right">
|
|
|
+ {{ form.apply_personal }}
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="text">
|
|
|
+ <el-col :span="2" class="left"> 联系电话</el-col>
|
|
|
+ <el-col :span="22" class="right">
|
|
|
+ {{ form.phone }}
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="text">
|
|
|
+ <el-col :span="2" class="left"> 法人复印件:</el-col>
|
|
|
+ <el-col :span="20" class="right">
|
|
|
+ <el-col :span="4" v-for="(i, index) in form.qyfr" :key="`medium_material-${index}`">
|
|
|
+ <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
+ <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="text">
|
|
|
+ <el-col :span="2" class="left"> 企业营业执照:</el-col>
|
|
|
+ <el-col :span="20" class="right">
|
|
|
+ <el-col :span="4" v-for="(i, index) in form.yyzz" :key="`medium_material-${index}`">
|
|
|
+ <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
+ <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="text">
|
|
|
+ <el-col :span="2" class="left"> 企业利润表:</el-col>
|
|
|
+ <el-col :span="20" class="right">
|
|
|
+ <el-col :span="4" v-for="(i, index) in form.qylr" :key="`medium_material-${index}`">
|
|
|
+ <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
+ <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="text">
|
|
|
+ <el-col :span="2" class="left"> 审核状态</el-col>
|
|
|
+ <el-col :span="22" class="right">
|
|
|
+ <el-radio-group v-model="form.status">
|
|
|
+ <el-radio v-for="(i, index) in statusList" :key="`status-${index}`" :label="i.value">{{ i.label }}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="text">
|
|
|
+ <el-col :span="2" class="left"> 审核意见</el-col>
|
|
|
+ <el-col :span="22" class="right">
|
|
|
+ <el-input v-model="form.desc" type="textarea" maxlength="300" :autosize="{ minRows: 4, maxRows: 6 }" show-word-limit></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="formBtn">
|
|
|
+ <el-button type="danger" size="mini" @click="back">取消申领</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="onSubmit('form')">提交审核</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+const _ = require('lodash');
|
|
|
+const moment = require('moment');
|
|
|
+const { policyStatus } = require('@common/dict/index');
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: policyApply } = createNamespacedHelpers('policyApply');
|
|
|
+export default {
|
|
|
+ name: 'apply_check',
|
|
|
+ props: {},
|
|
|
+ components: {},
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ form: {
|
|
|
+ policy: {},
|
|
|
+ },
|
|
|
+ imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
|
|
|
+ statusList: policyStatus,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ if (this.id) this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...policyApply(['fetch', 'update']),
|
|
|
+ async search() {
|
|
|
+ let res = await this.fetch(this.id);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onSubmit(formName) {
|
|
|
+ this.$refs[formName].validate(async (valid) => {
|
|
|
+ if (valid) {
|
|
|
+ let data = this.form;
|
|
|
+ let newRecord = this.getRecord(data);
|
|
|
+ data.record = data.record.concat(newRecord);
|
|
|
+ let res = await this.update(data);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$message({
|
|
|
+ message: '创新券申领审核成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ this.back();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 审核列表整合
|
|
|
+ getRecord(data) {
|
|
|
+ let arr = [{ status: data.status, desc: data.desc, desc_time: moment().format('YYYY-MM-DD HH:mm:ss') }];
|
|
|
+ return arr;
|
|
|
+ },
|
|
|
+ back() {
|
|
|
+ this.$router.push({ path: '/adminCenter/policy/apply' });
|
|
|
+ },
|
|
|
+ isImg(url) {
|
|
|
+ const arr = url.split('.');
|
|
|
+ const suffix = _.last(arr);
|
|
|
+ return this.imgList.includes(suffix);
|
|
|
+ },
|
|
|
+ toOpen(url) {
|
|
|
+ window.open(url);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ id() {
|
|
|
+ return this.$route.query.id;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ test: {
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {},
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.main {
|
|
|
+ border-radius: 10px;
|
|
|
+ box-shadow: 0 0 5px #cccccc;
|
|
|
+ padding: 20px;
|
|
|
+ .top {
|
|
|
+ text-align: right;
|
|
|
+ margin: 0 0 10px 0;
|
|
|
+ }
|
|
|
+ .down {
|
|
|
+ .text {
|
|
|
+ padding: 10px 0;
|
|
|
+ border-bottom: 1px dashed #333;
|
|
|
+ .left {
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ img {
|
|
|
+ width: 200px;
|
|
|
+ height: 200px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .desc {
|
|
|
+ margin: 10px 0 0 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .formBtn {
|
|
|
+ text-align: center;
|
|
|
+ padding: 10px 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.main:hover {
|
|
|
+ box-shadow: 0 0 5px #409eff;
|
|
|
+}
|
|
|
+</style>
|