Browse Source

苏州分公司调整

sangwenwei 5 months ago
parent
commit
3da841c938

+ 21 - 7
src/views/cw/fillingbatch/FileForm.vue

@@ -11,7 +11,7 @@
       <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
                label-width="100px" @submit.native.prevent>
 
-		  <el-button  type="primary" :disabled="this.method === 'edit'"   @click="insertEvent" plain>
+		  <el-button  type="primary"   @click="insertEvent" plain>
 			  添加文件信息
 		  </el-button>
 		  <vxe-table
@@ -104,25 +104,38 @@
         this.visible = true
         this.loading = false
         this.$nextTick(() => {
-          if (method === 'edit') { // 修改或者查看
+          // if (method === 'edit') { // 修改或者查看
           	console.log('row',row)
             this.loading = true
             this.$refs.inputForm.resetFields()
 			  if (this.commonJS.isEmpty(this.inputForm.fileList)){
 				  this.inputForm.fileList = []
 			  }
-			  this.$refs.fileTable.insertAt(row)
-            this.inputForm.fileList.push(row)
+				if (this.commonJS.isNotEmpty(row.children)){
+					for (let i = 0; i < row.children.length; i++) {
+						let data = row.children[i]
+						let d = {
+							projectNumber : data.projectNumber,
+							name: data.name,
+							parentId:data.parentId
+						}
+						this.$refs.fileTable.insertAt(d)
+						this.inputForm.fileList.push(d)
+						this.tableKeyFile = Math.random()
+					}
 
+				}
+
+			console.log('this.inputForm.fileList',this.inputForm.fileList)
 			  this.loading = false
-          }
+          // }
         })
       },
       // 表单提交
       doSubmit () {
 		  this.close()
-		  console.log('this.inputForm.fileList',this.inputForm.fileList)
-		  this.$emit('getFile',this.inputForm.fileList)
+		  console.log('this.inputForm.fileList',JSON.parse(JSON.stringify(this.inputForm.fileList)))
+		  this.$emit('getFile',JSON.parse(JSON.stringify(this.inputForm.fileList)),this.inputForm.parentId)
       },
       close () {
         this.$refs.inputForm.resetFields()
@@ -145,6 +158,7 @@
 		removeEvent(row,rowIndex){
 			this.$refs.fileTable.remove(row)
 			this.inputForm.fileList.splice(rowIndex, 1)
+
 		}
     }
   }

+ 49 - 20
src/views/cw/fillingbatch/FillingbatchForm.vue

@@ -121,10 +121,10 @@
 							</vxe-column>
 							<vxe-column title="操作" width="230px" fixed="right" align="center">
 								<template  #default="scope">
-									<el-button  v-if="scope.row.level === '1'" :disabled="status === 'audit' || status === 'taskFormDetail'" text type="primary" @click="add(scope.row)">添加</el-button>
-									<el-button v-if="scope.row.level !== '1'" :disabled="status === 'audit' || status === 'taskFormDetail'" text type="primary" @click="edit(scope.row)">修改</el-button>
+									<el-button  v-if="scope.row.level === '1'" :disabled="status === 'audit' || status === 'taskFormDetail'" text type="primary" @click="add(scope.row)">编辑</el-button>
+<!--									<el-button v-if="scope.row.level !== '1'" :disabled="status === 'audit' || status === 'taskFormDetail'" text type="primary" @click="edit(scope.row)">编辑</el-button>-->
 									<el-button text type="primary" v-if="scope.row.level === '1'"  :disabled ="scope.row.level === '1' && commonJS.isNotEmpty(scope.row.children)" @click="removeEvent(scope.row,scope.$rowIndex)">删除</el-button>
-									<el-button text type="primary" v-if="scope.row.level !== '1'" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="removeChildEvent(scope.row)">删除</el-button>
+<!--									<el-button text type="primary" v-if="scope.row.level !== '1'" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="removeChildEvent(scope.row)">删除</el-button>-->
 								</template>
 							</vxe-column>
 						</vxe-table>
@@ -479,34 +479,63 @@
 				}
 				console.log('row',rows)
 				rows.forEach(item => {
-					let d={
-						reportId: item.reportId,
-						projectNumber : item.projectNumber,
-						name : item.name,
-						no :item.no,
-						parentId :'',
-						level:item.level,
-						id:item.reportId
+					const isExist = this.inputForm.cwFillingbatchProjects.some(existingItem => existingItem.reportId === item.reportId);
+					if (!isExist){
+						let d={
+							reportId: item.reportId,
+							projectNumber : item.projectNumber,
+							name : item.name,
+							no :item.no,
+							parentId :'',
+							level:item.level,
+							id:item.reportId
+						}
+						this.$refs.batchTable.insertAt(d)
+						this.inputForm.cwFillingbatchProjects.push(d)
+						this.tableKeyProject = Math.random()
 					}
-					this.$refs.batchTable.insertAt(d)
-					this.inputForm.cwFillingbatchProjects.push(d)
-					this.tableKeyProject = Math.random()
+
 				})
 				console.log('this.inputForm.cwFillingbatchProjects',this.inputForm.cwFillingbatchProjects)
 			},
 			add(row){
 				this.$refs.fileForm.init('add',row)
 			},
-			getFile(list){
+			getFile(list, parentId){
 				console.log('list',list)
+				console.log('this.inputForm.cwFillingbatchProjects',this.inputForm.cwFillingbatchProjects)
 
-				list.forEach(item=>{
-					if (this.commonJS.isEmpty(item.id)){
-						this.$refs.batchTable.insertAt(item)
-						this.inputForm.cwFillingbatchProjects.push(item)
-						this.tableKeyProject = Math.random()
+				this.inputForm.cwFillingbatchProjects.forEach(item=>{
+					if(item.id == parentId || item.reportId == parentId){
+						item.children = []
 					}
 				})
+				this.inputForm.cwFillingbatchProjects = this.inputForm.cwFillingbatchProjects.filter(item=>{
+					return item.parentId != parentId
+				})
+
+				//重新添加子级
+				list.forEach(item => {
+					console.log('item',item)
+					this.inputForm.cwFillingbatchProjects.forEach(it =>{
+						// 如果 item 需要被作为 parentId 的子节点添加
+						if (it.level == '1' && (item.parentId === it.id || it.reportId == item.parentId)) {
+						// 确保 item 是作为子节点添加
+							let d={
+								projectNumber : item.projectNumber,
+								name : item.name,
+								parentId :item.parentId,
+								children : []
+							}
+							it.children.push(d);  // 添加到父级的子级数组中
+							// 同时也要将子节点添加到 cwFillingbatchProjects
+							this.inputForm.cwFillingbatchProjects.push(d);
+							// 插入表格
+							this.$refs.batchTable.insertAt(d);
+						}
+					})
+				});
+				// inputForm.cwFillingbatchProjects
 				console.log('this.inputForm.cwFillingbatchProjects1',this.inputForm.cwFillingbatchProjects)
 			},
 			removeEvent(row,rowIndex){

+ 1 - 0
src/views/cw/projectRecords/ProjectMembersList.vue

@@ -203,6 +203,7 @@
       // 获取数据列表
       refreshList () {
         this.loading = true
+		  this.searchForm.projectType = '1'
         projectRecordsService.list({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,

File diff suppressed because it is too large
+ 2 - 2
src/views/cw/reportManagement/ReportManagementList2.vue


+ 27 - 17
src/views/cw/reportManagement/reportReview/ReportReviewForm.vue

@@ -116,22 +116,30 @@
 									:rules="[
 										{required: true, message:'审核人员不能为空', trigger:'change'}
                    ]">
-						  <!--						  <UserSelectSignatory style="width: 100%" ref="userSelect1"-->
-						  <!--											   :readonly="true" :limit='1' :modelValue="inputForm.reviewBy"-->
-						  <!--											   @update:modelValue='(value) => {inputForm.reviewBy = value}'></UserSelectSignatory>-->
-						  <SelectUserTree
-							  ref="companyTree"
-							  :props="{
-                  value: 'id',             // ID字段名
-                  label: 'name',         // 显示名称
-                  children: 'children'    // 子级字段名
-                }"
-							  :url="`/system-server/sys/user/treeUserDataAllOffice?type=2`"
-							  :value="inputForm.reviewBy"
-							  :clearable="true"
-							  size="default"
-							  :accordion="true"
-							  @getValue="(value) => {inputForm.reviewBy=value}"/>
+<!--						  						  <UserSelectSignatory style="width: 100%" ref="userSelect1"-->
+<!--						  											   :readonly="true" :limit='1' :modelValue="inputForm.reviewBy"-->
+<!--						  											   @update:modelValue='(value) => {inputForm.reviewBy = value}'></UserSelectSignatory>-->
+<!--						  <SelectUserTree-->
+<!--							  ref="companyTree"-->
+<!--							  :props="{-->
+<!--                  value: 'id',             // ID字段名-->
+<!--                  label: 'name',         // 显示名称-->
+<!--                  children: 'children'    // 子级字段名-->
+<!--                }"-->
+<!--							  :url="`/system-server/sys/user/treeUserDataAllOffice?type=2`"-->
+<!--							  :value="inputForm.reviewBy"-->
+<!--							  :clearable="true"-->
+<!--							  size="default"-->
+<!--							  :accordion="true"-->
+<!--							  @getValue="(value) => {inputForm.reviewBy=value}"/>-->
+						  <el-select  v-model="inputForm.reviewBy" clearable style="width: 100%;">
+							  <el-option
+								  v-for="item in auditUserList"
+								  :key="item.id"
+								  :label="item.name"
+								  :value="item.id">
+							  </el-option>
+						  </el-select>
 					  </el-form-item>
 				  </el-col>
 				  <el-col :span="12">
@@ -662,6 +670,7 @@
 		  	projectLevel:''
 		  },
         keyWatch: '',
+	    auditUserList:[]
       }
     },
     ReportCancellApplyService: null,
@@ -770,7 +779,8 @@
 			  	this.projectData.projectLevel = data.projectLevel
 			  }
             this.inputForm = this.recover(this.inputForm, data)
-
+			  //审核人员列表
+			this.auditUserList = data.auditUserList
 			  if (this.commonJS.isEmpty(this.inputForm.contractCategory)) {
 				  this.inputForm.contractCategory = '1'
 			  }

+ 23 - 14
src/views/cw/reportManagement/reportReview/ReportReviewForm2.vue

@@ -84,19 +84,27 @@
 <!--						  <UserSelectSignatory style="width: 100%" ref="userSelect1"-->
 <!--											   :readonly="true" :limit='1' :modelValue="inputForm.reviewBy"-->
 <!--											   @update:modelValue='(value) => {inputForm.reviewBy = value}'></UserSelectSignatory>-->
-						  <SelectUserTree
-							  ref="companyTree"
-							  :props="{
-                  value: 'id',             // ID字段名
-                  label: 'name',         // 显示名称
-                  children: 'children'    // 子级字段名
-                }"
-							  :url="`/system-server/sys/user/treeUserDataAllOffice?type=2`"
-							  :value="inputForm.reviewBy"
-							  :clearable="true"
-							  size="default"
-							  :accordion="true"
-							  @getValue="(value) => {inputForm.reviewBy=value}"/>
+<!--						  <SelectUserTree-->
+<!--							  ref="companyTree"-->
+<!--							  :props="{-->
+<!--                  value: 'id',             // ID字段名-->
+<!--                  label: 'name',         // 显示名称-->
+<!--                  children: 'children'    // 子级字段名-->
+<!--                }"-->
+<!--							  :url="`/system-server/sys/user/treeUserDataAllOffice?type=2`"-->
+<!--							  :value="inputForm.reviewBy"-->
+<!--							  :clearable="true"-->
+<!--							  size="default"-->
+<!--							  :accordion="true"-->
+<!--							  @getValue="(value) => {inputForm.reviewBy=value}"/>-->
+						  <el-select  v-model="inputForm.reviewBy" clearable style="width: 100%;">
+							  <el-option
+								  v-for="item in auditUserList"
+								  :key="item.id"
+								  :label="item.name"
+								  :value="item.id">
+							  </el-option>
+						  </el-select>
 					  </el-form-item>
 				  </el-col>
 				  <el-col :span="12">
@@ -541,6 +549,7 @@
 			},
         },
         keyWatch: '',
+		  auditUserList:[]
       }
     },
     ReportCancellApplyService: null,
@@ -643,7 +652,7 @@
           this.loading = true
           projectReportService.queryByIdNew(this.inputForm.id).then((data) => {
             this.inputForm = this.recover(this.inputForm, data)
-
+			  this.auditUserList = data.auditUserList
 			  if (this.commonJS.isEmpty(this.inputForm.contractCategory)) {
 				  this.inputForm.contractCategory = '1'
 			  }