|
@@ -38,24 +38,26 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="合同">
|
|
|
|
|
|
+ <el-form-item label="合同" v-if="data.status === '3'">
|
|
<template #label>
|
|
<template #label>
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24">合同</el-col>
|
|
<el-col :span="24">合同</el-col>
|
|
<el-col :span="24">(图片点击放大)</el-col>
|
|
<el-col :span="24">(图片点击放大)</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</template>
|
|
</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-download"></i> {{ i.name }} </el-link>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
|
|
+ <e-upload
|
|
|
|
+ url="/files/cysci/contract_file/upload"
|
|
|
|
+ type="text"
|
|
|
|
+ :limit="2"
|
|
|
|
+ v-model="data.contract"
|
|
|
|
+ :remove="fileRemove"
|
|
|
|
+ :extra="{ user_id: user._id }"
|
|
|
|
+ ></e-upload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="审核意见">
|
|
|
|
|
|
+ <el-form-item label="审核意见" v-if="data.status === '2'">
|
|
<el-input v-model="form.desc" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></el-input>
|
|
<el-input v-model="form.desc" placeholder="请填写审核意见" type="textarea" :autosize="{ maxRows: 5, minRows: 3 }"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="审核">
|
|
|
|
|
|
+ <el-form-item label="审核" v-if="data.status === '2'">
|
|
<el-radio-group v-model="form.status">
|
|
<el-radio-group v-model="form.status">
|
|
<el-radio label="3">通过</el-radio>
|
|
<el-radio label="3">通过</el-radio>
|
|
<el-radio label="-3">拒绝</el-radio>
|
|
<el-radio label="-3">拒绝</el-radio>
|
|
@@ -63,7 +65,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-row type="flex" justify="space-around">
|
|
<el-row type="flex" justify="space-around">
|
|
<el-col :span="2">
|
|
<el-col :span="2">
|
|
- <el-button type="primary" @click="toStatus()" :disabled="!form.status">保存审核结果</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="toStatus()" :disabled="!form.status" v-if="data.status === '2'">保存审核结果</el-button>
|
|
|
|
+ <el-button type="primary" @click="toSave()" v-if="data.status === '3'">上传合同</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -98,7 +101,7 @@ export default {
|
|
if (this.id) this.search();
|
|
if (this.id) this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...ticket(['fetch', 'status']),
|
|
|
|
|
|
+ ...ticket(['fetch', 'status', 'update']),
|
|
async search() {
|
|
async search() {
|
|
const res = await this.fetch(this.id);
|
|
const res = await this.fetch(this.id);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
@@ -123,12 +126,26 @@ export default {
|
|
this.toBack();
|
|
this.toBack();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ async toSave() {
|
|
|
|
+ const dup = _.cloneDeep(this.data);
|
|
|
|
+ const res = await this.update(dup);
|
|
|
|
+ if (this.$checkRes(res, '上传成功', res.errmsg || '上传失败')) {
|
|
|
|
+ // this.toBack();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
toBack() {
|
|
toBack() {
|
|
this.$router.push(`/adminCenter/inter/ticket`);
|
|
this.$router.push(`/adminCenter/inter/ticket`);
|
|
},
|
|
},
|
|
toFlow() {
|
|
toFlow() {
|
|
this.dialog = true;
|
|
this.dialog = true;
|
|
},
|
|
},
|
|
|
|
+ fileRemove(file) {
|
|
|
|
+ if (file.user_id === this.user._id) {
|
|
|
|
+ return { result: true };
|
|
|
|
+ } else {
|
|
|
|
+ return { result: false, msg: '不允许删除自己上传以外的合同' };
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user', 'menuParams']),
|
|
...mapState(['user', 'menuParams']),
|