修改
This commit is contained in:
parent
211759db49
commit
2f400d490f
4
.env.dev
4
.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_AI_SHOP_BASE_URL=http://192.168.0.115:8081
|
||||||
VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright
|
VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright
|
||||||
# 18634604067
|
# 18634604067
|
||||||
# VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671
|
VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671
|
||||||
# VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74
|
# 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=fzkj
|
||||||
VITE_CURRENT_THEME=mzw
|
VITE_CURRENT_THEME=mzw
|
||||||
# VITE_HOST=121.36.71.250:58038
|
# VITE_HOST=121.36.71.250:58038
|
||||||
|
@ -187,7 +187,7 @@ export default function OrderDetailModal(props: any) {
|
|||||||
<Authorize authorizeInfo={authorizeInfo} ></Authorize>
|
<Authorize authorizeInfo={authorizeInfo} ></Authorize>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ display: activeKey == 'file' ? 'block' : 'none' }}>
|
<div style={{ display: activeKey == 'file' ? 'block' : 'none' }}>
|
||||||
<File user={props.user} orderId={props.orderId}></File>
|
<File user={props.user} upData={props.upData} orderId={props.orderId}></File>
|
||||||
</div>
|
</div>
|
||||||
{/* <div style={{ display: activeKey == 'result' ? 'block' : 'none' }}>
|
{/* <div style={{ display: activeKey == 'result' ? 'block' : 'none' }}>
|
||||||
<Result ></Result>
|
<Result ></Result>
|
||||||
|
@ -12,7 +12,7 @@ export default function File(props: any) {
|
|||||||
// 自定义验证函数
|
// 自定义验证函数
|
||||||
const validateContentOrFile = (_rule: any, _value: any, callback: (error?: string) => void, form: any) => {
|
const validateContentOrFile = (_rule: any, _value: any, callback: (error?: string) => void, form: any) => {
|
||||||
const { upCorrectionRemark, upFile } = form.getFieldsValue();
|
const { upCorrectionRemark, upFile } = form.getFieldsValue();
|
||||||
if (upCorrectionRemark || (upFile && Array.isArray(upFile.fileList) && upFile.fileList.length > 0)) {
|
if (upCorrectionRemark || upFile) {
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
callback('内容和附件至少需要填写或上传一项');
|
callback('内容和附件至少需要填写或上传一项');
|
||||||
@ -126,6 +126,8 @@ export default function File(props: any) {
|
|||||||
const res: any = await getFileTypeByIds({
|
const res: any = await getFileTypeByIds({
|
||||||
ids: ids
|
ids: ids
|
||||||
})
|
})
|
||||||
|
// console.log(res);
|
||||||
|
|
||||||
setFileList(res)
|
setFileList(res)
|
||||||
|
|
||||||
} catch (error: any) {
|
} 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<any>({})
|
const [detailData, setDetailData] = useState<any>({})
|
||||||
|
const [disabled, setDisabled] = useState(false) // 是否禁用
|
||||||
const getSupplementDetail = async (id: string) => {
|
const getSupplementDetail = async (id: string) => {
|
||||||
try {
|
try {
|
||||||
const res: any = await supplementDetail(id)
|
const res: any = await supplementDetail(id)
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
|
// 给表单赋值
|
||||||
|
// form.setFieldsValue({
|
||||||
|
// upCorrectionRemark: res.correctionRemark, // 内容
|
||||||
|
// upFile:'1111'
|
||||||
|
// })
|
||||||
|
// 给上传列表赋值
|
||||||
|
// setUpFileArray([{
|
||||||
|
// uid: '1111',
|
||||||
|
// name: '嘻嘻',
|
||||||
|
// status: 'done',
|
||||||
|
// url: 'www.baidu.com'
|
||||||
|
// }])
|
||||||
|
|
||||||
|
|
||||||
setDetailData(res)
|
setDetailData(res)
|
||||||
await getFileTypeByIdsArray(res.correctionFiles)
|
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) {
|
} catch (error: any) {
|
||||||
|
|
||||||
@ -254,6 +341,8 @@ export default function File(props: any) {
|
|||||||
setCorrectionId(record.correctionId)
|
setCorrectionId(record.correctionId)
|
||||||
getSupplementDetail(record.correctionId)
|
getSupplementDetail(record.correctionId)
|
||||||
setIsModalVisible(true)
|
setIsModalVisible(true)
|
||||||
|
// 清空上传的文件数组
|
||||||
|
setUpFileArray([])
|
||||||
// 清空表单
|
// 清空表单
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
// setCorrectionType(record.correctionType)
|
// setCorrectionType(record.correctionType)
|
||||||
@ -263,7 +352,7 @@ export default function File(props: any) {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Table>
|
</Table>
|
||||||
<Modal title={'补充'}
|
<Modal title={disabled?'查看':'补充'}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
open={isModalVisible}
|
open={isModalVisible}
|
||||||
footer={null} // 将 footer 设置为 null 来隐藏自带按钮
|
footer={null} // 将 footer 设置为 null 来隐藏自带按钮
|
||||||
@ -354,7 +443,7 @@ export default function File(props: any) {
|
|||||||
|
|
||||||
onFinish={(value) => {
|
onFinish={(value) => {
|
||||||
|
|
||||||
// console.log(value);
|
console.log(value);
|
||||||
// if (value.upFile && Array.isArray(value.upFile.fileList)) {
|
// if (value.upFile && Array.isArray(value.upFile.fileList)) {
|
||||||
// const uids = value.upFile.fileList.map((file: any) => file.uid);
|
// const uids = value.upFile.fileList.map((file: any) => file.uid);
|
||||||
// const uidString = uids.join(',');
|
// const uidString = uids.join(',');
|
||||||
@ -366,19 +455,21 @@ export default function File(props: any) {
|
|||||||
|
|
||||||
// console.log('提取的 uid 字符串:', uids);
|
// 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({
|
// submitData({
|
||||||
// correctionFiles: uids,
|
// correctionFiles: uids,
|
||||||
// correctionRemark: value.upCorrectionRemark,
|
// 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={() => {
|
onFinishFailed={() => {
|
||||||
@ -408,6 +499,7 @@ export default function File(props: any) {
|
|||||||
width: 900,
|
width: 900,
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
disabled={disabled}
|
||||||
placeholder='请输入需要补充内容'
|
placeholder='请输入需要补充内容'
|
||||||
></TextArea>
|
></TextArea>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@ -435,15 +527,38 @@ export default function File(props: any) {
|
|||||||
>
|
>
|
||||||
|
|
||||||
<Upload
|
<Upload
|
||||||
|
disabled={disabled}
|
||||||
name="file"
|
name="file"
|
||||||
action={uploadFileUrl()}
|
action={uploadFileUrl()}
|
||||||
defaultFileList={upFileArray}
|
fileList={upFileArray}
|
||||||
onChange={(info) => {
|
onChange={(info) => {
|
||||||
setUpFileArray(info.fileList)
|
// console.log(info.file.status);
|
||||||
// console.log(info.fileList);
|
// 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}` }}
|
headers={{ 'Auth': `Bearer ${token}` }}
|
||||||
|
|
||||||
>
|
>
|
||||||
@ -465,11 +580,15 @@ export default function File(props: any) {
|
|||||||
gap: 10,
|
gap: 10,
|
||||||
// marginTop: 20
|
// marginTop: 20
|
||||||
}}>
|
}}>
|
||||||
<Button onClick={() => {
|
<div style={{
|
||||||
setIsModalVisible(false)
|
display: disabled ? 'none' : 'unset',
|
||||||
form.resetFields();
|
}}>
|
||||||
}}>取消</Button>
|
<Button onClick={() => {
|
||||||
<Button type="primary" htmlType="submit" >确定</Button>
|
setIsModalVisible(false)
|
||||||
|
form.resetFields();
|
||||||
|
}}>取消</Button>
|
||||||
|
<Button type="primary" htmlType="submit" style={{ marginLeft: 10 }} >确定</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
@ -31,74 +31,78 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
|||||||
|
|
||||||
const list = menuItem.map((item, index) => (
|
const list = menuItem.map((item, index) => (
|
||||||
// 创建项目下三个选项
|
// 创建项目下三个选项
|
||||||
<li className={item.active ? 'active' : ''}
|
<li className={item.active ? 'active' : ''}
|
||||||
style={{
|
style={{
|
||||||
color: item.active? '' : 'var( --color-menuoption)'
|
color: item.active ? '' : 'var( --color-menuoption)'
|
||||||
}}
|
}}
|
||||||
key={item.id} onClick={(e) => {
|
key={item.id} onClick={(e) => {
|
||||||
|
|
||||||
props.handleListItem(e, index, item);
|
|
||||||
setMenuActive(item.id)
|
|
||||||
// console.log(item.id);
|
|
||||||
|
|
||||||
// const goHome = item.id == 'ALL' || item.id == 'PROCESSING' || item.id == 'COMPLETE'
|
props.handleListItem(e, index, item);
|
||||||
// if (props.button.name == '项目') {
|
setMenuActive(item.id)
|
||||||
if (props.button.name == '项目') {
|
// console.log(item.id);
|
||||||
|
|
||||||
navugate('/home', {
|
// const goHome = item.id == 'ALL' || item.id == 'PROCESSING' || item.id == 'COMPLETE'
|
||||||
state: {
|
// if (props.button.name == '项目') {
|
||||||
keyword: props.keywords,
|
if (props.button.name == '项目') {
|
||||||
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', {
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
}}>
|
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 ? (<img src={item.icon} className="menu-icon" alt="加载失败" />) : <></>}
|
{item.icon ? (<img src={item.icon} className="menu-icon" alt="加载失败" />) : <></>}
|
||||||
<span className="menu-name">{item.name}</span>
|
<span className="menu-name">{item.name}</span>
|
||||||
@ -108,7 +112,7 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="menu-with-top-button" style={{
|
<div className="menu-with-top-button" style={{
|
||||||
borderBottom: THEME=='fzkj'?'1px solid var(--color-menuborder)':'',
|
borderBottom: THEME == 'fzkj' ? '1px solid var(--color-menuborder)' : '',
|
||||||
}}>
|
}}>
|
||||||
{/* button 是三个黄色按钮 */}
|
{/* button 是三个黄色按钮 */}
|
||||||
<div className='top'>
|
<div className='top'>
|
||||||
@ -159,7 +163,7 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
lineHeight: '36px',
|
lineHeight: '36px',
|
||||||
borderRadius: '5px',
|
borderRadius: '5px',
|
||||||
|
|
||||||
|
|
||||||
}}>
|
}}>
|
||||||
{/* <img src={newImg} alt="" /> */}
|
{/* <img src={newImg} alt="" /> */}
|
||||||
@ -167,7 +171,7 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
|||||||
<div style={{ display: props.button.name == '项目' ? 'block' : 'none', fontSize: 18 }}><PlusOutlined style={{
|
<div style={{ display: props.button.name == '项目' ? 'block' : 'none', fontSize: 18 }}><PlusOutlined style={{
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginRight: 5,
|
marginRight: 5,
|
||||||
}}/>创建</div>
|
}} />创建</div>
|
||||||
</div>
|
</div>
|
||||||
{/* <div style={{ display: props.button.name == '退款' ? 'block' : 'none' }}>申请</div> */}
|
{/* <div style={{ display: props.button.name == '退款' ? 'block' : 'none' }}>申请</div> */}
|
||||||
{/* <div style={{ display: props.button.name == '补正' ? 'block' : 'none' }}>申请</div> */}
|
{/* <div style={{ display: props.button.name == '补正' ? 'block' : 'none' }}>申请</div> */}
|
||||||
|
@ -59,4 +59,8 @@ export interface IMenuWithTopButton {
|
|||||||
tradingEndTime?: any,
|
tradingEndTime?: any,
|
||||||
tradingStatus?: any,
|
tradingStatus?: any,
|
||||||
|
|
||||||
|
|
||||||
|
replaceKeyWords?: any,
|
||||||
|
replaceStatus?: any,
|
||||||
|
|
||||||
}
|
}
|
@ -883,7 +883,8 @@ export default function Correction() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// getData(1)
|
// getData(1)
|
||||||
|
// console.log(state);
|
||||||
|
|
||||||
getData(1)
|
getData(1)
|
||||||
setPage(1)
|
setPage(1)
|
||||||
// console.log(tagCor);
|
// console.log(tagCor);
|
||||||
|
@ -234,7 +234,8 @@ export default function Replcae() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// getData(1)
|
// getData(1)
|
||||||
|
// console.log(state);
|
||||||
|
|
||||||
getData(1)
|
getData(1)
|
||||||
setPage(1)
|
setPage(1)
|
||||||
// console.log(tagCor);
|
// console.log(tagCor);
|
||||||
|
@ -15,7 +15,7 @@ export default function TrademarkAiEdit() {
|
|||||||
return (
|
return (
|
||||||
<div className='trademarkAiBox' style={{ height: `${height}px`, overflow: 'auto' }}>
|
<div className='trademarkAiBox' style={{ height: `${height}px`, overflow: 'auto' }}>
|
||||||
<div className='editProcessBox' style={{
|
<div className='editProcessBox' style={{
|
||||||
marginBottom:20
|
marginBottom: 20
|
||||||
}}>
|
}}>
|
||||||
<div className='editProcess' >
|
<div className='editProcess' >
|
||||||
<div className='editProcessNum'
|
<div className='editProcessNum'
|
||||||
@ -112,34 +112,45 @@ export default function TrademarkAiEdit() {
|
|||||||
display: editProcess == 1 ? 'block' : 'none'
|
display: editProcess == 1 ? 'block' : 'none'
|
||||||
}}>
|
}}>
|
||||||
<EditOne
|
<EditOne
|
||||||
|
key={editProcess}
|
||||||
setEditProcess={setEditProcess}
|
setEditProcess={setEditProcess}
|
||||||
></EditOne>
|
></EditOne>
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div style={{
|
||||||
display: editProcess == 2 ? 'block' : 'none'
|
display: editProcess == 2 ? 'block' : 'none'
|
||||||
}}>
|
}}>
|
||||||
<EditTwo setEditProcess={setEditProcess}></EditTwo>
|
<EditTwo
|
||||||
|
key={editProcess}
|
||||||
|
setEditProcess={setEditProcess}></EditTwo>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div style={{
|
||||||
display: editProcess == 3 ? 'block' : 'none'
|
display: editProcess == 3 ? 'block' : 'none'
|
||||||
}}>
|
}}>
|
||||||
<EditThree setEditProcess={setEditProcess}></EditThree>
|
<EditThree
|
||||||
|
key={editProcess}
|
||||||
|
setEditProcess={setEditProcess}></EditThree>
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div style={{
|
||||||
display: editProcess == 4 ? 'block' : 'none'
|
display: editProcess == 4 ? 'block' : 'none'
|
||||||
}}>
|
}}>
|
||||||
<EditFour setEditProcess={setEditProcess}></EditFour>
|
<EditFour
|
||||||
|
key={editProcess}
|
||||||
|
setEditProcess={setEditProcess}></EditFour>
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div style={{
|
||||||
display: editProcess == 5 ? 'block' : 'none'
|
display: editProcess == 5 ? 'block' : 'none'
|
||||||
}}>
|
}}>
|
||||||
<EditFive setEditProcess={setEditProcess}></EditFive>
|
<EditFive
|
||||||
|
key={editProcess}
|
||||||
|
setEditProcess={setEditProcess}></EditFive>
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div style={{
|
||||||
display: editProcess == 6 ? 'block' : 'none'
|
display: editProcess == 6 ? 'block' : 'none'
|
||||||
}}>
|
}}>
|
||||||
<EditSix setEditProcess={setEditProcess}></EditSix>
|
<EditSix
|
||||||
|
key={editProcess}
|
||||||
|
setEditProcess={setEditProcess}></EditSix>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { useState } from 'react'
|
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 './EditOne.css'
|
||||||
import { uploadFileUrl, showImage } from '../../../../request/request'
|
import { uploadFileUrl, showImage } from '../../../../request/request'
|
||||||
import {
|
import {
|
||||||
@ -64,20 +64,25 @@ export default function EditOne(props: any) {
|
|||||||
// 自动生成的img
|
// 自动生成的img
|
||||||
const [generateImgId, setGenerateImgId] = useState<any>('')
|
const [generateImgId, setGenerateImgId] = useState<any>('')
|
||||||
const [imgList, setImgList] = useState<any>([])
|
const [imgList, setImgList] = useState<any>([])
|
||||||
|
// 上传商标文字图片
|
||||||
|
const [textLodaing, setTextLodaing] = useState(false)
|
||||||
const upImgHandleChange: UploadProps['onChange'] = (info) => {
|
const upImgHandleChange: UploadProps['onChange'] = (info) => {
|
||||||
console.log(info.file.status);
|
console.log(info.file.status);
|
||||||
|
|
||||||
|
|
||||||
if (info.file.status === 'uploading') {
|
if (info.file.status === 'uploading') {
|
||||||
// setFileList([])
|
// setFileList([])
|
||||||
|
setTextLodaing(true)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
|
setTextLodaing(false)
|
||||||
// const fileId = info.file.response.data.fileId;
|
// const fileId = info.file.response.data.fileId;
|
||||||
// // console.log(downloadUrl(fileId));
|
// // console.log(downloadUrl(fileId));
|
||||||
|
|
||||||
// const url = showImage(fileId, false);
|
// const url = showImage(fileId, false);
|
||||||
|
console.log(info.file.response.data.fileId);
|
||||||
|
|
||||||
setImgList([
|
setImgList([
|
||||||
{
|
{
|
||||||
uid: info.file.response.data.fileId,
|
uid: info.file.response.data.fileId,
|
||||||
@ -86,22 +91,24 @@ export default function EditOne(props: any) {
|
|||||||
url: showImage(info.file.response.data.fileId, false)
|
url: showImage(info.file.response.data.fileId, false)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
formA.setFieldsValue({ imgUrl: info.file.response.data.fileId })
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (info.file.status === 'error') {
|
if (info.file.status === 'error') {
|
||||||
|
setTextLodaing(false)
|
||||||
message.error(`上传失败`);
|
message.error(`上传失败`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const onFinishA = (values: any) => {
|
const onFinishA = (values: any) => {
|
||||||
console.log(values);
|
console.log(values);
|
||||||
props.setEditProcess(2);
|
// props.setEditProcess(2);
|
||||||
|
|
||||||
}
|
}
|
||||||
const onFinishB = (values: any) => {
|
const onFinishB = (values: any) => {
|
||||||
console.log(values);
|
console.log(values);
|
||||||
props.setEditProcess(2);
|
// props.setEditProcess(2);
|
||||||
|
|
||||||
}
|
}
|
||||||
const onChange = (e: any) => {
|
const onChange = (e: any) => {
|
||||||
@ -367,7 +374,7 @@ export default function EditOne(props: any) {
|
|||||||
color: 'black',
|
color: 'black',
|
||||||
resize: 'none'
|
resize: 'none'
|
||||||
}}
|
}}
|
||||||
value={generateType == '1' ? generateImgId : imgList[0]?.uid}
|
// value={generateType == '1' ? generateImgId : imgList[0]?.uid}
|
||||||
placeholder="商标说明"
|
placeholder="商标说明"
|
||||||
>
|
>
|
||||||
</TextArea>
|
</TextArea>
|
||||||
@ -389,6 +396,7 @@ export default function EditOne(props: any) {
|
|||||||
}}>
|
}}>
|
||||||
暂无图片
|
暂无图片
|
||||||
</div>
|
</div>
|
||||||
|
{/* 自动生成图片 */}
|
||||||
<div style={{
|
<div style={{
|
||||||
display: generateType == '1' && generateImgId != '' ? 'unset' : 'none',
|
display: generateType == '1' && generateImgId != '' ? 'unset' : 'none',
|
||||||
width: 200,
|
width: 200,
|
||||||
@ -415,8 +423,9 @@ export default function EditOne(props: any) {
|
|||||||
<Image src={generateImgId} height={100} style={{ maxWidth: 200, height: '100%' }} ></Image>
|
<Image src={generateImgId} height={100} style={{ maxWidth: 200, height: '100%' }} ></Image>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/* 手动上传图片 */}
|
||||||
<div style={{
|
<div style={{
|
||||||
display: generateType == '2' ? 'unset' : 'none',
|
display: generateType == '2' && imgList.length > 0 ? 'unset' : 'none',
|
||||||
width: 200,
|
width: 200,
|
||||||
height: 100,
|
height: 100,
|
||||||
background: 'white',
|
background: 'white',
|
||||||
@ -429,45 +438,97 @@ export default function EditOne(props: any) {
|
|||||||
fontSize: '20px',
|
fontSize: '20px',
|
||||||
border: '1px dashed #d6d6d6',
|
border: '1px dashed #d6d6d6',
|
||||||
}}>
|
}}>
|
||||||
<Upload
|
|
||||||
name="file"
|
|
||||||
maxCount={1}
|
|
||||||
action={uploadFileUrl()}
|
|
||||||
beforeUpload={(file) => {
|
|
||||||
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}
|
|
||||||
>
|
|
||||||
<div style={{
|
|
||||||
width: 200,
|
|
||||||
height: 100,
|
|
||||||
background: 'white',
|
|
||||||
color: 'black',
|
|
||||||
|
|
||||||
lineHeight: '100px',
|
<div style={{
|
||||||
textAlign: 'center',
|
width: '100%',
|
||||||
fontSize: '20px',
|
height: '100%',
|
||||||
border: '1px dashed #d6d6d6',
|
// background:'pink',
|
||||||
}}>
|
overflow: 'hidden',
|
||||||
上传图片
|
display: 'flex',
|
||||||
</div>
|
justifyContent: 'center',
|
||||||
</Upload>
|
alignItems: 'flex-start',
|
||||||
|
}}>
|
||||||
|
<Image src={imgList[0]?.url} height={100} style={{ maxWidth: 200, height: '100%' }} ></Image>
|
||||||
|
</div>
|
||||||
|
<div style={{
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: 0,
|
||||||
|
right: -50,
|
||||||
|
fontSize: '16px',
|
||||||
|
lineHeight:'16px',
|
||||||
|
// background:'pink',
|
||||||
|
cursor:'pointer',
|
||||||
|
padding:'5px',
|
||||||
|
color:'red'
|
||||||
|
}}
|
||||||
|
onClick={()=>{
|
||||||
|
setImgList([])
|
||||||
|
formA.setFieldsValue({ imgUrl: '' })
|
||||||
|
}}
|
||||||
|
>删除</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style={{
|
||||||
|
display: generateType == '2' && imgList.length <= 0 ? 'unset' : 'none',
|
||||||
|
width: 200,
|
||||||
|
height: 100,
|
||||||
|
background: 'white',
|
||||||
|
color: 'black',
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
lineHeight: '100px',
|
||||||
|
textAlign: 'center',
|
||||||
|
fontSize: '20px',
|
||||||
|
border: '1px dashed #d6d6d6',
|
||||||
|
}}>
|
||||||
|
<Spin tip="正在处理,请稍后..." size="small" spinning={textLodaing}>
|
||||||
|
<Upload
|
||||||
|
name="file"
|
||||||
|
maxCount={1}
|
||||||
|
action={uploadFileUrl()}
|
||||||
|
beforeUpload={(file) => {
|
||||||
|
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}
|
||||||
|
>
|
||||||
|
<div style={{
|
||||||
|
width: 200,
|
||||||
|
height: 100,
|
||||||
|
background: 'white',
|
||||||
|
color: 'black',
|
||||||
|
|
||||||
|
lineHeight: '100px',
|
||||||
|
textAlign: 'center',
|
||||||
|
fontSize: '20px',
|
||||||
|
border: '1px dashed #d6d6d6',
|
||||||
|
}}>
|
||||||
|
上传图片
|
||||||
|
</div>
|
||||||
|
</Upload>
|
||||||
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Button type="primary"
|
<Button type="primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setGenerateImgId('http://gips2.baidu.com/it/u=1674525583,3037683813&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024')
|
setGenerateImgId('http://gips2.baidu.com/it/u=1674525583,3037683813&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024')
|
||||||
|
// 给FormA表单的imgUrl赋值
|
||||||
|
formA.setFieldsValue({
|
||||||
|
imgUrl: 'http://gips2.baidu.com/it/u=1674525583,3037683813&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024'
|
||||||
|
})
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
marginTop: '70px',
|
marginTop: '70px',
|
||||||
|
@ -504,7 +504,9 @@ export default function TradingGoods() {
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
height: `${height}px`,
|
height: `${height}px`,
|
||||||
}}>
|
}}>
|
||||||
<OrderDetail orderId={orderId} user={'buy'}></OrderDetail>
|
<OrderDetail orderId={orderId} user={'buy'} upData={() => {
|
||||||
|
getDataList(page)
|
||||||
|
}}></OrderDetail>
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal
|
<Modal
|
||||||
title="补充资料"
|
title="补充资料"
|
||||||
|
@ -2006,6 +2006,10 @@ export default function Index() {
|
|||||||
correctionType={correctionType ? correctionType : ''}
|
correctionType={correctionType ? correctionType : ''}
|
||||||
correctionApplyStatus={correctionApplyStatus ? correctionApplyStatus : ''}
|
correctionApplyStatus={correctionApplyStatus ? correctionApplyStatus : ''}
|
||||||
tagCor={tagCor ? tagCor : ''}
|
tagCor={tagCor ? tagCor : ''}
|
||||||
|
|
||||||
|
// 换名
|
||||||
|
replaceKeyWords={replaceKeyWords? replaceKeyWords : ''}
|
||||||
|
replaceStatus={replaceStatus? replaceStatus : ''}
|
||||||
// enableBelongpeople = {()=>{setClickBelongpeople(true)}}
|
// enableBelongpeople = {()=>{setClickBelongpeople(true)}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -2145,6 +2149,7 @@ export default function Index() {
|
|||||||
button={sellMenu.button}
|
button={sellMenu.button}
|
||||||
list={sellMenu.list}
|
list={sellMenu.list}
|
||||||
handleListItem={sellMenu.handleListItem}
|
handleListItem={sellMenu.handleListItem}
|
||||||
|
|
||||||
sellKeywords={sellKeywords}
|
sellKeywords={sellKeywords}
|
||||||
sellBelongType={sellBelongType}
|
sellBelongType={sellBelongType}
|
||||||
sellDate={sellDate}
|
sellDate={sellDate}
|
||||||
@ -2155,6 +2160,22 @@ export default function Index() {
|
|||||||
sellEndTime={sellEndTime}
|
sellEndTime={sellEndTime}
|
||||||
sellOrderStatus={sellOrderStatus}
|
sellOrderStatus={sellOrderStatus}
|
||||||
sellOrderKeywords={sellOrderKeywords}
|
sellOrderKeywords={sellOrderKeywords}
|
||||||
|
|
||||||
|
copyrightKeywords={copyrightKeywords}
|
||||||
|
minPrice={minPrice}
|
||||||
|
maxPrice={maxPrice}
|
||||||
|
sort={sort}
|
||||||
|
copyrightDate={copyrightDate}
|
||||||
|
copyrightLanguage={copyrightLanguage}
|
||||||
|
copyrightType={copyrightType}
|
||||||
|
|
||||||
|
tradingKeywords={tradingKeywords}
|
||||||
|
tradingStartTime={tradingStartTime}
|
||||||
|
tradingEndTime={tradingEndTime}
|
||||||
|
tradingStatus={tradingStatus}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
|
Loading…
Reference in New Issue
Block a user