Compare commits
No commits in common. "59b65df1d6b2156c8537a3ce11c2f1b5d4bfcd5e" and "3f9bc960b353900aafd3764defa608272485f495" have entirely different histories.
59b65df1d6
...
3f9bc960b3
@ -24,7 +24,6 @@ import { useSwal } from '@/hooks/useSwal'
|
|||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
||||||
import {normalizeDigits, normalizeDecimal} from '@/util/input-utils'
|
import {normalizeDigits, normalizeDecimal} from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
|
||||||
export default function Estimate({}) {
|
export default function Estimate({}) {
|
||||||
const [uniqueData, setUniqueData] = useState([])
|
const [uniqueData, setUniqueData] = useState([])
|
||||||
const [handlePricingFlag, setHandlePricingFlag] = useState(false)
|
const [handlePricingFlag, setHandlePricingFlag] = useState(false)
|
||||||
@ -2107,60 +2106,25 @@ export default function Estimate({}) {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div className="input-wrap" style={{ width: '100%' }}>
|
<div className="input-wrap" style={{ width: '100%' }}>
|
||||||
{/*<input*/}
|
<input
|
||||||
{/* type="text"*/}
|
type="text"
|
||||||
{/* className="input-light al-r"*/}
|
className="input-light al-r"
|
||||||
{/* value={convertNumberToPriceDecimal(item?.amount?.replaceAll(',', ''))}*/}
|
|
||||||
{/* disabled={item.itemId === '' || !!item?.paDispOrder}*/}
|
|
||||||
{/* onChange={(e) => {*/}
|
|
||||||
{/* onChangeAmount(e.target.value, item.dispOrder, index)*/}
|
|
||||||
{/* }}*/}
|
|
||||||
{/* maxLength={6}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
<CalculatorInput
|
|
||||||
className={"input-light al-r"}
|
|
||||||
value={convertNumberToPriceDecimal(item?.amount?.replaceAll(',', ''))}
|
value={convertNumberToPriceDecimal(item?.amount?.replaceAll(',', ''))}
|
||||||
disabled={item.itemId === '' || !!item?.paDispOrder}
|
disabled={item.itemId === '' || !!item?.paDispOrder}
|
||||||
onChange={(value) =>{
|
onChange={(e) => {
|
||||||
onChangeAmount(value, item.dispOrder, index)
|
onChangeAmount(e.target.value, item.dispOrder, index)
|
||||||
}}
|
}}
|
||||||
options={{
|
maxLength={6}
|
||||||
allowNegative: false,
|
/>
|
||||||
allowDecimal: false
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>{item.unit}</td>
|
<td>{item.unit}</td>
|
||||||
<td>
|
<td>
|
||||||
<div className="form-flex-wrap">
|
<div className="form-flex-wrap">
|
||||||
<div className="input-wrap mr5">
|
<div className="input-wrap mr5">
|
||||||
{/*<input*/}
|
<input
|
||||||
{/* type="text"*/}
|
type="text"
|
||||||
{/* className="input-light al-r"*/}
|
className="input-light al-r"
|
||||||
{/* value={*/}
|
|
||||||
{/* item.openFlg === '1'*/}
|
|
||||||
{/* ? 'OPEN'*/}
|
|
||||||
{/* : convertNumberToPriceDecimal(item?.showSalePrice === '0' ? null : item?.salePrice?.replaceAll(',', ''))*/}
|
|
||||||
{/* }*/}
|
|
||||||
{/* disabled={*/}
|
|
||||||
{/* item.openFlg === '1'*/}
|
|
||||||
{/* ? true*/}
|
|
||||||
{/* : estimateContextState?.estimateType === 'YJSS'*/}
|
|
||||||
{/* ? item?.paDispOrder*/}
|
|
||||||
{/* ? true*/}
|
|
||||||
{/* : item.pkgMaterialFlg !== '1'*/}
|
|
||||||
{/* : item.itemId === '' || !!item?.paDispOrder*/}
|
|
||||||
{/* ? true*/}
|
|
||||||
{/* : item.openFlg === '1'*/}
|
|
||||||
{/* }*/}
|
|
||||||
{/* onChange={(e) => {*/}
|
|
||||||
{/* onChangeSalePrice(e.target.value, item.dispOrder, index)*/}
|
|
||||||
{/* }}*/}
|
|
||||||
{/* maxLength={12}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
<CalculatorInput
|
|
||||||
className={"input-light al-r"}
|
|
||||||
value={
|
value={
|
||||||
item.openFlg === '1'
|
item.openFlg === '1'
|
||||||
? 'OPEN'
|
? 'OPEN'
|
||||||
@ -2176,15 +2140,13 @@ export default function Estimate({}) {
|
|||||||
: item.itemId === '' || !!item?.paDispOrder
|
: item.itemId === '' || !!item?.paDispOrder
|
||||||
? true
|
? true
|
||||||
: item.openFlg === '1'
|
: item.openFlg === '1'
|
||||||
|
? true
|
||||||
|
: false
|
||||||
}
|
}
|
||||||
onChange={(value) =>{
|
onChange={(e) => {
|
||||||
onChangeSalePrice(value, item.dispOrder, index)
|
onChangeSalePrice(e.target.value, item.dispOrder, index)
|
||||||
}}
|
}}
|
||||||
maxLength={12}
|
maxLength={12}
|
||||||
options={{
|
|
||||||
allowNegative: false,
|
|
||||||
allowDecimal: false
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{item.openFlg === '1' && (
|
{item.openFlg === '1' && (
|
||||||
|
|||||||
@ -871,7 +871,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
//newPStart.y = wallLine.y1;
|
//newPStart.y = wallLine.y1;
|
||||||
//외곽 라인 그리기
|
//외곽 라인 그리기
|
||||||
const rLineM = Big(wallBaseLine.x2).minus(roofLine.x2).abs().toNumber()
|
const rLineM = Big(wallBaseLine.x2).minus(roofLine.x2).abs().toNumber()
|
||||||
newPStart.y = Big(wallBaseLine.y1).minus(rLineM).toNumber()
|
newPStart.y = Big(wallBaseLine.y1).minus(rLineM).abs().toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { y: newPStart.y, x: newPStart.x })
|
const inLine = findLineContainingPoint(innerLines, { y: newPStart.y, x: newPStart.x })
|
||||||
if (inLine) {
|
if (inLine) {
|
||||||
if (inLine.x2 > inLine.x1) {
|
if (inLine.x2 > inLine.x1) {
|
||||||
@ -927,7 +927,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
|
|
||||||
//외곽 라인 그리기
|
//외곽 라인 그리기
|
||||||
const rLineM = Big(wallBaseLine.x2).minus(roofLine.x2).abs().toNumber()
|
const rLineM = Big(wallBaseLine.x2).minus(roofLine.x2).abs().toNumber()
|
||||||
newPEnd.y = Big(wallBaseLine.y2).plus(rLineM).toNumber()
|
newPEnd.y = Big(wallBaseLine.y2).plus(rLineM).abs().toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { y: newPEnd.y, x: newPEnd.x })
|
const inLine = findLineContainingPoint(innerLines, { y: newPEnd.y, x: newPEnd.x })
|
||||||
if (inLine) {
|
if (inLine) {
|
||||||
if (inLine.x2 > inLine.x1) {
|
if (inLine.x2 > inLine.x1) {
|
||||||
@ -1041,7 +1041,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
//newPStart.y = wallLine.y1;
|
//newPStart.y = wallLine.y1;
|
||||||
//외곽 라인 그리기
|
//외곽 라인 그리기
|
||||||
const rLineM = Big(wallBaseLine.x1).minus(roofLine.x1).abs().toNumber()
|
const rLineM = Big(wallBaseLine.x1).minus(roofLine.x1).abs().toNumber()
|
||||||
newPStart.y = Big(wallBaseLine.y1).plus(rLineM).toNumber()
|
newPStart.y = Big(wallBaseLine.y1).plus(rLineM).abs().toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { y: newPStart.y, x: newPStart.x })
|
const inLine = findLineContainingPoint(innerLines, { y: newPStart.y, x: newPStart.x })
|
||||||
if (inLine) {
|
if (inLine) {
|
||||||
if (inLine.x2 > inLine.x1) {
|
if (inLine.x2 > inLine.x1) {
|
||||||
@ -1096,7 +1096,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
|
|
||||||
//외곽 라인 그리기
|
//외곽 라인 그리기
|
||||||
const rLineM = Big(wallBaseLine.x2).minus(roofLine.x2).abs().toNumber()
|
const rLineM = Big(wallBaseLine.x2).minus(roofLine.x2).abs().toNumber()
|
||||||
newPEnd.y = Big(wallBaseLine.y2).minus(rLineM).toNumber()
|
newPEnd.y = Big(wallBaseLine.y2).minus(rLineM).abs().toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { y: newPEnd.y, x: newPEnd.x })
|
const inLine = findLineContainingPoint(innerLines, { y: newPEnd.y, x: newPEnd.x })
|
||||||
if (inLine) {
|
if (inLine) {
|
||||||
if (inLine.x2 > inLine.x1) {
|
if (inLine.x2 > inLine.x1) {
|
||||||
@ -1229,7 +1229,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
} else {
|
} else {
|
||||||
//외곽 라인 그리기
|
//외곽 라인 그리기
|
||||||
const rLineM = Big(wallBaseLine.y1).minus(roofLine.y1).abs().toNumber()
|
const rLineM = Big(wallBaseLine.y1).minus(roofLine.y1).abs().toNumber()
|
||||||
newPStart.x = Big(wallBaseLine.x1).plus(rLineM).toNumber()
|
newPStart.x = Big(wallBaseLine.x1).plus(rLineM).abs().toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { y: newPStart.y, x: newPStart.x })
|
const inLine = findLineContainingPoint(innerLines, { y: newPStart.y, x: newPStart.x })
|
||||||
if (inLine) {
|
if (inLine) {
|
||||||
if (inLine.y2 > inLine.y1) {
|
if (inLine.y2 > inLine.y1) {
|
||||||
@ -1282,7 +1282,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
//newPEnd.x = wallLine.x2;
|
//newPEnd.x = wallLine.x2;
|
||||||
//외곽 라인 그리기
|
//외곽 라인 그리기
|
||||||
const rLineM = Big(wallBaseLine.y2).minus(roofLine.y2).abs().toNumber()
|
const rLineM = Big(wallBaseLine.y2).minus(roofLine.y2).abs().toNumber()
|
||||||
newPEnd.x = Big(wallBaseLine.x2).minus(rLineM).toNumber()
|
newPEnd.x = Big(wallBaseLine.x2).minus(rLineM).abs().toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { y: newPEnd.y, x: newPEnd.x })
|
const inLine = findLineContainingPoint(innerLines, { y: newPEnd.y, x: newPEnd.x })
|
||||||
if (inLine) {
|
if (inLine) {
|
||||||
if (inLine.y1 > inLine.y2) {
|
if (inLine.y1 > inLine.y2) {
|
||||||
@ -1392,7 +1392,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
//newPStart.x = wallLine.x1;
|
//newPStart.x = wallLine.x1;
|
||||||
//외곽 라인 그리기
|
//외곽 라인 그리기
|
||||||
const rLineM = Big(wallBaseLine.y1).minus(roofLine.y1).abs().toNumber()
|
const rLineM = Big(wallBaseLine.y1).minus(roofLine.y1).abs().toNumber()
|
||||||
newPStart.x = Big(wallBaseLine.x1).minus(rLineM).toNumber()
|
newPStart.x = Big(wallBaseLine.x1).minus(rLineM).abs().toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { y: newPStart.y, x: newPStart.x })
|
const inLine = findLineContainingPoint(innerLines, { y: newPStart.y, x: newPStart.x })
|
||||||
if (inLine) {
|
if (inLine) {
|
||||||
if (inLine.y2 > inLine.y1) {
|
if (inLine.y2 > inLine.y1) {
|
||||||
@ -1446,7 +1446,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
//newPEnd.x = wallLine.x2;
|
//newPEnd.x = wallLine.x2;
|
||||||
//외곽 라인 그리기
|
//외곽 라인 그리기
|
||||||
const rLineM = Big(wallBaseLine.y2).minus(roofLine.y2).abs().toNumber()
|
const rLineM = Big(wallBaseLine.y2).minus(roofLine.y2).abs().toNumber()
|
||||||
newPEnd.x = Big(wallBaseLine.x2).plus(rLineM).toNumber()
|
newPEnd.x = Big(wallBaseLine.x2).plus(rLineM).abs().toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { y: newPEnd.y, x: newPEnd.x })
|
const inLine = findLineContainingPoint(innerLines, { y: newPEnd.y, x: newPEnd.x })
|
||||||
if (inLine) {
|
if (inLine) {
|
||||||
if (inLine.y1 > inLine.y2) {
|
if (inLine.y1 > inLine.y2) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user