From 6131a7c3aa5eb25e427bed3d478daa3b0fb5f3e6 Mon Sep 17 00:00:00 2001 From: yyb <995253665@qq.com> Date: 星期五, 11 七月 2025 13:49:30 +0800 Subject: [PATCH] 解决PDA报工页面提交时,提交按钮没控住问题 --- pages/product/report/components/saveForm.vue | 40 +++++++++++++++++++++++++++++++--------- 1 files changed, 31 insertions(+), 9 deletions(-) diff --git a/pages/product/report/components/saveForm.vue b/pages/product/report/components/saveForm.vue index 5780ac4..b7176f8 100644 --- a/pages/product/report/components/saveForm.vue +++ b/pages/product/report/components/saveForm.vue @@ -7,6 +7,7 @@ @confirm="confirm" @cancel="cancel" :async-close="true" + :loading="loading" > <view class="packing-registration-param"> <scroll-view scroll-y="true" style="height: 100%"> @@ -39,6 +40,14 @@ <u-input class="item-one item-two" v-model="form.reelNumber" /> </view> </view> + <view class="packing-registration-param-item param-extra"> + <view class="packing-registration-param-item-left"> + <text class="item-one">鐩橀噸</text> + </view> + <view class="packing-registration-param-item-right"> + <u-input class="item-one item-two" v-model="form.reelWeight" /> + </view> + </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">姣涢噸</text> @@ -52,7 +61,7 @@ <text class="item-one">鍑�閲�</text> </view> <view class="packing-registration-param-item-right"> - <u-input class="item-one item-two" v-model="form.theoryWeight" /> + <u-input class="item-one item-two" v-model="form.netWeight" /> </view> </view> <view class="packing-registration-param-item param-extra"> @@ -60,7 +69,7 @@ <text class="item-one">宸ュ簭</text> </view> <view class="packing-registration-param-item-right"> - <u-input class="item-one item-two" v-model="form.name" /> + <u-input class="item-one item-two" v-model="form.name" disabled /> </view> </view> <view class="packing-registration-param-item param-extra"> @@ -100,7 +109,10 @@ <text class="item-one item-two">鐢熶骇閫熷害</text> </view> <view class="packing-registration-param-item-right"> - <u-input class="item-one item-two" v-model="form.productionSpeed" /> + <u-input + class="item-one item-two" + v-model="form.productionSpeed" + /> </view> </view> </view> @@ -112,7 +124,7 @@ <script> export default { props: { - operationTaskId: { + operationTaskList: { type: Object, required: true, default: () => ({}), @@ -122,10 +134,12 @@ return { show: false, form: {}, + loading: false }; }, methods: { confirm() { + if (this.loading) return; if (!this.form.outerDiameter) { this.$u.toast("璇疯緭鍏ユ垚鍝佸寰勬祴閲忓��"); this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� @@ -151,12 +165,21 @@ this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� return; } + this.operationTaskList.operationTaskId = this.operationTaskList.id; + this.form.operationTaskId = this.operationTaskList.id; + this.operationTaskList.productOutputList = []; // 鍒涘缓涓�涓┖鏁扮粍 + this.operationTaskList.productOutputList.push(this.form); // 鍚戞暟缁勪腑娣诲姞鍏冪礌 + console.log("this.operationTaskList", this.operationTaskList); + this.loading = true; this.$u.api.workReporting - .submitPDA({ ...this.form, operationTaskId: this.operationTaskId.id }) + .submitPDA(this.operationTaskList) .then((res) => { - console.log("res", res); - this.$emit('update') + this.$emit("update"); this.$refs.uModal.cancel(); + }) + .finally(() => { + this.loading = false; + this.$refs.uModal.clearLoading(); }); }, cancel() { @@ -164,9 +187,8 @@ this.form = {}; }, open(val) { - console.log('11daidecanshuskk',val) this.show = true; - this.form = val; + this.form = val.data; }, }, }; -- Gitblit v1.9.3