fix: 修复甲方和乙方的公司名称是用第一个key内的value值来进行查询。
This commit is contained in:
@@ -2691,7 +2691,10 @@ export function ReviewPointsList({
|
||||
{/* <div className='flex flex-col'> */}
|
||||
<div className="flex items-center gap-2 max-w-[75%]">
|
||||
<div className="review-point-title text-left text-blue-500 break-all">{reviewPoint.pointName}</div>
|
||||
{ reviewPoint.pointName === '签署乙方详细信息校验' && (
|
||||
{ reviewPoint.pointName === '签署乙方详细信息校验' && (() => {
|
||||
const firstContentKey = reviewPoint.content ? Object.keys(reviewPoint.content)[0] : undefined;
|
||||
const firstContentValue = firstContentKey ? reviewPoint.content![firstContentKey]?.value : undefined;
|
||||
return (
|
||||
<button
|
||||
className="enterprise-info-btn"
|
||||
style={{
|
||||
@@ -2704,27 +2707,25 @@ export function ReviewPointsList({
|
||||
flexShrink: 0,
|
||||
transition: 'all 0.2s',
|
||||
border: 'none',
|
||||
cursor: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? 'pointer' : 'not-allowed',
|
||||
backgroundColor: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? '#00684a' : '#e5e7eb',
|
||||
color: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? '#ffffff' : '#9ca3af',
|
||||
cursor: firstContentValue ? 'pointer' : 'not-allowed',
|
||||
backgroundColor: firstContentValue ? '#00684a' : '#e5e7eb',
|
||||
color: firstContentValue ? '#ffffff' : '#9ca3af',
|
||||
}}
|
||||
disabled={!reviewPoint.content?.['合同主体信息-乙方名称']?.value}
|
||||
disabled={!firstContentValue}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
const companyNameValue = reviewPoint.content?.['合同主体信息-乙方名称']?.value;
|
||||
// console.log('companyNameValue', companyNameValue);
|
||||
const companyName = typeof companyNameValue === 'string' ? companyNameValue : String(companyNameValue || '');
|
||||
const companyName = typeof firstContentValue === 'string' ? firstContentValue : String(firstContentValue || '');
|
||||
if (companyName) {
|
||||
handleCorporateInfoClick(companyName);
|
||||
}
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
if (reviewPoint.content?.['合同主体信息-乙方名称']?.value) {
|
||||
if (firstContentValue) {
|
||||
e.currentTarget.style.backgroundColor = '#005a3f';
|
||||
}
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
if (reviewPoint.content?.['合同主体信息-乙方名称']?.value) {
|
||||
if (firstContentValue) {
|
||||
e.currentTarget.style.backgroundColor = '#00684a';
|
||||
}
|
||||
}}
|
||||
@@ -2732,8 +2733,12 @@ export function ReviewPointsList({
|
||||
<i className="ri-eye-line"></i>
|
||||
乙方企业信息
|
||||
</button>
|
||||
)}
|
||||
{ reviewPoint.pointName === '签署甲方详细信息校验' && (
|
||||
);
|
||||
})()}
|
||||
{ reviewPoint.pointName === '签署甲方详细信息校验' && (() => {
|
||||
const firstContentKey = reviewPoint.content ? Object.keys(reviewPoint.content)[0] : undefined;
|
||||
const firstContentValue = firstContentKey ? reviewPoint.content![firstContentKey]?.value : undefined;
|
||||
return (
|
||||
<button
|
||||
className="enterprise-info-btn"
|
||||
style={{
|
||||
@@ -2746,26 +2751,25 @@ export function ReviewPointsList({
|
||||
flexShrink: 0,
|
||||
transition: 'all 0.2s',
|
||||
border: 'none',
|
||||
cursor: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? 'pointer' : 'not-allowed',
|
||||
backgroundColor: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? '#00684a' : '#e5e7eb',
|
||||
color: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? '#ffffff' : '#9ca3af',
|
||||
cursor: firstContentValue ? 'pointer' : 'not-allowed',
|
||||
backgroundColor: firstContentValue ? '#00684a' : '#e5e7eb',
|
||||
color: firstContentValue ? '#ffffff' : '#9ca3af',
|
||||
}}
|
||||
disabled={!reviewPoint.content?.['合同主体信息-甲方名称']?.value}
|
||||
disabled={!firstContentValue}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
const companyNameValue = reviewPoint.content?.['合同主体信息-甲方名称']?.value;
|
||||
const companyName = typeof companyNameValue === 'string' ? companyNameValue : String(companyNameValue || '');
|
||||
const companyName = typeof firstContentValue === 'string' ? firstContentValue : String(firstContentValue || '');
|
||||
if (companyName) {
|
||||
handleCorporateInfoClick(companyName);
|
||||
}
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
if (reviewPoint.content?.['合同主体信息-甲方名称']?.value) {
|
||||
if (firstContentValue) {
|
||||
e.currentTarget.style.backgroundColor = '#005a3f';
|
||||
}
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
if (reviewPoint.content?.['合同主体信息-甲方名称']?.value) {
|
||||
if (firstContentValue) {
|
||||
e.currentTarget.style.backgroundColor = '#00684a';
|
||||
}
|
||||
}}
|
||||
@@ -2773,7 +2777,8 @@ export function ReviewPointsList({
|
||||
<i className="ri-eye-line"></i>
|
||||
甲方企业信息
|
||||
</button>
|
||||
)}
|
||||
);
|
||||
})()}
|
||||
</div>
|
||||
{/* <div className="review-point-header flex justify-between items-start">
|
||||
<div className="flex-1 text-left min-w-[25%] font-medium text-[13px]">{reviewPoint.title}</div>
|
||||
|
||||
@@ -1806,6 +1806,7 @@ export function ReviewPointsList({
|
||||
if (!isReplaceDisabled && onAiSuggestionReplace && config.fields) {
|
||||
// 从 config.fields[key] 中获取对应的字段信息
|
||||
const fieldData = config.fields[key];
|
||||
console.log("替换原始数据", config, key)
|
||||
if (fieldData) {
|
||||
// 调用回调函数,传递搜索文本(原文)、替换文本(AI建议)和页码
|
||||
onAiSuggestionReplace(
|
||||
@@ -2502,7 +2503,10 @@ export function ReviewPointsList({
|
||||
{/* <div className='flex flex-col'> */}
|
||||
<div className="flex items-center gap-2 max-w-[75%]">
|
||||
<div className="review-point-title text-left text-blue-500 break-all">{reviewPoint.pointName}</div>
|
||||
{ reviewPoint.pointName === '签署乙方详细信息校验' && (
|
||||
{ reviewPoint.pointName === '签署乙方详细信息校验' && (() => {
|
||||
const firstContentKey = reviewPoint.content ? Object.keys(reviewPoint.content)[0] : undefined;
|
||||
const firstContentValue = firstContentKey ? reviewPoint.content![firstContentKey]?.value : undefined;
|
||||
return (
|
||||
<button
|
||||
className="enterprise-info-btn"
|
||||
style={{
|
||||
@@ -2515,27 +2519,25 @@ export function ReviewPointsList({
|
||||
flexShrink: 0,
|
||||
transition: 'all 0.2s',
|
||||
border: 'none',
|
||||
cursor: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? 'pointer' : 'not-allowed',
|
||||
backgroundColor: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? '#00684a' : '#e5e7eb',
|
||||
color: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? '#ffffff' : '#9ca3af',
|
||||
cursor: firstContentValue ? 'pointer' : 'not-allowed',
|
||||
backgroundColor: firstContentValue ? '#00684a' : '#e5e7eb',
|
||||
color: firstContentValue ? '#ffffff' : '#9ca3af',
|
||||
}}
|
||||
disabled={!reviewPoint.content?.['合同主体信息-乙方名称']?.value}
|
||||
disabled={!firstContentValue}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
const companyNameValue = reviewPoint.content?.['合同主体信息-乙方名称']?.value;
|
||||
// console.log('companyNameValue', companyNameValue);
|
||||
const companyName = typeof companyNameValue === 'string' ? companyNameValue : String(companyNameValue || '');
|
||||
const companyName = typeof firstContentValue === 'string' ? firstContentValue : String(firstContentValue || '');
|
||||
if (companyName) {
|
||||
handleCorporateInfoClick(companyName);
|
||||
}
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
if (reviewPoint.content?.['合同主体信息-乙方名称']?.value) {
|
||||
if (firstContentValue) {
|
||||
e.currentTarget.style.backgroundColor = '#005a3f';
|
||||
}
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
if (reviewPoint.content?.['合同主体信息-乙方名称']?.value) {
|
||||
if (firstContentValue) {
|
||||
e.currentTarget.style.backgroundColor = '#00684a';
|
||||
}
|
||||
}}
|
||||
@@ -2543,8 +2545,12 @@ export function ReviewPointsList({
|
||||
<i className="ri-eye-line"></i>
|
||||
乙方企业信息
|
||||
</button>
|
||||
)}
|
||||
{ reviewPoint.pointName === '签署甲方详细信息校验' && (
|
||||
);
|
||||
})()}
|
||||
{ reviewPoint.pointName === '签署甲方详细信息校验' && (() => {
|
||||
const firstContentKey = reviewPoint.content ? Object.keys(reviewPoint.content)[0] : undefined;
|
||||
const firstContentValue = firstContentKey ? reviewPoint.content![firstContentKey]?.value : undefined;
|
||||
return (
|
||||
<button
|
||||
className="enterprise-info-btn"
|
||||
style={{
|
||||
@@ -2557,26 +2563,25 @@ export function ReviewPointsList({
|
||||
flexShrink: 0,
|
||||
transition: 'all 0.2s',
|
||||
border: 'none',
|
||||
cursor: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? 'pointer' : 'not-allowed',
|
||||
backgroundColor: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? '#00684a' : '#e5e7eb',
|
||||
color: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? '#ffffff' : '#9ca3af',
|
||||
cursor: firstContentValue ? 'pointer' : 'not-allowed',
|
||||
backgroundColor: firstContentValue ? '#00684a' : '#e5e7eb',
|
||||
color: firstContentValue ? '#ffffff' : '#9ca3af',
|
||||
}}
|
||||
disabled={!reviewPoint.content?.['合同主体信息-甲方名称']?.value}
|
||||
disabled={!firstContentValue}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
const companyNameValue = reviewPoint.content?.['合同主体信息-甲方名称']?.value;
|
||||
const companyName = typeof companyNameValue === 'string' ? companyNameValue : String(companyNameValue || '');
|
||||
const companyName = typeof firstContentValue === 'string' ? firstContentValue : String(firstContentValue || '');
|
||||
if (companyName) {
|
||||
handleCorporateInfoClick(companyName);
|
||||
}
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
if (reviewPoint.content?.['合同主体信息-甲方名称']?.value) {
|
||||
if (firstContentValue) {
|
||||
e.currentTarget.style.backgroundColor = '#005a3f';
|
||||
}
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
if (reviewPoint.content?.['合同主体信息-甲方名称']?.value) {
|
||||
if (firstContentValue) {
|
||||
e.currentTarget.style.backgroundColor = '#00684a';
|
||||
}
|
||||
}}
|
||||
@@ -2584,7 +2589,8 @@ export function ReviewPointsList({
|
||||
<i className="ri-eye-line"></i>
|
||||
甲方企业信息
|
||||
</button>
|
||||
)}
|
||||
);
|
||||
})()}
|
||||
|
||||
</div>
|
||||
{/* <div className="review-point-header flex justify-between items-start">
|
||||
|
||||
Reference in New Issue
Block a user