From 37b49e7a1db23b6f551edd6c7dda3ec1f293eaa9 Mon Sep 17 00:00:00 2001 From: xixi <123@qq.com> Date: Tue, 27 Aug 2024 18:29:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=B1=9E=E6=80=A7=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CorrectionModal/CorrectionModal.tsx | 2 +- src/components/NoticeModal/NoticeModal.tsx | 2 +- src/components/card/CardProj.tsx | 135 +++++--- src/components/card/card-proj.css | 13 +- src/components/myOrder/MyOrder.tsx | 255 +++++++++++++-- src/route/Correction/Correction.tsx | 302 ++++++++++++------ src/route/Refun/Refun.tsx | 11 +- src/route/proj/ProjEdit.tsx | 6 +- src/route/proj/ProjEditAll.tsx | 26 +- src/route/proj/ProjEditFree.tsx | 9 +- 10 files changed, 557 insertions(+), 204 deletions(-) diff --git a/src/components/CorrectionModal/CorrectionModal.tsx b/src/components/CorrectionModal/CorrectionModal.tsx index 4daa2b8..d80dc15 100644 --- a/src/components/CorrectionModal/CorrectionModal.tsx +++ b/src/components/CorrectionModal/CorrectionModal.tsx @@ -152,7 +152,7 @@ export default function CorrectionModal(props: any) {
- 补正类型* + 补正种类*
{data.projName}
-
+ +
+ {payCharge} +
+
{payCharge}
@@ -209,7 +224,7 @@ export default function CardProj(props: any) { background: tagIdArray.includes(item.value) ? '#ff7b00' : '', color: tagIdArray.includes(item.value) ? '#ffffff' : '#5a5a5a', border: tagIdArray.includes(item.value) ? ' 1px solid #ff7b00' : ' 1px solid #5a5a5a', - + // display: data.projStatus == 'NORMAL' || data.projStatus == 'EXPIRED' ? 'block' : 'none' }} onClick={() => { @@ -237,7 +252,7 @@ export default function CardProj(props: any) {
*/} -
+
{ data.generate.generateStatus == GenerateStatus.SUCCESS ? ( @@ -252,12 +267,13 @@ export default function CardProj(props: any) { ) } - | - + | + - { - window.open(`${Axios.defaults?.baseURL}/${data.previewUrl}`, '_blank') - }}>预览 + { + window.open(`${Axios.defaults?.baseURL}/${data.previewUrl}`, '_blank') + }}>预览
@@ -265,7 +281,7 @@ export default function CardProj(props: any) {
{/* lyp */} -
+
@@ -279,13 +295,24 @@ 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.payment / 100} +
+ 金额(¥) : + {data.pay.payment / 100}
{/*
基础费用:{basicsValue}
*/} @@ -294,54 +321,60 @@ export default function CardProj(props: any) { 演示视频:{videoDemoValue}
-
-
{ - if (data.generate.generateStatus == GenerateStatus.SUCCESS || payCharge == '全托管') { - // nav(`/proj-edit/config-loginpage-show/${data.projId}`) - setLoginPageShowOpne(true); +
+
+
{ + if (data.generate.generateStatus == GenerateStatus.SUCCESS || payCharge == '全托管') { + // nav(`/proj-edit/config-loginpage-show/${data.projId}`) + setLoginPageShowOpne(true); - } else { - // nav(`/proj-edit/config-loginpage/${data.projId}`) - setLoginPageOpne(true) - } - }}> - -
登录界面设置
-
-
{ - if (data.generate.generateStatus == GenerateStatus.SUCCESS || payCharge == '全托管') { - // nav(`/proj-edit/config-mod-list-show/${data.projId}`) - setSoftwareManagementShowOpen(true) - } else { - setSoftwareManagementOpen(true) - // nav(`/proj-edit/config-mod-list/${data.projId}`) + } else { + // nav(`/proj-edit/config-loginpage/${data.projId}`) + setLoginPageOpne(true) + } + }}> + +
登录界面设置
+
+
{ + if (data.generate.generateStatus == GenerateStatus.SUCCESS || payCharge == '全托管') { + // nav(`/proj-edit/config-mod-list-show/${data.projId}`) + setSoftwareManagementShowOpen(true) + } else { + setSoftwareManagementOpen(true) + // nav(`/proj-edit/config-mod-list/${data.projId}`) - } - }}> - -
系统菜单管理({data.projModCount})
-
-
{ - if (data.generate.generateStatus == GenerateStatus.SUCCESS || payCharge == '全托管') { - // nav(`/proj-edit/config-menu-list-show/${data.projId}`) - setDisplayOrderShowOpen(true); - } else { - // nav(`/proj-edit/config-menu-list/${data.projId}`) - setDisplayOrderOpen(true); + } + }}> + +
系统菜单管理({data.projModCount})
+
+
{ + if (data.generate.generateStatus == GenerateStatus.SUCCESS || payCharge == '全托管') { + // nav(`/proj-edit/config-menu-list-show/${data.projId}`) + setDisplayOrderShowOpen(true); + } else { + // nav(`/proj-edit/config-menu-list/${data.projId}`) + setDisplayOrderOpen(true); - } - }}> - -
菜单排序({data.projModCount})
+ } + }}> + +
菜单排序({data.projModCount})
+
+
-
-
+
+
+ {data.projStatus == 'REFUND_APPLYING' ? '退款申请中' : data.projStatus == 'CLOSE' ? '该项目已关闭' : data.projStatus == 'EXPIRED' ? '该项目已过期' : ''} +
+
{ data.generate.generateStatus == GenerateStatus.SUCCESS ? (
diff --git a/src/components/card/card-proj.css b/src/components/card/card-proj.css index 5e21a02..5257876 100644 --- a/src/components/card/card-proj.css +++ b/src/components/card/card-proj.css @@ -144,9 +144,20 @@ height: 143px; background: #F5F5F5; border-radius: 6px; - + position: relative; } +.payStatus{ + position: absolute; + background-color: red; + left: 0; + top: 113px; + height: 30px; + padding: 0px 10px; + line-height: 30px; + color: #FFFFFF; + font-size: 14px; +} .cpb-left-imgX { /* width: 249px; */ width: 290px; diff --git a/src/components/myOrder/MyOrder.tsx b/src/components/myOrder/MyOrder.tsx index 04b9aa0..659efed 100644 --- a/src/components/myOrder/MyOrder.tsx +++ b/src/components/myOrder/MyOrder.tsx @@ -1,4 +1,5 @@ -import { Table, TableProps, Tooltip, Spin } from "antd"; +import { Table, TableProps, Tooltip, Spin, Modal, Input } from "antd"; +const { Search } = Input; import { useEffect, useState } from "react"; import useMessage from "antd/es/message/useMessage"; import { get } from "../../util/AjaxUtils"; @@ -23,20 +24,32 @@ type DataType = { orderStatus: string; gmtCreate: string; } +type DataTypeDetail = { + productName: string; //商品名称 + productType: string; //商品类型 + quantity: number; //购买数量 + unitPrice: number; //单价 + productDescription: string; //商品描述 + notes: string; //备注 +} export default function MyOrder() { const [messageApi, messageContext] = useMessage(); const [isLoading, setIsLoading] = useState(false) const [page, setPage] = useState(1); const [total, setTotal] = useState(0); const [dataArray, setDataArray] = useState([]); + const [detailData, setDetailData] = useState([]) + const [orderDetailsModal, setOrderDetailsModal] = useState(false) //详情弹窗 + const [keyWords, setKewWords] = useState('') const getData = () => { get>({ messageApi, - url: '/api/order/listpage/complete/no-invoiced/self', + url: '/api/order/listpage/self', config: { params: { page: page, - rows: 20 + rows: 20, + keywords: keyWords, } }, onBefore() { @@ -54,6 +67,26 @@ export default function MyOrder() { } }) } + const getOrderDetails = (orderId: string) => { + get({ + messageApi, + url: `/api/order-detail/list/order-id/${orderId}`, + config: { + + }, + onBefore() { + setIsLoading(true); + }, + onSuccess(data: any) { + // console.log(data.data); + setDetailData(data.data) + + }, + onFinally() { + setIsLoading(false); + } + }) + } const columns: TableProps['columns'] = [ { title: '订单号', @@ -81,8 +114,17 @@ export default function MyOrder() { if (value === 'COMPLETE') { return '完成'; } - if (value === 'CHARGEBACK') { - return '已退款'; + if (value === ' FULL_REFUND') { + return '全额退款'; + } + if (value === 'PENDING') { + return '等待'; + } + if (value === 'CORRECTION1_REFUND') { + return '补正1次退款'; + } + if (value === 'CORRECTION2_REFUND') { + return '补正2次退款'; } } }, @@ -92,70 +134,187 @@ export default function MyOrder() { align: 'center', width: 180 }, + // { + // title: '产品类型', + // dataIndex: 'detail.productType', + // align: 'center', + // width: 100, + // render: (_value, record) => { + // if (record.detail.productType === 'PROJ') { + // return '项目创建' + // } + // if (record.detail.productType === 'AGENT') { + // return '项目代理' + // } + // return record.detail.productType + // } + // }, + // { + // title: '数量', + // dataIndex: 'detail.quantity', + // align: 'center', + // width: 100, + // render: (_value, record) => { + // return record.detail.quantity + // } + // }, + // { + // title: '单价', + // dataIndex: 'detail.unitPrice', + // align: 'center', + // width: 100, + // render: (_value, record) => { + // return (record.detail.unitPrice / 100).toFixed(2) + // } + // }, + // { + // title: '订单备注', + // dataIndex: 'detail.notes', + // align: 'center', + // width: 120, + // render: (_value, record) => { + // return record.detail.notes + // } + // }, + // { + // title: '描述', + // dataIndex: 'detail.productDescription', + // align: 'center', + // width: 200, + // ellipsis: { + // showTitle: false, + // }, + // render: (_value, record) => { + // return {record.detail.productDescription} + // } + // }, { - title: '产品类型', - dataIndex: 'detail.productType', + title: '订单详情', align: 'center', width: 100, + render: (_, record) => ( + // {record.name} +
{ + // console.log(record.orderId); //id + // console.log(record.orderNo); //编号 + // setOrderId(record.orderId) + setOrderDetailsModal(true) + getOrderDetails(record.orderId) + }}>查看
+ ), + }, + ] + const detailColumns: TableProps['columns'] = [ + { + title: '商品名称', + dataIndex: 'productName', + align: 'center', + // width: 250, + ellipsis: { + showTitle: false, + }, render: (_value, record) => { - if (record.detail.productType === 'PROJ') { - return '项目创建' - } - if (record.detail.productType === 'AGENT') { - return '项目代理' - } - return record.detail.productType + return {record.productName} } }, { - title: '数量', - dataIndex: 'detail.quantity', + title: '商品类型', + dataIndex: 'productType', + align: 'center', + render: (_value, record) => { + if (record.productType === 'PROJ') { + return '项目创建' + } + if (record.productType === 'AGENT') { + return '项目代理' + } + if (record.productType === 'FULL_REFUND') { + return '全额退款' + } + if (record.productType === 'CORRECTION1_REFUND') { + return '补正1次退款' + } + if (record.productType === 'CORRECTION2_REFUND') { + return '补正2次退款' + } + return record.productType + } + + }, + { + title: '购买数量', + dataIndex: 'quantity', align: 'center', width: 100, - render: (_value, record) => { - return record.detail.quantity - } + }, { title: '单价', - dataIndex: 'detail.unitPrice', + dataIndex: 'unitPrice', align: 'center', - width: 100, - render: (_value, record) => { - return (record.detail.unitPrice / 100).toFixed(2) + render: (value) => { + return (value / 100).toFixed(2) } + }, + { title: '订单备注', dataIndex: 'detail.notes', align: 'center', - width: 120, + // width: 120, render: (_value, record) => { - return record.detail.notes + return {record.notes} } }, { - title: '描述', - dataIndex: 'detail.productDescription', + title: '商品描述', + dataIndex: 'productDescription', align: 'center', width: 200, ellipsis: { showTitle: false, }, render: (_value, record) => { - return {record.detail.productDescription} + return {record.productDescription} } - }, + } ] // useEffect(() => { // getData(); // }, []); + const handleSearch = (value: string) => { + // console.log(value); + setKewWords(value) + } + const handleChange = (e: any) => { + + // console.log(e.target.value); + if (e.target.value == '') { + setKewWords('') + } + } useEffect(() => { getData(); - }, [page]); + }, [page, keyWords]); return (
{messageContext} +
+ +
+ { setPage(currentPage); }, - showSizeChanger:false + showSizeChanger: false } } - scroll={{ y: 500 }} bordered key="dataTable" rowKey="orderId" />; + scroll={{ y: 500 }} bordered key="dataTable" rowKey="orderId" /> + { + // setOrderDetailsModal(false) + // }} + width={1300} + onCancel={() => { + setOrderDetailsModal(false) + }} + footer={null} + > + +
{ + // setPage(currentPage); + // }, + // showSizeChanger: false + // } + // } + pagination={false} + // scroll={{ y: 500 }} + bordered key="dataTable" rowKey="orderId" /> + + ) } diff --git a/src/route/Correction/Correction.tsx b/src/route/Correction/Correction.tsx index 3a4c263..6a0eb28 100644 --- a/src/route/Correction/Correction.tsx +++ b/src/route/Correction/Correction.tsx @@ -16,7 +16,7 @@ import { useNavigate } from "react-router-dom"; interface DataType { projName: string; type: string; //类型 - correctionType: string; //补正类型 + correctionType: string; //补正种类 correctionReason: string; gmtCreate: string; //补正时间 gmtReview: string;//审核时间 @@ -60,14 +60,14 @@ export default function Correction() { dataIndex: 'type', key: 'type', align: 'center', - render: (text) =>
{text=='CORRECTION1'?'一次补正':text=='CORRECTION2'?'二次补正':''}
, + render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, }, { - title: '补正类型', + title: '补正种类', dataIndex: 'correctionType', key: 'correctionType', align: 'center', - render: (text) =>
{text=='CODE'?'代码':text=='MANUAL'?'操作手册':''}
, + render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : ''}
, }, { title: '补正原因', @@ -139,14 +139,14 @@ export default function Correction() { dataIndex: 'type', key: 'type', align: 'center', - render: (text) =>
{text=='CORRECTION1'?'一次补正':text=='CORRECTION2'?'二次补正':''}
, + render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, }, { - title: '补正类型', + title: '补正种类', dataIndex: 'correctionType', key: 'correctionType', align: 'center', - render: (text) =>
{text=='CODE'?'代码':text=='MANUAL'?'操作手册':''}
, + render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : ''}
, }, { title: '补正原因', @@ -199,105 +199,215 @@ export default function Correction() { render: (_, record) => ( // {record.name}
{ - // console.log(record.projRefundApplyId); + // console.log(record); setRevokeModal(true) setprojCorrectionApplyId(record.projCorrectionApplyId) }}> 撤销
), }, - ] : - // 已通过 和未通过 状态 - [ - { - title: '序号', - dataIndex: 'index', - align: 'center', - width: 80, - render: (_text, _record, index) => (page - 1) * 10 + index + 1, // 显示序号,从1开始 - }, - { - title: '系统名称', - dataIndex: 'projName', - align: 'center', - key: 'projName', - render: (text) =>
{text}
, - }, + ] + // 未通过 状态 + : type == 'REJECTED' ? + [ + { + title: '序号', + dataIndex: 'index', + align: 'center', + width: 80, + render: (_text, _record, index) => (page - 1) * 10 + index + 1, // 显示序号,从1开始 + }, + { + title: '系统名称', + dataIndex: 'projName', + align: 'center', + key: 'projName', + render: (text) =>
{text}
, + }, - { - title: '类型', - dataIndex: 'type', - key: 'type', - align: 'center', - render: (text) =>
{text=='CORRECTION1'?'一次补正':text=='CORRECTION2'?'二次补正':''}
, - }, - { - title: '补正类型', - dataIndex: 'correctionType', - key: 'correctionType', - align: 'center', - render: (text) =>
{text=='CODE'?'代码':text=='MANUAL'?'操作手册':''}
, - }, - { - title: '补正原因', - dataIndex: 'correctionReason', - key: 'correctionReason', - align: 'center', - render: (text) =>
{text}
, - }, - { - title: '申请补正时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - align: 'center', - width: 200, - }, - { - title: '审核时间', - dataIndex: 'gmtReview', - key: 'gmtReview', - align: 'center', - width: 200, - }, - { - title: '审核状态', - dataIndex: 'applyStatus', - key: 'applyStatus', - align: 'center', - width: 100, - render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, - }, - { - title: '审核意见', - dataIndex: 'reviewReason', - key: 'reviewReason', - align: 'center', - // width: 150, - render: (text) =>
{text ? text : '—'}
, - }, - { - title: '补正凭证', - dataIndex: 'correctionVoucherFileKVs', - key: 'correctionVoucherFileKVs', - // width: 100, - align: 'center', - render: (_, record) => ( - (record.correctionVoucherFileKVs).map((item: any, index: number) => ( + { + title: '类型', + dataIndex: 'type', + key: 'type', + align: 'center', + render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, + }, + { + title: '补正种类', + dataIndex: 'correctionType', + key: 'correctionType', + align: 'center', + render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : ''}
, + }, + { + title: '补正原因', + dataIndex: 'correctionReason', + key: 'correctionReason', + align: 'center', + render: (text) =>
{text}
, + }, + { + title: '申请补正时间', + dataIndex: 'gmtCreate', + key: 'gmtCreate', + align: 'center', + width: 200, + }, + { + title: '审核时间', + dataIndex: 'gmtReview', + key: 'gmtReview', + align: 'center', + width: 200, + }, + { + title: '审核状态', + dataIndex: 'applyStatus', + key: 'applyStatus', + align: 'center', + width: 100, + render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, + }, + { + title: '审核意见', + dataIndex: 'reviewReason', + key: 'reviewReason', + align: 'center', + // width: 150, + render: (text) =>
{text ? text : '—'}
, + }, + { + title: '补正凭证', + dataIndex: 'correctionVoucherFileKVs', + key: 'correctionVoucherFileKVs', + // width: 100, + align: 'center', + render: (_, record) => ( + (record.correctionVoucherFileKVs).map((item: any, index: number) => ( -
{ - window.open(downloadUrl(item.key, false), '_blank') - }}>{item.value}
+
{ + window.open(downloadUrl(item.key, false), '_blank') + }}>{item.value}
- )) + )) - ), - }, - ]; + ), + }, + + ] + //已通过状态 + : type == 'APPROVED' ? + [ + { + title: '序号', + dataIndex: 'index', + align: 'center', + width: 80, + render: (_text, _record, index) => (page - 1) * 10 + index + 1, // 显示序号,从1开始 + }, + { + title: '系统名称', + dataIndex: 'projName', + align: 'center', + key: 'projName', + render: (text) =>
{text}
, + }, + + { + title: '类型', + dataIndex: 'type', + key: 'type', + align: 'center', + render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, + }, + { + title: '补正种类', + dataIndex: 'correctionType', + key: 'correctionType', + align: 'center', + render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : ''}
, + }, + { + title: '补正原因', + dataIndex: 'correctionReason', + key: 'correctionReason', + align: 'center', + render: (text) =>
{text}
, + }, + { + title: '申请补正时间', + dataIndex: 'gmtCreate', + key: 'gmtCreate', + align: 'center', + width: 200, + }, + { + title: '审核时间', + dataIndex: 'gmtReview', + key: 'gmtReview', + align: 'center', + width: 200, + }, + { + title: '审核状态', + dataIndex: 'applyStatus', + key: 'applyStatus', + align: 'center', + width: 100, + render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, + }, + { + title: '审核意见', + dataIndex: 'reviewReason', + key: 'reviewReason', + align: 'center', + // width: 150, + render: (text) =>
{text ? text : '—'}
, + }, + { + title: '补正凭证', + dataIndex: 'correctionVoucherFileKVs', + key: 'correctionVoucherFileKVs', + // width: 100, + align: 'center', + render: (_, record) => ( + (record.correctionVoucherFileKVs).map((item: any, index: number) => ( + +
{ + window.open(downloadUrl(item.key, false), '_blank') + }}>{item.value}
+ + + )) + + ), + }, + { + title: '操作', + align: 'center', + width: 100, + render: (_, record) => ( + // {record.name} +
{ + // console.log(record); + // setRevokeModal(true) + // setprojCorrectionApplyId(record.projCorrectionApplyId) + nav(`/proj-edit/${record.projId}`); + }}> 查看
+ + ), + } + + ] : [] const dispath = useDispatch() const redxuState: any = useSelector(state => state) @@ -428,7 +538,7 @@ export default function Correction() { } scroll={{ y: height - 150 }} - rowKey="projId" + rowKey="projCorrectionApplyId" />
diff --git a/src/route/Refun/Refun.tsx b/src/route/Refun/Refun.tsx index 63d76c4..32b2406 100644 --- a/src/route/Refun/Refun.tsx +++ b/src/route/Refun/Refun.tsx @@ -12,7 +12,7 @@ import { getMenuActive } from '../../util/cache' import { useNavigate } from "react-router-dom"; interface DataType { projName: string; - projPayment: string; + projPayment: number; refundReason: string; gmtCreate: string; refundVoucherFileKVs: any; @@ -61,7 +61,8 @@ export default function Refun() { key: 'projPayment', align: 'center', width: 150, - render: (text) =>
{text / 100}
, + render: (text) =>
{(text / 100).toFixed(2)}
+ }, { title: '退款原因', @@ -134,7 +135,7 @@ export default function Refun() { key: 'projPayment', align: 'center', width: 150, - render: (text) =>
{text / 100}
, + render: (text) =>
{(text / 100).toFixed(2)}
, }, { title: '退款原因', @@ -222,7 +223,7 @@ export default function Refun() { key: 'projPayment', align: 'center', width: 150, - render: (text) =>
{text / 100}
, + render: (text) =>
{(text / 100).toFixed(2)}
, }, { title: '退款原因', @@ -410,7 +411,7 @@ export default function Refun() { } scroll={{ y: height - 150 }} - rowKey="projId" + rowKey="projRefundApplyId" />
diff --git a/src/route/proj/ProjEdit.tsx b/src/route/proj/ProjEdit.tsx index 841ea77..e758db2 100644 --- a/src/route/proj/ProjEdit.tsx +++ b/src/route/proj/ProjEdit.tsx @@ -46,6 +46,8 @@ type ProjModType = { } export default function ProjEdit() { + // 项目状态 + const [projStatus, setprojStatus] = useState('') const dispath = useDispatch() // 更新所属者表格储存至redux const upBelongArray = () => { @@ -340,7 +342,7 @@ export default function ProjEdit() { projMods: data.projMods }) - + setprojStatus(data.projStatus) // setAiHelperModalOpen(!data.projIntroduction || !data.projDesc) } @@ -483,7 +485,7 @@ export default function ProjEdit() { }) } { - isEditStepEdited && isConfigEdited ? ( + isEditStepEdited && isConfigEdited && projStatus != 'EXPIRED'? ( >[0]; export default function ProjEditAll() { + // 项目状态 + const [projStatus, setprojStatus] = useState('') // 进度提示弹窗 const [progressModal, setprogressModal] = useState(true) // 当前进度 @@ -393,7 +395,7 @@ export default function ProjEditAll() { // projMods: data.projMods // }) // setAiHelperModalOpen(!data.projIntroduction || !data.projDesc) - + setprojStatus(data.projStatus) } }) @@ -469,7 +471,7 @@ export default function ProjEditAll() { }) } { - isEditStepEdited && isConfigEdited ? ( + isEditStepEdited && isConfigEdited && projStatus != 'EXPIRED' ? ( { setprogressModal(false); }}>
- -
{progress=='PRODUCTION'?'您申请的软著正在制作中,预计一日内完成':progress=='SUBMIT_FOR_REVIEW'? '您申请的软著已提交国家版权中心,预计60个工作日内下证':progress=='DONE'? '您申请的软著已完成,请在页面证书下载处下载':'您申请的软著等待制作中,预计两日内完成'}
+ +
{progress == 'PRODUCTION' ? '您申请的软著正在制作中,预计一日内完成' : progress == 'SUBMIT_FOR_REVIEW' ? '您申请的软著已提交国家版权中心,预计60个工作日内下证' : progress == 'DONE' ? '您申请的软著已完成,请在页面证书下载处下载' : '您申请的软著等待制作中,预计两日内完成'}
diff --git a/src/route/proj/ProjEditFree.tsx b/src/route/proj/ProjEditFree.tsx index 712b268..62c847b 100644 --- a/src/route/proj/ProjEditFree.tsx +++ b/src/route/proj/ProjEditFree.tsx @@ -40,6 +40,8 @@ type ProjModType = { } export default function ProjEdit() { + // 项目状态 + const [projStatus, setprojStatus] = useState('') const dispath = useDispatch() // 更新所属者表格储存至redux const upBelongArray = () => { @@ -163,7 +165,7 @@ export default function ProjEdit() { // console.log('模块信息', data); const allSuccess = data.every(item => item.aiFieldStatus === 'SUCCESS'); // console.log('检测项目',allSuccess); - + if (data.length > 0 && allSuccess) { setAiHelperModalOpen(false); } else { @@ -393,7 +395,7 @@ export default function ProjEdit() { onSuccess({ data }) { // const isEdited = data.editSteps[0].editStatus == EditStepEnum.EDITED // && data.editSteps[5].editStatus == EditStepEnum.EDITED; - // console.log('嘻嘻', data.projModCount); + // console.log('查看项目', data); // if(data.projModCount >= 3){ // setCanGenerate(true) // } @@ -416,6 +418,7 @@ export default function ProjEdit() { projMods: data.projMods }) // getListMods() + setprojStatus(data.projStatus) } }) } @@ -499,7 +502,7 @@ export default function ProjEdit() { }) } { - isEditStepEdited && isConfigEdited ? ( + isEditStepEdited && isConfigEdited && projStatus != 'EXPIRED' ? (