This commit is contained in:
lyp 2025-07-16 16:36:57 +08:00
parent f3d4450245
commit 3c8d260100
7 changed files with 149 additions and 19 deletions

View File

@ -127,6 +127,16 @@ export default function PackageModal() {
return <div>{text / 100}</div>
}
},
{
title: '有效期至',
dataIndex: 'packageExpireTime',
key: 'packageOrderId',
// 居中显示
align: 'center',
render: (text) => {
return <div>{text?text:"——"} </div>
}
},
{
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',

View File

@ -147,6 +147,7 @@ export default function AppEdit() {
const [filesInfo, setFilesInfo] = useState<any>({
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)

View File

@ -145,7 +145,7 @@ export default function AppElectron() {
width: 150,
render: (text) => (
<span>
{text == '1' ? '未付款' : text == '2' ? '资料填写中' : text == '3' ? '资料审核中' : text == '4' ? '线下申请中' : text == '5' ? '已下证' : '未知'}
{text == '1' ? '未付款' : text == '2' ? '资料填写中' : text == '3' ? '资料审核中' : text == '4' ? '待完善资料' : text == '5' ? '线下申请中' : text == '6' ? '已下证' :'未知'}
</span>
)
},

View File

@ -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<GetProp<UploadProps, 'beforeUpload'>>[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) {
}}>
<div className='appInfoFormInput'>
<div className='FormInputTitle' style={{
}}><span style={{ color: 'red', }}>*</span></div>
}}><span style={{ color: 'red', }}>*</span></div>
<div style={{
// background: 'pink',
position: 'relative',
@ -313,7 +332,7 @@ export default function AppCompany(props: any) {
showUploadList={false}
action={uploadImageUrl()}
// defaultFileList={upImgArray}
beforeUpload={beforeUpload}
beforeUpload={beforeUploadcompanyPhoto}
onChange={handleChange}
headers={{ 'Auth': `Bearer ${token}` }}
@ -427,7 +446,7 @@ export default function AppCompany(props: any) {
name='image'
showUploadList={false}
action={uploadImageUrl()}
beforeUpload={beforeUpload}
beforeUpload={beforeUploadcompanyAuth}
onChange={textHandleChange}
headers={{ 'Auth': `Bearer ${token}` }}

View File

@ -344,7 +344,9 @@ export default function AppInfo(props: any) {
</div>
</div>
<div className='appInfoBox'>
<div className='appInfoBox' style={{
display:filesInfo.thereAnyFile == '0'?'none':'unset'
}}>
<div className='appInfoTitle'></div>
<div className='appInfoText'>

View File

@ -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'
}}>
<div style={{
fontSize: 16,
paddingLeft: 58
}}>
<span style={{ color: 'red', }}>*</span>
<Radio.Group
onChange={
(e) => {
setThereAnyFile(e.target.value)
}
} value={thereAnyFile}
>
<Radio value="1" style={{
fontSize: 16
}}></Radio>
<Radio value="0" style={{
marginLeft: 20,
fontSize: 16
}}></Radio>
</Radio.Group>
</div>
<div
style={{
paddingLeft: 58,
marginTop: 5,
color: 'red'
}}
>(:若无源码文档和软件文档选择)</div>
<div style={{
height: '80px',
// background: 'pink',
marginTop: 20,
display: thereAnyFile == '1' ? 'unset' : 'none'
}}>
<Form form={form} onFinish={onFinish}
onFinishFailed={(errorInfo: any) => {

View File

@ -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() {
<img src={getMenuActive() == 'APP' ? appnew : app} width={21} height={23} alt=""
style={{ marginLeft: 20, marginRight: 9 }}
/>
<div>APP</div>
<div></div>
</div>
<div style={{
@ -2282,7 +2282,7 @@ export default function Index() {
<img src={getMenuActive() == 'TRADEMARK' ? tranew : tra} width={21} height={21} alt=""
style={{ marginLeft: 20, marginRight: 9, marginTop: 3 }}
/>
<div></div>
<div></div>
</div>
@ -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() {
})}
</div>
<div style={{
marginTop:10,
fontSize:16,
fontWeight:700,
color:'red'
}}>:下证时间以提交盖章页第二个工作日算起</div>
<div className='appGoodsBtnBox'>
<div className='appGoodsBtn' onClick={async () => {
if (appGoodsId) {