From 6429b95aa66bfbb214bcadb248b8b7ca5e754368 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期日, 18 一月 2026 23:17:41 +0800
Subject: [PATCH] 修改相关代码
---
src/views/archiveManager/index.vue | 177 +++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 147 insertions(+), 30 deletions(-)
diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index 6f319d2..b04ef15 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -1,5 +1,6 @@
<template>
<div class="app-container">
+ <el-dialog title="鎼滅储" :visible.sync="openSearch" width="1200px" top="5vh" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="妗f鍙�" prop="recordId">
<el-input
@@ -251,8 +252,18 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
-
+</el-dialog>
<el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ plain
+ icon="el-icon-plus"
+ size="mini"
+ @click="handleSearch"
+
+ >鎼滅储</el-button>
+ </el-col>
<el-col :span="1.5">
<el-button
type="primary"
@@ -296,7 +307,7 @@
>瀵煎嚭</el-button>
</el-col>
- <el-col :span="1.5">
+ <el-col v-if="userId!=1" :span="1.5">
<el-button
type="warning"
plain
@@ -367,7 +378,7 @@
<el-table-column label="鎿嶄綔" align="center" width="190" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
- v-if="scope.row.ownData"
+ v-if="scope.row.ownData && scope.row.recordStatus!='褰曞叆瀹屾垚'"
size="mini"
type="text"
@@ -385,7 +396,7 @@
v-hasPermi="['system:records:edit']"
>鏌ョ湅鍗峰唴鐩綍</el-button>
<el-button
- v-if="userId===1"
+
size="mini"
type="text"
@@ -395,7 +406,7 @@
>瀵煎嚭澶囪�冭〃</el-button>
<el-button
- v-if="userId===1"
+
size="mini"
type="text"
@@ -406,7 +417,7 @@
<el-button
- v-if="userId===1"
+
size="mini"
type="text"
@@ -712,6 +723,9 @@
<el-form-item label="澶囨敞" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" disabled/>
</el-form-item>
+ <el-form-item label="澶囪�冭〃澶囨敞" prop="noteRemark">
+ <el-input v-model="form.noteRemark" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" />
+ </el-form-item>
<el-form-item label="鍘嗗彶鐩稿叧鍙戞枃鍙�" prop="historicalReferenceNumber">
<el-input v-model="form.historicalReferenceNumber" placeholder="璇疯緭鍏ュ巻鍙茬浉鍏冲彂鏂囧彿" disabled/>
</el-form-item>
@@ -897,6 +911,9 @@
<el-form-item label="澶囨敞" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" />
</el-form-item>
+ <el-form-item label="澶囪�冭〃澶囨敞" prop="noteRemark">
+ <el-input v-model="form.noteRemark" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" />
+ </el-form-item>
<el-form-item label="鍘嗗彶鐩稿叧鍙戞枃鍙�" prop="historicalReferenceNumber">
<el-input v-model="form.historicalReferenceNumber" placeholder="璇疯緭鍏ュ巻鍙茬浉鍏冲彂鏂囧彿" />
</el-form-item>
@@ -955,11 +972,11 @@
import axios from 'axios'
import { getToken } from '@/utils/auth'
-import { enload, batchSubmitRecords,updateStatusById,listRecords,getMaxId, getRecords, delRecords, addRecords, updateRecords } from "@/api/system/records"
+import { enload, getIdFileCounts,batchSubmitRecords,updateStatusById,listRecords,getMaxId, getRecords, delRecords, addRecords, updateRecords } from "@/api/system/records"
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"
@@ -970,6 +987,7 @@
name: "Records",
data() {
return {
+ openSearch: false,
totalUser: 0,
visibleUser:false,
userList:[],
@@ -1081,8 +1099,8 @@
"鍏紑灞炴�у繀椤诲綍鍏ワ紝涓诲姩鍏紑銆佷緷鐢宠鍏紑銆佸厤浜堝叕寮�",
"淇濈鏈熼檺:30骞存垨姘镐箙",
"椤靛彿鎸夌収姝e紡褰曞叆椤电爜涓哄噯"], // 閫変腑鐨勬敞瑙e垪琛�
- includeSignature: false, // 鏄惁鍖呭惈绛惧悕鏍�
- selectedSignatures: ['涓氬姟绉戝绉讳氦浜�:', '瀹℃壒绉戠Щ浜や汉:', '妗f鏁寸悊鍏徃:'], // 閫変腑鐨勭鍚嶆爮鍒楄〃
+ includeSignature: false, // 鏄惁鍖呭惈绛惧悕鏍�
+ selectedSignatures: ['涓氬姟绉戝绉讳氦浜�:','瀹℃壒绉�/娉曡绉戠Щ浜や汉:', '瀹℃壒绉戠Щ浜や汉:', '妗f鏁寸悊鍏徃:'], // 閫変腑鐨勭鍚嶆爮鍒楄〃
subselectedSignatures: [],
subselectedAnnotations: [],
signaturePosition: 'bottom' // 绛惧悕鏍忎綅缃細top/bottom
@@ -1162,6 +1180,10 @@
}
},
methods: {
+ handleSearch()
+ {
+ this.openSearch = true;
+ },
/** 閫夋嫨鎺堟潈鐢ㄦ埛鎿嶄綔 */
handleSelectUser() {
// const archiveRecordsId = this.queryParams.archiveRecordsId
@@ -1480,16 +1502,33 @@
/*鏌ョ湅璇︽儏*/
CheckInfo(row)
{
+ var recordStrId = row.recordId
+
+ console.log(recordStrId==='')
+ console.log("+---------------------")
+ if(recordStrId===''||recordStrId==null)
+ {
+ this.$modal.msgWarning("璇疯ˉ鍏呮。妗堝彿淇℃伅锛屽啀缂栬緫鍗峰唴鐩綍锛�")
+
+ return
+ }
+ if( row.projectName==null||row.pageCount==null||row.caseTitle==null||row.constructionUnit==null)
+ {
+ this.$modal.msgWarning("璇峰厛琛ュ厖椤电爜绛夌浉鍏充俊鎭紒")
+ return;
+ }
var mid = row.id
const roleId = 2
// alert(mid)
var recordId = mid
var pageCount = row.pageCount
+ var recordStrId = row.recordId
+ var inquiryNumber = row.inquiryNumber
var sho = false
// this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId)
- this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho)
+ this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho+"/"+recordStrId+"/"+inquiryNumber)
},
/*瀵煎嚭澶囪�冭〃*/
@@ -1510,7 +1549,12 @@
JuanInfo(row)
{
var id = row.id
-
+ console.log(row.pageCount)
+ if(row.pageCount==null)
+ {
+ this.$modal.msgWarning("璇峰厛琛ュ厖椤电爜淇℃伅锛�")
+ return;
+ }
id = Number(id)
var recordId = row.recordId
@@ -1536,7 +1580,18 @@
//鍒ゆ柇蹇呴』淇敼鐨勫瓧娈垫槸鍚﹁ˉ鍏呭畬鏁翠簡
var valid = false;
var pageCount = row.pageCount
- if(row.projectName!=null&&row.pageCount!=null&&row.caseTitle!=null&&row.constructionUnit)
+ var recordStrId = row.recordId
+
+ var inquiryNumber = row.inquiryNumber
+ console.log(recordStrId==='')
+ console.log("+---------------------")
+ if(recordStrId===''||recordStrId==null)
+ {
+ this.$modal.msgWarning("璇疯ˉ鍏呮。妗堝彿淇℃伅锛屽啀缂栬緫鍗峰唴鐩綍锛�")
+
+ return
+ }
+ if( row.projectName!=null&&row.pageCount!=null&&row.caseTitle!=null&&row.constructionUnit!=null)
valid = true;
if (valid) {
var mid = row.id
@@ -1547,7 +1602,7 @@
var sho = true
// this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId)
- this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho)
+ this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho+"/"+recordStrId+"/"+inquiryNumber)
}else
{
this.$modal.msgWarning("璇疯ˉ鍏呴〉鍙风瓑鐩稿叧淇℃伅锛屽啀缂栬緫鍗峰唴鐩綍锛�")
@@ -1559,20 +1614,31 @@
{
//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)
@@ -1622,24 +1688,75 @@
this.getUserList()
},
/** 鎵归噺鎻愪氦 */
- handleBatchSubmit() {
+ async handleBatchSubmit() {
// alert(this.ids)
if (this.ids.length === 0) {
this.$modal.msgWarning('璇烽�夋嫨瑕佹彁浜ょ殑妗f璁板綍')
return
}
- const myValidIds = this.recordsList
- .filter(item => item.ownData === true)
- .map(item => item.id);
- // 妫�鏌ラ�変腑鐨処D鏄惁鍏ㄩ儴灞炰簬鑷繁
- const invalidIds = this.ids.filter(id => !myValidIds.includes(id));
+ const validRecords = this.recordsList
+ // .filter(item => item.ownData === true)
+ // 1. 杞崲recordsList涓簆ageCount鏄犲皠锛堟牳蹇冩楠わ級
+ const recordPageCountMap = this.recordsList.reduce((map, item) => {
+ map[String(item.id)] = item.pageCount || item.totalpageCount || 0;
+ return map;
+ }, {});
- if (invalidIds.length > 0) {
- this.$message.error(`鍖呭惈鏃犳潈鎿嶄綔鐨処D: ${invalidIds.join(',')}`);
- return false;
+
+ console.log("-------")
+
+ let recordFileCountMap = {};
+ try {
+ // 璋冪敤鎺ュ彛锛氬叆鍙備负鏈夋潈鎿嶄綔鐨処D鍒楄〃锛岃繑鍥� { recordId: 闄勪欢鏁�, ... }
+ const response = await getIdFileCounts(this.ids)
+ // 鍋囪鎺ュ彛杩斿洖鏍煎紡锛歿 code: 0, data: { "1001": 5, "1002": 8 } }
+ if (response.code === 200) {
+ recordFileCountMap = response.data;
+ // alert(434343)
+ } else {
+ this.$modal.msgError('鑾峰彇闄勪欢鏁伴噺澶辫触锛�' + response.msg);
+ return;
}
+ } catch (error) {
+ this.$modal.msgError('鎺ュ彛璋冪敤澶辫触锛�' + error.message);
+ return;
+ }
+
+ // 3. 鏍稿績锛氱瓫閫夊嚭銆岄檮浠舵暟绛変簬鑷韩totalpageCount銆嶇殑鏈夋晥ID
+ const submitAbleIds = []; // 瀛樺偍鎵�鏈夌鍚堟潯浠剁殑ID
+ const invalidAttachIds = []; // 瀛樺偍闄勪欢鏁颁笉鍖归厤鐨処D锛堢敤浜庢彁绀猴級
+
+ for (const id of this.ids) {
+ // 鏇挎崲涓洪」鐩疄闄呭瓧娈靛悕
+ const attachmentCount = recordFileCountMap[id] || 0;
+ const recordTotalPage = recordPageCountMap[id] || 0;
+ if (attachmentCount === recordTotalPage) {
+ submitAbleIds.push(id); // 绗﹀悎鏉′欢锛屽姞鍏ユ彁浜ゅ垪琛�
+ } else {
+ invalidAttachIds.push({
+ id: id,
+
+ required: recordTotalPage
+ });
+ }
+ }
+
+ // 4. 鎻愮ず闄勪欢鏁颁笉鍖归厤鐨勮褰�
+ if (invalidAttachIds.length > 0) {
+ const tipMsg = invalidAttachIds.map(item =>
+ `(ID:${item.id}) 锛岃姹�${item.required}涓猔
+ ).join('锛�');
+ this.$modal.msgWarning(`浠ヤ笅璁板綍闄勪欢鏁伴噺涓嶅尮閰嶏紝灏嗚烦杩囨彁浜わ細${tipMsg}`);
+ }
+
+ // 5. 妫�鏌ユ槸鍚︽湁鍙彁浜ょ殑ID
+ if (submitAbleIds.length === 0) {
+ this.$modal.msgWarning('鏆傛棤绗﹀悎鎵�鏈夋潯浠剁殑璁板綍鍙彁浜�');
+ return;
+ }
+
//濡傛灉id鍏ㄩ儴鏈夋晥鎵嶇户缁彁浜�
- batchSubmitRecords( this.ids ).then(response => {
+ batchSubmitRecords( submitAbleIds ).then(response => {
if (response.code === 0) {
this.$modal.msgSuccess('鎵归噺鎻愪氦鎴愬姛')
this.getList()
@@ -2113,7 +2230,7 @@
includeQrCode: this.excelOptions.includeQrCode
};
console.log(params)
- alert(457)
+ // alert(457)
axios({
method: 'Post',
--
Gitblit v1.9.1