This commit is contained in:
lyp 2025-05-22 17:59:53 +08:00
parent 6eac101546
commit c178908cde
9 changed files with 611 additions and 266 deletions

View File

@ -45,14 +45,15 @@ export default function AiShopDetail(props: any) {
setLoading(false) setLoading(false)
} }
} }
const [disabled, setDisabled] = useState(false) // 购买按钮是否禁用
// 创建订单 // 创建订单
const createOrderFun = async (goodsId: string) => { const createOrderFun = async (goodsId: string) => {
try { try {
setDisabled(true)
// setPayLoading(true) // setPayLoading(true)
const res: any = await createOrder(goodsId) const res: any = await createOrder(goodsId)
// console.log(res); // console.log(res);
confirmPaymentFun(res.data) confirmPaymentFun(res.data)
} catch (error: any) { } catch (error: any) {
if (error.response) { if (error.response) {
@ -69,6 +70,7 @@ export default function AiShopDetail(props: any) {
// 确认支付 // 确认支付
const confirmPaymentFun = async (orderId: string) => { const confirmPaymentFun = async (orderId: string) => {
try { try {
setDisabled(true)
// setLoading(true) // setLoading(true)
const res: any = await confirmPayment(orderId) const res: any = await confirmPayment(orderId)
console.log(res); console.log(res);
@ -80,6 +82,8 @@ export default function AiShopDetail(props: any) {
setBuyTipsModal(false) setBuyTipsModal(false)
props.closeModal() props.closeModal()
props.upData() props.upData()
setDisabled(false)
}, 1000) }, 1000)
// props.closeModal() // props.closeModal()
// props.upData() // props.upData()
@ -319,6 +323,7 @@ export default function AiShopDetail(props: any) {
}); });
} }
}} }}
></Button> ></Button>
</div> </div>
</Spin> </Spin>
@ -331,9 +336,13 @@ export default function AiShopDetail(props: any) {
onCancel={() => { onCancel={() => {
setBuyTipsModal(false) setBuyTipsModal(false)
}} }}
// 禁用确定按钮
okButtonProps={{ disabled: disabled }}
onOk={() => { onOk={() => {
// alert(goodsId) // alert(goodsId)
// alert(props.orderId) // alert(props.orderId)
// 按钮禁用
if (props.orderId) { if (props.orderId) {
confirmPaymentFun(props.orderId) confirmPaymentFun(props.orderId)

View File

@ -65,8 +65,10 @@ type propsInfo = {
setValue?: any setValue?: any
isShow?: boolean isShow?: boolean
closeModal?: any closeModal?: any
showNow?: boolean
}; };
export default function BelongPeople(props: propsInfo) { export default function BelongPeople(props: propsInfo) {
const showNow = props.showNow == false?false:true
// const [propsShow,setPropsShow] = useState(props.belongPeopleInfo.authorId?true) // const [propsShow,setPropsShow] = useState(props.belongPeopleInfo.authorId?true)
// const nav = useNavigate(); // const nav = useNavigate();
// const pathParams = useParams(); // const pathParams = useParams();
@ -414,6 +416,9 @@ export default function BelongPeople(props: propsInfo) {
setAreaArray(options); setAreaArray(options);
// console.log('省市2', options); // console.log('省市2', options);
}); });
// console.log('嘻嘻嘻',props.showNow);
// console.log(showNow);
}, []) }, [])
@ -527,6 +532,9 @@ export default function BelongPeople(props: propsInfo) {
/> />
</div> */} </div> */}
</div> </div>
<div style={{
display:showNow? 'unset' : 'none',
}}>
<div className='showInfo' style={{ display: props.isShow ? 'block' : 'none' }} > <div className='showInfo' style={{ display: props.isShow ? 'block' : 'none' }} >
{authorName ? (<> {authorName ? (<>
<div style={{ display: 'flex', alignItems: 'center' }}> <div style={{ display: 'flex', alignItems: 'center' }}>
@ -576,6 +584,7 @@ export default function BelongPeople(props: propsInfo) {
</>)} </>)}
</div> </div>
</div>
<Spin tip="加载中..." spinning={isLoading}> <Spin tip="加载中..." spinning={isLoading}>
<div className='belongPeople-bot'> <div className='belongPeople-bot'>
{/* 表格 */} {/* 表格 */}

View File

@ -7,7 +7,8 @@ import {
// Tag, // Tag,
message, Spin, message, Spin,
Empty, Empty,
Dropdown Dropdown,
Button
} from 'antd'; } from 'antd';
// import { // import {
// // MenuFoldOutlined, // // MenuFoldOutlined,
@ -1065,6 +1066,7 @@ export default function Correction() {
{item.correctionType == 'CODE' ? '代码' : item.correctionType == 'MANUAL' ? '操作手册' : item.correctionType == 'ALL' ? '全部补正' : ''} {item.correctionType == 'CODE' ? '代码' : item.correctionType == 'MANUAL' ? '操作手册' : item.correctionType == 'ALL' ? '全部补正' : ''}
</div> </div>
</div> </div>
<div style={{ <div style={{
display: 'flex', display: 'flex',
}}> }}>
@ -1133,6 +1135,44 @@ export default function Correction() {
}) })
} }
</div> </div>
<Button style={{
display: item.applyStatus == 'APPROVED' && item.type == 'CORRECTION1' ? 'unset' : 'none',
}}
onClick={() => {
console.log(item.projCorrectionApplyId);
nav(
`/proj-new/MATERIAL?pkg=&videoDemo=`,
{
state: {
type:'replace',
price: 3800
}
}
);
}}
>
</Button>
<Button
style={{
display: item.applyStatus == 'APPROVED' && item.type == 'CORRECTION2' ? 'unset' : 'none',
}}
onClick={() => {
console.log(item.projCorrectionApplyId);
nav(
`/proj-new/MATERIAL?pkg=&videoDemo=`,
{
state: {
type:'copy',
}
}
);
}}
>
</Button>
</div> </div>
<div className='projBoxBot'> <div className='projBoxBot'>
<div className='boxTopL'> <div className='boxTopL'>

View File

@ -130,16 +130,19 @@ export default function ProductRelease() {
setData((prevData: any) => { setData((prevData: any) => {
return prevData.map((dataItem: any) => { return prevData.map((dataItem: any) => {
if (dataItem.goodsId === sellId) { if (dataItem.goodsId == offId) {
return { return {
...dataItem, ...dataItem,
goodsStatus: 0 goodsStatus: 0
}; };
} }
return dataItem; return dataItem;
}); });
}) })
// console.log('setData', data);
setOffModalOpen(false) setOffModalOpen(false)
messageApi.open({ messageApi.open({
type: 'success', type: 'success',
@ -177,7 +180,7 @@ export default function ProductRelease() {
if (dataItem.goodsId === sellId) { if (dataItem.goodsId === sellId) {
return { return {
...dataItem, ...dataItem,
goodsStatus: '1' goodsStatus: 1
}; };
} }
return dataItem; return dataItem;
@ -521,7 +524,7 @@ export default function ProductRelease() {
</div> </div>
<div className='goodsImg'> <div className='goodsImg'>
<Image src={showImage(item.goodsPhoto, false)} width={'100%'} preview={{ <Image src={showImage(item.goodsLocalPhoto, false)} width={'100%'} preview={{
mask: '查看', mask: '查看',
}} }}
@ -663,6 +666,8 @@ export default function ProductRelease() {
setEditModalOpen(false); setEditModalOpen(false);
}} }}
centered centered
// 点击遮罩不允许关闭
maskClosable={false}
> >
{/* <div style={{ height: `${height - 20}px`, overflow: 'auto', borderTop: '1px solid #e8e8e8' }}> */} {/* <div style={{ height: `${height - 20}px`, overflow: 'auto', borderTop: '1px solid #e8e8e8' }}> */}
<EditModal closeModal={() => { setEditModalOpen(false) }} <EditModal closeModal={() => { setEditModalOpen(false) }}

View File

@ -13,6 +13,8 @@ import {
UploadFile, UploadFile,
Image Image
} from "antd"; } from "antd";
import { get } from '../../../../util/AjaxUtils'
import BelongPeople from '../../../../components/BelongPeople/BelongPeople.tsx'
import { import {
ArrowRightOutlined ArrowRightOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
@ -50,6 +52,34 @@ interface Option {
} }
type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0]; type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0];
export default function EditModal(props: any) { export default function EditModal(props: any) {
const showNow = false
const [belongModal, setBelongModal] = useState(false)
const [belongPeopleInfo, setBelongPeopleInfo] = useState({
authorName: '',
authorType: '',
authorIdCardType: '',
authorIdCard: '',
authorCrcAccount: 0,
authorId: '',
authorProvinceCity: '',
authorCrcAccountPassword: '',
authorCrcAccountUsername: ''
})
const setValue = (value: string) => {
form.setFieldsValue({
peopleName: value
})
}
useEffect(() => {
console.log(belongPeopleInfo);
form.setFieldsValue({
peopleClass: belongPeopleInfo.authorType == '' ? null : belongPeopleInfo.authorType == 'PERSONAL' ? '1' : belongPeopleInfo.authorType == 'ORGANIZATION' ? '2' : null,
// 如果belongPeopleInfo.authorIdCardType == 'ID_CARD',则papersType的值是certificateTypeList中;lale为居民身份证的那个value 如果belongPeopleInfo.authorIdCardType == 'BUSINESS_LICENSE',则papersType的值是certificateTypeList中;lale为统一信用代码证的那个value 如果为空的话值为null
papersType: belongPeopleInfo.authorIdCardType == ''? null : belongPeopleInfo.authorIdCardType == 'ID_CARD'? certificateTypeList.find((item:any) => item.label == '居民身份证')?.value : belongPeopleInfo.authorIdCardType == 'BUSINESS_LICENSE'? certificateTypeList.find((item:any) => item.label == '统一信用代码证')?.value : null,
papersNum: belongPeopleInfo.authorIdCard,
})
}, [belongPeopleInfo])
const token = sessionStorage.getItem('token') const token = sessionStorage.getItem('token')
const [startTime, setStartTime] = useState<any>(undefined); const [startTime, setStartTime] = useState<any>(undefined);
useEffect(() => { useEffect(() => {
@ -128,7 +158,7 @@ export default function EditModal(props: any) {
goodsName: '',// 软件名称 goodsName: '',// 软件名称
// goodsNumber: '',// 软著编号 // goodsNumber: '',// 软著编号
goodsPrice: 0,// 软著价格 goodsPrice: 0,// 软著价格
goodsPhoto: '',// 软著图片 goodsLocalPhoto: '',// 软著图片
// goodsSubName: '',// 软著简称 // goodsSubName: '',// 软著简称
goodsType: '',// 软著类型 goodsType: '',// 软著类型
// goodsVersion: '',// 软著版本 // goodsVersion: '',// 软著版本
@ -211,6 +241,18 @@ export default function EditModal(props: any) {
// console.log('省市2', options); // console.log('省市2', options);
// }); // });
getProvinceListDate() getProvinceListDate()
get<any>({
messageApi,
url: 'api/user-info/get-self',
onSuccess({ data }) {
// console.log('个人信息', data);
// 给表单peoplePhone赋值
form.setFieldsValue({
peoplePhone: data.contactPhone,
})
}
})
}, []) }, [])
// 加载城市列表 // 加载城市列表
const loadCityList = async (selectedOptions: Option[]) => { const loadCityList = async (selectedOptions: Option[]) => {
@ -271,7 +313,7 @@ export default function EditModal(props: any) {
form.setFieldsValue({ form.setFieldsValue({
name: res.goodsName, name: res.goodsName,
smallname: res.goodsSubName, smallname: res.goodsSubName,
imageUrl: res.goodsPhoto, imageUrl: res.goodsLocalPhoto,
number: res.goodsNumber, number: res.goodsNumber,
sv: res.goodsVersion, sv: res.goodsVersion,
textArea: res.goodsDescription, textArea: res.goodsDescription,
@ -294,11 +336,11 @@ export default function EditModal(props: any) {
setStartTime(moment(res.goodsGetTime)) setStartTime(moment(res.goodsGetTime))
// 给logoImgArray赋值 // 给logoImgArray赋值
logoImgArray.splice(0, 1, { logoImgArray.splice(0, 1, {
uid: res.goodsPhoto, uid: res.goodsLocalPhoto,
name: 'xixi.png', name: 'xixi.png',
status: 'done', status: 'done',
url: showImage(res.goodsPhoto, false), url: showImage(res.goodsLocalPhoto, false),
thumbUrl: showImage(res.goodsPhoto, false), thumbUrl: showImage(res.goodsLocalPhoto, false),
}) })
} catch (error: any) { } catch (error: any) {
@ -437,6 +479,8 @@ export default function EditModal(props: any) {
label: item.dataName, label: item.dataName,
} }
})) }))
} catch (error: any) { } catch (error: any) {
if (error.response) { if (error.response) {
@ -480,6 +524,7 @@ export default function EditModal(props: any) {
</div> </div>
<div className="form-body" > <div className="form-body" >
<Form <Form
name="basic" name="basic"
form={form} form={form}
layout="vertical" layout="vertical"
@ -494,6 +539,9 @@ export default function EditModal(props: any) {
// console.log(logoImgArray); // console.log(logoImgArray);
// const formattedTime = dayjs(value.time).format('YYYY-MM-DD'); // const formattedTime = dayjs(value.time).format('YYYY-MM-DD');
// console.log('嘻嘻', formattedTime); // console.log('嘻嘻', formattedTime);
// console.log('value', value);
// return
setPromptModal(true); setPromptModal(true);
setDate({ setDate({
// goodsDescription: value.textArea, //软著说明 // goodsDescription: value.textArea, //软著说明
@ -511,7 +559,7 @@ export default function EditModal(props: any) {
goodsName: value.name,// 软件名称 goodsName: value.name,// 软件名称
// goodsNumber: value.number,// 软著编号 // goodsNumber: value.number,// 软著编号
goodsPrice: value.price,// 软著价格 goodsPrice: value.price,// 软著价格
goodsPhoto: logoImgArray[0].uid,// 软著图片 goodsLocalPhoto: logoImgArray[0].uid,// 软著图片
// goodsSubName: value.smallname,// 软著简称 // goodsSubName: value.smallname,// 软著简称
goodsType: value.class.join(','),// 软著类型 goodsType: value.class.join(','),// 软著类型
// goodsVersion: value.sv,// 软著版本 // goodsVersion: value.sv,// 软著版本
@ -1169,6 +1217,13 @@ export default function EditModal(props: any) {
<div className='editModal-title' style={{ marginTop: 30 }}> <div className='editModal-title' style={{ marginTop: 30 }}>
<div className='editModal-title-box'></div> <div className='editModal-title-box'></div>
<div className='editModal-title-name'></div> <div className='editModal-title-name'></div>
<Button type="primary"
onClick={() => {
setBelongModal(true)
}}
style={{
marginLeft: 10,
}}></Button>
</div> </div>
<Row gutter={15}> <Row gutter={15}>
@ -1398,6 +1453,20 @@ export default function EditModal(props: any) {
</div> </div>
</Modal> </Modal>
<Modal title="选择所属者"
destroyOnClose
centered
open={belongModal}
width={1200}
footer={null}
onCancel={() => {
setBelongModal(false)
}}>
<BelongPeople showNow={showNow} closeModal={() => { setBelongModal(false) }} setBelongPeopleInfo={setBelongPeopleInfo} belongPeopleInfo={belongPeopleInfo} setValue={setValue} isShow={true}></BelongPeople>
</Modal>
</div> </div>
) )
} }

View File

@ -15,6 +15,8 @@ import {
Button Button
} from 'antd'; } from 'antd';
import { showImage } from '../../request/request' import { showImage } from '../../request/request'
import { get } from '../../util/AjaxUtils.ts'
import BelongPeople from '../../components/BelongPeople/BelongPeople.tsx'
import AiShopDetail from '../../components/AiShopDetail/AiShopDetail' import AiShopDetail from '../../components/AiShopDetail/AiShopDetail'
import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts"; import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
// import type { TableColumnsType } from 'antd'; // import type { TableColumnsType } from 'antd';
@ -38,6 +40,35 @@ interface Option {
// pId: string; // pId: string;
} }
export default function TradingGoods() { export default function TradingGoods() {
const showNow = false
const [belongModal, setBelongModal] = useState(false)
const [belongPeopleInfo, setBelongPeopleInfo] = useState({
authorName: '',
authorType: '',
authorIdCardType: '',
authorIdCard: '',
authorCrcAccount: 0,
authorId: '',
authorProvinceCity: '',
authorCrcAccountPassword: '',
authorCrcAccountUsername: ''
})
useEffect(() => {
console.log(belongPeopleInfo);
form.setFieldsValue({
buyType: belongPeopleInfo.authorType == '' ? null : belongPeopleInfo.authorType == 'PERSONAL' ? '1' : belongPeopleInfo.authorType == 'ORGANIZATION' ? '2' : null,
// 如果belongPeopleInfo.authorIdCardType == 'ID_CARD',则papersType的值是certificateTypeList中;lale为居民身份证的那个value 如果belongPeopleInfo.authorIdCardType == 'BUSINESS_LICENSE',则papersType的值是certificateTypeList中;lale为统一信用代码证的那个value 如果为空的话值为null
buyIdcardType: belongPeopleInfo.authorIdCardType == '' ? null : belongPeopleInfo.authorIdCardType == 'ID_CARD' ? certificateTypeList.find((item: any) => item.label == '居民身份证')?.value : belongPeopleInfo.authorIdCardType == 'BUSINESS_LICENSE' ? certificateTypeList.find((item: any) => item.label == '统一信用代码证')?.value : null,
buyIdcard: belongPeopleInfo.authorIdCard,
})
}, [belongPeopleInfo])
const setValue = (value: string) => {
form.setFieldsValue({
buyName: value
})
}
const globalDispatchContext = useContext(GlobalDispatchContext); const globalDispatchContext = useContext(GlobalDispatchContext);
const [areaArray, setAreaArray] = useState<Option[]>([]); const [areaArray, setAreaArray] = useState<Option[]>([]);
const getProvinceListDate = async () => { const getProvinceListDate = async () => {
@ -217,6 +248,18 @@ export default function TradingGoods() {
useEffect(() => { useEffect(() => {
getProvinceListDate() getProvinceListDate()
getCertificateTypeListDate() getCertificateTypeListDate()
get<any>({
messageApi,
url: 'api/user-info/get-self',
onSuccess({ data }) {
// console.log('个人信息', data);
// 给表单peoplePhone赋值
form.setFieldsValue({
buyPhone: data.contactPhone,
})
}
})
}, []) }, [])
return ( return (
@ -520,6 +563,7 @@ export default function TradingGoods() {
destroyOnClose={true} destroyOnClose={true}
footer={null} footer={null}
open={buyInfoModal} open={buyInfoModal}
// open={true}
// onOk={() => { // onOk={() => {
// setOrderDetailModal(false) // setOrderDetailModal(false)
// }} // }}
@ -529,6 +573,19 @@ export default function TradingGoods() {
width={700} width={700}
centered centered
> >
<Button type="primary"
onClick={() => {
setBelongModal(true)
}}
style={{
marginBottom: 10,
}}></Button>
<span style={{
marginLeft: 10,
color: 'red',
fontSize: '14px',
}}>:填写信息提交后无法取消订单</span>
<Form <Form
name="basic" name="basic"
form={form} form={form}
@ -742,6 +799,20 @@ export default function TradingGoods() {
</Form> </Form>
</Modal> </Modal>
<Modal title="选择所属者"
destroyOnClose
centered
open={belongModal}
width={1200}
footer={null}
onCancel={() => {
setBelongModal(false)
}}>
<BelongPeople showNow={showNow} closeModal={() => { setBelongModal(false) }} setBelongPeopleInfo={setBelongPeopleInfo} belongPeopleInfo={belongPeopleInfo} setValue={setValue} isShow={true}></BelongPeople>
</Modal>
</div> </div>
) )
} }

View File

@ -274,9 +274,9 @@ export default function ProjCreate() {
// nav(`/proj-new/${ProjChargeType.MATERIAL}?${additional.pkg ? 'pkg=true' : 'pkg='}&${additional.videoDemo ? 'videoDemo=true' : 'videoDemo='}&price=${materialInfo.price}`); // nav(`/proj-new/${ProjChargeType.MATERIAL}?${additional.pkg ? 'pkg=true' : 'pkg='}&${additional.videoDemo ? 'videoDemo=true' : 'videoDemo='}&price=${materialInfo.price}`);
nav( nav(
`/proj-new/${ProjChargeType.MATERIAL}?${additional.pkg ? 'pkg=true' : 'pkg='}&${additional.videoDemo ? 'videoDemo=true' : 'videoDemo='}`, `/proj-new/${ProjChargeType.MATERIAL}?${additional.pkg ? 'pkg=true' : 'pkg='}&${additional.videoDemo ? 'videoDemo=true' : 'videoDemo='}`,
{ // {
state: { price: materialInfo.price } // state: { price: materialInfo.price }
} // }
); );
} }

View File

@ -2,7 +2,7 @@ import './proj-new.css';
import { useNavigate, useParams, useSearchParams } from "react-router-dom"; import { useNavigate, useParams, useSearchParams } from "react-router-dom";
import { Table, AutoComplete, Button, Flex, Form, Input, message, Modal, Spin, Checkbox, DatePicker, Select } from "antd"; import { Table, AutoComplete, Button, Flex, Form, Input, message, Modal, Spin, Checkbox, DatePicker, Select } from "antd";
import { useContext, useEffect, useState, useRef } from "react"; import { useContext, useEffect, useState, useRef } from "react";
// import { useLocation } from 'react-router-dom'; import { useLocation } from 'react-router-dom';
import { get, post, getSoftUrl } from "../../util/AjaxUtils.ts"; import { get, post, getSoftUrl } from "../../util/AjaxUtils.ts";
// import {GlobalContext} from "../../context/GlobalContext.ts"; // import {GlobalContext} from "../../context/GlobalContext.ts";
import { import {
@ -47,6 +47,8 @@ interface DataType {
import { useDispatch, useSelector } from 'react-redux' import { useDispatch, useSelector } from 'react-redux'
export default function ProjNew() { export default function ProjNew() {
const { state } = useLocation()
const disable = state && state.type == 'copy' ? true : false
const dispath = useDispatch() const dispath = useDispatch()
// 更新redux的套餐包信息 // 更新redux的套餐包信息
const getMyPackNum = () => { const getMyPackNum = () => {
@ -478,7 +480,14 @@ export default function ProjNew() {
} }
}) })
// console.log('嘻嘻嘻',state);
if (state && state.type == 'copy') {
// 给表单复值
form.setFieldsValue({
'projName': '嘻嘻嘻', //全称
'contacts': '嘻嘻嘻',//联系人
})
}
}, []); }, []);
@ -526,6 +535,34 @@ export default function ProjNew() {
}} }}
autoComplete="off" autoComplete="off"
> >
<div style={{
display: state && state.type == 'replace' ? 'unset' : 'none',
}}>
<div style={{
width: 800,
marginLeft: 130,
display: 'flex',
justifyContent: 'center',
fontSize: 18,
fontWeight: 'bold',
}}>
</div>
</div>
<div style={{
display: state && state.type == 'copy' ? 'unset' : 'none',
}}>
<div style={{
width: 800,
marginLeft: 130,
display: 'flex',
justifyContent: 'center',
fontSize: 18,
fontWeight: 'bold',
}}>
</div>
</div>
<div style={{ <div style={{
width: 800, width: 800,
marginLeft: 130, marginLeft: 130,
@ -571,6 +608,7 @@ export default function ProjNew() {
}} style={{ background: '#eeeeee', width: '800px', height: '50px', fontSize: '16px' }} placeholder="请输入系统全称 (注系统全称建议以“软件”、“系统”、“平台”或“APP”结尾)" /> */} }} style={{ background: '#eeeeee', width: '800px', height: '50px', fontSize: '16px' }} placeholder="请输入系统全称 (注系统全称建议以“软件”、“系统”、“平台”或“APP”结尾)" /> */}
<AutoComplete <AutoComplete
className='changeStyle' className='changeStyle'
allowClear allowClear
style={{ style={{
@ -621,13 +659,14 @@ export default function ProjNew() {
setSelectList([]) setSelectList([])
} }
}} }}
disabled={disable}
/> />
</Form.Item> </Form.Item>
</div> </div>
<a <a
onClick={() => { onClick={() => {
// form.setFieldsValue({ // form.setFieldsValue({
// projName: '嘻嘻' // projName: '嘻嘻'
@ -639,6 +678,7 @@ export default function ProjNew() {
position: 'absolute', position: 'absolute',
right: -35, right: -35,
top: 10, top: 10,
display: disable ? 'none' : 'unset',
}}></a> }}></a>
<div style={{ <div style={{
position: 'absolute', left: 165, position: 'absolute', left: 165,
@ -658,7 +698,9 @@ export default function ProjNew() {
{ required: false, message: '请输入系统简称' }, { required: false, message: '请输入系统简称' },
]} ]}
> >
<Input style={{ width: '310px', height: '42px', color: '#3B3B3B' }} placeholder="请输入系统简称" /> <Input
disabled={disable}
style={{ width: '310px', height: '42px', color: '#3B3B3B' }} placeholder="请输入系统简称" />
</Form.Item> </Form.Item>
@ -684,7 +726,7 @@ export default function ProjNew() {
// background: '#eeeeee', // background: '#eeeeee',
}} }}
disabledDate={(current) => current && current > dayjs().endOf('day')} disabledDate={(current) => current && current > dayjs().endOf('day')}
disabled={disable}
/> />
</Form.Item> </Form.Item>
</div> </div>
@ -709,17 +751,28 @@ export default function ProjNew() {
// { required: true, message: '请选择/创建知识产权所属者' } // { required: true, message: '请选择/创建知识产权所属者' }
]} ]}
> >
<Input style={{ background: '#eeeeee', width: '310px', height: '42px', color: '#3B3B3B' }} placeholder="请选择/创建知识产权所属者" disabled /> <Input style={{
width: '310px', height: '42px',
// color: '#3B3B3B'
}} placeholder="请选择/创建知识产权所属者"
disabled={disable}
/>
</Form.Item> </Form.Item>
<div style={{
display: disable ? 'none' : 'unset',
}}>
<div style={{ <div style={{
display: belongPeopleInfo.authorId ? 'none' : 'unset', display: belongPeopleInfo.authorId ? 'none' : 'unset',
position: 'absolute', right: 20, position: 'absolute', right: 0,
// fontSize: 16, // fontSize: 16,
color: " #1F79FF", cursor: 'pointer', color: " #1F79FF", cursor: 'pointer',
// background:'pink', // background:'pink',
width: 290, width: 310,
textAlign: 'right', textAlign: 'right',
paddingRight: 20,
boxSizing: 'border-box',
}} onClick={() => { }} onClick={() => {
setBelongModal(true) setBelongModal(true)
}}></div> }}></div>
@ -728,12 +781,25 @@ export default function ProjNew() {
position: 'absolute', right: 0, position: 'absolute', right: 0,
// fontSize: 16, // fontSize: 16,
color: " #1F79FF", cursor: 'pointer', color: " #1F79FF",
// cursor: 'pointer',
// background:'pink',
width: 310,
paddingRight: 20,
boxSizing: 'border-box',
}} >
<div
style={{
// background: 'pink', // background: 'pink',
width: 50, width: 50,
textAlign: 'center', textAlign: 'center',
// paddingRight: 20,
}} onClick={() => { marginLeft: 250,
cursor: 'pointer',
}}
onClick={() => {
setValue('') setValue('')
setBelongPeopleInfo({ setBelongPeopleInfo({
authorName: '', authorName: '',
@ -748,6 +814,8 @@ export default function ProjNew() {
}) })
}}></div> }}></div>
</div> </div>
</div>
</div>
<div className='formItemOne' style={{ position: 'relative' }}> <div className='formItemOne' style={{ position: 'relative' }}>
<div className='formItem-title '> <div className='formItem-title '>
<span style={{ color: 'red' }}>*</span> <span style={{ color: 'red' }}>*</span>
@ -756,21 +824,32 @@ export default function ProjNew() {
name="contacts" name="contacts"
rules={[{ required: true, message: '请选择/创建知识产权联系人' }]} rules={[{ required: true, message: '请选择/创建知识产权联系人' }]}
> >
<Input style={{ background: '#eeeeee', width: '310px', height: '42px', color: '#3B3B3B' }} placeholder="请选择/创建知识产权联系人" disabled /> <Input style={{
// background: '#eeeeee',
width: '310px', height: '42px',
// color: '#3B3B3B'
}} placeholder="请选择/创建知识产权联系人" disabled={disable} />
</Form.Item> </Form.Item>
<div style={{ <div style={{
position: 'absolute', right: 20, display: disable ? 'none' : 'unset',
}}>
<div style={{
position: 'absolute', right: 0,
// fontSize: 16, // fontSize: 16,
color: " #1F79FF", cursor: 'pointer', color: " #1F79FF", cursor: 'pointer',
width: 290, // background:'pink',
width: 310,
textAlign: 'right', textAlign: 'right',
paddingRight: 20,
boxSizing: 'border-box',
}} onClick={() => { }} onClick={() => {
setConcatModal(true) setConcatModal(true)
}}></div> }}></div>
</div> </div>
</div> </div>
</div>
<div style={{ <div style={{
display: 'flex', display: 'flex',
marginTop: 20 marginTop: 20
@ -782,7 +861,7 @@ export default function ProjNew() {
> >
<Input <Input
disabled={disable}
style={{ style={{
// background: '#eeeeee', // background: '#eeeeee',
width: '310px', height: '42px', width: '310px', height: '42px',
@ -801,6 +880,7 @@ export default function ProjNew() {
]} ]}
> >
<Select <Select
disabled={disable}
style={{ style={{
width: '310px', height: '42px', width: '310px', height: '42px',
// fontSize: '16px', // fontSize: '16px',
@ -847,7 +927,9 @@ export default function ProjNew() {
</div> */} </div> */}
<div style={{
display: state && state.type == 'replace' ? 'none' : 'unset',
}}>
<div style={{ <div style={{
display: 'flex', display: 'flex',
marginTop: 20 marginTop: 20
@ -863,18 +945,22 @@ export default function ProjNew() {
// rules={[{ required: true, message: '请选择优惠券' }]} // rules={[{ required: true, message: '请选择优惠券' }]}
> >
<Input style={{ <Input style={{
background: '#eeeeee', // background: '#eeeeee',
// fontSize: 16, // fontSize: 16,
width: '310px', height: '42px', color: '#3B3B3B' width: '310px', height: '42px', color: '#3B3B3B'
}} placeholder={hasCoupon ? '请选择优惠券' : '暂无可用优惠券'} disabled /> }} placeholder={hasCoupon ? '请选择优惠券' : '暂无可用优惠券'} />
</Form.Item> </Form.Item>
<div style={{ <div style={{
display: couponId ? 'none' : 'unset', position: 'absolute', right: 23, display: couponId ? 'none' : 'unset',
position: 'absolute', right: 0,
// fontSize: 16, // fontSize: 16,
color: hasCoupon ? '#1F79FF' : '#676767', cursor: 'pointer', color: " #1F79FF", cursor: 'pointer',
width: 290, // background:'pink',
width: 310,
textAlign: 'right', textAlign: 'right',
paddingRight: 20,
boxSizing: 'border-box',
}} onClick={() => { }} onClick={() => {
if (hasCoupon) { if (hasCoupon) {
setCouponModal(true) setCouponModal(true)
@ -892,13 +978,35 @@ export default function ProjNew() {
// messageApi.error('服务包已选择,不可使用优惠券'); // messageApi.error('服务包已选择,不可使用优惠券');
// } // }
}}></div> }}></div>
<div style={{ display: couponId ? 'unset' : 'none', position: 'absolute', right: 23, fontSize: 16, color: '#1F79FF', cursor: 'pointer' }} onClick={() => { <div style={{
display: couponId ? 'unset' : 'none',
position: 'absolute', right: 0,
// fontSize: 16,
color: " #1F79FF",
// cursor: 'pointer',
// background:'pink',
width: 310,
paddingRight: 20,
boxSizing: 'border-box'
}} >
<div
style={{
// background: 'pink',
width: 50,
textAlign: 'center',
// paddingRight: 20,
marginLeft: 250,
cursor: 'pointer',
}}
onClick={() => {
setCouponTitle('') setCouponTitle('')
setCouponId('') setCouponId('')
setCouponNum(0) setCouponNum(0)
}} ></div> }} ></div>
</div> </div>
</div> </div>
</div>
{/* 服务包 */} {/* 服务包 */}
<div style={{ <div style={{
display: couponId || pathParams.projChargeType == 'FREE' ? 'none' : 'unset' display: couponId || pathParams.projChargeType == 'FREE' ? 'none' : 'unset'
@ -943,7 +1051,7 @@ export default function ProjNew() {
}} }}
// placeholder={packList.length > 0 ? '请选择套餐包' : '暂无套餐包'} // placeholder={packList.length > 0 ? '请选择套餐包' : '暂无套餐包'}
placeholder={packselectShow ? '请选择套餐包' : '暂无套餐包'} placeholder={packselectShow ? '请选择套餐包' : '暂无套餐包'}
disabled // disabled
/> />
</Form.Item> </Form.Item>
@ -960,13 +1068,15 @@ export default function ProjNew() {
}}></div> }}></div>
<div <div
style={{ style={{
display: selectPack ? 'none' : 'unset', position: 'absolute', right: 23, display: selectPack ? 'none' : 'unset',
position: 'absolute', right: 0,
// fontSize: 16, // fontSize: 16,
// color: packList.length ? '#1F79FF' : '#676767', cursor: 'pointer', color: " #1F79FF", cursor: 'pointer',
color: packselectShow ? '#1F79FF' : '#676767', cursor: 'pointer',
// background:'pink', // background:'pink',
width: 290, width: 310,
textAlign: 'right', textAlign: 'right',
paddingRight: 20,
boxSizing: 'border-box',
}} }}
onClick={() => { onClick={() => {
if (packList.length > 0) { if (packList.length > 0) {
@ -980,7 +1090,30 @@ export default function ProjNew() {
} }
}}></div> }}></div>
<div style={{ display: selectPack ? 'unset' : 'none', position: 'absolute', right: 23, color: '#1F79FF', cursor: 'pointer' }} onClick={() => { <div style={{
display: selectPack ? 'unset' : 'none',
position: 'absolute', right: 0,
// fontSize: 16,
color: " #1F79FF",
// cursor: 'pointer',
// background:'pink',
width: 310,
paddingRight: 20,
boxSizing: 'border-box',
}}
>
<div
style={{
// background: 'pink',
width: 50,
textAlign: 'center',
// paddingRight: 20,
marginLeft: 250,
cursor: 'pointer',
}}
onClick={() => {
// setPackageInfoId('') // setPackageInfoId('')
setPackageOrderId('') setPackageOrderId('')
setNowpackageOrderId('') setNowpackageOrderId('')
@ -995,11 +1128,13 @@ export default function ProjNew() {
setcouponShow(true) setcouponShow(true)
// setShowPrice(location.state.price) // setShowPrice(location.state.price)
}}></div> }}></div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
{/* <div style={{ {/* <div style={{
marginLeft: 50, marginLeft: 50,
// fontWeight: 'bold', // fontWeight: 'bold',
@ -1091,7 +1226,8 @@ export default function ProjNew() {
}} }}
> >
{/* {(showPrice / 100 - couponNum) < 0 ? 0 : showPrice / 100 - couponNum} */} {/* {(showPrice / 100 - couponNum) < 0 ? 0 : showPrice / 100 - couponNum} */}
{selectPack ? 0 : (chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum} {state && state.price ? state.price / 100 : selectPack ? 0 : (chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum}
{/* {selectPack ? 0 : (chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum} */}
</span> </span>
</div> </div>
<div style={{ <div style={{
@ -1148,7 +1284,9 @@ export default function ProjNew() {
onOk={() => { onOk={() => {
// console.log('最终',listProjChargeAdditional); // console.log('最终',listProjChargeAdditional);
// console.log(belongPeopleInfo.authorId); // console.log(belongPeopleInfo.authorId);
if (state && state.type == 'replace') {
alert('替换项目')
} else {
post<any>({ post<any>({
messageApi, messageApi,
url: '/api/proj/create', url: '/api/proj/create',
@ -1198,6 +1336,8 @@ export default function ProjNew() {
setLoading(false); setLoading(false);
} }
}) })
}
setIsCreateModalOpen(false); setIsCreateModalOpen(false);
@ -1210,7 +1350,9 @@ export default function ProjNew() {
}}> }}>
<div> <div>
{/* {(chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum} */} {/* {(chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum} */}
{selectPack ? 0 : (chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum} {/* {selectPack ? 0 : (chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum}
*/}
{state && state.price ? state.price / 100 : selectPack ? 0 : (chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum}
</div> </div>
</Modal> </Modal>
<Modal title="提示" <Modal title="提示"

View File

@ -100,6 +100,6 @@
font-size: 16px !important; font-size: 16px !important;
} }
.ant-input[disabled] { /* .dis.ant-input[disabled] {
background-color: white !important; background-color: white !important;
} } */