套餐包及充值
This commit is contained in:
parent
381328e536
commit
f0783a0751
@ -505,6 +505,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
<div className='belongPeople-bot'>
|
||||
{/* 表格 */}
|
||||
{props.isShow ? (
|
||||
|
||||
<Table
|
||||
rowSelection={{
|
||||
type: 'radio',
|
||||
@ -517,22 +518,27 @@ export default function BelongPeople(props: propsInfo) {
|
||||
}}
|
||||
style={{ textAlign: 'center', height: 390 }} // 设置表格内容居中显示
|
||||
rowKey="projOwnerId" // 指定数据项的唯一标识符
|
||||
// onRow={(record: any) => {
|
||||
// return {
|
||||
// onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
|
||||
// // 阻止默认的行点击事件,以避免选中行时触发其他操作
|
||||
// event.stopPropagation();
|
||||
// // 更新选中的行
|
||||
// belongRowSelection.onChange([record.projOwnerId], [record]);
|
||||
// },
|
||||
// };
|
||||
// }}
|
||||
onRow={(record: any) => {
|
||||
return {
|
||||
onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
|
||||
// 检查点击的元素是否在操作列内
|
||||
const isActionColumn = (event.target as HTMLElement).closest('.ant-table-cell-action');
|
||||
if (!isActionColumn) {
|
||||
// 阻止默认的行点击事件,以避免选中行时触发其他操作
|
||||
event.stopPropagation();
|
||||
// 更新选中的行
|
||||
belongRowSelection.onChange([record.projOwnerId], [record]);
|
||||
}
|
||||
},
|
||||
style: { cursor: 'pointer' }
|
||||
};
|
||||
}}
|
||||
>
|
||||
<Column
|
||||
align="center"
|
||||
title="所属者名称" dataIndex="name"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
@ -547,7 +553,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
title="所属类型"
|
||||
dataIndex="type"
|
||||
render={(_text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{record.type === 'PERSONAL' ? '自然人' : '企业/组织'}
|
||||
@ -559,7 +565,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
title="所属证件类型"
|
||||
dataIndex="idCardType"
|
||||
render={(_text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{record.idCardType === 'ID_CARD' ? '身份证' : '营业执照'}
|
||||
@ -568,7 +574,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
/>
|
||||
<Column align="center" title="所属者身份证号" dataIndex="idCardNo" key="belongCardNo"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
@ -579,6 +585,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
<Column
|
||||
align="center"
|
||||
title="操作"
|
||||
className="ant-table-cell-action" // 添加一个类名用于识别操作列
|
||||
render={(_text, record: any) => (
|
||||
<Space size="middle">
|
||||
<a onClick={() => {
|
||||
@ -671,6 +678,7 @@ export default function BelongPeople(props: propsInfo) {
|
||||
)}
|
||||
/>
|
||||
</Table>
|
||||
|
||||
) : (
|
||||
<Table
|
||||
dataSource={tableBelongData}
|
||||
|
@ -256,16 +256,23 @@ export default function ContactPeople(props: any) {
|
||||
...ContantRowSelection,
|
||||
// selectedRowKeys: selectedKeys // 设置默认选中的行
|
||||
}}
|
||||
// onRow={(record: any) => {
|
||||
// return {
|
||||
// onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
|
||||
// // 阻止默认的行点击事件,以避免选中行时触发其他操作
|
||||
// event.stopPropagation();
|
||||
// // 更新选中的行
|
||||
// ContantRowSelection.onChange([record.projContactId], [record]);
|
||||
// },
|
||||
// };
|
||||
// }}
|
||||
onRow={(record: any) => {
|
||||
return {
|
||||
onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
|
||||
// 检查点击的元素是否在操作列内
|
||||
const isActionColumn = (event.target as HTMLElement).closest('.ant-table-cell-action');
|
||||
if (!isActionColumn) {
|
||||
// 阻止默认的行点击事件,以避免选中行时触发其他操作
|
||||
event.stopPropagation();
|
||||
// 更新选中的行
|
||||
ContantRowSelection.onChange([record.projContactId], [record]);
|
||||
}
|
||||
},
|
||||
|
||||
style: { cursor: 'pointer' }
|
||||
};
|
||||
|
||||
}}
|
||||
dataSource={tableContactData}
|
||||
pagination={{
|
||||
defaultPageSize: 5, // 设置默认一页显示 5 条数据
|
||||
@ -275,7 +282,7 @@ export default function ContactPeople(props: any) {
|
||||
>
|
||||
<Column align="center" title="联系人" dataIndex="name"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
@ -284,7 +291,7 @@ export default function ContactPeople(props: any) {
|
||||
/>
|
||||
<Column align="center" title="联系人手机号" dataIndex="phone"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
@ -293,7 +300,7 @@ export default function ContactPeople(props: any) {
|
||||
/>
|
||||
<Column align="center" title="平台专属客服" dataIndex="csaNo"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
@ -303,7 +310,7 @@ export default function ContactPeople(props: any) {
|
||||
<Column align="center" title="所属公司" dataIndex="company"
|
||||
// render={(text) => (text !== '' ? text : '一')}
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{text !== '' ? text : '一'}
|
||||
@ -315,6 +322,7 @@ export default function ContactPeople(props: any) {
|
||||
<Column
|
||||
align="center"
|
||||
title="操作"
|
||||
className="ant-table-cell-action"
|
||||
render={(_text, record: any) => (
|
||||
<Space size="middle">
|
||||
<a onClick={() => {
|
||||
|
@ -300,33 +300,87 @@ export default function AiHelper(props: PropsType) {
|
||||
// }
|
||||
const xixi = () => {
|
||||
setIsFast(true)
|
||||
ws.current?.send(JSON.stringify({
|
||||
type: 'REFRESH_AI_PROJ',
|
||||
projId: props.projId
|
||||
}));
|
||||
// ws.current?.send(JSON.stringify({
|
||||
// type: 'REFRESH_AI_PROJ',
|
||||
// projId: props.projId
|
||||
// }));
|
||||
ping();
|
||||
setIsProjIntroductionLoading(true);
|
||||
setIsProjDescLoading(true);
|
||||
setIsProjModArrayLoading(true);
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj/auto/get-introduction-desc-mods/${props.projId}`,
|
||||
config: {
|
||||
params: {
|
||||
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
const generateProjDesc = () => {
|
||||
|
||||
ws.current?.send(JSON.stringify({
|
||||
type: 'REFRESH_PROJ_DESC',
|
||||
projId: props.projId
|
||||
}));
|
||||
// ws.current?.send(JSON.stringify({
|
||||
// type: 'REFRESH_PROJ_DESC',
|
||||
// projId: props.projId
|
||||
// }));
|
||||
ping();
|
||||
setIsProjDescLoading(true);
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj/auto/get-desc/${props.projId}`,
|
||||
config: {
|
||||
params: {
|
||||
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
const generateProjModArray = () => {
|
||||
ws.current?.send(JSON.stringify({
|
||||
type: 'REFRESH_PROJ_MODS',
|
||||
projId: props.projId
|
||||
}));
|
||||
// ws.current?.send(JSON.stringify({
|
||||
// type: 'REFRESH_PROJ_MODS',
|
||||
// projId: props.projId
|
||||
// }));
|
||||
ping();
|
||||
setIsProjModArrayLoading(true);
|
||||
get({
|
||||
messageApi,
|
||||
url: `/api/proj/auto/get-mods/${props.projId}`,
|
||||
config: {
|
||||
params: {
|
||||
|
||||
}
|
||||
},
|
||||
onBefore() {
|
||||
|
||||
},
|
||||
onSuccess() {
|
||||
|
||||
},
|
||||
onFinally() {
|
||||
|
||||
},
|
||||
})
|
||||
}
|
||||
useEffect(() => {
|
||||
if (isFast && !isProjIntroductionLoading && !isProjDescLoading && !isProjModArrayLoading) {
|
||||
|
@ -631,7 +631,9 @@ export default function CardProj(props: any) {
|
||||
style={{ color: data.projStatus == 'NORMAL' || data.projStatus == 'EXPIRED' ? '#FF5D15' : '#8a8a8a' }}
|
||||
|
||||
>
|
||||
{data.pay.payment / 100}
|
||||
{/* {data.pay.payment / 100} */}
|
||||
{data.pay.servicePackageId?0: data.pay.payment/ 100}
|
||||
|
||||
{/* 2000.00 */}
|
||||
</div>
|
||||
<div className='coupon-num' style={{ display: data.pay.couponAmount ? 'unset' : 'none', color: data.projStatus == 'NORMAL' || data.projStatus == 'EXPIRED' ? '#FF5D15' : '#8a8a8a' }}>(已优惠{data.pay.couponAmount / 100}元)</div>
|
||||
|
@ -168,23 +168,32 @@ export default function CardProjType(props: ICardProj) {
|
||||
|
||||
return props.buyArray.map((buy, index) => {
|
||||
return (
|
||||
<div className="buy-btn" key={`buy_${index}`}>
|
||||
<div className="price">{buy.label}{(buy.price + chargeAmount) / 100} 元</div>
|
||||
{/* <hr /> */}
|
||||
<div className="buy">
|
||||
<button onClick={() => {
|
||||
buy.handleClick(props.head, {
|
||||
pkg: pkg,
|
||||
videoDemo: videoDemo,
|
||||
urgent: urgent,
|
||||
});
|
||||
}}
|
||||
style={{
|
||||
cursor: props.isClickable == 1 ? 'pointer' : 'not-allowed'
|
||||
}}
|
||||
disabled={props.isClickable == 1 ? false : true}
|
||||
>购买</button>
|
||||
</div>
|
||||
// <div className="buy-btn" key={`buy_${index}`}>
|
||||
// <div className="price">{buy.label}{(buy.price + chargeAmount) / 100} 元</div>
|
||||
// {/* <hr /> */}
|
||||
// <div className="buy">
|
||||
// <button onClick={() => {
|
||||
// buy.handleClick(props.head, {
|
||||
// pkg: pkg,
|
||||
// videoDemo: videoDemo,
|
||||
// urgent: urgent,
|
||||
// });
|
||||
// }}
|
||||
// style={{
|
||||
// cursor: props.isClickable == 1 ? 'pointer' : 'not-allowed'
|
||||
// }}
|
||||
// disabled={props.isClickable == 1 ? false : true}
|
||||
// >购买</button>
|
||||
// </div>
|
||||
// </div>
|
||||
<div className='buyBtnNew' key={`buy_${index}`} onClick={() => {
|
||||
buy.handleClick(props.head, {
|
||||
pkg: pkg,
|
||||
videoDemo: videoDemo,
|
||||
urgent: urgent,
|
||||
});
|
||||
}}>
|
||||
购买
|
||||
</div>
|
||||
)
|
||||
})
|
||||
@ -264,7 +273,7 @@ export default function CardProjType(props: ICardProj) {
|
||||
<div className="proj-body">
|
||||
<div>{renderLines()}</div>
|
||||
<div>{renderNew()}</div>
|
||||
<div style={{marginTop:20,color:'#989898'}}>{props.text}</div>
|
||||
<div style={{ marginTop: 20, color: '#989898' }}>{props.text}</div>
|
||||
{renderCharge()}
|
||||
</div>
|
||||
|
||||
|
@ -273,3 +273,19 @@
|
||||
.notes-text:hover .notes-box{
|
||||
display: block;
|
||||
}
|
||||
.buyBtnNew{
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0 10px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
box-shadow: 0px 7px 7px 0px rgba(30,30,30,0.18);
|
||||
border-radius: 13px;
|
||||
font-size: 18px;
|
||||
color: rgb(105, 105, 105);
|
||||
font-weight: 800;
|
||||
font-family: PingFang SC;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -3,7 +3,8 @@ import {
|
||||
Button,
|
||||
ConfigProvider,
|
||||
DatePicker,
|
||||
Divider, Flex,
|
||||
// Divider,
|
||||
Flex,
|
||||
Form, GetProp, Image,
|
||||
Input,
|
||||
InputNumber,
|
||||
@ -12,7 +13,9 @@ import {
|
||||
Spin,
|
||||
Upload, UploadProps,
|
||||
Tag,
|
||||
Modal
|
||||
Modal,
|
||||
// Select,
|
||||
Table
|
||||
} from "antd";
|
||||
import {
|
||||
ReloadOutlined
|
||||
@ -25,6 +28,23 @@ import { DevUserId, get, post, uploadImageUrl } from "../../util/AjaxUtils.ts";
|
||||
import { UploadOutlined } from "@ant-design/icons";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import { errorImage } from "../../util/CommonUtil.ts";
|
||||
import type {
|
||||
TableColumnsType,
|
||||
// TableProps
|
||||
} from 'antd';
|
||||
import wx from '../../static/wx.png';
|
||||
import zfb from '../../static/zfb.png';
|
||||
import dg from '../../static/dg.png';
|
||||
import nodate from '../../static/nodate.png';
|
||||
|
||||
// import { render } from 'react-dom';
|
||||
interface DataType {
|
||||
key: React.Key;
|
||||
packageName: string;
|
||||
packageMoney: number;
|
||||
packageDescription: string;
|
||||
packageInfoId: string;
|
||||
}
|
||||
|
||||
dayjs.locale('zh-cn');
|
||||
|
||||
@ -63,11 +83,189 @@ interface IPaymentProps {
|
||||
handleConfirm(): void;
|
||||
|
||||
handleCancel(): void;
|
||||
show: boolean;
|
||||
}
|
||||
|
||||
export default function Payment(props: IPaymentProps) {
|
||||
// 服务包相关
|
||||
const [packPage, setPackPage] = useState(1); //服务包数据分页页码
|
||||
// 开启关闭弹窗时重置页码
|
||||
useEffect(() => {
|
||||
setPackPage(1);
|
||||
}, [props.show])
|
||||
const [packTotal, setPackTotal] = useState(0); //服务包数据分页总条数
|
||||
const [value, setValue] = useState('MATERIAL');//单选 服务包类型
|
||||
const onChange = (e: any) => {
|
||||
setValue(e.target.value);
|
||||
getPackageList(e.target.value, packPage);
|
||||
// setSelectedRowKeys([]);
|
||||
};
|
||||
const [packList, setPackList] = useState<any[]>([]);
|
||||
const [packageInfoId, setPackageInfoId] = useState('');//单选 服务包id
|
||||
// 获取套餐列表
|
||||
const getPackageList = (value: string, page: number) => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: `/api/proj/servicepkg/packageinfo/listpage/${value}/self`,
|
||||
config: {
|
||||
params: {
|
||||
page: page,
|
||||
rows: 7,
|
||||
|
||||
}
|
||||
},
|
||||
onSuccess({ data }) {
|
||||
setPackList(data.rows);
|
||||
setPackTotal(data.total);
|
||||
}
|
||||
})
|
||||
}
|
||||
useEffect(() => {
|
||||
getPackageList(value, packPage);
|
||||
}, [])
|
||||
const packColumns: TableColumnsType<DataType> = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
key: 'packageInfoId',
|
||||
align: 'center',
|
||||
// 宽度
|
||||
width: 80,
|
||||
render: (_text: number, _record: any, index: number) => {
|
||||
return <div>{(packPage - 1) * 7 + index + 1}</div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '套餐名称',
|
||||
width: 150,
|
||||
align: 'center',
|
||||
dataIndex: 'packageName',
|
||||
key: 'packageInfoId',
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (text: string) => {
|
||||
return <div title={text}>{text}</div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '套餐说明',
|
||||
width: 200,
|
||||
align: 'center',
|
||||
dataIndex: 'packageDescription',
|
||||
key: 'packageInfoId',
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (text: string) => {
|
||||
return <div title={text}>{text}</div>
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
title: '套餐价格',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
dataIndex: 'packageMoney',
|
||||
key: 'packageInfoId',
|
||||
render: (text: number) => {
|
||||
return <div>{text / 100}元</div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '可用次数',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
dataIndex: 'packageCount',
|
||||
key: 'packageInfoId',
|
||||
// render: (text: number) => {
|
||||
// return <div>{text / 100}元</div>
|
||||
// }
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'operate',
|
||||
key: 'packageInfoId',
|
||||
render: (value, record) => {
|
||||
return (
|
||||
<div>
|
||||
<div
|
||||
style={{
|
||||
display: packageInfoId == record.packageInfoId ? 'none' : 'unset',
|
||||
// 鼠标设置成禁选状态
|
||||
|
||||
|
||||
cursor: packageInfoId ? 'not-allowed' : 'pointer',
|
||||
color: packageInfoId ? '#898D91' : '#0B4AFF'
|
||||
}}
|
||||
onClick={() => {
|
||||
if (!packageInfoId) {
|
||||
setPackageInfoId(record.packageInfoId);
|
||||
form.setFieldValue('rechargeMoney', (record.packageMoney) / 100);
|
||||
getPay(record.packageInfoId);
|
||||
}
|
||||
}}
|
||||
>选购</div>
|
||||
<div
|
||||
style={{
|
||||
display: packageInfoId == record.packageInfoId ? 'unset' : 'none',
|
||||
cursor: 'pointer',
|
||||
color: '#0B4AFF'
|
||||
}}
|
||||
onClick={() => {
|
||||
setPackageInfoId('');
|
||||
form.setFieldValue('rechargeMoney', 280);
|
||||
getPay('');
|
||||
}}
|
||||
>取消</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
const [thirdParty, setThirdParty] = useState<ThirdPartyEnum | null>();
|
||||
// const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||
// useEffect(() => {
|
||||
// if (packageInfoId) {
|
||||
// setSelectedRowKeys([packageInfoId]);
|
||||
// } else {
|
||||
// setSelectedRowKeys([]);
|
||||
// }
|
||||
// }, [packageInfoId]);
|
||||
// const rowSelection: TableProps<DataType>['rowSelection'] = {
|
||||
// selectedRowKeys,
|
||||
// // onChange: (selectedRowKeys: React.Key[], selectedRows: DataType[]) => {
|
||||
// // setSelectedRowKeys(selectedRowKeys);
|
||||
// // console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
||||
// // setPackageInfoId(selectedRows[0].packageInfoId);
|
||||
// // // form.getFieldValue('rechargeMoney')
|
||||
// // form.setFieldValue('rechargeMoney', (selectedRows[0].packageMoney) / 100);
|
||||
|
||||
// // // getPay(selectedRows[0].packageInfoId);
|
||||
// // // console.log(selectedRowKeys, selectedRows);
|
||||
// // // if(packageInfoId == selectedRows[0].packageInfoId){
|
||||
// // // setSelectedRowKeys([]);
|
||||
// // // }else{
|
||||
// // // setSelectedRowKeys(selectedRowKeys);
|
||||
// // // }
|
||||
|
||||
|
||||
// // },
|
||||
|
||||
|
||||
|
||||
// };
|
||||
|
||||
|
||||
// 是否显示完成付款按钮
|
||||
const [showPay ,setshowPay] = useState('unset')
|
||||
const [showPay, setshowPay] = useState('unset')
|
||||
// 支付完成弹窗
|
||||
const [paymentModal, setPaymentModal] = useState(false)
|
||||
const [mask, setMask] = useState(false)
|
||||
@ -76,7 +274,7 @@ export default function Payment(props: IPaymentProps) {
|
||||
const [isRechargeMoneyEdit, setIsRechargeMoneyEdit] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [rechargeVoucherArray, setRechargeVoucherArray] = useState<string[]>([]);
|
||||
const [thirdParty, setThirdParty] = useState<ThirdPartyEnum | null>();
|
||||
|
||||
const [accountRechargeId, setAccountRechargeId] = useState('');
|
||||
const [thirdPartyPayUrl, setThirdPartyPayUrl] = useState('');
|
||||
const [paySystemBank, setPaySystemBank] = useState<PaySystemBank>({
|
||||
@ -128,13 +326,16 @@ export default function Payment(props: IPaymentProps) {
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
const getPay = () => {
|
||||
const getPay = (packageInfoId: string) => {
|
||||
// console.log('获取订单');
|
||||
|
||||
post<PayType>({
|
||||
messageApi,
|
||||
url: '/api/pay/get-pay',
|
||||
body: {
|
||||
rechargeMoney: form.getFieldValue('rechargeMoney'),
|
||||
thirdParty: form.getFieldValue('thirdParty')
|
||||
thirdParty: form.getFieldValue('thirdParty'),
|
||||
packageInfoId: packageInfoId
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
@ -172,7 +373,7 @@ export default function Payment(props: IPaymentProps) {
|
||||
setThirdParty(ThirdPartyEnum.DGZZ)
|
||||
return;
|
||||
}
|
||||
getPay();
|
||||
getPay(packageInfoId);
|
||||
// countdown()
|
||||
}, [thirdParty, refreshQrCodeCount]);
|
||||
|
||||
@ -193,7 +394,7 @@ export default function Payment(props: IPaymentProps) {
|
||||
messageApi.error(`金额最大为${moneyRange[1]}`)
|
||||
}
|
||||
setIsRechargeMoneyEdit(false);
|
||||
getPay()
|
||||
getPay(packageInfoId)
|
||||
setshowPay('unset')
|
||||
}}>确定</Button>
|
||||
<span style={{ color: '#1677ff', cursor: 'pointer' }}
|
||||
@ -208,10 +409,16 @@ export default function Payment(props: IPaymentProps) {
|
||||
)
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
// background:"pink",
|
||||
alignItems: 'center',
|
||||
}}>
|
||||
<div>
|
||||
<span>¥</span>
|
||||
<span style={{ fontWeight: 'bold', fontSize: '16px' }}>{form.getFieldValue('rechargeMoney')}</span>
|
||||
<span style={{
|
||||
color: '#FF2222'
|
||||
}}>¥</span>
|
||||
<span style={{ fontWeight: 'bold', color: '#FF2222', fontSize: '18px' }}>{form.getFieldValue('rechargeMoney')}</span>
|
||||
<Button type="link" onClick={() => {
|
||||
setIsRechargeMoneyEdit(true);
|
||||
setshowPay('none')
|
||||
@ -221,29 +428,64 @@ export default function Payment(props: IPaymentProps) {
|
||||
<Tag style={{ cursor: 'pointer' }} onClick={() => {
|
||||
form.setFieldValue('rechargeMoney', 100);
|
||||
setIsRechargeMoneyEdit(false)
|
||||
getPay()
|
||||
getPay(packageInfoId)
|
||||
}} color="volcano">100</Tag>
|
||||
<Tag style={{ cursor: 'pointer' }} onClick={() => {
|
||||
<Tag style={{ cursor: 'pointer', marginLeft: 10 }} onClick={() => {
|
||||
form.setFieldValue('rechargeMoney', 200);
|
||||
setIsRechargeMoneyEdit(false)
|
||||
getPay()
|
||||
getPay(packageInfoId)
|
||||
}} color="volcano">200</Tag>
|
||||
<Tag style={{ cursor: 'pointer' }} onClick={() => {
|
||||
<Tag style={{ cursor: 'pointer', marginLeft: 10 }} onClick={() => {
|
||||
form.setFieldValue('rechargeMoney', 300);
|
||||
setIsRechargeMoneyEdit(false)
|
||||
getPay()
|
||||
getPay(packageInfoId)
|
||||
}} color="volcano">300</Tag>
|
||||
<Tag style={{ cursor: 'pointer' }} onClick={() => {
|
||||
<Tag style={{ cursor: 'pointer', marginLeft: 10 }} onClick={() => {
|
||||
form.setFieldValue('rechargeMoney', 400);
|
||||
setIsRechargeMoneyEdit(false)
|
||||
getPay()
|
||||
getPay(packageInfoId)
|
||||
}} color="volcano">400</Tag>
|
||||
<Tag style={{ cursor: 'pointer' }} onClick={() => {
|
||||
<Tag style={{ cursor: 'pointer', marginLeft: 10 }} onClick={() => {
|
||||
form.setFieldValue('rechargeMoney', 500);
|
||||
setIsRechargeMoneyEdit(false)
|
||||
getPay()
|
||||
getPay(packageInfoId)
|
||||
}} color="volcano">500</Tag>
|
||||
</div>
|
||||
{/* <div style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
// justifyContent: 'center',
|
||||
marginTop: '10px'
|
||||
}}>
|
||||
<div style={{
|
||||
|
||||
}}>
|
||||
购买服务包
|
||||
</div>
|
||||
<Select
|
||||
style={{
|
||||
width: '200px',
|
||||
// height: '50px', fontSize: '16px',
|
||||
}}
|
||||
placeholder="请选择服务包"
|
||||
className=''
|
||||
// defaultValue="JAVA"
|
||||
options={[
|
||||
{ value: '1', label: `包1(99/100)`, },
|
||||
{ value: '2', label: '包2(98/100)' },
|
||||
{ value: '3', label: '包3(97/100)' },
|
||||
]}
|
||||
allowClear
|
||||
onChange={(value) => {
|
||||
|
||||
|
||||
}}
|
||||
>
|
||||
</Select>
|
||||
</div> */}
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -251,58 +493,12 @@ export default function Payment(props: IPaymentProps) {
|
||||
const renderPayBody = () => {
|
||||
if (thirdParty == '对公转账') {
|
||||
return (
|
||||
<div >
|
||||
<div style={{
|
||||
marginLeft: 80
|
||||
}}>
|
||||
|
||||
<div>倒计时:{countdownTime}</div>
|
||||
<div>
|
||||
<Divider orientation="left" plain>收款方信息</Divider>
|
||||
<table className="pay-table">
|
||||
<colgroup>
|
||||
<col width="100" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="table-label">公司名称</td>
|
||||
<td>
|
||||
<span id="bankAccountName">{paySystemBank.bankAccountName}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户银行</td>
|
||||
<td>
|
||||
<span id="bankName">{paySystemBank.bankName}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">银行账号</td>
|
||||
<td>
|
||||
<span id="bankNumber">{paySystemBank.bankNumber}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">银行联行号</td>
|
||||
<td>
|
||||
<span id="bankUnionpayNumber">{paySystemBank.bankUnionpayNumber}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">打款备注</td>
|
||||
<td>
|
||||
<div id="bankRemark">{paySystemBank.bankRemark}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">说明</td>
|
||||
<td>
|
||||
<div className="mark">请打款时必须按照以上备注填写</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<Divider orientation="left" plain>付款方信息</Divider>
|
||||
<div className='payBoxTitle'>付款方信息</div>
|
||||
<table className="pay-table">
|
||||
<colgroup>
|
||||
<col width="100" />
|
||||
@ -402,6 +598,58 @@ export default function Payment(props: IPaymentProps) {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style={{
|
||||
marginTop: 25
|
||||
}}>
|
||||
<div className='payBoxTitle' >收款方信息</div>
|
||||
<table className="pay-table">
|
||||
<colgroup>
|
||||
<col width="100" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="table-label">公司名称</td>
|
||||
<td>
|
||||
<span id="bankAccountName">{paySystemBank.bankAccountName}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">开户银行</td>
|
||||
<td>
|
||||
<span id="bankName">{paySystemBank.bankName}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">银行账号</td>
|
||||
<td>
|
||||
<span id="bankNumber">{paySystemBank.bankNumber}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">银行联行号</td>
|
||||
<td>
|
||||
<span id="bankUnionpayNumber">{paySystemBank.bankUnionpayNumber}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">打款备注</td>
|
||||
<td>
|
||||
<div id="bankRemark">{paySystemBank.bankRemark}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="table-label">说明</td>
|
||||
<td>
|
||||
<div className="mark">请打款时必须按照以上备注填写</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style={{
|
||||
marginTop: '15px', textAlign: 'center',
|
||||
}}>倒计时:{countdownTime}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -413,7 +661,26 @@ export default function Payment(props: IPaymentProps) {
|
||||
正在修改,请稍后...
|
||||
</div>
|
||||
</div>
|
||||
<Image src={thirdPartyPayUrl} fallback={errorImage} preview={false} />
|
||||
<div style={{
|
||||
marginLeft: 90
|
||||
}}>
|
||||
<div className='codeTitle'>支付Pay</div>
|
||||
<div style={{
|
||||
background: '#FAFCFF',
|
||||
height: '630px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
flexDirection: 'column',
|
||||
|
||||
}}>
|
||||
|
||||
<Image src={thirdPartyPayUrl} fallback={errorImage} preview={false} />
|
||||
<div className='paytip'>{thirdParty}扫码支付</div>
|
||||
<div style={{ marginTop: 10 }}>{countdownTime}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/* {
|
||||
isCountdownTimeout ? (
|
||||
<div className="qr-timeout" onClick={() => {
|
||||
@ -424,8 +691,9 @@ export default function Payment(props: IPaymentProps) {
|
||||
</div>
|
||||
) : <></>
|
||||
} */}
|
||||
|
||||
</div>
|
||||
<div>{countdownTime}</div>
|
||||
|
||||
</Flex>
|
||||
</>
|
||||
}
|
||||
@ -443,34 +711,13 @@ export default function Payment(props: IPaymentProps) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Spin tip="正在提交..." spinning={isLoading}>
|
||||
{/* <Spin tip="正在提交..." spinning={isLoading}>
|
||||
<Form
|
||||
name="basic"
|
||||
form={form}
|
||||
onFinish={() => {
|
||||
setPaymentModal(true)
|
||||
// post<any>({
|
||||
// messageApi,
|
||||
// url: `/api/pay/pay-account-recharge/${accountRechargeId}`,
|
||||
// body: {
|
||||
// thirdParty: form.getFieldValue('thirdParty'),
|
||||
// rechargeMoney: form.getFieldValue('rechargeMoney'),
|
||||
// orgName: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgName') : '',
|
||||
// orgBank: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgBank') : '',
|
||||
// orgNumber: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgNumber') : '',
|
||||
// rechargeFinalTime: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('rechargeFinalTime') : '',
|
||||
// rechargeVoucher: thirdParty == ThirdPartyEnum.DGZZ ? rechargeVoucherArray.join(',') : '',
|
||||
// },
|
||||
// onBefore() {
|
||||
// setIsLoading(true);
|
||||
// },
|
||||
// onSuccess() {
|
||||
// props.handleConfirm();
|
||||
// },
|
||||
// onFinally() {
|
||||
// setIsLoading(false);
|
||||
// }
|
||||
// });
|
||||
|
||||
}}
|
||||
autoComplete="off"
|
||||
>
|
||||
@ -482,11 +729,16 @@ export default function Payment(props: IPaymentProps) {
|
||||
<Radio.Group onChange={(e) => {
|
||||
form.setFieldValue('thirdParty', e.target.value);
|
||||
setThirdParty(e.target.value);
|
||||
// console.log(e.target.value);
|
||||
setPackageInfoId('');
|
||||
setIsRechargeMoneyEdit(false)
|
||||
setValue('')
|
||||
form.setFieldValue('rechargeMoney', 280);
|
||||
setSelectedRowKeys([]);
|
||||
|
||||
}}>
|
||||
<Radio value="微信">微信</Radio>
|
||||
<Radio value="支付宝">支付宝</Radio>
|
||||
{/*<Radio value="银联">银联</Radio>*/}
|
||||
<Radio value="支付宝">1支付宝</Radio>
|
||||
<Radio value="对公转账">对公转账</Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
@ -497,14 +749,289 @@ export default function Payment(props: IPaymentProps) {
|
||||
>
|
||||
{renderMoney()}
|
||||
</Form.Item>
|
||||
|
||||
<div style={{
|
||||
display: 'flex'
|
||||
}}>
|
||||
<div style={{
|
||||
marginRight: 10
|
||||
}}>购买服务包:</div>
|
||||
<Radio.Group
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
options={[
|
||||
{
|
||||
value: 'ALL',
|
||||
label: (
|
||||
<Flex gap="small" justify="center" align="center" vertical>
|
||||
全托管
|
||||
</Flex>
|
||||
),
|
||||
},
|
||||
{
|
||||
value: 'MATERIAL',
|
||||
label: (
|
||||
<Flex gap="small" justify="center" align="center" vertical>
|
||||
写材料
|
||||
</Flex>
|
||||
),
|
||||
},
|
||||
|
||||
]}
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div style={{
|
||||
display: value ? 'unset' : 'none',
|
||||
}}>
|
||||
<Table
|
||||
columns={packColumns}
|
||||
dataSource={packList}
|
||||
rowSelection={{
|
||||
// ...rowSelection,
|
||||
selectedRowKeys,
|
||||
type: 'radio', // 设置为单选
|
||||
|
||||
}}
|
||||
pagination={{
|
||||
defaultPageSize: 5, // 设置默认一页显示 5 条数据
|
||||
}}
|
||||
rowKey="packageInfoId"
|
||||
onRow={(record) => {
|
||||
return {
|
||||
onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
|
||||
event.stopPropagation();
|
||||
// 模拟点击单选框
|
||||
//
|
||||
// 判断当前行是否已经被选中
|
||||
const isSelected = selectedRowKeys.includes(record.packageInfoId);
|
||||
if (isSelected) {
|
||||
// 处理取消选择的情况
|
||||
setSelectedRowKeys([]);
|
||||
setPackageInfoId('');
|
||||
form.setFieldValue('rechargeMoney', 280);
|
||||
getPay('');
|
||||
} else {
|
||||
// 处理选中的情况
|
||||
setSelectedRowKeys([record.packageInfoId]);
|
||||
setPackageInfoId(record.packageInfoId);
|
||||
form.setFieldValue('rechargeMoney', (record.packageMoney) / 100);
|
||||
getPay(record.packageInfoId);
|
||||
}
|
||||
},
|
||||
style: { cursor: 'pointer' }
|
||||
};
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{renderPayBody()}
|
||||
<div style={{ marginTop: '15px', textAlign: 'center' }}>
|
||||
<Button type="primary" htmlType="submit" style={{ backgroundColor: 'var(--color-primary)' ,display:showPay}}>
|
||||
完成付款
|
||||
</Button>
|
||||
<Button type="default" style={{ marginLeft: '15px' }} onClick={() => {
|
||||
props.handleCancel();
|
||||
}}>关闭窗口</Button>
|
||||
<div style={{
|
||||
display: thirdParty == '对公转账' ? 'unset' : 'none'
|
||||
}}>
|
||||
<div style={{ marginTop: '15px', textAlign: 'center', }}>
|
||||
<Button type="primary" htmlType="submit" style={{ backgroundColor: 'var(--color-primary)', display: showPay }}>
|
||||
完成付款
|
||||
</Button>
|
||||
<Button type="default" style={{ marginLeft: '15px' }} onClick={() => {
|
||||
props.handleCancel();
|
||||
}}>关闭窗口</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
</Spin> */}
|
||||
<Spin tip="正在提交..." spinning={isLoading}>
|
||||
<Form
|
||||
name="basic"
|
||||
form={form}
|
||||
onFinish={() => {
|
||||
setPaymentModal(true)
|
||||
|
||||
}}
|
||||
autoComplete="off"
|
||||
>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
}}>
|
||||
<div className='payBoxLeft'>
|
||||
<Form.Item
|
||||
label="充值金额"
|
||||
name="rechargeMoney"
|
||||
rules={[{ required: true, message: '请输入金额' }]}
|
||||
>
|
||||
{renderMoney()}
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="支付方式"
|
||||
name="thirdParty"
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Radio.Group onChange={(e) => {
|
||||
form.setFieldValue('thirdParty', e.target.value);
|
||||
setThirdParty(e.target.value);
|
||||
// console.log(e.target.value);
|
||||
setPackageInfoId('');
|
||||
setIsRechargeMoneyEdit(false)
|
||||
// setValue('')
|
||||
form.setFieldValue('rechargeMoney', 280);
|
||||
// setSelectedRowKeys([]);
|
||||
|
||||
}}>
|
||||
<Radio value="微信">
|
||||
<Image src={wx} width={27} height={25} preview={false} />
|
||||
<span style={{ marginLeft: 5, marginRight: 20 }}>微信</span>
|
||||
</Radio>
|
||||
<Radio value="支付宝">
|
||||
<Image src={zfb} width={27} height={25} preview={false} />
|
||||
<span style={{ marginLeft: 5, marginRight: 20 }}>支付宝</span>
|
||||
</Radio>
|
||||
<Radio value="对公转账">
|
||||
<Image src={dg} width={27} height={25}
|
||||
preview={false}
|
||||
/>
|
||||
<span style={{ marginLeft: 5 }}>对公转账</span>
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
|
||||
|
||||
<div style={{
|
||||
display: 'flex'
|
||||
}}>
|
||||
<div style={{
|
||||
marginRight: 10,
|
||||
marginLeft: 25
|
||||
}}>
|
||||
服务包:</div>
|
||||
<Radio.Group
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
options={[
|
||||
{
|
||||
value: 'MATERIAL',
|
||||
label: (
|
||||
<Flex gap="small" justify="center" align="center" vertical>
|
||||
写材料
|
||||
</Flex>
|
||||
),
|
||||
},
|
||||
{
|
||||
value: 'ALL',
|
||||
label: (
|
||||
<Flex gap="small" justify="center" align="center" vertical>
|
||||
全托管
|
||||
</Flex>
|
||||
),
|
||||
},
|
||||
|
||||
|
||||
]}
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<div style={{
|
||||
display: packList.length > 0 ? 'unset' : 'none',
|
||||
marginLeft: 90
|
||||
}}>
|
||||
|
||||
<Table
|
||||
columns={packColumns}
|
||||
dataSource={packList}
|
||||
|
||||
|
||||
className='packTable'
|
||||
bordered
|
||||
style={{
|
||||
width: '731px',
|
||||
height: '441px',
|
||||
overflow: 'hidden'
|
||||
}}
|
||||
|
||||
pagination={
|
||||
|
||||
false
|
||||
}
|
||||
rowKey="packageInfoId"
|
||||
|
||||
/>
|
||||
<div style={{
|
||||
display: packTotal > 7 ? 'unset' : 'none',
|
||||
}}>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
marginTop: 10,
|
||||
}}>
|
||||
<div className='clickPage'
|
||||
onClick={() => {
|
||||
if (packPage > 1) {
|
||||
setPackPage(packPage - 1);
|
||||
getPackageList(value, packPage - 1);
|
||||
}else{
|
||||
messageApi.error('已经是第一页了');
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: packPage > 1 ? 'pointer' : 'not-allowed',
|
||||
background: packPage > 1? '#abc8ff' : '#BAC8DA',
|
||||
}}
|
||||
>上一页</div>
|
||||
<div className='clickPage' style={{
|
||||
marginLeft: 10,
|
||||
cursor: packPage < packTotal / 7 ? 'pointer' : 'not-allowed',
|
||||
background: packPage < packTotal / 7? '#abc8ff' : '#BAC8DA',
|
||||
}}
|
||||
onClick={() => {
|
||||
if (packPage < packTotal / 7) {
|
||||
setPackPage(packPage + 1);
|
||||
getPackageList(value, packPage + 1);
|
||||
}else{
|
||||
messageApi.error('已经是最后一页了');
|
||||
}
|
||||
}}
|
||||
|
||||
>下一页</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
display: packList.length <= 0 ? 'unset' : 'none',
|
||||
marginLeft: 90
|
||||
}}>
|
||||
<Image
|
||||
src={nodate}
|
||||
// 点击禁止放大
|
||||
preview={false}
|
||||
></Image>
|
||||
<div style={{
|
||||
color: '#BAC8DA ',
|
||||
fontSize: 16,
|
||||
textAlign: 'center',
|
||||
// background:'pink',
|
||||
marginLeft: 90
|
||||
}}>暂无服务包</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='payBoxRight'>
|
||||
{renderPayBody()}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{
|
||||
display: thirdParty == '对公转账' ? 'unset' : 'none'
|
||||
}}>
|
||||
<div style={{ marginTop: '15px', textAlign: 'center', }}>
|
||||
<Button type="primary" htmlType="submit" style={{ backgroundColor: 'var(--color-primary)', display: showPay }}>
|
||||
完成付款
|
||||
</Button>
|
||||
<Button type="default" style={{ marginLeft: '15px' }} onClick={() => {
|
||||
props.handleCancel();
|
||||
}}>关闭窗口</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
</Spin>
|
||||
@ -519,34 +1046,35 @@ export default function Payment(props: IPaymentProps) {
|
||||
},
|
||||
}}
|
||||
onOk={() => {
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/pay/pay-account-recharge/${accountRechargeId}`,
|
||||
body: {
|
||||
thirdParty: form.getFieldValue('thirdParty'),
|
||||
rechargeMoney: form.getFieldValue('rechargeMoney'),
|
||||
orgName: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgName') : '',
|
||||
orgBank: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgBank') : '',
|
||||
orgNumber: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgNumber') : '',
|
||||
rechargeFinalTime: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('rechargeFinalTime') : '',
|
||||
rechargeVoucher: thirdParty == ThirdPartyEnum.DGZZ ? rechargeVoucherArray.join(',') : '',
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
},
|
||||
onSuccess() {
|
||||
props.handleConfirm();
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false);
|
||||
}
|
||||
});
|
||||
post<any>({
|
||||
messageApi,
|
||||
url: `/api/pay/pay-account-recharge/${accountRechargeId}`,
|
||||
body: {
|
||||
thirdParty: form.getFieldValue('thirdParty'),
|
||||
rechargeMoney: form.getFieldValue('rechargeMoney'),
|
||||
orgName: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgName') : '',
|
||||
orgBank: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgBank') : '',
|
||||
orgNumber: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgNumber') : '',
|
||||
rechargeFinalTime: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('rechargeFinalTime') : '',
|
||||
rechargeVoucher: thirdParty == ThirdPartyEnum.DGZZ ? rechargeVoucherArray.join(',') : '',
|
||||
packageInfoId: packageInfoId
|
||||
},
|
||||
onBefore() {
|
||||
setIsLoading(true);
|
||||
},
|
||||
onSuccess() {
|
||||
props.handleConfirm();
|
||||
},
|
||||
onFinally() {
|
||||
setIsLoading(false);
|
||||
}
|
||||
});
|
||||
}}
|
||||
onCancel={() => {
|
||||
setPaymentModal(false);
|
||||
}}>
|
||||
<div style={{display:'flex',alignItems:'center',justifyContent:'center',padding:10}}>
|
||||
<div style={{ fontSize: 20, fontWeight: 700 }}>确定对公转账<span style={{color:'red'}}>¥<span style={{fontSize:30}}>{form.getFieldValue('rechargeMoney')}</span></span> 吗?不确定请修改金额。</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 10 }}>
|
||||
<div style={{ fontSize: 20, fontWeight: 700 }}>确定对公转账<span style={{ color: 'red' }}>¥<span style={{ fontSize: 30 }}>{form.getFieldValue('rechargeMoney')}</span></span> 吗?不确定请修改金额。</div>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
|
@ -1,17 +1,18 @@
|
||||
.pay-table {
|
||||
width: 100%;
|
||||
border: 1px solid var(--color-border);
|
||||
/* border: 1px solid var(--color-border); */
|
||||
border-collapse: collapse;
|
||||
background-color: #FAFCFF;
|
||||
}
|
||||
|
||||
.pay-table tr td {
|
||||
padding: 10px 10px;
|
||||
border: 1px solid var(--color-border);
|
||||
/* border: 1px solid var(--color-border); */
|
||||
}
|
||||
|
||||
.pay-table tr .table-label {
|
||||
text-align: center;
|
||||
background-color: #EEEEEE;
|
||||
/* background-color: #EEEEEE; */
|
||||
}
|
||||
|
||||
.pay-table tr td .mark {
|
||||
@ -30,7 +31,7 @@
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: rgba(0,0,0,0.8);
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@ -45,10 +46,53 @@
|
||||
.qr-timeout .label {
|
||||
padding: 15px;
|
||||
}
|
||||
.moneyBox{
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.moneyBox {
|
||||
display: flex;
|
||||
/* margin-top: 10px; */
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.packTable.css-dev-only-do-not-override-11lehqq.ant-table-wrapper .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>th {
|
||||
background: #D9E6FF !important;
|
||||
}
|
||||
|
||||
/* .packTable.css-dev-only-do-not-override-11lehqq.ant-table-wrapper .ant-table-tbody>tr>th,
|
||||
.css-dev-only-do-not-override-11lehqq.ant-table-wrapper .ant-table-tbody>tr>td {
|
||||
background: #edf3ff !important;
|
||||
} */
|
||||
|
||||
.payBoxTitle {
|
||||
background-color: rgba(217, 230, 255, 0.66);
|
||||
height: 37px;
|
||||
width: 400px;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
line-height: 37px;
|
||||
padding-left: 20px;
|
||||
box-sizing: border-box;
|
||||
/* margin-bottom: 10px; */
|
||||
}
|
||||
|
||||
.codeTitle {
|
||||
background-color: rgba(217, 230, 255, 0.66);
|
||||
height: 37px;
|
||||
width: 400px;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
line-height: 37px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.paytip {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.clickPage {
|
||||
width: 91px;
|
||||
height: 36px;
|
||||
background: #abc8ff;
|
||||
text-align: center;
|
||||
line-height: 36px;
|
||||
color: #FFFFFF ;
|
||||
}
|
@ -21,7 +21,7 @@ export default function RechargeHead() {
|
||||
// sse
|
||||
const initSse = () => {
|
||||
let evtSource;
|
||||
if(DevUserId) {
|
||||
if (DevUserId) {
|
||||
evtSource = new EventSourcePolyfill(`${Axios.defaults.baseURL}/api/sse/connect`, {
|
||||
headers: {
|
||||
'X-USER-ID': DevUserId
|
||||
@ -30,16 +30,16 @@ export default function RechargeHead() {
|
||||
} else {
|
||||
evtSource = new EventSource(`${Axios.defaults.baseURL}/api/sse/connect`);
|
||||
}
|
||||
evtSource.onmessage = function (event:any) {
|
||||
evtSource.onmessage = function (event: any) {
|
||||
const msg = JSON.parse(event.data) as SseMsg;
|
||||
if(msg.type === 'AMOUNT_RECEIVED') {
|
||||
if (msg.type === 'AMOUNT_RECEIVED') {
|
||||
reloadUser(messageApi, globalDispatchContext).then(() => {
|
||||
setIsPaymentModalOpen(false);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
initSse();
|
||||
}, [globalContext.user])
|
||||
@ -57,9 +57,11 @@ export default function RechargeHead() {
|
||||
onCancel={() => {
|
||||
setIsPaymentModalOpen(false);
|
||||
}}
|
||||
width={1300}
|
||||
footer={false}
|
||||
>
|
||||
<Payment
|
||||
show={isPaymentModalOpen}
|
||||
handleConfirm={() => {
|
||||
setIsPaymentModalOpen(false);
|
||||
}}
|
||||
|
@ -18,7 +18,8 @@ export interface ICardProjBuy {
|
||||
handleClick(title: string, additional: {
|
||||
pkg: boolean,
|
||||
videoDemo: boolean,
|
||||
urgent:boolean
|
||||
urgent:boolean,
|
||||
|
||||
}): void;
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,11 @@ export default function ProjCreate() {
|
||||
id: ProjChargeType.ALL,
|
||||
price: allInfo.price,
|
||||
handleClick: (_title, additional) => {
|
||||
nav(`/proj-new/${ProjChargeType.ALL}?${additional.urgent ? 'urgent=true' : 'pkg='}`)
|
||||
nav(`/proj-new/${ProjChargeType.ALL}?${additional.urgent ? 'urgent=true' : 'pkg='}&price=${allInfo.price}`,
|
||||
{
|
||||
state: { price:allInfo.price }
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
]}
|
||||
@ -264,7 +268,14 @@ export default function ProjCreate() {
|
||||
id: ProjChargeType.MATERIAL,
|
||||
price: materialInfo.price,
|
||||
handleClick: (_title, additional) => {
|
||||
nav(`/proj-new/${ProjChargeType.MATERIAL}?${additional.pkg ? 'pkg=true' : 'pkg='}&${additional.videoDemo ? 'videoDemo=true' : 'videoDemo='}`);
|
||||
// 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 }
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
]}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -765,11 +765,26 @@ export default function ProjEditStep2(props: any) {
|
||||
}}
|
||||
style={{ textAlign: 'center' }} // 设置表格内容居中显示
|
||||
rowKey="projOwnerId" // 指定数据项的唯一标识符
|
||||
onRow={(record: any) => {
|
||||
return {
|
||||
onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
|
||||
// 检查点击的元素是否在操作列内
|
||||
const isActionColumn = (event.target as HTMLElement).closest('.ant-table-cell-action');
|
||||
if (!isActionColumn) {
|
||||
// 阻止默认的行点击事件,以避免选中行时触发其他操作
|
||||
event.stopPropagation();
|
||||
// 更新选中的行
|
||||
belongRowSelection.onChange([record.projOwnerId], [record]);
|
||||
}
|
||||
},
|
||||
style: { cursor: 'pointer' }
|
||||
};
|
||||
}}
|
||||
>
|
||||
<Column title="所属者名称" align="center" dataIndex="name"
|
||||
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
@ -782,7 +797,7 @@ export default function ProjEditStep2(props: any) {
|
||||
dataIndex="type"
|
||||
align="center"
|
||||
render={(_text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{record.type === 'PERSONAL' ? '自然人' : '企业/组织'}
|
||||
@ -794,7 +809,7 @@ export default function ProjEditStep2(props: any) {
|
||||
align="center"
|
||||
dataIndex="idCardType"
|
||||
render={(_text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{record.idCardType === 'ID_CARD' ? '身份证' : '营业执照'}
|
||||
@ -803,7 +818,7 @@ export default function ProjEditStep2(props: any) {
|
||||
/>
|
||||
<Column title="所属者证件号" align="center" dataIndex="idCardNo" key="belongCardNo"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
@ -814,6 +829,7 @@ export default function ProjEditStep2(props: any) {
|
||||
<Column
|
||||
title="操作"
|
||||
align="center"
|
||||
className="ant-table-cell-action"
|
||||
render={(_text, record: any) => (
|
||||
<Space size="middle">
|
||||
<a onClick={() => {
|
||||
@ -944,7 +960,23 @@ export default function ProjEditStep2(props: any) {
|
||||
...ContantRowSelection,
|
||||
// selectedRowKeys: selectedKeys // 设置默认选中的行
|
||||
}}
|
||||
|
||||
onRow={(record: any) => {
|
||||
return {
|
||||
onClick: (event: React.MouseEvent<HTMLTableRowElement>) => {
|
||||
// 检查点击的元素是否在操作列内
|
||||
const isActionColumn = (event.target as HTMLElement).closest('.ant-table-cell-action');
|
||||
if (!isActionColumn) {
|
||||
// 阻止默认的行点击事件,以避免选中行时触发其他操作
|
||||
event.stopPropagation();
|
||||
// 更新选中的行
|
||||
ContantRowSelection.onChange([record.projContactId], [record]);
|
||||
}
|
||||
},
|
||||
|
||||
style: { cursor: 'pointer' }
|
||||
};
|
||||
|
||||
}}
|
||||
dataSource={tableContactData}
|
||||
pagination={{
|
||||
defaultPageSize: 5, // 设置默认一页显示 5 条数据
|
||||
@ -954,7 +986,7 @@ export default function ProjEditStep2(props: any) {
|
||||
>
|
||||
<Column title="联系人" align="center" dataIndex="name"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleContantRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
@ -963,7 +995,7 @@ export default function ProjEditStep2(props: any) {
|
||||
/>
|
||||
<Column title="联系人手机号" align="center" dataIndex="phone"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleContantRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
@ -972,16 +1004,16 @@ export default function ProjEditStep2(props: any) {
|
||||
/>
|
||||
<Column title="平台专属客服" align="center" dataIndex="csaNo"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleContantRowClick(record)
|
||||
}}>
|
||||
{text}
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
<Column title="所属公司" align="center" dataIndex="company"
|
||||
<Column title="所属公司" align="center" dataIndex="company"
|
||||
render={(text, record: any) => (
|
||||
<div style={{ cursor: 'default' }} onClick={() => {
|
||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||
handleContantRowClick(record)
|
||||
}}>
|
||||
{text !== '' ? text : '一'}
|
||||
@ -992,6 +1024,7 @@ export default function ProjEditStep2(props: any) {
|
||||
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
||||
<Column
|
||||
title="操作"
|
||||
className="ant-table-cell-action"
|
||||
align="center"
|
||||
render={(_text, record: any) => (
|
||||
<Space size="middle">
|
||||
@ -1134,7 +1167,7 @@ export default function ProjEditStep2(props: any) {
|
||||
body: {
|
||||
projSubName: formInfo.getFieldValue('projSubName'),
|
||||
projVersion: formInfo.getFieldValue('projVersion'),
|
||||
projDevCompleteDate: dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat),
|
||||
projDevCompleteDate: formInfo.getFieldValue('projDevCompleteDate')?dayjs(formInfo.getFieldValue('projDevCompleteDate')).format(dateFormat):'',
|
||||
// companyName: formInfo.getFieldValue('companyName'),
|
||||
// companyNameEn: formInfo.getFieldValue('companyNameEn'),
|
||||
authorName,
|
||||
|
@ -63,14 +63,40 @@
|
||||
/* font-weight: bold; */
|
||||
/* background-color: red; */
|
||||
color: #474747;
|
||||
margin-top: 12px;
|
||||
margin-top: 20px;
|
||||
margin-left: 190px;
|
||||
}
|
||||
|
||||
.formItemOne .css-dev-only-do-not-override-1ae8k9u.ant-picker .ant-picker-input >input{
|
||||
font-size: 16px;
|
||||
}
|
||||
.langselect.css-dev-only-do-not-override-11lehqq.ant-select-outlined:not(.ant-select-customize-input) .ant-select-selector {
|
||||
/* .langselect.css-dev-only-do-not-override-11lehqq.ant-select-outlined:not(.ant-select-customize-input) .ant-select-selector {
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #eeeeee;
|
||||
} */
|
||||
.changeStyle.ant-select-show-search.css-dev-only-do-not-override-11lehqq.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
||||
cursor: text;
|
||||
background: #eeeeee !important;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.changeStyle.ant-select-show-search.css-dev-only-do-not-override-11lehqq.ant-select:not(.ant-select-customize-input) .ant-select-selector input {
|
||||
cursor: auto;
|
||||
color: inherit;
|
||||
height: 100%;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.langselect.css-dev-only-do-not-override-11lehqq.ant-select-outlined:not(.ant-select-customize-input) .ant-select-selector{
|
||||
background: #eeeeee !important;
|
||||
}
|
||||
.langselect.css-dev-only-do-not-override-11lehqq.ant-select-single.ant-select-show-arrow .ant-select-selection-item {
|
||||
padding-right: 18px ;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.langselect.css-dev-only-do-not-override-11lehqq.ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder {
|
||||
padding-right: 18px;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.detaPicker.css-dev-only-do-not-override-11lehqq.ant-picker .ant-picker-input >input {
|
||||
font-size: 16px !important;
|
||||
|
||||
}
|
BIN
src/static/dg.png
Normal file
BIN
src/static/dg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
BIN
src/static/homes.png
Normal file
BIN
src/static/homes.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
src/static/nodate.png
Normal file
BIN
src/static/nodate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
BIN
src/static/wx.png
Normal file
BIN
src/static/wx.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
src/static/zfb.png
Normal file
BIN
src/static/zfb.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
@ -4,6 +4,7 @@ import type { MessageInstance } from "antd/es/message/interface";
|
||||
export const Axios = axios;
|
||||
|
||||
axios.defaults.baseURL = 'http://192.168.0.15:7025/copyright';
|
||||
// axios.defaults.baseURL = 'http://192.168.0.115:8091/copyright';
|
||||
// axios.defaults.baseURL = 'http://192.168.0.103:7025/copyright';
|
||||
// axios.defaults.baseURL = 'http://192.168.43.145:7025/copyright';
|
||||
// axios.defaults.baseURL = 'http://127.0.0.1:7025/copyright';
|
||||
|
Loading…
Reference in New Issue
Block a user