forked from gxwebsoft/mp-10550
提交代码
This commit is contained in:
44
src/user/car/BestSellers.tsx
Normal file
44
src/user/car/BestSellers.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import {useEffect} from "react";
|
||||
import {Image, Space} from '@nutui/nutui-react-taro'
|
||||
import Taro from '@tarojs/taro'
|
||||
|
||||
const BestSellers = (props: any) => {
|
||||
const reload = () => {
|
||||
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
reload()
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className={'px-2 mb-4'}>
|
||||
<div className={'flex flex-col justify-between items-center rounded-lg px-3'}>
|
||||
{props.data?.map((item, index) => {
|
||||
return (
|
||||
<div key={index} className={'flex bg-white rounded-lg w-full p-3 mb-3'}
|
||||
onClick={() => Taro.navigateTo({url: '/hjm/query?id=' + item.code})}>
|
||||
{item.image && (
|
||||
<Image src={JSON.parse(item.image)[0].url} mode={'scaleToFill'}
|
||||
radius="10%" width="80" height="80"/>
|
||||
)}
|
||||
<div className={'mx-3 flex flex-col'}>
|
||||
<Space direction={'vertical'}>
|
||||
<div className={'car-no text-lg font-bold'}>{item.code}</div>
|
||||
<div className={'flex text-xs text-gray-500'}>快递公司:<span
|
||||
className={'text-gray-700'}>{item.parentOrganization}</span></div>
|
||||
<div className={'flex text-xs text-gray-500'}>保险状态:<span className={'text-green-600'}>{item.insuranceStatus}</span>
|
||||
</div>
|
||||
<div className={'flex text-xs text-gray-500'}>绑定操作员:<span
|
||||
className={'text-gray-700'}>{item.driver}</span></div>
|
||||
</Space>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<div style={{height: '170px'}}></div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default BestSellers
|
||||
4
src/user/car/index.config.ts
Normal file
4
src/user/car/index.config.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '车辆管理',
|
||||
navigationStyle: 'custom'
|
||||
})
|
||||
62
src/user/car/index.tsx
Normal file
62
src/user/car/index.tsx
Normal file
@@ -0,0 +1,62 @@
|
||||
import {useEffect, useState} from "react";
|
||||
import Taro from '@tarojs/taro'
|
||||
import {ArrowLeft} from '@nutui/icons-react-taro'
|
||||
import {NavBar, InfiniteLoading} from '@nutui/nutui-react-taro'
|
||||
import {pageHjmCar} from "@/api/hjm/hjmCar";
|
||||
import {HjmCar} from "@/api/hjm/hjmCar/model";
|
||||
import BestSellers from "./BestSellers";
|
||||
|
||||
/**
|
||||
* 文章终极列表
|
||||
* @constructor
|
||||
*/
|
||||
const Index = () => {
|
||||
const [statusBarHeight, setStatusBarHeight] = useState<number>()
|
||||
const [list, setList] = useState<HjmCar[]>([])
|
||||
|
||||
const reload = () => {
|
||||
// 获取车辆列表
|
||||
pageHjmCar({driverId: Taro.getStorageSync('UserId')}).then(res => {
|
||||
setList(res?.list || [])
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
Taro.getSystemInfo({
|
||||
success: (res) => {
|
||||
setStatusBarHeight(res.statusBarHeight)
|
||||
},
|
||||
})
|
||||
reload()
|
||||
}, [])
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<NavBar
|
||||
fixed={true}
|
||||
style={{marginTop: `${statusBarHeight}px`}}
|
||||
onBackClick={() => {
|
||||
}}
|
||||
left={
|
||||
<>
|
||||
<ArrowLeft size={18} onClick={() => {Taro.navigateBack()}} />
|
||||
{/*<SearchBar shape="round" maxLength={5} style={{paddingLeft: '1px'}}/>*/}
|
||||
{/*<div className={'flex flex-col text-center justify-center items-center'}>*/}
|
||||
{/* <Filter size={14}/>*/}
|
||||
{/* <div className={'text-xs text-gray-600 whitespace-nowrap'}>筛选</div>*/}
|
||||
{/*</div>*/}
|
||||
</>
|
||||
}
|
||||
>
|
||||
<span>车辆管理</span>
|
||||
</NavBar>
|
||||
<InfiniteLoading
|
||||
className={'w-full fixed left-0 top-24'}
|
||||
>
|
||||
<BestSellers data={list}/>
|
||||
</InfiniteLoading>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default Index
|
||||
3
src/user/company/company.config.ts
Normal file
3
src/user/company/company.config.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '公司资料'
|
||||
})
|
||||
54
src/user/company/company.tsx
Normal file
54
src/user/company/company.tsx
Normal file
@@ -0,0 +1,54 @@
|
||||
import {Cell} from '@nutui/nutui-react-taro';
|
||||
import {ArrowRight} from '@nutui/icons-react-taro'
|
||||
|
||||
function Company() {
|
||||
return (
|
||||
<div className={'p-4'}>
|
||||
<Cell title={
|
||||
<div className={'flex'}>
|
||||
<div className={'title w-16 pr-4'}>企业名称</div>
|
||||
<div className={'extra'}>南宁市网宿信息科技有限公司</div>
|
||||
</div>
|
||||
} align={'center'}/>
|
||||
<div className={'py-2 text-red-100 text-sm'}>经营信息</div>
|
||||
<Cell.Group>
|
||||
{/*<Cell title={*/}
|
||||
{/* <div className={'flex'}>*/}
|
||||
{/* <div className={'title w-16 pr-4'}>商户号</div>*/}
|
||||
{/* <div className={'extra'}>1557418831</div>*/}
|
||||
{/* </div>*/}
|
||||
{/*} align={'center'}/>*/}
|
||||
<Cell title={
|
||||
<div className={'flex'}>
|
||||
<div className={'title w-16 pr-4'}>企业简称</div>
|
||||
<div className={'extra'}>网宿软件</div>
|
||||
</div>
|
||||
} align={'center'}/>
|
||||
<Cell title={
|
||||
<div className={'flex'}>
|
||||
<div className={'title w-16 pr-4'}>联系电话</div>
|
||||
<div className={'extra'}>137****8880</div>
|
||||
</div>
|
||||
} align={'center'}/>
|
||||
</Cell.Group>
|
||||
<div className={'py-2 text-red-100 text-sm'}>主体信息</div>
|
||||
<Cell title={
|
||||
<div className={'flex'}>
|
||||
<div className={'title w-16 pr-4'}>信息详情</div>
|
||||
<div className={'extra'}></div>
|
||||
</div>
|
||||
} align={'center'} extra={<ArrowRight color="#cccccc" size={16} />}/>
|
||||
<div className={'py-2 text-red-100 text-sm'}>企业负责人</div>
|
||||
<Cell.Group>
|
||||
<Cell title={
|
||||
<div className={'flex'}>
|
||||
<div className={'title w-16 pr-4'}>姓名</div>
|
||||
<div className={'extra'}>赵*林</div>
|
||||
</div>
|
||||
} align={'center'}/>
|
||||
</Cell.Group>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Company
|
||||
3
src/user/profile/profile.config.ts
Normal file
3
src/user/profile/profile.config.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '个人资料'
|
||||
})
|
||||
6
src/user/profile/profile.scss
Normal file
6
src/user/profile/profile.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
.nut-form-item-label-left {
|
||||
padding-left: 8px !important;
|
||||
}
|
||||
.nut-form-item-label-required{
|
||||
top: 0 !important;
|
||||
}
|
||||
200
src/user/profile/profile.tsx
Normal file
200
src/user/profile/profile.tsx
Normal file
@@ -0,0 +1,200 @@
|
||||
import {Cell, Avatar} from '@nutui/nutui-react-taro';
|
||||
import {ArrowRight} from '@nutui/icons-react-taro'
|
||||
import {useEffect, useState} from "react";
|
||||
import {ConfigProvider} from '@nutui/nutui-react-taro'
|
||||
import Taro, {getCurrentInstance} from '@tarojs/taro'
|
||||
import {getUserInfo, updateUserInfo} from "@/api/layout";
|
||||
import {TenantId} from "@/utils/config";
|
||||
import { TextArea } from '@nutui/nutui-react-taro'
|
||||
import './profile.scss'
|
||||
|
||||
const {router} = getCurrentInstance()
|
||||
import {
|
||||
Form,
|
||||
Button,
|
||||
Input,
|
||||
Radio,
|
||||
} from '@nutui/nutui-react-taro'
|
||||
import {DictData} from "@/api/system/dict-data/model";
|
||||
import {pageDictData} from "@/api/system/dict-data";
|
||||
import {User} from "@/api/system/user/model";
|
||||
function Profile() {
|
||||
const formId = Number(router?.params.id)
|
||||
|
||||
const [sex, setSex] = useState<DictData[]>()
|
||||
const [FormData, setFormData] = useState<User>(
|
||||
{
|
||||
userId: undefined,
|
||||
nickname: undefined,
|
||||
realName: undefined,
|
||||
avatar: undefined,
|
||||
sex: undefined,
|
||||
phone: undefined,
|
||||
address: undefined,
|
||||
comments: undefined
|
||||
}
|
||||
)
|
||||
|
||||
const reload = () => {
|
||||
// 获取数据字典
|
||||
pageDictData({limit: 200}).then(res => {
|
||||
setSex(res?.list.filter((item) => item.dictCode === 'sex'))
|
||||
})
|
||||
// 获取用户信息
|
||||
getUserInfo().then((data) => {
|
||||
// 更新表单数据
|
||||
setFormData(data);
|
||||
})
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const submitSucceed = (values: any) => {
|
||||
console.log(values, 'values')
|
||||
console.log(formId, 'formId>>')
|
||||
updateUserInfo(values).then(() => {
|
||||
Taro.showToast({title: `保存成功`, icon: 'success'})
|
||||
setTimeout(() => {
|
||||
return Taro.navigateBack()
|
||||
}, 1000)
|
||||
}).catch(() => {
|
||||
Taro.showToast({
|
||||
title: '保存失败',
|
||||
icon: 'error'
|
||||
});
|
||||
})
|
||||
}
|
||||
const submitFailed = (error: any) => {
|
||||
console.log(error, 'err...')
|
||||
}
|
||||
|
||||
const uploadAvatar = ({detail}) => {
|
||||
setFormData({
|
||||
...FormData,
|
||||
avatar: `${detail.avatarUrl}`,
|
||||
})
|
||||
Taro.uploadFile({
|
||||
url: 'https://server.gxwebsoft.com/api/oss/upload',
|
||||
filePath: detail.avatarUrl,
|
||||
name: 'file',
|
||||
header: {
|
||||
'content-type': 'application/json',
|
||||
TenantId
|
||||
},
|
||||
success: (res) => {
|
||||
const data = JSON.parse(res.data);
|
||||
if (data.code === 0) {
|
||||
updateUserInfo({
|
||||
userId: FormData?.userId,
|
||||
avatar: `${data.data.thumbnail}`
|
||||
}).then(() => {
|
||||
Taro.showToast({
|
||||
title: '上传成功',
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取微信昵称
|
||||
const getWxNickname = (nickname: string) => {
|
||||
// 更新表单数据
|
||||
setFormData({
|
||||
...FormData,
|
||||
nickname: nickname
|
||||
});
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
reload()
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={'p-4'}>
|
||||
<Cell.Group>
|
||||
<Cell title={'头像'} align={'center'} extra={
|
||||
<>
|
||||
<Button open-type="chooseAvatar" style={{height: '58px'}} onChooseAvatar={uploadAvatar}>
|
||||
<Avatar src={FormData?.avatar} size="54"/>
|
||||
</Button>
|
||||
<ArrowRight color="#cccccc" className={'ml-1'} size={20}/>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<Cell title={'手机号码'} align={'center'} extra={FormData?.phone}/>
|
||||
</Cell.Group>
|
||||
<ConfigProvider>
|
||||
<Form
|
||||
divider
|
||||
initialValues={FormData}
|
||||
labelPosition="left"
|
||||
onFinish={(values) => submitSucceed(values)}
|
||||
onFinishFailed={(errors) => submitFailed(errors)}
|
||||
footer={
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
width: '100%'
|
||||
}}
|
||||
>
|
||||
<Button nativeType="submit" block type="info">
|
||||
提交
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Form.Item
|
||||
label={'昵称'}
|
||||
name="nickname"
|
||||
initialValue={FormData.nickname}
|
||||
rules={[{message: '请获取微信昵称'}]}
|
||||
>
|
||||
<Input
|
||||
type="nickname"
|
||||
className="info-content__input"
|
||||
placeholder="请输入昵称"
|
||||
value={FormData?.nickname}
|
||||
onInput={(e) => getWxNickname(e.detail.value)}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="性别"
|
||||
name="sex"
|
||||
initialValue={FormData.sex}
|
||||
rules={[
|
||||
{message: '请选择性别'}
|
||||
]}
|
||||
>
|
||||
<Radio.Group value={FormData?.sex} direction="horizontal">
|
||||
{
|
||||
sex?.map((item, index) => (
|
||||
<Radio key={index} value={item.dictDataCode}>
|
||||
{item.dictDataName}
|
||||
</Radio>
|
||||
))
|
||||
}
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="备注信息"
|
||||
name="comments"
|
||||
initialValue={FormData.comments}
|
||||
rules={[{message: '备注信息'}]}
|
||||
>
|
||||
<TextArea
|
||||
placeholder={'个性签名'}
|
||||
value={FormData?.comments}
|
||||
onChange={(value) => setFormData({...FormData, comments: value})}
|
||||
/>
|
||||
<Input placeholder={'个性签名'} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</ConfigProvider>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Profile
|
||||
3
src/user/setting/setting.config.ts
Normal file
3
src/user/setting/setting.config.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '账号设置'
|
||||
})
|
||||
50
src/user/setting/setting.tsx
Normal file
50
src/user/setting/setting.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
import {Cell} from '@nutui/nutui-react-taro';
|
||||
import {ArrowRight} from '@nutui/icons-react-taro'
|
||||
import {useEffect, useState} from "react";
|
||||
import {getUserInfo} from "@/api/layout";
|
||||
import {User} from "@/api/system/user/model";
|
||||
|
||||
function Company() {
|
||||
const [user, setUser] = useState<User>({
|
||||
mobile: '',
|
||||
nickname: '',
|
||||
phone: '',
|
||||
password: ''
|
||||
})
|
||||
|
||||
console.log(user.userId,'userId')
|
||||
const reload = () => {
|
||||
getUserInfo().then((data) => {
|
||||
setUser(data)
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
reload()
|
||||
}, []);
|
||||
return (
|
||||
<div className={'p-4'}>
|
||||
{/*<div className={'px-4 py-2 text-gray-400 text-sm'}>系统设置</div>*/}
|
||||
<Cell.Group>
|
||||
<Cell title={
|
||||
<div className={'flex'}>
|
||||
<div className={'title w-16 pr-4'}>关于我们</div>
|
||||
</div>
|
||||
} align={'center'} extra={<ArrowRight color="#cccccc" size={16}/>}/>
|
||||
<Cell title={
|
||||
<div className={'flex'}>
|
||||
<div className={'title w-16 pr-4'}>隐私政策</div>
|
||||
</div>
|
||||
} align={'center'} extra={<ArrowRight color="#cccccc" size={16}/>}/>
|
||||
</Cell.Group>
|
||||
<Cell title={
|
||||
<div className={'flex'}>
|
||||
<div className={'title w-16 pr-4'}>当前版本</div>
|
||||
<div className={'extra text-gray-400'}>v1.0.32</div>
|
||||
</div>
|
||||
} align={'center'} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Company
|
||||
3
src/user/userVerify/index.config.ts
Normal file
3
src/user/userVerify/index.config.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '实名认证'
|
||||
})
|
||||
339
src/user/userVerify/index.tsx
Normal file
339
src/user/userVerify/index.tsx
Normal file
@@ -0,0 +1,339 @@
|
||||
import {useEffect, useState} from "react";
|
||||
import {Image} from '@nutui/nutui-react-taro'
|
||||
import {ConfigProvider} from '@nutui/nutui-react-taro'
|
||||
import Taro from '@tarojs/taro'
|
||||
|
||||
import {
|
||||
Form,
|
||||
Button,
|
||||
Input,
|
||||
Radio,
|
||||
} from '@nutui/nutui-react-taro'
|
||||
import {UserVerify} from "@/api/system/userVerify/model";
|
||||
import {addUserVerify, myUserVerify, updateUserVerify} from "@/api/system/userVerify";
|
||||
import {uploadFile} from "@/api/system/file";
|
||||
|
||||
function Index() {
|
||||
const [isUpdate, setIsUpdate] = useState<boolean>(false)
|
||||
const [submitText, setSubmitText] = useState<string>('提交')
|
||||
|
||||
const [FormData, setFormData] = useState<UserVerify>({
|
||||
userId: undefined,
|
||||
type: undefined,
|
||||
phone: undefined,
|
||||
avatar: undefined,
|
||||
realName: undefined,
|
||||
idCard: undefined,
|
||||
birthday: undefined,
|
||||
sfz1: undefined,
|
||||
sfz2: undefined,
|
||||
zzCode: undefined,
|
||||
zzImg: undefined,
|
||||
status: undefined,
|
||||
statusText: undefined,
|
||||
comments: undefined
|
||||
})
|
||||
const reload = () => {
|
||||
myUserVerify({}).then(data => {
|
||||
if (data) {
|
||||
setIsUpdate(true);
|
||||
setFormData(data)
|
||||
if(data.status == 2){
|
||||
setSubmitText('重新提交')
|
||||
}
|
||||
} else {
|
||||
setFormData({
|
||||
type: 0
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const submitSucceed = (values: any) => {
|
||||
console.log('提交表单', values);
|
||||
if (FormData.status != 2 && FormData.status != undefined) return false;
|
||||
if (FormData.type == 0) {
|
||||
if (!FormData.sfz1 || !FormData.sfz2) {
|
||||
Taro.showToast({
|
||||
title: '请上传身份证正反面',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!FormData.realName || !FormData.idCard) {
|
||||
Taro.showToast({
|
||||
title: '请填写真实姓名和身份证号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (FormData.type == 1) {
|
||||
if (!FormData.zzImg) {
|
||||
Taro.showToast({
|
||||
title: '请上传营业执照',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!FormData.name || !FormData.zzCode) {
|
||||
Taro.showToast({
|
||||
title: '请填写主体名称和营业执照号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(!FormData.realName){
|
||||
Taro.showToast({
|
||||
title: '请填写真实姓名',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
const saveOrUpdate = isUpdate ? updateUserVerify : addUserVerify;
|
||||
saveOrUpdate({...FormData, status: 0}).then(() => {
|
||||
Taro.showToast({title: `提交成功`, icon: 'success'})
|
||||
setTimeout(() => {
|
||||
return Taro.navigateBack()
|
||||
}, 1000)
|
||||
}).catch(() => {
|
||||
Taro.showToast({
|
||||
title: '提交失败',
|
||||
icon: 'error'
|
||||
});
|
||||
}).finally(() => {
|
||||
reload();
|
||||
})
|
||||
}
|
||||
const submitFailed = (error: any) => {
|
||||
console.log(error, 'err...')
|
||||
}
|
||||
|
||||
const uploadSfz1 = () => {
|
||||
if (FormData.status != 2 && FormData.status != undefined) return false;
|
||||
uploadFile().then(data => {
|
||||
setFormData({
|
||||
...FormData,
|
||||
sfz1: data.url
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
const uploadSfz2 = () => {
|
||||
if (FormData.status != 2 && FormData.status != undefined) return false;
|
||||
uploadFile().then(data => {
|
||||
setFormData({
|
||||
...FormData,
|
||||
sfz2: data.url
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const uploadZzImg = () => {
|
||||
if (FormData.status != 2 && FormData.status != undefined) return false;
|
||||
uploadFile().then(data => {
|
||||
setFormData({
|
||||
...FormData,
|
||||
zzImg: data.url
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
reload()
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={'p-4'}>
|
||||
<ConfigProvider>
|
||||
<Form
|
||||
divider
|
||||
initialValues={FormData}
|
||||
labelPosition="left"
|
||||
onFinish={(values) => submitSucceed(values)}
|
||||
onFinishFailed={(errors) => submitFailed(errors)}
|
||||
footer={
|
||||
FormData.status != 1 && FormData.status != 0 && (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
width: '100%'
|
||||
}}
|
||||
>
|
||||
<Button nativeType="submit" block type={'info'}
|
||||
disabled={FormData.status != 2 && FormData.status != undefined}>
|
||||
{submitText}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
>
|
||||
<Form.Item
|
||||
label="类型"
|
||||
name="type"
|
||||
initialValue={FormData.type}
|
||||
required
|
||||
>
|
||||
<Radio.Group value={FormData?.type} direction="horizontal"
|
||||
disabled={FormData.status != 2 && FormData.status != undefined}
|
||||
onChange={(value) => setFormData({...FormData, type: value})}>
|
||||
<Radio key={0} value={0}>
|
||||
个人
|
||||
</Radio>
|
||||
<Radio key={1} value={1}>
|
||||
企业
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
{
|
||||
// 个人类型
|
||||
FormData.type == 0 && (
|
||||
<>
|
||||
<Form.Item
|
||||
label={'真实姓名'}
|
||||
name="realName"
|
||||
required
|
||||
initialValue={FormData.realName}
|
||||
rules={[{message: '请输入真实姓名'}]}
|
||||
>
|
||||
<Input
|
||||
placeholder={'请输入真实姓名'}
|
||||
type="text"
|
||||
disabled={FormData.status != 2 && FormData.status != undefined}
|
||||
value={FormData?.realName}
|
||||
onChange={(value) => setFormData({...FormData, realName: value})}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={'身份证号码'}
|
||||
name="idCard"
|
||||
required
|
||||
initialValue={FormData.idCard}
|
||||
rules={[{message: '请输入身份证号码'}]}
|
||||
>
|
||||
<Input
|
||||
placeholder="请输入身份证号码"
|
||||
type="text"
|
||||
value={FormData?.idCard}
|
||||
disabled={FormData.status != 2 && FormData.status != undefined}
|
||||
maxLength={18}
|
||||
onChange={(value) => setFormData({...FormData, idCard: value})}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={'上传证件'}
|
||||
name="image"
|
||||
required
|
||||
rules={[{message: '请上传身份证正反面'}]}
|
||||
>
|
||||
<div className={'flex gap-2'}>
|
||||
<div onClick={uploadSfz1}>
|
||||
<Image src={FormData.sfz1}
|
||||
radius="10%" width="80" height="80"/>
|
||||
</div>
|
||||
<div onClick={uploadSfz2}>
|
||||
<Image src={FormData.sfz2} mode={'scaleToFill'}
|
||||
radius="10%" width="80" height="80"/>
|
||||
</div>
|
||||
</div>
|
||||
</Form.Item>
|
||||
</>
|
||||
)
|
||||
}
|
||||
{
|
||||
// 企业类型
|
||||
FormData.type == 1 && (
|
||||
<>
|
||||
<Form.Item
|
||||
label={'主体名称'}
|
||||
name="name"
|
||||
required
|
||||
initialValue={FormData.name}
|
||||
rules={[{message: '请输入公司名称或单位名称'}]}
|
||||
>
|
||||
<Input
|
||||
placeholder={'请输入主体名称'}
|
||||
type="text"
|
||||
value={FormData?.name}
|
||||
onChange={(value) => setFormData({...FormData, name: value})}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={'营业执照号码'}
|
||||
name="zzCode"
|
||||
required
|
||||
initialValue={FormData.zzCode}
|
||||
rules={[{message: '请输入营业执照号码'}]}
|
||||
>
|
||||
<Input
|
||||
placeholder="请输入营业执照号码"
|
||||
type="text"
|
||||
value={FormData?.zzCode}
|
||||
maxLength={18}
|
||||
onChange={(value) => setFormData({...FormData, zzCode: value})}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={'上传营业执照'}
|
||||
name="zzImg"
|
||||
required
|
||||
rules={[{message: '请上传营业执照'}
|
||||
]}
|
||||
>
|
||||
<div onClick={uploadZzImg}>
|
||||
<Image src={FormData.zzImg} mode={'scaleToFill'}
|
||||
radius="10%" width="80" height="80"/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
</>
|
||||
)
|
||||
}
|
||||
<Form.Item
|
||||
label={'真实姓名'}
|
||||
name="realName"
|
||||
required
|
||||
initialValue={FormData.realName}
|
||||
rules={[{message: '请输入真实姓名'}]}
|
||||
>
|
||||
<Input
|
||||
placeholder={'请输入真实姓名'}
|
||||
type="text"
|
||||
value={FormData?.realName}
|
||||
onChange={(value) => setFormData({...FormData, realName: value})}
|
||||
/>
|
||||
</Form.Item>
|
||||
{
|
||||
FormData.status != undefined && (
|
||||
<Form.Item
|
||||
label={'审核状态'}
|
||||
name="status"
|
||||
>
|
||||
<span className={'text-gray-500'}>{FormData.statusText}</span>
|
||||
</Form.Item>
|
||||
)
|
||||
}
|
||||
|
||||
{FormData.status == 2 && (
|
||||
<Form.Item
|
||||
label={'驳回原因'}
|
||||
name="comments"
|
||||
>
|
||||
<div className={'flex text-orange-500'}>
|
||||
{FormData.comments}
|
||||
</div>
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
</Form>
|
||||
</ConfigProvider>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Index
|
||||
Reference in New Issue
Block a user