新增合同信息获取支付方式显示
This commit is contained in:
parent
817ac2c407
commit
c47c50b728
@ -1,16 +1,42 @@
|
||||
import './ContractText.css'
|
||||
import { get } from "../../util/AjaxUtils.ts";
|
||||
import useMessage from "antd/es/message/useMessage";
|
||||
import { useEffect, useState } from 'react';
|
||||
export default function ContractText(props: any) {
|
||||
const [messageApi, messageApiContext] = useMessage();
|
||||
// 公司名称
|
||||
const [contractCompanyName, setContractCompanyName] = useState('');
|
||||
// 公司地址
|
||||
const [contractCompanyAddress, setContractCompanyAddress] = useState('');
|
||||
// 联系电话
|
||||
const [contractCompanyPhone, setContractCompanyPhone] = useState('');
|
||||
// 公司简称
|
||||
// const [contractCompanySimpleName, setContractCompanySimpleName] = useState('');
|
||||
|
||||
|
||||
const getContractINfo = (() => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: '/api/contract/management/get-contract-info',
|
||||
onSuccess({ data }) {
|
||||
// console.log('信息', data);
|
||||
setContractCompanyName(data.contractCompanyName);
|
||||
setContractCompanyAddress(data.contractCompanyAddress);
|
||||
setContractCompanyPhone(data.contractCompanyPhone);
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
useEffect(() => {
|
||||
getContractINfo();
|
||||
})
|
||||
const height = window.innerHeight - 200;
|
||||
// 乙方姓名
|
||||
const name = import.meta.env.VITE_NAME?import.meta.env.VITE_NAME:'河北雄安秒著科技有限公司(以下简称“AI喵著网”)';
|
||||
// 乙方地址
|
||||
const address = import.meta.env.VITE_ADRESS?import.meta.env.VITE_ADRESS:'中国(河北)自由贸易试验区雄安片区容东明朗南街131号';
|
||||
// 乙方电话;
|
||||
const phone = import.meta.env.VITE_PHONE?import.meta.env.VITE_PHONE:'400-086-1633';
|
||||
// 乙方签字公司
|
||||
const subName = import.meta.env.VITE_SUBNAME?import.meta.env.VITE_SUBNAME:'河北雄安秒著科技有限公司';
|
||||
|
||||
return (
|
||||
|
||||
<div className='contract' style={{ height: height, overflow: 'auto', padding: '20px 90px' }}>
|
||||
{messageApiContext}
|
||||
<div className='contractTitle contractTextCenter contractTextBold'>AI喵著网用户服务协议</div>
|
||||
<div className='contractNum contractText'>合同编号:</div>
|
||||
<div className='contractBox'>
|
||||
@ -20,9 +46,9 @@ export default function ContractText(props: any) {
|
||||
</div>
|
||||
|
||||
<div className='contractBox'>
|
||||
<div>乙方名称:<span className='contractLine'>{name}</span></div>
|
||||
<div>联系地址:<span className='contractLine'>{address}</span></div>
|
||||
<div>联系电话:<span className='contractLine'>{phone}</span></div>
|
||||
<div>乙方名称:<span className='contractLine'>{contractCompanyName}</span></div>
|
||||
<div>联系地址:<span className='contractLine'>{contractCompanyAddress}</span></div>
|
||||
<div>联系电话:<span className='contractLine'>{contractCompanyPhone}</span></div>
|
||||
</div>
|
||||
<div className='contractBox'>
|
||||
<div className='contractText'>甲乙双方在平等互利基础上一致同意建立友好合作关系,根据《中华人民共和国民法典》之规定,由乙方向甲方有偿提供AI喵著网在线服务,并达成本协议。</div>
|
||||
@ -32,19 +58,19 @@ export default function ContractText(props: any) {
|
||||
<div className='contractTitleTwo contractTextBold'>一、服务内容</div>
|
||||
<div className='contractText'>1.1 根据甲乙双方约定,甲方同意由乙方负责实施甲方通过乙方AI喵著网(网址:https://www.aimzhu.com/)所下单的相关业务,甲方在AI喵著网上注册账户,其注册的下单账号为:***********。</div>
|
||||
<div className='contractText'>1.2 根据甲乙双方约定,乙方为甲方通过AI喵著网提供相关服务,服务内容以甲方通过AI喵著网具体下单选择的服务类型为准。平台提供的服务类型有全托管与写材料两类,服务清单如下所示:</div>
|
||||
<table border={1} style={{ borderCollapse: 'collapse', width: '100%' ,marginTop:10}}>
|
||||
<table border={1} style={{ borderCollapse: 'collapse', width: '100%', marginTop: 10 }}>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colSpan={2} style={{ textAlign: 'center',width: '50%',fontWeight:'700',background:'rgb(218, 218, 218)' }}>全托管</td>
|
||||
<td colSpan={2} style={{ textAlign: 'center',width: '50%',fontWeight:'700',background:'rgb(218, 218, 218)' }}>写材料</td>
|
||||
<td colSpan={2} style={{ textAlign: 'center', width: '50%', fontWeight: '700', background: 'rgb(218, 218, 218)' }}>全托管</td>
|
||||
<td colSpan={2} style={{ textAlign: 'center', width: '50%', fontWeight: '700', background: 'rgb(218, 218, 218)' }}>写材料</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colSpan={2} style={{fontWeight:'700'}}>提供服务</td>
|
||||
<td colSpan={2} style={{fontWeight:'700'}}>提供服务</td>
|
||||
<td colSpan={2} style={{ fontWeight: '700' }}>提供服务</td>
|
||||
<td colSpan={2} style={{ fontWeight: '700' }}>提供服务</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{ textAlign: 'center', width: '8%'}}>1</td>
|
||||
<td style={{ textAlign: 'center', width: '8%' }}>1</td>
|
||||
<td >包可运行软件开发与搭建</td>
|
||||
<td style={{ textAlign: 'center', width: '8%' }}>1</td>
|
||||
<td >通过平台自己搭建可运行软件</td>
|
||||
@ -184,7 +210,7 @@ export default function ContractText(props: any) {
|
||||
<div className='contractText'>日 期: </div>
|
||||
</div>
|
||||
<div className='contractBox'>
|
||||
<div className='contractText' >乙 方:<span className='contractLine'>{subName}</span></div>
|
||||
<div className='contractText' >乙 方:<span className='contractLine'>{contractCompanyName}</span></div>
|
||||
<div className='contractText signBox'>
|
||||
<div>乙方授权代表签字:</div>
|
||||
<div className='sign'></div>
|
||||
|
@ -20,7 +20,7 @@ import {
|
||||
import {
|
||||
ReloadOutlined
|
||||
} from '@ant-design/icons'
|
||||
import { useEffect, useRef, useState ,useContext} from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import locale from 'antd/locale/zh_CN';
|
||||
import dayjs from 'dayjs';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
@ -89,9 +89,9 @@ interface IPaymentProps {
|
||||
handleCancel(): void;
|
||||
show: boolean;
|
||||
}
|
||||
import { GlobalContext } from "../../context/GlobalContext.ts";
|
||||
// import { GlobalContext } from "../../context/GlobalContext.ts";
|
||||
export default function Payment(props: IPaymentProps) {
|
||||
const globalContext = useContext(GlobalContext);
|
||||
// const globalContext = useContext(GlobalContext);
|
||||
const token = sessionStorage.getItem('token')
|
||||
// 服务包相关
|
||||
const [packPage, setPackPage] = useState(1); //服务包数据分页页码
|
||||
@ -134,11 +134,34 @@ export default function Payment(props: IPaymentProps) {
|
||||
}
|
||||
})
|
||||
}
|
||||
const [showWX,setShowWX] = useState(true) //是否显示微信支付
|
||||
const [showZFB,setShowZFB] = useState(true) //是否显示支付宝支付
|
||||
const getUserINfo = (() => {
|
||||
get<any>({
|
||||
messageApi,
|
||||
url: '/api/user-info/get-user-self',
|
||||
onSuccess({ data }) {
|
||||
// console.log('信息',data);
|
||||
if(data.isWxPay){
|
||||
setShowWX(true)
|
||||
}else{
|
||||
setShowWX(false)
|
||||
}
|
||||
if(data.isZfbPay){
|
||||
setShowZFB(true)
|
||||
}else{
|
||||
setShowZFB(false)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
useEffect(() => {
|
||||
getPackageList(value, packPage);
|
||||
console.log(import.meta.env.VITE_PAY);
|
||||
console.log(globalContext);
|
||||
|
||||
// console.log(globalContext);
|
||||
getUserINfo()
|
||||
}, [])
|
||||
const packColumns: TableColumnsType<DataType> = [
|
||||
{
|
||||
@ -954,13 +977,17 @@ export default function Payment(props: IPaymentProps) {
|
||||
// setSelectedRowKeys([]);
|
||||
|
||||
}}>
|
||||
<span>
|
||||
<span style={{
|
||||
display:showWX?'unset':'none'
|
||||
}}>
|
||||
<Radio value="微信" >
|
||||
<Image src={wx} width={27} height={25} preview={false} />
|
||||
<span style={{ marginLeft: 5, marginRight: 20 }}>微信</span>
|
||||
</Radio>
|
||||
</span>
|
||||
<span>
|
||||
<span style={{
|
||||
display:showZFB?'unset':'none'
|
||||
}}>
|
||||
<Radio value="支付宝" >
|
||||
<Image src={zfb} width={27} height={25} preview={false} />
|
||||
<span style={{ marginLeft: 5, marginRight: 20 }}>支付宝</span>
|
||||
|
Loading…
Reference in New Issue
Block a user