import { Text, View } from "@tarojs/components"; import { OrderCalculator } from "@/utils"; import { PriceEditor } from "@/components"; export default function CostDifferenceSection(props: { orderVO: BusinessAPI.OrderVO; onChange?: (orderVO: BusinessAPI.OrderVO) => void; readOnly?: boolean; calculator: OrderCalculator; }) { const { orderVO, onChange, readOnly, calculator } = props; const orderDealer = orderVO.orderDealer; return ( {/* 卡片形式展示分成信息 */} 待分红金额 { onChange?.({ ...orderVO, orderDealer: { ...orderDealer, costDifference: newValue, profitSharing: calculator.getShareProfit(), }, }); }} readOnly={readOnly} label={"调整的金额"} unit="元" hint="点击金额可直接编辑" negative /> 调整后的利润 ¥ {calculator.getShareProfit() || 0} ); }