system-copyright-react/src/route/proj/ProjNew.tsx

622 lines
29 KiB
TypeScript
Raw Normal View History

2024-03-14 18:33:58 +08:00
import './proj-new.css';
2024-05-12 07:45:51 +08:00
import { useNavigate, useParams, useSearchParams } from "react-router-dom";
2025-01-20 15:24:23 +08:00
import { Button, Flex, Form, Input, message, Modal, Spin, Checkbox, DatePicker, Select } from "antd";
2024-05-12 07:45:51 +08:00
import { useContext, useEffect, useState } from "react";
import { get, post } from "../../util/AjaxUtils.ts";
2024-06-21 16:18:01 +08:00
// import {GlobalContext} from "../../context/GlobalContext.ts";
2024-06-17 16:35:28 +08:00
import {
2024-06-14 15:50:34 +08:00
// IProjCharge,
2024-06-17 16:35:28 +08:00
ProjAdditionalType, ProjChargeType
} from "../../interfaces/proj/IProj.ts";
2024-07-15 16:58:47 +08:00
import locale from 'antd/es/date-picker/locale/zh_CN';
2024-05-12 07:45:51 +08:00
import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
2024-06-17 16:35:28 +08:00
import BelongPeople from '../../components/BelongPeople/BelongPeople.tsx'
2024-07-15 16:58:47 +08:00
import ContactPeople from '../../components/ContactPeople/ContactPeople.tsx'
import dayjs from 'dayjs';
2024-09-02 16:41:02 +08:00
import SelectCouponModal from '../../components/CouponModal/SelectCouponModal.tsx'
2024-05-23 14:57:22 +08:00
// const { TextArea } = Input;
2024-03-20 18:30:39 +08:00
type ProjInfo = {
projName: string;
projIntroduction: string;
2024-07-15 16:58:47 +08:00
belongPeople: string;
contacts: string;
projDevCompleteDate: string;
2024-12-23 10:35:32 +08:00
coupon?: string;
projVersion: string;
2025-01-16 14:03:58 +08:00
backendCodeLang: string;
2024-03-14 18:33:58 +08:00
};
export default function ProjNew() {
2024-09-02 16:41:02 +08:00
// 是否显示优惠券
const [couponShow, setcouponShow] = useState(true)
2024-06-21 16:18:01 +08:00
// const globalContext = useContext(GlobalContext);
2024-07-15 16:58:47 +08:00
const dateFormat = 'YYYY年MM月DD日';
2024-04-02 18:45:46 +08:00
const globalDispatchContext = useContext(GlobalDispatchContext);
2024-03-14 18:33:58 +08:00
const nav = useNavigate();
2024-03-20 18:30:39 +08:00
const pathParams = useParams();
const [queryParams] = useSearchParams();
2024-03-14 18:33:58 +08:00
2024-03-20 18:30:39 +08:00
const [messageApi, contextHolder] = message.useMessage();
const [loading, setLoading] = useState<boolean>(false);
2024-05-21 11:21:34 +08:00
const height = window.innerHeight - 180;
2024-11-19 14:58:17 +08:00
// 提示结尾是否带关键字弹窗
// const [hasKeywords, setHasKeywords] = useState<boolean>(false);
// 创建项目弹窗
2024-03-20 18:30:39 +08:00
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
const [isEditModalOpen, setIsEditModalOpen] = useState(false);
const [chargePrice, setChargePrice] = useState(0);
const [projInfo, setProjInfo] = useState<ProjInfo>({
projName: '',
projIntroduction: '',
2024-07-15 16:58:47 +08:00
belongPeople: '',
contacts: '',
projDevCompleteDate: '',
2024-12-23 10:35:32 +08:00
projVersion: '',
2025-01-16 14:03:58 +08:00
backendCodeLang: '',
2024-03-20 18:30:39 +08:00
});
2024-06-17 16:35:28 +08:00
const [form] = Form.useForm<ProjInfo>();
// 所属者弹窗
const [belongModal, setBelongModal] = useState(false)
2024-07-15 16:58:47 +08:00
// 联系人弹窗
const [concatModal, setConcatModal] = useState(false)
2024-06-17 16:35:28 +08:00
// const [belongPeopleName ,setBelongPeopleName] = useState('')
const [belongPeopleInfo, setBelongPeopleInfo] = useState({
authorName: '',
authorType: '',
authorIdCardType: '',
authorIdCard: '',
2024-07-15 16:58:47 +08:00
authorCrcAccount: '',
authorId: '',
authorProvinceCity: ''
2024-06-17 16:35:28 +08:00
})
2024-07-15 16:58:47 +08:00
const [concatPeopleInfo, setConcatPeopleInfo] = useState({
applyConcatId: '',
applyContactCsaNo: '',
applyContactEmail: '',
applyContactName: '',
applyContactPhone: '',
applyContactCompany: ''
})
2024-08-30 10:07:41 +08:00
// 优惠券弹窗
2024-09-02 16:41:02 +08:00
const [couponModal, setCouponModal] = useState(false)
2024-07-15 16:58:47 +08:00
const setValue = (value: string) => {
2024-06-17 16:35:28 +08:00
form.setFieldsValue({
2024-07-15 16:58:47 +08:00
belongPeople: value
})
}
const setConcatValue = (value: string) => {
form.setFieldsValue({
contacts: value
2024-06-17 16:35:28 +08:00
})
}
2024-03-21 22:22:35 +08:00
const [createProjId, setCreateProjId] = useState('');
2024-05-23 16:20:14 +08:00
const oldlistProjChargeAdditional: string[] = [];
2024-05-29 14:43:48 +08:00
const [listProjChargeAdditional, setlistProjChargeAdditional] = useState<string[]>([])
2024-09-06 17:26:09 +08:00
// 是否可用优惠券
const [hasCoupon, setHasCoupon] = useState(false)
// 给优惠券栏赋值
const setCouponTitle = (value: string) => {
form.setFieldsValue({
coupon: value
});
}
// 优惠券id
const [couponId, setCouponId] = useState('')
// 优惠券减的钱数
const [couponNum, setCouponNum] = useState(0)
// 查看是否有可用获取优惠券信息
const getCouponData = () => {
get({
messageApi,
url: `/api/coupon/user/listpage/self`,
// url: `/api/proj/refund/apply/listpage?applyStatus=${state.type}`,
config: {
params: {
page: 1,
rows: 10,
isEffective: 1,
isUsed: 0,
}
},
onBefore() {
},
onSuccess(data: any) {
if (data.data.rows.length > 0) {
setHasCoupon(true)
}
},
onFinally() {
},
})
}
2024-11-19 14:58:17 +08:00
//判断是否以“软件”、“系统”、“平台”或“APP”结尾
function isEndsWithKeywords(str: string) {
const keywords = ["软件", "系统", "平台", "APP"];
return keywords.some(keyword => str.endsWith(keyword));
}
// 提示信息是否显示
const [showTip, setShowTip] = useState(false)
2024-03-20 18:30:39 +08:00
useEffect(() => {
get({
messageApi: messageApi,
url: '/api/proj/charge/get',
2024-05-12 07:45:51 +08:00
onSuccess({ data }) {
2024-07-31 16:00:30 +08:00
// console.log(data);
2024-06-17 16:35:28 +08:00
2024-06-14 15:50:34 +08:00
const charge = data as any;
2024-05-08 17:54:01 +08:00
// console.log('创建页price',charge.proj.materialAgent);
2024-05-12 07:45:51 +08:00
2024-03-20 18:30:39 +08:00
let price = 0;
switch (pathParams.projChargeType) {
case ProjChargeType.ALL:
2024-06-14 15:50:34 +08:00
// price = charge.proj.all;
2024-11-19 14:58:17 +08:00
price = charge.projTypes[0].price;
2024-03-20 18:30:39 +08:00
break;
2024-06-14 15:50:34 +08:00
// case ProjChargeType.MATERIAL_AGENT:
// price = charge.proj.materialAgent;
// break;
// case ProjChargeType.MATERIAL_AGENT_URGENT:
// price = charge.proj.materialAgentUrgent;
// break;
2024-03-20 18:30:39 +08:00
case ProjChargeType.MATERIAL:
2024-11-19 14:58:17 +08:00
price = charge.projTypes[1].price;
2024-03-20 18:30:39 +08:00
break;
case ProjChargeType.FREE:
2024-06-14 15:50:34 +08:00
price = charge.projTypes[2].price;
2024-03-20 18:30:39 +08:00
break;
default:
messageApi.error({
type: 'error',
content: '价格类型错误',
})
}
2024-05-12 07:45:51 +08:00
const pkg = queryParams.get('pkg') == 'true' ? true : false
const videoDemo = queryParams.get('videoDemo') == 'true' ? true : false
2024-07-29 17:22:42 +08:00
const urgent = queryParams.get('urgent') == 'true' ? true : false
2024-05-08 17:54:01 +08:00
if (pkg) {
2024-03-20 18:30:39 +08:00
price += charge.additional.pkg;
2024-05-23 16:20:14 +08:00
oldlistProjChargeAdditional.push(ProjAdditionalType.PKG);
2024-07-31 16:00:30 +08:00
// console.log(listProjChargeAdditional);
2024-05-29 14:43:48 +08:00
2024-03-20 18:30:39 +08:00
}
2024-05-08 17:54:01 +08:00
if (videoDemo) {
2024-03-20 18:30:39 +08:00
price += charge.additional.videoDemo;
2024-05-23 16:20:14 +08:00
oldlistProjChargeAdditional.push(ProjAdditionalType.VIDEO_DEMO);
2024-07-31 16:00:30 +08:00
// console.log(listProjChargeAdditional);
2024-05-23 16:20:14 +08:00
2024-03-20 18:30:39 +08:00
}
2024-09-02 16:41:02 +08:00
if (urgent) {
2024-07-29 17:22:42 +08:00
price += charge.additional.urgent;
oldlistProjChargeAdditional.push(ProjAdditionalType.URGENT);
2024-07-31 16:00:30 +08:00
// console.log(listProjChargeAdditional);
2024-07-29 17:22:42 +08:00
}
2024-03-20 18:30:39 +08:00
setChargePrice(price);
2024-05-23 16:20:14 +08:00
setlistProjChargeAdditional(oldlistProjChargeAdditional)
2024-05-12 07:45:51 +08:00
// console.log('传递信息pkg:',pkg,'videoDemo:',videoDemo);
2024-03-20 18:30:39 +08:00
}
})
2024-09-02 16:41:02 +08:00
// console.log('类型', pathParams.projChargeType);
if (pathParams.projChargeType == 'FREE') {
setcouponShow(false)
}
2024-09-06 17:26:09 +08:00
getCouponData()
2024-03-20 18:30:39 +08:00
}, []);
2024-03-14 23:34:40 +08:00
2024-03-14 18:33:58 +08:00
return (
<>
2024-03-20 18:30:39 +08:00
{contextHolder}
2024-05-12 07:45:51 +08:00
{/* <Breadcrumb
2024-03-14 18:33:58 +08:00
items={[
{title: <Link to={'/'}></Link>},
{title: <Link to={'/proj-create'}></Link>},
2024-03-14 23:34:40 +08:00
{title: '新建项目'},
2024-03-14 18:33:58 +08:00
]}
2024-05-12 07:45:51 +08:00
/> */}
2024-05-29 14:43:48 +08:00
<div className='projNew' style={{ height: `${height}px`, overflow: 'auto' }}>
2024-03-14 23:34:40 +08:00
<div className="proj-new">
2024-05-12 07:45:51 +08:00
{/* <div className="proj-title">请完善项目的基本信息</div> */}
2024-03-14 23:34:40 +08:00
<div className="proj-form">
<Form
name="basic"
2024-06-17 16:35:28 +08:00
form={form}
2025-01-20 15:24:23 +08:00
initialValues={{
2025-01-20 16:13:35 +08:00
projVersion: 'V1.0',
2025-01-20 15:24:23 +08:00
backendCodeLang: 'JAVA'
}} // 添加 initialValues 属性
2024-03-14 23:34:40 +08:00
layout={'vertical'}
2024-05-12 07:45:51 +08:00
labelCol={{ span: 24 }}
wrapperCol={{ span: 24 }}
2024-05-23 14:57:22 +08:00
style={{ width: '100%' }}
2024-03-20 18:30:39 +08:00
onFinish={(formData) => {
setIsCreateModalOpen(true);
setProjInfo({
projName: formData.projName,
2024-06-17 16:35:28 +08:00
projIntroduction: formData.projIntroduction,
2024-07-15 16:58:47 +08:00
belongPeople: formData.belongPeople,
contacts: formData.contacts,
projDevCompleteDate: formData.projDevCompleteDate,
2025-01-20 16:13:35 +08:00
projVersion: formData.projVersion ? formData.projVersion : 'V1.0',
2025-01-16 14:03:58 +08:00
backendCodeLang: formData.backendCodeLang,
2024-03-20 18:30:39 +08:00
})
}}
2024-03-14 23:34:40 +08:00
autoComplete="off"
2024-03-14 18:33:58 +08:00
>
2024-11-19 14:58:17 +08:00
<div style={{ position: 'relative' }}>
<div className='formItemOne'>
<div className='formItem-title oneTitle'>*</div>
<Form.Item<ProjInfo>
name="projName"
rules={[
{ required: true, message: '请输入系统全称' },
]}
>
<Input onChange={(e) => {
// 打印值
// console.log(e.target.value);
if (e.target.value) {
if (isEndsWithKeywords(e.target.value)) {
setShowTip(false)
} else {
setShowTip(true)
}
2024-12-23 10:35:32 +08:00
} else {
2024-11-19 14:58:17 +08:00
setShowTip(false)
}
}} style={{ background: '#eeeeee', width: '800px', height: '50px', fontSize: '16px' }} placeholder="请输入系统全称 (注系统全称建议以“软件”、“系统”、“平台”或“APP”结尾)" />
</Form.Item>
</div>
<div style={{
position: 'absolute', left: 185,
display: showTip ? 'unset' : 'none',
color: 'green',
}}>APP</div>
2024-06-17 16:35:28 +08:00
</div>
2024-12-23 10:35:32 +08:00
<div className='formItemOne' style={{ marginTop: 20 }}>
<div className='formItem-title oneTitle'>*</div>
<Form.Item<ProjInfo>
name="projVersion"
2025-01-20 15:24:23 +08:00
2024-12-23 10:35:32 +08:00
>
<Input
2025-01-20 15:24:23 +08:00
2024-12-23 10:35:32 +08:00
style={{ background: '#eeeeee', width: '800px', height: '50px', fontSize: '16px' }} placeholder="请输入系统版本 (注默认版本为v1.0)" />
</Form.Item>
</div>
2025-01-16 14:03:58 +08:00
<div className='formItemOne' style={{ marginTop: 20 }}>
<div className='formItem-title oneTitle'>*</div>
<Form.Item<ProjInfo>
name="backendCodeLang"
rules={[
{ required: true, message: '请选择系统语言' },
]}
>
<Select
2025-01-20 15:24:23 +08:00
style={{ width: '800px', height: '50px', fontSize: '16px' }}
2025-01-16 14:03:58 +08:00
placeholder="请选择系统语言"
className='langselect'
// defaultValue="JAVA"
options={[
{ value: 'JAVA', label: 'JAVA' },
{ value: 'NODE', label: 'NODE(JAVASCRIPT)' },
{ value: 'PYTHON', label: 'PYTHON' },
{ value: 'GO', label: 'GO' },
]}
>
</Select>
</Form.Item>
</div>
2025-01-20 15:24:23 +08:00
2024-06-17 16:35:28 +08:00
<div className='formItemOne' style={{ marginTop: 20, position: 'relative' }}>
<div className='formItem-title '>
*
</div>
<Form.Item<ProjInfo>
name="belongPeople"
rules={[{ required: true, message: '请选择/创建知识产权所属者' }]}
>
<Input style={{ background: '#eeeeee', width: '800px', height: '50px', fontSize: '16px', color: '#3B3B3B' }} placeholder="请选择/创建知识产权所属者" disabled />
2024-05-29 14:43:48 +08:00
</Form.Item>
2025-01-20 15:24:23 +08:00
<div style={{
position: 'absolute', right: 20, fontSize: 16, color: " #1F79FF", cursor: 'pointer',
// background:'pink',
width: 780,
textAlign: 'right',
}} onClick={() => {
2024-06-17 16:35:28 +08:00
setBelongModal(true)
}}></div>
2024-05-29 14:43:48 +08:00
</div>
2024-07-15 16:58:47 +08:00
<div className='formItemOne' style={{ marginTop: 20, position: 'relative' }}>
<div className='formItem-title '>
*
</div>
<Form.Item<ProjInfo>
name="contacts"
rules={[{ required: true, message: '请选择/创建知识产权联系人' }]}
>
<Input style={{ background: '#eeeeee', width: '800px', height: '50px', fontSize: '16px', color: '#3B3B3B' }} placeholder="请选择/创建知识产权联系人" disabled />
</Form.Item>
2025-01-20 15:24:23 +08:00
<div style={{
position: 'absolute', right: 20, fontSize: 16, color: " #1F79FF", cursor: 'pointer',
width: 780,
textAlign: 'right',
}} onClick={() => {
2024-07-15 16:58:47 +08:00
setConcatModal(true)
}}></div>
</div>
2024-09-02 16:41:02 +08:00
<div className='formItemOne' style={{ marginTop: 20 }}>
2024-07-15 16:58:47 +08:00
<div className='formItem-title '>
2024-12-23 10:35:32 +08:00
2024-07-15 16:58:47 +08:00
</div>
<Form.Item<ProjInfo>
// label="开发完成时间"
name="projDevCompleteDate"
2024-12-23 10:35:32 +08:00
// rules={[{ required: true, message: '请输入开发完成时间' }]}
2024-07-15 16:58:47 +08:00
>
<DatePicker placeholder="请选择开发完成日期"
format={dateFormat}
locale={locale}
// style={{ width: '100%' }}
style={{ height: '50px', width: '800px', fontSize: 16, background: '#eeeeee', }}
2024-12-24 09:16:01 +08:00
disabledDate={(current) => current && current > dayjs().endOf('day')}
2024-07-15 16:58:47 +08:00
/>
</Form.Item>
</div>
2025-01-20 15:24:23 +08:00
2024-09-02 16:41:02 +08:00
<div style={{ display: couponShow ? 'unset' : 'none' }}>
<div className='formItemOne' style={{ marginTop: 20, position: 'relative' }}>
<div className='formItem-title '>
2024-09-06 17:26:09 +08:00
2024-09-02 16:41:02 +08:00
</div>
<Form.Item<ProjInfo>
name="coupon"
2024-09-06 17:26:09 +08:00
// rules={[{ required: true, message: '请选择优惠券' }]}
2024-09-02 16:41:02 +08:00
>
2024-09-06 17:26:09 +08:00
<Input style={{ background: '#eeeeee', fontSize: 16, width: '800px', height: '50px', color: '#3B3B3B' }} placeholder={hasCoupon ? '请选择优惠券' : '暂无可用优惠券'} disabled />
2024-08-30 10:07:41 +08:00
2024-09-02 16:41:02 +08:00
</Form.Item>
2024-09-06 17:26:09 +08:00
<div style={{ position: 'absolute', right: 23, fontSize: 16, color: hasCoupon ? '#1F79FF' : '#676767', cursor: 'pointer' }} onClick={() => {
if (hasCoupon) {
setCouponModal(true)
// #1F79FF
} else {
messageApi.error('无可用优惠券')
}
2024-09-02 16:41:02 +08:00
}}></div>
</div>
2024-08-30 11:57:33 +08:00
</div>
2024-05-29 14:43:48 +08:00
<div className='software-protocol'>
<Form.Item
name="agreement"
valuePropName="checked"
rules={[
{
validator: (_, value) =>
value ? Promise.resolve() : Promise.reject(new Error('请阅读并勾选《软件委托开发协议》')),
},
]}
>
<Checkbox>
2024-06-17 16:35:28 +08:00
<a onClick={() => {
2024-05-31 09:19:30 +08:00
window.open('https://www.aimzhu.com/Seda.html')
}}></a>
2024-05-29 14:43:48 +08:00
</Checkbox>
2024-05-12 07:45:51 +08:00
</Form.Item>
</div>
2024-05-23 14:57:22 +08:00
{/* <div className='formItemTwo'>
2024-05-12 07:45:51 +08:00
<div className='formItem-title '></div>
<Form.Item<ProjInfo>
name="projIntroduction"
>
<TextArea rows={10} style={{ background: '#eeeeee', resize: 'none',width:"328px",height:'220px',fontSize:'16px' }} placeholder="请对系统作出简单的描述,以使可准确生成资料..." />
</Form.Item>
2024-05-23 14:57:22 +08:00
</div> */}
2024-05-29 14:43:48 +08:00
<div style={{ marginTop: '' }}>
2024-05-12 07:45:51 +08:00
<Form.Item>
<Flex align="center" justify="center" gap="large">
2024-05-29 14:43:48 +08:00
<Button
// style={{
// backgroundColor: '#F5F5F5', width: '216px',
// height: '50px', color: '#AFAFAF', fontSize: '16px'
// }}
size='large'
type="default" htmlType="button" onClick={() => {
nav(-1);
}}
2024-05-21 11:21:34 +08:00
>
2024-05-12 07:45:51 +08:00
</Button>
<Button type="primary" htmlType="submit"
2024-05-29 14:43:48 +08:00
size='large'
// style={{
// backgroundColor: 'var(--color-primary)', width: '216px',
// height: '50px', fontSize: '16px', marginLeft: '53px'
// }}
2024-07-15 16:58:47 +08:00
// onClick={()=>{
// alert(belongPeopleInfo.authorProvinceCity)
// }}
2024-05-29 14:43:48 +08:00
>
2024-05-12 07:45:51 +08:00
</Button>
2024-03-14 18:33:58 +08:00
2024-05-12 07:45:51 +08:00
</Flex>
</Form.Item>
</div>
2024-03-14 23:34:40 +08:00
</Form>
</div>
2024-03-14 18:33:58 +08:00
</div>
</div>
2024-03-20 18:30:39 +08:00
<Modal title="提示"
2025-02-26 16:57:47 +08:00
centered
2024-05-12 07:45:51 +08:00
okText="确定"
cancelText="取消"
open={isCreateModalOpen}
onOk={() => {
2024-05-23 16:20:14 +08:00
// console.log('最终',listProjChargeAdditional);
2024-06-21 16:18:01 +08:00
// console.log(belongPeopleInfo.authorId);
2024-07-15 16:58:47 +08:00
post<any>({
messageApi,
url: '/api/proj/create',
body: {
projName: projInfo.projName,
2024-12-23 10:35:32 +08:00
projVersion: projInfo.projVersion,
2025-01-16 14:03:58 +08:00
backendCodeLang: projInfo.backendCodeLang,
2024-07-15 16:58:47 +08:00
projChargeType: pathParams.projChargeType,
listProjChargeAdditional: listProjChargeAdditional,
// dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat),
2025-01-20 15:24:23 +08:00
projDevCompleteDate: projInfo.projDevCompleteDate ? dayjs(projInfo.projDevCompleteDate).format(dateFormat) : '',
2024-07-15 16:58:47 +08:00
authorCrcAccount: belongPeopleInfo.authorCrcAccount,
authorId: belongPeopleInfo.authorId,
authorIdCard: belongPeopleInfo.authorIdCard,
authorIdCardType: belongPeopleInfo.authorIdCardType,
authorName: belongPeopleInfo.authorName,
authorProvinceCity: belongPeopleInfo.authorProvinceCity,
authorType: belongPeopleInfo.authorType,
2024-09-02 16:41:02 +08:00
applyContactCompany: concatPeopleInfo.applyContactCompany,
applyContactCsaNo: concatPeopleInfo.applyContactCsaNo,
applyContactEmail: concatPeopleInfo.applyContactEmail,
applyContactId: concatPeopleInfo.applyConcatId,
applyContactName: concatPeopleInfo.applyContactName,
applyContactPhone: concatPeopleInfo.applyContactPhone,
2024-09-06 17:26:09 +08:00
2024-11-19 14:58:17 +08:00
couponId: couponId ? couponId : '',
2024-07-15 16:58:47 +08:00
},
onBefore() {
setLoading(true);
},
onSuccess({ data }) {
setIsEditModalOpen(true);
setCreateProjId(data.data);
reloadUser(messageApi, globalDispatchContext).then(() => {
messageApi.success('扣款成功');
});
},
onFinally() {
setLoading(false);
}
})
2024-05-12 07:45:51 +08:00
setIsCreateModalOpen(false);
2024-07-15 16:58:47 +08:00
2024-05-12 07:45:51 +08:00
}}
onCancel={() => {
setIsCreateModalOpen(false);
2024-11-19 14:58:17 +08:00
2024-05-12 07:45:51 +08:00
}}>
2025-02-26 16:57:47 +08:00
<div> {(chargePrice / 100 - couponNum) < 0 ? 0 : chargePrice / 100 - couponNum} </div>
2024-03-20 18:30:39 +08:00
</Modal>
<Modal title="提示"
2024-05-12 07:45:51 +08:00
okText="确定"
cancelText="取消"
open={isEditModalOpen}
onOk={() => {
2025-02-26 16:57:47 +08:00
sessionStorage.setItem('projName', projInfo.projName);
2024-05-12 07:45:51 +08:00
if (pathParams.projChargeType == ProjChargeType.ALL) {
nav(`/proj-eall/${createProjId}`);
} else if (pathParams.projChargeType == ProjChargeType.FREE) {
nav(`/proj-efree/${createProjId}`);
} else {
nav(`/proj-edit/${createProjId}`);
}
}}
onCancel={() => {
setIsEditModalOpen(false);
}}>
2024-03-20 18:30:39 +08:00
<div></div>
2024-03-14 23:34:40 +08:00
</Modal>
2024-11-19 14:58:17 +08:00
{/* <Modal title=""
okText="更改"
cancelText="继续"
open={hasKeywords}
onOk={() => {
//Form表单的projName变为空
form.resetFields(['projName']);
setHasKeywords(false);
}}
centered
onCancel={() => {
setHasKeywords(false);
setIsCreateModalOpen(true);
}}>
<div>APP</div>
</Modal> */}
2024-07-15 16:58:47 +08:00
<Modal title="选择联系人"
destroyOnClose
open={concatModal}
width={1200}
footer={null}
onCancel={() => {
setConcatModal(false)
}}>
<ContactPeople isShow={true} closeModal={() => { setConcatModal(false) }} setConcatPeopleInfo={setConcatPeopleInfo} concatPeopleInfo={concatPeopleInfo} setConcatValue={setConcatValue}></ContactPeople>
</Modal>
2024-06-17 16:35:28 +08:00
<Modal title="选择所属者"
destroyOnClose
open={belongModal}
width={1200}
footer={null}
onCancel={() => {
setBelongModal(false)
}}>
2024-07-15 16:58:47 +08:00
<BelongPeople closeModal={() => { setBelongModal(false) }} setBelongPeopleInfo={setBelongPeopleInfo} belongPeopleInfo={belongPeopleInfo} setValue={setValue} isShow={true}></BelongPeople>
2024-06-17 16:35:28 +08:00
</Modal>
2024-08-30 15:53:34 +08:00
<Modal title="选择优惠券"
2024-08-30 10:07:41 +08:00
destroyOnClose
open={couponModal}
width={809}
footer={null}
onCancel={() => {
setCouponModal(false)
}}>
2024-09-06 17:26:09 +08:00
<SelectCouponModal
couponId={couponId}
setCouponId={(value: string) => {
setCouponId(value)
}}
2024-11-19 14:58:17 +08:00
couponNum={couponNum}
2024-09-06 17:26:09 +08:00
setCouponNum={(value: number) => {
setCouponNum(value)
}}
setCouponTitle={(value: string) => {
setCouponTitle(value)
}}
closeModal={() => {
setCouponModal(false)
}}
></SelectCouponModal>
2024-08-30 15:53:34 +08:00
</Modal>
2024-05-12 07:45:51 +08:00
<Spin tip="正在提交..." spinning={loading} fullscreen />
2024-03-14 18:33:58 +08:00
</>
)
}