From 44e5c9c42e65b7bb84dc5f650332dd83f95d67fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Tue, 24 Feb 2026 17:51:48 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[esign]=20=EA=B3=84=EC=95=BD=20?= =?UTF-8?q?=EB=B3=80=EC=88=98=EC=97=90=20=EC=83=81=EB=8C=80=EB=B0=A9=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84/=EC=A0=84=ED=99=94=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=20=EC=9E=85=EB=A0=A5=20=EB=B0=8F=20=EB=9E=9C?= =?UTF-8?q?=EB=8D=A4=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/esign/create.blade.php | 59 +++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/resources/views/esign/create.blade.php b/resources/views/esign/create.blade.php index 09c7ac1d..b7dc9db8 100644 --- a/resources/views/esign/create.blade.php +++ b/resources/views/esign/create.blade.php @@ -580,6 +580,40 @@ className={`w-full text-left px-3 py-2.5 rounded-lg mb-1 transition-colors ${i = })); }; + // 개발용: 주소/사업자등록번호/상호 랜덤 입력 + const fillRandomVariables = () => { + const addresses = [ + '서울특별시 강남구 테헤란로 123, 4층', + '서울특별시 서초구 서초대로 456, 7층', + '경기도 성남시 분당구 판교로 789', + '서울특별시 마포구 월드컵북로 54길 12', + '인천광역시 연수구 송도과학로 32', + ]; + const bizNos = [ + '123-45-67890', '234-56-78901', '345-67-89012', + '456-78-90123', '567-89-01234', + ]; + const companies = [ + '(주)테스트컴퍼니', '(주)블루오션', '(주)스마트솔루션', + '(주)넥스트웨이브', '(주)그린테크', + ]; + const pick = arr => arr[Math.floor(Math.random() * arr.length)]; + const labelMap = { + '주소': pick(addresses), + '사업자등록번호': pick(bizNos), + '상호': pick(companies), + }; + setMetadata(prev => { + const updated = { ...prev }; + templateVars.forEach(v => { + if (labelMap[v.label] !== undefined) { + updated[v.key] = labelMap[v.label]; + } + }); + return updated; + }); + }; + const fillRandomCounterpart = async () => { try { const res = await fetch(`/esign/contracts/search-partners?q=`, { @@ -665,6 +699,20 @@ className={`w-full text-left px-3 py-2.5 rounded-lg mb-1 transition-colors ${i = if (hasTemplates) { setStep(2); } else { handleSubmit(); } } else if (step === 2) { applyTitleDefaults(form.title); + // 상대방 이름/전화번호를 계약 변수에 자동 입력 + setMetadata(prev => { + const updated = { ...prev }; + const labelMap = { + '파트너명': form.counterpart_name, + '전화번호': form.counterpart_phone, + }; + templateVars.forEach(v => { + if (labelMap[v.label] !== undefined && labelMap[v.label] && !updated[v.key]?.trim()) { + updated[v.key] = labelMap[v.label]; + } + }); + return updated; + }); setStep(3); } }; @@ -991,7 +1039,16 @@ className="px-5 py-1.5 bg-blue-600 text-white rounded-md hover:bg-blue-700 text- {templateVars.length > 0 && (
-
직접 입력 항목
+
+
직접 입력 항목
+ +
{isCustomerContract ? (