Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
DESKTOP-064TTA1\Fai LUK 6701ea59c2 no message pirms 3 dienas
..
Bag1.py no message pirms 3 dienas
Bag1.spec added GRN and python UI for bag machines; Mark not exist po line as deleted when sync pirms 3 dienas
README.md no message pirms 3 dienas
bag1_settings.json no message pirms 3 dienas
build_exe.bat added GRN and python UI for bag machines; Mark not exist po line as deleted when sync pirms 3 dienas
fetch_job_orders.py added GRN and python UI for bag machines; Mark not exist po line as deleted when sync pirms 3 dienas
label_zpl.py no message pirms 3 dienas
requirements-build.txt added GRN and python UI for bag machines; Mark not exist po line as deleted when sync pirms 3 dienas
requirements.txt added GRN and python UI for bag machines; Mark not exist po line as deleted when sync pirms 3 dienas

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.