diff --git a/src/components/card/CardProj.tsx b/src/components/card/CardProj.tsx index 6417aa3..dabfe61 100644 --- a/src/components/card/CardProj.tsx +++ b/src/components/card/CardProj.tsx @@ -121,12 +121,14 @@ export default function CardProj(props: any) { const URGENTvalue: number | null = URGENT ? parseInt(URGENT[1], 10) / 100 : null; // const basicsValue: number | null = basics ? parseInt(basics[1], 10)/100 : null; const [projId] = useState(data.projId) - const isShow = data.pay.chargeAdditionals.includes('PKG') || data.pay.charge.includes('ALL') + // 修改 + const isShow = data.pay.chargeAdditionals.includes('PKG') || data.pay.chargeType=='ALL' + const [messageApi, messageContext] = useMessage(); // const [projCategoryId, setProjCategoryId] = useState(data.projCategoryId); // const [projCategoryName, setProjCategoryName] = useState(data.projCategoryName); - const [charge, setCharge] = useState(''); + // const [charge, setCharge] = useState(''); const [payCharge, setPayCharge] = useState(''); // const indexListContext = useContext(IndexListContext); /** @@ -152,9 +154,9 @@ export default function CardProj(props: any) { } const goEdit = () => { - if (charge == ProjChargeType.ALL) { + if (data.pay.chargeType == 'ALL') { nav(`/proj-eall/${data.projId}`); - } else if (charge == ProjChargeType.FREE) { + } else if (data.pay.chargeType == 'FREE') { nav(`/proj-efree/${data.projId}`); } else { nav(`/proj-edit/${data.projId}`); @@ -162,20 +164,22 @@ export default function CardProj(props: any) { } useEffect(() => { - const charge = props.item.pay.charge.split(':')[0]; + // 修改 + // const charge = props.item.pay.charge.split(':')[0]; let chargeName = ''; - if (charge == ProjChargeType.ALL) { + if (data.pay.chargeType == 'ALL') { chargeName = '全托管'; - } else if (charge == ProjChargeType.MATERIAL_AGENT) { + } else if (data.pay.chargeType =='MATERIAL_AGENT') { chargeName = '写材料+代理'; - } else if (charge == ProjChargeType.MATERIAL_AGENT_URGENT) { + } else if (data.pay.chargeType == 'MATERIAL_AGENT_URGENT') { chargeName = '写材料+代理(加急)'; - } else if (charge == ProjChargeType.MATERIAL) { + } else if (data.pay.chargeType == 'MATERIAL') { chargeName = '写材料'; } else { chargeName = '免费试用'; } - setCharge(charge) + // data.pay.chargeType + // setCharge(charge) setPayCharge(chargeName); // console.log('额外收费安装包',pkgValue); // console.log('额外收费视频',videoDemoValue); @@ -295,8 +299,8 @@ export default function CardProj(props: any) { -
- {data.pay.payStatus == 'UNPAID'?'未付款':data.pay.payStatus == 'PAID'?'已付款':data.pay.payStatus == 'ARREARS'?'欠费':data.pay.payStatus == 'FULL_REFUND'?'全额退款':data.pay.payStatus == 'CORRECTION1_REFUND'?'补正1次退款':data.pay.payStatus == 'CORRECTION2_REFUND'?'补正2次退款':''} +
+ {data.pay.payStatus == 'UNPAID' ? '未付款' : data.pay.payStatus == 'PAID' ? '已付款' : data.pay.payStatus == 'ARREARS' ? '欠费' : data.pay.payStatus == 'FULL_REFUND' ? '全额退款' : data.pay.payStatus == 'CORRECTION1_REFUND' ? '补正1次退款' : data.pay.payStatus == 'CORRECTION2_REFUND' ? '补正2次退款' : ''}
{/* */} @@ -312,7 +316,9 @@ export default function CardProj(props: any) { {data.pay.payment / 100} + > + {data.pay.payment / 100} +
{/*
基础费用:{basicsValue}
*/} diff --git a/src/components/list/ListProj.tsx b/src/components/list/ListProj.tsx index 2fee054..88dc342 100644 --- a/src/components/list/ListProj.tsx +++ b/src/components/list/ListProj.tsx @@ -62,7 +62,8 @@ export default function ListProj() { page: currentPage, rows: 10, keywords: keywords, - charge: type, + // charge: type, + chargeType: type, chargeAdditionals: chargeAdditionals, tagDataId: tagDataId, authorId: authorId,