Bladeren bron

refactor(order): 重构订单模块

- 移除工作台相关无用组件
- 优化订单列表和详情页面
- 添加订单状态、商品类型等枚举数据
- 调整订单列表展示逻辑
- 新增订单详情弹窗
zhangtao 1 dag geleden
bovenliggende
commit
3dc3f7e278

+ 4 - 4
.env.development

@@ -7,14 +7,14 @@ VITE_PUBLIC_PATH = /
 
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
-VITE_PROXY = [["/jeecgboot","http://192.168.1.34:8080/jeecg-boot"],["/upload","http://192.168.1.34:8080/jeecg-boot"]]
-# VITE_PROXY = [["/jeecgboot","http://192.168.0.11:8080/jeecg-boot"],["/upload","http://192.168.0.11:8080/upload"]]
+# VITE_PROXY = [["/jeecgboot","http://192.168.1.34:8080/jeecg-boot"],["/upload","http://192.168.1.34:8080/jeecg-boot"]]
+VITE_PROXY = [["/jeecgboot","http://192.168.0.11:8080/jeecg-boot"],["/upload","http://192.168.0.11:8080/upload"]]
 # VITE_PROXY = [["/jeecgboot","http://192.168.1.253:8080/jeecg-boot"],["/upload","http://192.168.1.253:8080/upload"]]
 # VITE_PROXY = [["/jeecgboot","http://192.168.1.166:8080/jeecg-boot"],["/upload","http://192.168.1.166:8080/upload"]]
 
 #后台接口全路径地址(必填)
-VITE_GLOB_DOMAIN_URL=http://192.168.1.34:8080/jeecg-boot #//黄、
-# VITE_GLOB_DOMAIN_URL=http://192.168.0.11:8080/jeecg-boot  #李
+# VITE_GLOB_DOMAIN_URL=http://192.168.1.34:8080/jeecg-boot #//黄、
+VITE_GLOB_DOMAIN_URL=http://192.168.0.11:8080/jeecg-boot  #李
 # VITE_GLOB_DOMAIN_URL=http://192.168.1.253:8080/jeecg-boot  #张
 # VITE_GLOB_DOMAIN_URL=http://192.168.1.166:8080/jeecg-boot  #张
 

+ 0 - 8
src/router/routes/modules/dashboard.ts

@@ -23,14 +23,6 @@ const dashboard: AppRouteModule = {
         title: t('routes.dashboard.analysis'),
       },
     },
-    {
-      path: 'workbench',
-      name: 'Workbench',
-      component: () => import('/@/views/dashboard/workbench/index.vue'),
-      meta: {
-        title: t('routes.dashboard.workbench'),
-      },
-    },
   ],
 };
 

+ 1 - 1
src/views/businessManagement/competition/competition.data.ts

@@ -3,7 +3,7 @@ import { getBaiduAdd, getInsureList, getSprotProject } from '/@/api/common/api';
 import { FormSchema } from '/@/components/Table';
 import { BasicColumn } from '/@/components/Table';
 import { getAddress } from '../courses/courses.api';
-import { Button, Image, Input, InputGroup, message, RadioChangeEvent } from 'ant-design-vue';
+import { Button, Image, Input, InputGroup, message } from 'ant-design-vue';
 import { h, VNode } from 'vue';
 import dayjs from 'dayjs';
 /**

+ 0 - 31
src/views/dashboard/workbench/components/DynamicInfo.vue

@@ -1,31 +0,0 @@
-<template>
-  <Card title="最新动态" v-bind="$attrs">
-    <template #extra>
-      <a-button type="link" size="small">更多</a-button>
-    </template>
-    <List item-layout="horizontal" :data-source="dynamicInfoItems">
-      <template #renderItem="{ item }">
-        <ListItem>
-          <ListItemMeta>
-            <template #description>
-              {{ item.date }}
-            </template>
-            <!-- eslint-disable-next-line -->
-            <template #title> {{ item.name }} <span v-html="item.desc"> </span> </template>
-            <template #avatar>
-              <Icon :icon="item.avatar" :size="30" />
-            </template>
-          </ListItemMeta>
-        </ListItem>
-      </template>
-    </List>
-  </Card>
-</template>
-<script lang="ts" setup>
-  import { Card, List } from 'ant-design-vue';
-  import { dynamicInfoItems } from './data';
-  import { Icon } from '/@/components/Icon';
-
-  const ListItem = List.Item;
-  const ListItemMeta = List.Item.Meta;
-</script>

+ 0 - 34
src/views/dashboard/workbench/components/ProjectCard.vue

@@ -1,34 +0,0 @@
-<template>
-  <Card title="项目" v-bind="$attrs">
-    <template #extra>
-      <a-button type="link" size="small">更多</a-button>
-    </template>
-
-    <template v-for="item in items" :key="item">
-      <CardGrid class="!md:w-1/3 !w-full">
-        <span class="flex">
-          <Icon :icon="item.icon" :color="item.color" size="30" />
-          <span class="text-lg ml-4">{{ item.title }}</span>
-        </span>
-        <div class="flex mt-2 h-10 text-secondary"> {{ item.desc }} </div>
-        <div class="flex justify-between text-secondary">
-          <span>{{ item.group }}</span>
-          <span>{{ item.date }}</span>
-        </div>
-      </CardGrid>
-    </template>
-  </Card>
-</template>
-<script lang="ts">
-  import { defineComponent } from 'vue';
-  import { Card } from 'ant-design-vue';
-  import { Icon } from '/@/components/Icon';
-  import { groupItems } from './data';
-
-  export default defineComponent({
-    components: { Card, CardGrid: Card.Grid, Icon },
-    setup() {
-      return { items: groupItems };
-    },
-  });
-</script>

+ 0 - 19
src/views/dashboard/workbench/components/QuickNav.vue

@@ -1,19 +0,0 @@
-<template>
-  <Card title="快捷导航" v-bind="$attrs">
-    <template v-for="item in navItems" :key="item">
-      <CardGrid>
-        <span class="flex flex-col items-center">
-          <Icon :icon="item.icon" :color="item.color" size="20" />
-          <span class="text-md mt-2">{{ item.title }}</span>
-        </span>
-      </CardGrid>
-    </template>
-  </Card>
-</template>
-<script lang="ts" setup>
-  import { Card } from 'ant-design-vue';
-  import { navItems } from './data';
-  import { Icon } from '/@/components/Icon';
-
-  const CardGrid = Card.Grid;
-</script>

+ 0 - 94
src/views/dashboard/workbench/components/SaleRadar.vue

@@ -1,94 +0,0 @@
-<template>
-  <Card title="销售统计" :loading="loading">
-    <div ref="chartRef" :style="{ width, height }"></div>
-  </Card>
-</template>
-<script lang="ts" setup>
-  import { Ref, ref, watch } from 'vue';
-  import { Card } from 'ant-design-vue';
-  import { useECharts } from '/@/hooks/web/useECharts';
-
-  const props = defineProps({
-    loading: Boolean,
-    width: {
-      type: String as PropType<string>,
-      default: '100%',
-    },
-    height: {
-      type: String as PropType<string>,
-      default: '400px',
-    },
-  });
-
-  const chartRef = ref<HTMLDivElement | null>(null);
-  const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
-  watch(
-    () => props.loading,
-    () => {
-      if (props.loading) {
-        return;
-      }
-      setOptions({
-        legend: {
-          bottom: 0,
-          data: ['Visits', 'Sales'],
-        },
-        tooltip: {},
-        radar: {
-          radius: '60%',
-          splitNumber: 8,
-          indicator: [
-            {
-              name: '2017',
-            },
-            {
-              name: '2017',
-            },
-            {
-              name: '2018',
-            },
-            {
-              name: '2019',
-            },
-            {
-              name: '2020',
-            },
-            {
-              name: '2021',
-            },
-          ],
-        },
-        series: [
-          {
-            type: 'radar' as 'custom',
-            symbolSize: 0,
-            areaStyle: {
-              shadowBlur: 0,
-              shadowColor: 'rgba(0,0,0,.2)',
-              shadowOffsetX: 0,
-              shadowOffsetY: 10,
-              opacity: 1,
-            },
-            data: [
-              {
-                value: [90, 50, 86, 40, 50, 20],
-                name: 'Visits',
-                itemStyle: {
-                  color: '#b6a2de',
-                },
-              },
-              {
-                value: [70, 75, 70, 76, 20, 85],
-                name: 'Sales',
-                itemStyle: {
-                  color: '#67e0e3',
-                },
-              },
-            ],
-          },
-        ],
-      });
-    },
-    { immediate: true }
-  );
-</script>

+ 0 - 33
src/views/dashboard/workbench/components/WorkbenchHeader.vue

@@ -1,33 +0,0 @@
-<template>
-  <div class="lg:flex">
-    <Avatar :src="userinfo.avatar || headerImg" :size="72" class="!mx-auto !block" />
-    <div class="md:ml-6 flex flex-col justify-center md:mt-0 mt-2">
-      <h1 class="md:text-lg text-md">早安, {{ userinfo.realname }}, 开始您一天的工作吧!</h1>
-      <span class="text-secondary"> 今日晴,20℃ - 32℃! </span>
-    </div>
-    <div class="flex flex-1 justify-end md:mt-0 mt-4">
-      <div class="flex flex-col justify-center text-right">
-        <span class="text-secondary"> 待办 </span>
-        <span class="text-2xl">2/10</span>
-      </div>
-
-      <div class="flex flex-col justify-center text-right md:mx-16 mx-12">
-        <span class="text-secondary"> 项目 </span>
-        <span class="text-2xl">8</span>
-      </div>
-      <div class="flex flex-col justify-center text-right md:mr-10 mr-4">
-        <span class="text-secondary"> 团队 </span>
-        <span class="text-2xl">300</span>
-      </div>
-    </div>
-  </div>
-</template>
-<script lang="ts" setup>
-  import { computed } from 'vue';
-  import { Avatar } from 'ant-design-vue';
-  import { useUserStore } from '/@/store/modules/user';
-  import headerImg from '/@/assets/images/header.jpg';
-
-  const userStore = useUserStore();
-  const userinfo = computed(() => userStore.getUserInfo);
-</script>

+ 0 - 156
src/views/dashboard/workbench/components/data.ts

@@ -1,156 +0,0 @@
-interface GroupItem {
-  title: string;
-  icon: string;
-  color: string;
-  desc: string;
-  date: string;
-  group: string;
-}
-
-interface NavItem {
-  title: string;
-  icon: string;
-  color: string;
-}
-
-interface DynamicInfoItem {
-  avatar: string;
-  name: string;
-  date: string;
-  desc: string;
-}
-
-export const navItems: NavItem[] = [
-  {
-    title: '首页',
-    icon: 'ion:home-outline',
-    color: '#1fdaca',
-  },
-  {
-    title: '仪表盘',
-    icon: 'ion:grid-outline',
-    color: '#bf0c2c',
-  },
-  {
-    title: '组件',
-    icon: 'ion:layers-outline',
-    color: '#e18525',
-  },
-  {
-    title: '系统管理',
-    icon: 'ion:settings-outline',
-    color: '#3fb27f',
-  },
-  {
-    title: '权限管理',
-    icon: 'ion:key-outline',
-    color: '#4daf1bc9',
-  },
-  {
-    title: '图表',
-    icon: 'ion:bar-chart-outline',
-    color: '#00d8ff',
-  },
-];
-
-export const dynamicInfoItems: DynamicInfoItem[] = [
-  {
-    avatar: 'dynamic-avatar-1|svg',
-    name: '威廉',
-    date: '刚刚',
-    desc: `在 <a>开源组</a> 创建了项目 <a>Vue</a>`,
-  },
-  {
-    avatar: 'dynamic-avatar-2|svg',
-    name: '艾文',
-    date: '1个小时前',
-    desc: `关注了 <a>威廉</a> `,
-  },
-  {
-    avatar: 'dynamic-avatar-3|svg',
-    name: '克里斯',
-    date: '1天前',
-    desc: `发布了 <a>个人动态</a> `,
-  },
-  {
-    avatar: 'dynamic-avatar-4|svg',
-    name: 'Jeecg',
-    date: '2天前',
-    desc: `发表文章 <a>如何编写一个Vite插件</a> `,
-  },
-  {
-    avatar: 'dynamic-avatar-5|svg',
-    name: '皮特',
-    date: '3天前',
-    desc: `回复了 <a>杰克</a> 的问题 <a>如何进行项目优化?</a>`,
-  },
-  {
-    avatar: 'dynamic-avatar-6|svg',
-    name: '杰克',
-    date: '1周前',
-    desc: `关闭了问题 <a>如何运行项目</a> `,
-  },
-  {
-    avatar: 'dynamic-avatar-1|svg',
-    name: '威廉',
-    date: '1周前',
-    desc: `发布了 <a>个人动态</a> `,
-  },
-  {
-    avatar: 'dynamic-avatar-1|svg',
-    name: '威廉',
-    date: '2021-04-01 20:00',
-    desc: `推送了代码到 <a>Github</a>`,
-  },
-];
-
-export const groupItems: GroupItem[] = [
-  {
-    title: 'Github',
-    icon: 'carbon:logo-github',
-    color: '',
-    desc: '不要等待机会,而要创造机会。',
-    group: '开源组',
-    date: '2021-04-01',
-  },
-  {
-    title: 'Vue',
-    icon: 'ion:logo-vue',
-    color: '#3fb27f',
-    desc: '现在的你决定将来的你。',
-    group: '算法组',
-    date: '2021-04-01',
-  },
-  {
-    title: 'Html5',
-    icon: 'ion:logo-html5',
-    color: '#e18525',
-    desc: '没有什么才能比努力更重要。',
-    group: '上班摸鱼',
-    date: '2021-04-01',
-  },
-  {
-    title: 'Angular',
-    icon: 'ion:logo-angular',
-    color: '#bf0c2c',
-    desc: '热情和欲望可以突破一切难关。',
-    group: 'UI',
-    date: '2021-04-01',
-  },
-  {
-    title: 'React',
-    icon: 'bx:bxl-react',
-    color: '#00d8ff',
-    desc: '健康的身体是实目标的基石。',
-    group: '技术牛',
-    date: '2021-04-01',
-  },
-  {
-    title: 'Js',
-    icon: 'ion:logo-javascript',
-    color: '#4daf1bc9',
-    desc: '路是走出来的,而不是空想出来的。',
-    group: '架构组',
-    date: '2021-04-01',
-  },
-];

+ 0 - 36
src/views/dashboard/workbench/index.vue

@@ -1,36 +0,0 @@
-<template>
-  <PageWrapper>
-    <template #headerContent> <WorkbenchHeader /> </template>
-    <div class="lg:flex">
-      <div class="lg:w-7/10 w-full !mr-4 enter-y">
-        <ProjectCard :loading="loading" class="enter-y" />
-        <DynamicInfo :loading="loading" class="!my-4 enter-y" />
-      </div>
-      <div class="lg:w-3/10 w-full enter-y">
-        <QuickNav :loading="loading" class="enter-y" />
-
-        <Card class="!my-4 enter-y" :loading="loading">
-          <img class="xl:h-50 h-30 mx-auto" src="../../../assets/svg/illustration.svg" />
-        </Card>
-
-        <SaleRadar :loading="loading" class="enter-y" />
-      </div>
-    </div>
-  </PageWrapper>
-</template>
-<script lang="ts" setup>
-  import { ref } from 'vue';
-  import { Card } from 'ant-design-vue';
-  import { PageWrapper } from '/@/components/Page';
-  import WorkbenchHeader from './components/WorkbenchHeader.vue';
-  import ProjectCard from './components/ProjectCard.vue';
-  import QuickNav from './components/QuickNav.vue';
-  import DynamicInfo from './components/DynamicInfo.vue';
-  import SaleRadar from './components/SaleRadar.vue';
-
-  const loading = ref(true);
-
-  setTimeout(() => {
-    loading.value = false;
-  }, 500);
-</script>

+ 5 - 6
src/views/operationManagement/feedback/index.vue

@@ -138,18 +138,17 @@
         onClick: handleEdit.bind(null, record),
         // auth: 'feedback:nm_feedback:edit',
       },
+      {
+        label: '详情',
+        onClick: handleDetail.bind(null, record),
+      },
     ];
   }
   /**
    * 下拉操作栏
    */
   function getDropDownAction(record) {
-    return [
-      {
-        label: '详情',
-        onClick: handleDetail.bind(null, record),
-      },
-    ];
+    return [];
   }
 </script>
 

+ 95 - 9
src/views/orderManagement/order/components/orderModelView.vue

@@ -1,16 +1,102 @@
 <template>
-  <BasicModal v-bind="$attrs" @register="registerModal" title="产看" width="900px" destroyOnClose> </BasicModal>
+  <BasicModal v-bind="$attrs" @register="registerModal" title="产看" width="1000px" destroyOnClose>
+    <div class="px3" v-if="orderInfo">
+      <div class="flex items-center font-semibold">
+        <div>订单编号:{{ orderInfo.orderCode }}</div>
+        <div class="ml-3">下单时间:{{ orderInfo.createTime }} </div>
+      </div>
+      <div class="mt3">
+        <div>共{{ orderInfo.proInfoList.length }}人</div>
+        <div class="flex items-center">
+          <div class="flex items-center" v-for="item in orderInfo.proInfoList" :key="item.id">
+            <div class="mr3 text-gray">{{ item.userName }} </div>
+            <div>{{ orderStatus[item.orderStatus] }} </div>
+          </div>
+        </div>
+      </div>
+      <Divider></Divider>
+      <div class="flex items-center justify-between">
+        <div>
+          <div>使用地信息 </div>
+          <div class="text-gray">地点:{{ orderInfo.siteName }}</div>
+          <div class="text-gray">地址:{{ orderInfo.address }} </div>
+        </div>
+        <div>
+          <div>付款信息 </div>
+          <div class="text-gray">实付金额:{{ orderInfo.price || 0 }}元</div>
+          <div class="text-gray">付款时间:{{ orderInfo.payTime || '--' }}</div>
+        </div>
+        <div>
+          <div>买家信息 </div>
+          <div class="text-gray">买家昵称:{{ orderInfo.nikeName }}</div>
+          <div class="text-gray">买家电话:{{ orderInfo.phoneNumber }}</div>
+        </div>
+      </div>
+      <Divider></Divider>
+      <TypographyTitle :level="5">订单信息</TypographyTitle>
+      <Table :columns="orderColum" :dataSource="orderInfo.proInfoList" :pagination="{ hideOnSinglePage: true }"></Table>
+      <div class="mt3">
+        <Descriptions title="费用信息" bordered layout="vertical">
+          <DescriptionsItem label="费用类型">
+            <div>
+              <div>商品总额</div>
+              <Divider></Divider>
+            </div>
+            <div>
+              <div>团购优惠</div>
+              <Divider></Divider>
+            </div>
+            <div>
+              <div>实际付款</div>
+              <Divider></Divider>
+            </div>
+            <div>
+              <div>试听优惠</div>
+              <Divider></Divider>
+            </div>
+            <div>
+              <div>需付款</div>
+              <Divider></Divider>
+            </div>
+          </DescriptionsItem>
+          <DescriptionsItem label="金额/元">
+            <div>
+              <div>24</div>
+              <Divider></Divider>
+            </div>
+            <div>
+              <div>432</div>
+              <Divider></Divider>
+            </div>
+            <div>
+              <div>53</div>
+              <Divider></Divider>
+            </div>
+            <div>
+              <div>345</div>
+              <Divider></Divider>
+            </div>
+            <div>
+              <div>345</div>
+              <Divider></Divider>
+            </div>
+          </DescriptionsItem>
+        </Descriptions>
+      </div>
+    </div>
+  </BasicModal>
 </template>
 <script lang="ts" setup>
-  import { TypographyTitle, Divider } from 'ant-design-vue';
+  import { TypographyTitle, Divider, Table, Descriptions, DescriptionsItem } from 'ant-design-vue';
   import { ref, computed, unref } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
-  // 声明Emits
-  const emit = defineEmits(['success', 'register']);
-  const isUpdate = ref(true);
-  const isDetail = ref(false);
-  //表单赋值
-  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
-    console.log(data);
+  import { queryByid, orderInfo } from '../order.api';
+  import { orderStatus, orderColum } from '../order.data';
+  const orderInfo = ref<orderInfo>();
+  const [registerModal, { setModalProps }] = useModalInner(async (data) => {
+    setModalProps({ confirmLoading: false, showCancelBtn: false, showOkBtn: false });
+    const res = await queryByid(data.record.id);
+    orderInfo.value = res;
+    console.log(res);
   });
 </script>

+ 21 - 21
src/views/orderManagement/order/index.vue

@@ -8,43 +8,43 @@
     </template>
     <!--字段回显插槽-->
     <template v-slot:bodyCell="{ column, record, index, text }"> </template>
-    <template #goods>
-      <div class="flex items-center h-20px">
-        <div>订单编号:D202503071608580001</div>
+    <template #goods="{ record }">
+      <div class="flex items-center h-20px text-16px">
+        <div class="font-semibold">订单编号:{{ record.orderCode }}</div>
         <div class="ml3">下单时间:2025-03-07 16:08:58</div>
       </div>
-      <div class="mt3 flex items-center border-b border-solid pb-3 h-90px" v-for="item in 3">
+      <div class="mt3 flex items-center border-b border-solid pb-3 h-90px" v-for="item in record.orderProInfoList" :key="item.id">
         <Image :width="80" class="rounded-16px" src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" />
-        <div class="ml3">学校场地开放</div>
+        <div class="ml3">{{ item.productName }}</div>
       </div>
     </template>
-    <template #price>
+    <template #price="{ record }">
       <div class="h-20px"></div>
-      <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in 3">
+      <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in record.orderProInfoList" :key="item.id">
         <div class="flex items-center">
-          <div>¥0</div>
-          <div class="line-through ml-3 text-gray">¥0</div>
+          <div>¥{{ item.price }}</div>
+          <div class="line-through ml-3 text-gray">¥{{ item.originalPrice }}</div>
         </div>
-        <div class="text-gray">x1</div>
+        <div class="text-gray">x{{ item.quantity }}</div>
       </div>
     </template>
-    <template #user>
+    <template #user="{ record }">
       <div class="h-20px"></div>
-      <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in 3">
-        <div>杨金鑫</div>
-        <div class="text-gray">18984144104</div>
+      <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in record.orderProInfoList" :key="item.id">
+        <div>{{ item.userName }}</div>
+        <div class="text-gray">{{ item.userPhone }}</div>
       </div>
     </template>
-    <template #status>
+    <template #status="{ record }">
       <div class="h-20px"></div>
-      <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in 3">
+      <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in record.orderProInfoList" :key="item.id">
         <div>待使用</div>
       </div>
     </template>
-    <template #After>
+    <template #After="{ record }">
       <div class="h-20px"></div>
-      <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in 3">
-        <div>暂无售后</div>
+      <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in record.orderProInfoList" :key="item.id">
+        <div>{{ afterSaleStatus[item.afterSaleStatus] }}</div>
       </div>
     </template>
   </BasicTable>
@@ -58,7 +58,7 @@
   import { BasicTable, useTable, TableAction, TableImg } from '/@/components/Table';
   import { useModal } from '/@/components/Modal';
   import { useListPage } from '/@/hooks/system/useListPage';
-  import { columns, searchFormSchema } from './order.data';
+  import { columns, searchFormSchema, afterSaleStatus } from './order.data';
   import { list } from './order.api';
   import { useUserStore } from '/@/store/modules/user';
   import { useMessage } from '/@/hooks/web/useMessage';
@@ -88,7 +88,7 @@
         fixed: 'right',
       },
       beforeFetch: (params) => {
-        return Object.assign(params, queryParam);
+        return Object.assign(params, { ...queryParam, orgCode: userStore.userInfo?.orgCode });
       },
     },
   });

+ 74 - 2
src/views/orderManagement/order/order.api.ts

@@ -4,10 +4,82 @@ import { useMessage } from '/@/hooks/web/useMessage';
 const { createConfirm } = useMessage();
 
 enum Api {
-  list = '/appOrder/list',
+  list = '/app/appOrder/queryPage',
+  queryByid = '/app/appOrder/queryInfoById',
 }
 /**
  * 列表接口
  * @param params
  */
-export const list = (params) => defHttp.get({ url: Api.list, params });
+export const list = (params) => defHttp.post({ url: Api.list, params });
+
+export const queryByid = (orderId) => defHttp.get<orderInfo>({ url: `${Api.queryByid}/${orderId}` });
+
+interface proInfoList {
+  id: string;
+  orderId: string;
+  orderCode: string;
+  productId: string;
+  productName: string;
+  address: string;
+  type: number;
+  useDateStr: string;
+  frameTimeStr: string;
+  gameTimeStr: string;
+  ticketNo: string;
+  price: number;
+  orderStatus: number;
+  afterSaleStatus: number;
+  quantity: number;
+  familyUserId: string;
+  userName: string;
+  userPhone: string;
+  orFreePro: number;
+  createBy: string;
+  createTime: string;
+  updateBy: string;
+  updateTime: string;
+  status: number;
+  delFlag: number;
+}
+export interface orderInfo {
+  id: string;
+  orderCode: string;
+  createTime: string;
+  payTime: string;
+  siteName: string;
+  address: string;
+  nikeName: string;
+  phoneNumber: string;
+  totalPrice: number;
+  price: number;
+  proInfoList: proInfoList[];
+  isinList: [
+    {
+      isinList: [
+        {
+          id: '';
+          orderId: '';
+          orderCode: '';
+          orderProInfoId: '';
+          familyId: '';
+          familyUserName: '';
+          isinCode: '';
+          isinStatus: 0;
+          verifyUserId: '';
+          verifyUserName: '';
+          useTime: '';
+          useAddress: '';
+          useImage: '';
+          createBy: '';
+          createTime: '';
+          updateTime: '';
+          expireTime: '';
+          status: 0;
+          delFlag: 0;
+          userPhone: '';
+        },
+      ];
+    },
+  ];
+}

+ 65 - 1
src/views/orderManagement/order/order.data.ts

@@ -1,7 +1,7 @@
 import { BasicColumn } from '/@/components/Table';
 import { FormSchema } from '/@/components/Table';
 import { h } from 'vue';
-import { Image } from 'ant-design-vue';
+import { Image, TableColumnType } from 'ant-design-vue';
 //列表数据
 export const columns: BasicColumn[] = [
   {
@@ -44,6 +44,9 @@ export const columns: BasicColumn[] = [
     align: 'center',
     dataIndex: 'createTime',
     width: 120,
+    customRender: ({ record }) => {
+      return h('div', {}, [h('div', {}, `¥${record.price || 0}`), h('div', { class: 'text-gray' }, `共${record.orderProInfoList.length}件`)]);
+    },
   },
 ];
 //查询数据
@@ -111,3 +114,64 @@ export const formSchema: FormSchema[] = [
     show: false,
   },
 ];
+
+/**
+ * 商品类型(1-场地 2-赛事 3-课程 4-保险)
+ */
+
+export const goodsType = [
+  { label: '学校', value: 1 },
+  { label: '包场', value: 2 },
+  { label: '无固定场', value: 3 },
+  { label: '个人赛', value: 4 },
+  { label: '团队赛', value: 5 },
+  { label: '课程', value: 6 },
+  { label: '保险', value: 7 },
+];
+
+/**
+ * 售后状态 0-暂无售后 1-待退款 1-已退款
+ */
+export const afterSaleStatus = ['暂无售后', '待退款', '已退款'];
+
+/**
+ * orderStatus 订单状态 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消
+ */
+export const orderStatus = ['待付款', '待使用', '已使用', '已到期', '已取消'];
+
+export const orderColum: TableColumnType[] = [
+  {
+    dataIndex: 'productName',
+    title: '商品名称',
+    align: 'center',
+  },
+  {
+    dataIndex: 'ticketNo',
+    title: '券号',
+    align: 'center',
+  },
+  {
+    dataIndex: 'price',
+    title: '原价/元',
+    align: 'center',
+  },
+
+  {
+    dataIndex: 'orderStatus',
+    title: '订单状态',
+    align: 'center',
+    customRender: ({ text }) => {
+      return orderStatus[text];
+    },
+  },
+  {
+    dataIndex: 'quantity',
+    title: '数量',
+    align: 'center',
+  },
+  {
+    dataIndex: 'price',
+    title: '小计/元',
+    align: 'center',
+  },
+];

+ 1 - 1
src/views/system/staff/components/staffModl.vue

@@ -11,7 +11,7 @@
           <Divider></Divider>
         </template>
         <template #jSelectPosition="{ model, field }">
-          <JSelectRole v-model:value="model[field]" @options-change="handleChange" />
+          <JSelectRole v-model:value="model[field]" isRadioSelection @options-change="handleChange" />
         </template>
         <template #trainingPrograms="{ model, field }">
           <FormItem label="培训项目" :wrapperCol="{ span: 24 }" :labelCol="{ span: 5 }" required v-if="isShow">