Forráskód Böngészése

feat(env): 启用测试环境后端服务地址

启用本地开发机作为默认后端服务地址,注释掉其他配置项。
该变更用于统一测试环境请求地址,便于本地调试与测试。

feat(layout): 移除主题切换按钮相关代码

暂时移除顶部导航栏中的主题切换按钮导入及使用,
后续将根据需求决定是否恢复或重构该功能。

fix(types): 修复组件类型声明错误

修正 components.d.ts 中 NScrollbar 组件的拼写错误,
将其错误声明 "NScrollbal" 更正为正确名称。

feat(order): 新增订单导出功能并优化标签页结构

在普通订单和售后订单页面中添加“导出”按钮,并提示功能开发中;
同时优化 tabs 标签页布局,增加横向滚动以提升移动端兼容性;
更新模态框回调函数引用,确保数据刷新逻辑一致。

fix(api): 修正商品导出接口路径

修改 store-goods 页面中的导出接口地址,
从 /platform/channelProd/export 调整为 /shop/shopProd/export,
以匹配实际后端路由。
zhangtao 3 hete
szülő
commit
0e191ede27

+ 2 - 2
.env.test

@@ -1,10 +1,10 @@
 # backend service base url, test environment
 # VITE_SERVICE_BASE_URL=http://74949mkfh190.vicp.fun
-# VITE_SERVICE_BASE_URL=http://192.168.1.253:8114 #付
+VITE_SERVICE_BASE_URL=http://192.168.1.253:8114 #付
 # VITE_SERVICE_BASE_URL=http://192.168.0.157:8114 #王
 # VITE_SERVICE_BASE_URL=http://192.168.1.166:8114 #张
 # VITE_SERVICE_BASE_URL=https://mock.apifox.cn/m1/3109515-0-default
-VITE_SERVICE_BASE_URL=https://shop.platform.zswlgz.com #服务器
+# VITE_SERVICE_BASE_URL=https://shop.platform.zswlgz.com #服务器
 
 
 # other backend service base url, test environment

+ 2 - 2
src/layouts/modules/global-header/index.vue

@@ -6,7 +6,7 @@ import { useThemeStore } from '@/store/modules/theme';
 import GlobalLogo from '../global-logo/index.vue';
 import GlobalBreadcrumb from '../global-breadcrumb/index.vue';
 import GlobalSearch from '../global-search/index.vue';
-import ThemeButton from './components/theme-button.vue';
+// import ThemeButton from './components/theme-button.vue';
 import UserAvatar from './components/user-avatar.vue';
 
 defineOptions({
@@ -45,7 +45,7 @@ const { isFullscreen, toggle } = useFullscreen();
         :is-dark="themeStore.darkMode"
         @switch="themeStore.toggleThemeScheme"
       />
-      <ThemeButton />
+      <!-- <ThemeButton /> -->
       <UserAvatar />
     </div>
   </DarkModeContainer>

+ 1 - 0
src/typings/components.d.ts

@@ -99,6 +99,7 @@ declare module 'vue' {
     NPopover: typeof import('naive-ui')['NPopover']
     NRadio: typeof import('naive-ui')['NRadio']
     NRadioGroup: typeof import('naive-ui')['NRadioGroup']
+    NScrollbal: typeof import('naive-ui')['NScrollbal']
     NScrollbar: typeof import('naive-ui')['NScrollbar']
     NSelect: typeof import('naive-ui')['NSelect']
     NSkeleton: typeof import('naive-ui')['NSkeleton']

+ 44 - 27
src/views/delivery/after-sales-order/index.vue

@@ -303,6 +303,9 @@ function handleReset() {
   getData();
   getNums();
 }
+function handleExport() {
+  window.$message?.warning('功能开发中...');
+}
 </script>
 
 <template>
@@ -314,36 +317,50 @@ function handleReset() {
         </NCollapseItem>
       </NCollapse>
     </NCard>
-    <NCard title="售后列表" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
-      <NTabs v-model:value="activeTab" type="line" animated class="mb-16px h-full" display-directive="show">
-        <NTabPane v-for="item in statusList" :key="item.value" :name="item.value" :tab="`${item.label}(${item.num})`">
-          <NDataTable
-            v-model:checked-row-keys="checkedRowKeys"
-            :columns="columns"
-            :data="data"
-            size="small"
-            :flex-height="!appStore.isMobile"
-            :scroll-x="1800"
-            :loading="loading"
-            :row-key="row => row.refundId"
-            remote
-            class="sm:h-full"
-            :pagination="mobilePagination"
-          />
-        </NTabPane>
-      </NTabs>
+    <NCard :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
+      <template #header>
+        <div class="mr3">售后列表</div>
+        <NScrollbar x-scrollable>
+          <div class="flex items-center">
+            <div class="max-w-800px">
+              <NTabs v-model:value="activeTab" type="line" animated display-directive="show">
+                <NTab
+                  v-for="item in statusList"
+                  :key="item.value"
+                  :name="item.value"
+                  :tab="`${item.label}(${item.num})`"
+                ></NTab>
+              </NTabs>
+            </div>
+          </div>
+        </NScrollbar>
+      </template>
+      <template #header-extra>
+        <NButton size="small" type="primary" class="ml20px mt30px" ghost @click="handleExport">
+          <template #icon>
+            <SvgIcon icon="mingcute:file-export-line"></SvgIcon>
+          </template>
+          导出
+        </NButton>
+      </template>
+      <NDataTable
+        v-model:checked-row-keys="checkedRowKeys"
+        :columns="columns"
+        :data="data"
+        size="small"
+        :flex-height="!appStore.isMobile"
+        :scroll-x="1800"
+        :loading="loading"
+        :row-key="row => row.refundId"
+        remote
+        class="sm:h-full"
+        :pagination="mobilePagination"
+      />
 
-      <NormalMoadl ref="orderMoadl" @finish="(getData, getNums)"></NormalMoadl>
+      <NormalMoadl ref="orderMoadl" @finish="handleReset"></NormalMoadl>
       <OrderModal ref="AfterSalesModal"></OrderModal>
     </NCard>
   </div>
 </template>
 
-<style scoped lang="scss">
-:deep(.n-tabs-pane-wrapper) {
-  height: 100%;
-}
-:deep(.n-tab-pane) {
-  height: 100%;
-}
-</style>
+<style scoped lang="scss"></style>

+ 44 - 26
src/views/delivery/normal-order/index.vue

@@ -288,6 +288,9 @@ function handleRefsh() {
   getData();
   getNums();
 }
+function handleExport() {
+  window.$message?.warning('功能开发中...');
+}
 </script>
 
 <template>
@@ -299,35 +302,50 @@ function handleRefsh() {
         </NCollapseItem>
       </NCollapse>
     </NCard>
-    <NCard title="订单列表" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
-      <NTabs v-model:value="activeTab" type="line" animated class="mb-16px h-full" display-directive="show">
-        <NTabPane v-for="item in statusList" :key="item.value" :name="item.value" :tab="`${item.label}(${item.num})`">
-          <NDataTable
-            v-model:checked-row-keys="checkedRowKeys"
-            :columns="columns"
-            :data="data"
-            size="small"
-            :flex-height="!appStore.isMobile"
-            :scroll-x="1800"
-            :loading="loading"
-            :row-key="row => row.orderId"
-            remote
-            class="sm:h-full"
-            :pagination="mobilePagination"
-          />
-        </NTabPane>
-      </NTabs>
+    <NCard :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
+      <template #header>
+        <div class="mr3">订单列表</div>
+        <NScrollbar x-scrollable>
+          <div class="flex items-center">
+            <div class="max-w-800px">
+              <NTabs v-model:value="activeTab" type="line" animated display-directive="show">
+                <NTab
+                  v-for="item in statusList"
+                  :key="item.value"
+                  :name="item.value"
+                  :tab="`${item.label}(${item.num})`"
+                ></NTab>
+              </NTabs>
+            </div>
+          </div>
+        </NScrollbar>
+      </template>
+      <template #header-extra>
+        <NButton size="small" type="primary" class="ml20px mt30px" ghost @click="handleExport">
+          <template #icon>
+            <SvgIcon icon="mingcute:file-export-line"></SvgIcon>
+          </template>
+          导出
+        </NButton>
+      </template>
+
+      <NDataTable
+        v-model:checked-row-keys="checkedRowKeys"
+        :columns="columns"
+        :data="data"
+        size="small"
+        :flex-height="!appStore.isMobile"
+        :scroll-x="1800"
+        :loading="loading"
+        :row-key="row => row.orderId"
+        remote
+        class="sm:h-full"
+        :pagination="mobilePagination"
+      />
       <NormalMoadl ref="orderMoadl" @finish="handleRefsh"></NormalMoadl>
       <DeliveryModal ref="Shipment" @finish="handleRefsh"></DeliveryModal>
     </NCard>
   </div>
 </template>
 
-<style scoped>
-:deep(.n-tabs-pane-wrapper) {
-  height: 100%;
-}
-:deep(.n-tab-pane) {
-  height: 100%;
-}
-</style>
+<style scoped></style>

+ 1 - 1
src/views/goods/store-goods/index.vue

@@ -336,7 +336,7 @@ async function handleExport() {
   const form = getSeachForm();
   // 将form对象转换为查询参数字符串
   const queryParams = new URLSearchParams(form).toString();
-  const baseUrl = `${import.meta.env.VITE_SERVICE_BASE_URL}/platform/channelProd/export`;
+  const baseUrl = `${import.meta.env.VITE_SERVICE_BASE_URL}/shop/shopProd/export`;
   const fullUrl = queryParams ? `${baseUrl}?${queryParams}` : baseUrl;
   window.open(fullUrl, '_blank');
 }