bug修复
This commit is contained in:
parent
8242edbfeb
commit
f3d4450245
@ -325,6 +325,7 @@ export default function File(props: any) {
|
|||||||
|
|
||||||
// 清空上传的文件数组
|
// 清空上传的文件数组
|
||||||
setUpFileArray([])
|
setUpFileArray([])
|
||||||
|
|
||||||
// 清空表单
|
// 清空表单
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
// setCorrectionType(record.correctionType)
|
// setCorrectionType(record.correctionType)
|
||||||
|
@ -81,7 +81,7 @@ export default function TrademarkMall() {
|
|||||||
// 自定义验证函数
|
// 自定义验证函数
|
||||||
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('内容和附件至少需要填写或上传一项');
|
||||||
@ -523,6 +523,7 @@ export default function TrademarkMall() {
|
|||||||
setDetailData(res)
|
setDetailData(res)
|
||||||
if (res.correctionFiles) {
|
if (res.correctionFiles) {
|
||||||
await getFileTypeByIdsArray(res.correctionFiles)
|
await getFileTypeByIdsArray(res.correctionFiles)
|
||||||
|
|
||||||
}
|
}
|
||||||
if (res.buyId) {
|
if (res.buyId) {
|
||||||
setDisabled(true)
|
setDisabled(true)
|
||||||
@ -614,11 +615,11 @@ export default function TrademarkMall() {
|
|||||||
dataIndex: 'buyId',
|
dataIndex: 'buyId',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (text,record) => (
|
render: (text, record) => (
|
||||||
<>
|
<>
|
||||||
|
|
||||||
<span style={{ color: '#DD0000', fontSize: '16px', fontWeight: '700', display: text == '' ? 'unset' : 'none' }}>{record.correctionReply=='0'?'未读':'待补充'}</span>
|
<span style={{ color: '#DD0000', fontSize: '16px', fontWeight: '700', display: text == '' ? 'unset' : 'none' }}>{record.correctionReply == '0' ? '未读' : '待补充'}</span>
|
||||||
<span style={{ color: 'green', fontSize: '16px', fontWeight: '700', display: text == '' ? 'none' : 'unset' }}>{record.correctionReply=='0'?'已读':'已补充'}</span>
|
<span style={{ color: 'green', fontSize: '16px', fontWeight: '700', display: text == '' ? 'none' : 'unset' }}>{record.correctionReply == '0' ? '已读' : '已补充'}</span>
|
||||||
{/* <span> {text == '4' ? '不予受理' : text == '5' ? '已受理' : text == '6' ? '已发初审公告' : text == '7' ? '部分驳回' : text == '8' ? '全部驳回' : text == '9' ? '商标注册完成' : "未知"}</span> */}
|
{/* <span> {text == '4' ? '不予受理' : text == '5' ? '已受理' : text == '6' ? '已发初审公告' : text == '7' ? '部分驳回' : text == '8' ? '全部驳回' : text == '9' ? '商标注册完成' : "未知"}</span> */}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
@ -630,6 +631,8 @@ export default function TrademarkMall() {
|
|||||||
width: 100,
|
width: 100,
|
||||||
render: (record: any) => (
|
render: (record: any) => (
|
||||||
<span className='transaction-order-table-btn' onClick={() => {
|
<span className='transaction-order-table-btn' onClick={() => {
|
||||||
|
setFileList([])
|
||||||
|
setUpFileArray([])
|
||||||
// console.log(record);
|
// console.log(record);
|
||||||
setCorrectionReply(record.correctionReply)
|
setCorrectionReply(record.correctionReply)
|
||||||
// console.log(record.correctionId);
|
// console.log(record.correctionId);
|
||||||
@ -882,10 +885,10 @@ export default function TrademarkMall() {
|
|||||||
form={form}
|
form={form}
|
||||||
layout="vertical"
|
layout="vertical"
|
||||||
onFinish={(value) => {
|
onFinish={(value) => {
|
||||||
const uids = upFileArray.map((file: any) => file.response.data.fileId).join(',');
|
// const uids = upFileArray.map((file: any) => file.response.data.fileId).join(',');
|
||||||
// console.log('提取的 uid 字符串:', uids);
|
// console.log('提取的 uid 字符串:', uids);
|
||||||
submitData({
|
submitData({
|
||||||
correctionFiles: uids,
|
correctionFiles:value.upFile ? value.upFile : '',
|
||||||
correctionRemark: value.upCorrectionRemark,
|
correctionRemark: value.upCorrectionRemark,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -966,10 +969,31 @@ export default function TrademarkMall() {
|
|||||||
<Upload
|
<Upload
|
||||||
name="file"
|
name="file"
|
||||||
action={uploadFileUrl()}
|
action={uploadFileUrl()}
|
||||||
defaultFileList={upFileArray}
|
fileList={upFileArray}
|
||||||
onChange={(info) => {
|
onChange={(info) => {
|
||||||
setUpFileArray(info.fileList)
|
// setUpFileArray(info.fileList)
|
||||||
// console.log(info.fileList);
|
// console.log(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}` }}
|
||||||
|
Loading…
Reference in New Issue
Block a user