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}
+
+ >
+ 我有材料
+ 我无材料
+
+
+
(注:若无源码文档和软件文档选择“我无材料”,材料将由平台提供)
-
商标商城
+
申请商标
@@ -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() {
})}