選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
DESKTOP-064TTA1\Fai LUK 6701ea59c2 no message 2日前
..
Bag1.py no message 2日前
Bag1.spec added GRN and python UI for bag machines; Mark not exist po line as deleted when sync 2日前
README.md no message 2日前
bag1_settings.json no message 2日前
build_exe.bat added GRN and python UI for bag machines; Mark not exist po line as deleted when sync 2日前
fetch_job_orders.py added GRN and python UI for bag machines; Mark not exist po line as deleted when sync 2日前
label_zpl.py no message 2日前
requirements-build.txt added GRN and python UI for bag machines; Mark not exist po line as deleted when sync 2日前
requirements.txt added GRN and python UI for bag machines; Mark not exist po line as deleted when sync 2日前

README.md

Python scripts for FPSMS backend

This folder holds Python programs that integrate with the FPSMS backend (e.g. calling the public /py API).

Setup

cd python
pip install -r requirements.txt

Configuration

Set the backend base URL (optional, default below):

  • Environment: FPSMS_BASE_URL (default: http://localhost:8090/api — includes context path /api)
  • Or edit the default in each script.

Scripts

Script Description
Bag1.py GUI: date selector (default today) and job orders as buttons; click shows “Clicked on Job Order code XXXX item xxxx”. Run: python Bag1.py
fetch_job_orders.py CLI: fetches job orders by plan date from GET /py/job-orders
label_zpl.py ZPL label generator (90° rotated, UTF-8 Chinese, QR). generate_zpl(batch_no, item_code, chinese_desc), send_zpl(zpl, host, port). Run: python label_zpl.py to print one test label.

Building Bag1 as a standalone .exe

To distribute Bag1 to customer PCs without giving them source code or requiring Python:

  1. On your development PC (with Python installed), open a terminal in the python folder.

  2. Install build dependencies:

    pip install -r requirements-build.txt
    
  3. Run the build script:

    build_exe.bat
    

    Or run PyInstaller directly:

    pyinstaller --onefile --windowed --name Bag1 Bag1.py
    
  4. The executable is created at dist\Bag1.exe. Copy only Bag1.exe to the customer computer and run it; no Python or source code is needed. The app will save its settings (bag1_settings.json) in the same folder as the exe.

Adding new scripts

Add new .py files here and list them in this README. Use requirements.txt for any new dependencies.