申请人文件上传接口调试及详情展示 #46

Merged
hhlxayunmei merged 2 commits from hhl into dev 2023-09-26 11:46:33 +00:00
2 changed files with 70 additions and 42 deletions
Showing only changes of commit 269a2ee1a2 - Show all commits
+5 -18
View File
@@ -126,14 +126,6 @@
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button
size="mini"
type="text"
icon="el-icon-check"
@click="onsubmitRow(scope.row)"
v-hasPermi="['monitor:online:forceLogout']"
>提交</el-button
> -->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@@ -154,7 +146,7 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-check"
@click="onsubmitRow(scope.row)" @click="onsubmitRow(scope.row)"
v-if="scope.row.caseStatus == 0" v-if="scope.row.caseStatus == 0"
v-hasPermi="['monitor:online:forceLogout']" v-hasPermi="['monitor:online:forceLogout']"
@@ -178,7 +170,6 @@
v-hasPermi="['monitor:online:forceLogout']" v-hasPermi="['monitor:online:forceLogout']"
>立案审查</el-button >立案审查</el-button
> >
<!-- <el-popconfirm title="是否进行缴费" @confirm="payStatus(scope.row)"> -->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@@ -188,7 +179,6 @@
v-hasPermi="['monitor:online:forceLogout']" v-hasPermi="['monitor:online:forceLogout']"
>缴费</el-button >缴费</el-button
> >
<!-- </el-popconfirm> -->
<!-- <el-button <!-- <el-button
size="mini" size="mini"
@@ -281,6 +271,7 @@
:dialogtitle="dialogtitle" :dialogtitle="dialogtitle"
:getcaseApply="getcaseApply" :getcaseApply="getcaseApply"
:flag="flag" :flag="flag"
:caseAttachList="caseAttachList"
:initpaymentArr="initpaymentArr" :initpaymentArr="initpaymentArr"
:initpaymentArr1="initpaymentArr1" :initpaymentArr1="initpaymentArr1"
></caseentryDialog> ></caseentryDialog>
@@ -427,6 +418,7 @@ export default {
openPay: false, //缴费弹框 openPay: false, //缴费弹框
payTitle: "", payTitle: "",
payForm: {}, payForm: {},
caseAttachList: [], //案件质证资料
}; };
}, },
created() { created() {
@@ -553,14 +545,8 @@ export default {
// 是否进行缴费 // 是否进行缴费
payStatus(val) { payStatus(val) {
this.getDetail({ id: val.id }); this.getDetail({ id: val.id });
this.payTitle = "缴费"; // this.payTitle = "缴费";
this.$modal
.confirm("是否进行缴费?")
.then()
.then(() => {
this.openPay = true; this.openPay = true;
})
.catch(() => {});
}, },
getDetail(parms) { getDetail(parms) {
caseApplicationDetail(parms).then((res) => { caseApplicationDetail(parms).then((res) => {
@@ -670,6 +656,7 @@ export default {
this.initpaymentArr1.push(item); this.initpaymentArr1.push(item);
} }
}); });
this.caseAttachList = res.data.caseAttachList
}); });
}, },
// 删除 // 删除
@@ -112,13 +112,16 @@
<el-form-item <el-form-item
label="申请人案件证据资料上传:" label="申请人案件证据资料上传:"
prop="applicantEvidence" prop="applicantEvidence"
v-if="flag !== '0'"
> >
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/" ref="fileupload"
:on-preview="handlePreview" :action="UploadUrl()"
:on-remove="handleRemove" :on-success="handlSuccess"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:data="filedata"
:headers="headers"
multiple multiple
:limit="3" :limit="3"
:on-exceed="handleExceed" :on-exceed="handleExceed"
@@ -126,18 +129,30 @@
> >
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
只能上传jpg/png文件,且不超过500kb 文件支持上传jpg/png、.doc/docx、pdf文件
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 仅详情展示 --> <el-col :span="12">
<!-- <el-col :span="12">
<el-form-item <el-form-item
label="被申请人案件证据资料上传:" label="申请人案件证据资料:"
prop="respondentEvidence" v-if="flag == '0' && caseAttachList.length > 0"
> >
<el-upload <a href=""></a>
</el-form-item>
</el-col>
<!-- 仅详情展示 案件质证环节以后显示被申请人证据-->
<el-col :span="12">
<el-form-item
label="被申请人案件证据资料:"
prop="respondentEvidence"
v-if="flag == '0' && caseAttachList.length > 0"
>
<a href="#" @click="toFile" style="color: blue">{{
caseAttachList[0].annexName
}}</a>
<!-- <el-upload
class="upload-demo" class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-preview="handlePreview"
@@ -152,9 +167,9 @@
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
只能上传jpg/png文件,且不超过500kb 只能上传jpg/png文件,且不超过500kb
</div> </div>
</el-upload> </el-upload> -->
</el-form-item> </el-form-item>
</el-col> --> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<!-- 申请人主体信息 --> <!-- 申请人主体信息 -->
@@ -602,6 +617,7 @@
<script> <script>
import moment from "moment"; //导入文件 import moment from "moment"; //导入文件
import { getToken } from "@/utils/auth";
import { addCaseApply, editCaseApply } from "@/api/caseAccess/caseEntry"; import { addCaseApply, editCaseApply } from "@/api/caseAccess/caseEntry";
export default { export default {
props: [ props: [
@@ -613,10 +629,17 @@ export default {
"initpaymentArr", "initpaymentArr",
"initpaymentArr1", "initpaymentArr1",
"queryParams", "queryParams",
"caseAttachList",
], ],
data() { data() {
return { return {
formData: this.form, formData: this.form,
filedata: {
annexType: 2,
},
headers: {
Authorization: "Bearer " + getToken(),
},
form2: { form2: {
paymentArr: [ paymentArr: [
{ {
@@ -789,8 +812,13 @@ export default {
}, },
}, },
methods: { methods: {
handleRemove(file, fileList) {console.log('文件列表移除文件时的钩子');}, UploadUrl() {
handlePreview(file) {console.log('点击文件列表中已上传的文件时的钩子');}, return window.location.origin + "/API/evidence/upload";
},
// 文件上传成功
handlSuccess(res, file) {
console.log(res, file);
},
// 文件超出个数限制时的钩子 // 文件超出个数限制时的钩子
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning( this.$message.warning(
@@ -809,23 +837,29 @@ export default {
}, },
// 校验借款开始日期与结束日期 // 校验借款开始日期与结束日期
setStartTime() { setStartTime() {
if ( this.setTime(this.formData.loanStartDate) >= this.setTime(this.formData.loanEndDate) ) { if (
this.$message.error('借款开始日期应早于借款结束日期'); this.setTime(this.formData.loanStartDate) >=
this.formData.loanStartDate = ''; this.setTime(this.formData.loanEndDate)
this.formData.loanEndDate = ''; ) {
this.$message.error("借款开始日期应早于借款结束日期");
this.formData.loanStartDate = "";
this.formData.loanEndDate = "";
} }
}, },
setEndTime() { setEndTime() {
if ( this.setTime(this.formData.loanEndDate) <= this.setTime(this.formData.loanStartDate) ) { if (
this.$message.error('借款结束日期应晚于借款开始日期'); this.setTime(this.formData.loanEndDate) <=
this.formData.loanStartDate = ''; this.setTime(this.formData.loanStartDate)
this.formData.loanEndDate = ''; ) {
this.$message.error("借款结束日期应晚于借款开始日期");
this.formData.loanStartDate = "";
this.formData.loanEndDate = "";
} }
}, },
setTime(val) { setTime(val) {
const date = new Date(val) const date = new Date(val);
const time = date.getTime() const time = date.getTime();
return time return time;
}, },
// 新增申请人主体信息 // 新增申请人主体信息
@@ -914,6 +948,13 @@ export default {
} }
}); });
}, },
// 详情显示,展示案件文件
toFile() {
window.open(
window.location.origin + "/API" + this.caseAttachList[0].annexPath,
"_black"
);
},
}, },
}; };
</script> </script>