From 6cbca77a237e335ae08d288552bf4d92eea41303 Mon Sep 17 00:00:00 2001 From: lyp Date: Wed, 4 Jun 2025 09:25:40 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/route/Correction/Correction.tsx | 4 +- src/route/TrademarkMall/TrademarkAiEdit.tsx | 145 ++++++++++++++++ .../TrademarkMall/TrademarkExpertEdit.tsx | 147 +++++++++++++++- .../components/EditFive/EditFive.tsx | 50 ++++++ .../components/EditFour/EditFour.tsx | 50 ++++++ .../components/EditOne/EditOne.css | 41 +++++ .../components/EditOne/EditOne.tsx | 158 ++++++++++++++++++ .../components/EditSix/EditSix.tsx | 50 ++++++ .../components/EditThree/EditThree.tsx | 50 ++++++ .../components/EditTwo/EditTwo.tsx | 50 ++++++ src/route/TrademarkMall/trademark-edit.css | 58 +++++++ src/route/index/Index.tsx | 32 ++-- src/route/router.tsx | 5 + src/util/AjaxUtils.ts | 2 +- 14 files changed, 826 insertions(+), 16 deletions(-) create mode 100644 src/route/TrademarkMall/TrademarkAiEdit.tsx create mode 100644 src/route/TrademarkMall/components/EditFive/EditFive.tsx create mode 100644 src/route/TrademarkMall/components/EditFour/EditFour.tsx create mode 100644 src/route/TrademarkMall/components/EditOne/EditOne.css create mode 100644 src/route/TrademarkMall/components/EditOne/EditOne.tsx create mode 100644 src/route/TrademarkMall/components/EditSix/EditSix.tsx create mode 100644 src/route/TrademarkMall/components/EditThree/EditThree.tsx create mode 100644 src/route/TrademarkMall/components/EditTwo/EditTwo.tsx diff --git a/src/route/Correction/Correction.tsx b/src/route/Correction/Correction.tsx index 1d7bc4d..78961da 100644 --- a/src/route/Correction/Correction.tsx +++ b/src/route/Correction/Correction.tsx @@ -1136,7 +1136,7 @@ export default function Correction() { } - 换名 - + */} +
+
+
= 1 ? '#3B60E8' : '', + color: editProcess >= 1 ? '#fff' : '#B1B1B1', + borderColor: editProcess >= 1 ? '' : '#B1B1B1' + }} + >1
+
= 1 ? '#353535' : '#878787', + fontWeight: editProcess >= 1 ? 'bold' : 'normal' + }} + >填写基础信息
+
+
+
+
= 2 ? '#3B60E8' : '', + color: editProcess >= 2 ? '#fff' : '#B1B1B1', + borderColor: editProcess >= 2 ? '' : '#B1B1B1' + }}>2
+
= 2 ? '#353535' : '#878787', + fontWeight: editProcess >= 2 ? 'bold' : 'normal' + }} + >选择商标类别
+
+
+
+
= 3 ? '#3B60E8' : '', + color: editProcess >= 3 ? '#fff' : '#B1B1B1', + borderColor: editProcess >= 3 ? '' : '#B1B1B1' + }}>3
+
= 3 ? '#353535' : '#878787', + fontWeight: editProcess >= 3 ? 'bold' : 'normal' + }} + >选择所属者
+
+
+
+
= 4 ? '#3B60E8' : '', + color: editProcess >= 4 ? '#fff' : '#B1B1B1', + borderColor: editProcess >= 4 ? '' : '#B1B1B1' + }}>4
+
= 4 ? '#353535' : '#878787', + fontWeight: editProcess >= 4 ? 'bold' : 'normal' + }} + > + 订单支付 +
+
+
+
+
= 5 ? '#3B60E8' : '', + color: editProcess >= 5 ? '#fff' : '#B1B1B1', + borderColor: editProcess >= 5 ? '' : '#B1B1B1' + }}>5
+
= 5 ? '#353535' : '#878787', + fontWeight: editProcess >= 5 ? 'bold' : 'normal' + }} + >上传委托书
+
+
+
+
= 6 ? '#3B60E8' : '', + color: editProcess >= 6 ? '#fff' : '#B1B1B1', + borderColor: editProcess >= 6 ? '' : '#B1B1B1' + }}>6
+
= 6 ? '#353535' : '#878787', + fontWeight: editProcess >= 6 ? 'bold' : 'normal' + }} + >上传商标局
+
+ + +
+
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + ) +} diff --git a/src/route/TrademarkMall/TrademarkExpertEdit.tsx b/src/route/TrademarkMall/TrademarkExpertEdit.tsx index 1ccf5d1..1f66947 100644 --- a/src/route/TrademarkMall/TrademarkExpertEdit.tsx +++ b/src/route/TrademarkMall/TrademarkExpertEdit.tsx @@ -1,10 +1,151 @@ -import React from 'react' +import { useEffect, useState } from 'react' import './trademark-edit.css' +import { useLocation } from 'react-router-dom'; +import { + Form, + Input, Button, + Modal +} from 'antd'; +const { TextArea } = Input; export default function TrademarkExpertEdit() { + const { state } = useLocation() const height = window.innerHeight - 180; + const [form] = Form.useForm(); + const [modal, setModal] = useState(false) + const onFinish = (values: any) => { + console.log(values); + setModal(true) + } + useEffect(() => { + console.log('state', state); + }, []) return ( -
- +
+
+
+
+ ! +
+
+ 支付完成后会有商标专家联系您并为您服务,请确保填写的手机号真实准确。填写的商标信息后续可以修改,请您放心填写。 +
+
+
+
+
+
+ ! +
+
+
至尊无忧注册由专业商标顾问团队为您全程代办商标申请和递交流程,
+
指定类目至尊无忧注册,指定类目被驳回可全额赔付,非指定类目驳回不支持赔付;
+
全部小类至尊无忧注册,商标局下发《商标驳回通知书》可全额赔付,包含部分驳回和全部驳回通知书。
+
+
+
+
+ +
+
+
+ 商标名称* : +
+
+ + + + + + + + +
+
+
+
+ 需求描述 : +
+
+ + + + + + + +
+
+
在您提交商标申请咨询单后,工作日期间专业顾问会在1小时内与您联系,非工作日时间会在下一个工作日与您取得联系。
+
本网站会保护您的个人信息,仅有本网站及其授权委托机构可以看到您提交的信息,请放心提供。
+ + + + +
+ +
+
+
+ +
+ { setModal(false) }} + okText='确定' + cancelText='取消' + > + 该操作会扣除{state.price}元,确定操作吗? +
) } diff --git a/src/route/TrademarkMall/components/EditFive/EditFive.tsx b/src/route/TrademarkMall/components/EditFive/EditFive.tsx new file mode 100644 index 0000000..9afd416 --- /dev/null +++ b/src/route/TrademarkMall/components/EditFive/EditFive.tsx @@ -0,0 +1,50 @@ +import React from 'react' +import { Button } from 'antd' +export default function editFive(props: any) { + const height = window.innerHeight - 350; + const handleSubmit = () => { + // console.log(form); + props.setEditProcess(6); + // 调用表单实例的 submit 方法 + // form.submit(); + + }; + return ( +
+
+
+
+
+ + +
+
+ ) +} diff --git a/src/route/TrademarkMall/components/EditFour/EditFour.tsx b/src/route/TrademarkMall/components/EditFour/EditFour.tsx new file mode 100644 index 0000000..2bf42de --- /dev/null +++ b/src/route/TrademarkMall/components/EditFour/EditFour.tsx @@ -0,0 +1,50 @@ +import React from 'react' +import { Button } from 'antd' +export default function editFour(props: any) { + const height = window.innerHeight - 350; + const handleSubmit = () => { + // console.log(form); + props.setEditProcess(5); + // 调用表单实例的 submit 方法 + // form.submit(); + + }; + return ( +
+
+
+
+
+ + +
+
+ ) +} diff --git a/src/route/TrademarkMall/components/EditOne/EditOne.css b/src/route/TrademarkMall/components/EditOne/EditOne.css new file mode 100644 index 0000000..6a4a3cf --- /dev/null +++ b/src/route/TrademarkMall/components/EditOne/EditOne.css @@ -0,0 +1,41 @@ +.topLine { + width: 100%; + height: 10px; + background: #F3F3F3; +} + +.editFormBox { + /* padding: 10px; + box-sizing: border-box; */ +} + +.editFormTitle { + font-size: 18px; + margin-bottom: 20px; + /* height: 46px; */ + /* background: pink; */ +} + +.editFormItem { + display: flex; + /* align-items: center; */ + height: 46px; + /* background-color: pink; */ + line-height: 46px; + /* width: 200px; */ +} + +.firstItem { + /* background: skyblue; */ + align-items: center; + +} + +.editFormItemTitle { + font-size: 16px; + /* width: 120px; */ +} + +.redTitle { + color: red; +} \ No newline at end of file diff --git a/src/route/TrademarkMall/components/EditOne/EditOne.tsx b/src/route/TrademarkMall/components/EditOne/EditOne.tsx new file mode 100644 index 0000000..ac0d27f --- /dev/null +++ b/src/route/TrademarkMall/components/EditOne/EditOne.tsx @@ -0,0 +1,158 @@ +import { useState } from 'react' +import { Button, Radio, Form, Input } from 'antd' +import './EditOne.css' +const { TextArea } = Input; +export default function EditOne(props: any) { + const [form] = Form.useForm(); + const height = window.innerHeight - 350; + const [goodsType, setGoodsType] = useState('a') + const handleSubmit = () => { + // console.log(form); + // props.setEditProcess(2); + // 调用表单实例的 submit 方法 + form.submit(); + + }; + const onFinish = (values: any) => { + console.log(values); + props.setEditProcess(2); + + } + const onChange = (e: any) => { + setGoodsType(e.target.value) + }; + return ( +
+
+
+
+ 基本信息 +
+
+
+ 商标类型*: +
+
+ + 文字商标 + 图形商标 + 文字图形组合商标 + +
+
如何选择? +
+
+
+
+
+ 商标名称*: +
+ + + + + + + + + + +
+
+
+ 商标说明*: +
+ + + + + + + + + +
+ + + + + {/* +
+ +
+
*/} +
+
+ + + +
+
+
+ +
+
+ ) +} diff --git a/src/route/TrademarkMall/components/EditSix/EditSix.tsx b/src/route/TrademarkMall/components/EditSix/EditSix.tsx new file mode 100644 index 0000000..57a7be4 --- /dev/null +++ b/src/route/TrademarkMall/components/EditSix/EditSix.tsx @@ -0,0 +1,50 @@ +import React from 'react' +import { Button } from 'antd' +export default function editSix(props: any) { + const height = window.innerHeight - 350; + const handleSubmit = () => { + // console.log(form); + // 调用表单实例的 submit 方法 + // form.submit(); + alert('提交成功') + + }; + return ( +
+
+
+
+
+ + +
+
+ ) +} diff --git a/src/route/TrademarkMall/components/EditThree/EditThree.tsx b/src/route/TrademarkMall/components/EditThree/EditThree.tsx new file mode 100644 index 0000000..bb5c6fd --- /dev/null +++ b/src/route/TrademarkMall/components/EditThree/EditThree.tsx @@ -0,0 +1,50 @@ +import React from 'react' +import { Button } from 'antd' +export default function editThree(props: any) { + const height = window.innerHeight - 350; + const handleSubmit = () => { + // console.log(form); + props.setEditProcess(4); + // 调用表单实例的 submit 方法 + // form.submit(); + + }; + return ( +
+
+
+
+
+ + +
+
+ ) +} diff --git a/src/route/TrademarkMall/components/EditTwo/EditTwo.tsx b/src/route/TrademarkMall/components/EditTwo/EditTwo.tsx new file mode 100644 index 0000000..9cec126 --- /dev/null +++ b/src/route/TrademarkMall/components/EditTwo/EditTwo.tsx @@ -0,0 +1,50 @@ +import React from 'react' +import { Button } from 'antd' +export default function editTwo(props: any) { + const height = window.innerHeight - 350; + const handleSubmit = () => { + // console.log(form); + props.setEditProcess(3); + // 调用表单实例的 submit 方法 + // form.submit(); + + }; + return ( +
+
+
+
+
+ + +
+
+ ) +} diff --git a/src/route/TrademarkMall/trademark-edit.css b/src/route/TrademarkMall/trademark-edit.css index a64b9da..e538bd5 100644 --- a/src/route/TrademarkMall/trademark-edit.css +++ b/src/route/TrademarkMall/trademark-edit.css @@ -5,4 +5,62 @@ box-sizing: border-box; padding: 30px 45px 0 45px; box-sizing: border-box; +} + +.trademarkAiBox { + margin-top: 18px; + background-color: rgb(255, 255, 255); + padding: 0px 19px 0px 19px; + box-sizing: border-box; + padding: 30px 45px 0 45px; + box-sizing: border-box; +} + +.trademarkTop { + padding: 5px 10px; + box-sizing: border-box; + background-color: #fff4e6; + display: flex; + /* line-height: 20px; */ +} + +.trademarkTopL { + width: 20px; + height: 20px; + border-radius: 10px; + background-color: #ff9326; + text-align: center; + line-height: 20px; + color: #ffffff; + margin-right: 5px; +} + +.trademarkForm { + margin-left: 100px; + /* display: flex; */ + /* align-items: center; */ + /* justify-content: center; */ +} + +.trademarkForm-item { + + display: flex; + /* background-color: pink; */ + +} + +.trademarkForm-title { + width: 120px; + height: 46px; + line-height: 46px; + /* background-color: pink; */ + font-size: 16px; + text-wrap: nowrap; +} + +.trademark-btn { + /* background-color: pink; */ + display: flex; + justify-content: center; + margin-top: 50px; } \ No newline at end of file diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx index 322637b..3042cf8 100644 --- a/src/route/index/Index.tsx +++ b/src/route/index/Index.tsx @@ -19,11 +19,11 @@ import RefunModal from '../../components/RefunModal/RefunModal.tsx' import CorrectionModal from '../../components/CorrectionModal/CorrectionModal.tsx' import ReplaceModal from '../../components/ReplaceModal/ReplaceModal.tsx' import ContractModal from '../../components/ContractModal/ContractModal.tsx' -// import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx' +import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx' // import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx"; // import ListProj from "../../components/list/ListProj.tsx"; // import ListProjAgent from "../../components/list/ListProjAgent.tsx"; -// import { getMenuActive } from '../../util/cache.ts' +import { getMenuActive } from '../../util/cache.ts' import { @@ -86,10 +86,10 @@ interface DataType { } -// import app from '../../static/left/app.png' -// import appnew from '../../static/left/appnew.png' -// import tra from '../../static/left/tra.png' -// import tranew from '../../static/left/tranew.png' +import app from '../../static/left/app.png' +import appnew from '../../static/left/appnew.png' +import tra from '../../static/left/tra.png' +import tranew from '../../static/left/tranew.png' import topblack from '../../static/appimgs/topblack.png' import topblue from '../../static/appimgs/topblue.png' @@ -2065,7 +2065,7 @@ export default function Index() { list={agentMenu.list} handleListItem={agentMenu.handleListItem} /> */} - {/* {THEME == 'mzw' ? ( + {THEME == 'mzw' ? ( <>
) : ( <> - )} */} + )} {/* { - console.log(item.nowprice); + console.log(item); setTrademarkModal(false) - nav('/trademark-expert-edit') + nav('/trademark-expert-edit', { + state: { + title: item.title, + price: item.nowprice + } + }) console.log('简单'); @@ -4358,6 +4363,13 @@ export default function Index() { onClick={() => { console.log(item.nowprice); console.log('复杂'); + setTrademarkModal(false) + nav('/trademark-ai-edit', { + state: { + title: item.title, + price: item.nowprice + } + }) }} >开始编辑
diff --git a/src/route/router.tsx b/src/route/router.tsx index 4bab0d4..f4c184b 100644 --- a/src/route/router.tsx +++ b/src/route/router.tsx @@ -5,6 +5,7 @@ import AppElectron from '../route/AppElectron/AppElectron.tsx' import AppEdit from '../route/AppElectron/AppEdit.tsx' import TrademarkMall from '../route/TrademarkMall/TrademarkMall.tsx' import TrademarkExpertEdit from '../route/TrademarkMall/TrademarkExpertEdit.tsx' +import TrademarkAiEdit from '../route/TrademarkMall/TrademarkAiEdit.tsx' import TransactionOrder from '../route/TransactionOrder/TransactionOrder.tsx' import CopyrightGgoods from '../route/CopyrightGgoods/CopyrightGgoods.tsx' import TradingGoods from '../route/TradingGoods/TradingGoods.tsx' @@ -238,6 +239,10 @@ export const router = createHashRouter( { path:'/trademark-expert-edit', element: + }, + { + path:'/trademark-ai-edit', + element: }, { path: '/transaction-order', diff --git a/src/util/AjaxUtils.ts b/src/util/AjaxUtils.ts index 52d030e..6b0f683 100644 --- a/src/util/AjaxUtils.ts +++ b/src/util/AjaxUtils.ts @@ -153,7 +153,7 @@ export function getUseUrl() { } // 购买协议 export function getBuyUrl() { - axios.get(`${baseUrl}/operator/app/agreementportal/getrelease/0542d435-dc22-459b-bf4a-28a61afe400b `) + axios.get(`${baseUrl}/operator/app/agreementportal/getrelease/0542d435-dc22-459b-bf4a-28a61afe400b`) .then((data:any) => { window.open(`${baseUrl}/operator/route/agreementportal/view?agreementId=${data.data.agreementId}&title=${data.data.title}`) }) From e479dae8847c45e26c26403e89142f827799e9e6 Mon Sep 17 00:00:00 2001 From: lyp Date: Wed, 4 Jun 2025 09:53:33 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/route/index/Index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx index ffe967b..7458ae1 100644 --- a/src/route/index/Index.tsx +++ b/src/route/index/Index.tsx @@ -2139,7 +2139,7 @@ export default function Index() { ) : ( <> - )} */} + )} {THEME == 'mzw' ? ( Date: Wed, 4 Jun 2025 10:23:27 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 4 +- src/route/ProductRelease/ProductRelease.tsx | 18 +-- .../components/EditOne/EditOne.tsx | 106 +++++++++++++++++- 3 files changed, 111 insertions(+), 17 deletions(-) diff --git a/.env.dev b/.env.dev index 5a4483b..c1d55b0 100644 --- a/.env.dev +++ b/.env.dev @@ -6,9 +6,9 @@ VITE_OPERATOR_PLUGIN_BASE_URL=${VITE_BASE_URL}:8099 VITE_AI_SHOP_BASE_URL=http://192.168.0.115:8081 VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright # 18634604067 -VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671 +# VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671 # VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74 -# VITE_USERID=5cc90b84-905e-4027-9f6c-ab47e9c320a1 +VITE_USERID=5cc90b84-905e-4027-9f6c-ab47e9c320a1 # VITE_CURRENT_THEME=fzkj VITE_CURRENT_THEME=mzw # VITE_HOST=121.36.71.250:58038 diff --git a/src/route/ProductRelease/ProductRelease.tsx b/src/route/ProductRelease/ProductRelease.tsx index 0acac58..6b791c2 100644 --- a/src/route/ProductRelease/ProductRelease.tsx +++ b/src/route/ProductRelease/ProductRelease.tsx @@ -134,7 +134,7 @@ export default function ProductRelease() { return { ...dataItem, goodsStatus: 0 - + }; } return dataItem; @@ -142,7 +142,7 @@ export default function ProductRelease() { }) // console.log('setData', data); - + setOffModalOpen(false) messageApi.open({ type: 'success', @@ -583,18 +583,18 @@ export default function ProductRelease() { edit(item) }}>编辑
正在交易中...
-
已完成 diff --git a/src/route/TrademarkMall/components/EditOne/EditOne.tsx b/src/route/TrademarkMall/components/EditOne/EditOne.tsx index ac0d27f..d898487 100644 --- a/src/route/TrademarkMall/components/EditOne/EditOne.tsx +++ b/src/route/TrademarkMall/components/EditOne/EditOne.tsx @@ -3,17 +3,30 @@ import { Button, Radio, Form, Input } from 'antd' import './EditOne.css' const { TextArea } = Input; export default function EditOne(props: any) { - const [form] = Form.useForm(); + const [formA] = Form.useForm(); // 文字商标表单 + const [formB] = Form.useForm(); // 图形商标表单 const height = window.innerHeight - 350; const [goodsType, setGoodsType] = useState('a') const handleSubmit = () => { // console.log(form); // props.setEditProcess(2); // 调用表单实例的 submit 方法 - form.submit(); + if (goodsType === 'a') { + formA.submit(); + } else if (goodsType === 'b') { + formB.submit(); + } else { + // 表单不显示时,直接更新步骤 + props.setEditProcess(2); + } }; - const onFinish = (values: any) => { + const onFinishA = (values: any) => { + console.log(values); + props.setEditProcess(2); + + } + const onFinishB = (values: any) => { console.log(values); props.setEditProcess(2); @@ -55,9 +68,9 @@ export default function EditOne(props: any) { display: goodsType === 'a' ? 'unset' : 'none', }}>
@@ -133,6 +146,87 @@ export default function EditOne(props: any) {
+
+ +
+
+ 商标名称*: +
+ + + + + + + + + + +
+
+
+ 商标说明*: +
+ + + + + + + + + +
+ + + + + {/* +
+ +
+
*/} + +
+
From 211759db4910980df478b0da6c680036c740f7dd Mon Sep 17 00:00:00 2001 From: lyp Date: Wed, 4 Jun 2025 17:50:49 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/EditModal/EditModal.tsx | 2 +- src/route/TrademarkMall/TrademarkAiEdit.tsx | 4 +- .../components/EditOne/EditOne.css | 5 +- .../components/EditOne/EditOne.tsx | 424 +++++++++++++++--- 4 files changed, 374 insertions(+), 61 deletions(-) diff --git a/src/route/ProductRelease/components/EditModal/EditModal.tsx b/src/route/ProductRelease/components/EditModal/EditModal.tsx index f888628..aa73287 100644 --- a/src/route/ProductRelease/components/EditModal/EditModal.tsx +++ b/src/route/ProductRelease/components/EditModal/EditModal.tsx @@ -165,7 +165,7 @@ export default function EditModal(props: any) { }); const handleChange: UploadProps['onChange'] = (info) => { - + if (info.file.status === 'uploading') { setLoading(true); return; diff --git a/src/route/TrademarkMall/TrademarkAiEdit.tsx b/src/route/TrademarkMall/TrademarkAiEdit.tsx index bc487d8..f768d09 100644 --- a/src/route/TrademarkMall/TrademarkAiEdit.tsx +++ b/src/route/TrademarkMall/TrademarkAiEdit.tsx @@ -14,7 +14,9 @@ export default function TrademarkAiEdit() { const [editProcess, setEditProcess] = useState(1); return (
-
+
(); // 文字商标表单 const [formB] = Form.useForm(); // 图形商标表单 const height = window.innerHeight - 350; const [goodsType, setGoodsType] = useState('a') + // 生成方式 + const [generateType, setGenerateType] = useState('1') const handleSubmit = () => { // console.log(form); // props.setEditProcess(2); @@ -21,6 +29,71 @@ export default function EditOne(props: any) { } }; + const [fileList, setFileList] = useState([]); + + const handleChange: UploadProps['onChange'] = (info) => { + // console.log(info.file.status); + + + if (info.file.status === 'uploading') { + // setFileList([]) + return; + } + if (info.file.status === 'done') { + + // const fileId = info.file.response.data.fileId; + // // console.log(downloadUrl(fileId)); + + // const url = showImage(fileId, false); + setFileList([ + { + uid: info.file.response.data.fileId, + name: info.file.response.data.fileName, + status: 'done', + url: showImage(info.file.response.data.fileId, false) + } + ]) + + return; + } + if (info.file.status === 'error') { + message.error(`上传失败`); + return; + } + }; + // 自动生成的img + const [generateImgId, setGenerateImgId] = useState('') + const [imgList, setImgList] = useState([]) + const upImgHandleChange: UploadProps['onChange'] = (info) => { + console.log(info.file.status); + + + if (info.file.status === 'uploading') { + // setFileList([]) + return; + } + if (info.file.status === 'done') { + + // const fileId = info.file.response.data.fileId; + // // console.log(downloadUrl(fileId)); + + // const url = showImage(fileId, false); + setImgList([ + { + uid: info.file.response.data.fileId, + name: info.file.response.data.fileName, + status: 'done', + url: showImage(info.file.response.data.fileId, false) + } + ]) + + return; + } + if (info.file.status === 'error') { + message.error(`上传失败`); + return; + } + }; const onFinishA = (values: any) => { console.log(values); props.setEditProcess(2); @@ -34,6 +107,19 @@ export default function EditOne(props: any) { const onChange = (e: any) => { setGoodsType(e.target.value) }; + const generateTypeChange = (e: any) => { + setGenerateType(e.target.value) + // 给FormA表单的imgUrl赋值 + // if (e.target.value === '1') { + // formA.setFieldsValue({ imgUrl: generateImgId }) + // } + // if (e.target.value === '2') { + // formA.setFieldsValue({ imgUrl: imgList[0]?.uid}) + // } + formA.setFieldsValue({ imgUrl: '' }) + setGenerateImgId('') + setImgList([]) + } return (
@@ -42,11 +128,25 @@ export default function EditOne(props: any) { // background: 'pink', padding: '10px', boxSizing: 'border-box', + overflow: 'auto', }}> -
- +
+
+ ! +
+
+
智能商标申请存在较高的失败风险,建议无商标申请经验的用户使用“专家辅助申请"或"至尊无忧注册"提高商标申清通过率。
+
当前仅提供文字、图形或文字图形组合商标申请;暂不支持立体商标、声音商标、证明商标、集体商标的申请。
+
商标局录入的商标信息以商标图样为准,且最终使用需与商标图样一致,请您确认手动上传的商标图样是您想要注册的商标。
+
-
+
基本信息
@@ -74,36 +174,137 @@ export default function EditOne(props: any) { name="FormA" form={formA} onFinish={onFinishA} + onFinishFailed={(errorInfo) => { + // console.log(errorInfo) + // message.error('请填写完整的信息!') + errorInfo.errorFields.forEach((field) => { + if (field.errors.length > 0) { + // 显示每条错误信息 + message.error(field.errors[0]); + } + }); + }} initialValues={{ softWare: '' }} style={{ marginTop: 20 }} > -
+
商标名称*
- - - + - + + - + +
+
+ 若您的商标涉及他人姓名/肖像/期刊,请下载授权声明书模板,填写完盖章签字后 +
+ { + const isPNG = file.type === 'image/png'; + const isPDF = file.type === 'application/pdf'; + const isJPG = file.type === 'image/jpg' || file.type === 'image/jpeg'; + if (!isPNG && !isPDF && !isJPG) { + // console.error('仅支持 PNG、PDF、JPG 格式的文件!'); + message.error('仅支持 PNG、PDF、JPG 格式的文件!'); + } + return isPNG || isPDF || isJPG; + }} + // fileList={[]} + onChange={handleChange} + showUploadList={false} + headers={{ 'Auth': `Bearer ${token}` }} + disabled={fileList.length > 0} + > + 上传附件 + +
+
+ ({fileList.length}/1) +
+
+ {fileList.length > 0 ? ( +
+
{ + window.open(showImage(fileList[0].uid, false)) + }}> + {fileList[0].name} +
+
{ + setFileList([]) + }}>
+
+ ) : ( + <> + )} + {/* 嘻嘻 */} + {/* */} +
+
+
+ 2021年12月10日起,商标名称作为必填项提交至商标局。商标局审核人员会根据商标图样中的文字字母等实际展示的信息重新命名商标名称,并展示在商标局官网。 如何解决请参考文档 +
+ +
+ +
商标说明*: @@ -121,7 +322,7 @@ export default function EditOne(props: any) { color: 'black', resize: 'none' }} - placeholder="商标说明" + placeholder="例:商标由中文“**”、英文“**”及图形构成,无特殊含义。" > @@ -131,21 +332,152 @@ export default function EditOne(props: any) {
- - - - {/* -
- +
+
+ 商标类型*
- */} +
+ + 自动生成 + 手动上传 + +
+
+
+
+ + + + +
+ 暂无图片 +
+
+
+ +
+
+
+ { + const isPNG = file.type === 'image/png'; + const isJPG = file.type === 'image/jpg' || file.type === 'image/jpeg'; + if (!isPNG && !isJPG) { + // console.error('仅支持 PNG、PDF、JPG 格式的文件!'); + message.error('仅支持 PNG、JPG 格式的文件!'); + } + return isPNG || isJPG; + }} + // fileList={[]} + onChange={upImgHandleChange} + showUploadList={false} + headers={{ 'Auth': `Bearer ${token}` }} + disabled={imgList.length > 0} + > +
+ 上传图片 +
+
+
+ +
+ +
+
@@ -159,31 +491,7 @@ export default function EditOne(props: any) { initialValues={{ softWare: '' }} style={{ marginTop: 20 }} > -
-
- 商标名称*: -
- - - - - - - - - -
From 2f400d490f5ad469ad816af7ba98e45074e83f2b Mon Sep 17 00:00:00 2001 From: lyp Date: Thu, 5 Jun 2025 14:34:04 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 4 +- .../OrderDetailModal/OrderDetailModal.tsx | 2 +- .../OrderDetailModal/components/File/File.tsx | 163 +++++++++++++++--- src/components/menu/MenuWithTopButton.tsx | 140 +++++++-------- src/interfaces/menu/IMenuWithTopButton.ts | 4 + src/route/Correction/Correction.tsx | 3 +- src/route/Replace/Replace.tsx | 3 +- src/route/TrademarkMall/TrademarkAiEdit.tsx | 23 ++- .../components/EditOne/EditOne.tsx | 137 +++++++++++---- src/route/TradingGoods/TradingGoods.tsx | 4 +- src/route/index/Index.tsx | 21 +++ 11 files changed, 364 insertions(+), 140 deletions(-) diff --git a/.env.dev b/.env.dev index c1d55b0..5a4483b 100644 --- a/.env.dev +++ b/.env.dev @@ -6,9 +6,9 @@ VITE_OPERATOR_PLUGIN_BASE_URL=${VITE_BASE_URL}:8099 VITE_AI_SHOP_BASE_URL=http://192.168.0.115:8081 VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright # 18634604067 -# VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671 +VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671 # VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74 -VITE_USERID=5cc90b84-905e-4027-9f6c-ab47e9c320a1 +# VITE_USERID=5cc90b84-905e-4027-9f6c-ab47e9c320a1 # VITE_CURRENT_THEME=fzkj VITE_CURRENT_THEME=mzw # VITE_HOST=121.36.71.250:58038 diff --git a/src/components/OrderDetailModal/OrderDetailModal.tsx b/src/components/OrderDetailModal/OrderDetailModal.tsx index ad59ba3..4b3fd57 100644 --- a/src/components/OrderDetailModal/OrderDetailModal.tsx +++ b/src/components/OrderDetailModal/OrderDetailModal.tsx @@ -187,7 +187,7 @@ export default function OrderDetailModal(props: any) {
- +
{/*
diff --git a/src/components/OrderDetailModal/components/File/File.tsx b/src/components/OrderDetailModal/components/File/File.tsx index 88a2fd8..6c47799 100644 --- a/src/components/OrderDetailModal/components/File/File.tsx +++ b/src/components/OrderDetailModal/components/File/File.tsx @@ -12,7 +12,7 @@ export default function File(props: any) { // 自定义验证函数 const validateContentOrFile = (_rule: any, _value: any, callback: (error?: string) => void, form: any) => { const { upCorrectionRemark, upFile } = form.getFieldsValue(); - if (upCorrectionRemark || (upFile && Array.isArray(upFile.fileList) && upFile.fileList.length > 0)) { + if (upCorrectionRemark || upFile) { callback(); } else { callback('内容和附件至少需要填写或上传一项'); @@ -126,6 +126,8 @@ export default function File(props: any) { const res: any = await getFileTypeByIds({ ids: ids }) + // console.log(res); + setFileList(res) } catch (error: any) { @@ -141,14 +143,99 @@ export default function File(props: any) { } } } + // 获取上传过的文件类型 + const getUpFileTypeByIdsArray = async (ids: string) => { + try { + const res: any = await getFileTypeByIds({ + ids: ids + }) + console.log(res); + const newUpFile = res.map((item: any) => { + return { + uid: item.fileId, + name: item.fileName, + status: 'done', + url: showImage(item.fileId, false) + } + }) + // console.log(newUpFile, 'newUpFile'); + setUpFileArray(newUpFile) + + } catch (error: any) { + + 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) + } + } + } // 补充资料详情 const [detailData, setDetailData] = useState({}) + const [disabled, setDisabled] = useState(false) // 是否禁用 const getSupplementDetail = async (id: string) => { try { const res: any = await supplementDetail(id) // console.log(res); + // 给表单赋值 + // form.setFieldsValue({ + // upCorrectionRemark: res.correctionRemark, // 内容 + // upFile:'1111' + // }) + // 给上传列表赋值 + // setUpFileArray([{ + // uid: '1111', + // name: '嘻嘻', + // status: 'done', + // url: 'www.baidu.com' + // }]) + + setDetailData(res) await getFileTypeByIdsArray(res.correctionFiles) + // console.log(props.user, 'user'); + const userId = props.user == 'sell' ? res.sellId : res.buyId; + // console.log(userId, 'userId'); + if (userId) { + console.log('已补充'); + setDisabled(true) + const newData: any = await supplementDetail(userId) + console.log('以补充材料', newData); + form.setFieldsValue({ + upCorrectionRemark: newData.correctionRemark, // 内容 + + }) + if (newData.correctionFiles) { + getUpFileTypeByIdsArray(newData.correctionFiles) + // const newArray:any = getFileTypeByIds({ + // ids: newData.correctionFiles + // }) + // console.log(newArray, 'newArray'); + // console.log('有补充资料'); + // // 循环newArray 形成新 + // const newUpFile = newArray.map((item:any)=>{ + // return { + // uid: item.fileId, + // name: item.fileName, + // status: 'done', + // url: 'www.baidu.com' + // } + // }) + // console.log(newUpFile, 'newUpFile'); + + + } + + + + } else { + setDisabled(false) + } + } catch (error: any) { @@ -254,6 +341,8 @@ export default function File(props: any) { setCorrectionId(record.correctionId) getSupplementDetail(record.correctionId) setIsModalVisible(true) + // 清空上传的文件数组 + setUpFileArray([]) // 清空表单 form.resetFields(); // setCorrectionType(record.correctionType) @@ -263,7 +352,7 @@ export default function File(props: any) { )} /> - { - // console.log(value); + console.log(value); // if (value.upFile && Array.isArray(value.upFile.fileList)) { // const uids = value.upFile.fileList.map((file: any) => file.uid); // const uidString = uids.join(','); @@ -366,19 +455,21 @@ export default function File(props: any) { // console.log('提取的 uid 字符串:', uids); + submitData({ + correctionFiles: value.upFile ? value.upFile : '', + correctionRemark: value.upCorrectionRemark ? value.upCorrectionRemark : '', + }) + // console.log(upFileArray); + // 将upFileArray 数组里的uid 提取出来 + // const uids = upFileArray.map((file: any) => file.uid).join(','); + + // const uids = upFileArray.map((file: any) => file.response.data.fileId).join(','); + // console.log('提取的 uid 字符串:', uids); // submitData({ // correctionFiles: uids, // correctionRemark: value.upCorrectionRemark, // }) - // console.log(upFileArray); - // 将upFileArray 数组周末和每项的response里的data 里的 fileId 拼接成一个字符串,用逗号隔开 - const uids = upFileArray.map((file: any) => file.response.data.fileId).join(','); - // console.log('提取的 uid 字符串:', uids); - submitData({ - correctionFiles: uids, - correctionRemark: value.upCorrectionRemark, - }) - + }} onFinishFailed={() => { @@ -408,6 +499,7 @@ export default function File(props: any) { width: 900, }} + disabled={disabled} placeholder='请输入需要补充内容' > @@ -435,15 +527,38 @@ export default function File(props: any) { > { - setUpFileArray(info.fileList) - // console.log(info.fileList); - + // console.log(info.file.status); + // setUpFileArray(info.fileList) + const { fileList } = info; + const newFileArray = fileList.map((file) => { + if (file.status === 'done' && file.response) { + return { + uid: file.response.data.fileId, + name: file.response.data.fileName, + status: 'done', + url: showImage(file.response.data.fileId, false) + }; + } + return file; + }); + setUpFileArray(newFileArray); + // console.log(newFileArray); + const uids = newFileArray.map((file: any) => file.uid).join(','); + // console.log(uids); + + // 给form 赋值 + form.setFieldsValue({ + upFile: uids, + }) + + }} - + headers={{ 'Auth': `Bearer ${token}` }} > @@ -465,11 +580,15 @@ export default function File(props: any) { gap: 10, // marginTop: 20 }}> - - +
+ + +
diff --git a/src/components/menu/MenuWithTopButton.tsx b/src/components/menu/MenuWithTopButton.tsx index 3d30fd0..61e6626 100644 --- a/src/components/menu/MenuWithTopButton.tsx +++ b/src/components/menu/MenuWithTopButton.tsx @@ -31,74 +31,78 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) { const list = menuItem.map((item, index) => ( // 创建项目下三个选项 -
  • { - - props.handleListItem(e, index, item); - setMenuActive(item.id) - // console.log(item.id); +
  • { - // const goHome = item.id == 'ALL' || item.id == 'PROCESSING' || item.id == 'COMPLETE' - // if (props.button.name == '项目') { - if (props.button.name == '项目') { + props.handleListItem(e, index, item); + setMenuActive(item.id) + // console.log(item.id); - navugate('/home', { - state: { - keyword: props.keywords, - type: props.type, - chargeAdditionals: props.chargeAdditionals, - tagDataId: props.tagDataId, - authorId: props.authorId, - payStatus: props.payStatus - } - }) - } - if (item.id == 'REFUN') { - // props.disableBelongpeople() - navugate('/refun', { - state: { - keywords: props.refunKeywords, - applyStatus: props.applyStatus, - authorId: props.authorId - } - }) - } - if (item.id == 'CORRECTION') { - // props.disableBelongpeople() - navugate('/correction', { - state: { - keywords: props.correctionKeywords, - correctionNumType: props.correctionNumType, - correctionType: props.correctionType, - applyStatus: props.correctionApplyStatus, - authorId: props.authorId, - tagCor: props.tagCor, - } - }) - } - if (item.id == 'CONTRACT') { - // props.disableBelongpeople() - navugate('/contract', { - state: { - // keywords: props.correctionKeywords, - // correctionNumType:props.correctionNumType, - // correctionType:props.correctionType, - // applyStatus: props.correctionApplyStatus, - // authorId: props.authorId - } - }) - } - if (item.id == 'REPLACENAME') { - // props.disableBelongpeople() - navugate('/replace', { - - }) - } + // const goHome = item.id == 'ALL' || item.id == 'PROCESSING' || item.id == 'COMPLETE' + // if (props.button.name == '项目') { + if (props.button.name == '项目') { - }}> + navugate('/home', { + state: { + keyword: props.keywords, + type: props.type, + chargeAdditionals: props.chargeAdditionals, + tagDataId: props.tagDataId, + authorId: props.authorId, + payStatus: props.payStatus + } + }) + } + if (item.id == 'REFUN') { + // props.disableBelongpeople() + navugate('/refun', { + state: { + keywords: props.refunKeywords, + applyStatus: props.applyStatus, + authorId: props.authorId + } + }) + } + if (item.id == 'CORRECTION') { + // props.disableBelongpeople() + navugate('/correction', { + state: { + keywords: props.correctionKeywords, + correctionNumType: props.correctionNumType, + correctionType: props.correctionType, + applyStatus: props.correctionApplyStatus, + authorId: props.authorId, + tagCor: props.tagCor, + } + }) + } + if (item.id == 'CONTRACT') { + // props.disableBelongpeople() + navugate('/contract', { + state: { + // keywords: props.correctionKeywords, + // correctionNumType:props.correctionNumType, + // correctionType:props.correctionType, + // applyStatus: props.correctionApplyStatus, + // authorId: props.authorId + } + }) + } + if (item.id == 'REPLACENAME') { + // props.disableBelongpeople() + navugate('/replace', { + state: { + keywords: props.replaceKeyWords, + applyStatus: props.replaceStatus, + authorId: props.authorId + } + }) + } + + }}> {item.icon ? (加载失败) : <>} {item.name} @@ -108,7 +112,7 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) { return (
    {/* button 是三个黄色按钮 */}
    @@ -159,7 +163,7 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) { textAlign: 'center', lineHeight: '36px', borderRadius: '5px', - + }}> {/* */} @@ -167,7 +171,7 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
    创建
    + }} />创建
    {/*
    申请
    */} {/*
    申请
    */} diff --git a/src/interfaces/menu/IMenuWithTopButton.ts b/src/interfaces/menu/IMenuWithTopButton.ts index e9e5ad7..8e997db 100644 --- a/src/interfaces/menu/IMenuWithTopButton.ts +++ b/src/interfaces/menu/IMenuWithTopButton.ts @@ -59,4 +59,8 @@ export interface IMenuWithTopButton { tradingEndTime?: any, tradingStatus?: any, + + replaceKeyWords?: any, + replaceStatus?: any, + } \ No newline at end of file diff --git a/src/route/Correction/Correction.tsx b/src/route/Correction/Correction.tsx index 96ba272..655d5d0 100644 --- a/src/route/Correction/Correction.tsx +++ b/src/route/Correction/Correction.tsx @@ -883,7 +883,8 @@ export default function Correction() { useEffect(() => { // getData(1) - + // console.log(state); + getData(1) setPage(1) // console.log(tagCor); diff --git a/src/route/Replace/Replace.tsx b/src/route/Replace/Replace.tsx index 0b66007..4ca4376 100644 --- a/src/route/Replace/Replace.tsx +++ b/src/route/Replace/Replace.tsx @@ -234,7 +234,8 @@ export default function Replcae() { useEffect(() => { // getData(1) - + // console.log(state); + getData(1) setPage(1) // console.log(tagCor); diff --git a/src/route/TrademarkMall/TrademarkAiEdit.tsx b/src/route/TrademarkMall/TrademarkAiEdit.tsx index f768d09..344fe26 100644 --- a/src/route/TrademarkMall/TrademarkAiEdit.tsx +++ b/src/route/TrademarkMall/TrademarkAiEdit.tsx @@ -15,7 +15,7 @@ export default function TrademarkAiEdit() { return (
    - +
    - +
    - +
    - +
    - +
    diff --git a/src/route/TrademarkMall/components/EditOne/EditOne.tsx b/src/route/TrademarkMall/components/EditOne/EditOne.tsx index 8903bff..4855661 100644 --- a/src/route/TrademarkMall/components/EditOne/EditOne.tsx +++ b/src/route/TrademarkMall/components/EditOne/EditOne.tsx @@ -1,5 +1,5 @@ import { useState } from 'react' -import { Button, Radio, Form, Input, Upload, message, Image } from 'antd' +import { Button, Radio, Form, Input, Upload, message, Image, Spin } from 'antd' import './EditOne.css' import { uploadFileUrl, showImage } from '../../../../request/request' import { @@ -64,20 +64,25 @@ export default function EditOne(props: any) { // 自动生成的img const [generateImgId, setGenerateImgId] = useState('') const [imgList, setImgList] = useState([]) + // 上传商标文字图片 + const [textLodaing, setTextLodaing] = useState(false) const upImgHandleChange: UploadProps['onChange'] = (info) => { console.log(info.file.status); if (info.file.status === 'uploading') { // setFileList([]) + setTextLodaing(true) return; } if (info.file.status === 'done') { - + setTextLodaing(false) // const fileId = info.file.response.data.fileId; // // console.log(downloadUrl(fileId)); // const url = showImage(fileId, false); + console.log(info.file.response.data.fileId); + setImgList([ { uid: info.file.response.data.fileId, @@ -86,22 +91,24 @@ export default function EditOne(props: any) { url: showImage(info.file.response.data.fileId, false) } ]) + formA.setFieldsValue({ imgUrl: info.file.response.data.fileId }) return; } if (info.file.status === 'error') { + setTextLodaing(false) message.error(`上传失败`); return; } }; const onFinishA = (values: any) => { console.log(values); - props.setEditProcess(2); + // props.setEditProcess(2); } const onFinishB = (values: any) => { console.log(values); - props.setEditProcess(2); + // props.setEditProcess(2); } const onChange = (e: any) => { @@ -367,7 +374,7 @@ export default function EditOne(props: any) { color: 'black', resize: 'none' }} - value={generateType == '1' ? generateImgId : imgList[0]?.uid} + // value={generateType == '1' ? generateImgId : imgList[0]?.uid} placeholder="商标说明" > @@ -389,6 +396,7 @@ export default function EditOne(props: any) { }}> 暂无图片
    + {/* 自动生成图片 */}
  • + {/* 手动上传图片 */}
    0 ? 'unset' : 'none', width: 200, height: 100, background: 'white', @@ -429,45 +438,97 @@ export default function EditOne(props: any) { fontSize: '20px', border: '1px dashed #d6d6d6', }}> - { - const isPNG = file.type === 'image/png'; - const isJPG = file.type === 'image/jpg' || file.type === 'image/jpeg'; - if (!isPNG && !isJPG) { - // console.error('仅支持 PNG、PDF、JPG 格式的文件!'); - message.error('仅支持 PNG、JPG 格式的文件!'); - } - return isPNG || isJPG; - }} - // fileList={[]} - onChange={upImgHandleChange} - showUploadList={false} - headers={{ 'Auth': `Bearer ${token}` }} - disabled={imgList.length > 0} - > -
    - 上传图片 -
    -
    +
    + +
    +
    { + setImgList([]) + formA.setFieldsValue({ imgUrl: '' }) + }} + >删除
    + +
    + + +
    + + { + const isPNG = file.type === 'image/png'; + const isJPG = file.type === 'image/jpg' || file.type === 'image/jpeg'; + if (!isPNG && !isJPG) { + // console.error('仅支持 PNG、PDF、JPG 格式的文件!'); + message.error('仅支持 PNG、JPG 格式的文件!'); + } + return isPNG || isJPG; + }} + // fileList={[]} + onChange={upImgHandleChange} + showUploadList={false} + headers={{ 'Auth': `Bearer ${token}` }} + disabled={imgList.length > 0} + > +
    + 上传图片 +
    +
    +