| | |
| | | import { listAllCategory } from "@/api/system/category" |
| | | import { listAllProjectName } from "@/api/system/projectName" |
| | | import { listPlaceName, listAllPlaceName } from "@/api/system/placeName" |
| | | import { judge } from "@/api/system/materials" |
| | | import { judge,getFileCount } from "@/api/system/materials" |
| | | import { UserRoleIdList,unallocatedUserList, authUserSelectAll } from "@/api/system/role" |
| | | import {authManyRecordsToUsers} from "@/api/system/archiverecordstouser" |
| | | |
| | |
| | | { |
| | | //alert(row.id) |
| | | var id = row.id |
| | | var pageCount = row.pageCount |
| | | if(pageCount===undefined||pageCount===0) |
| | | this.$modal.msgWarning('请先补充案卷页数!') |
| | | |
| | | // 在提交之前,调用后端接口检查是否已经上传附件 |
| | | judge(id).then(response => { |
| | | // console.log(response) |
| | | getFileCount(id).then(response => { |
| | | console.log(response) |
| | | // alert(response.data) |
| | | if (response.data===undefined||response.data === false) { |
| | | if (response.length===undefined||response.length === 0) { |
| | | // 如果文件数量为0,提示用户先上传附件 |
| | | this.$modal.msgWarning('请先上传附件,再进行提交操作') |
| | | } else { |
| | | } |
| | | else if(response.length===pageCount) |
| | | { |
| | | // 如果已经上传了附件,继续提交操作 |
| | | var status = '录入完成' |
| | | updateStatusById(status, id).then(response=>{ |
| | | updateStatusById(status, id, '提交案卷').then(response=>{ |
| | | this.$modal.msgSuccess("提交成功") |
| | | this.getList() |
| | | }) |
| | | } |
| | | else |
| | | { |
| | | this.$modal.msgWarning('附件数量上传不足,请继续上传!') |
| | | |
| | | } |
| | | }).catch(error => { |
| | | console.error('检查附件数量失败:', error) |
| | | this.$modal.msgError('检查附件数量失败,请稍后重试') |