Merge branch 'dev' into release

This commit is contained in:
Xu Chang 2024-07-02 16:15:35 +08:00
commit cef76c321f
31 changed files with 83 additions and 42 deletions

View File

@ -3,7 +3,7 @@ export declare function getWithdrawCreateData(params: {
accountId: string;
price: number;
withdrawAccountId?: string;
}, context: BRC): Promise<(Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "creatorId" | "accountId">> & {
}, context: BRC): Promise<(Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "accountId" | "creatorId">> & {
id: string;
} & {
accountId: string;
@ -17,7 +17,7 @@ export declare function getWithdrawCreateData(params: {
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "creatorId" | "accountId">> & {
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "accountId" | "creatorId">> & {
id: string;
} & {
accountId: string;
@ -31,7 +31,7 @@ export declare function getWithdrawCreateData(params: {
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "creatorId" | "accountId">> & {
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "accountId" | "creatorId">> & {
id: string;
} & {
account?: undefined;
@ -45,7 +45,7 @@ export declare function getWithdrawCreateData(params: {
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "creatorId" | "accountId">> & {
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "accountId" | "creatorId">> & {
id: string;
} & {
account?: undefined;

View File

@ -20,13 +20,8 @@ declare const List: <T extends keyof EntityDict>(props: ReactComponentProps<Enti
rowSelection?: any;
hideHeader?: boolean | undefined;
disableSerialNumber?: boolean | undefined;
size?: "small" | "middle" | "large" | undefined;
scroll?: ({
x?: string | number | true | undefined;
y?: string | number | undefined;
} & {
scrollToFirstRowOnChange?: boolean | undefined;
}) | undefined;
size?: "large" | "middle" | "small" | undefined;
scroll?: any;
locale?: any;
opWidth?: number | undefined;
}>) => React.ReactElement;
@ -46,10 +41,11 @@ declare const ListPro: <T extends keyof EntityDict>(props: {
tablePagination?: any;
rowSelection?: any;
disableSerialNumber?: boolean | undefined;
size?: "small" | "middle" | "large" | undefined;
size?: "large" | "middle" | "small" | undefined;
scroll?: any;
locale?: any;
opWidth?: number | undefined;
oakPath?: string | undefined;
}) => React.ReactElement;
declare const Detail: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
column?: number | Record<Breakpoint, number> | undefined;

View File

@ -2,6 +2,7 @@
* 抽象组件在业务层根据EntityDict的重新声明
* by Xc 20230807
*/
// @ts-nocheck
import AbsFilterPanel from 'oak-frontend-base/es/components/filterPanel';
import AbsList from 'oak-frontend-base/es/components/list';
import AbsListPro from 'oak-frontend-base/es/components/listPro';

View File

@ -2,6 +2,7 @@
"usingComponents": {
"l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index",
"l-popup": "@oak-frontend-base/miniprogram_npm/lin-ui/popup/index",
"l-arc-popup": "@oak-frontend-base/miniprogram_npm/lin-ui/arc-popup/index",
"l-dialog": "@oak-frontend-base/miniprogram_npm/lin-ui/dialog/index",
"deposit-new": "../../deposit/new/index"
}

View File

@ -90,8 +90,8 @@
.ad-container {
padding: 24rpx;
margin-bottom: 12rpx;
background-color: white;
.safe-area-inset-bottom();
}
.uf {

View File

@ -47,10 +47,13 @@
</view>
</view>
<block wx:if="{{depositOpen}}">
<l-popup
<l-arc-popup
show="{{depositOpen}}"
content-align="bottom"
direction="bottom"
bind:lintap="onDepositModalClose"
min-height="200"
max-height="800"
z-index="1000"
>
<view class="ad-container">
<deposit-new
@ -75,7 +78,7 @@
</l-button>
</view>
</view>
</l-popup>
</l-arc-popup>
</block>
<block wx:if="{{ufOpen}}">
<l-dialog

View File

@ -21,6 +21,7 @@ export default OakComponent({
chooseType: false,
pickerStart: dayjs().subtract(10, 'y').startOf('m').format('YYYY-MM-DD'),
pickerEnd: dayjs().startOf('m').format('YYYY-MM-DD'),
refreshing: false,
},
filters: [
{
@ -163,6 +164,17 @@ export default OakComponent({
type: key,
}, () => this.setTypeFilter());
this.closeChooseTypeMp();
}
},
bindrefresherrefresh() {
this.setState({
refreshing: true
});
this.refresh();
setTimeout(() => {
this.setState({
refreshing: false
});
}, 1000);
},
}
});

View File

@ -4,7 +4,6 @@
<l-input
label="{{t('common::pay.symbol')}}"
label-width="{{70}}"
focus="{{true}}"
show-row="{{false}}"
value="{{priceStr || ''}}"
type="number"

View File

@ -52,7 +52,7 @@ export default function Render(props) {
label: t('order:attr.settled'),
width: 100,
}
]}/>
]} oakPath={oakFullpath}/>
</div>);
}
return null;

View File

@ -135,7 +135,7 @@ export default function Render(props) {
setSpId(row.id);
}
}
}}/>
}} oakPath={oakFullpath}/>
<Modal title={t('csp.title')} width={600} destroyOnClose open={!!spId} footer={null} onCancel={() => {
clean();
setSpId('');

View File

@ -118,7 +118,7 @@ export default function Render(props) {
setUpsertId(row.id);
setUpdateAction(action);
}
}}/>
}} oakPath={oakFullpath}/>
{upsertRow && <Modal open={!!upsertId} onCancel={() => {
clean();
setUpsertId('');

View File

@ -39,7 +39,7 @@ export default function Render(props) {
label: t('withdrawTransfer:attr.externalId'),
width: 120,
},
]} disabledOp={true}/>);
]} disabledOp={true} oakPath={oakFullpath}/>);
}
return (<Result status="404" title={t('common::noData')}/>);
}

View File

@ -89,7 +89,7 @@ export default function Render(props) {
]} onAction={(row, action) => {
setUpdateId(row.id, action);
setUpdateAction(action);
}}/>
}} oakPath={oakFullpath}/>
{updateRow && <Modal open={!!updateId} onCancel={() => {
setUpdateId('', '');
setUpdateAction('');
@ -124,7 +124,7 @@ export default function Render(props) {
</Form.Item>
<Form.Item label={t('label.transferActualPrice')}>
<span className={Styles.actualPrice}>
{`${t('common::pay.symbol')} ${ThousandCont(ToYuan(updateRow.price - updateRow.loss), 2)}`}
{`${t('common::pay.symbol')} ${ThousandCont(ToYuan(updateRow.price - updateRow.loss), 2)}`}
</span>
</Form.Item>
{updateAction === 'succeed' && (<Form.Item label={t('withdrawTransfer:attr.externalId')}>

View File

@ -15,7 +15,7 @@ export declare class BackendRuntimeContext<ED extends EntityDict & BaseEntityDic
type?: number | undefined;
systemId?: number | undefined;
system?: import("../oak-app-domain/System/Schema").Projection | undefined;
config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
style?: number | import("oak-domain/lib/types").JsonProjection<import("oak-general-business/lib/types/Style").Style> | undefined;
domainId?: number | undefined;
domain?: import("../oak-app-domain/Domain/Schema").Projection | undefined;

View File

@ -6,6 +6,6 @@ import { BRC } from '../types/RuntimeCxt';
* @param context
* @param refunds
*/
export declare function updateWithdrawState(context: BRC, id: string): Promise<1 | 0>;
export declare function updateWithdrawState(context: BRC, id: string): Promise<0 | 1>;
declare const triggers: Trigger<EntityDict, 'withdraw', BRC>[];
export default triggers;

View File

@ -8,6 +8,9 @@ export declare class ExternalPrePayException<ED extends EntityDict> extends OakE
name: string;
message: string;
opRecords: OpRecord<ED>[];
tag1: string | undefined;
tag2: boolean | undefined;
tag3: any;
};
}
export declare class RefundExceedMax<ED extends EntityDict> extends OakException<ED> {

View File

@ -14,7 +14,7 @@ export declare const mergedProjection: {
type?: number | undefined;
systemId?: number | undefined;
system?: import("../oak-app-domain/System/Schema").Projection | undefined;
config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
style?: number | import("oak-domain/lib/types").JsonProjection<import("oak-general-business/lib/types/Style").Style> | undefined;
domainId?: number | undefined;
domain?: import("../oak-app-domain/Domain/Schema").Projection | undefined;

View File

@ -37,7 +37,8 @@ exports.desc = {
: {
type: "object"
},
entity: {
entity // 如果为true则按照渠道taxLossRatio和refundCompensateRatio进行扣取(如果因为depositLossRatio已经大于taxLossRatio则全额退款)
: {
type: "varchar",
params: {
length: 32

View File

@ -8,6 +8,9 @@ export declare class ExternalPrePayException<ED extends EntityDict> extends OakE
name: string;
message: string;
opRecords: OpRecord<ED>[];
tag1: string | undefined;
tag2: boolean | undefined;
tag3: any;
};
}
export declare class RefundExceedMax<ED extends EntityDict> extends OakException<ED> {

View File

@ -1,6 +1,6 @@
{
"name": "oak-pay-business",
"version": "2.2.4",
"version": "2.2.5",
"description": "",
"files": [
"lib/**/*",
@ -29,8 +29,8 @@
"dependencies": {
"classnames": "^2.3.1",
"dayjs": "^1.11.5",
"oak-domain": "~5.0.13",
"oak-frontend-base": "~5.2.6",
"oak-domain": "~5.0.14",
"oak-frontend-base": "~5.2.8",
"oak-general-business": "~5.2.4",
"wechat-pay-nodejs": "^0.2.3"
},

View File

@ -2,6 +2,7 @@
* EntityDict的重新声明
* by Xc 20230807
*/
// @ts-nocheck
import { EntityDict } from '../oak-app-domain';

View File

@ -2,6 +2,7 @@
"usingComponents": {
"l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index",
"l-popup": "@oak-frontend-base/miniprogram_npm/lin-ui/popup/index",
"l-arc-popup": "@oak-frontend-base/miniprogram_npm/lin-ui/arc-popup/index",
"l-dialog": "@oak-frontend-base/miniprogram_npm/lin-ui/dialog/index",
"deposit-new": "../../deposit/new/index"
}

View File

@ -90,8 +90,8 @@
.ad-container {
padding: 24rpx;
margin-bottom: 12rpx;
background-color: white;
.safe-area-inset-bottom();
}
.uf {

View File

@ -47,10 +47,13 @@
</view>
</view>
<block wx:if="{{depositOpen}}">
<l-popup
<l-arc-popup
show="{{depositOpen}}"
content-align="bottom"
direction="bottom"
bind:lintap="onDepositModalClose"
min-height="200"
max-height="800"
z-index="1000"
>
<view class="ad-container">
<deposit-new
@ -75,7 +78,7 @@
</l-button>
</view>
</view>
</l-popup>
</l-arc-popup>
</block>
<block wx:if="{{ufOpen}}">
<l-dialog

View File

@ -23,6 +23,7 @@ export default OakComponent({
chooseType: false,
pickerStart: dayjs().subtract(10, 'y').startOf('m').format('YYYY-MM-DD'),
pickerEnd: dayjs().startOf('m').format('YYYY-MM-DD'),
refreshing: false,
},
filters: [
{
@ -169,6 +170,18 @@ export default OakComponent({
type: key,
}, () => this.setTypeFilter())
this.closeChooseTypeMp();
}
},
bindrefresherrefresh() {
this.setState({
refreshing: true
})
this.refresh();
setTimeout(() => {
this.setState({
refreshing: false
})
}, 1000);
},
}
})

View File

@ -4,7 +4,6 @@
<l-input
label="{{t('common::pay.symbol')}}"
label-width="{{70}}"
focus="{{true}}"
show-row="{{false}}"
value="{{priceStr || ''}}"
type="number"

View File

@ -78,6 +78,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
width: 100,
}
]}
oakPath={oakFullpath}
/>
</div>
);

View File

@ -173,6 +173,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
}
}
}}
oakPath={oakFullpath}
/>
<Modal
title={t('csp.title')}

View File

@ -145,6 +145,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
setUpdateAction(action);
}
}}
oakPath={oakFullpath}
/>
{upsertRow && <Modal
open={!!upsertId}

View File

@ -60,6 +60,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
},
]}
disabledOp={true}
oakPath={oakFullpath}
/>
)
}

View File

@ -124,6 +124,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
setUpdateId(row.id, action);
setUpdateAction(action);
}}
oakPath={oakFullpath}
/>
{updateRow && <Modal
open={!!updateId}
@ -161,8 +162,8 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
{updateRow!.withdrawAccount?.org}
</Form.Item>}
{updateRow.withdrawAccount?.name && <Form.Item
label={updateRow.withdrawAccount?.channel?.entity === 'bank' ?
t('withdraw::account.bank.name') :
label={updateRow.withdrawAccount?.channel?.entity === 'bank' ?
t('withdraw::account.bank.name') :
t('withdraw::account.others.name')}
>
{updateRow!.withdrawAccount?.name}
@ -175,8 +176,8 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
<Form.Item
label={t('label.sysAccountAmount')}
help={
(updateAction === 'succeed' && sysAccountAmount < updateRow!.price! - updateRow.loss!) ?
<span className={Styles.warning}>{t('saNotEnough')}</span> :
(updateAction === 'succeed' && sysAccountAmount < updateRow!.price! - updateRow.loss!) ?
<span className={Styles.warning}>{t('saNotEnough')}</span> :
undefined
}
>
@ -188,7 +189,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'pay', false
label={t('label.transferActualPrice')}
>
<span className={Styles.actualPrice}>
{`${t('common::pay.symbol')} ${ThousandCont(ToYuan(updateRow!.price! - updateRow.loss!), 2)}`}
{`${t('common::pay.symbol')} ${ThousandCont(ToYuan(updateRow!.price! - updateRow.loss!), 2)}`}
</span>
</Form.Item>
{