ERPTurbo_Client/packages/app-client/src/components/delivery/section/OtherInfo.tsx
shenyifei 24d53d6c83 feat(audit): 添加审批和审核查看功能并优化发货单据生成
- 在审批列表中添加老板查看审批按钮,仅在审批成功时显示
- 在审核列表中添加审核员查看审核按钮,仅在审核成功时显示
- 修复发货单据组件中重量计算使用净重而非毛重的问题
- 移除采购交付表单中的调试日志输出
- 将审批页面标题从"采购单审核"改为"采购单审批"
- 在审批页面中添加供应商采购单价列表展示功能,支持展开收起
- 优化审批页面成本明细显示,添加到货日期信息
- 修复审批页面中返点金额的条件判断逻辑
- 优化审批页面利润显示颜色,正利润显示为蓝色,负利润显示为红色
- 添加返回首页按钮到审批页面底部操作栏
- 重构发货单据页面数据加载逻辑,优化模板配置更新流程
- 移除发货单据页面中未使用的经销商返点客户列表状态管理
- 优化发货单据页面的预览和生成方法参数传递
2025-12-28 08:43:04 +08:00

97 lines
4.0 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.

import { View } from "@tarojs/components";
import { Fragment } from "react";
export default function OtherInfo(props: { module: any }) {
const { module } = props;
const { config } = module;
return (
<View key={module.id} className={"table-border"}>
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold">:</View>
<View className="col-span-2 p-2 text-left">{config.vehicleNumber}</View>
</View>
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold">:</View>
<View className="col-span-2 p-2 text-left">{config.destination}</View>
</View>
{config.showShippingFrom && (
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold"></View>
<View className="col-span-2 p-2 text-left">
{config.shippingFrom}
</View>
</View>
)}
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold">:</View>
<View className="col-span-2 p-2 text-left">
{config.accountCompany}
</View>
</View>
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold">:</View>
<View className="col-span-2 p-2 text-left">{config.date}</View>
</View>
{config.showEstimatedArrivalTime && (
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold">:</View>
<View className="col-span-2 p-2 text-left">
{config.estimatedArrivalTime}
</View>
</View>
)}
{config.data?.map((item: any, number: number) => {
return (
<Fragment key={number}>
{config.showGrade && (
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold">:</View>
<View className="col-span-2 p-2 text-left">
{item.watermelonGrade}
</View>
</View>
)}
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold">:</View>
<View className="col-span-2 p-2 text-left">
</View>
</View>
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold"></View>
<View className="col-span-2 p-2 text-left">
{item.unitPrice}
{config.unitPriceUnit === "1" ? "元/斤" : "元/公斤"}
</View>
</View>
</Fragment>
);
})}
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold"></View>
<View className="p-2 text-left">
{config.data?.reduce((acc: any, cur: any) => acc + cur.netWeight, 0)}
</View>
<View className="p-2 text-left"></View>
</View>
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold"></View>
<View className="p-2 text-left">
{config.data?.reduce((acc: any, cur: any) => acc + cur.boxCount, 0)}
</View>
<View className="p-2 text-left"></View>
</View>
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold">:</View>
<View className="col-span-2 p-2 text-left">{config.licensePlate}</View>
</View>
<View className="grid w-full grid-cols-3 gap-0 text-base">
<View className="p-2 text-left font-bold">:</View>
<View className="col-span-2 p-2 text-left">{config.driverPhone}</View>
</View>
</View>
);
}