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