Commit Graph
71 Commits
Author SHA1 Message Date
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
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 7a9822740c refactor(pisadmin):修改制程最低价和平均价的计算逻辑 2026-04-03 18:57:09 +08:00
nebula_chen 32c1488d5f feat(pisadmin):新增杂采材料/加工制程最低信息表模型定义及序列化器 2026-04-03 17:32:29 +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
nebula_chen 67b6cae723 更新邮件模板;修改供应商用户信息模型定义;修改部分信息编辑模式下可修改信息代码的bug;调整比价前端效果 2026-04-02 20:12:32 +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 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
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 4582dd5ef4 Merge branch 'develop' of http://192.168.80.90:8086/pisteams/pis into develop 2026-04-02 09:22:18 +08:00
lewis_yan 27b98bc73f feat(dashboard): complete buyer/supplier dashboard redesign
Backend:
- Fix JWT auth header format (use "JWT " prefix)
- Fix DashboardView to return data for superadmin users
- Return empty structure when no business data exists
- Use serializers for response validation

Frontend:
- Redesign BuyerDashboard with new UI matching design spec
- Redesign SupplierDashboard with consistent styling
- Add role switcher for users with both buyer/supplier roles
- Fix FontAwesome icon class names (fa vs fas)
- Update tagsView title when switching roles via mitt event
- Add i18n translations for dashboard

Auth fixes:
- Fix token storage to use sessionStorage instead of Cookies
- Add route initialization guard to prevent duplicate routing
- Fix login flow for token handling

Files:
- Add BuyerDashboard, SupplierDashboard, KpiCard, TrendChart components
- Add dashboard API and Pinia store
- Add mitt event type for tagsView name update
2026-04-02 09:20:12 +08:00
nebula_chen 851580afad 修改履历表写入文本 2026-04-01 19:40:43 +08:00
nebula_chen 92c4f5d524 调整部分前端效果;增加报价单逾期写入履历表 2026-04-01 19:35:54 +08:00
lewis_yan 7240d4f0c9 refactor(dashboard): rewrite views.py using DRF CBV pattern
- Move serializers into views.py for self-contained CBV
- Use DashboardViewSet with list() method for GET
- Add proper docstrings
- Use serializer for response validation
2026-04-01 19:27:21 +08:00
lewis_yan 574d9557cf fix(dashboard): use DashboardView instead of placeholder in urls.py
The urls.py was still using a placeholder view function. Updated to import
and use the proper DashboardView.as_view() from views.py.
2026-04-01 19:21:39 +08:00
lewis_yan 0bd82e517b feat(dashboard): implement dashboard view with role-based data filtering 2026-04-01 19:07:47 +08:00
lewis_yan 54976e0335 feat(dashboard): add dashboard serializers 2026-04-01 19:07:00 +08:00
lewis_yan c3fb11c481 feat(dashboard): create dashboard app skeleton with URL routing 2026-04-01 19:06:17 +08:00
allen_xiong 6d4e431a39 Merge branch 'develop' into 'develop'
新增邮件类型;调整部分前端效果

See merge request pisteams/pis!34
2026-04-01 09:36:20 +00:00
nebula_chen 0a1d5e29fb 新增邮件类型;调整部分前端效果
询价单详情页仅查看模式显示“询价单操作日志”;修改受邀供应商均报价提醒采购人员邮件文案;新增超过报价截止时间提醒采购人员邮件模板及调用
2026-04-01 17:18:59 +08:00
allen_xiong 670bb9c12f Merge branch 'develop' into 'develop'
新增 - 所有供应商均提交报价邮件通知采购商;供应商用户信息表及相应序列化器

See merge request pisteams/pis!33
2026-04-01 06:49:42 +00:00
nebula_chen c3ecfbfd56 实现询价操作日志查询接口;实现前端页面“询价操作日志查询” 2026-04-01 14:47:31 +08:00
nebula_chen 0424a3e3f4 补充询价操作履历表更新逻辑;修复前端bug--报价单仅拉起10条数据;杂采报价相应表结构名更新前缀pis_misc_ 2026-04-01 11:02:35 +08:00
nebula_chen 90103f6126 新增 - 所有供应商均提交报价邮件通知采购商;供应商用户信息表及相应序列化器 2026-04-01 09:43:44 +08:00
allen_xiong bf531c13fa Merge branch 'develop' into 'develop'
报价单详情窗口、询价单详情窗口、比价窗口转为对应路由页面;

See merge request pisteams/pis!32
2026-04-01 01:12:05 +00:00
nebula_chen fb308ca691 报价单详情窗口、询价单详情窗口、比价窗口转为对应路由页面; 2026-03-31 19:37:45 +08:00
allen_xiong 29a5d55852 Merge branch 'develop' into 'develop'
重写制程最低价计算与取值逻辑;调整部分前端逻辑

See merge request pisteams/pis!31
2026-03-30 09:43:21 +00:00
nebula_chen 2fd8788e5f 重写制程最低价计算与取值逻辑;调整部分前端逻辑 2026-03-30 17:40:53 +08:00
allen_xiong 91ee7467c5 Merge branch 'develop' into 'develop'
调整比议价程式相关前端效果;修改制程最低价记录后端逻辑

See merge request pisteams/pis!30
2026-03-30 05:44:20 +00:00
nebula_chen e41983eb5a 调整比议价程式相关前端效果;修改制程最低价记录后端逻辑 2026-03-30 12:34:00 +08:00
Developer01 8211811dd0 更新0007_alter_misclowpriceheader_item_no.py和0005_alter_quotationmaster_quote_deadline_and_more.py 2026-03-29 19:50:25 +08:00
allen_xiong 466aec8fe9 Merge branch 'develop' into 'develop'
新增 - 报价截止时间校验逻辑;报价单流转到”已过期“状态逻辑;完善询价单流转到”报价结束“状态逻辑

See merge request pisteams/pis!27
2026-03-29 06:39:04 +00:00
nebula_chen 0f0d40588d 修复测试发现的问题;调整部分ui效果 2026-03-27 19:15:44 +08:00