|
|
|
@@ -244,14 +244,17 @@ export class 申込 { |
|
|
|
振替開始日 = formatDateStr(addMonths(setDate(利用開始希望日, 27), 1)); |
|
|
|
} |
|
|
|
|
|
|
|
const 郵便番号 = (() => { |
|
|
|
const all = this.定期申込予約.住所.value |
|
|
|
.substring(0, 8) |
|
|
|
.replace(/-/g, "") |
|
|
|
.trim(); |
|
|
|
return sprintf("%s-%s", all.substring(0, 3), all.substring(3)); |
|
|
|
})(); |
|
|
|
const 住所 = this.定期申込予約.住所.value.substring(8).trim(); |
|
|
|
const rawAddress = this.定期申込予約.住所.value.trim(); |
|
|
|
const head = rawAddress |
|
|
|
.substring(0, 12) |
|
|
|
.replace(/[0-9]/g, (s) => |
|
|
|
String.fromCharCode(s.charCodeAt(0) - 0xfee0) |
|
|
|
); |
|
|
|
const zipMatch = head.match(/^[\s〒]*(\d{3})[-ー−‐]?(\d{4})[\s ]*/); |
|
|
|
const 郵便番号 = zipMatch ? sprintf("%s-%s", zipMatch[1], zipMatch[2]) : ""; |
|
|
|
const 住所 = zipMatch |
|
|
|
? rawAddress.slice(zipMatch[0].length).trim() |
|
|
|
: rawAddress; |
|
|
|
|
|
|
|
const data = makeRecordData({ |
|
|
|
[F.顧客コード]: String(顧客コード), |
|
|
|
|