|
@@ -3005,16 +3005,24 @@ $(document).ready(() => {
|
|
|
}, {
|
|
|
key: 'over', title: '超计', valid: true,
|
|
|
check: function (node) {
|
|
|
- const posRange = stagePos.ledgerPos[itemsPre + node.id] || [];
|
|
|
- if (posRange.length > 0) {
|
|
|
- for (const p of posRange) {
|
|
|
- if (p.end_contract_qty > p.quantity) return true;
|
|
|
+ if (checkTzMeasureType()) {
|
|
|
+ const posRange = stagePos.ledgerPos[itemsPre + node.id] || [];
|
|
|
+ if (posRange.length > 0) {
|
|
|
+ for (const p of posRange) {
|
|
|
+ if (p.end_contract_qty > p.quantity) return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ } else if (node.end_gather_qty) {
|
|
|
+ return !node.quantity || Math.abs(node.end_gather_qty) > Math.abs(ZhCalc.add(node.quantity, node.end_qc_qty));
|
|
|
+ } else if (node.end_gather_tp) {
|
|
|
+ return !node.total_price || Math.abs(node.end_gather_tp) > Math.abs(ZhCalc.add(node.total_price, node.end_qc_tp));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (node.end_gather_qty) {
|
|
|
+ return !node.deal_qty || Math.abs(node.end_gather_qty) > Math.abs(ZhCalc.add(node.deal_qty, node.end_qc_qty));
|
|
|
+ } else if (node.end_gather_tp) {
|
|
|
+ return !node.deal_tp || Math.abs(node.end_gather_tp) > Math.abs(ZhCalc.add(node.deal_tp, node.end_qc_tp));
|
|
|
}
|
|
|
- return false;
|
|
|
- } else if (node.end_gather_qty) {
|
|
|
- return !node.quantity || Math.abs(node.end_gather_qty) > Math.abs(ZhCalc.add(node.quantity, node.end_qc_qty));
|
|
|
- } else if (node.end_gather_tp) {
|
|
|
- return !node.total_price || Math.abs(node.end_gather_tp) > Math.abs(ZhCalc.add(node.total_price, node.end_qc_tp));
|
|
|
}
|
|
|
}
|
|
|
}, {
|