暂存
This commit is contained in:
parent
822aeae3d4
commit
2a6d12ed78
@ -127,13 +127,13 @@ export const unbind = () => phoneRequest.get(`/operator/api/user-wx-update-usern
|
||||
// APP电子软著接口----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//获取APP电子软著可买商品展示列表
|
||||
export const appGoodsList = () => aiShopRequest.get(`/aishop/api/data/listbyparentid/71831561-108f-49f0-92c8-f9e4f0483c02`)
|
||||
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 smallClassList = (id:string) => aiShopRequest.get(`/aishop/api/data/listbyparentid/8abb5b58-83d2-465c-b164-a189efee28c1/${id}`)
|
||||
export const twoClass = (id:string) => aiShopRequest.get(`/aishop/api/data/listbyparentid/${id}`)
|
||||
|
||||
// 下单购买APP电子软著
|
||||
export const buyAppGoods = (orderMoneyId:string) => aiShopRequest.post(`/aishop/api/apporder/pay/${orderMoneyId}`)
|
||||
@ -142,7 +142,21 @@ export const appOrderList = (params:any) => aiShopRequest.get(`/aishop/api/appor
|
||||
// 获取app电子软著详情
|
||||
export const appOrderDetail = (appOrderId:any) => aiShopRequest.get(`/aishop/api/apporder/get/${appOrderId}`)
|
||||
// 生成授权书word文件
|
||||
export const authorizeWord = (appOrderId:any,companyName:string) => aiShopRequest.get(`/aishop/api/apporder/create-file/SHOP04/${appOrderId}?name=${companyName}授权书&companyName=${companyName}`)
|
||||
// 企业认证
|
||||
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 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)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
@ -8,7 +8,12 @@ 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, smallClassList } from '../../request/api'
|
||||
import {
|
||||
runSystemList, bigClassList,
|
||||
// twoClass,
|
||||
// fileDetail
|
||||
} from '../../request/api'
|
||||
// import { showImage } from '../../request/request'
|
||||
import './app-edit.css'
|
||||
import {
|
||||
RightOutlined
|
||||
@ -25,7 +30,7 @@ export default function AppEdit() {
|
||||
const appOrderId = pathParams.appOrderId;
|
||||
const [systemList, setSystemList] = useState<any[]>([]); // 运行系统选项
|
||||
const [bigClass, setBigClass] = useState<any[]>([]); // 软件分类(大类)选项
|
||||
const [smallClass, setSmallClass] = useState<any[]>([]); // 软件分类(小类)选项
|
||||
// const [smallClass, setSmallClass] = useState<any[]>([]); // 软件分类(小类)选项
|
||||
// 获取运行系统选项
|
||||
const getRunSystemList = async () => {
|
||||
try {
|
||||
@ -59,17 +64,17 @@ export default function AppEdit() {
|
||||
const getBigClassList = async () => {
|
||||
try {
|
||||
const res: any = await bigClassList();
|
||||
console.log('大类选项', res.map((item: any) => {
|
||||
// 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,
|
||||
}
|
||||
}));
|
||||
setBigClass(res.map((item: any) => {
|
||||
return {
|
||||
label: item.dataId,
|
||||
value: item.dataName,
|
||||
}
|
||||
}))
|
||||
} catch (error: any) {
|
||||
|
||||
@ -85,29 +90,29 @@ export default function AppEdit() {
|
||||
}
|
||||
}
|
||||
// 获取小类选项
|
||||
const getSmallClassList = async (id: string) => {
|
||||
try {
|
||||
const res: any = await smallClassList(id);
|
||||
console.log(res);
|
||||
setSmallClass(res.map((item: any) => {
|
||||
return {
|
||||
label: item.dataId,
|
||||
value: item.dataName,
|
||||
}
|
||||
}))
|
||||
} catch (error: any) {
|
||||
// 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 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);
|
||||
@ -132,16 +137,20 @@ export default function AppEdit() {
|
||||
projOwnerName: '',//著作权人姓名
|
||||
projOwnerIdentity: '',//著作权人证件号
|
||||
projOwnerId: '',//著作权人信息ID
|
||||
getFile: '',//获取文件
|
||||
})
|
||||
// 材料信息
|
||||
const [filesInfo, setFilesInfo] = useState<any>({
|
||||
sourceCodeDocFile: '',//源码
|
||||
softwareDocFile: '',//软件
|
||||
})
|
||||
// 文件想想请
|
||||
// const [fileList, setFileList] = useState<any[]>([]);
|
||||
// 获取详情
|
||||
const getAppOrderDetail = async () => {
|
||||
try {
|
||||
setLoading(true)
|
||||
|
||||
const res: any = await appOrderDetail(appOrderId);
|
||||
console.log('详情', res);
|
||||
setCompanyInfo({
|
||||
@ -163,12 +172,24 @@ export default function AppEdit() {
|
||||
projOwnerName: res.projOwnerName,//著作权人姓名
|
||||
projOwnerIdentity: res.projOwnerIdentity,//著作权人证件号
|
||||
projOwnerId: res.projOwnerId,//著作权人信息ID
|
||||
getFile: res.getFile,//获取文件
|
||||
})
|
||||
setFilesInfo({
|
||||
sourceCodeDocFile: res.sourceCodeDocFile,//源码
|
||||
softwareDocFile: res.softwareDocFile,//软件
|
||||
})
|
||||
setEditProcess(Number(res.appOrderProgress) + 1)
|
||||
// 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) {
|
||||
|
||||
@ -196,9 +217,9 @@ export default function AppEdit() {
|
||||
getRunSystemList()
|
||||
getBigClassList()
|
||||
|
||||
if (appInfo.bigClassify) {
|
||||
getSmallClassList(appInfo.bigClassify)
|
||||
}
|
||||
// if (appInfo.bigClassify) {
|
||||
// getSmallClassList(appInfo.bigClassify)
|
||||
// }
|
||||
}, []);
|
||||
const height = window.innerHeight - 180;
|
||||
return (
|
||||
@ -327,8 +348,14 @@ export default function AppEdit() {
|
||||
appOrderId={appOrderId}
|
||||
bigClass={bigClass}
|
||||
systemList={systemList}
|
||||
smallClass={smallClass}
|
||||
// smallClass={smallClass}
|
||||
// fileList={fileList}
|
||||
appInfo={appInfo}
|
||||
setAppInfo={
|
||||
(val: any) => {
|
||||
setAppInfo(val)
|
||||
}
|
||||
}
|
||||
setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
@ -346,6 +373,11 @@ export default function AppEdit() {
|
||||
<EditAppFiles
|
||||
appOrderId={appOrderId}
|
||||
filesInfo={filesInfo}
|
||||
setFilesInfo={
|
||||
(val: any) => {
|
||||
setFilesInfo(val)
|
||||
}
|
||||
}
|
||||
setEditProcess={
|
||||
(num: number) => {
|
||||
setEditProcess(num)
|
||||
|
@ -21,6 +21,8 @@ interface DataType {
|
||||
appOrderPayMoney: number; //支付金额;
|
||||
appOrderPayTime: string; //支付时间;
|
||||
gmtCreate: string;
|
||||
bigClassifyName: string; //软件分类(大类)
|
||||
subClassifyName: string; //软件分类(子类)
|
||||
}
|
||||
export default function AppElectron() {
|
||||
const nav = useNavigate();
|
||||
@ -33,12 +35,14 @@ export default function AppElectron() {
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
align: 'center',
|
||||
fixed: 'left',
|
||||
width: 90,
|
||||
render: (_text, _record, index) => (page - 1) * 10 + index + 1, // 显示序号,从1开始
|
||||
|
||||
},
|
||||
{
|
||||
title: '项目名称',
|
||||
fixed: 'left',
|
||||
dataIndex: 'appName',
|
||||
key: 'appOrderId',
|
||||
align: 'center',
|
||||
@ -58,13 +62,13 @@ export default function AppElectron() {
|
||||
dataIndex: 'bigClassify',
|
||||
align: 'center',
|
||||
key: 'appOrderId',
|
||||
width: 120,
|
||||
width: 200,
|
||||
ellipsis: {
|
||||
showTitle: true,
|
||||
},
|
||||
render: (text) => (
|
||||
render: (text, record) => (
|
||||
<span>
|
||||
{text ? text : '未完善'}
|
||||
{text ? ` ${record.bigClassifyName} / ${record.subClassifyName}` : '未完善'}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
@ -117,15 +121,19 @@ export default function AppElectron() {
|
||||
// dataIndex: 'contractManagementId',
|
||||
align: 'center',
|
||||
key: 'appOrderId',
|
||||
width: 80,
|
||||
width: 200,
|
||||
// bordeLeft: true,
|
||||
fixed: 'right',
|
||||
render: (record) => (
|
||||
<div style={{
|
||||
cursor: 'pointer',
|
||||
color: '#007FFF',
|
||||
|
||||
|
||||
}} onClick={() => {
|
||||
nav(`/app-edit/${record.appOrderId}`)
|
||||
// console.log(record);
|
||||
|
||||
|
||||
|
||||
}}>编辑</div>
|
||||
)
|
||||
@ -136,8 +144,8 @@ export default function AppElectron() {
|
||||
const height = window.innerHeight - 180;
|
||||
const { state } = useLocation()
|
||||
const keywords = state ? state.appKeyWords : ''
|
||||
const checkStatus = state? state.checkStatus : ''
|
||||
const appOrderStatus = state? state.appOrderStatus : ''
|
||||
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);
|
||||
@ -146,7 +154,7 @@ export default function AppElectron() {
|
||||
const getAppOrderList = async (page: number) => {
|
||||
try {
|
||||
setLoading(true)
|
||||
const res: any = await appOrderList({ page, keywords, rows: 10,checkStatus,appOrderStatus })
|
||||
const res: any = await appOrderList({ page, keywords, rows: 10, checkStatus, appOrderStatus })
|
||||
// console.log(res);
|
||||
// setData(res.rows)
|
||||
// setTotal(res.total)
|
||||
@ -174,7 +182,7 @@ export default function AppElectron() {
|
||||
useEffect(() => {
|
||||
setPage(1)
|
||||
getAppOrderList(1)
|
||||
}, [state,checkStatus,appOrderStatus])
|
||||
}, [state, checkStatus, appOrderStatus])
|
||||
return (
|
||||
|
||||
<div className='appElectionBox' style={{ height: `${height}px` }}>
|
||||
@ -210,6 +218,7 @@ export default function AppElectron() {
|
||||
scroll={{ y: `${height - 150}px` }}
|
||||
dataSource={data.rows}
|
||||
columns={columns}
|
||||
bordered
|
||||
// pagination={{
|
||||
// defaultPageSize: 10, // 设置默认一页显示 5 条数据
|
||||
// }}
|
||||
|
@ -142,7 +142,7 @@ export default function AppCompany(props: any) {
|
||||
|
||||
// };
|
||||
const token = sessionStorage.getItem('token')
|
||||
|
||||
|
||||
const height = window.innerHeight - 460;
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@ -154,15 +154,43 @@ export default function AppCompany(props: any) {
|
||||
form.submit();
|
||||
|
||||
};
|
||||
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 = async (values: any) => {
|
||||
// 处理表单提交逻辑
|
||||
// console.log('表单提交成功', values);
|
||||
// console.log('发过来的数据', props.companyInfo);
|
||||
if (JSON.stringify(values) !== JSON.stringify(props.companyInfo)) {
|
||||
if (!deepCompareObjects(values, props.companyInfo)) {
|
||||
try {
|
||||
setDownLoading(true)
|
||||
const res = await companyAuth(props.appOrderId, {
|
||||
await companyAuth(props.appOrderId, {
|
||||
appOrderId: props.appOrderId,
|
||||
...values
|
||||
})
|
||||
@ -171,7 +199,7 @@ export default function AppCompany(props: any) {
|
||||
})
|
||||
props.setEditProcess(2);
|
||||
setDownLoading(false)
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
} catch (error: any) {
|
||||
setDownLoading(false)
|
||||
if (error.response) {
|
||||
@ -186,17 +214,17 @@ export default function AppCompany(props: any) {
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
} else {
|
||||
props.setEditProcess(2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
useEffect(() => {
|
||||
console.log('认证数据', props.companyInfo);
|
||||
// console.log('认证数据', props.companyInfo);
|
||||
if (props.companyInfo.companyName) {
|
||||
console.log('嘻嘻');
|
||||
// console.log('嘻嘻');
|
||||
form.setFieldsValue({
|
||||
companyName: props.companyInfo.companyName,
|
||||
companyNumber: props.companyInfo.companyNumber,
|
||||
@ -356,15 +384,30 @@ export default function AppCompany(props: any) {
|
||||
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'));
|
||||
setDownLoading(true)
|
||||
const res: any = await authorizeWord(
|
||||
props.appOrderId,
|
||||
form.getFieldValue('companyName'),
|
||||
)
|
||||
setDownLoading(false)
|
||||
window.open(showImage(res.fileId, false));
|
||||
console.log(res);
|
||||
|
||||
|
||||
} else {
|
||||
message.error('请完善企业/机构名称')
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1136,7 +1136,7 @@ export default function Correction() {
|
||||
}
|
||||
</div>
|
||||
|
||||
{/* <a style={{
|
||||
<a style={{
|
||||
display: item.applyStatus == 'APPROVED' && item.type == 'CORRECTION1' && item.projStatus !== 'CLOSE' ? 'unset' : 'none',
|
||||
marginLeft: 10,
|
||||
// 下划线
|
||||
@ -1158,7 +1158,7 @@ export default function Correction() {
|
||||
}}
|
||||
>
|
||||
换名
|
||||
</a> */}
|
||||
</a>
|
||||
<a
|
||||
style={{
|
||||
display: item.applyStatus == 'APPROVED' && item.type == 'CORRECTION2' ? 'unset' : 'none',
|
||||
|
@ -2066,7 +2066,7 @@ export default function Index() {
|
||||
/>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
)}
|
||||
|
||||
|
||||
{/* <MenuWithBottomButtom
|
||||
@ -3843,15 +3843,15 @@ export default function Index() {
|
||||
{appGoodsArray.map((item: any, index: number) => {
|
||||
return (
|
||||
<div className='appGoodsBox'
|
||||
key={item.dataId}
|
||||
key={item.id}
|
||||
style={{
|
||||
background: item.back == 'black' ? '#F9F9F9 ' : '#DDECFF',
|
||||
border: item.dataId == appGoodsId ? '1px solid #f19e31' : '',
|
||||
boxShadow: item.dataId == appGoodsId ? '5px 5px 10px rgb(114, 114, 114)' : '',
|
||||
marginTop: item.dataId == appGoodsId ? -20 : 0,
|
||||
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.dataId)
|
||||
setAppGoodsId(item.id)
|
||||
// console.log('item.dataId: ', item.dataId);
|
||||
|
||||
}}
|
||||
@ -3863,7 +3863,7 @@ export default function Index() {
|
||||
backgroundImage: index !== 1 ? `url(${topblack})` : `url(${topblue})`,
|
||||
}}
|
||||
>
|
||||
{item.dataSummary}
|
||||
{item.title}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -3874,7 +3874,7 @@ export default function Index() {
|
||||
<span>¥</span>
|
||||
<span style={{
|
||||
fontSize: 42,
|
||||
}}>{item.dataName / 100}</span>
|
||||
}}>{item.money / 100}</span>
|
||||
<span>元/件</span>
|
||||
|
||||
</div>
|
||||
@ -3917,6 +3917,8 @@ export default function Index() {
|
||||
} else {
|
||||
console.error(error)
|
||||
}
|
||||
} finally {
|
||||
setBuyLoading(false)
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user