From 5d36d46434a7f4d23844dc94c34e7716eae172a8 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 24 四月 2024 11:43:02 +0800 Subject: [PATCH] 员工信息 员工编号调整为不可修改 --- src/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails.vue | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails.vue b/src/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails.vue index 0e4ac96..40e89bd 100644 --- a/src/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails.vue +++ b/src/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails.vue @@ -29,7 +29,7 @@ <el-option v-for="item in attendanceStatusList" :key="item.id" :label="item.value" :value="item.id"> </el-option> </el-select> - <el-button type="text" @click="submitEditOneClick('form')">纭畾</el-button> + <el-button type="text" :loading="isAddloadingOne" @click="submitEditOneClick('form')">纭畾</el-button> <el-button type="text" @click="cancelEditClick('isEditOne')">鍙栨秷</el-button> </template> </el-form-item> @@ -62,7 +62,7 @@ placeholder="璇疯緭鍏�" class="margin_right_15px" ></el-input> - <el-button type="text" @click="submitEditTwoClick('form')">纭畾</el-button> + <el-button type="text" :loading="isAddloadingTwo" @click="submitEditTwoClick('form')">纭畾</el-button> <el-button type="text" @click="cancelEditClick('isEditTwo')">鍙栨秷</el-button> </template> </el-form-item> @@ -108,6 +108,8 @@ }, ], }, + isAddloadingOne:false, + isAddloadingTwo:false, }; }, created() { @@ -152,13 +154,13 @@ this.isEditOne=true }, submitEditOneClick(){ - this.submitForm('form','isEditOne') + this.submitForm('form','isEditOne','isAddloadingOne') }, editTwoClick(){ this.isEditTwo=true }, submitEditTwoClick(){ - this.submitForm('form','isEditTwo') + this.submitForm('form','isEditTwo','isAddloadingTwo') }, formInfo() { if (this.islook) { @@ -198,7 +200,7 @@ this.islook = false; this.$emit('shutdown') }, - submitForm(formName,name) { + submitForm(formName,name,loading) { this.$refs[formName].validate((valid) => { if (valid) { let form = JSON.parse(JSON.stringify(this.form)); @@ -216,6 +218,7 @@ workTypeId:form.workTypeId, workerName:form.workerName, } + this[loading]=true updateAttendance(params).then((res) => { if (res.code == 200) { this.$message({ @@ -225,7 +228,12 @@ this[name]=false this.cancelMethod(); } - }); + this[loading]=false + }).catch(() => { + setTimeout(() => { + this[loading]=false + }, 2000); + }); } else { console.log('error submit!!'); return false; -- Gitblit v1.8.0