| | |
| | | quantity: [ |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^[1-9]\d*$|^0$/ |
| | | const regex = /^(0(\.\d{1,2})?|([1-9]\d{0,4})(\.\d{1,2})?|99999(\.9{1,2})?)$/ |
| | | if (cellValue && !regex.test(cellValue) ) { |
| | | return new Error('请输入大于等于0的整数') |
| | | return new Error(t('basicData.msg.range99999Dec2') ) |
| | | } |
| | | } |
| | | } |
| | |
| | | return count.toFixed(2)==='NaN' ? null : parseFloat(count.toFixed(2)) |
| | | } |
| | | |
| | | //用于接收父组件参数 |
| | | let prop = defineProps({ |
| | | otherMoney:{} |
| | | }) |
| | |
| | | xGrid.value.reloadData(prop.otherMoney) |
| | | }) |
| | | |
| | | const countAmount = computed(() => (row) => { |
| | | const countAmount = (row) => { |
| | | const price = row.price===null?0:row.price |
| | | const quantity = row.quantity===null?0:row.quantity |
| | | return parseFloat((row.price * row.quantity).toFixed(2)) |
| | | }) |
| | | } |
| | | |
| | | |
| | | const validate = async () => { |