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`} >