Commit 0157899190d4fc6e12c78757ec79e817e9d506cb
1 parent
b6f8b35c
refactor(order): 确保枚举值在引用前正确定义
重构订单页面的枚举值引用,确保在使用之前已经定义。这避免了在组件中直接引用枚举值可能导致的错误。
Showing
3 changed files
with
16 additions
and
8 deletions
src/pages/Order/Order/components/CheckModal.tsx
... | ... | @@ -236,8 +236,8 @@ export default ({ |
236 | 236 | setPreviewOpen(true); |
237 | 237 | setPreviewTitle( |
238 | 238 | file.name || |
239 | - file.originFileObj?.name || | |
240 | - file.url!.substring(file.url!.lastIndexOf('/') + 1), | |
239 | + file.originFileObj?.name || | |
240 | + file.url!.substring(file.url!.lastIndexOf('/') + 1), | |
241 | 241 | ); |
242 | 242 | }; |
243 | 243 | |
... | ... | @@ -681,6 +681,12 @@ export default ({ |
681 | 681 | width="md" |
682 | 682 | name="bankStatementSerialNumbersText" |
683 | 683 | label="流水号" |
684 | + rules={[ | |
685 | + { | |
686 | + required: true, | |
687 | + message: '请输入流水号!', | |
688 | + }, | |
689 | + ]} | |
684 | 690 | placeholder={'多个流水号用逗号隔开'} |
685 | 691 | /> |
686 | 692 | <div className="pb-4 text-xs decoration-gray-50"> | ... | ... |
src/pages/Order/Order/index.tsx
... | ... | @@ -1198,11 +1198,13 @@ const OrderPage = () => { |
1198 | 1198 | </div> |
1199 | 1199 | |
1200 | 1200 | {/* 确认发票状态 */} |
1201 | - <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | |
1202 | - <Tag color={'success'} style={{ marginRight: '4px' }}> | |
1203 | - {optRecord.invoiceConfirmStatusText} | |
1204 | - </Tag> | |
1205 | - </div> | |
1201 | + {optRecord.invoiceConfirmStatusText !== null && ( | |
1202 | + <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> | |
1203 | + <Tag color={'success'} style={{ marginRight: '4px' }}> | |
1204 | + {optRecord.invoiceConfirmStatusText} | |
1205 | + </Tag> | |
1206 | + </div> | |
1207 | + )} | |
1206 | 1208 | |
1207 | 1209 | {/* 后置审核状态 */} |
1208 | 1210 | {optRecord.postAuditStatus !== null ? ( | ... | ... |
src/pages/Order/constant.ts