问题修改

master
zhangdi 23 hours ago
parent a63c042692
commit bccaf9f61a
  1. 27
      pages/plan/workReport.vue

@ -195,6 +195,33 @@ export default {
tTr,
tTd,
},
// 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;
}
}
}
},
data() {
return {
tableObj: {},

Loading…
Cancel
Save