暂无描述

wuzilong 21086b1a13 first commit 11 月之前
.history 21086b1a13 first commit 11 月之前
__pycache__ 21086b1a13 first commit 11 月之前
build 21086b1a13 first commit 11 月之前
dist 21086b1a13 first commit 11 月之前
ui 21086b1a13 first commit 11 月之前
utils 21086b1a13 first commit 11 月之前
.DS_Store 21086b1a13 first commit 11 月之前
MySQL配置说明.md 21086b1a13 first commit 11 月之前
README.md 21086b1a13 first commit 11 月之前
build.bat 21086b1a13 first commit 11 月之前
build.sh 21086b1a13 first commit 11 月之前
clear_sqlite_data.py 21086b1a13 first commit 11 月之前
config.py 21086b1a13 first commit 11 月之前
database.py 21086b1a13 first commit 11 月之前
dibang.db 21086b1a13 first commit 11 月之前
dist.zip 21086b1a13 first commit 11 月之前
main.py 21086b1a13 first commit 11 月之前
migrate_sqlite_to_mysql.py 21086b1a13 first commit 11 月之前
mysql_create_tables.sql 21086b1a13 first commit 11 月之前
requirements.txt 21086b1a13 first commit 11 月之前
sqlite_export.sql 21086b1a13 first commit 11 月之前
原型设计.md 21086b1a13 first commit 11 月之前
地磅称重打印软件.spec 21086b1a13 first commit 11 月之前
打包说明.md 21086b1a13 first commit 11 月之前
称重样例.png 21086b1a13 first commit 11 月之前
计划单.xlsx 21086b1a13 first commit 11 月之前
需求.md 21086b1a13 first commit 11 月之前
需求分析.md 21086b1a13 first commit 11 月之前

README.md

地磅称重打印软件

项目简介

这是一个地磅称重打印软件,用于记录地磅称重数据并支持打印功能。软件使用Python + PyQt5开发,数据存储在本地SQLite数据库中。

功能特性

  1. 地磅单管理

    • 地磅单信息录入(车号、货物名称、业务类型、重量信息等)
    • 地磅单记录列表查看
    • 地磅单详情查看
    • 地磅单打印
    • 地磅单作废功能
  2. 公司维护

    • 公司名称的新增、修改、删除
    • 支持作为供货单位和收货单位使用
  3. 货物维护

    • 货物名称的新增、修改、删除
    • 在地磅单中选择使用

技术栈

  • Python 3.x
  • PyQt5
  • SQLite3

安装和运行

开发环境运行

  1. 安装Python 3.x
  2. 安装依赖:

    pip install -r requirements.txt
    
    1. 运行程序: bash python main.py

打包成exe

使用PyInstaller打包:

pip install pyinstaller
pyinstaller --onefile --windowed --name="地磅称重打印软件" main.py

打包后的exe文件位于 dist 目录下,可以直接在Windows系统上运行,无需安装Python环境。

使用说明

  1. 首次使用

    • 运行程序后,会自动创建SQLite数据库文件 dibang.db
    • 建议先在"公司维护"和"货物维护"中添加基础数据
  2. 填写地磅单

    • 在"地磅单管理"Tab中填写地磅单信息
    • 必填字段标有红色星号(*)
    • 净重会自动计算(毛重 - 皮重 - 扣杂)
    • 点击"保存"保存地磅单
  3. 查看和打印

    • 在记录列表中点击"查看详情"查看完整信息
    • 点击"打印"可以打印地磅单
  4. 数据维护

    • 在"公司维护"和"货物维护"Tab中维护基础数据
    • 如果数据被地磅单引用,则无法删除

数据库

数据库文件 dibang.db 存储在程序运行目录下,包含以下表:

  • weighing_slips: 地磅单表
  • companies: 公司名称表
  • cargos: 货物名称表

注意事项

  • 程序首次运行会自动创建数据库
  • 建议定期备份 dibang.db 文件
  • 作废的地磅单不会从数据库中删除,只是标记为作废状态

界面说明

  • 界面采用大字体设计,适合中老年人使用
  • 输入框和按钮高度较大,方便操作
  • Tab页面布局,功能模块清晰

许可证

本项目仅供学习和使用。