| | |
| | | const completedNum = |
| | | (row.completedQuantity === undefined || row.completedQuantity===null || row.completedQuantity==='') ? 0 : row.completedQuantity |
| | | // |
| | | const okVal = completedSum - totalQuantity |
| | | const okVal = completedSum - totalQuantity + row.breakageQuantity |
| | | |
| | | //当可操作数量为0,并且完工数量不等于可完工数量时 |
| | | if(row.minQuantity===0 && val!==totalQuantity ){ |
| | | if(row.minQuantity===0 && val!==(totalQuantity-row.breakageQuantity) ){ |
| | | return new Error(`${t('reportingWorks.pleaseNumber12')} ${okVal}+${val}=${okVal+val}\n |
| | | ${t('reportingWorks.pleaseNumber13')} ${nextQuantitySum}\n |
| | | ${t('reportingWorks.pleaseNumber14')} |
| | | `) |
| | | } |
| | | if(titleUploadData.value.reportingWorkId!=null && (val>totalQuantity || val<(row.quantity-row.minQuantity) )){ |
| | | return new Error(`${row.quantity-row.minQuantity} |
| | | <=val<= |
| | | ${row.quantity}`) |
| | | if(titleUploadData.value.reportingWorkId!=null){ |
| | | if(row.completedQuantityComputed>=row.minQuantity ){ |
| | | if((val<(row.completedQuantityComputed-row.minQuantity || val>=row.completedQuantityComputed))){ |
| | | return new Error(`${row.completedQuantityComputed-row.minQuantity} |
| | | <=val<= |
| | | ${row.completedQuantityComputed}`) |
| | | } |
| | | }else{ |
| | | if((val>row.completedQuantityComputed)){ |
| | | return new Error(`val |
| | | <= |
| | | ${row.completedQuantityComputed}`) |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |