Explorar el Código

中车订单列表以及售后订单

Lijingyang hace 1 mes
padre
commit
942afecd81

+ 63 - 0
src/api/order/mainCrrcExt/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { MainCrrcExtVO, MainCrrcExtForm, MainCrrcExtQuery } from '@/api/order/mainCrrcExt/types';
+
+/**
+ * 查询中车电子商城订单扩展列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listMainCrrcExt = (query?: MainCrrcExtQuery): AxiosPromise<MainCrrcExtVO[]> => {
+  return request({
+    url: '/order/mainCrrcExt/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询中车电子商城订单扩展详细
+ * @param id
+ */
+export const getMainCrrcExt = (id: string | number): AxiosPromise<MainCrrcExtVO> => {
+  return request({
+    url: '/order/mainCrrcExt/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增中车电子商城订单扩展
+ * @param data
+ */
+export const addMainCrrcExt = (data: MainCrrcExtForm) => {
+  return request({
+    url: '/order/mainCrrcExt',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改中车电子商城订单扩展
+ * @param data
+ */
+export const updateMainCrrcExt = (data: MainCrrcExtForm) => {
+  return request({
+    url: '/order/mainCrrcExt',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除中车电子商城订单扩展
+ * @param id
+ */
+export const delMainCrrcExt = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/order/mainCrrcExt/' + id,
+    method: 'delete'
+  });
+};

+ 471 - 0
src/api/order/mainCrrcExt/types.ts

@@ -0,0 +1,471 @@
+export interface MainCrrcExtVO {
+  /**
+   * 主键ID,建议与 order_main.id 保持一致(一对一)
+   */
+  id: string | number;
+
+  /**
+   * 中车电子商城订单号(orderNo),幂等判断关键字段
+   */
+  crrcOrderNo: string;
+
+  /**
+   * 采购平台订单号(purchaserOrderNo),中车内部采购系统订单编号
+   */
+  purchaserOrderNo: string;
+
+  /**
+   * 订单类型(preOrder):0普通订单 1预购单 2预存单
+   */
+  preOrder: number;
+
+  /**
+   * 中车订单状态(orderStatus),原始状态值,做状态映射用
+   */
+  crrcOrderStatus: string;
+
+  /**
+   * 电商系统订单号(mallOrderNo),中车确认接单后返回
+   */
+  mallOrderNo: string;
+
+  /**
+   * 收货人姓名(name)
+   */
+  receiverName: string;
+
+  /**
+   * 收货地址省编码(provinceId),中车行政区编码
+   */
+  provinceId: string | number;
+
+  /**
+   * 收货地址市编码(cityId)
+   */
+  cityId: string | number;
+
+  /**
+   * 收货地址区/县编码(countyId)
+   */
+  countyId: string | number;
+
+  /**
+   * 收货地址乡镇编码(townId),无四级地址传0
+   */
+  townId: string | number;
+
+  /**
+   * 收货详细地址(address)
+   */
+  detailAddress: string;
+
+  /**
+   * 邮编(zip)
+   */
+  zip: string;
+
+  /**
+   * 收货人手机号(mobile)
+   */
+  mobile: string;
+
+  /**
+   * 收货人座机号(phone)
+   */
+  phone: string;
+
+  /**
+   * 收货人邮箱(email)
+   */
+  email: string;
+
+  /**
+   * 下单人姓名(buyer)
+   */
+  buyerName: string;
+
+  /**
+   * 下单人手机号(buyerMobile)
+   */
+  buyerMobile: string;
+
+  /**
+   * 采购单位名称(purchaserName)
+   */
+  purchaserName: string;
+
+  /**
+   * 采购部门名称(purchaserDeptName),多级结构字符串
+   */
+  purchaserDeptName: string;
+
+  /**
+   * 支付方式(paymentType):01账期 02按单 03混合支付
+   */
+  paymentType: string;
+
+  /**
+   * 支付渠道(payClient):1微信 2支付宝
+   */
+  payClient: string;
+
+  /**
+   * 支付流水号(paySerialNum)
+   */
+  paySerialNum: string;
+
+  /**
+   * 账期支付金额(payAccount),混合支付时必填
+   */
+  payAccount: number;
+
+  /**
+   * 现金支付金额(payMoney),混合支付时必填
+   */
+  payMoney: number;
+
+  /**
+   * 预存款支付金额(payPrestore)
+   */
+  payPrestore: number;
+
+  /**
+   * 是否需要发货凭证(voucher):0否 1货物照片
+   */
+  voucher: string;
+
+  /**
+   * 中车订单创建时间(orderTime),格式YYYY-MM-DD HH:MM:SS
+   */
+  orderTime: string;
+
+  /**
+   * 中车接口原始返回JSON报文(留存做审计与问题排查)
+   */
+  rawJson: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 分配原因
+   */
+  remark: string;
+
+}
+
+export interface MainCrrcExtForm extends BaseEntity {
+  /**
+   * 主键ID,建议与 order_main.id 保持一致(一对一)
+   */
+  id?: string | number;
+
+  /**
+   * 中车电子商城订单号(orderNo),幂等判断关键字段
+   */
+  crrcOrderNo?: string;
+
+  /**
+   * 采购平台订单号(purchaserOrderNo),中车内部采购系统订单编号
+   */
+  purchaserOrderNo?: string;
+
+  /**
+   * 订单类型(preOrder):0普通订单 1预购单 2预存单
+   */
+  preOrder?: number;
+
+  /**
+   * 中车订单状态(orderStatus),原始状态值,做状态映射用
+   */
+  crrcOrderStatus?: string;
+
+  /**
+   * 电商系统订单号(mallOrderNo),中车确认接单后返回
+   */
+  mallOrderNo?: string;
+
+  /**
+   * 收货人姓名(name)
+   */
+  receiverName?: string;
+
+  /**
+   * 收货地址省编码(provinceId),中车行政区编码
+   */
+  provinceId?: string | number;
+
+  /**
+   * 收货地址市编码(cityId)
+   */
+  cityId?: string | number;
+
+  /**
+   * 收货地址区/县编码(countyId)
+   */
+  countyId?: string | number;
+
+  /**
+   * 收货地址乡镇编码(townId),无四级地址传0
+   */
+  townId?: string | number;
+
+  /**
+   * 收货详细地址(address)
+   */
+  detailAddress?: string;
+
+  /**
+   * 邮编(zip)
+   */
+  zip?: string;
+
+  /**
+   * 收货人手机号(mobile)
+   */
+  mobile?: string;
+
+  /**
+   * 收货人座机号(phone)
+   */
+  phone?: string;
+
+  /**
+   * 收货人邮箱(email)
+   */
+  email?: string;
+
+  /**
+   * 下单人姓名(buyer)
+   */
+  buyerName?: string;
+
+  /**
+   * 下单人手机号(buyerMobile)
+   */
+  buyerMobile?: string;
+
+  /**
+   * 采购单位名称(purchaserName)
+   */
+  purchaserName?: string;
+
+  /**
+   * 采购部门名称(purchaserDeptName),多级结构字符串
+   */
+  purchaserDeptName?: string;
+
+  /**
+   * 支付方式(paymentType):01账期 02按单 03混合支付
+   */
+  paymentType?: string;
+
+  /**
+   * 支付渠道(payClient):1微信 2支付宝
+   */
+  payClient?: string;
+
+  /**
+   * 支付流水号(paySerialNum)
+   */
+  paySerialNum?: string;
+
+  /**
+   * 账期支付金额(payAccount),混合支付时必填
+   */
+  payAccount?: number;
+
+  /**
+   * 现金支付金额(payMoney),混合支付时必填
+   */
+  payMoney?: number;
+
+  /**
+   * 预存款支付金额(payPrestore)
+   */
+  payPrestore?: number;
+
+  /**
+   * 是否需要发货凭证(voucher):0否 1货物照片
+   */
+  voucher?: string;
+
+  /**
+   * 中车订单创建时间(orderTime),格式YYYY-MM-DD HH:MM:SS
+   */
+  orderTime?: string;
+
+  /**
+   * 中车接口原始返回JSON报文(留存做审计与问题排查)
+   */
+  rawJson?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 分配原因
+   */
+  remark?: string;
+
+}
+
+export interface MainCrrcExtQuery extends PageQuery {
+
+  /**
+   * 中车电子商城订单号(orderNo),幂等判断关键字段
+   */
+  crrcOrderNo?: string;
+
+  /**
+   * 采购平台订单号(purchaserOrderNo),中车内部采购系统订单编号
+   */
+  purchaserOrderNo?: string;
+
+  /**
+   * 订单类型(preOrder):0普通订单 1预购单 2预存单
+   */
+  preOrder?: number;
+
+  /**
+   * 中车订单状态(orderStatus),原始状态值,做状态映射用
+   */
+  crrcOrderStatus?: string;
+
+  /**
+   * 电商系统订单号(mallOrderNo),中车确认接单后返回
+   */
+  mallOrderNo?: string;
+
+  /**
+   * 收货人姓名(name)
+   */
+  receiverName?: string;
+
+  /**
+   * 收货地址省编码(provinceId),中车行政区编码
+   */
+  provinceId?: string | number;
+
+  /**
+   * 收货地址市编码(cityId)
+   */
+  cityId?: string | number;
+
+  /**
+   * 收货地址区/县编码(countyId)
+   */
+  countyId?: string | number;
+
+  /**
+   * 收货地址乡镇编码(townId),无四级地址传0
+   */
+  townId?: string | number;
+
+  /**
+   * 收货详细地址(address)
+   */
+  detailAddress?: string;
+
+  /**
+   * 邮编(zip)
+   */
+  zip?: string;
+
+  /**
+   * 收货人手机号(mobile)
+   */
+  mobile?: string;
+
+  /**
+   * 收货人座机号(phone)
+   */
+  phone?: string;
+
+  /**
+   * 收货人邮箱(email)
+   */
+  email?: string;
+
+  /**
+   * 下单人姓名(buyer)
+   */
+  buyerName?: string;
+
+  /**
+   * 下单人手机号(buyerMobile)
+   */
+  buyerMobile?: string;
+
+  /**
+   * 采购单位名称(purchaserName)
+   */
+  purchaserName?: string;
+
+  /**
+   * 采购部门名称(purchaserDeptName),多级结构字符串
+   */
+  purchaserDeptName?: string;
+
+  /**
+   * 支付方式(paymentType):01账期 02按单 03混合支付
+   */
+  paymentType?: string;
+
+  /**
+   * 支付渠道(payClient):1微信 2支付宝
+   */
+  payClient?: string;
+
+  /**
+   * 支付流水号(paySerialNum)
+   */
+  paySerialNum?: string;
+
+  /**
+   * 账期支付金额(payAccount),混合支付时必填
+   */
+  payAccount?: number;
+
+  /**
+   * 现金支付金额(payMoney),混合支付时必填
+   */
+  payMoney?: number;
+
+  /**
+   * 预存款支付金额(payPrestore)
+   */
+  payPrestore?: number;
+
+  /**
+   * 是否需要发货凭证(voucher):0否 1货物照片
+   */
+  voucher?: string;
+
+  /**
+   * 中车订单创建时间(orderTime),格式YYYY-MM-DD HH:MM:SS
+   */
+  orderTime?: string;
+
+  /**
+   * 中车接口原始返回JSON报文(留存做审计与问题排查)
+   */
+  rawJson?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 38 - 0
src/api/order/orderProduct/index.ts

@@ -0,0 +1,38 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { OrderProductVO, OrderProductQuery, OrderProductForm } from './types';
+
+/**
+ * 查询订单商品明细列表
+ * @param query
+ * @returns {*}
+ */
+export const listOrderProduct = (query?: OrderProductQuery): AxiosPromise<OrderProductVO[]> => {
+    return request({
+        url: '/order/orderProduct/list',
+        method: 'get',
+        params: query
+    });
+};
+
+/**
+ * 获取订单商品明细详细信息
+ * @param id
+ */
+export const getOrderProduct = (id: string | number): AxiosPromise<OrderProductVO> => {
+    return request({
+        url: '/order/orderProduct/' + id,
+        method: 'get'
+    });
+};
+
+/**
+ * 中车查看订单商品
+ * @param id
+ */
+export const getZhongCheOrderProducts = (id: string | number): AxiosPromise<OrderProductVO[]> => {
+    return request({
+        url: '/order/orderProduct/zhongche/' + id,
+        method: 'get'
+    });
+};

+ 194 - 0
src/api/order/orderProduct/types.ts

@@ -0,0 +1,194 @@
+export interface OrderProductVO {
+    /**
+     * 订单商品明细ID
+     */
+    id: string | number;
+
+    /**
+     * 订单ID
+     */
+    orderId: string | number;
+
+    /**
+     * 原始商品ID(用于子订单商品指向主订单)
+     */
+    originalItemId: string | number;
+
+    /**
+     * 被分配到的子订单ID
+     */
+    assignedChildOrderId: string | number;
+
+    /**
+     * 订单编号
+     */
+    orderNo: string;
+
+    /**
+     * 发货单编号
+     */
+    shipmentNo: string;
+
+    /**
+     * 产品ID
+     */
+    productId: string | number;
+
+    /**
+     * 产品编号(业务编码)
+     */
+    productNo: string;
+
+    /**
+     * 产品名称
+     */
+    productName: string;
+
+    productUnitId: string | number;
+
+    /**
+     * 产品单位
+     */
+    productUnit: string;
+
+    /**
+     * 产品图片URL
+     */
+    productImage: string;
+
+    /**
+     * 产品图片URLUrl
+     */
+    productImageUrl: string;
+
+    /**
+     * 平台价格(元)
+     */
+    platformPrice: number;
+
+    /**
+     * 税率
+     */
+    taxRate: number;
+
+    /**
+     * 市场价格
+     */
+    marketPrice: number;
+
+    /**
+     * 会员价格
+     */
+    memberPrice: number;
+
+    /**
+     * 采购价格
+     */
+    purchasingPrice: number;
+
+    /**
+     * 最高采购价格
+     */
+    maxPurchasePrice: number;
+
+    /**
+     * 最小起订量
+     */
+    minOrderQuantity: number;
+
+    /**
+     * 订单单价(元)
+     */
+    orderPrice: number;
+
+    /**
+     * 订购数量
+     */
+    orderQuantity: number;
+
+    /**
+     * 行小计金额(元)
+     */
+    subtotal: number;
+
+    /**
+     * 最低销售价(元)
+     */
+    minSellingPrice: number;
+
+    /**
+     * 已签收数量
+     */
+    signedQuantity: number;
+
+    /**
+     * 已发货数量
+     */
+    quantitySent: number;
+
+    /**
+     * 未发货数量
+     */
+    unsentQuantity: number;
+
+    /**
+     * 是否申请售后
+     */
+    isAfterSale: string;
+
+    /**
+     * 售后申请数量
+     */
+    afterSaleQuantity: number;
+
+    /**
+     * 未退数量
+     */
+    availableQty: number;
+
+    /**
+     * 退款金额(元)
+     */
+    returnAmount: number;
+
+    /**
+     * 预计送达时间
+     */
+    preDeliveryDate: string;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    status: string;
+
+    /**
+     * 备注
+     */
+    remark: string;
+
+    platformCode: string;
+
+    assignmentStatus: string;
+
+    dataSource: string;
+
+    /**
+     * 品牌名称
+     */
+    brandName: string;
+}
+
+export interface OrderProductQuery extends PageQuery {
+    orderNo?: string;
+    productName?: string;
+    status?: string;
+}
+
+export interface OrderProductForm {
+    id?: string | number;
+    orderId?: string | number;
+    orderNo?: string;
+    productId?: string | number;
+    productName?: string;
+    remark?: string;
+}

+ 107 - 0
src/api/order/zhongcheReturn/index.ts

@@ -0,0 +1,107 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ZhongcheReturnVO, ZhongcheReturnForm, ZhongcheReturnQuery } from '@/api/order/zhongcheReturn/types';
+
+/**
+ * 查询中车售后单列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listZhongcheReturn = (query?: ZhongcheReturnQuery): AxiosPromise<ZhongcheReturnVO[]> => {
+  return request({
+    url: '/order/zhongcheReturn/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询中车售后单详细
+ * @param id
+ */
+export const getZhongcheReturn = (id: string | number): AxiosPromise<ZhongcheReturnVO> => {
+  return request({
+    url: '/order/zhongcheReturn/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增中车售后单
+ * @param data
+ */
+export const addZhongcheReturn = (data: ZhongcheReturnForm) => {
+  return request({
+    url: '/order/zhongcheReturn',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改中车售后单
+ * @param data
+ */
+export const updateZhongcheReturn = (data: ZhongcheReturnForm) => {
+  return request({
+    url: '/order/zhongcheReturn',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除中车售后单
+ * @param id
+ */
+export const delZhongcheReturn = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/order/zhongcheReturn/' + id,
+    method: 'delete'
+  });
+};
+
+/**
+ * 接受售后
+ */
+export const acceptAfterSale = (data: any) => {
+  return request({
+    url: '/order/zhongcheReturn/accept/aftersale',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 拒绝售后
+ */
+export const rejectAfterSale = (id: number | string, rejectReason: string) => {
+  return request({
+    url: '/order/zhongcheReturn/reject/aftersale',
+    method: 'put',
+    params: { id, rejectReason }
+  });
+};
+
+/**
+ * 确认收到退货
+ */
+export const confirmReceived = (id: number | string) => {
+  return request({
+    url: '/order/zhongcheReturn/confirm/received',
+    method: 'put',
+    params: { id }
+  });
+};
+
+/**
+ * 确认退款完成
+ */
+export const refundAfterSale = (id: number | string) => {
+  return request({
+    url: '/order/zhongcheReturn/refund/aftersale',
+    method: 'put',
+    params: { id }
+  });
+};

+ 441 - 0
src/api/order/zhongcheReturn/types.ts

@@ -0,0 +1,441 @@
+export interface ZhongcheReturnVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 原订单id
+   */
+  orderId: string | number;
+
+  /**
+   * 原订单编号
+   */
+  orderNo: string;
+
+  /**
+   * 售后服务类型(如:退货、换货、仅退款等)
+   */
+  serviceType: string;
+
+  /**
+   * 退货申请时间
+   */
+  returnTime: string;
+
+  /**
+   * 退货单号
+   */
+  returnNo: string;
+
+  /**
+   * 客户编号
+   */
+  customerId: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo: string;
+
+  /**
+   * 客户姓名
+   */
+  customerName: string;
+
+  /**
+   * 售后金额
+   */
+  afterSaleAmount: number;
+
+  /**
+   * 退货订单状态
+   */
+  returnStatus: string;
+
+  /**
+   * 退货商品总数量
+   */
+  returnProductNum: number;
+
+  /**
+   * 处理完成时间
+   */
+  processingTime: string;
+
+  /**
+   * 退货原因id
+   */
+  returnReasonId: string | number;
+
+  /**
+   * 退货原因
+   */
+  returnReason: string;
+
+  /**
+   * 问题描述
+   */
+  problemDescription: string;
+
+  /**
+   * 凭证图片URL
+   */
+  voucherPhoto: string;
+
+  /**
+   * 运费金额
+   */
+  shippingFee: number;
+
+  /**
+   * 是否承担运费
+   */
+  isShippingFee: string;
+
+  /**
+   * 原订单总金额
+   */
+  orderAmount: number;
+
+  /**
+   * 实际退款金额
+   */
+  returnAmount: number;
+
+  /**
+   * 售后备注
+   */
+  afterSalesRemarks: string;
+
+  /**
+   * 退货方式(如:上门取件、自行寄回)
+   */
+  returnMethod: string;
+
+  /**
+   * 取件人姓名
+   */
+  chargebackName: string;
+
+  /**
+   * 取件联系电话
+   */
+  chargebackPhone: string;
+
+  /**
+   * 预约取件时间
+   */
+  chargebackPickupTime: string;
+
+  /**
+   * 取件省
+   */
+  chargebackProvincial: string;
+
+  /**
+   * 取件市
+   */
+  chargebackCity: string;
+
+  /**
+   * 取件区/县
+   */
+  chargebackCounty: string;
+
+  /**
+   * 取件区/县
+   */
+  provincialCityCounty: string;
+
+  /**
+   * 取件详细地址
+   */
+  chargebackAddress: string;
+
+  /**
+   * 推送状态(如:0-未推送, 1-已推送)
+   */
+  pushStatus: string;
+
+  /**
+   * 物流公司id
+   */
+  logisticsId: string | number;
+
+  /**
+   * 物流公司名称
+   */
+  logisticsName: string;
+
+  /**
+   * 物流单号
+   */
+  logisticsNo: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 下单客户
+   */
+  buyerName: string;
+
+  /**
+   * 联系电话
+   */
+  buyerMobile: string;
+
+  /**
+   * 取件方式 字典类型 pick_type
+   */
+  pickType: string;
+
+}
+
+export interface ZhongcheReturnForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 原订单id
+   */
+  orderId?: string | number;
+
+  /**
+   * 原订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 售后服务类型(如:退货、换货、仅退款等)
+   */
+  serviceType?: string;
+
+  /**
+   * 退货申请时间
+   */
+  returnTime?: string;
+
+  /**
+   * 退货单号
+   */
+  returnNo?: string;
+
+  /**
+   * 客户编号
+   */
+  customerId?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerNo?: string;
+
+  /**
+   * 客户姓名
+   */
+  customerName?: string;
+
+  /**
+   * 售后金额
+   */
+  afterSaleAmount?: number;
+
+  /**
+   * 退货订单状态
+   */
+  returnStatus?: string;
+
+  /**
+   * 退货商品总数量
+   */
+  returnProductNum?: number;
+
+  /**
+   * 处理完成时间
+   */
+  processingTime?: string;
+
+  /**
+   * 退货原因id
+   */
+  returnReasonId?: string | number;
+
+  /**
+   * 退货原因
+   */
+  returnReason?: string;
+
+  /**
+   * 问题描述
+   */
+  problemDescription?: string;
+
+  /**
+   * 凭证图片URL
+   */
+  voucherPhoto?: string;
+
+  /**
+   * 运费金额
+   */
+  shippingFee?: number;
+
+  /**
+   * 是否承担运费
+   */
+  isShippingFee?: string;
+
+  /**
+   * 原订单总金额
+   */
+  orderAmount?: number;
+
+  /**
+   * 实际退款金额
+   */
+  returnAmount?: number;
+
+  /**
+   * 售后备注
+   */
+  afterSalesRemarks?: string;
+
+  /**
+   * 退货方式(如:上门取件、自行寄回)
+   */
+  returnMethod?: string;
+
+  /**
+   * 取件人姓名
+   */
+  chargebackName?: string;
+
+  /**
+   * 取件联系电话
+   */
+  chargebackPhone?: string;
+
+  /**
+   * 预约取件时间
+   */
+  chargebackPickupTime?: string;
+
+  /**
+   * 取件省
+   */
+  chargebackProvincial?: string;
+
+  /**
+   * 取件市
+   */
+  chargebackCity?: string;
+
+  /**
+   * 取件区/县
+   */
+  chargebackCounty?: string;
+
+  /**
+   * 取件区/县
+   */
+  provincialCityCounty?: string;
+
+  /**
+   * 取件详细地址
+   */
+  chargebackAddress?: string;
+
+  /**
+   * 推送状态(如:0-未推送, 1-已推送)
+   */
+  pushStatus?: string;
+
+  /**
+   * 物流公司id
+   */
+  logisticsId?: string | number;
+
+  /**
+   * 物流公司名称
+   */
+  logisticsName?: string;
+
+  /**
+   * 物流单号
+   */
+  logisticsNo?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 下单客户
+   */
+  buyerName?: string;
+
+  /**
+   * 联系电话
+   */
+  buyerMobile?: string;
+
+  /**
+   * 取件方式 字典类型 pick_type
+   */
+  pickType?: string;
+
+}
+
+export interface ZhongcheReturnQuery extends PageQuery {
+
+  /**
+   * 售后服务类型(如:退货、换货、仅退款等)
+   */
+  serviceType?: string;
+
+  /**
+   * 退货单号
+   */
+  returnNo?: string;
+
+  /**
+   * 退货订单状态
+   */
+  returnStatus?: string;
+
+  /**
+   * 售后备注
+   */
+  afterSalesRemarks?: string;
+
+  /**
+   * 退货方式(如:上门取件、自行寄回)
+   */
+  returnMethod?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}
+
+
+

+ 124 - 0
src/api/order/zhongcheorder/index.ts

@@ -0,0 +1,124 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ZhongcheorderVO, ZhongcheorderForm, ZhongcheorderQuery } from '@/api/order/zhongcheorder/types';
+
+/**
+ * 查询订单列表列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listZhongcheorder = (query?: ZhongcheorderQuery): AxiosPromise<ZhongcheorderVO[]> => {
+  return request({
+    url: '/order/zhongcheorder/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询订单列表详细
+ * @param id
+ */
+export const getZhongcheorder = (id: string | number): AxiosPromise<ZhongcheorderVO> => {
+  return request({
+    url: '/order/zhongcheorder/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增订单列表
+ * @param data
+ */
+export const addZhongcheorder = (data: ZhongcheorderForm) => {
+  return request({
+    url: '/order/zhongcheorder',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改订单列表
+ * @param data
+ */
+export const updateZhongcheorder = (data: ZhongcheorderForm) => {
+  return request({
+    url: '/order/zhongcheorder',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除订单列表
+ * @param id
+ */
+export const delZhongcheorder = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/order/zhongcheorder/' + id,
+    method: 'delete'
+  });
+};
+
+export const acceptZhongcheorder = (id: string | number): AxiosPromise<string> => {
+  return request({
+    url: '/order/zhongcheorder/accept',
+    method: 'post',
+    params: { id }
+  });
+};
+
+export const rejectZhongcheorder = (id: string | number, reason?: string): AxiosPromise<string> => {
+  return request({
+    url: '/order/zhongcheorder/reject',
+    method: 'post',
+    params: { id, reason }
+  });
+};
+
+export const getZhongcheorderLogistics = (id: string | number): AxiosPromise<any> => {
+  return request({
+    url: '/order/zhongcheorder/logistics',
+    method: 'get',
+    params: { id }
+  });
+};
+
+export const getZhongcheorderLogisticsTrack = (id: string | number): AxiosPromise<any> => {
+  return request({
+    url: '/order/zhongcheorder/logistics/track',
+    method: 'get',
+    params: { id }
+  });
+};
+
+export const settlementZhongcheorder = (id: string | number): AxiosPromise<any> => {
+  return request({
+    url: '/order/zhongcheorder/settlement',
+    method: 'put',
+    params: { id }
+  });
+};
+
+export const setZhongcheorderDeadline = (id: string | number, repaymentDeadline: string): AxiosPromise<any> => {
+  return request({
+    url: '/order/zhongcheorder/setdeadline',
+    method: 'put',
+    params: { id, repaymentDeadline }
+  });
+};
+
+/**
+ * 上传发票
+ * @param id 订单ID
+ * @param invoice 发票文件ID或URL
+ */
+export const uploadZhongcheorderInvoice = (id: string | number, invoice: string): AxiosPromise<any> => {
+  return request({
+    url: '/order/zhongcheorder/upload/invoice',
+    method: 'put',
+    params: { id, invoice }
+  });
+};

+ 599 - 0
src/api/order/zhongcheorder/types.ts

@@ -0,0 +1,599 @@
+export interface ZhongcheorderVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 父订单id
+   */
+  parentOrderId: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderNo: string;
+
+  buyerName: string;
+
+  preOrder: number;
+
+  /**
+   * 发货单号
+   */
+  shipmentNo: string;
+
+  /**
+   * 子订单编号
+   */
+  subOrderNo: string;
+
+  /**
+   * 所属公司
+   */
+  companyId: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerCode: string;
+
+  /**
+   * 客户ID(关联客户主表)
+   */
+  customerId: string | number;
+
+  /**
+   * 用户ID(关联用户表 登陆的联系人Id)
+   */
+  userId: string | number;
+
+  /**
+   * 收货地址ID
+   */
+  shippingAddressId: string | number;
+
+  /**
+   * 采购事由
+   */
+  purchaseReason: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType: string;
+
+  /**
+   * 支付方式
+   */
+  payType: string;
+
+  /**
+   * 发货仓库
+   */
+  warehouseId: string | number;
+
+  /**
+   * 信用额度(元)
+   */
+  creditLimit: number;
+
+  /**
+   * 预计送达时间
+   */
+  expectedDeliveryTime: string;
+
+  /**
+   * 业务员姓名/工号
+   */
+  businessStaff: string;
+
+  /**
+   * 客服人员
+   */
+  customerService: string;
+
+  /**
+   * 业务部门
+   */
+  businessDept: string;
+
+  /**
+   * 用户所属部门
+   */
+  userDept: string;
+
+  /**
+   * 商品总数量
+   */
+  productQuantity: number;
+
+  /**
+   * 运费(元)
+   */
+  shippingFee: number;
+
+  /**
+   * 订单总金额(元)
+   */
+  totalAmount: number;
+
+  /**
+   * 应付金额(元)
+   */
+  payableAmount: number;
+
+  /**
+   * 支付状态
+   */
+  paymentStatus: string;
+
+  /**
+   * 订单来源
+   */
+  orderSource: string;
+
+  /**
+   * 订单状态
+   */
+  orderStatus: string;
+
+  /**
+   * 下单时间
+   */
+  orderTime: string;
+
+  /**
+   * 确认时间
+   */
+  confirmTime: string;
+
+  /**
+   * 发货时间
+   */
+  shippingTime: string;
+
+  /**
+   * 收货时间
+   */
+  receivingTime: string;
+
+  /**
+   * 拆单状态:0=未拆, 1=已拆出子单
+   */
+  splitStatus: string;
+
+  /**
+   * 是否为拆分子单:0=是 (子订单), 1=否 (父订单)
+   */
+  isSplitChild: string;
+
+  /**
+   * 包裹数量
+   */
+  packageCount: number;
+
+  /**
+   * 签收数量
+   */
+  signedQuantity: number;
+
+  /**
+   * 已完成售后数量
+   */
+  afterSaleCompleted: number;
+
+  /**
+   * 申请售后数量
+   */
+  afterSalePending: number;
+
+  /**
+   * 配送时效描述
+   */
+  deliveryDesc: string;
+
+  /**
+   * 推送状态
+   */
+  pushStatus: string;
+
+  /**
+   * 订单附件文件路径
+   */
+  attachmentPath: string;
+
+  /**
+   * 配送类型
+   */
+  deliveryType: string;
+
+  /**
+   * 创建类别
+   */
+  orderCategory: string;
+
+  /**
+   * 取消或异常原因
+   */
+  cancelReason: string;
+
+  /**
+   * 费用类型
+   */
+  expenseType: string;
+
+  /**
+   * 用户编号
+   */
+  userNo: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+  /**
+   * 对账状态
+   */
+  reconciliationStatus: string;
+
+  /**
+   * 是否妥投
+   */
+  isProperDelivery: string;
+
+  /**
+   * 开票状态
+   */
+  invoiceStatus: string;
+
+  /**
+   * 结算状态
+   */
+  settlementStatus: string;
+
+  /**
+   * 截止还款时间
+   */
+  repaymentDeadline: string;
+
+}
+
+export interface ZhongcheorderForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 父订单id
+   */
+  parentOrderId?: string | number;
+
+  /**
+   * 订单编号
+   */
+  orderNo?: string;
+
+  buyerName?: string;
+
+  preOrder?: number;
+
+  /**
+   * 发货单号
+   */
+  shipmentNo?: string;
+
+  /**
+   * 子订单编号
+   */
+  subOrderNo?: string;
+
+  /**
+   * 所属公司
+   */
+  companyId?: string | number;
+
+  /**
+   * 客户编号
+   */
+  customerCode?: string;
+
+  /**
+   * 客户ID(关联客户主表)
+   */
+  customerId?: string | number;
+
+  /**
+   * 用户ID(关联用户表 登陆的联系人Id)
+   */
+  userId?: string | number;
+
+  /**
+   * 收货地址ID
+   */
+  shippingAddressId?: string | number;
+
+  /**
+   * 采购事由
+   */
+  purchaseReason?: string;
+
+  /**
+   * 发票类型
+   */
+  invoiceType?: string;
+
+  /**
+   * 支付方式
+   */
+  payType?: string;
+
+  /**
+   * 发货仓库
+   */
+  warehouseId?: string | number;
+
+  /**
+   * 信用额度(元)
+   */
+  creditLimit?: number;
+
+  /**
+   * 预计送达时间
+   */
+  expectedDeliveryTime?: string;
+
+  /**
+   * 业务员姓名/工号
+   */
+  businessStaff?: string;
+
+  /**
+   * 客服人员
+   */
+  customerService?: string;
+
+  /**
+   * 业务部门
+   */
+  businessDept?: string;
+
+  /**
+   * 用户所属部门
+   */
+  userDept?: string;
+
+  /**
+   * 商品总数量
+   */
+  productQuantity?: number;
+
+  /**
+   * 运费(元)
+   */
+  shippingFee?: number;
+
+  /**
+   * 订单总金额(元)
+   */
+  totalAmount?: number;
+
+  /**
+   * 应付金额(元)
+   */
+  payableAmount?: number;
+
+  /**
+   * 支付状态
+   */
+  paymentStatus?: string;
+
+  /**
+   * 订单来源
+   */
+  orderSource?: string;
+
+  /**
+   * 订单状态
+   */
+  orderStatus?: string;
+
+  /**
+   * 下单时间
+   */
+  orderTime?: string;
+
+  /**
+   * 确认时间
+   */
+  confirmTime?: string;
+
+  /**
+   * 发货时间
+   */
+  shippingTime?: string;
+
+  /**
+   * 收货时间
+   */
+  receivingTime?: string;
+
+  /**
+   * 拆单状态:0=未拆, 1=已拆出子单
+   */
+  splitStatus?: string;
+
+  /**
+   * 是否为拆分子单:0=是 (子订单), 1=否 (父订单)
+   */
+  isSplitChild?: string;
+
+  /**
+   * 包裹数量
+   */
+  packageCount?: number;
+
+  /**
+   * 签收数量
+   */
+  signedQuantity?: number;
+
+  /**
+   * 已完成售后数量
+   */
+  afterSaleCompleted?: number;
+
+  /**
+   * 申请售后数量
+   */
+  afterSalePending?: number;
+
+  /**
+   * 配送时效描述
+   */
+  deliveryDesc?: string;
+
+  /**
+   * 推送状态
+   */
+  pushStatus?: string;
+
+  /**
+   * 订单附件文件路径
+   */
+  attachmentPath?: string;
+
+  /**
+   * 配送类型
+   */
+  deliveryType?: string;
+
+  /**
+   * 创建类别
+   */
+  orderCategory?: string;
+
+  /**
+   * 取消或异常原因
+   */
+  cancelReason?: string;
+
+  /**
+   * 费用类型
+   */
+  expenseType?: string;
+
+  /**
+   * 用户编号
+   */
+  userNo?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+  /**
+   * 对账状态
+   */
+  reconciliationStatus?: string;
+
+  /**
+   * 是否妥投
+   */
+  isProperDelivery?: string;
+
+  /**
+   * 开票状态
+   */
+  invoiceStatus?: string;
+
+  /**
+   * 结算状态
+   */
+  settlementStatus?: string;
+
+  /**
+   * 截止还款时间
+   */
+  repaymentDeadline?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 审核状态(0 待审核 1已通过 2已驳回)
+   */
+  checkStatus?: string;
+
+  /**
+   * 分配状态(0待分配 1已分配 )
+   */
+  assignmentStatus?: string;
+
+  /**
+   * 分配对象ID
+   */
+  assigneeId?: string | number;
+
+  /**
+   * 分配对象类型:srm-供应商, bp-伙伴商
+   */
+  assigneeType?: string;
+
+}
+
+export interface ZhongcheorderQuery extends PageQuery {
+
+  /**
+   * 订单编号
+   */
+  orderNo?: string;
+
+  /**
+   * 买家姓名
+   */
+  buyerName?: string;
+
+  /**
+   * 预订单
+   */
+  preOrder?: number;
+
+  /**
+   * 支付状态
+   */
+  paymentStatus?: string;
+
+  /**
+   * 订单状态
+   */
+  orderStatus?: string;
+
+  /**
+   * 对账状态
+   */
+  reconciliationStatus?: string;
+
+  /**
+   * 是否妥投
+   */
+  isProperDelivery?: string;
+
+  /**
+   * 结算状态
+   */
+  settlementStatus?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 442 - 0
src/views/order/zhongcheReturn/index.vue

@@ -0,0 +1,442 @@
+<template>
+  <div class="p-2">
+    <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
+      <div v-show="showSearch" class="mb-[10px]">
+        <el-card shadow="hover">
+          <el-form ref="queryFormRef" :model="queryParams" :inline="true">
+            <el-form-item label="退货单号" prop="returnNo">
+              <el-input v-model="queryParams.returnNo" placeholder="请输入退货单号" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item label="售后备注" prop="afterSalesRemarks">
+              <el-input v-model="queryParams.afterSalesRemarks" placeholder="请输入售后备注" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item label="退货方式" prop="returnMethod">
+              <el-input v-model="queryParams.returnMethod" placeholder="请输入退货方式" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+              <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+            </el-form-item>
+          </el-form>
+        </el-card>
+      </div>
+    </transition>
+
+    <el-card shadow="never">
+      <template #header>
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['order:zhongcheReturn:export']">导出</el-button>
+          </el-col>
+          <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+      </template>
+
+      <el-table v-loading="loading" border :data="zhongcheReturnList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="主键ID" align="center" prop="id" v-if="false" />
+        <el-table-column label="退货单号" align="center" prop="returnNo" width="180" />
+        <el-table-column label="发起售后时间" align="center" prop="returnTime" width="180">
+          <template #default="scope">
+            <span>{{ parseTime(scope.row.returnTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="退货原因" align="center" prop="returnReason" />
+
+        <el-table-column label="售后金额" align="center" prop="afterSaleAmount" />
+        <el-table-column label="退货订单状态" align="center" prop="returnStatus">
+          <template #default="scope">
+            <dict-tag :options="return_status" :value="scope.row.returnStatus" />
+          </template>
+        </el-table-column>
+        <el-table-column label="商品数量" align="center" prop="returnProductNum" />
+        <el-table-column label="问题描述" align="center" prop="problemDescription" />
+        <el-table-column label="售后方式" align="center" prop="serviceType">
+          <template #default="scope">
+            <dict-tag :options="service_type" :value="scope.row.serviceType" />
+          </template>
+        </el-table-column>
+        <el-table-column label="取件方式" align="center" prop="pickType">
+          <template #default="scope">
+            <dict-tag :options="pick_type" :value="scope.row.pickType" />
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template #default="scope">
+            <el-button link type="primary" @click="handleDetail(scope.row)">订单详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+    </el-card>
+    <!-- 售后订单详情对话框 -->
+    <el-dialog :title="dialog.title" v-model="dialog.visible" width="600px" append-to-body>
+      <el-form ref="zhongcheReturnFormRef" :model="form" :rules="rules" label-width="100px">
+        <el-form-item label="订单编号" prop="returnNo">
+          <el-input v-model="form.returnNo" readonly />
+        </el-form-item>
+        <el-form-item label="状态" prop="returnStatus">
+          <el-input :value="getReturnStatusLabel(form.returnStatus)" readonly />
+        </el-form-item>
+        <el-form-item label="申请时间" prop="returnTime">
+          <el-input v-model="form.returnTime" readonly />
+        </el-form-item>
+        <el-form-item label="下单客户" prop="buyerName">
+          <el-input v-model="form.buyerName" readonly />
+        </el-form-item>
+        <el-form-item label="联系电话" prop="buyerMobile">
+          <el-input v-model="form.buyerMobile" readonly />
+        </el-form-item>
+        <el-form-item label="退款原因" prop="returnReason">
+          <el-input v-model="form.returnReason" readonly />
+        </el-form-item>
+        <el-form-item label="问题描述" prop="problemDescription">
+          <el-input v-model="form.problemDescription" type="textarea" :rows="3" readonly />
+        </el-form-item>
+        <el-form-item label="售后图片" prop="voucherPhoto">
+          <div style="display: flex; gap: 10px; flex-wrap: wrap;" v-if="form.voucherPhoto">
+            <el-image
+              v-for="(url, index) in form.voucherPhoto.split(',').filter(Boolean)"
+              :key="index"
+              :src="url"
+              :preview-src-list="form.voucherPhoto.split(',').filter(Boolean)"
+              :initial-index="index"
+              fit="cover"
+              style="width: 80px; height: 80px; border-radius: 5px; cursor: pointer; box-shadow: 0 0 5px 1px #ccc;"
+              preview-teleported
+            />
+          </div>
+        </el-form-item>
+        <el-form-item>
+          <div style="display: flex; gap: 10px; margin-top: 10px;">
+            <el-button type="primary" @click="handleMerchantProcess">商家接受</el-button>
+            <el-button color="#f56c6c" style="color: white;" @click="handleMerchantReject">商家拒绝</el-button>
+            <el-button type="primary" @click="handleMerchantRetrieve">商家收到商品</el-button>
+            <el-button type="primary" @click="handleReturnComplete">确认退款</el-button>
+          </div>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+
+    <!-- 接受售后补充信息对话框 -->
+    <el-dialog title="填写取件信息" v-model="acceptDialog.visible" width="500px" append-to-body>
+      <el-form ref="acceptFormRef" :model="acceptForm" :rules="acceptRules" label-width="100px">
+        <el-form-item label="联系人" prop="name">
+          <el-input v-model="acceptForm.name" placeholder="请输入联系人" />
+        </el-form-item>
+        <el-form-item label="手机号" prop="mobile">
+          <el-input v-model="acceptForm.mobile" placeholder="请输入手机号" />
+        </el-form-item>
+        <el-form-item label="省编码" prop="provinceId">
+          <el-input v-model="acceptForm.provinceId" placeholder="请输入省编码" />
+        </el-form-item>
+        <el-form-item label="市编码" prop="cityId">
+          <el-input v-model="acceptForm.cityId" placeholder="请输入市编码" />
+        </el-form-item>
+        <el-form-item label="区县编码" prop="countyId">
+          <el-input v-model="acceptForm.countyId" placeholder="请输入区县编码" />
+        </el-form-item>
+        
+        <el-form-item label="详细地址" prop="address">
+          <el-input v-model="acceptForm.address" placeholder="请输入详细地址" />
+        </el-form-item>
+        <el-form-item label="邮编" prop="zip">
+          <el-input v-model="acceptForm.zip" placeholder="请输入邮编" />
+        </el-form-item>
+        <el-form-item label="座机号" prop="phone">
+          <el-input v-model="acceptForm.phone" placeholder="请输入座机号" />
+        </el-form-item>
+        <el-form-item label="邮箱" prop="email">
+          <el-input v-model="acceptForm.email" placeholder="请输入邮箱" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitAcceptForm">确 定</el-button>
+          <el-button @click="acceptDialog.visible = false">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="ZhongcheReturn" lang="ts">
+import { listZhongcheReturn, getZhongcheReturn, delZhongcheReturn, addZhongcheReturn, updateZhongcheReturn, acceptAfterSale, rejectAfterSale, confirmReceived, refundAfterSale } from '@/api/order/zhongcheReturn';
+import { ZhongcheReturnVO, ZhongcheReturnQuery, ZhongcheReturnForm } from '@/api/order/zhongcheReturn/types';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { return_status } = toRefs<any>(proxy?.useDict('return_status'));
+const { service_type } = toRefs<any>(proxy?.useDict('service_type'));
+const { pick_type } = toRefs<any>(proxy?.useDict('pick_type'));
+
+const zhongcheReturnList = ref<ZhongcheReturnVO[]>([]);
+const buttonLoading = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref<Array<string | number>>([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+
+const queryFormRef = ref<ElFormInstance>();
+const zhongcheReturnFormRef = ref<ElFormInstance>();
+const acceptFormRef = ref<ElFormInstance>();
+
+const acceptDialog = reactive<DialogOption>({
+  visible: false,
+  title: '填写取件信息'
+});
+
+const acceptForm = ref<any>({});
+const acceptRules = reactive({
+  name: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
+  mobile: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
+  provinceId: [{ required: true, message: "省编码不能为空", trigger: "blur" }],
+  cityId: [{ required: true, message: "市编码不能为空", trigger: "blur" }],
+  countyId: [{ required: true, message: "区县编码不能为空", trigger: "blur" }],
+  address: [{ required: true, message: "详细地址不能为空", trigger: "blur" }],
+  email: [{ required: true, message: "邮箱不能为空", trigger: "blur" }]
+});
+
+const dialog = reactive<DialogOption>({
+  visible: false,
+  title: ''
+});
+
+const initFormData: ZhongcheReturnForm = {
+  id: undefined,
+  orderId: undefined,
+  orderNo: undefined,
+  serviceType: undefined,
+  returnTime: undefined,
+  returnNo: undefined,
+  customerId: undefined,
+  customerNo: undefined,
+  customerName: undefined,
+  afterSaleAmount: undefined,
+  returnStatus: undefined,
+  returnProductNum: undefined,
+  processingTime: undefined,
+  returnReasonId: undefined,
+  returnReason: undefined,
+  problemDescription: undefined,
+  voucherPhoto: undefined,
+  shippingFee: undefined,
+  isShippingFee: undefined,
+  orderAmount: undefined,
+  returnAmount: undefined,
+  afterSalesRemarks: undefined,
+  returnMethod: undefined,
+  chargebackName: undefined,
+  chargebackPhone: undefined,
+  chargebackPickupTime: undefined,
+  chargebackProvincial: undefined,
+  chargebackCity: undefined,
+  chargebackCounty: undefined,
+  provincialCityCounty: undefined,
+  chargebackAddress: undefined,
+  pushStatus: undefined,
+  logisticsId: undefined,
+  logisticsName: undefined,
+  logisticsNo: undefined,
+  status: undefined,
+  remark: undefined,
+  buyerName: undefined,
+  buyerMobile: undefined,
+  pickType: undefined,
+}
+const data = reactive<PageData<ZhongcheReturnForm, ZhongcheReturnQuery>>({
+  form: {...initFormData},
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    serviceType: undefined,
+    returnNo: undefined,
+    returnStatus: undefined,
+    afterSalesRemarks: undefined,
+    returnMethod: undefined,
+    params: {
+    }
+  },
+  rules: {
+  }
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 查询中车售后单列表 */
+const getList = async () => {
+  loading.value = true;
+  const res = await listZhongcheReturn(queryParams.value);
+  zhongcheReturnList.value = res.rows;
+  total.value = res.total;
+  loading.value = false;
+}
+
+/** 取消按钮 */
+const cancel = () => {
+  reset();
+  dialog.visible = false;
+}
+
+/** 表单重置 */
+const reset = () => {
+  form.value = {...initFormData};
+  zhongcheReturnFormRef.value?.resetFields();
+}
+
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.value.pageNum = 1;
+  getList();
+}
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+  queryFormRef.value?.resetFields();
+  handleQuery();
+}
+
+/** 多选框选中数据 */
+const handleSelectionChange = (selection: ZhongcheReturnVO[]) => {
+  ids.value = selection.map(item => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+}
+
+/** 订单详情按钮操作 */
+const handleDetail = async (row: ZhongcheReturnVO) => {
+  reset();
+  const _id = row.id;
+  const res = await getZhongcheReturn(_id);
+  Object.assign(form.value, res.data);
+  dialog.visible = true;
+  dialog.title = "售后订单详情";
+}
+
+/** 获取状态名称 */
+const getReturnStatusLabel = (val: string | undefined) => {
+  if (!val) return '';
+  const item = return_status.value.find((dict: any) => dict.value === val);
+  return item ? item.label : val;
+}
+
+/** 商家接受 */
+const handleMerchantProcess = async () => {
+  if (!form.value.id) return;
+  
+  if (form.value.pickType === '2' || form.value.pickType === '3') {
+    acceptForm.value = {
+      returnId: form.value.id,
+      pickType: form.value.pickType,
+      name: undefined,
+      provinceId: undefined,
+      cityId: undefined,
+      countyId: undefined,
+      townId: undefined,
+      address: undefined,
+      zip: undefined,
+      mobile: undefined,
+      phone: undefined,
+      email: undefined
+    };
+    acceptDialog.visible = true;
+  } else {
+    await proxy?.$modal.confirm("是否确认商家接受该售后?");
+    buttonLoading.value = true;
+    await acceptAfterSale({ returnId: form.value.id, pickType: form.value.pickType }).finally(() => buttonLoading.value = false);
+    proxy?.$modal.msgSuccess("操作成功");
+    dialog.visible = false;
+    await getList();
+  }
+}
+
+/** 提交接受售后补充信息 */
+const submitAcceptForm = () => {
+  acceptFormRef.value?.validate(async (valid: boolean) => {
+    if (valid) {
+      buttonLoading.value = true;
+      await acceptAfterSale(acceptForm.value).finally(() => buttonLoading.value = false);
+      proxy?.$modal.msgSuccess("操作成功");
+      acceptDialog.visible = false;
+      dialog.visible = false;
+      await getList();
+    }
+  });
+}
+
+/** 商家拒绝 */
+const handleMerchantReject = () => {
+  if (!form.value.id) return;
+  proxy?.$modal.prompt("请输入拒绝原因").then(async ({ value }) => {
+    if (!value) {
+      return proxy?.$modal.msgError("拒绝原因不能为空");
+    }
+    buttonLoading.value = true;
+    await rejectAfterSale(form.value.id as string | number, value).finally(() => buttonLoading.value = false);
+    proxy?.$modal.msgSuccess("已拒绝该售后");
+    dialog.visible = false;
+    await getList();
+  }).catch(() => {});
+}
+
+/** 商家收到商品 */
+const handleMerchantRetrieve = async () => {
+  if (!form.value.id) return;
+  await proxy?.$modal.confirm("是否确认收到退货商品?");
+  buttonLoading.value = true;
+  await confirmReceived(form.value.id).finally(() => buttonLoading.value = false);
+  proxy?.$modal.msgSuccess("确认收货成功");
+  dialog.visible = false;
+  await getList();
+}
+
+/** 确认退款 */
+const handleReturnComplete = async () => {
+  if (!form.value.id) return;
+  await proxy?.$modal.confirm("是否确认完成售后退款?");
+  buttonLoading.value = true;
+  await refundAfterSale(form.value.id).finally(() => buttonLoading.value = false);
+  proxy?.$modal.msgSuccess("退款处理成功");
+  dialog.visible = false;
+  await getList();
+}
+
+/** 提交按钮 */
+const submitForm = () => {
+  zhongcheReturnFormRef.value?.validate(async (valid: boolean) => {
+    if (valid) {
+      buttonLoading.value = true;
+      if (form.value.id) {
+        await updateZhongcheReturn(form.value).finally(() =>  buttonLoading.value = false);
+      } else {
+        await addZhongcheReturn(form.value).finally(() =>  buttonLoading.value = false);
+      }
+      proxy?.$modal.msgSuccess("操作成功");
+      dialog.visible = false;
+      await getList();
+    }
+  });
+}
+
+/** 删除按钮操作 */
+const handleDelete = async (row?: ZhongcheReturnVO) => {
+  const _ids = row?.id || ids.value;
+  await proxy?.$modal.confirm('是否确认删除中车售后单编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
+  await delZhongcheReturn(_ids);
+  proxy?.$modal.msgSuccess("删除成功");
+  await getList();
+}
+
+/** 导出按钮操作 */
+const handleExport = () => {
+  proxy?.download('order/zhongcheReturn/export', {
+    ...queryParams.value
+  }, `zhongcheReturn_${new Date().getTime()}.xlsx`)
+}
+
+onMounted(() => {
+  getList();
+});
+</script>

+ 790 - 0
src/views/order/zhongcheorder/index.vue

@@ -0,0 +1,790 @@
+<template>
+  <div class="p-2">
+    <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
+      <div v-show="showSearch" class="mb-[10px]">
+        <el-card shadow="hover">
+          <el-form ref="queryFormRef" :model="queryParams" :inline="true">
+            <el-form-item label="订单编号" prop="orderNo">
+              <el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter="handleQuery" />
+            </el-form-item>
+            <el-form-item label="订单状态" prop="orderStatus">
+              <el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable style="width: 200px">
+                <el-option v-for="dict in order_status" :key="dict.value" :label="dict.label" :value="dict.value" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="支付状态" prop="paymentStatus">
+              <el-select v-model="queryParams.paymentStatus" placeholder="请选择支付状态" clearable style="width: 200px">
+                <el-option v-for="dict in payment_status" :key="dict.value" :label="dict.label" :value="dict.value" />
+              </el-select>
+            </el-form-item>
+            
+            <el-form-item>
+              <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+              <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+            </el-form-item>
+          </el-form>
+        </el-card>
+      </div>
+    </transition>
+
+    <el-card shadow="never">
+      <template #header>
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['order:zhongcheorder:add']">新增</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['order:zhongcheorder:edit']">修改</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['order:zhongcheorder:remove']">删除</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['order:zhongcheorder:export']">导出</el-button>
+          </el-col>
+          <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+      </template>
+
+      <el-table v-loading="loading" border :data="zhongcheorderList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column type="index" label="序号" width="60" align="center" />
+        <el-table-column label="订单编号" align="center" prop="orderNo" width="150" />
+        <el-table-column label="订单类型" align="center" prop="preOrder" width="100">
+          <template #default="scope">
+            <dict-tag :options="order_type" :value="scope.row.preOrder" />
+          </template>
+        </el-table-column>
+        <el-table-column label="下单人" align="center" prop="buyerName" />
+        <el-table-column label="下单时间" align="center" prop="orderTime" width="180">
+          <template #default="scope">
+            <span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="确认时间" align="center" prop="confirmTime" width="180">
+          <template #default="scope">
+            <span>{{ parseTime(scope.row.confirmTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="订单金额" align="center" prop="totalAmount" />
+        <el-table-column label="支付状态" align="center" prop="paymentStatus">
+          <template #default="scope">
+            <dict-tag :options="payment_status" :value="scope.row.paymentStatus" />
+          </template>
+        </el-table-column>
+        <el-table-column label="订单状态" align="center" prop="orderStatus">
+          <template #default="scope">
+            <dict-tag :options="order_status" :value="scope.row.orderStatus" />
+          </template>
+        </el-table-column>
+
+        <el-table-column label="对账状态" align="center" prop="reconciliationStatus">
+          <template #default="scope">
+            <dict-tag :options="reconciliation_status" :value="scope.row.reconciliationStatus" />
+          </template>
+        </el-table-column>
+        <el-table-column label="是否妥投" align="center" prop="isProperDelivery">
+          <template #default="scope">
+            <dict-tag :options="is_proper_delivery" :value="scope.row.isProperDelivery" />
+          </template>
+        </el-table-column>
+        <el-table-column label="开票状态" align="center" prop="invoiceStatus">
+          <template #default="scope">
+            <dict-tag :options="invoice_issuance_status" :value="scope.row.invoiceStatus" />
+          </template>
+        </el-table-column>
+        <el-table-column label="包裹数量" align="center" prop="packageCount" />
+        <el-table-column label="结算状态" align="center" prop="settlementStatus" width="160">
+          <template #default="scope">
+            <dict-tag :options="settlement_status" :value="scope.row.settlementStatus" />
+            <el-button
+              v-if="String(scope.row.settlementStatus) !== '1'"
+              link
+              type="primary"
+              @click="handleSettlement(scope.row)"
+            >
+              结算
+            </el-button>
+          </template>
+        </el-table-column>
+        <el-table-column label="截止还款时间" align="center" prop="repaymentDeadline" width="180">
+          <template #default="scope">
+            <span>{{ parseTime(scope.row.repaymentDeadline, '{y}-{m}-{d}') }}</span>
+            <el-button link type="primary" @click="handleOpenDeadline(scope.row)">录入</el-button>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300" fixed="right">
+          <template #default="scope">
+            <el-button
+              v-if="String(scope.row.orderStatus) === '1'"
+              link
+              type="primary"
+              @click="handleAccept(scope.row)"
+            >
+              接单
+            </el-button>
+            <el-button
+              v-if="String(scope.row.orderStatus) === '1'"
+              link
+              type="danger"
+              @click="handleReject(scope.row)"
+            >
+              拒单
+            </el-button>
+            <el-button v-if="String(scope.row.orderStatus) !== '1'" link type="primary" @click="handleViewLogistics(scope.row)">查看物流</el-button>
+            <el-button link type="primary" @click="handleViewOrder(scope.row)">查看订单</el-button>
+            <el-button v-if="String(scope.row.orderStatus) !== '1'" link type="primary" @click="handleOpenInvoice(scope.row)">上传发票</el-button>
+            
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+    </el-card>
+    <!-- 添加或修改订单列表对话框 -->
+    <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
+      <el-form ref="zhongcheorderFormRef" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="父订单id" prop="parentOrderId">
+          <el-input v-model="form.parentOrderId" placeholder="请输入父订单id" />
+        </el-form-item>
+        <el-form-item label="订单编号" prop="orderNo">
+          <el-input v-model="form.orderNo" placeholder="请输入订单编号" />
+        </el-form-item>
+        <el-form-item label="发货单号" prop="shipmentNo">
+          <el-input v-model="form.shipmentNo" placeholder="请输入发货单号" />
+        </el-form-item>
+        <el-form-item label="子订单编号" prop="subOrderNo">
+          <el-input v-model="form.subOrderNo" placeholder="请输入子订单编号" />
+        </el-form-item>
+        <el-form-item label="所属公司" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入所属公司" />
+        </el-form-item>
+        <el-form-item label="客户编号" prop="customerCode">
+          <el-input v-model="form.customerCode" placeholder="请输入客户编号" />
+        </el-form-item>
+        <el-form-item label="客户ID" prop="customerId">
+          <el-input v-model="form.customerId" placeholder="请输入客户ID" />
+        </el-form-item>
+        <el-form-item label="用户ID" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入用户ID" />
+        </el-form-item>
+        <el-form-item label="收货地址ID" prop="shippingAddressId">
+          <el-input v-model="form.shippingAddressId" placeholder="请输入收货地址ID" />
+        </el-form-item>
+        <el-form-item label="采购事由" prop="purchaseReason">
+          <el-input v-model="form.purchaseReason" placeholder="请输入采购事由" />
+        </el-form-item>
+        <el-form-item label="发货仓库" prop="warehouseId">
+          <el-input v-model="form.warehouseId" placeholder="请输入发货仓库" />
+        </el-form-item>
+        <el-form-item label="信用额度" prop="creditLimit">
+          <el-input v-model="form.creditLimit" placeholder="请输入信用额度" />
+        </el-form-item>
+        <el-form-item label="预计送达时间" prop="expectedDeliveryTime">
+          <el-date-picker clearable
+            v-model="form.expectedDeliveryTime"
+            type="datetime"
+            value-format="YYYY-MM-DD HH:mm:ss"
+            placeholder="请选择预计送达时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="业务员姓名/工号" prop="businessStaff">
+          <el-input v-model="form.businessStaff" placeholder="请输入业务员姓名/工号" />
+        </el-form-item>
+        <el-form-item label="客服人员" prop="customerService">
+          <el-input v-model="form.customerService" placeholder="请输入客服人员" />
+        </el-form-item>
+        <el-form-item label="业务部门" prop="businessDept">
+          <el-input v-model="form.businessDept" placeholder="请输入业务部门" />
+        </el-form-item>
+        <el-form-item label="用户所属部门" prop="userDept">
+          <el-input v-model="form.userDept" placeholder="请输入用户所属部门" />
+        </el-form-item>
+        <el-form-item label="商品总数量" prop="productQuantity">
+          <el-input v-model="form.productQuantity" placeholder="请输入商品总数量" />
+        </el-form-item>
+        <el-form-item label="运费" prop="shippingFee">
+          <el-input v-model="form.shippingFee" placeholder="请输入运费" />
+        </el-form-item>
+        <el-form-item label="订单总金额" prop="totalAmount">
+          <el-input v-model="form.totalAmount" placeholder="请输入订单总金额" />
+        </el-form-item>
+        <el-form-item label="应付金额" prop="payableAmount">
+          <el-input v-model="form.payableAmount" placeholder="请输入应付金额" />
+        </el-form-item>
+        <el-form-item label="订单来源" prop="orderSource">
+          <el-input v-model="form.orderSource" placeholder="请输入订单来源" />
+        </el-form-item>
+        <el-form-item label="下单时间" prop="orderTime">
+          <el-date-picker clearable
+            v-model="form.orderTime"
+            type="datetime"
+            value-format="YYYY-MM-DD HH:mm:ss"
+            placeholder="请选择下单时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="确认时间" prop="confirmTime">
+          <el-date-picker clearable
+            v-model="form.confirmTime"
+            type="datetime"
+            value-format="YYYY-MM-DD HH:mm:ss"
+            placeholder="请选择确认时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="发货时间" prop="shippingTime">
+          <el-date-picker clearable
+            v-model="form.shippingTime"
+            type="datetime"
+            value-format="YYYY-MM-DD HH:mm:ss"
+            placeholder="请选择发货时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="收货时间" prop="receivingTime">
+          <el-date-picker clearable
+            v-model="form.receivingTime"
+            type="datetime"
+            value-format="YYYY-MM-DD HH:mm:ss"
+            placeholder="请选择收货时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="是否为拆分子单:0=是 (子订单), 1=否 (父订单)" prop="isSplitChild">
+          <el-input v-model="form.isSplitChild" placeholder="请输入是否为拆分子单:0=是 (子订单), 1=否 (父订单)" />
+        </el-form-item>
+        <el-form-item label="包裹数量" prop="packageCount">
+          <el-input v-model="form.packageCount" placeholder="请输入包裹数量" />
+        </el-form-item>
+        <el-form-item label="签收数量" prop="signedQuantity">
+          <el-input v-model="form.signedQuantity" placeholder="请输入签收数量" />
+        </el-form-item>
+        <el-form-item label="已完成售后数量" prop="afterSaleCompleted">
+          <el-input v-model="form.afterSaleCompleted" placeholder="请输入已完成售后数量" />
+        </el-form-item>
+        <el-form-item label="申请售后数量" prop="afterSalePending">
+          <el-input v-model="form.afterSalePending" placeholder="请输入申请售后数量" />
+        </el-form-item>
+        <el-form-item label="配送时效描述" prop="deliveryDesc">
+          <el-input v-model="form.deliveryDesc" placeholder="请输入配送时效描述" />
+        </el-form-item>
+        <el-form-item label="订单附件文件路径" prop="attachmentPath">
+          <el-input v-model="form.attachmentPath" placeholder="请输入订单附件文件路径" />
+        </el-form-item>
+        <el-form-item label="创建类别" prop="orderCategory">
+          <el-input v-model="form.orderCategory" placeholder="请输入创建类别" />
+        </el-form-item>
+        <el-form-item label="取消或异常原因" prop="cancelReason">
+          <el-input v-model="form.cancelReason" placeholder="请输入取消或异常原因" />
+        </el-form-item>
+        <el-form-item label="用户编号" prop="userNo">
+          <el-input v-model="form.userNo" placeholder="请输入用户编号" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+            <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="数据来源" prop="dataSource">
+          <el-input v-model="form.dataSource" placeholder="请输入数据来源" />
+        </el-form-item>
+        <el-form-item label="分配对象ID" prop="assigneeId">
+          <el-input v-model="form.assigneeId" placeholder="请输入分配对象ID" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="查看物流信息" v-model="logisticsDialog.visible" width="900px" append-to-body>
+      <el-form :inline="true" label-width="80px" class="mb-[10px]">
+        <el-form-item label="快递单号">
+          <el-select v-model="logisticsDialog.selectedId" placeholder="请选择" style="width: 260px" @change="handleLogisticNoChange">
+            <el-option v-for="item in logisticsDialog.options" :key="item.value" :label="item.label" :value="item.value" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="快递公司">
+          <el-input v-model="logisticsDialog.companyName" disabled style="width: 260px" />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" :loading="logisticsDialog.trackLoading" :disabled="!logisticsDialog.selectedId" @click="handleQueryLogisticsTrack">查询</el-button>
+        </el-form-item>
+      </el-form>
+
+      <div v-loading="logisticsDialog.trackLoading">
+        <el-timeline v-if="logisticsDialog.traces && logisticsDialog.traces.length">
+          <el-timeline-item v-for="(item, idx) in logisticsDialog.traces" :key="idx" :timestamp="item.ftime && item.time ? `${item.ftime}||${item.time}` : (item.ftime || item.time || '')" placement="top">
+            <div>{{ item.context }}</div>
+          </el-timeline-item>
+        </el-timeline>
+        <el-empty v-else description="暂无物流信息" />
+      </div>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="logisticsDialog.visible = false">关 闭</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="录入截止还款时间" v-model="deadlineDialog.visible" width="460px" append-to-body>
+      <el-form label-width="110px">
+        <el-form-item label="截止还款时间">
+          <el-date-picker
+            v-model="deadlineDialog.repaymentDeadline"
+            type="datetime"
+            value-format="YYYY-MM-DD HH:mm:ss"
+            placeholder="请选择截止还款时间"
+            style="width: 100%"
+          />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button :loading="deadlineDialog.loading" type="primary" @click="handleSubmitDeadline">确 定</el-button>
+          <el-button :disabled="deadlineDialog.loading" @click="deadlineDialog.visible = false">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="上传发票" v-model="invoiceDialog.visible" width="500px" append-to-body>
+      <el-form label-width="80px">
+        <el-form-item label="发票文件" required>
+          <fileUpload v-model="invoiceDialog.invoice" :fileType="['doc', 'docx', 'pdf']" :limit="1" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button :loading="invoiceDialog.loading" type="primary" @click="handleSubmitInvoice">确 定</el-button>
+          <el-button :disabled="invoiceDialog.loading" @click="invoiceDialog.visible = false">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="订单商品明细" v-model="orderProductDialog.visible" width="1050px" append-to-body>
+      <el-table v-loading="orderProductDialog.loading" :data="orderProductDialog.list" border>
+        <el-table-column type="index" label="序号" width="60" align="center" />
+        <el-table-column label="产品编号" align="center" prop="productNo" width="120" />
+        <el-table-column label="产品名称" align="center" prop="productName" min-width="150" show-overflow-tooltip />
+        <el-table-column label="品牌" align="center" prop="brandName" width="110" />
+        <el-table-column label="单价" align="center" prop="orderPrice" width="110" />
+        <el-table-column label="数量" align="center" prop="orderQuantity" width="90" />
+        <el-table-column label="金额" align="center" prop="subtotal" width="110" />
+        
+      </el-table>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="orderProductDialog.visible = false">关 闭</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="Zhongcheorder" lang="ts">
+import { listZhongcheorder, getZhongcheorder, delZhongcheorder, addZhongcheorder, updateZhongcheorder, acceptZhongcheorder, rejectZhongcheorder, getZhongcheorderLogistics, getZhongcheorderLogisticsTrack, settlementZhongcheorder, setZhongcheorderDeadline, uploadZhongcheorderInvoice } from '@/api/order/zhongcheorder/index';
+import { ZhongcheorderVO, ZhongcheorderQuery, ZhongcheorderForm } from '@/api/order/zhongcheorder/types';
+import { ElMessageBox } from 'element-plus';
+import { listByIds } from '@/api/system/oss';
+import { getZhongCheOrderProducts } from '@/api/order/orderProduct/index';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { order_status } = toRefs<any>(proxy?.useDict('order_status'));
+const { payment_status } = toRefs<any>(proxy?.useDict('payment_status'));
+const { order_type } = toRefs<any>(proxy?.useDict('order_type'));
+const { reconciliation_status } = toRefs<any>(proxy?.useDict('reconciliation_status'));
+const { is_proper_delivery } = toRefs<any>(proxy?.useDict('is_proper_delivery'));
+const { invoice_issuance_status } = toRefs<any>(proxy?.useDict('invoice_issuance_status'));
+const { settlement_status } = toRefs<any>(proxy?.useDict('settlement_status'));
+
+const zhongcheorderList = ref<ZhongcheorderVO[]>([]);
+const buttonLoading = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref<Array<string | number>>([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+
+const queryFormRef = ref<ElFormInstance>();
+const zhongcheorderFormRef = ref<ElFormInstance>();
+
+const dialog = reactive<DialogOption>({
+  visible: false,
+  title: ''
+});
+
+const logisticsDialog = reactive<{
+  visible: boolean;
+  loading: boolean;
+  trackLoading: boolean;
+  packages: any[];
+  options: Array<{ label: string; value: string }>;
+  selectedId: string;
+  companyName: string;
+  traces: Array<{ time?: string; ftime?: string; context?: string }>;
+}>({
+  visible: false,
+  loading: false,
+  trackLoading: false,
+  packages: [],
+  options: [],
+  selectedId: '',
+  companyName: '',
+  traces: []
+});
+
+const deadlineDialog = reactive<{ visible: boolean; loading: boolean; id: string | number | undefined; repaymentDeadline: string }>({
+  visible: false,
+  loading: false,
+  id: undefined,
+  repaymentDeadline: ''
+});
+
+const invoiceDialog = reactive<{ visible: boolean; loading: boolean; id: string | number | undefined; invoice: string }>({
+  visible: false,
+  loading: false,
+  id: undefined,
+  invoice: ''
+});
+
+const orderProductDialog = reactive<{
+  visible: boolean;
+  loading: boolean;
+  list: any[];
+}>({
+  visible: false,
+  loading: false,
+  list: []
+});
+
+const initFormData: ZhongcheorderForm = {
+  id: undefined,
+  parentOrderId: undefined,
+  orderNo: undefined,
+  shipmentNo: undefined,
+  subOrderNo: undefined,
+  companyId: undefined,
+  customerCode: undefined,
+  customerId: undefined,
+  userId: undefined,
+  shippingAddressId: undefined,
+  purchaseReason: undefined,
+  invoiceType: undefined,
+  payType: undefined,
+  warehouseId: undefined,
+  creditLimit: undefined,
+  expectedDeliveryTime: undefined,
+  businessStaff: undefined,
+  customerService: undefined,
+  businessDept: undefined,
+  userDept: undefined,
+  productQuantity: undefined,
+  shippingFee: undefined,
+  totalAmount: undefined,
+  payableAmount: undefined,
+  paymentStatus: undefined,
+  orderSource: undefined,
+  orderStatus: undefined,
+  orderTime: undefined,
+  confirmTime: undefined,
+  shippingTime: undefined,
+  receivingTime: undefined,
+  splitStatus: undefined,
+  isSplitChild: undefined,
+  packageCount: undefined,
+  signedQuantity: undefined,
+  afterSaleCompleted: undefined,
+  afterSalePending: undefined,
+  deliveryDesc: undefined,
+  pushStatus: undefined,
+  attachmentPath: undefined,
+  deliveryType: undefined,
+  orderCategory: undefined,
+  cancelReason: undefined,
+  expenseType: undefined,
+  userNo: undefined,
+  remark: undefined,
+  dataSource: undefined,
+  checkStatus: undefined,
+  assignmentStatus: undefined,
+  assigneeId: undefined,
+  assigneeType: undefined
+}
+const data = reactive<PageData<ZhongcheorderForm, ZhongcheorderQuery>>({
+  form: {...initFormData},
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    orderNo: undefined,
+    paymentStatus: undefined,
+    orderStatus: undefined,
+    reconciliationStatus: undefined,
+    isProperDelivery: undefined,
+    settlementStatus: undefined,
+    params: {
+    }
+  },
+  rules: {
+  }
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 查询订单列表列表 */
+const getList = async () => {
+  loading.value = true;
+  const res = await listZhongcheorder(queryParams.value);
+  zhongcheorderList.value = res.rows;
+  total.value = res.total;
+  loading.value = false;
+}
+
+/** 取消按钮 */
+const cancel = () => {
+  reset();
+  dialog.visible = false;
+}
+
+/** 表单重置 */
+const reset = () => {
+  form.value = {...initFormData};
+  zhongcheorderFormRef.value?.resetFields();
+}
+
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.value.pageNum = 1;
+  getList();
+}
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+  queryFormRef.value?.resetFields();
+  handleQuery();
+}
+
+/** 多选框选中数据 */
+const handleSelectionChange = (selection: ZhongcheorderVO[]) => {
+  ids.value = selection.map(item => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+}
+
+/** 新增按钮操作 */
+const handleAdd = () => {
+  reset();
+  dialog.visible = true;
+  dialog.title = "添加订单列表";
+}
+
+/** 修改按钮操作 */
+const handleUpdate = async (row?: ZhongcheorderVO) => {
+  reset();
+  const _id = row?.id || ids.value[0]
+  const res = await getZhongcheorder(_id);
+  Object.assign(form.value, res.data);
+  dialog.visible = true;
+  dialog.title = "修改订单列表";
+}
+
+/** 提交按钮 */
+const submitForm = () => {
+  zhongcheorderFormRef.value?.validate(async (valid: boolean) => {
+    if (valid) {
+      buttonLoading.value = true;
+      if (form.value.id) {
+        await updateZhongcheorder(form.value).finally(() =>  buttonLoading.value = false);
+      } else {
+        await addZhongcheorder(form.value).finally(() =>  buttonLoading.value = false);
+      }
+      proxy?.$modal.msgSuccess("操作成功");
+      dialog.visible = false;
+      await getList();
+    }
+  });
+}
+
+/** 删除按钮操作 */
+const handleDelete = async (row?: ZhongcheorderVO) => {
+  const _ids = row?.id || ids.value;
+  await proxy?.$modal.confirm('是否确认删除订单列表编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
+  await delZhongcheorder(_ids);
+  proxy?.$modal.msgSuccess("删除成功");
+  await getList();
+}
+
+/** 导出按钮操作 */
+const handleExport = () => {
+  proxy?.download('order/zhongcheorder/export', {
+    ...queryParams.value
+  }, `zhongcheorder_${new Date().getTime()}.xlsx`)
+}
+
+const handleAccept = async (row: ZhongcheorderVO) => {
+  await proxy?.$modal.confirm('是否确认接单?');
+  const res = await acceptZhongcheorder(row.id);
+  proxy?.$modal.msgSuccess(res as any);
+  await getList();
+}
+
+const handleReject = async (row: ZhongcheorderVO) => {
+  try {
+    const resPrompt = await ElMessageBox.prompt('请输入拒单理由', '系统提示', {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: 'warning',
+      closeOnClickModal: false,
+      inputValidator: (value) => {
+        if (!String(value ?? '').trim()) {
+          return '拒单理由不能为空';
+        }
+        return true;
+      }
+    });
+    const reason = (resPrompt as any)?.value;
+    const res = await rejectZhongcheorder(row.id, reason);
+    proxy?.$modal.msgSuccess(res as any);
+    await getList();
+  } catch {
+    // 用户取消
+  }
+}
+
+const handleSettlement = async (row: ZhongcheorderVO) => {
+  await proxy?.$modal.confirm('是否确认结算?');
+  await settlementZhongcheorder(row.id);
+  proxy?.$modal.msgSuccess('操作成功');
+  await getList();
+}
+
+const handleOpenDeadline = (row: ZhongcheorderVO) => {
+  deadlineDialog.visible = true;
+  deadlineDialog.loading = false;
+  deadlineDialog.id = row.id;
+  deadlineDialog.repaymentDeadline = (row as any)?.repaymentDeadline ?? '';
+}
+
+const handleSubmitDeadline = async () => {
+  const id = deadlineDialog.id;
+  const repaymentDeadline = String(deadlineDialog.repaymentDeadline ?? '').trim();
+  if (!id) return;
+  if (!repaymentDeadline) {
+    proxy?.$modal.msgError('请选择截止还款时间');
+    return;
+  }
+  deadlineDialog.loading = true;
+  try {
+    await setZhongcheorderDeadline(id, repaymentDeadline);
+    proxy?.$modal.msgSuccess('操作成功');
+    deadlineDialog.visible = false;
+    await getList();
+  } finally {
+    deadlineDialog.loading = false;
+  }
+}
+
+const handleOpenInvoice = (row: ZhongcheorderVO) => {
+  invoiceDialog.visible = true;
+  invoiceDialog.loading = false;
+  invoiceDialog.id = row.id;
+  invoiceDialog.invoice = '';
+}
+
+const handleSubmitInvoice = async () => {
+  const id = invoiceDialog.id;
+  const invoiceId = String(invoiceDialog.invoice ?? '').trim();
+  if (!id) return;
+  if (!invoiceId) {
+    proxy?.$modal.msgError('请先上传发票文件');
+    return;
+  }
+  invoiceDialog.loading = true;
+  try {
+    const ossRes = await listByIds(invoiceId);
+    let invoiceUrl = invoiceId;
+    if (ossRes && (ossRes as any).data && (ossRes as any).data.length > 0) {
+      invoiceUrl = (ossRes as any).data[0].url;
+    }
+    await uploadZhongcheorderInvoice(id, invoiceUrl);
+    proxy?.$modal.msgSuccess('上传发票成功');
+    invoiceDialog.visible = false;
+    await getList();
+  } finally {
+    invoiceDialog.loading = false;
+  }
+}
+
+const handleViewOrder = async (row: ZhongcheorderVO) => {
+  orderProductDialog.visible = true;
+  orderProductDialog.loading = true;
+  orderProductDialog.list = [];
+  try {
+    const res = await getZhongCheOrderProducts(row.id);
+    orderProductDialog.list = (res as any)?.data || (res as any)?.rows || res || [];
+  } finally {
+    orderProductDialog.loading = false;
+  }
+}
+
+const handleViewLogistics = async (row: ZhongcheorderVO) => {
+  logisticsDialog.visible = true;
+  logisticsDialog.loading = true;
+  logisticsDialog.trackLoading = false;
+  logisticsDialog.packages = [];
+  logisticsDialog.options = [];
+  logisticsDialog.selectedId = '';
+  logisticsDialog.companyName = '';
+  logisticsDialog.traces = [];
+  try {
+    const res = await getZhongcheorderLogistics(row.id);
+    const data = (res as any)?.data ?? res;
+    const packages = (data?.list ?? data?.rows ?? data?.data ?? data) as any;
+    if (Array.isArray(packages)) {
+      logisticsDialog.packages = packages;
+      logisticsDialog.options = packages
+        .filter((p: any) => p?.id != null && !!p?.logisticNo)
+        .map((p: any) => ({ label: String(p.logisticNo), value: String(p.id) }));
+
+      const firstNo = logisticsDialog.options[0]?.value;
+      if (firstNo) {
+        logisticsDialog.selectedId = firstNo;
+        handleLogisticNoChange(firstNo);
+      }
+    }
+  } finally {
+    logisticsDialog.loading = false;
+  }
+}
+
+const handleLogisticNoChange = (no: any) => {
+  const val = String(no ?? '');
+  const pkg = logisticsDialog.packages.find((p: any) => String(p?.id ?? '') === val);
+  logisticsDialog.companyName = pkg?.logisticsCompanyName ?? '';
+  logisticsDialog.traces = [];
+}
+
+const handleQueryLogisticsTrack = async () => {
+  const id = String(logisticsDialog.selectedId ?? '').trim();
+  if (!id) return;
+  logisticsDialog.trackLoading = true;
+  logisticsDialog.traces = [];
+  try {
+    const res = await getZhongcheorderLogisticsTrack(id);
+    const data = (res as any)?.data ?? res;
+    const list = (data?.list ?? data?.rows ?? data?.data ?? data) as any;
+    if (Array.isArray(list)) {
+      logisticsDialog.traces = list.map((item: any) => ({
+        time: item.time,
+        ftime: item.ftime,
+        context: item.context
+      }));
+    }
+  } finally {
+    logisticsDialog.trackLoading = false;
+  }
+}
+
+onMounted(() => {
+  getList();
+});
+</script>