diff --git a/src/api/certificateManage/index.js b/src/api/certificateManage/index.js index bb0c837..f229482 100644 --- a/src/api/certificateManage/index.js +++ b/src/api/certificateManage/index.js @@ -251,7 +251,7 @@ export function getCertificateCheckListPageApi(data) { // 证件管理-新增验证 export function addCertificateCheckApi(data) { return request({ - url: '/certificate/certificate_manage/certificateInfo/addCheck', + url: '/certificate/certificate_verify/certificateVerify/add', method: 'post', headers: { //"merchant-id":"378915229716713472", @@ -272,7 +272,7 @@ export function applyCertificateNoListApi(data) { params:data }) } -// 证件领用申请-代领人列表-不分页 +// 证件领用申请-代领人列表-不分页 export function thridListApi(data) { return request({ url: '/certificate/certificate_system/certificateInfo/thridList', @@ -447,4 +447,4 @@ export function getFeedbackListPageApi(data) { }, params:data }) -} \ No newline at end of file +} diff --git a/src/views/certificate/certificateManage/certificateInfo/index.vue b/src/views/certificate/certificateManage/certificateInfo/index.vue index 8b21e6e..07cad3a 100644 --- a/src/views/certificate/certificateManage/certificateInfo/index.vue +++ b/src/views/certificate/certificateManage/certificateInfo/index.vue @@ -116,6 +116,7 @@ :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" + :before-upload="beforeUpload" > - + - + - + @@ -281,7 +282,7 @@ - + @@ -305,6 +306,8 @@ v-model="baseForm.issueLifespan" type="date" placeholder="选择日期" + :picker-options="pickerOptionsIssueDay" + @focus="issueLifespanDateFocus" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> @@ -377,12 +380,24 @@ - + + + + @@ -543,11 +558,20 @@ openTask: false, // 表单参数 taskForm: { + startTime:"", + endTime:"", processDate:"" }, // 表单校验 taskRules: { - processDate: [ + startTime: [ + { + required: true, + message: '核验开始日期不能为空', + trigger: 'blur', + }, + ], + endTime: [ { required: true, message: '核验截止日期不能为空', @@ -555,6 +579,35 @@ }, ] }, + pickerOptionsToday: { + disabledDate(time) { + // 获取今天的日期 + const today = new Date(); + today.setHours(0, 0, 0, 0); // 设置时间为00:00:00,确保比较时只比较日期部分 + // 比较日期,禁用今天之前的日期 + return time.getTime() < today.getTime(); + } + }, + pickerOptionsStart: { + disabledDate(time) { + // 获取今天的日期 + const startTime=this.taskForm.startTime; + const today = new Date(startTime); + today.setHours(0, 0, 0, 0); // 设置时间为00:00:00,确保比较时只比较日期部分 + // 比较日期,禁用今天之前的日期 + return time.getTime() < today.getTime(); + } + }, + pickerOptionsIssueDay:{ + disabledDate(time) { + // 获取今天的日期 + const startTime=this.baseForm.issueDay; + const today = new Date(startTime); + today.setHours(0, 0, 0, 0); // 设置时间为00:00:00,确保比较时只比较日期部分 + // 比较日期,禁用今天之前的日期 + return time.getTime() < today.getTime(); + } + }, }; }, mounted(){ @@ -574,6 +627,51 @@ callback(new Error('请输入有效的身份证号')); // 验证失败,显示错误信息提示 } }, + startDateFocus() { + this.taskForm.endTime = '' + let endTime = this.taskForm.endTime; + if (!endTime) return; + let that = this; + that.pickerOptionsToday = { + disabledDate(time) { + // 获取今天的日期 + const today = new Date(); + today.setHours(0, 0, 0, 0); // 设置时间为00:00:00,确保比较时只比较日期部分 + // 比较日期,禁用今天之前的日期 + return time.getTime() < today.getTime(); + }, + }; + }, + endDateFocus() { + let startTime = this.taskForm.startTime; + if (!startTime) return; + let that = this; + that.pickerOptionsStart = { + disabledDate(time) { + // 获取开始的日期 + const startTime=that.taskForm.startTime; + const today = new Date(startTime); + today.setHours(0, 0, 0, 0); // 设置时间为00:00:00,确保比较时只比较日期部分 + // 比较日期,禁用开始之前的日期 + return time.getTime() < today.getTime(); + }, + }; + }, + issueLifespanDateFocus() { + let startTime = this.baseForm.issueDay; + if (!startTime) return; + let that = this; + that.pickerOptionsIssueDay = { + disabledDate(time) { + // 获取开始的日期 + const startTime=that.baseForm.issueDay; + const today = new Date(startTime); + today.setHours(0, 0, 0, 0); // 设置时间为00:00:00,确保比较时只比较日期部分 + // 比较日期,禁用开始之前的日期 + return time.getTime() < today.getTime(); + }, + }; + }, handleRadioChange(val){ if(val==1){ this.userNameFlage=true; @@ -745,17 +843,26 @@ console.log("this.baseForm",this.baseForm); this.$refs["baseForm"].validate(valid => { if (valid) { - if (this.baseForm.createTime != undefined) { + if (this.baseForm.certificateId != undefined&&this.baseForm.certificateId != null) { updateCertificateInfoApi(this.baseForm).then(response => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); + if(response.code==200){ + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }else{ + this.$modal.msgError(response.msg); + } + }); } else { addCertificateInfoApi(this.baseForm).then(response => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); + if(response.code==200){ + this.$modal.msgSuccess("新增成功"); + this.open = false; + this.getList(); + }else{ + this.$modal.msgError(response.msg); + } }); } } @@ -786,6 +893,8 @@ console.log("this.baseForm2",this.baseForm2); this.$refs["baseForm2"].validate(valid => { if (valid) { + this.$set(this.baseForm,"birthday",this.selectItme.birthday) + this.$set(this.baseForm,"idNumber",this.selectItme.idNumber) this.$set(this.baseForm,"phone",this.selectItme.phone) this.$set(this.baseForm,"name",this.selectItme.userName) this.$set(this.baseForm,"userId",this.selectItme.userId) @@ -829,8 +938,18 @@ ...this.queryParams }, `证件信息_${new Date().getTime()}.xlsx`); }, + beforeUpload(file){ + const isLt2M = file.size / 1024 / 1024 < 0.5; + if (!isLt2M) { + this.$message.error('上传文件大小不能超过 500KB!'); + return false; + } + }, // 文件上传中处理 handleFileUploadProgress(event, file, fileList) { + console.log("============"); + console.log(file); + console.log(file.length); this.upload.isUploading = true }, // 文件上传成功处理 @@ -865,6 +984,10 @@ }, /** 远程校验按钮操作 */ handleTask() { + if(this.userIds==undefined||this.userIds==null||this.userIds.length==0){ + this.$modal.msgError("请选择核验人员!"); + return; + } this.resetTask() this.openTask = true }, @@ -876,19 +999,29 @@ // 表单重置 resetTask() { this.taskForm = { - processDate:"" + startTime:"", + endTime:"" } this.resetForm('taskForm') }, /** 提交按钮 */ submitTask: function () { this.$refs['taskForm'].validate((valid) => { - let param = Object.assign({},this.taskForm) - console.log(param) + let paramd = Object.assign({},this.taskForm) + console.log(paramd) console.log(this.ids) if (valid) { - param.userIds=this.userIds; - param.checkType="2"; + paramd.userIds=this.userIds; + paramd.checkType="2"; + let param={ + verifyTitle:"一人多证核验", + startTime:paramd.startTime, + endTime:paramd.endTime, + verifyUsers:this.userIds, + verifyType:"2", + type:"100000", + noticeType:"2" + } addCertificateCheckApi(param).then(response => { if(response.code=200){ this.$modal.msgSuccess("验证下发成功"); diff --git a/src/views/certificate/certificateManage/certificateOverdue/index.vue b/src/views/certificate/certificateManage/certificateOverdue/index.vue index 402786d..bdae516 100644 --- a/src/views/certificate/certificateManage/certificateOverdue/index.vue +++ b/src/views/certificate/certificateManage/certificateOverdue/index.vue @@ -41,7 +41,7 @@ plain icon="el-icon-download" size="mini" - @click="handleExport" + @click="handleExport" >导出 @@ -61,15 +61,20 @@ - -