Merge branch 'devbra' into dev
This commit is contained in:
commit
3706aad0c0
19
.env.dev
19
.env.dev
@ -3,10 +3,23 @@ VITE_BASE_URL=http://${VITE_HOST}
|
||||
VITE_COPY_BASE_URL=${VITE_BASE_URL}:7025
|
||||
VITE_OPERATOR_BASE_URL=${VITE_BASE_URL}:8091
|
||||
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.15:8081
|
||||
VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright
|
||||
# 18634604067
|
||||
# VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671
|
||||
VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74
|
||||
VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671
|
||||
# VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74
|
||||
# VITE_CURRENT_THEME=fzkj
|
||||
VITE_CURRENT_THEME=mzw
|
||||
# VITE_HOST=121.36.71.250:58038
|
||||
# VITE_BASE_URL=http://${VITE_HOST}
|
||||
# VITE_COPY_BASE_URL=${VITE_BASE_URL}
|
||||
# VITE_OPERATOR_BASE_URL=${VITE_BASE_URL}
|
||||
# VITE_OPERATOR_PLUGIN_BASE_URL=${VITE_BASE_URL}
|
||||
# VITE_AI_SHOP_BASE_URL=${VITE_BASE_URL}
|
||||
# # VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright
|
||||
# VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}/copyright
|
||||
# # 18634604067
|
||||
# VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671
|
||||
# # VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74
|
||||
# # VITE_CURRENT_THEME=fzkj
|
||||
# VITE_CURRENT_THEME=mzw
|
464
src/components/ReplaceModal/ReplaceModal.tsx
Normal file
464
src/components/ReplaceModal/ReplaceModal.tsx
Normal file
@ -0,0 +1,464 @@
|
||||
// import React from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
// import './RefunModal.css'
|
||||
import {
|
||||
Form,
|
||||
// Select,
|
||||
Button, Upload, message, Input, Modal, Table, Empty
|
||||
} from 'antd';
|
||||
import type { TableColumnsType } from 'antd';
|
||||
const { Search } = Input;
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
// DevUserId
|
||||
get, post, uploadFileUrl
|
||||
} from "../../util/AjaxUtils.ts";
|
||||
// import { getMenuActive } from '../../util/cache.ts'
|
||||
import { useDispatch } from 'react-redux'
|
||||
const { TextArea } = Input;
|
||||
interface DataType {
|
||||
// key: React.Key;
|
||||
projName: string;
|
||||
projContext: string;
|
||||
gmtCreate: string;
|
||||
projId: string
|
||||
}
|
||||
export default function ReplaceModal(props: any) {
|
||||
const token = sessionStorage.getItem('token')
|
||||
const columns: TableColumnsType<DataType> = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始
|
||||
},
|
||||
{
|
||||
title: '项目名称',
|
||||
dataIndex: 'projName',
|
||||
align: 'center',
|
||||
|
||||
render: (text: string) => <>{text}</>,
|
||||
},
|
||||
// {
|
||||
// title: '已通过补正次数',
|
||||
// dataIndex: 'approvedCount',
|
||||
// align: 'center',
|
||||
// width: 130,
|
||||
// render: (text) => <>{text}</>, // 显示序号,从1开始
|
||||
// },
|
||||
{
|
||||
title: '所属者名称',
|
||||
dataIndex: 'applyContactName',
|
||||
align: 'center',
|
||||
|
||||
render: (text: string) => <>{text}</>,
|
||||
},
|
||||
{
|
||||
title: '编号',
|
||||
dataIndex: 'projContext',
|
||||
align: 'center',
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'gmtCreate',
|
||||
align: 'center',
|
||||
|
||||
},
|
||||
];
|
||||
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
// 选择项目得临时name
|
||||
const [newprojName, setnewprojName] = useState('')
|
||||
// 选择项目得name
|
||||
const [projName, setProjName] = useState('')
|
||||
// 选择得项目临时id
|
||||
const [newprojId, setnewProjId] = useState('')
|
||||
// 选择 项目的id
|
||||
const [projId, setProjId] = useState('')
|
||||
//默认选择得项目
|
||||
const [selectedRowKeys, setselectedRowKeys] = useState<string[]>([])
|
||||
// 分页
|
||||
const [page, setPage] = useState(1)
|
||||
const [total, setTotal] = useState(0)
|
||||
// 搜索关键字
|
||||
const [keywords, setKeywords] = useState('')
|
||||
// 选择项目弹窗
|
||||
const [projModal, setProjModal] = useState(false)
|
||||
// 上传附件
|
||||
const [correctionArray, setCorrectionArray] = useState<string[]>([]);
|
||||
// const [selectedReason, setSelectedReason] = useState(''); //选择原因
|
||||
|
||||
// const handleReasonChange = (value: any) => {
|
||||
// setSelectedReason(value);
|
||||
// };
|
||||
// 获取当前选择类型
|
||||
// const type = getMenuActive() == 'Correction-PENDING' ? 'PENDING' : getMenuActive() == 'Correction-APPROVED' ? 'APPROVED' : getMenuActive() == 'Correction-REJECTED' ? 'REJECTED' : getMenuActive() == 'Correction-CANCELED' ? 'CANCELED' : ''
|
||||
const dispath = useDispatch()
|
||||
const [correctionDataArray, setCorrectionDataArray] = useState<any[]>([]) //未补正项目
|
||||
const [isDisabled, setIsDisabled] = useState(false) //提交按钮是否禁用
|
||||
const [form] = Form.useForm<any>();
|
||||
// 关键字搜索
|
||||
const handleSearch = (value: string) => {
|
||||
setKeywords(value)
|
||||
}
|
||||
const handleChange = (e: any) => {
|
||||
if (e.target.value == '') {
|
||||
setKeywords('')
|
||||
}
|
||||
}
|
||||
// 提交表单
|
||||
const onFinish = (values: any) => {
|
||||
dispath({
|
||||
type: 'newReplace',
|
||||
val: true
|
||||
})
|
||||
// console.log('Form values:', values);
|
||||
|
||||
// console.log(refunArray);
|
||||
|
||||
// console.log(values);
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/rename/apply/save`,
|
||||
body: {
|
||||
projId: projId,
|
||||
renameReason: values.other,
|
||||
renameVoucher: correctionArray.join(','),
|
||||
// correctionType: values.correctionType
|
||||
},
|
||||
onBefore() {
|
||||
setIsDisabled(true)
|
||||
},
|
||||
onSuccess() {
|
||||
messageApi.success('提交成功')
|
||||
setIsDisabled(true)
|
||||
setTimeout(() => {
|
||||
props.closeModal()
|
||||
|
||||
}, 500)
|
||||
|
||||
getData()
|
||||
|
||||
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
setIsDisabled(false)
|
||||
}
|
||||
})
|
||||
};
|
||||
const getData = () => {
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj/rename/apply/listpage/self`,
|
||||
config: {
|
||||
params: {
|
||||
page: 1,
|
||||
rows: 20,
|
||||
applyStatus: ''
|
||||
}
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
// console.log('更新');
|
||||
|
||||
// dispath({
|
||||
// type: 'upCorrectionArray',
|
||||
// val: data.data.rows
|
||||
// })
|
||||
// dispath({
|
||||
// type: 'upCorrectionTotal',
|
||||
// val: data.data.total
|
||||
// })
|
||||
dispath({
|
||||
type: 'upReplaceArray',
|
||||
val: data.data.rows
|
||||
})
|
||||
dispath({
|
||||
type: 'upReplaceTotal',
|
||||
val: data.data.total
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取未补正项目
|
||||
const getCorrectionData = () => {
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj/rename/apply/listpage-proj-unapply/self`,
|
||||
config: {
|
||||
params: {
|
||||
page: page,
|
||||
rows: 20,
|
||||
keywords
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
|
||||
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
// console.log(data.data.rows);
|
||||
// const newArray = (data.data).map((item: { projId: any; projName: any; }) => ({
|
||||
// value: item.projId,
|
||||
// label: item.projName
|
||||
// }))
|
||||
setCorrectionDataArray(data.data.rows)
|
||||
setTotal(data.data.total)
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
getCorrectionData()
|
||||
|
||||
|
||||
}, [page, keywords])
|
||||
|
||||
return (
|
||||
<div className='refunModal'>
|
||||
{contextHolder}
|
||||
<Form
|
||||
name="Form"
|
||||
form={form}
|
||||
onFinish={onFinish}
|
||||
initialValues={{ softWare: '' }}
|
||||
style={{ maxWidth: 600 }}
|
||||
>
|
||||
<div className='refunModal-item'>
|
||||
<div className='refunModal-title'>
|
||||
换名软著<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<div className='refunInput'>
|
||||
|
||||
<Form.Item
|
||||
name="title"
|
||||
rules={[{ required: true, message: '请选择一个软著!' }]}
|
||||
>
|
||||
<Input style={{
|
||||
width: 405,
|
||||
height: 46,
|
||||
background: '#FFF',
|
||||
color: 'black'
|
||||
}}
|
||||
placeholder="选择需要换名的软著"
|
||||
disabled
|
||||
>
|
||||
</Input>
|
||||
|
||||
</Form.Item>
|
||||
<div className='refunInput-button' onClick={() => {
|
||||
setProjModal(true)
|
||||
setKeywords('')
|
||||
setPage(1)
|
||||
getCorrectionData()
|
||||
}}>
|
||||
选择
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='refunModal-item'>
|
||||
<div className='refunModal-title'>
|
||||
换名原因<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<Form.Item
|
||||
name="other"
|
||||
rules={[{ required: true, message: '请输入换名原因' }]}
|
||||
>
|
||||
<TextArea
|
||||
placeholder="输入换名原因"
|
||||
style={{ height: 120, resize: 'none', width: 405 }}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
{/* <div className='refunModal-item' >
|
||||
<div className='refunModal-title'>
|
||||
其他<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<Form.Item
|
||||
name="other"
|
||||
// label="退款软著"
|
||||
rules={[{ required: true, message: '请输入退款原因' }]}
|
||||
>
|
||||
<TextArea
|
||||
// showCount
|
||||
// maxLength={100}
|
||||
placeholder="其他退款原因"
|
||||
style={{ height: 120, resize: 'none', width: 405, }}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div> */}
|
||||
<div className='refunModal-item'>
|
||||
<div className='refunModal-title'>
|
||||
换名凭证<span className='refunModal-red'>*</span>
|
||||
</div>
|
||||
<div style={{ width: 405, }}>
|
||||
<Form.Item
|
||||
name="img"
|
||||
// label="退款软著"
|
||||
valuePropName="fileList"
|
||||
getValueFromEvent={(e: any) => {
|
||||
if (e.file.status === 'done') {
|
||||
correctionArray.push(e.file.response.data.fileId);
|
||||
setCorrectionArray(correctionArray);
|
||||
}
|
||||
if (e.file.status === 'removed') {
|
||||
const idArray = correctionArray.filter(item => item != e.file.response.data.fileId);
|
||||
setCorrectionArray(idArray);
|
||||
}
|
||||
return e.fileList;
|
||||
}}
|
||||
rules={[{ required: true, message: '请上传补正通知书' }]}
|
||||
>
|
||||
<Upload
|
||||
name="file"
|
||||
action={uploadFileUrl()}
|
||||
// headers={{ 'X-USER-ID': DevUserId }}
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
beforeUpload={(file) => {
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'application/pdf';
|
||||
// const isPdf = file.type === 'application/pdf';
|
||||
if (!isJpgOrPng) {
|
||||
message.error('只能上传 JPG/PNG/PDF 格式文件!');
|
||||
return Upload.LIST_IGNORE; // 不允许上传非
|
||||
}
|
||||
return isJpgOrPng;
|
||||
}}
|
||||
// listType="picture-card"
|
||||
>
|
||||
|
||||
<Button icon={<UploadOutlined />} style={{ marginTop: 2 }}>上传补正通知书</Button>
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
color: '#FF0000',
|
||||
marginLeft: 10
|
||||
}}
|
||||
>*上传完整的补正通知书或者完整的补正通知书的截图,要求右上方的流水号和右下方的补正通知书的日期都得完整显示</div>
|
||||
<Form.Item>
|
||||
<div className='refunModal-btn'>
|
||||
<Button type="primary" htmlType="submit" style={{
|
||||
width: 273,
|
||||
height: 52
|
||||
}}
|
||||
disabled={isDisabled}
|
||||
>
|
||||
提交申请
|
||||
</Button>
|
||||
</div>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<Modal title="选择换名项目"
|
||||
destroyOnClose
|
||||
okText="确认"
|
||||
cancelText="取消"
|
||||
|
||||
open={projModal}
|
||||
|
||||
onOk={
|
||||
() => {
|
||||
if (newprojId) {
|
||||
setProjName(newprojName)
|
||||
setProjId(newprojId)
|
||||
setProjModal(false)
|
||||
setselectedRowKeys([newprojId])
|
||||
form.setFieldsValue({
|
||||
title: newprojName
|
||||
});
|
||||
} else {
|
||||
messageApi.open({
|
||||
type: 'error',
|
||||
content: '请选择要补正项目'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
width={1220}
|
||||
onCancel={() => {
|
||||
setselectedRowKeys([projId])
|
||||
setnewProjId(projId)
|
||||
setnewprojName(projName)
|
||||
setProjModal(false)
|
||||
|
||||
|
||||
}}>
|
||||
<Search placeholder="输入项目名称"
|
||||
onSearch={handleSearch}
|
||||
onChange={handleChange}
|
||||
style={{
|
||||
width: '200px',
|
||||
height: '31px',
|
||||
marginBottom: 15
|
||||
}}
|
||||
allowClear
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
type: 'radio',
|
||||
// ...rowSelection,
|
||||
onChange: (_selectedRowKeys: React.Key[], selectedRows: DataType[]) => {
|
||||
// console.log('selectedRows: ', selectedRows);
|
||||
setselectedRowKeys([selectedRows[0].projId])
|
||||
setnewProjId(selectedRows[0].projId)
|
||||
setnewprojName(selectedRows[0].projName)
|
||||
|
||||
},
|
||||
}}
|
||||
columns={columns}
|
||||
dataSource={correctionDataArray}
|
||||
rowKey={'projId'}
|
||||
pagination={
|
||||
{
|
||||
pageSize: 20,
|
||||
total: total,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
},
|
||||
showSizeChanger: false,
|
||||
current: page
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
locale={{
|
||||
emptyText: <Empty
|
||||
description="暂无数据"
|
||||
/>,
|
||||
}}
|
||||
scroll={{ y: 500 }}
|
||||
onRow={(record: DataType) => {
|
||||
return {
|
||||
onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
|
||||
// 阻止默认的行点击事件,以避免选中行时触发其他操作
|
||||
event.stopPropagation();
|
||||
// 更新选中的行
|
||||
setselectedRowKeys([record.projId]);
|
||||
setnewProjId(record.projId);
|
||||
setnewprojName(record.projName);
|
||||
},
|
||||
};
|
||||
}}
|
||||
|
||||
/>
|
||||
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
@ -91,6 +91,12 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
||||
}
|
||||
})
|
||||
}
|
||||
if (item.id == 'REPLACENAME') {
|
||||
// props.disableBelongpeople()
|
||||
navugate('/replace', {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}}>
|
||||
|
||||
|
@ -121,3 +121,46 @@ export const updateBindPhone = (params:any) => phoneRequest.post(`/operator/api/
|
||||
export const unbind = () => phoneRequest.get(`/operator/api/user-wx-update-username/unlock-phone`)
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// APP电子软著接口----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//获取APP电子软著可买商品展示列表
|
||||
export const appGoodsList = () => aiShopRequest.get(`/aishop/api/apporder/money-list`)
|
||||
// 获取运行系统选项
|
||||
export const runSystemList = () => aiShopRequest.get(`/aishop/api/data/listbyparentid/9fc8636a-b930-4e82-beb3-db7ca6151e6b`)
|
||||
// 获取大类选项
|
||||
export const bigClassList = () => aiShopRequest.get(`/aishop/api/data/listbyparentid/8abb5b58-83d2-465c-b164-a189efee28c1`)
|
||||
// 获取小类
|
||||
export const twoClass = (id:string) => aiShopRequest.get(`/aishop/api/data/listbyparentid/${id}`)
|
||||
// 通过类得id获取内容
|
||||
export const getContent = (id:string) => aiShopRequest.get(`/aishop/api/data/get/${id}`)
|
||||
// 下单购买APP电子软著
|
||||
export const buyAppGoods = (orderMoneyId:string) => aiShopRequest.post(`/aishop/api/apporder/pay/${orderMoneyId}`)
|
||||
// 获取我的app电子软著订单列表
|
||||
export const appOrderList = (params:any) => aiShopRequest.get(`/aishop/api/apporder/listpage-self`, { params })
|
||||
// 获取app电子软著详情
|
||||
export const appOrderDetail = (appOrderId:any) => aiShopRequest.get(`/aishop/api/apporder/get/${appOrderId}`)
|
||||
// 生成授权书word文件
|
||||
export const authorizeWord = (appOrderId:string,companyName:string) => aiShopRequest.get(`/aishop/api/apporder/create-file/SHOP04/${appOrderId}?name=${companyName}授权书&companyName=${companyName}`)
|
||||
// 生成合协议word文件
|
||||
export const agreementWord = (appOrderId:string,appName:string,versionName:string) => aiShopRequest.get(`aishop/api/apporder/create-file/SHOP01/${appOrderId}?name=${appName}合作协议&appName=${appName}&versionName=${versionName}`)
|
||||
// 生成源码文档word文件
|
||||
export const sourceCodeWord = (appOrderId:string,) => aiShopRequest.get(`aishop/api/apporder/create-file/SHOP02/${appOrderId}?name=源码文档示例`)
|
||||
// 生成软件文档word文件
|
||||
export const softwareDocumentWord = (appOrderId:string,) => aiShopRequest.get(`aishop/api/apporder/create-file/SHOP03/${appOrderId}?name=软件文档示例`)
|
||||
// 补充资料
|
||||
export const supplementAppData = (params:any) => aiShopRequest.post(`/aishop/api/correction/save-app`, params)
|
||||
// 获取文件详细信息
|
||||
export const fileDetail = (fileId:string) => aiShopRequest.get(`aishop/api/file/list?ids=${fileId}`)
|
||||
// 第一步 企业认证
|
||||
export const companyAuth = (appOrderId:any,params:any) => aiShopRequest.post(`aishop/api/apporder/update/1/${appOrderId}`,params)
|
||||
// 第二步 软件基本信息填写
|
||||
export const softwareInfo = (appOrderId:any,params:any) => aiShopRequest.post(`aishop/api/apporder/update/2/${appOrderId}`,params)
|
||||
// 第三步 上传鉴别材料
|
||||
export const uploadMaterial = (appOrderId:any,params:any) => aiShopRequest.post(`/aishop/api/apporder/update/3/${appOrderId}`,params)
|
||||
// 第四步 提交审核
|
||||
export const submitapp = (appOrderId:any) => aiShopRequest.post(`/aishop/api/apporder/update/sub-check/${appOrderId}`)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
@ -64,7 +64,7 @@ request.interceptors.response.use(
|
||||
|
||||
|
||||
|
||||
// 买卖功能----------------------------------------------------------------------------
|
||||
// 买卖功能(交易中心/APP电子软著)----------------------------------------------------------------------------
|
||||
const aiShopRequest = axios.create({
|
||||
baseURL: aiShopBaseUrl,
|
||||
timeout: 5000,
|
||||
|
@ -8,88 +8,295 @@ import EditAppFiles from './components/EditAppFiles/EditAppFiles';
|
||||
import AppInfo from './components/AppInfo/AppInfo';
|
||||
import AppCompany from './components/AppCompany/AppCompany';
|
||||
import { useParams } from 'react-router-dom'
|
||||
import {
|
||||
runSystemList, bigClassList,
|
||||
// twoClass,
|
||||
// fileDetail
|
||||
} from '../../request/api'
|
||||
// import { showImage } from '../../request/request'
|
||||
import './app-edit.css'
|
||||
import {
|
||||
RightOutlined
|
||||
} from '@ant-design/icons';
|
||||
import {
|
||||
message,
|
||||
Spin,
|
||||
|
||||
} from 'antd';
|
||||
import { appOrderDetail } from '../../request/api'
|
||||
export default function AppEdit() {
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const pathParams = useParams();
|
||||
// 进度
|
||||
const appOrderId = pathParams.appOrderId;
|
||||
const [systemList, setSystemList] = useState<any[]>([]); // 运行系统选项
|
||||
const [bigClass, setBigClass] = useState<any[]>([]); // 软件分类(大类)选项
|
||||
// const [smallClass, setSmallClass] = useState<any[]>([]); // 软件分类(小类)选项
|
||||
// 获取运行系统选项
|
||||
const getRunSystemList = async () => {
|
||||
try {
|
||||
const res: any = await runSystemList();
|
||||
// console.log('运行系统选项', res.map((item: any) => {
|
||||
// return {
|
||||
// label: item.dataName,
|
||||
// value: item.dataName,
|
||||
// }
|
||||
// }));
|
||||
setSystemList(res.map((item: any) => {
|
||||
return {
|
||||
label: item.dataName,
|
||||
value: item.dataName,
|
||||
}
|
||||
}))
|
||||
} 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 getBigClassList = async () => {
|
||||
try {
|
||||
const res: any = await bigClassList();
|
||||
// console.log('大类选项', res.map((item: any) => {
|
||||
// return {
|
||||
// label: item.dataName,
|
||||
// value: item.dataId,
|
||||
// }
|
||||
// }));
|
||||
setBigClass(res.map((item: any) => {
|
||||
return {
|
||||
label: item.dataName,
|
||||
value: item.dataId,
|
||||
}
|
||||
}))
|
||||
} 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 getSmallClassList = async (id: string) => {
|
||||
// try {
|
||||
// const res: any = await twoClass(id);
|
||||
// console.log('小类', res);
|
||||
// setSmallClass(res.map((item: any) => {
|
||||
// return {
|
||||
// label: item.dataId,
|
||||
// value: item.dataName,
|
||||
// }
|
||||
// }))
|
||||
// } 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 [loading, setLoading] = useState(false);
|
||||
const [editProcess, setEditProcess] = useState(1);
|
||||
// 企业/机构认证
|
||||
const [companyInfo, setCompanyInfo] = useState<any>({
|
||||
companyName: '', // 企业名称
|
||||
companyNumber: '', // 企业统一社会信用代码
|
||||
companyPhoto: '', // 企业照片
|
||||
companyAuth: '',//授权书
|
||||
});
|
||||
const [checkStatus, setCheckStatus] = useState<any>('') //审核状态
|
||||
// 软件基本信息
|
||||
const [appInfo, setAppInfo] = useState<any>({
|
||||
appName: '', // 项目名称
|
||||
subName: '', // 软件简称
|
||||
versionName: '', // 版本号
|
||||
packageName: '', // 包名APPID
|
||||
systemName: '', // 运行系统
|
||||
bigClassify: '', // 软件分类(大类)
|
||||
// bigClassifyName: '',
|
||||
subClassify: '', // 软件分类(小类)
|
||||
// subClassifyName: '',
|
||||
developWay: '', // 开发方式
|
||||
completeTime: '', // 开发完成时期
|
||||
projOwnerName: '',//著作权人姓名
|
||||
projOwnerIdentity: '',//著作权人证件号
|
||||
projOwnerId: '',//著作权人信息ID
|
||||
getFile: '',//获取文件
|
||||
})
|
||||
|
||||
// 材料信息
|
||||
const [filesInfo, setFilesInfo] = useState<any>({
|
||||
sourceCodeDocFile: '',//源码
|
||||
softwareDocFile: '',//软件
|
||||
})
|
||||
const [checkRemark, setCheckRemark] = useState('') //未通过原因
|
||||
// 文件想想请
|
||||
// const [fileList, setFileList] = useState<any[]>([]);
|
||||
// 获取详情
|
||||
const getAppOrderDetail = async () => {
|
||||
try {
|
||||
setLoading(true)
|
||||
|
||||
const res: any = await appOrderDetail(appOrderId);
|
||||
// console.log('详情', res);
|
||||
setCompanyInfo({
|
||||
companyName: res.companyName, // 企业名称
|
||||
companyNumber: res.companyNumber, // 企业统一社会信用代码
|
||||
companyPhoto: res.companyPhoto, // 企业照片
|
||||
companyAuth: res.companyAuth,//授权书
|
||||
})
|
||||
setAppInfo({
|
||||
appName: res.appName, // 项目名称
|
||||
subName: res.subName, // 软件简称
|
||||
versionName: res.versionName, // 版本号
|
||||
packageName: res.packageName, // 包名APPID
|
||||
systemName: res.systemName, // 运行系统
|
||||
bigClassify: res.bigClassify, // 软件分类(大类)
|
||||
subClassify: res.subClassify, // 软件分类(小类)
|
||||
developWay: res.developWay, // 开发方式
|
||||
completeTime: res.completeTime, // 开发完成时期
|
||||
projOwnerName: res.projOwnerName,//著作权人姓名
|
||||
projOwnerIdentity: res.projOwnerIdentity,//著作权人证件号
|
||||
projOwnerId: res.projOwnerId,//著作权人信息ID
|
||||
getFile: res.getFile,//获取文件
|
||||
// bigClassifyName: res.bigClassifyName,
|
||||
// subClassifyName: res.subClassifyName,
|
||||
})
|
||||
setFilesInfo({
|
||||
sourceCodeDocFile: res.sourceCodeDocFile,//源码
|
||||
softwareDocFile: res.softwareDocFile,//软件
|
||||
})
|
||||
setEditProcess(Number(res.appOrderProgress) + 1)
|
||||
setCheckStatus(res.checkStatus)
|
||||
setCheckRemark(res.checkRemark)
|
||||
// const fileres: any = await fileDetail(res.getFile)
|
||||
// console.log('文件详情', fileres);
|
||||
|
||||
// setFileList([
|
||||
// {
|
||||
// uid: fileres[0].fileId,
|
||||
// name: fileres[0].fileName,
|
||||
// status: 'done',
|
||||
// url: showImage(fileres[0].fileId)
|
||||
// }
|
||||
// ])
|
||||
setLoading(false)
|
||||
} 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)
|
||||
}
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// 进度
|
||||
// 获取详情
|
||||
useEffect(() => {
|
||||
getAppOrderDetail()
|
||||
//获取进度
|
||||
setEditProcess(1)
|
||||
// 带来的id
|
||||
console.log('参数', pathParams);
|
||||
// 获取 信息
|
||||
|
||||
// setEditProcess(1)
|
||||
getRunSystemList()
|
||||
getBigClassList()
|
||||
|
||||
// if (appInfo.bigClassify) {
|
||||
// getSmallClassList(appInfo.bigClassify)
|
||||
// }
|
||||
}, []);
|
||||
const height = window.innerHeight - 180;
|
||||
return (
|
||||
<div className='appEdit' style={{ height: `${height}px`, overflow: 'auto' }}>
|
||||
<div className='editProcessBox'>
|
||||
<div className='editProcess' >
|
||||
<div className='editProcessNum'
|
||||
style={{
|
||||
background: editProcess >= 1 ? '#3B60E8' : '',
|
||||
color: editProcess >= 1 ? '#fff' : '#B1B1B1',
|
||||
borderColor: editProcess >= 1 ? '' : '#B1B1B1'
|
||||
}}
|
||||
>1</div>
|
||||
<div className='editProcessTitle'
|
||||
style={{
|
||||
color: editProcess >= 1 ? '#353535' : '#878787',
|
||||
fontWeight: editProcess >= 1 ? 'bold' : 'normal'
|
||||
}}
|
||||
>企业/机构认证</div>
|
||||
</div>
|
||||
<div className='editright'><RightOutlined /></div>
|
||||
<div className='editProcess'>
|
||||
<div className='editProcessNum' style={{
|
||||
background: editProcess >= 2 ? '#3B60E8' : '',
|
||||
color: editProcess >= 2 ? '#fff' : '#B1B1B1',
|
||||
borderColor: editProcess >= 2 ? '' : '#B1B1B1'
|
||||
}}>2</div>
|
||||
<div className='editProcessTitle'
|
||||
style={{
|
||||
color: editProcess >= 2 ? '#353535' : '#878787',
|
||||
fontWeight: editProcess >= 2 ? 'bold' : 'normal'
|
||||
}}
|
||||
>软件基本信息</div>
|
||||
</div>
|
||||
<div className='editright'><RightOutlined /></div>
|
||||
<div className='editProcess'>
|
||||
<div className='editProcessNum' style={{
|
||||
background: editProcess >= 3 ? '#3B60E8' : '',
|
||||
color: editProcess >= 3 ? '#fff' : '#B1B1B1',
|
||||
borderColor: editProcess >= 3 ? '' : '#B1B1B1'
|
||||
}}>3</div>
|
||||
<div className='editProcessTitle'
|
||||
style={{
|
||||
color: editProcess >= 3 ? '#353535' : '#878787',
|
||||
fontWeight: editProcess >= 3 ? 'bold' : 'normal'
|
||||
}}
|
||||
>鉴别材料</div>
|
||||
</div>
|
||||
<div className='editright'><RightOutlined /></div>
|
||||
<div className='editProcess'>
|
||||
<div className='editProcessNum' style={{
|
||||
background: editProcess >= 4 ? '#3B60E8' : '',
|
||||
color: editProcess >= 4 ? '#fff' : '#B1B1B1',
|
||||
borderColor: editProcess >= 4 ? '' : '#B1B1B1'
|
||||
}}>4</div>
|
||||
<div className='editProcessTitle'
|
||||
style={{
|
||||
color: editProcess >= 4 ? '#353535' : '#878787',
|
||||
fontWeight: editProcess >= 4 ? 'bold' : 'normal'
|
||||
}}
|
||||
>
|
||||
{/* 功能特点 */}
|
||||
填报完成
|
||||
<Spin tip="加载中..." size="small" spinning={loading}>
|
||||
<div className='appEdit' style={{ height: `${height}px`, overflow: 'auto' }}>
|
||||
{contextHolder}
|
||||
<div className='editProcessBox'>
|
||||
<div className='editProcess' >
|
||||
<div className='editProcessNum'
|
||||
style={{
|
||||
background: editProcess >= 1 ? '#3B60E8' : '',
|
||||
color: editProcess >= 1 ? '#fff' : '#B1B1B1',
|
||||
borderColor: editProcess >= 1 ? '' : '#B1B1B1'
|
||||
}}
|
||||
>1</div>
|
||||
<div className='editProcessTitle'
|
||||
style={{
|
||||
color: editProcess >= 1 ? '#353535' : '#878787',
|
||||
fontWeight: editProcess >= 1 ? 'bold' : 'normal'
|
||||
}}
|
||||
>企业/机构认证</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className='editright'><RightOutlined /></div>
|
||||
<div className='editright'><RightOutlined /></div>
|
||||
<div className='editProcess'>
|
||||
<div className='editProcessNum' style={{
|
||||
background: editProcess >= 2 ? '#3B60E8' : '',
|
||||
color: editProcess >= 2 ? '#fff' : '#B1B1B1',
|
||||
borderColor: editProcess >= 2 ? '' : '#B1B1B1'
|
||||
}}>2</div>
|
||||
<div className='editProcessTitle'
|
||||
style={{
|
||||
color: editProcess >= 2 ? '#353535' : '#878787',
|
||||
fontWeight: editProcess >= 2 ? 'bold' : 'normal'
|
||||
}}
|
||||
>软件基本信息</div>
|
||||
</div>
|
||||
<div className='editright'><RightOutlined /></div>
|
||||
<div className='editProcess'>
|
||||
<div className='editProcessNum' style={{
|
||||
background: editProcess >= 3 ? '#3B60E8' : '',
|
||||
color: editProcess >= 3 ? '#fff' : '#B1B1B1',
|
||||
borderColor: editProcess >= 3 ? '' : '#B1B1B1'
|
||||
}}>3</div>
|
||||
<div className='editProcessTitle'
|
||||
style={{
|
||||
color: editProcess >= 3 ? '#353535' : '#878787',
|
||||
fontWeight: editProcess >= 3 ? 'bold' : 'normal'
|
||||
}}
|
||||
>鉴别材料</div>
|
||||
</div>
|
||||
<div className='editright'><RightOutlined /></div>
|
||||
<div className='editProcess'>
|
||||
<div className='editProcessNum' style={{
|
||||
background: editProcess >= 4 ? '#3B60E8' : '',
|
||||
color: editProcess >= 4 ? '#fff' : '#B1B1B1',
|
||||
borderColor: editProcess >= 4 ? '' : '#B1B1B1'
|
||||
}}>4</div>
|
||||
<div className='editProcessTitle'
|
||||
style={{
|
||||
color: editProcess >= 4 ? '#353535' : '#878787',
|
||||
fontWeight: editProcess >= 4 ? 'bold' : 'normal'
|
||||
}}
|
||||
>
|
||||
{/* 功能特点 */}
|
||||
填报完成
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className='editright'><RightOutlined /></div>
|
||||
<div className='editProcess'>
|
||||
<div className='editProcessNum' style={{
|
||||
background: editProcess >= 5 ? '#3B60E8' : '',
|
||||
@ -119,60 +326,99 @@ export default function AppEdit() {
|
||||
</div> */}
|
||||
|
||||
|
||||
</div>
|
||||
<div className='editFormBox'>
|
||||
<div style={{
|
||||
display: editProcess == 1 ? 'block' : 'none'
|
||||
}}>
|
||||
<AppCompany setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></AppCompany>
|
||||
{/* <EditAppInfo setEditProcess={
|
||||
</div>
|
||||
<div className='editFormBox'>
|
||||
<div style={{
|
||||
display: editProcess == 1 ? 'block' : 'none'
|
||||
}}>
|
||||
<AppCompany
|
||||
appOrderId={appOrderId}
|
||||
companyInfo={companyInfo}
|
||||
setCompanyInfo={
|
||||
(val: any) => {
|
||||
setCompanyInfo(val)
|
||||
}
|
||||
}
|
||||
setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></AppCompany>
|
||||
{/* <EditAppInfo setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></EditAppInfo> */}
|
||||
</div>
|
||||
<div style={{
|
||||
display: editProcess == 2 ? 'block' : 'none'
|
||||
}}>
|
||||
<EditAppInfo setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></EditAppInfo>
|
||||
{/* <EditAppDes setEditProcess={
|
||||
</div>
|
||||
<div style={{
|
||||
display: editProcess == 2 ? 'block' : 'none'
|
||||
}}>
|
||||
<EditAppInfo
|
||||
appOrderId={appOrderId}
|
||||
bigClass={bigClass}
|
||||
systemList={systemList}
|
||||
// smallClass={smallClass}
|
||||
// fileList={fileList}
|
||||
appInfo={appInfo}
|
||||
setAppInfo={
|
||||
(val: any) => {
|
||||
setAppInfo(val)
|
||||
}
|
||||
}
|
||||
setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></EditAppInfo>
|
||||
{/* <EditAppDes setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></EditAppDes> */}
|
||||
</div>
|
||||
<div style={{
|
||||
display: editProcess == 3 ? 'block' : 'none'
|
||||
}}>
|
||||
<EditAppFiles setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></EditAppFiles>
|
||||
</div>
|
||||
<div style={{
|
||||
display: editProcess == 4 ? 'block' : 'none'
|
||||
}}>
|
||||
{/* <EditAppFunction setEditProcess={
|
||||
</div>
|
||||
<div style={{
|
||||
display: editProcess == 3 ? 'block' : 'none'
|
||||
}}>
|
||||
<EditAppFiles
|
||||
appOrderId={appOrderId}
|
||||
filesInfo={filesInfo}
|
||||
setFilesInfo={
|
||||
(val: any) => {
|
||||
setFilesInfo(val)
|
||||
}
|
||||
}
|
||||
setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></EditAppFiles>
|
||||
</div>
|
||||
<div style={{
|
||||
display: editProcess == 4 ? 'block' : 'none'
|
||||
}}>
|
||||
{/* <EditAppFunction setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></EditAppFunction> */}
|
||||
<AppInfo setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}></AppInfo>
|
||||
</div>
|
||||
{/* <div style={{
|
||||
<AppInfo
|
||||
checkStatus={checkStatus}
|
||||
setCheckStatus={(value:string)=>{
|
||||
setCheckStatus(value)
|
||||
}}
|
||||
appOrderId={appOrderId}
|
||||
companyInfo={companyInfo}
|
||||
appInfo={appInfo}
|
||||
filesInfo={filesInfo}
|
||||
setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
}
|
||||
}
|
||||
checkRemark={checkRemark}
|
||||
></AppInfo>
|
||||
</div>
|
||||
{/* <div style={{
|
||||
display: editProcess == 5 ? 'block' : 'none'
|
||||
}}>
|
||||
<EditBelongPeople setEditProcess={
|
||||
@ -190,7 +436,8 @@ export default function AppEdit() {
|
||||
}
|
||||
}></AppInfo>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Spin>
|
||||
)
|
||||
}
|
||||
|
@ -1,47 +1,391 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useSelector, useDispatch } from 'react-redux'
|
||||
import {
|
||||
Pagination,
|
||||
// Table,
|
||||
// Modal,
|
||||
// Spin
|
||||
// Spin,
|
||||
message,
|
||||
Spin,
|
||||
Table,
|
||||
Modal
|
||||
} from 'antd';
|
||||
import File from './components/File/File'
|
||||
import { appOrderList } from '../../request/api'
|
||||
import { showImage } from '../../request/request'
|
||||
import './app-election.css'
|
||||
import nothingImg from '../../static/appimgs/nothing.png'
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import type { TableProps } from 'antd';
|
||||
import { useNavigate } from "react-router-dom";
|
||||
interface DataType {
|
||||
appName: string; //项目名称
|
||||
bigClassify: string; //软件分类(大类)
|
||||
appOrderPayMoney: number; //支付金额;
|
||||
appOrderPayTime: string; //支付时间;
|
||||
gmtCreate: string;
|
||||
bigClassifyName: string; //软件分类(大类)
|
||||
subClassifyName: string; //软件分类(子类)
|
||||
checkRemark: string; //未通过原因
|
||||
}
|
||||
export default function AppElectron() {
|
||||
const height = window.innerHeight - 180;
|
||||
const [page, setPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const data = [
|
||||
// { name: '123' }
|
||||
]
|
||||
useEffect(() => {
|
||||
setTotal(100)
|
||||
}, [page])
|
||||
return (
|
||||
<div className='appElectionBox' style={{ height: `${height}px`, overflow: 'auto' }}>
|
||||
{data.length <= 0 ? (<div style={{ height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', flexDirection: 'column' }}>
|
||||
const [fileModal, setFileModal] = useState(false) //补充资料弹窗
|
||||
const [appOrderId, setAppOrderId] = useState('') //订单id
|
||||
const nav = useNavigate();
|
||||
const dispath = useDispatch()
|
||||
const redxuState: any = useSelector(state => state)
|
||||
const data = redxuState.appGoodsListData;
|
||||
const [checkRemarkModal, setCheckRemarkModal] = useState(false) //未通过原因弹窗
|
||||
const [checkRemark, setCheckRemark] = useState('') //未通过原因
|
||||
const columns: TableProps<DataType>['columns'] = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
align: 'center',
|
||||
fixed: 'left',
|
||||
width: 90,
|
||||
render: (_text, _record, index) => (page - 1) * 10 + index + 1, // 显示序号,从1开始
|
||||
|
||||
<img src={nothingImg} alt="" width={368} height={355} />
|
||||
},
|
||||
{
|
||||
title: '项目名称',
|
||||
fixed: 'left',
|
||||
dataIndex: 'appName',
|
||||
key: 'appOrderId',
|
||||
align: 'center',
|
||||
ellipsis: {
|
||||
showTitle: true,
|
||||
},
|
||||
width: 200,
|
||||
render: (text) => (
|
||||
<span>
|
||||
{text ? text : '未完善'}
|
||||
</span>
|
||||
)
|
||||
|
||||
},
|
||||
{
|
||||
title: '软件分类',
|
||||
dataIndex: 'bigClassify',
|
||||
align: 'center',
|
||||
key: 'appOrderId',
|
||||
width: 200,
|
||||
ellipsis: {
|
||||
showTitle: true,
|
||||
},
|
||||
render: (text, record) => (
|
||||
<span>
|
||||
{text ? ` ${record.bigClassifyName} - ${record.subClassifyName}` : '未完善'}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '支付金额',
|
||||
dataIndex: 'appOrderPayMoney',
|
||||
key: 'appOrderId',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
render: (text) => (
|
||||
<span>
|
||||
{text / 100}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '支付时间',
|
||||
dataIndex: 'appOrderPayTime',
|
||||
align: 'center',
|
||||
key: 'appOrderId',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
dataIndex: 'checkStatus',
|
||||
align: 'center',
|
||||
key: 'appOrderId',
|
||||
width: 100,
|
||||
render: (text, record) => (
|
||||
<span>
|
||||
{text == '1' ?
|
||||
<span style={{
|
||||
color: 'skyblue',
|
||||
}}>待审核</span>
|
||||
: text == '2' ?
|
||||
<span
|
||||
style={{
|
||||
color: 'green',
|
||||
}}
|
||||
>通过</span>
|
||||
: text == '0' ?
|
||||
<span
|
||||
style={{
|
||||
color: 'red',
|
||||
cursor: 'pointer'
|
||||
}}
|
||||
title='点击查看原因'
|
||||
onClick={() => {
|
||||
setCheckRemark(record.checkRemark)
|
||||
setCheckRemarkModal(true)
|
||||
}}
|
||||
>未通过</span>
|
||||
:
|
||||
<span style={{
|
||||
color: 'rgb(122 126 130)',
|
||||
}}> 未提交</span>
|
||||
}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '申请状态',
|
||||
dataIndex: 'appOrderStatus',
|
||||
align: 'center',
|
||||
key: 'appOrderId',
|
||||
width: 150,
|
||||
render: (text) => (
|
||||
<span>
|
||||
{text == '1' ? '未付款' : text == '2' ? '资料填写中' : text == '3' ? '资料审核中' : text == '4' ? '线下申请中' : text == '5' ? '已下证' : '未知'}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
// dataIndex: 'contractManagementId',
|
||||
align: 'center',
|
||||
key: 'appOrderId',
|
||||
width: 150,
|
||||
// bordeLeft: true,
|
||||
fixed: 'right',
|
||||
render: (record) => (
|
||||
<div style={{
|
||||
marginTop: 50,
|
||||
fontSize: 16,
|
||||
color: '#D0D0D0'
|
||||
}}>暂无数据</div>
|
||||
</div>) : (
|
||||
<div className='transaction-order-table'>
|
||||
<div style={{ height: `${height - 80}px` }}>
|
||||
display: 'flex', justifyContent: 'center', alignItems: 'center',
|
||||
}}>
|
||||
|
||||
<div style={{
|
||||
cursor: 'pointer',
|
||||
color: '#007FFF',
|
||||
|
||||
|
||||
}} onClick={() => {
|
||||
nav(`/app-edit/${record.appOrderId}`)
|
||||
// console.log(record.checkStatus);
|
||||
|
||||
|
||||
}}>{record.checkStatus == '' ? '编辑' : record.checkStatus == '0' ? '修改' : '查看'}</div>
|
||||
<div style={{
|
||||
marginLeft: 10,
|
||||
cursor: 'pointer',
|
||||
// background: 'red',
|
||||
color: '#007FFF',
|
||||
position: 'relative',
|
||||
display: record.waitCorrectionCount > 0 && record.appOrderStatus != '5' ? 'unset' : 'none',
|
||||
|
||||
}}
|
||||
onClick={() => {
|
||||
setFileModal(true)
|
||||
// console.log(record);
|
||||
setAppOrderId(record.appOrderId)
|
||||
|
||||
}}
|
||||
>
|
||||
资料补充
|
||||
<div style={{
|
||||
|
||||
position: 'absolute',
|
||||
top: '-10px',
|
||||
right: '-10px',
|
||||
// fontSize:'16px',
|
||||
background: 'red',
|
||||
color: '#fff',
|
||||
fontWeight: '700',
|
||||
width: '20px',
|
||||
height: '20px',
|
||||
borderRadius: '50%',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
}}>
|
||||
{record.waitCorrectionCount}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
marginLeft: 10,
|
||||
cursor: 'pointer',
|
||||
color: '#007FFF',
|
||||
|
||||
display: record.appOrderStatus == '5' ? 'unset' : 'none',
|
||||
|
||||
}}
|
||||
onClick={() => {
|
||||
console.log(record.appOrderResultFile);
|
||||
|
||||
window.open(showImage(record.appOrderResultFile, false));
|
||||
}}
|
||||
>
|
||||
查看证书
|
||||
|
||||
</div>
|
||||
<div className='product-release-pagination'>
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
current={page} total={total} defaultPageSize={10} onChange={(page) => {
|
||||
setPage(page)
|
||||
}} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
)}
|
||||
)
|
||||
|
||||
},
|
||||
]
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const height = window.innerHeight - 180;
|
||||
const { state } = useLocation()
|
||||
const keywords = state ? state.appKeyWords : ''
|
||||
const checkStatus = state ? state.checkStatus : ''
|
||||
const appOrderStatus = state ? state.appOrderStatus : ''
|
||||
const [page, setPage] = useState(1);
|
||||
// const [total, setTotal] = useState(0);
|
||||
const [loading, setLoading] = useState(false);
|
||||
// const [data, setData] = useState<any[]>([]);
|
||||
// 获取我得订单列表
|
||||
const getAppOrderList = async (page: number) => {
|
||||
try {
|
||||
setLoading(true)
|
||||
const res: any = await appOrderList({ page, keywords, rows: 10, checkStatus, appOrderStatus })
|
||||
// console.log(res);
|
||||
// setData(res.rows)
|
||||
// setTotal(res.total)
|
||||
setLoading(false)
|
||||
dispath({
|
||||
type: 'upAppGoodsListData',
|
||||
val: res
|
||||
})
|
||||
} 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)
|
||||
}
|
||||
|
||||
}
|
||||
useEffect(() => {
|
||||
setPage(1)
|
||||
getAppOrderList(1)
|
||||
}, [state, checkStatus, appOrderStatus])
|
||||
return (
|
||||
|
||||
<div className='appElectionBox' style={{ height: `${height}px` }}>
|
||||
|
||||
<Spin tip="加载中..." size="small" spinning={loading}>
|
||||
|
||||
{contextHolder}
|
||||
|
||||
{data.length <= 0 ? (
|
||||
<div style={{
|
||||
height: `${height}px`,
|
||||
// background:'pink',
|
||||
display: 'flex', justifyContent: 'center', alignItems: 'center', flexDirection: 'column'
|
||||
}}>
|
||||
|
||||
|
||||
<img src={nothingImg} alt="" width={368} height={355} />
|
||||
<div style={{
|
||||
marginTop: 50,
|
||||
fontSize: 16,
|
||||
color: '#D0D0D0'
|
||||
}}>暂无数据</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className='transaction-order-table' >
|
||||
<div style={{
|
||||
height: `${height - 80}px`,
|
||||
// background: "pink" ,
|
||||
paddingTop: 20
|
||||
}}>
|
||||
|
||||
<Table
|
||||
scroll={{ y: `${height - 150}px` }}
|
||||
dataSource={data.rows}
|
||||
columns={columns}
|
||||
bordered
|
||||
// pagination={{
|
||||
// defaultPageSize: 10, // 设置默认一页显示 5 条数据
|
||||
// }}
|
||||
pagination={false} // 不显示分页
|
||||
style={{ textAlign: 'center' }} // 设置表格内容居中显示
|
||||
rowKey="appOrderId" // 指定数据项的唯一标识符
|
||||
locale={{ emptyText: '暂无数据' }}
|
||||
></Table>
|
||||
|
||||
</div>
|
||||
<div className='product-release-pagination'>
|
||||
<Pagination
|
||||
showSizeChanger={false}
|
||||
current={page} total={data.total} defaultPageSize={10} onChange={(page) => {
|
||||
setPage(page)
|
||||
getAppOrderList(page)
|
||||
}} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
)}
|
||||
</Spin>
|
||||
<Modal title="未通过原因"
|
||||
centered
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
// okText="确认提交"
|
||||
// cancelText="取消"
|
||||
open={checkRemarkModal}
|
||||
// width={1200}
|
||||
onCancel={() => {
|
||||
setCheckRemarkModal(false)
|
||||
|
||||
}}
|
||||
// onOk={
|
||||
// // setModal(false)
|
||||
// clickOk
|
||||
// }
|
||||
>
|
||||
|
||||
<div style={{
|
||||
fontSize: '16px',
|
||||
// color: 'red',
|
||||
// fontWeight: 'bold'
|
||||
}}>
|
||||
{checkRemark}
|
||||
</div>
|
||||
|
||||
</Modal>
|
||||
<Modal
|
||||
title="补充资料"
|
||||
okText="确认"
|
||||
cancelText="取消"
|
||||
destroyOnClose={true}
|
||||
footer={null}
|
||||
open={fileModal}
|
||||
// onOk={() => {
|
||||
// setOrderDetailModal(false)
|
||||
// }}
|
||||
onCancel={() => {
|
||||
setFileModal(false)
|
||||
}}
|
||||
width={1150}
|
||||
centered
|
||||
>
|
||||
<File
|
||||
upData={() => {
|
||||
getAppOrderList(page)
|
||||
}}
|
||||
user={'buy'}
|
||||
orderId={appOrderId}></File>
|
||||
</Modal>
|
||||
</div>
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
import { useState } from 'react'
|
||||
import { useState, useEffect } from 'react'
|
||||
import './app-company.css'
|
||||
import { uploadFileUrl } from '../../../../request/request'
|
||||
import { Button, Form, Input, message,
|
||||
import { uploadImageUrl, showImage } from '../../../../request/request'
|
||||
import { authorizeWord, companyAuth } from '../../../../request/api'
|
||||
import {
|
||||
Button, Form, Input, message,
|
||||
// Select, DatePicker,
|
||||
Upload, Image,
|
||||
Upload, Image,
|
||||
Spin,
|
||||
// Cascader
|
||||
} from "antd"
|
||||
} from "antd"
|
||||
import { LoadingOutlined, } from '@ant-design/icons';
|
||||
import type { GetProp, UploadProps } from 'antd';
|
||||
import type { UploadProps } from 'antd';
|
||||
// import {
|
||||
// getCityList
|
||||
// } from '../../../../request/api'
|
||||
@ -21,57 +24,46 @@ import type { GetProp, UploadProps } from 'antd';
|
||||
// // pId: string;
|
||||
// }
|
||||
export default function AppCompany(props: any) {
|
||||
// const [messageApi, contextHolder] = message.useMessage();
|
||||
// const [areaArray, setAreaArray] = useState<Option[]>([]);
|
||||
// 加载城市列表
|
||||
// const loadCityList = async (selectedOptions: Option[]) => {
|
||||
// const targetOption = selectedOptions[selectedOptions.length - 1];
|
||||
// // console.log('targetOption', targetOption.children);
|
||||
// try {
|
||||
// const res: any = await getCityList(targetOption.value as string);
|
||||
// // console.log('城市列表', res);
|
||||
|
||||
// const cities = res.map((city: any) => ({
|
||||
// value: city.areaId,
|
||||
// label: city.areaName,
|
||||
|
||||
// }));
|
||||
// targetOption.children = cities;
|
||||
// // 更新 areaArray 状态
|
||||
// setAreaArray([...areaArray]);
|
||||
// } 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 [messageApi, contextHolder] = message.useMessage();
|
||||
const [downLoading, setDownLoading] = useState(false)
|
||||
const validateImageUrl = () => {
|
||||
if (!imageUrl) {
|
||||
return Promise.reject(new Error('请上传文件'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
};
|
||||
const validateTextImageUrl = () => {
|
||||
if (!textImageUrl) {
|
||||
return Promise.reject(new Error('请上传文件'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
};
|
||||
// 定义 beforeUpload 函数
|
||||
const beforeUpload = (file: any) => {
|
||||
const isJpgOrPng = ['image/jpeg', 'image/png', 'image/bmp'].includes(file.type);
|
||||
if (!isJpgOrPng) {
|
||||
message.error('只能上传 JPG、JPEG、PNG、BMP 格式的文件!');
|
||||
form.setFieldsValue({
|
||||
'companyPhoto': '',
|
||||
});
|
||||
}
|
||||
const isLt4M = file.size / 1024 / 1024 < 4;
|
||||
if (!isLt4M) {
|
||||
message.error('文件大小不能超过 4MB!');
|
||||
form.setFieldsValue({
|
||||
'companyPhoto': '',
|
||||
});
|
||||
}
|
||||
return isJpgOrPng && isLt4M;
|
||||
|
||||
};
|
||||
type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0];
|
||||
// type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0];
|
||||
const [loading, setLoading] = useState(false);
|
||||
const getBase64 = (img: FileType, callback: (url: string) => void) => {
|
||||
const reader = new FileReader();
|
||||
reader.addEventListener('load', () => callback(reader.result as string));
|
||||
reader.readAsDataURL(img);
|
||||
};
|
||||
// const getBase64 = (img: FileType, callback: (url: string) => void) => {
|
||||
// const reader = new FileReader();
|
||||
// reader.addEventListener('load', () => callback(reader.result as string));
|
||||
// reader.readAsDataURL(img);
|
||||
// };
|
||||
const [imageUrl, setImageUrl] = useState('');
|
||||
const handleChange: UploadProps['onChange'] = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
@ -80,12 +72,18 @@ export default function AppCompany(props: any) {
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
// Get this url from response in real world.
|
||||
getBase64(info.file.originFileObj as FileType, (url) => {
|
||||
setLoading(false);
|
||||
setImageUrl(url);
|
||||
});
|
||||
console.log(info);
|
||||
|
||||
// getBase64(info.file.originFileObj as FileType, (url) => {
|
||||
// setLoading(false);
|
||||
// setImageUrl(url);
|
||||
// });
|
||||
console.log(info.file.response.data.fileId);
|
||||
setLoading(false);
|
||||
const fileId = info.file.response.data.fileId;
|
||||
const url = showImage(fileId, false);
|
||||
setImageUrl(url);
|
||||
form.setFieldsValue({
|
||||
companyPhoto: fileId,
|
||||
})
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
setLoading(false);
|
||||
@ -93,402 +91,439 @@ export default function AppCompany(props: any) {
|
||||
message.error(`上传失败`);
|
||||
//伤处表单name为ing的值
|
||||
form.setFieldsValue({
|
||||
img: '', // 将值设置为 undefined 以清除错误状态
|
||||
companyPhoto: '', // 将值设置为 undefined 以清除错误状态
|
||||
})
|
||||
}
|
||||
};
|
||||
const [textloading, setTextLoading] = useState(false);
|
||||
const [textImageUrl, setTextImageUrl] = useState('');
|
||||
const textHandleChange: UploadProps['onChange'] = (info) => {
|
||||
if (info.file.status === 'uploading') {
|
||||
setTextLoading(true);
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
// Get this url from response in real world.
|
||||
// getBase64(info.file.originFileObj as FileType, (url) => {
|
||||
// setLoading(false);
|
||||
// setImageUrl(url);
|
||||
// });
|
||||
// console.log(info.file.response.data.fileId);
|
||||
setTextLoading(false);
|
||||
const fileId = info.file.response.data.fileId;
|
||||
const url = showImage(fileId, false);
|
||||
setTextImageUrl(url);
|
||||
form.setFieldsValue({
|
||||
companyAuth: fileId,
|
||||
})
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
setTextLoading(false);
|
||||
// 显示错误提示
|
||||
message.error(`上传失败`);
|
||||
//伤处表单name为ing的值
|
||||
form.setFieldsValue({
|
||||
companyAuth: '', // 将值设置为 undefined 以清除错误状态
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 自定义验证规则
|
||||
const validateUpload = () => {
|
||||
// const validateUpload = () => {
|
||||
|
||||
if (loading) {
|
||||
return Promise.reject(new Error('文件上传中,请等待上传完成'));
|
||||
}
|
||||
if (!imageUrl) {
|
||||
return Promise.reject(new Error('请上传有效的文件'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
// if (loading) {
|
||||
// return Promise.reject(new Error('文件上传中,请等待上传完成'));
|
||||
// }
|
||||
// if (!imageUrl) {
|
||||
// return Promise.reject(new Error('请上传有效的文件'));
|
||||
// }
|
||||
// return Promise.resolve();
|
||||
|
||||
};
|
||||
// };
|
||||
const token = sessionStorage.getItem('token')
|
||||
const submitInfo = (values: any) => {
|
||||
message.success('提交成功');
|
||||
console.log(values);
|
||||
props.setEditProcess(2);
|
||||
|
||||
|
||||
}
|
||||
const height = window.innerHeight - 460;
|
||||
const [form] = Form.useForm();
|
||||
|
||||
|
||||
const handleSubmit = () => {
|
||||
// console.log(form);
|
||||
props.setEditProcess(2);
|
||||
// props.setEditProcess(2);
|
||||
// 调用表单实例的 submit 方法
|
||||
form.submit();
|
||||
|
||||
};
|
||||
function deepCompareObjects(obj1: any, obj2: any): boolean {
|
||||
// 若两个值严格相等,直接返回 true
|
||||
if (obj1 === obj2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const onFinish = (values: any) => {
|
||||
// 若其中一个值为 null 或不是对象类型,返回 false
|
||||
if (typeof obj1 !== 'object' || obj1 === null || typeof obj2 !== 'object' || obj2 === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 获取两个对象的键数组
|
||||
const keys1 = Object.keys(obj1);
|
||||
const keys2 = Object.keys(obj2);
|
||||
|
||||
// 若键的数量不同,返回 false
|
||||
if (keys1.length !== keys2.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 遍历键,递归比较对应的值
|
||||
for (const key of keys1) {
|
||||
if (!keys2.includes(key) || !deepCompareObjects(obj1[key], obj2[key])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
const onFinish = async (values: any) => {
|
||||
// 处理表单提交逻辑
|
||||
console.log('表单提交成功', values);
|
||||
submitInfo(values)
|
||||
// console.log('表单提交成功', values);
|
||||
// console.log('发过来的数据', props.companyInfo);
|
||||
if (!deepCompareObjects(values, props.companyInfo)) {
|
||||
try {
|
||||
setDownLoading(true)
|
||||
await companyAuth(props.appOrderId, {
|
||||
appOrderId: props.appOrderId,
|
||||
...values
|
||||
})
|
||||
props.setCompanyInfo({
|
||||
...values,
|
||||
})
|
||||
props.setEditProcess(2);
|
||||
setDownLoading(false)
|
||||
// console.log(res);
|
||||
} catch (error: any) {
|
||||
setDownLoading(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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
props.setEditProcess(2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
useEffect(() => {
|
||||
// console.log('认证数据', props.companyInfo);
|
||||
if (props.companyInfo.companyName) {
|
||||
// console.log('嘻嘻');
|
||||
form.setFieldsValue({
|
||||
companyName: props.companyInfo.companyName,
|
||||
companyNumber: props.companyInfo.companyNumber,
|
||||
companyPhoto: props.companyInfo.companyPhoto,
|
||||
companyAuth: props.companyInfo.companyAuth,
|
||||
})
|
||||
setImageUrl(showImage(props.companyInfo.companyPhoto, false))
|
||||
setTextImageUrl(showImage(props.companyInfo.companyAuth, false))
|
||||
|
||||
}
|
||||
}, [props.companyInfo])
|
||||
return (
|
||||
<div className='appInfoBox'>
|
||||
{/* {contextHolder} */}
|
||||
<div className='bigLine'></div>
|
||||
<div className='appInfoFormBox' style={{
|
||||
height: height
|
||||
}}>
|
||||
<Spin tip='正在加载,请稍后...' size="small" spinning={downLoading} >
|
||||
{contextHolder}
|
||||
<div className='appInfoBox'>
|
||||
{/* {contextHolder} */}
|
||||
<div className='bigLine'></div>
|
||||
<div className='appInfoFormBox' style={{
|
||||
height: height
|
||||
}}>
|
||||
|
||||
<Form form={form} onFinish={onFinish}
|
||||
onFinishFailed={() => {
|
||||
message.error('请完善信息')
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
width: '900px',
|
||||
// background: 'pink'
|
||||
}}>
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle'>企业/机构名称<span style={{color:'red',}}>*</span>:</div>
|
||||
<Form.Item name="name" label="" rules={[{ required: true, message: '请输入企业/机构名称' },
|
||||
|
||||
]}>
|
||||
<Input
|
||||
allowClear
|
||||
style={{
|
||||
width: '300px',
|
||||
height: '42px',
|
||||
}} placeholder="请输入企业/机构名称" />
|
||||
</Form.Item>
|
||||
</div>
|
||||
{/* <div className='appInfoFormInput' style={{
|
||||
|
||||
}}>
|
||||
<div className='FormInputTitle'>所在省市:</div>
|
||||
<Form.Item name="subName" label="" rules={[{ required: true, message: '请选择省市' },
|
||||
|
||||
]}>
|
||||
<Cascader options={areaArray}
|
||||
allowClear
|
||||
style={{
|
||||
width: '300px',
|
||||
height: '42px',
|
||||
}}
|
||||
|
||||
loadData={loadCityList}
|
||||
placeholder="请选择省市"
|
||||
changeOnSelect
|
||||
/>
|
||||
</Form.Item>
|
||||
</div> */}
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>统一社会信用代码<span style={{color:'red',}}>*</span>:</div>
|
||||
<Form.Item name="type" label="" rules={[{ required: true, message: '请输入证件号' },
|
||||
|
||||
]}>
|
||||
<Input
|
||||
allowClear
|
||||
style={{
|
||||
width: '300px',
|
||||
height: '42px',
|
||||
}} placeholder="请输入证件号" />
|
||||
</Form.Item>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/* <div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
width: '900px',
|
||||
}}>
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle'>企业/机构地址:</div>
|
||||
<Form.Item name="vnum" label="" rules={[{ required: true, message: '请输企业/机构地址' },
|
||||
|
||||
]}>
|
||||
<Input
|
||||
allowClear
|
||||
style={{
|
||||
width: '300px',
|
||||
height: '42px',
|
||||
}} placeholder="请输入企业/机构地址" />
|
||||
</Form.Item>
|
||||
</div>
|
||||
<div className='appInfoFormInput' style={{
|
||||
}}>
|
||||
<div className='FormInputTitle'>成立日期:</div>
|
||||
<Form.Item name="appId" label="" rules={[{ required: true, message: '请选择成立日期' },
|
||||
|
||||
]}>
|
||||
<DatePicker placeholder="请选择成立日期"
|
||||
style={{
|
||||
width: '300px',
|
||||
height: '42px',
|
||||
}}
|
||||
locale={locale}
|
||||
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
</div> */}
|
||||
{/* <div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
width: '900px',
|
||||
}}>
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle'>证件类型:</div>
|
||||
<Form.Item name="runtype" label="" rules={[{ required: true, message: '请选择证件类型' },
|
||||
|
||||
]}>
|
||||
<Select
|
||||
allowClear
|
||||
style={{
|
||||
width: '300px',
|
||||
height: '42px',
|
||||
}}
|
||||
|
||||
options={[
|
||||
// { value: '', label: '全部项目' },
|
||||
{ value: '1', label: '类型1' },
|
||||
{ value: '2', label: '类型2' },
|
||||
{ value: '3', label: '类型3' },
|
||||
]}
|
||||
// defaultValue=""
|
||||
placeholder={'请选择证件类型'}
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>证件号:</div>
|
||||
<Form.Item name="type" label="" rules={[{ required: true, message: '请输入证件号' },
|
||||
|
||||
]}>
|
||||
<Input
|
||||
allowClear
|
||||
style={{
|
||||
width: '300px',
|
||||
height: '42px',
|
||||
}} placeholder="请输入证件号" />
|
||||
</Form.Item>
|
||||
|
||||
</div>
|
||||
</div> */}
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
width: '900px',
|
||||
}}>
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>上传证件<span style={{color:'red',}}>*</span>:</div>
|
||||
<div style={{
|
||||
// background: 'pink',
|
||||
position: 'relative',
|
||||
}}>
|
||||
<Form.Item name="img" label="" rules={[
|
||||
// { required: true, message: '请上传文件' },
|
||||
// 添加自定义验证规则
|
||||
{ validator: validateUpload }
|
||||
|
||||
]}>
|
||||
<Upload
|
||||
showUploadList={false}
|
||||
action={uploadFileUrl()}
|
||||
// defaultFileList={upImgArray}
|
||||
beforeUpload={beforeUpload}
|
||||
onChange={handleChange}
|
||||
onRemove={() => {
|
||||
// setUpArray([])
|
||||
// setDisabled(false)
|
||||
}}
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
disabled={!!imageUrl}
|
||||
// beforeUpload={beforeUpload}
|
||||
>
|
||||
{imageUrl ?
|
||||
<div style={{
|
||||
height: '150px',
|
||||
width: '300px',
|
||||
}}>
|
||||
<Image src={imageUrl} style={{ width: '300px', height: '150px' }}
|
||||
preview={{
|
||||
mask: '查看', // 设置点击放大时显示的文字
|
||||
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
: <Button className='upBtn' style={{
|
||||
height: '150px',
|
||||
width: '300px',
|
||||
border: '1px dashed #ccc',
|
||||
borderRadius: '5px',
|
||||
color: '#929292',
|
||||
}}
|
||||
disabled={loading}
|
||||
>
|
||||
{loading ? <span><span style={{ marginRight: 5 }}>正在上传</span><LoadingOutlined /></span> :
|
||||
|
||||
'点击上传文件'
|
||||
|
||||
|
||||
}
|
||||
</Button>}
|
||||
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
right: -50,
|
||||
bottom: 20,
|
||||
//background:'skyblue',
|
||||
padding: '5px 10px',
|
||||
cursor: 'pointer',
|
||||
color: 'red',
|
||||
display: imageUrl ? 'block' : 'none',
|
||||
}}
|
||||
onClick={() => {
|
||||
setImageUrl('')
|
||||
}}
|
||||
>删除</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>上传授权书<span style={{color:'red',}}>*</span>:
|
||||
<a style={{
|
||||
// background:'pink',
|
||||
textAlign: 'center',
|
||||
paddingLeft: 23,
|
||||
// color: '#4ca8e6',
|
||||
display: 'block',
|
||||
// cursor: 'pointer',
|
||||
}}
|
||||
onClick={() => {
|
||||
alert('下载授权书')
|
||||
}}
|
||||
>下载授权书</a>
|
||||
</div>
|
||||
<div style={{
|
||||
// background: 'pink',
|
||||
position: 'relative',
|
||||
}}>
|
||||
<Form.Item name="img" label="" rules={[
|
||||
// { required: true, message: '请上传文件' },
|
||||
// 添加自定义验证规则
|
||||
{ validator: validateUpload }
|
||||
|
||||
]}>
|
||||
<Upload
|
||||
showUploadList={false}
|
||||
action={uploadFileUrl()}
|
||||
// defaultFileList={upImgArray}
|
||||
beforeUpload={beforeUpload}
|
||||
onChange={handleChange}
|
||||
onRemove={() => {
|
||||
// setUpArray([])
|
||||
// setDisabled(false)
|
||||
}}
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
disabled={!!imageUrl}
|
||||
// beforeUpload={beforeUpload}
|
||||
>
|
||||
{imageUrl ?
|
||||
<div style={{
|
||||
height: '150px',
|
||||
width: '300px',
|
||||
}}>
|
||||
<Image src={imageUrl} style={{ width: '300px', height: '150px' }}
|
||||
preview={{
|
||||
mask: '查看', // 设置点击放大时显示的文字
|
||||
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
: <Button className='upBtn' style={{
|
||||
height: '150px',
|
||||
width: '300px',
|
||||
border: '1px dashed #ccc',
|
||||
borderRadius: '5px',
|
||||
color: '#929292',
|
||||
}}
|
||||
disabled={loading}
|
||||
>
|
||||
{loading ? <span><span style={{ marginRight: 5 }}>正在上传</span><LoadingOutlined /></span> :
|
||||
|
||||
'点击上传文件'
|
||||
|
||||
}
|
||||
</Button>}
|
||||
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
right: -50,
|
||||
bottom: 20,
|
||||
//background:'skyblue',
|
||||
padding: '5px 10px',
|
||||
cursor: 'pointer',
|
||||
color: 'red',
|
||||
display: imageUrl ? 'block' : 'none',
|
||||
}}
|
||||
onClick={() => {
|
||||
setImageUrl('')
|
||||
}}
|
||||
>删除</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
color: 'red',
|
||||
justifyContent: 'center',
|
||||
// paddingBottom: '20px',
|
||||
}}>
|
||||
<div style={{
|
||||
marginRight: '10px',
|
||||
}}>上传要求:</div>
|
||||
<Form form={form} onFinish={onFinish}
|
||||
onFinishFailed={() => {
|
||||
message.error('请完善信息')
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'flex-start',
|
||||
|
||||
|
||||
justifyContent: 'space-between',
|
||||
width: '900px',
|
||||
// background: 'pink'
|
||||
}}>
|
||||
<div>1.要求不得涂改,需确保四边角完整,文字图片证件号码清晰可见</div>
|
||||
<div>2.请上传小于4MB的图片(JPG、JPEG、PNG、BMP)</div>
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle'>企业/机构名称<span style={{ color: 'red', }}>*</span>:</div>
|
||||
<Form.Item name="companyName" label="" rules={[{ required: true, message: '请输入企业/机构名称' },
|
||||
|
||||
]}>
|
||||
<Input
|
||||
allowClear
|
||||
style={{
|
||||
width: '300px',
|
||||
height: '42px',
|
||||
}} placeholder="请输入企业/机构名称" />
|
||||
</Form.Item>
|
||||
</div>
|
||||
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>统一社会信用代码<span style={{ color: 'red', }}>*</span>:</div>
|
||||
<Form.Item name="companyNumber" label="" rules={[{ required: true, message: '请输入证件号' },
|
||||
|
||||
]}>
|
||||
<Input
|
||||
allowClear
|
||||
style={{
|
||||
width: '300px',
|
||||
height: '42px',
|
||||
}} placeholder="请输入证件号" />
|
||||
</Form.Item>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</Form>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
width: '900px',
|
||||
}}>
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>上传证件<span style={{ color: 'red', }}>*</span>:</div>
|
||||
<div style={{
|
||||
// background: 'pink',
|
||||
position: 'relative',
|
||||
}}>
|
||||
<Form.Item name="companyPhoto" label="" rules={[
|
||||
// { required: true, message: '请上传文件' },
|
||||
// { required: !imageUrl, message: '请上传文件' },
|
||||
// 添加自定义验证规则
|
||||
// { validator: validateUpload }
|
||||
{ validator: validateImageUrl }
|
||||
|
||||
]}>
|
||||
<Upload
|
||||
name='image'
|
||||
showUploadList={false}
|
||||
action={uploadImageUrl()}
|
||||
// defaultFileList={upImgArray}
|
||||
beforeUpload={beforeUpload}
|
||||
onChange={handleChange}
|
||||
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
disabled={!!imageUrl}
|
||||
// beforeUpload={beforeUpload}
|
||||
>
|
||||
{imageUrl ?
|
||||
<div style={{
|
||||
height: '150px',
|
||||
width: '300px',
|
||||
display: 'flex', justifyContent: 'center', alignItems: 'center',
|
||||
border: '1px dashed #ccc',
|
||||
}}>
|
||||
<Image src={imageUrl} style={{ maxWidth: '298px', height: '148px' }}
|
||||
|
||||
preview={{
|
||||
mask: '查看', // 设置点击放大时显示的文字
|
||||
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
: <Button className='upBtn' style={{
|
||||
height: '150px',
|
||||
width: '300px',
|
||||
border: '1px dashed #ccc',
|
||||
borderRadius: '5px',
|
||||
color: '#929292',
|
||||
}}
|
||||
disabled={loading}
|
||||
>
|
||||
{loading ? <span><span style={{ marginRight: 5 }}>正在上传</span><LoadingOutlined /></span> :
|
||||
|
||||
'点击上传文件'
|
||||
|
||||
|
||||
}
|
||||
</Button>}
|
||||
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
right: -50,
|
||||
bottom: 20,
|
||||
//background:'skyblue',
|
||||
padding: '5px 10px',
|
||||
cursor: 'pointer',
|
||||
color: 'red',
|
||||
display: imageUrl ? 'block' : 'none',
|
||||
}}
|
||||
onClick={() => {
|
||||
setImageUrl('')
|
||||
form.setFieldsValue({
|
||||
companyPhoto: '', // 将值设置为 undefined 以清除错误状态
|
||||
})
|
||||
}}
|
||||
>删除</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='appInfoFormInput'>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>上传授权书<span style={{ color: 'red', }}>*</span>:
|
||||
<a style={{
|
||||
textAlign: 'center',
|
||||
paddingLeft: 23,
|
||||
display: 'block',
|
||||
}}
|
||||
onClick={async () => {
|
||||
// alert('下载授权书')
|
||||
if (form.getFieldValue('companyName')) {
|
||||
try {
|
||||
setDownLoading(true)
|
||||
const res: any = await authorizeWord(
|
||||
props.appOrderId,
|
||||
form.getFieldValue('companyName'),
|
||||
)
|
||||
setDownLoading(false)
|
||||
window.open(showImage(res.fileId, false));
|
||||
} catch (error: any) {
|
||||
setDownLoading(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 {
|
||||
setDownLoading(false)
|
||||
}
|
||||
// console.log(form.getFieldValue('companyName'));
|
||||
|
||||
|
||||
} else {
|
||||
message.error('请完善企业/机构名称')
|
||||
}
|
||||
}}
|
||||
>下载授权书</a>
|
||||
</div>
|
||||
<div style={{
|
||||
position: 'relative',
|
||||
}}>
|
||||
<Form.Item name="companyAuth" label="" rules={[
|
||||
// { required: true, message: '请上传文件' },
|
||||
{ validator: validateTextImageUrl }
|
||||
|
||||
]}>
|
||||
<Upload
|
||||
name='image'
|
||||
showUploadList={false}
|
||||
action={uploadImageUrl()}
|
||||
beforeUpload={beforeUpload}
|
||||
onChange={textHandleChange}
|
||||
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
disabled={!!textImageUrl}
|
||||
>
|
||||
{textImageUrl ?
|
||||
<div style={{
|
||||
height: '150px',
|
||||
width: '300px',
|
||||
display: 'flex', justifyContent: 'center', alignItems: 'center',
|
||||
border: '1px dashed #ccc',
|
||||
}}>
|
||||
<Image src={textImageUrl} style={{ maxWidth: '298px', height: '148px' }}
|
||||
preview={{
|
||||
mask: '查看',
|
||||
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
: <Button className='upBtn' style={{
|
||||
height: '150px',
|
||||
width: '300px',
|
||||
border: '1px dashed #ccc',
|
||||
borderRadius: '5px',
|
||||
color: '#929292',
|
||||
}}
|
||||
disabled={textloading}
|
||||
>
|
||||
{textloading ? <span><span style={{ marginRight: 5 }}>正在上传</span><LoadingOutlined /></span> :
|
||||
|
||||
'点击上传文件'
|
||||
|
||||
}
|
||||
</Button>}
|
||||
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
right: -50,
|
||||
bottom: 20,
|
||||
//background:'skyblue',
|
||||
padding: '5px 10px',
|
||||
cursor: 'pointer',
|
||||
color: 'red',
|
||||
display: textImageUrl ? 'block' : 'none',
|
||||
}}
|
||||
onClick={() => {
|
||||
setTextImageUrl('')
|
||||
form.setFieldsValue({
|
||||
textImg: '', // 将值设置为 undefined 以清除错误状态
|
||||
})
|
||||
}}
|
||||
>删除</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
color: 'red',
|
||||
justifyContent: 'center',
|
||||
// paddingBottom: '20px',
|
||||
}}>
|
||||
<div style={{
|
||||
marginRight: '10px',
|
||||
}}>上传要求:</div>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'flex-start',
|
||||
|
||||
|
||||
}}>
|
||||
<div>1.要求不得涂改,需确保四边角完整,文字图片证件号码清晰可见</div>
|
||||
<div>2.请上传小于4MB的图片(JPG、JPEG、PNG、BMP)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</Form>
|
||||
|
||||
</div>
|
||||
|
||||
<div className='bigLine'></div>
|
||||
<div className='nextBtnBxo'>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
}}
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
handleSubmit()
|
||||
}}>下一步</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='bigLine'></div>
|
||||
<div className='nextBtnBxo'>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
}}
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
handleSubmit()
|
||||
}}>下一步</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Spin>
|
||||
)
|
||||
}
|
||||
|
@ -1,207 +1,455 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import './app-info.css'
|
||||
import { Button, message } from "antd"
|
||||
import { Button, message, Spin, Modal } from "antd"
|
||||
import { fileDetail, submitapp, getContent } from '../../../../request/api'
|
||||
import { showImage } from '../../../../request/request'
|
||||
export default function AppInfo(props: any) {
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const height = window.innerHeight - 460;
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [modal, setModal] = useState(false);
|
||||
const handleSubmit = () => {
|
||||
message.success('提交成功');
|
||||
|
||||
setModal(true)
|
||||
// message.success('提交成功');
|
||||
// props.setCheckStatus('1')
|
||||
};
|
||||
const clickOk = async () => {
|
||||
try {
|
||||
setLoading(true)
|
||||
await submitapp(props.appOrderId)
|
||||
setModal(false)
|
||||
setLoading(false)
|
||||
message.success('提交成功');
|
||||
props.setCheckStatus('1')
|
||||
} 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 companyInfo = props.companyInfo;
|
||||
const appInfo = props.appInfo;
|
||||
const filesInfo = props.filesInfo;
|
||||
const [photofileDetail, setPhotofileDetail] = useState<any>({
|
||||
|
||||
fileId: '', //文件id
|
||||
fileName: '', //文件名称
|
||||
url: ''
|
||||
});
|
||||
const [authfileDetail, setAuthfileDetail] = useState<any>({
|
||||
fileId: '', //文件id
|
||||
fileName: '', //文件名称
|
||||
url: ''
|
||||
})
|
||||
const [file, setFile] = useState<any>({
|
||||
fileId: '', //文件id
|
||||
fileName: '', //文件名称
|
||||
url: ''
|
||||
})
|
||||
const [codefileDetail, setCodefileDetail] = useState<any>({
|
||||
fileId: '', //文件id
|
||||
fileName: '', //文件名称
|
||||
url: ''
|
||||
})
|
||||
const [softfileDetail, setSoftfileDetail] = useState<any>({
|
||||
fileId: '', //文件id
|
||||
fileName: '', //文件名称
|
||||
url: ''
|
||||
})
|
||||
const getPhotoFileDetail = async (id: string) => {
|
||||
try {
|
||||
const res: any = await fileDetail(id)
|
||||
setPhotofileDetail({
|
||||
fileId: res[0].fileId, //文件id
|
||||
fileName: res[0].fileName, //文件名称
|
||||
url: showImage(res[0].fileId, false)
|
||||
})
|
||||
} 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 getAuthFileDetail = async (id: string) => {
|
||||
try {
|
||||
const res: any = await fileDetail(id)
|
||||
setAuthfileDetail({
|
||||
fileId: res[0].fileId, //文件id
|
||||
fileName: res[0].fileName, //文件名称
|
||||
url: showImage(res[0].fileId, false)
|
||||
})
|
||||
|
||||
} 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 getFileDetail = async (id: string) => {
|
||||
try {
|
||||
const res: any = await fileDetail(id)
|
||||
setFile({
|
||||
fileId: res[0].fileId, //文件id
|
||||
fileName: res[0].fileName, //文件名称
|
||||
url: showImage(res[0].fileId, false)
|
||||
})
|
||||
} 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 getCodeFileDetail = async (id: string) => {
|
||||
try {
|
||||
const res: any = await fileDetail(id)
|
||||
setCodefileDetail({
|
||||
fileId: res[0].fileId, //文件id
|
||||
fileName: res[0].fileName, //文件名称
|
||||
url: showImage(res[0].fileId, false)
|
||||
})
|
||||
} 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 getSoftFileDetail = async (id: string) => {
|
||||
try {
|
||||
const res: any = await fileDetail(id)
|
||||
setSoftfileDetail({
|
||||
fileId: res[0].fileId, //文件id
|
||||
fileName: res[0].fileName, //文件名称
|
||||
url: showImage(res[0].fileId, false)
|
||||
})
|
||||
} 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 [bigClassName, setBigClassName] = useState('')
|
||||
const [smallClassName, setSmallClassName] = useState('')
|
||||
const getBigClassName = async (id: string) => {
|
||||
try {
|
||||
const res: any = await getContent(id)
|
||||
// console.log(res);
|
||||
|
||||
setBigClassName(res.dataName)
|
||||
} 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 getSmallClassName = async (id: string) => {
|
||||
try {
|
||||
const res: any = await getContent(id)
|
||||
// console.log(res);
|
||||
setSmallClassName(res.dataName)
|
||||
|
||||
} 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
useEffect(() => {
|
||||
if (companyInfo.companyPhoto) {
|
||||
getPhotoFileDetail(companyInfo.companyPhoto)
|
||||
|
||||
}
|
||||
if (companyInfo.companyAuth) {
|
||||
getAuthFileDetail(companyInfo.companyAuth)
|
||||
}
|
||||
if (appInfo.getFile) {
|
||||
getFileDetail(appInfo.getFile)
|
||||
}
|
||||
if (filesInfo.sourceCodeDocFile) {
|
||||
getCodeFileDetail(filesInfo.sourceCodeDocFile)
|
||||
}
|
||||
if (filesInfo.softwareDocFile) {
|
||||
getSoftFileDetail(filesInfo.softwareDocFile)
|
||||
}
|
||||
if (appInfo.bigClassify) {
|
||||
getBigClassName(appInfo.bigClassify)
|
||||
}
|
||||
if (appInfo.subClassify) {
|
||||
getSmallClassName(appInfo.subClassify)
|
||||
}
|
||||
|
||||
}, [companyInfo.companyPhoto, companyInfo.companyAuth, appInfo.getFile, filesInfo.sourceCodeDocFile, filesInfo.softwareDocFile, appInfo.bigClassify, appInfo.subClassify])
|
||||
return (
|
||||
<div>
|
||||
<div className='bigLine'></div>
|
||||
<div className='appInfoFormBox' style={{
|
||||
height: height,
|
||||
justifyContent: 'flex-start',
|
||||
flexDirection: 'column',
|
||||
<Spin tip="正在提交..." size="small" spinning={loading}>
|
||||
<div>
|
||||
{contextHolder}
|
||||
<div className='bigLine'></div>
|
||||
|
||||
}}>
|
||||
<div className='appInfoBox'>
|
||||
<div className='appInfoTitle'>企业/机构信息</div>
|
||||
<div className='appInfoText'>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>企业/机构信息名称 : </div>
|
||||
<div className='appInfoTextItemText'>嘻嘻嘻嘻公司</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>所在省市 : </div>
|
||||
<div className='appInfoTextItemText'>辽宁省沈阳市</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>企业/机构地址 : </div>
|
||||
<div className='appInfoTextItemText'>xxx路xxx号</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>证件类型 : </div>
|
||||
<div className='appInfoTextItemText'>xx证</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>证件号 : </div>
|
||||
<div className='appInfoTextItemText'>111111111</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>上传证件 : </div>
|
||||
<div className='appInfoTextItemText'> xx.png</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>授权书 : </div>
|
||||
<div className='appInfoTextItemText'> xxx.jpg</div>
|
||||
</div>
|
||||
<div className='appInfoFormBox' style={{
|
||||
height: height,
|
||||
justifyContent: 'flex-start',
|
||||
flexDirection: 'column',
|
||||
|
||||
}}>
|
||||
|
||||
<div className='appInfoBox'>
|
||||
<div style={{
|
||||
marginLeft: '100px',
|
||||
width: '80%',
|
||||
fontSize: '14px',
|
||||
color: 'red',
|
||||
fontWeight: 'bold',
|
||||
display: props.checkStatus === '0' ? 'unset' : 'none'
|
||||
}}>未通过原因:{props.checkRemark}</div>
|
||||
<div className='appInfoTitle'>企业/机构信息</div>
|
||||
<div className='appInfoText'>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>企业/机构信息名称 : </div>
|
||||
<div className='appInfoTextItemText'>{companyInfo.companyName}</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>统一社会信用代码 : </div>
|
||||
<div className='appInfoTextItemText'>{companyInfo.companyNumber}</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>企业证件 : </div>
|
||||
<a className='appInfoTextItemText'
|
||||
style={{
|
||||
textDecoration: 'underline'
|
||||
}}
|
||||
onClick={() => {
|
||||
window.open(photofileDetail.url)
|
||||
}}
|
||||
>{photofileDetail.fileName}</a>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>授权书 : </div>
|
||||
<a className='appInfoTextItemText'
|
||||
style={{
|
||||
textDecoration: 'underline'
|
||||
}}
|
||||
onClick={() => {
|
||||
window.open(authfileDetail.url)
|
||||
}}>{authfileDetail.fileName}</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className='appInfoBox'>
|
||||
<div className='appInfoTitle'>软件基本信息</div>
|
||||
<div className='appInfoText'>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>APP软件全称 : </div>
|
||||
<div className='appInfoTextItemText'>{appInfo.appName}</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>软件简称 : </div>
|
||||
<div className='appInfoTextItemText'>{appInfo.subName}</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>版本号 : </div>
|
||||
<div className='appInfoTextItemText'>{appInfo.versionName}</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>包名(APPID) : </div>
|
||||
<div className='appInfoTextItemText'>{appInfo.packageName}</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>运行系统 : </div>
|
||||
<div className='appInfoTextItemText'>{appInfo.systemName}</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>软件分类 : </div>
|
||||
<div className='appInfoTextItemText'> {bigClassName} - {smallClassName}</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>开发方式 : </div>
|
||||
<div className='appInfoTextItemText'> {appInfo.developWay}</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle' style={{
|
||||
display: appInfo.getFile ? 'block' : 'none'
|
||||
}}>合作协议 : </div>
|
||||
<a style={{
|
||||
textDecoration: 'underline'
|
||||
}} className='appInfoTextItemText'
|
||||
onClick={() => {
|
||||
window.open(file.url)
|
||||
}}
|
||||
> {file.fileName}</a>
|
||||
</div>
|
||||
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>开发完成日期 : </div>
|
||||
<div className='appInfoTextItemText'> {appInfo.completeTime}</div>
|
||||
</div>
|
||||
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>产权所属者 : </div>
|
||||
<div className='appInfoTextItemText'> {appInfo.projOwnerName}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='appInfoBox'>
|
||||
<div className='appInfoTitle'>鉴别材料</div>
|
||||
<div className='appInfoText'>
|
||||
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>源码文档 : </div>
|
||||
<a style={{
|
||||
textDecoration: 'underline'
|
||||
}}
|
||||
onClick={() => {
|
||||
window.open(codefileDetail.url)
|
||||
}}
|
||||
className='appInfoTextItemText'>{codefileDetail.fileName}</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>软件文档 : </div>
|
||||
<a style={{
|
||||
textDecoration: 'underline'
|
||||
}}
|
||||
onClick={() => {
|
||||
window.open(softfileDetail.url)
|
||||
}}
|
||||
className='appInfoTextItemText'>{softfileDetail.fileName}</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className='bigLine'></div>
|
||||
<div className='nextBtnBxo' >
|
||||
<div style={{
|
||||
display: props.checkStatus == '' || props.checkStatus == '0' ? 'unset' : 'none',
|
||||
}}>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
}}
|
||||
onClick={() => {
|
||||
props.setEditProcess(3)
|
||||
}}>上一步</Button>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
marginLeft: '10px',
|
||||
}}
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
handleSubmit()
|
||||
}}>提交审核</Button>
|
||||
</div>
|
||||
<div style={{
|
||||
display: props.checkStatus == '1' ? 'unset' : 'none',
|
||||
fontSize: '16px',
|
||||
color: 'skyblue',
|
||||
// color:'green',
|
||||
fontWeight: 'bold'
|
||||
}}>
|
||||
正在审核中...
|
||||
</div>
|
||||
<div style={{
|
||||
display: props.checkStatus == '2' ? 'unset' : 'none',
|
||||
fontSize: '16px',
|
||||
// color:'skyblue',
|
||||
color: 'green',
|
||||
fontWeight: 'bold'
|
||||
}}>
|
||||
审核通过
|
||||
</div>
|
||||
</div>
|
||||
<div className='appInfoBox'>
|
||||
<div className='appInfoTitle'>软件基本信息</div>
|
||||
<div className='appInfoText'>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>APP软件全称 : </div>
|
||||
<div className='appInfoTextItemText'>嘻嘻嘻嘻</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>软件简称 : </div>
|
||||
<div className='appInfoTextItemText'>嘻嘻嘻嘻</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>版本号 : </div>
|
||||
<div className='appInfoTextItemText'>v.10</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>包名(APPID) : </div>
|
||||
<div className='appInfoTextItemText'>com.zhongxinhy.communitymanage</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>运行系统 : </div>
|
||||
<div className='appInfoTextItemText'>android for phone</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>APP软件分类 : </div>
|
||||
<div className='appInfoTextItemText'> 应用 - 生活实用</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>开发方式 : </div>
|
||||
<div className='appInfoTextItemText'> 独立开发</div>
|
||||
</div>
|
||||
{/* <div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>软件作品说明 : </div>
|
||||
<div className='appInfoTextItemText'> 原创</div>
|
||||
</div> */}
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>开发完成日期 : </div>
|
||||
<div className='appInfoTextItemText'> 2025-05-05</div>
|
||||
</div>
|
||||
{/* <div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>发表状态 : </div>
|
||||
<div className='appInfoTextItemText'> 未发表</div>
|
||||
</div> */}
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>产权所属者 : </div>
|
||||
<div className='appInfoTextItemText'> 嘻嘻公司</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className='appInfoBox'>
|
||||
<div className='appInfoTitle'>权利说明</div>
|
||||
<div className='appInfoText'>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>权力取得方式 : </div>
|
||||
<div className='appInfoTextItemText'>原始</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>权利范围 : </div>
|
||||
<div className='appInfoTextItemText'>全部权利</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>其他相关文件 : </div>
|
||||
<div className='appInfoTextItemText'>asdasjdadja.png</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div> */}
|
||||
<div className='appInfoBox'>
|
||||
<div className='appInfoTitle'>鉴别材料</div>
|
||||
<div className='appInfoText'>
|
||||
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>源码文档 : </div>
|
||||
<div className='appInfoTextItemText'>asdkaksd.png</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>软件文档 : </div>
|
||||
<div className='appInfoTextItemText'>asdkaksd.png</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className='appInfoBox'>
|
||||
<div className='appInfoTitle'>功能特点</div>
|
||||
<div className='appInfoText'>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>硬件环境 : </div>
|
||||
<div className='appInfoTextItemText'>1GHz以上处理器,1GB以上内存,16GB以上存储空间、安卓智能移动设备</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>软件环境 : </div>
|
||||
<div className='appInfoTextItemText'>Android操作系统</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>编程语言 : </div>
|
||||
<div className='appInfoTextItemText'> Java</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>源程序量 : </div>
|
||||
<div className='appInfoTextItemText'> 672384行左右</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>主要功能 : </div>
|
||||
<div className='appInfoTextItemText'>隆盛社区APP软件主要功能有考勤打卡、房屋人口管理、工作轨迹、事件上报、事件处理、事件检查、学校管理、重点区域管理、重点场所、实有车辆、用户登录退出等功能。</div>
|
||||
</div>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>技术特点 : </div>
|
||||
<div className='appInfoTextItemText'>基于 Android Jetpack 组件构建,利用 ViewModel 和 LiveData 实现数据的高效管理与界面的实时更新,确保用户体验流畅。网络通信方面,运用 Retrofit 框架结合 OkHttp,实现安全快速的数据交互。</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> */}
|
||||
{/* <div className='appInfoBox'>
|
||||
<div className='appInfoTitle'>著作权人</div>
|
||||
<div className='appInfoText'>
|
||||
<div className='appInfoTextItem'>
|
||||
<div className='appInfoTextItemTitle'>著作权人名称 : </div>
|
||||
<div className='appInfoTextItemText'>嘻嘻嘻嘻嘻嘻嘻哈哈哈哈公司</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
|
||||
<div className='bigLine'></div>
|
||||
<div className='nextBtnBxo'>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
}}
|
||||
onClick={() => {
|
||||
props.setEditProcess(3)
|
||||
}}>上一步</Button>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
marginLeft: '10px',
|
||||
}}
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
handleSubmit()
|
||||
}}>提交审核</Button>
|
||||
|
||||
</div>
|
||||
<Modal title="提示"
|
||||
centered
|
||||
// footer={null}
|
||||
destroyOnClose
|
||||
okText="确认提交"
|
||||
cancelText="取消"
|
||||
open={modal}
|
||||
// width={1200}
|
||||
onCancel={() => {
|
||||
setModal(false)
|
||||
|
||||
</div>
|
||||
}}
|
||||
onOk={
|
||||
// setModal(false)
|
||||
clickOk
|
||||
}
|
||||
>
|
||||
|
||||
<div style={{
|
||||
fontSize: '16px',
|
||||
color: 'red',
|
||||
fontWeight: 'bold'
|
||||
}}>
|
||||
注 : 提交后无法修改,请确认信息是否正确!
|
||||
</div>
|
||||
|
||||
</Modal>
|
||||
</Spin>
|
||||
)
|
||||
}
|
||||
|
@ -35,4 +35,7 @@
|
||||
.appInfoTextItemText{
|
||||
max-width: 60%;
|
||||
/* background-color: pink; */
|
||||
}
|
||||
/* 下划线 */
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,11 +1,64 @@
|
||||
import { useState } from 'react'
|
||||
import { Button, Form, Upload, message, } from "antd"
|
||||
import { uploadFileUrl } from '../../../../request/request'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Button, Form, Upload, message, Modal, Spin } from "antd"
|
||||
import { uploadFileUrl, showImage } from '../../../../request/request'
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
import { sourceCodeWord, softwareDocumentWord, uploadMaterial, fileDetail } from '../../../../request/api'
|
||||
import './edit-app-files.css'
|
||||
export default function EditAppFiles(props: any) {
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const [loading, setLoading] = useState(false)
|
||||
const downCodeWord = async () => {
|
||||
try {
|
||||
setLoading(true)
|
||||
const res: any = await sourceCodeWord(props.appOrderId)
|
||||
window.open(showImage(res.fileId, false));
|
||||
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 downSoftWord = async () => {
|
||||
try {
|
||||
setLoading(true)
|
||||
const res: any = await softwareDocumentWord(props.appOrderId)
|
||||
setLoading(false)
|
||||
|
||||
window.open(showImage(res.fileId, 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 [codeVisible, setCodeVisible] = useState(false)
|
||||
// 软件文档弹窗
|
||||
const [softVisible, setSoftVisible] = useState(false)
|
||||
// 定义允许上传的文件格式
|
||||
const ALLOWED_FILE_TYPES = ['.pdf', '.doc', '.docx', '.jpg', '.jpeg', '.png'];
|
||||
const ALLOWED_FILE_TYPES = ['.pdf'];
|
||||
const beforeUpload = (file: File) => {
|
||||
const fileExt = file.name.slice(file.name.lastIndexOf('.')).toLowerCase();
|
||||
if (!ALLOWED_FILE_TYPES.includes(fileExt)) {
|
||||
@ -15,64 +68,76 @@ export default function EditAppFiles(props: any) {
|
||||
return true;
|
||||
};
|
||||
// 处理文件点击预览
|
||||
const handlePreview = (file: any) => {
|
||||
console.log(file);
|
||||
// const handlePreview = (file: any) => {
|
||||
// console.log(file);
|
||||
|
||||
|
||||
};
|
||||
// };
|
||||
// 上传文件源码文档列表
|
||||
const [upCodeArray, setUpCodeArray] = useState<any>([])
|
||||
const [codeDis, setCodeDis] = useState(false)
|
||||
const validateCodeFileUpload = (_rule: any, value: any) => {
|
||||
if (!value || value.fileList.length === 0) {
|
||||
return Promise.reject('请选择上传文件');
|
||||
// const [codeDis, setCodeDis] = useState(false)
|
||||
const isUploading = upCodeArray.some((file: any) => file.status === 'uploading');
|
||||
const validateCodeFileUpload = () => {
|
||||
// if (!value || value.fileList.length === 0) {
|
||||
// return Promise.reject('请选择上传文件');
|
||||
|
||||
}
|
||||
const file = value.fileList[0];
|
||||
if (file.status === 'uploading') {
|
||||
setCodeDis(true)
|
||||
return Promise.reject('文件上传中,请稍候');
|
||||
} else if (file.status === 'error') {
|
||||
setCodeDis(true)
|
||||
setUpCodeArray([])
|
||||
return Promise.reject('文件上传失败,请删除后重新上传');
|
||||
// }
|
||||
// const file = value.fileList[0];
|
||||
// if (file.status === 'uploading') {
|
||||
// return Promise.reject('文件上传中,请稍候');
|
||||
// } else if (file.status === 'error') {
|
||||
// setUpCodeArray([])
|
||||
// return Promise.reject('文件上传失败,请删除后重新上传');
|
||||
|
||||
} else if (file.status !== 'done') {
|
||||
setCodeDis(true)
|
||||
setUpCodeArray([])
|
||||
// } else if (file.status !== 'done') {
|
||||
// setUpCodeArray([])
|
||||
|
||||
return Promise.reject('文件上传失败,请删除后重新上传');
|
||||
} else if (file.status === 'done') {
|
||||
setCodeDis(true)
|
||||
return Promise.resolve();
|
||||
// return Promise.reject('文件上传失败,请删除后重新上传');
|
||||
// } else if (file.status === 'done') {
|
||||
// return Promise.resolve();
|
||||
// }
|
||||
// return Promise.resolve();
|
||||
|
||||
|
||||
// 若开发方式为合作开发且未上传文件,则验证失败
|
||||
if ((upCodeArray.length === 0 || isUploading)) {
|
||||
const errorMessage = isUploading ? '文件正在上传中,请等待上传完成' : '请上传源码文档';
|
||||
return Promise.reject(new Error(errorMessage));
|
||||
}
|
||||
return Promise.resolve();
|
||||
};
|
||||
// 上传文件软件文档列表
|
||||
const [upSoftArray, setUpSoftArray] = useState<any>([])
|
||||
const [softDis, setSoftDis] = useState(false)
|
||||
const validateSoftFileUpload = (_rule: any, value: any) => {
|
||||
if (!value || value.fileList.length === 0) {
|
||||
return Promise.reject('请选择上传文件');
|
||||
const upLodaing = upSoftArray.some((file: any) => file.status === 'uploading');
|
||||
|
||||
}
|
||||
const file = value.fileList[0];
|
||||
if (file.status === 'uploading') {
|
||||
setSoftDis(true)
|
||||
return Promise.reject('文件上传中,请稍候');
|
||||
} else if (file.status === 'error') {
|
||||
setSoftDis(true)
|
||||
setUpSoftArray([])
|
||||
return Promise.reject('文件上传失败,请删除后重新上传');
|
||||
// const [softDis, setSoftDis] = useState(false)
|
||||
const validateSoftFileUpload = () => {
|
||||
// if (!value || value.fileList.length === 0) {
|
||||
// return Promise.reject('请选择上传文件');
|
||||
|
||||
} else if (file.status !== 'done') {
|
||||
setSoftDis(true)
|
||||
setUpSoftArray([])
|
||||
// }
|
||||
// const file = value.fileList[0];
|
||||
// if (file.status === 'uploading') {
|
||||
// setSoftDis(true)
|
||||
// return Promise.reject('文件上传中,请稍候');
|
||||
// } else if (file.status === 'error') {
|
||||
// setSoftDis(true)
|
||||
// setUpSoftArray([])
|
||||
// return Promise.reject('文件上传失败,请删除后重新上传');
|
||||
|
||||
return Promise.reject('文件上传失败,请删除后重新上传');
|
||||
} else if (file.status === 'done') {
|
||||
setSoftDis(true)
|
||||
return Promise.resolve();
|
||||
// } else if (file.status !== 'done') {
|
||||
// setSoftDis(true)
|
||||
// setUpSoftArray([])
|
||||
|
||||
// return Promise.reject('文件上传失败,请删除后重新上传');
|
||||
// } else if (file.status === 'done') {
|
||||
// setSoftDis(true)
|
||||
// return Promise.resolve();
|
||||
// }
|
||||
// return Promise.resolve();
|
||||
if ((upSoftArray.length === 0 || upLodaing)) {
|
||||
const errorMessage = upLodaing ? '文件正在上传中,请等待上传完成' : '请上传软件文档';
|
||||
return Promise.reject(new Error(errorMessage));
|
||||
}
|
||||
return Promise.resolve();
|
||||
};
|
||||
@ -82,158 +147,378 @@ export default function EditAppFiles(props: any) {
|
||||
const [form] = Form.useForm();
|
||||
const handleSubmit = () => {
|
||||
// console.log(form);
|
||||
props.setEditProcess(4);
|
||||
// props.setEditProcess(4);
|
||||
// 调用表单实例的 submit 方法
|
||||
form.submit();
|
||||
|
||||
};
|
||||
const submitInfo = (values: any) => {
|
||||
message.success('提交成功');
|
||||
console.log(values);
|
||||
props.setEditProcess(3);
|
||||
function deepCompareObjects(obj1: any, obj2: any): boolean {
|
||||
// 若两个值严格相等,直接返回 true
|
||||
if (obj1 === obj2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 若其中一个值为 null 或不是对象类型,返回 false
|
||||
if (typeof obj1 !== 'object' || obj1 === null || typeof obj2 !== 'object' || obj2 === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 获取两个对象的键数组
|
||||
const keys1 = Object.keys(obj1);
|
||||
const keys2 = Object.keys(obj2);
|
||||
|
||||
// 若键的数量不同,返回 false
|
||||
if (keys1.length !== keys2.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 遍历键,递归比较对应的值
|
||||
for (const key of keys1) {
|
||||
if (!keys2.includes(key) || !deepCompareObjects(obj1[key], obj2[key])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
const onFinish = (values: any) => {
|
||||
const onFinish = async (values: any) => {
|
||||
// 处理表单提交逻辑
|
||||
console.log('表单提交成功', values);
|
||||
submitInfo(values)
|
||||
console.log(upCodeArray);
|
||||
// console.log('表单提交成功', values);
|
||||
// submitInfo(values)
|
||||
// console.log(upCodeArray);
|
||||
// deepCompareObjects(values, props.filesInfo)
|
||||
// console.log(!deepCompareObjects(values, props.filesInfo));
|
||||
// return
|
||||
if (!deepCompareObjects(values, props.filesInfo)) {
|
||||
try {
|
||||
setLoading(true)
|
||||
await uploadMaterial(props.appOrderId, {
|
||||
...values
|
||||
})
|
||||
props.setFilesInfo(
|
||||
{ ...values }
|
||||
)
|
||||
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)
|
||||
}
|
||||
} else {
|
||||
props.setEditProcess(4);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
const getCodeFileDetail = async (id: string) => {
|
||||
try {
|
||||
const res: any = await fileDetail(id)
|
||||
// console.log('源码文档文件详情', res);
|
||||
setUpCodeArray([
|
||||
{
|
||||
uid: res[0].fileId,
|
||||
name: res[0].fileName,
|
||||
status: 'done',
|
||||
url: showImage(res[0].fileId, false)
|
||||
},
|
||||
|
||||
])
|
||||
} 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 getSoftFileDetail = async (id: string) => {
|
||||
try {
|
||||
const res: any = await fileDetail(id)
|
||||
setUpSoftArray([
|
||||
{
|
||||
uid: res[0].fileId,
|
||||
name: res[0].fileName,
|
||||
status: 'done',
|
||||
url: showImage(res[0].fileId, false)
|
||||
},
|
||||
|
||||
])
|
||||
} 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
useEffect(() => {
|
||||
|
||||
if (props.filesInfo.sourceCodeDocFile) {
|
||||
getCodeFileDetail(props.filesInfo.sourceCodeDocFile)
|
||||
}
|
||||
if (props.filesInfo.softwareDocFile) {
|
||||
getSoftFileDetail(props.filesInfo.softwareDocFile)
|
||||
}
|
||||
form.setFieldsValue({
|
||||
sourceCodeDocFile: props.filesInfo.sourceCodeDocFile,
|
||||
softwareDocFile: props.filesInfo.softwareDocFile,
|
||||
})
|
||||
}, [props.filesInfo])
|
||||
return (
|
||||
<div>
|
||||
<div className='bigLine'></div>
|
||||
<div className='appInfoFormBox' style={{
|
||||
height: height,
|
||||
justifyContent: 'flex-start',
|
||||
flexDirection: 'column',
|
||||
marginLeft: '100px',
|
||||
paddingBottom: '0'
|
||||
}}>
|
||||
<div style={{
|
||||
height: '80px',
|
||||
<Spin tip="加载中..." size="small" spinning={loading}>
|
||||
<div>
|
||||
{contextHolder}
|
||||
<div className='bigLine'></div>
|
||||
<div className='appInfoFormBox' style={{
|
||||
height: height,
|
||||
justifyContent: 'flex-start',
|
||||
// alignItems: 'center',
|
||||
// background: 'pink',
|
||||
flexDirection: 'column',
|
||||
marginLeft: '100px',
|
||||
paddingBottom: '0'
|
||||
}}>
|
||||
<Form form={form} onFinish={onFinish}
|
||||
onFinishFailed={(errorInfo: any) => {
|
||||
const errorMessages = errorInfo.errorFields.map((field: any) => field.errors[0]);
|
||||
if (errorMessages.some((msg: any) => msg.includes('文件上传失败'))) {
|
||||
message.error('文件上传失败,请重新上传');
|
||||
} else if (errorMessages.some((msg: any) => msg.includes('文件上传中'))) {
|
||||
message.error('文件上传中,请稍候');
|
||||
} else if (errorMessages.some((msg: any) => msg.includes('文件状态异常'))) {
|
||||
message.error('文件状态异常,请重新上传');
|
||||
} else {
|
||||
message.error('请完善信息');
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
width: '600px',
|
||||
// background: 'pink'
|
||||
}}>
|
||||
<div>
|
||||
<div className='appInfoFormInput' style={{
|
||||
<div style={{
|
||||
height: '80px',
|
||||
}}>
|
||||
<Form form={form} onFinish={onFinish}
|
||||
onFinishFailed={(errorInfo: any) => {
|
||||
const errorMessages = errorInfo.errorFields.map((field: any) => field.errors[0]);
|
||||
if (errorMessages.some((msg: any) => msg.includes('文件上传失败'))) {
|
||||
message.error('文件上传失败,请重新上传');
|
||||
} else if (errorMessages.some((msg: any) => msg.includes('文件上传中'))) {
|
||||
message.error('文件上传中,请稍候');
|
||||
} else if (errorMessages.some((msg: any) => msg.includes('文件状态异常'))) {
|
||||
message.error('文件状态异常,请重新上传');
|
||||
} else {
|
||||
message.error('请完善信息');
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
width: '600px',
|
||||
// background: 'pink'
|
||||
}}>
|
||||
<div style={{
|
||||
// background:'pink',
|
||||
position: 'relative',
|
||||
// width: '260px',
|
||||
height: '90px',
|
||||
lineHeight: '40px',
|
||||
}}>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>源码文档<span style={{ color: 'red', }}>*</span>:</div>
|
||||
<div style={{
|
||||
width: '220px',
|
||||
<div className='appInfoFormInput' style={{
|
||||
position: 'relative',
|
||||
}}>
|
||||
<Form.Item name="ym" label="" rules={[
|
||||
// { required: true, message: '请选上传文件' },
|
||||
{ validator: validateCodeFileUpload }
|
||||
]}>
|
||||
<Upload
|
||||
name="file"
|
||||
action={uploadFileUrl()}
|
||||
defaultFileList={upCodeArray}
|
||||
onChange={({ fileList }) => {
|
||||
console.log(fileList);
|
||||
// console.log(upCodeArray);
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>源码文档<span style={{ color: 'red', }}>*</span>:</div>
|
||||
<div style={{
|
||||
width: '220px',
|
||||
}}>
|
||||
<Form.Item name="sourceCodeDocFile" label="" rules={[
|
||||
// { required: true, message: '请选上传文件' },
|
||||
{ validator: validateCodeFileUpload }
|
||||
]}>
|
||||
<Upload
|
||||
name="file"
|
||||
action={uploadFileUrl()}
|
||||
fileList={upCodeArray}
|
||||
onChange={(info) => {
|
||||
const { fileList } = info;
|
||||
setUpCodeArray(fileList);
|
||||
if (info.file.status === 'uploading') {
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
// console.log(info.file.response.data);
|
||||
setUpCodeArray([
|
||||
{
|
||||
uid: info.file.response.data.fileId,
|
||||
name: info.file.response.data.fileName,
|
||||
status: 'done',
|
||||
url: showImage(info.file.response.data.fileId, false)
|
||||
}
|
||||
])
|
||||
|
||||
}}
|
||||
onRemove={() => {
|
||||
setUpCodeArray([])
|
||||
setCodeDis(false)
|
||||
}}
|
||||
beforeUpload={beforeUpload}
|
||||
onPreview={handlePreview}
|
||||
// onChange={handleUploadChange}
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
>
|
||||
<Button icon={<UploadOutlined />} style={{
|
||||
marginTop: '4px'
|
||||
}}
|
||||
disabled={codeDis}
|
||||
>上传附件</Button>
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
form.setFieldsValue({
|
||||
sourceCodeDocFile: info.file.response.data.fileId,
|
||||
});
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
// 显示错误提示
|
||||
message.error(`上传失败`);
|
||||
form.setFieldsValue({
|
||||
sourceCodeDocFile: '', // 清除表单值
|
||||
});
|
||||
}
|
||||
// console.log(upCodeArray);
|
||||
|
||||
}}
|
||||
onRemove={() => {
|
||||
setUpCodeArray([])
|
||||
form.setFieldsValue({
|
||||
sourceCodeDocFile: '', // 清除表单值
|
||||
});
|
||||
}}
|
||||
beforeUpload={beforeUpload}
|
||||
// onPreview={handlePreview}
|
||||
// onChange={handleUploadChange}
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
>
|
||||
<Button icon={<UploadOutlined />} style={{
|
||||
marginTop: '4px'
|
||||
}}
|
||||
disabled={upCodeArray.length > 0}
|
||||
>上传附件</Button>
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
</div>
|
||||
<a style={{
|
||||
position: 'absolute',
|
||||
// top: '10px',
|
||||
left: '260px',
|
||||
textWrap: 'nowrap'
|
||||
}}
|
||||
onClick={
|
||||
downCodeWord
|
||||
}
|
||||
>[ 下载 ]</a>
|
||||
</div>
|
||||
<a style={{
|
||||
marginLeft: 58,
|
||||
display: 'block',
|
||||
position: 'absolute',
|
||||
top: '10px',
|
||||
left: '260px',
|
||||
textWrap: 'nowrap'
|
||||
}}>[ 下载 ]</a>
|
||||
// background:'red',
|
||||
top: '80px',
|
||||
}}
|
||||
onClick={() => {
|
||||
setCodeVisible(true)
|
||||
}}
|
||||
>《应用软件源程序提交注意事项及相关规范》</a>
|
||||
</div>
|
||||
<a>源码文档说明</a>
|
||||
</div>
|
||||
<div>
|
||||
<div className='appInfoFormInput' style={{
|
||||
<div style={{
|
||||
// background:'pink',
|
||||
position: 'relative',
|
||||
// width: '260px',
|
||||
height: '90px',
|
||||
lineHeight: '40px',
|
||||
}}>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>软件文档<span style={{ color: 'red', }}>*</span>:</div>
|
||||
<div style={{
|
||||
width: '220px',
|
||||
<div className='appInfoFormInput' style={{
|
||||
position: 'relative',
|
||||
}}>
|
||||
<Form.Item name="file" label="" rules={[
|
||||
// { required: true, message: '请上传文件' },
|
||||
{ validator: validateSoftFileUpload }
|
||||
]}>
|
||||
<Upload
|
||||
name="file"
|
||||
action={uploadFileUrl()}
|
||||
defaultFileList={upSoftArray}
|
||||
onChange={({ fileList }) => {
|
||||
console.log(fileList);
|
||||
}}
|
||||
onRemove={() => {
|
||||
setUpSoftArray([])
|
||||
setSoftDis(false)
|
||||
}}
|
||||
beforeUpload={beforeUpload}
|
||||
// onChange={handleUploadChange}
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
>
|
||||
<Button icon={<UploadOutlined />} style={{
|
||||
marginTop: '4px'
|
||||
}}
|
||||
disabled={softDis}
|
||||
>上传附件</Button>
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
<div className='FormInputTitle' style={{
|
||||
}}>软件文档<span style={{ color: 'red', }}>*</span>:</div>
|
||||
<div style={{
|
||||
width: '220px',
|
||||
}}>
|
||||
<Form.Item name="softwareDocFile" label="" rules={[
|
||||
// { required: true, message: '请上传文件' },
|
||||
{ validator: validateSoftFileUpload }
|
||||
]}>
|
||||
<Upload
|
||||
name="file"
|
||||
action={uploadFileUrl()}
|
||||
fileList={upSoftArray}
|
||||
onChange={(info) => {
|
||||
const { fileList } = info;
|
||||
setUpSoftArray(fileList);
|
||||
if (info.file.status === 'uploading') {
|
||||
return;
|
||||
}
|
||||
if (info.file.status === 'done') {
|
||||
// console.log(info.file.response.data);
|
||||
setUpSoftArray([
|
||||
{
|
||||
uid: info.file.response.data.fileId,
|
||||
name: info.file.response.data.fileName,
|
||||
status: 'done',
|
||||
url: showImage(info.file.response.data.fileId, false)
|
||||
}
|
||||
])
|
||||
|
||||
form.setFieldsValue({
|
||||
softwareDocFile: info.file.response.data.fileId,
|
||||
});
|
||||
}
|
||||
if (info.file.status === 'error') {
|
||||
// 显示错误提示
|
||||
message.error(`上传失败`);
|
||||
form.setFieldsValue({
|
||||
softwareDocFile: '', // 清除表单值
|
||||
});
|
||||
}
|
||||
|
||||
}}
|
||||
onRemove={() => {
|
||||
setUpSoftArray([])
|
||||
form.setFieldsValue({
|
||||
softwareDocFile: '', // 清除表单值
|
||||
});
|
||||
// setSoftDis(false)
|
||||
}}
|
||||
beforeUpload={beforeUpload}
|
||||
// onChange={handleUploadChange}
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
>
|
||||
<Button icon={<UploadOutlined />} style={{
|
||||
marginTop: '4px'
|
||||
}}
|
||||
disabled={upSoftArray.length > 0}
|
||||
>上传附件</Button>
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
</div>
|
||||
<a style={{
|
||||
position: 'absolute',
|
||||
// top: '10px',
|
||||
left: '260px',
|
||||
textWrap: 'nowrap'
|
||||
}}
|
||||
onClick={downSoftWord}
|
||||
>[ 下载 ]</a>
|
||||
</div>
|
||||
<a style={{
|
||||
marginLeft: 58,
|
||||
display: 'block',
|
||||
position: 'absolute',
|
||||
top: '10px',
|
||||
left: '260px',
|
||||
textWrap: 'nowrap'
|
||||
}}>[ 下载 ]</a>
|
||||
// background:'red',
|
||||
top: '80px',
|
||||
}}
|
||||
onClick={() => {
|
||||
setSoftVisible(true)
|
||||
}}
|
||||
>《应用软件文档提交注意事项及相关规范》</a>
|
||||
</div>
|
||||
<a>软件文档说明</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</Form>
|
||||
</div>
|
||||
{/* <div className="fileTextBox">
|
||||
</Form>
|
||||
</div>
|
||||
{/* <div className="fileTextBox">
|
||||
{Array.from({ length: 100 }).map((_, index) => (
|
||||
<span style={{
|
||||
lineHeight: '30px',
|
||||
@ -246,32 +531,168 @@ export default function EditAppFiles(props: any) {
|
||||
))}
|
||||
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='bigLine'></div>
|
||||
<div className='nextBtnBxo'>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
}}
|
||||
onClick={() => {
|
||||
props.setEditProcess(2)
|
||||
}}>上一步</Button>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
marginLeft: '10px',
|
||||
}}
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
handleSubmit()
|
||||
}}>下一步</Button>
|
||||
<div className='bigLine'></div>
|
||||
<div className='nextBtnBxo'>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
}}
|
||||
onClick={() => {
|
||||
props.setEditProcess(2)
|
||||
}}>上一步</Button>
|
||||
<Button
|
||||
style={{
|
||||
width: '235px',
|
||||
height: '46px',
|
||||
borderRadius: '5px',
|
||||
marginLeft: '10px',
|
||||
}}
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
handleSubmit()
|
||||
}}>下一步</Button>
|
||||
|
||||
</div>
|
||||
<Modal title="应用软件源程序提交注意事项及相关规范"
|
||||
centered
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
open={codeVisible}
|
||||
width={1000}
|
||||
onCancel={() => {
|
||||
setCodeVisible(false)
|
||||
|
||||
}}>
|
||||
|
||||
<div style={{
|
||||
lineHeight: '30px',
|
||||
fontSize: '16px'
|
||||
}}>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
源码文档需提交PDF格式的文件,软件源程序代码由前、后各连续30页组成。软件源程序多于60页的需要提交连续的前30及后30页,前30页和后30页应是各自连续的。
|
||||
</div>
|
||||
<div>
|
||||
1、源程序的第1页应当是程序或一个功能模块的开头,源程序的第60页应当是程序或一个功能模块的结尾,不满60页的需全部提供;
|
||||
</div>
|
||||
<div>
|
||||
2、源程序每页应该≥50行,并标明页码;
|
||||
</div>
|
||||
<div>
|
||||
3、编写源程序的语言应和申请表填写的语言保持一致;
|
||||
</div>
|
||||
<div>
|
||||
4、源程序应和文档中介绍的主要功能存在关联性;
|
||||
</div>
|
||||
<div>
|
||||
5、源程序编写内容中出现的署名或版权声明以及任何与权利归属有关的内容,著作权人名称应与申请的著作权人保持一致;
|
||||
</div>
|
||||
<div>
|
||||
6、源程序中出现著作权人成立之前的创建或修改时间的,申请人应该确认是否存在前期开发行为,如有,需提交《前期开发说明》;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
7、源程序中尽量不要出现软件开发完成之后的日期;(出现软件完成日期之后的创建或修改时间的,如果只是纠错性的修改、适应性的调整,不造成软件的功能或性能发生重大变化而发生软件版本升级的,是正常合理的。)
|
||||
</div>
|
||||
<div>
|
||||
8、源程序中出现他人的自由软件/开源软件的版权声明或相关许可证(License)信息的,且申请人认可源代码中含有他人的自由软件/开源软件源代码的情况,申请人需要提供相关的书面说明;
|
||||
</div>
|
||||
<div>
|
||||
9、源程序如果有页眉,页面的软件名称、版本号与申请信息及其他申请材料中的软件名称、版本号应当一致;
|
||||
</div>
|
||||
<div>
|
||||
10、源程序中的软件名称应与申请信息中的软件全称或简称一致,版本号也应该保持一致;
|
||||
</div>
|
||||
<div>
|
||||
11、源程序如果有文件名,应和申请的软件名称或权利人保持一致,文件名可不填。
|
||||
</div>
|
||||
<div>
|
||||
12、源程序中不能含有危害国家安全、低俗、情色等非法内容。
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal title="应用软件文档提交注意事项及相关规范"
|
||||
centered
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
open={softVisible}
|
||||
width={1000}
|
||||
onCancel={() => {
|
||||
setSoftVisible(false)
|
||||
|
||||
}}>
|
||||
|
||||
<div style={{
|
||||
lineHeight: '30px',
|
||||
fontSize: '16px'
|
||||
}}>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
文档指软件的使用说明书或者设计说明书(选择其一提交),需提交PDF格式。一般应提交10-60页,整个文档不到60页的应提交全部,超过60页时,提交前、后各连续的30页,文档应图文并茂,语句通顺,每页应≥30行(有图除外)。
|
||||
</div>
|
||||
<div>
|
||||
1、软件使用说明书主要内容要求:从打开软件起开始截取软件的主要功能界面图,截图应带有主界面,不可截部分图,依次为主界面展示、界面的跳转,主要功能模块依次介绍,主要功能都应介绍。截图应截取完整的软件界面,且图片清晰可辨,需有详细的文字介绍,介绍其主要功能如何使用,上一个界面是通过什么操作跳转至下一个界面的;
|
||||
</div>
|
||||
<div>
|
||||
2、软件设计说明书主要内容要求:应包含软件的基本处理流程、程序系统的组织结构、功能模块划分、接口和数据结构设计等主要设计内容;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
3、文档应和源程序存在一定的关联性;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
4、文档中截图不能含有他人的商标,如使用他人商标,应提交《商标使用授权书》;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
5、截图界面需和申请表中填写的硬件环境、软件环境相匹配;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
6、文档中不能出现重复截图;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
7、文档页眉(如果有)的软件名称、版本号与申请表单及其他申请材料中的软件名称、版本号应当一致;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
8、文档内容(包括文字、截图等)中的软件名称应与申请表单中的软件全称或简称一致,版本号也应该保持一致;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
9、文档中出现的署名或版权声明以及任何与权利归属有关的内容,著作权人名称应与申请表单中一致;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
10、文档应标明页码;
|
||||
</div>
|
||||
<div>
|
||||
11、文档的文件名应和申请的软件名称或权利人保持一致,文件名可不填;
|
||||
|
||||
</div>
|
||||
<div>
|
||||
12、文档中不能含有危害国家安全、低俗、情色等非法内容。
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</Spin>
|
||||
|
||||
)
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
482
src/route/AppElectron/components/File/File.tsx
Normal file
482
src/route/AppElectron/components/File/File.tsx
Normal file
@ -0,0 +1,482 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Table, Space, Modal, Input, Form, Upload, Button } from "antd"
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
import { sellSupplementList, buySupplementList, supplementDetail, getFileTypeByIds, supplementAppData } from '../../../../request/api'
|
||||
import { showImage, uploadFileUrl } from '../../../../request/request'
|
||||
const { Column } = Table;
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
// import './File.css'
|
||||
const { TextArea } = Input;
|
||||
export default function File(props: any) {
|
||||
const [upFileArray, setUpFileArray] = useState<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)) {
|
||||
callback();
|
||||
} else {
|
||||
callback('内容和附件至少需要填写或上传一项');
|
||||
}
|
||||
};
|
||||
// 点击上传资料确定
|
||||
const submitData = async (params: any) => {
|
||||
try {
|
||||
await supplementAppData({
|
||||
correctionParentId: correctionId,
|
||||
// correctionType: CorrectionType,
|
||||
orderId: props.orderId,
|
||||
correctionFiles: params.correctionFiles,
|
||||
correctionRemark: params.correctionRemark,
|
||||
})
|
||||
if (props.user == 'sell') {
|
||||
getSellSupplementList()
|
||||
} else if (props.user == 'buy') {
|
||||
getBuySupplementList()
|
||||
}
|
||||
props.upData()
|
||||
messageApi.open({
|
||||
type: 'success',
|
||||
content: '已提交',
|
||||
})
|
||||
setIsModalVisible(false)
|
||||
// form.resetFields();
|
||||
|
||||
// console.log(res);
|
||||
|
||||
} 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 token = sessionStorage.getItem('token')
|
||||
const [form] = Form.useForm();
|
||||
const [messageApi, messageContext] = useMessage();
|
||||
const [correctionId, setCorrectionId] = useState('') // 点击查看内容选中的id
|
||||
// const [CorrectionType, setCorrectionType] = useState('')
|
||||
// 补充资料弹窗
|
||||
const [isModalVisible, setIsModalVisible] = useState(false)
|
||||
const [page, setPage] = useState(1) // 当前页码
|
||||
const [total, setTotal] = useState(0) // 总条数
|
||||
const [data, setData] = useState([])
|
||||
const getSellSupplementList = async () => {
|
||||
try {
|
||||
const res: any = await sellSupplementList({
|
||||
orderId: props.orderId,
|
||||
page: page,
|
||||
rows: 10
|
||||
})
|
||||
setPage(res.page)
|
||||
setTotal(res.total)
|
||||
console.log(res);
|
||||
setData(res.rows)
|
||||
// let newData:any = [];
|
||||
// for (let i = 0; i < 10; i++) {
|
||||
// newData = newData.concat(res.rows);
|
||||
// }
|
||||
// setData(newData);
|
||||
|
||||
} 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 getBuySupplementList = async () => {
|
||||
try {
|
||||
const res: any = await buySupplementList({
|
||||
orderId: props.orderId,
|
||||
page: page,
|
||||
rows: 10
|
||||
})
|
||||
setPage(res.page)
|
||||
setTotal(res.total)
|
||||
// console.log(res);
|
||||
setData(res.rows)
|
||||
} 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 [fileList, setFileList] = useState<any>([]) // 上传文件列表
|
||||
// 获取文件类型
|
||||
const getFileTypeByIdsArray = async (ids: string) => {
|
||||
try {
|
||||
const res: any = await getFileTypeByIds({
|
||||
ids: ids
|
||||
})
|
||||
setFileList(res)
|
||||
|
||||
} 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 getSupplementDetail = async (id: string) => {
|
||||
try {
|
||||
const res: any = await supplementDetail(id)
|
||||
// console.log(res);
|
||||
setDetailData(res)
|
||||
await getFileTypeByIdsArray(res.correctionFiles)
|
||||
|
||||
} 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
useEffect(() => {
|
||||
if (props.user == 'sell') {
|
||||
getSellSupplementList()
|
||||
} else if (props.user == 'buy') {
|
||||
getBuySupplementList()
|
||||
}
|
||||
}, [page])
|
||||
return (
|
||||
<div>
|
||||
{messageContext}
|
||||
<Table
|
||||
// scroll={{ y: `${height - 190}px` }}
|
||||
dataSource={data}
|
||||
// pagination={{
|
||||
// defaultPageSize: 5, // 设置默认一页显示 5 条数据
|
||||
// }}
|
||||
scroll={{ y: 480 }}
|
||||
pagination={
|
||||
{
|
||||
pageSize: 10,
|
||||
total: total,
|
||||
onChange: (currentPage) => {
|
||||
setPage(currentPage);
|
||||
},
|
||||
showSizeChanger: false,
|
||||
current: page
|
||||
|
||||
}
|
||||
}
|
||||
// pagination={false} // 不显示分页
|
||||
style={{ textAlign: 'center' }} // 设置表格内容居中显示
|
||||
rowKey="correctionId" // 指定数据项的唯一标识符
|
||||
>
|
||||
<Column
|
||||
width={70}
|
||||
title="序号" render={(_text, _record, index: number) => (
|
||||
index + 1
|
||||
)} align="center" />
|
||||
<Column
|
||||
title="资料主题"
|
||||
dataIndex="correctionTitle"
|
||||
align="center"
|
||||
width={200}
|
||||
render={(text) => (
|
||||
<div style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }} title={text}>{text}</div>
|
||||
)}
|
||||
// render={(text) => (
|
||||
// <span style={{ color: '#1B8BD2', fontSize: '16px', fontWeight: '700' }}>{text}</span>
|
||||
// )}
|
||||
/>
|
||||
<Column
|
||||
title="资料内容"
|
||||
dataIndex="correctionRemark"
|
||||
align="center"
|
||||
width={300}
|
||||
render={(text) => (
|
||||
<div style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }} title={text}>{text}</div>
|
||||
)}
|
||||
/>
|
||||
<Column
|
||||
title="发起时间"
|
||||
width={200}
|
||||
dataIndex="createTime"
|
||||
align="center"
|
||||
// ellipsis
|
||||
/>
|
||||
<Column
|
||||
title="状态"
|
||||
dataIndex={props.user == 'sell' ? "sellId" : "buyId"}
|
||||
align="center"
|
||||
width={100}
|
||||
render={(text) => (
|
||||
<>
|
||||
<span style={{ color: '#DD0000', fontSize: '16px', fontWeight: '700', display: text == '' ? 'unset' : 'none' }}>待补充</span>
|
||||
<span style={{ color: 'green', fontSize: '16px', fontWeight: '700', display: text == '' ? 'none' : 'unset' }}>已补充</span>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
||||
<Column
|
||||
align="center"
|
||||
title="操作"
|
||||
width={100}
|
||||
render={(_text, record: any) => (
|
||||
<Space size="middle">
|
||||
<span className='transaction-order-table-btn' onClick={() => {
|
||||
// console.log(record.correctionId);
|
||||
setCorrectionId(record.correctionId)
|
||||
getSupplementDetail(record.correctionId)
|
||||
setIsModalVisible(true)
|
||||
// 清空表单
|
||||
form.resetFields();
|
||||
// setCorrectionType(record.correctionType)
|
||||
}}>查看内容</span>
|
||||
|
||||
</Space>
|
||||
)}
|
||||
/>
|
||||
</Table>
|
||||
<Modal title={'补充'}
|
||||
destroyOnClose={true}
|
||||
open={isModalVisible}
|
||||
footer={null} // 将 footer 设置为 null 来隐藏自带按钮
|
||||
width={1000}
|
||||
onCancel={() => {
|
||||
setIsModalVisible(false);
|
||||
// 清空表单
|
||||
form.resetFields();
|
||||
}}
|
||||
centered
|
||||
>
|
||||
<div>
|
||||
{/* {correctionId}
|
||||
{CorrectionType} */}
|
||||
<div className='editModal-title'>
|
||||
<div className='editModal-title-box'></div>
|
||||
<div className='editModal-title-name'>平台需要您补充的内容说明</div>
|
||||
</div>
|
||||
<div className='correctionTitleBox'>
|
||||
<div className='correctionTitle'>主题</div>
|
||||
<Input value={detailData.correctionTitle} style={{
|
||||
height: 40,
|
||||
color: 'black'
|
||||
}}
|
||||
disabled
|
||||
></Input>
|
||||
</div>
|
||||
<div className='correctionRemarkBox'>
|
||||
<div className='correctionTitle'>内容</div>
|
||||
<TextArea value={detailData.correctionRemark} style={{
|
||||
height: 100,
|
||||
color: 'black',
|
||||
resize: 'none'
|
||||
}}
|
||||
disabled
|
||||
></TextArea>
|
||||
</div>
|
||||
<div className='upFileBox'>
|
||||
<div className='correctionTitle'>附件</div>
|
||||
{fileList.length > 0 ? (
|
||||
// <div>材料列表</div>
|
||||
<div>
|
||||
{
|
||||
fileList.map((item: any) => {
|
||||
return (
|
||||
<div
|
||||
key={item.fileId}
|
||||
style={{
|
||||
// background: 'pink',
|
||||
marginBottom: 5,
|
||||
maxWidth: 800,
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
cursor: 'pointer',
|
||||
color: '#1B8BD2',
|
||||
//下划线
|
||||
textDecoration: 'underline',
|
||||
}}
|
||||
title={item.fileName}
|
||||
onClick={() => {
|
||||
|
||||
window.open(showImage(item.fileId, false))
|
||||
|
||||
}}
|
||||
>
|
||||
{item.fileName}
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
|
||||
) : (
|
||||
<div style={{ fontSize: 18, fontWeight: 700 }}>
|
||||
无
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className='editModal-title' style={{ marginTop: 30 }}>
|
||||
<div className='editModal-title-box'></div>
|
||||
<div className='editModal-title-name'>在下面填写您补充的内容</div>
|
||||
</div>
|
||||
<Form
|
||||
name="basic"
|
||||
form={form}
|
||||
layout="vertical"
|
||||
|
||||
onFinish={(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(',');
|
||||
// console.log('提取的 uid 字符串:', uidString);
|
||||
// // 你可以在这里继续处理 uid 字符串,比如发送请求等
|
||||
|
||||
// }
|
||||
// const uids = value.upFile ? (value.upFile.fileList.map((file: any) => file.uid)).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={() => {
|
||||
messageApi.open({
|
||||
type: 'error',
|
||||
content: '内容和附件至少需要填写或上传一项',
|
||||
})
|
||||
}}
|
||||
autoComplete="off"
|
||||
>
|
||||
<div className='correctionRemarkBox'>
|
||||
<div className='correctionTitle'>内容</div>
|
||||
<Form.Item
|
||||
|
||||
name="upCorrectionRemark"
|
||||
rules={[
|
||||
// { required: true, message: '请输入需要补充内容' },
|
||||
{
|
||||
validator: (rule, value, callback) => validateContentOrFile(rule, value, callback, form),
|
||||
},
|
||||
|
||||
]}
|
||||
>
|
||||
<TextArea style={{
|
||||
height: 100,
|
||||
resize: 'none',
|
||||
width: 900,
|
||||
|
||||
}}
|
||||
placeholder='请输入需要补充内容'
|
||||
></TextArea>
|
||||
</Form.Item>
|
||||
|
||||
</div>
|
||||
<div className='correctionRemarkBox' style={{
|
||||
marginTop: 0
|
||||
}}>
|
||||
<div className='correctionTitle'>附件</div>
|
||||
<div style={{
|
||||
maxWidth: 800,
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
}}>
|
||||
<Form.Item
|
||||
|
||||
name="upFile"
|
||||
rules={[
|
||||
// { required: true, message: '请上传附件' },
|
||||
{
|
||||
validator: (rule, value, callback) => validateContentOrFile(rule, value, callback, form),
|
||||
},
|
||||
]}
|
||||
>
|
||||
|
||||
<Upload
|
||||
name="file"
|
||||
action={uploadFileUrl()}
|
||||
defaultFileList={upFileArray}
|
||||
onChange={(info) => {
|
||||
setUpFileArray(info.fileList)
|
||||
// console.log(info.fileList);
|
||||
|
||||
}}
|
||||
|
||||
headers={{ 'Auth': `Bearer ${token}` }}
|
||||
|
||||
>
|
||||
<Button icon={<UploadOutlined />}>上传附件</Button>
|
||||
</Upload>
|
||||
|
||||
|
||||
</Form.Item>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<Form.Item
|
||||
|
||||
>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
gap: 10,
|
||||
// marginTop: 20
|
||||
}}>
|
||||
<Button onClick={() => {
|
||||
setIsModalVisible(false)
|
||||
form.resetFields();
|
||||
}}>取消</Button>
|
||||
<Button type="primary" htmlType="submit" >确定</Button>
|
||||
</div>
|
||||
</Form.Item>
|
||||
|
||||
|
||||
</Form>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
@ -125,7 +125,8 @@ export default function CONTRACT() {
|
||||
<div style={{
|
||||
height: height - 60,
|
||||
background: 'white',
|
||||
overflow: 'auto', marginTop: 18, marginBottom: -10
|
||||
overflow: 'auto', marginTop: 18,
|
||||
marginBottom: -10
|
||||
}}>
|
||||
{/* 表格 */}
|
||||
<div style={{ display: contractArray.length > 0 ? 'block' : 'none', padding: 10 }}>
|
||||
|
645
src/route/Replace/Replace.tsx
Normal file
645
src/route/Replace/Replace.tsx
Normal file
@ -0,0 +1,645 @@
|
||||
// import './Correction.css';
|
||||
import { useState, useEffect, } from 'react';
|
||||
import {
|
||||
// Table,
|
||||
Pagination,
|
||||
Modal,
|
||||
// Tag,
|
||||
message, Spin,
|
||||
Empty,
|
||||
Dropdown,
|
||||
// Button
|
||||
} from 'antd';
|
||||
// import {
|
||||
// // MenuFoldOutlined,
|
||||
// ClearOutlined
|
||||
// } from '@ant-design/icons';
|
||||
import { useSelector, useDispatch } from 'react-redux'
|
||||
import {
|
||||
get,
|
||||
put,
|
||||
downloadUrl,
|
||||
// Axios,
|
||||
// post
|
||||
} from '../../util/AjaxUtils'
|
||||
// import type { TableProps } from 'antd';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
// import { getMenuActive } from '../../util/cache'
|
||||
// import { useNavigate } from "react-router-dom";
|
||||
// interface DataType {
|
||||
// projName: string;
|
||||
// type: string; //类型
|
||||
// correctionType: string; //补正种类
|
||||
// correctionReason: string;
|
||||
// gmtCreate: string; //补正时间
|
||||
// gmtReview: string;//审核时间
|
||||
// reviewReason: string;//审核意见
|
||||
// projId: string;
|
||||
// applyStatus: string;//审核状态
|
||||
// correctionVoucherFileKVs: any //补正凭证
|
||||
// projCorrectionApplyId: string
|
||||
// authorName: string;
|
||||
// }
|
||||
import revokeImg from '../../static/revoke.png'
|
||||
// import { useLocation } from 'react-router-dom'
|
||||
import logoImg from '../../static/projBox/logo.png'
|
||||
import reason from '../../static/projBox/reson.png'
|
||||
import green from '../../static/projBox/green.png'
|
||||
import red from '../../static/projBox/red.png'
|
||||
import blue from '../../static/projBox/blue.png'
|
||||
import black from '../../static/projBox/black.png'
|
||||
import numbg from '@theme/img/projBox/num.png'
|
||||
import titleBg from '@theme/img/projBox/background.png'
|
||||
import timeImg from '@theme/img/projBox/timeback.png'
|
||||
import { useNavigate } from "react-router-dom";
|
||||
export default function Replcae() {
|
||||
// 标签变量
|
||||
const nav = useNavigate();
|
||||
const height = window.innerHeight - 180;
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
const { state } = useLocation()
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
|
||||
const [revokeModal, setRevokeModal] = useState(false) //撤销弹窗
|
||||
|
||||
const keyWords = state ? state.keywords : ''
|
||||
const applyStatus = state ? state.applyStatus : ''
|
||||
const tagCor = state ? state.tagCor : ''
|
||||
const authorId = state ? state.authorId : ''
|
||||
const correctionNumType = state ? state.correctionNumType : ''
|
||||
const correctionType = state ? state.correctionType : ''
|
||||
|
||||
const [page, setPage] = useState(1) // 分页
|
||||
|
||||
|
||||
const dispath = useDispatch()
|
||||
const redxuState: any = useSelector(state => state)
|
||||
const replaceArray = redxuState.replaceArray
|
||||
// const [tagIdArray,setTagIdArray] = useState([])
|
||||
const total = redxuState.replaceTotal
|
||||
const newReplace = redxuState.newReplace
|
||||
const [projRenameApplyId, setprojRenameApplyId] = useState('') //要撤销的id
|
||||
|
||||
// const [tagCorArray, setTagCorArray] = useState([])
|
||||
// 获取补正标签
|
||||
// const getCorTag = () => {
|
||||
// get({
|
||||
// messageApi,
|
||||
// url: `/api/proj/correction/apply/tag/list-tag`,
|
||||
// onBefore() {
|
||||
|
||||
// },
|
||||
// onSuccess(data: any) {
|
||||
// // console.log('标签信息', data);
|
||||
// const newarrty: any = (data.data).map((item: any) => ({
|
||||
// value: item.key,
|
||||
// label: item.value
|
||||
// }));
|
||||
// // console.log('标签信息', newarrty);
|
||||
|
||||
// setTagCorArray(newarrty)
|
||||
|
||||
// },
|
||||
// onFinally() {
|
||||
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
const getData = (page: number) => {
|
||||
const [part1, part2] = tagCor ? tagCor.split(':') : ['', ''];
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj/rename/apply/listpage/self`,
|
||||
// url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`,
|
||||
config: {
|
||||
params: {
|
||||
page: page,
|
||||
rows: 20,
|
||||
projName: keyWords,
|
||||
applyStatus: applyStatus,
|
||||
// type: correctionNumType,
|
||||
// correctionType: correctionType,
|
||||
authorId: authorId,
|
||||
tagDataId: part1,
|
||||
tagNot: part2 == 'TAG_NOT' ? true : '',
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true)
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
// console.log('呵呵', data.data.rows);
|
||||
// setData(data.data.rows)
|
||||
// console.log(data.data.rows);
|
||||
|
||||
dispath({
|
||||
type: 'upReplaceArray',
|
||||
val: data.data.rows
|
||||
})
|
||||
dispath({
|
||||
type: 'upReplaceTotal',
|
||||
val: data.data.total
|
||||
})
|
||||
// setTotal(data.data.total)
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false)
|
||||
},
|
||||
})
|
||||
}
|
||||
// // 更新标签状态
|
||||
// const upTag = (dataId: string, projCorrectionApplyId: string, projId: string) => {
|
||||
// post<any>({
|
||||
// messageApi,
|
||||
// url: `/api/proj/correction/apply/tag/save-or-delete`,
|
||||
// body: {
|
||||
// dataId,
|
||||
// projCorrectionApplyId,
|
||||
// projId
|
||||
// },
|
||||
// onBefore() {
|
||||
|
||||
// },
|
||||
// onSuccess(data) {
|
||||
// // console.log(data.data.data);
|
||||
// // props.upData
|
||||
// // props.updata()
|
||||
// // setTagStatus(data.data.data)
|
||||
// // 根据返回的状态更新 tagIdArray
|
||||
// if (data.data.data === 'SAVE') {
|
||||
// // setTagIdArray((prevArray: any) => [...prevArray, dataId]);
|
||||
// } else if (data.data.data === 'DELETE') {
|
||||
// // setTagIdArray((prevArray: any[]) => prevArray.filter(id => id !== dataId));
|
||||
// }
|
||||
|
||||
// },
|
||||
// onFinally() {
|
||||
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// 撤销补正
|
||||
const projRefund = () => {
|
||||
put<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/rename/apply/cancel/self/${projRenameApplyId}`,
|
||||
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
setRevokeModal(false)
|
||||
messageApi.success('已撤销');
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj/rename/apply/listpage/self`,
|
||||
// url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`,
|
||||
config: {
|
||||
params: {
|
||||
page: page,
|
||||
rows: 20,
|
||||
projName: keyWords,
|
||||
applyStatus: applyStatus,
|
||||
// type: correctionNumType,
|
||||
// correctionType: correctionType,
|
||||
authorId: authorId
|
||||
}
|
||||
},
|
||||
onSuccess(data: any) {
|
||||
// console.log(data.data.rows);
|
||||
// setData(data.data.rows)
|
||||
|
||||
// setTotal(data.data.total)
|
||||
if (data.data.rows.length == 0 && page > 1) {
|
||||
getData(page - 1)
|
||||
} else {
|
||||
dispath({
|
||||
type: 'upReplaceArray',
|
||||
val: data.data.rows
|
||||
})
|
||||
dispath({
|
||||
type: 'upReplaceTotal',
|
||||
val: data.data.total
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onFinally() {
|
||||
// setIsProjIntroductionLoading(false)
|
||||
// renderData()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
// getData(1)
|
||||
|
||||
getData(1)
|
||||
setPage(1)
|
||||
// console.log(tagCor);
|
||||
// console.log('嘻嘻',correctionArray);
|
||||
|
||||
|
||||
}, [keyWords, applyStatus, authorId, correctionNumType, correctionType, tagCor])
|
||||
useEffect(() => {
|
||||
// 获取id为refun的元素
|
||||
const refun: any = document.getElementById('refun');
|
||||
// 当更换页码时候滚动到最上面
|
||||
refun.scrollTop = 0;
|
||||
|
||||
}, [replaceArray])
|
||||
useEffect(() => {
|
||||
// getData(1)
|
||||
if (newReplace) {
|
||||
setPage(1)
|
||||
getData(1)
|
||||
dispath({
|
||||
type: 'newCorrection',
|
||||
val: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}, [newReplace])
|
||||
useEffect(() => {
|
||||
// getCorTag()
|
||||
// dispath({
|
||||
// type: 'upCorrectionArray',
|
||||
// val: updatedArray
|
||||
// });
|
||||
// getData(1)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div>
|
||||
{contextHolder}
|
||||
<div className='refun' id='refun' style={{ height: `${height - 60}px`, overflow: 'auto' }}>
|
||||
<Spin tip="加载中..." spinning={isLoading}>
|
||||
{replaceArray.length == 0 ?
|
||||
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', width: '100%', height: `${height - 60}px` }}>
|
||||
<Empty description="暂无数据" />
|
||||
</div>
|
||||
: <>
|
||||
|
||||
{replaceArray.map((item: any, index: any) => {
|
||||
// const downCode = [
|
||||
// {
|
||||
// key: 'downword',
|
||||
// label: (
|
||||
// <div
|
||||
// style={{ width: 100, display: 'flex', justifyContent: 'center', alignItems: 'center' }}
|
||||
// onClick={() => {
|
||||
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/${item.projId}`)
|
||||
// }}
|
||||
// >
|
||||
// Word
|
||||
// </div>
|
||||
// ),
|
||||
// },
|
||||
// {
|
||||
// key: 'downpdf',
|
||||
// label: (
|
||||
// <div
|
||||
// style={{ width: 100, display: 'flex', justifyContent: 'center', alignItems: 'center' }}
|
||||
|
||||
// onClick={() => {
|
||||
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/pdf/${item.projId}`)
|
||||
// }}
|
||||
// >
|
||||
// PDF
|
||||
// </div>
|
||||
// ),
|
||||
// },
|
||||
|
||||
// ]
|
||||
// const downManual = [
|
||||
// {
|
||||
// key: 'downword',
|
||||
// label: (
|
||||
// <div
|
||||
// style={{ width: 100, display: 'flex', justifyContent: 'center', alignItems: 'center' }}
|
||||
|
||||
// onClick={() => {
|
||||
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/${item.projId}`)
|
||||
|
||||
|
||||
// }}
|
||||
// >
|
||||
// Word
|
||||
// </div>
|
||||
// ),
|
||||
// },
|
||||
// {
|
||||
// key: 'downpdf',
|
||||
// label: (
|
||||
// <div
|
||||
// style={{ width: 100, display: 'flex', justifyContent: 'center', alignItems: 'center' }}
|
||||
|
||||
// onClick={() => {
|
||||
|
||||
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/pdf/${item.projId}`)
|
||||
// }}
|
||||
// >
|
||||
// PDF
|
||||
// </div>
|
||||
// ),
|
||||
// },
|
||||
|
||||
// ]
|
||||
const voucherItems = item.renameVoucherFileKVs.map((item: any) => ({
|
||||
key: item.key,
|
||||
label: (
|
||||
<div
|
||||
onClick={() => {
|
||||
window.open(downloadUrl(item.key, false), '_blank')
|
||||
}}
|
||||
style={{ maxWidth: 200, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}
|
||||
title={item.value}
|
||||
>
|
||||
{item.value}
|
||||
</div>
|
||||
),
|
||||
}));
|
||||
return (
|
||||
<div className='projBox' key={item.projRenameApplyId}>
|
||||
|
||||
<div className='timeImg' style={{
|
||||
backgroundImage: `url(${timeImg})`
|
||||
}}>
|
||||
<div>申请时间 : {item.gmtCreate}</div>
|
||||
</div>
|
||||
|
||||
<div className='projBoxTop'>
|
||||
<div className='projName'
|
||||
style={{
|
||||
backgroundImage: `url(${titleBg})`
|
||||
}}
|
||||
onClick={() => {
|
||||
nav(`/proj-edit/${item.projId}`);
|
||||
sessionStorage.setItem('projName', item.projName);
|
||||
sessionStorage.setItem('projStatus', item.generate.generateStatus == 'SUCCESS' ? '查看' : '编辑');
|
||||
}} title={item.projName}>
|
||||
{item.projName}
|
||||
</div>
|
||||
|
||||
|
||||
{/* <div style={{
|
||||
display: 'flex',
|
||||
}}>
|
||||
{
|
||||
tagCorArray.map((tagitem: any) => {
|
||||
|
||||
const [part1, part2] = tagitem.value.split(':');
|
||||
if (part2 !== 'TAG_NOT') {
|
||||
return (
|
||||
<div key={tagitem.value} className='corrTypeC'
|
||||
style={{
|
||||
background: item.tagDataIds.includes(part1) ? 'var(--color-tagactive)' : '',
|
||||
color: item.tagDataIds.includes(part1) ? '#ffffff' : '#5a5a5a',
|
||||
border: item.tagDataIds.includes(part1) ? ' 1px solid var(--color-tagactive)' : ' 1px solid #5a5a5a',
|
||||
|
||||
}}
|
||||
onClick={
|
||||
(e: any) => {
|
||||
|
||||
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/rename/apply/tag/save-or-delete`,
|
||||
body: {
|
||||
dataId: part1,
|
||||
projRenameApplyId: item.projRenameApplyId,
|
||||
projId: item.projId
|
||||
},
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess(data) {
|
||||
|
||||
|
||||
if (data.data.data === 'SAVE') {
|
||||
|
||||
e.target.style.background = 'var(--color-tagactive)';
|
||||
e.target.style.color = '#ffffff';
|
||||
e.target.style.border = '1px solid var(--color-tagactive)';
|
||||
|
||||
|
||||
} else if (data.data.data === 'DELETE') {
|
||||
|
||||
e.target.style.background = '';
|
||||
e.target.style.color = '#5a5a5a';
|
||||
e.target.style.border = '1px solid #5a5a5a';
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
>
|
||||
{tagitem.label}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
</div> */}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div className='projBoxBot'>
|
||||
<div className='boxTopL'>
|
||||
<div className='numImg' style={{
|
||||
backgroundImage: `url(${numbg})`
|
||||
}}
|
||||
>
|
||||
{(page - 1) * 20 + index + 1}
|
||||
</div>
|
||||
<div className='projlogo'>
|
||||
<img src={logoImg} className='projlogo' alt="" />
|
||||
</div>
|
||||
<div className='projInfo'>
|
||||
<div className='projPeople' title={item.authorName}>
|
||||
产权所属者 : {item.authorName ? item.authorName : '无'}
|
||||
</div>
|
||||
<div className='projImg'>
|
||||
<div> 换名凭证</div>
|
||||
<Dropdown menu={{
|
||||
items: voucherItems,
|
||||
}} placement="bottomLeft" arrow>
|
||||
<div className='lookImg'
|
||||
|
||||
>(查看)
|
||||
|
||||
|
||||
</div>
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className='projReason'>
|
||||
<div className='projReasonTop'>
|
||||
<img src={reason} className='reasonImg' alt="" />
|
||||
<div className='yellowTitle'>换名原因</div>
|
||||
</div>
|
||||
<div className='projBoxText' title={item.correctionReason}>
|
||||
{item.renameReason}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='projStatus'>
|
||||
<div className='projStatusTop'>
|
||||
|
||||
<img className='projStatusImg' src={item.applyStatus == 'PENDING' ? blue : item.applyStatus == 'CANCELED' ? black : item.applyStatus == 'APPROVED' ? green : item.applyStatus == 'REJECTED' ? red : ''} alt="" />
|
||||
<div
|
||||
style={{ color: item.applyStatus == 'PENDING' ? '#1890FF' : item.applyStatus == 'CANCELED' ? '#979797' : item.applyStatus == 'APPROVED' ? '#52C41A' : item.applyStatus == 'REJECTED' ? '#FF0000' : '#FF0000' }}
|
||||
|
||||
>{item.applyStatus == 'PENDING' ? '待审核' : item.applyStatus == 'CANCELED' ? '已撤销' : item.applyStatus == 'APPROVED' ? '已通过' : item.applyStatus == 'REJECTED' ? '未通过' : '未知状态'}</div>
|
||||
<div style={{ display: item.gmtReview ? 'block' : 'none', fontWeight: 400, marginLeft: 5 }}>{item.gmtReview}</div>
|
||||
</div>
|
||||
<div className='projBoxText statusprojBoxText' style={{ display: item.reviewReason ? 'block' : 'none' }} title={item.reviewReason}>
|
||||
审核意见 : {item.reviewReason}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='zwBox'>
|
||||
|
||||
</div>
|
||||
<div className='projBtn'
|
||||
style={{ background: 'white' }}
|
||||
>
|
||||
|
||||
<div className='setProj' style={{
|
||||
|
||||
// display: item.applyStatus == 'APPROVED' && item.type == 'CORRECTION1' && item.projStatus !== 'CLOSE' ? 'unset' : 'none',
|
||||
// marginLeft: 10,
|
||||
// textDecoration: 'underline',
|
||||
display: item.applyStatus == 'APPROVED' && item.projStatus !== 'CLOSE' ? 'unset' : 'none',
|
||||
}}
|
||||
onClick={() => {
|
||||
nav(
|
||||
`/proj-new/MATERIAL?pkg=&videoDemo=`,
|
||||
{
|
||||
state: {
|
||||
type: 'replace',
|
||||
projId: item.projId,
|
||||
}
|
||||
}
|
||||
);
|
||||
}}
|
||||
>
|
||||
换名
|
||||
</div>
|
||||
<div className='setProj' onClick={() => {
|
||||
setRevokeModal(true)
|
||||
setprojRenameApplyId(item.projRenameApplyId)
|
||||
}}
|
||||
style={{ display: item.applyStatus == 'PENDING' ? 'block' : 'none' }}
|
||||
>撤销换名</div>
|
||||
<div style={{
|
||||
display: item.projStatus == 'CLOSE' ? 'block' : 'none',
|
||||
fontSize: 16,
|
||||
color: '#5a5a5a',
|
||||
fontWeight: 700,
|
||||
}}>
|
||||
项目已关闭
|
||||
</div>
|
||||
{/* <div className='setProj' onClick={() => {
|
||||
setRevokeModal(true)
|
||||
setprojCorrectionApplyId(item.projCorrectionApplyId)
|
||||
}}
|
||||
style={{ display: item.applyStatus == 'PENDING' ? 'block' : 'none' }}
|
||||
>撤销补正</div>
|
||||
<div style={{
|
||||
display: item.projStatus == 'CLOSE' && item.type == 'CORRECTION1' ? 'block' : 'none',
|
||||
fontSize: 16,
|
||||
color: '#5a5a5a',
|
||||
fontWeight: 700,
|
||||
}}>
|
||||
项目已关闭
|
||||
</div>
|
||||
<div style={{
|
||||
display: item.applyStatus == 'APPROVED' && item.projStatus !== 'CLOSE' || item.applyStatus == 'APPROVED' && item.type == 'CORRECTION2' ? 'block' : 'none' }}>
|
||||
<div className='correctDownBox'>
|
||||
|
||||
<div className='correctDownBtn' style={{ display: item.correctionType == 'CODE' || item.correctionType == 'ALL' ? 'block' : 'none' }}>
|
||||
<Dropdown menu={{
|
||||
// items: downCode,
|
||||
}} placement="bottomRight" arrow>
|
||||
<span style={{ cursor: 'pointer' }}>下载代码</span>
|
||||
</Dropdown>
|
||||
</div>
|
||||
<div className='correctDownBtn' style={{ display: item.correctionType == 'MANUAL' || item.correctionType == 'ALL' ? 'block' : 'none' }}>
|
||||
<Dropdown menu={{
|
||||
// items: downManual,
|
||||
}} placement="bottomRight" arrow>
|
||||
<span style={{ cursor: 'pointer' }}>下载手册</span>
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</>}
|
||||
</Spin>
|
||||
|
||||
|
||||
</div>
|
||||
<div className='pagination'>
|
||||
<Pagination current={page} total={total} pageSize={20} showSizeChanger={false} onChange={(page) => {
|
||||
setPage(page)
|
||||
getData(page)
|
||||
|
||||
}} />
|
||||
</div>
|
||||
<Modal
|
||||
title="确认撤销"
|
||||
okText="撤销"
|
||||
cancelText="取消"
|
||||
destroyOnClose={true}
|
||||
open={revokeModal}
|
||||
onOk={() => {
|
||||
setRevokeModal(false)
|
||||
projRefund()
|
||||
}}
|
||||
onCancel={() => {
|
||||
setRevokeModal(false)
|
||||
}}
|
||||
okButtonProps={{ style: { background: 'red', color: 'white' } }}
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: `${height}px`,
|
||||
}}>
|
||||
<div style={{ width: 384, display: 'flex', height: 50, alignItems: 'center' }}>
|
||||
<img src={revokeImg} alt="" style={{ width: 32, height: 32, marginLeft: 10 }} />
|
||||
<div style={{ marginLeft: 10, fontSize: 18 }}>
|
||||
是否撤销该条换名申请
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
10
src/route/TrademarkMall/TrademarkExpertEdit.tsx
Normal file
10
src/route/TrademarkMall/TrademarkExpertEdit.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import React from 'react'
|
||||
import './trademark-edit.css'
|
||||
export default function TrademarkExpertEdit() {
|
||||
const height = window.innerHeight - 180;
|
||||
return (
|
||||
<div className='trademarkExpertBox' style={{ height: `${height}px`, overflow: 'auto'}}>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
8
src/route/TrademarkMall/trademark-edit.css
Normal file
8
src/route/TrademarkMall/trademark-edit.css
Normal file
@ -0,0 +1,8 @@
|
||||
.trademarkExpertBox {
|
||||
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;
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
import './index.css';
|
||||
// import { MouseEvent, Reducer, useEffect, useReducer, useState, useContext } from "react";
|
||||
import { MouseEvent, Reducer, useEffect, useReducer, useState } from "react";
|
||||
import { MouseEvent, Reducer, useEffect, useReducer, useState, useContext } from "react";
|
||||
import { useSelector, useDispatch } from 'react-redux'
|
||||
import { useNavigate, useSearchParams, Outlet } from "react-router-dom";
|
||||
import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
|
||||
import {
|
||||
Modal,
|
||||
// Row,
|
||||
@ -16,6 +17,7 @@ import { IMenuListItem, IMenuWithTopButton } from "../../interfaces/menu/IMenuWi
|
||||
import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
|
||||
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 MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
|
||||
@ -53,10 +55,14 @@ import {
|
||||
// downloadUrl,
|
||||
post, getCouponUrl
|
||||
} from '../../util/AjaxUtils.ts'
|
||||
// import { getLanguageList, getSoftTypeList } from '../../request/api'
|
||||
import { setMenuActive,
|
||||
import {
|
||||
// getLanguageList, getSoftTypeList
|
||||
appGoodsList, buyAppGoods, appOrderList
|
||||
} from '../../request/api'
|
||||
import {
|
||||
setMenuActive,
|
||||
// getMenuActive
|
||||
} from '../../util/cache.ts'
|
||||
} from '../../util/cache.ts'
|
||||
import gpsImg from '@theme/img/right/gps.png'
|
||||
import backImg from '@theme/img/right/back.png'
|
||||
// import { Link } from "react-router-dom";
|
||||
@ -94,7 +100,7 @@ import firImg from '../../static/fir.png'
|
||||
import noFirImg from '../../static/noFir.png'
|
||||
|
||||
export default function Index() {
|
||||
|
||||
const globalDispatchContext = useContext(GlobalDispatchContext);
|
||||
// const height = window.innerHeight - 180;
|
||||
const columns: TableColumnsType<DataType> = [
|
||||
{
|
||||
@ -462,6 +468,8 @@ export default function Index() {
|
||||
{ id: 'REFUN', name: '退款项目' },
|
||||
// correction
|
||||
{ id: 'CORRECTION', name: '补正项目' },
|
||||
{ id: 'REPLACENAME', name: '换名项目' },
|
||||
|
||||
{ id: 'CONTRACT', name: '合同下载' },
|
||||
|
||||
],
|
||||
@ -707,7 +715,7 @@ export default function Index() {
|
||||
const [sellBelongType, setSellBelongType] = useState<string | null>(null) // 所属人类型
|
||||
// 更改所属人类型
|
||||
const sellBelongTypeChange = (value: string) => {
|
||||
console.log(`selected ${value}`);
|
||||
// console.log(`selected ${value}`);
|
||||
setSellBelongType(value)
|
||||
}
|
||||
const [sellDate, setSellDate] = useState<any | null>(null) // 日期
|
||||
@ -880,7 +888,7 @@ export default function Index() {
|
||||
const copyrightKeyWordshandleSearch = () => {
|
||||
setCopyrightKeywords(copyrightNewKeywords)
|
||||
}
|
||||
const [specialPrice,setSpecialPrice] = useState(false) //商品特价标识
|
||||
const [specialPrice, setSpecialPrice] = useState(false) //商品特价标识
|
||||
const copyrightInit = () => {
|
||||
setMinPrice(null)
|
||||
setMaxPrice(null)
|
||||
@ -906,11 +914,11 @@ export default function Index() {
|
||||
copyrightLanguage: copyrightLanguage,
|
||||
copyrightType: copyrightType,
|
||||
// 新增特价标识
|
||||
goodsFlag:specialPrice?'特价':''
|
||||
goodsFlag: specialPrice ? '特价' : ''
|
||||
}
|
||||
})
|
||||
}
|
||||
}, [copyrightKeywords, minPrice, maxPrice, sort, copyrightDate, copyrightLanguage, copyrightType,specialPrice])
|
||||
}, [copyrightKeywords, minPrice, maxPrice, sort, copyrightDate, copyrightLanguage, copyrightType, specialPrice])
|
||||
|
||||
// ----------------------------------------------------------------------------------------------
|
||||
|
||||
@ -971,13 +979,153 @@ export default function Index() {
|
||||
|
||||
// APP电子软著框是否显示----------------------------------------------------------------------------------------
|
||||
const [appSearchBox, setAppSearchBox] = useState(false)
|
||||
const [appKeyWords, setAppKeyWords] = useState('') // 电子软著搜索关键字
|
||||
const [showAppkeyWords, setShowAppkeyWords] = useState('') // 电子软著搜索关键字显示
|
||||
const [appModal, setAppModal] = useState(false) // 申请电子软著弹窗
|
||||
const [toEditsModal, setToEditsModal] = useState(false) // 电子软著编辑弹窗
|
||||
const [appGoodsArray, setAppGoodsArray] = useState<any>([]) // 电子软著可选商品列表
|
||||
const [buyLoading, setBuyLoading] = useState(false) // 购买loading
|
||||
const [appOrderId, setAppOrderId] = useState<any>() // 电子软著订单id
|
||||
const [appExamineStatus, setAppExamineStatus] = useState<string | null>(null) // 电子软著审核状态
|
||||
const [appApplyStatus, setAppApplyStatus] = useState<string | null>(null) // 电子软著申请状态
|
||||
const appInit = () => {
|
||||
setAppKeyWords('')
|
||||
setShowAppkeyWords('')
|
||||
setAppExamineStatus(null)
|
||||
setAppApplyStatus(null)
|
||||
}
|
||||
const getAppOrderList = async (page: number) => {
|
||||
try {
|
||||
|
||||
const res: any = await appOrderList({ page, keywords: '', rows: 10 })
|
||||
|
||||
dispath({
|
||||
type: 'upAppGoodsListData',
|
||||
val: res
|
||||
})
|
||||
} 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)
|
||||
}
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
|
||||
}
|
||||
//电子软著点击搜索
|
||||
const handleAppSearch = (value: string) => {
|
||||
setAppKeyWords(value)
|
||||
// nav('/app-electron', {
|
||||
// state: {
|
||||
// appKeyWords: value,
|
||||
// }
|
||||
// })
|
||||
}
|
||||
// 电子软著删除关键字
|
||||
const handleAppChange = (e: any) => {
|
||||
setShowAppkeyWords(e.target.value)
|
||||
if (e.target.value == '') {
|
||||
setAppKeyWords('')
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
useEffect(() => {
|
||||
if (location.pathname == '/app-electron') {
|
||||
nav('/app-electron', {
|
||||
state: {
|
||||
appKeyWords: appKeyWords,
|
||||
checkStatus: appExamineStatus,
|
||||
appOrderStatus: appApplyStatus
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}, [appKeyWords, appExamineStatus, appApplyStatus])
|
||||
// 获取电子软著可选商品列表
|
||||
const getAppGoodsList = async () => {
|
||||
try {
|
||||
const res = await appGoodsList()
|
||||
// console.log('电子软著可选商品列表', res);
|
||||
setAppGoodsArray(res)
|
||||
} 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 [replaceSearchBox, setReplaceSearchBox] = useState(false)
|
||||
const [nowReplaceKeyWords, setNowReplaceKeyWords] = useState('') // 换名搜索关键字
|
||||
const [replaceKeyWords, setReplaceKeyWords] = useState('') // 换名搜索关键字
|
||||
const [replaceStatus, setReplaceStatus] = useState<string | null>(null) // 换名搜索状态
|
||||
const repacleInit = () => {
|
||||
setReplaceKeyWords('')
|
||||
setNowReplaceKeyWords('')
|
||||
setReplaceStatus(null)
|
||||
setauthorId('')
|
||||
setauthorName('')
|
||||
setNowauthorId('')
|
||||
setNowauthorName('')
|
||||
setselectedRowKeys([]);
|
||||
}
|
||||
const [replaceModal, setReplaceModal] = useState(false) // 申请换名
|
||||
// 换名搜索关键字
|
||||
const replacehandleSearch = (value: string) => {
|
||||
setReplaceKeyWords(value)
|
||||
|
||||
}
|
||||
const replacehandleChange = (e: any) => {
|
||||
setNowReplaceKeyWords(e.target.value)
|
||||
if (e.target.value == '') {
|
||||
setReplaceKeyWords('')
|
||||
}
|
||||
}
|
||||
useEffect(() => {
|
||||
if (location.pathname == '/replace') {
|
||||
nav('/replace', {
|
||||
state: {
|
||||
keywords: replaceKeyWords,
|
||||
applyStatus: replaceStatus,
|
||||
authorId: authorId
|
||||
}
|
||||
})
|
||||
}
|
||||
}, [replaceKeyWords, replaceStatus, authorId])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// 申请商标是否显示------------------------------------------------------------------------------
|
||||
const [trademarkBox, setTrademarkBox] = useState(false) // 申请商标弹窗
|
||||
const [trademarkModal, setTrademarkModal] = useState(false) // 申请商标弹窗
|
||||
// const [toRradeMarkModal, setToRradeMarkModal] = useState(false) // 申请商标编辑弹窗
|
||||
// ----------------------------------------------------------------------------------------------------
|
||||
|
||||
const [correctionSearchBox, setCorrectionSearchBox] = useState(false)
|
||||
@ -1155,16 +1303,17 @@ export default function Index() {
|
||||
|
||||
|
||||
// app电子软著数组
|
||||
const appGoodsArray = [
|
||||
{ id: '1', title: '10个工作日下证', price: '500', back: 'black' },
|
||||
{ id: '2', title: '3个工作日下证', price: '900', back: 'blue' },
|
||||
{ id: '3', title: '1个工作日下证', price: '2599', back: 'black' },
|
||||
{ id: '4', title: '当天下证', price: '3699', back: 'black' },
|
||||
]
|
||||
// const appGoodsArray = [
|
||||
// { id: '1', title: '10个工作日下证', price: '500', back: 'black' },
|
||||
// { id: '2', title: '3个工作日下证', price: '900', back: 'blue' },
|
||||
// { id: '3', title: '1个工作日下证', price: '2599', back: 'black' },
|
||||
// { id: '4', title: '当天下证', price: '3699', back: 'black' },
|
||||
// ]
|
||||
|
||||
// 商标数组
|
||||
const trademarkArray = [
|
||||
{
|
||||
id: '1', title: '智能申请注册', nowprice: '500',
|
||||
id: '1', title: '智能申请注册', nowprice: '270',
|
||||
old: true, //是否显示原价
|
||||
oldprice: '318', //原价
|
||||
cheap: true,//特价
|
||||
@ -1232,6 +1381,8 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
} else if (location.pathname.includes('/proj-create')) {
|
||||
setShowSearchBox(false)
|
||||
setRrefunSearchBox(false)
|
||||
@ -1243,6 +1394,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
setNow('创建项目')
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '创建项目' }])
|
||||
@ -1259,6 +1411,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setEditname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
|
||||
@ -1274,6 +1427,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: '新建项目' }])
|
||||
@ -1289,6 +1443,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
|
||||
@ -1304,6 +1459,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页 </Link> }, { title: '编辑项目' }])
|
||||
@ -1319,6 +1475,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '标题简介' }])
|
||||
@ -1334,6 +1491,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '基本信息' }])
|
||||
@ -1349,6 +1507,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '登录界面设置' }])
|
||||
@ -1364,6 +1523,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单管理' }])
|
||||
@ -1379,6 +1539,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单顺序' }])
|
||||
@ -1394,6 +1555,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
|
||||
@ -1409,6 +1571,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '添加菜单' }])
|
||||
} else if (location.pathname.includes('/proj-edit/config-mod-edit')) {
|
||||
@ -1423,6 +1586,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-2) }}>编辑项目</a> }, { title: <a onClick={() => { nav(-1) }}>系统菜单管理</a> }, { title: '编辑菜单' }])
|
||||
// /config-mod-edit /config-mod-show
|
||||
@ -1438,6 +1602,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-2) }}>编辑项目</a> }, { title: <a onClick={() => { nav(-1) }}>系统菜单管理</a> }, { title: '查看菜单' }])
|
||||
// /config-mod-edit
|
||||
@ -1453,6 +1618,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
|
||||
|
||||
@ -1470,6 +1636,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setPathArray([{ title: '首页' }])
|
||||
// /config-mod-edit /product-release /transaction-order
|
||||
@ -1485,6 +1652,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setPathArray([{ title: '首页' }])
|
||||
// /config-mod-edit /product-release /transaction-order
|
||||
@ -1500,6 +1668,7 @@ export default function Index() {
|
||||
setTradingSearchBox(true)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setPathArray([{ title: '首页' }])
|
||||
// /config-mod-edit /product-release /transaction-order
|
||||
@ -1516,6 +1685,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
|
||||
@ -1532,6 +1702,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
|
||||
@ -1547,6 +1718,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
} else if (location.pathname.includes('/app-electron')) {
|
||||
setShowSearchBox(false)
|
||||
@ -1560,6 +1732,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(true)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
} else if (location.pathname.includes('/app-edit')) {
|
||||
setShowSearchBox(false)
|
||||
@ -1573,6 +1746,7 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(false)
|
||||
|
||||
}
|
||||
else if (location.pathname.includes('/trademark-mall')) {
|
||||
@ -1587,6 +1761,21 @@ export default function Index() {
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(true)
|
||||
setReplaceSearchBox(false)
|
||||
}
|
||||
else if (location.pathname.includes('/replace')) {
|
||||
setShowSearchBox(false)
|
||||
setRrefunSearchBox(false)
|
||||
setCorrectionSearchBox(false)
|
||||
setContractSearchBox(false)
|
||||
setNow('首页 / 换名')
|
||||
setSellSearchBox(false)
|
||||
setSellOrderSearchBox(false)
|
||||
setCopyrightSearchBox(false)
|
||||
setTradingSearchBox(false)
|
||||
setAppSearchBox(false)
|
||||
setTrademarkBox(false)
|
||||
setReplaceSearchBox(true)
|
||||
|
||||
}
|
||||
}, [location.pathname])
|
||||
@ -1611,7 +1800,7 @@ export default function Index() {
|
||||
|
||||
// getLanguageListDate()
|
||||
// getSoftTypeListDate()
|
||||
|
||||
getAppGoodsList()
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
// loactionStorage里的activeMenu
|
||||
@ -1667,6 +1856,7 @@ export default function Index() {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}, [type, chargeAdditionals, keywords, tagDataId, projRemindId, payStatus, authorId, refunKeywords, applyStatus, correctionKeywords, correctionNumType, correctionType, correctionApplyStatus, tagCor]);
|
||||
|
||||
// const [menuName,setMenuName] = useState<string | null>('')
|
||||
@ -1948,8 +2138,8 @@ export default function Index() {
|
||||
</>
|
||||
) : (
|
||||
<></>
|
||||
)} */}
|
||||
{/* {THEME == 'mzw' ? (
|
||||
)}
|
||||
{THEME == 'mzw' ? (
|
||||
<MenuWithBottomButtom
|
||||
button={sellMenu.button}
|
||||
list={sellMenu.list}
|
||||
@ -2794,6 +2984,154 @@ export default function Index() {
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={{ display: replaceSearchBox ? 'block' : 'none' }}>
|
||||
<div className='mediaSearch' style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
}}>
|
||||
<div className='mediaLine'>
|
||||
<div className='line' style={{
|
||||
}} ></div>
|
||||
</div>
|
||||
<Button type="primary" onClick={() => {
|
||||
setReplaceModal(true)
|
||||
repacleInit()
|
||||
// dispath({
|
||||
// type: 'newCorrection',
|
||||
// val: true
|
||||
// })
|
||||
}}
|
||||
style={{ background: 'var(--color-searchbtn)' }}
|
||||
>
|
||||
申请换名
|
||||
</Button>
|
||||
<Search placeholder="输入项目名称"
|
||||
value={nowReplaceKeyWords}
|
||||
onSearch={replacehandleSearch}
|
||||
onChange={replacehandleChange}
|
||||
style={{
|
||||
width: '160px',
|
||||
height: '31px',
|
||||
marginLeft: 5
|
||||
}}
|
||||
allowClear
|
||||
/>
|
||||
|
||||
|
||||
<Select
|
||||
value={replaceStatus}
|
||||
style={{ height: '31px', width: '120px', marginLeft: 5 }}
|
||||
onChange={(value: string) => {
|
||||
setReplaceStatus(value)
|
||||
|
||||
}}
|
||||
options={[
|
||||
// { value: '', label: '全部项目' },
|
||||
{ value: 'PENDING', label: '待审核' },
|
||||
{ value: 'APPROVED', label: '已通过' },
|
||||
{ value: 'REJECTED', label: '未通过' },
|
||||
{ value: 'CANCELED', label: '已取消' },
|
||||
]}
|
||||
// defaultValue=""
|
||||
placeholder={'选择状态'}
|
||||
allowClear
|
||||
/>
|
||||
|
||||
<div style={{
|
||||
position: 'relative',
|
||||
}}>
|
||||
<Input placeholder='选择所属者'
|
||||
value={authorName}
|
||||
style={{
|
||||
height: '31px', width: '110px', marginLeft: 5,
|
||||
paddingRight: 20,
|
||||
// 超出部分用...显示
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
}}></Input>
|
||||
<div
|
||||
title={authorName}
|
||||
style={{
|
||||
position: 'absolute',
|
||||
height: '31px', width: '110px',
|
||||
// background: 'skyblue',
|
||||
top: 0,
|
||||
left: 5,
|
||||
cursor: 'pointer',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'flex-end',
|
||||
paddingRight: 10,
|
||||
boxSizing: 'border-box',
|
||||
|
||||
}}
|
||||
onClick={() => {
|
||||
// setauthorName('哈哈哈哈哈哈哈哈哈哈嘎嘎嘎嘎嘎嘎')
|
||||
setOwnerPage(1)
|
||||
getProjOwnerList(1, '')
|
||||
setSelectBelongPeople(true)
|
||||
setselectedRowKeys([])
|
||||
setNowauthorId('')
|
||||
setNowauthorName('')
|
||||
// nav('/home', {
|
||||
// state: {
|
||||
// keyword: keywords,
|
||||
// type: type,
|
||||
// chargeAdditionals: chargeAdditionals,
|
||||
// tagDataId: tagDataId,
|
||||
// authorId: '1',
|
||||
// payStatus: payStatus,
|
||||
// projRemindId: projRemindId,
|
||||
// // tagNot
|
||||
// }
|
||||
// })
|
||||
}}
|
||||
|
||||
>
|
||||
</div>
|
||||
|
||||
<CloseCircleOutlined
|
||||
className='clearIcon'
|
||||
style={{
|
||||
top: 8,
|
||||
right: 5,
|
||||
position: 'absolute',
|
||||
color: '#FFF',
|
||||
// background: '#868686',
|
||||
borderRadius: '50%',
|
||||
fontSize: 14,
|
||||
display: authorName ? 'unset' : 'none',
|
||||
marginTop: 1,
|
||||
|
||||
}}
|
||||
title=''
|
||||
onClick={() => {
|
||||
setauthorName('')
|
||||
setauthorId('')
|
||||
setNowauthorId('')
|
||||
setNowauthorName('')
|
||||
setselectedRowKeys([]);
|
||||
nav('/replace', {
|
||||
state: {
|
||||
keywords: replaceKeyWords,
|
||||
applyStatus: replaceStatus,
|
||||
authorId: '',
|
||||
}
|
||||
})
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<Button onClick={() => {
|
||||
repacleInit()
|
||||
}} style={{ marginLeft: 5, height: 31 }}
|
||||
// type="primary"
|
||||
icon={<ClearOutlined />}>
|
||||
清除
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: contractSearchBox ? 'block' : 'none' }}>
|
||||
<div className='mediaSearch' style={{
|
||||
display: 'flex',
|
||||
@ -3094,18 +3432,18 @@ export default function Index() {
|
||||
value={copyrightType}
|
||||
/>
|
||||
<Button
|
||||
icon={<img src={specialPrice?noFirImg:firImg} style={{ width: 15, height: 18 }} />}
|
||||
icon={<img src={specialPrice ? noFirImg : firImg} style={{ width: 15, height: 18 }} />}
|
||||
style={{
|
||||
background: specialPrice?'#FF9F08':'#FFF6EF',
|
||||
color: specialPrice?'white':'#FF9F00 ',
|
||||
background: specialPrice ? '#FF9F08' : '#FFF6EF',
|
||||
color: specialPrice ? 'white' : '#FF9F00 ',
|
||||
marginLeft: 5, height: 31,
|
||||
border:'1px solid #FF9F00 ',
|
||||
border: '1px solid #FF9F00 ',
|
||||
}}
|
||||
onClick={()=>{
|
||||
onClick={() => {
|
||||
// 特价标识
|
||||
setSpecialPrice(!specialPrice)
|
||||
}}
|
||||
>
|
||||
>
|
||||
今日特价
|
||||
</Button>
|
||||
<Button
|
||||
@ -3215,8 +3553,73 @@ export default function Index() {
|
||||
style={{ background: 'var(--color-searchbtn)' }}
|
||||
onClick={() => {
|
||||
setAppModal(true)
|
||||
setAppGoodsId('')
|
||||
}}
|
||||
>申请电子软著</Button>
|
||||
<Search
|
||||
allowClear
|
||||
placeholder='请输入关键字' value={showAppkeyWords}
|
||||
onSearch={handleAppSearch}
|
||||
onChange={handleAppChange}
|
||||
style={{
|
||||
// maxWidth: '200px',
|
||||
width: '170px',
|
||||
height: '31px',
|
||||
marginLeft: '5px'
|
||||
}}
|
||||
>
|
||||
|
||||
</Search>
|
||||
<Select
|
||||
allowClear
|
||||
placeholder='选择审核状态'
|
||||
style={{
|
||||
width: '130px',
|
||||
height: '31px', marginLeft: 5,
|
||||
}}
|
||||
onChange={(value) => {
|
||||
setAppExamineStatus(value)
|
||||
}}
|
||||
value={appExamineStatus}
|
||||
options={[
|
||||
{ value: '', label: '未提交' },
|
||||
{ value: '0', label: '未通过' },
|
||||
{ value: '1', label: '待审核' },
|
||||
{ value: '2', label: '通过' },
|
||||
]}
|
||||
>
|
||||
|
||||
</Select>
|
||||
<Select
|
||||
allowClear
|
||||
placeholder='选择申请状态'
|
||||
style={{
|
||||
width: '130px',
|
||||
height: '31px', marginLeft: 5,
|
||||
}}
|
||||
onChange={(value) => {
|
||||
setAppApplyStatus(value)
|
||||
}}
|
||||
value={appApplyStatus}
|
||||
options={[
|
||||
// { value: '0', label: '已取消' },
|
||||
// { value: '1', label: '未付款' },
|
||||
{ value: '2', label: '资料填写中' },
|
||||
{ value: '3', label: '资料审核中' },
|
||||
{ value: '4', label: '线下申请中' },
|
||||
{ value: '5', label: '已下证' },
|
||||
]}
|
||||
>
|
||||
|
||||
</Select>
|
||||
<Button style={{
|
||||
marginLeft: 5, height: 31
|
||||
}}
|
||||
icon={<ClearOutlined />}
|
||||
onClick={() => {
|
||||
appInit()
|
||||
|
||||
}}>清除</Button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -3384,6 +3787,23 @@ export default function Index() {
|
||||
<CorrectionModal closeModal={() => { setCorrectionModal(false) }}
|
||||
></CorrectionModal>
|
||||
</Modal>
|
||||
<Modal
|
||||
title="申请换名"
|
||||
destroyOnClose={true}
|
||||
open={replaceModal}
|
||||
footer={null}
|
||||
maskClosable={false} // 禁止通过点击蒙层关闭
|
||||
onCancel={() => {
|
||||
setReplaceModal(false)
|
||||
}}
|
||||
okButtonProps={{ style: { background: 'red', color: 'white' } }}
|
||||
width={592}
|
||||
centered
|
||||
|
||||
>
|
||||
<ReplaceModal closeModal={() => { setReplaceModal(false) }}
|
||||
></ReplaceModal>
|
||||
</Modal>
|
||||
<Modal
|
||||
title="新增合同"
|
||||
destroyOnClose={true}
|
||||
@ -3659,7 +4079,7 @@ export default function Index() {
|
||||
footer={null}
|
||||
onCancel={() => {
|
||||
setAppModal(false)
|
||||
setAppGoodsId('')
|
||||
|
||||
}}
|
||||
okButtonProps={{ style: { background: 'red', color: 'white' } }}
|
||||
width={830}
|
||||
@ -3667,73 +4087,107 @@ export default function Index() {
|
||||
centered
|
||||
|
||||
>
|
||||
<div style={{
|
||||
paddingBottom: 30,
|
||||
paddingTop: 30
|
||||
}}>
|
||||
<Spin tip="正在购买..." size="small" spinning={buyLoading}>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
paddingBottom: 30,
|
||||
paddingTop: 30
|
||||
}}>
|
||||
{appGoodsArray.map((item: any) => {
|
||||
return (
|
||||
<div className='appGoodsBox'
|
||||
key={item.id}
|
||||
style={{
|
||||
background: item.back == 'black' ? '#F9F9F9 ' : '#DDECFF',
|
||||
border: item.id == appGoodsId ? '1px solid #f19e31' : '',
|
||||
boxShadow: item.id == appGoodsId ? '5px 5px 10px rgb(114, 114, 114)' : '',
|
||||
marginTop: item.id == appGoodsId ? -20 : 0,
|
||||
}}
|
||||
onClick={() => {
|
||||
setAppGoodsId(item.id)
|
||||
}}
|
||||
>
|
||||
<div className='appGoodsTop'>
|
||||
<div className='appgoodsTitle'
|
||||
style={{
|
||||
color: item.back == 'black' ? '#E2B682' : '#FFFFFF',
|
||||
backgroundImage: item.back == 'black' ? `url(${topblack})` : `url(${topblue})`,
|
||||
}}
|
||||
>
|
||||
{item.title}
|
||||
</div>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
}}>
|
||||
{appGoodsArray.map((item: any, index: number) => {
|
||||
return (
|
||||
<div className='appGoodsBox'
|
||||
key={item.id}
|
||||
style={{
|
||||
background: item.back == 'black' ? '#F9F9F9 ' : '#DDECFF',
|
||||
border: item.id == appGoodsId ? '1px solid #f19e31' : '',
|
||||
boxShadow: item.id == appGoodsId ? '5px 5px 10px rgb(114, 114, 114)' : '',
|
||||
marginTop: item.id == appGoodsId ? -20 : 0,
|
||||
}}
|
||||
onClick={() => {
|
||||
setAppGoodsId(item.id)
|
||||
// console.log('item.dataId: ', item.dataId);
|
||||
|
||||
</div>
|
||||
<div className='appGoodsBot'>
|
||||
<div className='appgoodsPrice' style={{
|
||||
color: item.back == 'black' ? '#835114' : '#233E9E',
|
||||
}}>
|
||||
<span>¥</span>
|
||||
<span style={{
|
||||
fontSize: 42,
|
||||
}}>{item.price}</span>
|
||||
<span>元/件</span>
|
||||
}}
|
||||
>
|
||||
<div className='appGoodsTop'>
|
||||
<div className='appgoodsTitle'
|
||||
style={{
|
||||
color: index !== 1 ? '#E2B682' : '#FFFFFF',
|
||||
backgroundImage: index !== 1 ? `url(${topblack})` : `url(${topblue})`,
|
||||
}}
|
||||
>
|
||||
{item.title}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className='appGoodsBot'>
|
||||
<div className='appgoodsPrice' style={{
|
||||
color: index !== 1 ? '#835114' : '#233E9E',
|
||||
}}>
|
||||
<span>¥</span>
|
||||
<span style={{
|
||||
fontSize: 42,
|
||||
}}>{item.money / 100}</span>
|
||||
<span>元/件</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
|
||||
})}
|
||||
})}
|
||||
|
||||
</div>
|
||||
<div className='appGoodsBtnBox'>
|
||||
<div className='appGoodsBtn' onClick={async () => {
|
||||
if (appGoodsId) {
|
||||
// alert('开发中')
|
||||
// 创建按订单 如果成功 询问是否继续编辑
|
||||
// setAppGoodsId('')
|
||||
try {
|
||||
setBuyLoading(true)
|
||||
const res = await buyAppGoods(appGoodsId)
|
||||
setAppOrderId(res.data)
|
||||
setBuyLoading(false)
|
||||
setAppModal(false)
|
||||
getAppOrderList(1)
|
||||
setToEditsModal(true)
|
||||
appInit()
|
||||
reloadUser(messageApi, globalDispatchContext).then(() => {
|
||||
messageApi.success('扣款成功');
|
||||
});
|
||||
// 更新redux中的appGoodsListAray
|
||||
|
||||
} 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)
|
||||
}
|
||||
} finally {
|
||||
setBuyLoading(false)
|
||||
}
|
||||
|
||||
|
||||
return
|
||||
|
||||
} else {
|
||||
messageApi.error('请选择商品')
|
||||
}
|
||||
}}>下单购买</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='appGoodsBtnBox'>
|
||||
<div className='appGoodsBtn' onClick={() => {
|
||||
if (appGoodsId) {
|
||||
// alert('开发中')
|
||||
// 创建按订单 如果成功 询问是否继续编辑
|
||||
setAppGoodsId('')
|
||||
setAppModal(false)
|
||||
setToEditsModal(true)
|
||||
} else {
|
||||
messageApi.error('请选择商品')
|
||||
}
|
||||
}}>下单购买</div>
|
||||
</div>
|
||||
</div>
|
||||
</Spin>
|
||||
</Modal>
|
||||
<Modal
|
||||
title="提示"
|
||||
@ -3746,7 +4200,7 @@ export default function Index() {
|
||||
// okButtonProps={{ style: { background: 'red', color: 'white' } }}
|
||||
onOk={() => {
|
||||
setToEditsModal(false)
|
||||
nav('/app-edit/dajsdkjakdl')
|
||||
nav(`/app-edit/${appOrderId}`)
|
||||
}}
|
||||
// 设置确定和取消得文字
|
||||
okText="编辑"
|
||||
@ -3758,6 +4212,7 @@ export default function Index() {
|
||||
>
|
||||
<div>已生成订单,是否编辑</div>
|
||||
</Modal>
|
||||
|
||||
<Modal
|
||||
title="申请商标"
|
||||
destroyOnClose={true}
|
||||
@ -3831,6 +4286,10 @@ export default function Index() {
|
||||
<div className='trademarkNowPrice'>
|
||||
<span>¥</span>
|
||||
<span style={{ fontSize: 42 }}>{item.nowprice}</span>
|
||||
<span style={{
|
||||
// 数组第一个才显示
|
||||
display: item.old ? 'unset' : 'none'
|
||||
}}>起</span>
|
||||
</div>
|
||||
<div className='trademarkOldPrice' style={{
|
||||
display: item.old ? 'unset' : 'none'
|
||||
@ -3869,9 +4328,13 @@ export default function Index() {
|
||||
}}
|
||||
onClick={() => {
|
||||
console.log(item.nowprice);
|
||||
setTrademarkModal(false)
|
||||
nav('/trademark-expert-edit')
|
||||
|
||||
console.log('简单');
|
||||
|
||||
}}
|
||||
>立即购买</div>
|
||||
>开始编辑</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
@ -3894,9 +4357,9 @@ export default function Index() {
|
||||
}}
|
||||
onClick={() => {
|
||||
console.log(item.nowprice);
|
||||
|
||||
console.log('复杂');
|
||||
}}
|
||||
>立即购买</div>
|
||||
>开始编辑</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,12 +4,14 @@ import ProductRelease from '../route/ProductRelease/ProductRelease.tsx'
|
||||
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 TransactionOrder from '../route/TransactionOrder/TransactionOrder.tsx'
|
||||
import CopyrightGgoods from '../route/CopyrightGgoods/CopyrightGgoods.tsx'
|
||||
import TradingGoods from '../route/TradingGoods/TradingGoods.tsx'
|
||||
import Refun from '../route/Refun/Refun.tsx'
|
||||
import Correction from '../route/Correction/Correction.tsx'
|
||||
import Contract from '../route/Contract/Contract.tsx';
|
||||
import Replace from '../route/Replace/Replace.tsx';
|
||||
import Index from "../route/index/Index.tsx";
|
||||
// import Search from "../route/SearchList/SearchList.tsx";
|
||||
import ProjCreate from "./proj/ProjCreate.tsx";
|
||||
@ -226,13 +228,17 @@ export const router = createHashRouter(
|
||||
element: <AppElectron/>
|
||||
},
|
||||
{
|
||||
path: '/app-edit/:appId',
|
||||
path: '/app-edit/:appOrderId',
|
||||
element: <AppEdit/>
|
||||
},
|
||||
{
|
||||
path: '/trademark-mall',
|
||||
element: <TrademarkMall/>
|
||||
},
|
||||
{
|
||||
path:'/trademark-expert-edit',
|
||||
element:<TrademarkExpertEdit/>
|
||||
},
|
||||
{
|
||||
path: '/transaction-order',
|
||||
element: <TransactionOrder />
|
||||
@ -256,6 +262,10 @@ export const router = createHashRouter(
|
||||
{
|
||||
path: '/contract',
|
||||
element: <Contract />
|
||||
},
|
||||
{
|
||||
path: '/replace',
|
||||
element: <Replace />
|
||||
},
|
||||
{
|
||||
path: '/proj-create',
|
||||
|
@ -9,22 +9,26 @@ const baseState = {
|
||||
// val: ''
|
||||
// },
|
||||
belongArray: [],
|
||||
refunArray:[],
|
||||
correctionArray:[],
|
||||
contractArray:[],
|
||||
contractTotal:0,
|
||||
refunTotal:0,
|
||||
correctionTotal:0,
|
||||
couponModal:false,
|
||||
projName:'',
|
||||
projStatus:'',
|
||||
newRefun:false,
|
||||
newCorrection:false,
|
||||
packNum:{
|
||||
ALL:0,
|
||||
MATERIAL:0,
|
||||
refunArray: [],
|
||||
correctionArray: [],
|
||||
contractArray: [],
|
||||
contractTotal: 0,
|
||||
refunTotal: 0,
|
||||
correctionTotal: 0,
|
||||
couponModal: false,
|
||||
projName: '',
|
||||
projStatus: '',
|
||||
newRefun: false,
|
||||
newCorrection: false,
|
||||
packNum: {
|
||||
ALL: 0,
|
||||
MATERIAL: 0,
|
||||
},
|
||||
phoneModal:false,
|
||||
phoneModal: false,
|
||||
appGoodsListData: {},
|
||||
replaceArray: [],
|
||||
replaceTotal: 0,
|
||||
newReplace: false,
|
||||
}
|
||||
|
||||
// 创建仓库
|
||||
@ -51,6 +55,9 @@ const reducer = (state = baseState, action: any) => {
|
||||
if (action.type == 'upCorrectionArray') {
|
||||
nstate.correctionArray = action.val
|
||||
}
|
||||
if (action.type == 'upReplaceArray') {
|
||||
nstate.replaceArray = action.val
|
||||
}
|
||||
if (action.type == 'upContractArray') {
|
||||
nstate.contractArray = action.val
|
||||
}
|
||||
@ -60,6 +67,9 @@ const reducer = (state = baseState, action: any) => {
|
||||
if (action.type == 'upCorrectionTotal') {
|
||||
nstate.correctionTotal = action.val
|
||||
}
|
||||
if (action.type == 'upReplaceTotal') {
|
||||
nstate.replaceTotal = action.val
|
||||
}
|
||||
if (action.type == 'changeCouponModal') {
|
||||
nstate.couponModal = action.val
|
||||
}
|
||||
@ -78,9 +88,15 @@ const reducer = (state = baseState, action: any) => {
|
||||
if (action.type == 'upPackNum') {
|
||||
nstate.packNum = action.val
|
||||
}
|
||||
if(action.type == 'changePhoneModal'){
|
||||
if (action.type == 'changePhoneModal') {
|
||||
nstate.phoneModal = action.val
|
||||
}
|
||||
if (action.type == 'upAppGoodsListData') {
|
||||
nstate.appGoodsListData = action.val
|
||||
}
|
||||
if (action.type == 'newReplace') {
|
||||
nstate.newReplace = action.val
|
||||
}
|
||||
return nstate
|
||||
}
|
||||
const store = createStore(reducer)
|
||||
|
Loading…
Reference in New Issue
Block a user