|
|
преди 2 дни | |
|---|---|---|
| .. | ||
| Bag1.py | преди 2 дни | |
| Bag1.spec | преди 2 дни | |
| README.md | преди 2 дни | |
| bag1_settings.json | преди 2 дни | |
| build_exe.bat | преди 2 дни | |
| fetch_job_orders.py | преди 2 дни | |
| label_zpl.py | преди 2 дни | |
| requirements-build.txt | преди 2 дни | |
| requirements.txt | преди 2 дни | |
This folder holds Python programs that integrate with the FPSMS backend (e.g. calling the public /py API).
cd python
pip install -r requirements.txt
Set the backend base URL (optional, default below):
FPSMS_BASE_URL (default: http://localhost:8090/api — includes context path /api)| 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. |
To distribute Bag1 to customer PCs without giving them source code or requiring Python:
On your development PC (with Python installed), open a terminal in the python folder.
Install build dependencies:
pip install -r requirements-build.txt
Run the build script:
build_exe.bat
Or run PyInstaller directly:
pyinstaller --onefile --windowed --name Bag1 Bag1.py
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.
Add new .py files here and list them in this README. Use requirements.txt for any new dependencies.