diff --git a/Antis.Erp.Plat/antis-ncc-admin/src/api/home.js b/Antis.Erp.Plat/antis-ncc-admin/src/api/home.js index f2f1b32..d9fc569 100755 --- a/Antis.Erp.Plat/antis-ncc-admin/src/api/home.js +++ b/Antis.Erp.Plat/antis-ncc-admin/src/api/home.js @@ -28,7 +28,7 @@ export function getFlowTodo() { method: 'get' }) } -// 获取我的待办事项 +// 获取我的待办事项(djmc;includeStats=true 时同包 stats,与列表一次查库) export function getMyFlowTodo(data) { return request({ url: '/api/visualdev/Dashboard/MyFlowTodo', @@ -37,6 +37,14 @@ export function getMyFlowTodo(data) { }) } +/** 仅左侧条数(会全量查待办);待办中心优先用 getMyFlowTodo({ includeStats: true }) */ +export function getMyFlowTodoStats() { + return request({ + url: '/api/visualdev/Dashboard/MyFlowTodoStats', + method: 'get' + }) +} + // 获取数据统计 export function getCountData() { return request({ diff --git a/Antis.Erp.Plat/antis-ncc-admin/src/layout/components/AppMain.vue b/Antis.Erp.Plat/antis-ncc-admin/src/layout/components/AppMain.vue index 81975b3..3feb36b 100755 --- a/Antis.Erp.Plat/antis-ncc-admin/src/layout/components/AppMain.vue +++ b/Antis.Erp.Plat/antis-ncc-admin/src/layout/components/AppMain.vue @@ -19,7 +19,6 @@ // 此处改为默认缓存所有页面,仅用 exclude 尊重 meta.noCache;路由 name 与组件 name 不一致的 noCache 路由需把组件 name 列在下面。 const NO_CACHE_COMPONENT_NAMES = [ 'DouyinLogisticsOrders', - 'DouyinLogisticsCreateWaybill', 'wtMdfzManage' ] diff --git a/Antis.Erp.Plat/antis-ncc-admin/src/router/index.js b/Antis.Erp.Plat/antis-ncc-admin/src/router/index.js index 0bd3785..a08eb08 100755 --- a/Antis.Erp.Plat/antis-ncc-admin/src/router/index.js +++ b/Antis.Erp.Plat/antis-ncc-admin/src/router/index.js @@ -83,14 +83,14 @@ export const constantRoutes = [{ name: 'create-waybill-merged', hidden: true, component: () => import('@/views/douyinLogistics/CreateWaybill'), - meta: { title: '合并发货单', noCache: true } + meta: { title: '合并发货单', noCache: false } }, { path: 'create-waybill/:id', name: 'create-waybill', hidden: true, component: () => import('@/views/douyinLogistics/CreateWaybill'), - meta: { title: '编辑发货单', noCache: true } + meta: { title: '编辑发货单', noCache: false } } ] } diff --git a/Antis.Erp.Plat/antis-ncc-admin/src/utils/douyinErpBase.js b/Antis.Erp.Plat/antis-ncc-admin/src/utils/douyinErpBase.js index 78cd935..db19eb9 100644 --- a/Antis.Erp.Plat/antis-ncc-admin/src/utils/douyinErpBase.js +++ b/Antis.Erp.Plat/antis-ncc-admin/src/utils/douyinErpBase.js @@ -1,4 +1,10 @@ -/** ERP 站点根地址(与抖音独立前端 VITE_ERP_BASE_URL 一致),用于拼接商品主图等相对路径 */ +/** + * 抖音物流 / 发货单页:拼接 ERP 商品图等静态资源根地址。 + * - 图片相对路径需拼 `VUE_APP_BASE_API`(与上传/文件服务一致)。 + * - 历史或开发机落库成绝对地址 `http://localhost:2011/...` 时,线上会失效,需把主机替换为当前环境 API 根。 + */ + +/** 对外站点名(如官网);仅作无 API 根时的回退 */ export function getErpBaseUrl() { const v = process.env.VUE_APP_ERP_PUBLIC_BASE if (v) return String(v).replace(/\/$/, '') @@ -7,3 +13,41 @@ export function getErpBaseUrl() { } return 'https://www.ponggame.cn' } + +/** 与后台同源的文件/API 根(商品图、上传目录),优先 env,其次浏览器当前 origin */ +export function getErpAssetBaseUrl() { + const v = process.env.VUE_APP_BASE_API + if (v) return String(v).replace(/\/$/, '') + if (typeof window !== 'undefined' && window.location && window.location.origin) { + return String(window.location.origin).replace(/\/$/, '') + } + return getErpBaseUrl() +} + +/** + * 商品主图等:补全相对路径,并修正开发机 localhost / 错误落库的绝对地址 + */ +export function resolveProductPicUrl(pic) { + const s0 = (pic || '').trim() + if (!s0) return '' + + if (/^https?:\/\//i.test(s0)) { + try { + const u = new URL(s0) + // 开发机或历史错误写死的内网/本机:替换为当前部署的 API 根 + if (/^(localhost|127\.0\.0\.1|0\.0\.0\.0)$/i.test(u.hostname)) { + const base = getErpAssetBaseUrl().replace(/\/$/, '') + return `${base}${u.pathname || ''}${u.search || ''}${u.hash || ''}` + } + } catch (e) { + return s0 + } + return s0 + } + + if (s0.startsWith('//')) return `https:${s0}` + + const base = getErpAssetBaseUrl().replace(/\/$/, '') + if (s0.startsWith('/')) return `${base}${s0}` + return s0 +} diff --git a/Antis.Erp.Plat/antis-ncc-admin/src/utils/wtRejectApproval.js b/Antis.Erp.Plat/antis-ncc-admin/src/utils/wtRejectApproval.js index 92679df..fe86a0b 100644 --- a/Antis.Erp.Plat/antis-ncc-admin/src/utils/wtRejectApproval.js +++ b/Antis.Erp.Plat/antis-ncc-admin/src/utils/wtRejectApproval.js @@ -46,6 +46,15 @@ export function postApproveGeneric(id, remark) { }) } +/** 赠送单/获赠单:撤回审核回草稿 */ +export function postWtXsckdWithdrawAudit(id) { + return request({ + url: `/api/Extend/WtXsckd/WithdrawAudit/${id}`, + method: 'POST', + data: {} + }) +} + /** * 审核通过(销售出库) */ diff --git a/Antis.Erp.Plat/antis-ncc-admin/src/views/basic/todoCenter/index.vue b/Antis.Erp.Plat/antis-ncc-admin/src/views/basic/todoCenter/index.vue index 4dcd6d1..31f9810 100644 --- a/Antis.Erp.Plat/antis-ncc-admin/src/views/basic/todoCenter/index.vue +++ b/Antis.Erp.Plat/antis-ncc-admin/src/views/basic/todoCenter/index.vue @@ -1,6 +1,6 @@