diff --git a/.changeset/.prettierrc.json b/.changeset/.prettierrc.json new file mode 100644 index 000000000..544138be4 --- /dev/null +++ b/.changeset/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/.changeset/fancy-ears-walk.md b/.changeset/fancy-ears-walk.md new file mode 100644 index 000000000..f73cb596b --- /dev/null +++ b/.changeset/fancy-ears-walk.md @@ -0,0 +1,7 @@ +--- +'@vben/styles': patch +'@vben-core/form-ui': patch +'@vben/web-naive': patch +--- + +feat(@core/form-ui): 新增 useVbenForm 数组编辑器 VbenFormFieldArray diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 61137ad98..e0fbcacf4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -61,7 +61,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -89,6 +89,6 @@ jobs: exit 1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 with: category: '/language:${{matrix.language}}' diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml index 18c007bfd..4efc9ce7f 100644 --- a/.github/workflows/issue-close-require.yml +++ b/.github/workflows/issue-close-require.yml @@ -19,7 +19,7 @@ jobs: steps: # 关闭未活动的 Issues - name: Close Inactive Issues - uses: actions/stale@v9 + uses: actions/stale@v10 with: days-before-stale: -1 # Issues and PR will never be flagged stale automatically. stale-issue-label: needs-reproduction # Label that flags an issue as stale. diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index bd73d5331..a12227ef1 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -14,7 +14,7 @@ jobs: if: github.repository == 'vbenjs/vue-vben-admin' runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v5 + - uses: dessant/lock-threads@v6 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-inactive-days: '14' diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index db8e9e091..02db08de6 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Validate PR title - uses: amannn/action-semantic-pull-request@v5 + uses: amannn/action-semantic-pull-request@v6 with: wip: true subjectPattern: ^(?![A-Z]).+$ diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 991e1331d..3bf7ecee7 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -9,7 +9,7 @@ jobs: if: github.repository == 'vbenjs/vue-vben-admin' runs-on: ubuntu-latest steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days' diff --git a/.node-version b/.node-version index 85e502778..b832e4001 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -22.22.0 +24.16.0 diff --git a/README.md b/README.md index 52b8d7045..4f2f5b028 100644 --- a/README.md +++ b/README.md @@ -41,24 +41,24 @@ | 框架 | 说明 | 版本 | | --- | --- | --- | -| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.30 | -| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 8.0.0 | +| [Vue](https://staging-cn.vuejs.org/) | vue框架 | 3.5.35 | +| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 8.0.10 | | [Ant Design Vue](https://www.antdv.com/) | Ant Design Vue | 4.2.6 | -| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.13.5 | +| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.14.1 | | [Naive UI](https://www.naiveui.com/) | Naive UI | 2.44.1 | -| [TDesign](https://tdesign.tencent.com/) | TDesign | 1.18.5 | -| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 超集 | 5.9.3 | +| [TDesign](https://tdesign.tencent.com/) | TDesign | 1.20.0 | +| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 超集 | 6.0.3 | | [pinia](https://pinia.vuejs.org/) | Vue 存储库替代 vuex5 | 3.0.4 | -| [vueuse](https://vueuse.org/) | 常用工具集 | 14.2.1 | -| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.3.0 | -| [vue-router](https://router.vuejs.org/) | Vue 路由 | 5.0.3 | -| [Tailwind CSS](https://tailwindcss.com/) | 原子 CSS | 4.2.1 | -| [Iconify](https://iconify.design/) | 图标组件 | 5.0.0 | -| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.449 | +| [vueuse](https://vueuse.org/) | 常用工具集 | 14.3.0 | +| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 11.4.4 | +| [vue-router](https://router.vuejs.org/) | Vue 路由 | 5.1.0 | +| [Tailwind CSS](https://tailwindcss.com/) | 原子 CSS | 4.3.0 | +| [Iconify](https://iconify.design/) | 图标组件 | 5.0.1 | +| [Iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.481 | | [TinyMCE](https://www.tiny.cloud/) | 富文本编辑器 | 7.3.0 | -| [Echarts](https://echarts.apache.org/) | 图表库 | 6.0.0 | -| [axios](https://axios-http.com/) | http客户端 | 1.13.6 | -| [dayjs](https://day.js.org/) | 日期处理库 | 1.11.20 | +| [Echarts](https://echarts.apache.org/) | 图表库 | 6.1.0 | +| [axios](https://axios-http.com/) | http客户端 | 1.16.1 | +| [dayjs](https://day.js.org/) | 日期处理库 | 1.11.21 | | [vee-validate](https://vee-validate.logaretm.com/) | 表单验证 | 4.15.1 | | [zod](https://zod.dev/) | 数据验证 | 3.25.76 | @@ -279,7 +279,6 @@ 使用文档: - ![功能图](/.gitee/image/common/im-feature.png) | 聊天界面 | 聊天管理 | diff --git a/apps/web-antd/src/api/crm/receivable/plan/index.ts b/apps/web-antd/src/api/crm/receivable/plan/index.ts index c4279d8ca..e192b9808 100644 --- a/apps/web-antd/src/api/crm/receivable/plan/index.ts +++ b/apps/web-antd/src/api/crm/receivable/plan/index.ts @@ -29,6 +29,10 @@ export namespace CrmReceivablePlanApi { returnTime: Date; }; } + export interface PlanPageParam extends PageParam { + customerId?: number; + contractId?: number; + } } /** 查询回款计划列表 */ diff --git a/apps/web-antd/src/api/iot/rule/scene/index.ts b/apps/web-antd/src/api/iot/rule/scene/index.ts index 23549f1ad..c7eef25c0 100644 --- a/apps/web-antd/src/api/iot/rule/scene/index.ts +++ b/apps/web-antd/src/api/iot/rule/scene/index.ts @@ -11,7 +11,7 @@ export namespace RuleSceneApi { status?: number; triggers?: Trigger[]; actions?: Action[]; - lastTriggeredTime?: Date; + lastTriggerTime?: Date; createTime?: Date; } diff --git a/apps/web-antd/src/api/mall/statistics/trade.ts b/apps/web-antd/src/api/mall/statistics/trade.ts index 05dc7f3ef..fea420b75 100644 --- a/apps/web-antd/src/api/mall/statistics/trade.ts +++ b/apps/web-antd/src/api/mall/statistics/trade.ts @@ -7,7 +7,7 @@ import { requestClient } from '#/api/request'; export namespace MallTradeStatisticsApi { /** 交易状况 Request */ export interface TradeTrendReqVO { - times: [Date, Date]; + times?: string[]; } /** 交易统计 Response */ diff --git a/apps/web-antd/src/api/mes/md/autocode/rule/index.ts b/apps/web-antd/src/api/mes/md/autocode/rule/index.ts index 6955e7304..d33e6e0fc 100644 --- a/apps/web-antd/src/api/mes/md/autocode/rule/index.ts +++ b/apps/web-antd/src/api/mes/md/autocode/rule/index.ts @@ -51,5 +51,7 @@ export function deleteAutoCodeRule(id: number) { /** 导出编码规则 */ export function exportAutoCodeRule(params: PageParam) { - return requestClient.download('/mes/md/auto-code-rule/export-excel', { params }); + return requestClient.download('/mes/md/auto-code-rule/export-excel', { + params, + }); } diff --git a/apps/web-antd/src/api/mes/md/item/index.ts b/apps/web-antd/src/api/mes/md/item/index.ts index 9d3b107f8..f2a23c0e6 100644 --- a/apps/web-antd/src/api/mes/md/item/index.ts +++ b/apps/web-antd/src/api/mes/md/item/index.ts @@ -34,7 +34,9 @@ export namespace MesMdItemApi { /** 查询物料产品分页 */ export function getItemPage(params: PageParam) { - return requestClient.get>('/mes/md/item/page', { params }); + return requestClient.get>('/mes/md/item/page', { + params, + }); } /** 查询物料产品详情 */ diff --git a/apps/web-antd/src/api/mes/pro/route/index.ts b/apps/web-antd/src/api/mes/pro/route/index.ts index 56baff6b5..0f04585cc 100644 --- a/apps/web-antd/src/api/mes/pro/route/index.ts +++ b/apps/web-antd/src/api/mes/pro/route/index.ts @@ -32,9 +32,7 @@ export function getRouteSimpleList() { /** 查询工艺路线详情 */ export function getRoute(id: number) { - return requestClient.get( - `/mes/pro/route/get?id=${id}`, - ); + return requestClient.get(`/mes/pro/route/get?id=${id}`); } /** 新增工艺路线 */ diff --git a/apps/web-antd/src/api/mes/qc/defect/index.ts b/apps/web-antd/src/api/mes/qc/defect/index.ts index 0b46d3581..743daa11e 100644 --- a/apps/web-antd/src/api/mes/qc/defect/index.ts +++ b/apps/web-antd/src/api/mes/qc/defect/index.ts @@ -25,12 +25,16 @@ export function getDefectPage(params: PageParam) { /** 查询缺陷类型精简列表 */ export function getDefectSimpleList() { - return requestClient.get('/mes/qc/defect/simple-list'); + return requestClient.get( + '/mes/qc/defect/simple-list', + ); } /** 查询缺陷类型详情 */ export function getDefect(id: number) { - return requestClient.get(`/mes/qc/defect/get?id=${id}`); + return requestClient.get( + `/mes/qc/defect/get?id=${id}`, + ); } /** 新增缺陷类型 */ diff --git a/apps/web-antd/src/api/mes/qc/defectrecord/index.ts b/apps/web-antd/src/api/mes/qc/defectrecord/index.ts index a434a29b6..af13e7f5f 100644 --- a/apps/web-antd/src/api/mes/qc/defectrecord/index.ts +++ b/apps/web-antd/src/api/mes/qc/defectrecord/index.ts @@ -25,7 +25,7 @@ export function getDefectRecord(id: number) { /** 查询质检缺陷记录分页 */ export function getDefectRecordPage( - params: PageParam & { lineId?: number; qcId?: number; qcType?: number; }, + params: PageParam & { lineId?: number; qcId?: number; qcType?: number }, ) { return requestClient.get>( '/mes/qc/defect-record/page', diff --git a/apps/web-antd/src/api/mes/qc/ipqc/index.ts b/apps/web-antd/src/api/mes/qc/ipqc/index.ts index 9c885bedb..c30ffbbe2 100644 --- a/apps/web-antd/src/api/mes/qc/ipqc/index.ts +++ b/apps/web-antd/src/api/mes/qc/ipqc/index.ts @@ -50,10 +50,9 @@ export namespace MesQcIpqcApi { /** 查询过程检验单分页 */ export function getIpqcPage(params: PageParam) { - return requestClient.get>( - '/mes/qc/ipqc/page', - { params }, - ); + return requestClient.get>('/mes/qc/ipqc/page', { + params, + }); } /** 查询过程检验单详情 */ diff --git a/apps/web-antd/src/api/mes/qc/template/indicator/index.ts b/apps/web-antd/src/api/mes/qc/template/indicator/index.ts index 8fa8119e6..519c86d8e 100644 --- a/apps/web-antd/src/api/mes/qc/template/indicator/index.ts +++ b/apps/web-antd/src/api/mes/qc/template/indicator/index.ts @@ -24,7 +24,9 @@ export namespace MesQcTemplateIndicatorApi { } /** 查询检测指标项分页 */ -export function getTemplateIndicatorPage(params: PageParam & { templateId?: number }) { +export function getTemplateIndicatorPage( + params: PageParam & { templateId?: number }, +) { return requestClient.get< PageResult >('/mes/qc/template/indicator/page', { params }); diff --git a/apps/web-antd/src/api/mes/qc/template/item/index.ts b/apps/web-antd/src/api/mes/qc/template/item/index.ts index b1d5b1e6b..a7b92c158 100644 --- a/apps/web-antd/src/api/mes/qc/template/item/index.ts +++ b/apps/web-antd/src/api/mes/qc/template/item/index.ts @@ -22,7 +22,9 @@ export namespace MesQcTemplateItemApi { } /** 查询产品关联分页 */ -export function getTemplateItemPage(params: PageParam & { templateId?: number }) { +export function getTemplateItemPage( + params: PageParam & { templateId?: number }, +) { return requestClient.get>( '/mes/qc/template/item/page', { params }, diff --git a/apps/web-antd/src/api/mes/wm/arrivalnotice/index.ts b/apps/web-antd/src/api/mes/wm/arrivalnotice/index.ts index 73e8eb849..2187b387b 100644 --- a/apps/web-antd/src/api/mes/wm/arrivalnotice/index.ts +++ b/apps/web-antd/src/api/mes/wm/arrivalnotice/index.ts @@ -37,16 +37,12 @@ export function getArrivalNotice(id: number) { } /** 新增到货通知单 */ -export function createArrivalNotice( - data: MesWmArrivalNoticeApi.ArrivalNotice, -) { +export function createArrivalNotice(data: MesWmArrivalNoticeApi.ArrivalNotice) { return requestClient.post('/mes/wm/arrival-notice/create', data); } /** 修改到货通知单 */ -export function updateArrivalNotice( - data: MesWmArrivalNoticeApi.ArrivalNotice, -) { +export function updateArrivalNotice(data: MesWmArrivalNoticeApi.ArrivalNotice) { return requestClient.put('/mes/wm/arrival-notice/update', data); } diff --git a/apps/web-antd/src/api/mes/wm/arrivalnotice/line/index.ts b/apps/web-antd/src/api/mes/wm/arrivalnotice/line/index.ts index b763b2ad5..19c917f81 100644 --- a/apps/web-antd/src/api/mes/wm/arrivalnotice/line/index.ts +++ b/apps/web-antd/src/api/mes/wm/arrivalnotice/line/index.ts @@ -39,10 +39,7 @@ export function getArrivalNoticeLine(id: number) { export function createArrivalNoticeLine( data: MesWmArrivalNoticeLineApi.ArrivalNoticeLine, ) { - return requestClient.post( - '/mes/wm/arrival-notice-line/create', - data, - ); + return requestClient.post('/mes/wm/arrival-notice-line/create', data); } /** 修改到货通知单行 */ diff --git a/apps/web-antd/src/api/mes/wm/batch/index.ts b/apps/web-antd/src/api/mes/wm/batch/index.ts index 14d5fa1bd..5fa9df603 100644 --- a/apps/web-antd/src/api/mes/wm/batch/index.ts +++ b/apps/web-antd/src/api/mes/wm/batch/index.ts @@ -73,9 +73,12 @@ export function getBatchPage(params: MesWmBatchApi.PageParams) { /** 批次向前追溯 */ export function getForwardBatchList(code: string) { - return requestClient.get('/mes/wm/batch/forward-list', { - params: { code }, - }); + return requestClient.get( + '/mes/wm/batch/forward-list', + { + params: { code }, + }, + ); } /** 批次向后追溯 */ diff --git a/apps/web-antd/src/api/mes/wm/miscreceipt/index.ts b/apps/web-antd/src/api/mes/wm/miscreceipt/index.ts index 112cb4aac..6c6b4de36 100644 --- a/apps/web-antd/src/api/mes/wm/miscreceipt/index.ts +++ b/apps/web-antd/src/api/mes/wm/miscreceipt/index.ts @@ -66,5 +66,7 @@ export function cancelMiscReceipt(id: number) { /** 导出杂项入库单 */ export function exportMiscReceipt(params: any) { - return requestClient.download('/mes/wm/misc-receipt/export-excel', { params }); + return requestClient.download('/mes/wm/misc-receipt/export-excel', { + params, + }); } diff --git a/apps/web-antd/src/api/mes/wm/outsourceissue/detail/index.ts b/apps/web-antd/src/api/mes/wm/outsourceissue/detail/index.ts index 15b50b6a6..e7fbaed8a 100644 --- a/apps/web-antd/src/api/mes/wm/outsourceissue/detail/index.ts +++ b/apps/web-antd/src/api/mes/wm/outsourceissue/detail/index.ts @@ -28,9 +28,10 @@ export namespace MesWmOutsourceIssueDetailApi { /** 查询外协发料单明细列表 */ export function getOutsourceIssueDetailListByLineId(lineId: number) { - return requestClient.get< - MesWmOutsourceIssueDetailApi.OutsourceIssueDetail[] - >('/mes/wm/outsource-issue-detail/list-by-line', { params: { lineId } }); + return requestClient.get( + '/mes/wm/outsource-issue-detail/list-by-line', + { params: { lineId } }, + ); } /** 查询外协发料单明细详情 */ diff --git a/apps/web-antd/src/api/mes/wm/outsourcereceipt/index.ts b/apps/web-antd/src/api/mes/wm/outsourcereceipt/index.ts index 730b2f8b9..3f2b58584 100644 --- a/apps/web-antd/src/api/mes/wm/outsourcereceipt/index.ts +++ b/apps/web-antd/src/api/mes/wm/outsourcereceipt/index.ts @@ -21,10 +21,9 @@ export namespace MesWmOutsourceReceiptApi { /** 查询外协入库单分页 */ export function getOutsourceReceiptPage(params: PageParam) { - return requestClient.get>( - '/mes/wm/outsource-receipt/page', - { params }, - ); + return requestClient.get< + PageResult + >('/mes/wm/outsource-receipt/page', { params }); } /** 查询外协入库单详情 */ diff --git a/apps/web-antd/src/api/mes/wm/productissue/detail/index.ts b/apps/web-antd/src/api/mes/wm/productissue/detail/index.ts index 96def9c44..6f7cbc12c 100644 --- a/apps/web-antd/src/api/mes/wm/productissue/detail/index.ts +++ b/apps/web-antd/src/api/mes/wm/productissue/detail/index.ts @@ -40,7 +40,10 @@ export function getProductIssueDetail(id: number) { export function createProductIssueDetail( data: MesWmProductIssueDetailApi.ProductIssueDetail, ) { - return requestClient.post('/mes/wm/product-issue-detail/create', data); + return requestClient.post( + '/mes/wm/product-issue-detail/create', + data, + ); } /** 修改领料出库明细 */ diff --git a/apps/web-antd/src/api/mes/wm/productissue/line/index.ts b/apps/web-antd/src/api/mes/wm/productissue/line/index.ts index 65ae7a187..26112d882 100644 --- a/apps/web-antd/src/api/mes/wm/productissue/line/index.ts +++ b/apps/web-antd/src/api/mes/wm/productissue/line/index.ts @@ -20,10 +20,9 @@ export namespace MesWmProductIssueLineApi { /** 查询领料出库单行分页 */ export function getProductIssueLinePage(params: PageParam) { - return requestClient.get>( - '/mes/wm/product-issue-line/page', - { params }, - ); + return requestClient.get< + PageResult + >('/mes/wm/product-issue-line/page', { params }); } /** 查询领料出库单行详情 */ diff --git a/apps/web-antd/src/api/mes/wm/productsales/detail/index.ts b/apps/web-antd/src/api/mes/wm/productsales/detail/index.ts index 34aa22d5b..5aa075644 100644 --- a/apps/web-antd/src/api/mes/wm/productsales/detail/index.ts +++ b/apps/web-antd/src/api/mes/wm/productsales/detail/index.ts @@ -42,7 +42,10 @@ export function getProductSalesDetail(id: number) { export function createProductSalesDetail( data: MesWmProductSalesDetailApi.ProductSalesDetail, ) { - return requestClient.post('/mes/wm/product-sales-detail/create', data); + return requestClient.post( + '/mes/wm/product-sales-detail/create', + data, + ); } /** 修改销售出库明细 */ diff --git a/apps/web-antd/src/api/mes/wm/returnvendor/detail/index.ts b/apps/web-antd/src/api/mes/wm/returnvendor/detail/index.ts index 92bb049f1..f77b2d4a6 100644 --- a/apps/web-antd/src/api/mes/wm/returnvendor/detail/index.ts +++ b/apps/web-antd/src/api/mes/wm/returnvendor/detail/index.ts @@ -40,7 +40,10 @@ export function getReturnVendorDetail(id: number) { export function createReturnVendorDetail( data: MesWmReturnVendorDetailApi.ReturnVendorDetail, ) { - return requestClient.post('/mes/wm/return-vendor-detail/create', data); + return requestClient.post( + '/mes/wm/return-vendor-detail/create', + data, + ); } /** 修改供应商退货明细 */ diff --git a/apps/web-antd/src/api/mes/wm/returnvendor/line/index.ts b/apps/web-antd/src/api/mes/wm/returnvendor/line/index.ts index c2ff06c62..568c6ae70 100644 --- a/apps/web-antd/src/api/mes/wm/returnvendor/line/index.ts +++ b/apps/web-antd/src/api/mes/wm/returnvendor/line/index.ts @@ -21,10 +21,9 @@ export namespace MesWmReturnVendorLineApi { /** 查询供应商退货单行分页 */ export function getReturnVendorLinePage(params: PageParam) { - return requestClient.get>( - '/mes/wm/return-vendor-line/page', - { params }, - ); + return requestClient.get< + PageResult + >('/mes/wm/return-vendor-line/page', { params }); } /** 查询供应商退货单行详情 */ diff --git a/apps/web-antd/src/api/mes/wm/stocktaking/task/result/index.ts b/apps/web-antd/src/api/mes/wm/stocktaking/task/result/index.ts index acd9a5f64..d44a0d4a1 100644 --- a/apps/web-antd/src/api/mes/wm/stocktaking/task/result/index.ts +++ b/apps/web-antd/src/api/mes/wm/stocktaking/task/result/index.ts @@ -60,5 +60,7 @@ export function updateStockTakingResult( /** 删除盘点结果 */ export function deleteStockTakingResult(id: number) { - return requestClient.delete(`/mes/wm/stocktaking-task-result/delete?id=${id}`); + return requestClient.delete( + `/mes/wm/stocktaking-task-result/delete?id=${id}`, + ); } diff --git a/apps/web-antd/src/router/routes/modules/mes.ts b/apps/web-antd/src/router/routes/modules/mes.ts index cf0d1c418..2b62534ec 100644 --- a/apps/web-antd/src/router/routes/modules/mes.ts +++ b/apps/web-antd/src/router/routes/modules/mes.ts @@ -18,8 +18,7 @@ const routes: RouteRecordRaw[] = [ title: '库区设置', activePath: '/mes/wm/warehouse', }, - component: () => - import('#/views/mes/wm/warehouse/location/index.vue'), + component: () => import('#/views/mes/wm/warehouse/location/index.vue'), }, { path: 'wm/warehouse/area', diff --git a/apps/web-antd/src/views/ai/knowledge/document/index.vue b/apps/web-antd/src/views/ai/knowledge/document/index.vue index 21db8989a..8585ac5d3 100644 --- a/apps/web-antd/src/views/ai/knowledge/document/index.vue +++ b/apps/web-antd/src/views/ai/knowledge/document/index.vue @@ -77,7 +77,9 @@ async function handleStatusChange( row: AiKnowledgeDocumentApi.KnowledgeDocument, ): Promise { try { - await confirm(`你要将${row.name}的状态切换为【${getDictLabel(DICT_TYPE.COMMON_STATUS, newStatus)}】吗?`); + await confirm( + `你要将${row.name}的状态切换为【${getDictLabel(DICT_TYPE.COMMON_STATUS, newStatus)}】吗?`, + ); } catch { return false; } diff --git a/apps/web-antd/src/views/ai/knowledge/segment/index.vue b/apps/web-antd/src/views/ai/knowledge/segment/index.vue index 519c96eaa..981c6ad1f 100644 --- a/apps/web-antd/src/views/ai/knowledge/segment/index.vue +++ b/apps/web-antd/src/views/ai/knowledge/segment/index.vue @@ -65,7 +65,9 @@ async function handleStatusChange( row: AiKnowledgeSegmentApi.KnowledgeSegment, ): Promise { try { - await confirm(`你要将片段 ${row.id} 的状态切换为【${getDictLabel(DICT_TYPE.COMMON_STATUS, newStatus)}】吗?`); + await confirm( + `你要将片段 ${row.id} 的状态切换为【${getDictLabel(DICT_TYPE.COMMON_STATUS, newStatus)}】吗?`, + ); } catch { return false; } diff --git a/apps/web-antd/src/views/bpm/components/bpmn-process-designer/package/penal/task/task-components/UserTask.vue b/apps/web-antd/src/views/bpm/components/bpmn-process-designer/package/penal/task/task-components/UserTask.vue index 24997687d..9a6844b2d 100644 --- a/apps/web-antd/src/views/bpm/components/bpmn-process-designer/package/penal/task/task-components/UserTask.vue +++ b/apps/web-antd/src/views/bpm/components/bpmn-process-designer/package/penal/task/task-components/UserTask.vue @@ -192,7 +192,7 @@ const resetTaskForm = () => { // 改用通过extensionElements来存储数据 - // if (businessObject.candidateStrategy != undefined) { + // if (businessObject.candidateStrategy !== undefined) { // userTaskForm.value.candidateStrategy = parseInt( // businessObject.candidateStrategy, // ) as any; diff --git a/apps/web-antd/src/views/bpm/processInstance/detail/modules/process-print.vue b/apps/web-antd/src/views/bpm/processInstance/detail/modules/process-print.vue index 3d487af22..25833a809 100644 --- a/apps/web-antd/src/views/bpm/processInstance/detail/modules/process-print.vue +++ b/apps/web-antd/src/views/bpm/processInstance/detail/modules/process-print.vue @@ -234,7 +234,9 @@ function createFileLinkHtml(file: unknown) { linkEl.setAttribute('href', String(url)); linkEl.setAttribute('target', '_blank'); linkEl.setAttribute('rel', 'noopener noreferrer'); - const fallbackName = String(url).slice(Math.max(0, String(url).lastIndexOf('/') + 1)) || String(url); + const fallbackName = + String(url).slice(Math.max(0, String(url).lastIndexOf('/') + 1)) || + String(url); const recordName = record ? getRecordValue(record, 'name') : undefined; linkEl.textContent = recordName ? String(recordName) : fallbackName; return linkEl.outerHTML; @@ -247,16 +249,14 @@ function renderFileListHtml(value: unknown) { .join('
'); } -function mapValuesWithOptions( - value: unknown, - options: FormFieldOption[] = [], -) { +function mapValuesWithOptions(value: unknown, options: FormFieldOption[] = []) { const values = toValueArray(value); const labels = values .map((item) => { const matched = options.find( (option) => - option?.value === item || String(option?.value ?? '') === String(item), + option?.value === item || + String(option?.value ?? '') === String(item), ); return escapeHtml(matched?.label ?? String(item)); }) @@ -300,9 +300,15 @@ function mapValueWithLabelMap( * @returns 打印展示时使用的区域、部门、用户名称映射 */ async function loadPrintLookupMaps(formFieldsObj: FormFieldRule[]) { - const hasAreaSelect = formFieldsObj.some((item) => item.type === 'AreaSelect'); - const hasUserSelect = formFieldsObj.some((item) => item.type === 'UserSelect'); - const hasDeptSelect = formFieldsObj.some((item) => item.type === 'DeptSelect'); + const hasAreaSelect = formFieldsObj.some( + (item) => item.type === 'AreaSelect', + ); + const hasUserSelect = formFieldsObj.some( + (item) => item.type === 'UserSelect', + ); + const hasDeptSelect = formFieldsObj.some( + (item) => item.type === 'DeptSelect', + ); const [areaList, userList, deptList] = await Promise.all([ hasAreaSelect ? getAreaTree() : Promise.resolve([]), @@ -335,7 +341,7 @@ function formatPrintField( rule: FormFieldRule, value: unknown, lookupMaps: PrintLookupMaps, -){ +) { const type = String(rule.type ?? ''); switch (type) { @@ -387,8 +393,9 @@ function formatPrintField( } as const; const rawValueType = String(getRuleProp(rule, 'valueType') ?? ''); const valueType = - (valueTypeMap as Record)[rawValueType] ?? - 'string'; + (valueTypeMap as Record)[ + rawValueType + ] ?? 'string'; const options = getDictOptions(dictType, valueType); return mapValuesWithOptions(value, options); } @@ -402,10 +409,9 @@ function formatPrintField( } case 'IframeComponent': { const propsObj = rule.props; - const propsUrl = - isPrintableRecord(propsObj) - ? String(getRecordValue(propsObj, 'url') ?? '') - : ''; + const propsUrl = isPrintableRecord(propsObj) + ? String(getRecordValue(propsObj, 'url') ?? '') + : ''; const iframeUrl = isEmptyValue(value) ? propsUrl : String(value ?? ''); return iframeUrl ? createFileLinkHtml(iframeUrl) : ''; } @@ -446,7 +452,9 @@ function initPrintDataMap() { printDataMap.value.startUserDept = printData.value.processInstance.startUser?.deptName || ''; printDataMap.value.processName = printData.value.processInstance.name; - printDataMap.value.processNum = String(printData.value.processInstance.id ?? ''); + printDataMap.value.processNum = String( + printData.value.processInstance.id ?? '', + ); printDataMap.value.startTime = formatDate( printData.value.processInstance.startTime, ); diff --git a/apps/web-antd/src/views/crm/business/components/detail-list.vue b/apps/web-antd/src/views/crm/business/components/detail-list.vue index ce2691713..9d223e470 100644 --- a/apps/web-antd/src/views/crm/business/components/detail-list.vue +++ b/apps/web-antd/src/views/crm/business/components/detail-list.vue @@ -75,7 +75,9 @@ async function handleDeleteContactBusinessList() { return; } try { - await confirm(`确定要将${checkedRows.value.map((item) => item.name).join(',')}解除关联吗?`); + await confirm( + `确定要将${checkedRows.value.map((item) => item.name).join(',')}解除关联吗?`, + ); } catch { return false; } diff --git a/apps/web-antd/src/views/crm/contact/components/detail-list.vue b/apps/web-antd/src/views/crm/contact/components/detail-list.vue index d777749f7..2fddb286c 100644 --- a/apps/web-antd/src/views/crm/contact/components/detail-list.vue +++ b/apps/web-antd/src/views/crm/contact/components/detail-list.vue @@ -72,7 +72,9 @@ async function handleDeleteContactBusinessList() { return; } try { - await confirm(`确定要将${checkedRows.value.map((item) => item.name).join(',')}解除关联吗?`); + await confirm( + `确定要将${checkedRows.value.map((item) => item.name).join(',')}解除关联吗?`, + ); } catch { return false; } diff --git a/apps/web-antd/src/views/crm/customer/detail/index.vue b/apps/web-antd/src/views/crm/customer/detail/index.vue index 8d4a917e5..85caeacf6 100644 --- a/apps/web-antd/src/views/crm/customer/detail/index.vue +++ b/apps/web-antd/src/views/crm/customer/detail/index.vue @@ -150,7 +150,9 @@ async function handlePutPool(): Promise { async function handleUpdateDealStatus(): Promise { const dealStatus = !customer.value.dealStatus; try { - await confirm(`确定更新成交状态为【${dealStatus ? '已成交' : '未成交'}】吗?`); + await confirm( + `确定更新成交状态为【${dealStatus ? '已成交' : '未成交'}】吗?`, + ); } catch { return false; } diff --git a/apps/web-antd/src/views/crm/permission/modules/list.vue b/apps/web-antd/src/views/crm/permission/modules/list.vue index 3cd76ee36..3fd9111e7 100644 --- a/apps/web-antd/src/views/crm/permission/modules/list.vue +++ b/apps/web-antd/src/views/crm/permission/modules/list.vue @@ -100,7 +100,9 @@ async function handleDelete() { return; } try { - await confirm(`你要将${checkedRows.value.map((item) => item.nickname).join(',')}移出团队吗?`); + await confirm( + `你要将${checkedRows.value.map((item) => item.nickname).join(',')}移出团队吗?`, + ); } catch { return false; } diff --git a/apps/web-antd/src/views/crm/receivable/data.ts b/apps/web-antd/src/views/crm/receivable/data.ts index eacd97c34..b85771db3 100644 --- a/apps/web-antd/src/views/crm/receivable/data.ts +++ b/apps/web-antd/src/views/crm/receivable/data.ts @@ -57,12 +57,19 @@ export function useFormSchema(): VbenFormSchema[] { label: '客户名称', component: 'ApiSelect', rules: 'required', - componentProps: { + componentProps: (_values, form) => ({ api: getCustomerSimpleList, labelField: 'name', valueField: 'id', placeholder: '请选择客户', - }, + onChange: () => { + form.setFieldValue('contractId', undefined); + form.setFieldValue('planId', undefined); + form.setFieldValue('price', undefined); + form.setFieldValue('returnTime', undefined); + form.setFieldValue('returnType', undefined); + }, + }), dependencies: { triggerFields: ['id'], disabled: (values) => values.id, @@ -76,21 +83,33 @@ export function useFormSchema(): VbenFormSchema[] { dependencies: { triggerFields: ['customerId'], disabled: (values) => !values.customerId || values.id, - async componentProps(values) { - if (values.customerId) { - if (!values.id) { - // 特殊:只有在【新增】时,才清空合同编号 - values.contractId = undefined; - } - const contracts = await getContractSimpleList(values.customerId); + async componentProps(values, form) { + if (!values.customerId) { return { - options: contracts.map((item) => ({ - label: item.name, - value: item.id, - })), - placeholder: '请选择合同', - } as any; + options: [], + placeholder: '请选择客户', + }; } + const contracts = await getContractSimpleList(values.customerId); + return { + options: contracts.map((item) => ({ + label: item.name, + value: item.id, + })), + placeholder: '请选择合同', + onChange: (value: number) => { + form.setFieldValue('planId', undefined); + form.setFieldValue('returnTime', undefined); + form.setFieldValue('returnType', undefined); + const contract = contracts.find((item) => item.id === value); + form.setFieldValue( + 'price', + contract + ? contract.totalPrice - contract.totalReceivablePrice + : undefined, + ); + }, + } as any; }, }, }, @@ -101,28 +120,38 @@ export function useFormSchema(): VbenFormSchema[] { rules: 'required', dependencies: { triggerFields: ['contractId'], - disabled: (values) => !values.contractId, - async componentProps(values) { - if (values.contractId) { - values.planId = undefined; - const plans = await getReceivablePlanSimpleList( - values.customerId, - values.contractId, - ); + disabled: (values) => !values.contractId || values.id, + async componentProps(values, form) { + if (!values.contractId) { return { - options: plans.map((item) => ({ - label: item.period, - value: item.id, - })), - placeholder: '请选择回款期数', - onChange: async (value: any) => { - const plan = await getReceivablePlan(value); - values.returnTime = plan?.returnTime; - values.price = plan?.price; - values.returnType = plan?.returnType; - }, - } as any; + options: [], + placeholder: '请选择合同', + }; } + const plans = await getReceivablePlanSimpleList( + values.customerId, + values.contractId, + ); + return { + options: plans.map((item) => ({ + disabled: !!item.receivableId, + label: `第 ${item.period} 期`, + value: item.id, + })), + placeholder: '请选择回款期数', + onChange: async (value: any) => { + if (!value) { + form.setFieldValue('returnTime', undefined); + form.setFieldValue('price', undefined); + form.setFieldValue('returnType', undefined); + return; + } + const plan = await getReceivablePlan(value); + form.setFieldValue('returnTime', plan?.returnTime); + form.setFieldValue('price', plan?.price); + form.setFieldValue('returnType', plan?.returnType); + }, + } as any; }, }, }, diff --git a/apps/web-antd/src/views/crm/receivable/modules/form.vue b/apps/web-antd/src/views/crm/receivable/modules/form.vue index 07f240dd7..d04f2a9d8 100644 --- a/apps/web-antd/src/views/crm/receivable/modules/form.vue +++ b/apps/web-antd/src/views/crm/receivable/modules/form.vue @@ -7,6 +7,7 @@ import { useVbenForm, useVbenModal } from '@vben/common-ui'; import { message } from 'ant-design-vue'; +import { getContractSimpleList } from '#/api/crm/contract'; import { createReceivable, getReceivable, @@ -16,8 +17,20 @@ import { $t } from '#/locales'; import { useFormSchema } from '../data'; +type ReceivablePrefillData = Partial< + Pick< + CrmReceivableApi.Receivable, + 'contractId' | 'customerId' | 'price' | 'returnType' + > +> & { id?: number }; + +type ReceivableFormModalData = ReceivablePrefillData & { + plan?: ReceivablePrefillData; + receivable?: Pick; +}; + const emit = defineEmits(['success']); -const formData = ref(); +const formData = ref>(); const getTitle = computed(() => { return formData.value?.id ? $t('ui.actionTitle.edit', ['回款']) @@ -36,6 +49,32 @@ const [Form, formApi] = useVbenForm({ showDefaultActions: false, }); +/** 构建新增回款的预填表单 */ +async function buildCreateFormData( + plan: ReceivablePrefillData, +): Promise> { + const values: Partial = { + contractId: plan?.contractId, + customerId: plan?.customerId, + }; + // 从回款计划创建时,直接继承计划的期数、金额和回款方式 + if (plan?.id) { + values.planId = plan.id; + values.price = plan.price; + values.returnType = plan.returnType; + return values; + } + // 从客户/合同详情创建时,没有计划期数,按合同剩余应回款金额预填 + if (values.customerId && values.contractId) { + const contracts = await getContractSimpleList(values.customerId); + const contract = contracts.find((item) => item.id === values.contractId); + if (contract) { + values.price = contract.totalPrice - contract.totalReceivablePrice; + } + } + return values; +} + const [Modal, modalApi] = useVbenModal({ async onConfirm() { const { valid } = await formApi.validate(); @@ -63,31 +102,26 @@ const [Modal, modalApi] = useVbenModal({ return; } // 加载数据 - const data = modalApi.getData(); + formData.value = undefined; + await formApi.resetForm(); + const data = modalApi.getData() as null | ReceivableFormModalData; if (!data) { return; } - const { receivable, plan } = data; + const { receivable } = data; + const plan = + data.plan ?? (data.customerId || data.contractId ? data : undefined); modalApi.lock(); try { - if (receivable) { + if (receivable?.id) { formData.value = await getReceivable(receivable.id!); } else if (plan) { - formData.value = plan.id - ? { - planId: plan.id, - price: plan.price, - returnType: plan.returnType, - customerId: plan.customerId, - contractId: plan.contractId, - } - : ({ - customerId: plan.customerId, - contractId: plan.contractId, - } as any); + formData.value = await buildCreateFormData(plan); + } + if (formData.value) { + // 设置到 values + await formApi.setValues(formData.value as any); } - // 设置到 values - await formApi.setValues(formData.value as any); } finally { modalApi.unlock(); } diff --git a/apps/web-antd/src/views/dashboard/workspace/index.vue b/apps/web-antd/src/views/dashboard/workspace/index.vue index 8f6620310..1cfbef1bc 100644 --- a/apps/web-antd/src/views/dashboard/workspace/index.vue +++ b/apps/web-antd/src/views/dashboard/workspace/index.vue @@ -238,7 +238,7 @@ function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) { -
+
@@ -246,7 +246,7 @@ function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
diff --git a/apps/web-antd/src/views/erp/finance/payment/modules/form.vue b/apps/web-antd/src/views/erp/finance/payment/modules/form.vue index 25caa7b05..b9c8cd4c1 100644 --- a/apps/web-antd/src/views/erp/finance/payment/modules/form.vue +++ b/apps/web-antd/src/views/erp/finance/payment/modules/form.vue @@ -176,6 +176,7 @@ const [Modal, modalApi] = useVbenModal({
diff --git a/apps/web-antd/src/views/erp/finance/payment/modules/purchase-in-select.vue b/apps/web-antd/src/views/erp/finance/payment/modules/purchase-in-select.vue index ea4e118e8..deefa8220 100644 --- a/apps/web-antd/src/views/erp/finance/payment/modules/purchase-in-select.vue +++ b/apps/web-antd/src/views/erp/finance/payment/modules/purchase-in-select.vue @@ -26,7 +26,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, gridOptions: { columns: usePurchaseInGridColumns(), - height: 'auto', + height: 520, keepSource: true, proxyConfig: { ajax: { @@ -95,14 +95,12 @@ defineExpose({ open: openModal }); diff --git a/apps/web-antd/src/views/erp/finance/payment/modules/sale-return-select.vue b/apps/web-antd/src/views/erp/finance/payment/modules/sale-return-select.vue index a68cb945c..71534b39a 100644 --- a/apps/web-antd/src/views/erp/finance/payment/modules/sale-return-select.vue +++ b/apps/web-antd/src/views/erp/finance/payment/modules/sale-return-select.vue @@ -26,7 +26,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, gridOptions: { columns: useSaleReturnGridColumns(), - height: 'auto', + height: 520, keepSource: true, proxyConfig: { ajax: { @@ -99,14 +99,12 @@ defineExpose({ open: openModal }); diff --git a/apps/web-antd/src/views/erp/finance/receipt/modules/form.vue b/apps/web-antd/src/views/erp/finance/receipt/modules/form.vue index 3b13253dc..6b2d21796 100644 --- a/apps/web-antd/src/views/erp/finance/receipt/modules/form.vue +++ b/apps/web-antd/src/views/erp/finance/receipt/modules/form.vue @@ -190,6 +190,7 @@ const [Modal, modalApi] = useVbenModal({ diff --git a/apps/web-antd/src/views/erp/finance/receipt/modules/sale-out-select.vue b/apps/web-antd/src/views/erp/finance/receipt/modules/sale-out-select.vue index 21e793c8c..122349051 100644 --- a/apps/web-antd/src/views/erp/finance/receipt/modules/sale-out-select.vue +++ b/apps/web-antd/src/views/erp/finance/receipt/modules/sale-out-select.vue @@ -26,7 +26,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, gridOptions: { columns: useSaleOutGridColumns(), - height: 'auto', + height: 520, keepSource: true, proxyConfig: { ajax: { @@ -91,14 +91,12 @@ defineExpose({ open: openModal }); diff --git a/apps/web-antd/src/views/erp/finance/receipt/modules/sale-return-select.vue b/apps/web-antd/src/views/erp/finance/receipt/modules/sale-return-select.vue index 3ebd3f2d3..2fc2f0ac2 100644 --- a/apps/web-antd/src/views/erp/finance/receipt/modules/sale-return-select.vue +++ b/apps/web-antd/src/views/erp/finance/receipt/modules/sale-return-select.vue @@ -26,7 +26,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, gridOptions: { columns: useSaleReturnGridColumns(), - height: 'auto', + height: 520, keepSource: true, proxyConfig: { ajax: { @@ -95,14 +95,12 @@ defineExpose({ open: openModal }); diff --git a/apps/web-antd/src/views/erp/purchase/in/modules/form.vue b/apps/web-antd/src/views/erp/purchase/in/modules/form.vue index 11da2a489..3a58289eb 100644 --- a/apps/web-antd/src/views/erp/purchase/in/modules/form.vue +++ b/apps/web-antd/src/views/erp/purchase/in/modules/form.vue @@ -206,6 +206,7 @@ const [Modal, modalApi] = useVbenModal({ diff --git a/apps/web-antd/src/views/erp/purchase/in/modules/purchase-order-select.vue b/apps/web-antd/src/views/erp/purchase/in/modules/purchase-order-select.vue index 5e24a9b4a..854ae14ff 100644 --- a/apps/web-antd/src/views/erp/purchase/in/modules/purchase-order-select.vue +++ b/apps/web-antd/src/views/erp/purchase/in/modules/purchase-order-select.vue @@ -38,7 +38,7 @@ const [Grid] = useVbenVxeGrid({ }, gridOptions: { columns: useOrderGridColumns(), - height: 'auto', + height: 520, keepSource: true, proxyConfig: { ajax: { @@ -108,12 +108,13 @@ function handleOk() { - +
diff --git a/apps/web-antd/src/views/erp/purchase/return/modules/form.vue b/apps/web-antd/src/views/erp/purchase/return/modules/form.vue index 9efd64660..dc907057d 100644 --- a/apps/web-antd/src/views/erp/purchase/return/modules/form.vue +++ b/apps/web-antd/src/views/erp/purchase/return/modules/form.vue @@ -206,6 +206,7 @@ const [Modal, modalApi] = useVbenModal({ diff --git a/apps/web-antd/src/views/erp/purchase/return/modules/purchase-order-select.vue b/apps/web-antd/src/views/erp/purchase/return/modules/purchase-order-select.vue index 188ef9116..7cefd0c85 100644 --- a/apps/web-antd/src/views/erp/purchase/return/modules/purchase-order-select.vue +++ b/apps/web-antd/src/views/erp/purchase/return/modules/purchase-order-select.vue @@ -38,7 +38,7 @@ const [Grid] = useVbenVxeGrid({ }, gridOptions: { columns: useOrderGridColumns(), - height: 'auto', + height: 520, keepSource: true, proxyConfig: { ajax: { @@ -108,12 +108,13 @@ function handleOk() { - +
diff --git a/apps/web-antd/src/views/erp/sale/out/modules/form.vue b/apps/web-antd/src/views/erp/sale/out/modules/form.vue index 5aff9e351..9483f64cc 100644 --- a/apps/web-antd/src/views/erp/sale/out/modules/form.vue +++ b/apps/web-antd/src/views/erp/sale/out/modules/form.vue @@ -201,6 +201,7 @@ const [Modal, modalApi] = useVbenModal({ diff --git a/apps/web-antd/src/views/erp/sale/out/modules/sale-order-select.vue b/apps/web-antd/src/views/erp/sale/out/modules/sale-order-select.vue index 9d6b40ba7..099f56ea0 100644 --- a/apps/web-antd/src/views/erp/sale/out/modules/sale-order-select.vue +++ b/apps/web-antd/src/views/erp/sale/out/modules/sale-order-select.vue @@ -38,7 +38,7 @@ const [Grid] = useVbenVxeGrid({ }, gridOptions: { columns: useOrderGridColumns(), - height: 'auto', + height: 520, keepSource: true, proxyConfig: { ajax: { @@ -108,12 +108,13 @@ function handleOk() { - +
diff --git a/apps/web-antd/src/views/erp/sale/return/modules/form.vue b/apps/web-antd/src/views/erp/sale/return/modules/form.vue index 7fa489a75..76ce63a83 100644 --- a/apps/web-antd/src/views/erp/sale/return/modules/form.vue +++ b/apps/web-antd/src/views/erp/sale/return/modules/form.vue @@ -206,6 +206,7 @@ const [Modal, modalApi] = useVbenModal({ diff --git a/apps/web-antd/src/views/erp/sale/return/modules/sale-order-select.vue b/apps/web-antd/src/views/erp/sale/return/modules/sale-order-select.vue index 8a8ade7a4..ec19cbbcc 100644 --- a/apps/web-antd/src/views/erp/sale/return/modules/sale-order-select.vue +++ b/apps/web-antd/src/views/erp/sale/return/modules/sale-order-select.vue @@ -38,7 +38,7 @@ const [Grid] = useVbenVxeGrid({ }, gridOptions: { columns: useOrderGridColumns(), - height: 'auto', + height: 520, keepSource: true, proxyConfig: { ajax: { @@ -108,12 +108,13 @@ function handleOk() { - +
diff --git a/apps/web-antd/src/views/infra/apiErrorLog/index.vue b/apps/web-antd/src/views/infra/apiErrorLog/index.vue index 304395b36..cc235950b 100644 --- a/apps/web-antd/src/views/infra/apiErrorLog/index.vue +++ b/apps/web-antd/src/views/infra/apiErrorLog/index.vue @@ -42,7 +42,9 @@ function handleDetail(row: InfraApiErrorLogApi.ApiErrorLog) { /** 处理已处理 / 已忽略的操作 */ async function handleProcess(id: number, processStatus: number) { - await confirm(`确认标记为${InfraApiErrorLogProcessStatusEnum.DONE ? '已处理' : '已忽略'}?`); + await confirm( + `确认标记为${InfraApiErrorLogProcessStatusEnum.DONE ? '已处理' : '已忽略'}?`, + ); const hideLoading = message.loading({ content: '正在处理中...', duration: 0, diff --git a/apps/web-antd/src/views/iot/alert/config/data.ts b/apps/web-antd/src/views/iot/alert/config/data.ts index 86dab96cc..34e6aefbb 100644 --- a/apps/web-antd/src/views/iot/alert/config/data.ts +++ b/apps/web-antd/src/views/iot/alert/config/data.ts @@ -19,7 +19,9 @@ import { NotifyTemplateSelect } from '#/views/system/notify/template/components' import { SmsTemplateSelect } from '#/views/system/sms/template/components'; function hasReceiveType(values: Partial>, type: number) { - return Array.isArray(values.receiveTypes) && values.receiveTypes.includes(type); + return ( + Array.isArray(values.receiveTypes) && values.receiveTypes.includes(type) + ); } /** 新增/修改告警配置的表单 */ @@ -155,7 +157,8 @@ export function useFormSchema(): VbenFormSchema[] { component: markRaw(NotifyTemplateSelect), dependencies: { triggerFields: ['receiveTypes'], - show: (values) => hasReceiveType(values, IotAlertReceiveTypeEnum.NOTIFY), + show: (values) => + hasReceiveType(values, IotAlertReceiveTypeEnum.NOTIFY), trigger: async (values, formApi) => { if ( !hasReceiveType(values, IotAlertReceiveTypeEnum.NOTIFY) && diff --git a/apps/web-antd/src/views/iot/device/device/data.ts b/apps/web-antd/src/views/iot/device/device/data.ts index ea7f0fc9b..a6c71e226 100644 --- a/apps/web-antd/src/views/iot/device/device/data.ts +++ b/apps/web-antd/src/views/iot/device/device/data.ts @@ -79,16 +79,13 @@ export function useAdvancedFormSchema(): VbenFormSchema[] { }, rules: z .string() - .refine( - (value) => { - const length = value.replaceAll( - /[\u4E00-\u9FA5\u3040-\u30FF]/g, - 'aa', - ).length; - return length >= 4 && length <= 64; - }, - '备注名称长度限制为 4~64 个字符,中文及日文算 2 个字符', - ) + .refine((value) => { + const length = value.replaceAll( + /[\u4E00-\u9FA5\u3040-\u30FF]/g, + 'aa', + ).length; + return length >= 4 && length <= 64; + }, '备注名称长度限制为 4~64 个字符,中文及日文算 2 个字符') .refine( (value) => /^[\u4E00-\u9FA5\u3040-\u30FF\w]+$/.test(value), '备注名称只能包含中文、英文字母、日文、数字和下划线(_)', diff --git a/apps/web-antd/src/views/iot/device/device/detail/modules/info.vue b/apps/web-antd/src/views/iot/device/device/detail/modules/info.vue index 234ad1b33..fa26e6f13 100644 --- a/apps/web-antd/src/views/iot/device/device/detail/modules/info.vue +++ b/apps/web-antd/src/views/iot/device/device/detail/modules/info.vue @@ -38,7 +38,7 @@ const mapDialogRef = ref>(); /** 是否有位置信息(合法经纬度 0 不应视为空) */ const hasLocation = computed(() => { - return props.device.longitude != null && props.device.latitude != null; + return props.device.longitude !== null && props.device.latitude !== null; }); /** 打开地图弹窗 */ diff --git a/apps/web-antd/src/views/iot/device/group/index.vue b/apps/web-antd/src/views/iot/device/group/index.vue index 095203830..d98e30847 100644 --- a/apps/web-antd/src/views/iot/device/group/index.vue +++ b/apps/web-antd/src/views/iot/device/group/index.vue @@ -36,7 +36,9 @@ function handleEdit(row: IotDeviceGroupApi.DeviceGroup) { /** 删除设备分组 */ async function handleDelete(row: IotDeviceGroupApi.DeviceGroup) { if (row.deviceCount && row.deviceCount > 0) { - message.warning(`分组「${row.name}」下存在 ${row.deviceCount} 台设备,无法删除`); + message.warning( + `分组「${row.name}」下存在 ${row.deviceCount} 台设备,无法删除`, + ); return; } const hideLoading = message.loading({ diff --git a/apps/web-antd/src/views/iot/home/modules/device-map-card.vue b/apps/web-antd/src/views/iot/home/modules/device-map-card.vue index 7989a478e..86973dd83 100644 --- a/apps/web-antd/src/views/iot/home/modules/device-map-card.vue +++ b/apps/web-antd/src/views/iot/home/modules/device-map-card.vue @@ -24,11 +24,12 @@ const deviceList = ref([]); // 设备分布列表 const hasData = computed(() => deviceList.value.length > 0); // 是否有数据 -const stateOptions = computed(() => - getDictOptions( - DICT_TYPE.IOT_DEVICE_STATE, - 'number', - ) as NumberDictDataType[], +const stateOptions = computed( + () => + getDictOptions( + DICT_TYPE.IOT_DEVICE_STATE, + 'number', + ) as NumberDictDataType[], ); // 状态图例列表(从字典获取) const stateColorMap: Record = { diff --git a/apps/web-antd/src/views/iot/ota/firmware/index.vue b/apps/web-antd/src/views/iot/ota/firmware/index.vue index 9f0a48466..537f3359d 100644 --- a/apps/web-antd/src/views/iot/ota/firmware/index.vue +++ b/apps/web-antd/src/views/iot/ota/firmware/index.vue @@ -13,11 +13,7 @@ import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { deleteOtaFirmware, getOtaFirmwarePage } from '#/api/iot/ota/firmware'; import { $t } from '#/locales'; -import { - getProductName, - useGridColumns, - useGridFormSchema, -} from './data'; +import { getProductName, useGridColumns, useGridFormSchema } from './data'; import OtaFirmwareForm from './modules/form.vue'; const { push } = useRouter(); diff --git a/apps/web-antd/src/views/iot/product/product/modules/card-view.vue b/apps/web-antd/src/views/iot/product/product/modules/card-view.vue index 8a089e53b..d9c56e249 100644 --- a/apps/web-antd/src/views/iot/product/product/modules/card-view.vue +++ b/apps/web-antd/src/views/iot/product/product/modules/card-view.vue @@ -53,7 +53,9 @@ const queryParams = ref({ /** 获取分类名称 */ function getCategoryName(item: any) { - const category = props.categoryList.find((c: any) => c.id === item.categoryId); + const category = props.categoryList.find( + (c: any) => c.id === item.categoryId, + ); return item.categoryName || category?.name || '未分类'; } @@ -144,11 +146,7 @@ onMounted(() => { alt="" class="size-6 object-contain" /> - +
diff --git a/apps/web-antd/src/views/iot/rule/scene/form/selectors/operator-selector.vue b/apps/web-antd/src/views/iot/rule/scene/form/selectors/operator-selector.vue index b924db42a..d0106ef35 100644 --- a/apps/web-antd/src/views/iot/rule/scene/form/selectors/operator-selector.vue +++ b/apps/web-antd/src/views/iot/rule/scene/form/selectors/operator-selector.vue @@ -47,7 +47,7 @@ const allOperators = [ label: IotRuleSceneTriggerConditionParameterOperatorEnum.NOT_EQUALS.name, symbol: '≠', description: '值不相等时触发', - example: 'power != false', + example: 'power !== false', supportedTypes: [ IoTDataSpecsDataTypeEnum.INT, IoTDataSpecsDataTypeEnum.FLOAT, diff --git a/apps/web-antd/src/views/iot/rule/scene/index.vue b/apps/web-antd/src/views/iot/rule/scene/index.vue index 1d50d064c..5341a5038 100644 --- a/apps/web-antd/src/views/iot/rule/scene/index.vue +++ b/apps/web-antd/src/views/iot/rule/scene/index.vue @@ -354,9 +354,9 @@ const [Grid, gridApi] = useVbenVxeGrid({ {{ getActionSummary(row) }} -