From c52355ad8c52595542e0e9417c441156fe452a2f Mon Sep 17 00:00:00 2001 From: yin <3313488199@qq.com> Date: Wed, 15 Apr 2026 21:01:12 +0800 Subject: [PATCH] =?UTF-8?q?4=E6=9C=8815?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env.d.ts | 2 +- package.json | 7 + src/api/{system => config}/config.ts | 0 src/api/{ => dashboard}/dashboard.ts | 0 src/api/{ => index}/index.ts | 0 .../order.deliveryOrder/orderdeliveryOrder.ts | 39 + src/api/order.index/orderindex.ts | 76 + .../order.outboundOrder/orderoutboundOrder.ts | 62 + .../order.pendingOrder/orderpendingOrder.ts | 94 + src/api/order.reviewOrder/orderreviewOrder.ts | 58 + src/api/print/{station.ts => print.ts} | 0 .../printerstation.ts} | 0 src/api/profile.ts | 73 - .../{setting => setting.account}/account.ts | 2 +- .../permission.ts | 0 .../printTemplate.ts | 0 src/api/{setting => setting.role}/role.ts | 0 src/api/{ => stock}/stock.ts | 2 +- src/api/{storage => storage.entry}/entry.ts | 2 +- .../inventory.ts | 49 +- .../{storage => storage.stockout}/stockout.ts | 2 +- src/api/storage/stock.ts | 26 - src/api/storage/transaction.ts | 37 - src/api/storage/validityperiod.ts | 16 - .../receiving.ts | 2 +- src/api/{ => store}/store.ts | 0 .../storeWarehouse.ts | 0 src/api/table.ts | 9 - src/api/{ => user}/user.ts | 56 + src/api/{ => warehouse}/warehouse.ts | 0 src/components/ImagesUpload/index.vue | 2 +- src/components/RequestData/index.vue | 2 +- src/lang/index.ts | 2 +- src/stores/modules/user.ts | 4 +- src/views/admin/land/index.vue | 2 +- src/views/auth/approve.vue | 2 +- .../components/forms/createStore.vue | 2 +- .../components/forms/createWarehouse.vue | 2 +- .../dashboard/components/forms/joinStore.vue | 2 +- .../components/forms/joinWarehouse.vue | 2 +- .../dashboard/composables/useDashboard.ts | 2 +- src/views/login/index.vue | 2 +- .../order/orderManagement/archiveOrder.vue | 2 +- .../config/order-common-config.ts | 4 - .../orderManagement/deliveryException.vue | 2 +- .../order/orderManagement/deliveryOrder.vue | 236 +- .../orderManagement/entrustWarehouse.vue | 2 +- .../order/orderManagement/exceptionOrder.vue | 2 +- src/views/order/orderManagement/index.vue | 68 +- .../order/orderManagement/orderWorkbench.vue | 463 +- .../order/orderManagement/outboundOrder.vue | 255 + .../order/orderManagement/pendingOrder.vue | 170 +- .../order/orderManagement/reviewOrder.vue | 120 +- src/views/profile/components/Bind.vue | 24 +- src/views/stock/stock/component/add.vue | 2 +- src/views/stock/stock/component/barcode.vue | 2 +- src/views/stock/stock/component/erpStock.vue | 2 +- src/views/stock/stock/component/info.vue | 2 +- src/views/stock/stock/component/log.vue | 2 +- src/views/stock/stock/component/recycle.vue | 2 +- src/views/stock/stock/component/storage.vue | 2 +- .../stock/stock/component/store_stock.vue | 2 +- src/views/stock/stock/index.vue | 4 +- .../storage/entry/component/entrydetail.vue | 2 +- src/views/storage/entry/index.vue | 4 +- .../inventory/component/panelstockdetail.vue | 6 +- src/views/storage/inventory/index.vue | 6 +- src/views/storage/log/index.vue | 4 +- .../receiving/component/DetailsPanel.vue | 4 +- .../storage/receiving/component/Logs.vue | 2 +- .../storage/receiving/component/Product.vue | 4 +- .../storage/receiving/component/Storage.vue | 2 +- src/views/storage/receiving/index.vue | 10 +- .../storage/stockout/component/product.vue | 2 +- src/views/storage/stockout/index.vue | 4 +- src/views/storage/validityperiod/index.vue | 6 +- src/views/store/component/log.vue | 2 +- src/views/store/index.vue | 4 +- src/views/system/setting/account/index.vue | 4 +- src/views/system/setting/permission/index.vue | 2 +- .../setting/printStation/components/add.vue | 2 +- .../setting/printStation/components/info.vue | 2 +- .../system/setting/printStation/index.vue | 4 +- .../system/setting/printTemplate/index.vue | 2 +- src/views/system/setting/role/index.vue | 4 +- src/views/warehouse/AreaRacksList.vue | 2 +- src/views/warehouse/PathManagement.vue | 2 +- src/views/warehouse/PropertyForm.vue | 2 +- src/views/warehouse/RackPositionEditor.vue | 2 +- src/views/warehouse/RackSpaceManagement.vue | 2 +- src/views/warehouse/SpaceForm.vue | 2 +- src/views/warehouse/SpaceList.vue | 2 +- src/views/warehouse/WarehouseDialog.vue | 2 +- src/views/warehouse/ZoneDialog.vue | 2 +- src/views/warehouse/index.vue | 2 +- src/views/warehouse/zone.vue | 2 +- src/views/warehouse/zoneInfo.vue | 2 +- src/需求文档.txt | 1058 +- workflows/api-doc-agent/README.md | 71 + workflows/api-doc-agent/config/scripts.mjs | 20 + workflows/api-doc-agent/config/接口.md | 235 + .../api-doc-agent/config/新增模块和接口.md | 3 + workflows/api-doc-agent/docs/接口.md | 235 + .../api-doc-agent/docs/新增模块和接口.md | 3 + .../results/20260415/api-list-update.json | 2110 ++++ .../results/20260415/config.list.json | 26 + workflows/api-doc-agent/run.mjs | 57 + .../scripts/api-list-update/config.mjs | 12 + .../scripts/api-list-update/run.mjs | 332 + .../scripts/interface-availability/config.mjs | 16 + .../20260415/storage.receiving.bindstore.json | 15 + .../scripts/interface-availability/run.mjs | 181 + workflows/api-doc-system/README.md | 95 + workflows/api-doc-system/cleanup-marked.mjs | 188 + workflows/api-doc-system/clear-pending.mjs | 65 + workflows/api-doc-system/config.mjs | 27 + .../interface-details/20260415.json | 8766 +++++++++++++++++ .../api-doc-system/module-list/20260415.json | 2513 +++++ .../module/config/20260415.json | 62 + .../module/config/_module.lifecycle.json | 19 + .../module/dashboard/20260415.json | 177 + .../module/dashboard/_module.lifecycle.json | 19 + .../api-doc-system/module/index/20260415.json | 459 + .../module/index/_module.lifecycle.json | 19 + .../module/order.archiveorder/20260415.json | 94 + .../order.archiveorder/_module.lifecycle.json | 19 + .../20260415.json | 94 + .../_module.lifecycle.json | 19 + .../module/order.deliveryorder/20260415.json | 94 + .../_module.lifecycle.json | 19 + .../module/order.entrustorder/20260415.json | 94 + .../order.entrustorder/_module.lifecycle.json | 19 + .../module/order.expectionorder/20260415.json | 94 + .../_module.lifecycle.json | 19 + .../module/order.index/20260415.json | 263 + .../module/order.index/_module.lifecycle.json | 19 + .../module/order.outboundorder/20260415.json | 191 + .../_module.lifecycle.json | 19 + .../module/order.pendingorder/20260415.json | 301 + .../order.pendingorder/_module.lifecycle.json | 19 + .../module/order.revieworder/20260415.json | 161 + .../order.revieworder/_module.lifecycle.json | 19 + .../api-doc-system/module/print/20260415.json | 494 + .../module/print/_module.lifecycle.json | 19 + .../module/printer.station/20260415.json | 62 + .../printer.station/_module.lifecycle.json | 19 + .../module/setting.account/20260415.json | 433 + .../setting.account/_module.lifecycle.json | 19 + .../module/setting.permission/20260415.json | 195 + .../setting.permission/_module.lifecycle.json | 19 + .../setting.printtemplate/20260415.json | 213 + .../_module.lifecycle.json | 19 + .../module/setting.role/20260415.json | 219 + .../setting.role/_module.lifecycle.json | 19 + .../api-doc-system/module/stock/20260415.json | 716 ++ .../module/stock/_module.lifecycle.json | 19 + .../module/storage.entry/20260415.json | 229 + .../storage.entry/_module.lifecycle.json | 19 + .../module/storage.inventory/20260415.json | 297 + .../storage.inventory/_module.lifecycle.json | 19 + .../module/storage.stockout/20260415.json | 192 + .../storage.stockout/_module.lifecycle.json | 19 + .../module/storage_receiving/20260415.json | 766 ++ .../storage_receiving/_module.lifecycle.json | 19 + .../api-doc-system/module/store/20260415.json | 265 + .../module/store/_module.lifecycle.json | 19 + .../module/storewarehouse.store/20260415.json | 700 ++ .../_module.lifecycle.json | 19 + .../api-doc-system/module/user/20260415.json | 276 + .../module/user/_module.lifecycle.json | 19 + .../module/warehouse/20260415.json | 889 ++ .../module/warehouse/_module.lifecycle.json | 19 + .../pending-history/20260415174926.json | 1776 ++++ workflows/api-doc-system/pending-updates.json | 2 + workflows/api-doc-system/update.mjs | 1137 +++ 175 files changed, 28620 insertions(+), 980 deletions(-) rename src/api/{system => config}/config.ts (100%) rename src/api/{ => dashboard}/dashboard.ts (100%) rename src/api/{ => index}/index.ts (100%) create mode 100644 src/api/order.deliveryOrder/orderdeliveryOrder.ts create mode 100644 src/api/order.index/orderindex.ts create mode 100644 src/api/order.outboundOrder/orderoutboundOrder.ts create mode 100644 src/api/order.pendingOrder/orderpendingOrder.ts create mode 100644 src/api/order.reviewOrder/orderreviewOrder.ts rename src/api/print/{station.ts => print.ts} (100%) rename src/api/{printer.ts => printer.station/printerstation.ts} (100%) delete mode 100644 src/api/profile.ts rename src/api/{setting => setting.account}/account.ts (99%) rename src/api/{setting => setting.permission}/permission.ts (100%) rename src/api/{ => setting.printTemplate}/printTemplate.ts (100%) rename src/api/{setting => setting.role}/role.ts (100%) rename src/api/{ => stock}/stock.ts (99%) rename src/api/{storage => storage.entry}/entry.ts (99%) rename src/api/{storage => storage.inventory}/inventory.ts (54%) rename src/api/{storage => storage.stockout}/stockout.ts (99%) delete mode 100644 src/api/storage/stock.ts delete mode 100644 src/api/storage/transaction.ts delete mode 100644 src/api/storage/validityperiod.ts rename src/api/{storage => storage_receiving}/receiving.ts (99%) rename src/api/{ => store}/store.ts (100%) rename src/api/{ => storeWarehouse.store}/storeWarehouse.ts (100%) delete mode 100644 src/api/table.ts rename src/api/{ => user}/user.ts (53%) rename src/api/{ => warehouse}/warehouse.ts (100%) create mode 100644 src/views/order/orderManagement/outboundOrder.vue create mode 100644 workflows/api-doc-agent/README.md create mode 100644 workflows/api-doc-agent/config/scripts.mjs create mode 100644 workflows/api-doc-agent/config/接口.md create mode 100644 workflows/api-doc-agent/config/新增模块和接口.md create mode 100644 workflows/api-doc-agent/docs/接口.md create mode 100644 workflows/api-doc-agent/docs/新增模块和接口.md create mode 100644 workflows/api-doc-agent/results/20260415/api-list-update.json create mode 100644 workflows/api-doc-agent/results/20260415/config.list.json create mode 100644 workflows/api-doc-agent/run.mjs create mode 100644 workflows/api-doc-agent/scripts/api-list-update/config.mjs create mode 100644 workflows/api-doc-agent/scripts/api-list-update/run.mjs create mode 100644 workflows/api-doc-agent/scripts/interface-availability/config.mjs create mode 100644 workflows/api-doc-agent/scripts/interface-availability/results/20260415/storage.receiving.bindstore.json create mode 100644 workflows/api-doc-agent/scripts/interface-availability/run.mjs create mode 100644 workflows/api-doc-system/README.md create mode 100644 workflows/api-doc-system/cleanup-marked.mjs create mode 100644 workflows/api-doc-system/clear-pending.mjs create mode 100644 workflows/api-doc-system/config.mjs create mode 100644 workflows/api-doc-system/interface-details/20260415.json create mode 100644 workflows/api-doc-system/module-list/20260415.json create mode 100644 workflows/api-doc-system/module/config/20260415.json create mode 100644 workflows/api-doc-system/module/config/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/dashboard/20260415.json create mode 100644 workflows/api-doc-system/module/dashboard/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/index/20260415.json create mode 100644 workflows/api-doc-system/module/index/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/order.archiveorder/20260415.json create mode 100644 workflows/api-doc-system/module/order.archiveorder/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/order.deliveryexpectionorder/20260415.json create mode 100644 workflows/api-doc-system/module/order.deliveryexpectionorder/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/order.deliveryorder/20260415.json create mode 100644 workflows/api-doc-system/module/order.deliveryorder/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/order.entrustorder/20260415.json create mode 100644 workflows/api-doc-system/module/order.entrustorder/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/order.expectionorder/20260415.json create mode 100644 workflows/api-doc-system/module/order.expectionorder/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/order.index/20260415.json create mode 100644 workflows/api-doc-system/module/order.index/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/order.outboundorder/20260415.json create mode 100644 workflows/api-doc-system/module/order.outboundorder/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/order.pendingorder/20260415.json create mode 100644 workflows/api-doc-system/module/order.pendingorder/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/order.revieworder/20260415.json create mode 100644 workflows/api-doc-system/module/order.revieworder/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/print/20260415.json create mode 100644 workflows/api-doc-system/module/print/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/printer.station/20260415.json create mode 100644 workflows/api-doc-system/module/printer.station/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/setting.account/20260415.json create mode 100644 workflows/api-doc-system/module/setting.account/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/setting.permission/20260415.json create mode 100644 workflows/api-doc-system/module/setting.permission/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/setting.printtemplate/20260415.json create mode 100644 workflows/api-doc-system/module/setting.printtemplate/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/setting.role/20260415.json create mode 100644 workflows/api-doc-system/module/setting.role/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/stock/20260415.json create mode 100644 workflows/api-doc-system/module/stock/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/storage.entry/20260415.json create mode 100644 workflows/api-doc-system/module/storage.entry/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/storage.inventory/20260415.json create mode 100644 workflows/api-doc-system/module/storage.inventory/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/storage.stockout/20260415.json create mode 100644 workflows/api-doc-system/module/storage.stockout/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/storage_receiving/20260415.json create mode 100644 workflows/api-doc-system/module/storage_receiving/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/store/20260415.json create mode 100644 workflows/api-doc-system/module/store/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/storewarehouse.store/20260415.json create mode 100644 workflows/api-doc-system/module/storewarehouse.store/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/user/20260415.json create mode 100644 workflows/api-doc-system/module/user/_module.lifecycle.json create mode 100644 workflows/api-doc-system/module/warehouse/20260415.json create mode 100644 workflows/api-doc-system/module/warehouse/_module.lifecycle.json create mode 100644 workflows/api-doc-system/pending-history/20260415174926.json create mode 100644 workflows/api-doc-system/pending-updates.json create mode 100644 workflows/api-doc-system/update.mjs diff --git a/env.d.ts b/env.d.ts index ae5c9124..ff7cb8a1 100644 --- a/env.d.ts +++ b/env.d.ts @@ -4,7 +4,7 @@ declare module '@/utils/auth' { export function setToken(token: string): void export function removeToken(): void } -declare module '@/api/user' { +declare module '@/api/user/user' { export function login(data: any): Promise export function getInfo(data: any): Promise export function changeRole(data: any): Promise diff --git a/package.json b/package.json index 48581eeb..c1cfc004 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,13 @@ "build-only": "vite build", "type-check": "vue-tsc --build", "update": "node ./workflows/api-doc-sync/update.mjs", + "apiconfig": "node ./workflows/api-doc-system/update.mjs", + "apiconfig:clear-pending": "node ./workflows/api-doc-system/clear-pending.mjs", + "apiconfig:clean-marked": "node ./workflows/api-doc-system/cleanup-marked.mjs", + "apiconfig:api-list-update": "node ./workflows/api-doc-system/api-list-update.mjs", + "apiconfig:api-interface-update": "node ./workflows/api-doc-system/api-interface-update.mjs", + "apiconfig:api-interface-clean": "node ./workflows/api-doc-system/api-interface-clean.mjs", + "apiagent": "node ./workflows/api-doc-agent/run.mjs", "lint": "eslint . --cache", "lint:fix": "eslint . --cache --fix", "format": "prettier . --write", diff --git a/src/api/system/config.ts b/src/api/config/config.ts similarity index 100% rename from src/api/system/config.ts rename to src/api/config/config.ts diff --git a/src/api/dashboard.ts b/src/api/dashboard/dashboard.ts similarity index 100% rename from src/api/dashboard.ts rename to src/api/dashboard/dashboard.ts diff --git a/src/api/index.ts b/src/api/index/index.ts similarity index 100% rename from src/api/index.ts rename to src/api/index/index.ts diff --git a/src/api/order.deliveryOrder/orderdeliveryOrder.ts b/src/api/order.deliveryOrder/orderdeliveryOrder.ts new file mode 100644 index 00000000..bc8727e8 --- /dev/null +++ b/src/api/order.deliveryOrder/orderdeliveryOrder.ts @@ -0,0 +1,39 @@ +import request from '@/utils/request' + +const v = '1.0' + +export type OrderWhere = Record +export type OrderSort = { + sortField?: string + sortOrder?: 'asc' | 'desc' | 'ASC' | 'DESC' + field?: string + order?: 'asc' | 'desc' | 'ASC' | 'DESC' +} +export type OrderPagination = { + page?: number + pageSize?: number +} + +export type DeliveryOrderListParams = { + pagination?: OrderPagination + where?: OrderWhere + sort?: OrderSort +} + +export function orderDeliveryOrderList(data: DeliveryOrderListParams = {}): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.deliveryOrder.list', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +export const orderDeliveryOrder = { + list: orderDeliveryOrderList +} diff --git a/src/api/order.index/orderindex.ts b/src/api/order.index/orderindex.ts new file mode 100644 index 00000000..b27c26cd --- /dev/null +++ b/src/api/order.index/orderindex.ts @@ -0,0 +1,76 @@ +import request from '@/utils/request' + +const v = '1.0' + +export type OrderListParams = { + pagination?: { + page?: number + pageSize?: number + currentPage?: number + page_size?: number + size?: number + } + where?: Record + sort?: { + sortField?: string + sortOrder?: 'asc' | 'desc' | 'ASC' | 'DESC' + field?: string + order?: 'asc' | 'desc' | 'ASC' | 'DESC' + } +} + +export type ManualOutboundParams = { + warehouseId?: number + warehouse_id?: number + warehouseIds?: number[] + queryTimeoutMs?: number + executionTimeoutMs?: number +} + +export function orderList(data: OrderListParams = {}): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.list', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +export function orderManualOutboundOrder(data: ManualOutboundParams = {}): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.manualOutboundOrder', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +export function orderBadgeCount(): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.badgeCount', + v, + timestamp: new Date().getTime() + }, + data: {}, + isSystemApi: true + } as any) +} + +export const order = { + list: orderList, + manualOutboundOrder: orderManualOutboundOrder, + badgeCount: orderBadgeCount +} diff --git a/src/api/order.outboundOrder/orderoutboundOrder.ts b/src/api/order.outboundOrder/orderoutboundOrder.ts new file mode 100644 index 00000000..639d4fd9 --- /dev/null +++ b/src/api/order.outboundOrder/orderoutboundOrder.ts @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +const v = '1.0' + +export type OrderWhere = Record +export type OrderSort = { + sortField?: string + sortOrder?: 'asc' | 'desc' | 'ASC' | 'DESC' + field?: string + order?: 'asc' | 'desc' | 'ASC' | 'DESC' +} +export type OrderPagination = { + page?: number + pageSize?: number +} + +export type OutboundOrderListParams = { + pagination?: OrderPagination + where?: OrderWhere + sort?: OrderSort +} + +export type ManualOutboundParams = { + warehouseId?: number + warehouse_id?: number + warehouseIds?: number[] + queryTimeoutMs?: number + executionTimeoutMs?: number +} + +export function orderOutboundOrderList(data: OutboundOrderListParams = {}): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.outboundOrder.list', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +export function orderOutboundOrderManualOutboundOrder(data: ManualOutboundParams = {}): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.outboundOrder.manualOutboundOrder', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +export const orderOutboundOrder = { + list: orderOutboundOrderList, + manualOutboundOrder: orderOutboundOrderManualOutboundOrder +} diff --git a/src/api/order.pendingOrder/orderpendingOrder.ts b/src/api/order.pendingOrder/orderpendingOrder.ts new file mode 100644 index 00000000..7ff1c50a --- /dev/null +++ b/src/api/order.pendingOrder/orderpendingOrder.ts @@ -0,0 +1,94 @@ +import request from '@/utils/request' + +const v = '1.0' + +export type OrderWhere = Record +export type OrderSort = { + sortField?: string + sortOrder?: 'asc' | 'desc' | 'ASC' | 'DESC' + field?: string + order?: 'asc' | 'desc' | 'ASC' | 'DESC' +} +export type OrderPagination = { + page?: number + pageSize?: number +} + +export type PendingOrderListParams = { + pagination?: OrderPagination + where?: OrderWhere + sort?: OrderSort +} + +export type PendingOrderIdsParams = { + ids: Array +} + +export type PendingOrderReverseReviewParams = { + ids?: Array + id?: number | string + order_id?: number | string +} + +export function orderPendingOrderList(data: PendingOrderListParams = {}): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.pendingOrder.list', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +export function orderPendingOrderReverseReviewOrder(data: PendingOrderReverseReviewParams): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.pendingOrder.reverseReviewOrder', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +export function orderPendingOrderMarkPendingOutboundOrder(data: PendingOrderIdsParams): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.pendingOrder.markPendingOutboundOrder', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +export function orderPendingOrderCancelOrder(data: PendingOrderIdsParams): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.pendingOrder.cancelOrder', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +export const orderPendingOrder = { + list: orderPendingOrderList, + reverseReviewOrder: orderPendingOrderReverseReviewOrder, + markPendingOutboundOrder: orderPendingOrderMarkPendingOutboundOrder, + cancelOrder: orderPendingOrderCancelOrder +} diff --git a/src/api/order.reviewOrder/orderreviewOrder.ts b/src/api/order.reviewOrder/orderreviewOrder.ts new file mode 100644 index 00000000..d62c1010 --- /dev/null +++ b/src/api/order.reviewOrder/orderreviewOrder.ts @@ -0,0 +1,58 @@ +import request from '@/utils/request' + +const v = '1.0' + +export type OrderWhere = Record +export type OrderSort = { + sortField?: string + sortOrder?: 'asc' | 'desc' | 'ASC' | 'DESC' + field?: string + order?: 'asc' | 'desc' | 'ASC' | 'DESC' +} +export type OrderPagination = { + page?: number + pageSize?: number +} + +export type ReviewOrderListParams = { + pagination?: OrderPagination + where?: OrderWhere + sort?: OrderSort +} + +export type ReviewOrderSubmitParams = { + ids: Array +} + +export function orderReviewOrderList(data: ReviewOrderListParams = {}): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.reviewOrder.list', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +export function orderReviewOrderReviewOrder(data: ReviewOrderSubmitParams): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.reviewOrder.reviewOrder', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +export const orderReviewOrder = { + list: orderReviewOrderList, + reviewOrder: orderReviewOrderReviewOrder +} diff --git a/src/api/print/station.ts b/src/api/print/print.ts similarity index 100% rename from src/api/print/station.ts rename to src/api/print/print.ts diff --git a/src/api/printer.ts b/src/api/printer.station/printerstation.ts similarity index 100% rename from src/api/printer.ts rename to src/api/printer.station/printerstation.ts diff --git a/src/api/profile.ts b/src/api/profile.ts deleted file mode 100644 index 9b67a773..00000000 --- a/src/api/profile.ts +++ /dev/null @@ -1,73 +0,0 @@ -import request from '@/utils/request' -const v = "1.0"; - -/** 获取账号绑定基础信息(页面初始化用) */ -export const getBindInfo = () => { - return request({ - url: '/system', - method: 'post', - params: { - method: 'account.getBindInfo', - v, - timestamp: new Date().getTime() - }, - data: {}, - isSystemApi: true - } as any) -} - -export interface BindWechatCodeParams { - /** 是否强制刷新状态,true 时跳过缓存等待窗口 */ - forceRefresh?: boolean - /** 是否显式开启长轮询等待;true 时进入最长 60 秒等待 */ - waitForChange?: boolean - /** 长轮询开关(兼容字段);true 时进入最长 60 秒等待 */ - longPoll?: boolean - /** 等待超时毫秒数;后端自动封顶 60000 */ - waitTimeoutMs?: number - /** 初始化请求标记;true 时强制立即返回,不进入长等待 */ - init?: boolean -} - -/** - * 获取微信绑定二维码及轮询状态 - * 支持长轮询:longPoll/waitForChange=true 时服务端最长等待 60 秒 - * 初始化调用时传 init:true,服务端立即返回二维码数据 - * 返回: { status: 'waiting'|'scanned'|'bound'|'expired', code, qrUrl, nickname, openid } - */ -export const getBindWechatCode = (params?: BindWechatCodeParams) => { - const isLongPoll = params?.longPoll || params?.waitForChange - const waitMs = params?.waitTimeoutMs ?? (isLongPoll ? 60000 : 0) - // HTTP 超时需大于后端等待时长 - const httpTimeout = isLongPoll ? Math.max(waitMs, 60000) + 10000 : 15000 - return request({ - url: '/system', - method: 'post', - params: { - method: 'user.getBindWechatCode', - v, - timestamp: new Date().getTime() - }, - data: params ?? {}, - isSystemApi: true, - timeout: httpTimeout - } as any) -} - -/** - * 解绑微信 - * 删除 ye4s 数据库中的绑定关联记录,并清除缓存 - */ -export const unbindWechat = () => { - return request({ - url: '/system', - method: 'post', - params: { - method: 'user.unbindWechat', - v, - timestamp: new Date().getTime() - }, - data: {}, - isSystemApi: true - } as any) -} \ No newline at end of file diff --git a/src/api/setting/account.ts b/src/api/setting.account/account.ts similarity index 99% rename from src/api/setting/account.ts rename to src/api/setting.account/account.ts index 53760897..62257cfb 100644 --- a/src/api/setting/account.ts +++ b/src/api/setting.account/account.ts @@ -115,4 +115,4 @@ export function unbindWechat(data: { user_id: number }) { }, data }) -} \ No newline at end of file +} diff --git a/src/api/setting/permission.ts b/src/api/setting.permission/permission.ts similarity index 100% rename from src/api/setting/permission.ts rename to src/api/setting.permission/permission.ts diff --git a/src/api/printTemplate.ts b/src/api/setting.printTemplate/printTemplate.ts similarity index 100% rename from src/api/printTemplate.ts rename to src/api/setting.printTemplate/printTemplate.ts diff --git a/src/api/setting/role.ts b/src/api/setting.role/role.ts similarity index 100% rename from src/api/setting/role.ts rename to src/api/setting.role/role.ts diff --git a/src/api/stock.ts b/src/api/stock/stock.ts similarity index 99% rename from src/api/stock.ts rename to src/api/stock/stock.ts index df697f87..7e4838ca 100644 --- a/src/api/stock.ts +++ b/src/api/stock/stock.ts @@ -358,4 +358,4 @@ export function warehouseSearch(data: { data, isSystemApi: true } as any) -} \ No newline at end of file +} diff --git a/src/api/storage/entry.ts b/src/api/storage.entry/entry.ts similarity index 99% rename from src/api/storage/entry.ts rename to src/api/storage.entry/entry.ts index 88b3e874..d1044c51 100644 --- a/src/api/storage/entry.ts +++ b/src/api/storage.entry/entry.ts @@ -69,4 +69,4 @@ export function deleteDetail(data:any): Promise { export function detailChange(data:any): Promise { return Promise.reject(new Error('storage.entry.detailChange 已下线,入库单明细不再对外编辑')) -} \ No newline at end of file +} diff --git a/src/api/storage/inventory.ts b/src/api/storage.inventory/inventory.ts similarity index 54% rename from src/api/storage/inventory.ts rename to src/api/storage.inventory/inventory.ts index 5cec2f90..b3498ef7 100644 --- a/src/api/storage/inventory.ts +++ b/src/api/storage.inventory/inventory.ts @@ -68,6 +68,53 @@ export function transferLocation(data:any) { isSystemApi: true } as any) } + +/** + * 出入库记录列表查询 + * 支持where条件、分页、排序、批次分组切换。 + * 默认按库位合并数量(合并模式),group_by_batch=true时返回每条明细(明细模式) + */ +export function getTransactionList(data: { + /** 统一where条件对象,可用字段:transaction_type(INBOUND/OUTBOUND)、stock_id、space_id、store_id、order_type(SCRK/MATCH)、order_no、inventory_type(ZP/CC/JS/XS/ZT/DJ/FP)、operator_name、created_at(支持between) */ + where?: Record + /** 分页参数,默认page=1, pageSize=20 */ + pagination?: { + page?: number + pageSize?: number + } + /** 排序参数,默认sortField='created_at', sortOrder='DESC' */ + sort?: { + sortField?: string + sortOrder?: string + } + /** 是否按批次查询,默认false。false=合并模式(按库位+商品聚合),true=明细模式(逐条返回) */ + group_by_batch?: boolean +}): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storage.transaction.list', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +export function getExpiryList(data: any): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storage.expiry.list', + v, + timestamp: new Date().getTime() + }, + data + }) +} // export function transaction(data:any) { // return request({ // url: '/system', @@ -80,4 +127,4 @@ export function transferLocation(data:any) { // data, // isSystemApi: true // } as any) -// } \ No newline at end of file +// } diff --git a/src/api/storage/stockout.ts b/src/api/storage.stockout/stockout.ts similarity index 99% rename from src/api/storage/stockout.ts rename to src/api/storage.stockout/stockout.ts index 89769cfb..334e2b60 100644 --- a/src/api/storage/stockout.ts +++ b/src/api/storage.stockout/stockout.ts @@ -29,4 +29,4 @@ export const stockoutListItems = (data: { }, data: data }) -} \ No newline at end of file +} diff --git a/src/api/storage/stock.ts b/src/api/storage/stock.ts deleted file mode 100644 index 2f8e18a9..00000000 --- a/src/api/storage/stock.ts +++ /dev/null @@ -1,26 +0,0 @@ -import request from '@/utils/request' -const v = "1.0" - -export const getinventoryList = (params: any) => { - return request({ - url: `/api/storage/stock/list`, - method: 'get', - params: { - method: 'storage.stock.getProductstockList', - version: v, - } - }) -} - -// 未使用,保留 -export const getinventoryDetail = (data: any) => { - return request({ - url: `/api/storage/stock/detail`, - method: 'get', - params: { - method: 'storage.stock.getProductstockDetail', - version: v, - ...data - } - }) -} \ No newline at end of file diff --git a/src/api/storage/transaction.ts b/src/api/storage/transaction.ts deleted file mode 100644 index 35efa7e2..00000000 --- a/src/api/storage/transaction.ts +++ /dev/null @@ -1,37 +0,0 @@ -import request from '@/utils/request' - -const v = "1.0" - -/** - * 出入库记录列表查询 - * 支持where条件、分页、排序、批次分组切换。 - * 默认按库位合并数量(合并模式),group_by_batch=true时返回每条明细(明细模式) - */ -export function getTransactionList(data: { - /** 统一where条件对象,可用字段:transaction_type(INBOUND/OUTBOUND)、stock_id、space_id、store_id、order_type(SCRK/MATCH)、order_no、inventory_type(ZP/CC/JS/XS/ZT/DJ/FP)、operator_name、created_at(支持between) */ - where?: Record - /** 分页参数,默认page=1, pageSize=20 */ - pagination?: { - page?: number - pageSize?: number - } - /** 排序参数,默认sortField='created_at', sortOrder='DESC' */ - sort?: { - sortField?: string - sortOrder?: string - } - /** 是否按批次查询,默认false。false=合并模式(按库位+商品聚合),true=明细模式(逐条返回) */ - group_by_batch?: boolean -}): Promise { - return request({ - url: '/system', - method: 'post', - params: { - method: 'storage.transaction.list', - v, - timestamp: new Date().getTime() - }, - data, - isSystemApi: true - } as any) -} diff --git a/src/api/storage/validityperiod.ts b/src/api/storage/validityperiod.ts deleted file mode 100644 index c94fffe9..00000000 --- a/src/api/storage/validityperiod.ts +++ /dev/null @@ -1,16 +0,0 @@ -import request from '@/utils/request' - -const v = '1.0' - -export function getExpiryList(data: any): Promise { - return request({ - url: '/system', - method: 'post', - params: { - method: 'storage.expiry.list', - v, - timestamp: new Date().getTime() - }, - data - }) -} diff --git a/src/api/storage/receiving.ts b/src/api/storage_receiving/receiving.ts similarity index 99% rename from src/api/storage/receiving.ts rename to src/api/storage_receiving/receiving.ts index 746f5e80..abf2c0cc 100644 --- a/src/api/storage/receiving.ts +++ b/src/api/storage_receiving/receiving.ts @@ -283,4 +283,4 @@ export function quickPutaway(data: { data, isSystemApi: true } as any) -} \ No newline at end of file +} diff --git a/src/api/store.ts b/src/api/store/store.ts similarity index 100% rename from src/api/store.ts rename to src/api/store/store.ts diff --git a/src/api/storeWarehouse.ts b/src/api/storeWarehouse.store/storeWarehouse.ts similarity index 100% rename from src/api/storeWarehouse.ts rename to src/api/storeWarehouse.store/storeWarehouse.ts diff --git a/src/api/table.ts b/src/api/table.ts deleted file mode 100644 index 03e4c866..00000000 --- a/src/api/table.ts +++ /dev/null @@ -1,9 +0,0 @@ -import request from '@/utils/request' - -export function getList(params: any) { - return request({ - url: '/vue-admin-template/table/list', - method: 'get', - params - }) -} diff --git a/src/api/user.ts b/src/api/user/user.ts similarity index 53% rename from src/api/user.ts rename to src/api/user/user.ts index d79b98b0..246a8d14 100644 --- a/src/api/user.ts +++ b/src/api/user/user.ts @@ -95,3 +95,59 @@ export function logout(data?: Record) { isSystemApi: true } as SystemApiRequestConfig>); } + +export interface BindWechatCodeParams { + /** 是否强制刷新状态,true 时跳过缓存等待窗口 */ + forceRefresh?: boolean + /** 是否显式开启长轮询等待;true 时进入最长 60 秒等待 */ + waitForChange?: boolean + /** 长轮询开关(兼容字段);true 时进入最长 60 秒等待 */ + longPoll?: boolean + /** 等待超时毫秒数;后端自动封顶 60000 */ + waitTimeoutMs?: number + /** 初始化请求标记;true 时强制立即返回,不进入长等待 */ + init?: boolean +} + +/** + * 获取微信绑定二维码及轮询状态 + * 支持长轮询:longPoll/waitForChange=true 时服务端最长等待 60 秒 + * 初始化调用时传 init:true,服务端立即返回二维码数据 + * 返回: { status: 'waiting'|'scanned'|'bound'|'expired', code, qrUrl, nickname, openid } + */ +export const getBindWechatCode = (params?: BindWechatCodeParams) => { + const isLongPoll = params?.longPoll || params?.waitForChange + const waitMs = params?.waitTimeoutMs ?? (isLongPoll ? 60000 : 0) + // HTTP 超时需大于后端等待时长 + const httpTimeout = isLongPoll ? Math.max(waitMs, 60000) + 10000 : 15000 + return request({ + url: '/system', + method: 'post', + params: { + method: 'user.getBindWechatCode', + v: '1.0', + timestamp: new Date().getTime() + }, + data: params ?? {}, + isSystemApi: true, + timeout: httpTimeout + } as SystemApiRequestConfig) +} + +/** + * 解绑微信 + * 删除 ye4s 数据库中的绑定关联记录,并清除缓存 + */ +export const unbindWechat = () => { + return request({ + url: '/system', + method: 'post', + params: { + method: 'user.unbindWechat', + v: '1.0', + timestamp: new Date().getTime() + }, + data: {}, + isSystemApi: true + } as SystemApiRequestConfig>) +} diff --git a/src/api/warehouse.ts b/src/api/warehouse/warehouse.ts similarity index 100% rename from src/api/warehouse.ts rename to src/api/warehouse/warehouse.ts diff --git a/src/components/ImagesUpload/index.vue b/src/components/ImagesUpload/index.vue index e6d984b9..dc37158e 100644 --- a/src/components/ImagesUpload/index.vue +++ b/src/components/ImagesUpload/index.vue @@ -113,7 +113,7 @@ import { ref, reactive, watch, onMounted, onBeforeUnmount } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { Plus, Camera, CameraFilled } from '@element-plus/icons-vue' -import * as indexApi from '@/api/index' +import * as indexApi from '@/api/index/index' import SparkMD5 from 'spark-md5' import { useUserStore } from '@/stores/modules/user' diff --git a/src/components/RequestData/index.vue b/src/components/RequestData/index.vue index bcfed5eb..3eb23cbe 100644 --- a/src/components/RequestData/index.vue +++ b/src/components/RequestData/index.vue @@ -82,7 +82,7 @@ diff --git a/src/views/order/orderManagement/outboundOrder.vue b/src/views/order/orderManagement/outboundOrder.vue new file mode 100644 index 00000000..609d2ec2 --- /dev/null +++ b/src/views/order/orderManagement/outboundOrder.vue @@ -0,0 +1,255 @@ + + + + + diff --git a/src/views/order/orderManagement/pendingOrder.vue b/src/views/order/orderManagement/pendingOrder.vue index f91f63d8..7b68caac 100644 --- a/src/views/order/orderManagement/pendingOrder.vue +++ b/src/views/order/orderManagement/pendingOrder.vue @@ -16,40 +16,9 @@
刷新 - 批量下发 - - + 反审回待审核 + 标记待出库 + 取消订单
@@ -92,12 +61,6 @@ - - - - @@ -135,8 +121,7 @@ import { ref, reactive, onMounted, computed } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import ScanBox from '@/components/ScanBox/index.vue' import UpperTable from '@/components/UpperTable/index.vue' -import * as indexApi from '@/api/index' -import { getreviewOrderlist, reviewOrder } from '@/api/order/order' +import { orderReviewOrder } from '@/api/order.reviewOrder/orderreviewOrder' import { reviewAvailableFields, @@ -146,7 +131,6 @@ import { } from './config/order-common-config' import detail from './component/detail.vue' import log from './component/log.vue' -import OrderReviewDialog from './component/OrderReviewDialog.vue' const scanBox = ref(null) const upperTable = ref(null) @@ -158,7 +142,6 @@ const activeTab = ref('details') const list = ref([]) const loading = ref(false) -const exportLoading = ref(false) const queryTime = ref(0) const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 }) @@ -169,9 +152,7 @@ const columns = ref(reviewColums) const selectionRows = ref([]) const hasSelection = ref(false) const selectedOrderId = ref(null) -const reviewDialogVisible = ref(false) const reviewSubmitting = ref(false) -const reviewTargets = ref([]) const quickSearch = ref('') @@ -179,22 +160,12 @@ const selectedRow = computed(() => { return list.value.find((i: any) => i.id === selectedOrderId.value) || null }) -function translateField(fieldValue: string, value: any) { - const field = availableFieldsRef.find((f: any) => f.value === fieldValue) - if (field && field.options) { - const option = field.options.find((opt: any) => opt.value === value) - return option ? option.label : value - } - return value -} - function getStatusType(status: string) { return status === 'AUDITED' ? 'success' : 'warning' } onMounted(() => { loadData() - loadFilterData() }) async function loadData() { @@ -220,7 +191,7 @@ async function loadData() { } try { - const res = await getreviewOrderlist(queryParams) + const res = await orderReviewOrder.list(queryParams) if (res && (res.code === 1 || res.code === 200) && res.data) { list.value = res.data.list || [] pagination.total = res.data.pagination?.total || res.data.total || 0 @@ -257,22 +228,6 @@ function buildWhereConditions(rawConditions: Record) { return where } -async function loadFilterData() { - try { - const [storesRes, presetRes]: any = await Promise.all([ - indexApi.loadStores({ type: 'order' }), - indexApi.fastWhereTree('order') - ]) - if (storesRes?.code === 200) { - const f = availableFieldsRef.find((i: any) => i.value === 'store_id') - if (f) f.options = storesRes.stores || [] - } - if (presetRes?.code === 200) { - presetTree.value = presetRes.presetTree || [] - } - } catch (e) {} -} - function handleConditionChange() { pagination.currentPage = 1 loadData() @@ -314,47 +269,25 @@ function onQuickSearch() { loadData() } -function openReviewDialog(rows: any[]) { - const targets = (rows || []).filter((item: any) => item?.id || item?.delivery_order_code) - if (!targets.length) { +async function submitReview(ids: Array) { + if (!ids.length) { ElMessage.warning('请先选择需要审核的订单') return } - reviewTargets.value = targets - reviewDialogVisible.value = true -} - -async function handleSubmitReview(payload: { review_status: string; operator_name: string; operate_time: string }) { if (reviewSubmitting.value) return reviewSubmitting.value = true + try { - const results = await Promise.all( - reviewTargets.value.map((order) => - reviewOrder({ - id: order.id, - delivery_order_code: order.delivery_order_code, - review_status: payload.review_status, - inspection_status: payload.review_status, - operator_name: payload.operator_name, - operate_time: payload.operate_time - }) - ) - ) - - const successCount = results.filter((res) => res && (res.code === 1 || res.code === 200)).length - const failCount = results.length - successCount - - if (successCount > 0) { - ElMessage.success(`审核成功 ${successCount} 条${failCount > 0 ? `,失败 ${failCount} 条` : ''}`) - reviewDialogVisible.value = false - reviewTargets.value = [] + const res = await orderReviewOrder.reviewOrder({ ids }) + if (res && (res.code === 1 || res.code === 200)) { + ElMessage.success(`审核成功 ${res.data?.updated_count || ids.length} 条`) upperTable.value?.clearSelection?.() selectionRows.value = [] hasSelection.value = false - loadData() - return + await loadData() + } else { + ElMessage.error(res?.message || '订单审核失败,请稍后重试') } - ElMessage.error('订单审核失败,请稍后重试') } catch (error) { ElMessage.error('订单审核失败,请稍后重试') } finally { @@ -362,20 +295,27 @@ async function handleSubmitReview(payload: { review_status: string; operator_nam } } -async function confirmBatchCancel() { +async function handleBatchReview() { + const ids = selectionRows.value.map((item: any) => item?.id).filter((id: any) => id !== undefined && id !== null) + if (!ids.length) { + ElMessage.warning('请先选择需要审核的订单') + return + } try { - await ElMessageBox.confirm(`确定要拦截选中的订单吗?`, '警告', { type: 'error' }) - ElMessage.success('操作成功') - loadData() + await ElMessageBox.confirm(`确定审核通过选中的 ${ids.length} 条订单吗?`, '确认', { type: 'warning' }) + await submitReview(ids) } catch (e) {} } -async function handleExport() { - exportLoading.value = true - setTimeout(() => { - exportLoading.value = false - ElMessage.success('导出成功') - }, 1000) +async function handleSingleReview() { + if (!selectedRow.value?.id) { + ElMessage.warning('请先选择订单') + return + } + try { + await ElMessageBox.confirm('确定审核通过当前订单吗?', '确认', { type: 'warning' }) + await submitReview([selectedRow.value.id]) + } catch (e) {} } diff --git a/src/views/profile/components/Bind.vue b/src/views/profile/components/Bind.vue index 961cb1f3..79949062 100644 --- a/src/views/profile/components/Bind.vue +++ b/src/views/profile/components/Bind.vue @@ -56,7 +56,7 @@ import { ref, reactive, onMounted, onUnmounted } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { CircleCheckFilled, Loading, RefreshRight } from '@element-plus/icons-vue' -import { getBindWechatCode, unbindWechat, getBindInfo } from '@/api/profile' +import { getBindWechatCode, unbindWechat } from '@/api/user/user' type QrStatus = 'waiting' | 'pending' | 'scanned' | 'bound' | 'expired' @@ -197,26 +197,6 @@ const refreshQrCode = async () => { } } -/** 初始化:先查询绑定状态,未绑定则自动加载二维码 */ -const fetchBindInfo = async () => { - try { - const res = await getBindInfo() - const data = res?.data - if (data?.status === 'bound' || data?.isBound) { - isBound.value = true - binderInfo.nickname = data.nickname || '' - binderInfo.openid = data.openid || '' - } else { - isBound.value = false - await initQrCode() - } - } catch { - // 查询失败时仍尝试显示二维码 - isBound.value = false - await initQrCode() - } -} - /** 解绑微信 */ const handleUnbind = () => { ElMessageBox.confirm('确定要解除微信绑定吗?', '提示', { @@ -242,7 +222,7 @@ const handleUnbind = () => { } onMounted(() => { - fetchBindInfo() + initQrCode() }) onUnmounted(() => { diff --git a/src/views/stock/stock/component/add.vue b/src/views/stock/stock/component/add.vue index 34b62835..282145ce 100644 --- a/src/views/stock/stock/component/add.vue +++ b/src/views/stock/stock/component/add.vue @@ -291,7 +291,7 @@ import { ref, reactive, watch, onMounted, nextTick, computed } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { Check, Refresh, InfoFilled, Plus } from '@element-plus/icons-vue' -import * as stockApi from '@/api/stock' +import * as stockApi from '@/api/stock/stock' import { stockDefaultFormData, stockFormRules } from '../stock-config' const props = defineProps({ diff --git a/src/views/stock/stock/component/barcode.vue b/src/views/stock/stock/component/barcode.vue index 83b59513..2f00086f 100644 --- a/src/views/stock/stock/component/barcode.vue +++ b/src/views/stock/stock/component/barcode.vue @@ -54,7 +54,7 @@ import { ref, reactive, watch, onMounted } from 'vue' import { ElMessage, type FormInstance, type FormRules } from 'element-plus' import { Check, Refresh, QuestionFilled } from '@element-plus/icons-vue' -import * as stockApi from '@/api/stock' +import * as stockApi from '@/api/stock/stock' import { useUserStore } from '@/stores/modules/user' const userStore = useUserStore() diff --git a/src/views/stock/stock/component/erpStock.vue b/src/views/stock/stock/component/erpStock.vue index ca6b31ab..4c64e424 100644 --- a/src/views/stock/stock/component/erpStock.vue +++ b/src/views/stock/stock/component/erpStock.vue @@ -57,7 +57,7 @@ import { ref, watch, onMounted } from 'vue' import { ElMessage } from 'element-plus' import { Refresh, Plus } from '@element-plus/icons-vue' -import * as stockApi from '@/api/stock' +import * as stockApi from '@/api/stock/stock' import StoreStock from './store_stock.vue' const props = defineProps<{ diff --git a/src/views/stock/stock/component/info.vue b/src/views/stock/stock/component/info.vue index 9eef9a38..cdfa0ef1 100644 --- a/src/views/stock/stock/component/info.vue +++ b/src/views/stock/stock/component/info.vue @@ -525,7 +525,7 @@ import { ref, reactive, watch, onMounted, nextTick } from 'vue' import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from 'element-plus' import { Plus, Check, Refresh, Close, QuestionFilled } from '@element-plus/icons-vue' -import * as stockApi from '@/api/stock' +import * as stockApi from '@/api/stock/stock' import { useUserStore } from '@/stores/modules/user' import { stockDefaultFormData, stockFormRules } from '../stock-config' diff --git a/src/views/stock/stock/component/log.vue b/src/views/stock/stock/component/log.vue index bdc8e86b..9790a2d7 100644 --- a/src/views/stock/stock/component/log.vue +++ b/src/views/stock/stock/component/log.vue @@ -84,7 +84,7 @@ import { ref, reactive, watch, onMounted } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { Refresh } from '@element-plus/icons-vue' -import * as stockApi from '@/api/stock' +import * as stockApi from '@/api/stock/stock' import RequestData from '@/components/RequestData/index.vue' const props = defineProps<{ diff --git a/src/views/stock/stock/component/recycle.vue b/src/views/stock/stock/component/recycle.vue index 7ca14d71..5fc02544 100644 --- a/src/views/stock/stock/component/recycle.vue +++ b/src/views/stock/stock/component/recycle.vue @@ -110,7 +110,7 @@ import { ref, reactive, onMounted, watch } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { Search, Delete, RefreshLeft, Refresh } from '@element-plus/icons-vue' -import * as stockApi from '@/api/stock' +import * as stockApi from '@/api/stock/stock' import { parseTime } from '@/utils/index' const props = defineProps({ diff --git a/src/views/stock/stock/component/storage.vue b/src/views/stock/stock/component/storage.vue index 320ffcba..440ce4c5 100644 --- a/src/views/stock/stock/component/storage.vue +++ b/src/views/stock/stock/component/storage.vue @@ -128,7 +128,7 @@