Commit 34ad8ed6 authored by Sixiang_Zzb's avatar Sixiang_Zzb

业主详情页bug修复,服务商详情页bug修复

parent 86851cfb
...@@ -71,7 +71,7 @@ const TableShow = (props: any) => { ...@@ -71,7 +71,7 @@ const TableShow = (props: any) => {
<Tabs defaultActiveKey="0"> <Tabs defaultActiveKey="0">
{dataRow.map((item: any, index: number) => { {dataRow.map((item: any, index: number) => {
return ( return (
<TabPane tab={item.name} key={index}> <TabPane tab={item.name} key={item.id}>
<Row gutter={16} style={{ marginLeft: 9 }}> <Row gutter={16} style={{ marginLeft: 9 }}>
<Col>Address:</Col> <Col>Address:</Col>
<Col> <Col>
...@@ -143,25 +143,3 @@ const TableShow = (props: any) => { ...@@ -143,25 +143,3 @@ const TableShow = (props: any) => {
}; };
export default TableShow; export default TableShow;
// User Name
// Contact Details
// Email
// cdk_code
// Account Type
// User Status
// Actions
// address_and_postalCode: "广州石溪5463743"
// building_number: "01"
// cdk_code: 792239
// cdk_status: 1
// enable: 1
// floor_number: "5"
// ower_email: "535740436@qq.com"
// ower_name: "测试"
// ower_phone: "微微"
// room_number: "399"
/* <div style={{ width: 80, height: 80, border: "1px solid #cccccc",padding:8,lineHeight:1,textAlign:"center",fontSize:12}}>
Activation Code Has Been Used/Is Inactive
</div> */
...@@ -43,9 +43,10 @@ export default { ...@@ -43,9 +43,10 @@ export default {
let Data = resp.data; let Data = resp.data;
yield put({ type: 'returnPage', Data }); yield put({ type: 'returnPage', Data });
} else { } else {
console.log(resp);
console.log('请求错误码:' + resp.error_code); console.log('请求错误码:' + resp.error_code);
message.error(resp.error_msg); message.error(resp.error_msg);
let Data = null; let Data = undefined;
console.log(playload); console.log(playload);
yield put({ type: 'returnPage', Data }); yield put({ type: 'returnPage', Data });
} }
......
...@@ -132,6 +132,18 @@ const UsersDetail = (props: any) => { ...@@ -132,6 +132,18 @@ const UsersDetail = (props: any) => {
} }
}, [DataSaveDetail]); }, [DataSaveDetail]);
useEffect(() => {
console.log(memberDetail);
if (!memberDetail) {
var tmp = {
owerName: DataSave.owerName,
owerPhone: DataSave.owerPhone,
owerEmail: DataSave.owerEmail,
};
formRef.current.setFieldsValue(tmp);
}
}, [memberDetail]);
useEffect(() => { useEffect(() => {
if (location.pathname.indexOf('Edit') > -1) { if (location.pathname.indexOf('Edit') > -1) {
setEditFlag(true); setEditFlag(true);
...@@ -143,6 +155,7 @@ const UsersDetail = (props: any) => { ...@@ -143,6 +155,7 @@ const UsersDetail = (props: any) => {
console.log('成员信息'); console.log('成员信息');
console.log(values); console.log(values);
setMemberData(values); setMemberData(values);
setMemberDetail(true); setMemberDetail(true);
}; };
...@@ -161,7 +174,7 @@ const UsersDetail = (props: any) => { ...@@ -161,7 +174,7 @@ const UsersDetail = (props: any) => {
onCancel() {}, onCancel() {},
onOk() { onOk() {
if (DataSave != null) { if (DataSave != null) {
//console.log(DataSave) // console.log(DataSave);
var tmp = { var tmp = {
owerName: DataSave.owerName, owerName: DataSave.owerName,
communityName: DataSave.communityName, communityName: DataSave.communityName,
...@@ -200,6 +213,7 @@ const UsersDetail = (props: any) => { ...@@ -200,6 +213,7 @@ const UsersDetail = (props: any) => {
useEffect(() => { useEffect(() => {
if (memberResult != null) { if (memberResult != null) {
setMemberDetail(false); setMemberDetail(false);
message.success('Successfully delete!!!');
RA(13, { RA(13, {
id: DataSave.id, id: DataSave.id,
owerName: DataSave.owerName, owerName: DataSave.owerName,
...@@ -223,6 +237,9 @@ const UsersDetail = (props: any) => { ...@@ -223,6 +237,9 @@ const UsersDetail = (props: any) => {
callback('*it is required!'); callback('*it is required!');
}; };
console.log(memberDetail);
console.log(DataSave);
return ( return (
<div className={styles.base}> <div className={styles.base}>
<Spin spinning={visible} tip="Loading Submit"> <Spin spinning={visible} tip="Loading Submit">
......
...@@ -89,10 +89,10 @@ const Edit = (props: any) => { ...@@ -89,10 +89,10 @@ const Edit = (props: any) => {
val.creator = 'admin'; val.creator = 'admin';
val.updater = 'admin'; val.updater = 'admin';
val.serviceScopeList = [val.serviceScopeList]; val.serviceScopeList = [val.serviceScopeList];
console.log(val);
if (SaveChooseData) { if (SaveChooseData) {
val.id = SaveChooseData.id; val.id = SaveChooseData.id;
} }
console.log(val);
setload(true); setload(true);
TosTosServiceProviderSave(val); TosTosServiceProviderSave(val);
}; };
......
...@@ -184,7 +184,7 @@ const ServiceProviderManagement = (props: propsType) => { ...@@ -184,7 +184,7 @@ const ServiceProviderManagement = (props: propsType) => {
// 数据核查 // 数据核查
useEffect(() => { useEffect(() => {
if (Data != null) { if (Data !== null) {
flag = false; flag = false;
setLoading(false); setLoading(false);
} }
...@@ -276,9 +276,9 @@ const ServiceProviderManagement = (props: propsType) => { ...@@ -276,9 +276,9 @@ const ServiceProviderManagement = (props: propsType) => {
style={{ marginTop: 16 }} style={{ marginTop: 16 }}
loading={loading} loading={loading}
columns={columns} columns={columns}
dataSource={Data !== null ? dataSource(Data.rows) : []} dataSource={Data ? dataSource(Data.rows) : []}
pagination={ pagination={
Data !== null Data
? { ? {
current: +readyData.pageNum, current: +readyData.pageNum,
total: Data.page.totalRow, total: Data.page.totalRow,
......
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