Compare commits
2 Commits
01521fc8c5
...
da1200716a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da1200716a | ||
|
|
3e24b86326 |
@ -244,12 +244,6 @@ export default function BoxProductList(props: IBoxProductListProps) {
|
||||
id: intlPrefix + '.type.thirdPartyBox',
|
||||
}),
|
||||
},
|
||||
{
|
||||
key: 'FARMER_BOX',
|
||||
tab: intl.formatMessage({
|
||||
id: intlPrefix + '.type.farmerBox',
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
}}
|
||||
|
||||
@ -5,8 +5,10 @@ import {
|
||||
ModeType,
|
||||
} from '@/components';
|
||||
import { business } from '@/services';
|
||||
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
|
||||
import { formatParam } from '@/utils/formatParam';
|
||||
import { useIntl } from '@@/exports';
|
||||
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
||||
import {
|
||||
ActionType,
|
||||
ProColumns,
|
||||
@ -15,8 +17,6 @@ import {
|
||||
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
||||
import { ProFormUploadMaterial } from '@chageable/components';
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
||||
import { formatBankCard, formatIdCard, formatPhone } from '@/utils/format';
|
||||
|
||||
interface IMelonFarmerListProps {
|
||||
ghost?: boolean;
|
||||
@ -37,7 +37,7 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
|
||||
onValueChange,
|
||||
} = props;
|
||||
const intl = useIntl();
|
||||
const intlPrefix = 'supplier';
|
||||
const intlPrefix = 'melonFarmer';
|
||||
const actionRef = useRef<ActionType>();
|
||||
|
||||
const [showIdCard, setShowIdCard] = useState<Record<string, boolean>>({});
|
||||
@ -142,6 +142,8 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
|
||||
];
|
||||
|
||||
const formContext = [
|
||||
<ProFormText key={'type'} name={'type'} hidden={true} />,
|
||||
<ProFormText key={'payeeName'} name={'payeeName'} hidden={true} />,
|
||||
<ProFormText
|
||||
key={'name'}
|
||||
name={'name'}
|
||||
@ -150,6 +152,12 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.name.placeholder',
|
||||
})}
|
||||
transform={(value) => {
|
||||
return {
|
||||
name: value,
|
||||
payeeName: value,
|
||||
};
|
||||
}}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
@ -289,6 +297,9 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
|
||||
ghost,
|
||||
//@ts-ignore
|
||||
search,
|
||||
params: {
|
||||
type: 'FARMER',
|
||||
},
|
||||
},
|
||||
columns,
|
||||
}}
|
||||
@ -297,6 +308,7 @@ export default function MelonFarmerList(props: IMelonFarmerListProps) {
|
||||
formContext,
|
||||
initValues: {
|
||||
status: true,
|
||||
type: 'FARMER',
|
||||
},
|
||||
}}
|
||||
update={{
|
||||
|
||||
@ -0,0 +1,253 @@
|
||||
import {
|
||||
BizContainer,
|
||||
BizValueType,
|
||||
MaterialList,
|
||||
ModeType,
|
||||
} from '@/components';
|
||||
import { business } from '@/services';
|
||||
import { formatBankCard } from '@/utils/format';
|
||||
import { formatParam } from '@/utils/formatParam';
|
||||
import { useIntl } from '@@/exports';
|
||||
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
||||
import {
|
||||
ActionType,
|
||||
ProColumns,
|
||||
ProFormText,
|
||||
} from '@ant-design/pro-components';
|
||||
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
||||
import { ProFormUploadMaterial } from '@chageable/components';
|
||||
import React, { useRef, useState } from 'react';
|
||||
|
||||
interface IMelonStallListProps {
|
||||
ghost?: boolean;
|
||||
supplierId?: BusinessAPI.SupplierVO['supplierId'];
|
||||
search?: boolean;
|
||||
onValueChange?: () => void;
|
||||
mode?: ModeType;
|
||||
trigger?: () => React.ReactNode;
|
||||
}
|
||||
|
||||
export default function MelonStallList(props: IMelonStallListProps) {
|
||||
const {
|
||||
ghost = false,
|
||||
supplierId,
|
||||
search = true,
|
||||
mode = 'page',
|
||||
trigger,
|
||||
onValueChange,
|
||||
} = props;
|
||||
const intl = useIntl();
|
||||
const intlPrefix = 'melonStall';
|
||||
const actionRef = useRef<ActionType>();
|
||||
|
||||
const [showBankCard, setShowBankCard] = useState<Record<string, boolean>>({});
|
||||
|
||||
const columns: ProColumns<BusinessAPI.SupplierVO, BizValueType>[] = [
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
renderText: (text: string) => <span className="font-medium">{text}</span>,
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.payeeName' }),
|
||||
dataIndex: 'payeeName',
|
||||
key: 'payeeName',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.bankCard' }),
|
||||
dataIndex: 'bankCard',
|
||||
key: 'bankCard',
|
||||
render: (_, record) => (
|
||||
<div className="flex items-center">
|
||||
<span>
|
||||
{formatBankCard(record.bankCard, showBankCard[record.supplierId])}
|
||||
</span>
|
||||
<span
|
||||
className="ml-2 cursor-pointer"
|
||||
onClick={() => {
|
||||
setShowBankCard((prev) => ({
|
||||
...prev,
|
||||
[record.supplierId]: !prev[record.supplierId],
|
||||
}));
|
||||
}}
|
||||
>
|
||||
{showBankCard[record.supplierId] ? (
|
||||
<EyeTwoTone />
|
||||
) : (
|
||||
<EyeInvisibleOutlined />
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.wechatQr' }),
|
||||
dataIndex: 'wechatQr',
|
||||
valueType: 'image',
|
||||
key: 'wechatQr',
|
||||
search: false,
|
||||
},
|
||||
];
|
||||
|
||||
const formContext = [
|
||||
<ProFormText key={'type'} name={'type'} hidden={true} />,
|
||||
<ProFormText key={'payeeName'} name={'payeeName'} hidden={true} />,
|
||||
<ProFormText
|
||||
key={'name'}
|
||||
name={'name'}
|
||||
label={intl.formatMessage({ id: intlPrefix + '.form.name.label' })}
|
||||
required={true}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.name.placeholder',
|
||||
})}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.name.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>,
|
||||
<ProFormText
|
||||
key={'payeeName'}
|
||||
name={'payeeName'}
|
||||
label={intl.formatMessage({ id: intlPrefix + '.form.payeeName.label' })}
|
||||
required={true}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.payeeName.placeholder',
|
||||
})}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.payeeName.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>,
|
||||
<ProFormText
|
||||
key={'bankCard'}
|
||||
name={'bankCard'}
|
||||
label={intl.formatMessage({ id: intlPrefix + '.form.bankCard.label' })}
|
||||
required={true}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.bankCard.placeholder',
|
||||
})}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.bankCard.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>,
|
||||
<ProFormUploadMaterial
|
||||
key={'wechatQr'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.wechatQr.label',
|
||||
})}
|
||||
name={'wechatQrList'}
|
||||
transform={(value) => {
|
||||
return {
|
||||
wechatQrList: value,
|
||||
wechatQr: value[0],
|
||||
};
|
||||
}}
|
||||
fieldProps={{
|
||||
maxCount: 1,
|
||||
actionRef: actionRef,
|
||||
toolBarRender: () => [
|
||||
<MaterialList
|
||||
key={'create'}
|
||||
ghost={true}
|
||||
mode={'create'}
|
||||
search={false}
|
||||
onValueChange={() => actionRef.current?.reload()}
|
||||
/>,
|
||||
],
|
||||
request: async (params, sorter, filter) => {
|
||||
const { data, success, totalCount } =
|
||||
await business.material.pageMaterial({
|
||||
materialPageQry: formatParam<typeof params>(
|
||||
params,
|
||||
sorter,
|
||||
filter,
|
||||
),
|
||||
});
|
||||
|
||||
return {
|
||||
data: data || [],
|
||||
total: totalCount,
|
||||
success,
|
||||
};
|
||||
},
|
||||
}}
|
||||
/>,
|
||||
];
|
||||
|
||||
const detailColumns: ProDescriptionsItemProps<
|
||||
BusinessAPI.SupplierVO,
|
||||
BizValueType
|
||||
>[] = columns as ProDescriptionsItemProps<
|
||||
BusinessAPI.SupplierVO,
|
||||
BizValueType
|
||||
>[];
|
||||
|
||||
return (
|
||||
<BizContainer<
|
||||
typeof business.supplier,
|
||||
BusinessAPI.SupplierVO,
|
||||
BusinessAPI.SupplierPageQry,
|
||||
BusinessAPI.SupplierCreateCmd,
|
||||
BusinessAPI.SupplierUpdateCmd
|
||||
>
|
||||
rowKey={'supplierId'}
|
||||
permission={'operation-supplier'}
|
||||
func={business.supplier}
|
||||
method={'supplier'}
|
||||
methodUpper={'Supplier'}
|
||||
intlPrefix={intlPrefix}
|
||||
modeType={mode}
|
||||
onValueChange={onValueChange}
|
||||
container={{}}
|
||||
remark={{
|
||||
mode: 'editor',
|
||||
}}
|
||||
status
|
||||
page={{
|
||||
fieldProps: {
|
||||
bordered: true,
|
||||
ghost,
|
||||
//@ts-ignore
|
||||
search,
|
||||
params: {
|
||||
type: 'STALL',
|
||||
},
|
||||
},
|
||||
columns,
|
||||
}}
|
||||
create={{
|
||||
formType: 'drawer',
|
||||
formContext,
|
||||
initValues: {
|
||||
status: true,
|
||||
type: 'STALL',
|
||||
},
|
||||
}}
|
||||
update={{
|
||||
formType: 'drawer',
|
||||
formContext,
|
||||
}}
|
||||
destroy={{}}
|
||||
detail={{
|
||||
rowId: supplierId,
|
||||
formType: 'drawer',
|
||||
columns: detailColumns,
|
||||
trigger,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
export { default as MelonFarmerList } from './MelonFarmerList';
|
||||
export { default as MelonStallList } from './MelonStallList';
|
||||
export { default as BoxProductList } from './BoxProductList'
|
||||
export { default as BoxBrandList } from './BoxBrandList';
|
||||
export { default as CostList } from './CostList';
|
||||
|
||||
@ -863,7 +863,9 @@ export default function BizContainer<
|
||||
orderId={purchaseOrderVO.orderId}
|
||||
trigger={() => (
|
||||
<Space>
|
||||
<a>{purchaseOrderVO.orderSn}</a>
|
||||
<a>
|
||||
{`${purchaseOrderVO.orderVehicle?.dealerName} - 第 ${purchaseOrderVO.orderVehicle?.vehicleNo || '暂无'} 车 - ${purchaseOrderVO.orderSn || '暂无'}`}
|
||||
</a>
|
||||
</Space>
|
||||
)}
|
||||
/>
|
||||
|
||||
@ -2,6 +2,7 @@ import {
|
||||
BizContainer,
|
||||
BizValueType,
|
||||
DealerPaymentAccountList,
|
||||
DealerPurchaseSetting,
|
||||
DealerRebateCustomerList,
|
||||
DeliveryTemplate,
|
||||
ModeType,
|
||||
@ -11,10 +12,7 @@ import { useIntl } from '@@/exports';
|
||||
import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
ProColumns,
|
||||
ProFormDependency,
|
||||
ProFormDigit,
|
||||
ProFormRadio,
|
||||
ProFormSwitch,
|
||||
ProFormText,
|
||||
} from '@ant-design/pro-components';
|
||||
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
||||
@ -48,6 +46,20 @@ export default function DealerList(props: IDealerListProps) {
|
||||
key: 'shortName',
|
||||
renderText: (text: string) => <span className="font-medium">{text}</span>,
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.dealerType' }),
|
||||
dataIndex: 'dealerType',
|
||||
key: 'dealerType',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
MARKET: intl.formatMessage({
|
||||
id: intlPrefix + '.column.dealerType.enum.market',
|
||||
}),
|
||||
SUPERMARKET: intl.formatMessage({
|
||||
id: intlPrefix + '.column.dealerType.enum.supermarket',
|
||||
}),
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({
|
||||
id: intlPrefix + '.column.dealerPaymentAccountVOList',
|
||||
@ -170,6 +182,34 @@ export default function DealerList(props: IDealerListProps) {
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: (
|
||||
<Tooltip
|
||||
title={intl.formatMessage({
|
||||
id: intlPrefix + '.column.includeFreightFlag.tooltip',
|
||||
})}
|
||||
>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: intlPrefix + '.column.includeFreightFlag',
|
||||
})}
|
||||
</span>
|
||||
</Tooltip>
|
||||
),
|
||||
dataIndex: 'includeFreightFlag',
|
||||
key: 'includeFreightFlag',
|
||||
valueType: 'switch',
|
||||
search: false,
|
||||
render: (_, record) => (
|
||||
<span>
|
||||
{record.includeFreightFlag ? (
|
||||
<CheckCircleOutlined style={{ color: '#52c41a' }} />
|
||||
) : (
|
||||
<CloseCircleOutlined style={{ color: '#ff4d4f' }} />
|
||||
)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
// 新增字段展示 - 计提税金
|
||||
{
|
||||
title: (
|
||||
@ -298,236 +338,6 @@ export default function DealerList(props: IDealerListProps) {
|
||||
}),
|
||||
}}
|
||||
/>,
|
||||
<ProFormSwitch
|
||||
key={'enableShare'}
|
||||
name={'enableShare'}
|
||||
label={intl.formatMessage({ id: intlPrefix + '.form.enableShare.label' })}
|
||||
fieldProps={{
|
||||
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
|
||||
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
|
||||
}}
|
||||
/>,
|
||||
<ProFormDependency key={'enableShare'} name={['enableShare']}>
|
||||
{({ enableShare }) => {
|
||||
return (
|
||||
enableShare && (
|
||||
<>
|
||||
<ProFormDigit
|
||||
key={'shareRatio'}
|
||||
name={'shareRatio'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.shareRatio.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
precision: 2,
|
||||
step: 0.01,
|
||||
min: 0,
|
||||
max: 100,
|
||||
suffix: '%',
|
||||
}}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.shareRatio.placeholder',
|
||||
})}
|
||||
dependencies={['enableShare']}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.shareRatio.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<ProFormSwitch
|
||||
key={'shareAdjusted'}
|
||||
name={'shareAdjusted'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.shareAdjusted.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
|
||||
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
);
|
||||
}}
|
||||
</ProFormDependency>,
|
||||
<ProFormSwitch
|
||||
key={'freightCostFlag'}
|
||||
name={'freightCostFlag'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.freightCostFlag.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
|
||||
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
|
||||
}}
|
||||
/>,
|
||||
<ProFormSwitch
|
||||
key={'strawMatCostFlag'}
|
||||
name={'strawMatCostFlag'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.strawMatCostFlag.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
|
||||
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
|
||||
}}
|
||||
/>,
|
||||
<ProFormSwitch
|
||||
key={'includePackingFlag'}
|
||||
name={'includePackingFlag'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.includePackingFlag.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
|
||||
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
|
||||
}}
|
||||
/>,
|
||||
// 新增字段表单 - 计提税金
|
||||
<ProFormSwitch
|
||||
key={'enableAccrualTax'}
|
||||
name={'enableAccrualTax'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.enableAccrualTax.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
|
||||
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
|
||||
}}
|
||||
/>,
|
||||
<ProFormDependency key={'enableAccrualTax'} name={['enableAccrualTax']}>
|
||||
{({ enableAccrualTax }) => {
|
||||
return (
|
||||
enableAccrualTax && (
|
||||
<ProFormDigit
|
||||
key={'accrualTaxRatio'}
|
||||
name={'accrualTaxRatio'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.accrualTaxRatio.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
precision: 2,
|
||||
step: 0.01,
|
||||
min: 0,
|
||||
max: 100,
|
||||
suffix: '%',
|
||||
}}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.accrualTaxRatio.placeholder',
|
||||
})}
|
||||
dependencies={['enableAccrualTax']}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.accrualTaxRatio.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}}
|
||||
</ProFormDependency>,
|
||||
// 新增字段表单 - 公司返点
|
||||
<ProFormSwitch
|
||||
key={'enableCompanyRebate'}
|
||||
name={'enableCompanyRebate'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.enableCompanyRebate.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
|
||||
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
|
||||
}}
|
||||
/>,
|
||||
<ProFormDependency
|
||||
key={'enableCompanyRebate'}
|
||||
name={['enableCompanyRebate']}
|
||||
>
|
||||
{({ enableCompanyRebate }) => {
|
||||
return (
|
||||
enableCompanyRebate && (
|
||||
<ProFormDigit
|
||||
key={'companyRebateRatio'}
|
||||
name={'companyRebateRatio'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.companyRebateRatio.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
precision: 2,
|
||||
step: 0.01,
|
||||
min: 0,
|
||||
max: 100,
|
||||
suffix: '%',
|
||||
}}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.companyRebateRatio.placeholder',
|
||||
})}
|
||||
dependencies={['enableCompanyRebate']}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.companyRebateRatio.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}}
|
||||
</ProFormDependency>,
|
||||
// 新增字段表单 - 产地损耗
|
||||
<ProFormSwitch
|
||||
key={'enableLoss'}
|
||||
name={'enableLoss'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.enableLoss.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
|
||||
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
|
||||
}}
|
||||
/>,
|
||||
<ProFormDependency key={'enableLoss'} name={['enableLoss']}>
|
||||
{({ enableLoss }) => {
|
||||
return (
|
||||
enableLoss && (
|
||||
<ProFormDigit
|
||||
key={'lossAmount'}
|
||||
name={'lossAmount'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.lossAmount.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
precision: 2,
|
||||
step: 0.01,
|
||||
min: 0,
|
||||
max: 9999,
|
||||
suffix: '元',
|
||||
}}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.lossAmount.placeholder',
|
||||
})}
|
||||
dependencies={['enableLoss']}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.lossAmount.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}}
|
||||
</ProFormDependency>,
|
||||
];
|
||||
|
||||
const detailColumns: ProDescriptionsItemProps<
|
||||
@ -611,6 +421,14 @@ export default function DealerList(props: IDealerListProps) {
|
||||
actionRef.current?.reload();
|
||||
}}
|
||||
/>,
|
||||
<DealerPurchaseSetting
|
||||
insertPosition={'after:view'}
|
||||
key={'dealerPurchaseSetting'}
|
||||
dealerVO={record}
|
||||
onFinish={() => {
|
||||
actionRef.current?.reload();
|
||||
}}
|
||||
/>,
|
||||
];
|
||||
},
|
||||
}}
|
||||
|
||||
@ -0,0 +1,363 @@
|
||||
import { ButtonAccess, InsertPosition } from '@/components';
|
||||
import { business } from '@/services';
|
||||
import { useIntl } from '@@/exports';
|
||||
import {
|
||||
DrawerForm,
|
||||
ProFormDependency,
|
||||
ProFormDigit,
|
||||
ProFormSwitch,
|
||||
ProFormText,
|
||||
RouteContext,
|
||||
RouteContextType,
|
||||
} from '@ant-design/pro-components';
|
||||
import { Card, Divider, message, Space } from 'antd';
|
||||
|
||||
interface IDealerPurchaseSettingProps {
|
||||
insertPosition?: InsertPosition;
|
||||
dealerVO: BusinessAPI.DealerVO;
|
||||
onFinish?: () => void;
|
||||
}
|
||||
|
||||
interface IFeatureCardProps {
|
||||
title: string;
|
||||
description?: string;
|
||||
name: string;
|
||||
children?: React.ReactNode;
|
||||
checkedChildren?: string;
|
||||
unCheckedChildren?: string;
|
||||
}
|
||||
|
||||
// 功能卡片组件
|
||||
const FeatureCard: React.FC<IFeatureCardProps> = ({
|
||||
title,
|
||||
description,
|
||||
name,
|
||||
children,
|
||||
checkedChildren,
|
||||
unCheckedChildren,
|
||||
}) => {
|
||||
return (
|
||||
<Card
|
||||
size="small"
|
||||
style={{ marginBottom: 16 }}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'flex-start',
|
||||
justifyContent: 'space-between',
|
||||
}}
|
||||
>
|
||||
<div style={{ flex: 1, marginRight: 16 }}>
|
||||
<div style={{ fontSize: 14, fontWeight: 500, marginBottom: 4 }}>
|
||||
{title}
|
||||
</div>
|
||||
{description && (
|
||||
<div style={{ fontSize: 12, color: '#666', lineHeight: 1.4 }}>
|
||||
{description}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<ProFormSwitch
|
||||
name={name}
|
||||
fieldProps={{
|
||||
checkedChildren,
|
||||
unCheckedChildren,
|
||||
}}
|
||||
noStyle
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{children && (
|
||||
<>
|
||||
<Divider style={{ margin: '16px 0 12px 0' }} />
|
||||
<div style={{ paddingLeft: 0 }}>{children}</div>
|
||||
</>
|
||||
)}
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default function DealerPurchaseSetting(
|
||||
props: IDealerPurchaseSettingProps,
|
||||
) {
|
||||
const { onFinish, dealerVO } = props;
|
||||
const intl = useIntl();
|
||||
const intlPrefix = 'dealer';
|
||||
const commonYes = intl.formatMessage({ id: 'common.yes' });
|
||||
const commonNo = intl.formatMessage({ id: 'common.no' });
|
||||
|
||||
return (
|
||||
<RouteContext.Consumer>
|
||||
{(value: RouteContextType) => {
|
||||
const { isMobile } = value;
|
||||
return (
|
||||
<DrawerForm<BusinessAPI.DealerVO, BusinessAPI.DealerVO>
|
||||
trigger={
|
||||
<ButtonAccess permission={''} type="link">
|
||||
采购设置
|
||||
</ButtonAccess>
|
||||
}
|
||||
title="采购设置"
|
||||
layout="vertical"
|
||||
width={isMobile ? '100%' : '45%'}
|
||||
drawerProps={{
|
||||
destroyOnHidden: true,
|
||||
}}
|
||||
request={async () => {
|
||||
const { data } = await business.dealer.showDealer({
|
||||
dealerShowQry: {
|
||||
dealerId: dealerVO.dealerId,
|
||||
},
|
||||
});
|
||||
|
||||
return data!;
|
||||
}}
|
||||
onFinish={async (formData) => {
|
||||
await business.dealer.updateDealer(formData);
|
||||
|
||||
onFinish?.();
|
||||
message.success('更新经销商设置成功');
|
||||
|
||||
return true;
|
||||
}}
|
||||
>
|
||||
<ProFormText name={'dealerId'} hidden={true} />
|
||||
|
||||
{/* 诚信志远分成功能卡片 */}
|
||||
<FeatureCard
|
||||
title={intl.formatMessage({
|
||||
id: intlPrefix + '.form.enableShare.label',
|
||||
})}
|
||||
description="是否开启诚信志远分红比例设置"
|
||||
name="enableShare"
|
||||
checkedChildren={commonYes}
|
||||
unCheckedChildren={commonNo}
|
||||
>
|
||||
<ProFormDependency name={['enableShare']}>
|
||||
{({ enableShare }) => {
|
||||
return enableShare ? (
|
||||
<Space
|
||||
direction="vertical"
|
||||
size="middle"
|
||||
style={{ width: '100%' }}
|
||||
>
|
||||
<ProFormDigit
|
||||
name={'shareRatio'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.shareRatio.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
precision: 2,
|
||||
step: 0.01,
|
||||
min: 0,
|
||||
max: 100,
|
||||
suffix: '%',
|
||||
}}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.shareRatio.placeholder',
|
||||
})}
|
||||
dependencies={['enableShare']}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.shareRatio.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<ProFormSwitch
|
||||
name={'shareAdjusted'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.shareAdjusted.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
checkedChildren: commonYes,
|
||||
unCheckedChildren: commonNo,
|
||||
}}
|
||||
/>
|
||||
</Space>
|
||||
) : null;
|
||||
}}
|
||||
</ProFormDependency>
|
||||
</FeatureCard>
|
||||
|
||||
{/* 成本相关功能卡片 */}
|
||||
<FeatureCard
|
||||
title={intl.formatMessage({
|
||||
id: intlPrefix + '.form.freightCostFlag.label',
|
||||
})}
|
||||
description="运费是否作为成本计算"
|
||||
name="freightCostFlag"
|
||||
checkedChildren={commonYes}
|
||||
unCheckedChildren={commonNo}
|
||||
/>
|
||||
|
||||
<FeatureCard
|
||||
title={intl.formatMessage({
|
||||
id: intlPrefix + '.form.strawMatCostFlag.label',
|
||||
})}
|
||||
description="草帘是否作为成本计算"
|
||||
name="strawMatCostFlag"
|
||||
checkedChildren={commonYes}
|
||||
unCheckedChildren={commonNo}
|
||||
/>
|
||||
|
||||
<FeatureCard
|
||||
title={intl.formatMessage({
|
||||
id: intlPrefix + '.form.includePackingFlag.label',
|
||||
})}
|
||||
description="发货单合计金额是否含包装费"
|
||||
name="includePackingFlag"
|
||||
checkedChildren={commonYes}
|
||||
unCheckedChildren={commonNo}
|
||||
/>
|
||||
|
||||
<FeatureCard
|
||||
title={intl.formatMessage({
|
||||
id: intlPrefix + '.form.includeFreightFlag.label',
|
||||
})}
|
||||
description="发货单合计金额是否含运费"
|
||||
name="includeFreightFlag"
|
||||
checkedChildren={commonYes}
|
||||
unCheckedChildren={commonNo}
|
||||
/>
|
||||
|
||||
{/* 计提税金功能卡片 */}
|
||||
<FeatureCard
|
||||
title={intl.formatMessage({
|
||||
id: intlPrefix + '.form.enableAccrualTax.label',
|
||||
})}
|
||||
description="是否开启计提税金功能"
|
||||
name="enableAccrualTax"
|
||||
checkedChildren={commonYes}
|
||||
unCheckedChildren={commonNo}
|
||||
>
|
||||
<ProFormDependency name={['enableAccrualTax']}>
|
||||
{({ enableAccrualTax }) => {
|
||||
return enableAccrualTax ? (
|
||||
<ProFormDigit
|
||||
name={'accrualTaxRatio'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.accrualTaxRatio.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
precision: 2,
|
||||
step: 0.01,
|
||||
min: 0,
|
||||
max: 100,
|
||||
suffix: '%',
|
||||
}}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.accrualTaxRatio.placeholder',
|
||||
})}
|
||||
dependencies={['enableAccrualTax']}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.accrualTaxRatio.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
) : null;
|
||||
}}
|
||||
</ProFormDependency>
|
||||
</FeatureCard>
|
||||
|
||||
{/* 公司返点功能卡片 */}
|
||||
<FeatureCard
|
||||
title={intl.formatMessage({
|
||||
id: intlPrefix + '.form.enableCompanyRebate.label',
|
||||
})}
|
||||
description="是否开启公司返点功能"
|
||||
name="enableCompanyRebate"
|
||||
checkedChildren={commonYes}
|
||||
unCheckedChildren={commonNo}
|
||||
>
|
||||
<ProFormDependency name={['enableCompanyRebate']}>
|
||||
{({ enableCompanyRebate }) => {
|
||||
return enableCompanyRebate ? (
|
||||
<ProFormDigit
|
||||
name={'companyRebateRatio'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.companyRebateRatio.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
precision: 2,
|
||||
step: 0.01,
|
||||
min: 0,
|
||||
max: 100,
|
||||
suffix: '%',
|
||||
}}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.companyRebateRatio.placeholder',
|
||||
})}
|
||||
dependencies={['enableCompanyRebate']}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id:
|
||||
intlPrefix + '.form.companyRebateRatio.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
) : null;
|
||||
}}
|
||||
</ProFormDependency>
|
||||
</FeatureCard>
|
||||
|
||||
{/* 损耗功能卡片 */}
|
||||
<FeatureCard
|
||||
title={intl.formatMessage({
|
||||
id: intlPrefix + '.form.enableLoss.label',
|
||||
})}
|
||||
description="是否开启损耗设置"
|
||||
name="enableLoss"
|
||||
checkedChildren={commonYes}
|
||||
unCheckedChildren={commonNo}
|
||||
>
|
||||
<ProFormDependency name={['enableLoss']}>
|
||||
{({ enableLoss }) => {
|
||||
return enableLoss ? (
|
||||
<ProFormDigit
|
||||
name={'lossAmount'}
|
||||
label={intl.formatMessage({
|
||||
id: intlPrefix + '.form.lossAmount.label',
|
||||
})}
|
||||
fieldProps={{
|
||||
precision: 2,
|
||||
step: 0.01,
|
||||
min: 0,
|
||||
max: 9999,
|
||||
suffix: '元',
|
||||
}}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.lossAmount.placeholder',
|
||||
})}
|
||||
dependencies={['enableLoss']}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.lossAmount.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
) : null;
|
||||
}}
|
||||
</ProFormDependency>
|
||||
</FeatureCard>
|
||||
</DrawerForm>
|
||||
);
|
||||
}}
|
||||
</RouteContext.Consumer>
|
||||
);
|
||||
}
|
||||
@ -8,3 +8,4 @@ export { default as DealerSearch } from './DealerSearch';
|
||||
export { default as DealerSelect } from './DealerSelect';
|
||||
export { default as DealerWarehouseList } from './DealerWarehouseList';
|
||||
export { default as DeliveryTemplate } from './DeliveryTemplate';
|
||||
export { default as DealerPurchaseSetting } from './DealerPurchaseSetting';
|
||||
|
||||
@ -45,9 +45,11 @@ export default function OrderShipList(props: IOrderShipListProps) {
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
|
||||
dataIndex: ['orderVehicle', 'vehicleNo'],
|
||||
key: 'vehicleNo',
|
||||
render: (_, record) => (
|
||||
<span>第 {record.orderVehicle?.vehicleNo} 车</span>
|
||||
),
|
||||
render: (_, record) => {
|
||||
return record.orderVehicle?.vehicleNo
|
||||
? '第' + record.orderVehicle?.vehicleNo + '车'
|
||||
: '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.shippingDate' }),
|
||||
|
||||
@ -0,0 +1,123 @@
|
||||
import { BizContainer, BizValueType, ModeType } from '@/components';
|
||||
import { business } from '@/services';
|
||||
import { useIntl } from '@@/exports';
|
||||
import { ProColumns, ProFormText } from '@ant-design/pro-components';
|
||||
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
||||
import React from 'react';
|
||||
|
||||
interface IExpenseCostListProps {
|
||||
ghost?: boolean;
|
||||
costId?: BusinessAPI.CostVO['costId'];
|
||||
search?: boolean;
|
||||
onValueChange?: () => void;
|
||||
mode?: ModeType;
|
||||
trigger?: () => React.ReactNode;
|
||||
}
|
||||
export default function ExpenseCostList(props: IExpenseCostListProps) {
|
||||
const {
|
||||
ghost = false,
|
||||
costId,
|
||||
search = true,
|
||||
mode = 'drag',
|
||||
trigger,
|
||||
onValueChange,
|
||||
} = props;
|
||||
const intl = useIntl();
|
||||
const intlPrefix = 'expenseCost';
|
||||
|
||||
const columns: ProColumns<BusinessAPI.CostVO, BizValueType>[] = [
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
renderText: (text: string) => <span className="font-medium">{text}</span>,
|
||||
},
|
||||
];
|
||||
|
||||
const formContext = [
|
||||
<ProFormText key={'type'} name={'type'} hidden={true} />,
|
||||
<ProFormText key={'belong'} name={'belong'} hidden={true} />,
|
||||
<ProFormText key={'unit'} name={'unit'} hidden={true} />,
|
||||
<ProFormText
|
||||
key={'name'}
|
||||
name={'name'}
|
||||
label={intl.formatMessage({ id: intlPrefix + '.form.name.label' })}
|
||||
required={true}
|
||||
placeholder={intl.formatMessage({
|
||||
id: intlPrefix + '.form.name.placeholder',
|
||||
})}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: intl.formatMessage({
|
||||
id: intlPrefix + '.form.name.required',
|
||||
}),
|
||||
},
|
||||
]}
|
||||
/>,
|
||||
];
|
||||
|
||||
const detailColumns: ProDescriptionsItemProps<
|
||||
BusinessAPI.CostVO,
|
||||
BizValueType
|
||||
>[] = columns as ProDescriptionsItemProps<BusinessAPI.CostVO, BizValueType>[];
|
||||
|
||||
return (
|
||||
<BizContainer<
|
||||
typeof business.cost,
|
||||
BusinessAPI.CostVO,
|
||||
BusinessAPI.CostPageQry,
|
||||
BusinessAPI.CostCreateCmd,
|
||||
BusinessAPI.CostUpdateCmd
|
||||
>
|
||||
rowKey={'costId'}
|
||||
permission={'operation-cost'}
|
||||
func={business.cost}
|
||||
method={'cost'}
|
||||
methodUpper={'Cost'}
|
||||
intlPrefix={intlPrefix}
|
||||
modeType={mode}
|
||||
onValueChange={onValueChange}
|
||||
container={{
|
||||
ghost,
|
||||
}}
|
||||
remark={{
|
||||
mode: 'editor',
|
||||
}}
|
||||
status
|
||||
drag={{
|
||||
fieldProps: {
|
||||
bordered: true,
|
||||
ghost,
|
||||
//@ts-ignore
|
||||
search,
|
||||
params: {
|
||||
type: 'EXPENSE_TYPE',
|
||||
},
|
||||
},
|
||||
columns,
|
||||
}}
|
||||
create={{
|
||||
formType: 'drawer',
|
||||
formContext,
|
||||
initValues: {
|
||||
type: 'EXPENSE_TYPE',
|
||||
belong: 'NONE_TYPE',
|
||||
status: true,
|
||||
unit: '元',
|
||||
},
|
||||
}}
|
||||
update={{
|
||||
formType: 'drawer',
|
||||
formContext,
|
||||
}}
|
||||
destroy={{}}
|
||||
detail={{
|
||||
rowId: costId,
|
||||
formType: 'drawer',
|
||||
columns: detailColumns,
|
||||
trigger,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
1
packages/app-operation/src/components/Expense/index.ts
Normal file
1
packages/app-operation/src/components/Expense/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export { default as ExpenseCostList } from './ExpenseCostList';
|
||||
@ -18,8 +18,8 @@ import {
|
||||
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
||||
import { ProFormBizSelect } from '@chageable/components';
|
||||
import { ProFormBizSelectHandles } from '@chageable/components/src';
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { Button, Space } from 'antd';
|
||||
import React, { useRef, useState } from 'react';
|
||||
|
||||
interface IOrderCostListProps {
|
||||
ghost?: boolean;
|
||||
@ -46,6 +46,12 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
||||
const [activeKey, setActiveKey] = useState<string>('ALL');
|
||||
|
||||
const columns: ProColumns<BusinessAPI.OrderCostVO, BizValueType>[] = [
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||
dataIndex: 'purchaseOrderVO',
|
||||
key: 'orderId',
|
||||
valueType: 'purchaseOrder',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||
dataIndex: 'name',
|
||||
@ -92,19 +98,22 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
||||
key: 'belong',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
NONE_TYPE: intl.formatMessage({
|
||||
id: intlPrefix + '.column.belong.enum.noneType',
|
||||
}),
|
||||
WORKER_TYPE: {
|
||||
text: intl.formatMessage({
|
||||
id: intlPrefix + '.column.belong.workerType',
|
||||
id: intlPrefix + '.column.belong.enum.workerType',
|
||||
}),
|
||||
},
|
||||
PRODUCTION_TYPE: {
|
||||
text: intl.formatMessage({
|
||||
id: intlPrefix + '.column.belong.productionType',
|
||||
id: intlPrefix + '.column.belong.enum.productionType',
|
||||
}),
|
||||
},
|
||||
DRIVER_TYPE: {
|
||||
text: intl.formatMessage({
|
||||
id: intlPrefix + '.column.belong.driverType',
|
||||
id: intlPrefix + '.column.belong.enum.driverType',
|
||||
}),
|
||||
},
|
||||
},
|
||||
@ -116,24 +125,6 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
||||
valueType: 'money',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||
dataIndex: 'purchaseOrderVO',
|
||||
key: 'orderId',
|
||||
valueType: 'purchaseOrder',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderVehicle' }),
|
||||
dataIndex: 'orderVehicle',
|
||||
key: 'ovVehicleNo',
|
||||
render: (_, record) => {
|
||||
return (
|
||||
<span>
|
||||
{record.orderVehicle.origin} 至 {record.orderVehicle.destination}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
||||
dataIndex: 'orderCompany',
|
||||
@ -173,13 +164,13 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
||||
valueEnum: {
|
||||
true: {
|
||||
text: intl.formatMessage({
|
||||
id: intlPrefix + '.column.isPaid.paid',
|
||||
id: intlPrefix + '.column.isPaid.enum.paid',
|
||||
}),
|
||||
status: 'success',
|
||||
},
|
||||
false: {
|
||||
text: intl.formatMessage({
|
||||
id: intlPrefix + '.column.isPaid.unpaid',
|
||||
id: intlPrefix + '.column.isPaid.enum.unpaid',
|
||||
}),
|
||||
status: 'processing',
|
||||
},
|
||||
@ -362,10 +353,14 @@ export default function OrderCostList(props: IOrderCostListProps) {
|
||||
isPaid: activeKey! as any,
|
||||
}),
|
||||
poStates: ['COMPLETED'],
|
||||
belongs: ['WORKER_TYPE', 'PRODUCTION_TYPE', 'DRIVER_TYPE'],
|
||||
},
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
preserveSelectedRowKeys: true,
|
||||
onChange: (_, selectedRows) => setSelectedRows(selectedRows),
|
||||
getCheckboxProps: (record: BusinessAPI.OrderCostVO) => ({
|
||||
disabled: record.belong === 'NONE_TYPE',
|
||||
}),
|
||||
},
|
||||
tableAlertOptionRender: (props) => {
|
||||
return (
|
||||
|
||||
@ -35,6 +35,12 @@ export default function OrderRebateList(props: IOrderRebateListProps) {
|
||||
const [activeKey, setActiveKey] = useState<string>('ALL');
|
||||
|
||||
const columns: ProColumns<BusinessAPI.OrderRebateVO, BizValueType>[] = [
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||
dataIndex: 'purchaseOrderVO',
|
||||
key: 'orderId',
|
||||
valueType: 'purchaseOrder',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||
dataIndex: 'name',
|
||||
@ -84,24 +90,6 @@ export default function OrderRebateList(props: IOrderRebateListProps) {
|
||||
valueType: 'money',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||
dataIndex: 'purchaseOrderVO',
|
||||
key: 'orderId',
|
||||
valueType: 'purchaseOrder',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderVehicle' }),
|
||||
dataIndex: 'orderVehicle',
|
||||
key: 'ovVehicleNo',
|
||||
render: (_, record) => {
|
||||
return (
|
||||
<span>
|
||||
{record.orderVehicle.origin} 至 {record.orderVehicle.destination}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
||||
dataIndex: 'orderCompany',
|
||||
|
||||
@ -49,6 +49,12 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
||||
useState<BusinessAPI.OrderSupplierVO | null>(null);
|
||||
|
||||
const columns: ProColumns<BusinessAPI.OrderSupplierVO, BizValueType>[] = [
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||
dataIndex: 'purchaseOrderVO',
|
||||
key: 'orderId',
|
||||
valueType: 'purchaseOrder',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
|
||||
dataIndex: 'name',
|
||||
@ -167,41 +173,6 @@ export default function OrderSupplierList(props: IOrderSupplierListProps) {
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.purchaseOrder' }),
|
||||
dataIndex: 'purchaseOrderVO',
|
||||
key: 'orderId',
|
||||
valueType: 'purchaseOrder',
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.dealerName' }),
|
||||
dataIndex: ['orderVehicle', 'dealerName'],
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
|
||||
dataIndex: ['orderVehicle', 'vehicleNo'],
|
||||
search: false,
|
||||
render: (_, record) => <span>第 {record.orderVehicle.vehicleNo} 车</span>,
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderVehicle' }),
|
||||
dataIndex: 'orderVehicle',
|
||||
key: 'ovVehicleNo',
|
||||
search: false,
|
||||
render: (_, record) => {
|
||||
return (
|
||||
<span>
|
||||
{record.orderVehicle.origin} 至 {record.orderVehicle.destination}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.deliveryTime' }),
|
||||
dataIndex: ['orderVehicle', 'deliveryTime'],
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.orderCompany' }),
|
||||
dataIndex: 'orderCompany',
|
||||
|
||||
@ -13,6 +13,7 @@ interface IPurchaseOrderListProps {
|
||||
onValueChange?: () => void;
|
||||
mode?: ModeType;
|
||||
trigger?: () => React.ReactNode;
|
||||
params?: BusinessAPI.PurchaseOrderPageQry;
|
||||
}
|
||||
|
||||
export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
||||
@ -23,6 +24,7 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
||||
mode = 'page',
|
||||
trigger,
|
||||
onValueChange,
|
||||
params,
|
||||
} = props;
|
||||
const intl = useIntl();
|
||||
const intlPrefix = 'purchaseOrder';
|
||||
@ -55,7 +57,11 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
|
||||
dataIndex: ['orderVehicle', 'vehicleNo'],
|
||||
key: 'vehicleNo',
|
||||
render: (_, record) => <span>第 {record.orderVehicle.vehicleNo} 车</span>,
|
||||
render: (_, record) => {
|
||||
return record.orderVehicle?.vehicleNo
|
||||
? '第' + record.orderVehicle?.vehicleNo + '车'
|
||||
: '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.plate' }),
|
||||
@ -150,6 +156,7 @@ export default function PurchaseOrderList(props: IPurchaseOrderListProps) {
|
||||
...(activeKey !== 'ALL' && {
|
||||
state: activeKey! as BusinessAPI.PurchaseOrderVO['state'],
|
||||
}),
|
||||
...params,
|
||||
},
|
||||
toolbar: {
|
||||
menu: {
|
||||
|
||||
@ -75,6 +75,18 @@ export default function PurchaseOrderModal(props: IPurchaseOrderModalProps) {
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.dealerName' }),
|
||||
dataIndex: ['orderVehicle', 'dealerName'],
|
||||
key: 'dealerName',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.vehicleNo' }),
|
||||
dataIndex: ['orderVehicle', 'vehicleNo'],
|
||||
key: 'vehicleNo',
|
||||
search: false,
|
||||
render: (_, record) => {
|
||||
return record.orderVehicle?.vehicleNo
|
||||
? '第' + record.orderVehicle?.vehicleNo + '车'
|
||||
: '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: intlPrefix + '.column.plate' }),
|
||||
|
||||
@ -20,3 +20,4 @@ export * from './Remark';
|
||||
export * from './Role';
|
||||
export * from './Setting';
|
||||
export * from './User';
|
||||
export * from './Expense';
|
||||
|
||||
@ -684,6 +684,9 @@ export default {
|
||||
},
|
||||
column: {
|
||||
shortName: '经销商简称',
|
||||
dealerType: '经销商类型',
|
||||
'dealerType.enum.market': '市场',
|
||||
'dealerType.enum.supermarket': '超市',
|
||||
dealerPaymentAccountVOList: '付款账户',
|
||||
receivable: '应收金额',
|
||||
share: '分成设置',
|
||||
@ -697,6 +700,8 @@ export default {
|
||||
'strawMatCostFlag.tooltip': '草帘是否作为成本',
|
||||
includePackingFlag: '含包装费',
|
||||
'includePackingFlag.tooltip': '发货单合计金额是否含包装费',
|
||||
includeFreightFlag: '含运费',
|
||||
'includeFreightFlag.tooltip': '发货单合计金额是否含运费',
|
||||
enableAccrualTax: '计提税金',
|
||||
'enableAccrualTax.tooltip': '是否开启计提税金',
|
||||
accrualTaxRatio: '计提税金比例',
|
||||
@ -751,6 +756,11 @@ export default {
|
||||
placeholder: '请选择发货单合计金额是否含包装费',
|
||||
required: '请选择发货单合计金额是否含包装费',
|
||||
},
|
||||
includeFreightFlag: {
|
||||
label: '发货单合计金额是否含运费',
|
||||
placeholder: '请选择发货单合计金额是否含运费',
|
||||
required: '请选择发货单合计金额是否含运费',
|
||||
},
|
||||
enableAccrualTax: {
|
||||
label: '是否开启计提税金',
|
||||
},
|
||||
@ -1107,9 +1117,9 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
supplier: {
|
||||
melonFarmer: {
|
||||
column: {
|
||||
name: '姓名',
|
||||
name: '瓜农姓名',
|
||||
idCard: '身份证号',
|
||||
phone: '手机号',
|
||||
bankCard: '银行卡号',
|
||||
@ -1197,6 +1207,90 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
melonStall: {
|
||||
column: {
|
||||
name: '档口名称',
|
||||
payeeName: '收款人姓名',
|
||||
bankCard: '银行卡号',
|
||||
wechatQr: '微信收款码',
|
||||
remark: '备注',
|
||||
status: '状态',
|
||||
'status.enum.enabled': '正常',
|
||||
'status.enum.disabled': '禁用',
|
||||
'status.placeholder': '请选择状态',
|
||||
createdAt: '创建时间',
|
||||
option: '操作',
|
||||
},
|
||||
form: {
|
||||
name: {
|
||||
label: '档口名称',
|
||||
placeholder: '请输入档口名称',
|
||||
required: '档口名称为必填项',
|
||||
},
|
||||
payeeName: {
|
||||
label: '收款人姓名',
|
||||
placeholder: '请输收款人姓名',
|
||||
required: '收款人姓名为必填项',
|
||||
},
|
||||
bankCard: {
|
||||
label: '银行卡号',
|
||||
placeholder: '请输入银行卡号',
|
||||
required: '银行卡号为必填项',
|
||||
},
|
||||
wechatQr: {
|
||||
label: '微信收款码',
|
||||
placeholder: '请输入微信收款码',
|
||||
required: '微信收款码为必填项',
|
||||
},
|
||||
remark: {
|
||||
label: '备注',
|
||||
placeholder: '请输入备注',
|
||||
},
|
||||
status: {
|
||||
label: '状态',
|
||||
placeholder: '请选择状态',
|
||||
required: '状态为必填项',
|
||||
enum: {
|
||||
enabled: '正常',
|
||||
disabled: '禁用',
|
||||
},
|
||||
},
|
||||
},
|
||||
modal: {
|
||||
create: {
|
||||
title: '新增档口',
|
||||
button: '新增档口',
|
||||
success: '新增档口成功',
|
||||
},
|
||||
update: {
|
||||
title: '更新档口',
|
||||
button: '编辑',
|
||||
success: '更新档口成功',
|
||||
status: {
|
||||
success: '修改状态成功',
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
success: '删除档口成功',
|
||||
button: '删除',
|
||||
confirm: {
|
||||
title: '确认删除',
|
||||
content: '您确定要删除该档口吗?',
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
},
|
||||
},
|
||||
import: {
|
||||
title: '导入档口',
|
||||
button: '导入',
|
||||
success: '导入档口成功',
|
||||
},
|
||||
view: {
|
||||
title: '查看档口',
|
||||
button: '查看',
|
||||
},
|
||||
},
|
||||
},
|
||||
boxSpec: {
|
||||
column: {
|
||||
name: '规格名称',
|
||||
@ -1347,8 +1441,7 @@ export default {
|
||||
type: {
|
||||
all: '全部',
|
||||
ourBox: '自产箱',
|
||||
farmerBox: '农夫箱',
|
||||
thirdPartyBox: '第三方箱',
|
||||
thirdPartyBox: '无利润箱',
|
||||
giftBox: '礼盒',
|
||||
},
|
||||
column: {
|
||||
@ -2152,7 +2245,7 @@ export default {
|
||||
invoiceAmount: '应开发票金额(元)',
|
||||
depositAmount: '已付定金(元)',
|
||||
remainingAmount: '剩余付款金额(元)',
|
||||
purchaseOrder: '关联采购单',
|
||||
purchaseOrder: '采购单',
|
||||
deliveryTime: '采购日期',
|
||||
dealerName: '经销商名称',
|
||||
vehicleNo: '车次号',
|
||||
@ -2202,16 +2295,17 @@ export default {
|
||||
name: '费用名称',
|
||||
principal: '收款方',
|
||||
price: '待付款金额',
|
||||
purchaseOrder: '关联采购单',
|
||||
purchaseOrder: '采购单',
|
||||
orderVehicle: '关联车辆',
|
||||
orderCompany: '所属公司',
|
||||
belong: '归属',
|
||||
'belong.workerType': '工头',
|
||||
'belong.productionType': '产地',
|
||||
'belong.driverType': '司机',
|
||||
'belong.enum.noneType': '无归属',
|
||||
'belong.enum.workerType': '工头',
|
||||
'belong.enum.productionType': '产地',
|
||||
'belong.enum.driverType': '司机',
|
||||
isPaid: '是否付款',
|
||||
'isPaid.paid': '已付款',
|
||||
'isPaid.unpaid': '待付款',
|
||||
'isPaid.enum.paid': '已付款',
|
||||
'isPaid.enum.unpaid': '待付款',
|
||||
paidAt: '付款时间',
|
||||
createdAt: '创建时间',
|
||||
option: '操作',
|
||||
@ -2275,7 +2369,7 @@ export default {
|
||||
'calcMethod.notFixed': '不固定模式',
|
||||
netWeight: '净重(斤)',
|
||||
unitPrice: '单价(元/斤)',
|
||||
purchaseOrder: '关联采购单',
|
||||
purchaseOrder: '采购单',
|
||||
orderVehicle: '关联车辆',
|
||||
orderCompany: '所属公司',
|
||||
isPaid: '是否付款',
|
||||
@ -2313,11 +2407,79 @@ export default {
|
||||
},
|
||||
},
|
||||
|
||||
expenseCost: {
|
||||
column: {
|
||||
name: '费用名称',
|
||||
remark: '备注',
|
||||
status: '状态',
|
||||
'status.enum.enabled': '正常',
|
||||
'status.enum.disabled': '禁用',
|
||||
'status.placeholder': '请选择状态',
|
||||
createdAt: '创建时间',
|
||||
option: '操作',
|
||||
},
|
||||
form: {
|
||||
name: {
|
||||
label: '费用名称',
|
||||
placeholder: '请输入费用名称',
|
||||
required: '费用名称为必填项',
|
||||
},
|
||||
|
||||
remark: {
|
||||
label: '备注',
|
||||
placeholder: '请输入备注',
|
||||
},
|
||||
status: {
|
||||
label: '状态',
|
||||
placeholder: '请选择状态',
|
||||
required: '状态为必填项',
|
||||
enum: {
|
||||
enabled: '正常',
|
||||
disabled: '禁用',
|
||||
},
|
||||
},
|
||||
},
|
||||
modal: {
|
||||
create: {
|
||||
title: '新增费用',
|
||||
button: '新增费用',
|
||||
success: '新增费用成功',
|
||||
},
|
||||
update: {
|
||||
title: '更新费用',
|
||||
button: '编辑',
|
||||
success: '更新费用成功',
|
||||
status: {
|
||||
success: '修改状态成功',
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
success: '删除费用成功',
|
||||
button: '删除',
|
||||
confirm: {
|
||||
title: '确认删除',
|
||||
content: '您确定要删除该费用吗?',
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
},
|
||||
},
|
||||
import: {
|
||||
title: '导入费用',
|
||||
button: '导入',
|
||||
success: '导入费用成功',
|
||||
},
|
||||
view: {
|
||||
title: '查看费用',
|
||||
button: '查看',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
form: {
|
||||
orderId: {
|
||||
label: '采购单',
|
||||
placeholder: '请选择关联采购单',
|
||||
required: '关联采购单为必选项',
|
||||
placeholder: '请选择采购单',
|
||||
required: '采购单为必选项',
|
||||
},
|
||||
userId: {
|
||||
label: '操作用户',
|
||||
|
||||
5
packages/app-operation/src/pages/ExpenseCostType.tsx
Normal file
5
packages/app-operation/src/pages/ExpenseCostType.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import { ExpenseCostList } from '@/components';
|
||||
|
||||
export default function Page() {
|
||||
return <ExpenseCostList />;
|
||||
}
|
||||
@ -1,5 +1,11 @@
|
||||
import { PurchaseOrderList } from '@/components';
|
||||
|
||||
export default function Page() {
|
||||
return <PurchaseOrderList />;
|
||||
return (
|
||||
<PurchaseOrderList
|
||||
params={{
|
||||
type: 'PRODUCTION_PURCHASE',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
11
packages/app-operation/src/pages/MarketPurchaseOrder.tsx
Normal file
11
packages/app-operation/src/pages/MarketPurchaseOrder.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
import { PurchaseOrderList } from '@/components';
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<PurchaseOrderList
|
||||
params={{
|
||||
type: 'MARKET_PURCHASE',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
5
packages/app-operation/src/pages/MelonStall.tsx
Normal file
5
packages/app-operation/src/pages/MelonStall.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import { MelonStallList } from '@/components';
|
||||
|
||||
export default function Page() {
|
||||
return <MelonStallList />;
|
||||
}
|
||||
@ -100,7 +100,7 @@ declare namespace AuthAPI {
|
||||
/** 用户ID */
|
||||
userId: string;
|
||||
/** 角色ID */
|
||||
roleIdList: string[];
|
||||
roleIdList: number[];
|
||||
/** 角色信息 */
|
||||
userRoleList?: UserRoleVO[];
|
||||
};
|
||||
@ -195,7 +195,7 @@ declare namespace AuthAPI {
|
||||
|
||||
type RoleMenuTreeQry = {
|
||||
/** 角色权限 */
|
||||
roleId?: string[];
|
||||
roleId?: number[];
|
||||
/** 平台ID */
|
||||
platformId: string;
|
||||
};
|
||||
@ -329,7 +329,7 @@ declare namespace AuthAPI {
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 客户标签 */
|
||||
labelId?: string[];
|
||||
labelId?: number[];
|
||||
/** 用户ID */
|
||||
userId: string;
|
||||
};
|
||||
|
||||
@ -0,0 +1,97 @@
|
||||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
import request from '../request';
|
||||
|
||||
/** 创建花销统计记录 POST /operation/createExpenseRecord */
|
||||
export async function createExpenseRecord(
|
||||
body: BusinessAPI.ExpenseRecordCreateCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.SingleResponseExpenseRecordVO>(
|
||||
'/operation/createExpenseRecord',
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 花销统计记录列表 GET /operation/listExpenseRecord */
|
||||
export async function listExpenseRecord(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: BusinessAPI.listExpenseRecordParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.MultiResponseExpenseRecordVO>(
|
||||
'/operation/listExpenseRecord',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
expenseRecordListQry: undefined,
|
||||
...params['expenseRecordListQry'],
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 花销统计记录详情 GET /operation/showExpenseRecord */
|
||||
export async function showExpenseRecord(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: BusinessAPI.showExpenseRecordParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.SingleResponseExpenseRecordVO>(
|
||||
'/operation/showExpenseRecord',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
expenseRecordShowQry: undefined,
|
||||
...params['expenseRecordShowQry'],
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 花销统计记录更新 PUT /operation/updateExpenseRecord */
|
||||
export async function updateExpenseRecord(
|
||||
body: BusinessAPI.ExpenseRecordUpdateCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.SingleResponseExpenseRecordVO>(
|
||||
'/operation/updateExpenseRecord',
|
||||
{
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 花销统计记录更新 PATCH /operation/updateExpenseRecord */
|
||||
export async function updateExpenseRecord1(
|
||||
body: BusinessAPI.ExpenseRecordUpdateCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.SingleResponseExpenseRecordVO>(
|
||||
'/operation/updateExpenseRecord',
|
||||
{
|
||||
method: 'PATCH',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -17,6 +17,7 @@ import * as dealerRebateCustomer from './dealerRebateCustomer';
|
||||
import * as dealerWarehouse from './dealerWarehouse';
|
||||
import * as dictionary from './dictionary';
|
||||
import * as employee from './employee';
|
||||
import * as expenseRecord from './expenseRecord';
|
||||
import * as extraction from './extraction';
|
||||
import * as giftBox from './giftBox';
|
||||
import * as material from './material';
|
||||
@ -48,6 +49,7 @@ export default {
|
||||
material,
|
||||
materialCategory,
|
||||
giftBox,
|
||||
expenseRecord,
|
||||
employee,
|
||||
dictionary,
|
||||
dealer,
|
||||
|
||||
@ -898,7 +898,8 @@ declare namespace BusinessAPI {
|
||||
| 'ARTIFICIAL_TYPE'
|
||||
| 'PRODUCTION_TYPE'
|
||||
| 'OTHER_TYPE'
|
||||
| 'LOGISTICS_TYPE';
|
||||
| 'LOGISTICS_TYPE'
|
||||
| 'EXPENSE_TYPE';
|
||||
/** 费用归属:0_无归属;1_工头;2_产地;3_司机; */
|
||||
belong: 'NONE_TYPE' | 'WORKER_TYPE' | 'PRODUCTION_TYPE' | 'DRIVER_TYPE';
|
||||
/** 费用名称 */
|
||||
@ -1061,13 +1062,16 @@ declare namespace BusinessAPI {
|
||||
| 'ARTIFICIAL_TYPE'
|
||||
| 'PRODUCTION_TYPE'
|
||||
| 'OTHER_TYPE'
|
||||
| 'LOGISTICS_TYPE';
|
||||
| 'LOGISTICS_TYPE'
|
||||
| 'EXPENSE_TYPE';
|
||||
/** 费用归属:0_无归属;1_工头;2_产地;3_司机; */
|
||||
belong?:
|
||||
| 'NONE_TYPE'
|
||||
| 'WORKER_TYPE'
|
||||
| 'PRODUCTION_TYPE'
|
||||
| 'DRIVER_TYPE';
|
||||
/** 费用名称 */
|
||||
name?: string;
|
||||
};
|
||||
|
||||
type CostPageQry = {
|
||||
@ -1093,7 +1097,8 @@ declare namespace BusinessAPI {
|
||||
| 'ARTIFICIAL_TYPE'
|
||||
| 'PRODUCTION_TYPE'
|
||||
| 'OTHER_TYPE'
|
||||
| 'LOGISTICS_TYPE';
|
||||
| 'LOGISTICS_TYPE'
|
||||
| 'EXPENSE_TYPE';
|
||||
/** 费用归属:0_无归属;1_工头;2_产地;3_司机; */
|
||||
belong?:
|
||||
| 'NONE_TYPE'
|
||||
@ -1119,7 +1124,8 @@ declare namespace BusinessAPI {
|
||||
| 'ARTIFICIAL_TYPE'
|
||||
| 'PRODUCTION_TYPE'
|
||||
| 'OTHER_TYPE'
|
||||
| 'LOGISTICS_TYPE';
|
||||
| 'LOGISTICS_TYPE'
|
||||
| 'EXPENSE_TYPE';
|
||||
/** 费用归属:0_无归属;1_工头;2_产地;3_司机; */
|
||||
belong: 'NONE_TYPE' | 'WORKER_TYPE' | 'PRODUCTION_TYPE' | 'DRIVER_TYPE';
|
||||
/** 费用名称 */
|
||||
@ -1147,7 +1153,8 @@ declare namespace BusinessAPI {
|
||||
| 'ARTIFICIAL_TYPE'
|
||||
| 'PRODUCTION_TYPE'
|
||||
| 'OTHER_TYPE'
|
||||
| 'LOGISTICS_TYPE';
|
||||
| 'LOGISTICS_TYPE'
|
||||
| 'EXPENSE_TYPE';
|
||||
/** 费用归属:0_无归属;1_工头;2_产地;3_司机; */
|
||||
belong: 'NONE_TYPE' | 'WORKER_TYPE' | 'PRODUCTION_TYPE' | 'DRIVER_TYPE';
|
||||
/** 费用名称 */
|
||||
@ -1211,6 +1218,8 @@ declare namespace BusinessAPI {
|
||||
strawMatCostFlag?: boolean;
|
||||
/** 发货单合计金额是否含包装费 */
|
||||
includePackingFlag?: boolean;
|
||||
/** 发货单合计金额是否含包运费 */
|
||||
includeFreightFlag?: boolean;
|
||||
/** 应收金额 */
|
||||
receivable?: number;
|
||||
/** 备注 */
|
||||
@ -1533,6 +1542,8 @@ declare namespace BusinessAPI {
|
||||
strawMatCostFlag?: boolean;
|
||||
/** 发货单合计金额是否含包装费 */
|
||||
includePackingFlag?: boolean;
|
||||
/** 发货单合计金额是否含包运费 */
|
||||
includeFreightFlag?: boolean;
|
||||
/** 应收金额 */
|
||||
receivable?: number;
|
||||
/** 备注 */
|
||||
@ -1576,6 +1587,8 @@ declare namespace BusinessAPI {
|
||||
strawMatCostFlag?: boolean;
|
||||
/** 发货单合计金额是否含包装费 */
|
||||
includePackingFlag?: boolean;
|
||||
/** 发货单合计金额是否含包运费 */
|
||||
includeFreightFlag?: boolean;
|
||||
/** 应收金额 */
|
||||
receivable?: number;
|
||||
/** 备注 */
|
||||
@ -1942,6 +1955,95 @@ declare namespace BusinessAPI {
|
||||
userRoleList?: UserRoleVO[];
|
||||
};
|
||||
|
||||
type ExpenseCost = {
|
||||
/** 明细ID */
|
||||
expenseCostId: string;
|
||||
/** 花销统计记录ID */
|
||||
expenseRecordId: string;
|
||||
/** 费用类型ID */
|
||||
costId: string;
|
||||
/** 费用类型名称 */
|
||||
costName: string;
|
||||
/** 花销金额 */
|
||||
expenseAmount: string;
|
||||
/** 备注(可填员工、事由等) */
|
||||
remark?: string;
|
||||
};
|
||||
|
||||
type ExpenseProvision = {
|
||||
/** 明细ID */
|
||||
expenseProvisionId: string;
|
||||
/** 花销统计记录ID */
|
||||
expenseRecordId: string;
|
||||
/** 经销商名称 */
|
||||
dealerName?: string;
|
||||
/** 车次号 */
|
||||
vehicleNo?: string;
|
||||
/** 计提金额 */
|
||||
provisionAmount: number;
|
||||
/** 采购单ID */
|
||||
orderId?: string;
|
||||
};
|
||||
|
||||
type ExpenseRecordCreateCmd = {
|
||||
/** 记录日期(YYYY-MM-DD) */
|
||||
recordDate?: string;
|
||||
/** 花销费用明细 */
|
||||
expenseCostList?: ExpenseCost[];
|
||||
/** 花销计提明细 */
|
||||
expenseProvisionList?: ExpenseProvision[];
|
||||
};
|
||||
|
||||
type ExpenseRecordListQry = {
|
||||
/** 状态:1_启用;0_禁用; */
|
||||
status?: boolean;
|
||||
/** 开始日期 */
|
||||
startDate?: string;
|
||||
/** 结束日期 */
|
||||
endDate?: string;
|
||||
};
|
||||
|
||||
type ExpenseRecordShowQry = {
|
||||
/** 状态:1_启用;0_禁用; */
|
||||
status?: boolean;
|
||||
/** 花销统计记录ID */
|
||||
expenseRecordId?: string;
|
||||
/** 记录日期(YYYY-MM-DD) */
|
||||
recordDate?: string;
|
||||
};
|
||||
|
||||
type ExpenseRecordUpdateCmd = {
|
||||
/** 记录日期(YYYY-MM-DD) */
|
||||
recordDate?: string;
|
||||
/** 花销费用明细 */
|
||||
expenseCostList?: ExpenseCost[];
|
||||
/** 花销计提明细 */
|
||||
expenseProvisionList?: ExpenseProvision[];
|
||||
/** 花销统计记录ID */
|
||||
expenseRecordId: string;
|
||||
};
|
||||
|
||||
type ExpenseRecordVO = {
|
||||
/** 记录ID */
|
||||
expenseRecordId: string;
|
||||
/** 记录日期(YYYY-MM-DD) */
|
||||
recordDate?: string;
|
||||
/** 计提车次数量 */
|
||||
totalVehicleCount?: number;
|
||||
/** 计提总金额 */
|
||||
totalProvision?: number;
|
||||
/** 花销总额 */
|
||||
totalExpense?: number;
|
||||
/** 日常利润 */
|
||||
dailyProfit?: number;
|
||||
/** 花销计提明细 */
|
||||
expenseProvisionList?: ExpenseProvision[];
|
||||
/** 花销费用明细 */
|
||||
expenseCostList?: ExpenseCost[];
|
||||
/** 创建时间 */
|
||||
createdAt?: string;
|
||||
};
|
||||
|
||||
type getLastVehicleNoParams = {
|
||||
lastVehicleNoQry: LastVehicleNoQry;
|
||||
};
|
||||
@ -2107,6 +2209,10 @@ declare namespace BusinessAPI {
|
||||
employeeListQry: EmployeeListQry;
|
||||
};
|
||||
|
||||
type listExpenseRecordParams = {
|
||||
expenseRecordListQry: ExpenseRecordListQry;
|
||||
};
|
||||
|
||||
type listGiftBoxParams = {
|
||||
giftBoxListQry: GiftBoxListQry;
|
||||
};
|
||||
@ -2510,6 +2616,15 @@ declare namespace BusinessAPI {
|
||||
notEmpty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseExpenseRecordVO = {
|
||||
success?: boolean;
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: ExpenseRecordVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseGiftBoxVO = {
|
||||
success?: boolean;
|
||||
errCode?: string;
|
||||
@ -2678,7 +2793,8 @@ declare namespace BusinessAPI {
|
||||
| 'ARTIFICIAL_TYPE'
|
||||
| 'PRODUCTION_TYPE'
|
||||
| 'OTHER_TYPE'
|
||||
| 'LOGISTICS_TYPE';
|
||||
| 'LOGISTICS_TYPE'
|
||||
| 'EXPENSE_TYPE';
|
||||
/** 关联项目id */
|
||||
costItemIds?: number[];
|
||||
/** 是否选中 */
|
||||
@ -2714,7 +2830,8 @@ declare namespace BusinessAPI {
|
||||
| 'ARTIFICIAL_TYPE'
|
||||
| 'PRODUCTION_TYPE'
|
||||
| 'OTHER_TYPE'
|
||||
| 'LOGISTICS_TYPE';
|
||||
| 'LOGISTICS_TYPE'
|
||||
| 'EXPENSE_TYPE';
|
||||
/** 关联项目id */
|
||||
costItemIds?: number[];
|
||||
/** 是否付款 */
|
||||
@ -2816,13 +2933,12 @@ declare namespace BusinessAPI {
|
||||
| 'ARTIFICIAL_TYPE'
|
||||
| 'PRODUCTION_TYPE'
|
||||
| 'OTHER_TYPE'
|
||||
| 'LOGISTICS_TYPE';
|
||||
| 'LOGISTICS_TYPE'
|
||||
| 'EXPENSE_TYPE';
|
||||
/** 关联项目id */
|
||||
costItemIds?: number[];
|
||||
/** 创建时间 */
|
||||
createdAt: string;
|
||||
/** 车辆信息 */
|
||||
orderVehicle: OrderVehicle;
|
||||
/** 采购订单状态: 0_草稿;1_审核中;2_已完成;3_已驳回;4_已关闭; */
|
||||
poState?:
|
||||
| 'DRAFT'
|
||||
@ -2859,6 +2975,8 @@ declare namespace BusinessAPI {
|
||||
strawMatCostFlag?: boolean;
|
||||
/** 发货单合计金额是否含包装费 */
|
||||
includePackingFlag?: boolean;
|
||||
/** 发货单合计金额是否含包运费 */
|
||||
includeFreightFlag?: boolean;
|
||||
/** 是否开启计提税金 */
|
||||
enableAccrualTax?: boolean;
|
||||
/** 计提税金比例 */
|
||||
@ -2992,8 +3110,6 @@ declare namespace BusinessAPI {
|
||||
amount?: number;
|
||||
/** 创建时间 */
|
||||
createdAt: string;
|
||||
/** 车辆信息 */
|
||||
orderVehicle: OrderVehicle;
|
||||
/** 采购订单状态: 0_草稿;1_审核中;2_已完成;3_已驳回;4_已关闭; */
|
||||
poState?:
|
||||
| 'DRAFT'
|
||||
@ -3289,6 +3405,8 @@ declare namespace BusinessAPI {
|
||||
phone: string;
|
||||
/** 微信二维码 */
|
||||
wechatQr?: string;
|
||||
/** 供应商类型:1_瓜农;2_档口; */
|
||||
type: 'FARMER' | 'STALL';
|
||||
/** 是否最后一家 */
|
||||
isLast: boolean;
|
||||
/** 空磅是否包含纸箱 */
|
||||
@ -3341,8 +3459,6 @@ declare namespace BusinessAPI {
|
||||
isPaid?: boolean;
|
||||
/** 采购订单包装箱信息 */
|
||||
orderPackageList?: OrderPackage[];
|
||||
/** 采购订单车辆信息 */
|
||||
orderVehicle?: OrderVehicle;
|
||||
/** 采购订单公司信息 */
|
||||
orderCompany?: OrderCompany;
|
||||
/** 是否选中 */
|
||||
@ -3443,6 +3559,8 @@ declare namespace BusinessAPI {
|
||||
phone: string;
|
||||
/** 微信二维码 */
|
||||
wechatQr: string;
|
||||
/** 供应商类型:1_瓜农;2_档口; */
|
||||
type: 'FARMER' | 'STALL';
|
||||
/** 是否最后一家 */
|
||||
isLast: boolean;
|
||||
/** 空磅是否包含纸箱 */
|
||||
@ -3489,8 +3607,6 @@ declare namespace BusinessAPI {
|
||||
contractImg: UploadFileItem[];
|
||||
/** 创建时间 */
|
||||
createdAt: string;
|
||||
/** 车辆信息 */
|
||||
orderVehicle: OrderVehicle;
|
||||
/** 采购订单状态: 0_草稿;1_审核中;2_已完成;3_已驳回;4_已关闭; */
|
||||
poState?:
|
||||
| 'DRAFT'
|
||||
@ -4277,6 +4393,8 @@ declare namespace BusinessAPI {
|
||||
| 'BOSS_APPROVED'
|
||||
| 'QUOTE_REJECTED'
|
||||
| 'BOSS_REJECTED';
|
||||
/** 采购类型:1_产地采购;2_市场采购; */
|
||||
type?: 'PRODUCTION_PURCHASE' | 'MARKET_PURCHASE';
|
||||
};
|
||||
|
||||
type PurchaseOrderCreateCmd = {
|
||||
@ -4352,6 +4470,8 @@ declare namespace BusinessAPI {
|
||||
| 'BOSS_APPROVED'
|
||||
| 'QUOTE_REJECTED'
|
||||
| 'BOSS_REJECTED';
|
||||
/** 采购类型:1_产地采购;2_市场采购; */
|
||||
type?: 'PRODUCTION_PURCHASE' | 'MARKET_PURCHASE';
|
||||
/** 供应商名称 */
|
||||
supplierName?: string;
|
||||
/** 经销商ID */
|
||||
@ -4472,6 +4592,8 @@ declare namespace BusinessAPI {
|
||||
| 'BOSS_APPROVED'
|
||||
| 'QUOTE_REJECTED'
|
||||
| 'BOSS_REJECTED';
|
||||
/** 采购类型:1_产地采购;2_市场采购; */
|
||||
type?: 'PRODUCTION_PURCHASE' | 'MARKET_PURCHASE';
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 创建人ID */
|
||||
@ -4783,6 +4905,10 @@ declare namespace BusinessAPI {
|
||||
employeeShowQry: EmployeeShowQry;
|
||||
};
|
||||
|
||||
type showExpenseRecordParams = {
|
||||
expenseRecordShowQry: ExpenseRecordShowQry;
|
||||
};
|
||||
|
||||
type showGiftBoxParams = {
|
||||
giftBoxShowQry: GiftBoxShowQry;
|
||||
};
|
||||
@ -4947,6 +5073,13 @@ declare namespace BusinessAPI {
|
||||
data?: EmployeeVO;
|
||||
};
|
||||
|
||||
type SingleResponseExpenseRecordVO = {
|
||||
success?: boolean;
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: ExpenseRecordVO;
|
||||
};
|
||||
|
||||
type SingleResponseGiftBoxVO = {
|
||||
success?: boolean;
|
||||
errCode?: string;
|
||||
@ -5137,6 +5270,8 @@ declare namespace BusinessAPI {
|
||||
supplierId?: string;
|
||||
/** 供应商名称 */
|
||||
name?: string;
|
||||
/** 供应商类型:1_瓜农;2_档口; */
|
||||
type?: 'FARMER' | 'STALL';
|
||||
};
|
||||
|
||||
type SupplierPackageUsage = {
|
||||
@ -5171,6 +5306,8 @@ declare namespace BusinessAPI {
|
||||
phone?: string;
|
||||
/** 银行卡号 */
|
||||
bankCard?: string;
|
||||
/** 供应商类型:1_瓜农;2_档口; */
|
||||
type?: 'FARMER' | 'STALL';
|
||||
offset?: number;
|
||||
};
|
||||
|
||||
@ -5213,6 +5350,8 @@ declare namespace BusinessAPI {
|
||||
bankCard: string;
|
||||
/** 微信收款码URL */
|
||||
wechatQr?: string;
|
||||
/** 供应商类型:1_瓜农;2_档口; */
|
||||
type: 'FARMER' | 'STALL';
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 状态:1_启用;0_禁用; */
|
||||
|
||||
@ -74,11 +74,14 @@ const LeftMenu: React.FC<ILeftMenuProps> = (props) => {
|
||||
});
|
||||
|
||||
// 通过循环 moduleMenu 判断 history.location.pathname 是否包含 key
|
||||
const activeMenu = getMatchMenu(pathname, menuData);
|
||||
const activeMenu = getMatchMenu(pathname, menuData, true);
|
||||
// pluck activeMenu key
|
||||
const activeMenuKey = activeMenu.map(
|
||||
(item: MenuDataItem) => item.key as string,
|
||||
);
|
||||
const openKeys = activeMenu.flatMap((item: MenuDataItem) => item.children).map(
|
||||
(item: any) => item?.key as string,
|
||||
);
|
||||
|
||||
let subMenu: MenuItemType[] = [];
|
||||
if (activeMenu[0]?.children) {
|
||||
@ -114,6 +117,7 @@ const LeftMenu: React.FC<ILeftMenuProps> = (props) => {
|
||||
items={subMenu}
|
||||
className={styles.subMenu}
|
||||
selectedKeys={activeMenuKey}
|
||||
openKeys={openKeys}
|
||||
mode="inline"
|
||||
inlineIndent={12}
|
||||
onClick={(item) => {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user