sangwenwei 1 år sedan
förälder
incheckning
4ba5a8920f
35 ändrade filer med 5038 tillägg och 117 borttagningar
  1. 79 0
      src/api/jy/DimissionService.js
  2. 8 0
      src/api/jy/DriveService.js
  3. 54 0
      src/api/jy/EntryService.js
  4. 1 1
      src/api/jy/NotifyService.js
  5. 8 0
      src/api/jy/ProjectInfoService.js
  6. 7 0
      src/api/sys/officeService.js
  7. 8 0
      src/api/sys/postService.js
  8. 9 0
      src/api/sys/roleService.js
  9. 16 0
      src/api/sys/userService.js
  10. 155 0
      src/components/JyOfficeTreeSelect/index.vue
  11. 4 4
      src/components/officeTreeSelect/index.vue
  12. 7 1
      src/views/flowable/task/TaskForm.vue
  13. 9 12
      src/views/jy/daily/MeetingRoomForm.vue
  14. 19 8
      src/views/jy/drive/DriveApplyForm.vue
  15. 3 3
      src/views/jy/drive/DriveList.vue
  16. 3 3
      src/views/jy/driveInfo/DriveInfoDia.vue
  17. 381 0
      src/views/jy/humanResources/DimissionForm.vue
  18. 585 0
      src/views/jy/humanResources/DimissionList.vue
  19. 1015 0
      src/views/jy/humanResources/EntryDia.vue
  20. 1001 0
      src/views/jy/humanResources/EntryForm.vue
  21. 480 0
      src/views/jy/humanResources/EntryList.vue
  22. 405 0
      src/views/jy/humanResources/HeirForm.vue
  23. 32 8
      src/views/jy/notify/NotifyList.vue
  24. 8 22
      src/views/jy/notify/NotifyTaskForm.vue
  25. 3 3
      src/views/jy/project/ContractForm.vue
  26. 5 5
      src/views/jy/project/OutInstanceForm.vue
  27. 5 5
      src/views/jy/project/ProjectArchiveForm.vue
  28. 7 2
      src/views/jy/project/ProjectAuditForm.vue
  29. 5 5
      src/views/jy/project/ProjectEiaForm.vue
  30. 10 6
      src/views/jy/project/ProjectForm.vue
  31. 23 23
      src/views/jy/project/ProjectList.vue
  32. 247 0
      src/views/jy/project/ProjectMemberList.vue
  33. 417 0
      src/views/jy/project/ProjectMembersEditForm.vue
  34. 1 1
      src/views/jy/workContractInfo/JyWorkContractList.vue
  35. 18 5
      src/views/materialManagement/userSeal/SignetList.vue

+ 79 - 0
src/api/jy/DimissionService.js

@@ -0,0 +1,79 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class EntryService{
+	list (param) {
+		return request({
+			url: prefix +'/employeeDimission/findPageList',
+			method: 'get',
+			params: param
+		})
+	}
+
+	saveForm (inputForm) {
+		return request({
+			url: prefix + `/employeeDimission/saveForm`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	saveHeir (inputForm) {
+		return request({
+			url: prefix + `/employeeDimission/saveHeir`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	queryById (id) {
+		return request({
+			url: prefix +'/employeeDimission/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	findHeirById (id) {
+		return request({
+			url: prefix +'/employeeDimission/findHeirById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/employeeDimission/updateStatusById",
+			method: "post",
+			data: data,
+		})
+	}
+
+	updateHeirStatusById(data) {
+		return request({
+			url: prefix + "/employeeDimission/updateHeirStatusById",
+			method: "post",
+			data: data,
+		})
+	}
+
+	delete (ids) {
+		return request({
+			url: prefix+"/employeeDimission/delete",
+			method: 'delete',
+			params: {id: ids}
+		})
+	}
+
+
+	adminEditForm(param){
+		return request({
+			url: prefix + "/employeeDimission/adminEditForm",
+			method: "post",
+			data: param,
+		})
+	}
+
+
+}

+ 8 - 0
src/api/jy/DriveService.js

@@ -65,4 +65,12 @@ export default class DriveService{
 		})
 	}
 
+	checkUseMen(useMen){
+		return request({
+			url: prefix + "/drive/checkUseMen",
+			method: "get",
+			params: {useMen:useMen}
+		})
+	}
+
 }

+ 54 - 0
src/api/jy/EntryService.js

@@ -0,0 +1,54 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class EntryService{
+	list (param) {
+		return request({
+			url: prefix +'/employeeEntry/findList',
+			method: 'get',
+			params: param
+		})
+	}
+
+	saveForm (inputForm) {
+		return request({
+			url: prefix + `/employeeEntry/saveForm`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	queryById (id) {
+		return request({
+			url: prefix +'/employeeEntry/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/employeeEntry/updateStatusById",
+			method: "post",
+			data: data,
+		})
+	}
+	delete (ids) {
+		return request({
+			url: prefix+"/employeeEntry/delete",
+			method: 'delete',
+			params: {id: ids}
+		})
+	}
+
+
+	adminEditForm(param){
+		return request({
+			url: prefix + "/employeeEntry/adminEditForm",
+			method: "post",
+			data: param,
+		})
+	}
+
+
+}

+ 1 - 1
src/api/jy/NotifyService.js

@@ -35,7 +35,7 @@ export default class NotifyService {
 	}
 	query (params) {
 		return request({
-			url:prefix+ `/jy/notify/queryById`,
+			url:prefix+ `/jy/notify/query`,
 			method: 'get',
 			params: params
 		})

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

@@ -251,6 +251,14 @@ export default class ProjectInfoService {
 		})
 	}
 
+	updateMembers(inputForm) {
+		return request({
+			url: prefix + `/jyProject/updateMembers`,
+			method: "post",
+			data: inputForm,
+		});
+	}
+
 
 
 

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

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

+ 8 - 0
src/api/sys/postService.js

@@ -33,4 +33,12 @@ export default {
 			params: params,
 		});
 	},
+
+	list2: function (params) {
+		return request({
+			url: prefix + "/sys/post/list2",
+			method: "get",
+			params: params,
+		});
+	},
 };

+ 9 - 0
src/api/sys/roleService.js

@@ -41,6 +41,15 @@ export default {
 			params: params,
 		});
 	},
+
+	list2: function (params) {
+		return request({
+			url: prefix + "/sys/role/list2",
+			method: "get",
+			params: params,
+		});
+	},
+
 	assign: function (params) {
 		return request({
 			url: prefix + "/sys/role/assign",

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

@@ -156,4 +156,20 @@ export default {
 		});
 	},
 
+	getUserByOffice:function(id) {
+		return request({
+			url: prefix + `/sys/user/getUserByOffice`,
+			method: "get",
+			params: {id:id},
+		});
+	},
+
+	updateLoginFlag(id) {
+		return request({
+			url: prefix + `/sys/user/updateLoginFlag`,
+			method: "post",
+			params: {id:id}
+		});
+	},
+
 };

+ 155 - 0
src/components/JyOfficeTreeSelect/index.vue

@@ -0,0 +1,155 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="400px"
+      append-to-body
+      height="500px"
+      @close="close"
+      @keyup.enter.native="getOffice"
+	  v-model="visibleChoose">
+
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item prop="name">
+            <el-input size="small" v-model="searchForm.name" placeholder="部门名称" clearable></el-input>
+          </el-form-item>
+
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="primary" >查询</el-button>
+<!--            <el-button @click="resetSearch()" size="small" >重置</el-button>-->
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="350px"
+          :loading="loading"
+          size="small"
+          ref="officeTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          @sort-change=""
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :show-header="false"
+          :row-config="{isCurrent: true}"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId', expandAll: true}"
+          :checkbox-config="{trigger: 'row'}">
+          <vxe-column type="checkbox" width="40px"></vxe-column>
+          <vxe-column title="部门" align="left" field="name" tree-node></vxe-column>
+        </vxe-table>
+      <span slot="footer" class="dialog-footer" style="float: right">
+      <el-button size="primary" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="primary" type="primary" v-if="method != 'view'" @click="getOffice()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import InputNumber from '@/views/workContract/InputNumber.vue'
+  import officeService from '@/api/sys/OfficeService'
+  import SelectUserTree from '@/views/utils/treeUserSelect'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visibleChoose: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          name: ''
+        }
+      }
+    },
+
+    created () {
+
+    },
+    components: {
+      SelectUserTree,
+      InputNumber
+    },
+    methods: {
+      init () {
+        this.title = '部门选择'
+        this.visibleChoose = true
+		  console.log('vis',this.visibleChoose)
+        this.list()
+      },
+      // 表单提交
+      getOffice () {
+        let rows = this.$refs.officeTable.getCheckboxRecords()
+        if (this.commonJS.isEmpty(rows)) {
+          this.$message.error('请至少选择一条数据')
+          return
+        }
+        let list = []
+        if (!this.commonJS.isEmpty(rows)) {
+          rows.forEach(item => {
+            let p = {
+              id: item.id,
+              name: item.name
+            }
+            list.push(p)
+          })
+        }
+        this.close()
+        this.$emit('getOfficeChoose', list)
+      },
+      list () {
+        this.dataList = []
+        this.loading = true
+        officeService.JyTreeData({
+          'current': 1,
+          'size': -1,
+          'orders': this.tablePage.orders,
+			'type':2,
+          ...this.searchForm
+        }).then((data) => {
+        	console.log('data',data)
+          this.dataList = data
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle (currentPage, pageSize) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visibleChoose = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0;
+  }
+  /deep/ .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
+    margin-bottom: 0px;
+  }
+</style>

+ 4 - 4
src/components/officeTreeSelect/index.vue

@@ -19,7 +19,7 @@
 
 
           <el-form-item>
-            <el-button type="primary" @click="list()" size="small" >查询</el-button>
+            <el-button type="primary" @click="list()" size="primary" >查询</el-button>
 <!--            <el-button @click="resetSearch()" size="small" >重置</el-button>-->
           </el-form-item>
         </el-form>
@@ -47,9 +47,9 @@
           <vxe-column type="checkbox" width="40px"></vxe-column>
           <vxe-column title="部门" align="left" field="name" tree-node></vxe-column>
         </vxe-table>
-      <span slot="footer" class="dialog-footer">
-      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
-      <el-button size="small" type="primary" v-if="method != 'view'" @click="getOffice()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+      <span slot="footer" class="dialog-footer" style="float: right">
+      <el-button size="primary" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="primary" type="primary" v-if="method != 'view'" @click="getOffice()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
     </span>
     </el-dialog>
   </div>

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

@@ -726,6 +726,9 @@ export default {
 		// Process_1702434644158 嘉溢-发票审核
 		// Process_1702435147188 嘉溢-发票作废
 		// Process_1702534302878 嘉溢-请假申请
+		// Process_1702881896933 嘉溢-入职申请
+		// Process_1702978612585 嘉溢-离职申请
+		// Process_1703038650206 嘉溢-交接申请
 
 		// 驳回
 		reject(vars) {
@@ -789,7 +792,10 @@ export default {
 				this.procDefId.includes('Process_1702277270803') ||
 				this.procDefId.includes('Process_1702434644158') ||
 				this.procDefId.includes('Process_1702435147188') ||
-				this.procDefId.includes('Process_1702534302878')
+				this.procDefId.includes('Process_1702534302878') ||
+				this.procDefId.includes('Process_1702881896933') ||
+				this.procDefId.includes('Process_1702978612585') ||
+				this.procDefId.includes('Process_1703038650206')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {

+ 9 - 12
src/views/jy/daily/MeetingRoomForm.vue

@@ -8,8 +8,8 @@
 			<el-row  :gutter="15">
 				<el-col :span="12">
 					<el-form-item label="标题" prop="title"
-								  :rules="[ ]">
-						<el-input v-model="inputForm.title" ></el-input>
+								  :rules="[ {required: true, message:'标题不能为空', trigger:'blur'}]">
+						<el-input v-model="inputForm.title" class="m-2" placeholder="请输入会议标题" clearable></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
@@ -24,9 +24,10 @@
 							placeholder="请选择日期"
 							:disabled-date="disableDate"
 							:size="default"
+							:clearable="true"
 							@change="checkTime"
 						/>
-						<el-select v-model="inputForm.startTime" placeholder="请选择时间" style="width:50%;">
+						<el-select v-model="inputForm.startTime" placeholder="请选择时间" style="width:50%;" clearable>
 							<el-option
 								v-for="item in dateList"
 								:disabled="item.disabled"
@@ -42,7 +43,7 @@
 								  :rules="[
 							 {required: true, message:'会议时长不能为空', trigger:'blur'}
 							]">
-						<el-select style="width:100%;" v-model="inputForm.duration" class="m-2" placeholder="请选择" size="large" clearable>
+						<el-select style="width:100%;" v-model="inputForm.duration" class="m-2" placeholder="请选择" clearable>
 							<el-option   label="30分钟" value="30"></el-option>
 							<el-option   label="1小时" value="1"></el-option>
 							<el-option   label="2小时" value="2"></el-option>
@@ -248,14 +249,6 @@
 				console.log('5',this.inputForm)
 				if (status === 'save') {
 					// 暂存
-					if (this.commonJS.isEmpty(this.inputForm.startDate)|| this.commonJS.isEmpty(this.inputForm.startTime)) {
-						this.$message.error('请选择会议开始时间')
-						this.loading = false
-					}
-					if (this.commonJS.isEmpty(this.inputForm.duration)) {
-						this.$message.error('请选择会议时长')
-						this.loading = false
-					}
 					this.loading = true
 					this.inputForm.status = '1'
 					this.meetingRoomServie.saveForm(this.inputForm).then((data) => {
@@ -274,6 +267,10 @@
 						this.$message.error('请选择会议时长')
 						this.loading = false
 					}
+					if (this.commonJS.isEmpty(this.inputForm.title)) {
+						this.$message.error('请输入会议标题')
+						this.loading = false
+					}
 					// 送审  待审核
 					this.inputForm.status = '2'
 				} else if (status === 'agree') {

+ 19 - 8
src/views/jy/drive/DriveApplyForm.vue

@@ -358,14 +358,23 @@
 					if (valid) {
 						this.loading = true
 						console.log('form',this.inputForm)
-						this.driveService.saveForm(this.inputForm).then((data) => {
-							callback(data.businessTable, data.businessId, this.inputForm)
-							this.$refs.inputForm.resetFields()
-							this.loading = false
-						}).catch(() => {
-							this.$refs.inputForm.resetFields()
-							this.loading = false
-						})
+						if (this.commonJS.isNotEmpty(this.inputForm.useMen)) {
+							this.driveService.checkUseMen(this.inputForm.useMen).then((data)=>{
+								if (data === false){
+									this.$message.error('只能选择本部门员工')
+									this.loading = false
+									return
+								}
+								this.driveService.saveForm(this.inputForm).then((data) => {
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.$refs.inputForm.resetFields()
+									this.loading = false
+								}).catch(() => {
+									this.$refs.inputForm.resetFields()
+									this.loading = false
+								})
+							})
+						}
 					} else {
 						this.loading = false
 					}
@@ -495,6 +504,8 @@
 				// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
 			},
 
+
+
 		}
 
 	}

+ 3 - 3
src/views/jy/drive/DriveList.vue

@@ -5,11 +5,11 @@
 			<el-form-item label="用车项目" prop="projectName">
 				<el-input :limit="1" @focus="openProgramPageForm" placeholder="请填写项目名称" :readonly="true" :modelValue="searchForm.projectName"/>
 			</el-form-item>
-			<el-form-item v-if="showHideItem" label="用车人员" prop="useMen">
+			<el-form-item  label="用车人员" prop="useMen">
 				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
 									 :readonly="true" :modelValue="searchForm.useMen"
 									 @update:modelValue='(value) => {searchForm.useMen = value}'></UserSelectSignatory>			</el-form-item>
-			<el-form-item v-if="showHideItem" label="申请人" prop="createById">
+			<el-form-item  label="申请人" prop="createById">
 				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
 									 :readonly="true" :modelValue="searchForm.createById"
 									 @update:modelValue='(value) => {searchForm.createById = value}'></UserSelectSignatory>			</el-form-item>
@@ -96,8 +96,8 @@
 								<el-button  size="small" text type="primary"  @click="adminEdit(scope.row)">修改</el-button>
 							</div>
 							<div v-else>
-								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
 								<el-button v-if="(scope.row.status === '0'||scope.row.status === '1'|| scope.row.status === '3')" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
+								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
 								<!--              当前申请人撤回-->
 								<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.status==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
 

+ 3 - 3
src/views/jy/driveInfo/DriveInfoDia.vue

@@ -60,9 +60,9 @@
 					@page-change="currentChangeHandle">
 				</vxe-pager>
 			</div>
-			<span slot="footer" class="dialog-footer">
-      			<el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
-				<el-button size="small" type="primary" v-if="method != 'view'" @click="getDrive()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			<span slot="footer" class="dialog-footer" style="float: right">
+      			<el-button size="primary" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+				<el-button size="primary" type="primary" v-if="method != 'view'" @click="getDrive()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
    	 		</span>
 		</el-dialog>
 	</div>

+ 381 - 0
src/views/jy/humanResources/DimissionForm.vue

@@ -0,0 +1,381 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="姓名" prop="creatName"
+								  :rules="[]">
+						<el-input v-model="inputForm.createName" :disabled="true" ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="部门" prop="officeName"
+								  :rules="[]">
+						<el-input v-model="inputForm.officeName" :disabled="true" ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="离职时间" prop="dimissionDate"
+								  :rules="[
+								  {required: true, message:'离职时间不能为空', trigger:'blur'}]">
+						<el-date-picker
+							style="width: 100%"
+							v-model="inputForm.dimissionDate"
+							type="date"
+							format="YYYY-MM-DD"
+							value-format="YYYY-MM-DD"
+							placeholder="选择日期"
+							@change="checkTime"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="离职原因" prop="reason"
+								  :rules="[{required: true, message:'离职原因不能为空', trigger:'blur'}]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入原因"  maxlength="500"  style="width:100%" v-model="inputForm.reason" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import DimissionService from '@/api/jy/DimissionService'
+	import { ElDatePicker } from 'element-plus';
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					id: '',
+					createName:this.$store.state.user.name,
+					officeName:this.$store.state.user.office.name,
+					dimissionDate:'',
+					reason: '',
+					files: [], // 附件信息
+					procInsId: '',
+
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+				days:'',
+
+			}
+		},
+		DimissionService:null,
+		commonApi: null,
+		created () {
+			this.dimissionService=new DimissionService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			UserSelectSignatory,
+			UpLoadComponent,
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm={
+					id: '',
+					createName:'',
+					officeName:'',
+					dimissionDate:'',
+					reason: '',
+					files: [], // 附件信息
+					procInsId: '',
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.dimissionService.queryById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							this.days=data.days
+							this.inputForm.files=data.files
+							console.log('s',this.inputForm)
+							if (this.status === 'audit' || this.status === 'taskFormDetail') {
+								method = 'view'
+							}
+							console.log('me',method)
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'jyHoliday',null,null,null,null,null)
+							this.loading = false
+						})
+
+					}
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.dimissionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.dimissionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+							this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((da)=>{
+								if (this.commonJS.isNotEmpty(da)) {
+									if (da === '公司领导审核') {
+										this.inputForm.status = '5'
+									}
+								}
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.inputForm=JSON.stringify(this.inputForm)
+								this.dimissionService.updateStatusById(param).then(() => {
+									callback(data.businessTable, data.businessId, this.inputForm,data.days)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.dimissionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.dimissionService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm,data.days)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+
+					if (this.commonJS.isEmpty(this.inputForm.dimissionDate)){
+						this.$message.error('请选择离职时间')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.reason)){
+						this.$message.error('请输入离职原因')
+						this.loading = false
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.inputForm=JSON.parse(JSON.stringify(this.inputForm))
+						this.dimissionService.saveForm(this.inputForm).then((data) => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:'',
+					createByName:'',
+					createDate:'',
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.dimissionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.dimissionService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.dimissionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.dimissionService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 585 - 0
src/views/jy/humanResources/DimissionList.vue

@@ -0,0 +1,585 @@
+<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 v-if="showHideItem" label="创建人" prop="createById">
+				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
+									 :readonly="true" :modelValue="searchForm.createById"
+									 @update:modelValue='(value) => {searchForm.createById = value}'></UserSelectSignatory>			</el-form-item>
+			<el-form-item v-if="showHideItem"  prop="officeId" label="部门">
+				<SelectTree
+					ref="officeTree"
+					:props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+					:url="`/system-server/sys/office/treeData?type=2`"
+					:value="searchForm.officeId"
+					size="default"
+					:accordion="true"
+					@getValue="(value) => {searchForm.officeId=value}"/>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="离职时间" prop="dates">
+				<el-date-picker
+					placement="bottom-start"
+					format="YYYY-MM-DD"
+					value-format="YYYY-MM-DD"
+					v-model="searchForm.dates"
+					type="daterange"
+					range-separator="至"
+					start-placeholder="开始日期"
+					end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
+
+
+			<el-form-item>
+				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('dimission:add')" :disabled="isAdmin" type="primary" icon="el-icon-plus" @click="add()">新建</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
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="160" align="center" title="姓名" field="createName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="离职时间" field="dimissionDate"></vxe-column>
+					<vxe-column min-width="160" align="center" title="离职原因" field="reason"></vxe-column>
+					<vxe-column min-width="160" align="center" title="部门" field="officeName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
+					<vxe-column  min-width="150px" align="center" title="申请状态" field="status" fixed="right">
+						<template #default="scope">
+							<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '未登记')}} </el-button>
+						</template>
+					</vxe-column>
+					<vxe-column  min-width="150px" align="center" title="交接状态" field="heirStatus" fixed="right">
+						<template #default="scope">
+							<el-button @click="detailHeir(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.heirStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.heirStatus, '未登记')}} </el-button>
+						</template>
+					</vxe-column>
+					<vxe-column title="操作" width="150px" fixed="right" align="center">
+						<template  #default="scope">
+							<div v-if="isAdmin">
+								<el-button text type="primary" size="small" v-if="scope.row.type==='0' || scope.row.type==='5'" @click="del(scope.row.id)">删除</el-button>
+								<el-button  size="small" text type="primary"  @click="adminEdit(scope.row)">修改</el-button>
+							</div>
+							<div v-else>
+<!--								<el-button v-if="hasPermission('dimission:edit') "  size="small" text type="primary"  @click="adminEdit(scope.row)">修改</el-button>-->
+								<el-button text type="primary" size="small" v-if="hasPermission('dimission:del') && scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
+								<el-button v-if="hasPermission('dimission:edit')&&(scope.row.status === '0'||scope.row.status === '1'|| scope.row.status === '3')" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
+								<!--              当前申请人撤回-->
+								<el-button v-if="hasPermission('dimission:edit') && scope.row.createById === $store.state.user.id && scope.row.status==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
+
+								<el-button v-if="hasPermission('dimission:edit') && scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
+								<el-button v-if="hasPermission('dimission:edit') && scope.row.status === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
+
+								<el-button v-if="scope.row.status === '5'&&(scope.row.heirStatus === undefined ||scope.row.heirStatus === '' ||scope.row.heirStatus === null ||scope.row.heirStatus === '0' || scope.row.heirStatus === '1' || scope.row.heirStatus==='3')&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="heir(scope.row)">交接申请</el-button>
+								<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.heirStatus==='2'" text type="primary" size="small" @click="rebackHeir(scope.row)">交接撤回</el-button>
+
+								<el-button v-if="scope.row.heirStatus==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examineHeir(scope.row)">交接审核</el-button>
+								<el-button v-if="scope.row.heirStatus === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjustHeir(scope.row)">交接驳回调整</el-button>
+							</div>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+
+			</div>
+		</div>
+	<EntryDia ref="entryDia" @refreshList="refreshList"></EntryDia>
+	</div>
+
+</template>
+
+<script>
+	import UserSelect from '@/components/userSelect'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import DimissionService from '@/api/jy/DimissionService'
+	import taskService from '@/api/flowable/taskService'
+	import processService from '@/api/flowable/processService'
+	import userService from '@/api/sys/userService'
+	import pick from 'lodash.pick'
+	import SupplierChooseForm from '@/views/materialManagement/supplier/SupplierChooseForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import EntryDia from './EntryDia'
+	export default {
+		data () {
+			return {
+				dialogTableVisible:false,
+				searchVisible: true,
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				num: 0,
+				searchForm: {
+					officeId: '',
+					createById: '',
+					dates:[],
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				tableKey: '',
+				loading: false,
+				processDefinitionId: '',
+				procDefKey: '',
+				processDefinitionIdHeir:'',
+				procDefKeyHeir: '',
+				isAdmin: false,
+				create: '',
+				gridData:[],
+				typeData:[]
+			}
+		},
+		DimissionService:null,
+		created () {
+			this.dimissionService=new DimissionService()
+		},
+		components: {
+			SelectTree,
+			UserSelect,
+			SupplierChooseForm,
+			UserSelectSignatory,
+			EntryDia,
+
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.createName = this.$store.state.user.name
+				return this.$store.state.user
+			}
+		},
+		mounted () {
+			this.refreshList()
+		},
+		activated () {
+			this.refreshList()
+		},
+		methods: {
+			showHide () {
+				if (this.showHideItem === false) {
+					this.showHideItem = true
+					this.showHideIcon = 'el-icon-arrow-up'
+					this.showHideName = '隐藏'
+				} else {
+					this.showHideItem = false
+					this.showHideIcon = 'el-icon-arrow-down'
+					this.showHideName = '展示'
+				}
+			},
+			// 新增
+			add () {
+				// 读取流程表单
+				let tabTitle = `发起流程【嘉溢-离职申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-离职申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/jy/humanResources/DimissionList'
+						}
+					})
+				})
+			},
+			// 修改
+			edit (row) {
+				let tabTitle = `发起流程【嘉溢-离职申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-离职申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					businessId: row.id,
+					businessTable: 'staff_dimission',
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: row.id,
+							businessTable: 'staff_dimission',
+							isShow: false,
+							routePath: '/jy/humanResources/DimissionList'
+						}
+					})
+				})
+			},
+			// 查看
+			view (row) {
+				this.$refs.entryDia.init('view',row.id);
+
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.dimissionService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('x',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.tableKey = Math.random()
+					this.loading = false
+				})
+				this.checkIsAdmin()
+				processService.getByName('嘉溢-离职申请').then((data) => {
+					console.log('data',data)
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionId = data.id
+						this.procDefKey = data.key
+					}
+				})
+				processService.getByName('嘉溢-交接申请').then((data) => {
+					console.log('data',data)
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionIdHeir = data.id
+						this.procDefKeyHeir = 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.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.dimissionService.delete(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.searchForm.projectId = '' // 重置时清空项目id
+				this.refreshList()
+			},
+
+			// 查看修改流程结果
+			detail (row) {
+				if (row.status !== '0' && row.status !== '1') {
+					this.dimissionService.queryById(row.id).then((da)=>{
+						// eslint-disable-next-line eqeqeq
+						taskService.getTaskDef({
+							procInsId: row.procInsId,
+							procDefId: this.processDefinitionId
+						}).then((data) => {
+							this.$router.push({
+								path: '/flowable/task/TaskFormDetail',
+								query: {
+									...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+									isShow: 'false',
+									readOnly: true,
+									title: '离职申请' + '流程详情',
+									formTitle: '离职申请' + '流程详情',
+									businessId: row.id,
+									status: 'reback',
+									method: 'view'
+								}
+							})
+						})
+					})
+				}
+			},
+			// 撤回入库修改
+			reback (row) {
+				this.$confirm(`确定要撤回该申请吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.dimissionService.queryById(row.id).then((data) => {
+						if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.$message.error('数据已发生改变或不存在,请刷新数据')
+							this.refreshList()
+						} else {
+							processService.revokeProcIns(row.procInsId).then((data) => {
+								let form = {type: '3', id: row.id}
+								this.dimissionService.updateStatusById(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				this.dimissionService.queryById(row.id).then((data) => {
+					if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核
+			examine (row) {
+				this.dimissionService.queryById(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/humanResources/DimissionList',   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+
+			adminEdit(row){
+				this.$refs.entryDia.init('edit',row.id);
+			},
+
+			//发起交接申请
+			heir (row) {
+				let tabTitle = `发起流程【嘉溢-交接申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-交接申请]`
+				let status = 'startAndHold'
+				if (row.heirStatus === '3') {
+					status = 'startAndClose'
+				} else if (row.heirStatus === '4') {
+					status = 'reapplyFlag'
+				}
+				taskService.getTaskDef({ procDefId: this.processDefinitionIdHeir,
+					businessId: row.heirId,
+					businessTable: 'staff_heir'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionIdHeir,
+							procDefKey: this.procDefKeyHeir,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: row.heirId,
+							businessTable: 'staff_heir',
+							isShow: false,
+							status: status,
+							routePath: '/jy/humanResources/DimissionList'
+						}
+					})
+				})
+			},
+			// 查看修改流程结果
+			detailHeir (row) {
+				if (row.heirStatus !== '0' && row.heirStatus !== '1') {
+					this.dimissionService.findHeirById(row.heirId).then((da)=>{
+						// eslint-disable-next-line eqeqeq
+						taskService.getTaskDef({
+							procInsId: row.procInsIdHeir,
+							procDefId: this.processDefinitionIdHeir
+						}).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.heirId,
+									status: 'reback',
+									method: 'view'
+								}
+							})
+						})
+					})
+				}
+			},
+			// 撤回交接申请
+			rebackHeir (row) {
+				this.$confirm(`确定要撤回该申请吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.dimissionService.findHeirById(row.heirId).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.$message.error('数据已发生改变或不存在,请刷新数据')
+							this.refreshList()
+						} else {
+							processService.revokeProcIns(row.procInsIdHeir).then((data) => {
+								let form = {status: '3', id: row.heirId}
+								this.dimissionService.updateHeirStatusById(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjustHeir (row) {
+				this.dimissionService.findHeirById(row.heirId).then((data) => {
+					if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todoHeir(row)
+					}
+				})
+			},
+			// 审核
+			examineHeir (row) {
+				this.dimissionService.findHeirById(row.heirId).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todoHeir(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todoHeir (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskIdHeir
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/humanResources/DimissionList',   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+
+
+
+		}
+	}
+</script>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1015 - 0
src/views/jy/humanResources/EntryDia.vue


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1001 - 0
src/views/jy/humanResources/EntryForm.vue


+ 480 - 0
src/views/jy/humanResources/EntryList.vue

@@ -0,0 +1,480 @@
+<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="name">
+				<el-input v-model="searchForm.name" placeholder="请输入姓名" clearable></el-input>
+			</el-form-item>
+			<el-form-item label="手机号" prop="mobilePhone">
+				<el-input v-model="searchForm.mobilePhone" placeholder="请输入手机号" clearable></el-input>
+			</el-form-item>
+			<el-form-item label="员工类型" prop="onJobStatus">
+				<el-select v-model="searchForm.onJobStatus" placeholder="请选择" style="width:100%;" clearable>
+					<el-option
+						v-for="item in $dictUtils.getDictList('on_job_status')"
+						:key="item.value"
+						:label="item.label"
+						:value="item.value">
+					</el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item label="员工状态" prop="loginFlag">
+				<el-select v-model="searchForm.loginFlag" placeholder="请选择" style="width:100%;" clearable>
+					<el-option value="1" label="正常"></el-option>
+					<el-option value="0" label="冻结"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="创建人" prop="createById">
+				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
+									 :readonly="true" :modelValue="searchForm.createById"
+									 @update:modelValue='(value) => {searchForm.createById = value}'></UserSelectSignatory>			</el-form-item>
+			<el-form-item v-if="showHideItem"  prop="officeId" label="部门">
+				<SelectTree
+					ref="officeTree"
+					:props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+					:url="`/system-server/sys/office/treeData?type=2`"
+					:value="searchForm.officeId"
+					size="default"
+					:accordion="true"
+					@getValue="(value) => {searchForm.officeId=value}"/>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="创建时间" prop="createDates">
+				<el-date-picker
+					placement="bottom-start"
+					format="YYYY-MM-DD"
+					value-format="YYYY-MM-DD"
+					v-model="searchForm.createDates"
+					type="daterange"
+					range-separator="至"
+					start-placeholder="开始日期"
+					end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
+
+
+			<el-form-item>
+				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('entry:add')" :disabled="isAdmin" type="primary" icon="el-icon-plus" @click="add()">新建</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
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="160" align="center" title="姓名" field="name"></vxe-column>
+					<vxe-column min-width="160" align="center" title="手机号" field="mobilePhone"></vxe-column>
+					<vxe-column min-width="160" align="center" title="部门" field="officeName"></vxe-column>
+					<vxe-column  min-width="150px" align="center" title="员工类型" field="onJobStatus" fixed="right">
+						<template #default="scope">
+							{{ $dictUtils.getDictLabel("on_job_status", scope.row.onJobStatus, '-') }}						</template>
+					</vxe-column>
+					<vxe-column min-width="160" align="center" title="角色" field="roleName"></vxe-column>
+					<vxe-column min-width="150px" title="状态" field="loginFlag" sortable>
+						<template #default="{ row }">
+							<el-tag v-if="row.loginFlag === '1'" type="success">正常</el-tag>
+							<el-tag v-else-if="row.loginFlag === '0'" type="danger">冻结</el-tag>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="160" align="center" title="创建人" field="createName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
+					<vxe-column  min-width="150px" align="center" title="申请状态" field="type" fixed="right">
+						<template #default="scope">
+							<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.type, '未登记')}} </el-button>
+						</template>
+					</vxe-column>
+					<vxe-column title="操作" width="150px" fixed="right" align="center">
+						<template  #default="scope">
+							<div v-if="isAdmin">
+								<el-button text type="primary" size="small" v-if="scope.row.type==='0' || scope.row.type==='5'" @click="del(scope.row.id)">删除</el-button>
+								<el-button  size="small" text type="primary"  @click="adminEdit(scope.row)">修改</el-button>
+							</div>
+							<div v-else>
+								<el-button v-if="hasPermission('entry:edit') "  size="small" text type="primary"  @click="adminEdit(scope.row)">修改</el-button>
+								<el-button text type="primary" size="small" v-if="hasPermission('entry:del') && scope.row.type==='0' || scope.row.type==='1'|| scope.row.type==='3'" @click="del(scope.row.id)">删除</el-button>
+								<el-button v-if="hasPermission('entry:edit')&&(scope.row.type === '0'||scope.row.type === '1'|| scope.row.type === '3')" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
+								<!--              当前申请人撤回-->
+								<el-button v-if="hasPermission('entry:edit') && scope.row.createById === $store.state.user.id && scope.row.type==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
+
+								<el-button v-if="hasPermission('entry:edit') && scope.row.type==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
+								<el-button v-if="hasPermission('entry:edit') && scope.row.type === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
+							</div>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+
+			</div>
+		</div>
+	<EntryDia ref="entryDia" @refreshList="refreshList"></EntryDia>
+	</div>
+
+</template>
+
+<script>
+	import UserSelect from '@/components/userSelect'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import EntryService from '@/api/jy/EntryService'
+	import taskService from '@/api/flowable/taskService'
+	import processService from '@/api/flowable/processService'
+	import userService from '@/api/sys/userService'
+	import pick from 'lodash.pick'
+	import SupplierChooseForm from '@/views/materialManagement/supplier/SupplierChooseForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import EntryDia from './EntryDia'
+	export default {
+		data () {
+			return {
+				dialogTableVisible:false,
+				searchVisible: true,
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				num: 0,
+				searchForm: {
+					officeId: '',
+					createById: '',
+					createDates:[],
+					name:'',
+					mobilePhone:'',
+					onJobStatus:'',
+					loginFlag:'',
+
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				tableKey: '',
+				loading: false,
+				processDefinitionId: '',
+				procDefKey: '',
+				isAdmin: false,
+				create: '',
+				gridData:[],
+				typeData:[]
+			}
+		},
+		EntryService:null,
+		created () {
+			this.entryService=new EntryService()
+		},
+		components: {
+			SelectTree,
+			UserSelect,
+			SupplierChooseForm,
+			UserSelectSignatory,
+			EntryDia,
+
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.createName = this.$store.state.user.name
+				return this.$store.state.user
+			}
+		},
+		mounted () {
+			this.refreshList()
+		},
+		activated () {
+			this.refreshList()
+		},
+		methods: {
+			showHide () {
+				if (this.showHideItem === false) {
+					this.showHideItem = true
+					this.showHideIcon = 'el-icon-arrow-up'
+					this.showHideName = '隐藏'
+				} else {
+					this.showHideItem = false
+					this.showHideIcon = 'el-icon-arrow-down'
+					this.showHideName = '展示'
+				}
+			},
+			// 新增
+			add () {
+				// 读取流程表单
+				let tabTitle = `发起流程【嘉溢-入职申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-入职申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/jy/humanResources/EntryList'
+						}
+					})
+				})
+			},
+			// 修改
+			edit (row) {
+				let tabTitle = `发起流程【嘉溢-入职申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-入职申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					businessId: row.id,
+					businessTable: 'staff_user_info',
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: row.id,
+							businessTable: 'staff_user_info',
+							isShow: false,
+							routePath: '/jy/humanResources/EntryList'
+						}
+					})
+				})
+			},
+			// 查看
+			view (row) {
+				this.$refs.entryDia.init('view',row.id);
+
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.entryService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('x',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.tableKey = Math.random()
+					this.loading = false
+				})
+				this.checkIsAdmin()
+				processService.getByName('嘉溢-入职申请').then((data) => {
+					console.log('data',data)
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionId = data.id
+						this.procDefKey = 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.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.entryService.delete(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.searchForm.projectId = '' // 重置时清空项目id
+				this.refreshList()
+			},
+
+			// 查看修改流程结果
+			detail (row) {
+				if (row.status !== '0' && row.status !== '1') {
+					this.entryService.queryById(row.id).then((da)=>{
+						// eslint-disable-next-line eqeqeq
+						taskService.getTaskDef({
+							procInsId: row.procInsId,
+							procDefId: this.processDefinitionId
+						}).then((data) => {
+							this.$router.push({
+								path: '/flowable/task/TaskFormDetail',
+								query: {
+									...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+									isShow: 'false',
+									readOnly: true,
+									title: '入职申请' + '流程详情',
+									formTitle: '入职申请' + '流程详情',
+									businessId: row.id,
+									status: 'reback',
+									method: 'view'
+								}
+							})
+						})
+					})
+				}
+			},
+			// 撤回入库修改
+			reback (row) {
+				this.$confirm(`确定要撤回该申请吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.entryService.queryById(row.id).then((data) => {
+						if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.$message.error('数据已发生改变或不存在,请刷新数据')
+							this.refreshList()
+						} else {
+							processService.revokeProcIns(row.procInsId).then((data) => {
+								let form = {type: '3', id: row.id}
+								this.entryService.updateStatusById(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				this.entryService.queryById(row.id).then((data) => {
+					if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核
+			examine (row) {
+				this.entryService.queryById(row.id).then((data) => {
+					if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/humanResources/EntryList',   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+
+			adminEdit(row){
+				this.$refs.entryDia.init('edit',row.id);
+			},
+
+
+
+
+		}
+	}
+</script>

+ 405 - 0
src/views/jy/humanResources/HeirForm.vue

@@ -0,0 +1,405 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="交接人" prop="heir" :rules="[
+                        {required: true, message:'交接人不能为空', trigger:'change'}
+               ]">
+						<el-select :disabled="isLeader " v-model="inputForm.heir" placeholder="请选择交接人" style="width: 100%;" clearable>
+							<el-option
+								v-for="item in userList"
+								:key="item.id"
+								:label="item.name"
+								:value="item.id">
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-row  :gutter="15">
+				<el-divider content-position="left"><i class="el-icon-document"></i>
+					项目进度信息
+				</el-divider>
+				<el-col :span="24">
+					<vxe-table
+						border
+						:footer-method="footerMethod2"
+						show-overflow
+						show-footer
+						ref="baseTable"
+						:key="baseKey"
+						class="vxe-table-element"
+						:data="inputForm.processList"
+						style="margin-left: 5em"
+						@cell-click=""
+						@edit-closed=""
+						keep-source
+						:readonly="true"
+						highlight-current-row
+						:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
+					>
+						<vxe-table-column field="projectName" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
+							<template v-slot:edit="scope">
+								<el-input  :disabled="true" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.projectName"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="no" align="center" title="报告号" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" :readonly="true" placeholder="请填写报告号" v-model="scope.row.no"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column  field="projectLeader" align="center" title="项目负责人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.projectLeader"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column  field="officeName" align="center" title="部门" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写部门" v-model="scope.row.officeName"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column  field="process" align="center" title="当前项目进度" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.process"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="processTime" align="center" title="进度完成时间" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写创建时间" v-model="scope.row.processTime"/>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+		</el-form>
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import DimissionService from '@/api/jy/DimissionService'
+	import { ElDatePicker } from 'element-plus';
+	import SelectUserTree from '@/views/utils/treeUserSelect'
+	import userService from "@/api/sys/userService";
+	import CommonApi from '@/api/cw/common/CommonApi'
+	// import UpLoadComponent from '@/views/common/UpLoadComponent'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					id: '',
+					createById:'',
+					heir:'',
+					processList:[],
+					procInsId:'',
+				},
+				baseKey: '',
+				keyWatch: '',
+				programRow:'',
+				userList:[],
+				isLeader:false,
+
+			}
+		},
+		DimissionService:null,
+		commonApi: null,
+		created () {
+			this.dimissionService=new DimissionService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			// UpLoadComponent,
+			SelectUserTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					// this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					// this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				console.log('method',this.method)
+				this.inputForm={
+					id: '',
+					heir:'',
+					processList:[],
+					procInsId:'',
+				}
+				this.inputForm.id = id
+				console.log('this.inputForm.id', this.inputForm.id)
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					// this.$refs.uploadComponent.clearUpload()
+						this.dimissionService.findHeirById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							userService.getUserByOffice(data.createById).then((da)=>{
+								this.userList=da
+							})
+							this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((da)=> {
+								if (this.commonJS.isNotEmpty(da)) {
+									if (da === '部门主任审核' && this.status === 'audit') {
+										this.isLeader = false
+									}else {
+										if (this.status === 'taskFormDetail' || this.status === 'audit' || da !== '部门主任审核' || method === 'view'){
+											this.isLeader = true
+										}
+									}
+								}
+							})
+							if (this.commonJS.isEmpty(this.inputForm.createById)){
+								this.inputForm.createById = data.createById
+							}
+							console.log('s',this.inputForm)
+							// this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'monthly',null,null,null,null,null)
+							this.loading = false
+						})
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.dimissionService.findHeirById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.dimissionService.findHeirById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((da)=>{
+							if (this.commonJS.isNotEmpty(da)) {
+								if (da === '人事审核') {
+									this.inputForm.status = '5'
+								}
+							}
+							let param = {status: this.inputForm.status, id: this.inputForm.id}
+							this.inputForm=JSON.stringify(this.inputForm)
+							this.dimissionService.updateHeirStatusById(this.inputForm).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.dimissionService.findHeirById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					// if (this.$refs.uploadComponent.checkProgress()) {
+					// 	this.loading = false
+					// 	return
+					// }
+					// this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.dimissionService.saveHeir(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm,data.days)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+
+					if (this.commonJS.isEmpty(this.inputForm.heir)){
+						this.$message.error('请选择交接人')
+						this.loading = false
+					}
+					// if (this.$refs.uploadComponent.checkProgress()) {
+					// 	this.loading = false
+					// 	return
+					// }
+					// this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.inputForm=JSON.parse(JSON.stringify(this.inputForm))
+						this.dimissionService.saveHeir(this.inputForm).then((data) => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.dimissionService.findHeirById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.dimissionService.updateHeirStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.dimissionService.findHeirById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.dimissionService.updateHeirStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+			close() {
+				this.inputForm = {
+					id: '',
+					heir:'',
+					processList:[],
+					procInsId:'',
+				}
+				this.visible = false
+			},
+
+
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 32 - 8
src/views/jy/notify/NotifyList.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="page">
-      <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <el-form :inline="true" v-if="searchVisible" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
             <!-- 搜索框-->
 		     <el-form-item label="标题" prop="title">
                 <el-input  size="default"  v-model="searchForm.title" placeholder="标题" clearable></el-input>
@@ -18,7 +18,7 @@
         <el-form-item label="发布者" prop="createName">
 			<UserSelect :limit='1' v-model="searchForm.createName" @update:modelValue='(value, label) => {searchForm.createById = value}'></UserSelect>
         </el-form-item>
-        <el-form-item label="创建时间" prop="createDates">
+        <el-form-item v-if="showHideItem" label="创建时间" prop="createDates">
           <el-date-picker
 			  placement="bottom-start"
 			  format="YYYY-MM-DD HH:mm:ss"
@@ -32,6 +32,7 @@
           </el-date-picker>
         </el-form-item>
           <el-form-item>
+			  <el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
             <el-button   size="default" type="primary" @click="refreshList()"  icon="el-icon-search">查询</el-button>
             <el-button @click="resetSearch()"  size="default" icon="el-icon-refresh-right">重置</el-button>
           </el-form-item>
@@ -42,6 +43,16 @@
           <el-button v-if="hasPermission('jy_notify:info:add')" type="primary" size="default" icon="el-icon-plus" @click="start()">新建</el-button>
 <!--          <el-button v-if="hasPermission('notify:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.notifyTable && $refs.notifyTable.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
@@ -109,12 +120,9 @@
             </template>
           </vxe-column>
             <vxe-column  width="100px" align="center" fixed="right" title="状态" field="status" >
-              <template #default="scope">
-                <el-button  type="text" @click="detail(scope.row)" effect="dark" size="mini"
-                            :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')">
-                  {{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}}
-                </el-button>
-              </template>
+				<template #default="scope">
+					<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '未登记')}} </el-button>
+				</template>
             </vxe-column>
 
             <vxe-column title="操作" width="120px" fixed="right" align="center">
@@ -157,6 +165,10 @@
   export default {
     data () {
       return {
+		  searchVisible: true,
+		  showHideItem: false,
+		  showHideIcon: 'el-icon-arrow-down',
+		  showHideName: '展示',
         searchForm: {
           title: '',
           type: '',
@@ -197,6 +209,17 @@
       }
     },
     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 = '展示'
+			}
+		},
       // 获取数据列表
       refreshList () {
         this.loading = true
@@ -367,6 +390,7 @@
 		},
       // 查看项目登记流程结果
       detail (row) {
+			console.log('row',row)
         if (row.status !== '0' && row.status !== '1') {
           // eslint-disable-next-line eqeqeq
           taskService.getTaskDef({

+ 8 - 22
src/views/jy/notify/NotifyTaskForm.vue

@@ -187,7 +187,7 @@
   import NotifyService from '@/api/jy/NotifyService'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import WangEditor from '@/components/editor/WangEditor'
-  import OfficeTreeSelect from '@/components/officeTreeSelect'
+  import OfficeTreeSelect from '@/components/JyOfficeTreeSelect'
   import UserSelectButton from '@/components/userSelectButton/DividerButton'
   import UserService from '@/api/sys/UserService'
   import UpLoadComponent from '@/views/common/UpLoadComponent'
@@ -281,6 +281,7 @@
         this.keyWatch = keyWatch
       },
       init (method, id) {
+      	console.log('id',id)
         this.method = method
         this.inputForm = {
           createBy: {
@@ -308,12 +309,13 @@
 			pageSize: 3,
         }
         this.inputForm.id = id
+		  console.log('this.inputForm.id ',this.inputForm.id )
         this.loading = false
         this.$nextTick(() => {
           this.$refs.inputForm.resetFields()
           this.loading = true
           this.$refs.contentEditor.clear()
-          this.notifyService.query({id: this.inputForm.id, isSelf: false,size:this.inputForm.pageSize}).then((data) => {
+          this.notifyService.queryById(this.inputForm.id).then((data) => {
             this.$refs.uploadComponent.clearUpload()
             this.inputForm = this.recover(this.inputForm, data)
             this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
@@ -370,11 +372,7 @@
         this.doSubmit('start', callback)
       },
       agreeForm (callback) {
-        this.notifyService.query({
-          id: this.inputForm.id,
-          isSelf: false,
-		  size: this.inputForm.pageSize,
-        }).then((data) => {
+        this.notifyService.queryById(this.inputForm.id).then((data) => {
           if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
@@ -384,11 +382,7 @@
         })
       },
       reapplyForm (callback) {
-        this.notifyService.query({
-          id: this.inputForm.id,
-          isSelf: false,
-			size:this.inputForm.pageSize
-        }).then((data) => {
+        this.notifyService.queryById(this.inputForm.id).then((data) => {
           if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
@@ -488,11 +482,7 @@
           throw new Error()
         } else {
           if (type === 'reject' || type === 'reback') {
-            this.notifyService.query({
-              id: this.inputForm.id,
-              isSelf: false,
-				size:this.inputForm.pageSize
-            }).then((data) => {
+            this.notifyService.queryById(this.inputForm.id).then((data) => {
               if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
                 this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
                 throw new Error()
@@ -515,11 +505,7 @@
               }
             })
           } else if (type === 'hold') {
-            this.notifyService.query({
-              id: this.inputForm.id,
-              isSelf: false,
-				size:this.inputForm.pageSize
-            }).then((data) => {
+            this.notifyService.queryById(this.inputForm.id).then((data) => {
               if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
                 this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
                 throw new Error()

+ 3 - 3
src/views/jy/project/ContractForm.vue

@@ -12,8 +12,8 @@
       <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 label="合同名称" prop="contractName">
+            <el-input v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
           </el-form-item>
           <el-form-item label="委托方" prop="primaryLinkman">
             <el-input v-model="searchForm.primaryLinkman" placeholder="请输入委托方" clearable></el-input>
@@ -112,7 +112,7 @@
         dataList: [],
         searchForm: {
           primaryLinkman: '',
-          name: '',
+			contractName: '',
           contractDates: [],
           type: '',
           contractType: '',

+ 5 - 5
src/views/jy/project/OutInstanceForm.vue

@@ -525,10 +525,10 @@
 			},
 			async updateStatusById (type, callback) {
 				this.loading = true
-				if (await this.$refs.uploadComponent.checkProgress()) {
-					this.loading = false
-					throw new Error()
-				} else {
+				// if (await this.$refs.uploadComponent.checkProgress()) {
+				// 	this.loading = false
+				// 	throw new Error()
+				// } else {
 					if (type === 'reject' || type === 'reback') {
 						this.projectInfoService.findByIdOut(this.inputForm.id).then((data) => {
 							if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
@@ -582,7 +582,7 @@
 							}
 						})
 					}
-				}
+				// }
 			},
 			// 下载一级校审
 			downloadFirstAuditTpl () {

+ 5 - 5
src/views/jy/project/ProjectArchiveForm.vue

@@ -486,10 +486,10 @@
 			},
 			async updateStatusById (type, callback) {
 				this.loading = true
-				if (await this.$refs.uploadComponent.checkProgress()) {
-					this.loading = false
-					throw new Error()
-				} else {
+				// if (await this.$refs.uploadComponent.checkProgress()) {
+				// 	this.loading = false
+				// 	throw new Error()
+				// } else {
 					if (type === 'reject' || type === 'reback') {
 						this.projectInfoService.findByIdArchive(this.inputForm.id).then((data) => {
 							if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
@@ -543,7 +543,7 @@
 							}
 						})
 					}
-				}
+				// }
 			},
 			// 下载一级校审
 			downloadFirstAuditTpl () {

+ 7 - 2
src/views/jy/project/ProjectAuditForm.vue

@@ -102,7 +102,7 @@
 					<el-form-item label="审核人" prop="auditPeople"
 								  :rules="[
 			 ]">
-						<UserSelectSignatory style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'|| method ==='view'"
+						<UserSelectSignatory style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'|| method ==='view' || isEdit"
 											 :readonly="true" :limit='1' :modelValue="inputForm.auditPeople"
 											 @update:modelValue='(value) => {inputForm.auditPeople = value}'></UserSelectSignatory>
 					</el-form-item>
@@ -205,7 +205,8 @@
 					projectId:''
 				},
 				keyWatch: '',
-				tabName:''
+				tabName:'',
+				isEdit:false
 
 			}
 		},
@@ -317,6 +318,10 @@
 							this.inputForm.projectLeader=data.jyProjectList.leader
 							this.inputForm.projectId=data.projectId
 
+							if (this.commonJS.isNotEmpty(this.inputForm.auditPeople)){
+								this.isEdit=true
+							}
+
 							if (this.commonJS.isNotEmpty(data.initialAuditOpinion)){
 								this.inputForm.initialAuditOpinion=data.initialAuditOpinion.replace(/<br\/>/g, "\n")
 							}

+ 5 - 5
src/views/jy/project/ProjectEiaForm.vue

@@ -476,10 +476,10 @@
 			},
 			async updateStatusById (type, callback) {
 				this.loading = true
-				if (await this.$refs.uploadComponent.checkProgress()) {
-					this.loading = false
-					throw new Error()
-				} else {
+				// if (await this.$refs.uploadComponent.checkProgress()) {
+				// 	this.loading = false
+				// 	throw new Error()
+				// } else {
 					if (type === 'reject' || type === 'reback') {
 						this.projectInfoService.findByIdEia(this.inputForm.id).then((data) => {
 							if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
@@ -533,7 +533,7 @@
 							}
 						})
 					}
-				}
+				// }
 			},
 			// 下载一级校审
 			downloadFirstAuditTpl () {

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

@@ -14,15 +14,16 @@
 						</el-radio-group>
 					</el-form-item>
 				</el-col>
-				<el-row  :gutter="15" v-show="inputForm.contractStatus === '1'">
-					<el-divider content-position="left"><i class="el-icon-document"></i>
-						<span style="color: red;border-top: 20px">*</span>选择合同
-					</el-divider>
+				<el-divider content-position="left"><i class="el-icon-document"></i>
+					<span style="color: red;border-top: 20px">*</span>选择合同
+				</el-divider>
+				<div style="width: 100%;"  v-show="inputForm.contractStatus === '1'">
+					<el-row  :gutter="15">
 					<el-col :span="12" >
 						<el-form-item label="选择合同" prop="contractName"
 									  :rules="[
                  ]">
-							<el-input size="large" :readonly="true" @focus="openContractForm()" v-model="inputForm.contractName" placeholder="请选择合同">
+							<el-input :readonly="true" @focus="openContractForm()" v-model="inputForm.contractName" placeholder="请选择合同">
 								<el-button slot="append" icon="el-icon-search" @click="openContractForm()"></el-button>
 							</el-input>
 						</el-form-item>
@@ -67,7 +68,8 @@
 							<el-input :disabled="true" v-model="inputForm.contractType" placeholder="请填写合同类型(小类)"></el-input>
 						</el-form-item>
 					</el-col>
-				</el-row>
+					</el-row>
+				</div>
 
 			</el-row>
 			<el-divider content-position="left"><i class="el-icon-document"></i> 项目基本情况信息</el-divider>
@@ -759,6 +761,8 @@
 						console.log('3',this.inputForm)
 						this.projectInfoService.saveForm(this.inputForm).then((data) => {
 							this.inputForm.id = data.businessId
+							let processTitle = `${this.$store.state.user.name} 发起了 ${this.inputForm.name} - ${data.no} ` + `[嘉溢-项目登记]`
+							this.inputForm.title = processTitle
 							callback(data.businessTable, data.businessId, this.inputForm)
 							this.loading = false
 						}).catch(() => {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 23 - 23
src/views/jy/project/ProjectList.vue


+ 247 - 0
src/views/jy/project/ProjectMemberList.vue

@@ -0,0 +1,247 @@
+<template>
+  <div class="page">
+    <el-form v-if="searchVisible" :inline="true" class="query-form m-b-10"  ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="项目名称" prop="name">
+        <el-input v-model="searchForm.name" placeholder="请输入项目名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="项目编号" prop="no">
+        <el-input v-model="searchForm.no" placeholder="请输入项目编号" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="创建时间" prop="createDates">
+        <el-date-picker
+          placement="bottom-start"
+          format="YYYY-MM-DD HH:mm:ss"
+          value-format="YYYY-MM-DD HH:mm:ss"
+          v-model="searchForm.createDates"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" @click="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" 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
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          ref="projectTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+<!--          <vxe-column type="checkbox" width="60" ></vxe-column>-->
+			<vxe-column min-width="170" align="center" title="项目名称" field="name" >
+				<template #default="scope">
+					<el-link  type="primary" :underline="false" v-if="hasPermission('jy_project:info:view')" @click="view(scope.row)">{{scope.row.name}}</el-link>
+					<el-link  type="primary" :underline="false" v-else-if="hasPermission('jy_project:info:view')" @click="view(scope.row)">{{scope.row.name}}</el-link>
+					<span v-else>{{scope.row.name}}</span>
+				</template>
+			</vxe-column>
+			<vxe-column min-width="100" align="center" title="项目编号" field="no"></vxe-column>
+			<vxe-column min-width="180" align="center" title="合同名称" field="contractName">
+				<template #default="scope">
+					<!--							<el-link  type="primary" :underline="false" v-if="scope.row.contractStatus ==='1'" @click="viewContract(scope.row.contractId)">{{scope.row.contractName}}</el-link>-->
+					<el-link  type="primary" :underline="false" v-if="commonJS.isNotEmpty(scope.row.contractId)&&commonJS.isNotEmpty(scope.row.contractName)" @click="viewContract(scope.row.contractId)">{{scope.row.contractName}}</el-link>
+					<span v-else  style="color: red">暂无合同</span>
+				</template>
+			</vxe-column>
+			<vxe-column min-width="100" align="center" title="负责人" field="projectLeader"></vxe-column>
+			<vxe-column min-width="180" align="center" title="主委托方" field="primaryLinkman"></vxe-column>
+			<vxe-column min-width="160" align="center" title="成员数量" field="memberCount"></vxe-column>
+			<vxe-column min-width="100" align="center" title="创建人" field="createById"></vxe-column>
+			<vxe-column min-width="120" align="center" title="创建日期" field="createTime"></vxe-column>
+          <vxe-column title="操作" width="70px" fixed="right" align="center">
+            <template  #default="scope">
+<!--              项目创建人、项目组成员、管理员可编辑-->
+<!--              <el-button v-if="hasPermission('cwProjectRecords:edit')&&(scope.row.createBy.id === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.id))" type="text" @click="edit(scope.row.id)">编辑</el-button>-->
+<!--              项目创建人、管理员、项目现场负责人可编辑-->
+              <el-button v-if="hasPermission('jy_project:info:edit')&&
+              (
+              isAdmin ||
+              $store.state.user.id === scope.row.createBy ||
+              $store.state.user.id === scope.row.projectLeader
+              )" text type="primary"  size="small" @click="edit(scope.row.id)">编辑</el-button>
+
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+    </div>
+    <ProjectDia ref="projectRecordsForm" @refreshList="refreshList"></ProjectDia>
+    <ContractAddForm ref="contractNameForm"></ContractAddForm>
+    <ProjectMembersEditForm ref="projectMembersEditForm" @refreshList="refreshList"></ProjectMembersEditForm>
+  </div>
+</template>
+
+<script>
+  import ProjectInfoService from "@/api/jy/ProjectInfoService";
+  import ProjectDia from './ProjectDia'
+  import userService from '@/api/sys/UserService'
+  import ContractAddForm from '../workContractInfo/ContractAddForm'
+  import ProjectMembersEditForm from './ProjectMembersEditForm'
+  export default {
+    data () {
+      return {
+		  searchVisible: true,
+        searchForm: {
+		  projectLeader: '',
+          no: '',
+          name: '',
+          createDates: [],
+          status: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        haveProjectIds: ''
+      }
+    },
+	  ProjectInfoService:null,
+    created () {
+		this.projectInfoService=new ProjectInfoService()
+    },
+    components: {
+		ProjectDia,
+		ContractAddForm,
+      ProjectMembersEditForm
+    },
+    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: {
+      // 新增
+      add () {
+        this.$refs.projectRecordsAddForm.init('add', 'false')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.projectTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.projectMembersEditForm.init('edit', id)
+      },
+      // 查看
+      view (row) {
+        this.$refs.projectRecordsForm.init('view', row.id,row.auditId1, row.auditId2, row.auditId3,row.sealId,row.outInstanceId,row.reportsSubmitId,row.archiveId,row.eiaId)
+      },
+      viewContract (id) {
+        this.$refs.contractNameForm.init('view', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        userService.is().then((data) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+		  this.projectInfoService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+			  this.projectInfoService.getHaveProjectIds().then((data) => {
+            if (this.commonJS.isNotEmpty(data)) {
+              this.haveProjectIds = data.map(i => {
+                if (this.commonJS.isNotEmpty(i)) {
+                  return i
+                }
+              }).join(',')
+            }
+          })
+			  console.log('ss',data.records)
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+        this.checkIsAdmin()
+      },
+      // 当前页
+      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()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      }
+    }
+  }
+</script>

+ 417 - 0
src/views/jy/project/ProjectMembersEditForm.vue

@@ -0,0 +1,417 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+    <el-row>
+      <el-col :span="24">
+        <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="15">
+                <el-col :span="24">
+                  <el-form-item label="项目名称" prop="name"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.name" placeholder="请填写项目名称" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="项目编号" prop="no"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.no" placeholder="请填写项目编号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="现场负责人" prop="projectLeader"
+                                :rules="[
+                   ]">
+                    <UserSelect :disabled="true" :limit='1' :modelValue="inputForm.projectLeader" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="合同名称" prop="contractName"
+                                :rules="[
+                 ]">
+                    <el-input :disabled="true" v-model="inputForm.contractName" placeholder="请选择合同"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="委托人" prop="primaryLinkman"
+                                :rules="[
+                 ]">
+                    <el-input :disabled="true" v-model="inputForm.primaryLinkman" placeholder="请填写委托人"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+        </el-form>
+          <el-divider content-position="left"><i class="el-icon-document"></i> 项目组成员明细</el-divider>
+            <el-row :gutter="15">
+<!--              <el-button type="primary" style="margin-bottom: 15px" :disabled="method==='view'" @click="insertEvent('members')">-->
+<!--                选择成员-->
+<!--              </el-button>-->
+              <UserSelectButton ref="userSelectButton" @getValue="(value) => {addMembers(value)}"></UserSelectButton>
+            </el-row>
+            <el-row :gutter="15" style="margin-top: 15px">
+                  <el-form :disabled="method==='view'">
+                    <vxe-table
+                      border
+                      show-overflow
+                      show-footer
+                      :column-config="{resizable: true}"
+                      ref="membersTable"
+                      :key="tableKeyMembers"
+                      class="vxe-table-element"
+                      :data="inputForm.projectMembers"
+                      style=""
+                      highlight-current-row
+                    >
+                      <vxe-table-column min-width="176" align="center" field="name" title="姓名"></vxe-table-column>
+                      <vxe-table-column min-width="176" align="center" field="officeName" title="部门"></vxe-table-column>
+                      <vxe-table-column min-width="176" align="center" field="roleName" title="角色"></vxe-table-column>
+                      <vxe-table-column min-width="176" align="center" field="mobile" title="手机号"></vxe-table-column>
+                      <vxe-table-column min-width="176" align="center" field="status" title="状态">
+                        <template #default="scope">
+                          <span v-if="scope.row.status === '0'" style="color: #67C23A">正常</span>
+                          <span v-else>移除</span>
+                        </template>
+                      </vxe-table-column>
+
+                      <vxe-table-column align="center" title="操作" min-width="176">
+                        <template #default="scope">
+                          <el-button v-if="scope.row.status === '0'" type="info" @click="removeDate(scope.$rowIndex)">移除</el-button>
+                          <el-button v-if="scope.row.status === '1'" type="primary" @click="aliveDate(scope.$rowIndex)">恢复</el-button>
+                          <el-button type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'members')">删除</el-button>
+                        </template>
+                      </vxe-table-column>
+                    </vxe-table>
+                  </el-form>
+                </el-row>
+      </el-col>
+    </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' || method === 'add'" type="primary" icon="el-icon-circle-check" @click="save()">确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+    <WorkContractChooseCom ref="workContractChooseCom"></WorkContractChooseCom>
+    <WorkClientChooseForm ref="workClientChooseForm"></WorkClientChooseForm>
+    <CwProjectBusinessTypeListForm ref="cwProjectBusinessTypeListForm"></CwProjectBusinessTypeListForm>
+    <ContractNameForm ref="contractNameForm"></ContractNameForm>
+  </div>
+</template>
+
+<script>
+  import UserSelect from '@/components/userSelect'
+  import ProjectInfoService from "@/api/jy/ProjectInfoService";
+  import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
+  import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
+  import UserSelectButton from '@/components/userSelectButton'
+  import userService from '@/api/sys/UserService'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        loading: false,
+        inputForm: {
+			id: '', // 主键值(新增不传,修改必传)
+			no: '', // 编号(新增不传,修改必传)
+			contractId: '', // 合同id
+			contractName: '', // 合同名称
+			client: '', // 委托方
+			primaryLinkman: '', // 委托方名称
+			amount: '', // 合同金额
+			contractType: '', // 合同类别
+			name: '', // 项目名称
+			projectPlace: '', // 项目所在地
+			status: '', // 状态
+			procInsId: '', // 流程id
+			processDefinitionId: '', // 流程信息
+			projectMembers: [], // 成员列表
+			files: [], // 附件信息
+			contractStatus: '',//合同情况
+			contractType:'',//合同类型(小类)
+			contractTypeFirst:'', //合同类型(大类)
+			buildPlace:'', // 建设地点
+			createByName:this.$store.state.user.name, //创建人
+			createDate: this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), //创建时间
+			projectOverview:'', //工程概况
+			special:'', //特殊要求
+			projectLeader:'', //项目负责人
+			clientList:[], //委托方联系人
+			files: [], // 附件信息
+			formReadOnly:''
+        },
+        keyWatch: '',
+        activeName: 'client',
+        tableKey: '',
+        tableKeyClient: '1',
+        tableKeyContact: '2',
+        tableKeyMembers: '3',
+        visible: false,
+        status: [
+          {label: '正常', value: '0'},
+          {label: '移除', value: '1'}
+        ]
+      }
+    },
+    enterpriseSearchService: null,
+	  ProjectInfoService:null,
+    created () {
+      this.enterpriseSearchService = new EnterpriseSearchService()
+		this.projectInfoService=new ProjectInfoService()
+    },
+    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: {
+      UserSelect,
+      WorkClientChooseForm,
+      UserSelectButton
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      forUpdate () {
+        this.$forceUpdate()
+      },
+      init (method, id) {
+        if (method === 'view') {
+          this.title = '项目组成员详情'
+        } else if (method === 'edit') {
+          this.title = '项目组成员编辑'
+        }
+        this.visible = true
+        this.activeName = 'client'
+        this.method = method
+        this.inputForm = {
+			id: '', // 主键值(新增不传,修改必传)
+			no: '', // 编号(新增不传,修改必传)
+			contractId: '', // 合同id
+			contractName: '', // 合同名称
+			client: '', // 委托方
+			primaryLinkman: '', // 委托方名称
+			amount: '', // 合同金额
+			contractType: '', // 合同类别
+			name: '', // 项目名称
+			projectPlace: '', // 项目所在地
+			status: '', // 状态
+			procInsId: '', // 流程id
+			processDefinitionId: '', // 流程信息
+			projectMembers: [], // 成员列表
+			files: [], // 附件信息
+			contractStatus: '',//合同情况
+			contractType:'',//合同类型(小类)
+			contractTypeFirst:'', //合同类型(大类)
+			buildPlace:'', // 建设地点
+			createByName:this.$store.state.user.name, //创建人
+			createDate: this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), //创建时间
+			projectOverview:'', //工程概况
+			special:'', //特殊要求
+			projectLeader:'', //项目负责人
+			clientList:[], //委托方联系人
+			files: [], // 附件信息
+			formReadOnly:''
+        }
+        this.inputForm.id = id
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+			this.projectInfoService.findById(this.inputForm.id).then((data) => {
+				console.log(data)
+				this.inputForm = this.recover(this.inputForm, data)
+				this.inputForm.projectMembers=data.projectMembers
+				this.inputForm.clientList=data.clientList
+				this.inputForm.createByName=data.createById
+				this.inputForm.createDate=data.createTime
+				this.inputForm.amount=data.contractAmount
+				if (this.commonJS.isEmpty(this.inputForm.projectMembers)) {
+					this.inputForm.projectMembers = []
+				} else {
+					this.inputForm.projectMembers.forEach((member, index) => {
+						userService.queryDetailById(member.userId).then((data) => {
+							member.name = this.commonJS.isEmpty(data.name) ? '' : data.name
+							member.mobile = this.commonJS.isEmpty(data.mobile) ? '' : data.mobile
+							member.officeName = this.commonJS.isEmpty(data.officeDTO) ? '' : this.commonJS.isEmpty(data.officeDTO.name) ? '' : data.officeDTO.name
+							member.roleName = this.commonJS.isEmpty(data.roleList) ? '' : data.roleList.map(role => { return this.commonJS.isEmpty(role.name) ? '' : role.name }).join(',')
+							this.tableKeyMembers = Math.random()
+						})
+					})
+				}
+            this.loading = false
+          })
+        })
+      },
+      // 表单提交
+      save () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+			  this.projectInfoService.updateMembers(this.inputForm).then((data) => {
+              this.$emit('refreshList')
+              this.loading = false
+              this.close()
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: ''
+          },
+          remarks: '',
+          projectNumber: '',
+          projectName: '',
+          officeId: '',
+          projectMoney: '',
+          auditYear: '',
+          planStartDate: '',
+          planEndDate: '',
+          projectMasterId: '',
+          projectLeaderId: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          cwProjectClientInfoDTOList: [],
+          contractName: '',
+          contractAmount: '',
+          contractNum: '',
+          payerSubject: '',
+          paymentMethod: '',
+          contractId: '',
+          businessType: '',
+          riskLevel: '',
+          businessTypeName: '',
+          planDate: [],
+          realHeader: '',
+          clientContactsName: '',
+          reportType: '',
+          cwProjectClientContactDTOList: [],
+          cwProjectMembersDTOList: []
+        }
+        // this.$refs.uploadComponent.clearUpload()
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      },
+      tabHandleClick (event) {
+        // console.log(event)
+      },
+      // 新增
+      // eslint-disable-next-line no-dupe-keys
+      insertEvent (type) {
+        if (type === 'contact') {
+          let d = {
+            contactFirst: '',
+            contactSecond: '',
+            email: '',
+            fax: '',
+            name: '',
+            officeId: '',
+            position: '',
+            remarks: '',
+            sex: ''
+          }
+          if (this.commonJS.isEmpty(this.inputForm.cwProjectClientContactDTOList)) {
+            this.inputForm.cwProjectClientContactDTOList = []
+          }
+          this.$refs.contactTable.insertAt(d)
+          this.inputForm.cwProjectClientContactDTOList.push(d)
+          this.tableKeyContact = Math.random()
+        }
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'members') {
+          this.$refs.membersTable.remove(row)
+          this.inputForm.projectMembers.splice(rowIndex, 1)
+        }
+      },
+      removeDate (index) {
+        this.inputForm.projectMembers[index].status = '1'
+      },
+      aliveDate (index) {
+        this.inputForm.projectMembers[index].status = '0'
+      },
+      addMembers (value) {
+        if (this.commonJS.isNotEmpty(value)) {
+          userService.queryDetailList(value).then((data) => {
+            data.forEach(item => {
+              this.inputForm.projectMembers.forEach(member => {
+                if (this.commonJS.isEmpty(item.name) || member.name === item.name) {
+                  this.$message.error('成员“ ' + item.name + ' ”已存在')
+                  throw new Error('成员“ ' + item.name + ' ”已存在')
+                }
+              })
+            })
+            data.forEach(item => {
+              let param = {
+                userId: item.id,
+                status: '0',
+                name: this.commonJS.isEmpty(item.name) ? '' : item.name,
+                mobile: this.commonJS.isEmpty(item.mobile) ? '' : item.mobile,
+                officeName: this.commonJS.isEmpty(item.officeDTO) ? '' : this.commonJS.isEmpty(item.officeDTO.name) ? '' : item.officeDTO.name,
+                roleName: this.commonJS.isEmpty(item.roleList) ? '' : item.roleList.map(role => { return this.commonJS.isEmpty(role.name) ? '' : role.name }).join(',')
+              }
+              this.inputForm.projectMembers.push(param)
+			  this.tableKeyMembers = Math.random()
+            })
+          })
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>

+ 1 - 1
src/views/jy/workContractInfo/JyWorkContractList.vue

@@ -119,7 +119,7 @@
 					</vxe-column>
 					<vxe-column min-width="200px" title="客户名称" field="primaryLinkman" align="center"></vxe-column>
 					<vxe-column min-width="100px" title="合同金额(元)" field="contractAmount" align="center"></vxe-column>
-					<vxe-column min-width="100px" title="创建人" field="createById" align="center"></vxe-column>
+					<vxe-column min-width="100px" title="创建人" field="createName" align="center"></vxe-column>
 					<vxe-column min-width="150px" title="创建时间" field="createTime" align="center"></vxe-column>
 					<vxe-column min-width="100px"  title="状态" field="filedType" fixed="right" align="center">
 						<template #default="scope">

+ 18 - 5
src/views/materialManagement/userSeal/SignetList.vue

@@ -100,13 +100,13 @@
                 <el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='5'" @click="del(scope.row.id)">删除</el-button>
               </div>
               <div v-else>
-				  <el-button v-if="scope.row.status === '1'|| scope.row.status === '3'" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
-				  <el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
+				  <el-button v-if="(scope.row.status === '1'|| scope.row.status === '3') &&(scope.row.createById === $store.state.user.id ||haveProjectIds.includes(scope.row.projectId))" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
+				  <el-button text type="primary" size="small" v-if="(scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3')&&(scope.row.createById === $store.state.user.id ||haveProjectIds.includes(scope.row.projectId))" @click="del(scope.row.id)">删除</el-button>
 				  <!--              当前申请人撤回-->
-                <el-button v-if="scope.row.createById === $store.state.user.id && scope.row.status==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
+                <el-button v-if="(scope.row.createById === $store.state.user.id ||haveProjectIds.includes(scope.row.projectId)) && (scope.row.status==='2')" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
 
                 <el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
-                <el-button v-if="scope.row.status === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
+                <el-button v-if="scope.row.status === '4'&&(scope.row.createById === $store.state.user.id ||haveProjectIds.includes(scope.row.projectId))" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
               </div>
             </template>
           </vxe-column>
@@ -157,6 +157,7 @@
   import SupplierChooseForm from '@/views/materialManagement/supplier/SupplierChooseForm'
   import dictService from "@/api/sys/dictService";
   import ProjectDia from '../../jy/project/ProjectDia.vue'
+  import ProjectInfoService from "@/api/jy/ProjectInfoService";
 export default {
     data () {
       return {
@@ -187,12 +188,15 @@ export default {
         isAdmin: false,
         create: '',
 		  gridData:[],
-		  typeData:[]
+		  typeData:[],
+		  haveProjectIds:'',
       }
     },
 	SignetService: null,
+	ProjectInfoService:null,
     created () {
       this.signetService = new SignetService()
+		this.projectInfoService=new ProjectInfoService()
 		this.getTypeList()
     },
     components: {
@@ -307,6 +311,15 @@ export default {
           this.tableKey = Math.random()
           this.loading = false
         })
+		  this.projectInfoService.getHaveProjectIds().then((data) => {
+			  if (this.commonJS.isNotEmpty(data)) {
+				  this.haveProjectIds = data.map(i => {
+					  if (this.commonJS.isNotEmpty(i)) {
+						  return i
+					  }
+				  }).join(',')
+			  }
+		  })
         // this.materialManagementService.list({
         //   'current': this.tablePage.currentPage,
         //   'size': this.tablePage.pageSize,