Browse Source

项目修改调整

sangwenwei 6 months ago
parent
commit
61b29060f8

+ 9 - 1
src/views/jy/project/OutInstanceForm.vue

@@ -119,7 +119,7 @@
 					class="vxe-table-element"
 					style="margin-left: 5em"
 					:key="tableKey"
-
+					@table-mounted="expandAllRows"
 					:row-config="{keyField: 'id'}"
 					:column-config="{resizable: true}"
 					:tree-config="{transform: true, expandAll: true}"
@@ -310,6 +310,11 @@
 			OSSSerivce,
 		},
 		methods: {
+			expandAllRows() {
+				this.$nextTick(() => {
+					this.$refs.clientTable.expandAll();
+				});
+			},
 			getKeyWatch (keyWatch) {
 				this.keyWatch = keyWatch
 			},
@@ -377,6 +382,9 @@
 
 						this.projectInfoService.getAttachmentList(this.inputForm.projectId,this.inputForm.id).then((data) => {
 							this.tableData = data
+							this.$nextTick(() => {
+								this.$refs.clientTable.expandAll();
+							});
 						})
 
 						// this.$refs.uploadComponent.newUpload(method, this.inputForm.fileList, 'jyProjectOut', null, '附件', null, null, null)

+ 10 - 1
src/views/jy/project/ProjectArchiveForm.vue

@@ -139,7 +139,8 @@
 					:column-config="{resizable: true}"
 					:tree-config="{transform: true, expandAll: true}"
 					:key="tableKey"
-					:data="tableData">
+					:data="tableData"
+					@table-mounted="expandAllRows">
 					<vxe-column field="name" title="文件要求" width="260px" tree-node>
 						<template #default="scope">
 							<span style="font-weight: bold"
@@ -331,6 +332,11 @@
 			OSSSerivce,
 		},
 		methods: {
+			expandAllRows() {
+				this.$nextTick(() => {
+					this.$refs.clientTable.expandAll();
+				});
+			},
 			getKeyWatch (keyWatch) {
 				this.keyWatch = keyWatch
 			},
@@ -406,6 +412,9 @@
 						})
 						this.projectInfoService.getAttachmentList(data.projectId,this.inputForm.id).then((data) => {
 							this.tableData = data
+							this.$nextTick(() => {
+								this.$refs.clientTable.expandAll();
+							});
 						})
 
 						// this.$refs.uploadComponent.newUpload(method, this.inputForm.fileList, 'jyProjectArchive', null, '附件', null, null, null)

+ 17 - 7
src/views/jy/project/ProjectEdit.vue

@@ -18,7 +18,7 @@
 											:rules="[
 							   {required: true, message:'请选择合同情况', trigger:'blur'}
                  ]">
-								  <el-radio-group v-model="inputForm.contractStatus" @change="changeStatus" class="ml-4">
+								  <el-radio-group v-model="inputForm.contractStatus" @change="changeStatus" :disabled="inputForm.contractStatus == '1'" class="ml-4">
 									  <el-radio label="1" size="large">有合同</el-radio> <el-radio label="0" size="large">无合同</el-radio>
 								  </el-radio-group>
 							  </el-form-item>
@@ -95,7 +95,7 @@
 											:rules="[
                           {required: true, message:'项目名称不能为空', trigger:'blur'}
                  ]">
-								  <el-input maxlength="64" v-model="inputForm.name" placeholder="请输入项目名称" clearable></el-input>
+								  <el-input maxlength="64" :disabled="true" v-model="inputForm.name" placeholder="请输入项目名称" clearable></el-input>
 							  </el-form-item>
 						  </el-col>
 						  <el-col :span="12">
@@ -113,6 +113,7 @@
 									  url="/system-server/sys/area/treeData"
 									  :value="inputForm.projectPlace"
 									  :clearable="true"
+									  :disabled="true"
 									  size="large"
 									  :accordion="true"
 									  @getValue="(value) => {inputForm.projectPlace=value}"
@@ -144,7 +145,7 @@
 							  <el-form-item label="建设地点" prop="buildPlace"
 											:rules="[
                  ]">
-								  <el-input  v-model="inputForm.buildPlace" placeholder="请输入建设地点" clearable></el-input>
+								  <el-input :disabled="true"  v-model="inputForm.buildPlace" placeholder="请输入建设地点" clearable></el-input>
 							  </el-form-item>
 						  </el-col>
 						  <el-col :span="12">
@@ -163,6 +164,7 @@
 									  :url="`/system-server/sys/user/treeUserDataJyOffice?type=2`"
 									  :value="inputForm.projectLeader"
 									  :clearable="true"
+									  :disabled="true"
 									  :accordion="true"
 									  @getValue="(value) => {inputForm.projectLeader=value}"/>
 							  </el-form-item>
@@ -186,14 +188,14 @@
 							  <el-form-item label="工程概况" prop="projectOverview"
 											:rules="[
                  ]">
-								  <el-input type="textarea" v-model="inputForm.projectOverview" maxlength="500" placeholder="请输入工程概况" show-word-limit></el-input>
+								  <el-input :disabled="true" type="textarea" v-model="inputForm.projectOverview" maxlength="500" placeholder="请输入工程概况" show-word-limit></el-input>
 							  </el-form-item>
 						  </el-col>
 						  <el-col :span="24">
 							  <el-form-item label="特殊要求" prop="special"
 											:rules="[
                  ]">
-								  <el-input type="textarea" v-model="inputForm.special" maxlength="500" placeholder="请输入特殊要求" show-word-limit></el-input>
+								  <el-input :disabled="true" type="textarea" v-model="inputForm.special" maxlength="500" placeholder="请输入特殊要求" show-word-limit></el-input>
 							  </el-form-item>
 						  </el-col>
 					  </el-row>
@@ -648,7 +650,7 @@
 						if (this.formReadOnly) {
 							method = 'view'
 						}
-						this.$refs.uploadComponent.newUpload('view', this.inputForm.files, 'jyProject', null, null, null, null, null)
+						this.$refs.uploadComponent.newUpload('edit', this.inputForm.files, 'jyProject', null, null, null, null, null)
 						// this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
 						this.loading = false
 					})
@@ -694,12 +696,20 @@
 		},
 		// 表单提交
 		doSubmit () {
-			console.log('12312321321')
+			console.log('12312321321',this.inputForm.contractStatus)
 			this.loading = true
 			if (this.$refs.uploadComponent.checkProgress()) {
 				this.loading = false
 				return
 			}
+			if (this.inputForm.contractStatus == '1'){
+				if (this.commonJS.isEmpty(this.inputForm.contractName)){
+					this.loading = false
+					this.$message.error('请选择合同')
+					throw new Error()
+				}
+			}
+
 			console.log('this.inputForm', this.inputForm)
 			this.inputForm.files = this.$refs.uploadComponent.getDataList()
 			JSON

+ 10 - 1
src/views/jy/project/ProjectEiaForm.vue

@@ -121,7 +121,8 @@
 					:column-config="{resizable: true}"
 					:tree-config="{transform: true, expandAll: true}"
 					:key="tableKey"
-					:data="tableData">
+					:data="tableData"
+					@table-mounted="expandAllRows">
 					<vxe-column field="name" title="文件要求" width="260px" tree-node>
 						<template #default="scope">
 							<span style="font-weight: bold"
@@ -306,6 +307,11 @@
 			OSSSerivce,
 		},
 		methods: {
+			expandAllRows() {
+				this.$nextTick(() => {
+					this.$refs.clientTable.expandAll();
+				});
+			},
 			getKeyWatch (keyWatch) {
 				this.keyWatch = keyWatch
 			},
@@ -353,6 +359,9 @@
 						this.projectInfoService.getAttachmentList(data.projectId,this.inputForm.id).then((data) => {
 							this.tableData = data
 							console.log("getAttachmentList",this.tableData)
+							this.$nextTick(() => {
+								this.$refs.clientTable.expandAll();
+							});
 						})
 						this.inputForm = this.recover(this.inputForm, data)
 						this.inputForm.contractName=data.jyProjectList.contractName

+ 1 - 1
src/views/jy/reimbursement/ReimbursementForm.vue

@@ -444,7 +444,7 @@
 <script>
 
 	import ReimbursementService from '@/api/jy/ReimbursementService'
-	import ReimbursementApprovalTypeService from '@/api/pubmodules/JyReimbursementApprovalTypeService'
+	import ReimbursementApprovalTypeService from '@/api/jy/JyReimbursementApprovalTypeService'
 	import UpLoadComponent from '@/views/common/UpLoadComponent'
 	import XEUtils from 'xe-utils'
 	import CwReimbursementTypePullForm from '@/views/common/JyReimbursementTypePullForm'