From 1372427dc01943eaecf1a1447c37011632c978e6 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Mon, 14 Jul 2025 14:55:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/SecondPhase/production/BakeDetail.vue | 42 ++++++++++++-------- pages/SecondPhase/production/BakeProcess.vue | 11 +++-- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/pages/SecondPhase/production/BakeDetail.vue b/pages/SecondPhase/production/BakeDetail.vue index 9165ff3..2ff5de1 100644 --- a/pages/SecondPhase/production/BakeDetail.vue +++ b/pages/SecondPhase/production/BakeDetail.vue @@ -10,7 +10,7 @@ - + {{$t('grid.point-code')}} @@ -18,7 +18,7 @@ - + {{$t('grid.mother-roll-number')}} @@ -53,8 +53,8 @@ - - + + @@ -91,7 +91,7 @@ - + @@ -104,6 +104,7 @@ import SearchBox from '@/components/SearchBox.vue' import NumberInput from '@/components/NumberInput.vue' import UpTop from '@/components/upTop.vue' + import { confirmAction } from '@/utils/utils.js' import {queryProductArea, inCoolIvt, inCoolOrOven} from '@/utils/getData1.js' import {queryHotPoints} from '@/utils/getData3.js' export default { @@ -196,14 +197,19 @@ this.pkId = this.pkId === e.container_name ? '' : e.container_name this.pkObj = this.pkId === e.container_name ? e : {} }, - async _inCoolIvt () { - this.disabled1 = true - if (!this.pkId) { - this.disabled1 = false + async handleConfirm1 () { + if (!this.val1 || !this.val2) { return } + const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?") + if (isConfirmed) { + this._inCoolIvt() + } + }, + async _inCoolIvt () { + this.disabled1 = true try { - let res = await inCoolIvt(this.pkObj.point_code, this.pkObj.container_name) + let res = await inCoolIvt(this.val1, this.val2) uni.showToast({ title: res.message, icon: 'none' @@ -215,9 +221,8 @@ } }, _inCoolOrOven () { - if (this.pkId) { + if (this.val1 && this.val2) { this.active = true - this.disabled2 = true } }, cancleModal () { @@ -227,15 +232,23 @@ this.active = false this.disabled2 = false }, + async handleConfirm2 () { + const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?") + if (isConfirmed) { + this.modalToSure() + } + }, async modalToSure () { + this.disabled2 = true try { - let res = await inCoolOrOven(this.pkObj.point_code, this.pkObj.container_name, this.val3, this.val4, this.index1) + let res = await inCoolOrOven(this.val1, this.val2, this.val3, this.val4, this.index1) uni.showToast({ title: res.message, icon: 'none' }) this.cancleModal() this.searchList() + this.disabled2 = false } catch (e) { this.disabled2 = false } @@ -243,6 +256,3 @@ } } - - diff --git a/pages/SecondPhase/production/BakeProcess.vue b/pages/SecondPhase/production/BakeProcess.vue index 3ce9bd5..f674891 100644 --- a/pages/SecondPhase/production/BakeProcess.vue +++ b/pages/SecondPhase/production/BakeProcess.vue @@ -48,7 +48,7 @@ - + @@ -156,19 +156,18 @@ }, async handleConfirm(type) { if ((!this.val1 || !this.val2 ||!this.val3 || !this.val4) && type === '1') { - this.disabled = false return } - if (!this.val1 && type === '2') { + if ((!this.val1 || !this.val2) && type === '2') { return } const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?") if (isConfirmed) { if (type === '1') { - this._ovenInAndOut1() + this._ovenInAndOut1(type) } if (type === '2') { - this._ovenInAndOut2() + this._ovenInAndOut2(type) } } }, @@ -188,7 +187,7 @@ async _ovenInAndOut2 (type) { this.disabled = true try { - let res = await ovenInAndOut(this.val1, '','', '', type) + let res = await ovenInAndOut(this.val1, this.val2,'', '', type) uni.showToast({ title: res.message, icon: 'none'