fix: 修复甲方和乙方的公司名称是用第一个key内的value值来进行查询。
This commit is contained in:
@@ -2717,7 +2717,10 @@ export function ReviewPointsList({
|
|||||||
{/* <div className='flex flex-col'> */}
|
{/* <div className='flex flex-col'> */}
|
||||||
<div className="flex items-center gap-2 max-w-[75%]">
|
<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>
|
<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
|
<button
|
||||||
className="enterprise-info-btn"
|
className="enterprise-info-btn"
|
||||||
style={{
|
style={{
|
||||||
@@ -2730,27 +2733,25 @@ export function ReviewPointsList({
|
|||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
transition: 'all 0.2s',
|
transition: 'all 0.2s',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
cursor: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? 'pointer' : 'not-allowed',
|
cursor: firstContentValue ? 'pointer' : 'not-allowed',
|
||||||
backgroundColor: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? '#00684a' : '#e5e7eb',
|
backgroundColor: firstContentValue ? '#00684a' : '#e5e7eb',
|
||||||
color: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? '#ffffff' : '#9ca3af',
|
color: firstContentValue ? '#ffffff' : '#9ca3af',
|
||||||
}}
|
}}
|
||||||
disabled={!reviewPoint.content?.['合同主体信息-乙方名称']?.value}
|
disabled={!firstContentValue}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
const companyNameValue = reviewPoint.content?.['合同主体信息-乙方名称']?.value;
|
const companyName = typeof firstContentValue === 'string' ? firstContentValue : String(firstContentValue || '');
|
||||||
// console.log('companyNameValue', companyNameValue);
|
|
||||||
const companyName = typeof companyNameValue === 'string' ? companyNameValue : String(companyNameValue || '');
|
|
||||||
if (companyName) {
|
if (companyName) {
|
||||||
handleCorporateInfoClick(companyName);
|
handleCorporateInfoClick(companyName);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onMouseEnter={(e) => {
|
onMouseEnter={(e) => {
|
||||||
if (reviewPoint.content?.['合同主体信息-乙方名称']?.value) {
|
if (firstContentValue) {
|
||||||
e.currentTarget.style.backgroundColor = '#005a3f';
|
e.currentTarget.style.backgroundColor = '#005a3f';
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onMouseLeave={(e) => {
|
onMouseLeave={(e) => {
|
||||||
if (reviewPoint.content?.['合同主体信息-乙方名称']?.value) {
|
if (firstContentValue) {
|
||||||
e.currentTarget.style.backgroundColor = '#00684a';
|
e.currentTarget.style.backgroundColor = '#00684a';
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -2758,8 +2759,12 @@ export function ReviewPointsList({
|
|||||||
<i className="ri-eye-line"></i>
|
<i className="ri-eye-line"></i>
|
||||||
乙方企业信息
|
乙方企业信息
|
||||||
</button>
|
</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
|
<button
|
||||||
className="enterprise-info-btn"
|
className="enterprise-info-btn"
|
||||||
style={{
|
style={{
|
||||||
@@ -2772,26 +2777,25 @@ export function ReviewPointsList({
|
|||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
transition: 'all 0.2s',
|
transition: 'all 0.2s',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
cursor: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? 'pointer' : 'not-allowed',
|
cursor: firstContentValue ? 'pointer' : 'not-allowed',
|
||||||
backgroundColor: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? '#00684a' : '#e5e7eb',
|
backgroundColor: firstContentValue ? '#00684a' : '#e5e7eb',
|
||||||
color: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? '#ffffff' : '#9ca3af',
|
color: firstContentValue ? '#ffffff' : '#9ca3af',
|
||||||
}}
|
}}
|
||||||
disabled={!reviewPoint.content?.['合同主体信息-甲方名称']?.value}
|
disabled={!firstContentValue}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
const companyNameValue = reviewPoint.content?.['合同主体信息-甲方名称']?.value;
|
const companyName = typeof firstContentValue === 'string' ? firstContentValue : String(firstContentValue || '');
|
||||||
const companyName = typeof companyNameValue === 'string' ? companyNameValue : String(companyNameValue || '');
|
|
||||||
if (companyName) {
|
if (companyName) {
|
||||||
handleCorporateInfoClick(companyName);
|
handleCorporateInfoClick(companyName);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onMouseEnter={(e) => {
|
onMouseEnter={(e) => {
|
||||||
if (reviewPoint.content?.['合同主体信息-甲方名称']?.value) {
|
if (firstContentValue) {
|
||||||
e.currentTarget.style.backgroundColor = '#005a3f';
|
e.currentTarget.style.backgroundColor = '#005a3f';
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onMouseLeave={(e) => {
|
onMouseLeave={(e) => {
|
||||||
if (reviewPoint.content?.['合同主体信息-甲方名称']?.value) {
|
if (firstContentValue) {
|
||||||
e.currentTarget.style.backgroundColor = '#00684a';
|
e.currentTarget.style.backgroundColor = '#00684a';
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -2799,7 +2803,8 @@ export function ReviewPointsList({
|
|||||||
<i className="ri-eye-line"></i>
|
<i className="ri-eye-line"></i>
|
||||||
甲方企业信息
|
甲方企业信息
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
|
})()}
|
||||||
</div>
|
</div>
|
||||||
{/* <div className="review-point-header flex justify-between items-start">
|
{/* <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>
|
<div className="flex-1 text-left min-w-[25%] font-medium text-[13px]">{reviewPoint.title}</div>
|
||||||
|
|||||||
@@ -1902,6 +1902,7 @@ export function ReviewPointsList({
|
|||||||
if (!isReplaceDisabled && onAiSuggestionReplace && config.fields) {
|
if (!isReplaceDisabled && onAiSuggestionReplace && config.fields) {
|
||||||
// 从 config.fields[key] 中获取对应的字段信息
|
// 从 config.fields[key] 中获取对应的字段信息
|
||||||
const fieldData = config.fields[key];
|
const fieldData = config.fields[key];
|
||||||
|
console.log("替换原始数据", config, key)
|
||||||
if (fieldData) {
|
if (fieldData) {
|
||||||
// 调用回调函数,传递搜索文本(原文)、替换文本(AI建议)和页码
|
// 调用回调函数,传递搜索文本(原文)、替换文本(AI建议)和页码
|
||||||
onAiSuggestionReplace(
|
onAiSuggestionReplace(
|
||||||
@@ -2603,7 +2604,10 @@ export function ReviewPointsList({
|
|||||||
{/* <div className='flex flex-col'> */}
|
{/* <div className='flex flex-col'> */}
|
||||||
<div className="flex items-center gap-2 max-w-[75%]">
|
<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>
|
<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
|
<button
|
||||||
className="enterprise-info-btn"
|
className="enterprise-info-btn"
|
||||||
style={{
|
style={{
|
||||||
@@ -2616,27 +2620,25 @@ export function ReviewPointsList({
|
|||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
transition: 'all 0.2s',
|
transition: 'all 0.2s',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
cursor: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? 'pointer' : 'not-allowed',
|
cursor: firstContentValue ? 'pointer' : 'not-allowed',
|
||||||
backgroundColor: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? '#00684a' : '#e5e7eb',
|
backgroundColor: firstContentValue ? '#00684a' : '#e5e7eb',
|
||||||
color: reviewPoint.content?.['合同主体信息-乙方名称']?.value ? '#ffffff' : '#9ca3af',
|
color: firstContentValue ? '#ffffff' : '#9ca3af',
|
||||||
}}
|
}}
|
||||||
disabled={!reviewPoint.content?.['合同主体信息-乙方名称']?.value}
|
disabled={!firstContentValue}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
const companyNameValue = reviewPoint.content?.['合同主体信息-乙方名称']?.value;
|
const companyName = typeof firstContentValue === 'string' ? firstContentValue : String(firstContentValue || '');
|
||||||
// console.log('companyNameValue', companyNameValue);
|
|
||||||
const companyName = typeof companyNameValue === 'string' ? companyNameValue : String(companyNameValue || '');
|
|
||||||
if (companyName) {
|
if (companyName) {
|
||||||
handleCorporateInfoClick(companyName);
|
handleCorporateInfoClick(companyName);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onMouseEnter={(e) => {
|
onMouseEnter={(e) => {
|
||||||
if (reviewPoint.content?.['合同主体信息-乙方名称']?.value) {
|
if (firstContentValue) {
|
||||||
e.currentTarget.style.backgroundColor = '#005a3f';
|
e.currentTarget.style.backgroundColor = '#005a3f';
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onMouseLeave={(e) => {
|
onMouseLeave={(e) => {
|
||||||
if (reviewPoint.content?.['合同主体信息-乙方名称']?.value) {
|
if (firstContentValue) {
|
||||||
e.currentTarget.style.backgroundColor = '#00684a';
|
e.currentTarget.style.backgroundColor = '#00684a';
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -2644,8 +2646,12 @@ export function ReviewPointsList({
|
|||||||
<i className="ri-eye-line"></i>
|
<i className="ri-eye-line"></i>
|
||||||
乙方企业信息
|
乙方企业信息
|
||||||
</button>
|
</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
|
<button
|
||||||
className="enterprise-info-btn"
|
className="enterprise-info-btn"
|
||||||
style={{
|
style={{
|
||||||
@@ -2658,26 +2664,25 @@ export function ReviewPointsList({
|
|||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
transition: 'all 0.2s',
|
transition: 'all 0.2s',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
cursor: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? 'pointer' : 'not-allowed',
|
cursor: firstContentValue ? 'pointer' : 'not-allowed',
|
||||||
backgroundColor: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? '#00684a' : '#e5e7eb',
|
backgroundColor: firstContentValue ? '#00684a' : '#e5e7eb',
|
||||||
color: reviewPoint.content?.['合同主体信息-甲方名称']?.value ? '#ffffff' : '#9ca3af',
|
color: firstContentValue ? '#ffffff' : '#9ca3af',
|
||||||
}}
|
}}
|
||||||
disabled={!reviewPoint.content?.['合同主体信息-甲方名称']?.value}
|
disabled={!firstContentValue}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
const companyNameValue = reviewPoint.content?.['合同主体信息-甲方名称']?.value;
|
const companyName = typeof firstContentValue === 'string' ? firstContentValue : String(firstContentValue || '');
|
||||||
const companyName = typeof companyNameValue === 'string' ? companyNameValue : String(companyNameValue || '');
|
|
||||||
if (companyName) {
|
if (companyName) {
|
||||||
handleCorporateInfoClick(companyName);
|
handleCorporateInfoClick(companyName);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onMouseEnter={(e) => {
|
onMouseEnter={(e) => {
|
||||||
if (reviewPoint.content?.['合同主体信息-甲方名称']?.value) {
|
if (firstContentValue) {
|
||||||
e.currentTarget.style.backgroundColor = '#005a3f';
|
e.currentTarget.style.backgroundColor = '#005a3f';
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onMouseLeave={(e) => {
|
onMouseLeave={(e) => {
|
||||||
if (reviewPoint.content?.['合同主体信息-甲方名称']?.value) {
|
if (firstContentValue) {
|
||||||
e.currentTarget.style.backgroundColor = '#00684a';
|
e.currentTarget.style.backgroundColor = '#00684a';
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -2685,7 +2690,8 @@ export function ReviewPointsList({
|
|||||||
<i className="ri-eye-line"></i>
|
<i className="ri-eye-line"></i>
|
||||||
甲方企业信息
|
甲方企业信息
|
||||||
</button>
|
</button>
|
||||||
)}
|
);
|
||||||
|
})()}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{/* <div className="review-point-header flex justify-between items-start">
|
{/* <div className="review-point-header flex justify-between items-start">
|
||||||
|
|||||||
Reference in New Issue
Block a user