Commit 9c0d23a7 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents 225b3b6f 28678bc5
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-07 15:22:20
* @LastEditTime: 2021-09-08 20:00:03
* @Description: 查看退货数量与退款金额 抽屉
*/
import React, { useEffect, useState } from 'react';
......@@ -240,7 +240,7 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
refundAmount: applyInfo.refundAmount !== undefined ?
applyInfo.refundAmount : (
isMateriel ?
+(new BigNumber(+applyInfo.remaining).multipliedBy(applyInfo.purchasePrice))
+(new BigNumber(+applyInfo.remaining).multipliedBy(applyInfo.purchasePrice).toFixed(2))
: 0
), // 默认赋值,如果是有支付信息的订单,退款金额 refundAmount 交给 payList 累加
});
......
......@@ -692,7 +692,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
id: item.id,
returnReason: '',
taskTypeKey: item.processKey,
remaining: new BigNumber(item.quantity).minus(item.returnCount || 0), // 可退货数量
remaining: new BigNumber(item.quantity).minus(item.returnCount || 0).toFixed(3), // 可退货数量
orderId: item.orderId,
},
isHasTax: item.tax,
......
......@@ -134,6 +134,7 @@ const ApplicableGoodsFormItem = (props) => {
<GoodsDrawer
visible={visibleGoodsDrawer}
shopIds={XComponentProps.shopIds}
multiple={XComponentProps.multiple}
onClose={handleVisibleGoodsDrawer}
checkeds={value}
onSubmit={handleGoodsDrawerSubmit}
......
......@@ -89,7 +89,7 @@ const fetchSuitableUser = async () => {
};
// 获取 实用会员选项
const fetchMemberOptions: (params: { current: string, pageSize: string, levelConfigIds: string, roleIds: string }) => Promise<ResponseType> = async (params) => {
const fetchMemberOptions: (params: { current: string, pageSize: string, levelConfigIds: string, roleIds: string, memberTypes: string }) => Promise<ResponseType> = async (params) => {
const res = await PublicApi.getMemberManageMarketingSuitableLevelConfigPage(params);
if (res.code === 1000) {
const options = res.data.data.map(item => ({
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 14:04:16
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-30 17:48:32
* @LastEditTime: 2021-09-08 19:26:41
* @Description:
*/
import { FormEffectHooks, FormPath, IFormActions } from '@formily/antd';
......@@ -105,6 +105,13 @@ export const useBusinessEffects = (context, actions: IFormActions) => {
linkage.hide('*(APPLICABLE_GOODS,APPLICABLE_CATEGORIES)');
linkage.show('APPLICABLE_BRANDS');
}
// 0元抵扣券只能选择一个商品
setFieldState('goodsList', fieldState => {
FormPath.setIn(fieldState, 'props.x-component-props', Object.assign({}, fieldState.props['x-component-props'], {
multiple: value !== MERCHANT_COUPON_TYPE_VOUCHER,
}));
});
});
// 券面额
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-24 16:11:55
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-30 10:10:15
* @LastEditTime: 2021-09-08 19:29:00
* @Description: 商品选择抽屉
*/
import React, { useEffect } from 'react';
......@@ -81,6 +81,10 @@ interface IProps {
* 商城id
*/
shopIds: number[],
/**
* 是否支持多选,默认为 true
*/
multiple?: boolean,
}
type ExtraFetchType = FetchParamsType & {
......@@ -105,8 +109,9 @@ const GoodsDrawer: React.FC<IProps> = (props) => {
onSubmit,
onClose,
shopIds,
multiple = true,
} = props;
const [rowSelection, rowCtl] = useRowSelectionTable({ type: 'checkbox', customKey: 'id' });
const [rowSelection, rowCtl] = useRowSelectionTable({ type: multiple ? 'checkbox' : 'radio', customKey: 'id' });
useEffect(() => {
if (checkeds) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment