diff --git a/src/components/PackageModal/PackageModal.tsx b/src/components/PackageModal/PackageModal.tsx index 782a919..1b4b15b 100644 --- a/src/components/PackageModal/PackageModal.tsx +++ b/src/components/PackageModal/PackageModal.tsx @@ -127,6 +127,16 @@ export default function PackageModal() { return
{text / 100}元
} }, + { + title: '有效期至', + dataIndex: 'packageExpireTime', + key: 'packageOrderId', + // 居中显示 + align: 'center', + render: (text) => { + return
{text?text:"——"}
+ } + }, { title: '剩余次数', dataIndex: 'packageTotalSurplusCount', @@ -214,14 +224,14 @@ export default function PackageModal() { align: 'center', width: 200, }, - { + { title: '使用数量', dataIndex: 'itemUseCount', key: 'packageOrderItemId', align: 'center', width: 100, }, - { + { title: '剩余数量', dataIndex: 'itemCount', key: 'packageOrderItemId', diff --git a/src/route/AppElectron/AppEdit.tsx b/src/route/AppElectron/AppEdit.tsx index 39428a8..883297a 100644 --- a/src/route/AppElectron/AppEdit.tsx +++ b/src/route/AppElectron/AppEdit.tsx @@ -147,6 +147,7 @@ export default function AppEdit() { const [filesInfo, setFilesInfo] = useState({ sourceCodeDocFile: '',//源码 softwareDocFile: '',//软件 + thereAnyFileL:'' }) const [checkRemark, setCheckRemark] = useState('') //未通过原因 // 文件想想请 @@ -184,6 +185,7 @@ export default function AppEdit() { setFilesInfo({ sourceCodeDocFile: res.sourceCodeDocFile,//源码 softwareDocFile: res.softwareDocFile,//软件 + thereAnyFile:res.thereAnyFile //是否有材料 }) setEditProcess(Number(res.appOrderProgress) + 1) setCheckStatus(res.checkStatus) diff --git a/src/route/AppElectron/AppElectron.tsx b/src/route/AppElectron/AppElectron.tsx index 22be245..dd3ea27 100644 --- a/src/route/AppElectron/AppElectron.tsx +++ b/src/route/AppElectron/AppElectron.tsx @@ -145,7 +145,7 @@ export default function AppElectron() { width: 150, render: (text) => ( - {text == '1' ? '未付款' : text == '2' ? '资料填写中' : text == '3' ? '资料审核中' : text == '4' ? '线下申请中' : text == '5' ? '已下证' : '未知'} + {text == '1' ? '未付款' : text == '2' ? '资料填写中' : text == '3' ? '资料审核中' : text == '4' ? '待完善资料' : text == '5' ? '线下申请中' : text == '6' ? '已下证' :'未知'} ) }, diff --git a/src/route/AppElectron/components/AppCompany/AppCompany.tsx b/src/route/AppElectron/components/AppCompany/AppCompany.tsx index f23c646..6024b8c 100644 --- a/src/route/AppElectron/components/AppCompany/AppCompany.tsx +++ b/src/route/AppElectron/components/AppCompany/AppCompany.tsx @@ -38,8 +38,8 @@ export default function AppCompany(props: any) { } return Promise.resolve(); }; - // 定义 beforeUpload 函数 - const beforeUpload = (file: any) => { + // 定义 beforeUpload上传证件 函数 + const beforeUploadcompanyPhoto = (file: any) => { const isJpgOrPng = ['image/jpeg', 'image/png', 'image/bmp'].includes(file.type); if (!isJpgOrPng) { message.error('只能上传 JPG、JPEG、PNG、BMP 格式的文件!'); @@ -56,6 +56,25 @@ export default function AppCompany(props: any) { } return isJpgOrPng && isLt4M; + }; + // 定义 beforeUpload上传授权书 函数 + const beforeUploadcompanyAuth = (file: any) => { + const isJpgOrPng = ['image/jpeg', 'image/png', 'image/bmp'].includes(file.type); + if (!isJpgOrPng) { + message.error('只能上传 JPG、JPEG、PNG、BMP 格式的文件!'); + form.setFieldsValue({ + 'companyAuth': '', + }); + } + const isLt4M = file.size / 1024 / 1024 < 4; + if (!isLt4M) { + message.error('文件大小不能超过 4MB!'); + form.setFieldsValue({ + 'companyAuth': '', + }); + } + return isJpgOrPng && isLt4M; + }; // type FileType = Parameters>[0]; const [loading, setLoading] = useState(false); @@ -185,7 +204,7 @@ export default function AppCompany(props: any) { } const onFinish = async (values: any) => { // 处理表单提交逻辑 - // console.log('表单提交成功', values); + console.log('表单提交成功', values); // console.log('发过来的数据', props.companyInfo); if (!deepCompareObjects(values, props.companyInfo)) { try { @@ -295,7 +314,7 @@ export default function AppCompany(props: any) { }}>
上传证件*
+ }}>上传营业执照*
-
+
鉴别材料
diff --git a/src/route/AppElectron/components/EditAppFiles/EditAppFiles.tsx b/src/route/AppElectron/components/EditAppFiles/EditAppFiles.tsx index 1ef779e..1700e6b 100644 --- a/src/route/AppElectron/components/EditAppFiles/EditAppFiles.tsx +++ b/src/route/AppElectron/components/EditAppFiles/EditAppFiles.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import { Button, Form, Upload, message, Modal, Spin } from "antd" +import { Button, Form, Upload, message, Modal, Spin, Radio } from "antd" import { uploadFileUrl, showImage } from '../../../../request/request' import { UploadOutlined } from '@ant-design/icons'; import { sourceCodeWord, softwareDocumentWord, uploadMaterial, fileDetail } from '../../../../request/api' @@ -7,6 +7,8 @@ import './edit-app-files.css' export default function EditAppFiles(props: any) { const [messageApi, contextHolder] = message.useMessage(); const [loading, setLoading] = useState(false) + //是否有材料 + const [thereAnyFile, setThereAnyFile] = useState('1') const downCodeWord = async () => { try { setLoading(true) @@ -145,12 +147,60 @@ export default function EditAppFiles(props: any) { const token = sessionStorage.getItem('token') const height = window.innerHeight - 460; const [form] = Form.useForm(); + const noFileSubmit = async () => { + try { + setLoading(true) + await uploadMaterial(props.appOrderId, { + thereAnyFile: thereAnyFile, + sourceCodeDocFile: '',//源码 + softwareDocFile: '',//软件 + }) + props.setFilesInfo( + { + sourceCodeDocFile: '',//源码 + softwareDocFile: '',//软件 + thereAnyFile: thereAnyFile //是否有材料 + } + ) + props.setEditProcess(4); + + + setLoading(false) + } catch (error: any) { + setLoading(false) + if (error.response) { + const data = error.response.data; + messageApi.open({ + type: 'error', + content: data.msg ? data.msg : `${data.path}(${data.status})`, + }); + } else { + console.error(error) + } + } finally { + setLoading(false) + } + } const handleSubmit = () => { // console.log(form); // props.setEditProcess(4); // 调用表单实例的 submit 方法 - form.submit(); + if (thereAnyFile == '1') { + form.submit(); + } + + if (thereAnyFile == '0') { + // console.log(props.filesInfo.thereAnyFile); + // return + + if (props.filesInfo.thereAnyFile != '0') { + noFileSubmit() + } else { + props.setEditProcess(4); + } + + } }; function deepCompareObjects(obj1: any, obj2: any): boolean { // 若两个值严格相等,直接返回 true @@ -189,10 +239,15 @@ export default function EditAppFiles(props: any) { // deepCompareObjects(values, props.filesInfo) // console.log(!deepCompareObjects(values, props.filesInfo)); // return - if (!deepCompareObjects(values, props.filesInfo)) { + const newObj = { + thereAnyFile: thereAnyFile,//是否有材料 + ...values + } + if (!deepCompareObjects(newObj, props.filesInfo)) { try { setLoading(true) await uploadMaterial(props.appOrderId, { + thereAnyFile: thereAnyFile, ...values }) props.setFilesInfo( @@ -281,6 +336,9 @@ export default function EditAppFiles(props: any) { if (props.filesInfo.softwareDocFile) { getSoftFileDetail(props.filesInfo.softwareDocFile) } + if(props.filesInfo.thereAnyFile){ + setThereAnyFile(props.filesInfo.thereAnyFile) + } form.setFieldsValue({ sourceCodeDocFile: props.filesInfo.sourceCodeDocFile, softwareDocFile: props.filesInfo.softwareDocFile, @@ -300,8 +358,40 @@ export default function EditAppFiles(props: any) { marginLeft: '100px', paddingBottom: '0' }}> +
+ 是否有材料*: + { + setThereAnyFile(e.target.value) + } + } value={thereAnyFile} + + > + 我有材料 + 我无材料 + +
+
(注:若无源码文档和软件文档选择“我无材料”,材料将由平台提供)
{ diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx index 9586327..57a46a7 100644 --- a/src/route/index/Index.tsx +++ b/src/route/index/Index.tsx @@ -1843,7 +1843,7 @@ export default function Index() { setRrefunSearchBox(false) setCorrectionSearchBox(false) setContractSearchBox(false) - setNow('首页 / 电子软著APP') + setNow('首页 / 申请电子软著') setSellSearchBox(false) setSellOrderSearchBox(false) setCopyrightSearchBox(false) @@ -1872,7 +1872,7 @@ export default function Index() { setRrefunSearchBox(false) setCorrectionSearchBox(false) setContractSearchBox(false) - setNow('首页 / 商标商城') + setNow('首页 / 申请商标') setSellSearchBox(false) setSellOrderSearchBox(false) setCopyrightSearchBox(false) @@ -2248,7 +2248,7 @@ export default function Index() { -
电子软著APP
+
申请电子软著
-
商标商城
+
申请商标
@@ -3782,8 +3782,9 @@ export default function Index() { // { value: '1', label: '未付款' }, { value: '2', label: '资料填写中' }, { value: '3', label: '资料审核中' }, - { value: '4', label: '线下申请中' }, - { value: '5', label: '已下证' }, + { value: '4', label: '待完善资料' }, + { value: '5', label: '线下申请中' }, + { value: '6', label: '已下证' }, ]} > @@ -4368,6 +4369,12 @@ export default function Index() { })}
+
注:下证时间以提交盖章页第二个工作日算起
{ if (appGoodsId) {