Commit d43c1b68 authored by maple's avatar maple Committed by MrShi

[fixed]stop

(cherry picked from commit ba751ce6)
parent 6dcf92c6
......@@ -16,7 +16,7 @@ const proSettings: DefaultSettings = {
menu: {
locale: true,
},
title: 'TOS_v1.0.6',
title: 'TOS Manager',
pwa: false,
iconfontUrl: '',
};
......
......@@ -32,13 +32,14 @@ const Card = (props:any) => {
const { dispatch, Data7 } = props;
const formRef = useRef(null)
// 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>)],
["用户名", "community_owner"],
["申请时间", null, (text: any, record: any) => (<Space size="middle">{timestampToTime(record.create_time.time)}</Space>)],
["申请状态", null, (text: any, record: any) => (<Space size="middle">{record.apply_status}</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>)],
])
......@@ -68,7 +69,7 @@ const Card = (props:any) => {
<Table loading={false} rowKey="id" style={{ marginTop: 16 }}
dataSource={Data7.data.rows}
columns={columns}
pagination={{ current: 1, total: Data7.total }} />
pagination={{ defaultCurrent: 1, total: Data7.total }} />
</>
:null
}
......
import React, { useState, useEffect,useRef} from 'react';
import { Input ,Tabs,Row,Col, Button} from 'antd';
import { Input ,Tabs,Row,Col, Button,Form,Radio} from 'antd';
const { TabPane } = Tabs;
import {connect,history} from 'umi';
import { RA } from '@/utils/method';
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';
......@@ -40,7 +40,21 @@ const CardDetail = (props:any) => {
} else {
history.go(-1)
}
},[])
}, [])
const onFinish = (values:any) => {
var tmp={
id:DataSave.id,
ownerId:DataSave.ownerId,
applyStatus:values.applyStatus,
replyContent:values.replyContent,
type:"7"
}
console.log(tmp)
RA(34,tmp,module,dispatch)
}
return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
{
......@@ -78,8 +92,28 @@ const CardDetail = (props:any) => {
<Row gutter={8} style={{marginTop:16}}>
<Col span={3}>Reason:</Col>
<Col><TextArea disabled value={DataSave.apply_reason_content} style={{width:300,height:100,padding:8}}></TextArea></Col>
</Row>
</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="applyStatus"><Radio.Group ><Radio.Button value={"1"}>Agree</Radio.Button ><Radio.Button style={{marginLeft:20}} value={"2"}>Refuse</Radio.Button ></Radio.Group></Form.Item></Col>
</Row>
<Row gutter={8} style={{marginTop:16}}>
<Col span={3}>Reply:</Col>
<Col> <Form.Item name="replyContent"><TextArea style={{width:300,height:100,padding:8}}></TextArea></Form.Item></Col>
</Row>
<Row gutter={8} style={{marginTop:16}}>
<Col span={3}>Received:</Col>
<Col span={4}><Form.Item name="applyStatus"><Radio.Group ><Radio value={"3"}>Agree</Radio></Radio.Group></Form.Item></Col>
</Row>
<Form.Item ><Button type="primary" htmlType="submit">Submit</Button></Form.Item>
</Form>
</>:null
}
......
......@@ -10,6 +10,7 @@ import { PlusOutlined } from '@ant-design/icons';
import Line from '../../components/Line/Line';
import TitleBack from '../../components/TitleBack/TitleBack';
import PictureOptionsRow from '../../components/PictureOptions/PictureOptionsRow';
import { getCookie } from '@/utils/method';
const Detail = (props:any) => {
......@@ -54,6 +55,8 @@ const Detail = (props:any) => {
const onFinish = (values:any) => {
var val = values
val.handleName =getCookie("name")
val.handleContacts=getCookie("phone")
val.type =""+CurData.service_type
val.id =CurData.id
val.userId = CurData.user_id
......@@ -111,12 +114,12 @@ const Detail = (props:any) => {
<Line />
<Form name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
<Row gutter={16}>
{/* <Row gutter={16}>
<Col>Response:</Col>
<Col><Form.Item name="handleName" ><Input style={{ width: 200 }} placeholder="Please enter a Name" disabled={!editorFlag} /></Form.Item></Col>
<Col>Contract Detail:</Col>
<Col><Form.Item name="handleContacts" ><Input style={{ width: 300 }} placeholder="Please enter contrat number" disabled={!editorFlag} /></Form.Item></Col>
</Row>
</Row> */}
<Row gutter={16} style={{ marginTop: 20 }}>
<Col>Resolved Complaint:</Col>
<Col><Form.Item name="replyContent" ><TextArea style={{ width: 394, height: 80 }} autoSize={false} disabled={!editorFlag} /></Form.Item></Col>
......
......@@ -5,17 +5,21 @@ 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 decoration_status = [[0, "待处理"], [1, "已批准"], [2, "已拒绝"]]
const decoration_status = [[0, "Pending"], [1, "Approved"], [2, "Rejected"]]
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"],
["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>)],
])
......@@ -58,7 +62,7 @@ const Renovation = (props:any) => {
<Table loading={false} rowKey="id" style={{ marginTop: 16 }}
dataSource={Data8.data.rows}
columns={columns}
pagination={{ current: 1, total: Data8.total }} />
pagination={{ defaultCurrent: 1, total: Data8.total }} />
</>
: null
}
......
......@@ -53,7 +53,7 @@ const RenovationDetail = (props:any) => {
type:"6"
}
console.log(tmp)
//RA(33,,module,dispatch)
RA(33,tmp,module,dispatch)
}
return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
......@@ -101,12 +101,12 @@ const RenovationDetail = (props:any) => {
<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>
<Col span={4}><Form.Item name="decorationStatus"><Radio.Group ><Radio.Button value={"1"}>Agree</Radio.Button > <Radio.Button style={{marginLeft:20}} value={"2"}>Refuse</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>
<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>
......
......@@ -9,7 +9,7 @@ const layout = {
// wrapperCol: { span: 8 },
};
import { RA } from '@/utils/method';
import { RA, ResultClear } from '@/utils/method';
import TitleBack from '@/components/TitleBack/TitleBack';
import FileUpload from '@/components/FileUpload/FileUpload';
import { validateMessages } from '@/utils/params';
......@@ -29,16 +29,16 @@ const Add = (props:any) => {
const formRef = useRef(null)
useEffect(() => {
var obj = {
"noticTitle":"Garden公告",
// "communityNum":"珠江丽景小区",
"noticText":"今晚晚上停水4小时",
"noticScope":"1",
"noticStartTime":"2020-07-01 12:30:00",
"noticEndTime":"2020-08-01 9:30:00",
"file":["A.jpg"]
}
formRef.current.setFieldsValue(obj)
// var obj = {
// "noticTitle":"Garden公告",
// // "communityNum":"珠江丽景小区",
// "noticText":"今晚晚上停水4小时",
// "noticScope":"1",
// "noticStartTime":"2020-07-01 12:30:00",
// "noticEndTime":"2020-08-01 9:30:00",
// "file":["A.jpg"]
// }
// formRef.current.setFieldsValue(obj)
}, [])
useEffect(() => {
......@@ -49,11 +49,22 @@ const Add = (props:any) => {
console.log("服务器有问题")
message.error("服务器有问题,请求失败",5)
}
if (Result.error_code == "0000") {
ResultClear(module,dispatch)
history.go(-1)
}
}
}, [Result])
const onFinish = ((values: any) => {
console.log(values)
var tmp = values
tmp.communityNum = values.community.value
tmp.noticScope= ""+values.community.index
// "communityNum":["珠江丽景小区一期","A4"],
// "noticText":"今晚晚上停水4小时",
// "noticScope":"1",
delete tmp.community
console.log(tmp)
RA(28,values, module, dispatch);
})
......
......@@ -61,15 +61,16 @@ const ChargeDetail = (props: any) => {
<div className={styles.item25}>{CurData.roomNumber}</div>
<div className={styles.item26}>{CurData.tosOwnerName}</div>
</div>
<>{stringSplit(CurData.billFileUrl, "m/cash")}</>
<div className={styles.box4}>
<Pagination simple defaultCurrent={curpage} total={pages*10} onChange={pageChange} />
</div>
<><Tooltip title={scale == 1.3 ?"点击放大查看":"还原视图"}>
<><Tooltip title={scale == 1.3 ?"点击放大查看"+CurData.billFileUrl:"还原视图"}>
<div className={scale == 1.3 ?styles.box3out:null}>
< div className={ scale == 1.3 ?styles.box3:styles.box3of} onClick={ lookup } >
<PDF key="pdfjs" file={stringSplit(CurData.billFileUrl,"m/cash")} workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js" scale={scale} page={curpage} onDocumentComplete={pdfpages} />
<PDF key="pdfjs" file={ stringSplit(CurData.billFileUrl,"m/cash")} workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js" scale={scale} page={curpage} onDocumentComplete={pdfpages} />
</div>
</div>
</Tooltip></>
......
......@@ -33,7 +33,7 @@ const Guard = (props:any) => {
return (
<div className={styles.base}>
<TitleGet title={"Version 1.0.9"} />
<TitleGet title={"Version 1.1.0"} />
<p>
token:{page.token}
name:{getCookie("name")}
......
......@@ -97,6 +97,7 @@ const requestList = [
["/tos/property/community/houseCard/query", "31 获取住户卡列表"],
["/tos/tosManageCommunity/get/detail", "32 获取小区详情"],
["/tos/property/decorate/record/reply", "33 回复装修申请"],
["/tos/property/community/houseCard/reply", "34 回复住户卡申请"],
]
const params = [
......
......@@ -56,6 +56,7 @@ export const setCookie=(key:string,value: string)=>{
export const RA = (index: any, values: any, module: string, dispatch: any) => { dispatch({ type: module + '/RA', playload: { index: index, body: values } }) };
export const SA = (values: any, module: string, dispatch: any) => { dispatch({ type: module + '/SA', playload: values }) };
export const ResultClear = (module:any,dispatch:any) => { dispatch({ type: module + '/ResultClear' }) };
// const reg = [["url", "categoriesImageUrl"], ["name", "categoriesName"]]
// const values = [{ categoriesImageUrl: "http://url", categoriesName: "A9" },{ categoriesImageUrl: "http://url...", categoriesName: "A8" }]
export const Fromate = (values:any,reg:any) => {
......
......@@ -11,4 +11,5 @@ export const validateMessages ={
number: {
range: '${label} must be between ${min} and ${max}',
},
}
\ 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