Quellcode durchsuchen

签字注师和项目经理可以清空,报告修改按钮样式调整

huangguoce vor 1 Tag
Ursprung
Commit
4d62085cd6

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

@@ -218,11 +218,11 @@
                   <!--                    <UserSelectSignatory style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'"-->
                   <!--										 :readonly="true" :limit='1' :modelValue="inputForm.projectMasterId"-->
                   <!--										 @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelectSignatory>-->
-                  <el-input @blur="changeSignatory1(inputForm.projectMasterName)" @focus="openUserDia2"
-                    v-model="inputForm.projectMasterName" placeholder="请选择项目经理1">
+                  <el-input @blur="changeSignatory1(inputForm.projectMasterName)" @click="openUserDia2"
+                    v-model="inputForm.projectMasterName" placeholder="请选择项目经理1" @clear="clearUser2" clearable>
                     <template #suffix>
                       <el-button style="background-color: white;color: #1b1e25;border-color: white;" type="primary"
-                        slot="append" icon="el-icon-search" @click="openUserDia2">
+                        slot="append" icon="el-icon-search" @click.stop="openUserDia2">
                       </el-button>
                     </template>
                   </el-input>
@@ -234,11 +234,11 @@
                   <!--                    <UserSelectSignatory style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'"-->
                   <!--										 :readonly="true" :limit='1' :modelValue="inputForm.realHeader"-->
                   <!--										 @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelectSignatory>-->
-                  <el-input @blur="changeSignatory2(inputForm.realHeader)" @focus="openUserDia3"
-                    v-model="inputForm.realHeaderName" placeholder="请选择项目经理2">
+                  <el-input @blur="changeSignatory2(inputForm.realHeader)" @click="openUserDia3"
+                    v-model="inputForm.realHeaderName" placeholder="请选择项目经理2" @clear="clearUser3" clearable>
                     <template #suffix>
                       <el-button style="background-color: white;color: #1b1e25;border-color: white;" type="primary"
-                        slot="append" icon="el-icon-search" @click="openUserDia3">
+                        slot="append" icon="el-icon-search" @click.stop="openUserDia3">
                       </el-button>
                     </template>
                   </el-input>
@@ -1140,16 +1140,16 @@ export default {
         }
       })
     },
-    preInvoice(){
-    	if (this.commonJS.isNotEmpty(this.inputForm.isHaveReport) && this.commonJS.isNotEmpty(this.inputForm.projectClassification) && this.commonJS.isNotEmpty(this.inputForm.reportType)){
-    		if (this.inputForm.isHaveReport === '1' && (this.inputForm.projectClassification === '16' || this.inputForm.projectClassification === '17') && this.inputForm.reportType === '10'){
-    			this.ifCheck = false
-    		}else {
-    			this.ifCheck = true
-    		}
-    	}else {
-    		this.ifCheck = true
-    	}
+    preInvoice() {
+      if (this.commonJS.isNotEmpty(this.inputForm.isHaveReport) && this.commonJS.isNotEmpty(this.inputForm.projectClassification) && this.commonJS.isNotEmpty(this.inputForm.reportType)) {
+        if (this.inputForm.isHaveReport === '1' && (this.inputForm.projectClassification === '16' || this.inputForm.projectClassification === '17') && this.inputForm.reportType === '10') {
+          this.ifCheck = false
+        } else {
+          this.ifCheck = true
+        }
+      } else {
+        this.ifCheck = true
+      }
     },
     openUserDia1() {
       this.$refs.userSelect1.init()
@@ -1159,6 +1159,7 @@ export default {
       this.inputForm.projectLeaderId = user[0].id
       this.inputForm.projectLeaderName = user[0].name
     },
+
     openUserDia2() {
       this.$refs.userSelect2.init()
     },
@@ -1167,6 +1168,10 @@ export default {
       this.inputForm.projectMasterId = user[0].id
       this.inputForm.projectMasterName = user[0].name
     },
+    clearUser2() {
+      this.inputForm.projectMasterId = ""
+      this.inputForm.projectMasterName = ""
+    },
     openUserDia3() {
       this.$refs.userSelect3.init()
     },
@@ -1175,6 +1180,10 @@ export default {
       this.inputForm.realHeader = user[0].id
       this.inputForm.realHeaderName = user[0].name
     },
+    clearUser3() {
+      this.inputForm.realHeader = ""
+      this.inputForm.realHeaderName = ""
+    },
   }
 }
 </script>

+ 8 - 8
src/views/cw/reportManagement/ReportManagementList.vue

@@ -325,7 +325,7 @@
 
 					<vxe-column title="操作" width="300px" fixed="right" align="center">
 						<template #default="scope">
-							<div v-if="isAdmin">
+							<span v-if="isAdmin">
 								<el-button v-if="
 									scope.row.reviewStatus === '5' && (
 										(scope.row.signatureType === '1' && (scope.row.status1 === '0' || scope.row.status1 === '1' || scope.row.status1 === '3')) ||
@@ -355,8 +355,8 @@
 								<!-- 撤回报告号申请及其后续所有流程 -->
 								<el-button v-if="scope.row.applyStatus == '5'" text type="primary"
 									@click="rebackApplyAndAll(scope.row)">撤回报告号申请</el-button>
-							</div>
-							<div
+							</span>
+							<span
 								v-else-if="isAdmin === false && scope.row.archiveStatus != '5' && scope.row.status != '7'">
 								<el-button v-if="$dictUtils.getDictValue('report_edit_flag', 'open', '0') == 1" text
 									type="primary" @click="editApprovedAmount(scope.row.id)">审定金额修改</el-button>
@@ -497,11 +497,11 @@
 								<el-button
 									v-if="hasPermission('cw:workContract:filed') && scope.row.createById === $store.state.user.id && scope.row.rebackStatus === '2'"
 									text type="primary" @click="revocation(scope.row)">撤回</el-button>
-							</div>
-							<div v-if="isAdmin === false">
-								<el-button v-if="hasPermission('cwProjectReport:adminEdit')" text type="primary"
-									@click="adminEdit(scope.row.id)">修改</el-button>
-							</div>
+							</span>
+							<span>
+								<el-button style="margin-left: 5px;" v-if="hasPermission('cwProjectReport:adminEdit')"
+									text type="primary" @click="adminEdit(scope.row.id)">修改</el-button>
+							</span>
 						</template>
 					</vxe-column>
 				</vxe-table>

+ 36 - 23
src/views/cw/reportManagement/ReportManagementUpdateForm.vue

@@ -87,8 +87,8 @@
                 <el-form-item label="签字注师1" prop="signatureAnnotator1" :rules="[
                 ]">
                   <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-                  <UserSelect style="width: 100%" ref="userSelect1" :disabled="method === 'view'" :readonly="true"
-                    :limit='1' :modelValue="inputForm.signatureAnnotator1"
+                  <UserSelect :clearable="true" style="width: 100%" ref="userSelect1" :disabled="method === 'view'"
+                    :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1"
                     @update:modelValue='(value) => { changeSignatory1(value) }'></UserSelect>
                   <!--<el-input @blur="changeSignatory1(inputForm.signatureAnnotator1)" @focus="openUserDia1"  v-model="inputForm.signatureAnnotator1Name" placeholder="请选择签字注师1">
 						<template #suffix>
@@ -105,8 +105,8 @@
                 <el-form-item label="签字注师2" prop="signatureAnnotator2" :rules="[
                 ]">
                   <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-                  <UserSelect2 style="width: 100%" ref="userSelect2" :disabled="method === 'view'" :readonly="true"
-                    :limit='1' :modelValue="inputForm.signatureAnnotator2"
+                  <UserSelect2 :clearable="true" style="width: 100%" ref="userSelect2" :disabled="method === 'view'"
+                    :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2"
                     @update:modelValue='(value) => { changeSignatory2(value) }'>
                   </UserSelect2>
                   <!--<el-input @blur="changeSignatory2(inputForm.signatureAnnotator2)" @focus="openUserDia2" v-model="inputForm.signatureAnnotator2Name" placeholder="请选择签字注师2">
@@ -123,8 +123,8 @@
                   { required: true, message: '签字注师1不能为空', trigger: 'blur' }
                 ]">
                   <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
-                  <UserSelect style="width: 100%" ref="userSelect1" :disabled="method === 'view'" :readonly="true"
-                    :limit='1' :modelValue="inputForm.signatureAnnotator1"
+                  <UserSelect :clearable="true" style="width: 100%" ref="userSelect1" :disabled="method === 'view'"
+                    :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1"
                     @update:modelValue='(value) => { changeSignatory1(value) }'>
                   </UserSelect>
                   <!--<el-input @blur="changeSignatory1(inputForm.signatureAnnotator1)" @focus="openUserDia1"  v-model="inputForm.signatureAnnotator1Name" placeholder="请选择签字注师1">
@@ -140,8 +140,8 @@
                   { required: true, message: '签字注师2不能为空', trigger: 'blur' }
                 ]">
                   <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
-                  <UserSelect2 style="width: 100%" ref="userSelect2" :disabled="method === 'view'" :readonly="true"
-                    :limit='1' :modelValue="inputForm.signatureAnnotator2"
+                  <UserSelect2 :clearable="true" style="width: 100%" ref="userSelect2" :disabled="method === 'view'"
+                    :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2"
                     @update:modelValue='(value) => { changeSignatory2(value) }'>
                   </UserSelect2>
                   <!--<el-input @blur="changeSignatory2(inputForm.signatureAnnotator2)" @focus="openUserDia2" v-model="inputForm.signatureAnnotator2Name" placeholder="请选择签字注师2">
@@ -1327,23 +1327,36 @@ export default {
               this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
               this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
 
-              //根据签字注师1的人员id去查是否超过了可选次数
-              userService.findCountById(this.inputForm.signatureAnnotator1).then(res => {
-                if (Number(res.accountantUserCount) >= Number(res.signatureCount)) {
-                  this.$message.error(`签字注师1被选次数不可超过可选次数(${res.signatureCount}次)`)
-                  this.loading = false
-                } else {
-                  this.reportReviewService.save(this.inputForm).then(() => {
-                    projectReportService.saveForm(this.inputForm).then(() => {
-                      this.$emit('refreshList')
-                      this.close()
-                      this.loading = false
-                    }).catch(() => {
-                      this.loading = false
+              if (this.commonJS.isNotEmpty(this.inputForm.signatureAnnotator1)) {
+                //根据签字注师1的人员id去查是否超过了可选次数
+                userService.findCountById(this.inputForm.signatureAnnotator1).then(res => {
+                  if (Number(res.accountantUserCount) >= Number(res.signatureCount)) {
+                    this.$message.error(`签字注师1被选次数不可超过可选次数(${res.signatureCount}次)`)
+                    this.loading = false
+                  } else {
+                    this.reportReviewService.save(this.inputForm).then(() => {
+                      projectReportService.saveForm(this.inputForm).then(() => {
+                        this.$emit('refreshList')
+                        this.close()
+                        this.loading = false
+                      }).catch(() => {
+                        this.loading = false
+                      })
                     })
+                  }
+                })
+              } else {
+                this.reportReviewService.save(this.inputForm).then(() => {
+                  projectReportService.saveForm(this.inputForm).then(() => {
+                    this.$emit('refreshList')
+                    this.close()
+                    this.loading = false
+                  }).catch(() => {
+                    this.loading = false
                   })
-                }
-              })
+                })
+              }
+
             }
           })
           return

+ 3 - 5
src/views/cw/workClientInfo/clientUserSelect/AccountantUserIndex.vue

@@ -3,8 +3,8 @@
 		<label>{{ name }}</label>
 	</template>
 	<template v-else>
-		<el-input placeholder="请选择" readonly :clearable="clearable" :disabled="disabled" style="line-hight: 40px"
-			v-model="name">
+		<el-input placeholder="请选择" :clearable="clearable" @keydown.prevent @clear="selectUsersToInput([])"
+			:disabled="disabled" style="line-hight: 40px" v-model="name">
 			<template #append>
 				<el-button :disabled="disabled" :readonly="readonly" @click="showUserSelect" icon="search"></el-button>
 			</template>
@@ -35,7 +35,7 @@ export default {
 		clearable: {
 			type: Boolean,
 			default: () => {
-				return true;
+				return false;
 			},
 		},
 		readonly: {
@@ -59,8 +59,6 @@ export default {
 			handler(newVal) {
 				this.selectData = [];
 				if (newVal && newVal !== true) {
-					console.log('newVAal', newVal)
-					console.log('进来了')
 					newVal.split(",").forEach((id) => {
 						userService.queryById(id).then((data) => {
 							if (data && data.id !== "") {

+ 85 - 100
src/views/cw/workClientInfo/clientUserSelect/AccountantUserIndex2.vue

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