浏览代码

入职离职调整

wangqiang 1 年之前
父节点
当前提交
be2b25c4e1

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

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

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

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

+ 461 - 0
src/components/userSelectAll/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.allTreeData({ 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
+				.allUserList({
+					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/userSelectAll/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>

+ 43 - 36
src/views/human/depart/handover/ComputerArrearsAddForm.vue

@@ -80,6 +80,7 @@
 					assigneeId: '',
 					type: '',
 					department: '',
+					handoverId: '',
 				},
 				keyWatch: '',
 			}
@@ -141,6 +142,7 @@
 					assigneeId: '',
 					type: '',
 					department: '',
+					handoverId: '',
 				}
 				if (method === 'add') {
 					this.title = `新建电脑款项检查`
@@ -242,45 +244,50 @@
 			},
 			// 修改状态
 			updateStatusById (type, callback) {
-				if (type === 'reject') {
-					this.loading = true
-					handoverComputerService.findById(this.inputForm.id).then((data) => {
-						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						} else {
-							this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
-								if (this.commonJS.isNotEmpty(data)) {
-									if (data === '电脑款项检查') {
-										this.inputForm.type = '4'
-									} else {
-										this.inputForm.type = '2'
-									}
-								}
-							})
-							handoverComputerService.updateStatusById(this.inputForm).then(() => {
+				if (this.inputForm.imprestAmountArrears != 0) {
+					if (type === 'reject') {
+						this.loading = true
+						handoverComputerService.findById(this.inputForm.id).then((data) => {
+							if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
 								this.loading = false
-								callback()
-							})
-						}
-					})
-				} else if (type === 'hold') {
-					this.loading = true
-					handoverComputerService.findById(this.inputForm.id).then((data) => {
-						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						} else {
-							this.inputForm.type = '1'
-							handoverComputerService.updateStatusById(this.inputForm).then(() => {
+								this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+								throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							} else {
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '电脑款项检查') {
+											this.inputForm.type = '4'
+										} else {
+											this.inputForm.type = '2'
+										}
+									}
+								})
+								handoverComputerService.updateStatusById(this.inputForm).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						})
+					} else if (type === 'hold') {
+						this.loading = true
+						handoverComputerService.findById(this.inputForm.id).then((data) => {
+							if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
 								this.loading = false
-								callback()
-							})
-						}
-					})
+								this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+								throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							} else {
+								this.inputForm.type = '1'
+								handoverComputerService.updateStatusById(this.inputForm).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						})
+					}
+				} else {
+					callback()
 				}
+
 			},
 			twoDecimalPlaces (num) {
 				let str = num.toString()

+ 2 - 0
src/views/human/depart/handover/DraftAddForm.vue

@@ -66,6 +66,7 @@
 					assigneeId: '',
 					type: '',
 					department: '',
+					handoverId: '',
 				},
 				keyWatch: '',
 			}
@@ -124,6 +125,7 @@
 					assigneeId: '',
 					type: '',
 					department: '',
+					handoverId: '',
 				}
 				if (method === 'add') {
 					this.title = `新建底稿归档`

+ 2 - 0
src/views/human/depart/handover/HandoverAccountsAddForm.vue

@@ -80,6 +80,7 @@
 					assigneeId: '',
 					type: '',
 					department: '',
+					handoverId: '',
 				},
 				keyWatch: '',
 			}
@@ -141,6 +142,7 @@
 					assigneeId: '',
 					type: '',
 					department: '',
+					handoverId: '',
 				}
 				if (method === 'add') {
 					this.title = `新建应收账款检查`

+ 3 - 2
src/views/human/depart/handover/HandoverAddForm.vue

@@ -7,7 +7,7 @@
 			<el-row :gutter="26">
 				<el-col :span="12">
 					<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
-						<el-input v-model="inputForm.name"></el-input>
+						<el-input v-model="inputForm.name" :disabled="true"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
@@ -25,6 +25,7 @@
 							:value="inputForm.department"
 							:accordion="true"
 							size="large"
+							:disabled="true"
 							@getValue="(value) => {inputForm.department=value}"/>
 					</el-form-item>
 				</el-col>
@@ -62,7 +63,7 @@
 	import SelectTree from '@/components/treeSelect/treeSelect.vue'
 	import handoverService from '@/api/human/depart/HandoverService'
 	import CommonApi from '@/api/cw/common/CommonApi'
-	import UserSelectAll from '@/components/userSelect'
+	import UserSelectAll from '@/components/userSelectAll'
 	import UserSelect2 from '@/components/userSelect'
 
 	export default {

+ 43 - 36
src/views/human/depart/handover/HandoverImprestAddForm.vue

@@ -80,6 +80,7 @@
 					assigneeId: '',
 					type: '',
 					department: '',
+					handoverId: '',
 				},
 				keyWatch: '',
 			}
@@ -141,6 +142,7 @@
 					type: '',
 					department: '',
 					imprestAmountArrears: '',
+					handoverId: '',
 				}
 				if (method === 'add') {
 					this.title = `新建备用金检查`
@@ -242,45 +244,50 @@
 			},
 			// 修改状态
 			updateStatusById (type, callback) {
-				if (type === 'reject') {
-					this.loading = true
-					handoverImprestService.findById(this.inputForm.id).then((data) => {
-						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						} else {
-							this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
-								if (this.commonJS.isNotEmpty(data)) {
-									if (data === '备用金检查') {
-										this.inputForm.type = '4'
-									} else {
-										this.inputForm.type = '2'
-									}
-								}
-							})
-							handoverImprestService.updateStatusById(this.inputForm).then(() => {
+				if (this.inputForm.imprestAmountArrears != 0) {
+					if (type === 'reject') {
+						this.loading = true
+						handoverImprestService.findById(this.inputForm.id).then((data) => {
+							if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
 								this.loading = false
-								callback()
-							})
-						}
-					})
-				} else if (type === 'hold') {
-					this.loading = true
-					handoverImprestService.findById(this.inputForm.id).then((data) => {
-						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						} else {
-							this.inputForm.type = '1'
-							handoverImprestService.updateStatusById(this.inputForm).then(() => {
+								this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+								throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							} else {
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '备用金检查') {
+											this.inputForm.type = '4'
+										} else {
+											this.inputForm.type = '2'
+										}
+									}
+								})
+								handoverImprestService.updateStatusById(this.inputForm).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						})
+					} else if (type === 'hold') {
+						this.loading = true
+						handoverImprestService.findById(this.inputForm.id).then((data) => {
+							if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
 								this.loading = false
-								callback()
-							})
-						}
-					})
+								this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+								throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							} else {
+								this.inputForm.type = '1'
+								handoverImprestService.updateStatusById(this.inputForm).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						})
+					}
+				} else {
+					callback()
 				}
+
 			},
 			twoDecimalPlaces (num) {
 				let str = num.toString()

+ 43 - 36
src/views/human/depart/handover/HandoverSocialSecurityAddForm.vue

@@ -80,6 +80,7 @@
 					assigneeId: '',
 					type: '',
 					department: '',
+					handoverId: '',
 				},
 				keyWatch: '',
 			}
@@ -141,6 +142,7 @@
 					assigneeId: '',
 					type: '',
 					department: '',
+					handoverId: '',
 				}
 				if (method === 'add') {
 					this.title = `新建社保款项检查`
@@ -243,45 +245,50 @@
 			},
 			// 修改状态
 			updateStatusById (type, callback) {
-				if (type === 'reject') {
-					this.loading = true
-					handoverSocialSecurityService.findById(this.inputForm.id).then((data) => {
-						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						} else {
-							this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
-								if (this.commonJS.isNotEmpty(data)) {
-									if (data === '社保账款检查') {
-										this.inputForm.type = '4'
-									} else {
-										this.inputForm.type = '2'
-									}
-								}
-							})
-							handoverSocialSecurityService.updateStatusById(this.inputForm).then(() => {
+				if (this.inputForm.imprestAmountArrears != 0) {
+					if (type === 'reject') {
+						this.loading = true
+						handoverSocialSecurityService.findById(this.inputForm.id).then((data) => {
+							if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
 								this.loading = false
-								callback()
-							})
-						}
-					})
-				} else if (type === 'hold') {
-					this.loading = true
-					handoverSocialSecurityService.findById(this.inputForm.id).then((data) => {
-						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						} else {
-							this.inputForm.type = '1'
-							handoverSocialSecurityService.updateStatusById(this.inputForm).then(() => {
+								this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+								throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							} else {
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '社保账款检查') {
+											this.inputForm.type = '4'
+										} else {
+											this.inputForm.type = '2'
+										}
+									}
+								})
+								handoverSocialSecurityService.updateStatusById(this.inputForm).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						})
+					} else if (type === 'hold') {
+						this.loading = true
+						handoverSocialSecurityService.findById(this.inputForm.id).then((data) => {
+							if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
 								this.loading = false
-								callback()
-							})
-						}
-					})
+								this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+								throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							} else {
+								this.inputForm.type = '1'
+								handoverSocialSecurityService.updateStatusById(this.inputForm).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						})
+					}
+				} else {
+					callback()
 				}
+
 			},
 			twoDecimalPlaces (num) {
 				let str = num.toString()

+ 38 - 4
src/views/human/depart/registration/DepartRegistrationAddForm.vue

@@ -7,7 +7,7 @@
 			<el-row :gutter="26">
 				<el-col :span="12">
 					<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
-						<el-input v-model="inputForm.name"></el-input>
+						<el-input v-model="inputForm.name" :disabled="true"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
@@ -24,7 +24,8 @@
 							:url="`/system-server/sys/office/treeData?type=2`"
 							:value="inputForm.department"
 							:accordion="true"
-							size="large"
+							:disabled="true"
+							size="default"
 							@getValue="(value) => {inputForm.department=value}"/>
 					</el-form-item>
 				</el-col>
@@ -39,7 +40,10 @@
 <!--					</el-form-item>-->
 <!--				</el-col>-->
 				<el-col :span="12">
-					<el-form-item label="到岗日期" prop="arrivalDate" :rules="[{required: true, message: '到岗日期不能为空', trigger: 'change'}]">
+					<el-form-item label="到岗日期" prop="arrivalDate" :rules="[
+						{required: true, message: '到岗日期不能为空', trigger: 'change'},
+						{ validator: validateDepartureDate2, trigger: 'change' }
+						]">
 						<el-date-picker
 							style="width: 100%;"
 							v-model="inputForm.arrivalDate"
@@ -50,7 +54,10 @@
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
-					<el-form-item label="预定离职日期" prop="departResignationDate" :rules="[{required: true, message: '预定离职日期不能为空', trigger: 'change'}]">
+					<el-form-item label="预定离职日期" prop="departResignationDate" :rules="[
+						{required: true, message: '预定离职日期不能为空', trigger: 'change'},
+						{ validator: validateDepartureDate, trigger: 'change' }
+						]">
 						<el-date-picker
 							style="width: 100%;"
 							v-model="inputForm.departResignationDate"
@@ -161,6 +168,33 @@
 			}
 		},
 		methods: {
+			// 自定义验证函数
+			validateDepartureDate(rule, value, callback) {
+				if (this.commonJS.isNotEmpty(this.inputForm.arrivalDate)){
+					if (value <= this.inputForm.arrivalDate) {
+						this.inputForm.departResignationDate = ''
+						callback(new Error('离职日期必须晚于到岗日期'));
+					} else {
+						callback();
+					}
+				} else {
+					callback();
+				}
+
+			},
+			validateDepartureDate2(rule, value, callback) {
+				if (this.commonJS.isNotEmpty(this.inputForm.departResignationDate)) {
+					if (value >= this.inputForm.departResignationDate) {
+						this.inputForm.arrivalDate = ''
+						callback(new Error('到岗日期必须早于离职日期'));
+					} else {
+						callback();
+					}
+				} else {
+					callback();
+				}
+
+			},
 			getKeyWatch (keyWatch) {
 				this.keyWatch = keyWatch
 			},

+ 3 - 2
src/views/human/depart/registration/DepartRegistrationEditForm.vue

@@ -18,7 +18,7 @@
 						<el-row :gutter="26">
 							<el-col :span="12">
 								<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
-									<el-input v-model="inputForm.name"></el-input>
+									<el-input v-model="inputForm.name" :disabled="true"></el-input>
 								</el-form-item>
 							</el-col>
 							<el-col :span="12">
@@ -35,7 +35,8 @@
 										:url="`/system-server/sys/office/treeData?type=2`"
 										:value="inputForm.department"
 										:accordion="true"
-										size="large"
+										:disabled="true"
+										size="default"
 										@getValue="(value) => {inputForm.department=value}"/>
 								</el-form-item>
 							</el-col>

+ 60 - 0
src/views/human/depart/registration/DepartRegistrationList.vue

@@ -111,6 +111,20 @@
 						{{$dictUtils.getDictLabel("status", scope.row.imprestType, '未开始')}} </el-button>
 				</template>
 			</vxe-column>
+			<vxe-column min-width="100" title="底稿归档状态" fixed="right" align="center" field="draftType">
+				<template #default="scope">
+					<el-button @click="draftHandoverDetail(scope.row)"
+							   :type="$dictUtils.getDictLabel('status_info', scope.row.draftType, '')" effect="dark" >
+						{{$dictUtils.getDictLabel("status", scope.row.draftType, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+			<vxe-column min-width="100" title="门卡回收状态" fixed="right" align="center" field="recoveryType">
+				<template #default="scope">
+					<el-button @click="recoveryHandoverDetail(scope.row)"
+							   :type="$dictUtils.getDictLabel('status_info', scope.row.recoveryType, '')" effect="dark" >
+						{{$dictUtils.getDictLabel("status", scope.row.recoveryType, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
 
           <vxe-column title="操作" width="200px" fixed="right" align="center">
             <template  #default="scope">
@@ -416,6 +430,52 @@
 				})
 			}
 		},
+		// 查看底稿归档流程结果
+		draftHandoverDetail (row) {
+			if (row.draftType !== '0' && row.draftType !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.draftProcInsId,
+					procDefId: row.draftProcDefId
+				}).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.draftId,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+		// 查看门卡回收流程结果
+		recoveryHandoverDetail (row) {
+			if (row.recoveryType !== '0' && row.recoveryType !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.recoveryProcInsId,
+					procDefId: row.recoveryProcDefId
+				}).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.recoveryId,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
 		// 查看电脑款项流程结果
 		computerHandoverDetail (row) {
 			if (row.computerType !== '0' && row.computerType !== '1') {