| | |
| | | :loading="loading" |
| | | > |
| | | <view class="packing-registration-param"> |
| | | <scroll-view scroll-y="true" style="height: 100%"> |
| | | <scroll-view scroll-y="true" style="height: 100%;transform: translateZ(0);-webkit-font-smoothing: antialiased;"> |
| | | <view class="packing-registration-param-view"> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | required: true, |
| | | default: () => ({}), |
| | | }, |
| | | dutyId: { |
| | | type: String, |
| | | required: true, |
| | | default: '', |
| | | }, |
| | | }, |
| | | data() { |
| | | 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.form.Persons = this.operationTaskList.Persons; |
| | | this.form.productStaffIds = this.operationTaskList.productStaffIds; |
| | | this.form.productStaffs = this.operationTaskList.productStaffs; |
| | | this.form.dutyRecordId = this.dutyId; |
| | | this.operationTaskList.productOutputList = []; // 创建一个空数组 |
| | | this.operationTaskList.productOutputList.push(this.form); // 向数组中添加元素 |
| | | console.log("this.operationTaskList", this.operationTaskList); |