update
This commit is contained in:
parent
eadc82b269
commit
c330b5d2bd
@ -10,7 +10,7 @@ import ModalFooter from "./components/modalFooter";
|
|||||||
import { handleGetPassportInfoById } from "../DigitalElectronics/service";
|
import { handleGetPassportInfoById } from "../DigitalElectronics/service";
|
||||||
// 引入地址解析工具
|
// 引入地址解析工具
|
||||||
import { handleAddressChange, parseAddress } from "@/utils/addressParser";
|
import { handleAddressChange, parseAddress } from "@/utils/addressParser";
|
||||||
import { handleGetServerpartDDL, handleGetServerpartInfo } from "../serverpartAssets/service";
|
import { handleGetServerpartDDL, handleGetServerpartInfo, handleGetServerpartTree } from "../serverpartAssets/service";
|
||||||
import { handleGetSERVERPARTDetail } from "../operationReport/service";
|
import { handleGetSERVERPARTDetail } from "../operationReport/service";
|
||||||
|
|
||||||
|
|
||||||
@ -39,7 +39,13 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
const [selectRowDetail, setSelectRowDetail] = useState<any>()
|
const [selectRowDetail, setSelectRowDetail] = useState<any>()
|
||||||
// 当前服务区下的方位
|
// 当前服务区下的方位
|
||||||
const [SERVERPARTREGION, setSERVERPARTREGION] = useState<any>()
|
const [SERVERPARTREGION, setSERVERPARTREGION] = useState<any>()
|
||||||
|
// 服务区列表
|
||||||
|
const [searchServerPartList, setSearchServerPartList] = useState<any>()
|
||||||
|
const [columnsState, setColumnsState] = useState<any>({
|
||||||
|
PROVINCE_NAME: { show: false },
|
||||||
|
CITY_NAME: { show: false },
|
||||||
|
SPECIALINDUSTRY_NUMBER: { show: false },
|
||||||
|
})
|
||||||
|
|
||||||
// 列表配置
|
// 列表配置
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
@ -60,7 +66,25 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
fieldProps: {
|
fieldProps: {
|
||||||
picker: "day",
|
picker: "day",
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
}
|
},
|
||||||
|
hideInSearch: isComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "服务区",
|
||||||
|
dataIndex: "serverPartId",
|
||||||
|
ellipsis: true,
|
||||||
|
width: 180,
|
||||||
|
align: 'center',
|
||||||
|
hideInTable: true,
|
||||||
|
valueType: 'select',
|
||||||
|
fieldProps: {
|
||||||
|
options: searchServerPartList,
|
||||||
|
showSearch: true,
|
||||||
|
filterOption: (input: string, option: any) => {
|
||||||
|
return option?.label?.toLowerCase().includes(input.toLowerCase())
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hideInSearch: !isComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "服务区名称",
|
title: "服务区名称",
|
||||||
@ -71,16 +95,80 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "不动产类型",
|
title: "租赁期限",
|
||||||
dataIndex: "REALESTATE_TYPE",
|
dataIndex: "LEASEDATE",
|
||||||
width: 150,
|
hideInSearch: true,
|
||||||
valueType: "select",
|
ellipsis: true,
|
||||||
|
width: 250,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
valueEnum: {
|
render: (_: any, record: any) => {
|
||||||
1000: "房屋租赁",
|
return `${record?.START_LEASEDATE || ""}${record?.END_LEASEDATE ? `-${record?.END_LEASEDATE}` : ''}`
|
||||||
2000: "车辆资产",
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: "查询内容",
|
||||||
|
dataIndex: "searchText",
|
||||||
|
hideInTable: true,
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: "请输入省份名称/城市名称",
|
||||||
|
},
|
||||||
|
hideInSearch: isComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "省份名称",
|
||||||
|
dataIndex: "PROVINCE_NAME",
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
width: 150,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "城市名称",
|
||||||
|
dataIndex: "CITY_NAME",
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
width: 150,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "详细地址",
|
||||||
|
dataIndex: "REALESTATE_ADDRESS",
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
width: 380,
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "是否跨地",
|
||||||
|
dataIndex: "CROSS_CITYSIGN",
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
render: (_: any, record: any) => {
|
||||||
|
return record?.CROSS_CITYSIGN ? "是" : "否"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "面积单位",
|
||||||
|
dataIndex: "AREA_UNIT",
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
valueType: "select",
|
||||||
|
valueEnum: {
|
||||||
|
1: "平方千米",
|
||||||
|
2: "平方米",
|
||||||
|
3: "公顷",
|
||||||
|
4: "亩",
|
||||||
|
5: "h㎡",
|
||||||
|
6: "k㎡",
|
||||||
|
7: "㎡"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "产权证号",
|
title: "产权证号",
|
||||||
dataIndex: "ESTATE_IDENTITY",
|
dataIndex: "ESTATE_IDENTITY",
|
||||||
@ -114,77 +202,17 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "查询内容",
|
title: "不动产类型",
|
||||||
dataIndex: "searchText",
|
dataIndex: "REALESTATE_TYPE",
|
||||||
hideInTable: true,
|
|
||||||
fieldProps: {
|
|
||||||
placeholder: "请输入省份名称/城市名称",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "省份名称",
|
|
||||||
dataIndex: "PROVINCE_NAME",
|
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
|
||||||
width: 150,
|
width: 150,
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "城市名称",
|
|
||||||
dataIndex: "CITY_NAME",
|
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
|
||||||
width: 150,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "详细地址",
|
|
||||||
dataIndex: "REALESTATE_ADDRESS",
|
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
|
||||||
width: 180,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "是否跨地",
|
|
||||||
dataIndex: "CROSS_CITYSIGN",
|
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
render: (_: any, record: any) => {
|
|
||||||
return record?.CROSS_CITYSIGN ? "是" : "否"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "面积单位",
|
|
||||||
dataIndex: "AREA_UNIT",
|
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
valueType: "select",
|
valueType: "select",
|
||||||
valueEnum: {
|
|
||||||
1: "平方千米",
|
|
||||||
2: "平方米",
|
|
||||||
3: "公顷",
|
|
||||||
4: "亩",
|
|
||||||
5: "h㎡",
|
|
||||||
6: "k㎡",
|
|
||||||
7: "㎡"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "租赁期限",
|
|
||||||
dataIndex: "LEASEDATE",
|
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
|
||||||
width: 250,
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: (_: any, record: any) => {
|
valueEnum: {
|
||||||
return `${record?.START_LEASEDATE || ""}${record?.END_LEASEDATE ? `-${record?.END_LEASEDATE}` : ''}`
|
1000: "房屋租赁",
|
||||||
}
|
2000: "车辆资产",
|
||||||
}
|
},
|
||||||
|
hideInSearch: isComponent
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// 获取当前用户信息的方法
|
// 获取当前用户信息的方法
|
||||||
@ -289,11 +317,20 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得服务区列表
|
||||||
|
const handleGetServerPartList = async () => {
|
||||||
|
const req: any = {
|
||||||
|
ProvinceCode: "530000",
|
||||||
|
}
|
||||||
|
const data = await handleGetServerpartDDL(req)
|
||||||
|
setSearchServerPartList(data)
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isFirst) {
|
if (isFirst) {
|
||||||
handleGetUserInfo()
|
handleGetUserInfo()
|
||||||
setIsFirst(false)
|
setIsFirst(false)
|
||||||
|
handleGetServerPartList()
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
@ -323,20 +360,47 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
rowKey={'REALESTATE_ID'}
|
rowKey={'REALESTATE_ID'}
|
||||||
scroll={{ x: '100%', y: 'calc(100vh - 450px)' }}
|
scroll={{ x: '100%', y: 'calc(100vh - 450px)' }}
|
||||||
headerTitle={'不动产列表'}
|
headerTitle={'不动产列表'}
|
||||||
search={isComponent ? false : { span: 6, }}
|
search={isComponent && Number(serverPartId) !== 1269 ? false : { span: 6 }}
|
||||||
request={async (params) => {
|
request={async (params) => {
|
||||||
|
console.log('selectRealEstateIdselectRealEstateId', selectRealEstateId);
|
||||||
|
|
||||||
|
|
||||||
if (!selectedId && !isComponent) {
|
if (!selectedId && !isComponent) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isComponent && 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);
|
||||||
|
|
||||||
|
|
||||||
const req: any = {
|
const req: any = {
|
||||||
searchParameter: {
|
searchParameter: {
|
||||||
REALESTATE_TYPE: isComponent ? '' : params?.REALESTATE_TYPE || "",// 不动产类型
|
REALESTATE_TYPE: isComponent ? '' : params?.REALESTATE_TYPE || "",// 不动产类型
|
||||||
SERVERPART_IDS: isComponent ? serverPartId : selectedId,
|
SERVERPART_IDS: isComponent ? Number(serverPartId) === 1269 ? params?.serverPartId : selectedId : selectedId,
|
||||||
START_LEASEDATE_End: isComponent ? '' : params?.END_LEASEDATE_Start || "",
|
START_LEASEDATE_End: isComponent ? '' : params?.END_LEASEDATE_Start || "",
|
||||||
END_LEASEDATE_Start: isComponent ? '' : params?.START_LEASEDATE_End || "",
|
END_LEASEDATE_Start: isComponent ? '' : params?.START_LEASEDATE_End || "",
|
||||||
REALESTATE_STATE: 1
|
REALESTATE_STATE: 1,
|
||||||
|
REALESTATE_IDS: isComponent ? Number(serverPartId) === 1269 && !params?.serverPartId ? selectRealEstateId ? selectRealEstateId.toString() : "" : '' : ''
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
@ -349,6 +413,8 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
name: "",
|
name: "",
|
||||||
value: encryptAES(JSON.stringify(req))
|
value: encryptAES(JSON.stringify(req))
|
||||||
}
|
}
|
||||||
|
console.log('req', req);
|
||||||
|
|
||||||
const data: any = await handleGetREALESTATEList(newReq)
|
const data: any = await handleGetREALESTATEList(newReq)
|
||||||
console.log('datadatadata', data);
|
console.log('datadatadata', data);
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
@ -373,6 +439,12 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
}}>添加不动产</Button>
|
}}>添加不动产</Button>
|
||||||
]
|
]
|
||||||
}}
|
}}
|
||||||
|
columnsState={{
|
||||||
|
value: columnsState,
|
||||||
|
onChange: (value) => {
|
||||||
|
setColumnsState(value)
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -521,10 +593,10 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
label={'服务区方位'}
|
label={'服务区方位'}
|
||||||
name={'SERVERPART_REGION'}
|
name={'SERVERPART_REGION'}
|
||||||
rules={[{
|
// rules={[{
|
||||||
required: true,
|
// required: true,
|
||||||
message: '请选择服务区方位!'
|
// message: '请选择服务区方位!'
|
||||||
}]}
|
// }]}
|
||||||
options={SERVERPARTREGION}
|
options={SERVERPARTREGION}
|
||||||
readonly={isComponent}
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
|
import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
|
||||||
import { Col, Drawer, FormInstance, Row, Table, Typography, Space, Button, Empty, Divider, Input, message, Select, Modal } from "antd";
|
import { Col, Drawer, FormInstance, Row, Table, Typography, Space, Button, Empty, Divider, Input, message, Select, Modal, Tooltip } from "antd";
|
||||||
import { connect } from "umi";
|
import { connect } from "umi";
|
||||||
import { ActionType, ProTable } from "@ant-design/pro-components";
|
import { ActionType, ProTable } from "@ant-design/pro-components";
|
||||||
import { handleGetAPPLYAPPROVEList, handleGetBILLDETAILList, handleSynchroBILLDETAILList } from "@/pages/DigitalElectronics/service";
|
import { handleGetAPPLYAPPROVEList, handleGetBILLDETAILList, handleSynchroBILLDETAILList } from "@/pages/DigitalElectronics/service";
|
||||||
@ -73,44 +73,53 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
dataIndex: "index",
|
dataIndex: "index",
|
||||||
valueType: "index",
|
valueType: "index",
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 70
|
width: 70,
|
||||||
|
fixed: 'left'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>款项名称</div>,
|
title: <div style={{ textAlign: 'center' }}>款项名称</div>,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 230,
|
width: 200,
|
||||||
dataIndex: "ITEM_NAME",
|
dataIndex: "ITEM_NAME",
|
||||||
ellipsis: true
|
ellipsis: true,
|
||||||
|
fixed: 'left'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>税务代码</div>,
|
title: <div style={{ textAlign: 'center' }}>税务代码</div>,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: "TABLE_NAME",
|
dataIndex: "TABLE_NAME",
|
||||||
|
fixed: 'left',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return isEdit ? <Input defaultValue={record.TABLE_NAME} onBlur={(e: any) => {
|
const currentItem = tableEditData?.find((item: any) => item.BILLDETAIL_ID === record.BILLDETAIL_ID) || record;
|
||||||
let value: string = e.target.value || ""
|
return isEdit ? <Input
|
||||||
let tableData: any = JSON.parse(JSON.stringify(tableEditData))
|
key={record.BILLDETAIL_ID}
|
||||||
tableData.forEach((item: any) => {
|
defaultValue={currentItem.TABLE_NAME} onBlur={(e: any) => {
|
||||||
if (item.BILLDETAIL_ID === record.BILLDETAIL_ID) {
|
let value: string = e.target.value || ""
|
||||||
item.TABLE_NAME = value
|
let tableData: any = JSON.parse(JSON.stringify(tableEditData))
|
||||||
}
|
tableData.forEach((item: any) => {
|
||||||
})
|
if (item.BILLDETAIL_ID === record.BILLDETAIL_ID) {
|
||||||
setTableEditData(tableData)
|
item.TABLE_NAME = value
|
||||||
}} /> : record.TABLE_NAME
|
}
|
||||||
|
})
|
||||||
|
setTableEditData(tableData)
|
||||||
|
}} /> : currentItem.TABLE_NAME
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>税率</div>,
|
title: <div style={{ textAlign: 'center' }}>税率</div>,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80,
|
width: 80,
|
||||||
|
fixed: 'left',
|
||||||
dataIndex: "DUTY_PARAGRAPH",
|
dataIndex: "DUTY_PARAGRAPH",
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
|
const currentItem = tableEditData?.find((item: any) => item.BILLDETAIL_ID === record.BILLDETAIL_ID) || record;
|
||||||
return isEdit ?
|
return isEdit ?
|
||||||
<Select
|
<Select
|
||||||
|
key={record.BILLDETAIL_ID}
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
defaultValue={record?.DUTY_PARAGRAPH ? record?.DUTY_PARAGRAPH.toString() : ""}
|
defaultValue={currentItem?.DUTY_PARAGRAPH ? currentItem?.DUTY_PARAGRAPH.toString() : ""}
|
||||||
options={taxRateList}
|
options={taxRateList}
|
||||||
onChange={(e: any) => {
|
onChange={(e: any) => {
|
||||||
let value: string = e || ""
|
let value: string = e || ""
|
||||||
@ -123,13 +132,14 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
setTableEditData(tableData)
|
setTableEditData(tableData)
|
||||||
}}
|
}}
|
||||||
/> :
|
/> :
|
||||||
record?.DUTY_PARAGRAPH ? `${record?.DUTY_PARAGRAPH}%` : ""
|
currentItem?.DUTY_PARAGRAPH ? `${currentItem?.DUTY_PARAGRAPH}%` : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>商品条码</div>,
|
title: <div style={{ textAlign: 'center' }}>商品条码</div>,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 120,
|
width: 120,
|
||||||
|
fixed: 'left',
|
||||||
dataIndex: "ITEM_ID",
|
dataIndex: "ITEM_ID",
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
@ -140,16 +150,19 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
dataIndex: "ITEM_RULE",
|
dataIndex: "ITEM_RULE",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return isEdit ? <Input defaultValue={record.ITEM_RULE} onBlur={(e: any) => {
|
const currentItem = tableEditData?.find((item: any) => item.BILLDETAIL_ID === record.BILLDETAIL_ID) || record;
|
||||||
let value: string = e.target.value || ""
|
return isEdit ? <Input
|
||||||
let tableData: any = JSON.parse(JSON.stringify(tableEditData))
|
key={record.BILLDETAIL_ID}
|
||||||
tableData.forEach((item: any) => {
|
defaultValue={currentItem.ITEM_RULE} onBlur={(e: any) => {
|
||||||
if (item.BILLDETAIL_ID === record.BILLDETAIL_ID) {
|
let value: string = e.target.value || ""
|
||||||
item.ITEM_RULE = value
|
let tableData: any = JSON.parse(JSON.stringify(tableEditData))
|
||||||
}
|
tableData.forEach((item: any) => {
|
||||||
})
|
if (item.BILLDETAIL_ID === record.BILLDETAIL_ID) {
|
||||||
setTableEditData(tableData)
|
item.ITEM_RULE = value
|
||||||
}} /> : record.ITEM_RULE
|
}
|
||||||
|
})
|
||||||
|
setTableEditData(tableData)
|
||||||
|
}} /> : currentItem.ITEM_RULE
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -159,16 +172,19 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
dataIndex: "ITEM_UNIT",
|
dataIndex: "ITEM_UNIT",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return isEdit ? <Input defaultValue={record.ITEM_UNIT} onBlur={(e: any) => {
|
const currentItem = tableEditData?.find((item: any) => item.BILLDETAIL_ID === record.BILLDETAIL_ID) || record;
|
||||||
let value: string = e.target.value || ""
|
return isEdit ? <Input
|
||||||
let tableData: any = JSON.parse(JSON.stringify(tableEditData))
|
key={record.BILLDETAIL_ID}
|
||||||
tableData.forEach((item: any) => {
|
defaultValue={currentItem.ITEM_UNIT} onBlur={(e: any) => {
|
||||||
if (item.BILLDETAIL_ID === record.BILLDETAIL_ID) {
|
let value: string = e.target.value || ""
|
||||||
item.ITEM_UNIT = value
|
let tableData: any = JSON.parse(JSON.stringify(tableEditData))
|
||||||
}
|
tableData.forEach((item: any) => {
|
||||||
})
|
if (item.BILLDETAIL_ID === record.BILLDETAIL_ID) {
|
||||||
setTableEditData(tableData)
|
item.ITEM_UNIT = value
|
||||||
}} /> : record.ITEM_UNIT
|
}
|
||||||
|
})
|
||||||
|
setTableEditData(tableData)
|
||||||
|
}} /> : currentItem.ITEM_UNIT
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -181,34 +197,34 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>单价</div>,
|
title: <div style={{ textAlign: 'center' }}>单价</div>,
|
||||||
align: 'right',
|
align: 'right',
|
||||||
width: 120,
|
width: 80,
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
dataIndex: "INVOICE_PRICE"
|
dataIndex: "INVOICE_PRICE"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>金额</div>,
|
title: <div style={{ textAlign: 'center' }}>金额</div>,
|
||||||
align: 'right',
|
align: 'right',
|
||||||
width: 120,
|
width: 80,
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
dataIndex: "INVOICE_AMOUNT"
|
dataIndex: "INVOICE_AMOUNT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>税额</div>,
|
title: <div style={{ textAlign: 'center' }}>税额</div>,
|
||||||
align: 'right',
|
align: 'right',
|
||||||
width: 120,
|
width: 80,
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
dataIndex: "INVOICE_TAX"
|
dataIndex: "INVOICE_TAX"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>折扣</div>,
|
title: <div style={{ textAlign: 'center' }}>折扣</div>,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 80,
|
||||||
dataIndex: "INVOICE_DISCOUNT"
|
dataIndex: "INVOICE_DISCOUNT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "不动产",
|
title: "不动产",
|
||||||
dataIndex: "option",
|
dataIndex: "option",
|
||||||
width: 120,
|
width: 80,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: (_: any, record: any) => {
|
render: (_: any, record: any) => {
|
||||||
return record?.REALESTATE_ID ?
|
return record?.REALESTATE_ID ?
|
||||||
@ -219,10 +235,16 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
}}>
|
}}>
|
||||||
{realEstateEnum && realEstateEnum[record?.REALESTATE_ID] ? realEstateEnum[record?.REALESTATE_ID] : record?.REALESTATE_ID}
|
{realEstateEnum && realEstateEnum[record?.REALESTATE_ID] ? realEstateEnum[record?.REALESTATE_ID] : record?.REALESTATE_ID}
|
||||||
</a> :
|
</a> :
|
||||||
< Button type={'primary'} onClick={async () => {
|
<Tooltip title={"选择不动产"}>
|
||||||
setCurrentRow(record)
|
<Button type={'primary'} onClick={async () => {
|
||||||
setSelectRealEstateModal(true)
|
console.log('选择不动产', record);
|
||||||
}}> 选择不动产</Button >
|
console.log('票据信息', parentRow);
|
||||||
|
|
||||||
|
setCurrentRow(record)
|
||||||
|
setSelectRealEstateModal(true)
|
||||||
|
}}>+</Button>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
@ -388,6 +410,9 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
|
|
||||||
// 保存税务代码触发的事件
|
// 保存税务代码触发的事件
|
||||||
const handleSaveTaxCode = async () => {
|
const handleSaveTaxCode = async () => {
|
||||||
|
console.log('dsamkdas', tableEditData);
|
||||||
|
|
||||||
|
return
|
||||||
// 当前的表格数据
|
// 当前的表格数据
|
||||||
let newreqResult: any = {
|
let newreqResult: any = {
|
||||||
name: "",
|
name: "",
|
||||||
@ -414,7 +439,7 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
const handleGetThisServerpartRealEstateData = async () => {
|
const handleGetThisServerpartRealEstateData = async () => {
|
||||||
const req: any = {
|
const req: any = {
|
||||||
searchParameter: {
|
searchParameter: {
|
||||||
SERVERPART_IDS: parentRow?.SERVERPART_ID || "",
|
SERVERPART_IDS: Number(parentRow?.SERVERPART_ID) === 1269 ? '' : (parentRow?.SERVERPART_ID || ""),
|
||||||
REALESTATE_STATE: 1
|
REALESTATE_STATE: 1
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
@ -566,7 +591,11 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
columns={detailColumns}
|
columns={detailColumns}
|
||||||
bordered
|
bordered
|
||||||
scroll={{ x: "100%", y: '500px' }}
|
scroll={{ x: "100%", y: '500px' }}
|
||||||
pagination={false}
|
// pagination={false}
|
||||||
|
pagination={{
|
||||||
|
defaultPageSize: 100,
|
||||||
|
pageSizeOptions: ['100', '200', '500', '1000'],
|
||||||
|
}}
|
||||||
request={async () => {
|
request={async () => {
|
||||||
// 调用一次 获取这个服务区里面的全部 不动产信息
|
// 调用一次 获取这个服务区里面的全部 不动产信息
|
||||||
handleGetThisServerpartRealEstateData()
|
handleGetThisServerpartRealEstateData()
|
||||||
@ -583,6 +612,8 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
if (billDetail && billDetail.length > 0) {
|
if (billDetail && billDetail.length > 0) {
|
||||||
setTableEditData(billDetail)
|
setTableEditData(billDetail)
|
||||||
setReqDetailList(billDetail)
|
setReqDetailList(billDetail)
|
||||||
|
console.log('billDetailbillDetailbillDetail', billDetail);
|
||||||
|
|
||||||
return { data: billDetail, success: true }
|
return { data: billDetail, success: true }
|
||||||
}
|
}
|
||||||
return { data: [], success: true }
|
return { data: [], success: true }
|
||||||
@ -740,7 +771,7 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, par
|
|||||||
|
|
||||||
{/* 不动产的悬浮框 */}
|
{/* 不动产的悬浮框 */}
|
||||||
<Modal
|
<Modal
|
||||||
width={1200}
|
width={'90%'}
|
||||||
title={"选择不动产"}
|
title={"选择不动产"}
|
||||||
open={selectRealEstateModal}
|
open={selectRealEstateModal}
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user