修改预约、材料上传部分
This commit is contained in:
parent
ba1546b26b
commit
1f48de7a4d
@ -255,7 +255,8 @@
|
||||
url: uploadFileRes.url,
|
||||
fileSize: uploadFileRes.size,
|
||||
fileType: this.$util.getFileExtension(uploadFileRes.url),
|
||||
fileName: uploadFileRes.objectName
|
||||
fileName: uploadFileRes.objectName,
|
||||
objectName: uploadFileRes.fileName
|
||||
})
|
||||
this.$emit('handleUploadFile', fileList)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -58,19 +58,35 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-for="(item,index) in repaymentObj.members" :key="index">
|
||||
<el-form-item label="" prop="" label-width="0">
|
||||
<el-row :gutter="10">
|
||||
<el-form-item label="" prop="" label-width="0" style="margin-bottom: 10px;">
|
||||
<el-row :gutter="20" style="background-color: rgb(245, 246, 250);margin-bottom: 5px;">
|
||||
<el-col :span="7">
|
||||
<div>身份证</div>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<div>姓名</div>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<div>电话</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div>身份证</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="7">
|
||||
<el-form-item
|
||||
:prop="`members[${index}].identity`"
|
||||
:rules="[
|
||||
{ required: true, message: '请选择', trigger: ['blur','change'],},
|
||||
]">
|
||||
<el-select v-model="item.identity" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item,index) in identityOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item
|
||||
:prop="`members[${index}].name`"
|
||||
@ -94,20 +110,7 @@
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
:prop="`members[${index}].identity`"
|
||||
:rules="[
|
||||
{ required: true, message: '请输入', trigger: ['blur','change'],},
|
||||
{ pattern: /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/, message: '请输入正确的身份证号', trigger: ['blur', 'change']}
|
||||
]">
|
||||
<el-input
|
||||
v-model="item.identity"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-col :span="3">
|
||||
<div class="">
|
||||
<el-button
|
||||
icon="el-icon-delete"
|
||||
@ -170,6 +173,13 @@ export default {
|
||||
{ label: '120分钟', value: 120 }
|
||||
],
|
||||
litigantsOptions: [],
|
||||
identityOptions: [
|
||||
{ label: '法官', value: '法官' },
|
||||
{ label: '调解专家', value: '调解专家' },
|
||||
{ label: '律师', value: '律师' },
|
||||
{ label: '民警', value: '民警' },
|
||||
{ label: '其他', value: '其他' }
|
||||
],
|
||||
repaymentObj: {
|
||||
litigants: [], //{name: xx, phone: xx, identity: xx} 当事人
|
||||
members: [], //{name: xx, phone: xx, identity: xx} 邀请人
|
||||
@ -211,7 +221,7 @@ export default {
|
||||
})
|
||||
},
|
||||
addForm() {
|
||||
this.repaymentObj.members.push({name: '', phone: '', identity: ''})
|
||||
this.repaymentObj.members.push({ identity: '', name: '', phone: ''})
|
||||
},
|
||||
deleteForm(index) {
|
||||
this.repaymentObj.members.splice(index, 1)
|
||||
|
||||
138
src/pages/mediation-page/components/caseFileDialog.vue
Normal file
138
src/pages/mediation-page/components/caseFileDialog.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="视频预约" :visible="true" width="500px" append-to-body :close-on-click-modal="false"
|
||||
@close="handleClose">
|
||||
<div class="dialog-content dialog-office-batch">
|
||||
<div class="p-16 pr-40">
|
||||
<el-form ref="ruleFormRepayment"
|
||||
:model="repaymentObj"
|
||||
:rules="rulesClientRule"
|
||||
label-width="100px">
|
||||
<el-form-item label="材料分类:" prop="materialType">
|
||||
<el-select v-model="repaymentObj.materialType" placeholder="请选择" class="width100">
|
||||
<el-option
|
||||
v-for="(item,index) in materialTypeOptions"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件上传:" prop="url">
|
||||
<upload-file :file-list="fileList" :max-count="1"
|
||||
:show-file-name="false"
|
||||
uploadName=""
|
||||
accept=".jpg,.png,.jpeg,.pdf,.docx"
|
||||
:span="6"
|
||||
:fileSize="50"
|
||||
@handleUploadFile="handleUploadFile">
|
||||
</upload-file>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传要求:">
|
||||
<div style="line-height: 20px;padding-top: 10px">
|
||||
<div>请知悉!</div>
|
||||
<div>请上传图片或pdf或word格式材料,单个文件需要在0KB以上,50MB以内;文件名称中请勿包含换行符、空格、tab#&V:?"#*|&"<>%+'等特色字符。</div>
|
||||
<div>文件名称不超过45个字</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose()">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit()">完成</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import videoTelephone from "@/services/videoTelephone";
|
||||
import caseMaterial from "@/services/caseMaterial";
|
||||
export default {
|
||||
components: {
|
||||
uploadFile: () => import('@/components/uploadFile.vue'),//上传
|
||||
},
|
||||
props: {
|
||||
eventDialog: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
materialTypeOptions: [
|
||||
{ label: '身份证件', value: 'IDENTITY' },
|
||||
{ label: '金融许可证', value: 'FINANCIAL_LICENSES' },
|
||||
{ label: '营业执照', value: 'BUSINESS_LICENSES' },
|
||||
{ label: '法定代表人身份证明', value: 'IDENTITY_LEGAL' },
|
||||
{ label: '起诉状', value: 'COMPLAINTS' },
|
||||
{ label: '证据清单', value: 'EVIDENCE' },
|
||||
{ label: '合约', value: 'CONTRACTS' },
|
||||
{ label: '申领表', value: 'APPLICATION_FORMS' },
|
||||
{ label: '交易明细', value: 'TRANSACTION_DETAILS' },
|
||||
{ label: '其他证据', value: 'OTHER' },
|
||||
],
|
||||
repaymentObj: {
|
||||
caseId: '',
|
||||
materialType: '',
|
||||
category: 'EVIDENTIAL',
|
||||
name: '',
|
||||
url: '',
|
||||
},
|
||||
rulesClientRule: {
|
||||
materialType: [
|
||||
{required: true, message: '请选择', trigger: 'change',},
|
||||
],
|
||||
url: [
|
||||
{ required: true, message: '请上传', trigger: 'change',},
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// console.log(1231)
|
||||
},
|
||||
methods: {
|
||||
handleUploadFile(fileList){
|
||||
// console.log('获取上传文件信息',fileList)
|
||||
fileList = JSON.parse(JSON.stringify(fileList))
|
||||
this.fileList = fileList.map((item,i) => {
|
||||
return {
|
||||
url: item.url,
|
||||
fileName: item.fileName,
|
||||
previewUrl:item.previewUrl,
|
||||
objectName: item.objectName
|
||||
}
|
||||
})
|
||||
this.repaymentObj.url = this.fileList.length?this.fileList[0].url : '';
|
||||
this.repaymentObj.name = this.fileList.length?this.fileList[0].objectName : '';
|
||||
console.log(this.repaymentObj, '---this.repaymentObj', this.fileList)
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit('update:eventDialog', null)
|
||||
},
|
||||
handleSubmit() {
|
||||
if(!this.$clickThrottle()) { return }//防止重复点击
|
||||
this.$refs.ruleFormRepayment.validate((valid) => {
|
||||
if (valid) {
|
||||
this.repaymentObj.caseId = this.eventDialog.caseId;
|
||||
caseMaterial.addCaseFile(this.repaymentObj).then(res => {
|
||||
// this.$parent.getDataList(1)
|
||||
this.handleClose()
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
26
src/services/caseMaterial.js
Normal file
26
src/services/caseMaterial.js
Normal file
@ -0,0 +1,26 @@
|
||||
import service from "./index";
|
||||
const api = '/mediate/cases/caseFile/'
|
||||
// caseMaterial
|
||||
const apiCaseMaterial = {
|
||||
// 列表
|
||||
getCaseFileList: data => {
|
||||
return service.service.post(`${api}getCaseFileList`, data)
|
||||
},
|
||||
// 查询材料
|
||||
getCaseFileById: data => {
|
||||
return service.service.post(`${api}getCaseFileById`, data)
|
||||
},
|
||||
// 删除
|
||||
deleteCaseFileById: data => {
|
||||
return service.service.post(`${api}deleteCaseFileById`, data)
|
||||
},
|
||||
// 更新
|
||||
updateCaseFileById: data => {
|
||||
return service.service.post(`${api}updateCaseFileById`, data)
|
||||
},
|
||||
// 新增
|
||||
addCaseFile: data => {
|
||||
return service.service.post(`${api}addCaseFile`, data)
|
||||
},
|
||||
}
|
||||
export default apiCaseMaterial;
|
||||
Loading…
x
Reference in New Issue
Block a user