Commit Graph
124 Commits
Author SHA1 Message Date
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
lewis_yan 03edefa636 feat(email): register TEMPLATE_QUOTE_DEADLINE_EXPIRED template 2026-04-02 10:44:24 +08:00
lewis_yan 6d2723b220 feat(email): add quote deadline expired notification templates 2026-04-02 10:43:46 +08:00
lewis_yan 98563d279e Merge branch 'develop' of http://192.168.80.90:8086/pisteams/pis into develop 2026-04-02 10:32:15 +08:00
lewis_yan 45eccc45ec test: update Django+DRF testing infrastructure
- pytest.ini: use application.test_settings for MSSQL compatibility
- conftest.py: move to backend root; use UserFactory with Sequence
- application/test_settings.py: NoCreateTestDatabase patch for MSSQL
- test_serializers.py: use chinese error keys (django_restql behavior)
- test_views.py: use API response code assertions (SuccessResponse format)
2026-04-02 10:26:12 +08:00
lewis_yan 5a65c441bd feat(login): add /api/login/supplier/ route in application urls 2026-04-02 10:25:55 +08:00
allen_xiong ceaa3bdc1f Merge branch 'develop' into 'develop'
Develop

See merge request pisteams/pis!36
2026-04-02 02:07:05 +00:00
lewis_yan eb1e8c3f5d test: add CurrencyViewSet tests for basicinfo 2026-04-02 09:58:36 +08:00
lewis_yan 8d46b5c4fa test: add CurrencySerializer tests for basicinfo 2026-04-02 09:58:19 +08:00
lewis_yan 5df83edb1e test: add CurrencyFactory and UnitFactory for basicinfo app 2026-04-02 09:58:03 +08:00
lewis_yan dfc0c742c2 test: add basicinfo tests directory 2026-04-02 09:57:10 +08:00
lewis_yan 6ba1f57453 test: add UserFactory for system models 2026-04-02 09:57:02 +08:00
lewis_yan 23b892b05e test: add global conftest.py with fixtures 2026-04-02 09:56:52 +08:00
lewis_yan f09af5b0ce test: add global tests directory structure 2026-04-02 09:56:41 +08:00
lewis_yan 388efbe918 test: add pytest.ini configuration 2026-04-02 09:56:29 +08:00
lewis_yan 74ab2caf29 feat(login): add /login/supplier/ route for supplier portal 2026-04-02 09:50:49 +08:00