Commit Graph
329 Commits
Author SHA1 Message Date
Lewis_yan ea8bc33b74 chore: remove test_app from INSTALLED_APPS 2026-04-09 21:00:03 +08:00
Lewis_yan a64a593eda fix: restore local pisadmin apps to INSTALLED_APPS
Cherry-pick from upstream removed local apps that shouldn't be changed.
2026-04-09 20:59:04 +08:00
H0nGzA1andClaude Opus 4.6 46636fe48a fix(menu): fix height chain for button permission tab - tabs flex fill
- el-col: height:100% + display:flex + flex-direction:column
- el-tabs: flex:1 + display:flex + flex-direction:column fills col height
- el-tab-pane: height:100% + display:flex + flex-direction:column fills tabs height
- MenuButtonCom: fs-crud add height:100% to fill its container
- Now the full chain: page -> row(100%) -> col(100%) -> tabs(flex1) -> tab-pane(100%) -> menu-btn-pane(flex1) -> MenuButtonCom(100%) -> fs-crud(100%)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:32 +08:00
H0nGzA1andClaude Opus 4.6 a092dce896 fix(menu): fix button permission card height with flex layout
- Outer div: flex column, fills tab-pane height
- .menu-scan-btn: fixed height ~44px
- MenuButtonCom with .menu-btn-fill: flex:1 fills remaining space
- MenuButtonCom inner: height:100% instead of 72vh
- Fixes pagination/selected-count being covered by overflow
- Also i18n "自动扫描" button text with scan.title key

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:32 +08:00
H0nGzA1andClaude Opus 4.6 03df05633c refactor(menu): align batch ops with MenuFieldCom pattern - pagination slots
- Rewrite index.vue: use pagination-left (circular delete btn) + pagination-right (selected count popover) like MenuFieldCom
- Remove selectAll/selectNone from actionbar (table header checkbox handles selection)
- Simplify handleBatchDelete: pluck ids → selectedRows.value = [] → doRefresh() (no clearSelection)
- Simplify crud.tsx: remove batchDelete/selectAll/selectNone from actionbar, remove ElMessageBox import
- Add buttons.selectedCount i18n key for zh-CN/en/zh-TW
- Use height: 72vh wrapper like MenuFieldCom for consistent table height

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:32 +08:00
H0nGzA1andClaude Opus 4.6 dee79eb883 fix(menu): batchDelete - pluck ids BEFORE clearSelection, manual reset selectedRows
- Pluck ids from selectedRows before any state mutation
- clearSelection() + manual selectedRows.value = [] to ensure button disables immediately
- Both calls are needed: clearSelection updates UI, manual reset ensures reactivity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:31 +08:00
H0nGzA1andClaude Opus 4.6 31164aadd7 refactor(menu): move batch ops back to actionbar, remove template toolbar
- Remove batch toolbar from template (fixes toolbar not hiding after delete)
- Restore selectAll/selectNone/batchDelete buttons in Fast-CRUD actionbar
- batchDelete: fix order — pluck ids BEFORE clearing selectedRows
- selectAll: remove unnecessary nextTick, toggleAllSelection then sync selectedRows
- Template simplifies to just fs-crud + pagination-right total count

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:31 +08:00
H0nGzA1andClaude Opus 4.6 fbf902e996 refactor(menu): consolidate batch ops into single toolbar, fix selectAll/delete logic
- Remove selectAll/selectNone/batchDelete from actionbar (show: false), batch ops now unified in template toolbar
- Add handleSelectAll/handleSelectNone to toolbar with toggleAllSelection/clearSelection
- Fix handleBatchDelete: pluck ids BEFORE clearing selectedRows, then clearSelection
- Toolbar always visible when table has data (isSelectable computed), hides when nothing selected
- Remove unused Close icon import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:31 +08:00
H0nGzA1andClaude Opus 4.6 5b6412a398 fix(menu): use toggleAllSelection/clearSelection for proper table selection sync
- selectAll: use tableRef.toggleAllSelection() to select ALL table rows, then manually sync selectedRows.value since the event may not fire reliably
- selectNone: use tableRef.clearSelection() (fires no event) + manually reset selectedRows.value = []

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:31 +08:00
H0nGzA1andClaude Opus 4.6 3be4e8af8e fix(menu): fix table height and add missing i18n keys for batch toolbar
- Set .menu-btn-com height to calc(72vh - 44px) so fs-crud fills available space
- Add height:100%/flex to .menu-btn-com so table stretches correctly
- Use i18n for batch toolbar text (selectedTip/clearSelection/batchDelete/totalCount)
- Add selectAll/selectNone/clearSelection/selectedTip/totalCount i18n keys for zh-CN/en/zh-TW

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:31 +08:00
H0nGzA1andClaude Opus 4.6 9897d26afd fix(menu): fix batch_create dedup, add batch operations to menu button table
- batch_create: check component_name exists, dedupe by value, use bulk_create
- Add batchDelete/selectAll/selectNone buttons to Fast-CRUD actionbar
- Add visible batch toolbar in MenuButtonCom with row selection count
- Fix successNotification → ElMessage.success (was treating text as i18n key)
- Update docs to reflect implementation status

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:31 +08:00
H0nGzA1 5697d9e02c feat(permission): add auto-scan API & grouped role permission UI
- Menu page: auto-scan ViewSet APIs for a selected menu, preview & batch
  create MenuButton records with inline name/value editing, grouped table
- Role page: group button permissions by Model > CRUD intent (Read/Write/
  Delete/Other) with expand/collapse, indeterminate checkboxes
- Backend: new batch_set_role_menu_btn action + value field in serializer
- Frontend: 300ms debounced batch updates to avoid DB lock on rapid toggles
- i18n: add scan.* keys and role intent labels for zh-cn/en/zh-tw
2026-04-09 20:56:08 +08:00
H0nGzA1andClaude Opus 4.6 b69a90a683 fix(permission): improve scan logic for dvadmin project structure
- scan_get_apps: scan views/ subdirectories instead of apps registry
- scan_viewset: scan submodules in views/ directory using pkgutil
- Fix model name extraction using removesuffix instead of fixed slice
- Add class ID deduplication to avoid duplicate ViewSets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:08 +08:00
H0nGzA1andClaude Opus 4.6 70a4608eb1 feat(permission): add test_app and improve ScanModal to grouped table
- Add dvadmin.test_app with BlogViewSet and ProductViewSet for testing
- Fix scan_viewset to exclude base classes (CustomModelViewSet, etc.)
- ScanModal: upgrade to el-collapse grouped table (collapsible ViewSet groups)
- Add toolbar: select all / deselect all
- Group header checkbox with indeterminate state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:07 +08:00
H0nGzA1andClaude Opus 4.6 9140c4e499 feat(menu): integrate auto-scan button and ScanModal into menu management
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:07 +08:00
H0nGzA1andClaude Opus 4.6 cb83f8ce3e feat(menu): add ScanModal component for auto permission generation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:07 +08:00
H0nGzA1andClaude Opus 4.6 06d518c5d9 feat(menu): add scan APIs for auto permission generation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:07 +08:00
H0nGzA1andClaude Opus 4.6 32673bdc32 feat(permission): add ViewSet scan APIs for auto permission generation
- scan_get_apps: list all scannable Django apps under dvadmin
- scan_viewset: scan ViewSet actions and return preview data
- scan_batch_create: bulk create MenuButton records

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 20:56:07 +08:00
Lewis_yan adb3b2d1a7 feat(i18n): adapt buyingMethodDict to dynamic i18n function
Convert buyingMethodDict from static array to function
accepting translation function for proper i18n support.
2026-04-09 20:42:25 +08:00
Lewis_yan 7f7bd7450e feat(i18n): add enabled/disabled and updateTime translations
Add status display translations for basicinfo module and
updateTime translation key for miscprocurement RFQ pages.
2026-04-09 20:42:20 +08:00
Lewis_yan 47e128f9ca feat(channel): switch CHANNEL_LAYERS from InMemory to Redis
Enable Redis-backed channel layer for production use with
channels_redis, using environment-configured Redis credentials.
2026-04-09 20:42:16 +08:00
Lewis_yan d422227964 feat(quick-260409-celery-websocket): add Celery beat tasks for inquiry publish and quote completion notifications
- Add check_inquiry_published_notifications() task scanning status 3/4 inquiries every 1 min
- Add check_quote_completed_notifications() task scanning status 5 inquiries every 1 min
- Both respect 24h EmailNotice cooldown and follow existing check_quote_deadline_expired pattern
- Return dict with checked/sent/skipped/errors counts
2026-04-09 17:59:12 +08:00
Lewis_yan 8d36d3e1ed feat(quick-260409-celery-websocket): add WebSocket+email notification functions for inquiry publish and quote completion
- Add _should_send_inquiry_notification() cooldown helper for 24h deduplication
- Add notify_suppliers_inquiry_published() for status 3/4 inquiries -> supplier WS push + email
- Add notify_purchasers_quote_completed() for status 5 inquiries -> purchaser WS push + email
- Both use EmailNotice.biz_type cooldown (inquiry_published / inquiry_quote_ended)
2026-04-09 17:59:07 +08:00
Lewis_yan 95d28a6365 chore: update pnpm-lock.yaml to match package.json 2026-04-09 13:47:32 +08:00
lewis yan 9c703478d9 Merge branch 'develop' into 'develop'
refactor(eip_sync):对齐杂采料号抛转接口url

See merge request pisteams/pis!3
2026-04-09 04:01:56 +00:00
Lewis_yan 3c3f63bddf feat(i18n): adapt all system pages to use i18n keys and replace django-vue3-admin references
- Replace all django-vue-admin/django-vue3-admin references with "Procurement Inquiry System"
- Add i18n support for system config, dept, dictionary, fileList, menu, messageCenter, role, whiteList pages
- Add i18n files for fileSelector module
- Backend: add SystemConfig model i18n fields (title_en, title_zh_tw) and migrations
2026-04-09 12:01:34 +08:00
Lewis_yan b1a019c826 fix(i18n): add isAwarded search field placeholder i18n support
Add missing placeholder i18n key for the isAwarded (award status)
search dropdown in the quotation page.
2026-04-09 11:59:24 +08:00
Lewis_yan 0f8e4f88ac fix(i18n): quotation page date range and currency placeholder i18n
- Add quoteDeadlineStart/End/Separator keys to pissupplier i18n
- Replace hardcoded Chinese date placeholders with i18n calls
- Replace hardcoded '币别' placeholder with i18n key
2026-04-09 11:51:50 +08:00
Lewis_yan ff687fb220 fix(i18n): commonCrudConfig add i18n support for datetime placeholders
- Accept optional t param in commonCrudConfig
- Replace hardcoded Chinese placeholders with i18n calls
- Add system/common i18n files for en, zh-cn, zh-tw
- Update loginLog/crud.tsx to pass t to commonCrudConfig
2026-04-09 11:47:36 +08:00
Lewis_yan f672941900 feat(i18n): adapt rfs_operation_logs page to use i18n keys
- Add rfs_operation_logs i18n files for en, zh-cn, zh-tw
- Replace hardcoded Chinese labels with t() calls in crud.tsx
- Column titles, placeholders, and formatters now use i18n
2026-04-09 11:42:41 +08:00
nebula chen ada5decee6 Merge branch 'develop' into 'develop'
# Conflicts:
#   web/src/views/pisadmin/dashboard/BuyerDashboard.vue
2026-04-09 03:39:49 +00:00
nebula_chen 328781ed5f feat(pisadmin):新增策采料号信息表,实现原料料号抛转接口业务映射逻辑 2026-04-09 11:37:12 +08:00
Lewis_yan 26fde667e2 feat(i18n): adapt buyer/supplier dashboards to use i18n keys
- Add buyerDashboard and supplierDashboard i18n keys to home module
  (zh-cn / en / zh-tw)
- Replace all hardcoded Chinese text in BuyerDashboard.vue and
  SupplierDashboard.vue with $t() calls
- Update index.vue role switcher buttons to use i18n
- quickNav items, chart legend, KPI labels all now support i18n
2026-04-09 11:23:41 +08:00
nebula_chen e95610f73f feat(pisadmin):加入采购端登录页账号权限登录卡关 2026-04-09 11:16:45 +08:00
nebula_chen cfff3569bc refactor(dashboard):调整采购仪表盘前端效果 2026-04-09 10:28:38 +08:00
Lewis_yan 9a56c73758 fix(i18n): remove export from createCrudOptions to fix build error
The export keyword inside <script setup> caused a conflict with
vite-plugin-vue-setup-extend plugin. Removed export since
createCrudOptions is only used locally by useFs().
2026-04-09 10:01:20 +08:00
Lewis_yan 763a312ed5 feat(i18n): adapt config tab cards and nested components to use i18n
Apply PR 157 i18n pattern to formContent, associationTable, and crudTable:
- formContent: useI18n, $t() in template, themeConfig.globalI18n in API,
  title_i18n fallback for display
- associationTable: $t() for labels and placeholders
- crudTable: useI18n for FastCRUD column titles and validation
2026-04-09 09:42:26 +08:00
Lewis_yan d7b383077f feat(i18n): adapt config module to use i18n keys
Replace hardcoded Chinese strings with t('message.pages.config.*') calls
in index.vue, addTabs.vue, and addContent.vue to support multilingual.
2026-04-09 09:37:44 +08:00
nebula_chen b822472605 refactor(eip_sync):对齐杂采料号抛转接口url 2026-04-09 09:27:11 +08:00
Lewis_yan e6cb89f029 feat(i18n): add useI18n to role CRUD 2026-04-09 09:10:34 +08:00
Lewis_yan fc27b583e2 feat(i18n): add useI18n to user/index.vue for tree deptList 2026-04-09 09:09:32 +08:00
Lewis_yan 1ad8aa3813 feat(i18n): adapt user CRUD to use message.pages.user.* i18n keys
- Add useI18n to user/crud.tsx
- Replace all hardcoded Chinese strings with t() calls
- Add useI18n to user/index.vue for dept placeholder
2026-04-09 09:08:51 +08:00
Lewis_yan efa7a4c4fa fix(i18n): make time-based greeting i18n compatible
- Modify formatAxis to return i18n keys instead of hardcoded strings
- Update account.vue and changePwd.vue to translate the greeting
- Add useI18n to personal/index.vue and translate the greeting
2026-04-09 08:59:59 +08:00
Lewis_yan e93eabb073 fix(i18n): correct login i18n structure with proper message.pages.login nesting
The login i18n files were exporting flat structures that didn't match
the expected key paths like message.pages.login.loginTitle.
Wrapped content in message.pages.login.* structure like other i18n modules.
2026-04-09 08:56:49 +08:00
Lewis_yan 7e2fa635bb fix(i18n): complete login page i18n adaptation for all portals
- Fix supplier.vue to use correct i18n key paths
- Fix mobile.vue: message.mobile.* -> message.pages.login.mobile.*
- Fix scan.vue: message.scan.* -> message.pages.login.scan.*
- Add supplierTitle key for supplier portal login page
2026-04-09 08:48:28 +08:00
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
Lewis_yan 9fe040c5fc feat(i18n): complete i18n adaptation for basicinfo modules
- Add missing createTime/updateTime keys to company, supplierUser, emailnotice
- Add statusValid, statusInvalid, autoFillNote, roleQuote to supplierUser
- Add general label to systemNo
- Fix systemno → systemNo key naming consistency in crud.tsx
- Sync menu i18n keys across en/zh-tw
2026-04-08 23:05:31 +08:00
Lewis_yan ff0e99b2c0 fix(i18n): add createTime/updateTime keys and fix company createUser/updateUser refs in basicinfo 2026-04-08 22:43:11 +08:00