From f3cd999213db256356cb2cc446d6d178651a853b Mon Sep 17 00:00:00 2001 From: yyb <995253665@qq.com> Date: 星期二, 29 七月 2025 16:00:21 +0800 Subject: [PATCH] 增加废料字段 --- pages/product/report/components/saveForm.vue | 107 ++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 81 insertions(+), 26 deletions(-) diff --git a/pages/product/report/components/saveForm.vue b/pages/product/report/components/saveForm.vue index 22841b1..67567a4 100644 --- a/pages/product/report/components/saveForm.vue +++ b/pages/product/report/components/saveForm.vue @@ -14,6 +14,14 @@ <view class="packing-registration-param-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.outBatchNo" /> + </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"> @@ -40,14 +48,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> + </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> @@ -61,7 +69,19 @@ <text class="item-one">鍑�閲�</text> </view> <view class="packing-registration-param-item-right"> - <u-input class="item-one item-two" v-model="form.netWeight" /> + <u-input + class="item-one item-two" + v-model="form.netWeight" + disabled + /> + </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.waste" /> </view> </view> <view class="packing-registration-param-item param-extra"> @@ -134,39 +154,74 @@ return { show: false, form: {}, - loading: false + loading: false, }; + }, + watch: { + "form.grossWeight"(val) { + if (val === "") { + this.form.netWeight = ""; + } else if (this.form.reelWeight) { + this.form.netWeight = + parseFloat(val) - parseFloat(this.form.reelWeight); + } + }, + "form.reelWeight"(val) { + if (this.form.grossWeight && val) { + this.form.netWeight = + parseFloat(this.form.grossWeight) - parseFloat(val); + } + }, }, methods: { confirm() { if (this.loading) return; - if (!this.form.outerDiameter) { - this.$u.toast("璇疯緭鍏ユ垚鍝佸寰勬祴閲忓��"); + // if (!this.form.outerDiameter) { + // this.$u.toast("璇疯緭鍏ユ垚鍝佸寰勬祴閲忓��"); + // this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� + // return; + // } + // if (!this.form.voltage) { + // this.$u.toast("璇疯緭鍏ラ��鐏數鍘�"); + // this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� + // return; + // } + // if (!this.form.speed) { + // this.$u.toast("璇疯緭鍏ヨ浆閫�"); + // this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� + // return; + // } + // if (!this.form.pressure) { + // this.$u.toast("璇疯緭鍏ュ閮ㄦ皵鍘�"); + // this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� + // return; + // } + // if (!this.form.productionSpeed) { + // this.$u.toast("璇疯緭鍏ョ敓浜ч�熷害"); + // this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� + // return; + // } + if (!this.form.outBatchNo) { + this.$u.toast("璇疯緭鍏ユ壒鍙�"); this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� return; } - if (!this.form.voltage) { - this.$u.toast("璇疯緭鍏ラ��鐏數鍘�"); + if (Number(this.form.netWeight) == 0) { + this.$u.toast("鍑�閲嶄笉涓�0"); this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� return; } - if (!this.form.speed) { - this.$u.toast("璇疯緭鍏ヨ浆閫�"); - this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� - return; - } - if (!this.form.pressure) { - this.$u.toast("璇疯緭鍏ュ閮ㄦ皵鍘�"); - this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� - return; - } - if (!this.form.productionSpeed) { - this.$u.toast("璇疯緭鍏ョ敓浜ч�熷害"); + if (!this.form.waste) { + this.$u.toast("璇疯緭鍏ュ簾鏂�"); this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵�� return; } this.operationTaskList.operationTaskId = this.operationTaskList.id; this.form.operationTaskId = this.operationTaskList.id; + this.form.status = this.operationTaskList.status; + this.form.Persons = this.operationTaskList.Persons; + this.form.productStaffIds = this.operationTaskList.productStaffIds; + this.form.productStaffs = this.operationTaskList.productStaffs; this.operationTaskList.productOutputList = []; // 鍒涘缓涓�涓┖鏁扮粍 this.operationTaskList.productOutputList.push(this.form); // 鍚戞暟缁勪腑娣诲姞鍏冪礌 console.log("this.operationTaskList", this.operationTaskList); -- Gitblit v1.9.3