Browse Source

批量归档

sangwenwei 1 year ago
parent
commit
b2c869b06b

+ 65 - 0
src/api/cw/fillingbatch/FillingbatchService.js

@@ -0,0 +1,65 @@
+import request from "@/utils/httpRequest";
+import { FINANCE_PATH as prefix } from "../../AppPath";
+
+export default {
+	list: function (params) {
+		return request({
+			url: prefix + "/cwFillingbatch/list",
+			method: "get",
+			params: params,
+		});
+	},
+	queryById: function (id) {
+		return request({
+			url: prefix + "/cwFillingbatch/queryById",
+			method: "get",
+			params: { id: id },
+		});
+	},
+	remove: function (ids) {
+		return request({
+			url: prefix + "/cwFillingbatch/delete",
+			method: "delete",
+			params: { ids: ids },
+		});
+	},
+	getProjectList: function (params) {
+		return request({
+			url: prefix + "/cwFillingbatch/getProjectList",
+			method: "get",
+			params: params,
+		});
+	},
+	saveForm: function (inputForm) {
+		return request({
+			url: prefix + `/cwFillingbatch/save`,
+			method: "post",
+			data: inputForm,
+		});
+	},
+	updateStatusById: function (data) {
+		return request({
+			url: prefix + "/cwFillingbatch/updateStatusById",
+			method: "post",
+			data: data,
+		});
+	},
+	exportTemplate: function () {
+		return request({
+			url: prefix + "/cwFillingbatch/template",
+			method: "get",
+			responseType: "blob",
+		});
+	},
+	importDetail: function (data) {
+		return request({
+			url: prefix + "/cwFillingbatch/importDetail",
+			method: "post",
+			data: data,
+		});
+	},
+
+
+
+
+};

+ 145 - 0
src/views/cw/fillingbatch/FileForm.vue

@@ -0,0 +1,145 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1400px"
+      @close="close"
+      @keyup.enter.native="doSubmit"
+      v-model="visible">
+      <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+               label-width="100px" @submit.native.prevent>
+		  <el-button  type="primary" :disabled="this.method === 'edit'"  @click="insertEvent" plain>
+			  添加文件信息
+		  </el-button>
+		  <vxe-table
+			  border
+			  show-overflow
+			  show-footer
+			  :column-config="{resizable: true}"
+			  ref="fileTable"
+			  :key="tableKeyFile"
+			  class="vxe-table-element"
+			  :data="inputForm.fileList"
+			  style=""
+			  highlight-current-row
+			  :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}">
+			  <vxe-column min-width="200" title="文件类型" align="center" field="projectNumber" show-overflow="title">
+				  <template #default="scope">
+					  <el-input v-model="scope.row.projectNumber"></el-input>
+				  </template>
+			  </vxe-column>
+			  <vxe-column min-width="200" title="文件描述" align="center" field="name">
+				  <template #default="scope">
+					  <el-input  v-model="scope.row.name"></el-input>
+				  </template>
+			  </vxe-column>
+			  <vxe-table-column align="center" title="操作" width="100">
+				  <template #default="scope">
+					  <el-button type="danger" @click="removeEvent(scope.row,scope.$rowIndex)">删除</el-button>
+				  </template>
+			  </vxe-table-column>
+		  </vxe-table>
+      </el-form>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  // import ReimbursementTypeService from '@/api/sys/ReimbursementTypeService'
+  // import OfficeService from '@/api/sys/OfficeService'
+  export default {
+    data () {
+      return {
+        disabled: false,
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+			fileList:[],
+			parentId:'',
+			id:''
+        },
+		  tableKeyFile:''
+      }
+    },
+    // reimbursementTypeService: null,
+
+    // OfficeService: null,
+    created () {
+      // this.reimbursementTypeService = new ReimbursementTypeService()
+      // this.officeService = new OfficeService()
+    },
+    components: {
+
+    },
+    methods: {
+      init (method, row) {
+        this.method = method
+        this.inputForm = {
+			fileList:[]
+        }
+        if (method === 'add') {
+			this.inputForm.parentId = row.reportId
+          this.title = `添加项目文件`
+        } else if (method === 'edit') {
+        	this.inputForm.id=row.id
+			this.inputForm.parentId = row.reportId
+          this.title = '修改项目文件'
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          if (method === 'edit') { // 修改或者查看
+          	console.log('row',row)
+            this.loading = true
+            this.$refs.inputForm.resetFields()
+			  if (this.commonJS.isEmpty(this.inputForm.fileList)){
+				  this.inputForm.fileList = []
+			  }
+			  this.$refs.fileTable.insertAt(row)
+            this.inputForm.fileList.push(row)
+
+			  this.loading = false
+          }
+        })
+      },
+      // 表单提交
+      doSubmit () {
+		  this.close()
+		  console.log('this.inputForm.fileList',this.inputForm.fileList)
+		  this.$emit('getFile',this.inputForm.fileList)
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      },
+	  insertEvent(){
+		  let d = {
+			  projectNumber: '',
+			  name: '',
+			  parentId:this.inputForm.parentId
+		  }
+		  if (this.commonJS.isEmpty(this.inputForm.fileList)) {
+			  this.inputForm.fileList = []
+		  }
+		  this.$refs.fileTable.insertAt(d)
+		  this.inputForm.fileList.push(d)
+		  this.tableKeyFile = Math.random()
+		  console.log('this.inputForm.fileList',this.inputForm.fileList)
+	  },
+		removeEvent(row,rowIndex){
+			this.$refs.fileTable.remove(row)
+			this.inputForm.fileList.splice(rowIndex, 1)
+		}
+    }
+  }
+</script>

+ 533 - 0
src/views/cw/fillingbatch/FillingbatchDia.vue

@@ -0,0 +1,533 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1400px"
+			height="500px"
+			@close="close"
+			append-to-body
+			v-model="visible">
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method ='view'"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				归档批次基本信息
+			</el-divider>
+			<el-row :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="归档批次号" prop="no"
+								  :rules="[
+               ]">
+						<el-input :disabled="true" placeholder="自动生成归档批次号" v-model="inputForm.no" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="归档人" prop="createName"
+								  :rules="[
+               ]">
+						<el-input :disabled="true" placeholder="归档人" v-model="inputForm.createName" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="归档名称" prop="name"
+								  :rules="[
+								  {required: true, message:'归档名称不能为空', trigger:'blur'},
+               ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail'" placeholder="请填写归档名称" v-model="inputForm.name" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="归档说明" prop="remarks"
+								  :rules="[
+               ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail'" maxlength="500"  type="textarea" placeholder="请填写归档说明" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				归档项目信息 (<a style="color: red;font-size: 14px">根据档案管理要求,一次批量归档的报告号类型需一致,不能混装。如:全是“苏兴咨字【xx】xx”或全是“苏兴内审字【xx】xx”</a>)
+			</el-divider>
+			<el-row :gutter="15">
+				<el-button style="margin-left: 80px" type="primary" :disabled="status === 'audit' || status === 'taskFormDetail'"  @click="insertEvent" plain>
+					添加项目信息
+				</el-button>
+				<el-popover
+					placement="top"
+					width="400"
+					v-model="importVisible">
+					<p>请先下载模板,然后再进行导入操作</p>
+<!--					<el-row :gutter="1">-->
+<!--						<el-col :span="6">-->
+<!--							<el-button :disabled="status === 'audit'?false:true" type="success" @click="downloadTpl">下载模板</el-button>-->
+<!--						</el-col>-->
+<!--					</el-row>-->
+					<template #reference>
+						<el-button style="margin-left: 20px" :disabled="status === 'audit' || status === 'taskFormDetail'"  type="warning" plain>导入</el-button>
+					</template>
+				</el-popover>
+			</el-row>
+			<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+					 label-width="160px" @submit.native.prevent>
+				<el-row  :gutter="15">
+					<el-col :span="24">
+						<vxe-table
+							border
+							show-overflow
+							show-footer
+							:column-config="{resizable: true}"
+							ref="batchTable"
+							:key="tableKeyProject"
+							class="vxe-table-element"
+							:data="inputForm.cwFillingbatchProjects"
+							style="margin-left: 5em"
+							highlight-current-row
+							:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+							:tree-config="{transform: true,rowField: 'id', parentField: 'parentId', accordion: true}"
+							row-id="id">
+							<vxe-column title="归档项目编号/文件类型" field="projectNumber" align="center" tree-node>
+								<template v-slot:edit="scope">
+									<el-input  v-model="scope.row.projectNumber" :disabled="true"></el-input>
+								</template>
+							</vxe-column>
+							<vxe-column title="归档项目名称/文件描述" field="name" align="center">
+								<template v-slot:edit="scope">
+									<el-input  v-model="scope.row.name" :disabled="true"></el-input>
+								</template>
+							</vxe-column>
+							<vxe-column title="报告号" field="no" align="center">
+								<template #edit="{ row }">
+									<vxe-input v-model="row.no" type="text" :disabled="true" @focus="getProjectInfo(row.id)"></vxe-input>
+								</template>
+							</vxe-column>
+							<vxe-column title="案卷号" field="achiveNo" align="center" :edit-render="{}" >
+								<template v-slot:edit="scope">
+									<el-input :disabled="scope.row.level !== '1' || status === 'taskFormDetail' || method === 'view'" placeholder="案卷号"  v-model="scope.row.achiveNo" ></el-input>
+								</template>
+							</vxe-column>
+							<vxe-column title="状态" field="projectStatus" align="center" :edit-render="{name: '$select', options: $dictUtils.getDictList('cw_project_achieves_status')}" >
+								<template v-slot:edit="scope">
+									<vxe-select v-model="scope.row.projectStatus" :disabled="scope.row.level !== '1' || status === 'taskFormDetail' || method === 'view'" placeholder="状态">
+										<vxe-option
+											v-for="item in $dictUtils.getDictList('cw_project_achieves_status')"
+											:key="item.value"
+											:label="item.label"
+											:value="item.value">
+										</vxe-option>
+									</vxe-select>
+								</template>
+							</vxe-column>
+							<vxe-column title="操作" width="230px" fixed="right" align="center">
+								<template  #default="scope">
+									<el-button v-if="scope.row.level === '1'" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" text type="primary" @click="add(scope.row)">添加</el-button>
+									<el-button v-if="scope.row.level !== '1'" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" text type="primary" @click="edit(scope.row)">修改</el-button>
+									<el-button text type="primary" v-if="scope.row.level === '1'"  :disabled ="scope.row.level === '1' && commonJS.isNotEmpty(scope.row.children)" @click="removeEvent(scope.row,scope.$rowIndex)">删除</el-button>
+									<el-button text type="primary" v-if="scope.row.level !== '1'" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @click="removeEvent(scope.row,scope.$rowIndex)">删除</el-button>
+								</template>
+							</vxe-column>
+						</vxe-table>
+					</el-col>
+				</el-row>
+			</el-form>
+		</el-form>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			</span>
+			</template>
+		</el-dialog>
+		<ProgramPageForm ref="programPageForm" @getProgram = "getProgram"></ProgramPageForm>
+		<FileForm ref="fileForm" @getFile="getFile"></FileForm>
+		<ProjectRecordsForm2 ref="projectRecordsForm2"></ProjectRecordsForm2>
+
+	</div>
+</template>
+
+<script>
+	// import XEUtils from 'xe-utils'
+	import fillingbatchService from '@/api/cw/fillingbatch/FillingbatchService'
+	import ProgramPageForm from "./ProgramPageForm";
+	import FileForm from "./FileForm";
+	import ProjectRecordsForm2 from '../projectRecords/ProjectRecordsForm2'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					no: '',
+					createById: '',
+					createName: '',
+					name: '',
+					remarks: '',
+					cwFillingbatchProjects: []
+				},
+				programRow: '',
+				err: '',
+				keyWatch: '',
+				tableKeyProject:''
+
+			}
+		},
+		created() {
+		},
+		mounted() {
+		},
+		components: {
+			ProgramPageForm,
+			FileForm,
+			ProjectRecordsForm2
+		},
+		computed: {
+			bus: {
+				get() {
+					// this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set(val) {
+					this.businessId = val
+				},
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler(newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler(newVal) {
+					this.$emit('changeLoading', newVal)
+					// this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				if (method === 'add') {
+					this.title = '新建项目'
+				} else {
+					this.title = '查看归档信息'
+				}
+				this.method = method
+				this.inputForm = {
+					no: '',
+					createById: '',
+					createName: '',
+					name: '',
+					remarks: '',
+					cwFillingbatchProjects: []
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.visible = true
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					fillingbatchService.queryById(this.inputForm.id).then((data) => {
+
+						this.inputForm = this.recover(this.inputForm, data)
+						if (this.commonJS.isEmpty(this.inputForm.createName)){
+							this.inputForm.createById = this.$store.state.user.id
+							this.inputForm.createName = this.$store.state.user.name
+						}
+						if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects)){
+							this.inputForm.cwFillingbatchProjects = []
+						}
+						console.log('this.inputForm',this.inputForm)
+						this.expandAllTreeEvent()
+						this.loading = false
+					})
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					fillingbatchService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await fillingbatchService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.doSubmit('agree', callback)
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				fillingbatchService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					fillingbatchService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					// 送审  待审核
+					if (this.commonJS.isEmpty(this.inputForm.name)){
+						this.loading = false
+						this.$message.warning('归档名称为空,请填写')
+						throw new Error()
+					}
+					if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects)){
+						this.loading = false
+						this.$message.warning('请选择归档项目')
+						throw new Error()
+					}
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					for (let i = 0; i < this.inputForm.cwFillingbatchProjects.length; i++) {
+						if (this.inputForm.cwFillingbatchProjects[i].level === '1'){
+							if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects[i].achiveNo)){
+								this.loading = false
+								this.$message.error('第'+(i+1)+'行的案卷号未填写')
+								throw new Error('第'+(i+1)+'行的案卷号未填写')
+							}
+							if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects[i].projectStatus)){
+								this.loading = false
+								this.$message.error('第'+(i+1)+'行的项目状态未选择')
+								throw new Error('第'+(i+1)+'行的项目状态未选择')
+							}
+						}
+					}
+
+					// 审核同意
+					this.inputForm.status = '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('this.inputForm',this.inputForm)
+						fillingbatchService.saveForm(this.inputForm).then((data) => {
+							this.inputForm.id = data.businessId
+							console.log('data22', data)
+							callback(data.businessTable, data.businessId, this.inputForm, data.recordType)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					no: '',
+					createById: '',
+					createByName: '',
+					name: '',
+					remarks: '',
+					cwFillingbatchProjects: []
+				}
+				this.visible = false
+			},
+			insertEvent() {
+				this.$refs.programPageForm.init()
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					fillingbatchService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								fillingbatchService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					fillingbatchService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							fillingbatchService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+			// 下载模板
+			downloadTpl() {
+				this.loading = true
+				fillingbatchService.exportTemplate().then((res) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadExcel(res, '发票明细导入模板')
+					this.loading = false
+				}).catch(function (err) {
+					this.loading = false
+					if (err.response) {
+						console.log(err.response)
+					}
+				})
+			},
+
+			detailPushCode(data) {
+				if (this.commonJS.isNotEmpty(data)) {
+					data.forEach(item => {
+						if (this.commonJS.isNotEmpty(item.taxpayerIdentificationNo)) {
+							if (item.taxpayerIdentificationNo === this.inputForm.taxpayerIdentificationNo) {
+								this.getAmount(item)
+								this.getTax(item)
+								this.inputForm.financeInvoiceDetailDTOList.push(item)
+								this.detailKey = Math.random()
+							}
+						}
+					})
+				}
+				this.$message.success('导入完成')
+			},
+			getProgram(rows){
+				if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects)) {
+					this.inputForm.cwFillingbatchProjects = []
+				}
+				console.log('row',rows)
+				rows.forEach(item => {
+					let d={
+						reportId: item.reportId,
+						projectNumber : item.projectNumber,
+						name : item.name,
+						no :item.no,
+						parentId :'',
+						level:item.level,
+						id:item.reportId
+					}
+					this.$refs.batchTable.insertAt(d)
+					this.inputForm.cwFillingbatchProjects.push(d)
+					this.tableKeyProject = Math.random()
+				})
+				console.log('this.inputForm.cwFillingbatchProjects',this.inputForm.cwFillingbatchProjects)
+			},
+			add(row){
+				this.$refs.fileForm.init('add',row)
+			},
+			getFile(list){
+				console.log('list',list)
+
+				list.forEach(item=>{
+					if (this.commonJS.isEmpty(item.id)){
+						this.$refs.batchTable.insertAt(item)
+						this.inputForm.cwFillingbatchProjects.push(item)
+						this.tableKeyProject = Math.random()
+					}
+				})
+				console.log('this.inputForm.cwFillingbatchProjects1',this.inputForm.cwFillingbatchProjects)
+			},
+			removeEvent(row,rowIndex){
+				this.$refs.batchTable.remove(row)
+				this.inputForm.cwFillingbatchProjects.splice(rowIndex, 1)
+			},
+			edit(row){
+				this.$refs.fileForm.init('edit',row)
+			},
+			getProjectInfo(id){
+				this.$refs.projectRecordsForm2.init('view', id)
+			},
+			//展开行
+			expandAllTreeEvent(){
+				console.log('121')
+				this.$refs.batchTable.setAllTreeExpand(true)
+			}
+
+
+
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight: 700;
+	}
+</style>

+ 552 - 0
src/views/cw/fillingbatch/FillingbatchForm.vue

@@ -0,0 +1,552 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				归档批次基本信息
+			</el-divider>
+			<el-row :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="归档批次号" prop="no"
+								  :rules="[
+               ]">
+						<el-input :disabled="true" placeholder="自动生成归档批次号" v-model="inputForm.no" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="归档人" prop="createName"
+								  :rules="[
+               ]">
+						<el-input :disabled="true" placeholder="归档人" v-model="inputForm.createName" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="归档名称" prop="name"
+								  :rules="[
+								  {required: true, message:'归档名称不能为空', trigger:'blur'},
+               ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail'" placeholder="请填写归档名称" v-model="inputForm.name" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="归档说明" prop="remarks"
+								  :rules="[
+               ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail'" maxlength="500"  type="textarea" placeholder="请填写归档说明" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				归档项目信息 (<a style="color: red;font-size: 14px">根据档案管理要求,一次批量归档的报告号类型需一致,不能混装。如:全是“苏兴咨字【xx】xx”或全是“苏兴内审字【xx】xx”</a>)
+			</el-divider>
+			<el-row :gutter="15">
+				<el-button style="margin-left: 80px" type="primary" :disabled="status === 'audit' || status === 'taskFormDetail'"  @click="insertEvent" plain>
+					添加项目信息
+				</el-button>
+				<el-popover
+					placement="top"
+					width="400"
+					v-model="importVisible">
+					<p>请先下载模板,然后再进行导入操作</p>
+					<el-row :gutter="1">
+						<el-col :span="6">
+							<el-button :disabled="status === 'audit' || status === 'taskFormDetail'" type="success" @click="downloadTpl">下载模板</el-button>
+						</el-col>
+						<el-col :span="6">
+							<el-upload
+								action=""
+								:auto-upload="false"
+								:on-change="beforeUploadDetail"
+								:show-file-list="false">
+								<el-button :disabled="status === 'audit' || status === 'taskFormDetail'" type="primary">导入全部</el-button>
+							</el-upload>
+						</el-col>
+					</el-row>
+					<template #reference>
+						<el-button style="margin-left: 20px" :disabled="status === 'audit' || status === 'taskFormDetail'" type="warning" plain>导入</el-button>
+					</template>
+				</el-popover>
+			</el-row>
+			<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+					 label-width="160px" @submit.native.prevent>
+				<el-row  :gutter="15">
+					<el-col :span="24">
+						<vxe-table
+							border
+							show-overflow
+							show-footer
+							:column-config="{resizable: true}"
+							ref="batchTable"
+							:key="tableKeyProject"
+							class="vxe-table-element"
+							:data="inputForm.cwFillingbatchProjects"
+							style="margin-left: 5em"
+							highlight-current-row
+							:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+							:tree-config="{transform: true,rowField: 'id', parentField: 'parentId', accordion: true}"
+							row-id="id">
+							<vxe-column title="归档项目编号/文件类型" field="projectNumber" align="center" tree-node>
+								<template v-slot:edit="scope">
+									<el-input  v-model="scope.row.projectNumber" :disabled="true"></el-input>
+								</template>
+							</vxe-column>
+							<vxe-column title="归档项目名称/文件描述" field="name" align="center">
+								<template v-slot:edit="scope">
+									<el-input  v-model="scope.row.name" :disabled="true"></el-input>
+								</template>
+							</vxe-column>
+							<vxe-column title="报告号" field="no" align="center">
+								<template #default="scope">
+									<el-link  type="primary" :underline="false" v-if="status === 'audit' || status === 'taskFormDetail'" @click="getProjectInfo(scope.row.id)">{{scope.row.no}}</el-link>
+									<el-link  style="color: #1b1e25" type="primary" :underline="false" v-else>{{scope.row.no}}</el-link>
+								</template>
+							</vxe-column>
+							<vxe-column title="案卷号" field="achiveNo" align="center" :edit-render="{}" v-if="(status === 'audit' || status === 'taskFormDetail')">
+								<template v-slot:edit="scope">
+									<el-input :disabled="scope.row.level !== '1' || status === 'taskFormDetail'" placeholder="案卷号"  v-model="scope.row.achiveNo" ></el-input>
+								</template>
+							</vxe-column>
+							<vxe-column title="状态" field="projectStatus" align="center" :edit-render="{name: '$select', options: $dictUtils.getDictList('cw_project_achieves_status')}"  v-if="status === 'audit' || status === 'taskFormDetail'">
+								<template v-slot:edit="scope">
+									<vxe-select v-model="scope.row.projectStatus" :disabled="scope.row.level !== '1' || status === 'taskFormDetail'" placeholder="状态">
+										<vxe-option
+											v-for="item in $dictUtils.getDictList('cw_project_achieves_status')"
+											:key="item.value"
+											:label="item.label"
+											:value="item.value">
+										</vxe-option>
+									</vxe-select>
+								</template>
+							</vxe-column>
+							<vxe-column title="操作" width="230px" fixed="right" align="center">
+								<template  #default="scope">
+									<el-button v-if="scope.row.level === '1'" :disabled="status === 'audit' || status === 'taskFormDetail'" text type="primary" @click="add(scope.row)">添加</el-button>
+									<el-button v-if="scope.row.level !== '1'" :disabled="status === 'audit' || status === 'taskFormDetail'" text type="primary" @click="edit(scope.row)">修改</el-button>
+									<el-button text type="primary" v-if="scope.row.level === '1'"  :disabled ="scope.row.level === '1' && commonJS.isNotEmpty(scope.row.children)" @click="removeEvent(scope.row,scope.$rowIndex)">删除</el-button>
+									<el-button text type="primary" v-if="scope.row.level !== '1'" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="removeEvent(scope.row,scope.$rowIndex)">删除</el-button>
+								</template>
+							</vxe-column>
+						</vxe-table>
+					</el-col>
+				</el-row>
+			</el-form>
+		</el-form>
+		<ProgramPageForm ref="programPageForm" @getProgram = "getProgram"></ProgramPageForm>
+		<FileForm ref="fileForm" @getFile="getFile"></FileForm>
+		<ProjectRecordsForm2 ref="projectRecordsForm2"></ProjectRecordsForm2>
+	</div>
+</template>
+
+<script>
+	// import XEUtils from 'xe-utils'
+	import fillingbatchService from '@/api/cw/fillingbatch/FillingbatchService'
+	import ProgramPageForm from "./ProgramPageForm";
+	import FileForm from "./FileForm";
+	import ProjectRecordsForm2 from '../projectRecords/ProjectRecordsForm2'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					no: '',
+					createById: '',
+					createName: '',
+					name: '',
+					remarks: '',
+					cwFillingbatchProjects: []
+				},
+				programRow: '',
+				err: '',
+				keyWatch: '',
+				tableKeyProject:''
+
+			}
+		},
+		created() {
+		},
+		mounted() {
+		},
+		components: {
+			ProgramPageForm,
+			FileForm,
+			ProjectRecordsForm2
+		},
+		computed: {
+			bus: {
+				get() {
+					// this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set(val) {
+					this.businessId = val
+				},
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler(newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler(newVal) {
+					this.$emit('changeLoading', newVal)
+					// this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm = {
+					no: '',
+					createById: '',
+					createName: '',
+					name: '',
+					remarks: '',
+					cwFillingbatchProjects: []
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					fillingbatchService.queryById(this.inputForm.id).then((data) => {
+
+						this.inputForm = this.recover(this.inputForm, data)
+						if (this.commonJS.isEmpty(this.inputForm.createName)){
+							this.inputForm.createById = this.$store.state.user.id
+							this.inputForm.createName = this.$store.state.user.name
+						}
+						if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects)){
+							this.inputForm.cwFillingbatchProjects = []
+						}
+						console.log('this.inputForm',this.inputForm)
+						this.expandAllTreeEvent()
+						this.loading = false
+					})
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					fillingbatchService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await fillingbatchService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						for (let i = 0; i < this.inputForm.cwFillingbatchProjects.length; i++) {
+							if (this.inputForm.cwFillingbatchProjects[i].level === '1'){
+								if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects[i].achiveNo)){
+									this.loading = false
+									this.$message.error('第'+(i+1)+'行的案卷号未填写')
+									throw new Error('第'+(i+1)+'行的案卷号未填写')
+								}
+								if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects[i].projectStatus)){
+									this.loading = false
+									this.$message.error('第'+(i+1)+'行的项目状态未选择')
+									throw new Error('第'+(i+1)+'行的项目状态未选择')
+								}
+							}
+						}
+
+						// 审核同意
+						this.inputForm.status = '5'
+						fillingbatchService.updateStatusById(this.inputForm).then(() => {
+							this.inputForm.id = data.businessId
+							console.log('data22', data)
+							callback(data.businessTable, data.businessId, this.inputForm, data.recordType)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				fillingbatchService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					fillingbatchService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					// 送审  待审核
+					if (this.commonJS.isEmpty(this.inputForm.name)){
+						this.loading = false
+						this.$message.warning('归档名称为空,请填写')
+						throw new Error()
+					}
+					if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects)){
+						this.loading = false
+						this.$message.warning('请选择归档项目')
+						throw new Error()
+					}
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					for (let i = 0; i < this.inputForm.cwFillingbatchProjects.length; i++) {
+						if (this.inputForm.cwFillingbatchProjects[i].level === '1'){
+							if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects[i].achiveNo)){
+								this.loading = false
+								this.$message.error('第'+(i+1)+'行的案卷号未填写')
+								throw new Error('第'+(i+1)+'行的案卷号未填写')
+							}
+							if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects[i].projectStatus)){
+								this.loading = false
+								this.$message.error('第'+(i+1)+'行的项目状态未选择')
+								throw new Error('第'+(i+1)+'行的项目状态未选择')
+							}
+						}
+					}
+
+					// 审核同意
+					this.inputForm.status = '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('this.inputForm',this.inputForm)
+						fillingbatchService.saveForm(this.inputForm).then((data) => {
+							this.inputForm.id = data.businessId
+							console.log('data22', data)
+							callback(data.businessTable, data.businessId, this.inputForm, data.recordType)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					no: '',
+					createById: '',
+					createByName: '',
+					name: '',
+					remarks: '',
+					cwFillingbatchProjects: []
+				}
+				this.visible = false
+			},
+			insertEvent() {
+				this.$refs.programPageForm.init()
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					fillingbatchService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								fillingbatchService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					fillingbatchService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							fillingbatchService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+			// 下载模板
+			downloadTpl() {
+				this.loading = true
+				fillingbatchService.exportTemplate().then((res) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadExcel(res, '批量归档导入模板')
+					this.loading = false
+				}).catch(function (err) {
+					this.loading = false
+					if (err.response) {
+						console.log(err.response)
+					}
+				})
+			},
+
+			getProgram(rows){
+				if (this.commonJS.isEmpty(this.inputForm.cwFillingbatchProjects)) {
+					this.inputForm.cwFillingbatchProjects = []
+				}
+				console.log('row',rows)
+				rows.forEach(item => {
+					let d={
+						reportId: item.reportId,
+						projectNumber : item.projectNumber,
+						name : item.name,
+						no :item.no,
+						parentId :'',
+						level:item.level,
+						id:item.reportId
+					}
+					this.$refs.batchTable.insertAt(d)
+					this.inputForm.cwFillingbatchProjects.push(d)
+					this.tableKeyProject = Math.random()
+				})
+				console.log('this.inputForm.cwFillingbatchProjects',this.inputForm.cwFillingbatchProjects)
+			},
+			add(row){
+				this.$refs.fileForm.init('add',row)
+			},
+			getFile(list){
+				console.log('list',list)
+
+				list.forEach(item=>{
+					if (this.commonJS.isEmpty(item.id)){
+						this.$refs.batchTable.insertAt(item)
+						this.inputForm.cwFillingbatchProjects.push(item)
+						this.tableKeyProject = Math.random()
+					}
+				})
+				console.log('this.inputForm.cwFillingbatchProjects1',this.inputForm.cwFillingbatchProjects)
+			},
+			removeEvent(row,rowIndex){
+				this.$refs.batchTable.remove(row)
+				this.inputForm.cwFillingbatchProjects.splice(rowIndex, 1)
+			},
+			edit(row){
+				this.$refs.fileForm.init('edit',row)
+			},
+			getProjectInfo(id){
+				this.$refs.projectRecordsForm2.init('view', id)
+			},
+			//展开行
+			expandAllTreeEvent(){
+				console.log('121')
+				this.$refs.batchTable.setAllTreeExpand(true)
+			},
+			beforeUploadDetail(file) {
+				const formBody = new FormData()
+				formBody.append('file', file.raw)
+				this.loading = true
+				fillingbatchService.importDetail(formBody).then(async (result) => {
+					if (this.commonJS.isEmpty(result)) {
+						this.importVisible = false
+						this.loading = false
+						throw new Error()
+					}
+					for await (let item of result) {
+						this.$refs.batchTable.insertAt(item)
+						this.inputForm.cwFillingbatchProjects.push(item)
+						this.tableKeyProject = Math.random()
+					}
+					this.importVisible = false
+					this.loading = false
+				}).catch(() => {
+					this.importVisible = false
+					this.loading = false
+				})
+			},
+
+
+
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight: 700;
+	}
+</style>

+ 393 - 0
src/views/cw/fillingbatch/FillingbatchList.vue

@@ -0,0 +1,393 @@
+<template>
+	<div class="page">
+		<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+				 @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item label="归档名称" prop="name">
+				<el-input v-model="searchForm.name" placeholder="请输入归档名称" clearable></el-input>
+			</el-form-item>
+			<el-form-item label="状态" prop="status">
+				<el-select v-model="searchForm.status" placeholder="请选择" style="width:100%;">
+					<el-option
+						v-for="item in $dictUtils.getDictList('filed_type')"
+						:key="item.value"
+						:label="item.label"
+						:value="item.value">
+					</el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" prop="createDates" label="创建时间:">
+				<el-date-picker
+					placement="bottom-start"
+					v-model="searchForm.createDates"
+					type="datetimerange"
+					range-separator="至"
+					start-placeholder="开始日期"
+					end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="创建人" prop="createById">
+				<UserSelect2 :limit='1' :modelValue="searchForm.createById"
+							 @update:modelValue='(value, label) => {searchForm.createById = value}'></UserSelect2>
+			</el-form-item>
+			<el-form-item>
+				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('fillingbatch:add')" type="primary" icon="el-icon-plus"
+							   @click="add()">新建
+					</el-button>
+					<!--          <el-button v-if="hasPermission('program:configuration:type:del')" type="danger"  icon="el-icon-delete" @click="del()" :disabled="$refs.typeTable && $refs.typeTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+				</template>
+			</vxe-toolbar>
+			<div style="height: calc(100% - 50px)">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="batchTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:tree-config="{transform: true, rowField: 'id', parentField: 'parentId'}"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column title="归档批次号/报告号" field="no" align="center" tree-node>
+						<template #default="scope">
+							<el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectRecords:view')" @click="view(scope.row)">{{scope.row.no}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column title="批次名称/项目名称" field="name" align="center"></vxe-column>
+					<vxe-column title="创建人" field="createName" align="center"></vxe-column>
+					<vxe-column title="创建时间" field="createTime" align="center"></vxe-column>
+					<vxe-column title="状态" field="status" align="center">
+						<template #default="scope">
+							<el-button :disabled="scope.row.level !=='1'" @click="detail(scope.row)"
+									   :type="$dictUtils.getDictLabel('filed_type_status', scope.row.status, '-')"
+									   effect="dark" size="small">{{$dictUtils.getDictLabel("filed_type",
+								scope.row.status, '未归档')}}
+							</el-button>
+						</template>
+					</vxe-column>
+
+					<vxe-column title="操作" width="230px" fixed="right" align="center">
+						<template #default="scope">
+							<el-button
+								v-if="hasPermission('fillingbatch:edit') && (scope.row.createById === $store.state.user.id)&&(scope.row.status==='0'||scope.row.status==='1'||scope.row.status==='3') && (scope.row.level === '1')"
+								text type="primary" @click="edit(scope.row)">修改
+							</el-button>
+							<el-button
+								v-if="hasPermission('fillingbatch:del') && (scope.row.status === '1' || scope.row.status === '3')  && scope.row.createById === $store.state.user.id && (scope.row.level === '1')"
+								type="text" size="primary" @click="del(scope.row.id)">删除
+							</el-button>
+							<el-button
+								v-if="hasPermission('fillingbatch:edit') && scope.row.status === '2' && scope.row.createById === $store.state.user.id && (scope.row.level === '1')"
+								text type="primary" size="primary" @click="reback(scope.row)">撤回
+							</el-button>
+							<!--              审核-->
+							<el-button
+								v-if="scope.row.status === '2' && checkIsAudit(scope.row) && (scope.row.level === '1')"
+								text type="primary" size="primary" @click="examine(scope.row)">审核
+							</el-button>
+							<!--              被驳回后当前申请人重新调整-->
+							<el-button
+								v-if="hasPermission('fillingbatch:edit')&&scope.row.createById === $store.state.user.id&&scope.row.status === '4' && (scope.row.level === '1')"
+								text type="primary" size="primary" @click="adjust(scope.row)">驳回调整
+							</el-button>
+						</template>
+					</vxe-column>
+				</vxe-table>
+			</div>
+		</div>
+		<FillingbatchDia ref="fillingbatchDia" @refreshList="refreshList"></FillingbatchDia>
+		<ProjectRecordsForm2 ref="projectRecordsForm2" @refreshList="refreshList"></ProjectRecordsForm2>
+
+	</div>
+</template>
+
+<script>
+	import fillingbatchService from '@/api/cw/fillingbatch/FillingbatchService'
+	import UserSelect2 from '@/components/userSelect'
+	import taskService from "@/api/flowable/taskService";
+	import processService from "@/api/flowable/processService";
+	import pick from 'lodash.pick'
+	import FillingbatchDia from "./FillingbatchDia";
+	import ProjectRecordsForm2 from '../projectRecords/ProjectRecordsForm2'
+
+	export default {
+		data() {
+			return {
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				searchForm: {
+					name: '',
+					status: '',
+					createDates: [],
+					createById: ''
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				loading: false,
+				processDefinitionId: '',
+				procDefKey: '',
+			}
+		},
+
+		created() {
+
+		},
+		components: {
+			UserSelect2,
+			FillingbatchDia,
+			ProjectRecordsForm2
+		},
+		mounted() {
+			this.refreshList()
+		},
+		activated() {
+			this.refreshList()
+		},
+		methods: {
+			showHide() {
+				if (this.showHideItem === false) {
+					this.showHideItem = true
+					this.showHideIcon = 'el-icon-arrow-up'
+					this.showHideName = '隐藏'
+				} else {
+					this.showHideItem = false
+					this.showHideIcon = 'el-icon-arrow-down'
+					this.showHideName = '展示'
+				}
+			},
+			// 新增
+			add() {
+				// 读取流程表单
+				let tabTitle = `发起流程【批量归档】`
+				let processTitle = `${this.$store.state.user.name} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [批量归档]`
+				taskService.getTaskDef({
+					procDefId: this.processDefinitionId,
+					status: 'startAndHold'
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/cw/fillingbatch/FillingbatchList'
+						}
+					})
+				})
+			},
+			// 修改
+			edit(row) {
+				// 暂存修改
+				let status = ''
+				if (row.status === '1') {
+					status = 'startAndHold'
+				}
+				// 撤回或者驳回修改
+				if (row.status === '3') {
+					status = 'startAndClose'
+				} else if (row.status === '4') {
+					status = 'reapplyFlag'
+				}
+				// 读取流程表单
+				let tabTitle = `发起流程【批量归档】`
+				let processTitle = `${this.$store.state.user.name} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [批量归档]`
+				taskService.getTaskDef({
+					procDefId: this.processDefinitionId,
+					businessId: row.id,
+					businessTable: 'cw_fillingbatch_info',
+					status: status
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: status,
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessTable: 'cw_fillingbatch_info',
+							businessId: row.id,
+							isShow: false,
+							routePath: '/cw/fillingbatch/FillingbatchList'
+						}
+					})
+				})
+			},
+			// 查看
+			view(row) {
+				if (row.level === '1'){
+					this.$refs.fillingbatchDia.init('view', row.id)
+				}else {
+					this.$refs.projectRecordsForm2.init('view', row.id)
+				}
+
+			},
+			// 获取数据列表
+			refreshList() {
+				this.loading = true
+				fillingbatchService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('data',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.loading = false
+				})
+				processService.getByName('批量归档').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionId = data.id
+						this.procDefKey = data.key
+					}
+				})
+			},
+			// 撤回
+			reback(row) {
+				this.$confirm(`确定撤回流程吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					processService.revokeProcIns(row.procInsId).then((data) => {
+						let param = {status: '3', id: row.id}
+						fillingbatchService.updateStatusById(param)
+						this.$message.success('回退成功')
+						this.refreshList()
+					})
+				})
+			},
+			// 流程详情
+			detail(row) {
+				taskService.getTaskDef({
+					procInsId: row.procInsId,
+					procDefId: this.processDefinitionId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskFormDetail',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							isShow: 'false',
+							readOnly: true,
+							title: '流程详情',
+							formTitle: '流程详情',
+							businessId: row.id,
+							status: 'reback'
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust(row) {
+				console.log('row', row)
+				fillingbatchService.queryById(row.id).then((data) => {
+					console.log('data', data)
+					if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核
+			examine(row) {
+				fillingbatchService.queryById(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todo(row) {
+				console.log('row.taskId', row.taskId)
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/cw/fillingbatch/FillingbatchList'   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 删除
+			del(id) {
+				let ids = id || this.$refs.batchTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					fillingbatchService.remove(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch() {
+				this.$refs.searchForm.resetFields()
+				this.refreshList()
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit(row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+		}
+	}
+</script>

+ 143 - 0
src/views/cw/fillingbatch/ProgramPageForm.vue

@@ -0,0 +1,143 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+          <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+            <!-- 搜索框-->
+            <el-form-item label="项目名称" prop="name">
+              <el-input v-model="searchForm.name" placeholder="请输入项目名称" clearable></el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" @click="list()"  icon="el-icon-search">查询</el-button>
+              <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+            </el-form-item>
+          </el-form>
+
+          <vxe-table
+            border="inner"
+            auto-resize
+            resizable
+            height="550px"
+            :loading="loading"
+            ref="projectTable"
+            show-header-overflow
+            show-overflow
+            highlight-hover-row
+            :menu-config="{}"
+            :print-config="{}"
+            :sort-config="{remote:true}"
+            :data="dataList"
+            :row-config="{isCurrent: true}"
+            :checkbox-config="{trigger: 'row'}"
+          >
+            <vxe-column type="seq" width="60" title="序号"></vxe-column>
+            <vxe-column type="checkbox" width="60px"></vxe-column>
+			  <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber" show-overflow="title"></vxe-column>
+			  <vxe-column min-width="160" align="center" title="项目名称" field="name" show-overflow="title"></vxe-column>
+            <vxe-column min-width="160" align="center" title="报告号" field="no"></vxe-column>
+            <vxe-column min-width="160" align="center" title="项目类别" field="projectType">
+				<template #default="scope">
+					{{$dictUtils.getDictLabel("cw_work_client_report_type", scope.row.projectType, '')}}
+				</template>
+			</vxe-column>
+            <vxe-column min-width="160" align="center" title="项目负责人" field="projectLeaderName"></vxe-column>
+            <vxe-column min-width="160" align="center" title="创建人" field="createName"></vxe-column>
+          </vxe-table>
+          <vxe-pager
+            background
+            :current-page="tablePage.currentPage"
+            :page-size="tablePage.pageSize"
+            :total="tablePage.total"
+            :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+            :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+            @page-change="currentChangeHandle">
+          </vxe-pager>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getProgram()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import fillingbatchService from '@/api/cw/fillingbatch/FillingbatchService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          name: '',
+        },
+      }
+    },
+    created () {
+    },
+    components: {
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getProgram () {
+        let rows
+	    rows = this.$refs.projectTable.getCheckboxRecords()
+        this.close()
+        this.$emit('getProgram', rows)
+      },
+      list () {
+        this.loading = true
+		  fillingbatchService.getProjectList({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>

+ 3 - 1
src/views/flowable/task/TaskForm.vue

@@ -740,6 +740,7 @@ export default {
 		// Process_1702005929963 完善个人信息
 		// Process_1702369424692 会计-报告号申请
 		// Process_1670486210440 会计-报告号复核
+		// Process_1706856742798 批量归档
 
 		// 驳回
 		reject(vars) {
@@ -800,7 +801,8 @@ export default {
 				this.procDefId.includes('Process_1701829547129') ||
 				this.procDefId.includes('Process_1702005929963') ||
 				this.procDefId.includes('Process_1702369424692') ||
-				this.procDefId.includes('Process_1670486210440')
+				this.procDefId.includes('Process_1670486210440') ||
+				this.procDefId.includes('Process_1706856742798')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {