Commit a54e0a6a authored by cellee's avatar cellee

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

parents ac1c7cb5 6e6978bd
...@@ -64,8 +64,8 @@ export default { ...@@ -64,8 +64,8 @@ export default {
yield put({ type: "returnCurData", CurData }); yield put({ type: "returnCurData", CurData });
// message.error("Service scope selection error!!!") // message.error("Service scope selection error!!!")
Modal.error({ Modal.error({
title: 'Service scope selection error', title: 'Service selection error',
content: 'Accounting service / security service provider is a single option!!!', content: 'No multiple selection are not allowed once Accounting or Security server is being selected!',
}); });
return; return;
} }
...@@ -75,8 +75,8 @@ export default { ...@@ -75,8 +75,8 @@ export default {
let CurData: Boolean = false; let CurData: Boolean = false;
yield put({ type: "returnCurData", CurData }); yield put({ type: "returnCurData", CurData });
Modal.error({ Modal.error({
title: 'Community selection error', title: 'Service selection error',
content: 'You cannot select a community that already has a scope of service!!!', content: 'The community selected has been assigned to other Accounting or Security service provider. Please select again!',
}); });
return; return;
} }
......
...@@ -95,8 +95,8 @@ const Users = (props: any) => { ...@@ -95,8 +95,8 @@ const Users = (props: any) => {
const propsUpload = { const propsUpload = {
name: 'file', name: 'file',
action: () => { action: () => {
// return 'http://47.74.233.180:8651/tos/excel/upload?userId=' + getCookie('id'); return 'http://47.74.233.180:8651/tos/excel/upload?userId=' + id;
return 'http://192.168.1.28:8651/tos/excel/upload?userId=' + id; // return 'http://192.168.1.28:8651/tos/excel/upload?userId=' + id;
}, },
beforeUpload: (file: any) => { beforeUpload: (file: any) => {
if (file.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') { if (file.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
......
...@@ -48,11 +48,6 @@ const Edit = (props: any) => { ...@@ -48,11 +48,6 @@ const Edit = (props: any) => {
optionsList = [...DataServices.data.rows]; optionsList = [...DataServices.data.rows];
} }
return () => {
}
}, [DataServices]); }, [DataServices]);
// 判断是否有小区列表数据返回 // 判断是否有小区列表数据返回
...@@ -72,14 +67,30 @@ const Edit = (props: any) => { ...@@ -72,14 +67,30 @@ const Edit = (props: any) => {
useEffect(() => { useEffect(() => {
if (SaveChooseData != null) { if (SaveChooseData != null) {
console.log(optionsList);
console.log(SaveChooseData);
if (SaveChooseData.serviceScopeList.length <= 1) {
// 处理服务范围数据 // 处理服务范围数据
optionsList.forEach((v) => { optionsList.forEach((v) => {
if (v.serviceName === SaveChooseData.serviceScope) { if (v.serviceName === SaveChooseData.serviceScope) {
SaveChooseData.serviceScopeList = v.serviceCode; SaveChooseData.serviceScopeList = v.serviceCode;
formRef.current.setFieldsValue(SaveChooseData);
} }
}); });
} else {
console.log(1122);
// 处理服务范围数据
optionsList.forEach((v1) => {
SaveChooseData.serviceScopeList.forEach((v2: string, index: number) => {
console.log(v1.serviceName);
console.log(v1.serviceName === v2);
if (v1.serviceName === v2) {
SaveChooseData.serviceScopeList[index] = v1.serviceCode;
}
});
});
}
formRef.current.setFieldsValue(SaveChooseData);
console.log(SaveChooseData); console.log(SaveChooseData);
} }
}, [SaveChooseData]); }, [SaveChooseData]);
...@@ -239,7 +250,7 @@ function mapStateToProps(state: any) { ...@@ -239,7 +250,7 @@ function mapStateToProps(state: any) {
const { CurData, SaveChooseData } = state.ServiceProvider; const { CurData, SaveChooseData } = state.ServiceProvider;
const { DataServices } = state.User; const { DataServices } = state.User;
const { CommunityList } = state.Init; const { CommunityList } = state.Init;
console.log(CurData) console.log(CurData);
return { return {
CurData, CurData,
SaveChooseData, SaveChooseData,
......
...@@ -101,6 +101,8 @@ const Login: React.FC<LoginProps> = (props) => { ...@@ -101,6 +101,8 @@ const Login: React.FC<LoginProps> = (props) => {
console.log(result); console.log(result);
if (result.error_code === '0000') { if (result.error_code === '0000') {
message.success('Has Been Sent!'); message.success('Has Been Sent!');
} else {
message.error(result.error_msg);
} }
}, []); }, []);
......
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