Commit f0c57fc4 authored by Sixiang_Zzb's avatar Sixiang_Zzb

物业服务模块bug处理

parents 733f73cb 58c0428b
...@@ -217,7 +217,7 @@ export default defineConfig({ ...@@ -217,7 +217,7 @@ export default defineConfig({
name: 'celllist', name: 'celllist',
routes:[ routes:[
{ path: './', component: './CommunityManagement/CellList/CellList' }, { path: './', component: './CommunityManagement/CellList/CellList' },
{ path: './Add', component: './CommunityManagement/CellList/Add' }, { path: './Add', component: './CommunityManagement/CellList/Adds' },
{path:'./Detail',component:'./CommunityManagement/CellList/Detail'}, {path:'./Detail',component:'./CommunityManagement/CellList/Detail'},
] ]
}, },
......
...@@ -16,7 +16,7 @@ const SearchOptionsTow = (porps: any) => { ...@@ -16,7 +16,7 @@ const SearchOptionsTow = (porps: any) => {
<Select <Select
showSearch showSearch
style={{ width: 200 }} style={{ width: 200 }}
placeholder="Select a person" placeholder="Community Name"
optionFilterProp="children" optionFilterProp="children"
onChange={onChange} onChange={onChange}
defaultValue={def} defaultValue={def}
......
...@@ -12,19 +12,22 @@ const { Option } = Select; ...@@ -12,19 +12,22 @@ const { Option } = Select;
import SelectOptions from '../../components/SelectOptions/index'; import SelectOptions from '../../components/SelectOptions/index';
import { gray } from 'chalk'; import { gray } from 'chalk';
import SearchOptionsCommnity from '../SearchOptions/SearchOptionsCommnity'; import SearchOptionsCommnity from '../SearchOptions/SearchOptionsCommnity';
import { values } from 'lodash';
const TitleSearch = (props: any) => { const TitleSearch = (props: any) => {
// console.log("===================================", props)
const { dispatch, CommunityList } = props; const { dispatch, CommunityList } = props;
const key = props.listkey const key = props.listkey
const name = props.list; const name = props.list;
const single = props.single // const single = props.single
const checklist = props.checklist; // const checklist = props.checklist;
const status = props.status; // const status = props.status;
const communitySelect = props.communitySelect // const communitySelect = props.communitySelect
const defaultValue = props.defaultValue // const defaultValue = props.defaultValue;
const {single,checklist,status,communitySelect,defaultValue} = props;
const time = props.time; const time = props.time;
const community = props.community; const community = props.community;
...@@ -36,8 +39,27 @@ const TitleSearch = (props: any) => { ...@@ -36,8 +39,27 @@ const TitleSearch = (props: any) => {
const formRef = useRef(null) const formRef = useRef(null)
const tosCommunityget = (values: any) => { dispatch({ type: 'Init/tosCommunityget', playload: values }) }; const tosCommunityget = (values: any) => { dispatch({ type: 'Init/tosCommunityget', playload: values }) };
useEffect(() => {
// console.log("标题搜寻组件初始化") OK
if (CommunityList == null) {
// console.log("小区数量初始化") OK
tosCommunityget(null)
}
if (defaultValue != null) {
formRef.current.setFieldsValue(defaultValue)
}
}, []);
useEffect(() => { useEffect(() => {
if (defaultValue != null) {
formRef.current.setFieldsValue(defaultValue)
}
}, [defaultValue])
useEffect(() => {
// console.log(CommunityList)
if (CommunityList != null) { if (CommunityList != null) {
// console.log("小区数量初始化完毕") OK // console.log("小区数量初始化完毕") OK
var tmp = {} var tmp = {}
...@@ -56,7 +78,7 @@ const TitleSearch = (props: any) => { ...@@ -56,7 +78,7 @@ const TitleSearch = (props: any) => {
if (community) { if (community) {
values[community] = communitys values[community] = communitys
} }
// console.log('Success:', values); console.log('Success:', values);
props.onSubmit(values) props.onSubmit(values)
}; };
...@@ -65,7 +87,6 @@ const TitleSearch = (props: any) => { ...@@ -65,7 +87,6 @@ const TitleSearch = (props: any) => {
}; };
const onChange = (date: any, dateString: string) => { const onChange = (date: any, dateString: string) => {
console.log(dateString)
setDate(dateString) setDate(dateString)
} }
...@@ -73,37 +94,14 @@ const TitleSearch = (props: any) => { ...@@ -73,37 +94,14 @@ const TitleSearch = (props: any) => {
setCommunitys(comment) setCommunitys(comment)
} }
// 表单标识
const [form] = Form.useForm()
// 选择小区名字并赋值
const opname = (value: any) => {
form.setFieldsValue({
'communityName': value
})
}
useEffect(() => {
// console.log("标题搜寻组件初始化") OK
if (CommunityList == null) {
// console.log("小区数量初始化") OK
tosCommunityget(null)
}
if (defaultValue != null) {
console.log(defaultValue)
form.setFieldsValue(defaultValue)
}
}, [defaultValue]);
return ( return (
<> <>
<Form form={form} name="basic" initialValues={form} onFinish={onFinish} onFinishFailed={onFinishFailed}> <Form ref={formRef} name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
<Row gutter={32}> <Row gutter={32}>
{ {
communitySelect != null ? communitySelect != null ?
<Col key={"communitySelect_"} ><Form.Item name={"communityName"}><SearchOptionsCommnity titleSearch={true} opname={opname} defaultName={defaultValue ? defaultValue.communityName : null} /></Form.Item></Col> <Col key={"communitySelect_"} ><Form.Item name={"communityName"}><SearchOptionsCommnity titleSearch={true} /></Form.Item></Col>
: null : null
} }
{ {
...@@ -170,6 +168,7 @@ const TitleSearch = (props: any) => { ...@@ -170,6 +168,7 @@ const TitleSearch = (props: any) => {
); );
}; };
function mapStateToProps(state: any) { function mapStateToProps(state: any) {
// console.log("state参数",state)
const { CommunityList } = state.Init; const { CommunityList } = state.Init;
return { return {
CommunityList, CommunityList,
......
...@@ -26,9 +26,20 @@ export default { ...@@ -26,9 +26,20 @@ export default {
}, },
Result:null, Result:null,
// 不知道前面是干嘛的,自增公告列表
NoticeList:[]
}, },
reducers: { reducers: {
// 自增公告列表
retuNotice(state,{ payload }:{payload:any}){
let NoticeList = payload;
return { ...state, NoticeList}
},
///
returnPage(state, { Data,DataPage,DataSave}) { returnPage(state, { Data,DataPage,DataSave}) {
return { ...state, Data,DataPage,DataSave }; return { ...state, Data,DataPage,DataSave };
}, },
...@@ -62,7 +73,7 @@ export default { ...@@ -62,7 +73,7 @@ export default {
*RA({ playload }, { call, put }) { *RA({ playload }, { call, put }) {
const resp = yield call(service.RA, playload); const resp = yield call(service.RA, playload);
console.log(resp)
if (resp.code == 500||resp.error_code!="0000") { if (resp.code == 500||resp.error_code!="0000") {
// window.location.href = '/500'; // window.location.href = '/500';
} }
...@@ -83,6 +94,8 @@ export default { ...@@ -83,6 +94,8 @@ export default {
} }
} }
else { else {
// console.log('===========================')
// console.log(playload)
switch (playload.index) { switch (playload.index) {
case 0: case 0:
case 9: case 9:
...@@ -139,6 +152,12 @@ export default { ...@@ -139,6 +152,12 @@ export default {
let Data2 = {data:resp.data.list,total:resp.data.page}; let Data2 = {data:resp.data.list,total:resp.data.page};
yield put({ type: 'returnPage2', Data2, }); yield put({ type: 'returnPage2', Data2, });
} break; } break;
// 自增公告列表
case 25:{
let NoticeList = resp.data;
yield put({ type: 'retuNotice',payload:NoticeList, });
}
} }
} }
......
import { Effect, Reducer } from 'umi'; import { Effect, Reducer } from 'umi';
import { queryCurrent, query as queryUsers } from '@/services/user'; import { queryCurrent, query as queryUsers} from '@/services/user';
export interface CurrentUser { export interface CurrentUser {
avatar?: string; avatar?: string;
...@@ -41,12 +41,14 @@ const UserModel: UserModelType = { ...@@ -41,12 +41,14 @@ const UserModel: UserModelType = {
*fetch(_, { call, put }) { *fetch(_, { call, put }) {
const response = yield call(queryUsers);
console.error(response) console.log(call)
yield put({ // const response = yield call(queryUsers);
type: 'save', // console.error(response)
payload: response, // yield put({
}); // type: 'save',
// payload: response,
// });
}, },
*fetchCurrent({ playload }, { call, put }) { *fetchCurrent({ playload }, { call, put }) {
console.log("response") console.log("response")
......
import React from 'react';
import { LeftOutlined, EditOutlined } from '@ant-design/icons';
import { Form, Input, Button, Select, TimePicker } from 'antd';
// 样式
import './celllist.less';
const { RangePicker } = TimePicker;
const Adds = () => {
const onFinish = (values: any) => {
console.log('Success:', values);
};
return (
<div className="box">
{/* 头部 */}
<div className="back">
<Button onClick={() => {}}>
<LeftOutlined />
Back
</Button>
</div>
<div className="form">
<h3>
<EditOutlined />
&nbsp; 添加小区
</h3>
<Form
name="basic"
onFinish={onFinish}
labelCol={{ span: 3 }}
wrapperCol={{ span: 18 }}
layout="horizontal"
labelAlign="left"
>
<Form.Item label="Community Name" name="communityName">
<Input style={{ width: 120 }} placeholder="6 Postcode" maxLength={6} />{' '}
<span className="span">
小区地址小区地址小区地址小区地址小区地址小区地址小区地址小区地址小区地址小区地址小区地址
</span>{' '}
<div>
<li className="li">小区名字</li>
</div>
</Form.Item>
<Form.Item label="Working Hours" name="workingHours">
<Input />
</Form.Item>
<Form.Item label="Community Telephone" name="communityTelephone">
<Input />
</Form.Item>
<Form.Item label="Administrators" name="adminiStrators">
<Input />
</Form.Item>
<Form.Item label="Property fee">
<RangePicker />
</Form.Item>
<Form.Item label="Louba Timetable" name="loubaTimetable">
<Input />
</Form.Item>
<Form.Item label="Property Guide" name="propertyGuide">
<Input />
</Form.Item>
<Form.Item label="Period of Service" name="period">
<Input />
</Form.Item>
<Form.Item label="Help Phone" name="helpPhone">
<Input />
</Form.Item>
<Form.Item label=" " colon={false}>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Form>
</div>
</div>
);
};
export default Adds;
...@@ -34,7 +34,8 @@ const CellList = (props:any) => { ...@@ -34,7 +34,8 @@ const CellList = (props:any) => {
]) ])
const { dispatch, Data } = props; const { dispatch, Data , loading , curString} = props;
const onChange = e => { const onChange = e => {
e.persist(); e.persist();
...@@ -100,13 +101,43 @@ const CellList = (props:any) => { ...@@ -100,13 +101,43 @@ const CellList = (props:any) => {
} }
}; };
// 点击搜索
const CallBackTitleSearch= (comment: any) => {
console.log(comment)
// if (comment.communityName != null || comment.key != null || comment.status != null) {
// var tmp = curString
// tmp.subscribeDate = comment.key
// if (comment.status == null||comment.status==undefined) {
// tmp.status = 0;
// } else {
// tmp.status = comment.status
// }
// tmp.communityNameList = comment.communityName
// tmp.curPage=1
// QA(tmp)
// console.log(tmp)
// //中断
// RA(9, { userToken: token, pageNum: "1", subscribeDate: tmp.subscribeDate, status: tmp.status,communityNameList:comment.communityName })
// }
}
return ( return (
<div > <div >
{ {
Data != null ? <> Data != null ? <>
{/* <TitleSearch listkey={['communityName']} list={['Community Name']} onSubmit={CallBackTitleSearch}/> */} {/* <TitleSearch listkey={['communityName']} list={['Community Name']} onSubmit={CallBackTitleSearch}/> */}
<div className='contop'> <div className='contop'>
<Form <TitleSearch
status={[{
name: ["status", "Order status"],
data: [[0, "All"], [1, "Applied"], [2, "Reserved"], [3, "Used"], [4, "Cancelled"]]
}]}
time={["key", "Booking time "]}
community={"communityName"}
checklist={curString.communityNameList!=null?curString.communityNameList:null}
onSubmit={CallBackTitleSearch} />
{/* <Form
autoComplete= "off" autoComplete= "off"
layout="inline" layout="inline"
form={form} form={form}
...@@ -125,10 +156,10 @@ const CellList = (props:any) => { ...@@ -125,10 +156,10 @@ const CellList = (props:any) => {
<Input allowClear placeholder='Contract Title' /> <Input allowClear placeholder='Contract Title' />
</Form.Item> </Form.Item>
<Form.Item> <Form.Item>
<Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={false}>Search </Button> <Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={loading}>Search </Button>
<Button htmlType="button" onClick={onReset} style={{marginLeft:'15px'}} icon={<ClearOutlined />} loading={false}> Reset</Button> <Button htmlType="button" onClick={onReset} style={{marginLeft:'15px'}} icon={<ClearOutlined />} loading={loading}> Reset</Button>
</Form.Item> </Form.Item>
</Form> </Form> */}
</div> </div>
<ProTable <ProTable
// request={requestHeadl} // request={requestHeadl}
...@@ -137,10 +168,10 @@ const CellList = (props:any) => { ...@@ -137,10 +168,10 @@ const CellList = (props:any) => {
dataSource={Data.rows} dataSource={Data.rows}
columns={columns} columns={columns}
search={false} search={false}
loading={false} loading={loading}
toolBarRender={() => [ toolBarRender={() => [
<Button key="3" type="primary" onClick={()=>{}}> <Button key="3" type="primary" onClick={goToAdd}>
<PlusOutlined />Add Contract <PlusOutlined />Create new Community
</Button>, </Button>,
]} ]}
options={{ options={{
...@@ -151,7 +182,7 @@ const CellList = (props:any) => { ...@@ -151,7 +182,7 @@ const CellList = (props:any) => {
}, },
setting: false, setting: false,
}} }}
headerTitle="Create new Community" headerTitle="Community List"
// pagination={{ defaultCurrent: 1, total: Data.totalRow }} // pagination={{ defaultCurrent: 1, total: Data.totalRow }}
/> />
{/* <Table loading={false} rowKey="id" style={{ marginTop: 16 }} {/* <Table loading={false} rowKey="id" style={{ marginTop: 16 }}
...@@ -167,7 +198,9 @@ const CellList = (props:any) => { ...@@ -167,7 +198,9 @@ const CellList = (props:any) => {
}; };
function map(state:any) { function map(state:any) {
const { Data} = state[module] console.log(state)
return { Data} const loading = state.loading.models.CellList
const { Data ,curString } = state[module]
return { Data , loading ,curString}
} }
export default connect(map)(CellList); export default connect(map)(CellList);
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
background: #fff; background: #fff;
margin-bottom: 20px; margin-bottom: 20px;
} }
.listbox { .listbox {
width: 100%; width: 100%;
background-color: #ffffff; background-color: #ffffff;
......
...@@ -8,3 +8,43 @@ ...@@ -8,3 +8,43 @@
background-color: #ffffff; background-color: #ffffff;
padding: 10px; padding: 10px;
} }
// 添加
.box{
padding: 20px;
border: 1px solid #efefef;
border-radius: 3px;
background: #fff;
box-shadow: 0 1px 1px #ccc;
.back{
margin-bottom: 20px;
}
.form{
h3{
margin-bottom: 30px;
}
.span,.li{
display: inline-block;
min-width: 240px;
line-height: 30px;
background: #efefef;
font-size: 15px;
margin-top: -3px;
vertical-align: middle;
margin-left: 12px;
padding: 0 6px;
border-radius: 2px;
border: 1px solid #d9d9d9;
color: #000;
}
.li{
min-width: 140px;
margin-top: 15px;
margin-left: 0;
}
input{
width: 240px;
}
}
}
\ No newline at end of file
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import {connect,history} from 'umi'; import {connect,history,useModel,Loading} from 'umi';
import { Input ,Tabs,Table,Space, Button} from 'antd'; import { Input ,Tabs,Table,Space, Button,Tooltip} from 'antd';
const { TabPane } = Tabs; const { TabPane } = Tabs;
import { objectColumns } from '@/utils/string'; import { PlusOutlined,SearchOutlined,ClearOutlined } from '@ant-design/icons';
import ProTable from '@ant-design/pro-table';
// import { objectColumns } from '@/utils/string';
import {timestampToTime3, timestampToTime} from '@/utils/time' import {timestampToTime3, timestampToTime} from '@/utils/time'
// 搜索框 // 搜索框
...@@ -25,7 +28,7 @@ import TitleSearch from '../../../components/TitleSearch/TitleSearch'; ...@@ -25,7 +28,7 @@ import TitleSearch from '../../../components/TitleSearch/TitleSearch';
// updateTime: "Jun 28, 2020 7:38:39 PM" // updateTime: "Jun 28, 2020 7:38:39 PM"
import { RA } from '@/utils/method'; // import { RA } from '@/utils/method';
const goToAdd = () => { const goToAdd = () => {
history.push("./CommunityAnnouncement/Add"); history.push("./CommunityAnnouncement/Add");
...@@ -33,34 +36,64 @@ const goToAdd = () => { ...@@ -33,34 +36,64 @@ const goToAdd = () => {
const module="CommunityAnnouncement" const module="CommunityAnnouncement"
const CommunityAnnouncement = (props:any) => { const CommunityAnnouncement = (props:any) => {
const columns = objectColumns( [
["community", "communityNum"], const { dispatch, Data, curString , loading } = props;
["Title", "noticTitlel"],
["Publish Time", "noticStartTime", (text: any, record: any) => (<Space size="middle">{text!=null? timestampToTime(text.time):null}</Space>)],
["noticScope", "noticScope"], const columns = [
["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)], {
]) title:"community",
const { dispatch, Data, curString } = props; dataIndex:"communityNum",
width: 400,
ellipsis: {
showTitle: false,
},
},
{
title:"Title",
dataIndex:"noticTitlel",
},
{
title:"Publish Time",
dataIndex:"noticStartTime",
render:(text: any, record: any) => (
<Space size="middle">
{text!=null? timestampToTime(text.time):null}
</Space>
)
},
{
title:"noticScope",
dataIndex:"noticScope",
},
{
title:"Actions",
render:(text: any, record: any) => (
<Space size="middle"><a>Detail</a></Space>
),
},
];
useEffect(() => { useEffect(() => {
RA(25,{communityNum: "", noticTitlel: "" },module,dispatch) RA(25,{communityNum: "", noticTitlel: "" , pageNum:1 },module,dispatch)
},[]) },[1])
// //
const RA = (index:any,values: any) => { const RA = (index:any,values: any) => {
console.log(values)
dispatch({ dispatch({
type: 'FacilityBookings/RA', type: 'FacilityBookings/RA',
playload: {index:index, body:values } playload: {index:index, body:values }
}) })
}; };
const SA = (values: any) => { dispatch({ type: 'FacilityBookings/SA', playload: values }) }; const SA = (values: any) => { dispatch({ type: 'FacilityBookings/SA', playload: values }) };
const QA = (values: any) => { dispatch({ type: 'FacilityBookings/QA', playload: values }) }; const QA = (values: any) => { dispatch({ type: 'FacilityBookings/QA', playload: values }) };
const CA = () => { dispatch({ type: 'FacilityBookings/CA', playload: null }) }; const CA = () => { dispatch({ type: 'FacilityBookings/CA', playload: null }) };
// 点击搜索
const CallBackTitleSearch= (comment: any) => { const CallBackTitleSearch= (comment: any) => {
console.log(comment) console.log(comment)
...@@ -104,6 +137,7 @@ const CommunityAnnouncement = (props:any) => { ...@@ -104,6 +137,7 @@ const CommunityAnnouncement = (props:any) => {
data: [[0, "All"], [1, "Applied"], [2, "Reserved"], [3, "Used"], [4, "Cancelled"]] data: [[0, "All"], [1, "Applied"], [2, "Reserved"], [3, "Used"], [4, "Cancelled"]]
}]} }]}
time={["key", "Booking time "]} time={["key", "Booking time "]}
community={"communityName"} community={"communityName"}
checklist={curString.communityNameList!=null?curString.communityNameList:null} checklist={curString.communityNameList!=null?curString.communityNameList:null}
onSubmit={CallBackTitleSearch} /> onSubmit={CallBackTitleSearch} />
...@@ -116,28 +150,39 @@ const CommunityAnnouncement = (props:any) => { ...@@ -116,28 +150,39 @@ const CommunityAnnouncement = (props:any) => {
</> </>
} }
<div style={{height:80,position:"relative"}}>
<div style={{ position: "absolute", right: 0 }}><Button type="primary" onClick={goToAdd}>Create new Announcement</Button></div>
</div>
{Data!=null? {Data!=null?
<Table <ProTable
loading={false} loading={loading}
rowKey="id" rowKey="id"
style={{ marginTop: 16 }} style={{ marginTop: 16 }}
dataSource={Data.rows} dataSource={Data.rows}
columns={columns} columns={columns}
pagination={{ current: 1, total: Data.total}} />:null} pagination={false} // 隐藏默认分页
search={false}
toolBarRender={() => [
<Button key="3" type="primary" onClick={goToAdd}>
<PlusOutlined />Create new Announcement
</Button>,
]}
options={{
density: true,
fullScreen: true,
reload: () => {
// resetHandler();
},
setting: false,
}}
headerTitle="Announcement list"
/>:null}
</div> </div>
); );
}; };
function map(state:any) { function map(state:any) {
const { Data} = state[module] const loading = state.loading.models.FacilityBookings;
const Data = state.FacilityBookings.NoticeList;
const { curString } = state.FacilityBookings; const { curString } = state.FacilityBookings;
return { Data,curString} return { Data,curString,loading }
} }
export default connect(map)(CommunityAnnouncement); export default connect(map)(CommunityAnnouncement);
......
...@@ -177,7 +177,7 @@ const Contract = (props:any) => { ...@@ -177,7 +177,7 @@ const Contract = (props:any) => {
opname={opname} /> opname={opname} />
</Form.Item> </Form.Item>
<Form.Item name="contractNumber"> <Form.Item name="contractNumber">
<Input allowClear placeholder='Contract No' /> <Input allowClear placeholder='Contract Number' />
</Form.Item> </Form.Item>
<Form.Item name="contractTitle"> <Form.Item name="contractTitle">
<Input allowClear placeholder='Contract Title' /> <Input allowClear placeholder='Contract Title' />
...@@ -192,10 +192,10 @@ const Contract = (props:any) => { ...@@ -192,10 +192,10 @@ const Contract = (props:any) => {
<div className={styles.listbox}> <div className={styles.listbox}>
<ProTable <ProTable
// request={requestHeadl} // request={requestHeadl}
pagination={false} // 隐藏默认分页
rowKey={"id"} rowKey={"id"}
dataSource={ContractModel.list} dataSource={ContractModel.list}
columns={columns} columns={columns}
pagination={false} // 隐藏默认分页
search={false} search={false}
loading={userListLoading} loading={userListLoading}
toolBarRender={() => [ toolBarRender={() => [
......
...@@ -208,21 +208,14 @@ ...@@ -208,21 +208,14 @@
label{ label{
display: inline-block; display: inline-block;
width: 150px; width: 150px;
line-height: 32px;
} }
} }
} }
.list2{ .ant-form-item-label > label,.label{
display: flex; display: inline-block;
justify-content: flex-start;
justify-items: center;
flex-wrap: wrap;
.label{
width: 150px; width: 150px;
line-height: 34px; line-height: 32px;
}
.main{
// margin-bottom: 24px;
}
} }
} }
......
...@@ -17,6 +17,7 @@ import locale from 'antd/es/date-picker/locale/en_US'; ...@@ -17,6 +17,7 @@ import locale from 'antd/es/date-picker/locale/en_US';
import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity'; import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity';
import {tipList} from '@/utils/tip'
const ContractContent = (props: any) => { const ContractContent = (props: any) => {
const { ContractModel,dispatch } = props; const { ContractModel,dispatch } = props;
...@@ -34,7 +35,7 @@ const ContractContent = (props: any) => { ...@@ -34,7 +35,7 @@ const ContractContent = (props: any) => {
const [fileList, setFileList] = useState([] as any); const [fileList, setFileList] = useState([] as any);
console.log(ContractModel) console.log(tipList)
useEffect(()=>{ useEffect(()=>{
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单 // 如果是添加传来没有值的时候 就清空 否则 赋值给表单
...@@ -162,33 +163,38 @@ const ContractContent = (props: any) => { ...@@ -162,33 +163,38 @@ const ContractContent = (props: any) => {
{/* 合同编号、甲方、乙方 */} {/* 合同编号、甲方、乙方 */}
<div className='list_1'> <div className='list_1'>
<div className='item_1'> <div className='item_1'>
<label>Contract Number</label> <Form.Item
<Form.Item name="contractNumber"> name="contractNumber"
<Input style={{width:200}} placeholder="Contract Code" /> label="Contract Number"
rules={[{ required: true, message: `${tipList[0]}` }]}>
<Input style={{width:200}} placeholder="Contract Number" />
</Form.Item> </Form.Item>
</div> </div>
<div className='item_1'> <div className='item_1'>
<label>Contract Party A</label> <Form.Item
<Form.Item name="contractPartyA"> name="contractPartyA"
<Input style={{width:200}} placeholder="Corporate Name" /> label="Contract Party A"
rules={[{ required: true, message: `${tipList[1]}` }]}>
<Input style={{width:200}} placeholder="Contract Party A" />
</Form.Item> </Form.Item>
</div> </div>
<div className='item_1'> <div className='item_1'>
<label>Contract Party B</label> <Form.Item
<Form.Item name="contractPartyB"> name="contractPartyB"
<Input style={{width:200}} placeholder="Corporate Name" /> label="Contract Party B"
rules={[{ required: true, message: `${tipList[2]}` }]}>
<Input style={{width:200}} placeholder="Contract Party B" />
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
{/* 小区 */} {/* 小区 */}
<div className='list2'> <div className='list2'>
<div className='label'>
<span>Community Name</span>
</div>
<div className='main'> <div className='main'>
<Form.Item <Form.Item
labelAlign='right'
name="communityName" name="communityName"
rules={[{ required: true, message: 'Please Choice CommunityName!' }]}> label="Community Name"
rules={[{ required: true, message: `${tipList[3]}` }]}>
<SearchOptionsCommnity <SearchOptionsCommnity
defaultName={ContractModel.record.communityName} defaultName={ContractModel.record.communityName}
// ubmit={extendName} // ubmit={extendName}
...@@ -199,23 +205,22 @@ const ContractContent = (props: any) => { ...@@ -199,23 +205,22 @@ const ContractContent = (props: any) => {
</div> </div>
{/* 合同标题 */} {/* 合同标题 */}
<div className='list2'> <div className='list2'>
<div className='label'> <Form.Item
<span>Contract Title</span> labelAlign='right'
</div> name="contractTitle"
<div className='main'> label="Contract Title"
<Form.Item name="contractTitle"> rules={[{ required: true, message: `${tipList[4]}` }]}>
<Input style={{width:200}} placeholder="XXXX Labor Contract" /> <Input style={{width:200}} placeholder="Contract Title" />
</Form.Item> </Form.Item>
</div> </div>
</div>
{/* 起止时间 */} {/* 起止时间 */}
<div className='list2'> <div className='list2'>
<div className='label'> <Form.Item
<span>Effective Date</span> name="time"
</div> labelAlign='right'
<div className='main'> label="Contract Time"
<Form.Item name="time"> rules={[{ required: true, message: `${tipList[5]}` }]}>
<RangePicker <RangePicker
locale={locale} locale={locale}
defaultValue={ContractModel.time} defaultValue={ContractModel.time}
...@@ -224,16 +229,14 @@ const ContractContent = (props: any) => { ...@@ -224,16 +229,14 @@ const ContractContent = (props: any) => {
/> />
</Form.Item> </Form.Item>
</div> </div>
</div>
{/* 附件上传 */} {/* 附件上传 */}
<div className='list2'> <div className='list2'>
<div className='label'> <Form.Item
<span>Contract</span> labelAlign='right'
</div> label="Contract Annex"
<div className='main'> rules={[{ required: true, message: `${tipList[6]}` }]}>
<Form.Item>
<Upload <Upload
{...uploadProps} > {...uploadProps} >
<Button> <Button>
...@@ -242,16 +245,12 @@ const ContractContent = (props: any) => { ...@@ -242,16 +245,12 @@ const ContractContent = (props: any) => {
</Upload> </Upload>
</Form.Item> </Form.Item>
</div> </div>
</div>
{/* 合同内容 */} {/* 合同内容 */}
<div className='list2'> <div className='list2'>
<div className='label'>
<span>Contract Content</span>
</div>
<div className='main'>
<div className={styles.box8item2x1}> <div className={styles.box8item2x1}>
<Form.Item name="contractRemindContent"> <Form.Item
name="contractRemindContent">
<TextArea autoSize={false} style={{ padding: 8, width: 600, height: 194 }}> <TextArea autoSize={false} style={{ padding: 8, width: 600, height: 194 }}>
</TextArea> </TextArea>
</Form.Item> </Form.Item>
...@@ -261,7 +260,6 @@ const ContractContent = (props: any) => { ...@@ -261,7 +260,6 @@ const ContractContent = (props: any) => {
{/* <span style={{color:'#f00'}}>&nbsp;{stateTime}</span> */} {/* <span style={{color:'#f00'}}>&nbsp;{stateTime}</span> */}
</div> </div>
</div> </div>
</div>
<div> <div>
<LINE/> <LINE/>
......
export const tipList = [
// 合同提示
['Please Input Contract Numbe!'],
['Please Input Contract Party A!'],
['Please Input Contract Party B!'],
['Please Choice CommunityName!'],
['Please Choice Contract Title!'],
['Please Choice Contract Time!'],
['Please upload Contract Annex!'],
// ['Please Input Contract Remarks!'],
]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment