From 3c456949b70671cc2ad95ad5395dfaceda519f17 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期五, 23 二月 2024 10:12:19 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- company/src/components/enterprise/OperaDispatchUnitWindow.vue | 40 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 39 insertions(+), 1 deletions(-) diff --git a/company/src/components/enterprise/OperaDispatchUnitWindow.vue b/company/src/components/enterprise/OperaDispatchUnitWindow.vue index 87892b7..81e0e66 100644 --- a/company/src/components/enterprise/OperaDispatchUnitWindow.vue +++ b/company/src/components/enterprise/OperaDispatchUnitWindow.vue @@ -184,10 +184,48 @@ // 缂栬緫 this.$nextTick(() => { for (const key in this.form) { - this.form[key] = target[key] + console.log(key) + // if (key !== 'saveDuSolutionDTOList') { + this.form[key] = target[key] + // } } + console.log(this.form) }) }, + // 纭鏂板缓 + __confirmCreate () { + this.$refs.form.validate((valid) => { + if (!valid) { + return + } + for (let i = 0; i < this.form.saveDuSolutionDTOList.length; i++) { + if (!this.form.saveDuSolutionDTOList[i].solutionId) { + this.$message.warning(`绗�${i + 1}椤逛繚闄╂柟妗堜负绌猴紒`) + return + } + for (let a = 0; a < this.form.saveDuSolutionDTOList[i].saveDuWorkTypeDTOList.length; a++) { + if (!this.form.saveDuSolutionDTOList[i].saveDuWorkTypeDTOList[a].workTypeId) { + this.$message.warning(`绗�${i + 1}椤逛繚闄╂柟妗堢${a + 1}椤瑰伐绉嶄负绌猴紒`) + return + } + } + } + // 璋冪敤鏂板缓鎺ュ彛 + this.isWorking = true + this.api.create(this.form) + .then(() => { + this.visible = false + this.$tip.apiSuccess('鏂板缓鎴愬姛') + this.$emit('success') + }) + .catch(e => { + this.$tip.apiFailed(e) + }) + .finally(() => { + this.isWorking = false + }) + }) + }, // 纭淇敼 __confirmEdit () { this.$refs.form.validate((valid) => { -- Gitblit v1.9.3