fix: 修复甲方和乙方的公司名称是用第一个key内的value值来进行查询。

This commit is contained in:
2026-03-17 17:37:00 +08:00
committed by DocAuditAI Dev
parent 519287c7f4
commit 702b7d3e3a
2 changed files with 53 additions and 42 deletions
@@ -2717,7 +2717,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={{
@@ -2730,27 +2733,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';
}
}}
@@ -2758,8 +2759,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={{
@@ -2772,26 +2777,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';
}
}}
@@ -2799,7 +2803,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>