견적서

This commit is contained in:
basssy 2024-12-05 10:19:23 +09:00
parent 7c26569b61
commit a96879a4da
2 changed files with 41 additions and 26 deletions

View File

@ -1060,16 +1060,14 @@ export default function Estimate({ params }) {
let constructSpecificationMulti = estimateContextState?.constructSpecificationMulti?.split('、') let constructSpecificationMulti = estimateContextState?.constructSpecificationMulti?.split('、')
return ( return (
<> <div className={`form-flex-wrap ${style}`} key={`roof_${row}`}>
<div className={`form-flex-wrap ${style}`} key={`roof${index}`}> <div className="input-wrap mr5" style={{ width: '610px' }}>
<div className="input-wrap mr5" style={{ width: '610px' }}> <input type="text" className="input-light" value={roofList} readOnly />
<input type="text" className="input-light" value={roofList} readOnly />
</div>
<div className="input-wrap" style={{ width: '200px' }}>
<input type="text" className="input-light" value={constructSpecificationMulti[index]} readOnly />
</div>
</div> </div>
</> <div className="input-wrap" style={{ width: '200px' }}>
<input type="text" className="input-light" value={constructSpecificationMulti[index]} readOnly />
</div>
</div>
) )
})} })}
</td> </td>
@ -1156,7 +1154,8 @@ export default function Estimate({ params }) {
<ul className="file-list"> <ul className="file-list">
{originFiles.map((originFile) => { {originFiles.map((originFile) => {
return ( return (
<li className="file-item" key={uuidv4()}> <li className="file-item" key={originFile.no}>
{/* <li className="file-item" key={uuidv4()}> */}
<div className="file-item-wrap"> <div className="file-item-wrap">
<span <span
style={{ display: originFile.delFlg === '0' ? '' : 'none' }} style={{ display: originFile.delFlg === '0' ? '' : 'none' }}
@ -1219,7 +1218,8 @@ export default function Estimate({ params }) {
{specialNoteList.length > 0 && {specialNoteList.length > 0 &&
specialNoteList.map((row) => { specialNoteList.map((row) => {
return ( return (
<div key={uuidv4()} className="special-note-check-item"> // <div key={uuidv4()} className="special-note-check-item">
<div key={row.code} className="special-note-check-item">
<div className="special-note-check-box"> <div className="special-note-check-box">
<div className="d-check-box light"> <div className="d-check-box light">
<input <input
@ -1227,7 +1227,9 @@ export default function Estimate({ params }) {
id={row.code} id={row.code}
checked={!!row.check} checked={!!row.check}
disabled={row.code === 'ATTR001' || row.pkgYn === '1' ? true : false} disabled={row.code === 'ATTR001' || row.pkgYn === '1' ? true : false}
onClick={(event) => { // readOnly
// onClick={(event) => {
onChange={() => {
setSpecialNoteList((specialNote) => setSpecialNoteList((specialNote) =>
specialNote.map((temp) => (temp.code === row.code ? { ...temp, check: !temp.check } : temp)), specialNote.map((temp) => (temp.code === row.code ? { ...temp, check: !temp.check } : temp)),
) )
@ -1258,7 +1260,7 @@ export default function Estimate({ params }) {
if (isObjectNotEmpty(showcontent)) { if (isObjectNotEmpty(showcontent)) {
return ( return (
<dl key={uuidv4()}> <dl key={row.code}>
<dt>{showcontent.codeNm}</dt> <dt>{showcontent.codeNm}</dt>
<dd dangerouslySetInnerHTML={{ __html: showcontent.remarks }} style={{ whiteSpace: 'pre-wrap' }}></dd> <dd dangerouslySetInnerHTML={{ __html: showcontent.remarks }} style={{ whiteSpace: 'pre-wrap' }}></dd>
</dl> </dl>
@ -1266,8 +1268,6 @@ export default function Estimate({ params }) {
} else { } else {
let pushData = [] let pushData = []
popShowSpecialNoteList.map((item) => { popShowSpecialNoteList.map((item) => {
//console.log('showContentCode::', showContentCode)
//console.log('unique::', uniqueData)
let option = showContentCode.split('、') let option = showContentCode.split('、')
option.map((item2) => { option.map((item2) => {
if (item.code === item2) { if (item.code === item2) {
@ -1275,12 +1275,23 @@ export default function Estimate({ params }) {
} }
}) })
}) })
return pushData.map((item) => ( //
<dl key={uuidv4()}> let filterData = pushData.filter((item) => uniqueData.includes(item.code))
<dt>{item.codeNm}</dt> if (filterData.length > 0) {
<dd dangerouslySetInnerHTML={{ __html: item.remarks }} style={{ whiteSpace: 'pre-wrap' }}></dd> return filterData.map((item) => (
</dl> <dl key={item.code}>
)) <dt>{item.codeNm}</dt>
<dd dangerouslySetInnerHTML={{ __html: item.remarks }} style={{ whiteSpace: 'pre-wrap' }}></dd>
</dl>
))
} else {
return pushData.map((item) => (
<dl key={item.code}>
<dt>{item.codeNm}</dt>
<dd dangerouslySetInnerHTML={{ __html: item.remarks }} style={{ whiteSpace: 'pre-wrap' }}></dd>
</dl>
))
}
} }
} }
})} })}
@ -1367,14 +1378,19 @@ export default function Estimate({ params }) {
<div className="select-wrap"> <div className="select-wrap">
{session?.storeLvl === '1' ? ( {session?.storeLvl === '1' ? (
<select <select
key={uuidv4()} // key={uuidv4()}
className="select-light" className="select-light"
onChange={(e) => { onChange={(e) => {
onChangeStorePriceList(e.target.value) onChangeStorePriceList(e.target.value)
}} }}
value={showPriceCd} value={showPriceCd}
> >
{storePriceList.length > 0 && storePriceList.map((row) => <option value={row.priceCd}>{row.priceNm}</option>)} {storePriceList.length > 0 &&
storePriceList.map((row) => (
<option key={row.priceCd} value={row.priceCd}>
{row.priceNm}
</option>
))}
</select> </select>
) : ( ) : (
<select key={uuidv4()} className="select-light"> <select key={uuidv4()} className="select-light">
@ -1485,7 +1501,7 @@ export default function Estimate({ params }) {
<div className="select-wrap mr5"> <div className="select-wrap mr5">
<Select <Select
// id="long-value-select1" // id="long-value-select1"
name="long-value-select" name="long-value-select1"
instanceId="long-value-select1" instanceId="long-value-select1"
className="react-select-custom" className="react-select-custom"
classNamePrefix="custom" classNamePrefix="custom"

View File

@ -40,9 +40,8 @@ export default function ProductFeaturesPop({ popShowSpecialNoteList, showProduct
{showSpecialNoteList.length > 0 && {showSpecialNoteList.length > 0 &&
showSpecialNoteList.map((row) => { showSpecialNoteList.map((row) => {
return ( return (
<dl> <dl key={row.code}>
<dt>{row.codeNm}</dt> <dt>{row.codeNm}</dt>
{/* <dd dangerouslySetInnerHTML={{ __html: row.remarks }}></dd> */}
<dd dangerouslySetInnerHTML={{ __html: row.remarks }} style={{ whiteSpace: 'pre-wrap' }}></dd> <dd dangerouslySetInnerHTML={{ __html: row.remarks }} style={{ whiteSpace: 'pre-wrap' }}></dd>
</dl> </dl>
) )