fix(erp): 来票金额不再按所选订单未开票合计提示上限
Co-Authored-By: Claude Code <noreply@anthropic.com>
| | |
| | | // 不设置 max:选择/增减采购订单时不允许自动改写已填写的来票金额 |
| | | precision: 2, |
| | | }), |
| | | rules: () => { |
| | | const max = orderRemainInvoicePrice?.value; |
| | | if (max != null) { |
| | | return z |
| | | .number({ message: '请输入来票金额' }) |
| | | .min(0, '来票金额不能小于 0') |
| | | .max(max, `来票金额不能大于未开票金额 ${Number(max).toFixed(2)}`); |
| | | } |
| | | return z |
| | | .number({ message: '请输入来票金额' }) |
| | | .min(0, '来票金额不能小于 0'); |
| | | }, |
| | | // 不按所选订单金额校验来票金额(订单可在编辑时继续新增),仅校验必填与不能为负 |
| | | rules: () => |
| | | z.number({ message: '请输入来票金额' }).min(0, '来票金额不能小于 0'), |
| | | }, |
| | | }, |
| | | { |