Commit 00695ee7 authored by cellee's avatar cellee

设施排序,

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 3e3454b4
...@@ -63,8 +63,6 @@ const Facilitys = (props: any) => { ...@@ -63,8 +63,6 @@ const Facilitys = (props: any) => {
message.success(`${info.file.name} file uploaded successfully`); message.success(`${info.file.name} file uploaded successfully`);
// 拿到key 值 开始存储 // 拿到key 值 开始存储
let key = parseInt(info.fileList[0].response.data.identification); let key = parseInt(info.fileList[0].response.data.identification);
console.log(info);
console.log(key);
let list = FacilitysList; let list = FacilitysList;
setidKey(idKey + 1); setidKey(idKey + 1);
list[key] = { list[key] = {
...@@ -104,8 +102,6 @@ const Facilitys = (props: any) => { ...@@ -104,8 +102,6 @@ const Facilitys = (props: any) => {
list.push(adds); list.push(adds);
// 存储到mode里面去 // 存储到mode里面去
dispatch({ type: module + '/genxin', list }); dispatch({ type: module + '/genxin', list });
console.log(list);
} else { } else {
// 提示每一项都要填写完 // 提示每一项都要填写完
message.error('Please fill out each item !'); message.error('Please fill out each item !');
......
...@@ -22,7 +22,8 @@ export default { ...@@ -22,7 +22,8 @@ export default {
communityNameList: null, communityNameList: null,
tab:1, tab:1,
curPage: 1, curPage: 1,
curPage2: 1 curPage2: 1,
globalMark:'yes'
}, },
Result:null, Result:null,
......
...@@ -120,14 +120,9 @@ const BookingDetail = (props: any) => { ...@@ -120,14 +120,9 @@ const BookingDetail = (props: any) => {
setModalVisible(false); setModalVisible(false);
}; };
// 最大数量
const maxPar = () => {
return;
};
return ( return (
<> <>
{DataSave != null ? ( {DataSave && DataSaveDetail ? (
<Spin spinning={load}> <Spin spinning={load}>
<div className={styles.base}> <div className={styles.base}>
<TitleBack <TitleBack
...@@ -169,7 +164,8 @@ const BookingDetail = (props: any) => { ...@@ -169,7 +164,8 @@ const BookingDetail = (props: any) => {
DataSaveDetail.managerFee > 0) || DataSaveDetail.managerFee > 0) ||
(DataSaveDetail.managerFee == 0 && (DataSaveDetail.managerFee == 0 &&
DataSaveDetail.marginFee > 0 && DataSaveDetail.marginFee > 0 &&
DataSave.status != 3) ? ( DataSave.status != 3 &&
DataSave.status != 5) ? (
<> <>
<Form <Form
ref={formRef} ref={formRef}
......
...@@ -86,7 +86,7 @@ const FacilityBookings = (props: any) => { ...@@ -86,7 +86,7 @@ const FacilityBookings = (props: any) => {
}); });
Array.push(a); Array.push(a);
} }
setFacility(Array); setFacility([...Array]);
} }
}, [Data2]); }, [Data2]);
...@@ -162,9 +162,17 @@ const FacilityBookings = (props: any) => { ...@@ -162,9 +162,17 @@ const FacilityBookings = (props: any) => {
'Facilities', 'Facilities',
'facilities', 'facilities',
(text: any, record: any) => { (text: any, record: any) => {
console.log();
let a = ''; let a = '';
text.map((item: any) => { text.sort((n1: any, n2: any) => {
a += item.name + ' , '; return n1.id - n2.id;
});
text.map((item: any, index: any) => {
if (record.facilities.length - 1 != index) {
a += item.name + ' , ';
} else {
a += item.name;
}
}); });
return a; return a;
}, },
...@@ -196,7 +204,7 @@ const FacilityBookings = (props: any) => { ...@@ -196,7 +204,7 @@ const FacilityBookings = (props: any) => {
pageNum: curString.curPage, pageNum: curString.curPage,
subscribeDate: curString.subscribeDate, subscribeDate: curString.subscribeDate,
status: curString.status, status: curString.status,
globalMark: 'yes', globalMark: curString.globalMark,
}); });
} else { } else {
RA(8, { RA(8, {
...@@ -226,6 +234,7 @@ const FacilityBookings = (props: any) => { ...@@ -226,6 +234,7 @@ const FacilityBookings = (props: any) => {
} }
tmp.communityNameList = comment.communityName; tmp.communityNameList = comment.communityName;
tmp.curPage = 1; tmp.curPage = 1;
tmp.globalMark = 'no';
QA(tmp); QA(tmp);
//中断 //中断
RA(9, { RA(9, {
......
...@@ -62,6 +62,10 @@ const FacilityTow = (props: any) => { ...@@ -62,6 +62,10 @@ const FacilityTow = (props: any) => {
setCtyName(DataSave.community); setCtyName(DataSave.community);
setFacilityId(DataSave.facilities[0].id); setFacilityId(DataSave.facilities[0].id);
beg(DataSave.facilities[0].id); beg(DataSave.facilities[0].id);
DataSave.facilities.sort((n1: any, n2: any) => {
return n1.id - n2.id;
});
} else { } else {
//返回列表 //返回列表
} }
...@@ -148,7 +152,7 @@ const FacilityTow = (props: any) => { ...@@ -148,7 +152,7 @@ const FacilityTow = (props: any) => {
// 提交 // 提交
const onFinish = (values: any) => { const onFinish = (values: any) => {
console.log(FacilitysList); // console.log(FacilitysList);
// 先判断是否填写完整 // 先判断是否填写完整
for (let j in FacilitysList) { for (let j in FacilitysList) {
if (FacilitysList[j].fileList.length == 0) { if (FacilitysList[j].fileList.length == 0) {
...@@ -205,7 +209,7 @@ const FacilityTow = (props: any) => { ...@@ -205,7 +209,7 @@ const FacilityTow = (props: any) => {
delete values.endTime; delete values.endTime;
delete values.picList; delete values.picList;
delete values.Time; delete values.Time;
// RA(17, values); RA(17, values);
} }
}; };
......
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