diff --git a/components.d.ts b/components.d.ts index 86af292..3d0dca9 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,6 +10,7 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { _index: typeof import('./src/core/components/_sample/_index.vue')['default'] + AAlert: typeof import('ant-design-vue/es')['Alert'] AAvatar: typeof import('ant-design-vue/es')['Avatar'] ABadge: typeof import('ant-design-vue/es')['Badge'] AButton: typeof import('ant-design-vue/es')['Button'] @@ -21,6 +22,7 @@ declare module '@vue/runtime-core' { AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider'] ADivider: typeof import('ant-design-vue/es')['Divider'] AdminFieldHelp: typeof import('./src/components/AdminFieldHelp.vue')['default'] + AdminHelpTooltipContent: typeof import('./src/components/AdminHelpTooltipContent.vue')['default'] AdminLabelWithHelp: typeof import('./src/components/AdminLabelWithHelp.vue')['default'] ADrawer: typeof import('ant-design-vue/es')['Drawer'] ADropdown: typeof import('ant-design-vue/es')['Dropdown'] @@ -41,6 +43,7 @@ declare module '@vue/runtime-core' { APagination: typeof import('ant-design-vue/es')['Pagination'] APopconfirm: typeof import('ant-design-vue/es')['Popconfirm'] APopover: typeof import('ant-design-vue/es')['Popover'] + ARadio: typeof import('ant-design-vue/es')['Radio'] ARadioButton: typeof import('ant-design-vue/es')['RadioButton'] ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup'] ARow: typeof import('ant-design-vue/es')['Row'] @@ -56,6 +59,7 @@ declare module '@vue/runtime-core' { ATextarea: typeof import('ant-design-vue/es')['Textarea'] ATimePicker: typeof import('ant-design-vue/es')['TimePicker'] ATooltip: typeof import('ant-design-vue/es')['Tooltip'] + AUpload: typeof import('ant-design-vue/es')['Upload'] BaseButton: typeof import('./src/core/components/BaseButton/index.ts')['default'] BaseCard: typeof import('./src/core/components/BaseCard/index.ts')['default'] BaseCollapse: typeof import('./src/components/BaseCollapse.vue')['default'] diff --git a/src/api/physicalWithdraw.ts b/src/api/physicalWithdraw.ts index baaa3ae..abc4203 100644 --- a/src/api/physicalWithdraw.ts +++ b/src/api/physicalWithdraw.ts @@ -46,9 +46,35 @@ export const getPhysicalWithdrawOptions = async (customerId: number) => export const createPhysicalWithdraw = async (payload: CreatePhysicalWithdrawPayload) => await useAxios.post<{ id: number }>('/admin/wallet/withdraw_physical', payload) +export interface PhysicalWithdrawAdjustLine { + transaction_id: number + title: string + current_value: number + available_add: number + max_value: number + min_value: number + allows_decimal: boolean + unit: string +} + +export interface PhysicalWithdrawAdjustInfo { + withdraw_id: number + customer_name: string + customer_mobile: string + lines: PhysicalWithdrawAdjustLine[] +} + +export interface PhysicalWithdrawAdjustItem { + transaction_id: number + value: number +} + +export const getPhysicalWithdrawAdjustInfo = async (withdrawId: number) => + await useAxios.get(`/admin/wallet/withdraw_physical/${withdrawId}/adjust-info`) + export const adjustPhysicalWithdraw = async ( withdrawId: number, - payload: { transaction_id: number; direction: 'increase' | 'decrease' } + payload: { items: PhysicalWithdrawAdjustItem[] } ) => await useAxios.post(`/admin/wallet/withdraw_physical/${withdrawId}/adjust`, payload) export const approvePhysicalWithdraw = async (withdrawId: number, sts = 51) => diff --git a/src/components/AdminFieldHelp.vue b/src/components/AdminFieldHelp.vue index acc2068..f8cd847 100644 --- a/src/components/AdminFieldHelp.vue +++ b/src/components/AdminFieldHelp.vue @@ -1,23 +1,20 @@