Commit 62fee18b authored by cellee's avatar cellee

Merge branch 'final' of http://120.77.240.215:9701/Maple/tostumi.git into final

parents 9a619db7 e332d6f6
......@@ -26,7 +26,7 @@ const TitleSearch = (props: any) => {
// const communitySelect = props.communitySelect
// const defaultValue = props.defaultValue;
const {single,checklist,status,communitySelect,defaultValue} = props;
const { single, checklist, status, communitySelect, defaultValue } = props;
const time = props.time;
......@@ -36,7 +36,7 @@ const TitleSearch = (props: any) => {
const [communitySingle, setCommunitySingle] = useState(null)
const [datePicker, setDate] = useState(null)
const formRef = useRef(null)
const [form] = Form.useForm()
const tosCommunityget = (values: any) => { dispatch({ type: 'Init/tosCommunityget', playload: values }) };
useEffect(() => {
......@@ -46,14 +46,14 @@ const TitleSearch = (props: any) => {
tosCommunityget(null)
}
if (defaultValue != null) {
formRef.current.setFieldsValue(defaultValue)
form.setFieldsValue(defaultValue)
}
}, []);
useEffect(() => {
if (defaultValue != null) {
formRef.current.setFieldsValue(defaultValue)
form.setFieldsValue(defaultValue)
}
}, [defaultValue])
useEffect(() => {
......@@ -94,14 +94,21 @@ const TitleSearch = (props: any) => {
setCommunitys(comment)
}
// 选择小区名字并赋值
const opname = (value: any) => {
form.setFieldsValue({
'communityName': value
})
}
return (
<>
<Form ref={formRef} name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
<Form form={form} name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
<Row gutter={32}>
{
communitySelect != null ?
<Col key={"communitySelect_"} ><Form.Item name={"communityName"}><SearchOptionsCommnity titleSearch={true} /></Form.Item></Col>
<Col key={"communitySelect_"} ><Form.Item name={"communityName"}><SearchOptionsCommnity titleSearch={true} opname={opname} /></Form.Item></Col>
: null
}
{
......
import React, { useState, useEffect,useRef} from 'react';
import { Input ,Tabs,Table,Space, Button} from 'antd';
import React, { useState, useEffect, useRef } from 'react';
import { Input, Tabs, Table, Space, Button } from 'antd';
const { TabPane } = Tabs;
import {connect,history} from 'umi';
import { connect, history } from 'umi';
// apply_name: "我的人生就"
// apply_reason_content: "H4sIAAAAAAAAACXJOwqDQBQF0N5VjyLRRsI0xs+AIjFoEMXC8e9q3n2Zzi0opDnNgapoEmYYf4nL↵Lw0Rsy9pbYz3xdjTnNGWWFAVWk3L49xs2nOOOpqCvwgVN8VdKHc8OxYKUlj4OEgPvOsLeuxP/F8A↵AAA="
// apply_relation_owner: 0
// apply_status: 0
// build_number: "01"
// communityId: "12ffe9ed60054af9a67c036af92e03f9"
// community_name: "A4"
// community_owner: "jack-小雄"
// community_owner_phone: "13143391751"
// create_time: {date: 10, day: 4, hours: 16, minutes: 27, month: 8, …}
// deleted: 0
// floor_number: "05"
// id: "977494600245575680"
// ownerId: "770da9de6b6c43f6b61bc3d671fa2e89"
// room_number: "569"
// update_time:
import { RA, SA } from '@/utils/method';
import { objectColumns } from '@/utils/string';
import { timestampToTime } from '@/utils/time';
import Login from '../user/login/components/Login';
const module="CommunityService"
const Card = (props:any) => {
import TitleSearch from '../../components/TitleSearch/TitleSearch';
import { RA, SA, urlEncode, filterObj, filterObjbyTg } from '@/utils/method';
const module = "CommunityService"
const Card = (props: any) => {
const { dispatch, Data7 } = props;
const formRef = useRef(null)
const [readyData, setReadyData] = useState(null)
const [loading, setLoading] = useState(false)
// const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]]
const apply_status = [[0, "Under review"], [1, "Approval"], [2, "Reject"], [3, "Claim"]]
const columns = objectColumns([
["所在小区", "community_name"],
["所在单元", null, (text: any, record: any) => (<Space size="middle">{record.build_number+"#"+record.floor_number+"-"+record.room_number}</Space>)],
["所在单元", null, (text: any, record: any) => (<Space size="middle">{record.build_number + "#" + record.floor_number + "-" + record.room_number}</Space>)],
["用户名", "community_owner"],
["申请时间", null, (text: any, record: any) => (<Space size="middle">{timestampToTime(record.create_time.time)}</Space>)],
["申请状态", "apply_status", (text: any, record: any) => (<Space size="middle">{apply_status[parseInt(text)][1]}</Space>)],
["Actions",null, (text: any, record: any) => (<Space size="middle"> <a onClick={goToDetail.bind(this,record)}>Detail</a></Space>)],
["申请状态", "apply_status", (text: any, record: any) => (<Space size="middle">{apply_status[parseInt(text)][1]}</Space>)],
["Actions", null, (text: any, record: any) => (<Space size="middle"> <a onClick={goToDetail.bind(this, record)}>Detail</a></Space>)],
])
useEffect(() => {
if (Data7 != null) { setLoading(false) }
}, [Data7]);
useEffect(() => {
//前置数据
console.log("前置数据");
let tmp: any = filterObjbyTg(location.query, ["handleStatus", "ownerName", "communityName", "current"])
tmp.handleStatus = apply_status[parseInt(tmp.handleStatus)] //特殊处理
setReadyData(tmp)
//获取数据
setLoading(true)
RA(31, { serviceType: "7", id: "" }, module, dispatch)
}, [])
useEffect(() => {
......@@ -54,41 +53,60 @@ const Card = (props:any) => {
console.log(Data7)
}
}, [Data7])
const goToDetail = (values: any, e: any) => {
SA(values,module,dispatch)
SA(values, module, dispatch)
history.push('./AccessCardApplication/Detail')
}
const goToAdd = (values:any,e:any)=>{
const goToAdd = (values: any, e: any) => {
history.push('./AccessCardApplication/Add')
}
//页面搜索
const ClickTitleSearch = (comment: any) => {
let tmp = filterObjbyTg(comment, ["handleStatus", "ownerName", "communityName"])
tmp["current"] = 1
console.log(tmp)
history.push(location.pathname + urlEncode(tmp))
}
return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
{
Data7 != null ?
<>
<TitleSearch
communitySelect={true}
listkey={['ownerName']}
list={['Owner Name']}
status={[{ name: ["handleStatus", "Status"], data: apply_status }]}
defaultValue={readyData}
onSubmit={ClickTitleSearch}
/>
<div style={{ height: 80, position: "relative" }}>
<div style={{ position: "absolute", right: 0 }}>
<Button type="primary" onClick={goToAdd}>Apply Card</Button>
</div>
<div style={{ position: "absolute", right: 0 }}>
<Button type="primary" onClick={goToAdd}>Apply Card</Button>
</div>
</div>
<Table loading={false} rowKey="id" style={{ marginTop: 16 }}
dataSource={Data7.data.rows}
columns={columns}
pagination={{ defaultCurrent: 1, total: Data7.total }} />
<Table loading={loading} rowKey="id" style={{ marginTop: 16 }}
dataSource={Data7.data.rows}
columns={columns}
pagination={{ defaultCurrent: 1, total: Data7.total }} />
</>
:null
: null
}
</div>
);
};
function map(state:any) {
const { Data7} = state[module]
return { Data7}
function map(state: any) {
const { Data7 } = state[module]
return { Data7 }
}
export default connect(map)(Card);
import React, { useState, useEffect,useRef} from 'react';
import { Input ,Tabs,Table,Space, Button,Form,Row,Col, Layout, message} from 'antd';
import React, { useState, useEffect, useRef } from 'react';
import { Input, Tabs, Table, Space, Button, Form, Row, Col, Layout, message, Spin } from 'antd';
const { TabPane } = Tabs;
import {connect,history} from 'umi';
import { connect, history } from 'umi';
import { RA, ResultClear } from '@/utils/method';
......@@ -11,101 +11,117 @@ import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommn
import Line from '@/components/Line/Line';
import TextArea from 'antd/lib/input/TextArea';
import Relationship from '@/components/Relationship/Relationship';
const module="CommunityService"
const CardAdd = (props:any) => {
import { useForm } from 'antd/es/form/util';
const module = "CommunityService"
const CardAdd = (props: any) => {
const { dispatch, Result } = props;
const formRef = useRef(null)
// const formRef = useRef(null)
const [form] = Form.useForm();
const [loading, setLoading] = useState(false)
useEffect(() => {
console.log(Result)
if (Result != null) {
console.log("初始化页面参数")
console.log(Result)
if (Result.error_code = "0000") {
message.success("Operation Success!")
setLoading(false)
ResultClear(module, dispatch)
} else {
message.error("Operation Fail!")
ResultClear(module, dispatch)
ResultClear(module, dispatch)
history.go(-1)
}
}
}
}, [Result])
useEffect(()=>{
var param=
useEffect(() => {
var param =
{
"communityName":"A4",
"buildNumber":"01",
"floorNumber":"02",
"roomNumber":"369",
"zipCode":"510000",
"communityOwner":"jack-小雄",
"communityOwnerPhone":"18813757878",
"communityOwnerEmail":"sale2huahuico.com",
"applyName":"小李子",
"applyNamePhone":"13436989568",
"applyNameEmail":"xiaoli@huahuico.com",
"applyRelationOwner":"2",
"applyReasonContent":"租房",
"description":"test"
"communityName": "A4",
"buildNumber": "01",
"floorNumber": "02",
"roomNumber": "369",
"zipCode": "510000",
"communityOwner": "jack-小雄",
"communityOwnerPhone": "18813757878",
"communityOwnerEmail": "sale2huahuico.com",
"applyName": "小李子",
"applyNamePhone": "13436989568",
"applyNameEmail": "xiaoli@huahuico.com",
"applyRelationOwner": "2",
"applyReasonContent": "租房",
"description": "test"
}
formRef.current.setFieldsValue(param)
form.setFieldsValue(param)
}, [])
const onFinish = (values:any)=>{
const onFinish = (values: any) => {
console.log(values)
setLoading(true)
RA(35, values, module, dispatch);
}
// 选择小区名字并赋值
const opname = (value: any) => {
form.setFieldsValue({
'communityName': value
})
}
return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
<TitleBack title={"Apply Card"}></TitleBack>
<Form ref={formRef} name="basic" onFinish={onFinish}>
<Form.Item labelCol={{span:3}} label="Community" style={{marginBottom:0}}>
<Input.Group compact>
<Form.Item name="communityName" style={{marginRight:20}} ><SearchOptionsCommnity /></Form.Item>
<Form.Item name="buildNumber" style={{marginRight:16}} ><Input style={{ width: 80 }} placeholder={"Building"} /></Form.Item>
<div style={{ lineHeight: 2,marginRight:16}}>#</div>
<Form.Item name="floorNumber" style={{marginRight:16}} ><Input style={{ width: 80 }} placeholder={"Floor"} /></Form.Item>
<div style={{lineHeight:2,marginRight:16}}>-</div>
<Form.Item name="roomNumber" ><Input style={{width:120}} placeholder={"Room"} /></Form.Item>
<Form form={form} name="basic" onFinish={onFinish}>
<Spin spinning={loading}>
<Form.Item labelCol={{ span: 3 }} label="Community" style={{ marginBottom: 0 }}>
<Input.Group compact>
<Form.Item name="communityName" style={{ marginRight: 20 }} ><SearchOptionsCommnity opname={opname} /></Form.Item>
<Form.Item name="buildNumber" style={{ marginRight: 16 }} ><Input style={{ width: 80 }} placeholder={"Building"} /></Form.Item>
<div style={{ lineHeight: 2, marginRight: 16 }}>#</div>
<Form.Item name="floorNumber" style={{ marginRight: 16 }} ><Input style={{ width: 80 }} placeholder={"Floor"} /></Form.Item>
<div style={{ lineHeight: 2, marginRight: 16 }}>-</div>
<Form.Item name="roomNumber" ><Input style={{ width: 120 }} placeholder={"Room"} /></Form.Item>
</Input.Group>
</Form.Item>
<Form.Item name="zipCode" wrapperCol={{ ...Layout.wrapperCol, offset: 3 }}><Input style={{ width: 400 }}></Input></Form.Item>
<Form.Item labelCol={{span:3}} label="Owner Name" style={{marginBottom:-40}}>
<Input.Group compact>
<Form.Item name="communityOwner" style={{marginRight:20}} ><Input placeholder={"Name"} /></Form.Item>
<Form.Item style={{marginRight:20}} label={"Contact Information"} ><Input hidden={true} /></Form.Item>
<Form.Item name="communityOwnerPhone" style={{marginRight:20}}><Input placeholder={"Phone number"} /></Form.Item>
<Form.Item name="communityOwnerEmail" ><Input placeholder={"Email"} /></Form.Item>
</Form.Item>
<Form.Item name="zipCode" wrapperCol={{ ...Layout.wrapperCol, offset: 3 }}><Input style={{ width: 400 }}></Input></Form.Item>
<Form.Item labelCol={{ span: 3 }} label="Owner Name" style={{ marginBottom: -40 }}>
<Input.Group compact>
<Form.Item name="communityOwner" style={{ marginRight: 20 }} ><Input placeholder={"Name"} /></Form.Item>
<Form.Item style={{ marginRight: 20 }} label={"Contact Information"} ><Input hidden={true} /></Form.Item>
<Form.Item name="communityOwnerPhone" style={{ marginRight: 20 }}><Input placeholder={"Phone number"} /></Form.Item>
<Form.Item name="communityOwnerEmail" ><Input placeholder={"Email"} /></Form.Item>
</Input.Group>
</Form.Item>
</Form.Item>
<Line></Line>
<Line></Line>
<Form.Item labelCol={{span:3}} label="Applicant" style={{marginBottom:-40}}>
<Input.Group compact>
<Form.Item name="applyName" style={{marginRight:20}} ><Input placeholder={"Name"} /></Form.Item>
<Form.Item style={{marginRight:20}} label={"Contact Information"} ><Input placeholder={"Phone number"} hidden={true} /></Form.Item>
<Form.Item name="applyNamePhone" style={{marginRight:20}}><Input placeholder={"Phone number"} /></Form.Item>
<Form.Item name="applyNameEmail" ><Input placeholder={"Email"} /></Form.Item>
<Form.Item labelCol={{ span: 3 }} label="Applicant" style={{ marginBottom: -40 }}>
<Input.Group compact>
<Form.Item name="applyName" style={{ marginRight: 20 }} ><Input placeholder={"Name"} /></Form.Item>
<Form.Item style={{ marginRight: 20 }} label={"Contact Information"} ><Input placeholder={"Phone number"} hidden={true} /></Form.Item>
<Form.Item name="applyNamePhone" style={{ marginRight: 20 }}><Input placeholder={"Phone number"} /></Form.Item>
<Form.Item name="applyNameEmail" ><Input placeholder={"Email"} /></Form.Item>
</Input.Group>
</Form.Item>
{/* label={"Contact Information"} */}
<Form.Item labelCol={{span:3}} name="applyRelationOwner" label={"Relationship"} ><Relationship /></Form.Item>
<Form.Item labelCol={{span:3}} name="applyReasonContent" label={"Reason"}><TextArea style={{width:400}}></TextArea></Form.Item>
<Line></Line>
<Form.Item wrapperCol={{ ...Layout.wrapperCol, offset: 3 }}><Button type="primary" htmlType="submit">Submit</Button></Form.Item>
</Form.Item>
{/* label={"Contact Information"} */}
<Form.Item labelCol={{ span: 3 }} name="applyRelationOwner" label={"Relationship"} ><Relationship /></Form.Item>
<Form.Item labelCol={{ span: 3 }} name="applyReasonContent" label={"Reason"}><TextArea style={{ width: 400 }}></TextArea></Form.Item>
<Line></Line>
<Form.Item wrapperCol={{ ...Layout.wrapperCol, offset: 3 }}><Button type="primary" htmlType="submit">Submit</Button></Form.Item>
</Spin>
</Form>
......@@ -113,8 +129,8 @@ const CardAdd = (props:any) => {
);
};
function map(state:any) {
const { Result} = state[module]
return { Result}
function map(state: any) {
const { Result } = state[module]
return { Result }
}
export default connect(map)(CardAdd);
\ No newline at end of file
......@@ -101,6 +101,7 @@ const PropertyServices = (props: any) => {
handleStatus: location.query.handleStatus != undefined ? parseInt(location.query.handleStatus) : null,
ownerName: location.query.ownerName != undefined ? (location.query.ownerName) : null,
communityName: location.query.communityName != undefined ? (location.query.communityName) : null,
pageNum,
}, module, dispatch)
}
......
......@@ -29,7 +29,7 @@ const Renovation = (props: any) => {
["Content", "decoration_content", (text: any) => (<div>{stringTab(text)}</div>)],
["Request Time", "create_time", (text: any) => (<div>{timestampToTime(text.time)}</div>)],
["status", "decoration_status", (text: any) => (<div>{decoration_status[parseInt(text)][1]}</div>)],
["Actions", null, (text: any, record: any) => (<Space size="middle"> <a onClick={goToDetail.bind(this, record)}>Detail</a></Space>)],
["Actions", "decoration_status", (text: any, record: any) => (<Space size="middle"> <a onClick={goToDetail.bind(this, record)}> {text === 0 ? "Reply" : "Detail"} </a></Space>)],
])
const { dispatch, Data8, location } = props;
......@@ -58,7 +58,6 @@ const Renovation = (props: any) => {
const ClickTitleSearch = (comment: any) => {
let tmp = filterObjbyTg(comment, ["handleStatus", "ownerName", "communityName"])
tmp["current"] = 1
console.log(tmp)
history.push(location.pathname + urlEncode(tmp))
}
......
import React, { useState, useEffect,useRef} from 'react';
import { Input ,Tabs,Row,Col, Button,Form,Radio ,message} from 'antd';
const { TabPane,} = Tabs;
import React, { useState, useEffect, useRef } from 'react';
import { Input, Tabs, Row, Col, Button, Form, Radio, message } from 'antd';
const { TabPane, } = Tabs;
import {connect,history} from 'umi';
import { connect, history } from 'umi';
const decoration_status = [[0, "Pending"], [1, "Approved"], [2, "Rejected"]]
......@@ -13,126 +13,115 @@ import TextArea from 'antd/lib/input/TextArea';
import { timestampToTime } from '@/utils/time';
import { values } from 'lodash';
const module="CommunityService"
const RenovationDetail = (props:any) => {
const module = "CommunityService"
const RenovationDetail = (props: any) => {
const { dispatch, DataSave,DataSaveDetail} = props;
const { dispatch, DataSave, DataSaveDetail } = props;
const formRef = useRef(null)
useEffect(()=>{
useEffect(() => {
if (DataSaveDetail != null) {
console.log("给予的请求页面");
console.log(DataSaveDetail)
}
},[DataSaveDetail])
useEffect(()=>{
console.log(DataSaveDetail)
}
}, [DataSaveDetail])
useEffect(() => {
if (DataSave != null) {
console.log("初始化页面参数")
console.log(DataSave);
RA(37,{id:DataSave.id},module,dispatch)
// applyfor_name: "jack-小白白"
// communityId: "7e5c6fd2f4ba497a90e64535df6e9088"
// community_build_decorate: "01"
// community_floor_decorate: "00"
// community_name: "A4"
// community_room_decoate: "767"
// contact_name: "15626274096"
// contact_phone: "jack-小白白"
// create_time: {date: 10, day: 4, hours: 19, minutes: 39, month: 8, …}
// decorationBegin_time: {date: 10, day: 4, hours: 0, minutes: 0, month: 8, …}
// decorationEnd_time: {date: 10, day: 4, hours: 0, minutes: 0, month: 8, …}
// decoration_content: "滚滚滚"
// decoration_status: 0
// deleted: 0
// id: "977591272158003200"
// ownerId: "c4da40676d044487b37e7a1bdc6dd045"
// update_time:
console.log("初始化页面参数")
console.log(DataSave);
RA(37, { id: DataSave.id }, module, dispatch)
}
}, [DataSave])
const onFinish = (values:any) => {
var tmp={
communityId : DataSave.communityId,
id:DataSave.id,
ownerId:DataSave.ownerId,
decorationStatus:values.decorationStatus,
replyName:getCookie("name"),
replyPhone:getCookie("phone"),
replyView:values.replyView,
type:"6"
const onFinish = (values: any) => {
console.log(values)
if (values.decorationStatus === "2" && (values.replyView == undefined || values.replyView.trim() === "")) {
message.warning('Replies must be entered!');
return;
}
var tmp = {
communityId: DataSave.communityId,
id: DataSave.id,
ownerId: DataSave.ownerId,
decorationStatus: values.decorationStatus,
replyName: getCookie("name"),
replyPhone: getCookie("phone"),
replyView: values.replyView,
type: "6"
}
console.log(tmp)
// console.log(tmp)
RA(33,tmp,module,dispatch);
RA(33, tmp, module, dispatch);
message.success('Success Operation!');
history.push('/CommercialService/RenovationApplication')
}
return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
{
DataSave!=null?<>
<TitleBack sublist={['Status : ' + decoration_status[DataSave.decoration_status][1], 'Time : ' + timestampToTime(DataSave.create_time.time)]} title={"Renovation Detail"}></TitleBack>
DataSave != null ? <>
<TitleBack sublist={['Status : ' + decoration_status[DataSave.decoration_status][1], 'Time : ' + timestampToTime(DataSave.create_time.time)]} title={"Renovation Detail"}></TitleBack>
<Row gutter={8}>
<Row gutter={8}>
<Col>Community:</Col>
<Col span={3}>{DataSave.community_name}</Col>
<Col>unit:</Col>
<Col>{DataSave.community_build_decorate}#{DataSave.community_floor_decorate}-{DataSave.community_room_decoate}</Col>
</Row>
<Row gutter={8} style={{marginTop:16}}>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col>Address:</Col>
<Col>{DataSaveDetail!=null?DataSaveDetail.data.rows.communityDetail.residentialAddress+" "+DataSaveDetail.data.rows.communityDetail.residentialZipCode:null}</Col>
<Col>{DataSaveDetail != null ? DataSaveDetail.data.rows.communityDetail.residentialAddress + " " + DataSaveDetail.data.rows.communityDetail.residentialZipCode : null}</Col>
</Row>
<Row gutter={8} style={{marginTop:16}}>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col>Owner Name:</Col>
<Col span={3}>{DataSave.applyfor_name}</Col>
<Col>Phone:</Col>
<Col>13169646231</Col>
</Row>
<Line></Line>
<Row gutter={8} style={{marginTop:16}}>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Contract Name:</Col>
<Col span={3}>{DataSave.contact_name}</Col>
<Col>Phone:</Col>
<Col>{DataSave.contact_phone}</Col>
</Row>
<Row gutter={8} style={{marginTop:16}}>
<Col span={3}>Time:</Col>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Time:</Col>
<Col span={3}>{timestampToTime(DataSave.decorationBegin_time.time)}</Col>
<Col>{timestampToTime(DataSave.decorationEnd_time.time)}</Col>
</Row>
<Row gutter={8} style={{marginTop:16}}>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reason:</Col>
<Col><TextArea disabled value={DataSave.decoration_content} style={{width:300,height:100,padding:8}}></TextArea></Col>
<Col><TextArea disabled value={DataSave.decoration_content} style={{ width: 300, height: 100, padding: 8 }}></TextArea></Col>
</Row>
<Line></Line>
<Form ref={formRef} name="basic" onFinish={onFinish}>
<Row gutter={8} style={{marginTop:16}}>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Approval For Application:</Col>
<Col ><Form.Item name="decorationStatus"><Radio.Group ><Radio.Button value={"1"}>Agree</Radio.Button > <Radio.Button style={{marginLeft:10}} value={"2"}>Reject</Radio.Button ></Radio.Group></Form.Item></Col>
<Col ><Form.Item name="decorationStatus" rules={[{ required: true, message: 'You have to choose an outcome!' }]}><Radio.Group><Radio.Button value={"1"}>Agree</Radio.Button > <Radio.Button style={{ marginLeft: 10 }} value={"2"}>Reject</Radio.Button ></Radio.Group></Form.Item></Col>
</Row>
<Row gutter={8} style={{marginTop:16}}>
<Col span={3}>Reply:</Col>
<Col><Form.Item name="replyView"><TextArea style={{width:300,height:100,padding:8}}></TextArea></Form.Item></Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reply:</Col>
<Col><Form.Item name="replyView"><TextArea style={{ width: 300, height: 100, padding: 8 }}></TextArea></Form.Item></Col>
</Row>
<Form.Item ><Button type="primary" htmlType="submit">Submit</Button></Form.Item>
</Form>
</>:null}
</> : null}
</div>
);
};
function map(state:any) {
const { DataSave,DataSaveDetail} = state[module]
return { DataSave,DataSaveDetail}
function map(state: any) {
const { DataSave, DataSaveDetail } = state[module]
return { DataSave, DataSaveDetail }
}
export default connect(map)(RenovationDetail);
import React, { useState, useEffect, useRef } from 'react';
import styles from './Edit.less';
import { Input, Button, Form, Result, Pagination, Tooltip, Checkbox } from 'antd';
import { Input, Button, Form, Result, Pagination, Tooltip, Checkbox, Spin } from 'antd';
import { Link, useIntl, connect } from 'umi';
......@@ -16,6 +16,9 @@ const Edit = (props: any) => {
const [CList, setCList] = useState(CommunityList);
const [SList, setSList] = useState(["1"])
const [load, setload] = useState(false)
const printContent = (List: any) => { setCList(List) }
const formRef = useRef(null);
......@@ -44,7 +47,7 @@ const Edit = (props: any) => {
// val.serviceScopeList = SList
val.creator = "admin";
val.updater = "admin";
setload(true)
TosTosServiceProviderSave(val)
};
const onFinishFailed = (errorInfo: any) => {
......@@ -57,89 +60,91 @@ const Edit = (props: any) => {
{/* 头部组件v1.2 */}
<TitleBack title="Edit Service Provider" />
<Form ref={formRef} name="basic" initialValues={{}} onFinish={onFinish} onFinishFailed={onFinishFailed}>
<div className={styles.box1}>
<div className={styles.box1item1}>Company Name</div>
<div className={styles.box1item2}>
<Form.Item name="providerName"
rules={[{
required: true,
message: "Please enter the company name!"
}]}
>
<Input style={{ width: 260 }} placeholder="Please enter company name" />
</Form.Item>
<Form ref={formRef} name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
<Spin spinning={load} tip="In the submission,Please Wait...">
<div className={styles.box1}>
<div className={styles.box1item1}>Company Name</div>
<div className={styles.box1item2}>
<Form.Item name="providerName"
rules={[{
required: true,
message: "Please enter the company name!"
}]}
>
<Input style={{ width: 260 }} placeholder="Please enter company name" />
</Form.Item>
</div>
<div className={styles.box1item3}>Office Address</div>
<div className={styles.box1item4}>
<Form.Item
name="providerAddress"
rules={[{
required: true,
message: "Please enter your office address!"
}]}
>
<Input style={{ width: 200 }} placeholder="Single Line Input" />
</Form.Item>
</div>
</div>
<div className={styles.box1item3}>Office Address</div>
<div className={styles.box1item4}>
<Form.Item
name="providerAddress"
rules={[{
required: true,
message: "Please enter your office address!"
}]}
>
<Input style={{ width: 200 }} placeholder="Single Line Input" />
</Form.Item>
<div className={styles.line}></div>
<SelectOptions list={CommunityList.sort()} checklist={SaveChooseData != null ? SaveChooseData.serviceCommunityList : null} onSubmit={printContent} />
<div className={styles.box2}>
<div className={styles.box2item1}>Services Available</div>
<div className={styles.box2item2}>
<Form.Item
name="serviceScopeList"
rules={[{
required: true,
message: "Please select at least one service available!"
}]}
>
<Checkbox.Group options={DataServices != null ? DataServices.data.serviceScopeList : null} />
</Form.Item>
</div>
</div>
</div>
<div className={styles.line}></div>
<SelectOptions list={CommunityList.sort()} checklist={SaveChooseData != null ? SaveChooseData.serviceCommunityList : null} onSubmit={printContent} />
<div className={styles.box2}>
<div className={styles.box2item1}>Services Available</div>
<div className={styles.box2item2}>
<Form.Item
name="serviceScopeList"
rules={[{
required: true,
message: "Please select at least one service available!"
}]}
>
<Checkbox.Group options={DataServices != null ? DataServices.data.serviceScopeList : null} />
</Form.Item>
<div className={styles.box3}>
<div className={styles.box3item1}>Person In Charge</div>
<div className={styles.box3item2}>
<Form.Item
name="contactName"
rules={[{
required: true,
message: "Please enter the name of the person in charge!"
}]}
>
<Input style={{ width: 200 }}
placeholder="Please enter a name"
/>
</Form.Item>
</div>
</div>
</div>
<div className={styles.box3}>
<div className={styles.box3item1}>Person In Charge</div>
<div className={styles.box3item2}>
<Form.Item
name="contactName"
rules={[{
required: true,
message: "Please enter the name of the person in charge!"
}]}
>
<Input style={{ width: 200 }}
placeholder="Please enter a name"
/>
</Form.Item>
<div className={styles.box4}>
<div className={styles.box4item1}>Contact Details</div>
<div className={styles.box4item2}><Form.Item name="contactPhone"><Input style={{ width: 200 }} placeholder="Telephone" /></Form.Item></div>
<div className={styles.box4item3}>
<Form.Item
name="contactEmail"
rules={[{
required: true,
type: "email",
message: "Please enter the correct email address!"
}]}
>
<Input style={{ width: 200 }} placeholder="E-mail" /></Form.Item></div>
</div>
</div>
<div className={styles.box4}>
<div className={styles.box4item1}>Contact Details</div>
<div className={styles.box4item2}><Form.Item name="contactPhone"><Input style={{ width: 200 }} placeholder="Telephone" /></Form.Item></div>
<div className={styles.box4item3}>
<Form.Item
name="contactEmail"
rules={[{
required: true,
type: "email",
message: "Please enter the correct email address!"
}]}
>
<Input style={{ width: 200 }} placeholder="E-mail" /></Form.Item></div>
</div>
<div className={styles.line}></div>
<Form.Item>
<Button type="primary" htmlType="submit">Submit</Button>
</Form.Item>
<div className={styles.line}></div>
<Form.Item>
<Button type="primary" htmlType="submit">Submit</Button>
</Form.Item>
</Spin>
</Form>
</div>
......
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