update
This commit is contained in:
parent
c330b5d2bd
commit
a0006c48ca
@ -49,26 +49,26 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
||||
|
||||
// 列表配置
|
||||
const columns: any = [
|
||||
{
|
||||
title: "统计日期",
|
||||
dataIndex: "staticDate",
|
||||
hideInTable: true,
|
||||
valueType: "dateRange",
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
search: {
|
||||
transform: (value: any) => {
|
||||
return {
|
||||
START_LEASEDATE_End: moment().startOf('y').format('YYYY-MM-DD'),
|
||||
END_LEASEDATE_Start: moment().format('YYYY-MM-DD')
|
||||
};
|
||||
},
|
||||
},
|
||||
fieldProps: {
|
||||
picker: "day",
|
||||
format: 'YYYY-MM-DD',
|
||||
},
|
||||
hideInSearch: isComponent
|
||||
},
|
||||
// {
|
||||
// title: "统计日期",
|
||||
// dataIndex: "staticDate",
|
||||
// hideInTable: true,
|
||||
// valueType: "dateRange",
|
||||
// initialValue: [moment().startOf('M'), moment()],
|
||||
// search: {
|
||||
// transform: (value: any) => {
|
||||
// return {
|
||||
// START_LEASEDATE_End: moment().startOf('y').format('YYYY-MM-DD'),
|
||||
// END_LEASEDATE_Start: moment().format('YYYY-MM-DD')
|
||||
// };
|
||||
// },
|
||||
// },
|
||||
// fieldProps: {
|
||||
// picker: "day",
|
||||
// format: 'YYYY-MM-DD',
|
||||
// },
|
||||
// hideInSearch: isComponent
|
||||
// },
|
||||
{
|
||||
title: "服务区",
|
||||
dataIndex: "serverPartId",
|
||||
@ -358,49 +358,76 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
||||
columns={columns}
|
||||
bordered
|
||||
rowKey={'REALESTATE_ID'}
|
||||
scroll={{ x: '100%', y: 'calc(100vh - 450px)' }}
|
||||
scroll={{ x: '100%', y: isComponent ? '400px' : 'calc(100vh - 450px)' }}
|
||||
headerTitle={'不动产列表'}
|
||||
search={isComponent && Number(serverPartId) !== 1269 ? false : { span: 6 }}
|
||||
// search={isComponent && Number(serverPartId) !== 1269 ? false : { span: 6 }}
|
||||
search={isComponent ? false : { span: 6 }}
|
||||
request={async (params) => {
|
||||
console.log('selectRealEstateIdselectRealEstateId', selectRealEstateId);
|
||||
// 如果是组件的话 它下面的服务区 可能是单个服务区 或者是 一个片区下面的全部服务区
|
||||
let isComponentSelect = ''
|
||||
// 服务区详情的信息
|
||||
let detail: any = {}
|
||||
|
||||
|
||||
if (!selectedId && !isComponent) {
|
||||
return []
|
||||
}
|
||||
|
||||
if (isComponent && selectRealEstateId && selectRealEstateId.length > 0) {
|
||||
|
||||
} else {
|
||||
if (Number(serverPartId) === 1269 && params?.serverPartId) {
|
||||
|
||||
} else {
|
||||
if (!isComponent) {
|
||||
if (!selectedId) {
|
||||
return []
|
||||
}
|
||||
} else {
|
||||
console.log('selectRealEstateIdselectRealEstateId', selectRealEstateId);
|
||||
console.log('paramsparamsparamsparams', params);
|
||||
console.log('serverPartIdserverPartIdserverPartId', serverPartId);
|
||||
|
||||
// 先调用一下服务区详情 判断是管理单元 还是服务区
|
||||
detail = await handleGetSERVERPARTDetail({ SERVERPARTId: serverPartId })
|
||||
console.log('detaildetaildetaildetail', detail);
|
||||
// 先判断一下 是服务区还是管理单元 1000 说明是服务区 那么直接去请求即可
|
||||
if (Number(detail.STATISTICS_TYPE) === 1000) {
|
||||
isComponentSelect = serverPartId
|
||||
} else {
|
||||
// 如果不是 那么就拿它的片区id 去请求下面的全部服务区 当作选择了的服务区id
|
||||
const serverPart: any = await handleGetServerpartTree({
|
||||
ProvinceCode: "530000",
|
||||
SPRegionType_ID: detail.SPREGIONTYPE_ID,
|
||||
ServerpartType: 1000,
|
||||
StatisticsType: 1000
|
||||
})
|
||||
console.log('serverPartserverPartserverPart', serverPart);
|
||||
if (serverPart && serverPart.length > 0) {
|
||||
serverPart.forEach((item: any) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any) => {
|
||||
if (isComponentSelect) {
|
||||
isComponentSelect += `,${subItem.value}`
|
||||
} else {
|
||||
isComponentSelect = `${subItem.value}`
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// if (selectRealEstateId && selectRealEstateId.length > 0) {
|
||||
|
||||
// } else {
|
||||
// if (Number(serverPartId) === 1269 && params?.serverPartId) {
|
||||
|
||||
// } else {
|
||||
// return []
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
// if (Number(serverPartId) === 1269 && params?.serverPartId && !(selectRealEstateId && selectRealEstateId.length > 0)) {
|
||||
|
||||
// } else {
|
||||
// return []
|
||||
// }
|
||||
|
||||
// if (isComponent && !(selectRealEstateId && selectRealEstateId.length > 0)) {
|
||||
// return []
|
||||
// }
|
||||
|
||||
console.log('serverPartIdserverPartIdserverPartId', serverPartId);
|
||||
|
||||
console.log('isComponentSelectisComponentSelect', isComponentSelect);
|
||||
|
||||
const req: any = {
|
||||
searchParameter: {
|
||||
REALESTATE_TYPE: isComponent ? '' : params?.REALESTATE_TYPE || "",// 不动产类型
|
||||
SERVERPART_IDS: isComponent ? Number(serverPartId) === 1269 ? params?.serverPartId : selectedId : selectedId,
|
||||
START_LEASEDATE_End: isComponent ? '' : params?.END_LEASEDATE_Start || "",
|
||||
END_LEASEDATE_Start: isComponent ? '' : params?.START_LEASEDATE_End || "",
|
||||
SERVERPART_IDS: isComponent ? isComponentSelect : selectedId,
|
||||
// START_LEASEDATE_End: isComponent ? '' : params?.END_LEASEDATE_Start || "",
|
||||
// END_LEASEDATE_Start: isComponent ? '' : params?.START_LEASEDATE_End || "",
|
||||
REALESTATE_STATE: 1,
|
||||
REALESTATE_IDS: isComponent ? Number(serverPartId) === 1269 && !params?.serverPartId ? selectRealEstateId ? selectRealEstateId.toString() : "" : '' : ''
|
||||
// REALESTATE_IDS: isComponent ? Number(serverPartId) === 1269 ? params?.serverPartId ? '' : selectRealEstateId ? selectRealEstateId.toString() : "" : '' : ''
|
||||
},
|
||||
PageIndex: 1,
|
||||
PageSize: 999999,
|
||||
|
||||
@ -410,9 +410,6 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
||||
|
||||
// 保存税务代码触发的事件
|
||||
const handleSaveTaxCode = async () => {
|
||||
console.log('dsamkdas', tableEditData);
|
||||
|
||||
return
|
||||
// 当前的表格数据
|
||||
let newreqResult: any = {
|
||||
name: "",
|
||||
@ -790,11 +787,8 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
||||
}
|
||||
|
||||
let data = realEstateRef?.current?.selectRowDetail
|
||||
console.log('32131', data);
|
||||
// 开始保存内容
|
||||
handleGetSelectRealEstate(data)
|
||||
console.log('tableEditDatatableEditDatatableEditData', tableEditData);
|
||||
console.log('currentRow', currentRow);
|
||||
if (tableEditData && tableEditData.length > 0) {
|
||||
setRealEstateLoading(true)
|
||||
let list: any = JSON.parse(JSON.stringify(tableEditData))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user