Commit da045dfe622852b44270fb603020b1eeae8e6cce
Merge remote-tracking branch 'origin/master'
Showing
3 changed files
with
23 additions
and
5 deletions
src/pages/Order/components/OrderDrawer.tsx
... | ... | @@ -498,13 +498,16 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
498 | 498 | * @param option 收货人信息 |
499 | 499 | */ |
500 | 500 | async function autoFillCustomerInfo(option: any) { |
501 | - if (option.type === 'add') { | |
501 | + if (option === undefined || option === null || option.type === 'add') { | |
502 | 502 | form.setFieldValue('customerShippingAddress', undefined); |
503 | 503 | form.setFieldValue('customerContactNumber', undefined); |
504 | 504 | form.setFieldValue('institution', undefined); |
505 | 505 | form.setFieldValue('institutionContactName', undefined); |
506 | 506 | form.setFieldValue('customerShippingAddress', undefined); |
507 | - form.setFieldValue('customerNameString', option.name); | |
507 | + | |
508 | + if (option !== undefined && option !== null) { | |
509 | + form.setFieldValue('customerNameString', option.name); | |
510 | + } | |
508 | 511 | } else { |
509 | 512 | form.setFieldValue('customerShippingAddress', option.fullAddress); |
510 | 513 | form.setFieldValue('customerContactNumber', option.phone); |
... | ... | @@ -1073,7 +1076,21 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
1073 | 1076 | width="lg" |
1074 | 1077 | key="totalPayment" |
1075 | 1078 | label="支付总额(¥)" |
1076 | - rules={[{ required: true, message: '支付总额必填' }]} | |
1079 | + rules={[ | |
1080 | + { required: true, message: '支付总额必填' }, | |
1081 | + { | |
1082 | + validator: (_, value) => { | |
1083 | + if (value <= 0) { | |
1084 | + return Promise.reject( | |
1085 | + new Error( | |
1086 | + '支付总额必须大于0 (扣预存的订单现在也必须填写实际金额)', | |
1087 | + ), | |
1088 | + ); | |
1089 | + } | |
1090 | + return Promise.resolve(); | |
1091 | + }, | |
1092 | + }, | |
1093 | + ]} | |
1077 | 1094 | tooltip="点击计算,合计所有子订单金额" |
1078 | 1095 | fieldProps={{ |
1079 | 1096 | addonAfter: ( | ... | ... |
src/pages/Order/constant.ts
src/services/definition.ts
... | ... | @@ -1549,13 +1549,13 @@ export interface QueryBankStatementDto { |
1549 | 1549 | * collection_date |
1550 | 1550 | * @format date |
1551 | 1551 | */ |
1552 | - collectionDatetimeBegin?: string; | |
1552 | + collectionDateBegin?: string; | |
1553 | 1553 | /** |
1554 | 1554 | * @description |
1555 | 1555 | * collection_date |
1556 | 1556 | * @format date |
1557 | 1557 | */ |
1558 | - collectionDatetimeEnd?: string; | |
1558 | + collectionDateEnd?: string; | |
1559 | 1559 | /** @format int32 */ |
1560 | 1560 | current?: number; |
1561 | 1561 | /** @format int64 */ | ... | ... |