Commit Graph
139 Commits
Author SHA1 Message Date
Lewis_yan 025ddceb82 feat(i18n): restore framework menu i18n and fix login page i18n keys
- Restore init_menu.json with name_en/name_zh_tw for menu buttons (104 entries)
- Add data migration 0003 to populate menu item name_en/name_zh_tw
- Fix login page i18n key paths (message.account.* -> message.pages.login.account.*)
- Add missing login i18n keys: loginTitle, firstLoginTip, welcomeLogin, copyright
- Fix hardcoded Chinese strings in login page to use i18n
2026-04-08 23:22:42 +08:00
lewis yan 1da3a13cca Merge branch 'develop' into 'develop'
同步分支

See merge request pisteams/pis!2
2026-04-08 15:08:02 +00:00
Lewis_yan 3913ac722e feat(i18n): complete i18n adaptation across backend and frontend
Backend:
- Improve menu title language detection (query param, user lang, Accept-Language)
- Fix user language update to use correct update_datetime field
- Add menu i18n sync management command
- Add migrations for company/miscprocurement i18n fields

Frontend:
- Clear tagsView cache on language switch to reload titles in new language
2026-04-08 23:06:59 +08:00
nebula_chen e8cc4c9a70 feat(eip_sync):新增供应商报价权限资料同步接口及配套测试 2026-04-08 19:28:43 +08:00
Lewis_yan 1ccea93eed chore: 添加 dvadmin_ak_sk 到 INSTALLED_APPS 2026-04-08 17:30:01 +08:00
Lewis_yan c115934a6f chore(settings): 更新 settings.py (i18n 相关变更已在上一 commit 体现) 2026-04-08 17:20:12 +08:00
Lewis_yan 0716cd293c feat(i18n): 添加 Menu/MenuButton/Users i18n 字段迁移 2026-04-08 17:20:05 +08:00
Lewis_yan 231ac88c8b feat(i18n): 合并 django-vue3-admin i18n 国际化功能
后端:
- 添加 LocaleMiddleware 和 Django i18n 配置 (LANGUAGES/LOCALE_PATHS)
- Users.language 字段支持用户语言偏好
- Menu/MenuButton name_en/name_zh_tw 多语言字段
- WebRouterSerializer get_title() 语言感知返回
- update_language API endpoint

前端:
- vue-i18n 升级为 deepMerge + fast-crud i18n 集成
- 新增 19 个模块的 3 种语言翻译 (zh-CN/en/zh-TW)
- 导航栏语言切换器: 刷新路由 + 后端持久化
- router/backEnd.ts 支持 language 参数和 refreshRoutesForI18n
2026-04-08 17:11:39 +08:00
nebula_chen 67c90cd1ae refactor(eip_sync):修改单测配置确保SQL Server环境下也能运行 2026-04-08 17:02:56 +08:00
nebula_chen f05fa940da feat(eip_sync):新增核价审核结果抛转接口并配套单元测试 2026-04-08 16:34:02 +08:00
nebula_chen 581cdd4422 feat(pisadmin):新增比价页及报价单详情页的分享页供抛转核价信息时抛转比价信息地址 2026-04-08 15:26:31 +08:00
nebula_chen d99cdb543a refactor(eip_sync):修改杂采料号抛转接口URL与文件对齐 2026-04-08 15:22:05 +08:00
nebula_chen ed91fa2728 fix(eip_sync):暂时关闭AKSK认证,便于联调 2026-04-08 15:07:47 +08:00
nebula_chen fbb8809664 refactor(dashboard):调整前端效果 2026-04-07 20:25:39 +08:00
nebula_chen 3542782796 feat(eip_sync):新增统一的与 EIP 的数据对接层并实现杂采料号抛转接口 2026-04-07 19:34:14 +08:00
nebula_chen 8259cd797a refactor(system, pisadmin):修改供应商账号登录时角色标识的校验逻辑,暂时改为 supplier_*;同步修改仪表盘 2026-04-07 16:06:39 +08:00
nebula_chen 31f8d073a8 Merge branch pis:develop into develop 2026-04-07 03:22:48 +00:00
lewis 742b5e8482 Merge branch 'feat/dashboard-home-notification' into 'develop'
feat(dashboard): add semantic icons to KPI cards

See merge request pisteams/pis!52
2026-04-07 03:19:30 +00:00
Lewis_yan 4c681805cd fix(dashboard): replace .extra() with TruncDate to fix SQL Server column name issues
.extra(select={'day': 'DAY(create_time)'}) uses Django field name but
Inquiry.create_time has db_column='CreateTime' causing SQL Server error.
TruncDate is the proper ORM approach for date truncation.
2026-04-07 11:02:51 +08:00
Lewis_yan d1c54290c5 debug(dashboard): add debug print to track buyer_data exception 2026-04-07 10:59:59 +08:00
Lewis_yan 32377898ab fix(dashboard): use SuccessResponse from dvadmin.utils.json_response instead of manual Response 2026-04-07 10:50:36 +08:00
Lewis_yan 0a5b72fdba fix(dashboard): wrap response with code:200 and update store to extract data from res.data
Backend: Response() now returns {code:200, msg, data: {buyer, supplier}}
Frontend: store extracts buyer/supplier from res.data since axios interceptor returns full response
2026-04-07 10:48:32 +08:00
nebula_chen 58dcd730f1 feat(pissupplier):新增供应商用户账号登录系统,报价单页面仅展示对应供应商的报价单 2026-04-07 10:35:16 +08:00
Lewis_yan f373252760 fix(dashboard): add missing method/quote_deadline/bid_*_time fields to BuyerTaskSerializer and SupplierQuoteSerializer
The serializers.py had incomplete field definitions - missing the deadline
and method fields that views.py correctly builds. Also fixed quantity type
(CharField to match view's empty string fallback) and added status field
to SupplierQuoteSerializer.
2026-04-07 10:23:21 +08:00
nebula_chen b31588d7ad feat(pisadmin):新增供应商用户创建关联系统的用户创建 2026-04-07 10:22:58 +08:00
Lewis_yan c862c33ff0 fix(dashboard): add method and deadline fields to API responses
BuyerDashboard API:
- Add buying_method, quote_deadline, bid_start_time, bid_end_time to tasks
- Add daily trend data with day field instead of monthly

SupplierDashboard API:
- Add buying_method, quote_deadline, bid_start_time, bid_end_time to pending_quotes
- Add daily trend data with day field instead of monthly

These fields are needed by the frontend to display procurement method
badges and deadline countdown with color-coded urgency.
2026-04-07 10:09:44 +08:00
nebula_chen 28d799c2e4 refactor(pisadmin):修改材料制程最低价与杂采材料表的关联逻辑;修改履历表的写入逻辑与前端实现 2026-04-03 20:22:52 +08:00
nebula_chen 3e9fcc0198 Merge branch pis:develop into develop 2026-04-03 11:02:29 +00:00
nebula_chen 7a9822740c refactor(pisadmin):修改制程最低价和平均价的计算逻辑 2026-04-03 18:57:09 +08:00
lewis d3397b493d Merge branch 'sync/pnpm-fix-to-develop' into 'develop'
refactor(storage): rename MinIO to RustFS throughout backend

See merge request pisteams/pis!49
2026-04-03 10:21:57 +00:00
lewis_yan 9a040f5836 chore(storage): update RustFS credentials for testing 2026-04-03 18:14:45 +08:00
nebula_chen 32c1488d5f feat(pisadmin):新增杂采材料/加工制程最低信息表模型定义及序列化器 2026-04-03 17:32:29 +08:00
lewis_yan a90809c3fc refactor(storage): rename MinIO to RustFS throughout backend
- Rename minio_storage.py to rustfs_storage.py
- Update all MINIO_* settings to RUSTFS_* in env.py
- Update file_list.py to import rustfs_upload_file
- Update test files and factory to use rustfs engine
2026-04-03 17:12:04 +08:00
lewis_yan 1959f83d77 chore(deps): add pytest-django and factory_boy for testing 2026-04-03 16:53:25 +08:00
lewis_yan 5d0274c519 test: add MinIO file upload integration tests
- Add FileListFactory for test data creation
- Add TestFileUpload with 4 test cases:
  - test_upload_file_success (requires MinIO running)
  - test_upload_file_unauthenticated (passes without MinIO)
  - test_upload_image_success (requires MinIO running)
  - test_upload_without_file (passes without MinIO)
- Fix admin_user/normal_user fixtures to use factory_boy
  sequence to avoid username collision
2026-04-03 16:52:56 +08:00
lewis_yan 7885d7a759 chore(deps): add boto3, remove unused oss2 and cos-python-sdk 2026-04-03 16:42:52 +08:00
lewis_yan 08a904ef2a refactor(storage): remove aliyunoss and tencentcos storage engines 2026-04-03 16:42:14 +08:00
lewis_yan 076c3a5a43 feat(storage): simplify FileSerializer.create to use MinIO only 2026-04-03 16:41:50 +08:00
lewis_yan c337707e05 feat(storage): add MinIO storage utility (boto3-based) 2026-04-03 16:41:04 +08:00
lewis_yan 671f9f4478 feat(storage): add MinIO configuration to env.py 2026-04-03 16:40:12 +08:00
nebula_chen cb91c7c4f5 fix(pisadmin):修改制程最低价计算逻辑 2026-04-03 16:32:13 +08:00
nebula_chen af9406db3a Merge branch 'develop' into 'develop'
# Conflicts:
#   backend/apps/pisadmin/basicinfo/views/email_template.py
2026-04-03 02:23:36 +00:00
nebula_chen 3c50ad5d40 修改供应商用户信息表序列化器;修改操作日志写入逻辑;新增前端操作日志在询价单发布后显示供应商报价一览;调整报价单详情页成本结构前端设计 2026-04-03 10:20:32 +08:00
lewis_yan 5273e787f8 chore(dashboard): remove debug print statements 2026-04-03 09:44:32 +08:00
lewis_yan 720cf60d97 fix(dashboard): superadmin sees all supplier quotes, KPI及时的率, and UI polish
- Fix superadmin supplier dashboard: show all quotes instead of filtering by username
- Fix Count('id') -> Count('autoid') in trend queries
- Add quote_timely_rate, on_time_quotes, overdue_quotes to supplier KPI
- Add status field to supplier pending quotes
- Buyer chart now uses real trend data from backend
- Supplier quote list height matches buyer task list
- Remove KPI card top color bars
- Enlarge KPI card text (title: 18px, value: 52px) and center align
2026-04-03 09:43:28 +08:00
lewis_yan 921a1e2179 feat(git): add pre-commit with ruff for backend
- Add .pre-commit-config.yaml with ruff (lint + format)
- Add pre-commit and ruff to requirements.txt
- Ruff replaces flake8 + black + isort (10-100x faster)
2026-04-03 09:19:32 +08:00
nebula_chen 67b6cae723 更新邮件模板;修改供应商用户信息模型定义;修改部分信息编辑模式下可修改信息代码的bug;调整比价前端效果 2026-04-02 20:12:32 +08:00
lewis_yan 2e861cd0cb fix(infra): update REDIS_HOST to deployment server
Change REDIS_HOST from local address to deployment server address.
2026-04-02 14:28:33 +08:00
lewis_yan ab37702ee4 feat(celery): register check-quote-deadline-expired beat schedule 2026-04-02 10:45:41 +08:00
lewis_yan b508242456 feat(celery): add check_quote_deadline_expired periodic task 2026-04-02 10:45:11 +08:00