| | |
| | | <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"> |
| | |
| | | <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"> |
| | |
| | | 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; |
| | |
| | | this.$refs.uModal.clearLoading(); // 清除加载状态 |
| | | return; |
| | | } |
| | | if (!this.form.outBatchNo) { |
| | | 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); |