|
@@ -1,113 +1,113 @@
|
|
<template>
|
|
<template>
|
|
<div id="detail">
|
|
<div id="detail">
|
|
- <el-form ref="form" label-width="150px">
|
|
|
|
- <el-row type="flex" justify="space-between" style="padding: 10px">
|
|
|
|
- <el-col :span="2">
|
|
|
|
- <el-button type="primary" size="mini" @click="toFlow">查看意见</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="2">
|
|
|
|
- <el-button type="primary" size="mini" @click="toBack">返回</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-form-item label="企业名称">{{ data.name }}</el-form-item>
|
|
|
|
- <el-form-item label="资料">
|
|
|
|
- <template #label>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="24">资料</el-col>
|
|
|
|
- <el-col :span="24">(图片点击放大)</el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </template>
|
|
|
|
- <el-row :gutter="10">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in data.material" :key="`material-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else :key="`material-${index}`" type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24" class="main">
|
|
|
|
+ <el-col :span="24" class="one">
|
|
|
|
+ <el-col :span="24" class="top">
|
|
|
|
+ <el-button type="primary" size="mini" @click="toFlow">查看意见</el-button>
|
|
|
|
+ <el-button type="primary" size="mini" @click="back">返回</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="down">
|
|
|
|
+ <el-form :model="form" ref="form" label-width="100px">
|
|
|
|
+ <el-col :span="24" class="text">
|
|
|
|
+ <el-col :span="2" class="left"> 企业名称:</el-col>
|
|
|
|
+ <el-col :span="22" class="right">
|
|
|
|
+ {{ form.name }}
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="text">
|
|
|
|
+ <el-col :span="2" class="left"> 申领时间:</el-col>
|
|
|
|
+ <el-col :span="22" class="right">
|
|
|
|
+ {{ getDate(form.meta) }}
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="text">
|
|
|
|
+ <el-col :span="2" class="left"> 资质资料:</el-col>
|
|
|
|
+ <el-col :span="20" class="right">
|
|
|
|
+ <el-col :span="4" v-for="(i, index) in form.material" :key="`material-${index}`">
|
|
|
|
+ <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
+ <el-link v-else :key="`material-${index}`" type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="text">
|
|
|
|
+ <el-col :span="2" class="left"> 资质审核:</el-col>
|
|
|
|
+ <el-col :span="20" class="right">
|
|
|
|
+ <el-radio-group v-model="form.status">
|
|
|
|
+ <el-radio label="1">通过</el-radio>
|
|
|
|
+ <el-radio label="-1">拒绝</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" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></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-row>
|
|
|
|
- </el-form-item>
|
|
|
|
- <template v-if="statusData !== '0' && statusData !== '1' && statusData !== '-1'">
|
|
|
|
- <el-form-item label="中介机构审核资料">
|
|
|
|
- <template #label>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="24">中介机构审核资料</el-col>
|
|
|
|
- <el-col :span="24">(图片点击放大)</el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </template>
|
|
|
|
- <el-row :gutter="10">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in data.medium_material" :key="`medium_material-${index}`">
|
|
|
|
- <img v-if="isImg(i.url)" :src="i.url" width="150px" height="150px" @click="toOpen(i.url)" />
|
|
|
|
- <el-link v-else type="primary" @click="toOpen(i.url)"> <i class="el-icon-view"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="合同" v-if="statusData !== '0' && statusData !== '1' && statusData !== '-1' && statusData !== '2' && statusData !== '-3'">
|
|
|
|
- <template #label>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="24">合同</el-col>
|
|
|
|
- <el-col :span="24">(图片点击放大)</el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </template>
|
|
|
|
- <el-row :gutter="10">
|
|
|
|
- <el-col :span="4" v-for="(i, index) in data.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-row>
|
|
|
|
- </el-form-item>
|
|
|
|
- </template>
|
|
|
|
- <el-form-item label="审核意见" v-if="statusData === '0' || statusData === '3'">
|
|
|
|
- <el-input v-model="form.desc" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="审核" v-if="statusData === '0'">
|
|
|
|
- <el-radio-group v-model="form.status">
|
|
|
|
- <el-radio label="1">通过</el-radio>
|
|
|
|
- <el-radio label="-1">拒绝</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-row type="flex" justify="space-around">
|
|
|
|
- <el-col :span="2">
|
|
|
|
- <el-button v-if="statusData === '0'" type="primary" @click="toStatus()" :disabled="!form.status">保存审核结果</el-button>
|
|
|
|
- <el-button v-if="statusData === '3'" type="primary" @click="toStatus('4')">确认</el-button>
|
|
|
|
</el-col>
|
|
</el-col>
|
|
- </el-row>
|
|
|
|
- </el-form>
|
|
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
<el-dialog title="意见" :visible.sync="dialog" :destroy-on-close="true">
|
|
<el-dialog title="意见" :visible.sync="dialog" :destroy-on-close="true">
|
|
- <flow :id="data._id"></flow>
|
|
|
|
|
|
+ <flow :id="form._id"></flow>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
const _ = require('lodash');
|
|
const _ = require('lodash');
|
|
|
|
+const moment = require('moment');
|
|
import flow from './flow.vue';
|
|
import flow from './flow.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions: ticket } = createNamespacedHelpers('ticket');
|
|
const { mapActions: ticket } = createNamespacedHelpers('ticket');
|
|
export default {
|
|
export default {
|
|
name: 'detail',
|
|
name: 'detail',
|
|
props: {},
|
|
props: {},
|
|
- components: { flow },
|
|
|
|
|
|
+ components: {
|
|
|
|
+ flow,
|
|
|
|
+ },
|
|
data: function () {
|
|
data: function () {
|
|
return {
|
|
return {
|
|
- data: {
|
|
|
|
- material: [],
|
|
|
|
- medium_material: [],
|
|
|
|
- contract: [],
|
|
|
|
- },
|
|
|
|
- imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
|
|
|
|
form: {},
|
|
form: {},
|
|
|
|
+ imgList: ['jpg', 'jpeg', 'png', 'bmp', 'gif'],
|
|
|
|
+ // 意见
|
|
dialog: false,
|
|
dialog: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
- if (this.id) this.search();
|
|
|
|
|
|
+ async created() {
|
|
|
|
+ await this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...ticket(['fetch', 'status']),
|
|
...ticket(['fetch', 'status']),
|
|
async search() {
|
|
async search() {
|
|
- const res = await this.fetch(this.id);
|
|
|
|
- if (this.$checkRes(res)) {
|
|
|
|
- this.$set(this, `data`, res.data);
|
|
|
|
|
|
+ if (this.id) {
|
|
|
|
+ let res = await this.fetch(this.id);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ async onSubmit() {
|
|
|
|
+ let data = this.form;
|
|
|
|
+ const res = await this.status(data);
|
|
|
|
+ if (this.$checkRes(res, '审核成功', res.errmsg || '审核失败')) {
|
|
|
|
+ this.back();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 查看意见
|
|
|
|
+ toFlow() {
|
|
|
|
+ this.dialog = true;
|
|
|
|
+ },
|
|
|
|
+ // 返回
|
|
|
|
+ back() {
|
|
|
|
+ this.$router.push({ path: '/adminCenter/ticket', query: { status: this.dataStatus } });
|
|
|
|
+ },
|
|
isImg(url) {
|
|
isImg(url) {
|
|
const arr = url.split('.');
|
|
const arr = url.split('.');
|
|
const suffix = _.last(arr);
|
|
const suffix = _.last(arr);
|
|
@@ -116,44 +116,69 @@ export default {
|
|
toOpen(url) {
|
|
toOpen(url) {
|
|
window.open(url);
|
|
window.open(url);
|
|
},
|
|
},
|
|
- async toStatus(status) {
|
|
|
|
- const dup = _.cloneDeep(this.form);
|
|
|
|
- dup.opera_id = this.user._id;
|
|
|
|
- dup.id = this.data._id;
|
|
|
|
- if (status) dup.status = status;
|
|
|
|
- const res = await this.status(dup);
|
|
|
|
- if (this.$checkRes(res, '审核成功', res.errmsg || '审核失败')) {
|
|
|
|
- this.toBack();
|
|
|
|
|
|
+ getDate(date) {
|
|
|
|
+ if (date) {
|
|
|
|
+ let newDate = moment(date.createdAt).format('YYYY-MM-DD');
|
|
|
|
+ if (newDate) return newDate;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- toBack() {
|
|
|
|
- this.$router.push(`/adminCenter/ticket`);
|
|
|
|
- },
|
|
|
|
- toFlow() {
|
|
|
|
- this.dialog = true;
|
|
|
|
- },
|
|
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(['user', 'menuParams']),
|
|
|
|
- pageTitle() {
|
|
|
|
- return `${this.$route.meta.title}`;
|
|
|
|
- },
|
|
|
|
- statusData() {
|
|
|
|
- return this.$route.query.status;
|
|
|
|
- },
|
|
|
|
|
|
+ ...mapState(['user']),
|
|
id() {
|
|
id() {
|
|
return this.$route.query.id;
|
|
return this.$route.query.id;
|
|
},
|
|
},
|
|
|
|
+ dataStatus() {
|
|
|
|
+ return this.$route.query.status;
|
|
|
|
+ },
|
|
},
|
|
},
|
|
metaInfo() {
|
|
metaInfo() {
|
|
return { title: this.$route.meta.title };
|
|
return { title: this.$route.meta.title };
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ test: {
|
|
|
|
+ deep: true,
|
|
|
|
+ immediate: true,
|
|
|
|
+ handler(val) {},
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
-/deep/.el-dialog__body {
|
|
|
|
- height: 500px;
|
|
|
|
- overflow-y: auto;
|
|
|
|
|
|
+.main {
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ box-shadow: 0 0 5px #cccccc;
|
|
|
|
+ padding: 20px;
|
|
|
|
+ .top {
|
|
|
|
+ text-align: right;
|
|
|
|
+ margin: 0 0 10px 0;
|
|
|
|
+ }
|
|
|
|
+ .down {
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ padding: 15px;
|
|
|
|
+ .text {
|
|
|
|
+ padding: 10px 0;
|
|
|
|
+ border-bottom: 1px dashed #333;
|
|
|
|
+ .left {
|
|
|
|
+ text-align: left;
|
|
|
|
+ }
|
|
|
|
+ .right {
|
|
|
|
+ img {
|
|
|
|
+ width: 200px;
|
|
|
|
+ height: 200px;
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .formBtn {
|
|
|
|
+ padding: 10px 0;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.main:hover {
|
|
|
|
+ box-shadow: 0 0 5px #409eff;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|