Commit fcd66b0a authored by maple's avatar maple

[fixed]新建用户(组件问题)

parent 58f9d5f0
......@@ -146,7 +146,11 @@ export default defineConfig({
{
path: './RenovationApplication',
name: 'renovationapplication',
component:'./CommercialService/PropertyServices'
routes: [
{ path: './', component: './CommercialService/Renovation' },
{path:'./Detail', component:'./CommercialService/RenovationDetail' },
]
},
{
path: './AccessCardApplication',
......
......@@ -14,7 +14,8 @@ export default {
DataSave:null,
CurData: null,
CurDataDetail: {},
Data7:null,
Data7: null,
Data8:null,
},
reducers: {
......@@ -33,6 +34,9 @@ export default {
returnPage7(state, { Data7 }) {
return { ...state, Data7 };
},
returnPage8(state, { Data8 }) {
return { ...state, Data8 };
},
},
effects: {
......@@ -106,8 +110,8 @@ export default {
// history.push("/CommercialService/CommunityMaintenance")
} break;
case 23: {
let Data = resp.data.rows;
yield put({ type: 'returnPage', Data, });
let Data8 = resp;
yield put({ type: 'returnPage8', Data8, });
} break;
case 31: {
let Data7 = resp;
......
......@@ -77,7 +77,7 @@ const CardDetail = (props:any) => {
</Row>
<Row gutter={8} style={{marginTop:16}}>
<Col span={3}>Reason:</Col>
<Col><TextArea disabled value={DataSave.apply_reason_content} ></TextArea></Col>
<Col><TextArea disabled value={DataSave.apply_reason_content} style={{width:300,height:100,padding:8}}></TextArea></Col>
</Row>
<Line></Line>
</>:null
......
import React, { useState, useEffect,useRef} from 'react';
import { Input ,Tabs,Table,Space, Button} from 'antd';
const { TabPane } = Tabs;
import {connect,history} from 'umi';
import { RA, SA } from '@/utils/method';
import { objectColumns, stringTab } from '@/utils/string';
const module="CommunityService"
const Renovation = (props:any) => {
const columns = objectColumns([
["Community", "community_name"],
["Apply Name", "applyfor_name"],
["Unit", null, (text: any, record: any) => (<div>{record.community_build_decorate}#{record.community_floor_decorate}-{record.community_room_decoate}</div>)],
["Content", "decoration_content",(text: any) => (<div>{stringTab(text)}</div>)],
["status", "decoration_status"],
["Actions",null, (text: any, record: any) => (<Space size="middle"> <a onClick={goToDetail.bind(this,record)}>Detail</a></Space>)],
])
const { dispatch, Data8 } = props;
const formRef = useRef(null)
useEffect(()=>{
RA(23, { serviceType: "6", 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: {
// date: 10, day: 4, hours: 19, minutes:
}, [])
const goToDetail = (values: any, e: any) => {
SA(values,module,dispatch)
history.push('./RenovationApplication/Detail')
}
return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
{
Data8 != null ?
<>
<Table loading={false} rowKey="id" style={{ marginTop: 16 }}
dataSource={Data8.data.rows}
columns={columns}
pagination={{ current: 1, total: Data8.total }} />
</>
: null
}
</div>
);
};
function map(state:any) {
const { Data8} = state[module]
return { Data8}
}
export default connect(map)(Renovation);
\ No newline at end of file
import React, { useState, useEffect,useRef} from 'react';
import { Input ,Tabs,Row,Col, Button,Form,Radio} from 'antd';
const { TabPane,} = Tabs;
import {connect,history} from 'umi';
import { RA, getCookie } from '@/utils/method';
import TitleBack from '@/components/TitleBack/TitleBack';
import Line from '@/components/Line/Line';
import TextArea from 'antd/lib/input/TextArea';
import { timestampToTime } from '@/utils/time';
import { values } from 'lodash';
const module="CommunityService"
const RenovationDetail = (props:any) => {
const { dispatch, DataSave } = props;
const formRef = useRef(null)
useEffect(()=>{
if (DataSave != null) {
console.log("初始化页面参数")
console.log(DataSave);
// 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:
}
}, [DataSave])
const onFinish = (values:any) => {
var tmp={
id:DataSave.id,
ownerId:DataSave.ownerId,
decorationStatus:values.decorationStatus,
replyName:getCookie("name"),
replyPhone:getCookie("phone"),
replyView:values.replyView,
type:"6"
}
console.log(tmp)
//RA(33,,module,dispatch)
}
return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
{
DataSave!=null?<>
<TitleBack sublist={['Status : ' + "1", 'Time : ' + '12']} title={"Renovation Detail"}></TitleBack>
<Row gutter={8}>
<Col>Community:</Col>
<Col span={1}>{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}}>
<Col>Address:</Col>
<Col></Col>
</Row>
<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}}>
<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>
<Col span={3}>{timestampToTime(DataSave.decorationBegin_time.time)}</Col>
<Col>{timestampToTime(DataSave.decorationEnd_time.time)}</Col>
</Row>
<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>
</Row>
<Line></Line>
<Form ref={formRef} name="basic" onFinish={onFinish}>
<Row gutter={8} style={{marginTop:16}}>
<Col span={3}>Examine:</Col>
<Col span={4}><Form.Item name="decorationStatus"><Radio.Group optionType="Button"><Radio value={"0"}>Agree</Radio><Radio value={"1"}>Refuse</Radio></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>
<Form.Item ><Button type="primary" htmlType="submit">Submit</Button></Form.Item>
</Form>
</>:null}
</div>
);
};
function map(state:any) {
const { DataSave} = state[module]
return { DataSave}
}
export default connect(map)(RenovationDetail);
\ No newline at end of file
......@@ -64,7 +64,7 @@ const UsersAdd = (props:any) => {
<div className={styles.box2}>
{/* <div className={styles.box2item1}>Contact Details</div> */}
<div className={styles.box2item2}><SearchOptionsCommnity onSubmit={extendName} /></div>
<div className={styles.box2item2}><SearchOptionsCommnity alone={true} onSubmit={extendName} /></div>
<div className={styles.box2item3}><Form.Item name="buildingNumber"><Input placeholder="Building" style={{width:94}}/></Form.Item></div>
<div className={styles.box2item4}>#</div>
<div className={styles.box2item5}><Form.Item name="floorNumber" ><Input placeholder="Floor" style={{width:80}} /></Form.Item></div>
......
......@@ -96,6 +96,7 @@ const requestList = [
["/tos/tosOrder/get", "30 获取订单详情"],
["/tos/property/community/houseCard/query", "31 获取住户卡列表"],
["/tos/tosManageCommunity/get/detail", "32 获取小区详情"],
["/tos/property/decorate/record/reply", "33 回复装修申请"],
]
const params = [
......
......@@ -66,3 +66,10 @@ export const numberToString = (values: any)=>{
}
return b
}
//内容缩进
export const stringTab = (string:any) => {
if (string.length > 20) {
return string.slice(0, 20) + "..."
}
return string
}
\ 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