สร้างสมุดคุมสต๊อกสินค้า: รับเข้า ขายออก เตือนของใกล้หมด
ทดสอบกับ Claude
สั่ง AI เขียนเครื่องมือคุมสต๊อกเป็นไฟล์ HTML ไฟล์เดียว เก็บข้อมูลในเครื่อง มีเตือนใกล้หมด ประวัติการเข้าออก และสำรองข้อมูล เหมาะกับร้านเล็กที่ยังจดในสมุด
ใช้กับ: Claude, ChatGPT, Gemini, Claude Code
Prompt เต็ม พร้อมคัดลอก
You are a web developer building practical tools for small shops. The user cannot code. Task: build a "stock book" web page for the shop [shop_name] as one single HTML file containing HTML, CSS and JavaScript together. No external libraries, nothing to install. It must work on phone and computer. Starting data: - Each product (name, category, quantity, alert level, unit): [products] The page must: 1. Show a summary bar: total items, low-stock items, out-of-stock items. 2. Show product cards with name, category, quantity, a "low stock" badge when quantity is at or below the alert level, and an "out of stock" badge at 0. 3. Give each card a quantity field (default 1) with "Stock in" and "Sold" buttons. Quantity must never go negative; if the sale exceeds stock, show a message on the page. 4. Offer search by name or category and a filter: all / only low and out of stock. 5. Allow add, edit and delete, with confirmation before deleting. 6. Keep a history of the latest 50 movements with date, time, product, type, amount and balance. 7. Provide a "Copy reorder list" button listing low and out-of-stock items. 8. Provide "Export CSV" in UTF-8 with BOM so Thai text opens correctly in Excel. 9. Provide "Back up" (download JSON) and "Restore" (from that file). 10. Save with localStorage wrapped in try/catch; if saving fails, show a warning and keep working. Look: all interface text in Thai, font stack Sarabun, "Noto Sans Thai", Tahoma, sans-serif, text at least 16px, buttons at least 48px high, no sideways scrolling at 390px wide, plain readable colors. Do not: use a server or any service requiring sign-up, store national ID numbers or sensitive customer data, or insert user input with innerHTML without escaping it. Answer format: send the full code in one file and render it in the chat if possible. Then give short steps in Thai for opening it and publishing it free with Netlify Drop or GitHub Pages, and warn that data stays in that device's browser only, does not follow to another device, and is lost if browser data is cleared; remind the user to back up regularly.
คุณคือนักพัฒนาเว็บที่ทำเครื่องมือให้ร้านเล็กใช้งานจริง ผู้ใช้เขียนโค้ดไม่เป็น งาน: สร้างหน้าเว็บ "สมุดคุมสต๊อก" ของร้าน [ชื่อร้าน] เป็นไฟล์ HTML ไฟล์เดียว รวม HTML CSS และ JavaScript ไว้ด้วยกัน ไม่ใช้ไลบรารีภายนอก ไม่ต้องติดตั้งอะไร เปิดได้ทั้งมือถือและคอม ข้อมูลเริ่มต้น: - สินค้าแต่ละรายการ (ชื่อ, หมวด, คงเหลือ, จำนวนที่ให้เตือน, หน่วย): [รายการสินค้า] สิ่งที่หน้าเว็บต้องทำ: 1. แถบสรุปด้านบน: จำนวนรายการทั้งหมด จำนวนใกล้หมด จำนวนหมดแล้ว 2. การ์ดสินค้าแสดงชื่อ หมวด คงเหลือ พร้อมป้าย "ใกล้หมด" เมื่อเหลือไม่เกินจำนวนเตือน และป้าย "หมดแล้ว" เมื่อเหลือ 0 3. ในการ์ดมีช่องกรอกจำนวน (ค่าเริ่มต้น 1) ปุ่ม "รับเข้า" และ "ขายออก" ห้ามให้คงเหลือติดลบ ถ้าขายเกินให้แจ้งเตือนเป็นข้อความบนหน้า 4. ช่องค้นหาชื่อหรือหมวด และตัวกรอง "ดูทั้งหมด / เฉพาะใกล้หมดและหมดแล้ว" 5. เพิ่ม แก้ไข และลบสินค้าได้ ก่อนลบต้องถามยืนยัน 6. ประวัติ 50 รายการล่าสุด บอกวันเวลา สินค้า รับเข้าหรือขายออก จำนวน และคงเหลือ 7. ปุ่ม "คัดลอกรายการที่ต้องสั่ง" ได้ข้อความรายการใกล้หมดและหมดแล้ว 8. ปุ่ม "ส่งออก CSV" แบบ UTF-8 มี BOM เพื่อเปิดใน Excel แล้วภาษาไทยไม่เพี้ยน 9. ปุ่ม "สำรองข้อมูล" ดาวน์โหลดไฟล์ JSON และปุ่ม "กู้คืนข้อมูล" จากไฟล์นั้น 10. บันทึกด้วย localStorage โดยครอบ try/catch ถ้าบันทึกไม่ได้ให้ขึ้นข้อความเตือนบนหน้าและยังใช้งานต่อได้ หน้าตา: ภาษาไทยทั้งหมด ฟอนต์ Sarabun, "Noto Sans Thai", Tahoma, sans-serif ตัวอักษรอย่างน้อย 16px ปุ่มสูงอย่างน้อย 48px จอกว้าง 390px ต้องไม่เลื่อนซ้ายขวา สีเรียบ อ่านง่าย ข้อห้าม: ห้ามใช้เซิร์ฟเวอร์หรือบริการที่ต้องสมัคร ห้ามเก็บเลขบัตรประชาชนหรือข้อมูลอ่อนไหวของลูกค้า ห้ามใช้ innerHTML กับข้อความที่ผู้ใช้กรอกโดยไม่แปลงอักขระพิเศษ รูปแบบคำตอบ: ส่งโค้ดเต็มไฟล์เดียว ถ้าแสดงผลในหน้าแชตได้ให้แสดงผลด้วย จากนั้นบอกเป็นขั้นตอนสั้นๆ ว่าเปิดใช้ยังไง เอาขึ้นออนไลน์ฟรีด้วย Netlify Drop หรือ GitHub Pages ยังไง และเตือนว่าข้อมูลอยู่ในเบราว์เซอร์ของเครื่องนั้นเท่านั้น เปลี่ยนเครื่องหรือล้างข้อมูลเบราว์เซอร์แล้วจะไม่ตามไป จึงควรกดสำรองข้อมูลสม่ำเสมอ
คำ[ในวงเล็บสีแดง] แก้เป็นของคุณได้
คำใน [ ] ที่ต้องแก้
[shop_name]ชื่อร้านชื่อร้านที่จะแสดงบนหัวหน้าเว็บเช่น น้องมินต์เบเกอรี่[products]รายการสินค้าพิมพ์รายการละบรรทัด หรือคั่นด้วย / ใส่ชื่อ หมวด คงเหลือ จำนวนเตือน หน่วยเช่น คุกกี้เนย, ขนมอบ, 24, 10, ถุง / บราวนี่กล่องเล็ก, ขนมอบ, 6, 8, กล่อง / กล่องของขวัญ, บรรจุภัณฑ์, 0, 20, ใบ
เวอร์ชันตัวอย่าง
ร้านเบเกอรี่
ผลลัพธ์ ชุดนี้ใช้ทดสอบจริงบนจอมือถือแล้ว ได้สมุดสต๊อกที่กดรับเข้า ขายออก ค้นหา เตือนของใกล้หมด ส่งออก CSV และกู้คืนข้อมูลได้
You are a web developer building practical tools for small shops. The user cannot code. Task: build a "stock book" web page for the shop น้องมินต์เบเกอรี่ as one single HTML file containing HTML, CSS and JavaScript together. No external libraries, nothing to install. It must work on phone and computer. Starting data: - Each product (name, category, quantity, alert level, unit): คุกกี้เนย, ขนมอบ, 24, 10, ถุง / บราวนี่กล่องเล็ก, ขนมอบ, 6, 8, กล่อง / กล่องของขวัญ, บรรจุภัณฑ์, 0, 20, ใบ The page must: 1. Show a summary bar: total items, low-stock items, out-of-stock items. 2. Show product cards with name, category, quantity, a "low stock" badge when quantity is at or below the alert level, and an "out of stock" badge at 0. 3. Give each card a quantity field (default 1) with "Stock in" and "Sold" buttons. Quantity must never go negative; if the sale exceeds stock, show a message on the page. 4. Offer search by name or category and a filter: all / only low and out of stock. 5. Allow add, edit and delete, with confirmation before deleting. 6. Keep a history of the latest 50 movements with date, time, product, type, amount and balance. 7. Provide a "Copy reorder list" button listing low and out-of-stock items. 8. Provide "Export CSV" in UTF-8 with BOM so Thai text opens correctly in Excel. 9. Provide "Back up" (download JSON) and "Restore" (from that file). 10. Save with localStorage wrapped in try/catch; if saving fails, show a warning and keep working. Look: all interface text in Thai, font stack Sarabun, "Noto Sans Thai", Tahoma, sans-serif, text at least 16px, buttons at least 48px high, no sideways scrolling at 390px wide, plain readable colors. Do not: use a server or any service requiring sign-up, store national ID numbers or sensitive customer data, or insert user input with innerHTML without escaping it. Answer format: send the full code in one file and render it in the chat if possible. Then give short steps in Thai for opening it and publishing it free with Netlify Drop or GitHub Pages, and warn that data stays in that device's browser only, does not follow to another device, and is lost if browser data is cleared; remind the user to back up regularly.
ร้านเสื้อผ้าออนไลน์
ผลลัพธ์ แยกสต๊อกตามไซซ์ เห็นทันทีว่าไซซ์ไหนต้องสั่งเย็บเพิ่ม
You are a web developer building practical tools for small shops. The user cannot code. Task: build a "stock book" web page for the shop บ้านผ้าฝ้ายป้าแดง as one single HTML file containing HTML, CSS and JavaScript together. No external libraries, nothing to install. It must work on phone and computer. Starting data: - Each product (name, category, quantity, alert level, unit): เสื้อผ้าฝ้าย ไซซ์ M, เสื้อ, 15, 5, ตัว / เสื้อผ้าฝ้าย ไซซ์ L, เสื้อ, 4, 5, ตัว / กางเกงเอวยืด, กางเกง, 9, 3, ตัว The page must: 1. Show a summary bar: total items, low-stock items, out-of-stock items. 2. Show product cards with name, category, quantity, a "low stock" badge when quantity is at or below the alert level, and an "out of stock" badge at 0. 3. Give each card a quantity field (default 1) with "Stock in" and "Sold" buttons. Quantity must never go negative; if the sale exceeds stock, show a message on the page. 4. Offer search by name or category and a filter: all / only low and out of stock. 5. Allow add, edit and delete, with confirmation before deleting. 6. Keep a history of the latest 50 movements with date, time, product, type, amount and balance. 7. Provide a "Copy reorder list" button listing low and out-of-stock items. 8. Provide "Export CSV" in UTF-8 with BOM so Thai text opens correctly in Excel. 9. Provide "Back up" (download JSON) and "Restore" (from that file). 10. Save with localStorage wrapped in try/catch; if saving fails, show a warning and keep working. Look: all interface text in Thai, font stack Sarabun, "Noto Sans Thai", Tahoma, sans-serif, text at least 16px, buttons at least 48px high, no sideways scrolling at 390px wide, plain readable colors. Do not: use a server or any service requiring sign-up, store national ID numbers or sensitive customer data, or insert user input with innerHTML without escaping it. Answer format: send the full code in one file and render it in the chat if possible. Then give short steps in Thai for opening it and publishing it free with Netlify Drop or GitHub Pages, and warn that data stays in that device's browser only, does not follow to another device, and is lost if browser data is cleared; remind the user to back up regularly.
ร้านตัดผม
ผลลัพธ์ คุมของใช้ในร้าน กดตัดเวลาหยิบใช้ และคัดลอกรายการไปสั่งร้านขายส่ง
You are a web developer building practical tools for small shops. The user cannot code. Task: build a "stock book" web page for the shop ร้านตัดผมช่างเอก as one single HTML file containing HTML, CSS and JavaScript together. No external libraries, nothing to install. It must work on phone and computer. Starting data: - Each product (name, category, quantity, alert level, unit): แชมพูซาลอน, น้ำยา, 8, 3, ขวด / สีย้อมผมน้ำตาล, น้ำยา, 2, 3, หลอด / ผ้าคลุมตัด, อุปกรณ์, 12, 4, ผืน The page must: 1. Show a summary bar: total items, low-stock items, out-of-stock items. 2. Show product cards with name, category, quantity, a "low stock" badge when quantity is at or below the alert level, and an "out of stock" badge at 0. 3. Give each card a quantity field (default 1) with "Stock in" and "Sold" buttons. Quantity must never go negative; if the sale exceeds stock, show a message on the page. 4. Offer search by name or category and a filter: all / only low and out of stock. 5. Allow add, edit and delete, with confirmation before deleting. 6. Keep a history of the latest 50 movements with date, time, product, type, amount and balance. 7. Provide a "Copy reorder list" button listing low and out-of-stock items. 8. Provide "Export CSV" in UTF-8 with BOM so Thai text opens correctly in Excel. 9. Provide "Back up" (download JSON) and "Restore" (from that file). 10. Save with localStorage wrapped in try/catch; if saving fails, show a warning and keep working. Look: all interface text in Thai, font stack Sarabun, "Noto Sans Thai", Tahoma, sans-serif, text at least 16px, buttons at least 48px high, no sideways scrolling at 390px wide, plain readable colors. Do not: use a server or any service requiring sign-up, store national ID numbers or sensitive customer data, or insert user input with innerHTML without escaping it. Answer format: send the full code in one file and render it in the chat if possible. Then give short steps in Thai for opening it and publishing it free with Netlify Drop or GitHub Pages, and warn that data stays in that device's browser only, does not follow to another device, and is lost if browser data is cleared; remind the user to back up regularly.
Prompt นี้ช่วยอะไร
ร้านเล็กจำนวนมากรู้ว่าของหมดก็ตอนลูกค้าสั่งแล้วหาของไม่เจอ Prompt นี้สั่งให้ AI เขียนหน้าเว็บคุมสต๊อกเป็นไฟล์เดียว เปิดในมือถือแล้วกดรับเข้าหรือขายออกได้ทันที ไม่ต้องเขียนโค้ดและไม่ต้องเช่าเซิร์ฟเวอร์
- เห็นของใกล้หมดทันที ตั้งจำนวนเตือนของสินค้าแต่ละตัวเองได้
- ขายเกินสต๊อกไม่ได้ ระบบไม่ยอมให้จำนวนติดลบ และเก็บประวัติการเข้าออกไว้ดูย้อนหลัง
- สั่งของง่าย กดปุ่มเดียวคัดลอกรายการที่ต้องสั่งไปส่งให้ซัพพลายเออร์
- ข้อมูลไม่ติดอยู่ในหน้าเว็บ ส่งออกไฟล์เปิดใน Excel และสำรองข้อมูลไว้กู้คืนได้
ถ้าอยากรู้ว่าช่วงเทศกาลควรสั่งของเท่าไหร่ ใช้คู่กับ Prompt วางแผนสต๊อกช่วงเทศกาล และบันทึกเงินเข้าออกด้วย Prompt สร้างสมุดรายรับรายจ่ายร้าน
คำถามเกี่ยวกับ Prompt นี้
หลายคนในร้านใช้พร้อมกันได้ไหม
เวอร์ชันนี้ไม่ซิงก์ระหว่างเครื่อง เพราะเก็บในเบราว์เซอร์ของแต่ละเครื่อง ให้ใช้เครื่องหลักเครื่องเดียว ถ้าต้องใช้ร่วมกันจริงๆ ขอให้ AI เปลี่ยนไปเก็บใน Google Sheets ผ่าน Google Apps Script พร้อมขั้นตอนตั้งค่า
ข้อมูลหายได้ไหม
หายได้ถ้าล้างข้อมูลเบราว์เซอร์หรือเปลี่ยนเครื่อง จึงควรกดสำรองข้อมูลทุกสัปดาห์ แล้วเก็บไฟล์ไว้ในไดรฟ์ของตัวเอง
ต่อกับ Shopee หรือ TikTok Shop อัตโนมัติได้ไหม
ไม่ได้ Prompt นี้ทำเครื่องมือจดเอง ต้องกดขายออกด้วยตัวเอง เหมาะกับร้านที่ออเดอร์ยังไม่เยอะมาก
ข้อควรระวังข้อมูลอยู่ในเบราว์เซอร์ของเครื่องนั้นเท่านั้น ต้องกดสำรองข้อมูลเป็นประจำ ก่อนใช้กับร้านจริงให้ลองกดทุกปุ่มและเทียบยอดกับของจริงสัก 1 สัปดาห์
