Commit d84c7021 authored by cellee's avatar cellee

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

parents 34977cee 0491040e
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
// message.error("Service scope selection error!!!") // message.error("Service scope selection error!!!")
Modal.error({ Modal.error({
title: 'Service selection error', title: 'Service selection error',
content: 'No multiple selection are not allowed once Accounting or Security server is being selected!', content: 'No multiple selection are allowed once Accounting or Security server is being selected!',
}); });
return; return;
} }
...@@ -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;
}
}, },
//获取服务商保安根据服务商名 //获取服务商保安根据服务商名
......
...@@ -31,6 +31,7 @@ const Card = (props: any) => { ...@@ -31,6 +31,7 @@ const Card = (props: any) => {
[3, 'Received'], [3, 'Received'],
]; ];
// [0,业主],[1,家人],[2,租客]
const apply_relation = [ const apply_relation = [
[0, 'Owner'], [0, 'Owner'],
[1, 'Family Member'], [1, 'Family Member'],
......
...@@ -48,15 +48,7 @@ ...@@ -48,15 +48,7 @@
} }
.box1item2 { .box1item2 {
position: absolute; position: absolute;
left: 154px; left: 189px;
}
.box1item3 {
position: absolute;
left: 499px;
}
.box1item4 {
position: absolute;
left: 648px;
} }
.box2 { .box2 {
......
...@@ -110,15 +110,15 @@ const AccoutingContent = (props: { ...@@ -110,15 +110,15 @@ const AccoutingContent = (props: {
<div className={styles.box1}> <div className={styles.box1}>
<div className={styles.box1item1}>Company Name</div> <div className={styles.box1item1}>Company Name</div>
<div className={styles.box1item2}>{SaveChooseData.providerName}</div> <div className={styles.box1item2}>{SaveChooseData.providerName}</div>
<div className={styles.box1item3}>Office Address</div>
<div className={styles.box1item4}>{SaveChooseData.providerAddress}</div>
</div> </div>
<Line /> <div className={styles.box2}>
<div style={{ marginBottom: 28 }}>Service Community</div> <div className={styles.box2item1}>Office Address</div>
<ShowOptions list={SaveChooseData.serviceCommunityList} /> <div className={styles.box2item2}>{SaveChooseData.providerAddress}</div>
</div>
<div className={styles.box2}> <div className={styles.box2}>
<div className={styles.box2item1}>Services Available</div> <div className={styles.box2item1}>Services Available</div>
<div className={styles.box2item2}>Accounting</div> <div className={styles.box2item2}>Accounting Service</div>
</div> </div>
<div className={styles.box2}> <div className={styles.box2}>
...@@ -140,6 +140,9 @@ const AccoutingContent = (props: { ...@@ -140,6 +140,9 @@ const AccoutingContent = (props: {
复制 复制
</Button> </Button>
</div> </div>
<div style={{ marginBottom: 28, marginTop: 30 }}>Service Community</div>
<ShowOptions list={SaveChooseData.serviceCommunityList} />
</Spin> </Spin>
) : ( ) : (
<></> <></>
......
...@@ -67,22 +67,18 @@ const Edit = (props: any) => { ...@@ -67,22 +67,18 @@ 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, index) => {
if (v.serviceName === SaveChooseData.serviceScope) { if (v.serviceName === SaveChooseData.serviceScope) {
SaveChooseData.serviceScopeList = v.serviceCode; SaveChooseData.serviceScopeList[index] = v.serviceCode;
} }
}); });
} 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) => {
console.log(v1.serviceName);
console.log(v1.serviceName === v2);
if (v1.serviceName === v2) { if (v1.serviceName === v2) {
SaveChooseData.serviceScopeList[index] = v1.serviceCode; SaveChooseData.serviceScopeList[index] = v1.serviceCode;
} }
...@@ -105,11 +101,11 @@ const Edit = (props: any) => { ...@@ -105,11 +101,11 @@ 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);
}; };
...@@ -250,7 +246,6 @@ function mapStateToProps(state: any) { ...@@ -250,7 +246,6 @@ 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);
return { return {
CurData, CurData,
SaveChooseData, SaveChooseData,
......
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