ERPTurbo_Client/packages/app-client/src/constant/orderShip.ts
shenyifei eaddca0d83 refactor(components): 优化组件类型定义和数据处理逻辑
- 更新 ApprovalList 和 AuditList 组件的 ToolBar 类型定义
- 移除 DealerWarehousePicker 组件中的注释代码
- 优化 Step1Form 组件中的订单项类型定义和字段引用
- 调整多个组件中按钮尺寸属性的字符串格式
- 重构 ExpenseCostCard 组件支持费用类型和费用记录的混合展示
- 更新 ExpenseCostCreate 组件的费用类型预填充逻辑
- 优化 ExpenseCostList 组件的费用列表渲染方式
- 重命名 Step1Form 组件中的 shipOrderVO 相关变量为 orderShipVO
- 更新 DeliveryFormSection 组件中的数据转换函数名称
- 调整多个组件中按钮的尺寸配置
- 更新 OrderList 组件的 ToolBar 类型定义
- 升级应用版本号并完善订单发货单常量配置
- 修正工作台中发货单菜单项的标识符
- 移除审批页面中未使用的 Text 组件和驳回理由展示
2025-12-24 10:13:40 +08:00

136 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const stateList = [
{
title: "全部",
value: "ALL",
},
{
title: "草稿",
value: "DRAFT",
},
{
title: "待发货",
value: "WAIT_SHIPMENT",
},
{
title: "待回款",
value: "WAIT_PAYMENT",
},
{
title: "部分回款",
value: "PARTIAL_PAYMENT",
},
{
title: "已回款",
value: "FULL_PAYMENT",
},
{
title: "拒收完结",
value: "REJECT_FINISH",
},
{
title: "已完结",
value: "FINISH",
},
];
// 定义需求状态映射 - 优化颜色方案
const stateMap = {
DRAFT: {
label: "草稿",
color: "#6B7280",
bgColor: "#F3F4F6",
borderColor: "#D1D5DB",
},
WAIT_SHIPMENT: {
label: "待发货",
color: "#EA580C",
bgColor: "#FEF3C7",
borderColor: "#D97706",
},
WAIT_PAYMENT: {
label: "待回款",
color: "#1E40AF",
bgColor: "#DBEAFE",
borderColor: "#3B82F6",
},
PARTIAL_PAYMENT: {
label: "部分回款",
color: "#7C2D12",
bgColor: "#FDE68A",
borderColor: "#F59E0B",
},
FULL_PAYMENT: {
label: "已回款",
color: "#065F46",
bgColor: "#A7F3D0",
borderColor: "#10B981",
},
REJECT_FINISH: {
label: "拒收完结",
color: "#86198F",
bgColor: "#F3E8FF",
borderColor: "#A855F7",
},
FINISH: {
label: "已完结",
color: "#374151",
bgColor: "#E5E7EB",
borderColor: "#6B7280",
},
};
const steps = [
{
value: 1,
title: "填写信息",
},
{
value: 2,
title: "预览确认",
},
{
value: 3,
title: "生成下载",
},
];
/** 发货单类型1_采购发货2_调货发货3_改签发货4_退货发货 */
// type?: "PURCHASE_SHIP" | "TRANSFER_SHIP" | "CHANGE_SHIP" | "RETURN_SHIP";
const typeList = [
{
label: "采购发货",
value: "PURCHASE_SHIP",
},
{
label: "调货发货",
value: "TRANSFER_SHIP",
},
{
label: "改签发货",
value: "CHANGE_SHIP",
},
{
label: "退货发货",
value: "RETURN_SHIP",
},
];
export const getTypeLabel = (type: string) => {
const typeInfo = typeList.find((item) => item.value === type);
return typeInfo ? typeInfo.label : "";
};
export const getStateLabel = (state: string) => {
const stateInfo = stateMap[state];
return stateInfo ? stateInfo.label : "";
};
export default {
steps,
stateList,
stateMap,
typeList,
getTypeLabel,
getStateLabel,
};