Răsfoiți Sursa

修改订单分配记录

hurx 2 luni în urmă
părinte
comite
e5b9735bae

+ 73 - 0
src/api/supplier/info/index.ts

@@ -0,0 +1,73 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { InfoVO, InfoForm, InfoQuery } from '@/api/supplier/info/types';
+
+/**
+ * 查询供应商信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listInfo = (query?: InfoQuery): AxiosPromise<InfoVO[]> => {
+  return request({
+    url: '/system/info/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询供应商信息详细
+ * @param id
+ */
+export const getInfo = (id: string | number): AxiosPromise<InfoVO> => {
+  return request({
+    url: '/system/info/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增供应商信息
+ * @param data
+ */
+export const addInfo = (data: InfoForm) => {
+  return request({
+    url: '/system/info',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改供应商信息
+ * @param data
+ */
+export const updateInfo = (data: InfoForm) => {
+  return request({
+    url: '/system/info',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除供应商信息
+ * @param id
+ */
+export const delInfo = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/info/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 获取供应商类型列表
+ */
+export const getComSupTyList = () => {
+  return request({
+    url: '/system/type/getComSupTyList',
+    method: 'get'
+  });
+};

+ 894 - 0
src/api/supplier/info/types.ts

@@ -0,0 +1,894 @@
+export interface InfoVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo: string;
+
+  /**
+   * 企业名称
+   */
+  enterpriseName: string;
+
+  /**
+   * 人员规模
+   */
+  membershipSize: string | number;
+
+  /**
+   * 供应商类型
+   */
+  supplierType: string | number;
+
+  /**
+   * 合作类型
+   */
+  cooperationType: string | number;
+
+  /**
+   * 固定电话
+   */
+  fixedPhone: string;
+
+  /**
+   * 传真
+   */
+  fax: string;
+
+  /**
+   * 网址
+   */
+  url: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode: string;
+
+  /**
+   * 邮箱
+   */
+  mailbox: string;
+
+  /**
+   * 办公地址-省
+   */
+  officeProvince: string;
+
+  /**
+   * 办公地址-市
+   */
+  officeCity: string;
+
+  /**
+   * 办公地址-区/县
+   */
+  officeCounty: string;
+
+  /**
+   * 办公详细地址
+   */
+  officeAddress: string;
+
+  /**
+   * 营业执照名称
+   */
+  businessName: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName: string;
+
+  /**
+   * 法人身份证号
+   */
+  legalPersonId: string | number;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital: string;
+
+  /**
+   * 注册地址-省
+   */
+  businessProvince: string;
+
+  /**
+   * 注册地址-市
+   */
+  businessCity: string;
+
+  /**
+   * 注册地址-区/县
+   */
+  businessCounty: string;
+
+  /**
+   * 注册详细地址
+   */
+  businessAddress: string;
+
+  /**
+   * 营业执照图片路径
+   */
+  businessLicense: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType: string;
+
+  /**
+   * 发票抬头
+   */
+  invoiceHeader: string;
+
+  /**
+   * 纳税人识别号
+   */
+  taxpayerIdentifier: string | number;
+
+  /**
+   * 开户银行
+   */
+  depositaryBank: string;
+
+  /**
+   * 行号(可能是银行行号)
+   */
+  rowNum: string;
+
+  /**
+   * 银行账号
+   */
+  bankAccounts: string;
+
+  /**
+   * 发票地址
+   */
+  invoiceAddress: string;
+
+  /**
+   * 发票电话
+   */
+  invoiceLandline: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply: string;
+
+  /**
+   * 合作方式(0-公开招标, 1-邀请招标...)
+   */
+  cooperateWay: number;
+
+  /**
+   * 合作等级
+   */
+  cooperateLevel: string;
+
+  /**
+   * 合同到期时间
+   */
+  contractEndTime: string;
+
+  /**
+   * 供应状态(0-暂停, 1-正常...)
+   */
+  supplyStatus: number;
+
+  /**
+   * 供应评分
+   */
+  supplyScore: number;
+
+  /**
+   * 年销售额
+   */
+  yearSales: number;
+
+  /**
+   * 供应商联系人姓名
+   */
+  supplierName: string;
+
+  /**
+   * 供应商联系人电话
+   */
+  supplierPhone: string;
+
+  /**
+   * 供应商登录密码(已加密)
+   */
+  supplierPassword: string;
+
+  /**
+   * 经营品类
+   */
+  operatingCategory: string;
+
+  /**
+   * 经营品牌
+   */
+  operatingBrand: string;
+
+  /**
+   * 其他客户
+   */
+  otherCustomers: string;
+
+  /**
+   * 简称
+   */
+  shortName: string;
+
+  /**
+   * 所属行业
+   */
+  industrCategory: string | number;
+
+  /**
+   * 类型(可能与supplier_type重复或细分)
+   */
+  type: string;
+
+  /**
+   * 所属公司
+   */
+  ownedCompany: string | number;
+
+  /**
+   * 推送状态(0-未推送, 1-已推送...)
+   */
+  pushStatus: number;
+
+  /**
+   * 创建时间
+   */
+  created: string;
+
+  /**
+   * 修改时间
+   */
+  modify: string;
+
+  /**
+   * 有效期开始时间
+   */
+  validityFromDate: string | number;
+
+  /**
+   * 有效期结束时间
+   */
+  validityToDate: string | number;
+
+  /**
+   * 行号(可能是内部排序或备用字段)
+   */
+  rowNo: number;
+
+  /**
+   * 法人身份证图片路径
+   */
+  personImage: string;
+
+  /**
+   * 法人身份证图片路径Url
+   */
+  personImageUrl: string;
+  /**
+   * 对接次数
+   */
+  abutmentNo: number;
+
+  /**
+   * 是否合作(1-是, 0-否)
+   */
+  cooperative: number;
+}
+
+export interface InfoForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 企业名称
+   */
+  enterpriseName?: string;
+
+  /**
+   * 人员规模
+   */
+  membershipSize?: string | number;
+
+  /**
+   * 供应商类型
+   */
+  supplierType?: string | number;
+
+  /**
+   * 合作类型
+   */
+  cooperationType?: string | number;
+
+  /**
+   * 固定电话
+   */
+  fixedPhone?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 邮箱
+   */
+  mailbox?: string;
+
+  /**
+   * 办公地址-省
+   */
+  officeProvince?: string;
+
+  /**
+   * 办公地址-市
+   */
+  officeCity?: string;
+
+  /**
+   * 办公地址-区/县
+   */
+  officeCounty?: string;
+
+  /**
+   * 办公详细地址
+   */
+  officeAddress?: string;
+
+  /**
+   * 营业执照名称
+   */
+  businessName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 法人身份证号
+   */
+  legalPersonId?: string | number;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 注册地址-省
+   */
+  businessProvince?: string;
+
+  /**
+   * 注册地址-市
+   */
+  businessCity?: string;
+
+  /**
+   * 注册地址-区/县
+   */
+  businessCounty?: string;
+
+  /**
+   * 注册详细地址
+   */
+  businessAddress?: string;
+
+  /**
+   * 营业执照图片路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 发票抬头
+   */
+  invoiceHeader?: string;
+
+  /**
+   * 纳税人识别号
+   */
+  taxpayerIdentifier?: string | number;
+
+  /**
+   * 开户银行
+   */
+  depositaryBank?: string;
+
+  /**
+   * 行号(可能是银行行号)
+   */
+  rowNum?: string;
+
+  /**
+   * 银行账号
+   */
+  bankAccounts?: string;
+
+  /**
+   * 发票地址
+   */
+  invoiceAddress?: string;
+
+  /**
+   * 发票电话
+   */
+  invoiceLandline?: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply?: string;
+
+  /**
+   * 合作方式(0-公开招标, 1-邀请招标...)
+   */
+  cooperateWay?: number;
+
+  /**
+   * 合作等级
+   */
+  cooperateLevel?: string;
+
+  /**
+   * 合同到期时间
+   */
+  contractEndTime?: string;
+
+  /**
+   * 供应状态(0-暂停, 1-正常...)
+   */
+  supplyStatus?: number;
+
+  /**
+   * 供应评分
+   */
+  supplyScore?: number;
+
+  /**
+   * 年销售额
+   */
+  yearSales?: number;
+
+  /**
+   * 供应商联系人姓名
+   */
+  supplierName?: string;
+
+  /**
+   * 供应商联系人电话
+   */
+  supplierPhone?: string;
+
+  /**
+   * 供应商登录密码(已加密)
+   */
+  supplierPassword?: string;
+
+  /**
+   * 经营品类
+   */
+  operatingCategory?: string;
+
+  /**
+   * 经营品牌
+   */
+  operatingBrand?: string;
+
+  /**
+   * 其他客户
+   */
+  otherCustomers?: string;
+
+  /**
+   * 简称
+   */
+  shortName?: string;
+
+  /**
+   * 所属行业
+   */
+  industrCategory?: string | number;
+
+  /**
+   * 类型(可能与supplier_type重复或细分)
+   */
+  type?: string;
+
+  /**
+   * 所属公司
+   */
+  ownedCompany?: string | number;
+
+  /**
+   * 推送状态(0-未推送, 1-已推送...)
+   */
+  pushStatus?: number;
+
+  /**
+   * 创建时间
+   */
+  created?: string;
+
+  /**
+   * 修改时间
+   */
+  modify?: string;
+
+  /**
+   * 有效期开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 有效期结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 行号(可能是内部排序或备用字段)
+   */
+  rowNo?: number;
+
+  /**
+   * 法人身份证图片路径
+   */
+  personImage?: string;
+
+  /**
+   * 对接次数
+   */
+  abutmentNo?: number;
+
+  /**
+   * 是否合作(1-是, 0-否)
+   */
+  cooperative?: number;
+}
+
+export interface InfoQuery extends PageQuery {
+  /**
+   * 供应商编号
+   */
+  supplierNo?: string;
+
+  /**
+   * 企业名称
+   */
+  enterpriseName?: string;
+
+  /**
+   * 人员规模
+   */
+  membershipSize?: string | number;
+
+  /**
+   * 供应商类型
+   */
+  supplierType?: string | number;
+
+  /**
+   * 合作类型
+   */
+  cooperationType?: string | number;
+
+  /**
+   * 固定电话
+   */
+  fixedPhone?: string;
+
+  /**
+   * 传真
+   */
+  fax?: string;
+
+  /**
+   * 网址
+   */
+  url?: string;
+
+  /**
+   * 邮政编码
+   */
+  postCode?: string;
+
+  /**
+   * 邮箱
+   */
+  mailbox?: string;
+
+  /**
+   * 办公地址-省
+   */
+  officeProvince?: string;
+
+  /**
+   * 办公地址-市
+   */
+  officeCity?: string;
+
+  /**
+   * 办公地址-区/县
+   */
+  officeCounty?: string;
+
+  /**
+   * 办公详细地址
+   */
+  officeAddress?: string;
+
+  /**
+   * 营业执照名称
+   */
+  businessName?: string;
+
+  /**
+   * 统一社会信用代码
+   */
+  socialCreditCode?: string;
+
+  /**
+   * 法人姓名
+   */
+  legalPersonName?: string;
+
+  /**
+   * 法人身份证号
+   */
+  legalPersonId?: string | number;
+
+  /**
+   * 注册资本
+   */
+  registeredCapital?: string;
+
+  /**
+   * 注册地址-省
+   */
+  businessProvince?: string;
+
+  /**
+   * 注册地址-市
+   */
+  businessCity?: string;
+
+  /**
+   * 注册地址-区/县
+   */
+  businessCounty?: string;
+
+  /**
+   * 注册详细地址
+   */
+  businessAddress?: string;
+
+  /**
+   * 营业执照图片路径
+   */
+  businessLicense?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 发票抬头
+   */
+  invoiceHeader?: string;
+
+  /**
+   * 纳税人识别号
+   */
+  taxpayerIdentifier?: string | number;
+
+  /**
+   * 开户银行
+   */
+  depositaryBank?: string;
+
+  /**
+   * 行号(可能是银行行号)
+   */
+  rowNum?: string;
+
+  /**
+   * 银行账号
+   */
+  bankAccounts?: string;
+
+  /**
+   * 发票地址
+   */
+  invoiceAddress?: string;
+
+  /**
+   * 发票电话
+   */
+  invoiceLandline?: string;
+
+  /**
+   * 供货范围
+   */
+  scopeSupply?: string;
+
+  /**
+   * 合作方式(0-公开招标, 1-邀请招标...)
+   */
+  cooperateWay?: number;
+
+  /**
+   * 合作等级
+   */
+  cooperateLevel?: string;
+
+  /**
+   * 合同到期时间
+   */
+  contractEndTime?: string;
+
+  /**
+   * 供应状态(0-暂停, 1-正常...)
+   */
+  supplyStatus?: number;
+
+  /**
+   * 供应评分
+   */
+  supplyScore?: number;
+
+  /**
+   * 年销售额
+   */
+  yearSales?: number;
+
+  /**
+   * 供应商联系人姓名
+   */
+  supplierName?: string;
+
+  /**
+   * 供应商联系人电话
+   */
+  supplierPhone?: string;
+
+  /**
+   * 供应商登录密码(已加密)
+   */
+  supplierPassword?: string;
+
+  /**
+   * 经营品类
+   */
+  operatingCategory?: string;
+
+  /**
+   * 经营品牌
+   */
+  operatingBrand?: string;
+
+  /**
+   * 其他客户
+   */
+  otherCustomers?: string;
+
+  /**
+   * 简称
+   */
+  shortName?: string;
+
+  /**
+   * 所属行业
+   */
+  industrCategory?: string | number;
+
+  /**
+   * 类型(可能与supplier_type重复或细分)
+   */
+  type?: string;
+
+  /**
+   * 所属公司
+   */
+  ownedCompany?: string | number;
+
+  /**
+   * 推送状态(0-未推送, 1-已推送...)
+   */
+  pushStatus?: number;
+
+  /**
+   * 创建时间
+   */
+  created?: string;
+
+  /**
+   * 修改时间
+   */
+  modify?: string;
+
+  /**
+   * 有效期开始时间
+   */
+  validityFromDate?: string | number;
+
+  /**
+   * 有效期结束时间
+   */
+  validityToDate?: string | number;
+
+  /**
+   * 行号(可能是内部排序或备用字段)
+   */
+  rowNo?: number;
+
+  /**
+   * 法人身份证图片路径
+   */
+  personImage?: string;
+
+  /**
+   * 对接次数
+   */
+  abutmentNo?: number;
+
+  /**
+   * 是否合作(1-是, 0-否)
+   */
+  cooperative?: number;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 1 - 0
src/views/order/orderAssignment/splitAssignDialog.vue

@@ -228,6 +228,7 @@
 <script setup name="SplitAssignDialog" lang="ts">
 import { getOrderMain } from '@/api/order/orderMain';
 import { listOrderAssignment } from '@/api/order/orderAssignmentLog';
+import { listInfo } from '@/api/supplier/info';
 import { addOrderSplitAssign, addOrderAssignment } from '@/api/order/orderAssignmentLog';
 import { OrderSplitAssignForm, OrderProductAssignRule, OrderAssignmentForm } from '@/api/order/orderAssignmentLog/types';
 

+ 14 - 1
src/views/order/orderMain/components/chooseAddress.vue

@@ -1,6 +1,13 @@
 <template>
   <el-dialog v-model="visible" title="选择地址" width="800px" @close="handleClose">
-    <el-table :data="addressList" border style="width: 100%" highlight-current-row @current-change="handleCurrentChange">
+    <el-table
+      :data="addressList"
+      border
+      style="width: 100%"
+      highlight-current-row
+      @current-change="handleCurrentChange"
+      @row-dblclick="handleRowDblClick"
+    >
       <el-table-column label="选择" width="80" align="center">
         <template #default="scope">
           <el-radio v-model="selectedAddressId" :value="scope.row.id">
@@ -70,6 +77,12 @@ const handleCurrentChange = (row: ShippingAddressVO | null) => {
     selectedAddress.value = row;
   }
 };
+// 双击行直接确认
+const handleRowDblClick = (row: ShippingAddressVO) => {
+  selectedAddress.value = row;
+  selectedAddressId.value = row.id;
+  handleConfirm();
+};
 
 // 关闭对话框
 const handleClose = () => {

+ 39 - 3
src/views/order/orderMain/index.vue

@@ -165,9 +165,15 @@
           <!-- 第八行 -->
           <el-col :span="24">
             <el-form-item label="附件" prop="attachmentPath">
-              <el-upload class="upload-demo" action="#" :auto-upload="false">
-                <el-button type="primary" plain>上传附件</el-button>
-              </el-upload>
+              <div class="attachment-upload">
+                <el-button type="primary" plain @click="showFileSelectorDialog = true">选择附件</el-button>
+                <span v-if="attachmentList.length > 0" class="ml-2">已选择 {{ attachmentList.length }} 个文件</span>
+                <div v-if="attachmentList.length > 0" class="attachment-list mt-2">
+                  <el-tag v-for="(file, index) in attachmentList" :key="index" closable @close="removeAttachment(index)" class="mr-2 mb-2">
+                    {{ file.fileName }}
+                  </el-tag>
+                </div>
+              </div>
             </el-form-item>
           </el-col>
         </el-row>
@@ -314,12 +320,16 @@
 
     <!-- 查询商品明细对话框 -->
     <SelectProductDetail v-model="showProductDetailDialog" :product-data="currentProductDetail" />
+
+    <!-- 文件选择器对话框 -->
+    <FileSelector v-model="showFileSelectorDialog" :multiple="true" :allowed-types="[1, 2, 3, 4, 5]" title="选择附件" @confirm="handleFileConfirm" />
   </div>
 </template>
 
 <script setup name="OrderMain" lang="ts">
 import { listOrderMain, getOrderMain, delOrderMain, addOrderMain, updateOrderMain } from '@/api/order/orderMain';
 import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMain/types';
+import FileSelector from '@/components/FileSelector/index.vue';
 import { listCompany } from '@/api/company/company';
 import { listCustomerDept } from '@/api/system/dept';
 import { CompanyVO } from '@/api/company/company/types';
@@ -373,6 +383,11 @@ const showProductDialog = ref(false);
 const showProductDetailDialog = ref(false);
 const currentProductDetail = ref({});
 
+// 文件选择器对话框
+const showFileSelectorDialog = ref(false);
+// 附件列表
+const attachmentList = ref<any[]>([]);
+
 // 计算商品总数(所有商品的数量之和)
 const totalQuantity = computed(() => {
   return productList.value.reduce((sum, item) => {
@@ -733,6 +748,12 @@ const handleAddProduct = () => {
 
 /** 确认选择商品 */
 const handleProductConfirm = (product: any) => {
+  // 检查商品是否已存在
+  const existingProduct = productList.value.find((item) => item.id === product.id);
+  if (existingProduct) {
+    proxy?.$modal.msgWarning('该商品已存在,请勿重复添加');
+    return;
+  }
   // 将商品添加到商品列表,按照新的字段映射
   const newProduct = {
     id: product.id,
@@ -759,6 +780,21 @@ const handleDeleteProduct = (index: number) => {
   proxy?.$modal.msgSuccess('删除成功');
 };
 
+/** 确认选择文件 */
+const handleFileConfirm = (files: any[]) => {
+  attachmentList.value = files;
+  // 将文件路径拼接成字符串保存到form.attachmentPath
+  form.value.attachmentPath = files.map((file) => file.filePath).join(',');
+  proxy?.$modal.msgSuccess(`成功选择${files.length}个附件`);
+};
+
+/** 删除附件 */
+const removeAttachment = (index: number) => {
+  attachmentList.value.splice(index, 1);
+  // 更新form.attachmentPath
+  form.value.attachmentPath = attachmentList.value.map((file) => file.filePath).join(',');
+};
+
 /** 查询商品明细 */
 const handleSelect = (index: number) => {
   if (form.value.warehouseId === undefined) {

+ 74 - 20
src/views/order/saleOrder/index.vue

@@ -118,26 +118,9 @@
 
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width" :resizable="false">
           <template #default="scope">
-            <el-button link type="primary" v-if="scope.row.orderStatus === '0'" @click="handleReview(scope.row)">查看</el-button>
-            <el-button link type="primary" v-if="scope.row.checkStatus === '0'" @click="handleCheck(scope.row)">审核</el-button>
-            <el-button link type="primary" v-if="scope.row.orderStatus === '2' || scope.row.orderStatus === '3'" @click="handleDeliver(scope.row)"
-              >发货</el-button
-            >
-            <el-button
-              link
-              type="primary"
-              v-if="scope.row.orderStatus === '2' || scope.row.orderStatus === '3' || scope.row.orderStatus === '4' || scope.row.orderStatus === '5'"
-              @click="handleReview(scope.row)"
-              >查看订单信息</el-button
-            >
-            <el-button
-              link
-              type="primary"
-              v-if="scope.row.orderStatus === '4' || scope.row.orderStatus === '5'"
-              @click="handleViewLogistics(scope.row)"
-              >查看物流</el-button
-            >
-            <el-button link type="primary" @click="handleCancel(scope.row)" v-if="scope.row.orderStatus != '7'">取消订单</el-button>
+            <template v-for="btn in getActionButtons(scope.row)" :key="btn.label">
+              <el-button link type="primary" @click="btn.handler(scope.row)">{{ btn.label }}</el-button>
+            </template>
           </template>
         </el-table-column>
       </el-table>
@@ -574,6 +557,77 @@ const handleExport = () => {
   );
 };
 
+// 订单状态枚举
+enum OrderStatus {
+  PENDING_PAYMENT = '0', // 待支付
+  PENDING_CONFIRM = '1', // 待确认
+  PENDING_SHIPMENT = '2', // 待发货
+  PARTIAL_SHIPMENT = '3', // 部分发货
+  SHIPMENT_COMPLETED = '4', // 发货完成
+  COMPLETED = '5', // 已完成
+  CLOSED = '6', // 已关闭
+  CANCELLED = '7' // 已取消
+}
+
+// 审核状态枚举
+enum CheckStatus {
+  PENDING = '0', // 待审核
+  APPROVED = '1', // 审核通过
+  REJECTED = '2' // 已驳回
+}
+
+// 按钮配置类型
+interface ActionButton {
+  label: string;
+  handler: (row: OrderMainVO) => void;
+}
+
+// 按钮配置映射:根据订单状态和审核状态返回可用按钮
+const getButtonsByStatus = (orderStatus: string, checkStatus: string): ActionButton[] => {
+  const buttons: ActionButton[] = [];
+
+  // 待支付状态:显示查看按钮
+  if (orderStatus === OrderStatus.PENDING_PAYMENT) {
+    buttons.push({ label: '查看', handler: handleReview });
+  }
+
+  // 待审核:显示审核按钮
+  if (checkStatus === CheckStatus.PENDING) {
+    buttons.push({ label: '审核', handler: handleCheck });
+  }
+
+  // 待发货或部分发货:显示发货按钮
+  if (orderStatus === OrderStatus.PENDING_SHIPMENT || orderStatus === OrderStatus.PARTIAL_SHIPMENT) {
+    buttons.push({ label: '发货', handler: handleDeliver });
+  }
+
+  // 待发货、部分发货、发货完成、已完成:显示查看订单信息按钮
+  if (
+    [OrderStatus.PENDING_SHIPMENT, OrderStatus.PARTIAL_SHIPMENT, OrderStatus.SHIPMENT_COMPLETED, OrderStatus.COMPLETED].includes(
+      orderStatus as OrderStatus
+    )
+  ) {
+    buttons.push({ label: '查看订单信息', handler: handleReview });
+  }
+
+  // 发货完成或已完成:显示查看物流按钮
+  if (orderStatus === OrderStatus.SHIPMENT_COMPLETED || orderStatus === OrderStatus.COMPLETED) {
+    buttons.push({ label: '查看物流', handler: handleViewLogistics });
+  }
+
+  // 非已取消和已关闭状态:显示取消订单按钮
+  if (orderStatus !== OrderStatus.CANCELLED && orderStatus !== OrderStatus.CLOSED) {
+    buttons.push({ label: '取消订单', handler: handleCancel });
+  }
+
+  return buttons;
+};
+
+// 根据订单状态获取可用的操作按钮
+const getActionButtons = (row: OrderMainVO): ActionButton[] => {
+  return getButtonsByStatus(row.orderStatus, row.checkStatus);
+};
+
 onMounted(() => {
   getList();
 });