|
@@ -313,7 +313,7 @@ const PSRDetail = () => {
|
|
|
let name = dayjs(item.day).format('YYYY-MM');
|
|
|
if (item.ver_type == 1) name = '原始版本';
|
|
|
if (item.ver_type == 2) name = '基础版本';
|
|
|
- return { ...item, name };
|
|
|
+ return { ...item, name: `${titleRef.current}${name}` };
|
|
|
});
|
|
|
setHistoryList(list);
|
|
|
}
|
|
@@ -362,19 +362,19 @@ const PSRDetail = () => {
|
|
|
formatResult: (res) => {
|
|
|
if (res?.data) {
|
|
|
let data = res.data;
|
|
|
- let name = dayjs(data.day).format('YYYY-MM');
|
|
|
+ let name = `${titleRef.current}${dayjs(data.day).format('YYYY-MM')}`;
|
|
|
if (data.ver_type == 1) name = '原始版本';
|
|
|
if (data.ver_type == 2) name = '基础版本';
|
|
|
setExcelData({ ...data, name });
|
|
|
setHistoryOpen(false);
|
|
|
const jsonData = JSON.parse(data.json_data);
|
|
|
- console.log(data);
|
|
|
|
|
|
jsonData.map((item) => {
|
|
|
if (item.celldata && typeof item.celldata == 'string')
|
|
|
item.celldata = JSON.parse(item.celldata);
|
|
|
if (item.config && typeof item.config == 'string')
|
|
|
item.config = JSON.parse(item.config);
|
|
|
+ if (item?.name == 'PSR') item.hide = 0;
|
|
|
});
|
|
|
renderSheet(jsonData, data.is_edit, data.day);
|
|
|
} else {
|
|
@@ -418,9 +418,11 @@ const PSRDetail = () => {
|
|
|
break;
|
|
|
case '3':
|
|
|
str = '过程/终版PSR_';
|
|
|
+ runList({ data_type: 1 });
|
|
|
break;
|
|
|
case '4':
|
|
|
str = '现金流_';
|
|
|
+ runList({ data_type: 2 });
|
|
|
break;
|
|
|
}
|
|
|
titleRef.current = str;
|
|
@@ -479,6 +481,7 @@ const PSRDetail = () => {
|
|
|
}
|
|
|
|
|
|
data.map((item) => {
|
|
|
+ if (item.name == 'PSR') item.hide = 0;
|
|
|
if (data_type == 2) item.hide = 0;
|
|
|
if (item.celldata && typeof item.celldata == 'string')
|
|
|
item.celldata = JSON.parse(item.celldata);
|
|
@@ -557,7 +560,7 @@ const PSRDetail = () => {
|
|
|
psr_json_data: JSON.stringify(allData),
|
|
|
ver_type: excelData?.ver_type,
|
|
|
};
|
|
|
- console.log(params);
|
|
|
+ console.log(params, allData);
|
|
|
runSave(params);
|
|
|
};
|
|
|
|
|
@@ -798,7 +801,6 @@ const PSRDetail = () => {
|
|
|
<Button
|
|
|
type="primary"
|
|
|
onClick={() => {
|
|
|
- runList();
|
|
|
setHistoryOpen(true);
|
|
|
}}
|
|
|
disabled={noData}
|
|
@@ -850,6 +852,7 @@ const PSRDetail = () => {
|
|
|
setNoData(true);
|
|
|
return;
|
|
|
}
|
|
|
+ console.log('------------currentData------', currentData);
|
|
|
setNoData(false);
|
|
|
if (!luckysheetRef.current) {
|
|
|
setTimeout(() => {
|
|
@@ -971,7 +974,7 @@ const PSRDetail = () => {
|
|
|
setKey(list[0].key);
|
|
|
}
|
|
|
return list;
|
|
|
- }, [user, excelData?.name]);
|
|
|
+ }, [user, excelData?.name, compareValues?.length]);
|
|
|
|
|
|
const handlerDetailClick = (id) => {
|
|
|
if (key == '2') {
|
|
@@ -982,6 +985,7 @@ const PSRDetail = () => {
|
|
|
runDetail({ id });
|
|
|
};
|
|
|
|
|
|
+ console.log('__----------------', historyList);
|
|
|
return (
|
|
|
<PageContent>
|
|
|
<div className={styles.titleDev}>
|
|
@@ -1000,7 +1004,7 @@ const PSRDetail = () => {
|
|
|
/>
|
|
|
{noData && <div className={styles.noData}>暂无数据</div>}
|
|
|
{compareValues?.length == 2 ? (
|
|
|
- <CompareCom values={compareValues} />
|
|
|
+ <CompareCom values={compareValues} permissions={user?.Permission} />
|
|
|
) : (
|
|
|
<iframe
|
|
|
style={{
|
|
@@ -1026,7 +1030,7 @@ const PSRDetail = () => {
|
|
|
return {
|
|
|
children: (
|
|
|
<a onClick={() => handlerDetailClick(item.id)}>
|
|
|
- {titleRef.current}
|
|
|
+ {/* {titleRef.current} */}
|
|
|
{item.name}
|
|
|
</a>
|
|
|
),
|