This commit is contained in:
ylj20011123 2026-01-08 09:18:21 +08:00
parent 3c3632469e
commit baf062ece3
13 changed files with 2978 additions and 557 deletions

View File

@ -1365,6 +1365,11 @@ export default [
name: 'semanticParsingRulesConfig', name: 'semanticParsingRulesConfig',
component: './Setting/semanticParsingRulesConfig/index', component: './Setting/semanticParsingRulesConfig/index',
}, },
{
path: '/setting/NewSemanticParsingRulesConfig',
name: 'NewSemanticParsingRulesConfig',
component: './Setting/NewSemanticParsingRulesConfig/index',
},
{ {
path: '/setting/semanticAnswerConfig', path: '/setting/semanticAnswerConfig',
name: 'semanticAnswerConfig', name: 'semanticAnswerConfig',

View File

@ -0,0 +1,938 @@
// python的新语义 实现
import React, { useRef, useState } from 'react';
import { connect } from 'umi';
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import ProForm, { ProFormDigit, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-form';
import { PlusOutlined } from '@ant-design/icons';
import { PageContainer } from '@ant-design/pro-layout';
import { Button, Col, Drawer, message, Row, Popconfirm, Space, Modal } from 'antd';
import moment from 'moment';
import type { CurrentUser } from "umi";
import type { ConnectState } from '@/models/connect';
import type { ActionType, ProColumns } from '@ant-design/pro-table';
import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import type { FormInstance } from 'antd';
import { delanalysisrule, getList, handleGetINTERFACEMODELList, handleGetINTERFACEPARAMSList, handleGetINTERFACERESPONSEList, updateanalysisrule } from '../semanticParsingRulesConfig/service';
import { ANALYSISRULEModel } from '../semanticParsingRulesConfig/data';
import SelectInterface from '../semanticParsingRulesConfig/components/selectInterface';
import ConfigAiModal from '../semanticParsingRulesConfig/components/configAiModal';
const handelDelete = async (analysisruleid: number) => {
const hide = message.loading('正在删除...');
try {
const result = await delanalysisrule(analysisruleid);
hide();
if (result.Result_Code !== 100) {
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
return false;
}
message.success('删除成功!');
return true;
} catch (error) {
hide();
message.error('删除失败');
return false;
}
};
const handleAddUpdate = async (fields: ANALYSISRULEModel) => {
const hide = message.loading('正在提交...');
const result = await updateanalysisrule(fields);
hide();
if (result.Result_Code !== 100) {
message.error(`${result.Result_Desc}` || `${result.Result_Code}:提交失败`);
return false;
}
return result.Result_Data ? result.Result_Data : true;
};
const ANALYSISRULETable: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
const { currentUser } = props
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const SelectInterfaceRef = useRef<any>();
const ConfigAiModalRef = useRef<any>();
const [currentRow, setCurrentRow] = useState<ANALYSISRULEModel>();
const [showDetail, setShowDetail] = useState<boolean>();
const [modalVisible, handleModalVisible] = useState<boolean>();
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
const [searchParams, setSearchParams] = useState<any>();
// 弹出框拖动效果
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
const draggleRef = React.createRef<any>()
// 展示通用接口的悬浮框
const [showSelectInterfaceModal, setShowSelectInterfaceModal] = useState<any>()
// 选择系统接口悬浮框的确定加载效果
const [selectModalLoading, setSelectModalLoading] = useState<boolean>(false)
const [columnsStateMap, setColumnsStateMap] = useState<any>({
API_ENDPOINT: { show: false },
PARAM_TEMPLATE: { show: false },
PARSING_RULES: { show: false },
RESPONSE_CONFIG: { show: false },
OUTPUT_FORMAT: { show: false },
ENABLE_CHART: { show: false },
ENABLE_PDF_EXPORT: { show: false },
ENABLE_VIEW_MORE: { show: false },
RULE_PRIORITY: { show: false },
RULE_SOURCE: { show: false },
CREATE_DATE: { show: false },
UPDATE_DATE: { show: false },
ANALYSISRULE_STATE: { show: false },
});
// 配置的ai参数
const [configAiReqModal, setConfigAiReqModal] = useState<boolean>(false)
// 配置ai的loading
const [configAiLoading, setConfigAiLoading] = useState<boolean>(false)
// 配置的类型 1 入参 2出参
const [configType, setConfigType] = useState<number>(0)
// 现在查看的接口名字
const [nowSearchInterfaceName, setNowSearchInterfaceName] = useState<string>('')
const onDraggaleStart = (event, uiData) => {
const { clientWidth, clientHeight } = window.document.documentElement;
const targetRect = draggleRef.current?.getBoundingClientRect();
if (!targetRect) {
return;
}
setBounds({
left: -targetRect.left + uiData.x,
right: clientWidth - (targetRect.right - uiData.x),
top: -targetRect.top + uiData.y,
bottom: clientHeight - (targetRect.bottom - uiData.y),
});
};
// 拖动结束
// 定义列表字段内容
const columns: ProColumns<ANALYSISRULEModel>[] = [
{
dataIndex: 'TRIGGER_WORDS',
title: '触发关键词',
// ,用于匹配用户输入的关键词
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'ANALYSISRULE_ID',
width: 70,
title: '规则ID',
// ,用于匹配用户输入的关键词
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'USER_INTENT',
title: '用户意图标识',
// ,归类规则的用途
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'API_ENDPOINT',
title: '接口地址',
// ,前端根据解析结果调用该接口获取数据
align: 'left',
hideInSearch: true,
ellipsis: true,
},
{
dataIndex: 'PARAM_TEMPLATE',
title: '参数模板',
ellipsis: true,
// ,以 JSON 格式存储,用于动态生成接口请求参数
align: 'left',
hideInSearch: true,
},
{
dataIndex: 'PARSING_RULES',
title: '通用解析逻辑',
// ,以 JSON 格式存储,定义字段解析的详细规则
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'RESPONSE_CONFIG',
title: '响应内容配置',
// ,以 JSON 格式存储,定义接口返回内容的展示逻辑和字段控制
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'OUTPUT_FORMAT',
title: '输出格式',
// ,定义数据展示方式,如 JSON、表格 或 图表
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'ENABLE_CHART',
title: '图表输出',
align: 'left',
ellipsis: true,
hideInSearch: true,
valueType: 'select',
valueEnum: {
0: '不支持',
1: '支持'
}
},
{
dataIndex: 'ENABLE_PDF_EXPORT',
title: '导出为PDF',
align: 'left',
ellipsis: true,
hideInSearch: true,
valueType: 'select',
valueEnum: {
0: '不支持',
1: '支持'
}
},
{
dataIndex: 'ENABLE_VIEW_MORE',
title: '“查看更多”功能',
align: 'left',
ellipsis: true,
hideInSearch: true,
valueType: 'select',
valueEnum: {
0: '不支持',
1: '支持'
}
},
{
dataIndex: 'RULE_PRIORITY',
title: '规则优先级',
// ,值越小优先级越高,用于多规则冲突时的选择
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'RULE_SOURCE',
title: '规则来源',
align: 'left',
ellipsis: true,
hideInSearch: true,
valueType: 'select',
valueEnum: {
1000: '系统默认',
2000: '用户自定义'
}
},
{
dataIndex: 'CREATE_DATE',
title: '创建时间',
valueType: 'date',
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'UPDATE_DATE',
title: '修改时间',
valueType: 'date',
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'ANALYSISRULE_STATE',
title: '启用规则',
ellipsis: true,
align: 'left',
valueType: 'select',
valueEnum: {
"0": '禁用',
"1": '启用'
},
initialValue: "1"
},
{
dataIndex: 'ANALYSISRULE_DESC',
title: '备注说明',
// ,记录规则的背景、用途或配置意图
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'OUTPUT_STANDARD',
title: '大模型输出规范',
align: 'left',
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'option',
width: 150,
title: '操作',
valueType: 'option',
hideInSearch: true,
render: (_, record) => {
return (
<Space>
<a
onClick={() => {
setCurrentRow(record);
setShowDetail(true);
}}
>
</a>
<a
onClick={() => {
setCurrentRow(record);
handleModalVisible(true);
}}
>
</a>
<Popconfirm
title="确认删除该解析规则列表信息吗?"
onConfirm={async () => {
const sucesse = await handelDelete(record.ANALYSISRULE_ID);
if (sucesse && actionRef.current) {
actionRef.current.reload();
}
}}
>
<a></a>
</Popconfirm>
</Space>
);
},
},
];
return (
<PageContainer header={{
title: '',
breadcrumb: {}
}}>
<ProTable<ANALYSISRULEModel>
style={{ height: 'calc(100vh - 135px)', background: '#fff' }}
scroll={{ y: 'calc(100vh - 410px)' }}
rowKey={(record) => {
return `${record?.ANALYSISRULE_ID}`
}}
formRef={formRef}
headerTitle="解析规则列表" // 列表表头
actionRef={actionRef}
search={{ span: 6, labelWidth: 'auto' }}
// 请求数据
request={async (params, sorter) => {
// 排序字段
const sortstr = Object.keys(sorter).map(n => {
const value = sorter[n]
return value ? `${n} ${value.replace('end', '')}` : ''
})
const searchWholeParams = {
searchParameter: { ...params, ANALYSISRULE_STATE: params?.ANALYSISRULE_STATE, RULE_SOURCE: 3000 },
sortstr: "UPDATE_DATE desc",
pagesize: 999999
}
setSearchParams(searchWholeParams)
const data = await getList(searchWholeParams);
console.log('data', data);
let res: any = data.data
console.log('res', res);
if (res && res.length > 0) {
return { data: res, success: true }
}
return { data: [], success: true };
}}
columns={columns}
toolbar={{
actions: [
// 新增按钮
<Button
key="new"
icon={<PlusOutlined />}
type="primary"
onClick={() => {
handleModalVisible(true);
}}
>
</Button>,
],
}}
pagination={{ pageSize: 20 }}
columnsState={{
value: columnsStateMap,
onChange: setColumnsStateMap,
}}
/>
<Drawer
width={600}
visible={showDetail}
onClose={() => {
setCurrentRow(undefined);
setShowDetail(false);
}}
closable={false}
>
{currentRow?.ANALYSISRULE_ID && (
<ProDescriptions<ANALYSISRULEModel>
column={2}
request={async () => ({
data: currentRow || {},
})}
params={{
id: currentRow?.ANALYSISRULE_ID,
}}
columns={columns as ProDescriptionsItemProps<ANALYSISRULEModel>[]}
/>
)}
</Drawer>
<Modal
title={
currentRow ? '更新解析规则' : '新建解析规则'
// <div
// style={{
// width: '100%',
// cursor: 'move',
// }}
// onMouseOver={() => {
// if (disabled) {
// setDraggleDisabled(false)
// }
// }}
// onMouseOut={() => {
// setDraggleDisabled(true)
// }}
// onFocus={() => { }}
// onBlur={() => { }}
// >
// </div>
}
destroyOnClose={true}
width={"90%"}
visible={modalVisible}
confirmLoading={confirmLoading}
afterClose={() => {
formRef.current?.resetFields();
setCurrentRow(undefined);
}}
onCancel={() => {
handleConfirmLoading(false)
handleModalVisible(false)
}}
onOk={async () => { // 提交框内的数据
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
// actionRef.current?.reload()
})
}}
// modalRender={(modal) => {
// return <Draggable
// disabled={disabled}
// bounds={bounds}
// onStart={(event, uiData) => onDraggaleStart(event, uiData)}
// >
// <div ref={draggleRef}>{modal}</div>
// </Draggable>
// }}
>
<ProForm<ANALYSISRULEModel>
layout={'horizontal'}
wrapperCol={{ span: 16 }} // 表单项 填写部分所占的栅格数
labelCol={{ span: 6 }} // 表单项 标题所占的栅格数
formRef={formRef}
autoFocusFirstInput
submitter={false}
preserve={false}
initialValues={currentRow}
onFinish={async (values) => {
let newValue: ANALYSISRULEModel = { ...values };
if (currentRow) {
// 编辑数据
newValue = { ...values, ANALYSISRULE_ID: currentRow.ANALYSISRULE_ID };
newValue.CREATE_DATE = newValue.CREATE_DATE ? moment(newValue.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : moment().format('YYYY-MM-DD HH:mm:ss')
newValue.UPDATE_DATE = moment().format('YYYY-MM-DD HH:mm:ss')
// newValue.PARAM_TEMPLATE = JSON.stringify(newValue.PARAM_TEMPLATE)
// newValue.PARSING_RULES = JSON.stringify(newValue.PARSING_RULES)
// newValue.RESPONSE_CONFIG = JSON.stringify(newValue.RESPONSE_CONFIG)
}
console.log('newValue', newValue);
// 如果有开关,要把开关的代码写进去
const success = await handleAddUpdate(newValue as ANALYSISRULEModel);
handleConfirmLoading(false)
console.log('success', success);
if (success) {
if (actionRef.current) {
actionRef.current.reload();
}
handleModalVisible(false);
} else {
handleConfirmLoading(false)
}
}}
>
<Row>
<Col span={8}>
<ProFormTextArea
name="TRIGGER_WORDS"
label="触发关键词"
fieldProps={{
rows: 5
}}
// ,用于匹配用户输入的关键词
/>
</Col>
<Col span={8}>
<ProFormText
name="USER_INTENT"
label="用户意图标识"
// ,归类规则的用途
/>
</Col>
<Col span={8}>
<ProFormTextArea
name="ANALYSISRULE_DESC"
label="备注说明"
fieldProps={{
rows: 5
}}
// ,记录规则的背景、用途或配置意图
// labelCol={{ span: 2 }}
// wrapperCol={{ span: 22 }}
/>
</Col>
<Col span={8}>
<Row gutter={6}>
<Col span={20}>
<ProFormText
name="API_ENDPOINT"
label="接口地址"
labelCol={{ span: 7 }}
// ,前端根据解析结果调用该接口获取数据
/>
</Col>
<Col span={4}>
<Button type={"primary"} onClick={() => {
setShowSelectInterfaceModal(true)
}}>
<PlusOutlined />
</Button>
</Col>
</Row>
</Col>
<Col span={8}>
<ProFormSelect
name="ENABLE_TABLE"
label="表格输出"
options={[{ label: '不支持', value: 0 }, { label: '支持', value: 1 }]}
/>
</Col>
<Col span={8}>
<ProFormSelect
name="ENABLE_CHART"
label="图表输出"
options={[{ label: '不支持', value: 0 }, { label: '支持', value: 1 }]}
/>
</Col>
<Col span={8}>
<ProFormSelect
name="ENABLE_PDF_EXPORT"
label="导出为PDF"
options={[{ label: '不支持', value: 0 }, { label: '支持', value: 1 }]}
/>
</Col>
<Col span={8}>
<ProFormSelect
name="ENABLE_VIEW_MORE"
label="“查看更多”功能"
options={[{ label: '不支持', value: 0 }, { label: '支持', value: 1 }]}
/>
</Col>
{/* <Col span={12}>
<ProFormSelect
name="DateType"
label="输出日期类型"
options={[{ label: '完整时间', value: 0 }, { label: '开始时间', value: 1 }, { label: '结束时间', value: 2 }]}
/>
</Col>
<Col span={12}>
<ProFormSelect
name="DateFormat"
label="输出日期格式"
options={[{ label: '年月日', value: 0 }, { label: '年月', value: 1 }, { label: '年', value: 2 }]}
/>
</Col> */}
<Col span={8}>
<ProFormSelect
name="SPRESPONSE_TYPE"
label="服务区返回格式"
options={[{ label: '单个服务区', value: 1 }, { label: '多个服务区', value: 2 }]}
/>
</Col>
<Col span={8}>
<ProFormDigit
name="RULE_PRIORITY"
label="规则优先级"
// ,值越小优先级越高,用于多规则冲突时的选择
/>
</Col>
<Col span={8}>
<ProFormSelect
name="RULE_SOURCE"
label="规则来源"
options={[{ label: '系统默认', value: 1000 }, { label: '用户自定义', value: 2000 }, { label: '测试', value: 3000 }]}
/>
</Col>
<Col span={8}>
{/* ProFormDatePicker */}
<ProFormText
name="CREATE_DATE"
label="创建时间"
width="lg"
disabled
initialValue={currentRow?.CREATE_DATE ? moment(currentRow?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : moment().format('YYYY-MM-DD HH:mm:ss')}
/>
</Col>
<Col span={8}>
{/* ProFormDatePicker */}
<ProFormText
name="UPDATE_DATE"
label="修改时间"
width="lg"
disabled
initialValue={currentRow?.UPDATE_DATE ? moment(currentRow?.UPDATE_DATE).format('YYYY-MM-DD HH:mm:ss') : moment().format('YYYY-MM-DD HH:mm:ss')}
/>
</Col>
<Col span={8}>
<ProFormSelect
name="ANALYSISRULE_STATE"
label="启用规则"
options={[{ label: '禁用', value: 0 }, { label: '启用', value: 1 }]}
/>
</Col>
<Col span={8}>
<Row gutter={4}>
<Col span={18}>
<ProFormSelect
name="SHOW_CHILDNODE"
label="AI子级配置"
options={[{ label: '隐藏', value: 0 }, { label: '显示', value: 1 }]}
/>
</Col>
<Col span={6}>
<ProFormText
name="CHILD_NODENAME"
label=""
width="lg"
placeholder={"子集标签名称"}
/>
</Col>
</Row>
</Col>
<Col span={8}>
<Row gutter={6}>
<Col span={22}>
<ProFormTextArea
name="PARAM_FIELD"
label="ai入参模版"
fieldProps={{
autoSize: {
minRows: 3,
maxRows: 9
}
}}
disabled
/>
</Col>
<Col span={2}>
<Button type={"primary"} onClick={() => {
let formData: any = formRef.current?.getFieldsValue()
setNowSearchInterfaceName(formData?.API_ENDPOINT || '')
setConfigType(1)
setConfigAiReqModal(true)
}}>
<PlusOutlined />
</Button>
</Col>
</Row>
</Col>
<Col span={8}>
<Row gutter={6}>
<Col span={22}>
<ProFormTextArea
name="RESPONSE_FIELD"
label="ai返参模版"
fieldProps={{
autoSize: {
minRows: 3,
maxRows: 9
}
}}
disabled
/>
</Col>
<Col span={2}>
<Button type={"primary"} onClick={() => {
let formData: any = formRef.current?.getFieldsValue()
setNowSearchInterfaceName(formData?.API_ENDPOINT || '')
setConfigType(2)
setConfigAiReqModal(true)
}}>
<PlusOutlined />
</Button>
</Col>
</Row>
</Col>
<Col span={8}>
<ProFormTextArea
name="OUTPUT_STANDARD"
label="大模型输出规范"
fieldProps={{
autoSize: {
minRows: 3,
maxRows: 9
}
}}
/>
</Col>
<Col span={8}>
<ProFormTextArea
name="PARAM_TEMPLATE"
label="参数模板"
fieldProps={{
autoSize: {
minRows: 3,
maxRows: 9
}
}}
// ,以 JSON 格式存储,用于动态生成接口请求参数
/>
</Col>
<Col span={8}>
<ProFormTextArea
name="PARSING_RULES"
label="通用解析逻辑"
fieldProps={{
autoSize: {
minRows: 3,
maxRows: 9
}
}}
// ,以 JSON 格式存储,定义字段解析的详细规则
/>
</Col>
<Col span={8}>
<ProFormTextArea
name="RESPONSE_CONFIG"
label="响应内容配置"
fieldProps={{
autoSize: {
minRows: 3,
maxRows: 9
}
}}
// ,以 JSON 格式存储,定义接口返回内容的展示逻辑和字段控制
/>
</Col>
<Col span={8}>
<ProFormTextArea
name="OUTPUT_FORMAT"
label="输出格式"
fieldProps={{
autoSize: {
minRows: 3,
maxRows: 5
}
}}
// ,定义数据展示方式,如 JSON、表格 或 图表
/>
</Col>
<Col style={{ display: 'none' }}>
<ProFormText
name="ANALYSISRULE_ID"
label="内码"
/>
</Col>
</Row>
</ProForm>
</Modal>
<Modal
title={'系统接口选择'}
destroyOnClose={true}
width={1400}
visible={showSelectInterfaceModal}
afterClose={() => {
setShowSelectInterfaceModal(false)
}}
onCancel={() => {
setShowSelectInterfaceModal(false)
}}
confirmLoading={selectModalLoading}
onOk={async () => { // 提交框内的数据
setSelectModalLoading(true)
let rowDetail: any = SelectInterfaceRef.current?.selctRowDetail[0]
console.log('rowDetail', rowDetail);
// 入参数据
let enterObj: any = {}
// 返参数据
let returnObj: any = {}
if (rowDetail?.INTERFACE_ID) {
// 入参
const enteryData = await handleGetINTERFACEPARAMSList({
SearchParameter: {
INTERFACE_ID: rowDetail?.INTERFACE_ID
}
})
console.log('enteryData', enteryData);
if (enteryData && enteryData.length > 0) {
let ModalId: any = enteryData[0].INTERFACEMODEL_ID
if (ModalId) {
const reqData: any = await handleGetINTERFACEMODELList({
SearchParameter: {
INTERFACEMODEL_PID: ModalId
},
PageIndex: 1,
PageSize: 999999
})
if (reqData && reqData.length > 0) {
reqData.forEach((item: any) => {
enterObj[item.INTERFACEMODEL_NAME] = item.INTERFACEMODEL_COMMENT
})
}
}
}
// 返参
const returnData = await handleGetINTERFACERESPONSEList({
SearchParameter: {
INTERFACE_ID: 2438
},
PageIndex: 1,
PageSize: 999999
})
if (returnData && returnData.length > 0) {
let ModalId: any = returnData[0].INTERFACEMODEL_ID
if (ModalId) {
const reqData: any = await handleGetINTERFACEMODELList({
SearchParameter: {
INTERFACEMODEL_PID: ModalId
},
PageIndex: 1,
PageSize: 999999
})
if (reqData && reqData.length > 0) {
reqData.forEach((item: any) => {
returnObj[item.INTERFACEMODEL_NAME] = item.INTERFACEMODEL_COMMENT
})
}
}
}
}
console.log('enterObj', enterObj);
console.log('enterObj', JSON.stringify(enterObj));
console.log('returnObj', returnObj);
console.log('returnObj', JSON.stringify(returnObj));
// formRef
// API_ENDPOINT
// PARAM_TEMPLATE
// PARSING_RULES
// RESPONSE_CONFIG
formRef.current?.setFieldsValue({
API_ENDPOINT: rowDetail.INTERFACE_ROUTE,
PARAM_TEMPLATE: JSON.stringify(enterObj),
RESPONSE_CONFIG: JSON.stringify(returnObj)
})
setShowSelectInterfaceModal(false)
setSelectModalLoading(false)
}}
>
<SelectInterface onShow={showSelectInterfaceModal} onRef={SelectInterfaceRef} />
</Modal>
<Modal
title={"配置ai参数"}
destroyOnClose={true}
width={1400}
visible={configAiReqModal}
afterClose={() => {
setConfigAiReqModal(false)
setConfigType(0)
setNowSearchInterfaceName('')
}}
onCancel={() => {
setConfigAiReqModal(false)
setConfigType(0)
setNowSearchInterfaceName('')
}}
confirmLoading={configAiLoading}
onOk={async () => {
let list: any = ConfigAiModalRef.current.selectModalRowList
console.log('ConfigAiModalRef', list);
if (list && list.length > 0) {
let obj: any = {}
list.forEach((item: any) => {
obj[item.title] = item.content
})
if (configType === 1) {
formRef.current?.setFieldsValue({ PARAM_FIELD: JSON.stringify(obj) })
} else if (configType === 2) {
formRef.current?.setFieldsValue({ RESPONSE_FIELD: JSON.stringify(obj) })
}
}
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
// actionRef.current?.reload()
setConfigAiReqModal(false)
setConfigType(0)
setNowSearchInterfaceName('')
})
}}
>
<ConfigAiModal onRef={ConfigAiModalRef} configType={configType} interfaceName={nowSearchInterfaceName} parentFormRef={formRef} />
</Modal>
</PageContainer>
);
};
export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser
}))(ANALYSISRULETable);

View File

@ -1412,11 +1412,11 @@ const adaptationIndex: React.FC<{ currentUser: CurrentUser }> = (props) => {
}) })
} }
}) })
console.log('list4', list);
setTableData(list) setTableData(list)
list.forEach((item: any) => {
list.forEach((item: any, index: number) => {
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
item.children.forEach((subItem: any) => { item.children.forEach((subItem: any, subIndex: number) => {
// 整个服务区的评分 // 整个服务区的评分
let allServerPartMarkObj: any = {} let allServerPartMarkObj: any = {}
if (subItem.children && subItem.children.length > 0) { if (subItem.children && subItem.children.length > 0) {
@ -1465,6 +1465,7 @@ const adaptationIndex: React.FC<{ currentUser: CurrentUser }> = (props) => {
subItem.allTypeNumber = subSum > 100 ? 100 : subSum subItem.allTypeNumber = subSum > 100 ? 100 : subSum
} }
subItem.level = 2 subItem.level = 2
subItem.index = `${index}-${subIndex}`
subItem = handleExplainObj(subItem) subItem = handleExplainObj(subItem)
}) })
} }
@ -1694,7 +1695,7 @@ const adaptationIndex: React.FC<{ currentUser: CurrentUser }> = (props) => {
search={{ span: 6 }} search={{ span: 6 }}
scroll={{ x: '100%', y: 'calc(100vh - 380px)' }} scroll={{ x: '100%', y: 'calc(100vh - 380px)' }}
rowKey={(record: any) => { rowKey={(record: any) => {
return `${record?.SPRegionTypeId}-${record?.ServerpartId}-${record?.ServerpartShopId}-${record?.BusinessProjectId}` return `${record?.SPRegionTypeId}-${record?.ServerpartId}-${record?.ServerpartShopId}-${record?.BusinessProjectId}-${record?.index}`
}} }}
loading={tableLoading} loading={tableLoading}
request={async (params) => { request={async (params) => {

View File

@ -626,14 +626,10 @@ const flatEffect: React.FC<{ currentUser: CurrentUser }> = (props) => {
} }
} }
console.log('params', params);
setSearchParams(params) setSearchParams(params)
const data = await handleGetASSETSPROFITSTreeList(req) const data = await handleGetASSETSPROFITSTreeList(req)
console.log('data', data);
let allDay: number = moment(moment(params?.End_DATE).endOf('month')).diff(moment(params?.Start_DATE).startOf('month'), 'day') + 1 let allDay: number = moment(moment(params?.End_DATE).endOf('month')).diff(moment(params?.Start_DATE).startOf('month'), 'day') + 1
console.log('allDay', allDay);
if (data && data.length > 0) { if (data && data.length > 0) {
// 导出的数据 // 导出的数据

View File

@ -115,7 +115,7 @@ const vehicleOwner: React.FC<{ currentUser: CurrentUser }> = (props) => {
}, },
}, },
fieldProps: { fieldProps: {
disabledDate: (current: any) => current && !(current > moment().startOf('year') && current < moment().endOf('day').add(-1, 'day')), // disabledDate: (current: any) => current && !(current > moment().startOf('year') && current < moment().endOf('day').add(-1, 'day')),
format: 'YYYY-MM', format: 'YYYY-MM',
picker: "month", picker: "month",
} }
@ -136,12 +136,6 @@ const vehicleOwner: React.FC<{ currentUser: CurrentUser }> = (props) => {
startTime: searchParams?.statisticsStartDate, startTime: searchParams?.statisticsStartDate,
endTime: searchParams?.statisticsEndDate endTime: searchParams?.statisticsEndDate
}) })
console.log('record', {
...record,
startTime: searchParams?.statisticsStartDate,
endTime: searchParams?.statisticsEndDate
});
setShowDetail(true) setShowDetail(true)
}}>{record?.ProvinceName || record?.ServerPartName || record?.SPRegionTypeNAME || ''}</a> : }}>{record?.ProvinceName || record?.ServerPartName || record?.SPRegionTypeNAME || ''}</a> :
<span>{record?.ProvinceName || record?.ServerPartName || record?.SPRegionTypeNAME || ''}</span> <span>{record?.ProvinceName || record?.ServerPartName || record?.SPRegionTypeNAME || ''}</span>

View File

@ -806,7 +806,20 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) =>
const list = data.data const list = data.data
console.log('selectedId', selectedId) console.log('selectedId', selectedId)
console.log('selectedArea', selectedArea) console.log('selectedArea', selectedArea)
console.log('list', list) let res: any = JSON.parse(JSON.stringify(data.data))
if (res && res.length > 0) {
res.forEach((item: any) => {
item.Serverpart_ID = null
item.Serverpart_Name = null
if (item.children && item.children.length > 0) {
item.children.forEach((subItem: any) => {
subItem.Serverpart_ID = null
subItem.Serverpart_Name = null
})
}
})
}
console.log('结果', res)
let isOneArea: boolean | null = null let isOneArea: boolean | null = null
let isOneService: boolean = false let isOneService: boolean = false

View File

@ -504,7 +504,6 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => {
SearchKeyValue: params?.SearchKeyValue || '' SearchKeyValue: params?.SearchKeyValue || ''
} }
const data = await handleGetGetTransactionCustomer(req) const data = await handleGetGetTransactionCustomer(req)
console.log('data', data)
let list: any = [] let list: any = []
if (data && data.length > 0) { if (data && data.length > 0) {
list = JSON.parse(JSON.stringify(data)) list = JSON.parse(JSON.stringify(data))
@ -548,8 +547,6 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => {
// AverageCommodity:getMoney(AverageCommoditySum), // AverageCommodity:getMoney(AverageCommoditySum),
// }) // })
} }
console.log('list', list)
let fieldData: any = [ let fieldData: any = [
"TicketCount", "TicketCount",
@ -560,8 +557,6 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => {
"AverageCommodity", "AverageCommodity",
] ]
let enumList: any = ["Business_Type", "ShopTrade"] let enumList: any = ["Business_Type", "ShopTrade"]
let newPrintData: any = formatTreeData(JSON.parse(JSON.stringify(list)), fieldData, enumList, [shopNamesList, SHOPTRADEObj], []) let newPrintData: any = formatTreeData(JSON.parse(JSON.stringify(list)), fieldData, enumList, [shopNamesList, SHOPTRADEObj], [])

View File

@ -5,15 +5,18 @@ import React, { useRef, useState } from "react";
import ProCard from "@ant-design/pro-card"; import ProCard from "@ant-design/pro-card";
import { MenuFoldOutlined } from "@ant-design/icons"; import { MenuFoldOutlined } from "@ant-design/icons";
import type { FormInstance } from "antd"; import type { FormInstance } from "antd";
import { Button, message, Space, Spin, Tree } from "antd"; import { Avatar, Button, Menu, message, Space, Spin, Tree } from "antd";
import useRequest from "@ahooksjs/use-request"; import useRequest from "@ahooksjs/use-request";
import { getServerpartTree } from "@/services/options"; import { getServerpartTree, getSPRegionShopTree, handleCallLogs } from "@/services/options";
import type { ActionType } from "@ant-design/pro-table"; import type { ActionType } from "@ant-design/pro-table";
import ProTable from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table";
import ReactHTMLTableToExcel from "react-html-table-to-excel"; import ReactHTMLTableToExcel from "react-html-table-to-excel";
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree"; import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
import PageTitleBox from "@/components/PageTitleBox"; import PageTitleBox from "@/components/PageTitleBox";
import moment from 'moment' import moment from 'moment'
import SubMenu from 'antd/lib/menu/SubMenu';
import { handleGetYsabnormalityReport } from "../spAbnormalReport/service";
import { formatTreeData } from "@/utils/format";
const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => { const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
@ -26,7 +29,11 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
const [collapsible, setCollapsible] = useState<boolean>(false) const [collapsible, setCollapsible] = useState<boolean>(false)
const [treeView, setTreeView] = useState<any>() const [treeView, setTreeView] = useState<any>()
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime()) const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
// 展开的行
const [expandedRowKeys, setExpandedRowKeys] = useState<any>([])
const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点
// 树相关的属性和方法
const [currenRegion, setCurrenRegion] = useState<any>(); // 当前选中左侧菜单的片区节点
// 树相关的属性和方法 // 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>() const [selectedId, setSelectedId] = useState<string>()
@ -37,6 +44,26 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
// 查询的条件 // 查询的条件
const [searchParams, setSearchParams] = useState<any>() const [searchParams, setSearchParams] = useState<any>()
// 加载服务区树
const { loading: treeLoading, data: any = [] } = useRequest(async () => {
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
let list: any = []
data.forEach((item: any) => {
// 判断 item这一层已经是片区了 如果item.children 只有一个的话 那就说明 也只有一个服务区 那么就可以判断不显示全部和片区的树形选择层了
if (item.children && item.children.length === 1) {
list.push(item.children[0])
} else {
if (item.value !== 424 && item.value !== 586) {
list.push(item)
}
}
})
console.log('listlistlist', list)
setTreeView(list)
return list
})
const columns: any = [ const columns: any = [
{ {
title: '统计时间', title: '统计时间',
@ -44,202 +71,168 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
valueType: 'dateRange', valueType: 'dateRange',
hideInTable: true, hideInTable: true,
hideInDescriptions: true, hideInDescriptions: true,
initialValue: [moment().subtract(1, 'month'), moment()], initialValue: [moment().subtract(7, 'days'), moment().add(-1, 'day')],
search: { search: {
transform: (value: any) => { transform: (value) => {
return { return {
StartDate: value[0], startDate: value[0],
EndDate: value[1], endDate: value[1],
}; };
}, },
}, },
fieldProps: {
disabledDate: (current: any) => current && current > moment().endOf('day')
}
}, },
{ {
title: "序号", title: '服务区信息',
dataIndex: "index", dataIndex: '',
align: 'center',
valueType: "index",
width: 80,
ellipsis: true
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'center',
hideInSearch: true, hideInSearch: true,
width: 150, children: [
{
title: '序号',
width: 120,
align: 'center',
dataIndex: 'index',
valueType: "index"
},
{
title: '服务区名称',
width: 200,
ellipsis: true, ellipsis: true,
align: 'center',
dataIndex: 'Name',
}, },
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120, width: 120,
ellipsis: true, align: 'right',
dataIndex: 'EXCEPTIONTYPE',
},
]
}, },
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: '稽核必查',
dataIndex: "", dataIndex: 'EXCEPTIONTYPEA',
align: 'center',
hideInSearch: true, hideInSearch: true,
ellipsis: true,
children: [ children: [
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120, width: 120,
ellipsis: true, align: 'right',
dataIndex: 'EXCEPTIONTYPE_B',
}, },
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120, width: 120,
ellipsis: true, align: 'right',
dataIndex: 'EXCEPTIONTYPE_C',
}, },
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120, width: 120,
ellipsis: true, align: 'right',
dataIndex: 'EXCEPTIONTYPE_Z',
}, },
{ {
title: <div style={{ textAlign: 'center' }}>退</div>, title: <div style={{ textAlign: 'center' }}>退</div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120, width: 120,
ellipsis: true, align: 'right',
dataIndex: 'EXCEPTIONTYPE_F',
}, },
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120, width: 120,
ellipsis: true, align: 'right',
dataIndex: 'EXCEPTIONTYPE_G',
}, },
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 150, width: 150,
ellipsis: true, align: 'right',
dataIndex: 'EXCEPTIONTYPE_L',
}, },
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 150, width: 150,
ellipsis: true, align: 'right',
dataIndex: 'EXCEPTIONTYPE_M',
}, },
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 170, width: 170,
ellipsis: true, align: 'right',
dataIndex: 'EXCEPTIONTYPE_R',
}, },
{ {
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "", width: 100,
align: 'right', align: 'right',
hideInSearch: true, dataIndex: 'TotalMust',
width: 120,
ellipsis: true,
},
]
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'center',
hideInSearch: true,
ellipsis: true,
children: [
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120,
ellipsis: true,
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120,
ellipsis: true,
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 150,
ellipsis: true,
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 150,
ellipsis: true,
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120,
ellipsis: true,
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120,
ellipsis: true,
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120,
ellipsis: true,
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120,
ellipsis: true,
},
{
title: <div style={{ textAlign: 'center' }}></div>,
dataIndex: "",
align: 'right',
hideInSearch: true,
width: 120,
ellipsis: true,
} }
] ]
}, },
{
title: '稽核抽查',
dataIndex: 'EXCEPTIONTYPEB',
hideInSearch: true,
children: [
{
title: <div style={{ textAlign: 'center' }}></div>,
width: 120,
align: 'right',
dataIndex: 'EXCEPTIONTYPE_A',
},
{
title: <div style={{ textAlign: 'center' }}></div>,
width: 120,
align: 'right',
dataIndex: 'EXCEPTIONTYPE_H',
},
{
title: <div style={{ textAlign: 'center' }}></div>,
width: 150,
align: 'right',
dataIndex: 'EXCEPTIONTYPE_I',
},
{
title: <div style={{ textAlign: 'center' }}></div>,
width: 150,
align: 'right',
dataIndex: 'EXCEPTIONTYPE_J',
},
{
title: <div style={{ textAlign: 'center' }}></div>,
width: 120,
align: 'right',
dataIndex: 'EXCEPTIONTYPE_N',
},
{
title: <div style={{ textAlign: 'center' }}></div>,
width: 120,
align: 'right',
dataIndex: 'EXCEPTIONTYPE_O',
},
{
title: <div style={{ textAlign: 'center' }}></div>,
width: 120,
align: 'right',
dataIndex: 'EXCEPTIONTYPE_P',
},
{
title: <div style={{ textAlign: 'center' }}></div>,
width: 120,
align: 'right',
dataIndex: 'EXCEPTIONTYPE_Q',
},
{
title: <div style={{ textAlign: 'center' }}></div>,
width: 100,
align: 'right',
dataIndex: 'TotalMay',
},
]
}
] ]
const exportTable = (e) => { const exportTable = (e) => {
@ -264,7 +257,102 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
tempTable.remove() // 防止重复打印一个内容 tempTable.remove() // 防止重复打印一个内容
} }
// 根据左侧选中的菜单加载右侧数据
const loadSelectedId = (item?: any) => {
// 选中的子菜单key
const [type, value] = item.key.split('-')
console.log('[type, value]', [type, value]);
if (type === '1') {
setCurrenMenu(value)
setSelectedId(value)
setCurrenRegion('')
} else {
setCurrenRegion(value)
setSelectedId('')
setCurrenMenu('')
}
actionRef?.current?.reload()
}
// 生成左侧菜单
const getMenuDom = (data: any[], callback: (item: any) => void) => {
return (data.map((element: any) => {
if (element) {
// 绑定当前节点的子集
if (element.children && element.children.length > 0) {
return (
<SubMenu title={element.desc !== '0' ? <><span>{element.label}</span>
{/* <span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px', color: 'red' }}>
[{element.desc}]</span> */}
</> : element.label}
icon={element.ico ? <Avatar src={element.ico} size={16} style={{ marginRight: 4 }} shape="square" /> : null}
key={`${element.key || element.value}`}
onTitleClick={(item) => {
// 选中一级菜单
if (!currenMenu || item.key !== `${currenMenu?.key}`) {
callback.call(callback, item)
}
item.domEvent.stopPropagation();
}}
>
{element.children && element.children.length > 0 && getMenuDom(element.children, callback)}
</SubMenu>
)
}
// 绑定嵌套树的子节点
if (element.children && element.children.length > 0) {
return (
<SubMenu title={element.label}
icon={element.ico ? <Avatar src={element.node.ico} size={16} style={{ marginRight: 4 }} shape="square" /> : null}
key={`${element.key || element.value}`}
onTitleClick={(item) => {
// 选中一级菜单
if (!currenMenu || item.key !== `${currenMenu?.key}`) {
callback.call(callback, item)
}
item.domEvent.stopPropagation();
}}
>
{element.children && element.children.length > 0 && getMenuDom(element.children, callback)}
</SubMenu>
)
}
return (<Menu.Item icon={element.ico ? <Avatar src={element.ico} size={16} shape="square" /> : null}
key={`${element.key || element.value}`}>
{element.desc !== '0' ? <><span>{element.label}</span>
{/* <span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px', color: 'red' }}>
[{element.desc}]</span> */}
</> : element.label}</Menu.Item>)
}
// 绑定嵌套树的子节点
if (element.children && element.children.length > 0) {
return (
<SubMenu title={element.desc !== '0' ? <><span>{element.label}</span>
{/* <span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px', color: 'red' }}>
[{element.desc}]</span> */}
</> : element.label}
icon={element.ico ? <Avatar src={element.ico} size={16} style={{ marginRight: 4 }} shape="square" /> : null}
key={`${element.key || element.value}`}
onTitleClick={(item) => {
// 选中一级菜单
if (!currenMenu || item.key !== `${currenMenu?.key}`) {
callback.call(callback, item)
}
item.domEvent.stopPropagation();
}}
>
{element.children && element.children.length > 0 && getMenuDom(element.children, callback)}
</SubMenu>
)
}
return (<Menu.Item icon={element.ico ? <Avatar src={element.ico} size={16} shape="square" /> : null}
key={`${element.key || element.value}`}>{element.desc !== '0' ? <><span>{element.label}</span>
{/* <span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px', color: 'red' }}>
[{element.desc}]</span> */}
</> : element.label}</Menu.Item>)
}))
}
return ( return (
<div ref={(el) => { <div ref={(el) => {
// 打印报表 // 打印报表
@ -317,7 +405,28 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} /> <div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
<div style={{ backgroundColor: '#fff', display: 'flex' }}> <div style={{ backgroundColor: '#fff', display: 'flex' }}>
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} /> <ProCard
className="pageTable-leftnav"
style={{ width: !collapsible ? "300px" : "60px" }}
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? "300px" : "60px" }}
colSpan={!collapsible ? "300px" : "60px"}
extra={<MenuFoldOutlined onClick={() => { setCollapsible(!collapsible) }} />}
colSpan={!collapsible ? "300px" : "60px"}
title={!collapsible ? "请选择服务区" : ""}
headerBordered
collapsed={collapsible}
>
{!treeLoading && <Menu
mode="inline"
style={{ height: 'calc(100vh - 220px)', overflowY: 'auto', overflowX: 'hidden' }}
selectedKeys={`1-${selectedId}`}
onSelect={(item, key, keyPath, selectedKeys, domEvent) => {
loadSelectedId(item)
}}
>
{getMenuDom(treeView, loadSelectedId)}
</Menu>}
</ProCard>
<div style={{ <div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)', width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0, paddingTop: 0,
@ -328,9 +437,11 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
actionRef={actionRef} actionRef={actionRef}
formRef={formRef} formRef={formRef}
columns={columns} columns={columns}
rowKey={(record) => record?.Id + record?.Name}
bordered bordered
expandable={{ expandable={{
expandRowByClick: true expandRowByClick: true,
expandedRowKeys: expandedRowKeys
}} }}
scroll={{ x: "100%", y: "calc(100vh - 410px)" }} scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头 headerTitle={<PageTitleBox props={props} />} // 列表表头
@ -339,8 +450,61 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
if (!selectedId) { if (!selectedId) {
return return
} }
const req = {
...params,
ServerpartIds: selectedId,
ShowShop: true
}
handleCallLogs()
setSearchParams(params) setSearchParams(params)
const data = await handleGetYsabnormalityReport(req)
console.log('data', data)
if (data && data.length > 0) {
let res: any = []
const list: any = JSON.parse(JSON.stringify(data))
list.forEach((item: any, index: number) => {
item.index = index + 1
if (item.children && item.children.length > 0) {
item.children.forEach((subItem: any, subIndex: number) => {
subItem.index = subIndex + 1
if (subItem.children && subItem.children.length > 0) {
subItem.children.forEach((thirdItem: any, thirdIndex: number) => {
thirdItem.index = thirdIndex + 1
res.push(thirdItem)
})
}
})
}
})
let fieldData: any = [
"EXCEPTIONTYPE",
"EXCEPTIONTYPE_B",
"EXCEPTIONTYPE_C",
"EXCEPTIONTYPE_Z",
"EXCEPTIONTYPE_F",
"EXCEPTIONTYPE_G",
"EXCEPTIONTYPE_L",
"EXCEPTIONTYPE_M",
"EXCEPTIONTYPE_R",
"TotalMust",
"EXCEPTIONTYPE_A",
"EXCEPTIONTYPE_H",
"EXCEPTIONTYPE_I",
"EXCEPTIONTYPE_J",
"EXCEPTIONTYPE_N",
"EXCEPTIONTYPE_O",
"EXCEPTIONTYPE_P",
"EXCEPTIONTYPE_Q",
"TotalMay",
]
let enumList: any = []
let newPrintData: any = formatTreeData(JSON.parse(JSON.stringify(res)), fieldData, enumList, [], [])
setReqDetailList(newPrintData)
setExpandedRowKeys([`${res[0].Id}${res[0].Name}`])
return { data: res, success: true }
}
return { data: [], success: true }
}} }}
toolbar={{ toolbar={{
actions: [ actions: [

View File

@ -344,7 +344,6 @@ const spAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
/> : ''} /> : ''}
</ProCard> */} </ProCard> */}
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} /> <LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
<div style={{ <div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)', width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0, paddingTop: 0,

View File

@ -1,3 +1,4 @@
// 分账收银收入确认表
import React, { useRef } from "react"; import React, { useRef } from "react";
import type { CurrentUser } from "umi"; import type { CurrentUser } from "umi";
import { connect } from "umi"; import { connect } from "umi";
@ -385,7 +386,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
} else { } else {
obj.endTime = endDate obj.endTime = endDate
} }
console.log('obj', obj)
setCompareCurrent(obj) setCompareCurrent(obj)
setShowCompareDrawer(true) setShowCompareDrawer(true)
}}>{numeral(record?.REVENUEDAILY_AMOUNTTotal).format('0,0.00')}</a> : <span>{numeral(record?.REVENUEDAILY_AMOUNTTotal).format('0,0.00')}</span> }}>{numeral(record?.REVENUEDAILY_AMOUNTTotal).format('0,0.00')}</a> : <span>{numeral(record?.REVENUEDAILY_AMOUNTTotal).format('0,0.00')}</span>
@ -994,7 +994,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
container.appendChild(tempTable); // 把创建的节点添加到页面容器中 container.appendChild(tempTable); // 把创建的节点添加到页面容器中
setShowLoading(false) setShowLoading(false)
console.log('downloadBtnRef', downloadBtnRef);
downloadBtnRef.current.handleDownload(); downloadBtnRef.current.handleDownload();
setShowExportTable(false) setShowExportTable(false)
@ -1009,15 +1008,12 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
// compareList组件跳转月份的方法 // compareList组件跳转月份的方法
const handleGetNewMonth = async (obj: any, time: any) => { const handleGetNewMonth = async (obj: any, time: any) => {
setShowCompareDrawer(false) setShowCompareDrawer(false)
console.log('obj', obj);
console.log('time', time);
const req = { const req = {
BusinessProjectId: obj?.BUSINESSPROJECT_ID, BusinessProjectId: obj?.BUSINESSPROJECT_ID,
StatisticsMonth: moment(time).format('YYYYMM'), StatisticsMonth: moment(time).format('YYYYMM'),
ShopRoyaltyId: obj?.ShopRoyaltyId, ShopRoyaltyId: obj?.ShopRoyaltyId,
} }
const data = await handleGetProjectPeriodIncome(req) const data = await handleGetProjectPeriodIncome(req)
console.log('data', data);
if (data && data.length > 0) { if (data && data.length > 0) {
let obj: any = {} let obj: any = {}
data.forEach((item: any) => { data.forEach((item: any) => {
@ -1128,7 +1124,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
const selectedIds = info.checkedNodes.filter(n => n?.type === 1) const selectedIds = info.checkedNodes.filter(n => n?.type === 1)
const selectedAreaIds = info.checkedNodes.filter(n => n?.type === 0) const selectedAreaIds = info.checkedNodes.filter(n => n?.type === 0)
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '') setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
console.log('selectedAreaIds', selectedAreaIds.map(n => n?.value)?.toString() || '');
setSelectAreaId(selectedAreaIds.map(n => n?.value)?.toString() || '') setSelectAreaId(selectedAreaIds.map(n => n?.value)?.toString() || '')
// actionRef?.current?.reload() // actionRef?.current?.reload()
// getData(selectedIds.map(n => n?.value)?.toString() || '') // getData(selectedIds.map(n => n?.value)?.toString() || '')
@ -1172,7 +1167,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
setExportDate(`${y}${m < 10 ? `0${m}` : m}`) setExportDate(`${y}${m < 10 ? `0${m}` : m}`)
setMonthTime(params.MonthDate) setMonthTime(params.MonthDate)
} }
console.log('params', params);
setSearchParams(params) setSearchParams(params)
// let SETTLEMENT_MODESSTR: string = '' // let SETTLEMENT_MODESSTR: string = ''
@ -1195,7 +1189,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
if (selectedId.indexOf(',') === -1) { if (selectedId.indexOf(',') === -1) {
isOneServerPart = true isOneServerPart = true
} }
console.log('selectedAreaId', selectedAreaId);
if (selectedAreaId && selectedAreaId.indexOf(',') === -1) { if (selectedAreaId && selectedAreaId.indexOf(',') === -1) {
isOneArea = true isOneArea = true
@ -1212,7 +1205,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
ShowHisProject: params?.ShowHisProject === 'true' ? true : params?.ShowHisProject === 'false' ? false : '' ShowHisProject: params?.ShowHisProject === 'true' ? true : params?.ShowHisProject === 'false' ? false : ''
} }
const res = await handleGetTableRevenueRecognitionOtherData(req) const res = await handleGetTableRevenueRecognitionOtherData(req)
console.log('res', res)
setOtherData(res.OtherData) setOtherData(res.OtherData)
const data = res.List const data = res.List
setDefaultTableData(data) setDefaultTableData(data)
@ -1225,7 +1217,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
PageSize: 999999 PageSize: 999999
}) })
console.log('taxRate', taxRate);
const taxRateObj: any = {} const taxRateObj: any = {}
if (taxRate && taxRate.length > 0) { if (taxRate && taxRate.length > 0) {
taxRate.forEach((item: any) => { taxRate.forEach((item: any) => {
@ -1233,8 +1224,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
}) })
} }
const list: any = JSON.parse(JSON.stringify(wrapTreeNode(data))) const list: any = JSON.parse(JSON.stringify(wrapTreeNode(data)))
console.log('list', list);
console.log('taxRateObj', taxRateObj);
// 下面处理的各种东西太多了 把判断税率是否正确 放在上面 多遍历一遍 // 下面处理的各种东西太多了 把判断税率是否正确 放在上面 多遍历一遍
list.forEach((item: any) => { list.forEach((item: any) => {
@ -1320,7 +1309,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
} }
}) })
} }
console.log('exportList', exportList);
if (exportList && exportList.length > 0) { if (exportList && exportList.length > 0) {
const exportRes: any = JSON.parse(JSON.stringify(exportList)) const exportRes: any = JSON.parse(JSON.stringify(exportList))
// 期收入 // 期收入
@ -1378,19 +1366,11 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
DiffRevenueAmount: handleHighPrecision(DiffRevenueAmountSum), DiffRevenueAmount: handleHighPrecision(DiffRevenueAmountSum),
MonthlyIncome: handleHighPrecision(MonthlyIncomeSum) MonthlyIncome: handleHighPrecision(MonthlyIncomeSum)
}) })
console.log('exportRes', exportRes);
setExportTableData(exportRes) setExportTableData(exportRes)
} else { } else {
setExportTableData([]) setExportTableData([])
} }
console.log('isOneServerPart', isOneServerPart);
console.log('isOneArea', isOneArea);
const res: any = [] const res: any = []
if (isOneServerPart) { if (isOneServerPart) {
list.forEach((item: any) => { list.forEach((item: any) => {
@ -1400,12 +1380,9 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
}) })
} }
}) })
console.log('setExportTableData1', res);
return { data: res, success: true } return { data: res, success: true }
} }
if (!isOneArea) { if (!isOneArea) {
console.log('list', list);
if (list && list.length > 0) { if (list && list.length > 0) {
// 期收入 // 期收入
let MINTURNOVERSUM: number = 0 let MINTURNOVERSUM: number = 0
@ -1452,7 +1429,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => {
DailyRevenueAmount: handleHighPrecision(DailyRevenueAmountSum), DailyRevenueAmount: handleHighPrecision(DailyRevenueAmountSum),
DiffRevenueAmount: handleHighPrecision(DiffRevenueAmountSum) DiffRevenueAmount: handleHighPrecision(DiffRevenueAmountSum)
}) })
console.log('setExportTableData2', list);
return { data: list, success: true } return { data: list, success: true }
} }
} }

View File

@ -1,3 +1,4 @@
// 银行到账核对
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import moment from 'moment'; import moment from 'moment';
import numeral from 'numeral'; import numeral from 'numeral';
@ -358,7 +359,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
const isRed: boolean = (record?.MobilePay_Price > record?.Ticket_Price) && statisticsSame const isRed: boolean = (record?.MobilePay_Price > record?.Ticket_Price) && statisticsSame
// return isRed?<a style={{color:'red',cursor:'pointer'}} onClick={()=>{ // return isRed?<a style={{color:'red',cursor:'pointer'}} onClick={()=>{
// if (record?.ServerpartShop_Name && !record?.ServerpartShop_Code){ // if (record?.ServerpartShop_Name && !record?.ServerpartShop_Code){
// console.log('record',record)
// setCurrentRow(record) // setCurrentRow(record)
// setChangeRevenueDrawer(true) // setChangeRevenueDrawer(true)
// } // }
@ -368,12 +368,10 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
// {/* {record?.RoyaltyProject_Price ? numeral(record.RoyaltyProject_Price).format('0,0.00') : '-'} */} // {/* {record?.RoyaltyProject_Price ? numeral(record.RoyaltyProject_Price).format('0,0.00') : '-'} */}
// </a>:<span onClick={()=>{ // </a>:<span onClick={()=>{
// //
// console.log('statisticsSame',statisticsSame)
// }}> // }}>
// {record?.RoyaltyProject_Price ? numeral(record.RoyaltyProject_Price).format('0,0.00') : '-'} // {record?.RoyaltyProject_Price ? numeral(record.RoyaltyProject_Price).format('0,0.00') : '-'}
// </span> // </span>
return <span onClick={() => { return <span onClick={() => {
console.log('statisticsSame', statisticsSame)
}}> }}>
{record?.RoyaltyProject_Price ? numeral(record.RoyaltyProject_Price).format('0,0.00') : '-'} {record?.RoyaltyProject_Price ? numeral(record.RoyaltyProject_Price).format('0,0.00') : '-'}
</span> </span>
@ -389,9 +387,7 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
const isRed: boolean = (record?.MobilePay_Price > record?.Ticket_Price) && statisticsSame const isRed: boolean = (record?.MobilePay_Price > record?.Ticket_Price) && statisticsSame
return isRed ? <Tooltip title={`本地流水(${record?.MobilePay_Price || 0}) > 上游流水(${record?.Ticket_Price || 0})`}> return isRed ? <Tooltip title={`本地流水(${record?.MobilePay_Price || 0}) > 上游流水(${record?.Ticket_Price || 0})`}>
<a style={{ color: 'red', cursor: 'pointer' }} onClick={async () => { <a style={{ color: 'red', cursor: 'pointer' }} onClick={async () => {
console.log('record', record);
if (record?.ServerpartShop_Name && !record?.ServerpartShop_Code) { if (record?.ServerpartShop_Name && !record?.ServerpartShop_Code) {
console.log('record', record)
setCurrentRow(record) setCurrentRow(record)
setChangeRevenueDrawer(true) setChangeRevenueDrawer(true)
} else if (record?.ServerpartShop_Name && record?.ServerpartShop_Code) { } else if (record?.ServerpartShop_Name && record?.ServerpartShop_Code) {
@ -466,16 +462,12 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
onClick={() => { onClick={() => {
// setCurrentRow(record) // setCurrentRow(record)
// setFlowDrawer(true) // setFlowDrawer(true)
console.log('record', record)
const res = JSON.parse(JSON.stringify(record)) const res = JSON.parse(JSON.stringify(record))
console.log('statisticsTime', statisticsTime);
console.log('searchParams', searchParams);
const time = searchParams?.EndDate const time = searchParams?.EndDate
res.Statistics_Date = moment(time).format('YYYY-MM-DD') res.Statistics_Date = moment(time).format('YYYY-MM-DD')
res.BusinessProject_Id = record.BusinessProject_ID res.BusinessProject_Id = record.BusinessProject_ID
res.ServerpartShop_ID = record.newServerpartShop_ID res.ServerpartShop_ID = record.newServerpartShop_ID
res.Serverpart_Name = record.newServerpart_Name res.Serverpart_Name = record.newServerpart_Name
console.log('res', res)
setCurrentRow(res); setCurrentRow(res);
setHaveFlowDrawer(true); setHaveFlowDrawer(true);
}}> }}>
@ -522,11 +514,8 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
return <span style={{ color: num > 0 ? '#60cf60' : num < 0 ? 'red' : '', cursor: (record?.ServerpartShop_Code && record?.Ticket_Price - record?.MobilePay_Price !== 0) || (record?.index && record?.index.indexOf('.') !== -1 && record?.Ticket_Price - record?.MobilePay_Price !== 0) ? 'pointer' : '' }} onClick={async () => { return <span style={{ color: num > 0 ? '#60cf60' : num < 0 ? 'red' : '', cursor: (record?.ServerpartShop_Code && record?.Ticket_Price - record?.MobilePay_Price !== 0) || (record?.index && record?.index.indexOf('.') !== -1 && record?.Ticket_Price - record?.MobilePay_Price !== 0) ? 'pointer' : '' }} onClick={async () => {
if (record?.index && record?.index.indexOf('.') !== -1 && record?.Ticket_Price - record?.MobilePay_Price !== 0) { if (record?.index && record?.index.indexOf('.') !== -1 && record?.Ticket_Price - record?.MobilePay_Price !== 0) {
const res: any = formRef.current?.getFieldsValue() const res: any = formRef.current?.getFieldsValue()
console.log('res', res);
const [start, end] = res.search_date const [start, end] = res.search_date
if (moment(start._d).format('YYYY-MM-DD') === moment(end._d).format('YYYY-MM-DD')) { if (moment(start._d).format('YYYY-MM-DD') === moment(end._d).format('YYYY-MM-DD')) {
console.log('1', moment(start._d).format('YYYY-MM-DD'));
console.log('2', moment(end._d).format('YYYY-MM-DD'));
setCurrentRow(record) setCurrentRow(record)
setDifferenceDrawer(true) setDifferenceDrawer(true)
} }
@ -655,7 +644,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
const isRed: boolean = (record?.MobilePay_Price > record?.Ticket_Price) const isRed: boolean = (record?.MobilePay_Price > record?.Ticket_Price)
return isRed ? <a style={{ color: 'red', cursor: 'pointer' }} onClick={() => { return isRed ? <a style={{ color: 'red', cursor: 'pointer' }} onClick={() => {
if (record?.ServerpartShop_Name && !record?.ServerpartShop_Code) { if (record?.ServerpartShop_Name && !record?.ServerpartShop_Code) {
console.log('record', record)
setCurrentRow(record) setCurrentRow(record)
setChangeRevenueDrawer(true) setChangeRevenueDrawer(true)
} }
@ -1157,13 +1145,11 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
} else { } else {
desc = `${currentUser?.Name}${moment().format('YYYY-MM-DD')}】:\n${allNewDesc}` desc = `${currentUser?.Name}${moment().format('YYYY-MM-DD')}】:\n${allNewDesc}`
} }
console.log('desc', desc)
const req = { const req = {
...changeRevenueTopData, ...changeRevenueTopData,
BUSINESSPROJECTSPLIT_DESC: desc || '', BUSINESSPROJECTSPLIT_DESC: desc || '',
SETTLEMENT_STATE: 1 SETTLEMENT_STATE: 1
} }
console.log('req', req)
const data = await SynchroBUSINESSPROJECTSPLIT(req) const data = await SynchroBUSINESSPROJECTSPLIT(req)
const list: any = [] const list: any = []
@ -1173,11 +1159,9 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
list.push(item) list.push(item)
}) })
} }
console.log('list', list)
const revenueReq = list const revenueReq = list
const revenueData = await SynchroREVENUEDAILYSPLIT(revenueReq) const revenueData = await SynchroREVENUEDAILYSPLIT(revenueReq)
console.log('revenueData', revenueData)
if (data.Result_Code === 100) { if (data.Result_Code === 100) {
message.success(data.Result_Desc) message.success(data.Result_Desc)
} else { } else {
@ -1469,8 +1453,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
<RangePicker <RangePicker
value={statisticsTime} value={statisticsTime}
onChange={(e: any) => { onChange={(e: any) => {
console.log('e', e);
if (e) { if (e) {
setStatisticsTime([moment(e[0]._d), moment(e[1]._d)]) setStatisticsTime([moment(e[0]._d), moment(e[1]._d)])
formRef.current?.setFieldsValue({ search_date: [moment(e[0]._d), moment(e[1]._d)] }) formRef.current?.setFieldsValue({ search_date: [moment(e[0]._d), moment(e[1]._d)] })
@ -1504,21 +1486,14 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
// 统计时间 // 统计时间
setExportTableData([]) setExportTableData([])
const formRes: any = formRef.current?.getFieldsValue() const formRes: any = formRef.current?.getFieldsValue()
console.log('formRes', formRes);
let [searchStartTime, searchEndTime]: any = activeKey === '1' ? formRes?.search_date : formRes?.search_months let [searchStartTime, searchEndTime]: any = activeKey === '1' ? formRes?.search_date : formRes?.search_months
console.log('searchStartTime', searchStartTime);
console.log('searchEndTime', searchEndTime);
if (searchStartTime === searchEndTime) { if (searchStartTime === searchEndTime) {
setStatisticsSame(true) setStatisticsSame(true)
} else { } else {
setStatisticsSame(false) setStatisticsSame(false)
} }
console.log('activeKey', activeKey);
console.log('params', params);
if (params && searchStartTime && searchEndTime) { if (params && searchStartTime && searchEndTime) {
setBigSearchTime([searchStartTime, searchEndTime]) setBigSearchTime([searchStartTime, searchEndTime])
@ -1541,10 +1516,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
searchEndTime = moment(time[1]).endOf('M').format('YYYY-MM-DD') searchEndTime = moment(time[1]).endOf('M').format('YYYY-MM-DD')
} }
} }
console.log('compareCurrent', compareCurrent);
console.log('isComponents', isComponents);
console.log('searchEndTime', searchEndTime);
console.log('searchStartTime', searchStartTime);
const req: any = { const req: any = {
DataType: 1, DataType: 1,
StartDate: isComponents ? compareCurrent?.searchStart : searchStartTime, StartDate: isComponents ? compareCurrent?.searchStart : searchStartTime,
@ -1555,7 +1526,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
} }
setSearchParams(req) setSearchParams(req)
const data = await getMobilePayRoyaltyReport(req); const data = await getMobilePayRoyaltyReport(req);
console.log('data', data);
// 给最里层的门店加一个标识 // 给最里层的门店加一个标识
data.data.forEach((item: any) => { data.data.forEach((item: any) => {
@ -1608,7 +1578,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
setNoShopList([]) setNoShopList([])
} }
const res = JSON.parse(JSON.stringify(data.data)) const res = JSON.parse(JSON.stringify(data.data))
console.log('1', res);
if (res && res.length > 0) { if (res && res.length > 0) {
const reduceData = res.reduce((p: { const reduceData = res.reduce((p: {
Ticket_Price: number, Account_Price: number, SubRoyalty_Price: number, Ticket_Fee: number, Ticket_Price: number, Account_Price: number, SubRoyalty_Price: number, Ticket_Fee: number,
@ -1646,7 +1615,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
setTableDiffDays(undefined) setTableDiffDays(undefined)
} }
} }
console.log('232131321', data)
if (data.data && data.data.length > 0) { if (data.data && data.data.length > 0) {
const exportList: any = [] const exportList: any = []
const exportData: any = JSON.parse(JSON.stringify(data.data)) const exportData: any = JSON.parse(JSON.stringify(data.data))
@ -1664,7 +1632,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
}) })
} }
}) })
console.log('exportList', exportList);
setExportTableData(exportList) setExportTableData(exportList)
} }
@ -2218,7 +2185,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean,
bodyStyle={{ backgroundColor: "#fff", padding: 16 }} bodyStyle={{ backgroundColor: "#fff", padding: 16 }}
footer={<div style={{ width: '100%', display: 'flex', justifyContent: 'flex-end' }}> footer={<div style={{ width: '100%', display: 'flex', justifyContent: 'flex-end' }}>
<Button type={'primary'} onClick={() => { <Button type={'primary'} onClick={() => {
console.log('drawerShopDataList', drawerShopDataList)
handleGetChangeRevenue() handleGetChangeRevenue()
}}></Button> }}></Button>
</div>} </div>}