Commit c40c4f49 authored by 前端-许佳敏's avatar 前端-许佳敏
parents 89e89a19 89db360f
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
"@linkseeks/design-core": "^1.0.0", "@linkseeks/design-core": "^1.0.0",
"@linkseeks/design-react": "^1.0.2", "@linkseeks/design-react": "^1.0.2",
"@linkseeks/design-react-web": "^1.0.0", "@linkseeks/design-react-web": "^1.0.0",
"@linkseeks/design-ui": "^1.0.11", "@linkseeks/design-ui": "^1.0.12",
"@linkseeks/design-utils": "^1.0.0", "@linkseeks/design-utils": "^1.0.0",
"@linkseeks/god": "^1.0.0", "@linkseeks/god": "^1.0.0",
"@types/crypto-js": "^4.0.1", "@types/crypto-js": "^4.0.1",
......
...@@ -202,7 +202,7 @@ const createComponent = ( ...@@ -202,7 +202,7 @@ const createComponent = (
props: isDept props: isDept
? omit(current, ['childrenData']) ? omit(current, ['childrenData'])
: specialKey && specialKey === otherProps[floor - 1].type : specialKey && specialKey === otherProps[floor - 1].type
? { label: labels[`${childProps}-${rest.join("-")}`] || [] , ...childProps } ? { label: labels[`${rest.join("-")}-${childProps.id}`] || [] , ...childProps }
: childProps, : childProps,
otherProps: otherProps[floor - 1], otherProps: otherProps[floor - 1],
childNodes: parentChildKeys, childNodes: parentChildKeys,
......
...@@ -8,6 +8,7 @@ import { history } from 'umi'; ...@@ -8,6 +8,7 @@ import { history } from 'umi';
type Options = { type Options = {
id: number; id: number;
environment?: "app" | "web"
} }
/** 数组转合集 */ /** 数组转合集 */
...@@ -59,7 +60,7 @@ type ResultType = { ...@@ -59,7 +60,7 @@ type ResultType = {
} & ActivityContent } & ActivityContent
function useSaveData(options: Options) { function useSaveData(options: Options) {
const { id } = options const { id, environment = 'app' } = options
const [saving, setSaving] = useState<boolean>(false); const [saving, setSaving] = useState<boolean>(false);
const generaterData = (source: ResultType, dataIndex: string, assignData: {[key: string]: any} ) => { const generaterData = (source: ResultType, dataIndex: string, assignData: {[key: string]: any} ) => {
...@@ -102,22 +103,7 @@ function useSaveData(options: Options) { ...@@ -102,22 +103,7 @@ function useSaveData(options: Options) {
childrenData: childrenData childrenData: childrenData
} }
}); });
} else if (ACTIVITY_LIST.includes( dataIndex as ACTIVITY_KEYS ) && dataIndex !== 'combination') { } else if (dataIndex === 'suggestProduct' || (dataIndex === 'combination' && environment === 'app')) {
const { ...otherProps } = props || {};
const childrenData = childNodes.map((_record) => {
const childTargetProps = pageConfig[_record].props;
return childTargetProps.id;
}).filter(Boolean);
// const childrenData = products?.map((_item) => _item.id) || [];
result = generaterData(result, dataIndex, {
sort: sort,
props: {
...pick(otherProps, ['theme', 'title']),
visible: props.status ?? true,
childrenData: childrenData
}
});
} else if (dataIndex === 'suggestProduct' || dataIndex === 'combination') {
const { ...otherProps } = props || {}; const { ...otherProps } = props || {};
const { childNodes } = target; const { childNodes } = target;
const temp = { const temp = {
...@@ -148,7 +134,22 @@ function useSaveData(options: Options) { ...@@ -148,7 +134,22 @@ function useSaveData(options: Options) {
} }
}; };
result = generaterData(result, dataIndex, temp); result = generaterData(result, dataIndex, temp);
} } else if (ACTIVITY_LIST.includes( dataIndex as ACTIVITY_KEYS )) {
const { ...otherProps } = props || {};
const childrenData = childNodes.map((_record) => {
const childTargetProps = pageConfig[_record].props;
return childTargetProps.id;
}).filter(Boolean);
// const childrenData = products?.map((_item) => _item.id) || [];
result = generaterData(result, dataIndex, {
sort: sort,
props: {
...pick(otherProps, ['theme', 'title']),
visible: props.status ?? true,
childrenData: childrenData
}
});
}
}); });
const withThemeStyle = { const withThemeStyle = {
...result, ...result,
......
...@@ -24,7 +24,7 @@ const Web = () => { ...@@ -24,7 +24,7 @@ const Web = () => {
// useDraggable(el); // useDraggable(el);
const { id } = usePageStatus(); const { id } = usePageStatus();
const [scale, setScale] = useState(0.75); const [scale, setScale] = useState(0.75);
const { saving, onSave } = useSaveData({ id: +id }); const { saving, onSave } = useSaveData({ id: +id, environment: 'web' });
const [leftBarVisible, setLeftBarVisible] = useState<boolean>(true); const [leftBarVisible, setLeftBarVisible] = useState<boolean>(true);
const { detail, loading } = useGetWebLayout(); const { detail, loading } = useGetWebLayout();
......
...@@ -77,8 +77,8 @@ function useHandleSettlementList() { ...@@ -77,8 +77,8 @@ function useHandleSettlementList() {
{title: '总单数', dataIndex: 'totalCount'}, {title: '总单数', dataIndex: 'totalCount'},
{title: '结算金额', dataIndex: 'amount', render: (text) => `¥${priceFormat(text)}`}, {title: '结算金额', dataIndex: 'amount', render: (text) => `¥${priceFormat(text)}`},
{title: '结算日期', dataIndex: 'settlementDate'}, {title: '结算日期', dataIndex: 'settlementDate'},
{title: '预计付款日期', dataIndex: 'settlementDate1'}, {title: '预计付款日期', dataIndex: 'estimatedPaymentDate'},
{title: '实际支付时间', dataIndex: 'settlementDate2'}, {title: '实际支付时间', dataIndex: 'actualPaymentTime'},
{title: '支付方式', dataIndex: 'payWayName'}, {title: '支付方式', dataIndex: 'payWayName'},
{ {
title: '结算状态', dataIndex: 'status', title: '结算状态', dataIndex: 'status',
......
...@@ -1823,10 +1823,10 @@ ...@@ -1823,10 +1823,10 @@
react-dom "^17.0.2" react-dom "^17.0.2"
sortablejs "^1.10.2" sortablejs "^1.10.2"
"@linkseeks/design-ui@^1.0.11": "@linkseeks/design-ui@^1.0.12":
version "1.0.11" version "1.0.12"
resolved "http://npm.shushangyun.com/@linkseeks%2fdesign-ui/-/design-ui-1.0.11.tgz#184fc802a76121ed58e6c0b60604d7068355f0ec" resolved "http://npm.shushangyun.com/@linkseeks%2fdesign-ui/-/design-ui-1.0.12.tgz#37774c8f24cf779847d69ed02b48b66cc6f48e18"
integrity sha512-0GXhzAEUUmO3a0XmTSe2Z/zBaABZhJ6ajJc1bPifZxLQJV0q2zTUD2xLg9kB3bZjXYdovkOQ3Fc+OTW4dhj33Q== integrity sha512-DbRwqO6HZtzV4GEZb8dKzZPM1lqTATrMXxV6N8PVrYocXd9FZcjnaW8lvEOyGjiRumpx85IV8trD5OUzf/DKdQ==
dependencies: dependencies:
"@linkseeks/design-utils" "^1.0.0" "@linkseeks/design-utils" "^1.0.0"
antd "^4.15.1" antd "^4.15.1"
......
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