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

View File

@ -65,8 +65,10 @@ type propsInfo = {
setValue?: any
isShow?: boolean
closeModal?: any
showNow?: boolean
};
export default function BelongPeople(props: propsInfo) {
const showNow = props.showNow == false?false:true
// const [propsShow,setPropsShow] = useState(props.belongPeopleInfo.authorId?true)
// const nav = useNavigate();
// const pathParams = useParams();
@ -414,7 +416,10 @@ export default function BelongPeople(props: propsInfo) {
setAreaArray(options);
// console.log('省市2', options);
});
// console.log('嘻嘻嘻',props.showNow);
// console.log(showNow);
}, [])
return (
@ -527,15 +532,18 @@ export default function BelongPeople(props: propsInfo) {
/>
</div> */}
</div>
<div className='showInfo' style={{ display: props.isShow ? 'block' : 'none' }} >
{authorName ? (<>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ marginRight: ' 10px' }}>:</div>
<div style={{ display: authorName ? 'none' : 'block' }}></div>
<div style={{ display: authorName ? 'block' : 'none' }}>
{authorName}/{authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{authorIdCard}
</div>
{/* <Button style={{ display: authorName ? 'block' : 'none', height: 30, marginLeft: 10 }} onClick={() => {
<div style={{
display:showNow? 'unset' : 'none',
}}>
<div className='showInfo' style={{ display: props.isShow ? 'block' : 'none' }} >
{authorName ? (<>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ marginRight: ' 10px' }}>:</div>
<div style={{ display: authorName ? 'none' : 'block' }}></div>
<div style={{ display: authorName ? 'block' : 'none' }}>
{authorName}/{authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{authorIdCard}
</div>
{/* <Button style={{ display: authorName ? 'block' : 'none', height: 30, marginLeft: 10 }} onClick={() => {
// lyp
setauthorName('');
setauthorIdCardType('');
@ -549,32 +557,33 @@ export default function BelongPeople(props: propsInfo) {
setauthorCrcAccountUsername('');
}}></Button> */}
</div>
</>) : (<>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ marginRight: ' 10px' }}>:</div>
<div style={{ display: props.belongPeopleInfo.authorName ? 'none' : 'block' }}></div>
<div style={{ display: props.belongPeopleInfo.authorName ? 'block' : 'none' }}>
{props.belongPeopleInfo.authorName}/{props.belongPeopleInfo.authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{props.belongPeopleInfo.authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{props.belongPeopleInfo.authorIdCard}
</div>
<Button style={{ display: props.belongPeopleInfo.authorName ? 'block' : 'none', height: 30, marginLeft: 10 }} onClick={() => {
// lyp
props.setBelongPeopleInfo({
authorName: '',
authorType: '',
authorIdCardType: '',
authorIdCard: '',
authorCrcAccount: 0,
authorId: '',
authorProvinceCity: '',
authorCrcAccountPassword: '',
authorCrcAccountUsername: '',
})
}}></Button>
</>) : (<>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ marginRight: ' 10px' }}>:</div>
<div style={{ display: props.belongPeopleInfo.authorName ? 'none' : 'block' }}></div>
<div style={{ display: props.belongPeopleInfo.authorName ? 'block' : 'none' }}>
{props.belongPeopleInfo.authorName}/{props.belongPeopleInfo.authorType == 'PERSONAL' ? '自然人' : '企业-组织'}/{props.belongPeopleInfo.authorIdCardType == 'ID_CARD' ? '身份证' : '营业执照'}/{props.belongPeopleInfo.authorIdCard}
</div>
<Button style={{ display: props.belongPeopleInfo.authorName ? 'block' : 'none', height: 30, marginLeft: 10 }} onClick={() => {
// lyp
props.setBelongPeopleInfo({
authorName: '',
authorType: '',
authorIdCardType: '',
authorIdCard: '',
authorCrcAccount: 0,
authorId: '',
authorProvinceCity: '',
authorCrcAccountPassword: '',
authorCrcAccountUsername: '',
})
}}></Button>
</div>
</>)}
</div>
</>)}
</div>
</div>
<Spin tip="加载中..." spinning={isLoading}>
<div className='belongPeople-bot'>

View File

@ -7,7 +7,8 @@ import {
// Tag,
message, Spin,
Empty,
Dropdown
Dropdown,
Button
} from 'antd';
// import {
// // MenuFoldOutlined,
@ -1065,6 +1066,7 @@ export default function Correction() {
{item.correctionType == 'CODE' ? '代码' : item.correctionType == 'MANUAL' ? '操作手册' : item.correctionType == 'ALL' ? '全部补正' : ''}
</div>
</div>
<div style={{
display: 'flex',
}}>
@ -1133,6 +1135,44 @@ export default function Correction() {
})
}
</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 className='projBoxBot'>
<div className='boxTopL'>

View File

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

View File

@ -13,6 +13,8 @@ import {
UploadFile,
Image
} from "antd";
import { get } from '../../../../util/AjaxUtils'
import BelongPeople from '../../../../components/BelongPeople/BelongPeople.tsx'
import {
ArrowRightOutlined
} from '@ant-design/icons';
@ -50,6 +52,34 @@ interface Option {
}
type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0];
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 [startTime, setStartTime] = useState<any>(undefined);
useEffect(() => {
@ -128,7 +158,7 @@ export default function EditModal(props: any) {
goodsName: '',// 软件名称
// goodsNumber: '',// 软著编号
goodsPrice: 0,// 软著价格
goodsPhoto: '',// 软著图片
goodsLocalPhoto: '',// 软著图片
// goodsSubName: '',// 软著简称
goodsType: '',// 软著类型
// goodsVersion: '',// 软著版本
@ -211,6 +241,18 @@ export default function EditModal(props: any) {
// console.log('省市2', options);
// });
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[]) => {
@ -271,7 +313,7 @@ export default function EditModal(props: any) {
form.setFieldsValue({
name: res.goodsName,
smallname: res.goodsSubName,
imageUrl: res.goodsPhoto,
imageUrl: res.goodsLocalPhoto,
number: res.goodsNumber,
sv: res.goodsVersion,
textArea: res.goodsDescription,
@ -294,11 +336,11 @@ export default function EditModal(props: any) {
setStartTime(moment(res.goodsGetTime))
// 给logoImgArray赋值
logoImgArray.splice(0, 1, {
uid: res.goodsPhoto,
uid: res.goodsLocalPhoto,
name: 'xixi.png',
status: 'done',
url: showImage(res.goodsPhoto, false),
thumbUrl: showImage(res.goodsPhoto, false),
url: showImage(res.goodsLocalPhoto, false),
thumbUrl: showImage(res.goodsLocalPhoto, false),
})
} catch (error: any) {
@ -437,6 +479,8 @@ export default function EditModal(props: any) {
label: item.dataName,
}
}))
} catch (error: any) {
if (error.response) {
@ -480,6 +524,7 @@ export default function EditModal(props: any) {
</div>
<div className="form-body" >
<Form
name="basic"
form={form}
layout="vertical"
@ -494,6 +539,9 @@ export default function EditModal(props: any) {
// console.log(logoImgArray);
// const formattedTime = dayjs(value.time).format('YYYY-MM-DD');
// console.log('嘻嘻', formattedTime);
// console.log('value', value);
// return
setPromptModal(true);
setDate({
// goodsDescription: value.textArea, //软著说明
@ -511,7 +559,7 @@ export default function EditModal(props: any) {
goodsName: value.name,// 软件名称
// goodsNumber: value.number,// 软著编号
goodsPrice: value.price,// 软著价格
goodsPhoto: logoImgArray[0].uid,// 软著图片
goodsLocalPhoto: logoImgArray[0].uid,// 软著图片
// goodsSubName: value.smallname,// 软著简称
goodsType: value.class.join(','),// 软著类型
// goodsVersion: value.sv,// 软著版本
@ -1169,6 +1217,13 @@ export default function EditModal(props: any) {
<div className='editModal-title' style={{ marginTop: 30 }}>
<div className='editModal-title-box'></div>
<div className='editModal-title-name'></div>
<Button type="primary"
onClick={() => {
setBelongModal(true)
}}
style={{
marginLeft: 10,
}}></Button>
</div>
<Row gutter={15}>
@ -1398,6 +1453,20 @@ export default function EditModal(props: any) {
</div>
</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>
)
}

View File

@ -15,6 +15,8 @@ import {
Button
} from 'antd';
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 { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
// import type { TableColumnsType } from 'antd';
@ -38,6 +40,35 @@ interface Option {
// pId: string;
}
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 [areaArray, setAreaArray] = useState<Option[]>([]);
const getProvinceListDate = async () => {
@ -217,6 +248,18 @@ export default function TradingGoods() {
useEffect(() => {
getProvinceListDate()
getCertificateTypeListDate()
get<any>({
messageApi,
url: 'api/user-info/get-self',
onSuccess({ data }) {
// console.log('个人信息', data);
// 给表单peoplePhone赋值
form.setFieldsValue({
buyPhone: data.contactPhone,
})
}
})
}, [])
return (
@ -411,10 +454,10 @@ export default function TradingGoods() {
>
</div>
<a className='trading-goods-table-btn' onClick={() => {
<a className='trading-goods-table-btn' onClick={() => {
window.open(showImage(record.producePhoto, false))
// console.log(record);
}}
style={{
display: record.orderStatus == '4' ? 'unset' : 'none'
@ -520,6 +563,7 @@ export default function TradingGoods() {
destroyOnClose={true}
footer={null}
open={buyInfoModal}
// open={true}
// onOk={() => {
// setOrderDetailModal(false)
// }}
@ -529,6 +573,19 @@ export default function TradingGoods() {
width={700}
centered
>
<Button type="primary"
onClick={() => {
setBelongModal(true)
}}
style={{
marginBottom: 10,
}}></Button>
<span style={{
marginLeft: 10,
color: 'red',
fontSize: '14px',
}}>:填写信息提交后无法取消订单</span>
<Form
name="basic"
form={form}
@ -742,6 +799,20 @@ export default function TradingGoods() {
</Form>
</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>
)
}

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='}`,
{
state: { price: materialInfo.price }
}
// {
// state: { price: materialInfo.price }
// }
);
}

View File

@ -2,8 +2,8 @@ import './proj-new.css';
import { useNavigate, useParams, useSearchParams } from "react-router-dom";
import { Table, AutoComplete, Button, Flex, Form, Input, message, Modal, Spin, Checkbox, DatePicker, Select } from "antd";
import { useContext, useEffect, useState, useRef } from "react";
// import { useLocation } from 'react-router-dom';
import { get, post,getSoftUrl } from "../../util/AjaxUtils.ts";
import { useLocation } from 'react-router-dom';
import { get, post, getSoftUrl } from "../../util/AjaxUtils.ts";
// import {GlobalContext} from "../../context/GlobalContext.ts";
import {
// IProjCharge,
@ -47,6 +47,8 @@ interface DataType {
import { useDispatch, useSelector } from 'react-redux'
export default function ProjNew() {
const { state } = useLocation()
const disable = state && state.type == 'copy' ? true : false
const dispath = useDispatch()
// 更新redux的套餐包信息
const getMyPackNum = () => {
@ -478,7 +480,14 @@ export default function ProjNew() {
}
})
// console.log('嘻嘻嘻',state);
if (state && state.type == 'copy') {
// 给表单复值
form.setFieldsValue({
'projName': '嘻嘻嘻', //全称
'contacts': '嘻嘻嘻',//联系人
})
}
}, []);
@ -520,12 +529,40 @@ export default function ProjNew() {
projDevCompleteDate: formData.projDevCompleteDate,
projVersion: formData.projVersion ? formData.projVersion : 'V1.0',
backendCodeLang: formData.backendCodeLang,
projSubName: formData.projSubName? formData.projSubName : '',
projSubName: formData.projSubName ? formData.projSubName : '',
// packageInfoId: formData.packageInfoId?formData.packageInfoId : '',
})
}}
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={{
width: 800,
marginLeft: 130,
@ -571,6 +608,7 @@ export default function ProjNew() {
}} style={{ background: '#eeeeee', width: '800px', height: '50px', fontSize: '16px' }} placeholder="请输入系统全称 (注系统全称建议以“软件”、“系统”、“平台”或“APP”结尾)" /> */}
<AutoComplete
className='changeStyle'
allowClear
style={{
@ -621,13 +659,14 @@ export default function ProjNew() {
setSelectList([])
}
}}
disabled={disable}
/>
</Form.Item>
</div>
<a
onClick={() => {
// form.setFieldsValue({
// projName: '嘻嘻'
@ -639,6 +678,7 @@ export default function ProjNew() {
position: 'absolute',
right: -35,
top: 10,
display: disable ? 'none' : 'unset',
}}></a>
<div style={{
position: 'absolute', left: 165,
@ -658,7 +698,9 @@ export default function ProjNew() {
{ 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>
@ -684,7 +726,7 @@ export default function ProjNew() {
// background: '#eeeeee',
}}
disabledDate={(current) => current && current > dayjs().endOf('day')}
disabled={disable}
/>
</Form.Item>
</div>
@ -709,44 +751,70 @@ export default function ProjNew() {
// { 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>
<div style={{
display: belongPeopleInfo.authorId ? 'none' : 'unset',
position: 'absolute', right: 20,
// fontSize: 16,
color: " #1F79FF", cursor: 'pointer',
// background:'pink',
width: 290,
textAlign: 'right',
}} onClick={() => {
setBelongModal(true)
}}></div>
<div style={{
display: belongPeopleInfo.authorId ? 'unset' : 'none',
position: 'absolute', right: 0,
// fontSize: 16,
color: " #1F79FF", cursor: 'pointer',
// background:'pink',
width: 50,
textAlign: 'center',
<div style={{
display: disable ? 'none' : 'unset',
}}>
<div style={{
display: belongPeopleInfo.authorId ? 'none' : 'unset',
position: 'absolute', right: 0,
// fontSize: 16,
color: " #1F79FF", cursor: 'pointer',
// background:'pink',
width: 310,
textAlign: 'right',
paddingRight: 20,
boxSizing: 'border-box',
}} onClick={() => {
setBelongModal(true)
}}></div>
<div style={{
display: belongPeopleInfo.authorId ? 'unset' : 'none',
}} onClick={() => {
setValue('')
setBelongPeopleInfo({
authorName: '',
authorType: '',
authorIdCardType: '',
authorIdCard: '',
authorCrcAccount: 0,
authorId: '',
authorProvinceCity: '',
authorCrcAccountUsername: '',
authorCrcAccountPassword: '',
})
}}></div>
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={() => {
setValue('')
setBelongPeopleInfo({
authorName: '',
authorType: '',
authorIdCardType: '',
authorIdCard: '',
authorCrcAccount: 0,
authorId: '',
authorProvinceCity: '',
authorCrcAccountUsername: '',
authorCrcAccountPassword: '',
})
}}></div>
</div>
</div>
</div>
<div className='formItemOne' style={{ position: 'relative' }}>
<div className='formItem-title '>
@ -756,19 +824,30 @@ export default function ProjNew() {
name="contacts"
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>
<div style={{
position: 'absolute', right: 20,
// fontSize: 16,
color: " #1F79FF", cursor: 'pointer',
width: 290,
textAlign: 'right',
display: disable ? 'none' : 'unset',
}}>
<div style={{
position: 'absolute', right: 0,
// fontSize: 16,
color: " #1F79FF", cursor: 'pointer',
// background:'pink',
width: 310,
textAlign: 'right',
paddingRight: 20,
boxSizing: 'border-box',
}} onClick={() => {
setConcatModal(true)
}}></div>
}} onClick={() => {
setConcatModal(true)
}}></div>
</div>
</div>
</div>
<div style={{
@ -782,7 +861,7 @@ export default function ProjNew() {
>
<Input
disabled={disable}
style={{
// background: '#eeeeee',
width: '310px', height: '42px',
@ -801,6 +880,7 @@ export default function ProjNew() {
]}
>
<Select
disabled={disable}
style={{
width: '310px', height: '42px',
// fontSize: '16px',
@ -821,9 +901,9 @@ export default function ProjNew() {
</div>
</div>
{/* <div className='formItemOne' style={{}}>
{/* <div className='formItemOne' style={{}}>
<div className='formItem-title oneTitle'>/*</div>
<Form.Item<ProjInfo>
name="envIndustry"
@ -847,72 +927,100 @@ export default function ProjNew() {
</div> */}
<div style={{
display: 'flex',
marginTop: 20
display: state && state.type == 'replace' ? 'none' : 'unset',
}}>
<div style={{ display: couponShow ? 'unset' : 'none' }}>
<div className='formItemOne' style={{ position: 'relative' }}>
<div className='formItem-title '>
</div>
<Form.Item<ProjInfo>
name="coupon"
// rules={[{ required: true, message: '请选择优惠券' }]}
>
<Input style={{
background: '#eeeeee',
// fontSize: 16,
width: '310px', height: '42px', color: '#3B3B3B'
}} placeholder={hasCoupon ? '请选择优惠券' : '暂无可用优惠券'} disabled />
</Form.Item>
<div style={{
display: couponId ? 'none' : 'unset', position: 'absolute', right: 23,
// fontSize: 16,
color: hasCoupon ? '#1F79FF' : '#676767', cursor: 'pointer',
width: 290,
textAlign: 'right',
}} onClick={() => {
if (hasCoupon) {
setCouponModal(true)
// #1F79FF
} else {
messageApi.error('无可用优惠券')
}
// if (!selectPack) {
// if (hasCoupon) {
// setCouponModal(true);
// } else {
// messageApi.error('暂无可用优惠券');
// }
// } else {
// messageApi.error('服务包已选择,不可使用优惠券');
// }
}}></div>
<div style={{ display: couponId ? 'unset' : 'none', position: 'absolute', right: 23, fontSize: 16, color: '#1F79FF', cursor: 'pointer' }} onClick={() => {
setCouponTitle('')
setCouponId('')
setCouponNum(0)
}}></div>
</div>
</div>
{/* 服务包 */}
<div style={{
display: couponId || pathParams.projChargeType == 'FREE' ? 'none' : 'unset'
display: 'flex',
marginTop: 20
}}>
<div className='formItemOne' >
<div style={{ display: couponShow ? 'unset' : 'none' }}>
<div className='formItemOne' style={{ position: 'relative' }}>
<div className='formItem-title oneTitle'></div>
<div className='formItem-title '>
</div>
<Form.Item<ProjInfo>
name="packageName"
rules={[
// { required: true, message: '请选择系统语言' },
]}
name="coupon"
// rules={[{ required: true, message: '请选择优惠券' }]}
>
{/* <Select
<Input style={{
// background: '#eeeeee',
// fontSize: 16,
width: '310px', height: '42px', color: '#3B3B3B'
}} placeholder={hasCoupon ? '请选择优惠券' : '暂无可用优惠券'} />
</Form.Item>
<div style={{
display: couponId ? 'none' : 'unset',
position: 'absolute', right: 0,
// fontSize: 16,
color: " #1F79FF", cursor: 'pointer',
// background:'pink',
width: 310,
textAlign: 'right',
paddingRight: 20,
boxSizing: 'border-box',
}} onClick={() => {
if (hasCoupon) {
setCouponModal(true)
// #1F79FF
} else {
messageApi.error('无可用优惠券')
}
// if (!selectPack) {
// if (hasCoupon) {
// setCouponModal(true);
// } else {
// messageApi.error('暂无可用优惠券');
// }
// } else {
// messageApi.error('服务包已选择,不可使用优惠券');
// }
}}></div>
<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('')
setCouponId('')
setCouponNum(0)
}} ></div>
</div>
</div>
</div>
{/* 服务包 */}
<div style={{
display: couponId || pathParams.projChargeType == 'FREE' ? 'none' : 'unset'
}}>
<div className='formItemOne' >
<div className='formItemOne' style={{ position: 'relative' }}>
<div className='formItem-title oneTitle'></div>
<Form.Item<ProjInfo>
name="packageName"
rules={[
// { required: true, message: '请选择系统语言' },
]}
>
{/* <Select
disabled={packList.length > 0 ? false : true}
style={{ width: '310px', height: '50px', fontSize: '16px', }}
placeholder={packList.length > 0 ? '请选择服务包' : '暂无服务包'}
@ -934,68 +1042,95 @@ export default function ProjNew() {
}}
>
</Select> */}
<Input
className="custom-input"
<Input
className="custom-input"
style={{
// background: '#eeeeee',
// fontSize: 16,
width: '310px', height: '42px', color: '#3B3B3B'
}}
// placeholder={packList.length > 0 ? '请选择套餐包' : '暂无套餐包'}
placeholder={packselectShow ? '请选择套餐包' : '暂无套餐包'}
// disabled
/>
</Form.Item>
<div style={{
position: 'absolute',
// left: 165,
left: 158,
top: 40,
// display: showTip ? 'unset' : 'none',
color: 'red',
fontSize: 18,
fontWeight: 'bold',
}}></div>
<div
style={{
// background: '#eeeeee',
display: selectPack ? 'none' : 'unset',
position: 'absolute', right: 0,
// fontSize: 16,
width: '310px', height: '42px', color: '#3B3B3B'
color: " #1F79FF", cursor: 'pointer',
// background:'pink',
width: 310,
textAlign: 'right',
paddingRight: 20,
boxSizing: 'border-box',
}}
// placeholder={packList.length > 0 ? '请选择套餐包' : '暂无套餐包'}
placeholder={packselectShow ? '请选择套餐包' : '暂无套餐包'}
disabled
/>
onClick={() => {
if (packList.length > 0) {
setPackModal(true)
setPage(1)
setSelectedRowKeys([])
getPickList(1)
// #1F79FF
} else {
messageApi.error('无可用套餐包')
}
</Form.Item>
<div style={{
position: 'absolute',
// left: 165,
left: 158,
top: 40,
// display: showTip ? 'unset' : 'none',
color: 'red',
fontSize: 18,
fontWeight: 'bold',
}}></div>
<div
style={{
display: selectPack ? 'none' : 'unset', position: 'absolute', right: 23,
// fontSize: 16,
// color: packList.length ? '#1F79FF' : '#676767', cursor: 'pointer',
color: packselectShow ? '#1F79FF' : '#676767', cursor: 'pointer',
}}></div>
<div style={{
display: selectPack ? 'unset' : 'none',
position: 'absolute', right: 0,
// fontSize: 16,
color: " #1F79FF",
// cursor: 'pointer',
// background:'pink',
width: 290,
textAlign: 'right',
width: 310,
paddingRight: 20,
boxSizing: 'border-box',
}}
onClick={() => {
if (packList.length > 0) {
setPackModal(true)
setPage(1)
setSelectedRowKeys([])
getPickList(1)
// #1F79FF
} else {
messageApi.error('无可用套餐包')
}
}}></div>
<div style={{ display: selectPack ? 'unset' : 'none', position: 'absolute', right: 23, color: '#1F79FF', cursor: 'pointer' }} onClick={() => {
// setPackageInfoId('')
setPackageOrderId('')
setNowpackageOrderId('')
setNowPackageName('')
>
<div
style={{
// background: 'pink',
width: 50,
textAlign: 'center',
// paddingRight: 20,
marginLeft: 250,
cursor: 'pointer',
}}
onClick={() => {
// setPackageInfoId('')
setPackageOrderId('')
setNowpackageOrderId('')
setNowPackageName('')
form.setFieldsValue({
packageName: ''
})
setSelectPack(false)
// setcouponShow(true)
setcouponShow(true)
// setShowPrice(location.state.price)
}}></div>
form.setFieldsValue({
packageName: ''
})
setSelectPack(false)
// setcouponShow(true)
setcouponShow(true)
// setShowPrice(location.state.price)
}}></div>
</div>
</div>
</div>
</div>
</div>
@ -1091,7 +1226,8 @@ export default function ProjNew() {
}}
>
{/* {(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>
</div>
<div style={{
@ -1138,8 +1274,8 @@ export default function ProjNew() {
</div>
</Form>
</div>
</div>
</div>
</div >
</div >
<Modal title="提示"
centered
okText="确定"
@ -1148,56 +1284,60 @@ export default function ProjNew() {
onOk={() => {
// console.log('最终',listProjChargeAdditional);
// console.log(belongPeopleInfo.authorId);
if (state && state.type == 'replace') {
alert('替换项目')
} else {
post<any>({
messageApi,
url: '/api/proj/create',
body: {
// packageInfoId: projInfo.packageInfoId,
projName: projInfo.projName,
projSubName: projInfo.projSubName,
projVersion: projInfo.projVersion,
backendCodeLang: projInfo.backendCodeLang,
projChargeType: pathParams.projChargeType,
listProjChargeAdditional: listProjChargeAdditional,
// dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat),
projDevCompleteDate: projInfo.projDevCompleteDate ? dayjs(projInfo.projDevCompleteDate).format(dateFormat) : '',
authorCrcAccount: belongPeopleInfo.authorCrcAccount,
authorCrcAccountPassword: belongPeopleInfo.authorCrcAccountPassword,
authorCrcAccountUsername: belongPeopleInfo.authorCrcAccountUsername,
authorId: belongPeopleInfo.authorId,
authorIdCard: belongPeopleInfo.authorIdCard,
authorIdCardType: belongPeopleInfo.authorIdCardType,
authorName: belongPeopleInfo.authorName,
authorProvinceCity: belongPeopleInfo.authorProvinceCity,
authorType: belongPeopleInfo.authorType,
post<any>({
messageApi,
url: '/api/proj/create',
body: {
// packageInfoId: projInfo.packageInfoId,
projName: projInfo.projName,
projSubName: projInfo.projSubName,
projVersion: projInfo.projVersion,
backendCodeLang: projInfo.backendCodeLang,
projChargeType: pathParams.projChargeType,
listProjChargeAdditional: listProjChargeAdditional,
// dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat),
projDevCompleteDate: projInfo.projDevCompleteDate ? dayjs(projInfo.projDevCompleteDate).format(dateFormat) : '',
authorCrcAccount: belongPeopleInfo.authorCrcAccount,
authorCrcAccountPassword: belongPeopleInfo.authorCrcAccountPassword,
authorCrcAccountUsername: belongPeopleInfo.authorCrcAccountUsername,
authorId: belongPeopleInfo.authorId,
authorIdCard: belongPeopleInfo.authorIdCard,
authorIdCardType: belongPeopleInfo.authorIdCardType,
authorName: belongPeopleInfo.authorName,
authorProvinceCity: belongPeopleInfo.authorProvinceCity,
authorType: belongPeopleInfo.authorType,
applyContactCompany: concatPeopleInfo.applyContactCompany,
applyContactCsaNo: concatPeopleInfo.applyContactCsaNo,
applyContactEmail: concatPeopleInfo.applyContactEmail,
applyContactId: concatPeopleInfo.applyConcatId,
applyContactName: concatPeopleInfo.applyContactName,
applyContactPhone: concatPeopleInfo.applyContactPhone,
couponId: couponId ? couponId : '',
// packageInfoId: packageInfoId ? packageInfoId : ''
packageOrderId: packageOrderId ? packageOrderId : '',
applyContactCompany: concatPeopleInfo.applyContactCompany,
applyContactCsaNo: concatPeopleInfo.applyContactCsaNo,
applyContactEmail: concatPeopleInfo.applyContactEmail,
applyContactId: concatPeopleInfo.applyConcatId,
applyContactName: concatPeopleInfo.applyContactName,
applyContactPhone: concatPeopleInfo.applyContactPhone,
couponId: couponId ? couponId : '',
// packageInfoId: packageInfoId ? packageInfoId : ''
packageOrderId: packageOrderId ? packageOrderId : '',
},
onBefore() {
setLoading(true);
},
onSuccess({ data }) {
setIsEditModalOpen(true);
setCreateProjId(data.data);
reloadUser(messageApi, globalDispatchContext).then(() => {
messageApi.success('扣款成功');
});
getMyPackNum()
},
onFinally() {
setLoading(false);
}
})
}
},
onBefore() {
setLoading(true);
},
onSuccess({ data }) {
setIsEditModalOpen(true);
setCreateProjId(data.data);
reloadUser(messageApi, globalDispatchContext).then(() => {
messageApi.success('扣款成功');
});
getMyPackNum()
},
onFinally() {
setLoading(false);
}
})
setIsCreateModalOpen(false);
@ -1210,7 +1350,9 @@ export default function ProjNew() {
}}>
<div>
{/* {(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>
</Modal>
<Modal title="提示"

View File

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