Browse Source

复核调整

wangqiang 1 year ago
parent
commit
b91c88f87a
28 changed files with 7232 additions and 3904 deletions
  1. 19 2
      src/api/cw/reportManagement/ProjectReportService.js
  2. 28 0
      src/api/cw/reportManagement/ReportReviewService.js
  3. 1 1
      src/api/program/ProgramFileDictService.js
  4. 1 1
      src/api/program/ProgramTypeFileDictService.js
  5. 14 0
      src/api/sys/OSSService.js
  6. 7 0
      src/api/sys/ReimbursementService.js
  7. 7 0
      src/api/sys/officeService.js
  8. 7 0
      src/api/sys/userService.js
  9. 0 1
      src/components/userSelect/UserSelectDialog.vue
  10. 462 0
      src/components/userSelectForQualification/UserSelectDialog.vue
  11. 121 0
      src/components/userSelectForQualification/index.vue
  12. 461 0
      src/components/userSelectNew/UserSelectDialog.vue
  13. 121 0
      src/components/userSelectNew/index.vue
  14. 25 7
      src/views/cw/projectRecords/ProjectRecordsAddForm.vue
  15. 1075 0
      src/views/cw/projectRecords/ProjectRecordsAddForm2.vue
  16. 17 2
      src/views/cw/projectRecords/ProjectRecordsForm.vue
  17. 1255 0
      src/views/cw/projectRecords/ProjectRecordsForm2.vue
  18. 20 1
      src/views/cw/projectRecords/ProjectRecordsList.vue
  19. 495 0
      src/views/cw/projectRecords/ProjectRecordsList2.vue
  20. 577 1112
      src/views/cw/reportManagement/ReportManagementAddForm.vue
  21. 35 35
      src/views/cw/reportManagement/ReportManagementForm.vue
  22. 909 0
      src/views/cw/reportManagement/ReportManagementFormNew.vue
  23. 123 1290
      src/views/cw/reportManagement/ReportManagementList.vue
  24. 182 0
      src/views/cw/reportManagement/reportReview/FileForm.vue
  25. 778 1127
      src/views/cw/reportManagement/reportReview/ReportReviewForm.vue
  26. 142 0
      src/views/finance/invoice/UserPullFormNew.vue
  27. 140 135
      src/views/program/configuration/typeFileDict/TypeFileDictForm.vue
  28. 210 190
      src/views/program/configuration/typeFileDict/TypeFileDictList.vue

+ 19 - 2
src/api/cw/reportManagement/ProjectReportService.js

@@ -37,6 +37,23 @@ export default {
       params: {id: id}
     })
   },
+	queryByIdNew: function (id) {
+		return request({
+			url: prefix + '/cwProjectReport/queryByIdNew',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	/*
+	根据项目id,与报告id查询附件信息
+	 */
+	getAttachmentList(projectId,id){
+		return request({
+			url: prefix + '/cwProjectReport/getAttachmentList',
+			method: 'get',
+			params: {projectId:projectId, id: id}
+		})
+	},
 	queryById2: function (id) {
     return request({
       url: prefix + '/cwProjectReport/queryById2',
@@ -44,11 +61,11 @@ export default {
       params: {id: id}
     })
   },
-  delete: function (ids) {
+  delete: function (ids,projectId) {
     return request({
       url: prefix + '/cwProjectReport/delete',
       method: 'delete',
-      params: {ids: ids}
+      params: {ids: ids,projectId: projectId}
     })
   },
   clineList: function (params) {

+ 28 - 0
src/api/cw/reportManagement/ReportReviewService.js

@@ -16,6 +16,20 @@ export default class ReportReviewService {
       data: param
     })
   }
+	saveNew (param) {
+		return request({
+			url: prefix + '/projectReport/review/saveFormNew',
+			method: 'post',
+			data: param
+		})
+	}
+	saveFormReviewNew (param) {
+		return request({
+			url: prefix + '/projectReport/review/saveFormReviewNew',
+			method: 'post',
+			data: param
+		})
+	}
   updateReviewStatysByReportId (data) {
     return request({
       url: prefix + '/projectReport/review/updateReviewStatysByReportId',
@@ -23,6 +37,13 @@ export default class ReportReviewService {
       data: data
     })
   }
+  updateReviewStatusByReportIdNew (data) {
+    return request({
+      url: prefix + '/projectReport/review/updateReviewStatusByReportIdNew',
+      method: 'post',
+      data: data
+    })
+  }
   queryByReportId (id) {
     return request({
       url: prefix + '/projectReport/review/queryByReportId',
@@ -30,6 +51,13 @@ export default class ReportReviewService {
       params: {id: id}
     })
   }
+  queryByReportIdNew (id) {
+    return request({
+      url: prefix + '/projectReport/review/queryByReportIdNew',
+      method: 'get',
+      params: {id: id}
+    })
+  }
   getProcessStatus (id) {
     return request({
       url: prefix + '/projectReport/review/getProcessStatus',

+ 1 - 1
src/api/program/ProgramFileDictService.js

@@ -1,5 +1,5 @@
 import request from '@/utils/httpRequest'
-import { ASSESS_PATH as prefix } from "../AppPath";
+import { FINANCE_PATH as prefix } from "../AppPath";
 
 export default class ProgramFileDictService {
   list (params) {

+ 1 - 1
src/api/program/ProgramTypeFileDictService.js

@@ -1,5 +1,5 @@
 import request from '@/utils/httpRequest'
-import { ASSESS_PATH as prefix } from "../AppPath";
+import { FINANCE_PATH as prefix } from "../AppPath";
 
 export default class ProgramTypeDictService {
   list (params) {

+ 14 - 0
src/api/sys/OSSService.js

@@ -18,6 +18,13 @@ export default class OSSSerive {
       data: param
     })
   }
+	save (param) {
+		return request({
+			url: prefix + '/oss/file/save',
+			method: 'post',
+			data: param
+		})
+	}
   findFileList (attachmentId) {
     return request({
 		  url: prefix + '/oss/file/findFileList',
@@ -46,6 +53,13 @@ export default class OSSSerive {
       params: {id: id}
     })
   }
+	getFileListByAttachmentIdAndModuleType (attachmentId,moduleType) {
+		return request({
+			url: prefix + '/oss/file/getFileListByAttachmentIdAndModuleType',
+			method: 'get',
+			params: {attachmentId: attachmentId,moduleType:moduleType}
+		})
+	}
   downLoadAttach (url) {
     return request({
       url: prefix + '/oss/file/downLoadAttach',

+ 7 - 0
src/api/sys/ReimbursementService.js

@@ -51,6 +51,13 @@ export default class ReimbursementService {
       params: {name: name}
     })
   }
+  userTreeNew (name) {
+    return request({
+      url: prefix + '/reimbursement/info/userTreeNew',
+      method: 'get',
+      params: {name: name}
+    })
+  }
   exportFile (params) {
     return request({
       url: prefix + '/reimbursement/info/exportFile',

+ 7 - 0
src/api/sys/officeService.js

@@ -41,6 +41,13 @@ export default {
 			params: params,
 		});
 	},
+	treeDataNew: function (params) {
+		return request({
+			url: prefix + "/sys/office/treeDataNew",
+			method: "get",
+			params: params,
+		});
+	},
 	allTreeData: function (params) {
 		return request({
 			url: prefix + "/sys/office/allTreeData",

+ 7 - 0
src/api/sys/userService.js

@@ -94,6 +94,13 @@ export default {
 			params: params,
 		});
 	},
+	listNew: function (params) {
+		return request({
+			url: prefix + "/sys/user/listNew",
+			method: "get",
+			params: params,
+		});
+	},
 	allUserList: function (params) {
 		return request({
 			url: prefix + "/sys/user/allUserList",

+ 0 - 1
src/components/userSelect/UserSelectDialog.vue

@@ -255,7 +255,6 @@ export default {
 		//获取用户
 		async getUser() {
 			this.showUserloading = true;
-			this.searchForm.certType = '1'
 			userService
 				.list({
 					current: this.currentPage,

+ 462 - 0
src/components/userSelectForQualification/UserSelectDialog.vue

@@ -0,0 +1,462 @@
+<template>
+	<el-dialog
+		v-model="dialogVisible"
+		title="人员选择"
+		:width="type == 1 ? 680 : 460"
+		destroy-on-close
+		append-to-body
+		@closed="$emit('closed')"
+		draggable
+	>
+		<template v-if="type == 1">
+			<div class="user-select">
+				<div class="user-select__left">
+					<div class="user-select__search">
+						<el-input
+							v-model="searchForm.name"
+							prefix-icon="search"
+							placeholder="搜索成员"
+						>
+							<template #append>
+								<el-button
+									icon="search"
+									@click="search"
+								></el-button>
+							</template>
+						</el-input>
+					</div>
+					<div class="user-select__select">
+						<div
+							class="user-select__tree"
+							v-loading="showGrouploading"
+						>
+							<el-scrollbar>
+								<el-tree
+									class="menu"
+									ref="groupTree"
+									:data="group"
+									node-key="id"
+									:props="{
+										label: 'name',
+										children: 'children',
+									}"
+									highlight-current
+									:expand-on-click-node="false"
+									:current-node-key="groupId"
+									@node-click="groupClick"
+								>
+									<template #default="{ node, data }">
+										<span
+											class="custom-tree-node el-tree-node__label"
+										>
+											<span class="label">
+												<el-icon
+													:size="16"
+													class="m-r-5"
+												>
+													<qiye
+														v-if="data.type === '1'"
+														:style="{
+															color:
+																$TOOL.data.get(
+																	'IS_PRIMARY_TENANT'
+																) &&
+																data.tenantDTO &&
+																$utils.getTenantColorById(
+																	data
+																		.tenantDTO
+																		.id
+																),
+														}"
+													></qiye>
+													<bumen
+														v-else
+														:style="{
+															color:
+																$TOOL.data.get(
+																	'IS_PRIMARY_TENANT'
+																) &&
+																data.tenantDTO &&
+																$utils.getTenantColorById(
+																	data
+																		.tenantDTO
+																		.id
+																),
+														}"
+													></bumen>
+												</el-icon>
+												{{ node.label }}
+											</span>
+										</span>
+									</template>
+								</el-tree>
+							</el-scrollbar>
+						</div>
+						<div
+							class="user-select__user"
+							v-loading="showUserloading"
+						>
+							<div class="user-select__user__list">
+								<el-scrollbar ref="userScrollbar">
+									<el-tree
+										class="menu"
+										ref="userTree"
+										:data="user"
+										node-key="id"
+										highlight-current
+										:props="{
+											key: 'id',
+											label: 'name',
+											children: 'children',
+										}"
+										:default-checked-keys="selectedIds"
+										:show-checkbox="limit > 1"
+										check-on-click-node
+										@check-change="userClick"
+									></el-tree>
+								</el-scrollbar>
+							</div>
+							<footer>
+								<el-pagination
+									background
+									layout="prev,next"
+									small
+									:total="total"
+									:page-size="pageSize"
+									v-model:currentPage="currentPage"
+									@current-change="paginationChange"
+								></el-pagination>
+							</footer>
+						</div>
+					</div>
+				</div>
+				<div class="user-select__toicon">
+					<el-icon><arrow-right /></el-icon>
+				</div>
+				<div class="user-select__selected">
+					<header>已选 ({{ selected.length }})</header>
+					<ul>
+						<el-scrollbar>
+							<li
+								v-for="(item, index) in selected"
+								:key="item.id"
+							>
+								<span class="name">
+									<el-avatar
+										v-if="
+											$TOOL.data.get('IS_PRIMARY_TENANT')
+										"
+										:size="30"
+										:style="{
+											background:
+												$utils.getTenantColorById(
+													item.tenantId
+												) + '!important',
+										}"
+										>{{
+											item.name.substring(0, 1)
+										}}</el-avatar
+									>
+									<el-avatar v-else>{{
+										item.name.substring(0, 1)
+									}}</el-avatar>
+									<label>{{ item.name }}</label>
+								</span>
+								<span class="delete">
+									<el-button
+										text
+										type="primary"
+										icon="del-filled"
+										circle
+										size="small"
+										@click="deleteSelected(index)"
+									></el-button>
+								</span>
+							</li>
+						</el-scrollbar>
+					</ul>
+				</div>
+			</div>
+		</template>
+
+		<template #footer>
+			<el-button @click="dialogVisible = false">取 消</el-button>
+			<el-button type="primary" @click="save">确 认</el-button>
+		</template>
+	</el-dialog>
+</template>
+
+<script>
+import userService from "@/api/sys/userService";
+import officeService from "@/api/sys/officeService";
+export default {
+	props: {
+		tenantId: { type: String, default: null },
+		limit: {
+			type: Number,
+			default: 999999,
+		},
+	},
+	data() {
+		return {
+			searchForm: {
+				loginName: "",
+				companyDTO: {
+					id: "",
+				},
+				officeDTO: {
+					id: "",
+				},
+				name: "",
+			},
+			dialogVisible: false,
+			showGrouploading: false,
+			showUserloading: false,
+			groupId: "",
+			pageSize: 10,
+			total: 0,
+			currentPage: 1,
+			group: [],
+			user: [],
+			role: [],
+			type: 1,
+			selected: [],
+			value: [],
+		};
+	},
+	computed: {
+		selectedIds() {
+			return this.selected.map((t) => t.id);
+		},
+	},
+	methods: {
+		//打开赋值
+		async open(data) {
+			this.value = data || [];
+			this.selected = JSON.parse(JSON.stringify(data || []));
+			this.dialogVisible = true;
+			await this.getGroup();
+			this.getUser();
+		},
+		//获取组织
+		async getGroup() {
+			this.showGrouploading = true;
+			// officeService.treeData().then((data) => {
+			// 	this.officeTreeData = data
+			// 	this.showGrouploading = false;
+			// })
+			var res = await officeService.treeData({ tenantId: this.tenantId });
+			this.showGrouploading = false;
+			// var allNode = { id: "", type: "1", name: "所有" };
+			// res.unshift(allNode);
+			this.group = res;
+			this.searchForm.companyDTO.id = this.group[0].id;
+		},
+		//获取用户
+		async getUser() {
+			this.showUserloading = true;
+			this.searchForm.certType = '3'  //一级造价师
+			userService
+				.list({
+					current: this.currentPage,
+					size: this.pageSize,
+					...this.searchForm,
+					"tenantDTO.id": this.tenantId,
+				})
+				.then((data) => {
+					this.user = data.records;
+					this.total = data.total;
+					// this.pageNo = data.current
+					this.showUserloading = false;
+					this.$refs.userScrollbar.setScrollTop(0);
+				});
+		},
+		//组织点击
+		groupClick(data) {
+			if (data.type === "1") {
+				this.searchForm.companyDTO.id = data.id;
+				this.searchForm.officeDTO.id = "";
+			} else {
+				this.searchForm.companyDTO.id = "";
+				this.searchForm.officeDTO.id = data.id;
+			}
+			this.currentPage = 1;
+			this.groupId = data.id;
+			this.getUser();
+		},
+		//用户点击
+		userClick(data, checked) {
+			if (checked) {
+				if (this.limit === 1) {
+					this.selected = [
+						{
+							id: data.id,
+							name: data.name,
+							tenantId: data.tenantDTO?.id,
+						},
+					];
+				} else {
+					this.selected.push({
+						id: data.id,
+						name: data.name,
+						tenantId: data.tenantDTO?.id,
+					});
+				}
+			} else {
+				this.selected = this.selected.filter(
+					(item) => item.id != data.id
+				);
+			}
+		},
+		//用户分页点击
+		paginationChange() {
+			this.getUser();
+		},
+		//用户搜索
+		search() {
+			// this.groupId = ''
+			// this.$refs.groupTree.setCurrentKey(this.groupId)
+			this.currentPage = 1;
+			this.getUser();
+		},
+		//删除已选
+		deleteSelected(index) {
+			this.selected.splice(index, 1);
+			console.log(this.selected);
+			if (this.type == 1) {
+				this.$refs.userTree.setCheckedKeys(this.selectedIds);
+			} else if (this.type == 2) {
+				this.$refs.groupTree.setCheckedKeys(this.selectedIds);
+			}
+		},
+		//提交保存
+		save() {
+			this.value.splice(0, this.value.length);
+			this.selected.map((item) => {
+				this.value.push(item);
+			});
+			if (this.limit < this.value.length) {
+				this.$message.error(`你最多只能选择${this.limit}个用户`);
+				return;
+			}
+			this.$emit("doSubmit", this.value);
+			console.log(this.value)
+			this.dialogVisible = false;
+		},
+	},
+};
+</script>
+
+<style scoped>
+.user-select {
+	display: flex;
+}
+.user-select__left {
+	width: 400px;
+}
+.user-select__right {
+	flex: 1;
+}
+.user-select__selected li .name .el-avatar {
+	margin-right: 2px;
+	height: 10;
+	width: 25px;
+	height: 25px;
+}
+.user-select__search {
+	padding-bottom: 10px;
+}
+
+.user-select__select {
+	display: flex;
+	border: 1px solid var(--el-border-color-light);
+	background: var(--el-color-white);
+}
+.user-select__tree {
+	width: 200px;
+	height: 300px;
+	border-right: 1px solid var(--el-border-color-light);
+}
+.user-select__user {
+	width: 200px;
+	height: 300px;
+	display: flex;
+	flex-direction: column;
+}
+.user-select__user__list {
+	flex: 1;
+	overflow: auto;
+}
+.user-select__user footer {
+	height: 36px;
+	padding-top: 5px;
+	border-top: 1px solid var(--el-border-color-light);
+}
+
+.user-select__toicon {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	margin: 0 10px;
+}
+.user-select__toicon i {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	background: #ccc;
+	width: 20px;
+	height: 20px;
+	text-align: center;
+	line-height: 20px;
+	border-radius: 50%;
+	color: #fff;
+}
+
+.user-select__selected {
+	height: 345px;
+	width: 200px;
+	border: 1px solid var(--el-border-color-light);
+	background: var(--el-color-white);
+}
+.user-select__selected header {
+	height: 43px;
+	line-height: 43px;
+	border-bottom: 1px solid var(--el-border-color-light);
+	padding: 0 15px;
+	font-size: 16px;
+}
+.user-select__selected ul {
+	height: 300px;
+	overflow: auto;
+}
+.user-select__selected li {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	padding: 5px 5px 5px 15px;
+	height: 38px;
+}
+.user-select__selected li .name {
+	display: flex;
+	align-items: center;
+}
+.user-select__selected li .name .el-avatar {
+	margin-right: 10px;
+}
+.user-select__selected li .delete {
+	display: none;
+}
+.user-select__selected li:hover {
+	background: var(--el-color-primary-light-9);
+}
+.user-select__selected li:hover .delete {
+	display: inline-block;
+}
+.user-select-role .user-select__left {
+	width: 200px;
+}
+.user-select-role .user-select__tree {
+	border: none;
+	height: 343px;
+}
+</style>

+ 121 - 0
src/components/userSelectForQualification/index.vue

@@ -0,0 +1,121 @@
+<template>
+	<template v-if="printRead">
+		<label>{{ name }}</label>
+	</template>
+	<template v-else>
+		<el-input
+			placeholder="请选择"
+			readonly
+			:clearable="clearable"
+			:disabled="disabled"
+			style="line-hight: 40px"
+			v-model="name"
+		>
+			<template #append>
+				<el-button
+					:disabled="disabled"
+					:readonly="readonly"
+					@click="showUserSelect"
+					icon="search"
+				></el-button>
+			</template>
+		</el-input>
+		<user-select
+			ref="userSelect"
+			@doSubmit="selectUsersToInput"
+			:tenantId="tenantId"
+			:limit="limit"
+		></user-select>
+	</template>
+</template>
+<script>
+	import userSelect from "./UserSelectDialog";
+	import userService from "@/api/sys/userService";
+	export default {
+		data() {
+			return {
+				name: "",
+				selectData: [],
+			};
+		},
+		props: {
+			limit: Number,
+			modelValue: { type: String, default: "" },
+			tenantId: { type: String, default: null },
+			printRead: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			clearable: {
+				type: Boolean,
+				default: () => {
+					return true;
+				},
+			},
+			readonly: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			disabled: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+		},
+		components: {
+			userSelect,
+		},
+		watch: {
+			modelValue: {
+				handler(newVal) {
+					this.selectData = [];
+					if (newVal) {
+						newVal.split(",").forEach((id) => {
+							userService.queryById(id).then((data) => {
+								if (data && data.id !== "") {
+									this.selectData.push(data);
+									this.name = this.selectData
+										.map((user) => {
+											return user.name;
+										})
+										.join(",");
+								}
+							});
+						});
+					} else {
+						this.name = "";
+					}
+				},
+				immediate: true,
+				deep: false,
+			},
+		},
+		methods: {
+			selectUsersToInput(users) {
+				let selectIds = users
+					.map((user) => {
+						return user.id;
+					})
+					.join(",");
+				this.$emit("update:modelValue", selectIds);
+			},
+			showUserSelect() {
+				this.$refs.userSelect.open(this.selectData);
+			},
+		},
+	};
+</script>
+<style>
+	.el-form-item__content .el-input-group {
+		vertical-align: middle;
+	}
+	.el-tag + .el-tag {
+		margin-left: 5px;
+		margin-bottom: 5px;
+	}
+</style>

+ 461 - 0
src/components/userSelectNew/UserSelectDialog.vue

@@ -0,0 +1,461 @@
+<template>
+	<el-dialog
+		v-model="dialogVisible"
+		title="人员选择"
+		:width="type == 1 ? 680 : 460"
+		destroy-on-close
+		append-to-body
+		@closed="$emit('closed')"
+		draggable
+	>
+		<template v-if="type == 1">
+			<div class="user-select">
+				<div class="user-select__left">
+					<div class="user-select__search">
+						<el-input
+							v-model="searchForm.name"
+							prefix-icon="search"
+							placeholder="搜索成员"
+						>
+							<template #append>
+								<el-button
+									icon="search"
+									@click="search"
+								></el-button>
+							</template>
+						</el-input>
+					</div>
+					<div class="user-select__select">
+						<div
+							class="user-select__tree"
+							v-loading="showGrouploading"
+						>
+							<el-scrollbar>
+								<el-tree
+									class="menu"
+									ref="groupTree"
+									:data="group"
+									node-key="id"
+									:props="{
+										label: 'name',
+										children: 'children',
+									}"
+									highlight-current
+									:expand-on-click-node="false"
+									:current-node-key="groupId"
+									@node-click="groupClick"
+								>
+									<template #default="{ node, data }">
+										<span
+											class="custom-tree-node el-tree-node__label"
+										>
+											<span class="label">
+												<el-icon
+													:size="16"
+													class="m-r-5"
+												>
+													<qiye
+														v-if="data.type === '1'"
+														:style="{
+															color:
+																$TOOL.data.get(
+																	'IS_PRIMARY_TENANT'
+																) &&
+																data.tenantDTO &&
+																$utils.getTenantColorById(
+																	data
+																		.tenantDTO
+																		.id
+																),
+														}"
+													></qiye>
+													<bumen
+														v-else
+														:style="{
+															color:
+																$TOOL.data.get(
+																	'IS_PRIMARY_TENANT'
+																) &&
+																data.tenantDTO &&
+																$utils.getTenantColorById(
+																	data
+																		.tenantDTO
+																		.id
+																),
+														}"
+													></bumen>
+												</el-icon>
+												{{ node.label }}
+											</span>
+										</span>
+									</template>
+								</el-tree>
+							</el-scrollbar>
+						</div>
+						<div
+							class="user-select__user"
+							v-loading="showUserloading"
+						>
+							<div class="user-select__user__list">
+								<el-scrollbar ref="userScrollbar">
+									<el-tree
+										class="menu"
+										ref="userTree"
+										:data="user"
+										node-key="id"
+										highlight-current
+										:props="{
+											key: 'id',
+											label: 'name',
+											children: 'children',
+										}"
+										:default-checked-keys="selectedIds"
+										:show-checkbox="limit > 1"
+										check-on-click-node
+										@check-change="userClick"
+									></el-tree>
+								</el-scrollbar>
+							</div>
+							<footer>
+								<el-pagination
+									background
+									layout="prev,next"
+									small
+									:total="total"
+									:page-size="pageSize"
+									v-model:currentPage="currentPage"
+									@current-change="paginationChange"
+								></el-pagination>
+							</footer>
+						</div>
+					</div>
+				</div>
+				<div class="user-select__toicon">
+					<el-icon><arrow-right /></el-icon>
+				</div>
+				<div class="user-select__selected">
+					<header>已选 ({{ selected.length }})</header>
+					<ul>
+						<el-scrollbar>
+							<li
+								v-for="(item, index) in selected"
+								:key="item.id"
+							>
+								<span class="name">
+									<el-avatar
+										v-if="
+											$TOOL.data.get('IS_PRIMARY_TENANT')
+										"
+										:size="30"
+										:style="{
+											background:
+												$utils.getTenantColorById(
+													item.tenantId
+												) + '!important',
+										}"
+										>{{
+											item.name.substring(0, 1)
+										}}</el-avatar
+									>
+									<el-avatar v-else>{{
+										item.name.substring(0, 1)
+									}}</el-avatar>
+									<label>{{ item.name }}</label>
+								</span>
+								<span class="delete">
+									<el-button
+										text
+										type="primary"
+										icon="del-filled"
+										circle
+										size="small"
+										@click="deleteSelected(index)"
+									></el-button>
+								</span>
+							</li>
+						</el-scrollbar>
+					</ul>
+				</div>
+			</div>
+		</template>
+
+		<template #footer>
+			<el-button @click="dialogVisible = false">取 消</el-button>
+			<el-button type="primary" @click="save">确 认</el-button>
+		</template>
+	</el-dialog>
+</template>
+
+<script>
+import userService from "@/api/sys/userService";
+import officeService from "@/api/sys/officeService";
+export default {
+	props: {
+		tenantId: { type: String, default: null },
+		limit: {
+			type: Number,
+			default: 999999,
+		},
+	},
+	data() {
+		return {
+			searchForm: {
+				loginName: "",
+				companyDTO: {
+					id: "",
+				},
+				officeDTO: {
+					id: "",
+				},
+				name: "",
+			},
+			dialogVisible: false,
+			showGrouploading: false,
+			showUserloading: false,
+			groupId: "",
+			pageSize: 10,
+			total: 0,
+			currentPage: 1,
+			group: [],
+			user: [],
+			role: [],
+			type: 1,
+			selected: [],
+			value: [],
+		};
+	},
+	computed: {
+		selectedIds() {
+			return this.selected.map((t) => t.id);
+		},
+	},
+	methods: {
+		//打开赋值
+		async open(data) {
+			this.value = data || [];
+			this.selected = JSON.parse(JSON.stringify(data || []));
+			this.dialogVisible = true;
+			await this.getGroup();
+			this.getUser();
+		},
+		//获取组织
+		async getGroup() {
+			this.showGrouploading = true;
+			// officeService.treeData().then((data) => {
+			// 	this.officeTreeData = data
+			// 	this.showGrouploading = false;
+			// })
+			var res = await officeService.treeDataNew({ tenantId: this.tenantId });
+			this.showGrouploading = false;
+			// var allNode = { id: "", type: "1", name: "所有" };
+			// res.unshift(allNode);
+			this.group = res;
+			this.searchForm.companyDTO.id = this.group[0].id;
+		},
+		//获取用户
+		async getUser() {
+			this.showUserloading = true;
+			userService
+				.listNew({
+					current: this.currentPage,
+					size: this.pageSize,
+					...this.searchForm,
+					"tenantDTO.id": this.tenantId,
+				})
+				.then((data) => {
+					this.user = data.records;
+					this.total = data.total;
+					// this.pageNo = data.current
+					this.showUserloading = false;
+					this.$refs.userScrollbar.setScrollTop(0);
+				});
+		},
+		//组织点击
+		groupClick(data) {
+			if (data.type === "1") {
+				this.searchForm.companyDTO.id = data.id;
+				this.searchForm.officeDTO.id = "";
+			} else {
+				this.searchForm.companyDTO.id = "";
+				this.searchForm.officeDTO.id = data.id;
+			}
+			this.currentPage = 1;
+			this.groupId = data.id;
+			this.getUser();
+		},
+		//用户点击
+		userClick(data, checked) {
+			if (checked) {
+				if (this.limit === 1) {
+					this.selected = [
+						{
+							id: data.id,
+							name: data.name,
+							tenantId: data.tenantDTO?.id,
+						},
+					];
+				} else {
+					this.selected.push({
+						id: data.id,
+						name: data.name,
+						tenantId: data.tenantDTO?.id,
+					});
+				}
+			} else {
+				this.selected = this.selected.filter(
+					(item) => item.id != data.id
+				);
+			}
+		},
+		//用户分页点击
+		paginationChange() {
+			this.getUser();
+		},
+		//用户搜索
+		search() {
+			// this.groupId = ''
+			// this.$refs.groupTree.setCurrentKey(this.groupId)
+			this.currentPage = 1;
+			this.getUser();
+		},
+		//删除已选
+		deleteSelected(index) {
+			this.selected.splice(index, 1);
+			console.log(this.selected);
+			if (this.type == 1) {
+				this.$refs.userTree.setCheckedKeys(this.selectedIds);
+			} else if (this.type == 2) {
+				this.$refs.groupTree.setCheckedKeys(this.selectedIds);
+			}
+		},
+		//提交保存
+		save() {
+			this.value.splice(0, this.value.length);
+			this.selected.map((item) => {
+				this.value.push(item);
+			});
+			if (this.limit < this.value.length) {
+				this.$message.error(`你最多只能选择${this.limit}个用户`);
+				return;
+			}
+			this.$emit("doSubmit", this.value);
+			console.log(this.value)
+			this.dialogVisible = false;
+		},
+	},
+};
+</script>
+
+<style scoped>
+.user-select {
+	display: flex;
+}
+.user-select__left {
+	width: 400px;
+}
+.user-select__right {
+	flex: 1;
+}
+.user-select__selected li .name .el-avatar {
+	margin-right: 2px;
+	height: 10;
+	width: 25px;
+	height: 25px;
+}
+.user-select__search {
+	padding-bottom: 10px;
+}
+
+.user-select__select {
+	display: flex;
+	border: 1px solid var(--el-border-color-light);
+	background: var(--el-color-white);
+}
+.user-select__tree {
+	width: 200px;
+	height: 300px;
+	border-right: 1px solid var(--el-border-color-light);
+}
+.user-select__user {
+	width: 200px;
+	height: 300px;
+	display: flex;
+	flex-direction: column;
+}
+.user-select__user__list {
+	flex: 1;
+	overflow: auto;
+}
+.user-select__user footer {
+	height: 36px;
+	padding-top: 5px;
+	border-top: 1px solid var(--el-border-color-light);
+}
+
+.user-select__toicon {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	margin: 0 10px;
+}
+.user-select__toicon i {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	background: #ccc;
+	width: 20px;
+	height: 20px;
+	text-align: center;
+	line-height: 20px;
+	border-radius: 50%;
+	color: #fff;
+}
+
+.user-select__selected {
+	height: 345px;
+	width: 200px;
+	border: 1px solid var(--el-border-color-light);
+	background: var(--el-color-white);
+}
+.user-select__selected header {
+	height: 43px;
+	line-height: 43px;
+	border-bottom: 1px solid var(--el-border-color-light);
+	padding: 0 15px;
+	font-size: 16px;
+}
+.user-select__selected ul {
+	height: 300px;
+	overflow: auto;
+}
+.user-select__selected li {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	padding: 5px 5px 5px 15px;
+	height: 38px;
+}
+.user-select__selected li .name {
+	display: flex;
+	align-items: center;
+}
+.user-select__selected li .name .el-avatar {
+	margin-right: 10px;
+}
+.user-select__selected li .delete {
+	display: none;
+}
+.user-select__selected li:hover {
+	background: var(--el-color-primary-light-9);
+}
+.user-select__selected li:hover .delete {
+	display: inline-block;
+}
+.user-select-role .user-select__left {
+	width: 200px;
+}
+.user-select-role .user-select__tree {
+	border: none;
+	height: 343px;
+}
+</style>

+ 121 - 0
src/components/userSelectNew/index.vue

@@ -0,0 +1,121 @@
+<template>
+	<template v-if="printRead">
+		<label>{{ name }}</label>
+	</template>
+	<template v-else>
+		<el-input
+			placeholder="请选择"
+			readonly
+			:clearable="clearable"
+			:disabled="disabled"
+			style="line-hight: 40px"
+			v-model="name"
+		>
+			<template #append>
+				<el-button
+					:disabled="disabled"
+					:readonly="readonly"
+					@click="showUserSelect"
+					icon="search"
+				></el-button>
+			</template>
+		</el-input>
+		<user-select
+			ref="userSelect"
+			@doSubmit="selectUsersToInput"
+			:tenantId="tenantId"
+			:limit="limit"
+		></user-select>
+	</template>
+</template>
+<script>
+	import userSelect from "./UserSelectDialog";
+	import userService from "@/api/sys/userService";
+	export default {
+		data() {
+			return {
+				name: "",
+				selectData: [],
+			};
+		},
+		props: {
+			limit: Number,
+			modelValue: { type: String, default: "" },
+			tenantId: { type: String, default: null },
+			printRead: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			clearable: {
+				type: Boolean,
+				default: () => {
+					return true;
+				},
+			},
+			readonly: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+			disabled: {
+				type: Boolean,
+				default: () => {
+					return false;
+				},
+			},
+		},
+		components: {
+			userSelect,
+		},
+		watch: {
+			modelValue: {
+				handler(newVal) {
+					this.selectData = [];
+					if (newVal) {
+						newVal.split(",").forEach((id) => {
+							userService.queryById(id).then((data) => {
+								if (data && data.id !== "") {
+									this.selectData.push(data);
+									this.name = this.selectData
+										.map((user) => {
+											return user.name;
+										})
+										.join(",");
+								}
+							});
+						});
+					} else {
+						this.name = "";
+					}
+				},
+				immediate: true,
+				deep: false,
+			},
+		},
+		methods: {
+			selectUsersToInput(users) {
+				let selectIds = users
+					.map((user) => {
+						return user.id;
+					})
+					.join(",");
+				this.$emit("update:modelValue", selectIds);
+			},
+			showUserSelect() {
+				this.$refs.userSelect.open(this.selectData);
+			},
+		},
+	};
+</script>
+<style>
+	.el-form-item__content .el-input-group {
+		vertical-align: middle;
+	}
+	.el-tag + .el-tag {
+		margin-left: 5px;
+		margin-bottom: 5px;
+	}
+</style>

+ 25 - 7
src/views/cw/projectRecords/ProjectRecordsAddForm.vue

@@ -134,6 +134,16 @@
                     </el-select>
                   </el-form-item>
                 </el-col>
+				  <el-col :span="12">
+					  <el-form-item label="项目等级" prop="projectLevel"
+									:rules="[
+                  {required: true, message:'请选择项目等级(500万及500万以上为A级,500万以下为B级)', trigger:'blur'}
+               ]">
+						  <el-radio-group v-model="inputForm.projectLevel">
+							  <el-radio v-for="item in $dictUtils.getDictList('cw_project_level')" :label="item.value" >{{item.label}}</el-radio>
+						  </el-radio-group>
+					  </el-form-item>
+				  </el-col>
                 <el-col :span="12">
                   <el-form-item label="项目规模(元)" prop="projectMoney"
                                 :rules="[{required: true, message:'项目规模不能为空', trigger:'blur'}
@@ -206,16 +216,16 @@
                   <el-form-item label="现场负责人" prop="projectLeaderId"
                                 :rules="[
                    ]">
-                    <UserSelect :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :modelValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
+                    <UserSelectSignatory :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :modelValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelectSignatory>
                   </el-form-item>
                 </el-col>
 				  <el-col :span="12">
 					  <el-form-item label="项目经理1" prop="projectMasterId"
 									:rules="[
                    ]">
-                    <UserSelectSignatory style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'"
+                    <UserSelectForQualification style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'"
 										 :readonly="true" :limit='1' :modelValue="inputForm.projectMasterId"
-										 @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelectSignatory>
+										 @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelectForQualification>
 
 					  </el-form-item>
 				  </el-col>
@@ -223,9 +233,9 @@
                   <el-form-item label="项目经理2" prop="realHeader"
                                 :rules="[
                    ]">
-                    <UserSelectSignatory style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'"
+                    <UserSelectForQualification style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'"
 										 :readonly="true" :limit='1' :modelValue="inputForm.realHeader"
-										 @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelectSignatory>
+										 @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelectForQualification>
                   </el-form-item>
                 </el-col>
 
@@ -404,7 +414,6 @@
   import CwClientPageForm from './CwClientPageForm'
   import UpLoadComponent from '@/views/common/UpLoadComponent'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
-  import UserSelect from '@/components/userSelect'
   import projectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
   import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
   import WorkContractChooseCom from './WorkContractChooseCom'
@@ -413,6 +422,7 @@
   import workClientService from '@/api/cw/workClientInfo/WorkClientService'
   import contractInfoService from '@/api/cw/workContract/ContractInfoService'
   import UserSelectSignatory from '@/components/userSelect'
+  import UserSelectForQualification from '@/components/userSelectForQualification'
   import CwProjectBusinessTypeService from '@/api/cw/projectBusinessType/CwProjectBusinessTypeService'
   export default {
     props: {
@@ -437,6 +447,7 @@
         method: '',
         loading: false,
         inputForm: {
+			projectType: '',
           id: '',
           createDate: '',
           createBy: {
@@ -466,6 +477,7 @@
           contractId: '',
           businessType: '',
           riskLevel: '',
+			projectLevel: '',
           businessTypeName: '',
           planDate: [],
           realHeader: '',
@@ -541,12 +553,12 @@
       CwClientPageForm,
       UpLoadComponent,
       SelectTree,
-      UserSelect,
       WorkClientChooseForm,
       WorkContractChooseCom,
       CwProjectBusinessTypeListForm,
       ContractNameForm,
       UserSelectSignatory,
+		UserSelectForQualification,
 	  CwProjectBusinessTypeService
     },
     methods: {
@@ -566,6 +578,7 @@
         this.activeName = 'client'
         this.method = method
         this.inputForm = {
+			projectType: '',
           id: '',
           createDate: '',
           createBy: {
@@ -595,6 +608,7 @@
           contractId: '',
           businessType: '',
           riskLevel: '',
+			projectLevel: '',
           businessTypeName: '',
           planDate: [],
           realHeader: '',
@@ -671,6 +685,8 @@
             if (this.commonJS.isEmpty(this.inputForm.createDate)) {
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
             }
+			  //造价审核
+			  this.inputForm.projectType = '1'
             projectRecordsService.saveForm(this.inputForm).then((data) => {
               this.$emit('refreshList')
               this.loading = false
@@ -683,6 +699,7 @@
       },
       close () {
         this.inputForm = {
+			projectType: '',
           id: '',
           createDate: '',
           createBy: {
@@ -712,6 +729,7 @@
           contractId: '',
           businessType: '',
           riskLevel: '',
+			projectLevel: '',
           businessTypeName: '',
           planDate: [],
           realHeader: '',

File diff suppressed because it is too large
+ 1075 - 0
src/views/cw/projectRecords/ProjectRecordsAddForm2.vue


+ 17 - 2
src/views/cw/projectRecords/ProjectRecordsForm.vue

@@ -136,6 +136,16 @@
                     </el-select>
                   </el-form-item>
                 </el-col>
+				  <el-col :span="12">
+					  <el-form-item label="项目等级" prop="projectLevel"
+									:rules="[
+                  {required: true, message:'请选择项目等级(500万及500万以上为A级,500万以下为B级)', trigger:'blur'}
+               ]">
+						  <el-radio-group v-model="inputForm.projectLevel">
+							  <el-radio v-for="item in $dictUtils.getDictList('cw_project_level')" :label="item.value" >{{item.label}}</el-radio>
+						  </el-radio-group>
+					  </el-form-item>
+				  </el-col>
                 <el-col :span="12">
                   <el-form-item label="项目规模(元)" prop="projectMoney"
                                 :rules="[
@@ -218,14 +228,14 @@
                                 {required: true, message:'项目经理1不能为空', trigger:'blur'}
                    ]">
                     <!--                    <el-input v-model="inputForm.projectMasterId" placeholder="请填写项目经理" clearable></el-input>-->
-                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :modelValue="inputForm.projectMasterId" @update:modelValue='(value) => {inputForm.projectMasterId = value}'></UserSelect>
+                    <UserSelectForQualification :readonly="true" :disabled="method === 'view'" :limit='1' :modelValue="inputForm.projectMasterId" @update:modelValue='(value) => {inputForm.projectMasterId = value}'></UserSelectForQualification>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
                   <el-form-item label="项目经理2" prop="realHeader"
                                 :rules="[
                    ]">
-                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :modelValue="inputForm.realHeader" @update:modelValue='(value) => {inputForm.realHeader = value}'></UserSelect>
+                    <UserSelectForQualification :readonly="true" :disabled="method === 'view'" :limit='1' :modelValue="inputForm.realHeader" @update:modelValue='(value) => {inputForm.realHeader = value}'></UserSelectForQualification>
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
@@ -523,6 +533,7 @@
   import UpLoadComponent from '@/views/common/UpLoadComponent'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import UserSelect from '@/components/userSelect'
+  import UserSelectForQualification from '@/components/userSelectForQualification'
   import projectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
   import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
   import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
@@ -584,6 +595,7 @@
           contractId: '',
           businessType: '',
           riskLevel: '',
+			projectLevel: '',
           businessTypeName: '',
           planDate: [],
           realHeader: '',
@@ -659,6 +671,7 @@
       UpLoadComponent,
       SelectTree,
       UserSelect,
+		UserSelectForQualification,
       WorkClientChooseForm,
       WorkContractChooseCom,
       CwProjectBusinessTypeListForm,
@@ -714,6 +727,7 @@
           contractId: '',
           businessType: '',
           riskLevel: '',
+			projectLevel: '',
           businessTypeName: '',
           planDate: [],
           realHeader: '',
@@ -950,6 +964,7 @@
           contractId: '',
           businessType: '',
           riskLevel: '',
+			projectLevel: '',
           businessTypeName: '',
           planDate: [],
           realHeader: '',

File diff suppressed because it is too large
+ 1255 - 0
src/views/cw/projectRecords/ProjectRecordsForm2.vue


+ 20 - 1
src/views/cw/projectRecords/ProjectRecordsList.vue

@@ -129,13 +129,14 @@
           <vxe-column min-width="100" align="center" title="项目经理2" field="realHeaderName"></vxe-column>
 			<vxe-column min-width="200" align="center" title="客户名称" field="clientContactsName"></vxe-column>
           <vxe-column min-width="120" align="center" title="创建时间" field="createTime"></vxe-column>
-          <vxe-column title="操作" width="150px" fixed="right" align="center">
+          <vxe-column title="操作" width="200px" fixed="right" align="center">
             <template  #default="scope">
               <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.reportReview !== '1' || isAdmin)&&(scope.row.createBy.id === $store.state.user.id || isAdmin || haveProjectIds.includes(scope.row.id))" text type="primary"  size="small" @click="edit(scope.row.id)">修改</el-button>
 <!--              <el-button v-else-if="hasPermission('cwProjectRecords:edit')&&isAdmin" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>-->
 <!--              <el-button v-if="hasPermission('cwProjectRecords:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>-->
               <el-button v-if="hasPermission('cwProjectRecords:del')&&(scope.row.reportReview !== '1' || isAdmin)&&(scope.row.createBy.id === $store.state.user.id || isAdmin || haveProjectIds.includes(scope.row.id))" text type="primary"   size="small" @click="del(scope.row.id)">删除</el-button>
 <!--              <el-button v-else-if="hasPermission('cwProjectRecords:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3' ||scope.row.status==='5')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>-->
+				<el-button v-if="hasPermission('cwProjectRecords:add:reportNum')&&(scope.row.reportNo === '' || scope.row.reportNo === undefined)&&(scope.row.reportReview !== '1' )&&(scope.row.createBy.id === $store.state.user.id || haveProjectIds.includes(scope.row.id))" text type="primary"   size="small" @click="addReportNum(scope.row.id,scope.row.projectNumber)">生成报告号</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -159,6 +160,7 @@
 </template>
 
 <script>
+	import ReportReviewService from '@/api/cw/reportManagement/ReportReviewService'
 	import UserSelect2 from '@/components/userSelect'
   import projectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
   import taskService from '@/api/flowable/TaskService'
@@ -205,7 +207,9 @@
         haveProjectIds: ''
       }
     },
+		ReportReviewService: null,
     created () {
+		this.reportReviewService = new ReportReviewService()
     },
     components: {
       ProjectRecordsForm,
@@ -276,6 +280,7 @@
       // 获取数据列表
       refreshList () {
         this.loading = true
+		  this.searchForm.projectType = '1'
         projectRecordsService.list({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,
@@ -340,6 +345,20 @@
           })
         })
       },
+		//生成报告号
+		addReportNum (id,projectNumber) {
+      		//根据项目id创建一条报告信息,同时生成报告号  默认是咨字报告号
+			let param = {
+				'projectId' : id,
+				'projectNumber' : projectNumber,
+			}
+			this.reportReviewService.saveNew(param).then((data) => {
+				this.refreshList()
+			}).catch(() => {
+
+			})
+
+		},
       resetSearch () {
         this.$refs.searchForm.resetFields()
         this.refreshList()

+ 495 - 0
src/views/cw/projectRecords/ProjectRecordsList2.vue

@@ -0,0 +1,495 @@
+<template>
+  <div class="page">
+    <el-form :inline="true" v-if="searchVisible" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="项目名称" prop="projectName">
+        <el-input v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="项目编号" prop="projectNumber">
+        <el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+      </el-form-item>
+      <el-form-item v-if="showHideItem" label="项目经理1" prop="projectMasterName">
+<!--        <el-input v-model="searchForm.projectMasterName" placeholder="请输入项目经理" clearable></el-input>-->
+        <UserSelect2 :limit='1' :modelValue="searchForm.projectMasterName" @update:modelValue='(value, label) => {searchForm.projectMasterName = value}'></UserSelect2>
+      </el-form-item>
+      <el-form-item v-if="showHideItem" label="项目经理2" prop="realHeaderName">
+        <!--        <el-input v-model="searchForm.projectMasterName" placeholder="请输入项目经理" clearable></el-input>-->
+        <UserSelect2 :limit='1' :modelValue="searchForm.realHeaderName" @update:modelValue='(value, label) => {searchForm.realHeaderName = value}'></UserSelect2>
+      </el-form-item>
+		<el-form-item v-if="showHideItem" label="创建人" prop="createBy.name">
+			<!--        <el-input  v-model="searchForm.createBy.name" placeholder="请输入创建人" clearable></el-input>-->
+			<UserSelect2 :limit='1' :modelValue="searchForm.createBy.name" @update:modelValue='(value, label) => {searchForm.createBy.name = value}'></UserSelect2>
+		</el-form-item>
+      <el-form-item v-if="showHideItem" 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 v-if="showHideItem" label="业务类型" prop="businessType">
+			<SelectTree
+				ref="typeTree"
+				:props="{
+                    value: 'id',             // ID字段名
+                    label: 'name',         // 显示名称
+                    children: 'children'    // 子级字段名
+                  }"
+				:url="'/finance-server/projectRecords/cw_project_business_type/list'"
+				:value="searchForm.businessType"
+				:clearable="true"
+				:accordion="true"
+				size="default"
+				@getValue="(value) => {searchForm.businessType=value}"/>
+		</el-form-item>-->
+		<el-form-item v-if="showHideItem" label="报备类型" prop="filingType">
+			<el-select v-model="searchForm.reportType" placeholder="请选择" style="width:100%;">
+				<el-option
+					v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+					:key="item.value"
+					:label="item.label"
+					:value="item.value">
+				</el-option>
+			</el-select>
+		</el-form-item>
+      <el-form-item>
+        <el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="jp-table top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('cwProjectRecords:add')" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
+          <!--          <el-button v-if="hasPermission('klg:question:del')" type="danger" icon="el-icon-delete" @click="del()" :disabled="$refs.questionsTable && $refs.questionsTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+        </template>
+		  <template #tools>
+			  <vxe-button
+				  text
+				  type="primary"
+				  :title="searchVisible ? '收起检索' : '展开检索'"
+				  icon="vxe-icon-search"
+				  class="tool-btn"
+				  @click="searchVisible = !searchVisible"
+			  ></vxe-button>
+		  </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          :key="tableKey"
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="projectTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :export-config="{
+                    remote: true,
+                    filename: `项目数据${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: `项目数据${moment(new Date()).format('YYYY-MM-DD')}`,
+                    exportMethod: exportMethod,
+                    types: ['xls'],
+                    modes: ['current', 'selected', 'all']
+                  }"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <!--<vxe-column type="checkbox" width="40" ></vxe-column>-->
+          <vxe-column min-width="230" align="center" title="项目名称" field="projectName">
+            <template #default="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectRecords:view')" @click="view(scope.row.id)">{{scope.row.projectName}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('cwProjectRecords:view')"  @click="view(scope.row.id,)">{{scope.row.projectName}}</el-link>
+              <span v-else>{{scope.row.projectName}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="140" align="center" title="项目编号" field="projectNumber"></vxe-column>
+			<vxe-column min-width="110" align="center" title="项目规模(元)" field="projectMoney"></vxe-column>
+			<!--<vxe-column min-width="160" align="center" title="业务类型" field="businessTypeName"></vxe-column>-->
+          <vxe-column min-width="230" align="center" title="合同名称" field="contractName">
+            <template #default="scope">
+              <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="80" align="center" title="创建人" field="createBy.name"></vxe-column>
+          <vxe-column min-width="100" align="center" title="项目经理1" field="projectMasterName"></vxe-column>
+          <vxe-column min-width="100" align="center" title="项目经理2" field="realHeaderName"></vxe-column>
+			<vxe-column min-width="200" align="center" title="客户名称" field="clientContactsName"></vxe-column>
+          <vxe-column min-width="120" align="center" title="创建时间" field="createTime"></vxe-column>
+          <vxe-column title="操作" width="200px" fixed="right" align="center">
+            <template  #default="scope">
+              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.reportReview !== '1' || isAdmin)&&(scope.row.createBy.id === $store.state.user.id || isAdmin || haveProjectIds.includes(scope.row.id))" text type="primary"  size="small" @click="edit(scope.row.id)">修改</el-button>
+<!--              <el-button v-else-if="hasPermission('cwProjectRecords:edit')&&isAdmin" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>-->
+<!--              <el-button v-if="hasPermission('cwProjectRecords:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>-->
+              <el-button v-if="hasPermission('cwProjectRecords:del')&&(scope.row.reportReview !== '1' || isAdmin)&&(scope.row.createBy.id === $store.state.user.id || isAdmin || haveProjectIds.includes(scope.row.id))" text type="primary"   size="small" @click="del(scope.row.id)">删除</el-button>
+<!--              <el-button v-else-if="hasPermission('cwProjectRecords:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3' ||scope.row.status==='5')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>-->
+				<el-button v-if="hasPermission('cwProjectRecords:add:reportNum')&&(scope.row.reportNo === '' || scope.row.reportNo === undefined)&&(scope.row.reportReview !== '1' || isAdmin)&&(scope.row.createBy.id === $store.state.user.id || isAdmin || haveProjectIds.includes(scope.row.id))" text type="primary"   size="small" @click="addReportNum(scope.row.id,scope.row.projectNumber)">生成报告号</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :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>
+    <ProjectRecordsForm2 ref="projectRecordsForm2" @refreshList="refreshList"></ProjectRecordsForm2>
+    <ContractNameForm ref="contractNameForm"></ContractNameForm>
+    <ProjectRecordsAddForm2 ref="projectRecordsAddForm2" @refreshList="refreshList"></ProjectRecordsAddForm2>
+	  <CwProjectBusinessTypeListForm ref="cwProjectBusinessTypeListForm"></CwProjectBusinessTypeListForm>
+  </div>
+</template>
+
+<script>
+	import ReportReviewService from '@/api/cw/reportManagement/ReportReviewService'
+	import UserSelect2 from '@/components/userSelect'
+  import projectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  import taskService from '@/api/flowable/TaskService'
+  import processService from '@/api/flowable/ProcessService'
+  import ProjectRecordsForm2 from './ProjectRecordsForm2'
+  import pick from 'lodash.pick'
+  import userService from '@/api/sys/UserService'
+  import UserSelect from '@/views/cw/workClientInfo/clientUserSelect'
+  import ContractNameForm from '../workContract/ContractNameForm'
+  import ProjectRecordsAddForm2 from './ProjectRecordsAddForm2'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+
+	export default {
+    data () {
+      return {
+		searchVisible: true,
+        showHideItem: false,
+        showHideIcon: 'el-icon-arrow-down',
+        showHideName: '展示',
+        searchForm: {
+          projectMasterName: '',
+          projectNumber: '',
+		  businessType:'',
+          projectName: '',
+          createDates: [],
+          status: '',
+          realHeaderName: '',
+			createBy: {
+				name: ''
+			}
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        haveProjectIds: ''
+      }
+    },
+		ReportReviewService: null,
+    created () {
+		this.reportReviewService = new ReportReviewService()
+    },
+    components: {
+      ProjectRecordsForm2,
+      UserSelect,
+      ContractNameForm,
+      ProjectRecordsAddForm2,
+	  UserSelect2,
+	  SelectTree
+    },
+    computed: {
+      userName () {
+        return this.$store.state.user.name
+      },
+      user () {
+        this.createName = this.$store.state.user.name
+        return this.$store.state.user
+      }
+    },
+    mounted () {
+		this.$nextTick(() => {
+			//将表格和工具栏进行关联
+			const $table = this.$refs.projectTable;
+			const $toolbar = this.$refs.toolbarRef;
+			$table.connect($toolbar);
+		})
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      showHide () {
+        if (this.showHideItem === false) {
+          this.showHideItem = true
+          this.showHideIcon = 'el-icon-arrow-up'
+          this.showHideName = '隐藏'
+        } else {
+          this.showHideItem = false
+          this.showHideIcon = 'el-icon-arrow-down'
+          this.showHideName = '展示'
+        }
+      },
+      // 新增
+      add () {
+        this.$refs.projectRecordsAddForm2.init('add', 'false')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.projectTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.projectRecordsAddForm2.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.projectRecordsForm2.init('view', id)
+      },
+      viewContract (id) {
+        this.$refs.contractNameForm.init('view', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        userService.is().then((data) => {
+        	console.log(data)
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+		  this.searchForm.projectType = '2'
+        projectRecordsService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          projectRecordsService.getHaveProjectIds().then((data) => {
+            if (this.commonJS.isNotEmpty(data)) {
+              this.haveProjectIds = data.map(i => {
+                if (this.commonJS.isNotEmpty(i)) {
+                  return i
+                }
+              }).join(',')
+            }
+          })
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          // this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.checkIsAdmin()
+        processService.getByName('财务-项目登记').then((data) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.projectTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          projectRecordsService.delete(ids).then((data) => {
+            if (data === '删除成功') {
+              this.$message.success(data)
+            } else {
+              this.$message.error(data)
+            }
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+		//生成报告号
+		addReportNum (id,projectNumber) {
+      		//根据项目id创建一条报告信息,同时生成报告号  默认是咨字报告号
+			let param = {
+				'projectId' : id,
+				'projectNumber' : projectNumber,
+			}
+			this.reportReviewService.saveNew(param).then((data) => {
+				this.refreshList()
+			}).catch(() => {
+
+			})
+
+		},
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      start () {
+        // 读取流程表单
+        let tabTitle = `发起流程【项目登记】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [项目登记]`
+        taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          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.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                status: 'startAndHold',
+                title: tabTitle,
+                formType: data.formType,
+                formUrl: data.formUrl,
+                formTitle: processTitle,
+                businessId: 'false',
+                isShow: false,
+                routePath: '/cw/projectRecords/ProjectRecordsList'
+              }
+            })
+          })
+      },
+      // 发起项目登记
+      push (row) {
+        // 读取流程表单
+        let title = `发起流程【项目登记】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目登记]`
+        let status = 'startAndHold'
+        if (row.status === '3') {
+          status = 'startAndClose'
+        } else if (row.status === '4') {
+          status = 'reapplyFlag'
+        }
+        taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          businessId: row.id,
+          businessTable: 'cw_project_records'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                title: title,
+                formType: data.formType,
+                formUrl: data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'cw_project_records',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/cw/projectRecords/ProjectRecordsList'
+              }
+            })
+          })
+      },
+      // 查看项目登记流程结果
+      detail (row) {
+        if (row.status !== '0' && row.status !== '1') {
+          // eslint-disable-next-line eqeqeq
+          taskService.getTaskDef({
+            procInsId: row.procInsId,
+            procDefId: this.processDefinitionAuditId
+          }).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                isShow: 'false',
+                readOnly: true,
+                title: '项目登记' + '流程详情',
+                formTitle: '项目登记' + '流程详情',
+                businessId: row.id,
+                status: 'reback'
+              }
+            })
+          })
+        }
+      },
+      // 撤回项目登记
+      reback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await projectRecordsService.queryById(row.id).then((data) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              processService.revokeProcIns(row.procInsId).then((data) => {
+                let form = {status: '3', id: row.id}
+                projectRecordsService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+        })
+      },
+      // 自定义服务端导出
+      exportMethod ({ options }) {
+        // 传给服务端的参数
+        const params = {
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm,
+          filename: options.filename,
+          sheetName: options.sheetName,
+          isHeader: options.isHeader,
+          original: options.original,
+          mode: options.mode,
+          selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
+          exportFields: options.columns.map(column => column.property)
+        }
+        return projectRecordsService.exportFile(params).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res, options.filename + '.xls')
+        }).catch(function (err) {
+          if (err.response) {
+            console.log(err.response)
+          }
+        })
+      },
+    }
+  }
+</script>

File diff suppressed because it is too large
+ 577 - 1112
src/views/cw/reportManagement/ReportManagementAddForm.vue


+ 35 - 35
src/views/cw/reportManagement/ReportManagementForm.vue

@@ -401,7 +401,7 @@
 <!--              </el-col>-->
 
             </el-row>
-            <el-divider content-position="left"><i class="el-icon-document"></i> 其他信息</el-divider>
+            <!--<el-divider content-position="left"><i class="el-icon-document"></i> 其他信息</el-divider>
             <el-row  :gutter="0">
               <el-col :span="12">
                 <el-form-item label="公司注册地址" prop="registerAddress"
@@ -431,45 +431,45 @@
                       :value="item.value">
                     </el-option>
                   </el-select>
-<!--                  <el-input v-model="inputForm.securityBusiness" placeholder="请填写是否数据证券业务" clearable>-->
-<!--                  </el-input>-->
+&lt;!&ndash;                  <el-input v-model="inputForm.securityBusiness" placeholder="请填写是否数据证券业务" clearable>&ndash;&gt;
+&lt;!&ndash;                  </el-input>&ndash;&gt;
                 </el-form-item>
               </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="reportTitleType"-->
-<!--                              :rules="[-->
-<!--                   ]">-->
-<!--                  <el-select v-model="inputForm.reportTitleType" placeholder="请选择报告类别" style="width:100%;">-->
-<!--                    <el-option-->
-<!--                      v-for="item in $dictUtils.getDictList('cw_report_title_type')"-->
-<!--                      :key="item.value"-->
-<!--                      :label="item.label"-->
-<!--                      :value="item.value">-->
-<!--                    </el-option>-->
-<!--                  </el-select>-->
-<!--                  &lt;!&ndash;                <el-input v-model="inputForm.reportTitleType" placeholder="请填写报告类型及标题"></el-input>&ndash;&gt;-->
-<!--                </el-form-item>-->
-<!--              </el-col>-->
-<!--              <el-col :span="12">-->
-<!--                <el-form-item label="报告编号" prop="reportReviewNo"-->
-<!--                              :rules="[-->
-<!--                   ]">-->
-<!--                  <el-input :disabled="true" v-model="inputForm.reportReviewNo" placeholder="自动生成">-->
-<!--                    &lt;!&ndash;                  <el-button slot="append" icon="el-icon-search" @click="openContractForm()"></el-button>&ndash;&gt;-->
-<!--                  </el-input>-->
-<!--                </el-form-item>-->
-<!--              </el-col>-->
+&lt;!&ndash;              <el-col :span="12">&ndash;&gt;
+&lt;!&ndash;                <el-form-item label="报告类别" prop="reportTitleType"&ndash;&gt;
+&lt;!&ndash;                              :rules="[&ndash;&gt;
+&lt;!&ndash;                   ]">&ndash;&gt;
+&lt;!&ndash;                  <el-select v-model="inputForm.reportTitleType" placeholder="请选择报告类别" style="width:100%;">&ndash;&gt;
+&lt;!&ndash;                    <el-option&ndash;&gt;
+&lt;!&ndash;                      v-for="item in $dictUtils.getDictList('cw_report_title_type')"&ndash;&gt;
+&lt;!&ndash;                      :key="item.value"&ndash;&gt;
+&lt;!&ndash;                      :label="item.label"&ndash;&gt;
+&lt;!&ndash;                      :value="item.value">&ndash;&gt;
+&lt;!&ndash;                    </el-option>&ndash;&gt;
+&lt;!&ndash;                  </el-select>&ndash;&gt;
+&lt;!&ndash;                  &lt;!&ndash;                <el-input v-model="inputForm.reportTitleType" placeholder="请填写报告类型及标题"></el-input>&ndash;&gt;&ndash;&gt;
+&lt;!&ndash;                </el-form-item>&ndash;&gt;
+&lt;!&ndash;              </el-col>&ndash;&gt;
+&lt;!&ndash;              <el-col :span="12">&ndash;&gt;
+&lt;!&ndash;                <el-form-item label="报告编号" prop="reportReviewNo"&ndash;&gt;
+&lt;!&ndash;                              :rules="[&ndash;&gt;
+&lt;!&ndash;                   ]">&ndash;&gt;
+&lt;!&ndash;                  <el-input :disabled="true" v-model="inputForm.reportReviewNo" placeholder="自动生成">&ndash;&gt;
+&lt;!&ndash;                    &lt;!&ndash;                  <el-button slot="append" icon="el-icon-search" @click="openContractForm()"></el-button>&ndash;&gt;&ndash;&gt;
+&lt;!&ndash;                  </el-input>&ndash;&gt;
+&lt;!&ndash;                </el-form-item>&ndash;&gt;
+&lt;!&ndash;              </el-col>&ndash;&gt;
 
-<!--              <el-col :span="12">-->
-<!--                <el-form-item label="创建人" prop="userName"-->
-<!--                              :rules="[-->
-<!--                   ]">-->
-<!--                  <el-input :disabled="true" v-model="inputForm.userName" placeholder="请填写创建人" clearable></el-input>-->
-<!--                </el-form-item>-->
-<!--              </el-col>-->
+&lt;!&ndash;              <el-col :span="12">&ndash;&gt;
+&lt;!&ndash;                <el-form-item label="创建人" prop="userName"&ndash;&gt;
+&lt;!&ndash;                              :rules="[&ndash;&gt;
+&lt;!&ndash;                   ]">&ndash;&gt;
+&lt;!&ndash;                  <el-input :disabled="true" v-model="inputForm.userName" placeholder="请填写创建人" clearable></el-input>&ndash;&gt;
+&lt;!&ndash;                </el-form-item>&ndash;&gt;
+&lt;!&ndash;              </el-col>&ndash;&gt;
               <el-col :span="12">
                 <el-form-item label="下一节点审核人" prop="reviewBy"
                               :rules="[
@@ -532,7 +532,7 @@
                   </el-input>
                 </el-form-item>
               </el-col>
-            </el-row>
+            </el-row>-->
             <div v-if="method !== 'edit'">
               <el-divider content-position="left"><i class="el-icon-document"></i>一级复核</el-divider>
               <el-row :gutter="15" >

+ 909 - 0
src/views/cw/reportManagement/ReportManagementFormNew.vue

@@ -0,0 +1,909 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1400px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <el-row>
+        <el-row>
+			<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+					 label-width="135px" @submit.native.prevent>
+
+				<el-divider content-position="left"><i class="el-icon-document"></i> 项目信息</el-divider>
+				<el-row  :gutter="0">
+					<el-col :span="12">
+						<el-form-item label="项目名称" prop="projectName"
+									  :rules="[
+                   ]">
+							<el-input :disabled="true" v-model="inputForm.projectName" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="项目编号" prop="projectNumber"
+									  :rules="[
+                   ]">
+							<el-input :disabled="true" v-model="inputForm.projectNumber" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="项目负责人" prop="projectManager"
+									  :rules="[
+                   ]">
+							<el-input :disabled="true" v-model="inputForm.projectManager" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="创建人" prop="projectCreateByName"
+									  :rules="[
+                   ]">
+							<el-input :disabled="true" v-model="inputForm.projectCreateByName" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="创建时间" prop="projectCreateTime"
+									  :rules="[
+                   ]">
+							<el-input :disabled="true" v-model="inputForm.projectCreateTime" clearable></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+				<el-divider content-position="left"><i class="el-icon-document"></i> 质量复核信息</el-divider>
+				<el-row  :gutter="0">
+					<el-col :span="12">
+						<el-form-item label="送审价(元)" prop="reviewFee"
+									  :rules="[
+
+                   ]">
+							<!--						  <el-input v-model="inputForm.reviewFee" placeholder="请输入送审价" @change="getFee" clearable></el-input>-->
+							<el-input
+								@change="getFee"
+								v-on:input="inputForm.reviewFee=inputForm.reviewFee.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+								v-model="inputForm.reviewFee"
+								controls-position="right"
+								:controls="false"
+								style="width:100%;"
+								placeholder="请输入送审价(元)"
+								clearable />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="审定价(元)" prop="approvalFee"
+									  :rules="[
+
+			   ]">
+							<!--						  <el-input v-model="inputForm.approvalFee" placeholder="请输入审定价" clearable></el-input>-->
+							<el-input
+								@change="getApprovalFee"
+								v-on:input="inputForm.approvalFee=inputForm.approvalFee.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+								v-model="inputForm.approvalFee"
+								controls-position="right"
+								:controls="false"
+								style="width:100%;"
+								placeholder="请输入审定价(元)"
+								clearable />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="合同类别" prop="contractCategory" :rules="[]">
+							<el-radio-group v-model="inputForm.contractCategory">
+								<el-radio v-for="item in $dictUtils.getDictList('contract_amount_type')" :key="item.value" :label="item.value">{{item.label}}</el-radio>
+							</el-radio-group>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12" v-if="inputForm.contractCategory === '1'">
+						<el-form-item label="合同价(元)" prop="contractFee"
+									  :rules="[
+
+			   ]">
+							<el-input v-model="inputForm.contractFee" placeholder="请输入合同价(元)" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12" v-if="inputForm.contractCategory === '2'">
+						<el-form-item label="费率(%)" prop="contractRate"
+									  :rules="[
+
+			   ]">
+							<el-input v-model="inputForm.contractRate" placeholder="请输入费率(%)" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="下一节点审核人" prop="reviewBy"
+									  :rules="[
+										{required: true, message:'下一节点审核人不能为空', trigger:'blur'}
+                   ]">
+							<UserSelectSignatory style="width: 100%" ref="userSelect1"
+												 :readonly="true" :limit='1' :modelValue="inputForm.reviewBy"
+												 @update:modelValue='(value) => {inputForm.reviewBy = value}'></UserSelectSignatory>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="核增核减额(元)" prop="verifyFee"
+									  :rules="[
+
+			   ]">
+							<el-input v-model="inputForm.verifyFee" :disabled="true" placeholder="请输入核增核减额(元)" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="核增核减率(%)" prop="verifyRate"
+									  :rules="[
+
+			   ]">
+							<el-input v-model="inputForm.verifyRate" :disabled="true" placeholder="请输入核增核减率(%)" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="咨询标的额(元)" prop="consultFee"
+									  :rules="[
+
+			   ]">
+							<el-input v-model="inputForm.consultFee" :disabled="true" placeholder="请输入咨询标的额(元)" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="土建造价(元)" prop="buildingFee"
+									  :rules="[
+
+			   ]">
+							<!--						  <el-input v-model="inputForm.buildingFee" placeholder="请输入土建造价(元)" clearable></el-input>-->
+							<el-input
+								@change="getBuildingFee"
+								v-on:input="inputForm.buildingFee=inputForm.buildingFee.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+								v-model="inputForm.buildingFee"
+								controls-position="right"
+								:controls="false"
+								style="width:100%;"
+								placeholder="土建造价(元)"
+								clearable />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="安装造价(元)" prop="installFee"
+									  :rules="[
+
+			   ]">
+							<!--						  <el-input v-model="inputForm.installFee" placeholder="请输入安装造价(元)" clearable></el-input>-->
+							<el-input
+								@change="getInstallFee"
+								v-on:input="inputForm.installFee=inputForm.installFee.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+								v-model="inputForm.installFee"
+								controls-position="right"
+								:controls="false"
+								style="width:100%;"
+								placeholder="安装造价(元)"
+								clearable />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="土建比例(%)" prop="buildingRate"
+									  :rules="[
+
+			   ]">
+							<el-input v-model="inputForm.buildingRate" :disabled="true" placeholder="请输入土建比例(%)" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="安装比例(%)" prop="installRate"
+									  :rules="[
+
+			   ]">
+							<el-input v-model="inputForm.installRate" :disabled="true" placeholder="请输入安装比例(%)" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="工作开始时间" prop="workStartDate" :rules="[
+					  	{required: true, message: '工作开始时间不能为空', trigger: 'blur'},
+					  	{ validator: validateDateRange, trigger: 'change' }
+               ]">
+							<el-date-picker
+								style="width: 100%"
+								v-model="inputForm.workStartDate"
+								value-format="YYYY-MM-DD"
+								placeholder="选择日期"
+							>
+							</el-date-picker>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="工作结束时间" prop="workEndDate" :rules="[
+					  	{required: true, message: '工作结束时间不能为空', trigger: 'blur'},
+					  	{ validator: validateDateRange, trigger: 'change' }
+               ]">
+							<el-date-picker
+								style="width: 100%"
+								v-model="inputForm.workEndDate"
+								value-format="YYYY-MM-DD"
+								placeholder="选择日期"
+							>
+							</el-date-picker>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="造价咨询营业收入(万元)" prop="ziXunShouRu"
+									  :rules="[
+
+			   ]">
+							<!--						  <el-input v-model="inputForm.ziXunShouRu" placeholder="请输入造价咨询营业收入" clearable></el-input>-->
+							<el-input
+								v-on:input="inputForm.ziXunShouRu=inputForm.ziXunShouRu.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+								v-model="inputForm.ziXunShouRu"
+								controls-position="right"
+								:controls="false"
+								style="width:100%;"
+								placeholder="请输入造价咨询营业收入(万元)"
+								clearable />
+						</el-form-item>
+					</el-col>
+				</el-row>
+				<div>
+					<el-divider content-position="left"><i class="el-icon-document"></i>
+						<span style="color:#f5222d;">*</span> 项目组成员(质量控制流程)
+						<el-button size="default" style="margin-left: 20px" type="primary" @click="insertEvent('detail')" plain>
+							新增
+						</el-button>
+					</el-divider>
+					<el-row  :gutter="15" >
+						<el-col :span="24">
+							<vxe-table
+								border
+								show-footer
+								show-overflow
+								ref="detailTable"
+								:key="detailKey"
+								class="vxe-table-element"
+								:data="inputForm.detailInfos"
+								style="margin-left: 5em"
+								highlight-current-row
+								:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+								:edit-rules="validRules"
+							>
+								<vxe-table-column field="memberName" title="成员名称" :edit-render="{}" show-overflow="title" :rules="[{required: true, message:'请选择用户', trigger:'blur'}]">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.memberName" :disabled="scope.$rowIndex == 0" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="userRole" title="角色" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.userRole" :readonly="true"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="enrollCertNo" title="注册/资格证号" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.enrollCertNo" :readonly="true"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="profession" title="专业" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.profession" :readonly="true"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="content" title="本人负责内容" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.content" ></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="opinion" title="审核意见" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.opinion" ></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column title="操作" width="100">
+									<template v-slot="scope">
+										<el-button size="default" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')"  v-if="scope.$rowIndex !== 0">删除</el-button>
+									</template>
+								</vxe-table-column>
+							</vxe-table>
+						</el-col>
+					</el-row>
+				</div>
+				<UserPullFormNew ref="userPullFormNew" @getProgramForUser="getProgramForUser"></UserPullFormNew>
+			</el-form >
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				<span>文件信息</span>
+			</el-divider>
+			<el-row  :gutter="0" >
+				<el-col :span="24" >
+					<vxe-table
+						border
+						show-overflow
+						ref="clientTable"
+						class="vxe-table-element"
+						style="margin-left: 5em;width: 100%"
+						:row-config="{keyField: 'id'}"
+						:column-config="{resizable: true}"
+						:tree-config="{transform: true, expandAll: true}"
+						:key="tableKey"
+						:data="tableData">
+						<vxe-column field="name" title="文件要求" width="240px" tree-node>
+							<template #default="scope">
+							<span style="font-weight: bold"
+								  v-if="scope.row.parentId === '0'"
+							>{{ scope.row.name }}
+							</span>
+								<span
+									v-if="scope.row.parentId !== '0' && scope.row.mustFlag === 1"
+								><span style="color: red;font-weight: bold">* </span>{{ scope.row.name }}
+							</span>
+								<span
+									v-if="scope.row.parentId !== '0' && scope.row.mustFlag === 0"
+								>{{ scope.row.name }}
+							</span>
+							</template>
+						</vxe-column>
+						<vxe-column field="attachmentName" title="文件描述/文件名称" show-overflow="false">
+							<template #default="scope">
+							<span
+								v-if="scope.row.levelFlag === 2"
+							>
+								<span style="font-weight: bold">文件格式及大小:{{ scope.row.size }}</span>
+								<br>
+								<span>{{ scope.row.type }}</span>
+							</span>
+								<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]"
+										:preview-teleported="true"
+									></el-image>
+								</div>
+								<div v-else>
+									<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+								</div>
+							</template>
+						</vxe-column>
+						<vxe-column field="workAttachmentType" width="100px" title="文件类型"></vxe-column>
+						<vxe-column field="createDate" title="上传时间" width="100px"></vxe-column>
+						<vxe-column field="fileSize" width="100px" title="文件大小(M)">
+							<template #default="scope">
+								{{getSize(scope.row.fileSize)}}
+							</template>
+						</vxe-column>
+
+						<vxe-column
+							title="操作"
+							width="100px"
+							fixed="right"
+							align="center"
+						>
+							<template #default="scope">
+								<el-button
+									v-if="scope.row.levelFlag === 2"
+									type="primary"
+									size="small"
+									:disabled="status === 'audit' ||status === 'taskFormDetail'|| method ==='view'"
+									@click="openFileForm(scope.row.id,this.inputForm.id)"
+								>编辑</el-button>
+								<el-button
+									v-if="scope.row.levelFlag === 3"
+									type="info"
+									size="small"
+									@click="toHref(scope.row)" >下载</el-button>
+
+							</template>
+						</vxe-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+        </el-row>
+      </el-row>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmit('save')">确定</el-button>
+			</span>
+		</template>
+		<FileForm ref="fileForm" @getFiles="getFiles"></FileForm>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import OSSSerivce, {
+		// 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 UserPullFormNew from '@/views/finance/invoice/UserPullFormNew'
+	import UserSelectSignatory from '@/components/userSelectNew'
+	import ReportCancellApplyService from '@/api/cw/reportCancellApply/ReportCancellApplyService'
+	import ReportReviewService from '@/api/cw/reportManagement/ReportReviewService'
+	import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
+	import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+  import FileForm from "./reportReview/FileForm";
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        loading: false,
+		  tableKey: '',
+		  tableData: [],
+		  validRules: {
+			  memberName: [
+				  {required: true, message: '成员名称不能为空'}
+			  ],
+			  enrollCertNo: [
+				  {required: true, message: '注册/资格证号不能为空'}
+			  ],
+			  profession: [
+				  {required: true, message: '专业不能为空'}
+			  ],
+			  content: [
+				  {required: true, message: '本人负责内容不能为空'}
+			  ],
+			  opinion: [
+				  {required: true, message: '审核意见不能为空'}
+			  ],
+		  },
+		  inputForm: {
+			  reviewNewId: '',
+			  projectLevel: '',
+			  memberName: '',
+			  enrollCertNo: '',
+			  profession: '',
+			  professionType: '',
+			  projectName: '',
+			  projectId: '',
+			  projectNumber: '',
+			  projectManager: '',
+			  projectManagerId: '',
+			  projectCreateByName: '',
+			  projectCreateTime: '',
+			  reviewFee: '',
+			  approvalFee: '',
+			  contractCategory: '',
+			  contractFee: '',
+			  contractRate: '',
+			  reviewBy: '',
+			  verifyFee: '',
+			  verifyRate: '',
+			  consultFee: '',
+			  buildingFee: '',
+			  installFee: '',
+			  buildingRate: '',
+			  installRate: '',
+			  workStartDate: '',
+			  workEndDate: '',
+			  ziXunShouRu: '',
+			  detailInfos: [],
+			  createBy: {
+				  id: '',
+				  name: this.$store.state.user.name
+			  },
+		  },
+        keyWatch: '',
+        visible: false,
+        tabName: ''
+      }
+    },
+	  ReportCancellApplyService: null,
+	  ReportReviewService: null,
+	  enterpriseSearchService: null,
+	  commonApi: null,
+    created () {
+		this.enterpriseSearchService = new EnterpriseSearchService()
+		this.reportCancellApplyService = new ReportCancellApplyService()
+		this.reportReviewService = new ReportReviewService()
+		this.commonApi = new CommonApi()
+    },
+    computed: {
+      bus: {
+        get () {
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    components: {
+		FileForm,
+		UserPullFormNew,
+		UserSelectSignatory,
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id, tabName) {
+        this.tabName = tabName
+        this.visible = true
+        if (method === 'edit') {
+          this.title = '报告信息修改'
+          this.method = method
+        } else {
+          this.title = '报告详情'
+          this.method = 'view'
+        }
+        this.reportReviewService = new ReportReviewService()
+        this.method = method
+		  this.inputForm = {
+			  reviewNewId: '',
+			  projectLevel: '',
+			  memberName: '',
+			  enrollCertNo: '',
+			  profession: '',
+			  professionType: '',
+			  projectName: '',
+			  projectId: '',
+			  projectNumber: '',
+			  projectManager: '',
+			  projectManagerId: '',
+			  projectCreateByName: '',
+			  projectCreateTime: '',
+			  reviewFee: '',
+			  approvalFee: '',
+			  contractCategory: '',
+			  contractFee: '',
+			  contractRate: '',
+			  reviewBy: '',
+			  verifyFee: '',
+			  verifyRate: '',
+			  consultFee: '',
+			  buildingFee: '',
+			  installFee: '',
+			  buildingRate: '',
+			  installRate: '',
+			  workStartDate: '',
+			  workEndDate: '',
+			  ziXunShouRu: '',
+			  detailInfos: [],
+			  createBy: {
+				  id: '',
+				  name: this.$store.state.user.name
+			  },
+		  }
+        this.inputForm.id = id
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+			projectReportService.queryByIdNew(this.inputForm.id).then((data) => {
+				this.inputForm = this.recover(this.inputForm, data)
+
+				if (this.commonJS.isEmpty(this.inputForm.contractCategory)) {
+					this.inputForm.contractCategory = '1'
+				}
+
+				// 根据证书类型  获取字典值
+				let professionList = this.getProfessionList(this.inputForm.professionType)
+				professionList.forEach(item => {
+					if (item.value == this.inputForm.profession) {
+						this.inputForm.profession = item.label
+					}
+				})
+
+
+				if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+					let d = {
+						memberName: this.inputForm.memberName,
+						userId: this.inputForm.projectManagerId,
+						userRole: '负责人',
+						enrollCertNo: this.inputForm.enrollCertNo,
+						profession: this.inputForm.profession,
+					}
+					this.inputForm.detailInfos = []
+					this.inputForm.detailInfos.push(d)
+					this.detailKey = Math.random()
+				}
+
+				projectReportService.getAttachmentList(data.projectId,this.inputForm.id).then((data) => {
+					this.tableData = data
+					this.tableKey = Math.random()
+				})
+
+				this.loading = false
+			})
+        })
+      },
+      // 表单提交
+      doSubmit (status) {
+		  if (status === 'save') {
+			  this.$refs['inputForm'].validate((valid) => {
+				  if (valid) {
+					  // 暂存
+					  this.loading = true
+					  this.reportReviewService.saveFormReviewNew(this.inputForm).then(() => {
+						  this.$emit('refreshList')
+						  this.close()
+						  this.loading = false
+					  }).catch(() => {
+						  this.loading = false
+					  })
+				  }
+			  })
+			  return
+		  }
+      },
+		close () {
+			this.inputForm = {
+				reviewNewId: '',
+				projectLevel: '',
+				memberName: '',
+				enrollCertNo: '',
+				profession: '',
+				professionType: '',
+				projectName: '',
+				projectId: '',
+				projectNumber: '',
+				projectManager: '',
+				projectManagerId: '',
+				projectCreateByName: '',
+				projectCreateTime: '',
+				reviewFee: '',
+				approvalFee: '',
+				contractCategory: '',
+				contractFee: '',
+				contractRate: '',
+				reviewBy: '',
+				verifyFee: '',
+				verifyRate: '',
+				consultFee: '',
+				buildingFee: '',
+				installFee: '',
+				buildingRate: '',
+				installRate: '',
+				workStartDate: '',
+				workEndDate: '',
+				ziXunShouRu: '',
+				detailInfos: [],
+				createBy: {
+					id: '',
+					name: this.$store.state.user.name
+				},
+			}
+			this.$refs.inputForm.resetFields()
+			this.visible = false
+		},
+		getProfessionList(type) {
+			switch (type) {
+				case '1':
+				case '2':
+					return this.$dictUtils.getDictList('sys_cert_profession_build');
+				case '3':
+				case '4':
+					return this.$dictUtils.getDictList('sys_cert_profession_cost');
+				case '5':
+					return this.$dictUtils.getDictList('sys_cert_profession_supervision');
+				case '6':
+					return this.$dictUtils.getDictList('sys_cert_profession_accounting');
+				default:
+					return [];
+			}
+		},
+		// 删除
+		removeEvent (row, rowIndex, type) {
+			if (type === 'detail') {
+				this.$refs.detailTable.remove(row)
+				this.inputForm.detailInfos.splice(rowIndex, 1)
+			}
+		},
+		getFee() {
+			//送审价
+			var rf = this.inputForm.reviewFee
+			//审定价
+			var af = this.inputForm.approvalFee
+			if (this.commonJS.isNotEmpty(rf) && rf !== '0.00' && this.commonJS.isNotEmpty(af) && af !== '0.00') {
+				var hf = (af*100-rf*100)/100;
+				var rate = parseFloat(hf) / parseFloat(rf) * 100
+				this.inputForm.verifyFee = hf.toFixed(2)
+				this.inputForm.verifyRate = rate.toFixed(2)
+			}
+			if (this.commonJS.isNotEmpty(af)) {
+				this.inputForm.consultFee = af
+			}
+
+		},
+		getApprovalFee() {
+			//送审价
+			var rf = this.inputForm.reviewFee
+			//审定价
+			var af = this.inputForm.approvalFee
+			if(this.commonJS.isNotEmpty(rf) && rf != '0.00' && this.commonJS.isNotEmpty(af) && af !='0.00'){
+				//计算审核增减额
+				var hf = (af*100-rf*100)/100;
+				var rate = parseFloat(hf) / parseFloat(rf) * 100
+				this.inputForm.verifyFee = hf.toFixed(2)
+				this.inputForm.verifyRate = rate.toFixed(2)
+			}
+			if(this.commonJS.isNotEmpty(af)){
+				this.inputForm.consultFee = af
+			}
+			this.inputForm.buildingFee = ''
+			this.inputForm.installFee = ''
+			this.inputForm.buildingRate = ''
+			this.inputForm.installRate = ''
+		},
+		getBuildingFee() {
+			var af = this.inputForm.approvalFee
+			//土建
+			var bf = this.inputForm.buildingFee
+			if(this.commonJS.isNotEmpty(bf) && this.commonJS.isNotEmpty(af)){
+				var hf = parseInt(af)-parseInt(bf);
+				var rate = Math.round(parseInt(bf) / parseInt(af) * 100) / 100 * 100
+				this.inputForm.buildingRate = rate
+				this.inputForm.installFee = hf
+				var inRate = Math.round(parseInt(hf) / parseInt(af) * 100) / 100 * 100
+				this.inputForm.installRate = inRate
+			}
+			if(this.commonJS.isEmpty(bf) || this.commonJS.isEmpty(af)){
+				this.inputForm.buildingRate = ''
+			}
+		},
+		getInstallFee() {
+			var af = this.inputForm.approvalFee
+			//安装
+			var inf = this.inputForm.installFee
+			if(this.commonJS.isNotEmpty(inf) && this.commonJS.isNotEmpty(af)){
+				var hf = parseInt(af)-parseInt(inf);
+				var rate = Math.round(parseInt(inf) / parseInt(af) * 100) / 100 * 100
+				this.inputForm.installRate = rate
+				this.inputForm.buildingFee = hf
+				var bRate = Math.round(parseInt(hf) / parseInt(af) * 100) / 100 * 100
+				this.inputForm.buildingRate = bRate
+			}
+			if(this.commonJS.isEmpty(inf) || this.commonJS.isEmpty(af)){
+				this.inputForm.installRate = ''
+			}
+		},
+		validateDateRange(rule, value, callback) {
+			const workStartDate = this.inputForm.workStartDate;
+			const workEndDate = this.inputForm.workEndDate;
+
+			if (workStartDate && workEndDate && workStartDate > workEndDate) {
+				this.inputForm.workEndDate = ''
+				callback(new Error('工作开始时间不能大于工作结束时间'));
+			} else {
+				callback();
+			}
+		},
+		// 项目组成员下拉弹窗
+		userPullListForm (rowIndex) {
+			this.indexRow = rowIndex
+			this.$refs.userPullFormNew.init()
+		},
+		ifName (row) {
+			if (this.commonJS.isEmpty(row.attachmentName)) {
+				row.attachmentName = '---'
+				return false
+			}
+			let suffix = row.attachmentName.substring(row.attachmentName.lastIndexOf('.') + 1)
+			if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+				return true
+			} else {
+				return false
+			}
+		},
+		showFile (row) {
+			console.log("showFile",row)
+			row.name = row.attachmentName
+			openWindowOnUrl(row)
+		},
+		getSize (value) {
+			if (this.commonJS.isEmpty(value)) {
+				return ''
+			} else {
+				let val = parseInt(value)
+				let k = 1024
+				let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+				let i = Math.floor(Math.log(val) / Math.log(k))
+				let result = val / Math.pow(k, i);
+				let kb = parseFloat(result.toPrecision(3));
+				return kb + '' + sizes[i]
+			}
+		},
+		//测试按钮
+		openFileForm(id,typeId){
+			console.log('this.id', id )
+			this.$refs.fileForm.init("add", id,this.inputForm.projectId)
+		},
+		toHref (row) {
+			console.log("toHref",row)
+			toHref(row)
+		},
+		getFiles(){
+			projectReportService.getAttachmentList(this.inputForm.projectId,this.inputForm.id).then((data) => {
+				this.tableData = data
+				this.tableKey = Math.random()
+			})
+
+		},
+		getProgramForUser (rows) {
+			console.log('rows', rows)
+			this.inputForm.detailInfos[this.indexRow].userId = rows[0].id
+			this.inputForm.detailInfos[this.indexRow].memberName = rows[0].name
+			this.inputForm.detailInfos[this.indexRow].enrollCertNo = rows[0].enrollCertNo
+
+			// 根据证书类型  获取字典值
+			let professionList = this.getProfessionList(rows[0].type)
+			professionList.forEach(item => {
+				if (item.value == rows[0].profession) {
+					rows[0].profession = item.label
+				}
+			})
+
+			this.inputForm.detailInfos[this.indexRow].profession = rows[0].profession
+			this.indexRow = ''
+			this.$forceUpdate()
+		},
+		async insertEvent (type) {
+			if (type === 'detail') {
+				let d = {
+					memberName: '',
+					userId: '',
+					userRole: '咨询员',
+					enrollCertNo: '',
+					profession: '',
+				}
+				if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+					this.inputForm.detailInfos = []
+				}
+				this.inputForm.detailInfos.push(d)
+				this.detailKey = Math.random()
+			}
+		},
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>

File diff suppressed because it is too large
+ 123 - 1290
src/views/cw/reportManagement/ReportManagementList.vue


+ 182 - 0
src/views/cw/reportManagement/reportReview/FileForm.vue

@@ -0,0 +1,182 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1200px"
+      @close="close(),closeXTable()"
+      @keyup.enter.native="doSubmit"
+	  v-model="visible">
+      <el-form size="large" :model="inputForm" ref="inputForm" :rules="rules" v-loading="loading" :class="method==='view'?'readonly':''"
+               label-width="150px">
+        <!--        附件-->
+        <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+      </el-form>
+		<template #footer>
+			<span class="dialog-footer">
+      <el-button  @click="close(),closeXTable()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick >确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import OSSSerive from '@/api/sys/OSSService'
+  export default {
+    data () {
+      return {
+        visable: false,
+        gridData: [],
+		tableKey: '',
+        radio: 0,
+        tableData: [],
+        dataList: [],
+        dataListNew: [],
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+        },
+		  attachmentId: '',
+		  moduleType: '',
+        rogress: 0, // 动态显示进度条
+        progressFlag: false, // 关闭进度条
+      }
+    },
+    components: {
+      UpLoadComponent
+    },
+    ossService: null,
+    workClientService: null,
+    created () {
+      this.ossService = new OSSSerive()
+    },
+    mounted () {
+    },
+    methods: {
+      // 关闭查看器
+      closeViewer () {
+        this.url = ''
+        this.showViewer = false
+      },
+      async init (method, id,projectId) {
+      	console.log('id', id )
+      	console.log('projectId', projectId )
+      	this.attachmentId = id
+      	this.moduleType = projectId
+        this.dataList = []
+        this.dataListNew = []
+        await this.ossService.getFileListByAttachmentIdAndModuleType(id,projectId).then((data) => {
+        	console.log('data',data)
+			if(data){
+				data.forEach((item) => {
+					item.name = item.attachmentName
+					this.dataList.push(item)
+					this.dataListNew.push(item)
+				})
+			}
+        })
+        this.method = method
+        this.inputForm = {
+
+        }
+        this.inputForm.id = id
+		  this.title = '上传附件'
+        this.visible = true
+        this.loading = false
+		  this.$nextTick(() => {
+          // this.$refs.upload.clearFiles()
+          this.$refs.inputForm.resetFields()
+            this.$refs.uploadComponent.newUpload(method, this.dataList, 'workClient', 300)
+          this.loading = false
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        if (this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          return
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.inputForm.workAttachments = []
+            this.dataListNew = this.$refs.uploadComponent.getDataList()
+            this.dataListNew.forEach((item) => {
+              if (item.id === null || item.id === undefined || item.id === '') {
+                item.url = item.raw.url
+              }
+              item.attachmentFlag = 'ccpmWorkClient'
+              item.fileSize = item.size
+              item.attachmentName = item.name
+              item.createBy = null
+				item.attachmentId = this.attachmentId
+				item.moduleType = this.moduleType
+              this.inputForm.workAttachments.push(item)
+            })
+			  this.$emit('getFiles',this.dataListNew)
+			console.log(this.inputForm)
+            this.ossService.save(this.inputForm.workAttachments).then((data) => {
+              this.close()
+              this.$message.success(data)
+              // this.$emit('refreshDataList')
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.$refs.uploadComponent.clearUpload()
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+        this.showVi = true
+      },
+      // 关闭窗口时调用
+      closeXTable () {
+        this.bankInfos = []
+        this.linkmanInfos = []
+        this.closePop()
+      },
+      closePop () {
+        this.visable = false
+      }
+    }
+  }
+</script>
+
+<style>
+  .tid_40 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_40 .vxe-header--row .col--last{
+    text-align: center;
+  }
+  .tid_45 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_45 .vxe-header--row .col--last{
+    text-align: center;
+  }
+</style>
+
+<style scoped>
+  .avatar{
+    height: 100px;
+  }
+  .el-divider__text {
+    font-weight: bold;
+    font-size: 16px;
+  }
+  .readonly-text input {
+	  color: red; /* 设置只读文本的字体颜色为红色 */
+  }
+</style>

File diff suppressed because it is too large
+ 778 - 1127
src/views/cw/reportManagement/reportReview/ReportReviewForm.vue


+ 142 - 0
src/views/finance/invoice/UserPullFormNew.vue

@@ -0,0 +1,142 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="500px"
+      height="500px"
+      @close="close"
+      append-to-body
+	  v-model="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="" prop="name">
+            <el-input v-model="searchForm.name" placeholder="请输入用户名称" clearable></el-input>
+          </el-form-item>
+
+          <el-form-item>
+            <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="300px"
+          :loading="loading"
+          size="small"
+          ref="userTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :radio-config="{trigger: 'row'}"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId',expandAll: true}"
+          :checkbox-config="{}">
+<!--          <vxe-column type="seq" width="60" title="序号"></vxe-column>-->
+          <vxe-column type="radio" width="50" ></vxe-column>
+
+          <vxe-column title="姓名" min-width="180" field="name" align="left" tree-node></vxe-column>
+        </vxe-table>
+      </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="getProgramForUser()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import ReimbursementService from '@/api/sys/ReimbursementService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        dataList: [],
+        searchForm: {
+          name: ''
+        }
+      }
+    },
+    reimbursementService: null,
+    created () {
+      this.reimbursementService = new ReimbursementService()
+    },
+    components: {
+    },
+    methods: {
+      init () {
+        this.title = '人员选择'
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getProgramForUser () {
+        let rows = []
+        if (this.commonJS.isEmpty(this.$refs.userTable.getRadioRecord())) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        // if (this.$refs.userTable.getCheckboxRecords().length > 1) {
+        //   this.$message.error('最多选择一条数据')
+        //   return
+        // }
+        let row = this.$refs.userTable.getRadioRecord()
+        if (!row.isUser) {
+          this.$message.error('请选择子集数据')
+          return
+        }
+        this.close()
+        rows.push(row)
+        this.$emit('getProgramForUser', rows)
+      },
+      list () {
+        this.loading = true
+        this.reimbursementService.userTreeNew(this.searchForm.name).then((data) => {
+          this.dataList = data
+          this.loading = false
+          this.$nextTick(() => {
+            this.$refs.userTable.setAllTreeExpand(true)
+          })
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+  }
+</style>

+ 140 - 135
src/views/program/configuration/typeFileDict/TypeFileDictForm.vue

@@ -1,148 +1,153 @@
 <template>
-  <div>
-    <el-dialog
-      :title="title"
-      :close-on-click-modal="false"
-	  draggable
-      width="500px"
-      @close="close"
-      @keyup.enter.native="doSubmit"
-	  v-model="visible">
-      <el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
-               label-width="100px" @submit.native.prevent>
-        <el-row  :gutter="15">
-          <el-col :span="21">
-            <el-form-item label="附件名称" prop="fileId"
-                          :rules="[
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="500px"
+			@close="close"
+			@keyup.enter.native="doSubmit"
+			v-model="visible">
+			<el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+					 label-width="100px" @submit.native.prevent>
+				<el-row  :gutter="15">
+					<el-col :span="21">
+						<el-form-item label="附件名称" prop="fileId"
+									  :rules="[
                           {required: true, message:'附件名称不能为空', trigger:'blur'}
                  ]">
-              <el-select v-model="inputForm.fileId" placeholder="请选择附件名称" style="width:100%;" clearable>
-                <el-option
-                  v-for="item in fileDictList"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="21">
-            <el-form-item label="必填阶段" prop="requiredStage"
-                          :rules="[
+							<el-select v-model="inputForm.fileId" placeholder="请选择附件名称" style="width:100%;" clearable>
+								<el-option
+									v-for="item in fileDictList"
+									:key="item.id"
+									:label="item.name"
+									:value="item.id">
+								</el-option>
+							</el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="21">
+						<el-form-item label="必填阶段" prop="requiredStage"
+									  :rules="[
                  ]">
-              <el-select v-model="inputForm.requiredStage" placeholder="请选择必填阶段" style="width:100%;" clearable>
-                <el-option
-                  v-for="item in $dictUtils.getDictList('program_required_stage')"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-		<template #footer>
+							<el-select v-model="inputForm.requiredStage" placeholder="请选择必填阶段" style="width:100%;" clearable>
+								<el-option
+									v-for="item in $dictUtils.getDictList('program_required_stage')"
+									:key="item.value"
+									:label="item.label"
+									:value="item.value">
+								</el-option>
+							</el-select>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
 			<span class="dialog-footer">
 			  <el-button  @click="close()" icon="el-icon-circle-close">关闭</el-button>
 			  <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
 			</span>
-		</template>
+			</template>
 
-    </el-dialog>
-  </div>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-  import ProgramTypeFileDictService from '@/api/program/ProgramTypeFileDictService'
-  export default {
-    data () {
-      return {
-        title: '',
-        method: '',
-        visible: false,
-        loading: false,
-        inputForm: {
-          fileId: '',
-          requiredStage: '',
-          attachmentProjectType: '',
-          attachmentProjectSort: ''
-        },
-        fileDictList: []
-      }
-    },
-    programTypeFileDictService: null,
-    created () {
-      this.programTypeFileDictService = new ProgramTypeFileDictService()
-    },
-    methods: {
-      init (method, id, attachmentProjectType, attachmentProjectSort, fileId) {
-        this.method = method
-        this.getFileList(attachmentProjectType, attachmentProjectSort, fileId)
-        this.inputForm = {
-          fileId: '',
-          requiredStage: '',
-          attachmentProjectType: '',
-          attachmentProjectSort: ''
-        }
-        if (method === 'add') {
-          this.title = `新增附件结构信息`
-        } else if (method === 'edit') {
-          this.inputForm.id = id
-          this.title = '修改附件结构信息'
-        } else if (method === 'view') {
-          this.inputForm.id = id
-          this.title = '附件结构信息'
-        }
-        this.visible = true
-        this.loading = false
-        this.$nextTick(() => {
-          this.$refs.inputForm.resetFields()
-          this.inputForm.attachmentProjectType = attachmentProjectType
-          this.inputForm.attachmentProjectSort = attachmentProjectSort
-          if (method === 'edit' || method === 'view') { // 修改或者查看
-            this.loading = true
-            this.programTypeFileDictService.queryById(this.inputForm.id).then((data) => {
-              this.inputForm = this.recover(this.inputForm, data)
-              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-              if (this.inputForm.requiredStage === '0') {
-                this.inputForm.requiredStage = ''
-              }
-              this.inputForm.attachmentProjectType = attachmentProjectType
-              this.inputForm.attachmentProjectSort = attachmentProjectSort
-              this.loading = false
-            })
-          }
-        })
-      },
-      // 表单提交
-      doSubmit () {
-        this.$refs['inputForm'].validate((valid) => {
-          if (valid) {
-            this.loading = true
-            if (this.commonJS.isEmpty(this.inputForm.requiredStage)) {
-              this.inputForm.requiredStage = '0'
-            }
-            this.programTypeFileDictService.save(this.inputForm).then((data) => {
-              this.close()
-              this.$message.success(data)
-              this.$emit('refreshDataList')
-              this.loading = false
-            }).catch(() => {
-              this.loading = false
-            })
-          }
-        })
-      },
-      close () {
-        this.$refs.inputForm.resetFields()
-        this.visible = false
-      },
-      getFileList (attachmentProjectType, attachmentProjectSort, fileId) {
-        this.programTypeFileDictService.getFileList({'attachmentProjectType': attachmentProjectType, 'attachmentProjectSort': attachmentProjectSort, 'fileId': fileId}).then((data) => {
-          this.fileDictList = data
-        })
-      }
-    }
-  }
+	import ProgramTypeFileDictService from '@/api/program/ProgramTypeFileDictService'
+	export default {
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					fileId: '',
+					projectLevel: '',
+					requiredStage: '',
+					attachmentProjectType: '',
+					attachmentProjectSort: ''
+				},
+				fileDictList: []
+			}
+		},
+		programTypeFileDictService: null,
+		created () {
+			this.programTypeFileDictService = new ProgramTypeFileDictService()
+		},
+		methods: {
+			init (method, id, attachmentProjectType, attachmentProjectSort,projectLevel, fileId) {
+				this.method = method
+				this.getFileList(attachmentProjectType, attachmentProjectSort,projectLevel, fileId)
+				this.inputForm = {
+					fileId: '',
+					projectLevel: '',
+					requiredStage: '',
+					attachmentProjectType: '',
+					attachmentProjectSort: ''
+				}
+				if (method === 'add') {
+					this.title = `新增附件结构信息`
+				} else if (method === 'edit') {
+					this.inputForm.id = id
+					this.title = '修改附件结构信息'
+				} else if (method === 'view') {
+					this.inputForm.id = id
+					this.title = '附件结构信息'
+				}
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.inputForm.projectLevel = projectLevel
+					this.inputForm.attachmentProjectType = attachmentProjectType
+					this.inputForm.attachmentProjectSort = attachmentProjectSort
+					if (method === 'edit' || method === 'view') { // 修改或者查看
+						this.loading = true
+						this.programTypeFileDictService.queryById(this.inputForm.id).then((data) => {
+							this.inputForm = this.recover(this.inputForm, data)
+							this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+							if (this.inputForm.requiredStage === '0') {
+								this.inputForm.requiredStage = ''
+							}
+							this.inputForm.attachmentProjectType = attachmentProjectType
+							this.inputForm.projectLevel = projectLevel
+							this.inputForm.attachmentProjectSort = attachmentProjectSort
+							this.loading = false
+						})
+					}
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.commonJS.isEmpty(this.inputForm.requiredStage)) {
+							this.inputForm.requiredStage = '0'
+						}
+						this.programTypeFileDictService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.visible = false
+			},
+			getFileList (attachmentProjectType, attachmentProjectSort,projectLevel, fileId) {
+				this.programTypeFileDictService.getFileList({'attachmentProjectType': attachmentProjectType, 'attachmentProjectSort': attachmentProjectSort,'projectLevel':projectLevel, 'fileId': fileId}).then((data) => {
+					console.log('getFileList',data)
+					this.fileDictList = data
+				})
+			}
+		}
+	}
 </script>

+ 210 - 190
src/views/program/configuration/typeFileDict/TypeFileDictList.vue

@@ -1,195 +1,215 @@
 <template>
-  <div class="page">
-    <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
-      <!-- 搜索框-->
-      <el-form-item prop="attachmentProjectType">
-        <el-select v-model="searchForm.attachmentProjectType" placeholder="请选择项目类型" style="width:100%;">
-          <el-option
-            v-for="item in $dictUtils.getDictList('program_type')"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item prop="attachmentProjectSort">
-        <el-select v-model="searchForm.attachmentProjectSort" placeholder="请选择项目类型项目类别" style="width:100%;">
-          <el-option
-            v-if="searchForm.attachmentProjectType === '1'"
-            v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option>
-          <el-option
-            v-if="searchForm.attachmentProjectType === '2'"
-            v-for="item in $dictUtils.getDictList('program_engineering_consultation_type')"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
-        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
-      </el-form-item>
-    </el-form>
-    <div class="jp-table" style="">
-      <vxe-toolbar :refresh="{query: refreshList}" custom>
-        <template #buttons>
-<!--          <el-button v-if="hasPermission('program:configuration:type_file:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.typeFileDictTable && $refs.typeFileDictTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
-        </template>
-      </vxe-toolbar>
-      <div class="jp-table-body">
-        <vxe-table
-          :key="tableKey"
-          border="inner"
-          auto-resize
-          resizable
-          height="auto"
-          :loading="loading"
-          size="small"
-          ref="typeFileDictTable"
-          show-header-overflow
-          show-overflow
-          highlight-hover-row
-          :menu-config="{}"
-          @sort-change="sortChangeHandle"
-          :sort-config="{remote:true}"
-          :data="dataList"
-          :tree-config="{transform: true, rowField: 'fileId', parentField: 'parentId', expandAll: true}"
-          :checkbox-config="{}">
-          <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="50" ></vxe-column>
-          <vxe-column width="180" title="附件名称" field="name" align="left" tree-node></vxe-column>
-          <vxe-column title="必填阶段" field="requiredStage">
-            <template slot-scope="scope">
-              {{$dictUtils.getDictLabel("program_required_stage", scope.row.requiredStage, "")}}
-            </template>
-          </vxe-column>
-          <vxe-column title="操作" width="230px" fixed="right" align="center">
-            <template  #default="scope">
-              <el-button v-if="hasPermission('program:configuration:type_file:edit')&&scope.row.parentId === '0'" type="text"  @click="add(scope.row)">新建子类型</el-button>
-              <el-button v-if="hasPermission('program:configuration:type_file:edit')&&scope.row.parentId !== '0'" type="text"  @click="edit(scope.row)">修改</el-button>
-              <el-button v-if="hasPermission('program:configuration:type_file:del')&&scope.row.parentId !== '0'" type="text"   @click="del(scope.row)">删除</el-button>
-            </template>
-          </vxe-column>
-        </vxe-table>
-<!--        <vxe-pager-->
-<!--          background-->
-<!--          size="small"-->
-<!--          :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>
-    <TypeFileDictForm  ref="typeFileDictForm" @refreshDataList="refreshList"></TypeFileDictForm>
-  </div>
+	<div class="page">
+		<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item prop="attachmentProjectType">
+				<el-select v-model="searchForm.attachmentProjectType" placeholder="请选择项目类型" style="width:100%;" @change="changeSortVal">
+					<el-option
+						v-for="item in $dictUtils.getDictList('program_type')"
+						:key="item.value"
+						:label="item.label"
+						:value="item.value">
+					</el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item prop="attachmentProjectSort">
+			  <el-select v-model="searchForm.attachmentProjectSort" placeholder="请选择项目类别" style="width:100%;">
+				<el-option
+				  v-if="searchForm.attachmentProjectType === '1'"
+				  v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
+				  :key="item.value"
+				  :label="item.label"
+				  :value="item.value">
+				</el-option>
+				<el-option
+				  v-if="searchForm.attachmentProjectType === '2'"
+				  v-for="item in $dictUtils.getDictList('program_engineering_consultation_type')"
+				  :key="item.value"
+				  :label="item.label"
+				  :value="item.value">
+				</el-option>
+			  </el-select>
+			</el-form-item>
+			<el-form-item prop="projectLevel">
+				<el-select v-model="searchForm.projectLevel" placeholder="请选择项目等级" style="width:100%;">
+					<el-option
+						v-for="item in $dictUtils.getDictList('project_level')"
+						:key="item.value"
+						:label="item.label"
+						:value="item.value">
+					</el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<!--          <el-button v-if="hasPermission('program:configuration:type_file:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.typeFileDictTable && $refs.typeFileDictTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+				</template>
+			</vxe-toolbar>
+			<div class="jp-table-body">
+				<vxe-table
+					:key="tableKey"
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					size="small"
+					ref="typeFileDictTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:tree-config="{transform: true, rowField: 'fileId', parentField: 'parentId', expandAll: true}"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column type="checkbox" width="50" ></vxe-column>
+					<vxe-column title="附件名称" field="name" align="left" tree-node></vxe-column>
+					<vxe-column width="180" title="必填阶段" field="requiredStage">
+						<template #default="scope">
+							{{$dictUtils.getDictLabel("program_required_stage", scope.row.requiredStage, "")}}
+						</template>
+					</vxe-column>
+					<vxe-column title="操作" width="230px" fixed="right" align="center">
+						<template  #default="scope">
+							<el-button v-if="hasPermission('program:configuration:type_file:edit')&&scope.row.parentId === '0'" text type="primary" @click="add(scope.row)">新建子类型</el-button>
+							<el-button v-if="hasPermission('program:configuration:type_file:edit')&&scope.row.parentId !== '0'" text type="primary"  @click="edit(scope.row)">修改</el-button>
+							<el-button v-if="hasPermission('program:configuration:type_file:del')&&scope.row.parentId !== '0'" 	text type="primary"  @click="del(scope.row)">删除</el-button>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<!--        <vxe-pager-->
+				<!--          background-->
+				<!--          size="small"-->
+				<!--          :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>
+		<TypeFileDictForm  ref="typeFileDictForm" @refreshDataList="refreshList"></TypeFileDictForm>
+	</div>
 </template>
 
 <script>
-  import ProgramTypeFileDictService from '@/api/program/ProgramTypeFileDictService'
-  import TypeFileDictForm from './TypeFileDictForm'
-  export default {
-    data () {
-      return {
-        searchForm: {
-          attachmentProjectSort: '',
-          attachmentProjectType: ''
-        },
-        dataList: [],
-        tablePage: {
-          total: 0,
-          currentPage: 1,
-          pageSize: 10,
-          orders: []
-        },
-        loading: false,
-        tableKey: ''
-      }
-    },
-    programTypeFileDictService: null,
-    created () {
-      this.programTypeFileDictService = new ProgramTypeFileDictService()
-    },
-    components: {
-      TypeFileDictForm
-    },
-    mounted () {
-      this.refreshList()
-    },
-    methods: {
-      // 新增
-      add (row) {
-        console.log(this.searchForm)
-        this.$refs.typeFileDictForm.init('add', null, this.searchForm.attachmentProjectType, this.searchForm.attachmentProjectSort, row.fileId)
-      },
-      // 修改
-      edit (row) {
-        row.id = row.id || this.$refs.typeFileDictTable.getCheckboxRecords().map(item => {
-          return item.id
-        })[0]
-        this.$refs.typeFileDictForm.init('edit', row.id, this.searchForm.attachmentProjectType, this.searchForm.attachmentProjectSort, row.fileId)
-      },
-      // 查看
-      view (row) {
-        this.$refs.typeFileDictForm.init('view', row.id, this.searchForm.attachmentProjectType, this.searchForm.attachmentProjectSort, row.fileId)
-      },
-      // 获取数据列表
-      refreshList () {
-        this.loading = true
-        this.programTypeFileDictService.list({
-          'current': this.tablePage.currentPage,
-          'size': this.tablePage.pageSize,
-          'orders': this.tablePage.orders,
-          ...this.searchForm
-        }).then((data) => {
-          this.dataList = data
-          this.tableKey = Math.random()
-          this.loading = false
-        })
-      },
-      // 当前页
-      currentChangeHandle ({ currentPage, pageSize }) {
-        this.tablePage.currentPage = currentPage
-        this.tablePage.pageSize = pageSize
-        this.refreshList()
-      },
-      // 排序
-      sortChangeHandle (column) {
-        this.tablePage.orders = []
-        if (column.order != null) {
-          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
-        }
-        this.refreshList()
-      },
-      // 删除
-      del (row) {
-        let ids = row.id || this.$refs.typeFileDictTable.getCheckboxRecords().map(item => {
-          return item.id
-        }).join(',')
-        this.$confirm(`确定删除所选项吗?`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.loading = true
-          this.programTypeFileDictService.delete(ids).then((data) => {
-            this.$message.success(data)
-            this.refreshList()
-            this.loading = false
-          })
-        })
-      },
-      resetSearch () {
-        this.$refs.searchForm.resetFields()
-        this.refreshList()
-      }
-    }
-  }
+	import ProgramTypeFileDictService from '@/api/program/ProgramTypeFileDictService'
+	import TypeFileDictForm from './TypeFileDictForm'
+	export default {
+		data () {
+			return {
+				searchForm: {
+					attachmentProjectSort: '',
+					attachmentProjectType: '',
+					projectLevel: ''
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				loading: false,
+				tableKey: ''
+			}
+		},
+		programTypeFileDictService: null,
+		created () {
+			this.programTypeFileDictService = new ProgramTypeFileDictService()
+		},
+		components: {
+			TypeFileDictForm
+		},
+		mounted () {
+			this.refreshList()
+		},
+		methods: {
+			// 新增
+			add (row) {
+				console.log(this.searchForm)
+				this.$refs.typeFileDictForm.init('add', null, this.searchForm.attachmentProjectType, this.searchForm.attachmentProjectSort, this.searchForm.projectLevel,row.fileId)
+			},
+			// 修改
+			edit (row) {
+				row.id = row.id || this.$refs.typeFileDictTable.getCheckboxRecords().map(item => {
+					return item.id
+				})[0]
+				this.$refs.typeFileDictForm.init('edit', row.id, this.searchForm.attachmentProjectType, this.searchForm.attachmentProjectSort, this.searchForm.projectLevel, row.fileId)
+			},
+			// 查看
+			view (row) {
+				this.$refs.typeFileDictForm.init('view', row.id, this.searchForm.attachmentProjectType, this.searchForm.attachmentProjectSort, this.searchForm.projectLevel, row.fileId)
+			},
+			// 获取数据列表
+			refreshList () {
+				console.log('进入方法')
+				this.loading = true
+				this.programTypeFileDictService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					this.dataList = data
+					this.tableKey = Math.random()
+					this.loading = false
+				})
+			},
+			// 当前页
+			currentChangeHandle ({ currentPage, pageSize }) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 排序
+			sortChangeHandle (column) {
+				this.tablePage.orders = []
+				if (column.order != null) {
+					this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+				}
+				this.refreshList()
+			},
+			// 删除
+			del (row) {
+				let ids = row.id || this.$refs.typeFileDictTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.programTypeFileDictService.delete(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.refreshList()
+			},
+			changeSortVal() {
+				console.log('进来了')
+				if (this.searchForm.attachmentProjectType === '1') {
+					this.searchForm.attachmentProjectSort = '1'
+				} else if (this.searchForm.attachmentProjectType === '2') {
+					this.searchForm.attachmentProjectSort = '1'
+				}
+			}
+		}
+	}
 </script>