Commit 86b3b28f authored by Sixiang_Zzb's avatar Sixiang_Zzb

服务商编辑页提交bug修复

parent 6b46650b
...@@ -98,6 +98,14 @@ export default { ...@@ -98,6 +98,14 @@ export default {
yield put({ type: 'returnCurData', CurData }); yield put({ type: 'returnCurData', CurData });
return; return;
} }
// 小区选择错误
if (resp.error_code === "0004") {
let CurData: Boolean = false;
yield put({ type: "returnCurData", CurData });
message.error("Company name already exists!")
return;
}
}, },
//获取服务商保安根据服务商名 //获取服务商保安根据服务商名
......
...@@ -67,8 +67,7 @@ const Edit = (props: any) => { ...@@ -67,8 +67,7 @@ const Edit = (props: any) => {
useEffect(() => { useEffect(() => {
if (SaveChooseData != null) { if (SaveChooseData != null) {
console.log(optionsList); setCList(SaveChooseData.serviceCommunityList);
console.log(SaveChooseData);
if (SaveChooseData.serviceScopeList.length <= 1) { if (SaveChooseData.serviceScopeList.length <= 1) {
// 处理服务范围数据 // 处理服务范围数据
optionsList.forEach((v) => { optionsList.forEach((v) => {
...@@ -77,7 +76,6 @@ const Edit = (props: any) => { ...@@ -77,7 +76,6 @@ const Edit = (props: any) => {
} }
}); });
} else { } else {
console.log(1122);
// 处理服务范围数据 // 处理服务范围数据
optionsList.forEach((v1) => { optionsList.forEach((v1) => {
SaveChooseData.serviceScopeList.forEach((v2: string, index: number) => { SaveChooseData.serviceScopeList.forEach((v2: string, index: number) => {
...@@ -105,11 +103,10 @@ const Edit = (props: any) => { ...@@ -105,11 +103,10 @@ const Edit = (props: any) => {
val.serviceCommunityList = CList; val.serviceCommunityList = CList;
val.creator = 'admin'; val.creator = 'admin';
val.updater = 'admin'; val.updater = 'admin';
// val.serviceScopeList = val.serviceScopeList;
if (SaveChooseData) { if (SaveChooseData) {
val.id = SaveChooseData.id; val.id = SaveChooseData.id;
} }
console.log(val); // console.log(val);
setload(true); setload(true);
TosTosServiceProviderSave(val); TosTosServiceProviderSave(val);
}; };
......
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