oak-pay-business 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/aspects/AspectDict.d.ts +2 -0
- package/es/aspects/index.js +2 -0
- package/es/aspects/invoice.d.ts +7 -0
- package/es/aspects/invoice.js +8 -0
- package/es/checkers/accountOper.js +28 -0
- package/es/checkers/index.js +4 -4
- package/es/checkers/invoice.d.ts +5 -0
- package/es/checkers/invoice.js +196 -0
- package/es/checkers/pay.js +9 -3
- package/es/checkers/redInvoice.d.ts +5 -0
- package/es/checkers/redInvoice.js +172 -0
- package/es/checkers/system.js +11 -0
- package/es/components/account/detail/index.d.ts +12 -0
- package/es/components/account/detail/index.js +32 -0
- package/es/components/account/detail/invoice/apply/channel.mobile.d.ts +1 -0
- package/es/components/account/detail/invoice/apply/channel.mobile.jsx +80 -0
- package/es/components/account/detail/invoice/apply/channel.pc.d.ts +1 -0
- package/es/components/account/detail/invoice/apply/channel.pc.jsx +140 -0
- package/es/components/account/detail/invoice/apply/channels.d.ts +1 -0
- package/es/components/account/detail/invoice/apply/channels.js +186 -0
- package/es/components/account/detail/invoice/apply/index.d.ts +22 -0
- package/es/components/account/detail/invoice/apply/index.js +347 -0
- package/es/components/account/detail/invoice/apply/locales/zh-CN.json +136 -0
- package/es/components/account/detail/invoice/apply/registry.d.ts +11 -0
- package/es/components/account/detail/invoice/apply/registry.js +10 -0
- package/es/components/account/detail/invoice/apply/types.d.ts +119 -0
- package/es/components/account/detail/invoice/apply/types.js +74 -0
- package/es/components/account/detail/invoice/apply/web.d.ts +282 -0
- package/es/components/account/detail/invoice/apply/web.jsx +68 -0
- package/es/components/account/detail/invoice/apply/web.pc.d.ts +282 -0
- package/es/components/account/detail/invoice/apply/web.pc.jsx +111 -0
- package/es/components/account/detail/invoice/history/index.d.ts +11 -0
- package/es/components/account/detail/invoice/history/index.js +96 -0
- package/es/components/account/detail/invoice/history/locales/zh-CN.json +25 -0
- package/es/components/account/detail/invoice/history/web.d.ts +18 -0
- package/es/components/account/detail/invoice/history/web.jsx +15 -0
- package/es/components/account/detail/invoice/history/web.pc.d.ts +18 -0
- package/es/components/account/detail/invoice/history/web.pc.jsx +27 -0
- package/es/components/account/detail/locales/zh-CN.json +33 -0
- package/es/components/account/detail/web.d.ts +20 -0
- package/es/components/account/detail/web.jsx +20 -2
- package/es/components/account/detail/web.pc.d.ts +20 -0
- package/es/components/account/detail/web.pc.jsx +16 -2
- package/es/components/aliPay/upsert/web.pc.jsx +2 -1
- package/es/components/apAccount/config/web.pc.jsx +11 -7
- package/es/components/apAccount/config/web.pc.module.less +3 -3
- package/es/components/apAccount/upsert/index.js +2 -1
- package/es/components/apAccount/upsert/web.pc.jsx +2 -1
- package/es/components/apProduct/config/web.pc.jsx +8 -6
- package/es/components/apProduct/config/web.pc.module.less +4 -4
- package/es/components/apProduct/upsert/web.pc.jsx +2 -1
- package/es/components/cpAccount/config/web.pc.jsx +10 -6
- package/es/components/cpAccount/config/web.pc.module.less +3 -3
- package/es/components/cpAccount/upsert/web.pc.jsx +2 -1
- package/es/components/cpProduct/config/web.pc.jsx +8 -6
- package/es/components/cpProduct/config/web.pc.module.less +4 -4
- package/es/components/cpProduct/upsert/web.pc.jsx +2 -1
- package/es/components/creemPay/upsert/web.pc.jsx +2 -1
- package/es/components/deposit/new/web.pc.jsx +2 -1
- package/es/components/epAccount/config/web.pc.jsx +11 -7
- package/es/components/epAccount/config/web.pc.module.less +3 -3
- package/es/components/epAccount/upsert/web.pc.jsx +2 -1
- package/es/components/epProduct/config/web.pc.jsx +8 -6
- package/es/components/epProduct/config/web.pc.module.less +4 -4
- package/es/components/epProduct/upsert/web.pc.jsx +2 -1
- package/es/components/epay/upsert/web.pc.jsx +2 -1
- package/es/components/invoice/manage/index.d.ts +7 -0
- package/es/components/invoice/manage/index.js +105 -0
- package/es/components/invoice/manage/locales/zh-CN.json +31 -0
- package/es/components/invoice/manage/manualItem/index.d.ts +6 -0
- package/es/components/invoice/manage/manualItem/index.js +73 -0
- package/es/components/invoice/manage/manualItem/locales/zh-CN.json +16 -0
- package/es/components/invoice/manage/manualItem/web.pc.d.ts +9 -0
- package/es/components/invoice/manage/manualItem/web.pc.jsx +69 -0
- package/es/components/invoice/manage/web.pc.d.ts +14 -0
- package/es/components/invoice/manage/web.pc.jsx +66 -0
- package/es/components/invoice/manage/web.pc.module.less +22 -0
- package/es/components/invoiceConfig/system/index.config.d.ts +2 -0
- package/es/components/invoiceConfig/system/index.config.js +4 -0
- package/es/components/invoiceConfig/system/index.d.ts +3 -0
- package/es/components/invoiceConfig/system/index.js +41 -0
- package/es/components/invoiceConfig/system/locales/zh-CN.json +22 -0
- package/es/components/invoiceConfig/system/web.pc.d.ts +18 -0
- package/es/components/invoiceConfig/system/web.pc.jsx +108 -0
- package/es/components/nuonuoInvoice/config/index.d.ts +4 -0
- package/es/components/nuonuoInvoice/config/index.js +48 -0
- package/es/components/nuonuoInvoice/config/locales/zh-CN.json +9 -0
- package/es/components/nuonuoInvoice/config/web.pc.d.ts +8 -0
- package/es/components/nuonuoInvoice/config/web.pc.jsx +97 -0
- package/es/components/nuonuoInvoice/config/web.pc.module.less +17 -0
- package/es/components/nuonuoInvoice/upsert/index.d.ts +4 -0
- package/es/components/nuonuoInvoice/upsert/index.js +53 -0
- package/es/components/nuonuoInvoice/upsert/locales/zh-CN.json +68 -0
- package/es/components/nuonuoInvoice/upsert/web.pc.d.ts +13 -0
- package/es/components/nuonuoInvoice/upsert/web.pc.jsx +124 -0
- package/es/components/nuonuoInvoice/upsert/web.pc.module.less +19 -0
- package/es/components/offlineAccount/config/web.pc.jsx +10 -6
- package/es/components/offlineAccount/config/web.pc.module.less +3 -3
- package/es/components/offlineAccount/upsert/index.d.ts +1 -1
- package/es/components/offlineAccount/upsert/web.pc.jsx +2 -1
- package/es/components/offlineInvoice/config/index.d.ts +4 -0
- package/es/components/offlineInvoice/config/index.js +31 -0
- package/es/components/offlineInvoice/config/locales/zh-CN.json +9 -0
- package/es/components/offlineInvoice/config/web.pc.d.ts +8 -0
- package/es/components/offlineInvoice/config/web.pc.jsx +58 -0
- package/es/components/offlineInvoice/config/web.pc.module.less +26 -0
- package/es/components/offlineInvoice/upsert/index.d.ts +4 -0
- package/es/components/offlineInvoice/upsert/index.js +34 -0
- package/es/components/offlineInvoice/upsert/locales/zh-CN.json +23 -0
- package/es/components/offlineInvoice/upsert/web.pc.d.ts +13 -0
- package/es/components/offlineInvoice/upsert/web.pc.jsx +45 -0
- package/es/components/offlineInvoice/upsert/web.pc.module.less +11 -0
- package/es/components/order/list/index.d.ts +1 -1
- package/es/components/pay/detail/index.js +1 -4
- package/es/components/pay/detail/web.d.ts +10 -0
- package/es/components/pay/detail/web.pc.d.ts +10 -0
- package/es/components/pay/detail/web.pc.jsx +2 -1
- package/es/components/pay/list/index.d.ts +6 -0
- package/es/components/pay/list/index.js +41 -1
- package/es/components/pay/list/web.pc.d.ts +5 -0
- package/es/components/pay/list/web.pc.jsx +45 -19
- package/es/components/pay/list/web.pc.module.less +40 -2
- package/es/components/payConfig/system/index.d.ts +1 -1
- package/es/components/payConfig/system/locales/zh-CN.json +2 -1
- package/es/components/payConfig/system/web.pc.jsx +22 -13
- package/es/components/payConfig/system/web.pc.module.less +25 -5
- package/es/components/paypalPay/upsert/web.pc.jsx +2 -1
- package/es/components/ppAccount/config/web.pc.jsx +10 -6
- package/es/components/ppAccount/config/web.pc.module.less +3 -3
- package/es/components/ppAccount/upsert/web.pc.jsx +2 -1
- package/es/components/ppProduct/config/web.pc.jsx +8 -6
- package/es/components/ppProduct/config/web.pc.module.less +4 -4
- package/es/components/ppProduct/upsert/web.pc.jsx +2 -1
- package/es/components/redInvoice/apply/index.d.ts +7 -0
- package/es/components/redInvoice/apply/index.js +39 -0
- package/es/components/redInvoice/apply/locales/zh-CN.json +12 -0
- package/es/components/redInvoice/apply/web.pc.d.ts +10 -0
- package/es/components/redInvoice/apply/web.pc.jsx +37 -0
- package/es/components/redInvoice/apply/web.pc.module.less +13 -0
- package/es/components/redInvoice/manage/index.d.ts +7 -0
- package/es/components/redInvoice/manage/index.js +70 -0
- package/es/components/redInvoice/manage/locales/zh-CN.json +29 -0
- package/es/components/redInvoice/manage/manualItem/index.d.ts +6 -0
- package/es/components/redInvoice/manage/manualItem/index.js +60 -0
- package/es/components/redInvoice/manage/manualItem/locales/zh-CN.json +12 -0
- package/es/components/redInvoice/manage/manualItem/web.pc.d.ts +9 -0
- package/es/components/redInvoice/manage/manualItem/web.pc.jsx +62 -0
- package/es/components/redInvoice/manage/web.pc.d.ts +12 -0
- package/es/components/redInvoice/manage/web.pc.jsx +38 -0
- package/es/components/redInvoice/manage/web.pc.module.less +22 -0
- package/es/components/refund/list/index.d.ts +1 -1
- package/es/components/refund/list/web.pc.jsx +2 -1
- package/es/components/ship/system/index.d.ts +1 -1
- package/es/components/ship/system/web.pc.jsx +1 -1
- package/es/components/ship/wechatMpShip/upsert/index.d.ts +1 -1
- package/es/components/ship/wechatMpShip/upsert/web.pc.jsx +2 -1
- package/es/components/shipServiceSystem/list/web.pc.jsx +2 -1
- package/es/components/spAccount/config/web.pc.jsx +10 -6
- package/es/components/spAccount/config/web.pc.module.less +3 -3
- package/es/components/spAccount/upsert/web.pc.jsx +2 -1
- package/es/components/spProduct/config/web.pc.jsx +8 -6
- package/es/components/spProduct/config/web.pc.module.less +4 -4
- package/es/components/spProduct/upsert/web.pc.jsx +2 -1
- package/es/components/stripePay/upsert/web.pc.jsx +2 -1
- package/es/components/sysAccount/orderList/index.config.d.ts +2 -0
- package/es/components/sysAccount/orderList/index.config.js +4 -0
- package/es/components/sysAccount/orderList/index.d.ts +2 -0
- package/es/components/sysAccount/orderList/index.js +34 -0
- package/es/components/sysAccount/orderList/web.pc.d.ts +4 -0
- package/es/components/sysAccount/orderList/web.pc.jsx +51 -0
- package/es/components/sysAccount/refundList/index.config.d.ts +2 -0
- package/es/components/sysAccount/refundList/index.config.js +4 -0
- package/es/components/sysAccount/refundList/index.d.ts +2 -0
- package/es/components/sysAccount/refundList/index.js +44 -0
- package/es/components/sysAccount/refundList/web.pc.d.ts +4 -0
- package/es/components/sysAccount/refundList/web.pc.jsx +48 -0
- package/es/components/sysAccount/survey/locales/zh-CN.json +9 -9
- package/es/components/sysAccount/survey/web.pc.d.ts +10 -0
- package/es/components/sysAccount/survey/web.pc.jsx +22 -12
- package/es/components/sysAccount/survey/web.pc.module.less +1 -15
- package/es/components/sysAccount/transferList/index.d.ts +1 -1
- package/es/components/sysAccountMove/create/web.pc.jsx +4 -3
- package/es/components/waffoPay/upsert/web.pc.jsx +2 -1
- package/es/components/wechatPay/upsert/web.pc.jsx +2 -1
- package/es/components/wfAccount/config/web.pc.jsx +10 -6
- package/es/components/wfAccount/config/web.pc.module.less +3 -3
- package/es/components/wfAccount/upsert/web.pc.jsx +2 -1
- package/es/components/wfProduct/config/web.pc.jsx +8 -6
- package/es/components/wfProduct/config/web.pc.module.less +4 -4
- package/es/components/wfProduct/upsert/web.pc.jsx +2 -1
- package/es/components/withdraw/detail/index.d.ts +1 -1
- package/es/components/withdrawAccount/upsert/web.pc.jsx +2 -1
- package/es/components/withdrawTransfer/list/index.d.ts +1 -1
- package/es/components/withdrawTransfer/list/web.pc.jsx +2 -1
- package/es/components/wpAccount/config/web.pc.jsx +11 -7
- package/es/components/wpAccount/config/web.pc.module.less +3 -3
- package/es/components/wpAccount/upsert/web.pc.jsx +2 -1
- package/es/components/wpProduct/config/web.pc.jsx +8 -6
- package/es/components/wpProduct/config/web.pc.module.less +4 -4
- package/es/configuration/attrUpdateMatrix.js +60 -0
- package/es/configuration/relation.js +11 -1
- package/es/context/BackendRuntimeContext.js +11 -1
- package/es/context/FrontendRuntimeContext.d.ts +2 -2
- package/es/context/FrontendRuntimeContext.js +6 -3
- package/es/data/actionAuth.js +79 -1
- package/es/data/path.js +70 -0
- package/es/entities/AbstractInvoiceChannel.d.ts +10 -0
- package/es/entities/AbstractInvoiceChannel.js +18 -0
- package/es/entities/Account.d.ts +7 -1
- package/es/entities/Account.js +24 -0
- package/es/entities/AccountOper.d.ts +4 -1
- package/es/entities/AccountOper.js +18 -0
- package/es/entities/Deposit.d.ts +4 -1
- package/es/entities/Deposit.js +4 -0
- package/es/entities/Invoice.d.ts +44 -0
- package/es/entities/Invoice.js +110 -0
- package/es/entities/InvoicePay.d.ts +17 -0
- package/es/entities/InvoicePay.js +19 -0
- package/es/entities/NuonuoInvoice.d.ts +34 -0
- package/es/entities/NuonuoInvoice.js +73 -0
- package/es/entities/OfflineInvoice.d.ts +16 -0
- package/es/entities/OfflineInvoice.js +35 -0
- package/es/entities/Pay.js +1 -1
- package/es/entities/RedInvoice.d.ts +35 -0
- package/es/entities/RedInvoice.js +38 -0
- package/es/entities/System.d.ts +6 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/locales/error/zh-CN.json +25 -1
- package/es/oak-app-domain/AbstractInvoiceChannel/Schema.d.ts +19 -0
- package/es/oak-app-domain/AbstractInvoiceChannel/Schema.js +1 -0
- package/es/oak-app-domain/AbstractInvoiceChannel/Storage.d.ts +3 -0
- package/es/oak-app-domain/AbstractInvoiceChannel/Storage.js +16 -0
- package/es/oak-app-domain/AbstractInvoiceChannel/_baseSchema.d.ts +41 -0
- package/es/oak-app-domain/AbstractInvoiceChannel/_baseSchema.js +1 -0
- package/es/oak-app-domain/AbstractInvoiceChannel/locales/en_US.json +7 -0
- package/es/oak-app-domain/AbstractInvoiceChannel/locales/zh_CN.json +7 -0
- package/es/oak-app-domain/Account/Action.d.ts +1 -1
- package/es/oak-app-domain/Account/Action.js +1 -1
- package/es/oak-app-domain/Account/Storage.js +42 -0
- package/es/oak-app-domain/Account/Style.js +5 -1
- package/es/oak-app-domain/Account/_baseSchema.d.ts +24 -0
- package/es/oak-app-domain/Account/locales/en_US.json +12 -2
- package/es/oak-app-domain/Account/locales/zh_CN.json +12 -2
- package/es/oak-app-domain/AccountOper/Storage.js +23 -2
- package/es/oak-app-domain/AccountOper/Style.js +5 -1
- package/es/oak-app-domain/AccountOper/_baseSchema.d.ts +15 -3
- package/es/oak-app-domain/AccountOper/locales/en_US.json +8 -1
- package/es/oak-app-domain/AccountOper/locales/zh_CN.json +8 -1
- package/es/oak-app-domain/ActionDefDict.d.ts +7 -0
- package/es/oak-app-domain/ActionDefDict.js +6 -0
- package/es/oak-app-domain/Deposit/Storage.js +12 -0
- package/es/oak-app-domain/Deposit/_baseSchema.d.ts +9 -1
- package/es/oak-app-domain/Deposit/locales/en_US.json +2 -0
- package/es/oak-app-domain/Deposit/locales/zh_CN.json +2 -0
- package/es/oak-app-domain/EntityDict.d.ts +556 -1
- package/es/oak-app-domain/ExtraFile/Storage.js +1 -1
- package/es/oak-app-domain/ExtraFile/_baseSchema.d.ts +2 -2
- package/es/oak-app-domain/Invoice/Action.d.ts +11 -0
- package/es/oak-app-domain/Invoice/Action.js +19 -0
- package/es/oak-app-domain/Invoice/Schema.d.ts +19 -0
- package/es/oak-app-domain/Invoice/Schema.js +1 -0
- package/es/oak-app-domain/Invoice/Storage.d.ts +3 -0
- package/es/oak-app-domain/Invoice/Storage.js +163 -0
- package/es/oak-app-domain/Invoice/Style.d.ts +3 -0
- package/es/oak-app-domain/Invoice/Style.js +24 -0
- package/es/oak-app-domain/Invoice/_baseSchema.d.ts +131 -0
- package/es/oak-app-domain/Invoice/_baseSchema.js +1 -0
- package/es/oak-app-domain/Invoice/locales/en_US.json +54 -0
- package/es/oak-app-domain/Invoice/locales/zh_CN.json +54 -0
- package/es/oak-app-domain/InvoicePay/Schema.d.ts +19 -0
- package/es/oak-app-domain/InvoicePay/Schema.js +1 -0
- package/es/oak-app-domain/InvoicePay/Storage.d.ts +3 -0
- package/es/oak-app-domain/InvoicePay/Storage.js +55 -0
- package/es/oak-app-domain/InvoicePay/_baseSchema.d.ts +64 -0
- package/es/oak-app-domain/InvoicePay/_baseSchema.js +1 -0
- package/es/oak-app-domain/InvoicePay/locales/en_US.json +13 -0
- package/es/oak-app-domain/InvoicePay/locales/zh_CN.json +13 -0
- package/es/oak-app-domain/Log/Storage.js +4 -0
- package/es/oak-app-domain/Log/_baseSchema.d.ts +5 -0
- package/es/oak-app-domain/Log/locales/en_US.json +1 -0
- package/es/oak-app-domain/Log/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/NuonuoInvoice/Schema.d.ts +19 -0
- package/es/oak-app-domain/NuonuoInvoice/Schema.js +1 -0
- package/es/oak-app-domain/NuonuoInvoice/Storage.d.ts +3 -0
- package/es/oak-app-domain/NuonuoInvoice/Storage.js +165 -0
- package/es/oak-app-domain/NuonuoInvoice/_baseSchema.d.ts +137 -0
- package/es/oak-app-domain/NuonuoInvoice/_baseSchema.js +1 -0
- package/es/oak-app-domain/NuonuoInvoice/locales/en_US.json +31 -0
- package/es/oak-app-domain/NuonuoInvoice/locales/zh_CN.json +31 -0
- package/es/oak-app-domain/OauthProvider/Storage.js +6 -0
- package/es/oak-app-domain/OauthProvider/_baseSchema.d.ts +4 -0
- package/es/oak-app-domain/OauthProvider/locales/en_US.json +1 -0
- package/es/oak-app-domain/OauthProvider/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/OfflineInvoice/Schema.d.ts +19 -0
- package/es/oak-app-domain/OfflineInvoice/Schema.js +1 -0
- package/es/oak-app-domain/OfflineInvoice/Storage.d.ts +3 -0
- package/es/oak-app-domain/OfflineInvoice/Storage.js +57 -0
- package/es/oak-app-domain/OfflineInvoice/_baseSchema.d.ts +61 -0
- package/es/oak-app-domain/OfflineInvoice/_baseSchema.js +1 -0
- package/es/oak-app-domain/OfflineInvoice/locales/en_US.json +12 -0
- package/es/oak-app-domain/OfflineInvoice/locales/zh_CN.json +12 -0
- package/es/oak-app-domain/Pay/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/RedInvoice/Action.d.ts +11 -0
- package/es/oak-app-domain/RedInvoice/Action.js +13 -0
- package/es/oak-app-domain/RedInvoice/Schema.d.ts +19 -0
- package/es/oak-app-domain/RedInvoice/Schema.js +1 -0
- package/es/oak-app-domain/RedInvoice/Storage.d.ts +3 -0
- package/es/oak-app-domain/RedInvoice/Storage.js +92 -0
- package/es/oak-app-domain/RedInvoice/Style.d.ts +3 -0
- package/es/oak-app-domain/RedInvoice/Style.js +15 -0
- package/es/oak-app-domain/RedInvoice/_baseSchema.d.ts +100 -0
- package/es/oak-app-domain/RedInvoice/_baseSchema.js +1 -0
- package/es/oak-app-domain/RedInvoice/locales/en_US.json +37 -0
- package/es/oak-app-domain/RedInvoice/locales/zh_CN.json +37 -0
- package/es/oak-app-domain/Storage.js +14 -0
- package/es/oak-app-domain/StyleDict.js +6 -0
- package/es/oak-app-domain/System/_baseSchema.d.ts +6 -0
- package/es/oak-app-domain/Version/Action.d.ts +6 -0
- package/es/oak-app-domain/Version/Action.js +2 -0
- package/es/oak-app-domain/Version/Schema.d.ts +19 -0
- package/es/oak-app-domain/Version/Schema.js +1 -0
- package/es/oak-app-domain/Version/Storage.d.ts +3 -0
- package/es/oak-app-domain/Version/Storage.js +54 -0
- package/es/oak-app-domain/Version/Style.d.ts +3 -0
- package/es/oak-app-domain/Version/Style.js +6 -0
- package/es/oak-app-domain/Version/_baseSchema.d.ts +57 -0
- package/es/oak-app-domain/Version/_baseSchema.js +1 -0
- package/es/oak-app-domain/Version/locales/en_US.json +21 -0
- package/es/oak-app-domain/Version/locales/zh_CN.json +21 -0
- package/es/registry.backend.d.ts +1 -0
- package/es/registry.backend.js +1 -0
- package/es/registry.frontend.d.ts +3 -0
- package/es/registry.frontend.js +2 -0
- package/es/triggers/account.js +2 -2
- package/es/triggers/accountOper.js +42 -1
- package/es/triggers/deposit.js +87 -1
- package/es/triggers/index.js +4 -0
- package/es/triggers/invoice.d.ts +7 -0
- package/es/triggers/invoice.js +642 -0
- package/es/triggers/pay.js +23 -4
- package/es/triggers/refund.js +48 -0
- package/es/triggers/system.js +20 -0
- package/es/triggers/withdraw.js +170 -1
- package/es/types/InvoiceClazz.d.ts +44 -0
- package/es/types/InvoiceClazz.js +1 -0
- package/es/utils/application.js +25 -0
- package/es/utils/exception.d.ts +3 -0
- package/es/utils/exception.js +13 -0
- package/es/utils/invoiceAmount.d.ts +9 -0
- package/es/utils/invoiceAmount.js +36 -0
- package/es/utils/invoiceClazz/NuonuoInvoiceClazz.d.ts +80 -0
- package/es/utils/invoiceClazz/NuonuoInvoiceClazz.js +676 -0
- package/es/utils/invoiceClazz/index.d.ts +16 -0
- package/es/utils/invoiceClazz/index.js +134 -0
- package/es/utils/payClazz/AliPay/AliPay.js +2 -2
- package/es/utils/payClazz/AliPay/config.d.ts +2 -0
- package/es/utils/payClazz/AliPay/config.js +10 -0
- package/es/watchers/index.js +3 -0
- package/es/watchers/invoice.d.ts +6 -0
- package/es/watchers/invoice.js +193 -0
- package/lib/aspects/AspectDict.d.ts +2 -0
- package/lib/aspects/index.js +2 -0
- package/lib/aspects/invoice.d.ts +7 -0
- package/lib/aspects/invoice.js +11 -0
- package/lib/checkers/accountOper.js +28 -0
- package/lib/checkers/index.js +4 -4
- package/lib/checkers/invoice.d.ts +5 -0
- package/lib/checkers/invoice.js +199 -0
- package/lib/checkers/pay.js +9 -3
- package/lib/checkers/redInvoice.d.ts +5 -0
- package/lib/checkers/redInvoice.js +174 -0
- package/lib/checkers/system.js +11 -0
- package/lib/configuration/attrUpdateMatrix.js +60 -0
- package/lib/configuration/relation.js +11 -1
- package/lib/context/BackendRuntimeContext.js +11 -1
- package/lib/context/FrontendRuntimeContext.d.ts +2 -2
- package/lib/context/FrontendRuntimeContext.js +5 -3
- package/lib/data/actionAuth.js +79 -1
- package/lib/data/path.js +70 -0
- package/lib/entities/AbstractInvoiceChannel.d.ts +10 -0
- package/lib/entities/AbstractInvoiceChannel.js +21 -0
- package/lib/entities/Account.d.ts +7 -1
- package/lib/entities/Account.js +24 -0
- package/lib/entities/AccountOper.d.ts +4 -1
- package/lib/entities/AccountOper.js +18 -0
- package/lib/entities/Deposit.d.ts +4 -1
- package/lib/entities/Deposit.js +4 -0
- package/lib/entities/Invoice.d.ts +44 -0
- package/lib/entities/Invoice.js +113 -0
- package/lib/entities/InvoicePay.d.ts +17 -0
- package/lib/entities/InvoicePay.js +22 -0
- package/lib/entities/NuonuoInvoice.d.ts +34 -0
- package/lib/entities/NuonuoInvoice.js +76 -0
- package/lib/entities/OfflineInvoice.d.ts +16 -0
- package/lib/entities/OfflineInvoice.js +38 -0
- package/lib/entities/Pay.js +1 -1
- package/lib/entities/RedInvoice.d.ts +35 -0
- package/lib/entities/RedInvoice.js +41 -0
- package/lib/entities/System.d.ts +6 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/locales/error/zh-CN.json +25 -1
- package/lib/oak-app-domain/AbstractInvoiceChannel/Schema.d.ts +19 -0
- package/lib/oak-app-domain/AbstractInvoiceChannel/Schema.js +4 -0
- package/lib/oak-app-domain/AbstractInvoiceChannel/Storage.d.ts +3 -0
- package/lib/oak-app-domain/AbstractInvoiceChannel/Storage.js +19 -0
- package/lib/oak-app-domain/AbstractInvoiceChannel/_baseSchema.d.ts +41 -0
- package/lib/oak-app-domain/AbstractInvoiceChannel/_baseSchema.js +2 -0
- package/lib/oak-app-domain/AbstractInvoiceChannel/locales/en_US.json +7 -0
- package/lib/oak-app-domain/AbstractInvoiceChannel/locales/zh_CN.json +7 -0
- package/lib/oak-app-domain/Account/Action.d.ts +1 -1
- package/lib/oak-app-domain/Account/Action.js +1 -1
- package/lib/oak-app-domain/Account/Storage.js +42 -0
- package/lib/oak-app-domain/Account/Style.js +5 -1
- package/lib/oak-app-domain/Account/_baseSchema.d.ts +24 -0
- package/lib/oak-app-domain/Account/locales/en_US.json +12 -2
- package/lib/oak-app-domain/Account/locales/zh_CN.json +12 -2
- package/lib/oak-app-domain/AccountOper/Storage.js +23 -2
- package/lib/oak-app-domain/AccountOper/Style.js +5 -1
- package/lib/oak-app-domain/AccountOper/_baseSchema.d.ts +15 -3
- package/lib/oak-app-domain/AccountOper/locales/en_US.json +8 -1
- package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +8 -1
- package/lib/oak-app-domain/ActionDefDict.d.ts +7 -0
- package/lib/oak-app-domain/ActionDefDict.js +86 -80
- package/lib/oak-app-domain/Deposit/Storage.js +12 -0
- package/lib/oak-app-domain/Deposit/_baseSchema.d.ts +9 -1
- package/lib/oak-app-domain/Deposit/locales/en_US.json +2 -0
- package/lib/oak-app-domain/Deposit/locales/zh_CN.json +2 -0
- package/lib/oak-app-domain/EntityDict.d.ts +556 -1
- package/lib/oak-app-domain/ExtraFile/Storage.js +1 -1
- package/lib/oak-app-domain/ExtraFile/_baseSchema.d.ts +2 -2
- package/lib/oak-app-domain/Invoice/Action.d.ts +11 -0
- package/lib/oak-app-domain/Invoice/Action.js +22 -0
- package/lib/oak-app-domain/Invoice/Schema.d.ts +19 -0
- package/lib/oak-app-domain/Invoice/Schema.js +4 -0
- package/lib/oak-app-domain/Invoice/Storage.d.ts +3 -0
- package/lib/oak-app-domain/Invoice/Storage.js +166 -0
- package/lib/oak-app-domain/Invoice/Style.d.ts +3 -0
- package/lib/oak-app-domain/Invoice/Style.js +27 -0
- package/lib/oak-app-domain/Invoice/_baseSchema.d.ts +131 -0
- package/lib/oak-app-domain/Invoice/_baseSchema.js +2 -0
- package/lib/oak-app-domain/Invoice/locales/en_US.json +54 -0
- package/lib/oak-app-domain/Invoice/locales/zh_CN.json +54 -0
- package/lib/oak-app-domain/InvoicePay/Schema.d.ts +19 -0
- package/lib/oak-app-domain/InvoicePay/Schema.js +4 -0
- package/lib/oak-app-domain/InvoicePay/Storage.d.ts +3 -0
- package/lib/oak-app-domain/InvoicePay/Storage.js +58 -0
- package/lib/oak-app-domain/InvoicePay/_baseSchema.d.ts +64 -0
- package/lib/oak-app-domain/InvoicePay/_baseSchema.js +2 -0
- package/lib/oak-app-domain/InvoicePay/locales/en_US.json +13 -0
- package/lib/oak-app-domain/InvoicePay/locales/zh_CN.json +13 -0
- package/lib/oak-app-domain/Log/Storage.js +4 -0
- package/lib/oak-app-domain/Log/_baseSchema.d.ts +5 -0
- package/lib/oak-app-domain/Log/locales/en_US.json +1 -0
- package/lib/oak-app-domain/Log/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/NuonuoInvoice/Schema.d.ts +19 -0
- package/lib/oak-app-domain/NuonuoInvoice/Schema.js +4 -0
- package/lib/oak-app-domain/NuonuoInvoice/Storage.d.ts +3 -0
- package/lib/oak-app-domain/NuonuoInvoice/Storage.js +168 -0
- package/lib/oak-app-domain/NuonuoInvoice/_baseSchema.d.ts +137 -0
- package/lib/oak-app-domain/NuonuoInvoice/_baseSchema.js +2 -0
- package/lib/oak-app-domain/NuonuoInvoice/locales/en_US.json +31 -0
- package/lib/oak-app-domain/NuonuoInvoice/locales/zh_CN.json +31 -0
- package/lib/oak-app-domain/OauthProvider/Storage.js +6 -0
- package/lib/oak-app-domain/OauthProvider/_baseSchema.d.ts +4 -0
- package/lib/oak-app-domain/OauthProvider/locales/en_US.json +1 -0
- package/lib/oak-app-domain/OauthProvider/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/OfflineInvoice/Schema.d.ts +19 -0
- package/lib/oak-app-domain/OfflineInvoice/Schema.js +4 -0
- package/lib/oak-app-domain/OfflineInvoice/Storage.d.ts +3 -0
- package/lib/oak-app-domain/OfflineInvoice/Storage.js +60 -0
- package/lib/oak-app-domain/OfflineInvoice/_baseSchema.d.ts +61 -0
- package/lib/oak-app-domain/OfflineInvoice/_baseSchema.js +2 -0
- package/lib/oak-app-domain/OfflineInvoice/locales/en_US.json +12 -0
- package/lib/oak-app-domain/OfflineInvoice/locales/zh_CN.json +12 -0
- package/lib/oak-app-domain/Passport/_baseSchema.d.ts +1 -1
- package/lib/oak-app-domain/Pay/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/RedInvoice/Action.d.ts +11 -0
- package/lib/oak-app-domain/RedInvoice/Action.js +16 -0
- package/lib/oak-app-domain/RedInvoice/Schema.d.ts +19 -0
- package/lib/oak-app-domain/RedInvoice/Schema.js +4 -0
- package/lib/oak-app-domain/RedInvoice/Storage.d.ts +3 -0
- package/lib/oak-app-domain/RedInvoice/Storage.js +95 -0
- package/lib/oak-app-domain/RedInvoice/Style.d.ts +3 -0
- package/lib/oak-app-domain/RedInvoice/Style.js +18 -0
- package/lib/oak-app-domain/RedInvoice/_baseSchema.d.ts +100 -0
- package/lib/oak-app-domain/RedInvoice/_baseSchema.js +2 -0
- package/lib/oak-app-domain/RedInvoice/locales/en_US.json +37 -0
- package/lib/oak-app-domain/RedInvoice/locales/zh_CN.json +37 -0
- package/lib/oak-app-domain/Storage.js +218 -204
- package/lib/oak-app-domain/StyleDict.js +126 -120
- package/lib/oak-app-domain/System/_baseSchema.d.ts +6 -0
- package/lib/oak-app-domain/Version/Action.d.ts +6 -0
- package/lib/oak-app-domain/Version/Action.js +5 -0
- package/lib/oak-app-domain/Version/Schema.d.ts +19 -0
- package/lib/oak-app-domain/Version/Schema.js +4 -0
- package/lib/oak-app-domain/Version/Storage.d.ts +3 -0
- package/lib/oak-app-domain/Version/Storage.js +57 -0
- package/lib/oak-app-domain/Version/Style.d.ts +3 -0
- package/lib/oak-app-domain/Version/Style.js +9 -0
- package/lib/oak-app-domain/Version/_baseSchema.d.ts +57 -0
- package/lib/oak-app-domain/Version/_baseSchema.js +2 -0
- package/lib/oak-app-domain/Version/locales/en_US.json +21 -0
- package/lib/oak-app-domain/Version/locales/zh_CN.json +21 -0
- package/lib/oak-app-domain/WechatLogin/Storage.js +1 -1
- package/lib/oak-app-domain/WechatQrCode/Storage.js +1 -1
- package/lib/registry.backend.d.ts +1 -0
- package/lib/registry.backend.js +4 -1
- package/lib/triggers/account.js +2 -2
- package/lib/triggers/accountOper.js +41 -0
- package/lib/triggers/deposit.js +86 -0
- package/lib/triggers/index.js +4 -0
- package/lib/triggers/invoice.d.ts +7 -0
- package/lib/triggers/invoice.js +646 -0
- package/lib/triggers/pay.js +23 -4
- package/lib/triggers/refund.js +48 -0
- package/lib/triggers/system.js +20 -0
- package/lib/triggers/withdraw.js +169 -0
- package/lib/types/InvoiceClazz.d.ts +44 -0
- package/lib/types/InvoiceClazz.js +2 -0
- package/lib/utils/application.js +25 -0
- package/lib/utils/exception.d.ts +3 -0
- package/lib/utils/exception.js +16 -0
- package/lib/utils/invoiceAmount.d.ts +9 -0
- package/lib/utils/invoiceAmount.js +40 -0
- package/lib/utils/invoiceClazz/NuonuoInvoiceClazz.d.ts +80 -0
- package/lib/utils/invoiceClazz/NuonuoInvoiceClazz.js +680 -0
- package/lib/utils/invoiceClazz/index.d.ts +16 -0
- package/lib/utils/invoiceClazz/index.js +143 -0
- package/lib/utils/payClazz/AliPay/AliPay.js +2 -2
- package/lib/utils/payClazz/AliPay/config.d.ts +2 -0
- package/lib/utils/payClazz/AliPay/config.js +13 -0
- package/lib/watchers/index.js +3 -0
- package/lib/watchers/invoice.d.ts +6 -0
- package/lib/watchers/invoice.js +196 -0
- package/package.json +12 -8
- package/src/components/account/detail/index.ts +32 -0
- package/src/components/account/detail/invoice/apply/index.ts +391 -0
- package/src/components/account/detail/invoice/history/index.ts +107 -0
- package/src/components/apAccount/upsert/index.ts +2 -1
- package/src/components/invoice/manage/index.ts +110 -0
- package/src/components/invoice/manage/manualItem/index.ts +75 -0
- package/src/components/invoiceConfig/system/index.ts +44 -0
- package/src/components/nuonuoInvoice/config/index.ts +48 -0
- package/src/components/nuonuoInvoice/upsert/index.ts +53 -0
- package/src/components/offlineInvoice/config/index.ts +31 -0
- package/src/components/offlineInvoice/upsert/index.ts +34 -0
- package/src/components/pay/detail/index.ts +1 -4
- package/src/components/pay/list/index.ts +41 -1
- package/src/components/redInvoice/apply/index.ts +39 -0
- package/src/components/redInvoice/manage/index.ts +72 -0
- package/src/components/redInvoice/manage/manualItem/index.ts +62 -0
- package/src/components/sysAccount/orderList/index.ts +34 -0
- package/src/components/sysAccount/refundList/index.ts +44 -0
- package/src/entities/AbstractInvoiceChannel.ts +29 -0
- package/src/entities/Account.ts +32 -1
- package/src/entities/AccountOper.ts +23 -1
- package/src/entities/Deposit.ts +7 -0
- package/src/entities/Invoice.ts +177 -0
- package/src/entities/InvoicePay.ts +36 -0
- package/src/entities/NuonuoInvoice.ts +108 -0
- package/src/entities/OfflineInvoice.ts +52 -0
- package/src/entities/Pay.ts +1 -1
- package/src/entities/RedInvoice.ts +73 -0
- package/src/entities/System.ts +6 -0
- package/template/initializeFeatures.ts +4 -6
- package/template/src/pages/console/invoice/manage/index.config.ts +16 -0
- package/template/src/pages/console/invoice/manage/index.json +1 -0
- package/template/src/pages/console/invoice/manage/index.ts +11 -0
- package/template/src/pages/console/invoice/manage/locales/zh-CN.json +5 -0
- package/template/src/pages/console/invoice/manage/web.pc.tsx +47 -0
- package/template/src/pages/console/system/invoiceConfig/index.config.ts +16 -0
- package/template/src/pages/console/system/invoiceConfig/index.json +1 -0
- package/template/src/pages/console/system/invoiceConfig/index.ts +11 -0
- package/template/src/pages/console/system/invoiceConfig/locales/zh-CN.json +3 -0
- package/template/src/pages/console/system/invoiceConfig/web.pc.tsx +27 -0
- package/es/checkers/deposit.js +0 -82
- package/es/checkers/withdraw.js +0 -178
- package/lib/checkers/deposit.js +0 -84
- package/lib/checkers/withdraw.js +0 -180
- package/template/src/entities/System.ts +0 -32
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
|
2
2
|
import { EntityDict } from '../oak-app-domain';
|
|
3
3
|
export type AspectDict<ED extends EntityDict> = {
|
|
4
|
+
/** 返回当前后端已注册的开票渠道标识。 */
|
|
5
|
+
getInvoiceChannels: (params: {}, context: BackendRuntimeContext<ED>) => Promise<string[]>;
|
|
4
6
|
getWithdrawCreateData: (params: {
|
|
5
7
|
accountId: string;
|
|
6
8
|
price: string;
|
package/es/aspects/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getWithdrawCreateData } from './withdraw';
|
|
2
2
|
import { getExpressPrintInfo, getMpShipState, shipConfirmSuccess } from './ship';
|
|
3
|
+
import { getInvoiceChannels } from './invoice';
|
|
3
4
|
const aspectDict = {
|
|
5
|
+
getInvoiceChannels,
|
|
4
6
|
getMpShipState,
|
|
5
7
|
getWithdrawCreateData,
|
|
6
8
|
getExpressPrintInfo,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
|
2
|
+
import { EntityDict } from '../oak-app-domain';
|
|
3
|
+
/**
|
|
4
|
+
* Only expose channel identifiers. Invoice constructors and their credentials
|
|
5
|
+
* remain backend-only implementation details.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getInvoiceChannels(_params: {}, _context: BackendRuntimeContext<EntityDict>): Promise<string[]>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getInvoiceChannels as getRegisteredInvoiceChannels } from '../utils/invoiceClazz';
|
|
2
|
+
/**
|
|
3
|
+
* Only expose channel identifiers. Invoice constructors and their credentials
|
|
4
|
+
* remain backend-only implementation details.
|
|
5
|
+
*/
|
|
6
|
+
export async function getInvoiceChannels(_params, _context) {
|
|
7
|
+
return Array.from(new Set(['manual', 'offline', ...getRegisteredInvoiceChannels()]));
|
|
8
|
+
}
|
|
@@ -26,6 +26,13 @@ const checkers = [
|
|
|
26
26
|
if (typeof availPlus !== 'string') {
|
|
27
27
|
throw new OakInputIllegalException('accountOper', ['availPlus'], 'accountOper中的availPlus不是数字');
|
|
28
28
|
}
|
|
29
|
+
// Applications can extend the polymorphic accountOper relation.
|
|
30
|
+
// Keep the closed-loop check aligned with the generated runtime schema.
|
|
31
|
+
const entityRef = context.getSchema().accountOper.attributes.entity.ref;
|
|
32
|
+
assert(typeof data.entity === 'string'
|
|
33
|
+
&& (Array.isArray(entityRef)
|
|
34
|
+
? entityRef.includes(data.entity)
|
|
35
|
+
: entityRef === data.entity));
|
|
29
36
|
switch (type) {
|
|
30
37
|
case 'consume': {
|
|
31
38
|
if (decimalGt(totalPlus, '0') || decimalGt(availPlus, '0') || decimalGt(totalPlus, availPlus)) {
|
|
@@ -96,6 +103,20 @@ const checkers = [
|
|
|
96
103
|
}
|
|
97
104
|
break;
|
|
98
105
|
}
|
|
106
|
+
case 'grant': {
|
|
107
|
+
if (decimalLte(totalPlus, '0') || decimalLte(availPlus, '0') || !decimalEq(totalPlus, availPlus)
|
|
108
|
+
|| typeof refundablePlus !== 'string' || !decimalEq(refundablePlus, '0')) {
|
|
109
|
+
throw new OakInputIllegalException('accountOper', ['totalPlus', 'availPlus', 'refundablePlus'], 'accountOper为grant时,其totalPlus和availPlus必须为相等的正数,refundablePlus必须为0');
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
case 'grantRevoke': {
|
|
114
|
+
if (decimalGte(totalPlus, '0') || decimalGte(availPlus, '0') || !decimalEq(totalPlus, availPlus)
|
|
115
|
+
|| typeof refundablePlus !== 'string' || !decimalEq(refundablePlus, '0')) {
|
|
116
|
+
throw new OakInputIllegalException('accountOper', ['totalPlus', 'availPlus', 'refundablePlus'], 'accountOper为grantRevoke时,其totalPlus和availPlus必须为相等的负数,refundablePlus必须为0');
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
99
120
|
case 'cutoffRefundable': {
|
|
100
121
|
if (!decimalEq(totalPlus, '0') || !decimalEq(availPlus, '0') || typeof refundablePlus !== 'string' || decimalGte(refundablePlus, '0')) {
|
|
101
122
|
throw new OakInputIllegalException('accountOper', ['refundablePlus'], 'accountOper为cutoffRefundable时,其totalPlus/availPlus必须为0,且refundablePlus必须为负数');
|
|
@@ -128,6 +149,13 @@ const checkers = [
|
|
|
128
149
|
}
|
|
129
150
|
break;
|
|
130
151
|
}
|
|
152
|
+
case 'invoiceReserve':
|
|
153
|
+
case 'invoiceRelease': {
|
|
154
|
+
if (!decimalEq(totalPlus, '0') || !decimalEq(availPlus, '0')) {
|
|
155
|
+
throw new OakInputIllegalException('accountOper', ['totalPlus', 'availPlus'], 'Invoice account operations must not change the account balance');
|
|
156
|
+
}
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
131
159
|
default: {
|
|
132
160
|
// assert(false);
|
|
133
161
|
break;
|
package/es/checkers/index.js
CHANGED
|
@@ -14,13 +14,13 @@ import refundCheckers from './refund';
|
|
|
14
14
|
import withdrawTransferCheckers from './withdrawTransfer';
|
|
15
15
|
import shipCheckers from './ship';
|
|
16
16
|
import settlePlanCheckers from './settlePlan';
|
|
17
|
-
import depositCheckers from './deposit';
|
|
18
|
-
import withdrawCheckers from './withdraw';
|
|
19
17
|
import systemCheckers from './system';
|
|
18
|
+
import invoiceCheckers from './invoice';
|
|
19
|
+
import redInvoiceCheckers from './redInvoice';
|
|
20
20
|
const checkers = [
|
|
21
21
|
...systemCheckers,
|
|
22
|
-
...
|
|
23
|
-
...
|
|
22
|
+
...invoiceCheckers,
|
|
23
|
+
...redInvoiceCheckers,
|
|
24
24
|
...refundCheckers,
|
|
25
25
|
...withdrawAccounts,
|
|
26
26
|
...abstractCheckers,
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { OakInputIllegalException } from 'oak-domain/es/types';
|
|
2
|
+
import { pipeline } from 'oak-domain/es/utils/executor';
|
|
3
|
+
import { decimalAdd, decimalGt, decimalLt } from 'oak-domain/es/utils/decimal';
|
|
4
|
+
import assert from 'assert';
|
|
5
|
+
function getEvidenceCreate(data) {
|
|
6
|
+
const nested = getNestedExtraFile(data);
|
|
7
|
+
if (nested) {
|
|
8
|
+
const operations = Array.isArray(nested) ? nested : [nested];
|
|
9
|
+
for (const operation of operations) {
|
|
10
|
+
if (!operation || typeof operation !== 'object')
|
|
11
|
+
continue;
|
|
12
|
+
const op = operation;
|
|
13
|
+
if (op.action !== 'create' || !op.data || typeof op.data !== 'object')
|
|
14
|
+
continue;
|
|
15
|
+
const records = Array.isArray(op.data) ? op.data : [op.data];
|
|
16
|
+
for (const record of records) {
|
|
17
|
+
if (record && typeof record === 'object') {
|
|
18
|
+
return record;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
function getNestedExtraFile(data) {
|
|
26
|
+
return data.extraFile$entity;
|
|
27
|
+
}
|
|
28
|
+
const checkers = [
|
|
29
|
+
{
|
|
30
|
+
entity: 'invoice', action: 'create', type: 'logicalData',
|
|
31
|
+
checker(operation, context) {
|
|
32
|
+
const data = operation.data;
|
|
33
|
+
if (data instanceof Array)
|
|
34
|
+
return;
|
|
35
|
+
const nested = data.invoicePay$invoice || [];
|
|
36
|
+
const details = nested.flatMap((op) => {
|
|
37
|
+
assert(op.action === 'create', 'invoice details must be create operations');
|
|
38
|
+
return op.data instanceof Array ? op.data : [op.data];
|
|
39
|
+
});
|
|
40
|
+
if (!details.length)
|
|
41
|
+
throw new OakInputIllegalException('invoice', ['invoicePay$invoice'], 'invoice.detailsRequired');
|
|
42
|
+
return pipeline(() => context.select('application', {
|
|
43
|
+
data: {
|
|
44
|
+
id: 1,
|
|
45
|
+
system: {
|
|
46
|
+
id: 1,
|
|
47
|
+
payConfig: 1,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
filter: { id: data.applicationId },
|
|
51
|
+
}, { dontCollect: true }), (applications) => {
|
|
52
|
+
const application = applications[0];
|
|
53
|
+
return pipeline(() => context.select('pay', {
|
|
54
|
+
data: {
|
|
55
|
+
id: 1,
|
|
56
|
+
currency: 1,
|
|
57
|
+
entity: 1,
|
|
58
|
+
iState: 1,
|
|
59
|
+
applicationId: 1,
|
|
60
|
+
},
|
|
61
|
+
filter: { id: { $in: details.map((d) => d.payId) } },
|
|
62
|
+
}, { dontCollect: true }), (pays) => {
|
|
63
|
+
if (pays.length !== details.length) {
|
|
64
|
+
throw new OakInputIllegalException('invoice', ['invoicePay$invoice'], 'invoice.payNotFound');
|
|
65
|
+
}
|
|
66
|
+
for (const d of details) {
|
|
67
|
+
const pay = pays.find((p) => p.id === d.payId);
|
|
68
|
+
if (!pay) {
|
|
69
|
+
throw new OakInputIllegalException('invoice', ['invoicePay$invoice'], 'invoice.payNotFound');
|
|
70
|
+
}
|
|
71
|
+
if (pay.entity === 'account'
|
|
72
|
+
|| pay.applicationId !== data.applicationId
|
|
73
|
+
|| pay.currency !== data.currency
|
|
74
|
+
|| pay.iState !== 'paid'
|
|
75
|
+
|| !decimalGt(d.price, '0')) {
|
|
76
|
+
throw new OakInputIllegalException('invoice', ['invoicePay$invoice'], 'invoice.payNotInvoiceable');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const invoiceMinCent = application?.system?.payConfig?.invoiceMinCent;
|
|
80
|
+
const selectedAmount = details.reduce((total, detail) => decimalAdd(total, detail.price), '0');
|
|
81
|
+
if (invoiceMinCent !== undefined
|
|
82
|
+
&& invoiceMinCent > 0
|
|
83
|
+
&& decimalLt(selectedAmount, String(invoiceMinCent))) {
|
|
84
|
+
throw new OakInputIllegalException('invoice', ['invoicePay$invoice'], 'invoice.amountBelowMinimum');
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
entity: 'invoice', action: ['succeed', 'manualSucceed'], type: 'data',
|
|
92
|
+
checker(data) {
|
|
93
|
+
if (!data || data instanceof Array)
|
|
94
|
+
return;
|
|
95
|
+
if (!data.invoiceNo?.trim()) {
|
|
96
|
+
throw new OakInputIllegalException('invoice', ['invoiceNo'], 'invoice.evidenceRequired');
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
entity: 'invoice', action: 'manualSucceed', type: 'data',
|
|
102
|
+
checker(data) {
|
|
103
|
+
if (!data || data instanceof Array)
|
|
104
|
+
return;
|
|
105
|
+
if (!data.invoiceDate) {
|
|
106
|
+
throw new OakInputIllegalException('invoice', ['invoiceDate'], 'invoice.invoiceDateRequired');
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
entity: 'invoice', action: ['fail', 'manualFail'], type: 'data',
|
|
112
|
+
checker(data) {
|
|
113
|
+
if (!data || data instanceof Array)
|
|
114
|
+
return;
|
|
115
|
+
if (!data.reason?.trim())
|
|
116
|
+
throw new OakInputIllegalException('invoice', ['reason'], 'invoice.reasonRequired');
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
entity: 'invoice', action: ['manualSucceed', 'manualFail'], type: 'row',
|
|
121
|
+
filter: { channel: { $in: ['offline', 'manual'] } },
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
entity: 'invoice', action: 'manualSucceed', type: 'logicalData',
|
|
125
|
+
checker(operation, context) {
|
|
126
|
+
const { data, filter } = operation;
|
|
127
|
+
const mutableData = data;
|
|
128
|
+
const evidenceCreate = getEvidenceCreate(mutableData);
|
|
129
|
+
if (evidenceCreate) {
|
|
130
|
+
const extension = typeof evidenceCreate.extension === 'string'
|
|
131
|
+
? evidenceCreate.extension.toLowerCase()
|
|
132
|
+
: '';
|
|
133
|
+
const fileType = typeof evidenceCreate.fileType === 'string'
|
|
134
|
+
? evidenceCreate.fileType
|
|
135
|
+
: '';
|
|
136
|
+
const isSupported = fileType === 'application/pdf'
|
|
137
|
+
|| fileType.startsWith('image/')
|
|
138
|
+
|| extension === 'pdf'
|
|
139
|
+
|| ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp'].includes(extension);
|
|
140
|
+
if (evidenceCreate.entity !== 'invoice'
|
|
141
|
+
|| evidenceCreate.entityId !== filter?.id
|
|
142
|
+
|| !isSupported
|
|
143
|
+
|| (typeof evidenceCreate.size === 'number' && evidenceCreate.size > 20 * 1024 * 1024)) {
|
|
144
|
+
throw new OakInputIllegalException('invoice', ['files'], 'invoice.invalidEvidence');
|
|
145
|
+
}
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const externalMeta = mutableData.externalMeta;
|
|
149
|
+
const externalFileUrl = externalMeta && (externalMeta.fileUrl
|
|
150
|
+
|| externalMeta.pdfUrl
|
|
151
|
+
|| (externalMeta.result && typeof externalMeta.result === 'object'
|
|
152
|
+
? externalMeta.result.pdfUrl
|
|
153
|
+
: undefined));
|
|
154
|
+
if (typeof externalFileUrl === 'string')
|
|
155
|
+
return;
|
|
156
|
+
// 本地开发时允许先确认开票信息,附件可以稍后补传;生产环境仍必须提供凭证。
|
|
157
|
+
if (process.env.NODE_ENV === 'development')
|
|
158
|
+
return;
|
|
159
|
+
return pipeline(() => context.select('extraFile', {
|
|
160
|
+
data: {
|
|
161
|
+
id: 1,
|
|
162
|
+
entity: 1,
|
|
163
|
+
entityId: 1,
|
|
164
|
+
fileType: 1,
|
|
165
|
+
extension: 1,
|
|
166
|
+
size: 1,
|
|
167
|
+
},
|
|
168
|
+
filter: { entity: 'invoice', entityId: filter?.id },
|
|
169
|
+
}, { dontCollect: true }), (files) => {
|
|
170
|
+
const file = files.find((candidate) => candidate.entity === 'invoice' && candidate.entityId === filter?.id);
|
|
171
|
+
const extension = file?.extension?.toLowerCase();
|
|
172
|
+
const isSupported = file?.fileType === 'application/pdf'
|
|
173
|
+
|| file?.fileType?.startsWith('image/')
|
|
174
|
+
|| extension === 'pdf'
|
|
175
|
+
|| ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp'].includes(extension || '');
|
|
176
|
+
if (!file
|
|
177
|
+
|| file.entity !== 'invoice'
|
|
178
|
+
|| !isSupported
|
|
179
|
+
|| (file.size || 0) > 20 * 1024 * 1024) {
|
|
180
|
+
throw new OakInputIllegalException('invoice', ['files'], 'invoice.invalidEvidence');
|
|
181
|
+
}
|
|
182
|
+
return context.select('invoice', {
|
|
183
|
+
data: { id: 1 },
|
|
184
|
+
filter: {
|
|
185
|
+
$and: [filter, { id: file.entityId }],
|
|
186
|
+
},
|
|
187
|
+
}, { dontCollect: true });
|
|
188
|
+
}, (invoices) => {
|
|
189
|
+
if (invoices.length !== 1) {
|
|
190
|
+
throw new OakInputIllegalException('invoice', ['files'], 'invoice.invalidEvidence');
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
];
|
|
196
|
+
export default checkers;
|
package/es/checkers/pay.js
CHANGED
|
@@ -48,12 +48,18 @@ const checkers = [
|
|
|
48
48
|
const dataList = operationData instanceof Array
|
|
49
49
|
? operationData
|
|
50
50
|
: [operationData];
|
|
51
|
-
const defaultCurrency =
|
|
51
|
+
const defaultCurrency = dataList.some((data) => !data.currency)
|
|
52
|
+
? normalizePayCurrency(context.getApplication()?.system?.payConfig?.defaultCurrency, 'CNY')
|
|
53
|
+
: 'CNY';
|
|
52
54
|
dataList.forEach((data) => {
|
|
53
55
|
data.refunded = toDecimalString('0');
|
|
54
56
|
data.paid = toDecimalString('0');
|
|
55
|
-
data.applicationId
|
|
56
|
-
|
|
57
|
+
if (!data.applicationId) {
|
|
58
|
+
data.applicationId = context.getApplicationId();
|
|
59
|
+
}
|
|
60
|
+
if (!data.creatorId) {
|
|
61
|
+
data.creatorId = context.getCurrentUserId();
|
|
62
|
+
}
|
|
57
63
|
data.refundable = false;
|
|
58
64
|
data.meta = data.meta || {};
|
|
59
65
|
checkPayPrice(data);
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { OakInputIllegalException } from 'oak-domain/es/types';
|
|
2
|
+
import { pipeline } from 'oak-domain/es/utils/executor';
|
|
3
|
+
import { decimalAdd, decimalGt, decimalLt, decimalSub } from 'oak-domain/es/utils/decimal';
|
|
4
|
+
function getEvidenceCreate(data) {
|
|
5
|
+
const nested = getNestedExtraFile(data);
|
|
6
|
+
if (nested) {
|
|
7
|
+
const operations = Array.isArray(nested) ? nested : [nested];
|
|
8
|
+
for (const operation of operations) {
|
|
9
|
+
if (!operation || typeof operation !== 'object')
|
|
10
|
+
continue;
|
|
11
|
+
const op = operation;
|
|
12
|
+
if (op.action !== 'create' || !op.data || typeof op.data !== 'object')
|
|
13
|
+
continue;
|
|
14
|
+
const records = Array.isArray(op.data) ? op.data : [op.data];
|
|
15
|
+
for (const record of records) {
|
|
16
|
+
if (record && typeof record === 'object') {
|
|
17
|
+
return record;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
function getNestedExtraFile(data) {
|
|
25
|
+
return data.extraFile$entity;
|
|
26
|
+
}
|
|
27
|
+
const checkers = [
|
|
28
|
+
{
|
|
29
|
+
entity: 'redInvoice',
|
|
30
|
+
action: 'create',
|
|
31
|
+
type: 'logicalData',
|
|
32
|
+
checker(operation, context) {
|
|
33
|
+
const data = operation.data;
|
|
34
|
+
if (data instanceof Array)
|
|
35
|
+
return;
|
|
36
|
+
if (!data.invoiceId || !decimalGt(data.price, '0')) {
|
|
37
|
+
throw new OakInputIllegalException('redInvoice', ['invoiceId', 'price'], 'redInvoice.invalid');
|
|
38
|
+
}
|
|
39
|
+
return pipeline(() => context.select('invoice', {
|
|
40
|
+
data: {
|
|
41
|
+
id: 1,
|
|
42
|
+
price: 1,
|
|
43
|
+
iState: 1,
|
|
44
|
+
redInvoice$invoice: {
|
|
45
|
+
$entity: 'redInvoice',
|
|
46
|
+
data: { id: 1, price: 1, iState: 1 },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
filter: { id: data.invoiceId },
|
|
50
|
+
}, { dontCollect: true }), (invoices) => {
|
|
51
|
+
const invoice = invoices[0];
|
|
52
|
+
if (!invoice || !['successful', 'partiallyRedSuccessful'].includes(invoice.iState || '')) {
|
|
53
|
+
throw new OakInputIllegalException('redInvoice', ['invoiceId'], 'redInvoice.invoiceInvalid');
|
|
54
|
+
}
|
|
55
|
+
let successful = '0';
|
|
56
|
+
for (const red of invoice.redInvoice$invoice || []) {
|
|
57
|
+
if (red.iState === 'applying') {
|
|
58
|
+
throw new OakInputIllegalException('redInvoice', ['invoiceId'], 'redInvoice.applyingExists');
|
|
59
|
+
}
|
|
60
|
+
if (red.iState === 'successful') {
|
|
61
|
+
successful = decimalAdd(successful, red.price);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (decimalLt(decimalSub(invoice.price, successful), data.price)) {
|
|
65
|
+
throw new OakInputIllegalException('redInvoice', ['price'], 'redInvoice.amountExceeded');
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
entity: 'redInvoice', action: ['succeed', 'manualSucceed'], type: 'data',
|
|
72
|
+
checker(data) {
|
|
73
|
+
if (!data || data instanceof Array)
|
|
74
|
+
return;
|
|
75
|
+
if (!data.redInvoiceNo?.trim()) {
|
|
76
|
+
throw new OakInputIllegalException('redInvoice', ['redInvoiceNo'], 'redInvoice.evidenceRequired');
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
entity: 'redInvoice', action: 'manualSucceed', type: 'data',
|
|
82
|
+
checker(data) {
|
|
83
|
+
if (!data || data instanceof Array)
|
|
84
|
+
return;
|
|
85
|
+
if (!data.successAt) {
|
|
86
|
+
throw new OakInputIllegalException('redInvoice', ['successAt'], 'redInvoice.successAtRequired');
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
entity: 'redInvoice', action: ['manualSucceed', 'manualFail'], type: 'row',
|
|
92
|
+
filter: { invoice: { channel: { $in: ['offline', 'manual'] } } },
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
entity: 'redInvoice', action: ['fail', 'manualFail'], type: 'data',
|
|
96
|
+
checker(data) {
|
|
97
|
+
if (!data || data instanceof Array)
|
|
98
|
+
return;
|
|
99
|
+
if (!data.failureReason?.trim()) {
|
|
100
|
+
throw new OakInputIllegalException('redInvoice', ['failureReason'], 'redInvoice.reasonRequired');
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
entity: 'redInvoice', action: 'manualSucceed', type: 'logicalData',
|
|
106
|
+
checker(operation, context) {
|
|
107
|
+
const { data, filter } = operation;
|
|
108
|
+
const mutableData = data;
|
|
109
|
+
const evidenceCreate = getEvidenceCreate(mutableData);
|
|
110
|
+
if (evidenceCreate) {
|
|
111
|
+
const extension = typeof evidenceCreate.extension === 'string'
|
|
112
|
+
? evidenceCreate.extension.toLowerCase()
|
|
113
|
+
: '';
|
|
114
|
+
const fileType = typeof evidenceCreate.fileType === 'string'
|
|
115
|
+
? evidenceCreate.fileType
|
|
116
|
+
: '';
|
|
117
|
+
const isSupported = fileType === 'application/pdf'
|
|
118
|
+
|| fileType.startsWith('image/')
|
|
119
|
+
|| extension === 'pdf'
|
|
120
|
+
|| ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp'].includes(extension);
|
|
121
|
+
if (evidenceCreate.entity !== 'redInvoice'
|
|
122
|
+
|| evidenceCreate.entityId !== filter?.id
|
|
123
|
+
|| !isSupported
|
|
124
|
+
|| (typeof evidenceCreate.size === 'number' && evidenceCreate.size > 20 * 1024 * 1024)) {
|
|
125
|
+
throw new OakInputIllegalException('redInvoice', ['files'], 'redInvoice.invalidEvidence');
|
|
126
|
+
}
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const externalMeta = mutableData.externalMeta;
|
|
130
|
+
if (typeof externalMeta?.fileUrl === 'string')
|
|
131
|
+
return;
|
|
132
|
+
// 本地开发时允许先确认冲红信息,附件可以稍后补传;生产环境仍必须提供凭证。
|
|
133
|
+
if (process.env.NODE_ENV === 'development')
|
|
134
|
+
return;
|
|
135
|
+
return pipeline(() => context.select('extraFile', {
|
|
136
|
+
data: {
|
|
137
|
+
id: 1,
|
|
138
|
+
entity: 1,
|
|
139
|
+
entityId: 1,
|
|
140
|
+
fileType: 1,
|
|
141
|
+
extension: 1,
|
|
142
|
+
size: 1,
|
|
143
|
+
},
|
|
144
|
+
filter: { entity: 'redInvoice', entityId: filter?.id },
|
|
145
|
+
}, { dontCollect: true }), (files) => {
|
|
146
|
+
const file = files.find((candidate) => candidate.entity === 'redInvoice' && candidate.entityId === filter?.id);
|
|
147
|
+
const extension = file?.extension?.toLowerCase();
|
|
148
|
+
const isSupported = file?.fileType === 'application/pdf'
|
|
149
|
+
|| file?.fileType?.startsWith('image/')
|
|
150
|
+
|| extension === 'pdf'
|
|
151
|
+
|| ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp'].includes(extension || '');
|
|
152
|
+
if (!file
|
|
153
|
+
|| file.entity !== 'redInvoice'
|
|
154
|
+
|| !isSupported
|
|
155
|
+
|| (file.size || 0) > 20 * 1024 * 1024) {
|
|
156
|
+
throw new OakInputIllegalException('redInvoice', ['files'], 'redInvoice.invalidEvidence');
|
|
157
|
+
}
|
|
158
|
+
return context.select('redInvoice', {
|
|
159
|
+
data: { id: 1 },
|
|
160
|
+
filter: {
|
|
161
|
+
$and: [filter, { id: file.entityId }],
|
|
162
|
+
},
|
|
163
|
+
}, { dontCollect: true });
|
|
164
|
+
}, (redInvoices) => {
|
|
165
|
+
if (redInvoices.length !== 1) {
|
|
166
|
+
throw new OakInputIllegalException('redInvoice', ['files'], 'redInvoice.invalidEvidence');
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
];
|
|
172
|
+
export default checkers;
|
package/es/checkers/system.js
CHANGED
|
@@ -22,6 +22,12 @@ function checkBounds(lowest, highest, prefix) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
export function normalizeAndCheckPayConfig(payConfig) {
|
|
25
|
+
if (payConfig.invoiceChannel !== undefined) {
|
|
26
|
+
if (typeof payConfig.invoiceChannel !== 'string' || payConfig.invoiceChannel.length > 32) {
|
|
27
|
+
throwInvalidPayConfig('开票渠道必须是32位以内的字符串');
|
|
28
|
+
}
|
|
29
|
+
payConfig.invoiceChannel = payConfig.invoiceChannel.trim() || undefined;
|
|
30
|
+
}
|
|
25
31
|
if (payConfig.defaultCurrency !== undefined) {
|
|
26
32
|
const currency = normalizeCurrencyCode(payConfig.defaultCurrency);
|
|
27
33
|
if (currency && !isCurrencyCode(currency)) {
|
|
@@ -34,6 +40,11 @@ export function normalizeAndCheckPayConfig(payConfig) {
|
|
|
34
40
|
|| payConfig.depositMinCent < 0)) {
|
|
35
41
|
throwInvalidPayConfig('最低充值金额必须是非负整数');
|
|
36
42
|
}
|
|
43
|
+
if (payConfig.invoiceMinCent !== undefined
|
|
44
|
+
&& (!Number.isSafeInteger(payConfig.invoiceMinCent)
|
|
45
|
+
|| payConfig.invoiceMinCent < 0)) {
|
|
46
|
+
throwInvalidPayConfig('最低开票金额必须是非负整数');
|
|
47
|
+
}
|
|
37
48
|
const { depositLoss, withdrawLoss } = payConfig;
|
|
38
49
|
if (depositLoss) {
|
|
39
50
|
checkLimit(depositLoss.ratio, '充值手续费比例', { max: 20 });
|
|
@@ -14,6 +14,18 @@ declare const _default: (props: import("oak-frontend-base/es").ReactComponentPro
|
|
|
14
14
|
onGoToHistory: () => void;
|
|
15
15
|
showLoanAmount: boolean;
|
|
16
16
|
showWithdrawAction: boolean;
|
|
17
|
+
enableInvoice: boolean;
|
|
18
|
+
invoiceBuyerName: string;
|
|
19
|
+
invoiceBuyerTaxNo: string;
|
|
20
|
+
invoiceBuyerTel: string;
|
|
21
|
+
invoiceBuyerPhone: string;
|
|
22
|
+
invoiceBuyerAddress: string;
|
|
23
|
+
invoiceBuyerAccount: string;
|
|
24
|
+
showBuyerOptionalFields: boolean;
|
|
25
|
+
showInvoiceOptions: boolean;
|
|
26
|
+
showDeliveryOptions: boolean;
|
|
27
|
+
showDetailOptions: boolean;
|
|
28
|
+
allowAmountEdit: boolean;
|
|
17
29
|
depositActionText: string;
|
|
18
30
|
extraActions: React.ReactNode | undefined;
|
|
19
31
|
}>) => React.ReactElement;
|
|
@@ -81,6 +81,18 @@ export default OakComponent({
|
|
|
81
81
|
onGoToHistory: () => undefined,
|
|
82
82
|
showLoanAmount: true,
|
|
83
83
|
showWithdrawAction: true,
|
|
84
|
+
enableInvoice: false,
|
|
85
|
+
invoiceBuyerName: '',
|
|
86
|
+
invoiceBuyerTaxNo: '',
|
|
87
|
+
invoiceBuyerTel: '',
|
|
88
|
+
invoiceBuyerPhone: '',
|
|
89
|
+
invoiceBuyerAddress: '',
|
|
90
|
+
invoiceBuyerAccount: '',
|
|
91
|
+
showBuyerOptionalFields: false,
|
|
92
|
+
showInvoiceOptions: false,
|
|
93
|
+
showDeliveryOptions: false,
|
|
94
|
+
showDetailOptions: false,
|
|
95
|
+
allowAmountEdit: false,
|
|
84
96
|
depositActionText: '',
|
|
85
97
|
extraActions: undefined,
|
|
86
98
|
},
|
|
@@ -252,6 +264,24 @@ export default OakComponent({
|
|
|
252
264
|
setDepositing(depositing) {
|
|
253
265
|
this.setState({ depositing });
|
|
254
266
|
},
|
|
267
|
+
setInvoiceApplyOpen(invoiceApplyOpen) {
|
|
268
|
+
this.setState({ invoiceApplyOpen });
|
|
269
|
+
},
|
|
270
|
+
setInvoiceHistoryOpen(invoiceHistoryOpen) {
|
|
271
|
+
this.setState({ invoiceHistoryOpen });
|
|
272
|
+
},
|
|
273
|
+
openInvoiceApply() {
|
|
274
|
+
this.setState({ invoiceApplyOpen: true, invoiceHistoryOpen: false });
|
|
275
|
+
},
|
|
276
|
+
closeInvoiceApply() {
|
|
277
|
+
this.setState({ invoiceApplyOpen: false });
|
|
278
|
+
},
|
|
279
|
+
openInvoiceHistory() {
|
|
280
|
+
this.setState({ invoiceHistoryOpen: true, invoiceApplyOpen: false });
|
|
281
|
+
},
|
|
282
|
+
closeInvoiceHistory() {
|
|
283
|
+
this.setState({ invoiceHistoryOpen: false });
|
|
284
|
+
},
|
|
255
285
|
async onDepositClick() {
|
|
256
286
|
const { preWithdraw } = this.props;
|
|
257
287
|
if (preWithdraw) {
|
|
@@ -453,6 +483,8 @@ export default OakComponent({
|
|
|
453
483
|
depositChannel: undefined,
|
|
454
484
|
depositLoss: ['0', '', undefined],
|
|
455
485
|
depositing: false,
|
|
486
|
+
invoiceApplyOpen: false,
|
|
487
|
+
invoiceHistoryOpen: false,
|
|
456
488
|
setDepPriceMp(price) { this.setDepPrice(price); },
|
|
457
489
|
setDepositChannelMp(depositChannel) { this.setDepositChannel(depositChannel); },
|
|
458
490
|
focus: false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|