From 221e3434a01c9ce83b028fee5914364052d9d341 Mon Sep 17 00:00:00 2001 From: shenyifei Date: Wed, 19 Nov 2025 21:51:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(purchase):=20=E4=BC=98=E5=8C=96=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E8=AE=A2=E5=8D=95=E7=95=8C=E9=9D=A2=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E4=B8=8E=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整 CompanyPicker、DealerPicker 等组件的样式与布局 - 更新 BasicInfoSection 中车次号输入框及参考信息展示方式 - 修改 CompanyInfoSection 和 DealerInfoSection 的选择按钮样式与文案 - 增加 costItemVOList 数据字段支持 - 完善审核页面对空数据情况的处理逻辑 - 新增 smart recognition prompt 配置类型定义 - 升级 APP 版本至 v0.0.22 --- .../src/components/company/CompanyPicker.tsx | 31 +++-- .../src/components/dealer/DealerPicker.tsx | 2 +- .../purchase/module/OrderVehicle.tsx | 8 +- .../purchase/section/BasicInfoSection.tsx | 58 ++++----- .../purchase/section/CompanyInfoSection.tsx | 74 +++++------- .../section/CostDifferenceSection.tsx | 2 +- .../purchase/section/DealerInfoSection.tsx | 113 +++++++----------- packages/app-client/src/constant/app.ts | 2 +- .../src/pages/purchase/reviewer/audit.tsx | 9 ++ .../src/services/business/typings.d.ts | 34 +++++- swagger/business.json | 2 +- 11 files changed, 174 insertions(+), 161 deletions(-) diff --git a/packages/app-client/src/components/company/CompanyPicker.tsx b/packages/app-client/src/components/company/CompanyPicker.tsx index d5b1b77..55e0d81 100644 --- a/packages/app-client/src/components/company/CompanyPicker.tsx +++ b/packages/app-client/src/components/company/CompanyPicker.tsx @@ -1,5 +1,5 @@ import { Popup, SafeArea } from "@nutui/nutui-react-taro"; -import { ScrollView, View, Image } from "@tarojs/components"; +import { Image, ScrollView, View } from "@tarojs/components"; import React, { useEffect, useState } from "react"; import { business } from "@/services"; @@ -35,6 +35,10 @@ export default function CompanyPicker(props: ICompanyPickerProps) { return ( <> { setVisible(true); event.stopPropagation(); @@ -69,29 +73,38 @@ export default function CompanyPicker(props: ICompanyPickerProps) { )} {companyVOList?.map((companyVO) => ( { setCompanyVO(companyVO); setVisible(false); }} > - + {companyVO?.logo ? ( ) : ( - - {(companyVO?.shortName || companyVO?.fullName)?.substring(0, 2)} + + {(companyVO?.shortName || companyVO?.fullName)?.substring( + 0, + 2, + )} )} - + {companyVO?.shortName} diff --git a/packages/app-client/src/components/dealer/DealerPicker.tsx b/packages/app-client/src/components/dealer/DealerPicker.tsx index e9a46b2..af3fabb 100644 --- a/packages/app-client/src/components/dealer/DealerPicker.tsx +++ b/packages/app-client/src/components/dealer/DealerPicker.tsx @@ -64,7 +64,7 @@ export default function DealerPicker(props: IDealerPickerProps) { return ( <> ( onFinish={setDealerVO} enableManualInput trigger={ - <> + {orderVehicle?.dealerName || "选择经销商"} - + } /> diff --git a/packages/app-client/src/components/purchase/section/BasicInfoSection.tsx b/packages/app-client/src/components/purchase/section/BasicInfoSection.tsx index d531b87..382e493 100644 --- a/packages/app-client/src/components/purchase/section/BasicInfoSection.tsx +++ b/packages/app-client/src/components/purchase/section/BasicInfoSection.tsx @@ -4,6 +4,7 @@ import dayjs from "dayjs"; import { formatCurrency } from "@/utils/format"; import { useEffect, useState } from "react"; import businessServices from "@/services/business"; +import { Icon } from "@/components"; export default function BasicInfoSection(props: { purchaseOrderVO: BusinessAPI.PurchaseOrderVO; @@ -463,11 +464,16 @@ export default function BasicInfoSection(props: { - + {/* 本车次号 */} - - - 本车次号 + + + + 本车次号 + + + 参考上一车:{displayReferenceVehicleNo()} + {readOnly ? ( ) : ( - - - updateVehicleNo(value)} - /> - - - 参考上一车:{displayReferenceVehicleNo()} - + + updateVehicleNo(value)} + /> )} {/* 运费信息 */} - - + + 运费信息 {/* 草帘 */} - - - 草帘 - + + 草帘 {/* 路线和其他信息卡片 */} - - + + 路线 {orderVehicle?.origin || "发货地"} {"->"}{" "} @@ -586,12 +585,15 @@ export default function BasicInfoSection(props: { + {!readOnly && ( - + - } - /> - - )} + + {!readOnly && orderCompany && ( + + - ) : readOnly ? ( - - 无销售方信息 + )} + + + 公司名称 + + {orderCompany?.fullName || "请先选择销售方"} - ) : ( - - - 请先选择销售方 - + + + {!readOnly && ( + - 选择销售方 - + + + } /> diff --git a/packages/app-client/src/components/purchase/section/CostDifferenceSection.tsx b/packages/app-client/src/components/purchase/section/CostDifferenceSection.tsx index e6291bc..d18c250 100644 --- a/packages/app-client/src/components/purchase/section/CostDifferenceSection.tsx +++ b/packages/app-client/src/components/purchase/section/CostDifferenceSection.tsx @@ -72,7 +72,7 @@ export default function CostDifferenceSection(props: { - {!readOnly ? ( + {!readOnly && orderDealer?.shareAdjusted ? ( { // 打开弹窗时,将当前costDifference值同步到临时状态 diff --git a/packages/app-client/src/components/purchase/section/DealerInfoSection.tsx b/packages/app-client/src/components/purchase/section/DealerInfoSection.tsx index 26659ce..66f0c18 100644 --- a/packages/app-client/src/components/purchase/section/DealerInfoSection.tsx +++ b/packages/app-client/src/components/purchase/section/DealerInfoSection.tsx @@ -64,77 +64,56 @@ export default function (props: { }; return ( - - {orderDealer ? ( - - {!readOnly && ( - { - e.stopPropagation(); - clearDealerSelection(); - }} - > - - - )} + + {!readOnly && orderDealer && ( + { + e.stopPropagation(); + clearDealerSelection(); + }} + > + + + )} - - - 经销商名称 - - - {orderDealer.shortName} - - + + + 经销商名称 + + + {orderDealer?.shortName || "请先选择经销商"} + + - {!readOnly && ( - { - handleDealerSelect(dealer); - }} - trigger={ - - - - } - /> - )} - - ) : readOnly ? ( - - 无经销商信息 - - ) : ( - - - 请先选择经销商 - - - {dealerNameOnly && ( - - 检测到当前经销商“{dealerNameOnly}”信息未创建 - - • 请前往电脑端创建经销商信息后再选择 - - • 或选择系统中已存在的其他经销商 - - )} - - 选择经销商 - - } - /> - + {dealerNameOnly && ( + + 检测到当前经销商“{dealerNameOnly}”信息未创建 + • 请前往电脑端创建经销商信息后再选择 + • 或选择系统中已存在的其他经销商 )} + + {!readOnly && ( + { + handleDealerSelect(dealer); + }} + trigger={ + + + + } + /> + )} ); } diff --git a/packages/app-client/src/constant/app.ts b/packages/app-client/src/constant/app.ts index 67bb5c8..59b0726 100644 --- a/packages/app-client/src/constant/app.ts +++ b/packages/app-client/src/constant/app.ts @@ -1,2 +1,2 @@ // App 相关常量 -export const APP_VERSION = "v0.0.21"; +export const APP_VERSION = "v0.0.22"; diff --git a/packages/app-client/src/pages/purchase/reviewer/audit.tsx b/packages/app-client/src/pages/purchase/reviewer/audit.tsx index ac70ee0..bd6dea5 100644 --- a/packages/app-client/src/pages/purchase/reviewer/audit.tsx +++ b/packages/app-client/src/pages/purchase/reviewer/audit.tsx @@ -479,6 +479,14 @@ export default hocAuth(function Page(props: CommonComponent) { return null; } + if ( + (!purchaseOrderVO.orderPackageList || + purchaseOrderVO?.orderPackageList.length === 0) && + sectionKey === "emptyBoxInfo" + ) { + return null; + } + return ( <> {section.title} @@ -486,6 +494,7 @@ export default hocAuth(function Page(props: CommonComponent) { className={`overflow-x-auto rounded-md rounded-b-lg bg-white p-2.5 shadow-sm`} >