工序报工问题修改

test
zhangdi 1 week ago
parent b709ce0639
commit 9ea88ab0fe
  1. 27
      pages/plan/workReport.vue

@ -244,6 +244,33 @@ export default {
twoInputFcous: true,
};
},
// watch
watch: {
//
'formData.scrapQty'(newVal) {
//
if (this.tableObj.notWorkQty !== undefined && this.tableObj.notWorkQty !== null) {
const totalQty = Number(this.tableObj.notWorkQty);
const scrap = Number(newVal);
//
if (!isNaN(scrap)) {
// -
let remainingQty = totalQty - scrap;
// 0
if (remainingQty < 0) {
remainingQty = 0;
//
// uni.showToast({ title: '', icon: 'none' });
}
//
this.formData.workQty = remainingQty;
}
}
}
},
methods: {},
onNavigationBarButtonTap(btn) {
this.$refs.ifrm.topMenuClick(btn);

Loading…
Cancel
Save