สร้างเครื่องทำใบปะหน้าพัสดุ: พิมพ์ทีละหลายใบ รองรับเก็บเงินปลายทาง
ทดสอบกับ Claude
กรอกชื่อร้าน ที่อยู่ผู้ส่ง และขนาดกระดาษ AI จะเขียนไฟล์ HTML ไฟล์เดียวที่ตรวจเบอร์และรหัสไปรษณีย์ แล้วพิมพ์ใบปะหน้าเป็นชุด รองรับยอดเก็บเงินปลายทาง
ใช้กับ: Claude, ChatGPT, Gemini, Claude Code
Prompt เต็ม พร้อมคัดลอก
## Role You are a web developer who builds easy tools for small online shops. Write a "shipping label maker" as a single HTML file. All on-page text must be in Thai. ## Shop details - Sender (shop) name: [shop_name] - Sender address with postcode: [shop_address] - Shop phone: [shop_phone] - Default paper size: [paper] - Main color: [color] ## Features 1. A form to add one recipient: name, phone, address, 5-digit postcode, cash-on-delivery amount (optional, numbers only) and a note such as "Fragile" (optional). 2. A large text box to paste many recipients at once, one per line in the format: name | phone | address | postcode | COD amount. Add the valid lines and report the line numbers that are incomplete. 3. Validation: Thai phone numbers with 9-10 digits starting with 0 (dashes and spaces allowed), postcode exactly 5 digits. When something is missing, show in red exactly what is missing. 4. A list of all labels with the count and a delete button for each one. 5. A paper size selector: A4 with 4 labels per sheet, A4 with 6 labels per sheet, and 100x150 mm thermal sticker (one label per page). 6. A "Print labels" button that builds the labels and calls window.print(). On screen show only the form; when printing show only the labels, using @media print. Each label shows: recipient name in large bold text, phone, address, the postcode in very large spaced digits, the COD amount inside a thick box (only if there is an amount), the note, and the sender's name, phone and address in small text at the bottom. Labels must not be split across pages. 7. A "Download CSV" button (UTF-8 with BOM so Excel shows Thai correctly, file name labels.csv) and a "Delete all" button with a confirmation. 8. Save the list with localStorage inside try/catch so a refresh does not clear it, and show a note that the data stays only on this device and should be deleted after shipping. ## Design - Sarabun font from Google Fonts with system fallback. Text at least 16px, buttons at least 48px. - Use [color] as the main color. Works on mobile and desktop with no horizontal page scroll. ## Technical - HTML, CSS and JavaScript in one file. No external libraries (fonts only). No server. - Put the shop details in one config object at the top of the script with Thai comments. - Escape all user text before inserting it into the page. - Collect only what a parcel needs. Never ask for ID card numbers or other sensitive data. ## Answer format 1. The full file in one code block, nothing cut. 2. How to open it: save as index.html and open in a browser. 3. How to print: choose the paper size, turn off headers and footers, set scale to 100%, and for thermal printers set the paper to 100x150 mm. 4. How to put it online for free with Netlify Drop or GitHub Pages, step by step, and a warning that the data stays only on the device that typed it. - Explain in Thai.
## บทบาท คุณคือนักพัฒนาเว็บที่ทำเครื่องมือให้ร้านออนไลน์เล็กใช้ง่าย ช่วยเขียน "เครื่องทำใบปะหน้าพัสดุ" เป็นไฟล์ HTML ไฟล์เดียว ข้อความในหน้าเว็บเป็นภาษาไทยทั้งหมด ## ข้อมูลร้าน - ชื่อร้านผู้ส่ง: [ชื่อร้าน] - ที่อยู่ผู้ส่งพร้อมรหัสไปรษณีย์: [ที่อยู่ร้าน] - เบอร์โทรร้าน: [เบอร์ร้าน] - ขนาดกระดาษที่ใช้บ่อย: [ขนาดกระดาษ] - สีหลัก: [สีหลัก] ## ฟีเจอร์ที่ต้องมี 1. ฟอร์มเพิ่มผู้รับทีละราย: ชื่อ เบอร์โทร ที่อยู่ รหัสไปรษณีย์ 5 หลัก ยอดเก็บเงินปลายทาง (ไม่บังคับ ตัวเลขเท่านั้น) และหมายเหตุ เช่น ระวังแตก (ไม่บังคับ) 2. ช่องข้อความใหญ่สำหรับวางหลายรายการพร้อมกัน บรรทัดละ 1 ราย รูปแบบ: ชื่อ | เบอร์ | ที่อยู่ | รหัสไปรษณีย์ | ยอดปลายทาง เพิ่มบรรทัดที่ถูกต้อง และบอกเลขบรรทัดที่ข้อมูลไม่ครบ 3. ตรวจข้อมูล: เบอร์ไทย 9-10 หลักขึ้นต้นด้วย 0 (มีขีดหรือเว้นวรรคได้) รหัสไปรษณีย์ 5 หลักพอดี ถ้าขาดอะไรให้บอกเป็นข้อความสีแดงว่าขาดอะไร 4. รายการใบปะหน้าทั้งหมด พร้อมจำนวน และปุ่มลบทีละรายการ 5. ตัวเลือกขนาดกระดาษ: A4 แผ่นละ 4 ใบ, A4 แผ่นละ 6 ใบ และสติกเกอร์ความร้อน 100x150 มม. (หน้าละ 1 ใบ) 6. ปุ่ม "พิมพ์ใบปะหน้า" สร้างใบปะหน้าแล้วเรียก window.print() บนจอแสดงแค่ฟอร์ม ตอนพิมพ์แสดงแค่ใบปะหน้า (ใช้ @media print) แต่ละใบมี: ชื่อผู้รับตัวหนาใหญ่ เบอร์โทร ที่อยู่ รหัสไปรษณีย์ตัวใหญ่มากเว้นระยะ ยอดเก็บเงินปลายทางในกรอบหนา (เฉพาะที่มียอด) หมายเหตุ และชื่อ เบอร์ ที่อยู่ผู้ส่งตัวเล็กด้านล่าง ห้ามใบปะหน้าขาดข้ามหน้า 7. ปุ่ม "ดาวน์โหลด CSV" (UTF-8 มี BOM ให้ Excel อ่านภาษาไทยได้ ชื่อไฟล์ labels.csv) และปุ่ม "ลบทั้งหมด" ที่ถามยืนยันก่อน 8. จำรายการด้วย localStorage ครอบด้วย try/catch รีเฟรชแล้วไม่หาย และเขียนบอกว่าข้อมูลอยู่ในเครื่องนี้เท่านั้น ส่งของเสร็จควรลบ ## หน้าตา - ฟอนต์ Sarabun จาก Google Fonts ถ้าโหลดไม่ได้ใช้ฟอนต์ของเครื่อง ตัวหนังสืออย่างน้อย 16px ปุ่มสูงอย่างน้อย 48px - ใช้ [สีหลัก] เป็นสีหลัก ใช้ได้ทั้งมือถือและคอม ไม่มีแถบเลื่อนแนวนอนทั้งหน้า ## ข้อกำหนดทางเทคนิค - HTML, CSS และ JavaScript อยู่ในไฟล์เดียว ไม่ใช้ไลบรารีภายนอก (ยกเว้นฟอนต์) ไม่ต้องมีเซิร์ฟเวอร์ - รวมข้อมูลร้านไว้ในตัวแปรเดียวบนสุดของสคริปต์ พร้อมคอมเมนต์ภาษาไทยว่าแก้ตรงไหน - แปลงข้อความที่ผู้ใช้พิมพ์ให้ปลอดภัย (escape) ก่อนแสดงในหน้า - เก็บแค่ข้อมูลที่ใช้ส่งพัสดุ ห้ามขอเลขบัตรประชาชนหรือข้อมูลอ่อนไหวอื่น ## รูปแบบคำตอบ 1. โค้ดเต็มไฟล์ในบล็อกเดียว ห้ามตัดทอน 2. วิธีเปิดใช้: บันทึกเป็น index.html แล้วเปิดในเบราว์เซอร์ 3. วิธีพิมพ์: เลือกขนาดกระดาษ ปิดหัวกระดาษและท้ายกระดาษ ตั้งสเกล 100% และถ้าใช้เครื่องพิมพ์ความร้อน ให้ตั้งกระดาษ 100x150 มม. 4. วิธีเอาขึ้นออนไลน์ฟรีด้วย Netlify Drop หรือ GitHub Pages ทีละขั้น และเตือนว่าข้อมูลอยู่เฉพาะเครื่องที่พิมพ์เท่านั้น - อธิบายเป็นภาษาไทย
คำ[ในวงเล็บสีแดง] แก้เป็นของคุณได้
คำใน [ ] ที่ต้องแก้
[shop_name]ชื่อร้านชื่อร้านที่จะพิมพ์เป็นผู้ส่งเช่น ร้านขนมบ้านป้านิด[shop_address]ที่อยู่ร้านที่อยู่ผู้ส่งเต็มพร้อมรหัสไปรษณีย์เช่น 99/1 ม.3 ต.ในเมือง อ.เมือง จ.ขอนแก่น 40000[shop_phone]เบอร์ร้านเบอร์ที่ขนส่งโทรหาได้ถ้ามีปัญหาเช่น 081-234-5678[paper]ขนาดกระดาษA4 แผ่นละ 4 ใบ, A4 แผ่นละ 6 ใบ หรือสติกเกอร์ความร้อน 100x150 มม.เช่น A4 แผ่นละ 4 ใบ[color]สีหลักสีของร้าน บอกเป็นชื่อสีหรือรหัสสีเช่น ฟ้าเข้ม #1F6F8B
เวอร์ชันตัวอย่าง
ร้านขนมส่งพัสดุ
ผลลัพธ์ ทดสอบด้วย Claude แล้วที่จอมือถือ 390 px: ฟอร์มแจ้งช่องที่ขาดเป็นสีแดง วางหลายรายการแล้วบอกบรรทัดที่ผิด จำรายการหลังรีเฟรช ใบปะหน้าภาษาไทยแสดงถูก มีกรอบเก็บเงินปลายทาง ปุ่มดาวน์โหลด CSV และลบทั้งหมดทำงาน
## Role You are a web developer who builds easy tools for small online shops. Write a "shipping label maker" as a single HTML file. All on-page text must be in Thai. ## Shop details - Sender (shop) name: ร้านขนมบ้านป้านิด - Sender address with postcode: 99/1 ม.3 ต.ในเมือง อ.เมือง จ.ขอนแก่น 40000 - Shop phone: 081-234-5678 - Default paper size: A4 แผ่นละ 4 ใบ - Main color: ฟ้าเข้ม #1F6F8B ## Features 1. A form to add one recipient: name, phone, address, 5-digit postcode, cash-on-delivery amount (optional, numbers only) and a note such as "Fragile" (optional). 2. A large text box to paste many recipients at once, one per line in the format: name | phone | address | postcode | COD amount. Add the valid lines and report the line numbers that are incomplete. 3. Validation: Thai phone numbers with 9-10 digits starting with 0 (dashes and spaces allowed), postcode exactly 5 digits. When something is missing, show in red exactly what is missing. 4. A list of all labels with the count and a delete button for each one. 5. A paper size selector: A4 with 4 labels per sheet, A4 with 6 labels per sheet, and 100x150 mm thermal sticker (one label per page). 6. A "Print labels" button that builds the labels and calls window.print(). On screen show only the form; when printing show only the labels, using @media print. Each label shows: recipient name in large bold text, phone, address, the postcode in very large spaced digits, the COD amount inside a thick box (only if there is an amount), the note, and the sender's name, phone and address in small text at the bottom. Labels must not be split across pages. 7. A "Download CSV" button (UTF-8 with BOM so Excel shows Thai correctly, file name labels.csv) and a "Delete all" button with a confirmation. 8. Save the list with localStorage inside try/catch so a refresh does not clear it, and show a note that the data stays only on this device and should be deleted after shipping. ## Design - Sarabun font from Google Fonts with system fallback. Text at least 16px, buttons at least 48px. - Use ฟ้าเข้ม #1F6F8B as the main color. Works on mobile and desktop with no horizontal page scroll. ## Technical - HTML, CSS and JavaScript in one file. No external libraries (fonts only). No server. - Put the shop details in one config object at the top of the script with Thai comments. - Escape all user text before inserting it into the page. - Collect only what a parcel needs. Never ask for ID card numbers or other sensitive data. ## Answer format 1. The full file in one code block, nothing cut. 2. How to open it: save as index.html and open in a browser. 3. How to print: choose the paper size, turn off headers and footers, set scale to 100%, and for thermal printers set the paper to 100x150 mm. 4. How to put it online for free with Netlify Drop or GitHub Pages, step by step, and a warning that the data stays only on the device that typed it. - Explain in Thai.
ร้านเสื้อผ้าใช้เครื่องพิมพ์ความร้อน
ผลลัพธ์ ใบปะหน้าหน้าละ 1 ใบ พิมพ์ลงสติกเกอร์ความร้อนแปะกล่องได้ทันที
## Role You are a web developer who builds easy tools for small online shops. Write a "shipping label maker" as a single HTML file. All on-page text must be in Thai. ## Shop details - Sender (shop) name: ร้านเสื้อผ้าน้องมิ้นท์ - Sender address with postcode: 45 ซ.ลาดพร้าว 71 แขวงลาดพร้าว เขตลาดพร้าว กรุงเทพฯ 10230 - Shop phone: 089-555-6666 - Default paper size: สติกเกอร์ความร้อน 100x150 มม. - Main color: ชมพูกุหลาบ #B5476B ## Features 1. A form to add one recipient: name, phone, address, 5-digit postcode, cash-on-delivery amount (optional, numbers only) and a note such as "Fragile" (optional). 2. A large text box to paste many recipients at once, one per line in the format: name | phone | address | postcode | COD amount. Add the valid lines and report the line numbers that are incomplete. 3. Validation: Thai phone numbers with 9-10 digits starting with 0 (dashes and spaces allowed), postcode exactly 5 digits. When something is missing, show in red exactly what is missing. 4. A list of all labels with the count and a delete button for each one. 5. A paper size selector: A4 with 4 labels per sheet, A4 with 6 labels per sheet, and 100x150 mm thermal sticker (one label per page). 6. A "Print labels" button that builds the labels and calls window.print(). On screen show only the form; when printing show only the labels, using @media print. Each label shows: recipient name in large bold text, phone, address, the postcode in very large spaced digits, the COD amount inside a thick box (only if there is an amount), the note, and the sender's name, phone and address in small text at the bottom. Labels must not be split across pages. 7. A "Download CSV" button (UTF-8 with BOM so Excel shows Thai correctly, file name labels.csv) and a "Delete all" button with a confirmation. 8. Save the list with localStorage inside try/catch so a refresh does not clear it, and show a note that the data stays only on this device and should be deleted after shipping. ## Design - Sarabun font from Google Fonts with system fallback. Text at least 16px, buttons at least 48px. - Use ชมพูกุหลาบ #B5476B as the main color. Works on mobile and desktop with no horizontal page scroll. ## Technical - HTML, CSS and JavaScript in one file. No external libraries (fonts only). No server. - Put the shop details in one config object at the top of the script with Thai comments. - Escape all user text before inserting it into the page. - Collect only what a parcel needs. Never ask for ID card numbers or other sensitive data. ## Answer format 1. The full file in one code block, nothing cut. 2. How to open it: save as index.html and open in a browser. 3. How to print: choose the paper size, turn off headers and footers, set scale to 100%, and for thermal printers set the paper to 100x150 mm. 4. How to put it online for free with Netlify Drop or GitHub Pages, step by step, and a warning that the data stays only on the device that typed it. - Explain in Thai.
ร้านต้นไม้ระวังแตก
ผลลัพธ์ ใบปะหน้าโทนเขียว ใช้ช่องหมายเหตุพิมพ์คำว่า ต้นไม้มีชีวิต ห้ามทับ
## Role You are a web developer who builds easy tools for small online shops. Write a "shipping label maker" as a single HTML file. All on-page text must be in Thai. ## Shop details - Sender (shop) name: สวนไม้ฟอกอากาศลุงชัย - Sender address with postcode: 7 ม.5 ต.บางกรวย อ.บางกรวย จ.นนทบุรี 11130 - Shop phone: 086-777-8888 - Default paper size: A4 แผ่นละ 6 ใบ - Main color: เขียวป่า #2F6B3A ## Features 1. A form to add one recipient: name, phone, address, 5-digit postcode, cash-on-delivery amount (optional, numbers only) and a note such as "Fragile" (optional). 2. A large text box to paste many recipients at once, one per line in the format: name | phone | address | postcode | COD amount. Add the valid lines and report the line numbers that are incomplete. 3. Validation: Thai phone numbers with 9-10 digits starting with 0 (dashes and spaces allowed), postcode exactly 5 digits. When something is missing, show in red exactly what is missing. 4. A list of all labels with the count and a delete button for each one. 5. A paper size selector: A4 with 4 labels per sheet, A4 with 6 labels per sheet, and 100x150 mm thermal sticker (one label per page). 6. A "Print labels" button that builds the labels and calls window.print(). On screen show only the form; when printing show only the labels, using @media print. Each label shows: recipient name in large bold text, phone, address, the postcode in very large spaced digits, the COD amount inside a thick box (only if there is an amount), the note, and the sender's name, phone and address in small text at the bottom. Labels must not be split across pages. 7. A "Download CSV" button (UTF-8 with BOM so Excel shows Thai correctly, file name labels.csv) and a "Delete all" button with a confirmation. 8. Save the list with localStorage inside try/catch so a refresh does not clear it, and show a note that the data stays only on this device and should be deleted after shipping. ## Design - Sarabun font from Google Fonts with system fallback. Text at least 16px, buttons at least 48px. - Use เขียวป่า #2F6B3A as the main color. Works on mobile and desktop with no horizontal page scroll. ## Technical - HTML, CSS and JavaScript in one file. No external libraries (fonts only). No server. - Put the shop details in one config object at the top of the script with Thai comments. - Escape all user text before inserting it into the page. - Collect only what a parcel needs. Never ask for ID card numbers or other sensitive data. ## Answer format 1. The full file in one code block, nothing cut. 2. How to open it: save as index.html and open in a browser. 3. How to print: choose the paper size, turn off headers and footers, set scale to 100%, and for thermal printers set the paper to 100x150 mm. 4. How to put it online for free with Netlify Drop or GitHub Pages, step by step, and a warning that the data stays only on the device that typed it. - Explain in Thai.
Prompt นี้ช่วยอะไร
ช่วงออเดอร์เยอะ การเขียนใบปะหน้าด้วยมือทีละกล่องกินเวลาและเขียนเบอร์ผิดได้ง่าย Prompt นี้ให้ AI เขียนหน้าเว็บไฟล์เดียวที่รับรายชื่อลูกค้า ตรวจข้อมูล แล้วพิมพ์ใบปะหน้าออกมาเป็นชุดในครั้งเดียว
- วางรายชื่อจากแชตได้ทีละหลายราย บรรทัดไหนข้อมูลไม่ครบ หน้าเว็บบอกเลขบรรทัด
- ตรวจเบอร์และรหัสไปรษณีย์ ลดพัสดุตีกลับเพราะข้อมูลผิด
- เก็บเงินปลายทางเห็นชัด ยอด COD อยู่ในกรอบตัวใหญ่
- พิมพ์ได้ 3 ขนาด A4 แผ่นละ 4 หรือ 6 ใบ และสติกเกอร์ความร้อน 100×150 มม.
ถ้าอยากให้ลูกค้าส่งออเดอร์มาเป็นข้อความที่ครบตั้งแต่แรก ลองใช้คู่กับ Prompt สร้างแคตตาล็อกสินค้าออนไลน์ และคุมของในคลังด้วย Prompt สร้างสมุดคุมสต๊อกสินค้า
คำถามเกี่ยวกับ Prompt นี้
ใช้กับเครื่องพิมพ์ความร้อนได้ไหม
ได้ถ้าเครื่องพิมพ์ติดตั้งไดรเวอร์บนคอมและตั้งกระดาษ 100x150 มม. แล้ว เลือกขนาดสติกเกอร์ความร้อนในหน้าเว็บ แล้วสั่งพิมพ์ตามปกติ
เชื่อมกับระบบขนส่งหรือออกเลขพัสดุให้ไหม
ไม่ครับ หน้านี้ทำแค่ใบปะหน้าสำหรับร้านที่ไปส่งเองที่จุดรับพัสดุ เลขพัสดุยังได้จากบริษัทขนส่งตามเดิม
ข้อมูลลูกค้าปลอดภัยไหม
ข้อมูลเก็บอยู่ในเบราว์เซอร์ของเครื่องที่กรอกเท่านั้น ไม่ส่งไปไหน แต่ถ้าใช้เครื่องร่วมกับคนอื่น ควรกดลบทั้งหมดหลังส่งของเสร็จ
ภาษาไทยในไฟล์ CSV เพี้ยนทำยังไง
Prompt สั่งให้ใส่ BOM ไว้แล้ว ถ้ายังเพี้ยน ให้เปิดด้วย Google Sheets หรือใน Excel ใช้ Data > From Text/CSV แล้วเลือก UTF-8
ข้อควรระวังข้อมูลชื่อ ที่อยู่ และเบอร์ลูกค้าเป็นข้อมูลส่วนบุคคล เก็บไว้เท่าที่ใช้ส่งของ ลบหลังส่งเสร็จ และห้ามเก็บเลขบัตรประชาชนหรือข้อมูลอ่อนไหวของลูกค้า
