sangwenwei 1 year ago
parent
commit
b320f232dc

+ 65 - 0
src/api/jy/ProjectInfoService.js

@@ -68,6 +68,14 @@ export default class ProjectInfoService {
 		})
 	}
 
+	getByCreateOut(param){
+		return request({
+			url: prefix + '/jyProject/getByCreateOut',
+			method: 'get',
+			params: param
+		})
+	}
+
 	findByIdAudit(id){
 		return request({
 			url: prefix + '/jyProject/findByIdAudit',
@@ -143,6 +151,63 @@ export default class ProjectInfoService {
 		})
 	}
 
+	/**
+	 * 根据id查找报批签发信息
+	 * @param id
+	 */
+	queryReportsById (id) {
+		return request({
+			url: prefix + '/jyProject/queryReportsById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	saveReportsSubmit (inputForm) {
+		return request({
+			url: prefix + "/jyProject/saveReportsSubmit",
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	updateReportsSubmitById (params) {
+		return request({
+			url: prefix + '/jyProject/updateReportsSubmitById',
+			method: 'post',
+			params: params
+		})
+	}
+
+	saveFormArchive (inputForm) {
+		return request({
+			url: prefix + `/jyProject/saveFormArchive`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	updateStatusByArchiveId (data) {
+		return request({
+			url: prefix + '/jyProject/updateStatusByArchiveId',
+			method: 'post',
+			data: data
+		})
+	}
+
+	/*
+	根据id查找归档信息
+	 */
+	findByIdArchive(id){
+		return request({
+			url: prefix + '/jyProject/findByIdArchive',
+			method: 'get',
+			params: {id:id}
+		})
+	}
+
+
+
 
 
 }

+ 707 - 0
src/views/common/JyArchiveUpLoadComponent.vue

@@ -0,0 +1,707 @@
+<!--文件上传组件-->
+<template>
+	<div>
+		<el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>
+		<el-upload ref="upload" style="display: inline-block; :show-header='status'" action=""
+				   :limit="999" :http-request="httpRequest"
+				   multiple
+				   :on-exceed="(files, fileList) =>{
+                      $message.warning(`当前限制选择 999 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
+                     }"
+				   :show-file-list="false"
+				   :on-change="changes"
+				   :on-progress="uploadVideoProcess"
+				   :file-list="fileList">
+			<template v-if="auth==='view'&&uploadFlag===false" #tip>
+				<el-button :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>
+			</template>
+			<template v-else #trigger>
+				<el-button :loading="loading" type="primary" size="default"> 点击上传 </el-button>
+			</template>
+		</el-upload>
+		<el-button v-if="showSign" :loading="loading" type="info" style="float: right;" @click="clickSign">签章</el-button>
+		<div style="height: calc(100% - 80px);margin-top: 10px">
+			<!-- 进度条 -->
+			<el-progress style="margin-left: 5em" v-if="progressFlag" :percentage="loadProgress"></el-progress>
+			<el-table
+				ref="uploadTable"
+				:key="tableKey"
+				v-loading="loading"
+				:data="dataListNew">
+				<el-table-column type="seq" width="40"></el-table-column>
+				<el-table-column label="文件名称" prop="name" align="center">
+					<template #default="scope">
+						<div v-if="ifName(scope.row) === true">
+							<el-image
+								style="width: 30px; height: 30px;padding-top: 4px"
+								:src="scope.row.lsUrl"
+								:preview-src-list="[scope.row.lsUrl]"
+							></el-image>
+						</div>
+						<div v-else>
+							<el-link  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.name}}</el-link>
+						</div>
+					</template>
+				</el-table-column>
+				<el-table-column label="创建人" prop="createBy.name" align="center"></el-table-column>
+				<el-table-column label="创建时间" prop="createTime" align="center"></el-table-column>
+				<el-table-column label="文件大小" prop="size" align="center">
+					<template #default="scope">
+						{{getSize(scope.row.size)}}
+					</template>
+				</el-table-column>
+				<el-table-column label="文件类型" prop="jyFileType" align="center">
+					<template #header="{ column }">
+						<span style="color: red; font-size: 20px">*</span>
+						<span>{{column.label}}</span>
+					</template>
+					<!--          <template slot="header" scope="scope">-->
+					<!--            <span style="color:red;font-size: 20px">* </span><span>文件类型</span>-->
+					<!--          </template>-->
+					<template #default="scope">
+						<el-select v-if="auth !== 'view'" v-model="scope.row.jyFileType" placeholder="请选择">
+							<el-option
+								v-for="item in $dictUtils.getDictList('jy_project_archive')"
+								:key="item.value"
+								:label="item.label"
+								:value="item.value">
+							</el-option>
+						</el-select>
+						<span v-else>{{$dictUtils.getDictLabel("jy_project_archive", scope.row.jyFileType, '')}}</span>
+					</template>
+				</el-table-column>
+				<el-table-column label="操作" width="200px" fixed="right" align="center">
+					<template  #default="scope">
+						<el-button text type="primary"  icon="el-icon-edit" @click="toHref(scope.row)" :disabled="false">下载</el-button>
+						<el-button text type="primary"  icon="el-icon-delete"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
+						<!--<el-button text type="primary" icon="el-icon-edit"
+								 @click="handleUpdate(scope.row, scope.$index)"
+						>{{ scope.row.btn || "修改" }}</el-button>-->
+					</template>
+				</el-table-column>
+			</el-table>
+		</div>
+		<!--    <el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="[url]" :zIndex=9999></el-image-viewer>-->
+
+	</div>
+</template>
+
+<script>
+	// eslint-disable-next-line no-unused-vars
+	import OSSSerivce, {
+		httpRequest,
+		// eslint-disable-next-line no-unused-vars
+		handleRemove,
+		fileName,
+		// eslint-disable-next-line no-unused-vars
+		beforeAvatarUpload,
+		// eslint-disable-next-line no-unused-vars
+		openWindowOnUrl,
+		// eslint-disable-next-line no-unused-vars
+		toHref
+	} from '@/api/sys/OSSService'
+	// import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+	import moment from 'moment'
+	export default {
+		data () {
+			return {
+				progressFlag: false,
+				loadProgress: 0,
+				fileList: [],
+				dataList: [],
+				dataListNew: [],
+				url: '',
+				showViewer: false,
+				ossService: null,
+				auth: '',
+				directory: 'public',
+				maxValue: 300,
+				tableKey: '',
+				fileLoading: true,
+				dividerName: '',
+				uploadFlag: false,
+				delFlag: false,
+				createBy: '',
+				showDivider: true,
+				jyFileType: '',
+				sealType: '',
+				remarks: '',
+				showSign: false,
+				loading: false,
+				dataListLength: ''
+			}
+		},
+		watch: {
+		},
+		created () {
+			this.ossService = new OSSSerivce()
+		},
+		components: {
+			// ElImageViewer,
+			fileTypeComponentA: {
+				render: function (h) {
+					return h('span', {
+						domProps: {
+							innerText: this.$dictUtils.getDictLabel('jy_project_archive', this.value, '')
+						}
+					})
+				},
+				props: ['options', 'value']
+			},
+			fileTypeComponentB: {
+				data () {
+					return { jyFileType: '' }
+				},
+				props: ['options', 'value'],
+				mounted () {
+					this.jyFileType = this.value
+				},
+				render: function (h) {
+					return h(
+						'el-select',
+						{
+							attrs: {
+								placeholder: '请选择',
+								value: this.$dictUtils.getDictLabel('jy_project_archive', this.jyFileType, ''),
+								size: 'small',
+								clearable: true
+							},
+							props: ['value'],
+							on: {
+								change: (value) => {
+									this.jyFileType = value
+									this.$emit('updateFileType', value)
+								}
+							}
+						},
+						[
+							this.options.map((item) => {
+								let { label, value } = item
+								return h('el-option', {
+									props: {
+										label,
+										value: parseInt(value),
+										key: value
+									}
+								})
+							})
+						]
+					)
+				}
+			},
+			sealTypeComponentA: {
+				render: function (h) {
+					return h('span', {
+						domProps: {
+							innerText: this.$dictUtils.getDictLabel('cw_seal_type', this.value, '')
+						}
+					})
+				},
+				props: ['options', 'value']
+			},
+			sealTypeComponentB: {
+				data () {
+					return { sealType: '' }
+				},
+				props: ['options', 'value', 'scope'],
+				mounted () {
+					this.sealType = this.value
+				},
+				render: function (h) {
+					return h(
+						'el-select',
+						{
+							attrs: {
+								placeholder: '请选择',
+								value: this.$dictUtils.getDictLabel('cw_seal_type', this.sealType, ''),
+								size: 'small',
+								clearable: true
+							},
+							props: ['value'],
+							on: {
+								change: (value) => {
+									let suffix = this.scope.row.name.substring(this.scope.row.name.lastIndexOf('.') + 1)
+									if (parseInt(value) === 1) {
+										if (suffix === 'pdf' || suffix === 'doc' || suffix === 'docx') {
+											this.sealType = value
+											this.$emit('updateSealType', value)
+										} else {
+											this.$message.error('只有“pdf、doc、docx”格式文件的盖章类型可以是“电子章”')
+											this.sealType = ''
+											this.$emit('updateSealType', '')
+										}
+									} else {
+										this.sealType = value
+										this.$emit('updateSealType', value)
+									}
+								}
+							}
+						},
+						[
+							this.options.map((item) => {
+								let { label, value } = item
+								return h('el-option', {
+									props: {
+										label,
+										value: parseInt(value),
+										key: value
+									}
+								})
+							})
+						]
+					)
+				}
+			},
+			remarksComponentA: {
+				render: function (h) {
+					return h('span', {
+						domProps: {
+							innerText: this.value
+						}
+					})
+				},
+				props: ['value']
+			},
+			remarksComponentB: {
+				data () {
+					return { remarks: '' }
+				},
+				props: ['value'],
+				mounted () {
+					this.remarks = this.value
+				},
+				render: function (h) {
+					return h(
+						'el-input',
+						{
+							attrs: {
+								placeholder: '请输入',
+								value: this.remarks,
+								size: 'small',
+								clearable: true
+							},
+							props: ['value'],
+							on: {
+								input: (value) => {
+									this.remarks = value
+									this.$emit('updateRemarks', value)
+								}
+							}
+						}
+					)
+				}
+			}
+		},
+		mounted () {
+			window.onPreview = this.onPreview
+		},
+		methods: {
+			/**
+			 * dividerName: 组件中divider的名称赋值
+			 * showDivider: ‘附件‘Divider是否展示
+			 *     注:值为空时,默认值为true
+			 *    showDivider=false时 ‘附件‘Divider隐藏
+			 **/
+			setDividerName (dividerName, showDivider) {
+				if (this.commonJS.isNotEmpty(dividerName)) {
+					this.dividerName = dividerName
+				}
+				if (this.commonJS.isNotEmpty(showDivider)) {
+					if (showDivider === false) {
+						this.showDivider = false
+					} else {
+						this.showDivider = true
+					}
+				} else {
+					this.showDivider = true
+				}
+			},
+			/**
+			 * 文件上传组件初始化
+			 * @param auth
+			 *    auth的值为"view"时,不可上传/编辑文件
+			 *    auth为其他值时,可上传/编辑文件
+			 * @param fileList  要显示到文件上传列表中的文件。
+			 *    注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
+			 *    例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
+			 * @param directory  要存放到oss的哪个文件夹下。
+			 *    注:值为空时,默认存放到"public"文件夹
+			 * @param maxValue  上传文件允许的最大值,单位:MB
+			 *    注:值为空时,默认值为300MB
+			 * @param dividerName  组件中divider的名称
+			 *    注:值为空时,默认值为‘附件’
+			 * @param uploadFlag  ‘上传文件’按钮是否禁用
+			 *    注:值为空时,默认值为false
+			 *    auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
+			 * @param delFlag  ‘删除’按钮是否禁用
+			 *    注:值为空时,默认值为false
+			 *    auth=view&&delFlag=false时 ‘删除’按钮禁用
+			 * @param showDivider  ‘附件‘Divider是否展示
+			 *    注:值为空时,默认值为true
+			 *    showDivider=false时 ‘附件‘Divider隐藏
+			 * @param showSign ‘签章’按钮 是否展示
+			 *    注:值为空时,默认值为false 不展示
+			 *    showSign=audit的时候 ‘签章’按钮展示
+			 */
+			async newUpload (auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider, showSign) {
+				if (this.commonJS.isEmpty(showSign)) {
+					this.showSign = false
+				} else {
+					if (showSign === 'audit') {
+						this.showSign = true
+					} else {
+						this.showSign = false
+					}
+				}
+				await this.fileLoadingFalse()
+				if (this.commonJS.isEmpty(fileList)) {
+					this.fileLoading = true
+				} else {
+					this.dataListLength = fileList.length
+				}
+				if (this.commonJS.isEmpty(dividerName)) {
+					this.dividerName = '附件'
+				} else {
+					this.dividerName = dividerName
+				}
+				if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
+					this.directory = directory
+				} else {
+					this.directory = 'public'
+				}
+				if (maxValue !== undefined && maxValue !== null && maxValue !== '' && maxValue !== 0) {
+					this.maxValue = maxValue
+				} else {
+					this.maxValue = 300
+				}
+				this.auth = auth
+				if (this.commonJS.isEmpty(uploadFlag)) {
+					this.uploadFlag = false
+				} else {
+					if (uploadFlag !== true && uploadFlag !== false) {
+						this.uploadFlag = false
+					} else {
+						this.uploadFlag = uploadFlag
+					}
+				}
+				if (this.commonJS.isEmpty(delFlag)) {
+					this.delFlag = false
+				} else {
+					if (delFlag !== true && delFlag !== false) {
+						this.delFlag = false
+						this.createBy = delFlag
+					} else {
+						this.delFlag = delFlag
+					}
+				}
+				for await (let item of fileList) {
+					if (item.url) {
+						await this.ossService.getFileSizeByUrl(item.url).then((data) => {
+							item.lsUrl = data.url
+							item.size = data.size
+							this.dataList.push(item)
+							this.dataListNew.push(item)
+							if (this.dataListNew.length === fileList.length) {
+								this.fileLoading = true
+							}
+						})
+					}
+				}
+				// this.dataList = JSON.parse(JSON.stringify(fileList))
+				// this.dataListNew = JSON.parse(JSON.stringify(fileList))
+				if (this.commonJS.isEmpty(showDivider)) {
+					this.showDivider = true
+				} else {
+					if (showDivider === false) {
+						this.showDivider = false
+					} else {
+						this.showDivider = true
+					}
+				}
+			},
+			async httpRequest (file) {
+				await httpRequest(file, fileName(file), this.directory, this.maxValue)
+			},
+			uploadVideoProcess (event, file, fileList) {
+				this.progressFlag = true // 显示进度条
+				this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+				if (this.loadProgress >= 100) {
+					this.loadProgress = 100
+					setTimeout(() => {
+						this.progressFlag = false
+					}, 1000) // 一秒后关闭进度条
+				}
+			},
+			getSize (value) {
+				if (this.commonJS.isEmpty(value)) {
+					return '0 B'
+				} else {
+					let val = parseInt(value)
+					if (this.commonJS.isEmpty(val)) {
+						return '0 B'
+					}
+					if (isNaN(val)) {
+						return '0 B'
+					}
+					if (val === 0) {
+						return '0 B'
+					}
+					let k = 1024
+					let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+					let i = Math.floor(Math.log(val) / Math.log(k))
+					return (val / Math.pow(k, i)).toPrecision(3) + '' + sizes[i]
+				}
+			},
+			async changes (file, fileList) {
+				// if (file.status !== 'ready') {
+				//   return
+				// }
+				if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+					this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
+					return
+				}
+				this.dataListNew = []
+				this.dataList.forEach((item) => {
+					this.dataListNew.push(item)
+				})
+				for (let item of fileList) {
+					item.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+					item.createBy = {
+						id: '',
+						name: ''
+					}
+					item.createBy.id = this.$store.state.user.id
+					item.createBy.name = this.$store.state.user.name
+					this.dataListNew.push(item)
+				}
+				for await (let item of this.dataListNew) {
+					if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
+						item.url = item.raw.url
+						if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
+							await this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
+								item.lsUrl = data
+							})
+						}
+					}
+				}
+				this.tableKey = Math.random()
+			},
+			showFile (row) {
+				openWindowOnUrl(row)
+			},
+			onPreview (url) {
+				this.url = url
+				this.showViewer = true
+			},
+			// 关闭查看器
+			closeViewer () {
+				this.url = ''
+				this.showViewer = false
+			},
+			toHref (row) {
+				toHref(row)
+			},
+			async deleteById (row, index) {
+				await this.dataListNew.splice(index, 1)
+				await this.dataList.splice(index, 1)
+				this.tableKey = Math.random()
+			},
+			/**
+			 * 关闭dialog时使用  清除el-upload中上传的文件
+			 */
+			clearUpload () {
+				this.$refs.upload.uploadFiles = []
+				this.dataList = []
+				this.dataListNew = []
+				this.createBy = ''
+			},
+			/**
+			 * 获取当前文件列表中的文件数据
+			 */
+			getDataList () {
+				let _this = this
+				const waitForEach = function () {
+					return new Promise(function (resolve, reject) {
+						_this.dataListNew.forEach((item, index) => {
+							if (item.btnType === 'save') {
+								_this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+								_this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
+								_this.dataListNew[index].remarksComponent = 'remarksComponentA'
+								_this.dataListNew[index].btn = '修改'
+								_this.dataListNew[index].btnType = 'edit'
+								_this.dataListNew[index].fileType = _this.fileType
+								_this.dataListNew[index].sealType = _this.sealType
+								_this.dataListNew[index].remarks = _this.remarks
+								_this.dataListNew[index].jyFileType = _this.jyFileType
+							}
+						})
+						_this.tableKey = Math.random()
+						resolve(_this.dataListNew)
+					})
+				}
+				return waitForEach()
+			},
+			/**
+			 * 判断进度条是否结束,附件是否加载完成
+			 * @returns {boolean}
+			 */
+			checkProgress () {
+				if (this.progressFlag === true) {
+					this.$message.warning('请等待附件上传完成再进行操作')
+					return true
+				}
+				if (this.fileLoading === false) {
+					this.$message.warning('请等待附件加载完成再进行操作')
+					if (this.dataListLength === this.dataListNew.length) {
+						this.fileLoading = true
+					}
+					return true
+				}
+				return false
+			},
+			ifName (row) {
+				if (this.commonJS.isEmpty(row.name)) {
+					row.name = '---'
+					return false
+				}
+				let suffix = row.name.substring(row.name.lastIndexOf('.') + 1)
+				if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+					return true
+				} else {
+					return false
+				}
+			},
+			fileLoadingFalse () {
+				this.fileLoading = false
+			},
+			/** 修改||保存按钮操作 */
+			handleUpdate: async function (row, rowIndex) {
+				if (row.btnType === 'edit' || this.commonJS.isEmpty(row.btnType)) {
+					let _this = this
+					const waitForEach = function () {
+						return new Promise(function (resolve, reject) {
+							_this.dataListNew.forEach((item, index) => {
+								if (item.btnType === 'save') {
+									_this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+									_this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
+									_this.dataListNew[index].remarksComponent = 'remarksComponentA'
+									_this.dataListNew[index].btn = '修改'
+									_this.dataListNew[index].btnType = 'edit'
+									_this.dataListNew[index].fileType = _this.fileType
+									_this.dataListNew[index].sealType = _this.sealType
+									_this.dataListNew[index].remarks = _this.remarks
+								}
+							})
+							resolve()
+						})
+					}
+					waitForEach().then(() => {
+						this.dataListNew[rowIndex].fileTypeComponent = 'fileTypeComponentB'
+						this.dataListNew[rowIndex].sealTypeComponent = 'sealTypeComponentB'
+						this.dataListNew[rowIndex].remarksComponent = 'remarksComponentB'
+						this.dataListNew[rowIndex].btn = '保存'
+						this.dataListNew[rowIndex].btnType = 'save'
+					})
+				} else {
+					this.dataListNew[rowIndex].fileTypeComponent = 'fileTypeComponentA'
+					this.dataListNew[rowIndex].sealTypeComponent = 'sealTypeComponentA'
+					this.dataListNew[rowIndex].remarksComponent = 'remarksComponentA'
+					this.dataListNew[rowIndex].btn = '修改'
+					this.dataListNew[rowIndex].btnType = 'edit'
+					this.dataListNew[rowIndex].fileType = this.fileType
+					this.dataListNew[rowIndex].sealType = this.sealType
+					this.dataListNew[rowIndex].remarks = this.remarks
+				}
+				this.tableKey = Math.random()
+			},
+			updateFileType (fileType) {
+				this.fileType = fileType
+			},
+			updateSealType (sealType) {
+				this.sealType = sealType
+			},
+			updateRemarks (remarks) {
+				this.remarks = remarks
+			},
+			tableRowClassName ({ row, rowIndex }) {
+				row.index = rowIndex
+			},
+			// 行点击事件
+			tableRowClick (row, column) {
+				if (this.auth !== 'view') {
+					if (column.label !== '备注' && column.label !== '文件名称' && column.label !== '操作') {
+						let _this = this
+						const waitForEach = function () {
+							return new Promise(function (resolve, reject) {
+								_this.dataListNew.forEach((item, index) => {
+									if (item.btnType === 'save') {
+										_this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+										_this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
+										_this.dataListNew[index].remarksComponent = 'remarksComponentA'
+										_this.dataListNew[index].btn = '修改'
+										_this.dataListNew[index].btnType = 'edit'
+										_this.dataListNew[index].fileType = _this.fileType
+										_this.dataListNew[index].sealType = _this.sealType
+										_this.dataListNew[index].remarks = _this.remarks
+									}
+								})
+								resolve()
+							})
+						}
+						waitForEach().then(() => {
+							this.fileType = this.dataListNew[row.index].fileType
+							this.sealType = this.dataListNew[row.index].sealType
+							this.remarks = this.dataListNew[row.index].remarks
+							this.dataListNew[row.index].fileTypeComponent = 'fileTypeComponentB'
+							this.dataListNew[row.index].sealTypeComponent = 'sealTypeComponentB'
+							this.dataListNew[row.index].remarksComponent = 'remarksComponentB'
+							this.dataListNew[row.index].btn = '保存'
+							this.dataListNew[row.index].btnType = 'save'
+						})
+						this.tableKey = Math.random()
+					}
+				}
+			},
+			// 点击上传文件按钮的时候,把未保存的文件保存一下
+			clickHandel () {
+				this.dataListNew.forEach((item, index) => {
+					if (item.btnType === 'save') {
+						this.dataListNew[index].fileTypeComponent = 'fileTypeComponentA'
+						this.dataListNew[index].sealTypeComponent = 'sealTypeComponentA'
+						this.dataListNew[index].remarksComponent = 'remarksComponentA'
+						this.dataListNew[index].btn = '修改'
+						this.dataListNew[index].btnType = 'edit'
+						this.dataListNew[index].fileType = this.fileType
+						this.dataListNew[index].sealType = this.sealType
+						this.dataListNew[index].remarks = this.remarks
+					}
+				})
+			},
+			sealTypeChange (scope) {
+				let suffix = scope.row.name.substring(scope.row.name.lastIndexOf('.') + 1)
+				if (parseInt(scope.row.sealType) === 1) {
+					if (suffix !== 'pdf' && suffix !== 'doc' && suffix !== 'docx') {
+						this.$message.error('只有“pdf、doc、docx”格式文件的盖章类型可以是“电子章”')
+						scope.row.sealType = ''
+					}
+				}
+			},
+			// 点击签章按钮事件
+			clickSign () {
+				this.$emit('clickSign')
+			},
+			// 隐藏签章按钮
+			hideSign () {
+				this.showSign = false
+			},
+			// 开启/关闭页面的加载中状态
+			changeLoading (loading) {
+				if (this.commonJS.isNotEmpty(loading)) {
+					this.loading = loading
+				} else {
+					this.loading = false
+				}
+			}
+		}
+	}
+</script>

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

@@ -701,6 +701,8 @@ export default {
 		// Process_1697680274149 嘉溢-项目二级校审
 		// Process_1697680423391 嘉溢-项目三级校审
 		// Process_1698644849993 嘉溢-项目外审
+		// Process_1698800678864 嘉溢-报批签发
+		// Process_1698909233438 嘉溢-项目归档
 
 		// 驳回
 		reject(vars) {
@@ -746,7 +748,9 @@ export default {
 				this.procDefId.includes('Process_1697679946239') ||
 				this.procDefId.includes('Process_1697680274149') ||
 				this.procDefId.includes('Process_1697680423391') ||
-				this.procDefId.includes('Process_1698644849993')
+				this.procDefId.includes('Process_1698644849993') ||
+				this.procDefId.includes('Process_1698800678864') ||
+				this.procDefId.includes('Process_1698909233438')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {

+ 51 - 32
src/views/jy/project/OutInstanceForm.vue

@@ -356,38 +356,10 @@
 					// 暂存
 					this.loading = true
 					this.inputForm.status = '1'
-					this.$refs.uploadComponent.getDataList().then((list)=>{
-						if (this.commonJS.isNotEmpty(list)){
-							list.forEach((item, index) => {
-								if (this.commonJS.isEmpty(item.jyFileType)) {
-									this.$message.error('第' + (index + 1) + '条附件信息没有填写文件类型')
-									this.loading = false
-									throw new Error('第' + (index + 1) + '条附件信息没有填写文件类型')
-								}
-							})
-						}
-						this.inputForm.fileList = list
-						this.projectInfoService.saveFormOut(this.inputForm).then((data) => {
-							this.inputForm.assignee = this.inputForm.auditPeople
-							this.inputForm.id = data.businessId
-							callback(data.businessTable, data.businessId, this.inputForm)
-							this.loading = false
-						}).catch(() => {
-							this.loading = false
-						})
-					})
-					return
-				} else if (status === 'start') {
-					// 送审  待审核
-					this.inputForm.status = '2'
-				} else if (status === 'agree') {
-					// 审核同意
-					this.inputForm.status = '5'
-					this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
-				}
-				this.$refs['inputForm'].validate((valid) => {
-					if (valid) {
-						this.loading = true
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						throw new Error()
+					}else {
 						this.$refs.uploadComponent.getDataList().then((list)=>{
 							if (this.commonJS.isNotEmpty(list)){
 								list.forEach((item, index) => {
@@ -397,9 +369,14 @@
 										throw new Error('第' + (index + 1) + '条附件信息没有填写文件类型')
 									}
 								})
+							}else {
+								this.$message.error('请上传文件')
+								this.loading = false
+								throw new Error('请上传文件')
 							}
 							this.inputForm.fileList = list
 							this.projectInfoService.saveFormOut(this.inputForm).then((data) => {
+								this.inputForm.assignee = this.inputForm.auditPeople
 								this.inputForm.id = data.businessId
 								callback(data.businessTable, data.businessId, this.inputForm)
 								this.loading = false
@@ -407,6 +384,48 @@
 								this.loading = false
 							})
 						})
+					}
+
+					return
+				} else if (status === 'start') {
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					// 审核同意
+					this.inputForm.status = '5'
+					this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.$refs.uploadComponent.checkProgress()) {
+							this.loading = false
+							throw new Error()
+						}else {
+							this.$refs.uploadComponent.getDataList().then((list)=>{
+								if (this.commonJS.isNotEmpty(list)){
+									list.forEach((item, index) => {
+										if (this.commonJS.isEmpty(item.jyFileType)) {
+											this.$message.error('第' + (index + 1) + '条附件信息没有填写文件类型')
+											this.loading = false
+											throw new Error('第' + (index + 1) + '条附件信息没有填写文件类型')
+										}
+									})
+								}else {
+									this.$message.error('请上传文件')
+									this.loading = false
+									throw new Error('请上传文件')
+								}
+								this.inputForm.fileList = list
+								this.projectInfoService.saveFormOut(this.inputForm).then((data) => {
+									this.inputForm.id = data.businessId
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							})
+						}
 					} else {
 						this.loading = false
 					}

+ 552 - 0
src/views/jy/project/ProjectArchiveForm.vue

@@ -0,0 +1,552 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+				 label-width="170px" @submit.native.prevent>
+
+			<el-row  :gutter="15">
+				<el-row  :gutter="15">
+					<el-col :span="24" >
+						<el-divider content-position="left"><i class="el-icon-document"></i>
+							合同信息
+						</el-divider>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="合同名称" prop="contractName"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.contractName" placeholder="请填写合同名称"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="合同金额(元)" prop="contractAmount"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.contractAmount" placeholder="请填写合同金额(元)"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="委托方" prop="primaryLinkman"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.primaryLinkman" placeholder="请填写委托方"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="合同类型(大类)" prop="contractTypeFirst"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.contractTypeFirst" placeholder="请填写合同类型(大类)"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="合同类型(小类)" prop="contractType"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.contractType" placeholder="请填写合同类型(小类)"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-row>
+			<el-row  :gutter="15">
+				<el-row  :gutter="15">
+					<el-col :span="24" >
+						<el-divider content-position="left"><i class="el-icon-document"></i>
+							项目基本信息
+						</el-divider>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="项目名称" prop="projectName"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.projectName" placeholder="请填写项目名称"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="项目所在地" prop="projectPlace"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.projectPlace" placeholder="请填写项目所在地"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="建设地点" prop="buildPlace"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.buildPlace" placeholder="请填写建设地点"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="项目负责人" prop="projectLeader"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.projectLeader" placeholder="请填写项目负责人"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="创建人" prop="createByName"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.createByName" placeholder="请填写创建人"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="创建时间" prop="createTime"
+									  :rules="[
+                 ]">
+							<el-input :disabled="true" v-model="inputForm.createTime" placeholder="请填写创建时间"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+
+			</el-row>
+			<el-row  :gutter="15">
+					<el-col :span="24">
+						<el-form-item label="备注" prop="remarks"
+									  :rules="[
+                 ]">
+							<el-input :rows="4" :disabled="status === 'audit' || status === 'taskFormDetail'|| method ==='view'"  show-word-limit maxlength="500" type="textarea" v-model="inputForm.remarks" placeholder="请填写备注"></el-input>
+						</el-form-item>
+					</el-col>
+			</el-row>
+
+		</el-form>
+		<!--        附件-->
+		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+
+	</div>
+</template>
+
+<script>
+	import ProjectInfoService from "@/api/jy/ProjectInfoService";
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/JyArchiveUpLoadComponent'
+	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: {
+					id: '',
+					contractName:'',
+					contractAmount:'',
+					primaryLinkman:'',
+					contractTypeFirst:'',
+					contractType:'',
+					projectName:'',
+					projectPlace:'',
+					buildPlace:'',
+					projectLeader:'',
+					createByName:'',
+					createTime:'',
+					fileList:[],
+					status:'',
+					projectId:'',
+					remarks:''
+				},
+				keyWatch: '',
+				tabName:''
+
+			}
+		},
+		ProjectInfoService:null,
+		created () {
+			this.projectInfoService=new ProjectInfoService()
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('dsad')
+					if (this.bus) {
+						console.log('dsad',this.bus)
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		components: {
+			UserSelectSignatory,
+			UpLoadComponent,
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init (method, id,tabName) {
+				this.tabName = tabName
+				this.method = method
+				console.log('method', method)
+				this.inputForm = {
+					id: '',
+					contractName:'',
+					contractAmount:'',
+					primaryLinkman:'',
+					contractTypeFirst:'',
+					contractType:'',
+					projectName:'',
+					projectPlace:'',
+					buildPlace:'',
+					projectLeader:'',
+					createByName:'',
+					createTime:'',
+					fileList:[],
+					status:'',
+					projectId:'',
+					remarks:''
+				}
+				this.inputForm.id = id
+				this.visible = true
+				if (method === 'add') {
+					// this.inputForm.id = 'add'
+					this.title = `新建项目`
+				} else if (method === 'edit') {
+					this.title = '修改项目'
+				} else if (method === 'view') {
+					this.title = '查看项目详情'
+				}
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					// this.$refs.archiveFile.clearUpload()
+					console.log('id',this.inputForm.id)
+					this.projectInfoService.findByIdArchive(this.inputForm.id).then((data) => {
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm.contractName=data.jyProjectList.contractName
+						this.inputForm.contractAmount=data.jyProjectList.contractAmount
+						this.inputForm.primaryLinkman=data.jyProjectList.primaryLinkman
+						this.inputForm.contractTypeFirst=data.jyProjectList.contractTypeFirst
+						this.inputForm.contractType=data.jyProjectList.contractType
+						this.inputForm.projectName=data.jyProjectList.name
+						this.inputForm.projectPlace=data.jyProjectList.place
+						this.inputForm.buildPlace=data.jyProjectList.buildPlace
+						this.inputForm.createByName=data.jyProjectList.createById
+						this.inputForm.createTime=data.jyProjectList.createTime
+						this.inputForm.projectLeader=data.jyProjectList.leader
+						this.inputForm.projectId=data.projectId
+						this.inputForm.remarks=data.remarks
+						console.log('data', data)
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						console.log('method2',method)
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.fileList, 'jyProjectArchive', null, null, null, null, false)
+						// this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
+						this.loading = false
+					})
+				})
+			},
+			close () {
+				this.$refs.uploadComponent.clearUpload()
+				this.inputForm = {
+					id: '',
+					contractName:'',
+					contractAmount:'',
+					primarkLinkman:'',
+					contractTypeFirst:'',
+					contractType:'',
+					projectName:'',
+					projectPlace:'',
+					buildPlace:'',
+					projectLeader:'',
+					createByName:'',
+					createTime:'',
+					remarks:'',
+					fileList:[],
+					status:'',
+				}
+				this.$refs.inputForm.resetFields()
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				this.projectInfoService.findByIdArchive(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startFormTrue(callback)
+					}
+				})
+			},
+			saveForm (callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm (callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.projectInfoService.findByIdArchive(this.inputForm.id).then((data) => {
+						if (this.commonJS.isNotEmpty(data.status) && data.status !== '0' && data.status !== '1' && data.status !== '3' && data.status !== '6') { // 审核状态不是“未发起”或“暂存”或“撤回”或"超期未发起",就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.startFormTrue(callback)
+						}
+					})
+				} else {
+					this.startFormTrue(callback)
+				}
+			},
+			startFormTrue (callback) {
+				this.doSubmit('start', callback)
+			},
+			async agreeForm (callback) {
+				this.loading = true
+				await this.projectInfoService.findByIdArchive(this.inputForm.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.doSubmit('agree', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit (status, callback) {
+				this.loading = true
+				if (await this.$refs.uploadComponent.checkProgress()) {
+					this.loading = false
+					throw new Error()
+				}
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						throw new Error()
+					}else {
+						this.$refs.uploadComponent.getDataList().then((list)=>{
+							if (this.commonJS.isNotEmpty(list)){
+								list.forEach((item, index) => {
+									if (this.commonJS.isEmpty(item.jyFileType)) {
+										this.$message.error('第' + (index + 1) + '条附件信息没有填写文件类型')
+										this.loading = false
+										throw new Error('第' + (index + 1) + '条附件信息没有填写文件类型')
+									}
+								})
+							}else {
+								this.$message.error('请上传文件')
+								this.loading = false
+								throw new Error('请上传文件')
+							}
+							this.inputForm.fileList = list
+							this.projectInfoService.saveFormArchive(this.inputForm).then((data) => {
+								this.inputForm.assignee = this.inputForm.auditPeople
+								this.inputForm.id = data.businessId
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+					return
+				} else if (status === 'start') {
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					// 审核同意
+					if (this.$store.state.user.office.name ==='办公室'){
+						this.inputForm.status = '5'
+					}else {
+						this.inputForm.status = '2'
+					}
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.$refs.uploadComponent.checkProgress()) {
+							this.loading = false
+							throw new Error()
+						}else {
+							this.$refs.uploadComponent.getDataList().then((list)=>{
+								if (this.commonJS.isNotEmpty(list)){
+									list.forEach((item, index) => {
+										if (this.commonJS.isEmpty(item.jyFileType)) {
+											this.$message.error('第' + (index + 1) + '条附件信息没有填写文件类型')
+											this.loading = false
+											throw new Error('第' + (index + 1) + '条附件信息没有填写文件类型')
+										}
+									})
+								}else {
+									this.$message.error('请上传文件')
+									this.loading = false
+									throw new Error('请上传文件')
+								}
+								this.inputForm.fileList = list
+								this.projectInfoService.saveFormArchive(this.inputForm).then((data) => {
+									this.inputForm.id = data.businessId
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							})
+						}
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			async updateStatusById (type, callback) {
+				this.loading = true
+				if (await this.$refs.uploadComponent.checkProgress()) {
+					this.loading = false
+					throw new Error()
+				} else {
+					if (type === 'reject' || type === 'reback') {
+						this.projectInfoService.findByIdArchive(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'
+									this.loading = true
+									this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+									this.projectInfoService.saveFormOut(this.inputForm).then((data) => {
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+									// return
+								}
+								if (type === 'reback') {
+									// 撤回
+									this.inputForm.status = '3'
+								}
+								if (type === 'reject' || type === 'reback') {
+									let param = {status: this.inputForm.status, id: this.inputForm.id}
+									this.loading = true
+									this.projectInfoService.updateStatusByArchiveId(param).then(() => {
+										this.loading = false
+										callback()
+									})
+								}
+							}
+						})
+					} else if (type === 'hold') {
+						this.projectInfoService.findByIdArchive(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}
+								this.projectInfoService.updateStatusByArchiveId(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						})
+					}
+				}
+			},
+			// 下载一级校审
+			downloadFirstAuditTpl () {
+				// this.$utils.downloadExcel('/sys/project/import/template')
+				this.loading = true
+				if (this.tabName === '一级校审') {
+					this.projectInfoService.downloadFirstAuditTpl(this.inputForm.id, this.inputForm.projectId).then((res) => {
+						console.log('hh',res)
+						// 将二进制流文件写入excel表,以下为重要步骤
+						this.$utils.downloadWord(res, this.tabName)
+						this.loading = false
+					}).catch(function (err) {
+						this.loading = false
+						if (err.response) {
+							console.log(err.response)
+						}
+					})
+				}
+				if (this.tabName === '二级校审') {
+					this.projectInfoService.downloadSecondAuditTpl(this.inputForm.id, this.inputForm.projectId).then((res) => {
+						// 将二进制流文件写入excel表,以下为重要步骤
+						this.$utils.downloadWord(res, this.tabName)
+						this.loading = false
+					}).catch(function (err) {
+						this.loading = false
+						if (err.response) {
+							console.log(err.response)
+						}
+					})
+				}
+				if (this.tabName === '三级校审') {
+					this.projectInfoService.downloadThirdlyAuditTpl(this.inputForm.id, this.inputForm.projectId).then((res) => {
+						// 将二进制流文件写入excel表,以下为重要步骤
+						this.$utils.downloadWord(res, this.tabName)
+						this.loading = false
+					}).catch(function (err) {
+						this.loading = false
+						if (err.response) {
+							console.log(err.response)
+						}
+					})
+				}
+			},
+
+		}
+	}
+</script>
+<style lang="scss">
+	.el-input-number .el-input__inner {
+		text-align: left;
+	}
+	.el-divider__text {
+		font-size: 16px;
+		font-weight: bold;
+	}
+
+</style>

+ 29 - 20
src/views/jy/project/ProjectDia.vue

@@ -26,6 +26,8 @@
 						  <el-row  :gutter="15" v-show="inputForm.contractStatus === '1'">
 							  <el-col :span="24" >
 								  <el-divider content-position="left"><i class="el-icon-document"></i> 选择合同</el-divider>
+							  </el-col>
+							  <el-col :span="12">
 								  <el-form-item label="选择合同" prop="contractName"
 												:rules="[
                           {required: true, message:'合同不能为空', trigger:'blur'},
@@ -37,13 +39,6 @@
 								  </el-form-item>
 							  </el-col>
 							  <el-col :span="12">
-								  <el-form-item label="合同名称" prop="contractName"
-												:rules="[
-                 ]">
-									  <el-input :disabled="true" v-model="inputForm.contractName" placeholder="请填写合同名称"></el-input>
-								  </el-form-item>
-							  </el-col>
-							  <el-col :span="12">
 								  <el-form-item label="合同金额(元)" prop="amount"
 												:rules="[
                  ]">
@@ -63,10 +58,10 @@
 								  </el-form-item>
 							  </el-col>
 							  <el-col :span="12">
-								  <el-form-item label="委托方" prop="clientName"
+								  <el-form-item label="委托方" prop="primaryLinkman"
 												:rules="[
                  ]">
-									  <el-input :disabled="true" v-model="inputForm.clientName" placeholder="请填写委托方"></el-input>
+									  <el-input :disabled="true" v-model="inputForm.primaryLinkman" placeholder="请填写委托方"></el-input>
 								  </el-form-item>
 							  </el-col>
 							  <el-col :span="12">
@@ -312,6 +307,12 @@
 			  <el-tab-pane label="外审" name="outInstance">
 				  <OutInstanceForm ref="outInstanceForm" :formReadOnly="true"></OutInstanceForm>
 			  </el-tab-pane>
+			  <el-tab-pane label="报批签发" name="reportsSubmit">
+				  <ReportsInstanceForm ref="reportsSubmit" :formReadOnly="true"></ReportsInstanceForm>
+			  </el-tab-pane>
+			  <el-tab-pane label="归档" name="archive">
+				  <ProjectArchiveForm ref="projectArchiveForm" :formReadOnly="true"></ProjectArchiveForm>
+			  </el-tab-pane>
 		  </el-tabs>
 		  <template #footer>
 			<span class="dialog-footer">
@@ -339,6 +340,8 @@
 	import ProjectAuditForm from './ProjectAuditForm'
 	import SignetAddForm from '@/views/materialManagement/userSeal/SignetAddForm'
 	import OutInstanceForm from './OutInstanceForm'
+	import ReportsInstanceForm from './ReportsInstanceForm'
+	import ProjectArchiveForm from './ProjectArchiveForm'
   export default {
     props: {
       businessId: {
@@ -369,7 +372,7 @@
 			  contractId: '', // 合同id
 			  contractName: '', // 合同名称
 			  client: '', // 委托方
-			  clientName: '', // 委托方名称
+			  primaryLinkman: '', // 委托方名称
 			  amount: '', // 合同金额
 			  contractType: '', // 合同类别
 			  name: '', // 项目名称
@@ -403,7 +406,9 @@
 		  city:'',
 		  con:'',
 		  sealId:'',
-		  outInstanceId:''
+		  outInstanceId:'',
+		  reportsSubmitId:'',
+		  archiveId:''
       }
     },
 	  ProjectInfoService:null,
@@ -430,7 +435,9 @@
 		UpLoadComponent,
 		ProjectAuditForm,
 		SignetAddForm,
-		OutInstanceForm
+		OutInstanceForm,
+		ReportsInstanceForm,
+		ProjectArchiveForm
     },
     methods: {
 		getKeyWatch (keyWatch) {
@@ -536,12 +543,14 @@
 				this.inputForm.clientList.splice(rowIndex, 1)
 			}
 		},
-		init (method, id,auditId1, auditId2, auditId3,sealId,outInstanceId) {
+		init (method, id,auditId1, auditId2, auditId3,sealId,outInstanceId,reportsSubmitId,archiveId) {
 			this.auditIdfirst = auditId1
 			this.auditIdsecond = auditId2
 			this.auditIdthird = auditId3
 			this.outInstanceId=outInstanceId
 			this.sealId=sealId
+			this.reportsSubmitId=reportsSubmitId
+			this.archiveId=archiveId
 			this.method = method
 			// console.log('method', method)
 			this.inputForm = {
@@ -550,7 +559,7 @@
 				contractId: '', // 合同id
 				contractName: '', // 合同名称
 				client: '', // 委托方
-				clientName: '', // 委托方名称
+				primaryLinkman: '', // 委托方名称
 				amount: '', // 合同金额
 				contractType: '', // 合同类别
 				name: '', // 项目名称
@@ -888,14 +897,14 @@
 					this.$refs.outInstanceForm.init('view', this.outInstanceId)
 				}
 			}
-			if (paneName === 'fread') {
-				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
-					this.$refs.proofreadFormComponent.init(this.inputForm.id)
+			if (paneName === 'reportsSubmit') {
+				if (this.commonJS.isNotEmpty(this.reportsSubmitId)) {
+					this.$refs.reportsSubmit.init('view',this.reportsSubmitId)
 				}
 			}
-			if (paneName === 'issued') {
-				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
-					this.$refs.proofreadIssuedForm.init('view', this.inputForm.id, '报告签发单')
+			if (paneName === 'archive') {
+				if (this.commonJS.isNotEmpty(this.archiveId)) {
+					this.$refs.projectArchiveForm.init('view', this.archiveId)
 				}
 			}
 		}

+ 17 - 6
src/views/jy/project/ProjectForm.vue

@@ -9,7 +9,7 @@
 								  :rules="[
 							   {required: true, message:'请选择合同情况', trigger:'blur'}
                  ]">
-						<el-radio-group v-model="inputForm.contractStatus" class="ml-4">
+						<el-radio-group v-model="inputForm.contractStatus" @change="changeStatus" class="ml-4">
 							<el-radio label="1" size="large">有合同</el-radio> <el-radio label="0" size="large">无合同</el-radio>
 						</el-radio-group>
 					</el-form-item>
@@ -129,7 +129,7 @@
 						<el-input  v-model="inputForm.buildPlace" placeholder="请输入建设地点" clearable></el-input>
 					</el-form-item>
 				</el-col>
-				<el-col :span="12">
+				<el-col :span="12" :disabled="status === 'audit' || status === 'taskFormDetail'|| method ==='view'">
 					<el-form-item label="项目负责人" prop="projectLeader"
 								  :rules="[
                           {required: true, message:'项目负责人不能为空', trigger:'change'}
@@ -199,9 +199,9 @@
 						highlight-current-row
 						:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '#'}"
 					>
-						<vxe-table-column field="name" title="联系人" :edit-render="{}"  align="center">
+						<vxe-table-column field="clientName" title="联系人" :edit-render="{}"  align="center">
 							<template v-slot:edit="scope">
-								<el-input :disabled="true" v-model="scope.row.name" ></el-input>
+								<el-input :disabled="true" v-model="scope.row.clientName" ></el-input>
 							</template>
 						</vxe-table-column>
 						<!--					<vxe-table-column  align="center" field="clientType" title="人员类型" :edit-render="{name: '$select', options: clientTypes}">-->
@@ -579,7 +579,7 @@
 					}
 					wait().then(() => {
 						if (_num === 0) {
-							this.inputForm.clientList.push({ name: row.linkmanList[0].name,id: row.linkmanList[0].id,linkPhone:row.linkmanList[0].linkPhone,linkMobile:row.linkmanList[0].linkMobile,position:row.linkmanList[0].position})
+							this.inputForm.clientList.push({ clientName: row.linkmanList[0].name,id: row.linkmanList[0].id,linkPhone:row.linkmanList[0].linkPhone,linkMobile:row.linkmanList[0].linkMobile,position:row.linkmanList[0].position})
 							this.$refs.clientTable.insertAt({name: row.linkmanList[0].name,id: row.linkmanList[0].id,linkPhone:row.linkmanList[0].linkPhone,linkMobile:row.linkmanList[0].linkMobile,position:row.linkmanList[0].position})
 							this.clientTableKey = Math.random()
 						}
@@ -862,12 +862,23 @@
 			},
 			getWorkClientChoose2 (list) {
 				console.log('list',list)
-				this.inputForm.clientList.push({id: list.linkId, name: list.name,linkPhone:list.phone,linkMobile:list.mobile,position:list.position})
+				this.inputForm.clientList.push({id: list.linkId, clientName: list.clientName,linkPhone:list.phone,linkMobile:list.mobile,position:list.position})
 				this.$refs.clientTable.insertAt({ name: list.name,linkPhone:list.phone,linkMobile:list.mobile,position:list.position})
 				this.clientTableKey = Math.random()
 
 				console.log('1231312',this.inputForm.clientList)
 			},
+			changeStatus(){
+				if (this.inputForm.contractStatus ==='0'){
+					this.inputForm.contractId = ''
+					this.inputForm.contractName = ''
+					this.inputForm.clientName = ''
+					this.inputForm.amount = ''
+					this.inputForm.contractType = ''
+					this.inputForm.contractTypeFirst = ''
+					this.inputForm.clientList=[]
+				}
+			}
 		}
 	}
 </script>

+ 323 - 16
src/views/jy/project/ProjectList.vue

@@ -17,8 +17,8 @@
 			<el-form-item v-if="showHideItem" label="合同名称" prop="contractName">
 				<el-input v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
 			</el-form-item>
-			<el-form-item v-if="showHideItem" label="委托方" prop="clientName">
-				<el-input v-model="searchForm.clientName" placeholder="请输入委托方" clearable></el-input>
+			<el-form-item v-if="showHideItem" label="委托方" prop="primaryLinkman">
+				<el-input v-model="searchForm.primaryLinkman" placeholder="请输入委托方" clearable></el-input>
 			</el-form-item>
 			<el-form-item v-if="showHideItem" label="创建时间" prop="createDates">
 				<el-date-picker
@@ -102,8 +102,8 @@
 					</el-option>
 				</el-select>
 			</el-form-item>
-			<el-form-item v-if="showHideItem" label="归档状态" prop="revicewStatus">
-				<el-select v-model="searchForm.revicewStatus" placeholder="请选择" style="width:100%;" clearable>
+			<el-form-item v-if="showHideItem" label="归档状态" prop="reviewStatus">
+				<el-select v-model="searchForm.reviewStatus" placeholder="请选择" style="width:100%;" clearable>
 					<el-option
 						v-for="item in $dictUtils.getDictList('program_project_archive_list_info_status')"
 						:key="item.value"
@@ -167,8 +167,8 @@
 					<vxe-column min-width="180" align="center" title="合同名称" field="contractName">
 						<template #default="scope">
 <!--							<el-link  type="primary" :underline="false" v-if="scope.row.contractStatus ==='1'" @click="viewContract(scope.row.contractId)">{{scope.row.contractName}}</el-link>-->
-							<el-link  type="primary" :underline="false" v-if="hasPermission('jy_project:info:view')" @click="viewContract(scope.row.contractId)">{{scope.row.contractName}}</el-link>
-							<span v-else-if="scope.row.contractStatus ==='0'">暂无合同</span>
+							<el-link  type="primary" :underline="false" v-if="commonJS.isNotEmpty(scope.row.contractId)&&commonJS.isNotEmpty(scope.row.contractName)" @click="viewContract(scope.row.contractId)">{{scope.row.contractName}}</el-link>
+							<span v-else  style="color: red">暂无合同</span>
 						</template>
 					</vxe-column>
 					<vxe-column min-width="100" align="center" title="负责人" field="projectLeader"></vxe-column>
@@ -201,9 +201,9 @@
 							<el-button  @click="issuedDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.reportIssuance, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.reportIssuance, '未登记')}} </el-button>
 						</template>
 					</vxe-column>
-					<vxe-column min-width="120" align="center" title="项目归档" field="revicewStatus">
+					<vxe-column min-width="120" align="center" title="项目归档" field="reviewStatus">
 						<template #default="scope">
-							<el-button @click="archiveDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.revicewStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_archive_list_info_status", scope.row.revicewStatus, '未登记')}} </el-button>
+							<el-button @click="archiveDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.reviewStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_archive_list_info_status", scope.row.reviewStatus, '未登记')}} </el-button>
 						</template>
 					</vxe-column>
 					<vxe-column min-width="120" align="center" title="外审" field="outInstance">
@@ -213,7 +213,7 @@
 					</vxe-column>
 					<vxe-column min-width="120" align="center" title="报批签发" field="reportsSubmit">
 						<template #default="scope">
-							<el-button @click="archiveDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.reportsSubmit, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_archive_list_info_status", scope.row.reportsSubmit, '未登记')}} </el-button>
+							<el-button @click="reportsSubmitDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.reportsSubmit, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.reportsSubmit, '未登记')}} </el-button>
 						</template>
 					</vxe-column>
 					<vxe-column title="操作" min-width="200px" fixed="right" align="center">
@@ -271,17 +271,28 @@
 <!--							&lt;!&ndash; 外审  被驳回后当前申请人重新调整&ndash;&gt;-->
 							<el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&scope.row.outInstance === '4'" text type="primary"  @click="adjustIssued(scope.row)">驳回调整</el-button>
 
+
+							<!--							&lt;!&ndash;报批签发发起&ndash;&gt;-->
+							<el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id) &&scope.row.outInstance === '5' && (scope.row.reportsSubmit === null ||scope.row.reportsSubmit === undefined ||scope.row.reportsSubmit === '' ||scope.row.reportsSubmit === '0')" text type="primary"  @click="reportsDoSubmit(scope.row)">报批签发</el-button>
+							<!--							&lt;!&ndash;报批签发撤回&ndash;&gt;-->
+							<el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id) && scope.row.reportsSubmit === '2'" text type="primary"  @click="reportsSubmitReback(scope.row)">报批签发撤回</el-button>
+							<el-button v-if="scope.row.reportsSubmit === '1'|| scope.row.reportsSubmit === '3'" size="small" text type="primary"  @click="edit(scope.row)">报批签发修改</el-button>
+							<!--							&lt;!&ndash; 报批签发  审核&ndash;&gt;-->
+							<el-button v-if="scope.row.reportsSubmit==='2' && checkIsAuditIssued(scope.row)" text type="primary"  @click="reportsSubmitCheck(scope.row)">报批签发审核</el-button>
+							<!--							&lt;!&ndash; 报批签发  被驳回后当前申请人重新调整&ndash;&gt;-->
+							<el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&scope.row.reportsSubmit === '4'" text type="primary"  @click="adjustReportsSubmit(scope.row)">驳回调整</el-button>
+
 <!--							&lt;!&ndash;评估报告装订后的审核&ndash;&gt;-->
 <!--							<el-button v-if="hasPermission('program:registered:browse')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.issuedStatus === '5'&&scope.row.archiveStatus === '0'" text type="primary" @click="browse(scope.row.id)">装订自校</el-button>-->
 
 <!--							&lt;!&ndash; 项目归档&ndash;&gt;-->
-<!--							<el-button v-if="hasPermission('program:registered:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.issuedStatus === '5' &&(scope.row.archiveStatus === '0'||scope.row.archiveStatus === '1'||scope.row.archiveStatus === '3'||scope.row.archiveStatus === '6')" text type="primary" @click="archivePush(scope.row)">项目归档</el-button>-->
+							<el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&(scope.row.reportsSubmit === '5' || scope.row.reportsSubmit === '7') &&(scope.row.reviewStatus === ''||scope.row.reviewStatus === undefined||scope.row.reviewStatus === null||scope.row.reviewStatus === '0'||scope.row.reviewStatus === '1'||scope.row.reviewStatus === '3')" text type="primary" @click="archivePush(scope.row)">项目归档</el-button>
 <!--							&lt;!&ndash; 项目归档撤回&ndash;&gt;-->
-<!--							<el-button v-if="hasPermission('program:registered:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.archiveStatus === '2'" text type="primary" @click="archiveReback(scope.row)">项目归档撤回</el-button>-->
+							<el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&scope.row.reviewStatus === '2'" text type="primary" @click="archiveReback(scope.row)">项目归档撤回</el-button>
 <!--							&lt;!&ndash; 项目归档  审核&ndash;&gt;-->
-<!--							<el-button v-if="scope.row.archiveStatus==='2' && checkIsAuditArchive(scope.row)" text type="primary"  @click="examineArchive(scope.row)">归档审核</el-button>-->
+							<el-button v-if="scope.row.reviewStatus==='2' && checkIsAuditArchive(scope.row)" text type="primary"  @click="examineArchive(scope.row)">归档审核</el-button>
 <!--							&lt;!&ndash; 项目归档  被驳回后当前申请人重新调整&ndash;&gt;-->
-<!--							<el-button v-if="hasPermission('program:registered:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.archiveStatus === '4'" text type="primary"  @click="adjustArchive(scope.row)">驳回调整</el-button>-->
+							<el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&scope.row.reviewStatus === '4'" text type="primary"  @click="adjustArchive(scope.row)">驳回调整</el-button>
 
 							<!--一级校审ftl文件下载-->
 							<!--              <el-button v-if="hasPermission('program:registered:edit')" text type="primary"  icon="el-icon-circle-check"  @click="downloadFirstAuditTpl(scope.row)">一级校审下载</el-button>-->
@@ -340,7 +351,7 @@ export default {
 				name: '',
 				no: '',
 				createById: '',
-				clientName: '',//委托方
+				primaryLinkman: '',//委托方
 				contractName: '',
 				projectLeader:'',//项目负责人
 				createDates: [],
@@ -374,6 +385,10 @@ export default {
 			procDefKey3:'',
 			processDefinitionIdOut:'',
 			procDefKeyOut:'',
+			processDefinitionReportsId:'',
+			procDefKeyReports:'',
+			processDefinitionIdArchive:'',
+			procDefKeyArchive:'',
 		}
 	},
 	ProjectInfoService:null,
@@ -434,7 +449,7 @@ export default {
 		},
 		// 查看
 		view (row) {
-			this.$refs.projectDia.init('view', row.id,row.auditId1, row.auditId2, row.auditId3,row.sealId,row.outInstanceId)
+			this.$refs.projectDia.init('view', row.id,row.auditId1, row.auditId2, row.auditId3,row.sealId,row.outInstanceId,row.reportsSubmitId,row.archiveId)
 		},
 		// 获取数据列表
 		refreshList () {
@@ -491,6 +506,19 @@ export default {
 					this.procDefKeyOut = data.key
 				}
 			})
+			processService.getByName('嘉溢-报批签发').then((data) => {
+				if (!this.commonJS.isEmpty(data.id)) {
+					this.processDefinitionReportsId = data.id
+					this.procDefKeyReports = data.key
+				}
+			})
+			processService.getByName('嘉溢-项目归档').then((data) => {
+				if (!this.commonJS.isEmpty(data.id)) {
+					this.processDefinitionIdArchive = data.id
+					this.procDefKeyArchive = data.key
+				}
+			})
+
 		},
 		// 当前页
 		currentChangeHandle ({ currentPage, pageSize }) {
@@ -1271,7 +1299,286 @@ export default {
 					this.todoOut(row)
 				}
 			})
-		}
+		},
+		//发起报批签发
+		reportsDoSubmit(row){
+			// 读取流程表单
+			let tabTitle = `发起流程【嘉溢-报批签发】`
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-报批签发]`
+			taskService.getTaskDef({ procDefId: this.processDefinitionReportsId,
+				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.processDefinitionReportsId,
+						procDefKey: this.procDefKeyReports,
+						status: 'startAndHold',
+						title: tabTitle,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessId: 'false',
+						isShow: false,
+						routePath: '/jy/project/ProjectList'
+					}
+				})
+			})
+		},
+		//报批签发审核流程详情
+		reportsSubmitDetail(row){
+			if (row.reportsSubmit !== '0' && row.reportsSubmit !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.procInsIdReports,
+					procDefId: this.processDefinitionReportsId
+				}).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.reportsSubmitId,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+		//报批签发撤回
+		reportsSubmitReback(row){
+			this.$confirm(`确定要撤回该申请吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(async () => {
+				await this.projectInfoService.queryReportsById(row.reportsSubmitId).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						processService.revokeProcIns(row.procInsIdReports).then((data) => {
+							let form = {status: '3', id: row.reportsSubmitId}
+							this.projectInfoService.updateReportsSubmitById(form)
+							this.$message.success(data)
+							this.refreshList()
+						})
+					}
+				})
+			})
+		},
+		//报批签发审核
+		reportsSubmitCheck(row){
+			this.projectInfoService.queryReportsById(row.reportsSubmitId).then((data) => {
+				if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todoReports(row)
+				}
+			})
+		},
+		// 审核或重新调整跳转  报批签发
+		todoReports (row) {
+			let cUser = false
+			this.projectInfoService.queryReportsById(row.reportsSubmitId).then((data) => {
+				taskService.getTaskDefInfo({
+					taskId: data.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: '/jy/project/ProjectList'   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			})
+		},
+		//报批签发驳回后重新调整
+		adjustReportsSubmit(row){
+			this.projectInfoService.queryReportsById(row.reportsSubmitId).then((data) => {
+				if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todoReports(row)
+				}
+			})
+		},
+		//报批签发修改
+		edit(row){
+			// 读取流程表单
+			let title = `发起流程【嘉溢-报批签发】`
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[嘉溢-报批签发]`
+			let status = 'startAndHold'
+			if (row.reportsSubmit === '3') {
+				status = 'startAndClose'
+			} else if (row.reportsSubmit === '4') {
+				status = 'reapplyFlag'
+			}
+			taskService.getTaskDef({ procDefId: this.processDefinitionReportsId,
+				businessId: row.reportsSubmitId,
+				businessTable: 'jy_project_reports_submit'}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.processDefinitionReportsId,
+						procDefKey: this.procDefKeyReports,
+						title: title,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'jy_project_reports_submit',
+						businessId: row.reportsSubmitId,
+						isShow: 'false',
+						status: status,
+						routePath: '/jy/project/ProjectList'
+					}
+				})
+			})
+		},
+		//项目归档
+		archivePush(row){
+			// 读取流程表单
+			let title = `发起流程【嘉溢-项目归档】`
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[嘉溢-项目归档]`
+			let status = 'startAndHold'
+			if (row.reviewStatus === '3') {
+				status = 'startAndClose'
+			} else if (row.reviewStatus === '4') {
+				status = 'reapplyFlag'
+			}
+			taskService.getTaskDef({ procDefId: this.processDefinitionIdArchive,
+				businessId: row.archiveId,
+				businessTable: 'jy_project_archive'}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.processDefinitionIdArchive,
+						procDefKey: this.procDefKeyArchive,
+						title: title,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'jy_project_archive',
+						businessId: row.archiveId,
+						isShow: 'false',
+						status: status,
+						routePath: '/jy/project/ProjectList'
+					}
+				})
+			})
+		},
+		// 查询当前登录人是否是数据的审核人  归档
+		checkIsAuditArchive (row) {
+			let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+			if (this.commonJS.isNotEmpty(row.archiveId)) {
+				for (const userId of row.archiveId) {
+					if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+						return true
+					}
+				}
+			}
+			return false
+		},
+		//查看归档审批流程结果
+		archiveDetail(row){
+			if (row.reviewStatus !== '0' && row.reviewStatus !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.procInsIdArchive,
+					procDefId: this.processDefinitionIdArchive
+				}).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.archiveId,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+		//归档撤回
+		archiveReback(row){
+			this.$confirm(`确定要撤回该申请吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(async () => {
+				await this.projectInfoService.findByIdArchive(row.archiveId).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						processService.revokeProcIns(row.procInsIdArchive).then((data) => {
+							let form = {status: '3', id: row.archiveId}
+							this.projectInfoService.updateStatusByArchiveId(form)
+							this.$message.success(data)
+							this.refreshList()
+						})
+					}
+				})
+			})
+		},
+		//归档审核
+		examineArchive(row){
+			this.projectInfoService.findByIdArchive(row.archiveId).then((data) => {
+				if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todoArchive(row)
+				}
+			})
+		},
+		// 审核或重新调整跳转  归档
+		todoArchive (row) {
+			let cUser = false
+			taskService.getTaskDefInfo({
+				taskId: row.taskIdArchive
+			}).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: '/jy/project/ProjectList'   // 数据处理后需要跳转的页面路径
+					}
+				})
+			})
+		},
+		//归档驳回后重新调整
+		adjustArchive(row){
+			this.projectInfoService.findByIdArchive(row.archiveId).then((data) => {
+				if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todoArchive(row)
+				}
+			})
+		},
 
 	}
 }

+ 365 - 0
src/views/jy/project/ProjectListDia.vue

@@ -0,0 +1,365 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <div v-if="isShow">
+<!--        <el-radio v-model="checkType" label="1" style="margin-right: 20px">项目</el-radio>-->
+<!--        <el-radio v-model="checkType" label="2" style="margin-right: 20px">报告</el-radio>-->
+<!--	    <el-radio v-model="checkType" label="3" style="margin-right: 20px">其他</el-radio>-->
+      </div>
+		<!--报告        -->
+		<div v-if="checkType === '2'">
+			<el-form size="large" :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+					 @submit.native.prevent>
+				<!-- 搜索框-->
+				<el-form-item label="项目名称" prop="projectName">
+					<el-input size="large" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="报告号" prop="reportNo">
+					<el-input size="large" v-model="searchForm.reportNo" placeholder="请输入报告号" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="报告创建时间" prop="createDates">
+					<el-date-picker
+						placement="bottom-start"
+						format="YYYY-MM-DD HH:mm:ss"
+						value-format="YYYY-MM-DD HH:mm:ss"
+						v-model="searchForm.createDates"
+						type="datetimerange"
+						range-separator="至"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期">
+					</el-date-picker>
+				</el-form-item>
+
+				<el-form-item>
+					<el-button type="primary" @click="list1()" size="large" icon="el-icon-search">查询</el-button>
+					<el-button @click="resetSearch1()" size="large" icon="el-icon-refresh-right">重置</el-button>
+				</el-form-item>
+			</el-form>
+
+			<vxe-table
+				border="inner"
+				auto-resize
+				resizable
+				height="550px"
+				:loading="loading"
+				size="large"
+				ref="projectTable1"
+				show-header-overflow
+				show-overflow
+				highlight-hover-row
+				:menu-config="{}"
+				:print-config="{}"
+				@sort-change=""
+				:sort-config="{remote:true}"
+				:data="dataList1"
+				: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="230" align="center" title="项目名称" field="projectName" show-overflow="title"></vxe-column>
+				<vxe-column min-width="230" align="center" title="项目编号" field="projectNumber"></vxe-column>
+				<vxe-column min-width="230" align="center" title="报告文号" field="reportNo"></vxe-column>
+				<vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="报告创建人" field="userName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="报告创建时间" field="createTime"></vxe-column>
+
+			</vxe-table>
+			<vxe-pager
+				background
+				size="large"
+				:current-page="tablePage1.currentPage"
+				:page-size="tablePage1.pageSize"
+				:total="tablePage1.total"
+				:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+				:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+				@page-change="currentChangeHandle1">
+			</vxe-pager>
+		</div>
+      <div v-if="checkType === '1'" >
+          <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 label="项目编号" prop="no">
+              <el-input v-model="searchForm.no" placeholder="请输入项目编号" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="创建时间" prop="createDates">
+              <el-date-picker
+                placement="bottom-start"
+                format="YYYY-MM-DD HH:mm:ss"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                v-model="searchForm.createDates"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+              </el-date-picker>
+            </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="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="contractName"></vxe-column>
+            <vxe-column min-width="160" align="center" title="创建人" field="createById"></vxe-column>
+            <vxe-column min-width="160" align="center" title="创建时间" field="createTime"></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>
+        </div>
+      <div style="height: 500px;" v-if="checkType === '3'">
+        <el-form  label-width="80px" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<el-row  :gutter="15">
+            <el-col :span="21">
+              <el-form-item label="详情" prop="detail">
+                <el-input style="width: 100%" type="textarea" maxlength="500" v-model="detail" placeholder="请输入详情" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+		<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 ProjectInfoService from '@/api/jy/ProjectInfoService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+	    tablePage1: {
+		  total: 0,
+		  currentPage: 1,
+		  pageSize: 10,
+		  orders: []
+	    },
+        dataList: [],
+        dataList1: [],
+        searchForm: {
+          name: '',
+          no: '',
+          createBy: '',
+          projectMasterName: '',
+          projectNumber: '',
+          projectName: '',
+          createDates: [],
+		  reportNo: '',
+          status: ''
+        },
+        checkType: '',
+        detail: '',
+        isShow: true,
+        num: true,// num为true是多选,false是单选
+		reportType:''
+      }
+    },
+	  ProjectInfoService:null,
+    created () {
+    	this.projectInfoService=new ProjectInfoService()
+    },
+    components: {
+    },
+    methods: {
+      /**
+       * @param isShow
+       *      isShow为空,则可以选择“项目”或填写“其他”
+       *      isShow为false,则只可以选择“项目”,并且弹出提示
+       *      isShow为‘1’,则只可以选择“项目”,不弹出提示
+       *      isShow为其他任何值,则只可以填写“其他”
+       * @param num
+       *      num为空或者true,则允许多选
+       *      num为其他任何值,则只可以单选
+       */
+      init (isShow, num) {
+        if (this.commonJS.isEmpty(isShow)) {
+          this.isShow = true
+          this.checkType = '1'
+        } else {
+			if (isShow === false || isShow === 'false') {
+				if (this.checkType === '1') {
+					this.isShow = false
+					this.checkType = '1'
+					this.$message({message: '第一条为项目后面新增只能选择项目', type: 'warning', customClass: 'messageZindex'})
+				} else if (this.checkType === '2') {
+					this.isShow = false
+					this.checkType = '2'
+					this.$message({message: '第一条为报告后面新增只能选择报告', type: 'warning', customClass: 'messageZindex'})
+				}
+			} else if (isShow === '1') {
+				this.isShow = false
+				this.checkType = '1'
+			}else if (isShow === '2') {
+				this.isShow = false
+				this.checkType = '2'
+			} else {
+				this.isShow = false
+				this.checkType = '3'
+			}
+        }
+        if (this.commonJS.isEmpty(num) || num === true) {
+          this.num = true // num为true是多选,false是单选
+        } else {
+          this.num = false
+        }
+        this.visible = true
+        this.list()
+	    // this.list1()
+      },
+      // 表单提交
+      getProgram () {
+        let rows
+	    let rowsType
+        if (this.checkType === '1') {
+          if (this.commonJS.isEmpty(this.$refs.projectTable.getCheckboxRecords())) {
+            this.$message.error('请至少选择一条数据')
+            return
+          }
+          if (this.num === false) {
+            if (this.$refs.projectTable.getCheckboxRecords().length > 1) {
+              this.$message.error('最多选择一条数据')
+              return
+            }
+          }
+          rows = this.$refs.projectTable.getCheckboxRecords()
+        } else if (this.checkType === '2') {
+			if (this.commonJS.isEmpty(this.$refs.projectTable1.getCheckboxRecords())) {
+				this.$message.error('请至少选择一条数据')
+				return
+			}
+			if (this.num === false) {
+				if (this.$refs.projectTable1.getCheckboxRecords().length > 1) {
+					this.$message.error('最多选择一条数据')
+					return
+				}
+			}
+			rows = this.$refs.projectTable1.getCheckboxRecords()
+		} else {
+          if (this.commonJS.isEmpty(this.detail)) {
+            this.$message.error('请填写开票详情')
+            return
+          }
+          rows = [{projectName: this.detail}]
+		  rows.bj1 = 'bj1'
+        }
+
+        this.close()
+        this.$emit('getProgram', rows)
+      },
+      list () {
+        this.loading = true
+        this.searchForm.status = '5'
+		  this.projectInfoService.getByCreateOut({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+        	console.log('aa',data.records)
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+	  // list1 () {
+		//   this.loading = true
+		//   this.searchForm.status = '5'
+		//   projectRecordsService.list1({
+		// 	'current': this.tablePage1.currentPage,
+		// 	'size': this.tablePage1.pageSize,
+		// 	'orders': this.tablePage1.orders,
+		// 	...this.searchForm
+		//   }).then((data) => {
+		// 	this.dataList1 = data.records
+		// 	this.tablePage1.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()
+      },
+	  currentChangeHandle1 ({currentPage, pageSize}) {
+		this.tablePage1.currentPage = currentPage
+		this.tablePage1.pageSize = pageSize
+		this.list1()
+	  },
+	  resetSearch1 () {
+		this.$refs.searchForm.resetFields()
+		this.list1()
+	  },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>

+ 531 - 0
src/views/jy/project/ReportsInstanceForm.vue

@@ -0,0 +1,531 @@
+<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':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				<span style="color: red;border-top: 20px">*</span>关联项目
+				<el-button style="margin-left: 20px" type="primary" :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @click="insertEvent('base')"  plain>
+					新增
+				</el-button>
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="24">
+					<vxe-table
+						border
+						:footer-method="footerMethod2"
+						show-overflow
+						show-footer
+						ref="baseTable"
+						:key="baseKey"
+						class="vxe-table-element"
+						:data="inputForm.projectList"
+						style="margin-left: 5em"
+						@cell-click=""
+						@edit-closed=""
+						keep-source
+						:readonly="true"
+						highlight-current-row
+						:edit-rules="tableRules"
+						:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
+					>
+						<vxe-table-column field="name" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
+							<template v-slot:edit="scope">
+								<el-input  :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.name"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="no" align="center" title="项目编号" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="projectLeader" align="center" title="项目负责人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.projectLeader"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写创建时间" v-model="scope.row.createTime"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" align="center" width="100">
+							<template v-slot="scope">
+								<el-button :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+			<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="createByName"
+								  :rules="[ ]">
+						<el-input :disabled="true" v-model="inputForm.createByName" ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="申请时间" prop="createDate"
+								  :rules="[]">
+						<el-input :disabled="true" v-model="inputForm.createDate" ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="用印类型" prop="types"
+								  :rules="[
+							 {required: true, message:'用印类型不能为空', trigger:'blur'}
+							]">
+						<el-cascader :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'"   style="width: 100%" v-model="inputForm.types" :options="typeData" @change="handleChange" placeholder="请选择"  clearable />
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="用印份数" prop="number"
+								  :rules="[
+							 {required: true, message:'用印份数不能为空', trigger:'blur'}
+
+							]">
+						<el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" v-model="inputForm.number" placeholder="请输入用印份数" ></el-input>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="24">
+					<el-form-item label="说明" prop="remarks"
+								  :rules="[
+                        {required: true, message:'说明不能为空', trigger:'blur'}
+               ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<!--        附件-->
+		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+	</div>
+	<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import ProjectInfoService from '@/api/jy/ProjectInfoService'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import ProjectForm from './ProjectListDia'
+	import dictService from "@/api/sys/dictService";
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				inputForm:{
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:this.$store.state.user.id,
+					createByName:this.$store.state.user.name,
+					createDate:this.moment(new Date()).format('YYYY-MM-DD'),
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				},
+				programRow:'',
+				baseKey:'',
+				typeData:[],
+				keyWatch: '',
+
+			}
+		},
+		ProjectInfoService: null,
+		created () {
+			console.log('jld ')
+			this.projectInfoService = new ProjectInfoService()
+			this.getTypeList()
+		},
+		mounted () {
+		},
+		activated () {
+			this.getTypeList()
+		},
+		components: {
+			UpLoadComponent,
+			ProjectForm,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							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={
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:'',
+					createByName:'',
+					createDate:'',
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				}
+				this.typeData.forEach(option => {
+					option.disabled = false
+				})
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.projectInfoService.queryReportsById(this.inputForm.id).then((data)=>{
+							console.log('s',data)
+							this.inputForm = this.recover(this.inputForm, data)
+							var list=data.projectList
+							this.inputForm.projectList=list
+							this.inputForm.types=data.types
+							this.inputForm.createById=data.createById
+							if (this.commonJS.isEmpty(this.inputForm.createDate)) {
+								this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD')
+							}
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'jyReportsSubmit',null, null, null, null, false)
+						})
+						this.loading = false
+					}
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.projectInfoService.queryReportsById(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 this.projectInfoService.queryReportsById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						if (this.$store.state.user.name==='leader'){
+							this.inputForm.status= '5'
+						}else {
+							this.inputForm.status= '2'
+						}
+						let param = {status: this.inputForm.status, id: this.inputForm.id}
+						this.inputForm=JSON.stringify(this.inputForm)
+						this.projectInfoService.updateReportsSubmitById(param).then(() => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.projectInfoService.queryReportsById(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 (this.commonJS.isEmpty(this.inputForm.projectList)) {
+					this.$message.error('请选择关联项目')
+					this.loading = false
+					throw new Error('请选择关联项目')
+				}
+				if (this.commonJS.isEmpty(this.inputForm.types)) {
+					this.$message.error('请选择用印类型')
+					this.loading = false
+					throw new Error('请选择用印类型')
+				}
+				if (this.commonJS.isEmpty(this.inputForm.number)) {
+					this.$message.error('请输入用印份数')
+					this.loading = false
+					throw new Error('请输入用印份数')
+				}
+				if (this.commonJS.isEmpty(this.inputForm.remarks)) {
+					this.$message.error('请输入说明')
+					this.loading = false
+					throw new Error('请输入说明')
+				}
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.projectInfoService.saveReportsSubmit(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					if (this.$store.state.user.name==='leader'){
+						this.inputForm.status= '5'
+					}else {
+						this.inputForm.status= '2'
+					}
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.files = this.$refs.uploadComponent.getDataList()
+						// this.inputForm=JSON.stringify(this.inputForm)
+						this.projectInfoService.saveReportsSubmit(this.inputForm).then((data) => {
+							this.inputForm.id = data.businessId
+							console.log('data22', data)
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.$refs.uploadComponent.clearUpload()
+				this.$refs.inputForm.resetFields()
+				this.inputForm = {
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:'',
+					createByName:'',
+					createDate:'',
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				}
+				this.visible = false
+			},
+			insertEvent(type) {
+				if (type === 'base') {
+					if (this.inputForm.projectList.length>=1){
+						if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
+							this.$message.error('第一行不能为空')
+							return
+						}
+					}
+					this.$refs.baseTable.insertAt({})
+					this.inputForm.projectList.push({})
+					this.baseKey = Math.random()
+				}
+				console.log('22',this.inputForm.projectList)
+			},
+			// 删除
+			removeEvent(row, rowIndex, type) {
+				if (type === 'base') {
+					this.$refs.baseTable.remove(row)
+					this.inputForm.projectList.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm(rowIndex) {
+				this.$refs.projectForm.init()
+				this.programRow = rowIndex
+				console.log('11',this.programRow)
+			},
+			getProgram(rows) {
+				console.log('1',rows)
+				rows.forEach((item, index) => {
+					this.inputForm.programId = item.id
+					if (index === 0) {
+						let r = this.inputForm.projectList[this.programRow]
+						r.projectId=item.id
+						r.name = item.name
+						r.no = item.no
+						r.projectLeader = item.projectLeader
+						r.createTime = item.createTime
+						console.log('2',this.inputForm.projectList[this.programRow])
+					} else {
+						let r = {
+							projectId: item.id,
+							name: item.name,
+							no: item.no,
+							projectLeader: item.projectLeader,
+							createTime: item.createTime,
+						}
+						this.$refs.baseTable.insertAt(r)
+						this.inputForm.projectList.push(r)
+						this.baseKey = Math.random()
+					}
+
+				})
+				this.$forceUpdate()
+				this.programRow = ''
+				// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (await this.$refs.uploadComponent.checkProgress()) {
+					this.loading = false
+					throw new Error()
+				} else {
+					if (type === 'reject' || type === 'reback') {
+						this.projectInfoService.queryReportsById(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}
+									this.projectInfoService.updateReportsSubmitById(param).then(() => {
+										this.loading = false
+										callback()
+									})
+								}
+							}
+						})
+					} else if (type === 'hold') {
+						this.projectInfoService.queryReportsById(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}
+								this.projectInfoService.updateReportsSubmitById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						})
+					}
+				}
+			},
+			addRedStar(h, { column }) {
+				return [
+					h('span', { style: 'color: #F56C6C' }, '*'),
+					h('span', ' ' + column.label)
+				];
+			},
+			getTypeList(){
+				console.log(111)
+				dictService.getTypeData().then((data)=>{
+					console.log('a',data)
+					this.typeData=data
+				})
+			}
+		}
+	}
+</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>

+ 12 - 13
src/views/jy/workContractInfo/ContractAddForm.vue

@@ -128,21 +128,20 @@
 						 :rules="[
                 {required: true, message:'请选择所属部门', trigger:'blur'}
                ]">
-            <SelectTree
-              ref="officeTree"
-              :props="{
+			  <SelectTree
+				  ref="officeTree"
+				  :props="{
                   value: 'id',             // ID字段名
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
 
-              :url="`/system-server/sys/office/treeData?type=2`"
-              :value="inputForm.department"
-              :accordion="true"
-			  size="default"
-			  v-if="method!=='view'"
-              @getValue="(value) => {inputForm.department=value}"/>
-			  <el-input v-else-if="method==='view'" maxlength="64" :readonly="true" v-model="inputForm.department" placeholder="请填写所属部门"></el-input>
+				  :url="`/system-server/sys/office/treeData?type=2`"
+				  :value="inputForm.department"
+				  :accordion="true"
+				  size="default"
+				  @getValue="(value) => {inputForm.department=value}"/>
+<!--			  <el-input v-else-if="method==='view'" maxlength="64" :readonly="true" v-model="inputForm.department" placeholder="请填写所属部门"></el-input>-->
 		  </el-form-item>
         </el-col>
 
@@ -357,7 +356,7 @@
           contractStatus: '新创建',
           paymentAgreement: '',
           changeNum: '0',
-          department: '',
+			department: '',
           clientContacts: '',
           clientContactsPhone: '',
           createBy: this.$store.state.user.name,
@@ -510,7 +509,7 @@
           contractStatus: '',
           paymentAgreement: '',
           changeNum: '',
-          department: '',
+			department: '',
           clientContacts: '',
           clientContactsPhone: '',
           createBy: this.$store.state.user.name,
@@ -567,7 +566,7 @@
 							this.inputForm.customerNo=da[0].number
 					})
 					this.inputForm.department=data.department
-					console.log('data',data)
+					console.log('data',this.inputForm.department)
 					if (this.commonJS.isEmpty(this.inputForm.department)) {
 						this.inputForm.department = this.$store.state.user.office.id
 					}

+ 1 - 2
src/views/jy/workContractInfo/WorkContractForm.vue

@@ -136,9 +136,8 @@
 								:accordion="true"
 								:disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'"
 								size="default"
-								v-if="method!=='view'"
 								@getValue="(value) => {inputForm.department=value}"/>
-							<el-input v-else-if="method==='view'" maxlength="64" :readonly="true" v-model="inputForm.department" placeholder="请填写所属部门"></el-input>
+<!--							<el-input v-else-if="method==='view'" maxlength="64" :readonly="true" v-model="inputForm.department" placeholder="请填写所属部门"></el-input>-->
 						</el-form-item>
 					</el-col>
 

+ 4 - 2
src/views/materialManagement/userSeal/SignetAddForm.vue

@@ -38,9 +38,9 @@
 								<el-input :disabled="true" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
 							</template>
 						</vxe-table-column>
-						<vxe-table-column field="leader" align="center" title="项目负责人" :edit-render="{}">
+						<vxe-table-column  field="projectLeader" align="center" title="项目负责人" :edit-render="{}">
 							<template v-slot:edit="scope">
-								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.leader"/>
+								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.projectLeader"/>
 							</template>
 						</vxe-table-column>
 						<vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
@@ -291,6 +291,8 @@
 							this.signetService.updateStatusById(param).then(() => {
 								callback(data.businessTable, data.businessId, this.inputForm)
 								this.loading = false
+							}).catch(() => {
+								this.loading = false
 							})
 					}
 				})

+ 1 - 1
src/views/materialManagement/userSeal/SignetList.vue

@@ -509,7 +509,7 @@ export default {
 		},
 		//查看项目信息
 		openProject(row){
-			this.$refs.projectDia.init('view', row.id,row.auditId1, row.auditId2, row.auditId3,row.sealId,row.outInstanceId)
+			this.$refs.projectDia.init('view', row.id,row.auditId1, row.auditId2, row.auditId3,row.sealId,row.outInstanceId,row.reportsSubmitId,row.archiveId)
 		}
     }
   }