| | |
| | | |
| | | /** 确认按钮 */ |
| | | submitForm() { |
| | | // if (this.objs.reservationTime && this.data.dwDeptId) { |
| | | // 防止重复点击 |
| | | if (this.loading) { |
| | | return; |
| | | } |
| | | |
| | | if (this.objs.reservationTime) { |
| | | let data = { |
| | | copeWith: this.ListObj.hjMoney, |
| | |
| | | yxts: this.objs.yxts, |
| | | dwId: this.data.dwId, |
| | | }; |
| | | |
| | | // 开启全屏loading |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: '正在提交数据,请稍候...', |
| | | spinner: 'el-icon-loading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }); |
| | | |
| | | this.loading = true; |
| | | newConfirm(data).then((res) => { |
| | | this.loading = false; |
| | | loading.close(); // 关闭全屏loading |
| | | this.$modal.msgSuccess("提交成功"); |
| | | this.confirm = true; |
| | | this.userList = []; |
| | | }).catch((error) => { |
| | | this.loading = false; |
| | | loading.close(); // 关闭全屏loading |
| | | console.error("提交失败:", error); |
| | | this.$modal.msgError("提交失败,请重试"); |
| | | }); |
| | | } else { |
| | | this.$modal.msgError("请填写带星号内容"); |