暂存
This commit is contained in:
parent
db099fbc43
commit
3b9c88dfc9
@ -197,7 +197,12 @@ export const addTrademarkApplicant = (params:any) => aiShopRequest.post(`/aishop
|
||||
export const trademarkApplicantList = (params:any) => aiShopRequest.get(`/aishop/api/trademarkuser/listpage`,{params})
|
||||
// 删除商标申请人
|
||||
export const deleteTrademarkApplicant = (trademarkUserId:any) => aiShopRequest.delete(`/aishop/api/trademarkuser/remove/${trademarkUserId}`)
|
||||
|
||||
// 获取申请人详情
|
||||
export const trademarkApplicantDetails = (trademarkUserId:any) => aiShopRequest.get(`/aishop/api/trademarkuser/get/${trademarkUserId}`)
|
||||
// 修改申请人信息
|
||||
export const updateTrademarkApplicant = (trademarkUserId:any,params:any) => aiShopRequest.put(`/aishop/api/trademarkuser/update/${trademarkUserId}`,params)
|
||||
// 提交申请人
|
||||
export const submitTrademarkApplicant = (trademarkId:any,params:any) => aiShopRequest.post(`/aishop/api/trademark/save3/${trademarkId}`,params)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -41,6 +41,13 @@ export default function TrademarkAiEdit() {
|
||||
trademarkTypeDTOS: [],
|
||||
trademarkTypeIds: []
|
||||
})
|
||||
const [editThreeData, setEditThreeData] = useState<any>({
|
||||
trademarkUserId: '',
|
||||
name:''
|
||||
})
|
||||
useEffect(()=>{
|
||||
|
||||
},[])
|
||||
// const [trademarkId, setTrademarkId] = useState(state.trademarkId?state.trademarkId:'');
|
||||
const [loading, setLoading] = useState(false)
|
||||
const getTrademarkDetail = async (trademarkId: string) => {
|
||||
@ -66,6 +73,10 @@ export default function TrademarkAiEdit() {
|
||||
trademarkTypeDTOS: res.trademarkTypeDTOS,
|
||||
trademarkTypeIds: res.trademarkTypeIds
|
||||
})
|
||||
setEditThreeData({
|
||||
trademarkUserId: res.trademarkUserDTO.trademarkUserId,
|
||||
name: res.trademarkUserDTO.name
|
||||
})
|
||||
|
||||
} catch (error: any) {
|
||||
setLoading(false)
|
||||
|
@ -107,30 +107,46 @@ export default function TrademarkMall() {
|
||||
</span>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '申请人',
|
||||
dataIndex: 'leaderName',
|
||||
align: 'center',
|
||||
key: 'appOrderId',
|
||||
width: 150,
|
||||
render: (text) => (
|
||||
<span>
|
||||
{text ? text : '未完善'}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '申请人证件号',
|
||||
dataIndex: 'leaderIdcard',
|
||||
align: 'center',
|
||||
key: 'appOrderId',
|
||||
width: 150,
|
||||
render: (text) => (
|
||||
<span>
|
||||
{text ? text : '未完善'}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
// {
|
||||
// title: '申请人',
|
||||
// // 使用数组形式访问嵌套对象属性
|
||||
// dataIndex: ['trademarkUserDTO', 'name'],
|
||||
// align: 'center',
|
||||
// // 修改 key 保证唯一性
|
||||
// key: 'trademarkUserDTOName',
|
||||
// width: 150,
|
||||
// render: (text) => (
|
||||
// <span>
|
||||
// {text || '-'}
|
||||
// </span>
|
||||
// )
|
||||
// },
|
||||
// // {
|
||||
// // title: '申请人证件号',
|
||||
// // dataIndex: ['trademarkUserDTO', 'name'],
|
||||
// // align: 'center',
|
||||
// // key: 'appOrderId',
|
||||
// // width: 150,
|
||||
// // render: (text) => (
|
||||
// // <span>
|
||||
// // {text ? text : '未完善'}
|
||||
// // </span>
|
||||
// // )
|
||||
// // },
|
||||
// {
|
||||
// title: '联系人',
|
||||
// // 使用数组形式访问嵌套对象属性
|
||||
// dataIndex: ['trademarkUserDTO', 'contactName'],
|
||||
// align: 'center',
|
||||
// // 修改 key 保证唯一性
|
||||
// key: 'trademarkUserDTOContactName',
|
||||
// width: 150,
|
||||
// render: (text) => (
|
||||
// <span>
|
||||
// {text || '-'}
|
||||
// </span>
|
||||
// )
|
||||
// },
|
||||
{
|
||||
title: '操作',
|
||||
// dataIndex: 'contractManagementId',
|
||||
|
@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'
|
||||
import { Button, Form, Input, message, Modal, Radio, Upload, Image, Spin, Cascader, Table } from "antd"
|
||||
import type { TableColumnsType } from 'antd';
|
||||
import { uploadImageUrl, showImage } from '../../../../request/request'
|
||||
import { addTrademarkApplicant, trademarkApplicantList, deleteTrademarkApplicant } from '../../../../request/api'
|
||||
import { addTrademarkApplicant, trademarkApplicantList, deleteTrademarkApplicant, trademarkApplicantDetails, updateTrademarkApplicant, submitTrademarkApplicant } from '../../../../request/api'
|
||||
import {
|
||||
PlusOutlined
|
||||
} from '@ant-design/icons';
|
||||
@ -27,15 +27,130 @@ import useMessage from "antd/es/message/useMessage";
|
||||
// address: string;
|
||||
// trademarkUserId: string;
|
||||
// }
|
||||
const { Search } = Input;
|
||||
export default function EditThree(props: any) {
|
||||
// 申请人信息
|
||||
const [applicantData, setApplicantData] = useState({
|
||||
name: '',
|
||||
trademarkUserId: '',
|
||||
// const [applicantData, setApplicantData] = useState({
|
||||
// name: '',
|
||||
// trademarkUserId: '',
|
||||
// })
|
||||
// 获取联系人详情
|
||||
const getContactDetails = async (trademarkUserId: string) => {
|
||||
try {
|
||||
const res: any = await trademarkApplicantDetails(trademarkUserId)
|
||||
console.log(res);
|
||||
if (res.type == '1') {
|
||||
setApplicantType('1')
|
||||
setQualifications(res.subType)
|
||||
setPersonalIdCard([
|
||||
{
|
||||
uid: res.identityPhoto,
|
||||
name: res.identityPhoto,
|
||||
status: 'done',
|
||||
url: showImage(res.identityPhoto, false)
|
||||
}
|
||||
])
|
||||
setPersonalLicense([
|
||||
{
|
||||
uid: res.businessLicense,
|
||||
name: res.businessLicense,
|
||||
status: 'done',
|
||||
url: showImage(res.businessLicense, false)
|
||||
}
|
||||
])
|
||||
// console.log(res.rangeAddress.split(',')[0]);
|
||||
const rangeAddressArray = res.rangeAddress.split(',');
|
||||
// 检查省份 ID 是否存在
|
||||
if (rangeAddressArray.length > 0) {
|
||||
const provinceId = rangeAddressArray[0];
|
||||
const provinceOption = areaArray.find(option => option.value === provinceId);
|
||||
if (provinceOption) {
|
||||
// 加载该省份下的城市
|
||||
loadCityList([provinceOption]);
|
||||
}
|
||||
}
|
||||
// getLoadProvinces(res.rangeAddress.split(',')[0])
|
||||
// 给formA表单赋值
|
||||
formA.setFieldsValue({
|
||||
identityPhoto: res.identityPhoto,
|
||||
identity: res.identity,
|
||||
businessLicense: res.businessLicense,
|
||||
businessLicenseIdcard: res.businessLicenseIdcard,
|
||||
name: res.name,
|
||||
rangeAddress: res.rangeAddress.split(','),
|
||||
address: res.address,
|
||||
contactName: res.contactName,
|
||||
contactPhone: res.contactPhone,
|
||||
contactEmail: res.contactEmail,
|
||||
contactAddress: res.contactAddress,
|
||||
contactEmailCode: res.contactEmailCode,
|
||||
})
|
||||
|
||||
}
|
||||
if (res.type == '2') {
|
||||
setApplicantType('2')
|
||||
setEnterpriseLicense([
|
||||
{
|
||||
uid: res.businessLicense,
|
||||
name: res.businessLicense,
|
||||
status: 'done',
|
||||
url: showImage(res.businessLicense, false)
|
||||
}
|
||||
])
|
||||
const rangeAddressArray = res.rangeAddress.split(',');
|
||||
// 检查省份 ID 是否存在
|
||||
if (rangeAddressArray.length > 0) {
|
||||
const provinceId = rangeAddressArray[0];
|
||||
const provinceOption = areaArray.find(option => option.value === provinceId);
|
||||
if (provinceOption) {
|
||||
// 加载该省份下的城市
|
||||
loadCityList([provinceOption]);
|
||||
}
|
||||
}
|
||||
formB.setFieldsValue({
|
||||
// identityPhoto: res.identityPhoto,
|
||||
// identity: res.identity,
|
||||
businessLicense: res.businessLicense,
|
||||
name: res.name,
|
||||
businessLicenseIdcard: res.businessLicenseIdcard,
|
||||
rangeAddress: res.rangeAddress.split(','),
|
||||
address: res.address,
|
||||
contactName: res.contactName,
|
||||
contactPhone: res.contactPhone,
|
||||
contactEmail: res.contactEmail,
|
||||
contactAddress: res.contactAddress,
|
||||
contactEmailCode: res.contactEmailCode,
|
||||
})
|
||||
|
||||
}
|
||||
} catch (error: any) {
|
||||
// setAddLoading(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 {
|
||||
// setAddLoading(false)
|
||||
}
|
||||
}
|
||||
const [trademarkUserId, setTrademarkUserId] = useState('')
|
||||
const [selectPeopleModal, setSelectPeopleModal] = useState(false)
|
||||
const [selectedRowKey, setSelectedRowKey] = useState('2');
|
||||
const [selectedRowKey, setSelectedRowKey] = useState('');
|
||||
// 临时选择的申请人信息
|
||||
const [nowSelectPeopleData, setNowSelectPeopleData] = useState({
|
||||
trademarkUserId: '',
|
||||
name: '',
|
||||
});
|
||||
// 确定选择的申请人信息
|
||||
const [confirmSelectPeopleData, setConfirmSelectPeopleData] = useState({
|
||||
trademarkUserId: '',
|
||||
name: '',
|
||||
});
|
||||
const [disabled, setDisabled] = useState(false)
|
||||
const [showBtn, setShowBtn] = useState(true)
|
||||
const columns: TableColumnsType<any> = [
|
||||
@ -99,12 +214,13 @@ export default function EditThree(props: any) {
|
||||
setDisabled(false)
|
||||
setAddPeopleModal(true)
|
||||
setShowBtn(true)
|
||||
|
||||
getContactDetails(record.trademarkUserId)
|
||||
}}>编辑</Button>
|
||||
<Button type="link" onClick={() => {
|
||||
setDisabled(true)
|
||||
setAddPeopleModal(true)
|
||||
setTrademarkUserId(record.trademarkUserId)
|
||||
getContactDetails(record.trademarkUserId)
|
||||
setShowBtn(false)
|
||||
}}>查看</Button>
|
||||
<Button type="link" onClick={() => {
|
||||
@ -119,7 +235,8 @@ export default function EditThree(props: any) {
|
||||
const [page, setPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [listLoading, setListLoading] = useState(false);
|
||||
const [selectKeyWords, setSelectKeyWords] = useState('');
|
||||
const [nowSearchKeyWords, setNowSearchKeyWords] = useState('');
|
||||
const [searchKeyWords, setSearchKeyWords] = useState('');
|
||||
const [tableData, setTableData] = useState<any>([])
|
||||
// 获取申请人列表
|
||||
const getTrademarkApplicantList = async (page: number) => {
|
||||
@ -128,10 +245,11 @@ export default function EditThree(props: any) {
|
||||
const res: any = await trademarkApplicantList({
|
||||
page,
|
||||
rows: 5,
|
||||
keywords: selectKeyWords
|
||||
keywords: searchKeyWords
|
||||
})
|
||||
|
||||
if (res.rows.length <= 0 && page > 1) {
|
||||
setPage(page - 1)
|
||||
getTrademarkApplicantList(page - 1)
|
||||
} else {
|
||||
setTableData(res.rows)
|
||||
@ -154,12 +272,16 @@ export default function EditThree(props: any) {
|
||||
setListLoading(false)
|
||||
}
|
||||
}
|
||||
// 加载省份数据
|
||||
useEffect(() => {
|
||||
const loadProvinces = async () => {
|
||||
getTrademarkApplicantList(1)
|
||||
setPage(1)
|
||||
}, [searchKeyWords])
|
||||
|
||||
// 加载省份数据
|
||||
const getLoadProvinces = async (cityId: string) => {
|
||||
try {
|
||||
// 假设传入空字符串获取省份列表
|
||||
const res: any = await getCityList('0');
|
||||
const res: any = await getCityList(cityId);
|
||||
const provinces = res.map((province: any) => ({
|
||||
value: province.areaId,
|
||||
label: province.areaName,
|
||||
@ -178,9 +300,9 @@ export default function EditThree(props: any) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
loadProvinces();
|
||||
}
|
||||
useEffect(() => {
|
||||
getLoadProvinces('0')
|
||||
}, []);
|
||||
|
||||
const [messageApi, contextHolder] = useMessage();
|
||||
@ -224,7 +346,36 @@ export default function EditThree(props: any) {
|
||||
console.log(values);
|
||||
console.log(qualifications);
|
||||
if (trademarkUserId) {
|
||||
alert('编辑')
|
||||
try {
|
||||
setAddLoading(true)
|
||||
const newValues = { ...values };
|
||||
newValues.rangeAddress = newValues.rangeAddress.join(',');
|
||||
await updateTrademarkApplicant(trademarkUserId, {
|
||||
type: applicantType,
|
||||
subType: qualifications,
|
||||
// trademarkId: props.trademarkId,
|
||||
nationality: '大陆',
|
||||
...newValues
|
||||
})
|
||||
getTrademarkApplicantList(page)
|
||||
setAddLoading(false)
|
||||
setAddPeopleModal(false)
|
||||
|
||||
} catch (error: any) {
|
||||
setAddLoading(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 {
|
||||
setAddLoading(false)
|
||||
}
|
||||
|
||||
} else {
|
||||
try {
|
||||
setAddLoading(true)
|
||||
@ -267,7 +418,36 @@ export default function EditThree(props: any) {
|
||||
const onFinishB = async (values: any) => {
|
||||
console.log(values);
|
||||
if (trademarkUserId) {
|
||||
alert('编辑')
|
||||
// alert('编辑')
|
||||
try {
|
||||
setAddLoading(true)
|
||||
const newValues = { ...values };
|
||||
newValues.rangeAddress = newValues.rangeAddress.join(',');
|
||||
await updateTrademarkApplicant(trademarkUserId, {
|
||||
type: applicantType,
|
||||
// subType: qualifications,
|
||||
// trademarkId: props.trademarkId,
|
||||
nationality: '大陆',
|
||||
...newValues
|
||||
})
|
||||
getTrademarkApplicantList(page)
|
||||
setAddLoading(false)
|
||||
setAddPeopleModal(false)
|
||||
|
||||
} catch (error: any) {
|
||||
setAddLoading(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 {
|
||||
setAddLoading(false)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
setAddLoading(true)
|
||||
@ -443,11 +623,39 @@ export default function EditThree(props: any) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const handleSubmit = () => {
|
||||
const [subLoading, setSubLoading] = useState(false)
|
||||
const handleSubmit = async () => {
|
||||
// formA.submit();
|
||||
// props.setEditProcess(4);
|
||||
// console.log(confirmSelectPeopleData);
|
||||
if (confirmSelectPeopleData.name) {
|
||||
console.log(confirmSelectPeopleData);
|
||||
try {
|
||||
setSubLoading(true)
|
||||
await submitTrademarkApplicant(props.trademarkId, {
|
||||
trademarkUserId: confirmSelectPeopleData.trademarkUserId,
|
||||
})
|
||||
setSubLoading(false)
|
||||
props.setEditProcess(4);
|
||||
|
||||
} catch (error: any) {
|
||||
setSubLoading(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 {
|
||||
setSubLoading(false)
|
||||
}
|
||||
} else {
|
||||
message.error('请选择申请人')
|
||||
}
|
||||
|
||||
};
|
||||
//重置新建申请人信息
|
||||
const init = () => {
|
||||
@ -461,6 +669,7 @@ export default function EditThree(props: any) {
|
||||
}
|
||||
|
||||
return (
|
||||
<Spin tip="正在提交,请稍后..." size="small" spinning={subLoading}>
|
||||
<div className='editOneTwo'>
|
||||
{contextHolder}
|
||||
|
||||
@ -487,8 +696,39 @@ export default function EditThree(props: any) {
|
||||
// color: 'black'
|
||||
}}
|
||||
placeholder="选择申请人"
|
||||
value={applicantData.name}
|
||||
value={confirmSelectPeopleData.name}
|
||||
></Input>
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
width: 290,
|
||||
height: '46px',
|
||||
top: '0',
|
||||
right: '0',
|
||||
// background: 'skyblue',
|
||||
textAlign: 'right',
|
||||
// lineHeight: '42px',
|
||||
cursor: 'pointer',
|
||||
paddingRight: '10px',
|
||||
color: '#1F79FF',
|
||||
display: confirmSelectPeopleData.name ? 'none' : 'unset'
|
||||
}}
|
||||
onClick={() => {
|
||||
setPage(1)
|
||||
setSelectPeopleModal(true)
|
||||
getTrademarkApplicantList(1)
|
||||
setNowSelectPeopleData({
|
||||
trademarkUserId: '',
|
||||
name: '',
|
||||
})
|
||||
if (confirmSelectPeopleData.trademarkUserId) {
|
||||
setSelectedRowKey(confirmSelectPeopleData.trademarkUserId)
|
||||
} else {
|
||||
setSelectedRowKey('')
|
||||
}
|
||||
}}
|
||||
>
|
||||
选择
|
||||
</div>
|
||||
<div style={{
|
||||
position: 'absolute',
|
||||
width: 290,
|
||||
@ -498,20 +738,58 @@ export default function EditThree(props: any) {
|
||||
// background: 'skyblue',
|
||||
// textAlign: 'right',
|
||||
// lineHeight: '42px',
|
||||
cursor: 'pointer',
|
||||
// cursor: 'pointer',
|
||||
paddingRight: '10px',
|
||||
color: '#1F79FF',
|
||||
display: confirmSelectPeopleData.name ? 'unset' : 'none',
|
||||
}}
|
||||
// onClick={() => {
|
||||
// setPage(1)
|
||||
// setSelectPeopleModal(true)
|
||||
// getTrademarkApplicantList(1)
|
||||
// setNowSelectPeopleData({
|
||||
// trademarkUserId: '',
|
||||
// name: '',
|
||||
// })
|
||||
// if (confirmSelectPeopleData.trademarkUserId) {
|
||||
// setSelectedRowKey(confirmSelectPeopleData.trademarkUserId)
|
||||
// } else {
|
||||
// setSelectedRowKey('')
|
||||
// }
|
||||
// }}
|
||||
>
|
||||
<div style={{
|
||||
// background: 'skyblue',
|
||||
textAlign: 'right'
|
||||
}}>
|
||||
<span style={{
|
||||
// background: 'red',
|
||||
height: 46,
|
||||
// lineHeight:'46px',
|
||||
display: 'inline-block',
|
||||
padding: '0 10px',
|
||||
cursor: 'pointer'
|
||||
}}
|
||||
|
||||
onClick={() => {
|
||||
setPage(1)
|
||||
setSelectPeopleModal(true)
|
||||
getTrademarkApplicantList(1)
|
||||
}}
|
||||
>
|
||||
setNowSelectPeopleData({
|
||||
trademarkUserId: '',
|
||||
name: '',
|
||||
})
|
||||
if (confirmSelectPeopleData.trademarkUserId) {
|
||||
setSelectedRowKey(confirmSelectPeopleData.trademarkUserId)
|
||||
} else {
|
||||
setSelectedRowKey('')
|
||||
}
|
||||
}}>重选</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='addPeopleBox' onClick={() => {
|
||||
setAddPeopleModal(true)
|
||||
setDisabled(false)
|
||||
@ -561,7 +839,7 @@ export default function EditThree(props: any) {
|
||||
}}
|
||||
>下一步</Button>
|
||||
</div>
|
||||
<Modal title="新建申请人"
|
||||
<Modal title={disabled ? '查看申请人' : trademarkUserId ? '编辑申请人' : '新建申请人'}
|
||||
destroyOnClose
|
||||
centered
|
||||
open={addPeopleModal}
|
||||
@ -888,6 +1166,7 @@ export default function EditThree(props: any) {
|
||||
cursor: 'pointer',
|
||||
padding: '2px 5px',
|
||||
backgroundColor: 'rgba(168, 168, 168, 0.5)',
|
||||
display: disabled ? 'none' : 'unset'
|
||||
}}
|
||||
onClick={() => {
|
||||
setPersonalLicense([])
|
||||
@ -1712,15 +1991,45 @@ export default function EditThree(props: any) {
|
||||
okText='确定'
|
||||
cancelText='取消'
|
||||
onCancel={() => { setSelectPeopleModal(false) }}
|
||||
onOk={() => {
|
||||
if (nowSelectPeopleData.name) {
|
||||
setConfirmSelectPeopleData(nowSelectPeopleData)
|
||||
|
||||
}
|
||||
setSelectPeopleModal(false)
|
||||
// console.log(nowSelectPeopleData);
|
||||
|
||||
}}
|
||||
width={1200} >
|
||||
<div>
|
||||
<div style={{
|
||||
marginBottom: 10
|
||||
}}>
|
||||
<Button type='primary' onClick={() => {
|
||||
setAddPeopleModal(true)
|
||||
setDisabled(false)
|
||||
setTrademarkUserId('')
|
||||
setShowBtn(true)
|
||||
}}>新建申请人</Button>
|
||||
|
||||
<Search placeholder="输入关键字"
|
||||
value={nowSearchKeyWords}
|
||||
onSearch={() => {
|
||||
setSearchKeyWords(nowSearchKeyWords)
|
||||
}}
|
||||
onChange={(e) => {
|
||||
setNowSearchKeyWords(e.target.value)
|
||||
if (e.target.value === '') {
|
||||
setSearchKeyWords('')
|
||||
}
|
||||
}}
|
||||
className='searchInputmedia'
|
||||
style={{
|
||||
// maxWidth: '200px',
|
||||
width: '170px',
|
||||
height: '31px',
|
||||
marginLeft: '5px'
|
||||
}}
|
||||
allowClear
|
||||
/>
|
||||
</div>
|
||||
<Spin tip='正在加载' size="small" spinning={listLoading} >
|
||||
<Table<any>
|
||||
@ -1755,6 +2064,10 @@ export default function EditThree(props: any) {
|
||||
const isOperationColumn = (event.target as HTMLElement).closest('.ant-table-cell-operations');
|
||||
if (!isOperationColumn) {
|
||||
setSelectedRowKey(record.trademarkUserId);
|
||||
setNowSelectPeopleData({
|
||||
trademarkUserId: record.trademarkUserId,
|
||||
name: record.name,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@ -1799,5 +2112,6 @@ export default function EditThree(props: any) {
|
||||
删除后无记录?确定删除吗?
|
||||
</Modal>
|
||||
</div >
|
||||
</Spin>
|
||||
)
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
// GetProp,
|
||||
UploadProps,
|
||||
} from "antd";
|
||||
import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
import TextArea from "antd/es/input/TextArea";
|
||||
import StepProjEdit from "../../components/step/StepProjEdit.tsx";
|
||||
@ -18,7 +19,7 @@ import CardProjLoading from "../../components/card/CardProjLoading.tsx";
|
||||
import CardProjResult from "../../components/card/CardProjResult.tsx";
|
||||
import CardProjDownload from "../../components/card/CardProjDownload.tsx";
|
||||
import CardProjJump from "../../components/card/CardProjJump.tsx";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useState, useContext } from "react";
|
||||
import { Axios, get, put, post, uploadFileUrl, downloadUrl } from "../../util/AjaxUtils.ts";
|
||||
import { EditStepEnum, IProjEdit } from "../../interfaces/card/ICardProj.ts";
|
||||
import { MIN_MOD_SIZE } from "./edit/ProjConfigModList.tsx";
|
||||
@ -53,7 +54,9 @@ import ING from '../../static/status/ING.gif'
|
||||
// desc: string
|
||||
// }
|
||||
// type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0];
|
||||
import { useDispatch } from 'react-redux'
|
||||
export default function ProjEditAll() {
|
||||
const globalDispatchContext = useContext(GlobalDispatchContext);
|
||||
// 是否显示下载安装包模块
|
||||
const [showPkg, setShowPkg] = useState(false)
|
||||
// 是否显示下载演示视频
|
||||
@ -62,6 +65,29 @@ export default function ProjEditAll() {
|
||||
const [pkgStatus, setPkgStatus] = useState('')
|
||||
// 视频模块生成状态
|
||||
const [videoStatus, setVideoStatus] = useState('')
|
||||
const dispath = useDispatch()
|
||||
// 获取套餐包数量
|
||||
const getMyPackNum = () => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/servicepkg/packageorder/count/self`,
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess({ data }) {
|
||||
dispath({
|
||||
type: 'upPackNum',
|
||||
val: {
|
||||
ALL: data.ALL,
|
||||
MATERIAL: data.MATERIAL,
|
||||
}
|
||||
})
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 点击刷新页面数据获取安装包状态
|
||||
const upData = () => {
|
||||
get<any>({
|
||||
@ -437,14 +463,17 @@ export default function ProjEditAll() {
|
||||
setConfigArray(configArray);
|
||||
setIsConfigEdited(isConfig);
|
||||
}
|
||||
|
||||
const [claimer, setClaimer] = useState<any>(); //认领人
|
||||
// 退款弹窗显示
|
||||
const [refundModal, setRefundModal] = useState(false)
|
||||
const renderData = () => {
|
||||
get<any>({
|
||||
messageApi: messageApi,
|
||||
// url: `/api/proj/get/${pathParams.projId}`,
|
||||
url: `/api/proj/claim/get/${pathParams.projId}`,
|
||||
onSuccess({ data }) {
|
||||
// console.log('嘻嘻', data);
|
||||
// console.log('详情', data);
|
||||
setClaimer(data.claimer);
|
||||
setcertificate(data.certificates)
|
||||
setprogress(data.progress)
|
||||
// console.log('状态判断', data.pay.chargeAdditionals);
|
||||
@ -879,6 +908,21 @@ export default function ProjEditAll() {
|
||||
|
||||
</div>
|
||||
<div className="btn-container">
|
||||
<Button size="large" style={{
|
||||
width: '200px',
|
||||
height: '40px',
|
||||
fontSize: '16px',
|
||||
backgroundColor: 'white',
|
||||
display: claimer ? 'none' : 'unset',
|
||||
background: 'red',
|
||||
color: 'white',
|
||||
marginRight: 10
|
||||
// color: '#A0A0A0',
|
||||
// border: 'none',
|
||||
}} onClick={() => {
|
||||
console.log(claimer);
|
||||
setRefundModal(true)
|
||||
}}>退款</Button>
|
||||
<Button size="large" style={{
|
||||
width: '200px',
|
||||
height: '40px',
|
||||
@ -1288,6 +1332,64 @@ export default function ProjEditAll() {
|
||||
<div style={{ marginTop: 10 }}>{progress == 'PRODUCTION' ? '您申请的软著正在制作中,预计一日内完成' : progress == 'SUBMIT_FOR_REVIEW' ? '您申请的软著已提交国家版权中心,预计60个工作日内下证' : progress == 'DONE' ? '您申请的软著已完成,请在页面证书下载处下载' : '您申请的软著等待制作中,预计两日内完成'}</div>
|
||||
</div>
|
||||
</Modal>
|
||||
< Modal
|
||||
centered
|
||||
title="提示"
|
||||
open={refundModal}
|
||||
destroyOnClose={true}
|
||||
|
||||
onCancel={() => {
|
||||
setRefundModal(false);
|
||||
}
|
||||
}
|
||||
// 确定按钮为红色,显示文字为确认
|
||||
okButtonProps={{
|
||||
style: {
|
||||
backgroundColor: '#ff4d4f',
|
||||
borderColor: '#ff4d4f',
|
||||
color: '#fff',
|
||||
},
|
||||
}}
|
||||
okText="确认"
|
||||
onOk={() => {
|
||||
// refund()
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/refund/apply/save-full-proj/${pathParams.projId}`,
|
||||
// body: {
|
||||
// projId: refunProjId
|
||||
// },
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
reloadUser(messageApi, globalDispatchContext).then(() => {
|
||||
// nav(-1)
|
||||
// messageApi.success('退款成功');
|
||||
message.success('退款成功');
|
||||
// setTimeout(() => {
|
||||
setRefundModal(false);
|
||||
nav(-1)
|
||||
getMyPackNum()
|
||||
// }, 500);
|
||||
// setShowBuyPicIng(true);
|
||||
// setBuyModalShow(false);
|
||||
// setShowBuyPicAgain(false)
|
||||
});
|
||||
|
||||
},
|
||||
// onError(error) {
|
||||
// messageApi.error(error.message);
|
||||
// },
|
||||
onFinally() {
|
||||
setRefundModal(false);
|
||||
}
|
||||
})
|
||||
}}
|
||||
cancelText="取消"
|
||||
>
|
||||
确定退款吗?
|
||||
</ Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue
Block a user