diff --git a/config/routes.ts b/config/routes.ts index 7de1ba8..90297a9 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -1365,6 +1365,11 @@ export default [ name: 'semanticParsingRulesConfig', component: './Setting/semanticParsingRulesConfig/index', }, + { + path: '/setting/NewSemanticParsingRulesConfig', + name: 'NewSemanticParsingRulesConfig', + component: './Setting/NewSemanticParsingRulesConfig/index', + }, { path: '/setting/semanticAnswerConfig', name: 'semanticAnswerConfig', diff --git a/src/pages/Setting/NewSemanticParsingRulesConfig/index.tsx b/src/pages/Setting/NewSemanticParsingRulesConfig/index.tsx new file mode 100644 index 0000000..d5f66ad --- /dev/null +++ b/src/pages/Setting/NewSemanticParsingRulesConfig/index.tsx @@ -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(); + const formRef = useRef(); + const SelectInterfaceRef = useRef(); + const ConfigAiModalRef = useRef(); + const [currentRow, setCurrentRow] = useState(); + const [showDetail, setShowDetail] = useState(); + const [modalVisible, handleModalVisible] = useState(); + const [confirmLoading, handleConfirmLoading] = useState(false) // 弹出框的内容表单是否在提交 + const [searchParams, setSearchParams] = useState(); + + // 弹出框拖动效果 + const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置 + const [disabled, setDraggleDisabled] = useState() // 是否拖动 + const draggleRef = React.createRef() + // 展示通用接口的悬浮框 + const [showSelectInterfaceModal, setShowSelectInterfaceModal] = useState() + // 选择系统接口悬浮框的确定加载效果 + const [selectModalLoading, setSelectModalLoading] = useState(false) + + const [columnsStateMap, setColumnsStateMap] = useState({ + 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(false) + // 配置ai的loading + const [configAiLoading, setConfigAiLoading] = useState(false) + // 配置的类型 1 入参 2出参 + const [configType, setConfigType] = useState(0) + // 现在查看的接口名字 + const [nowSearchInterfaceName, setNowSearchInterfaceName] = useState('') + + 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[] = [ + { + 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 ( + + { + setCurrentRow(record); + setShowDetail(true); + }} + > + 查看 + + { + setCurrentRow(record); + handleModalVisible(true); + }} + > + 编辑 + + { + const sucesse = await handelDelete(record.ANALYSISRULE_ID); + if (sucesse && actionRef.current) { + actionRef.current.reload(); + } + }} + > + 删除 + + + ); + }, + }, + ]; + + return ( + + + 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: [ + // 新增按钮 + , + ], + }} + pagination={{ pageSize: 20 }} + columnsState={{ + value: columnsStateMap, + onChange: setColumnsStateMap, + }} + /> + { + setCurrentRow(undefined); + setShowDetail(false); + }} + closable={false} + > + {currentRow?.ANALYSISRULE_ID && ( + + column={2} + request={async () => ({ + data: currentRow || {}, + })} + params={{ + id: currentRow?.ANALYSISRULE_ID, + }} + columns={columns as ProDescriptionsItemProps[]} + /> + )} + + { + // if (disabled) { + // setDraggleDisabled(false) + // } + // }} + // onMouseOut={() => { + // setDraggleDisabled(true) + // }} + + // onFocus={() => { }} + // onBlur={() => { }} + // > + + // + } + 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 onDraggaleStart(event, uiData)} + // > + //
{modal}
+ //
+ // }} + > + + 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) + } + }} + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {/* + + + + + */} + + + + + + + + + + + {/* ProFormDatePicker */} + + + + {/* ProFormDatePicker */} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + { + 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) + }} + > + + + + + { + 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('') + }) + }} + > + + +
+ ); +}; +export default connect(({ user }: ConnectState) => ({ + currentUser: user.currentUser +}))(ANALYSISRULETable); diff --git a/src/pages/Setting/semanticParsingRulesConfig/components/tableData.js b/src/pages/Setting/semanticParsingRulesConfig/components/tableData.js index 33b7d58..e0d3b8a 100644 --- a/src/pages/Setting/semanticParsingRulesConfig/components/tableData.js +++ b/src/pages/Setting/semanticParsingRulesConfig/components/tableData.js @@ -3373,393 +3373,1767 @@ export default { "http://localhost:8002/api/revenue/query/": { req: [ { - "title": "SERVERPART_ID", + "title": "pushProvinceCode", "dataType": "string", - "content": "服务区内码", + "content": "省份编码", "isRequired": true }, { - "title": "STATISTICS_DATE_START", + "title": "StatisticsStartMonth", "dataType": "string", - "content": "开始统计时间", - "isRequired": false + "content": "统计开始月份", + "isRequired": true }, { - "title": "STATISTICS_DATE_END", + "title": "StatisticsEndMonth", "dataType": "string", - "content": "结束统计时间", + "content": "统计结束月份", + "isRequired": true + }, + { + "title": "ServerpartId", + "dataType": "string", + "content": "服务区内码,多个用,隔开", "isRequired": false }, { - "title": "PageIndex", - "dataType": "Integer", - "content": "页码,从1开始", + "title": "businessRegion", + "dataType": "integer", + "content": "经营区域:1:服务区,2:城市店", "isRequired": false }, { - "title": "PageSize", - "dataType": "Integer", - "content": "每页数量", + "title": "BusinessTradeType", + "dataType": "string", + "content": "经营业态大类:1:自营便利店,2:自营餐饮客房,3:商铺租赁", "isRequired": false }, + { + "title": "shopTrade", + "dataType": "string", + "content": "商品业态", + "isRequired": false + }, + { + "title": "compactStartDate", + "dataType": "string", + "content": "合同开始日期", + "isRequired": false + }, + { + "title": "compactEndDate", + "dataType": "string", + "content": "合同结束日期", + "isRequired": false + }, + { + "title": "calcQOQ", + "dataType": "boolean", + "content": "是否计算环比", + "isRequired": false + }, + { + "title": "calcYOY", + "dataType": "boolean", + "content": "是否计算同比", + "isRequired": false + }, + { + "title": "calcBayonet", + "dataType": "boolean", + "content": "是否计算车流量", + "isRequired": false + }, + { + "title": "hasAnalog", + "dataType": "boolean", + "content": "是否包含模拟车流", + "isRequired": false + }, + { + "title": "statisticsType", + "dataType": "integer", + "content": "统计类型:1:门店,2:业态分类,3:服务区类型", + "isRequired": false + }, + { + "title": "accountType", + "dataType": "integer", + "content": "收入结算类型:0【标准算法】,1【自营的按照商超25%,餐饮20%计算】", + "isRequired": false + }, + { + "title": "showRevenue", + "dataType": "integer", + "content": "经营数据:0:全部,1:增长,2:降低", + "isRequired": false + }, + { + "title": "showBayonet", + "dataType": "integer", + "content": "车流数据:0:全部,1:增长,2:降低", + "isRequired": false + }, + { + "title": "showLevel", + "dataType": "integer", + "content": "显示层级:1:服务区,2:门店", + "isRequired": false + }, + { + "title": "solidType", + "dataType": "boolean", + "content": "是否查询固化数据", + "isRequired": false + }, + { + "title": "showWarning", + "dataType": "boolean", + "content": "显示预警:true:预警数据,false:正常数据", + "isRequired": false + }, + { + "title": "warningType", + "dataType": "integer", + "content": "预警类型:1:车流增加,服务区营收减少,2:车流增加,门店的营收减少,3:车流增加,营收增长不匹配,4:车流减少,营收减低不匹配", + "isRequired": false + } ], data: [ { - "title": "LineIndex", - "dataType": "string", - "content": "索引" + title: 'SPRegionTypeId', + dataType: "integer", + content: "片区内码", }, { - "title": "Serverpart_ID", + title: 'SPRegionTypeName', + dataType: "string", + content: "片区名称", + }, + { + title: 'ServerpartId', + dataType: "integer", + content: "服务区内码", + }, + { + title: 'ServerpartName', + dataType: "string", + content: "服务区名称", + }, + { + title: "RevenueINC", + dataType: "object", + content: "营收数据", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "AccountINC", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "BayonetINC", + content: "车流数据", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "SectionFlowINC", + content: "断面流量", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "BayonetINC_ORI", + content: "车流数据", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "TicketINC", + content: "客单数量", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "AvgTicketINC", + content: "客单均价", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: 'ShopINCList', + content: "门店数据", + dataType: "list", + children: [ + { title: 'ServerpartId', dataType: "integer", content: '服务区内码' }, + { title: 'ServerpartName', dataType: "string", content: '服务区名称' }, + { title: 'ServerpartShopId', dataType: "string", content: '门店内码' }, + { title: 'ServerpartShopName', dataType: "string", content: '门店名称' }, + { title: 'Brand_Id', dataType: "integer", content: '品牌内码' }, + { title: 'Brand_Name', dataType: "string", content: '品牌名称' }, + { title: 'BrandType_Name', dataType: "string", content: '品牌类型' }, + { title: 'Brand_ICO', dataType: "string", content: '品牌图片' }, + { title: 'ShopTrade', dataType: "integer", content: '商品业态' }, + { title: 'BusinessTradeName', dataType: "string", content: '经营业态名称' }, + { title: 'BusinessTradeType', dataType: "string", content: '经营业态大类 1:自营便利店 2:自营餐饮客房 3:商铺租赁' }, + { title: 'BusinessProjectId', dataType: "integer", content: '经营项目内码' }, + { title: 'CompactStartDate', dataType: "string", content: '合同开始日期' }, + { title: 'CompactEndDate', dataType: "string", content: '合同结束日期' }, + { title: 'BusinessType', dataType: "integer", content: '经营模式(1000:自营,2000:合作经营,3000:固定租金,4000:展销)' }, + { title: 'SettlementModes', dataType: "integer", content: '结算模式' }, + { title: 'MERCHANTS_ID', dataType: "number", content: '经营商户Id' }, + { title: 'MERCHANTS_ID_Encrypted', dataType: "string", content: '经营商户Id(加密后的)' }, + { title: 'MERCHANTS_NAME', dataType: "string", content: '经营商户' }, + { title: 'RevenueINC', dataType: "object", content: '营收数据对比' }, + { title: 'AccountINC', dataType: "object", content: '驿达收入对比' }, + { title: 'TicketINC', dataType: "object", content: '客单数量对比' }, + { title: 'AvgTicketINC', dataType: "object", content: '客单均价对比' }, + { title: 'CurTransaction', dataType: "number", content: '即时营收数据' }, + { title: 'Profit_Amount', dataType: "number", content: '盈利金额' }, + { title: 'Cost_Amount', dataType: "number", content: '预估成本' }, + { title: 'Ca_Cost', dataType: "number", content: '获客成本' } + ] + }, + { + title: 'Profit_Amount', + dataType: "number", + content: "盈利金额", + }, + { + title: 'Cost_Amount', + dataType: "number", + content: "预估成本", + }, + { + title: 'Ca_Cost', + dataType: "number", + content: "获客成本", + }, + { + title: 'RankDiff', + dataType: "integer", + content: "排名差异", + } + ] + }, + + // python预警情况 + "http://localhost:8002/api/dynamic/GetAccountWarningList/": { + req: [{ + title: 'ServerpartId', + dataType: "string", + content: "服务区内码", + isRequired: true + }, + { + title: 'BusinessTrade', + dataType: "string", + content: "经营业态", + isRequired: false + }, + { + title: 'Business_Type', + dataType: "string", + content: "经营模式", + isRequired: false + }, + { + title: 'SettlementMode', + dataType: "string", + content: "结算模式", + isRequired: false + }, + { + title: 'BusinessState', + dataType: "string", + content: "经营状态", + isRequired: false + }, + { + title: 'WarningType', + dataType: "string", + content: `预警类型 1:项目未有营业(项目周期开始至今没有营收) + 2:项目利润过低(项目周期结束,利润未达20W) + 3:商家退场告警(项目营业过,门店关闭超过30天) + 4:项目预亏预警(项目周期过半,利润未达10W) + 5:商家退场预警(项目周期75%,利润为负数) + 6:租金提成偏低(商家利润超过100W) + 7:租金提成过高(商家真实提成比例高于建议提成15%以上)`, + isRequired: false + }, + { + title: 'ProjectId', + dataType: "string", + content: `经营项目内码`, + isRequired: false + }, + { + title: 'ShowMulti', + dataType: "boolean", + content: `显示多个预警类型`, + isRequired: false + }, + { + title: 'ShowNormal', + dataType: "boolean", + content: `显示正常项目,默认不显示`, + isRequired: false + }, + { + title: 'Format', + dataType: "integer", + content: `返参格式: 1【门店列表】 2【片区嵌套】`, + isRequired: false + }, + { + title: 'BusinessBrand', + dataType: "string", + content: `经营品牌`, + isRequired: false + }, + { + title: 'MerchantName', + dataType: "string", + content: `经营商户`, + isRequired: false + }, + { + title: 'ShopName', + dataType: "string", + content: `门店名称`, + isRequired: false + } + ], + data: [ + { title: 'BUSINESSPROJECT_ID', dataType: 'integer', content: '经营项目内码' }, + { title: 'BUSINESSPROJECT_NAME', dataType: 'string', content: '项目名称' }, + { title: 'SPREGIONTYPE_ID', dataType: 'integer', content: '片区内码' }, + { title: 'SPREGIONTYPE_NAME', dataType: 'string', content: '片区名称' }, + { title: 'SERVERPART_ID', dataType: 'integer', content: '服务区内码' }, + { title: 'SERVERPART_NAME', dataType: 'string', content: '服务区名称' }, + { title: 'SERVERPARTSHOP_ID', dataType: 'string', content: '门店内码' }, + { title: 'SERVERPARTSHOP_NAME', dataType: 'string', content: '门店名称' }, + { title: 'BUSINESS_STATE', dataType: 'integer', content: '经营状态' }, + { title: 'BUSINESS_TRADE', dataType: 'integer', content: '经营业态' }, + { title: 'MERCHANTS_ID', dataType: 'integer', content: '商户内码' }, + { title: 'MERCHANTS_NAME', dataType: 'string', content: '经营商户' }, + { title: 'PROJECT_STARTDATE', dataType: 'string', content: '开始日期' }, + { title: 'PROJECT_ENDDATE', dataType: 'string', content: '结束日期' }, + { title: 'GUARANTEE_PRICE', dataType: 'number', content: '项目金额' }, + { title: 'BUSINESS_TYPE', dataType: 'integer', content: '结算模式' }, + { title: 'SETTLEMENT_MODES', dataType: 'integer', content: '结算模式' }, + { title: 'BUSINESS_PERIOD', dataType: 'string', content: '经营期数' }, + { title: 'PERIOD_INDEX', dataType: 'integer', content: '第几期' }, + { title: 'STARTDATE', dataType: 'string', content: '开始日期' }, + { title: 'ENDDATE', dataType: 'string', content: '结束日期' }, + { title: 'RENTFEE', dataType: 'number', content: '固定租金' }, + { title: 'MINTURNOVER', dataType: 'number', content: '保底营业额' }, + { title: 'GUARANTEERATIO', dataType: 'number', content: '保底比例' }, + { title: 'ACTUAL_RATIO', dataType: 'number', content: '真实提成比例' }, + { title: 'COMMISSION_RATIO', dataType: 'number', content: '标准提成比例' }, + { title: 'REVENUE_AMOUNT', dataType: 'number', content: '营收金额' }, + { title: 'COST_AMOUNT', dataType: 'number', content: '商家预估成本' }, + { title: 'ROYALTY_PRICE', dataType: 'number', content: '业主到账' }, + { title: 'ROYALTY_THEORY', dataType: 'number', content: '业主收入' }, + { title: 'SUBROYALTY_THEORY', dataType: 'number', content: '商家入账' }, + { title: 'PROFIT_AMOUNT', dataType: 'number', content: '盈利金额' }, + { title: 'PROFIT_RATE', dataType: 'number', content: '利润率(%)' }, + { title: 'PROFIT_SD', dataType: 'number', content: '商家盈利标准差' }, + { title: 'PROFIT_AVG', dataType: 'number', content: '商家盈利标准差' }, + { title: 'COST_RATE', dataType: 'number', content: '采购成本比例' }, + { title: 'MONTH_COUNT', dataType: 'number', content: '结算月数' }, + { title: 'LABOURS_COUNT', dataType: 'number', content: '员工人数' }, + { title: 'LABOURS_WAGE', dataType: 'number', content: '人均工资(元/月)' }, + { title: 'DEPRECIATION_EXPENSE', dataType: 'number', content: '折旧费用(三年费用)' }, + { title: 'DEPRECIATION_YEAR', dataType: 'integer', content: '折旧年限' }, + { title: 'OTHER_EXPENSE', dataType: 'number', content: '其他费用' }, + { title: 'WARNING_TYPE', dataType: 'integer', content: '预警类型' }, + { title: 'WARNING_CONTENT', dataType: 'string', content: '预警条件' }, + { title: 'TICKET_COUNT', dataType: 'integer', content: '客单数量' }, + { title: 'CA_COST', dataType: 'number', content: '获客成本' }, + { title: 'BUSINESS_STARTDATE', dataType: 'string', content: '经营开始日期' }, + { title: 'BUSINESS_ENDDATE', dataType: 'string', content: '经营结束日期' }, + { title: 'Brand_ICO', dataType: 'string', content: '图标' }, + { title: 'MERCHANTS_ID_Encrypted', dataType: 'string', content: '经营商户Id(加密后的)' }, + { title: 'ProjectProgress', dataType: 'number', content: '项目进度' }, + { title: 'PaymentProgress', dataType: 'number', content: '保底进度' } + ] + }, + // python商家盈利 + "http://localhost:8002/api/dynamic/GetPeriodWarningList/": { + req: [ + { + "title": "ServerpartId", + "dataType": "string", + "content": "服务区内码", + "isRequired": false + }, + { + "title": "ServerpartShopId", + "dataType": "string", + "content": "门店内码", + "isRequired": false + }, + { + "title": "DataType", "dataType": "integer", - "content": "服务区内码" - }, - { - "title": "Serverpart_Name", - "dataType": "string", - "content": "服务区名称" - }, - { - "title": "ServerpartShop_Id", - "dataType": "string", - "content": "门店ID" - }, - { - "title": "ServerpartShop_Name", - "dataType": "string", - "content": "门店名称" - }, - { - "title": "Shop_Count", - "dataType": "integer", - "content": "门店数量" + "content": "数据格式:1【业主】,2【商家】,3【经营业态】", + "isRequired": false }, { "title": "Business_Type", - "dataType": "integer", - "content": "经营模式" - }, - { - "title": "Business_Type_Text", "dataType": "string", - "content": "经营模式(中文)" + "content": "经营模式", + "isRequired": false }, { - "title": "Transfer_Type", - "dataType": "integer", - "content": "传输方式(0:收银系统;1:扫码传输;2:接口传输)" - }, - { - "title": "Statistics_Date", + "title": "SettlementMode", "dataType": "string", - "content": "统计日期" + "content": "结算模式", + "isRequired": false }, { - "title": "ShopTrade", - "dataType": "number", - "content": "商品业态" + "title": "PeriodState", + "dataType": "integer", + "content": "经营周期:1【当前周期】,0【历史周期】", + "isRequired": false }, { - "title": "MERCHANTS_ID", - "dataType": "number", - "content": "经营商户ID" + "title": "ProfitState", + "dataType": "integer", + "content": "盈利情况:1【盈利】,0【亏损】", + "isRequired": false }, { - "title": "MERCHANTS_NAME", + "title": "BusinessState", "dataType": "string", - "content": "经营商户" - }, - // { - // "title": "TotalRevenue", - // "dataType": "object", - // "content": "合计项营收数据", - // "children": [ - { - "title": "TotalRevenueTicket_Count", - "dataType": "integer", - "content": "客单数量" + "content": "经营状态", + "isRequired": false }, { - "title": "TotalRevenueTotal_Count", - "dataType": "number", - "content": "总数量" + "title": "BusinessTrade", + "dataType": "string", + "content": "经营业态", + "isRequired": false }, { - "title": "TotalRevenueTotal_OffAmount", - "dataType": "number", - "content": "优惠金额" + "title": "ProjectId", + "dataType": "string", + "content": "经营项目内码", + "isRequired": false }, { - "title": "TotalRevenueRevenue_Amount", - "dataType": "number", - "content": "实收金额" + "title": "WarningType", + "dataType": "string", + "content": "预警类型:1:项目未有营业(项目周期开始至今没有营收),2:项目利润过低(项目周期结束,利润未达20W),3:商家退场告警(项目营业过,门店关闭超过30天),4:项目预亏预警(项目周期过半,利润未达10W),5:商家退场预警(项目周期75%,利润为负数),6:租金提成偏低(商家利润超过100W),7:租金提成过高(商家真实提成比例高于建议提成15%以上)", + "isRequired": false }, { - "title": "TotalRevenueDifferent_Price_Less", - "dataType": "number", - "content": "短款金额" + "title": "SearchKeyName", + "dataType": "string", + "content": "模糊查询字段", + "isRequired": false }, { - "title": "TotalRevenueDifferent_Price_More", - "dataType": "number", - "content": "长款金额" + "title": "SearchKeyValue", + "dataType": "string", + "content": "模糊查询内容", + "isRequired": false }, { - "title": "TotalRevenueCashPay_Amount", - "dataType": "number", - "content": "现金支付金额" + "title": "ShowNormal", + "dataType": "boolean", + "content": "显示正常项目,默认不显示", + "isRequired": false }, { - "title": "TotalRevenueMobilePay_Amount", - "dataType": "number", - "content": "移动支付金额" + "title": "ShowSelf", + "dataType": "boolean", + "content": "显示自营门店", + "isRequired": false }, { - "title": "TotalRevenueCostBill_Amount", - "dataType": "number", - "content": "大巴优惠券金额" + "title": "BusinessBrand", + "dataType": "string", + "content": "经营品牌", + "isRequired": false }, { - "title": "TotalRevenueInternalPay_Amount", - "dataType": "number", - "content": "企业会员金额" + "title": "MerchantName", + "dataType": "string", + "content": "经营商户", + "isRequired": false }, { - "title": "TotalRevenueYFHD_Amount", - "dataType": "number", - "content": "油非互动金额" + "title": "ShopName", + "dataType": "string", + "content": "门店名称", + "isRequired": false + } + ], + data: [ + { title: 'BUSINESSPROJECT_ID', dataType: 'integer', content: '经营项目内码' }, + { title: 'BUSINESSPROJECT_NAME', dataType: 'string', content: '项目名称' }, + { title: 'SPREGIONTYPE_ID', dataType: 'integer', content: '片区内码' }, + { title: 'SPREGIONTYPE_NAME', dataType: 'string', content: '片区名称' }, + { title: 'SERVERPART_ID', dataType: 'integer', content: '服务区内码' }, + { title: 'SERVERPART_NAME', dataType: 'string', content: '服务区名称' }, + { title: 'SERVERPARTSHOP_ID', dataType: 'string', content: '门店内码' }, + { title: 'SERVERPARTSHOP_NAME', dataType: 'string', content: '门店名称' }, + { title: 'BUSINESS_STATE', dataType: 'integer', content: '经营状态' }, + { title: 'BUSINESS_TRADE', dataType: 'integer', content: '经营业态' }, + { title: 'MERCHANTS_ID', dataType: 'integer', content: '商户内码' }, + { title: 'MERCHANTS_NAME', dataType: 'string', content: '经营商户' }, + { title: 'PROJECT_STARTDATE', dataType: 'string', content: '开始日期' }, + { title: 'PROJECT_ENDDATE', dataType: 'string', content: '结束日期' }, + { title: 'GUARANTEE_PRICE', dataType: 'number', content: '项目金额' }, + { title: 'BUSINESS_TYPE', dataType: 'integer', content: '结算模式' }, + { title: 'SETTLEMENT_MODES', dataType: 'integer', content: '结算模式' }, + { title: 'BUSINESS_PERIOD', dataType: 'string', content: '经营期数' }, + { title: 'PERIOD_INDEX', dataType: 'integer', content: '第几期' }, + { title: 'STARTDATE', dataType: 'string', content: '开始日期' }, + { title: 'ENDDATE', dataType: 'string', content: '结束日期' }, + { title: 'RENTFEE', dataType: 'number', content: '固定租金' }, + { title: 'MINTURNOVER', dataType: 'number', content: '保底营业额' }, + { title: 'GUARANTEERATIO', dataType: 'number', content: '保底比例' }, + { title: 'ACTUAL_RATIO', dataType: 'number', content: '真实提成比例' }, + { title: 'COMMISSION_RATIO', dataType: 'number', content: '标准提成比例' }, + { title: 'REVENUE_AMOUNT', dataType: 'number', content: '营收金额' }, + { title: 'COST_AMOUNT', dataType: 'number', content: '商家预估成本' }, + { title: 'ROYALTY_PRICE', dataType: 'number', content: '业主到账' }, + { title: 'ROYALTY_THEORY', dataType: 'number', content: '业主收入' }, + { title: 'SUBROYALTY_THEORY', dataType: 'number', content: '商家入账' }, + { title: 'PROFIT_AMOUNT', dataType: 'number', content: '盈利金额' }, + { title: 'PROFIT_RATE', dataType: 'number', content: '利润率(%)' }, + { title: 'PROFIT_SD', dataType: 'number', content: '商家盈利标准差' }, + { title: 'PROFIT_AVG', dataType: 'number', content: '商家盈利标准差' }, + { title: 'COST_RATE', dataType: 'number', content: '采购成本比例' }, + { title: 'MONTH_COUNT', dataType: 'number', content: '结算月数' }, + { title: 'LABOURS_COUNT', dataType: 'number', content: '员工人数' }, + { title: 'LABOURS_WAGE', dataType: 'number', content: '人均工资(元/月)' }, + { title: 'DEPRECIATION_EXPENSE', dataType: 'number', content: '折旧费用(三年费用)' }, + { title: 'DEPRECIATION_YEAR', dataType: 'integer', content: '折旧年限' }, + { title: 'OTHER_EXPENSE', dataType: 'number', content: '其他费用' }, + { title: 'WARNING_TYPE', dataType: 'integer', content: '预警类型(1:项目未有营业,2:项目利润过低,3:商家退场告警,4:项目预亏预警,5:商家退场预警,6:租金提成偏低,7:租金提成过高,8:业态缺失告警)' }, + { title: 'WARNING_CONTENT', dataType: 'string', content: '预警条件' }, + { title: 'TICKET_COUNT', dataType: 'integer', content: '客单数量' }, + { title: 'CA_COST', dataType: 'number', content: '获客成本' }, + { title: 'BUSINESS_STARTDATE', dataType: 'string', content: '经营开始日期' }, + { title: 'BUSINESS_ENDDATE', dataType: 'string', content: '经营结束日期' }, + { title: 'Brand_ICO', dataType: 'string', content: '图标' }, + { title: 'MERCHANTS_ID_Encrypted', dataType: 'string', content: '经营商户Id(加密后的)' }, + { title: 'ProjectProgress', dataType: 'number', content: '项目进度' }, + { title: 'PaymentProgress', dataType: 'number', content: '保底进度' } + ] + }, + // python节假日数据 + "http://localhost:8002/api/dynamic/GetServerpartINCAnalysis/": { + req: [{ + title: 'calcType', + dataType: "integer", + content: "计算方式:1【当日】,2【累计】", + isRequired: true + }, + { + title: 'pushProvinceCode', + dataType: "string", + content: "省份编码", + isRequired: true + }, + { + title: 'curYear', + dataType: "integer", + content: "本年年份", + isRequired: true + }, + { + title: 'HolidayType', + dataType: "integer", + content: `节日类型:1【元旦】2【春运】3【清明】4【五一】5【端午】6【暑期】7【中秋】8【国庆】`, + isRequired: true + }, + { + title: 'StatisticsDate', + dataType: "string", + content: "统计日期", + isRequired: true + }, + { + title: 'compareYear', + dataType: "integer", + content: "历年年份", + isRequired: false + }, + { + title: 'CurStartDate', + dataType: "string", + content: "统计开始日期", + isRequired: false + }, + { + title: 'ServerpartId', + dataType: "string", + content: "服务区内码", + isRequired: false + }, + { + title: 'businessRegion', + dataType: "integer", + content: `经营区域:1【服务区】2【城市店】`, + isRequired: false + }, + { + title: 'SortStr', + dataType: "string", + content: "排序字段:营业额:revenue驿达收入:account车流量:bayonet正序:asc,倒序:desc示例:revenue desc,bayonet desc", + isRequired: false + }, + { + title: 'IsYOYCompare', + dataType: "boolean", + content: `是否对比同期数据`, + isRequired: false + }, + ], + data: [ + { + title: 'SPRegionTypeId', + dataType: "integer", + content: "片区内码", }, { - "title": "TotalRevenueBankAccount_Amount", - "dataType": "number", - "content": "银行到账金额" + title: 'SPRegionTypeName', + dataType: "string", + content: "片区名称", }, { - "title": "TotalRevenueCorrect_Amount", - "dataType": "number", - "content": "日结冲正金额" + title: 'ServerpartId', + dataType: "integer", + content: "服务区内码", }, { - "title": "TotalRevenueMobile_Correct", - "dataType": "number", - "content": "移动支付冲正" + title: 'ServerpartName', + dataType: "string", + content: "服务区名称", }, { - "title": "TotalRevenueCash_Correct", - "dataType": "number", - "content": "现金支付冲正" - }, - { - "title": "TotalRevenueSupplement_State", - "dataType": "integer", - "content": "营收补录标识(0:纯自然日营收;1:包含从日结表复制的数据)" - }, - { - "title": "TotalRevenueSupplement_Amount", - "dataType": "number", - "content": "补录金额" - }, - { - "title": "TotalRevenueCigarette_Amount", - "dataType": "number", - "content": "香烟金额" - }, - // ] - // }, - { - "title": "RegionARevenue", - "dataType": "object", - "content": "东(南)区 / 上线 / A区营收数据", - "children": [ + title: "RevenueINC", + dataType: "object", + content: "营收数据", + children: [ { - "title": "Ticket_Count", - "dataType": "integer", - "content": "客单数量" + title: "curYearData", + dataType: "number", + content: "本年度数值", }, { - "title": "Total_Count", - "dataType": "number", - "content": "总数量" + title: "lYearData", + dataType: "number", + content: "历年同期数值", }, { - "title": "Total_OffAmount", - "dataType": "number", - "content": "优惠金额" + title: "increaseData", + dataType: "number", + content: "同比增长值", }, { - "title": "Revenue_Amount", - "dataType": "number", - "content": "实收金额" + title: "increaseRate", + dataType: "number", + content: "同比增长率", }, { - "title": "Different_Price_Less", - "dataType": "number", - "content": "短款金额" + title: "QOQData", + dataType: "number", + content: "环比同期数值", }, { - "title": "Different_Price_More", - "dataType": "number", - "content": "长款金额" + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", }, { - "title": "CashPay_Amount", - "dataType": "number", - "content": "现金支付金额" + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", }, { - "title": "MobilePay_Amount", - "dataType": "number", - "content": "移动支付金额" - }, - { - "title": "CostBill_Amount", - "dataType": "number", - "content": "大巴优惠券金额" - }, - { - "title": "InternalPay_Amount", - "dataType": "number", - "content": "企业会员金额" - }, - { - "title": "YFHD_Amount", - "dataType": "number", - "content": "油非互动金额" - }, - { - "title": "BankAccount_Amount", - "dataType": "number", - "content": "银行到账金额" - }, - { - "title": "Correct_Amount", - "dataType": "number", - "content": "日结冲正金额" - }, - { - "title": "Mobile_Correct", - "dataType": "number", - "content": "移动支付冲正" - }, - { - "title": "Cash_Correct", - "dataType": "number", - "content": "现金支付冲正" - }, - { - "title": "Supplement_State", - "dataType": "integer", - "content": "营收补录标识(0:纯自然日营收;1:包含从日结表复制的数据)" - }, - { - "title": "Supplement_Amount", - "dataType": "number", - "content": "补录金额" - }, - { - "title": "Cigarette_Amount", - "dataType": "number", - "content": "香烟金额" + title: "rankNum", + dataType: "integer", + content: "排名", } ] }, { - "title": "RegionBRevenue", - "dataType": "object", - "content": "西(北)区 / 下线 / B区营收数据", - "children": [ + title: "AccountINC", + dataType: "object", + children: [ { - "title": "Ticket_Count", - "dataType": "integer", - "content": "客单数量" + title: "curYearData", + dataType: "number", + content: "本年度数值", }, { - "title": "Total_Count", - "dataType": "number", - "content": "总数量" + title: "lYearData", + dataType: "number", + content: "历年同期数值", }, { - "title": "Total_OffAmount", - "dataType": "number", - "content": "优惠金额" + title: "increaseData", + dataType: "number", + content: "同比增长值", }, { - "title": "Revenue_Amount", - "dataType": "number", - "content": "实收金额" + title: "increaseRate", + dataType: "number", + content: "同比增长率", }, { - "title": "Different_Price_Less", - "dataType": "number", - "content": "短款金额" + title: "QOQData", + dataType: "number", + content: "环比同期数值", }, { - "title": "Different_Price_More", - "dataType": "number", - "content": "长款金额" + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", }, { - "title": "CashPay_Amount", - "dataType": "number", - "content": "现金支付金额" + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", }, { - "title": "MobilePay_Amount", - "dataType": "number", - "content": "移动支付金额" - }, - { - "title": "CostBill_Amount", - "dataType": "number", - "content": "大巴优惠券金额" - }, - { - "title": "InternalPay_Amount", - "dataType": "number", - "content": "企业会员金额" - }, - { - "title": "YFHD_Amount", - "dataType": "number", - "content": "油非互动金额" - }, - { - "title": "BankAccount_Amount", - "dataType": "number", - "content": "银行到账金额" - }, - { - "title": "Correct_Amount", - "dataType": "number", - "content": "日结冲正金额" - }, - { - "title": "Mobile_Correct", - "dataType": "number", - "content": "移动支付冲正" - }, - { - "title": "Cash_Correct", - "dataType": "number", - "content": "现金支付冲正" - }, - { - "title": "Supplement_State", - "dataType": "integer", - "content": "营收补录标识(0:纯自然日营收;1:包含从日结表复制的数据)" - }, - { - "title": "Supplement_Amount", - "dataType": "number", - "content": "补录金额" - }, - { - "title": "Cigarette_Amount", - "dataType": "number", - "content": "香烟金额" + title: "rankNum", + dataType: "integer", + content: "排名", } ] + }, + { + title: "BayonetINC", + content: "车流数据", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "SectionFlowINC", + content: "断面流量", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "BayonetINC_ORI", + content: "车流数据", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "TicketINC", + content: "客单数量", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: "AvgTicketINC", + content: "客单均价", + dataType: "object", + children: [ + { + title: "curYearData", + dataType: "number", + content: "本年度数值", + }, + { + title: "lYearData", + dataType: "number", + content: "历年同期数值", + }, + { + title: "increaseData", + dataType: "number", + content: "同比增长值", + }, + { + title: "increaseRate", + dataType: "number", + content: "同比增长率", + }, + { + title: "QOQData", + dataType: "number", + content: "环比同期数值", + }, + { + title: "increaseDataQOQ", + dataType: "number", + content: "环比增长值", + }, + { + title: "increaseRateQOQ", + dataType: "number", + content: "环比增长率", + }, + { + title: "rankNum", + dataType: "integer", + content: "排名", + } + ] + }, + { + title: 'ShopINCList', + content: "门店数据", + dataType: "list", + children: [ + { title: 'ServerpartId', dataType: "integer", content: '服务区内码' }, + { title: 'ServerpartName', dataType: "string", content: '服务区名称' }, + { title: 'ServerpartShopId', dataType: "string", content: '门店内码' }, + { title: 'ServerpartShopName', dataType: "string", content: '门店名称' }, + { title: 'Brand_Id', dataType: "integer", content: '品牌内码' }, + { title: 'Brand_Name', dataType: "string", content: '品牌名称' }, + { title: 'BrandType_Name', dataType: "string", content: '品牌类型' }, + { title: 'Brand_ICO', dataType: "string", content: '品牌图片' }, + { title: 'ShopTrade', dataType: "integer", content: '商品业态' }, + { title: 'BusinessTradeName', dataType: "string", content: '经营业态名称' }, + { title: 'BusinessTradeType', dataType: "string", content: '经营业态大类 1:自营便利店 2:自营餐饮客房 3:商铺租赁' }, + { title: 'BusinessProjectId', dataType: "integer", content: '经营项目内码' }, + { title: 'CompactStartDate', dataType: "string", content: '合同开始日期' }, + { title: 'CompactEndDate', dataType: "string", content: '合同结束日期' }, + { title: 'BusinessType', dataType: "integer", content: '经营模式(1000:自营,2000:合作经营,3000:固定租金,4000:展销)' }, + { title: 'SettlementModes', dataType: "integer", content: '结算模式' }, + { title: 'MERCHANTS_ID', dataType: "number", content: '经营商户Id' }, + { title: 'MERCHANTS_ID_Encrypted', dataType: "string", content: '经营商户Id(加密后的)' }, + { title: 'MERCHANTS_NAME', dataType: "string", content: '经营商户' }, + { title: 'RevenueINC', dataType: "object", content: '营收数据对比' }, + { title: 'AccountINC', dataType: "object", content: '驿达收入对比' }, + { title: 'TicketINC', dataType: "object", content: '客单数量对比' }, + { title: 'AvgTicketINC', dataType: "object", content: '客单均价对比' }, + { title: 'CurTransaction', dataType: "number", content: '即时营收数据' }, + { title: 'Profit_Amount', dataType: "number", content: '盈利金额' }, + { title: 'Cost_Amount', dataType: "number", content: '预估成本' }, + { title: 'Ca_Cost', dataType: "number", content: '获客成本' } + ] + }, + { + title: 'Profit_Amount', + dataType: "number", + content: "盈利金额", + }, + { + title: 'Cost_Amount', + dataType: "number", + content: "预估成本", + }, + { + title: 'Ca_Cost', + dataType: "number", + content: "获客成本", + }, + { + title: 'RankDiff', + dataType: "integer", + content: "排名差异", } ] - } + }, + // python资产坪效 + "http://localhost:8002/api/dynamic/GetASSETSPROFITSTreeList/": { + req: [ + { + "title": "Start_DATE", + "dataType": "integer", + "content": "统计开始年月:YYYYMM", + "isRequired": false + }, + { + "title": "End_DATE", + "dataType": "integer", + "content": "统计结束年月:YYYYMM", + "isRequired": false + }, + { + "title": "PROPERTYASSETS_CODE", + "dataType": "string", + "content": "资产编码", + "isRequired": false + }, + { + "title": "PROPERTYASSETS_TYPE", + "dataType": "integer", + "content": "资产类型(1综合楼,子类型[1000:商铺,2000:仓库,3000:餐饮区,4000:开水间,5000:公共区,6000:厕所]) 小于100为父类", + "isRequired": false + }, + { + "title": "HOLIDAY_TYPE_IDS", + "dataType": "string", + "content": "节日类型(0非节假日,1【元旦】,2【春运】,3【清明】,4【五一】,5【端午】,6【暑期】,7【中秋】,8【国庆】)", + "isRequired": false + }, + { + "title": "SERVERPART_NAME", + "dataType": "string", + "content": "服务区名称", + "isRequired": false + }, + { + "title": "SERVERPARTSHOP_NAME", + "dataType": "string", + "content": "门店名称", + "isRequired": false + }, + { + "title": "BUSINESS_TRADENAME", + "dataType": "string", + "content": "业态名称", + "isRequired": false + }, + { + "title": "TOTAL_AREA", + "dataType": "number", + "content": "总面积", + "isRequired": false + }, + { + "title": "AVG_PROFIT", + "dataType": "number", + "content": "月平均每平米效益", + "isRequired": false + }, + { + "title": "BUSINESSPROJECT_ID", + "dataType": "integer", + "content": "经营项目内码", + "isRequired": false + }, + { + "title": "BUSINESSPROJECT_NAME", + "dataType": "string", + "content": "项目名称", + "isRequired": false + }, + { + "title": "PROJECT_STARTDATE", + "dataType": "string", + "content": "开始日期", + "isRequired": false + }, + { + "title": "PROJECT_ENDDATE", + "dataType": "string", + "content": "结束日期", + "isRequired": false + }, + { + "title": "ASSETSPROFITS_ID", + "dataType": "integer", + "content": "资产效益内码", + "isRequired": false + }, + { + "title": "STATISTICS_DATE", + "dataType": "integer", + "content": "统计年月:YYYYMM", + "isRequired": false + }, + { + "title": "SPREGIONTYPE_ID", + "dataType": "integer", + "content": "区域内码", + "isRequired": false + }, + { + "title": "SPREGIONTYPE_IDS", + "dataType": "string", + "content": "区域内码(查询条件)", + "isRequired": false + }, + { + "title": "SPREGIONTYPE_NAME", + "dataType": "string", + "content": "片区名称", + "isRequired": false + }, + { + "title": "SERVERPART_IDS", + "dataType": "string", + "content": "服务区内码IDS(查询条件)", + "isRequired": false + }, + { + "title": "SERVERPART_ID", + "dataType": "integer", + "content": "服务区内码", + "isRequired": false + }, + { + "title": "SERVERPART_CODE", + "dataType": "string", + "content": "服务区编码", + "isRequired": false + }, + { + "title": "PROPERTYASSETS_ID", + "dataType": "integer", + "content": "资产内码ID", + "isRequired": false + }, + { + "title": "PROPERTYASSETS_IDS", + "dataType": "string", + "content": "资产内码ID(查询条件)", + "isRequired": false + }, + { + "title": "PROPERTYASSETS_REGION", + "dataType": "integer", + "content": "区域方位", + "isRequired": false + }, + { + "title": "PROPERTYASSETS_AREA", + "dataType": "number", + "content": "资产面积大小", + "isRequired": false + }, + { + "title": "SERVERPARTSHOP_ID", + "dataType": "string", + "content": "门店内码集合", + "isRequired": false + }, + { + "title": "BUSINESS_TRADE", + "dataType": "string", + "content": "经营业态", + "isRequired": false + }, + { + "title": "MONTHDAYS", + "dataType": "integer", + "content": "天数", + "isRequired": false + }, + { + "title": "ASSETSPROFITS_DAY", + "dataType": "integer", + "content": "月营业天数", + "isRequired": false + }, + { + "title": "ASSETSPROFITS_CLOSEDAY", + "dataType": "integer", + "content": "资产未运营天数", + "isRequired": false + }, + { + "title": "SERVERPART_FLOWDAYS", + "dataType": "integer", + "content": "服务区车流量天数", + "isRequired": false + }, + { + "title": "SERVERPART_FLOW", + "dataType": "integer", + "content": "服务区车流量", + "isRequired": false + }, + { + "title": "REVENUE_AMOUNT", + "dataType": "number", + "content": "月营收金额", + "isRequired": false + }, + { + "title": "WEEKDAY_AMOUNT", + "dataType": "number", + "content": "工作日营收金额", + "isRequired": false + }, + { + "title": "WEEKEND_DAYS", + "dataType": "integer", + "content": "周末假日天数,如果是假日,则不算为周末", + "isRequired": false + }, + { + "title": "WEEKEND_AMOUNT", + "dataType": "number", + "content": "周末高峰营收金额", + "isRequired": false + }, + { + "title": "HOLIDAY_TYPE", + "dataType": "integer", + "content": "节日类型(0非节假日,1【元旦】,2【春运】,3【清明】,4【五一】,5【端午】,6【暑期】,7【中秋】,8【国庆】)", + "isRequired": false + }, + { + "title": "ASSETSPROFITS_STATE", + "dataType": "integer", + "content": "数据状态", + "isRequired": false + }, + { + "title": "ASSETSPROFITS_DESC", + "dataType": "string", + "content": "说明", + "isRequired": false + }, + { + "title": "WEEKDAY_AVG", + "dataType": "number", + "content": "工作日平均效益", + "isRequired": false + }, + { + "title": "WEEKEND_AVG", + "dataType": "number", + "content": "周末节假日平均效益", + "isRequired": false + }, + { + "title": "LOSS_AMOUNT", + "dataType": "number", + "content": "未营业损失参考金额", + "isRequired": false + }, + { + "title": "DETAIL_DATA", + "dataType": "string", + "content": "每日信息(日期,星期节日,金额)", + "isRequired": false + }, + { + "title": "STAFF_ID", + "dataType": "integer", + "content": "操作人ID", + "isRequired": false + }, + { + "title": "STAFF_NAME", + "dataType": "string", + "content": "操作人", + "isRequired": false + }, + { + "title": "OPRATE_DATE", + "dataType": "string", + "content": "操作时间", + "isRequired": false + } + ], + data: [ + { title: 'Start_DATE', dataType: 'integer', content: '统计开始年月:YYYYMM' }, + { title: 'End_DATE', dataType: 'integer', content: '统计结束年月:YYYYMM' }, + { title: 'PROPERTYASSETS_CODE', dataType: 'string', content: '资产编码' }, + { title: 'PROPERTYASSETS_TYPE', dataType: 'integer', content: '资产类型(1综合楼,子类型[1000:商铺,2000:仓库,3000:餐饮区,4000:开水间,5000:公共区,6000:厕所]) 小于100为父类' }, + { title: 'HOLIDAY_TYPE_IDS', dataType: 'string', content: '节日类型(0非节假日,1【元旦】,2【春运】,3【清明】,4【五一】,5【端午】,6【暑期】,7【中秋】,8【国庆】)' }, + { title: 'SERVERPART_NAME', dataType: 'string', content: '服务区名称' }, + { title: 'SERVERPARTSHOP_NAME', dataType: 'string', content: '门店名称' }, + { title: 'BUSINESS_TRADENAME', dataType: 'string', content: '业态名称' }, + { title: 'TOTAL_AREA', dataType: 'number', content: '总面积' }, + { title: 'AVG_PROFIT', dataType: 'number', content: '月平均每平米效益' }, + { title: 'BUSINESSPROJECT_ID', dataType: 'integer', content: '经营项目内码' }, + { title: 'BUSINESSPROJECT_NAME', dataType: 'string', content: '项目名称' }, + { title: 'PROJECT_STARTDATE', dataType: 'string', content: '开始日期' }, + { title: 'PROJECT_ENDDATE', dataType: 'string', content: '结束日期' }, + { title: 'ASSETSPROFITS_ID', dataType: 'integer', content: '资产效益内码' }, + { title: 'STATISTICS_DATE', dataType: 'integer', content: '统计年月:YYYYMM' }, + { title: 'SPREGIONTYPE_ID', dataType: 'integer', content: '区域内码' }, + { title: 'SPREGIONTYPE_IDS', dataType: 'string', content: '区域内码(查询条件)' }, + { title: 'SPREGIONTYPE_NAME', dataType: 'string', content: '片区名称' }, + { title: 'SERVERPART_IDS', dataType: 'string', content: '服务区内码IDS(查询条件)' }, + { title: 'SERVERPART_ID', dataType: 'integer', content: '服务区内码' }, + { title: 'SERVERPART_CODE', dataType: 'string', content: '服务区编码' }, + { title: 'PROPERTYASSETS_ID', dataType: 'integer', content: '资产内码ID' }, + { title: 'PROPERTYASSETS_IDS', dataType: 'string', content: '资产内码ID(查询条件)' }, + { title: 'PROPERTYASSETS_REGION', dataType: 'integer', content: '区域方位' }, + { title: 'PROPERTYASSETS_AREA', dataType: 'number', content: '资产面积大小' }, + { title: 'SERVERPARTSHOP_ID', dataType: 'string', content: '门店内码集合' }, + { title: 'BUSINESS_TRADE', dataType: 'string', content: '经营业态' }, + { title: 'MONTHDAYS', dataType: 'integer', content: '天数' }, + { title: 'ASSETSPROFITS_DAY', dataType: 'integer', content: '月营业天数' }, + { title: 'ASSETSPROFITS_CLOSEDAY', dataType: 'integer', content: '资产未运营天数' }, + { title: 'SERVERPART_FLOWDAYS', dataType: 'integer', content: '服务区车流量天数' }, + { title: 'SERVERPART_FLOW', dataType: 'integer', content: '服务区车流量' }, + { title: 'REVENUE_AMOUNT', dataType: 'number', content: '月营收金额' }, + { title: 'WEEKDAY_AMOUNT', dataType: 'number', content: '工作日营收金额' }, + { title: 'WEEKEND_DAYS', dataType: 'integer', content: '周末假日天数,如果是假日,则不算为周末' }, + { title: 'WEEKEND_AMOUNT', dataType: 'number', content: '周末高峰营收金额' }, + { title: 'HOLIDAY_TYPE', dataType: 'integer', content: '节日类型(0非节假日,1【元旦】,2【春运】,3【清明】,4【五一】,5【端午】,6【暑期】,7【中秋】,8【国庆】)' }, + { title: 'ASSETSPROFITS_STATE', dataType: 'integer', content: '数据状态' }, + { title: 'ASSETSPROFITS_DESC', dataType: 'string', content: '说明' }, + { title: 'WEEKDAY_AVG', dataType: 'number', content: '工作日平均效益' }, + { title: 'WEEKEND_AVG', dataType: 'number', content: '周末节假日平均效益' }, + { title: 'LOSS_AMOUNT', dataType: 'number', content: '未营业损失参考金额' }, + { title: 'DETAIL_DATA', dataType: 'string', content: '每日信息(日期,星期节日,金额)' }, + { title: 'STAFF_ID', dataType: 'integer', content: '操作人ID' }, + { title: 'STAFF_NAME', dataType: 'string', content: '操作人' }, + { title: 'OPRATE_DATE', dataType: 'string', content: '操作时间' } + ] + }, + // 单车价值 + "http://localhost:8002/api/dynamic/GetRevenueEstimateList/": { + req: [ + { + "title": "StatisticsMonth", + "dataType": "string", + "content": "统计月份,格式yyyyMM", + "isRequired": true + }, + { + "title": "ServerpartId", + "dataType": "string", + "content": "服务区内码", + "isRequired": false + }, + { + "title": "ProvinceName", + "dataType": "string", + "content": "车辆归属省份", + "isRequired": false + } + ], + data: [{ + title: 'SPREGIONTYPE_ID', + content: "片区内码", + }, + { + title: 'SPREGIONTYPE_NAME', + content: "管理中心", + }, + { + title: 'REVENUE_DIFF', + content: "营收差异", + }, + { + title: 'DIFFERENCE_RATE', + content: "误差率", + }, + { + title: 'VEHICLEAMOUNT_ID', + content: "内码", + }, + { + title: 'STATISTICS_MONTH', + content: "统计月份", + }, + { + title: 'SERVERPART_ID', + content: "服务区内码", + }, + { + title: 'SERVERPART_NAME', + content: "服务区名称", + }, + { + title: 'SERVERPART_REGION', + content: "服务区方位", + }, + { + title: 'VEHICLE_TYPE', + content: "车辆类型", + }, + { + title: 'VEHICLE_COUNT', + content: "车流数量", + }, + { + title: 'PROVINCE_NAME', + content: "省份名称", + }, + { + title: 'PERCAPITA_INCOME', + content: "人均收入", + }, + { + title: 'CONSUMPTION_COEFFICIENT', + content: "消费系数", + }, + { + title: 'VEHICLE_AMOUNT', + content: "初始单车价值", + }, + { + title: 'ADJUST_COUNT', + content: "调整量", + }, + { + title: 'VEHICLE_ADJAMOUNT', + content: "调整后单车价值", + }, + { + title: 'REVENUE_ADJAMOUNT', + content: "营收贡献", + }, + { + title: 'REVENUE_ACTAMOUNT', + content: "服务区营收", + }, + { + title: 'VEHICLE_TOTALCOUNT', + content: "服务区车流量", + }, + { + title: 'VEHICLEAMOUNT_STATE', + content: "有效状态", + }, + { + title: 'RECORD_DATE', + content: "记录时间", + } + ] + }, } diff --git a/src/pages/newDataAnalysis/adaptationIndex/index.tsx b/src/pages/newDataAnalysis/adaptationIndex/index.tsx index 9823566..a464ccb 100644 --- a/src/pages/newDataAnalysis/adaptationIndex/index.tsx +++ b/src/pages/newDataAnalysis/adaptationIndex/index.tsx @@ -1412,11 +1412,11 @@ const adaptationIndex: React.FC<{ currentUser: CurrentUser }> = (props) => { }) } }) - console.log('list4', list); setTableData(list) - list.forEach((item: any) => { + + list.forEach((item: any, index: number) => { if (item.children && item.children.length > 0) { - item.children.forEach((subItem: any) => { + item.children.forEach((subItem: any, subIndex: number) => { // 整个服务区的评分 let allServerPartMarkObj: any = {} 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.level = 2 + subItem.index = `${index}-${subIndex}` subItem = handleExplainObj(subItem) }) } @@ -1694,7 +1695,7 @@ const adaptationIndex: React.FC<{ currentUser: CurrentUser }> = (props) => { search={{ span: 6 }} scroll={{ x: '100%', y: 'calc(100vh - 380px)' }} 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} request={async (params) => { diff --git a/src/pages/newDataAnalysis/flatEffect/index.tsx b/src/pages/newDataAnalysis/flatEffect/index.tsx index 51954d3..a69a740 100644 --- a/src/pages/newDataAnalysis/flatEffect/index.tsx +++ b/src/pages/newDataAnalysis/flatEffect/index.tsx @@ -626,14 +626,10 @@ const flatEffect: React.FC<{ currentUser: CurrentUser }> = (props) => { } } - console.log('params', params); - setSearchParams(params) 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 - console.log('allDay', allDay); if (data && data.length > 0) { // 导出的数据 diff --git a/src/pages/newDataAnalysis/vehicleOwner/index.tsx b/src/pages/newDataAnalysis/vehicleOwner/index.tsx index 905885c..b26b15e 100644 --- a/src/pages/newDataAnalysis/vehicleOwner/index.tsx +++ b/src/pages/newDataAnalysis/vehicleOwner/index.tsx @@ -115,7 +115,7 @@ const vehicleOwner: React.FC<{ currentUser: CurrentUser }> = (props) => { }, }, 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', picker: "month", } @@ -136,12 +136,6 @@ const vehicleOwner: React.FC<{ currentUser: CurrentUser }> = (props) => { startTime: searchParams?.statisticsStartDate, endTime: searchParams?.statisticsEndDate }) - console.log('record', { - ...record, - startTime: searchParams?.statisticsStartDate, - endTime: searchParams?.statisticsEndDate - }); - setShowDetail(true) }}>{record?.ProvinceName || record?.ServerPartName || record?.SPRegionTypeNAME || ''} : {record?.ProvinceName || record?.ServerPartName || record?.SPRegionTypeNAME || ''} diff --git a/src/pages/reports/BusinessAnalysis/RevenueReport/index.tsx b/src/pages/reports/BusinessAnalysis/RevenueReport/index.tsx index 743aaab..57e6d6b 100644 --- a/src/pages/reports/BusinessAnalysis/RevenueReport/index.tsx +++ b/src/pages/reports/BusinessAnalysis/RevenueReport/index.tsx @@ -806,7 +806,20 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) => const list = data.data console.log('selectedId', selectedId) 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 isOneService: boolean = false diff --git a/src/pages/reports/BusinessAnalysis/transactionAnalysis/index.tsx b/src/pages/reports/BusinessAnalysis/transactionAnalysis/index.tsx index 8b34986..e158909 100644 --- a/src/pages/reports/BusinessAnalysis/transactionAnalysis/index.tsx +++ b/src/pages/reports/BusinessAnalysis/transactionAnalysis/index.tsx @@ -504,7 +504,6 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => { SearchKeyValue: params?.SearchKeyValue || '' } const data = await handleGetGetTransactionCustomer(req) - console.log('data', data) let list: any = [] if (data && data.length > 0) { list = JSON.parse(JSON.stringify(data)) @@ -548,8 +547,6 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => { // AverageCommodity:getMoney(AverageCommoditySum), // }) } - console.log('list', list) - let fieldData: any = [ "TicketCount", @@ -560,8 +557,6 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => { "AverageCommodity", ] - - let enumList: any = ["Business_Type", "ShopTrade"] let newPrintData: any = formatTreeData(JSON.parse(JSON.stringify(list)), fieldData, enumList, [shopNamesList, SHOPTRADEObj], []) diff --git a/src/pages/reports/audit/shopAbnormalReport/index.tsx b/src/pages/reports/audit/shopAbnormalReport/index.tsx index c76e345..4d5d9ed 100644 --- a/src/pages/reports/audit/shopAbnormalReport/index.tsx +++ b/src/pages/reports/audit/shopAbnormalReport/index.tsx @@ -5,15 +5,18 @@ import React, { useRef, useState } from "react"; import ProCard from "@ant-design/pro-card"; import { MenuFoldOutlined } from "@ant-design/icons"; 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 { getServerpartTree } from "@/services/options"; +import { getServerpartTree, getSPRegionShopTree, handleCallLogs } from "@/services/options"; import type { ActionType } from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table"; import ReactHTMLTableToExcel from "react-html-table-to-excel"; import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree"; import PageTitleBox from "@/components/PageTitleBox"; 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) => { @@ -26,7 +29,11 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => { const [collapsible, setCollapsible] = useState(false) const [treeView, setTreeView] = useState() const [printIndex, setPrintIndex] = useState(new Date().getTime()) - + // 展开的行 + const [expandedRowKeys, setExpandedRowKeys] = useState([]) + const [currenMenu, setCurrenMenu] = useState(); // 当前选中左侧菜单的服务区节点 + // 树相关的属性和方法 + const [currenRegion, setCurrenRegion] = useState(); // 当前选中左侧菜单的片区节点 // 树相关的属性和方法 const [selectedId, setSelectedId] = useState() @@ -37,6 +44,26 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => { // 查询的条件 const [searchParams, setSearchParams] = useState() + // 加载服务区树 + 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 = [ { title: '统计时间', @@ -44,202 +71,168 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => { valueType: 'dateRange', hideInTable: true, hideInDescriptions: true, - initialValue: [moment().subtract(1, 'month'), moment()], + initialValue: [moment().subtract(7, 'days'), moment().add(-1, 'day')], search: { - transform: (value: any) => { + transform: (value) => { return { - StartDate: value[0], - EndDate: value[1], + startDate: value[0], + endDate: value[1], }; }, }, + fieldProps: { + disabledDate: (current: any) => current && current > moment().endOf('day') + } }, { - title: "序号", - dataIndex: "index", - align: 'center', - valueType: "index", - width: 80, - ellipsis: true - }, - { - title:
服务区名称
, - dataIndex: "", - align: 'center', + title: '服务区信息', + dataIndex: '', hideInSearch: true, - width: 150, - ellipsis: true, + children: [ + { + title: '序号', + width: 120, + align: 'center', + dataIndex: 'index', + valueType: "index" + }, + { + title: '服务区名称', + width: 200, + ellipsis: true, + align: 'center', + dataIndex: 'Name', + }, + { + title:
异常总数
, + width: 120, + align: 'right', + dataIndex: 'EXCEPTIONTYPE', + }, + ] }, { - title:
异常总数
, - dataIndex: "", - align: 'right', + title: '稽核必查', + dataIndex: 'EXCEPTIONTYPEA', hideInSearch: true, - width: 120, - ellipsis: true, - }, - { - title:
稽核必查
, - dataIndex: "", - align: 'center', - hideInSearch: true, - ellipsis: true, children: [ { title:
连续单清
, - dataIndex: "", - align: 'right', - hideInSearch: true, width: 120, - ellipsis: true, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_B', }, { title:
整单清除
, - dataIndex: "", - align: 'right', - hideInSearch: true, width: 120, - ellipsis: true, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_C', }, { title:
每单必打
, - dataIndex: "", - align: 'right', - hideInSearch: true, width: 120, - ellipsis: true, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_Z', }, { title:
销售退货
, - dataIndex: "", - align: 'right', - hideInSearch: true, width: 120, - ellipsis: true, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_F', }, { title:
异常交易
, - dataIndex: "", - align: 'right', - hideInSearch: true, width: 120, - ellipsis: true, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_G', }, { title:
单品数量超限
, - dataIndex: "", - align: 'right', - hideInSearch: true, width: 150, - ellipsis: true, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_L', }, { title:
单品金额超限
, - dataIndex: "", - align: 'right', - hideInSearch: true, width: 150, - ellipsis: true, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_M', }, { title:
数量及金额超限
, - dataIndex: "", - align: 'right', - hideInSearch: true, width: 170, - ellipsis: true, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_R', }, { title:
总数
, - dataIndex: "", + width: 100, align: 'right', - hideInSearch: true, - width: 120, - ellipsis: true, - }, - ] - }, - { - title:
稽核抽查
, - dataIndex: "", - align: 'center', - hideInSearch: true, - ellipsis: true, - children: [ - { - title:
单行清除
, - dataIndex: "", - align: 'right', - hideInSearch: true, - width: 120, - ellipsis: true, - }, - { - title:
小票重打
, - dataIndex: "", - align: 'right', - hideInSearch: true, - width: 120, - ellipsis: true, - }, - { - title:
异常重打小票
, - dataIndex: "", - align: 'right', - hideInSearch: true, - width: 150, - ellipsis: true, - }, - { - title:
非销售开钱箱
, - dataIndex: "", - align: 'right', - hideInSearch: true, - width: 150, - ellipsis: true, - }, - { - title:
单价修改
, - dataIndex: "", - align: 'right', - hideInSearch: true, - width: 120, - ellipsis: true, - }, - { - title:
整单折扣
, - dataIndex: "", - align: 'right', - hideInSearch: true, - width: 120, - ellipsis: true, - }, - { - title:
单项折扣
, - dataIndex: "", - align: 'right', - hideInSearch: true, - width: 120, - ellipsis: true, - }, - { - title:
单项优惠
, - dataIndex: "", - align: 'right', - hideInSearch: true, - width: 120, - ellipsis: true, - }, - { - title:
总数
, - dataIndex: "", - align: 'right', - hideInSearch: true, - width: 120, - ellipsis: true, + dataIndex: 'TotalMust', } ] }, + { + title: '稽核抽查', + dataIndex: 'EXCEPTIONTYPEB', + hideInSearch: true, + children: [ + { + title:
单行清除
, + width: 120, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_A', + }, + { + title:
小票重打
, + width: 120, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_H', + }, + { + title:
异常重打小票
, + width: 150, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_I', + }, + { + title:
非销售开钱箱
, + width: 150, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_J', + }, + { + title:
单价修改
, + width: 120, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_N', + }, + { + title:
整单折扣
, + width: 120, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_O', + }, + { + title:
单项折扣
, + width: 120, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_P', + }, + { + title:
单项优惠
, + width: 120, + align: 'right', + dataIndex: 'EXCEPTIONTYPE_Q', + }, + { + title:
总数
, + width: 100, + align: 'right', + dataIndex: 'TotalMay', + }, + ] + } ] const exportTable = (e) => { @@ -264,7 +257,102 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => { 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 ( + {element.label} + {/* + [{element.desc}] */} + : element.label} + icon={element.ico ? : 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)} + + ) + } + // 绑定嵌套树的子节点 + if (element.children && element.children.length > 0) { + return ( + : 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)} + + ) + } + return ( : null} + key={`${element.key || element.value}`}> + {element.desc !== '0' ? <>{element.label} + {/* + [{element.desc}] */} + : element.label}) + } + // 绑定嵌套树的子节点 + if (element.children && element.children.length > 0) { + return ( + {element.label} + {/* + [{element.desc}] */} + : element.label} + icon={element.ico ? : 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)} + + ) + } + return ( : null} + key={`${element.key || element.value}`}>{element.desc !== '0' ? <>{element.label} + {/* + [{element.desc}] */} + : element.label}) + })) + } return (
{ // 打印报表 @@ -317,7 +405,28 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
- + { setCollapsible(!collapsible) }} />} + colSpan={!collapsible ? "300px" : "60px"} + title={!collapsible ? "请选择服务区" : ""} + headerBordered + collapsed={collapsible} + > + {!treeLoading && { + loadSelectedId(item) + }} + > + {getMenuDom(treeView, loadSelectedId)} + } +
= (props) => { actionRef={actionRef} formRef={formRef} columns={columns} + rowKey={(record) => record?.Id + record?.Name} bordered expandable={{ - expandRowByClick: true + expandRowByClick: true, + expandedRowKeys: expandedRowKeys }} scroll={{ x: "100%", y: "calc(100vh - 410px)" }} headerTitle={} // 列表表头 @@ -339,8 +450,61 @@ const shopAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => { if (!selectedId) { return } - + const req = { + ...params, + ServerpartIds: selectedId, + ShowShop: true + } + handleCallLogs() 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={{ actions: [ diff --git a/src/pages/reports/audit/spAbnormalReport/index.tsx b/src/pages/reports/audit/spAbnormalReport/index.tsx index 2682619..6c8130e 100644 --- a/src/pages/reports/audit/spAbnormalReport/index.tsx +++ b/src/pages/reports/audit/spAbnormalReport/index.tsx @@ -344,7 +344,6 @@ const spAbnormalReport: React.FC<{ currentUser: CurrentUser }> = (props) => { /> : ''} */} -
{ +const DailyRevenue = ({ time, ServerpartShopIds, currentRow }: { time: any, ServerpartShopIds: string, currentRow: any }) => { const [reqDetailList, setReqDetailList] = useState(); // 合计项数据源 const [printOut, setPrintOut] = useState(); // 打印数据的内容 - const [showDetail,setShowDetail] = useState(false) - const [drawerLoading,setDrawerLoading] = useState(false) - const [newCurrent,setNewCurrent] = useState() + const [showDetail, setShowDetail] = useState(false) + const [drawerLoading, setDrawerLoading] = useState(false) + const [newCurrent, setNewCurrent] = useState() const columns: any = [ // { @@ -74,22 +74,22 @@ const DailyRevenue = ({time,ServerpartShopIds,currentRow}: {time: any,Serverpart defaultSortOrder: 'descend', render: (_, record) => { return record?.Statistics_Date ? - { - console.log('record',record) - console.log('currentRow',currentRow) + { + console.log('record', record) + console.log('currentRow', currentRow) setNewCurrent({ ...currentRow, Statistics_Date: currentRow?.startDate, - BusinessProject_Id:currentRow?.BUSINESSPROJECT_ID, + BusinessProject_Id: currentRow?.BUSINESSPROJECT_ID, Serverpart_Name: currentRow?.SERVERPART_NAME, - ServerpartShop_Name:currentRow?.Name + ServerpartShop_Name: currentRow?.Name }) setShowDetail(true) }}>{record?.Statistics_Date} : - {record?.shopName ? record?.shopName : record?.SPRegionType_Name ? record?.SPRegionType_Name : record?.Serverpart_Name ? record?.Serverpart_Name : record?.ServerpartShop_Name} + {record?.shopName ? record?.shopName : record?.SPRegionType_Name ? record?.SPRegionType_Name : record?.Serverpart_Name ? record?.Serverpart_Name : record?.ServerpartShop_Name} {/* {record?.SPRegionType_Name?`${record?.SPRegionType_Name}[${record?.Project_Count}]`:record?.Serverpart_Name ? record?.Serverpart_Name : record?.ServerpartShop_Name} */} - + } }, { @@ -188,14 +188,14 @@ const DailyRevenue = ({time,ServerpartShopIds,currentRow}: {time: any,Serverpart const req = { StartDate: time[0] || '', EndDate: time[1] || '', - ServerpartShopIds:ServerpartShopIds || '', - CompareSplit:false + ServerpartShopIds: ServerpartShopIds || '', + CompareSplit: false } - console.log('req',req) + console.log('req', req) const data = await handleGetRoyaltyReport(req) - console.log('data',data) + console.log('data', data) let list: any = [] - if (data.data && data.data.length>0){ + if (data.data && data.data.length > 0) { list = JSON.parse(JSON.stringify(data.data)) let Royalty_PriceSum: number = 0 let Ticket_PriceSum: number = 0 @@ -203,16 +203,16 @@ const DailyRevenue = ({time,ServerpartShopIds,currentRow}: {time: any,Serverpart let SubRoyalty_PriceSum: number = 0 let Ticket_FeeSum: number = 0 - list.forEach((item: any)=>{ - Royalty_PriceSum+=item.Royalty_Price - Ticket_PriceSum+=item.Ticket_Price - Account_PriceSum+=item.Account_Price - SubRoyalty_PriceSum+=item.SubRoyalty_Price - Ticket_FeeSum+=item.Ticket_Fee + list.forEach((item: any) => { + Royalty_PriceSum += item.Royalty_Price + Ticket_PriceSum += item.Ticket_Price + Account_PriceSum += item.Account_Price + SubRoyalty_PriceSum += item.SubRoyalty_Price + Ticket_FeeSum += item.Ticket_Fee item.children = undefined }) list.unshift({ - shopName:'合计', + shopName: '合计', Royalty_Price: Royalty_PriceSum, Ticket_Price: Ticket_PriceSum, Account_Price: Account_PriceSum, @@ -220,11 +220,11 @@ const DailyRevenue = ({time,ServerpartShopIds,currentRow}: {time: any,Serverpart Ticket_Fee: Ticket_FeeSum, }) } - console.log('list',list) - return {data: list,success: true} + console.log('list', list) + return { data: list, success: true } }} tableExtraRender={() => { - return
+ return
{currentRow?.SERVERPART_NAME} {currentRow?.Name} @@ -243,11 +243,11 @@ const DailyRevenue = ({time,ServerpartShopIds,currentRow}: {time: any,Serverpart closable={false} destroyOnClose > - +
) } -export default connect(({user}: ConnectState) => ({ +export default connect(({ user }: ConnectState) => ({ currentUser: user.currentUser }))(DailyRevenue); diff --git a/src/pages/reports/revenueConfirmation/index.tsx b/src/pages/reports/revenueConfirmation/index.tsx index f9d3579..db60532 100644 --- a/src/pages/reports/revenueConfirmation/index.tsx +++ b/src/pages/reports/revenueConfirmation/index.tsx @@ -1,3 +1,4 @@ +// 分账收银收入确认表 import React, { useRef } from "react"; import type { CurrentUser } from "umi"; import { connect } from "umi"; @@ -385,7 +386,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { } else { obj.endTime = endDate } - console.log('obj', obj) setCompareCurrent(obj) setShowCompareDrawer(true) }}>{numeral(record?.REVENUEDAILY_AMOUNTTotal).format('0,0.00')} : {numeral(record?.REVENUEDAILY_AMOUNTTotal).format('0,0.00')} @@ -994,7 +994,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { container.appendChild(tempTable); // 把创建的节点添加到页面容器中 setShowLoading(false) - console.log('downloadBtnRef', downloadBtnRef); downloadBtnRef.current.handleDownload(); setShowExportTable(false) @@ -1009,15 +1008,12 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { // compareList组件跳转月份的方法 const handleGetNewMonth = async (obj: any, time: any) => { setShowCompareDrawer(false) - console.log('obj', obj); - console.log('time', time); const req = { BusinessProjectId: obj?.BUSINESSPROJECT_ID, StatisticsMonth: moment(time).format('YYYYMM'), ShopRoyaltyId: obj?.ShopRoyaltyId, } const data = await handleGetProjectPeriodIncome(req) - console.log('data', data); if (data && data.length > 0) { let obj: 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 selectedAreaIds = info.checkedNodes.filter(n => n?.type === 0) setSelectedId(selectedIds.map(n => n?.value)?.toString() || '') - console.log('selectedAreaIds', selectedAreaIds.map(n => n?.value)?.toString() || ''); setSelectAreaId(selectedAreaIds.map(n => n?.value)?.toString() || '') // actionRef?.current?.reload() // 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}月`) setMonthTime(params.MonthDate) } - console.log('params', params); setSearchParams(params) // let SETTLEMENT_MODESSTR: string = '' @@ -1195,7 +1189,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { if (selectedId.indexOf(',') === -1) { isOneServerPart = true } - console.log('selectedAreaId', selectedAreaId); if (selectedAreaId && selectedAreaId.indexOf(',') === -1) { isOneArea = true @@ -1212,7 +1205,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { ShowHisProject: params?.ShowHisProject === 'true' ? true : params?.ShowHisProject === 'false' ? false : '' } const res = await handleGetTableRevenueRecognitionOtherData(req) - console.log('res', res) setOtherData(res.OtherData) const data = res.List setDefaultTableData(data) @@ -1225,7 +1217,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { PageSize: 999999 }) - console.log('taxRate', taxRate); const taxRateObj: any = {} if (taxRate && taxRate.length > 0) { taxRate.forEach((item: any) => { @@ -1233,8 +1224,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { }) } const list: any = JSON.parse(JSON.stringify(wrapTreeNode(data))) - console.log('list', list); - console.log('taxRateObj', taxRateObj); // 下面处理的各种东西太多了 把判断税率是否正确 放在上面 多遍历一遍 list.forEach((item: any) => { @@ -1320,7 +1309,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { } }) } - console.log('exportList', exportList); if (exportList && exportList.length > 0) { const exportRes: any = JSON.parse(JSON.stringify(exportList)) // 期收入 @@ -1378,19 +1366,11 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { DiffRevenueAmount: handleHighPrecision(DiffRevenueAmountSum), MonthlyIncome: handleHighPrecision(MonthlyIncomeSum) }) - console.log('exportRes', exportRes); - setExportTableData(exportRes) } else { setExportTableData([]) } - - - - - console.log('isOneServerPart', isOneServerPart); - console.log('isOneArea', isOneArea); const res: any = [] if (isOneServerPart) { list.forEach((item: any) => { @@ -1400,12 +1380,9 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { }) } }) - console.log('setExportTableData1', res); - return { data: res, success: true } } if (!isOneArea) { - console.log('list', list); if (list && list.length > 0) { // 期收入 let MINTURNOVERSUM: number = 0 @@ -1452,7 +1429,6 @@ const revenueConfirmation: React.FC<{ currentUser: CurrentUser }> = (props) => { DailyRevenueAmount: handleHighPrecision(DailyRevenueAmountSum), DiffRevenueAmount: handleHighPrecision(DiffRevenueAmountSum) }) - console.log('setExportTableData2', list); return { data: list, success: true } } } diff --git a/src/pages/reports/shareRoyalty/index.tsx b/src/pages/reports/shareRoyalty/index.tsx index d8626f1..4f29278 100644 --- a/src/pages/reports/shareRoyalty/index.tsx +++ b/src/pages/reports/shareRoyalty/index.tsx @@ -1,3 +1,4 @@ +// 银行到账核对 import React, { useEffect } from 'react'; import moment from 'moment'; 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 // return isRed?{ // if (record?.ServerpartShop_Name && !record?.ServerpartShop_Code){ - // console.log('record',record) // setCurrentRow(record) // 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') : '-'} */} // :{ // - // console.log('statisticsSame',statisticsSame) // }}> // {record?.RoyaltyProject_Price ? numeral(record.RoyaltyProject_Price).format('0,0.00') : '-'} // return { - console.log('statisticsSame', statisticsSame) }}> {record?.RoyaltyProject_Price ? numeral(record.RoyaltyProject_Price).format('0,0.00') : '-'} @@ -389,9 +387,7 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, const isRed: boolean = (record?.MobilePay_Price > record?.Ticket_Price) && statisticsSame return isRed ? 上游流水(${record?.Ticket_Price || 0})`}> { - console.log('record', record); if (record?.ServerpartShop_Name && !record?.ServerpartShop_Code) { - console.log('record', record) setCurrentRow(record) setChangeRevenueDrawer(true) } else if (record?.ServerpartShop_Name && record?.ServerpartShop_Code) { @@ -466,16 +462,12 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, onClick={() => { // setCurrentRow(record) // setFlowDrawer(true) - console.log('record', record) const res = JSON.parse(JSON.stringify(record)) - console.log('statisticsTime', statisticsTime); - console.log('searchParams', searchParams); const time = searchParams?.EndDate res.Statistics_Date = moment(time).format('YYYY-MM-DD') res.BusinessProject_Id = record.BusinessProject_ID res.ServerpartShop_ID = record.newServerpartShop_ID res.Serverpart_Name = record.newServerpart_Name - console.log('res', res) setCurrentRow(res); setHaveFlowDrawer(true); }}> @@ -522,11 +514,8 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, return 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) { const res: any = formRef.current?.getFieldsValue() - console.log('res', res); const [start, end] = res.search_date 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) setDifferenceDrawer(true) } @@ -655,7 +644,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, const isRed: boolean = (record?.MobilePay_Price > record?.Ticket_Price) return isRed ? { if (record?.ServerpartShop_Name && !record?.ServerpartShop_Code) { - console.log('record', record) setCurrentRow(record) setChangeRevenueDrawer(true) } @@ -1157,13 +1145,11 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, } else { desc = `${currentUser?.Name}【${moment().format('YYYY-MM-DD')}】:\n${allNewDesc}` } - console.log('desc', desc) const req = { ...changeRevenueTopData, BUSINESSPROJECTSPLIT_DESC: desc || '', SETTLEMENT_STATE: 1 } - console.log('req', req) const data = await SynchroBUSINESSPROJECTSPLIT(req) const list: any = [] @@ -1173,11 +1159,9 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, list.push(item) }) } - console.log('list', list) const revenueReq = list const revenueData = await SynchroREVENUEDAILYSPLIT(revenueReq) - console.log('revenueData', revenueData) if (data.Result_Code === 100) { message.success(data.Result_Desc) } else { @@ -1469,8 +1453,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, { - console.log('e', e); - if (e) { setStatisticsTime([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([]) const formRes: any = formRef.current?.getFieldsValue() - console.log('formRes', formRes); let [searchStartTime, searchEndTime]: any = activeKey === '1' ? formRes?.search_date : formRes?.search_months - console.log('searchStartTime', searchStartTime); - console.log('searchEndTime', searchEndTime); - - if (searchStartTime === searchEndTime) { setStatisticsSame(true) } else { setStatisticsSame(false) } - console.log('activeKey', activeKey); - console.log('params', params); if (params && 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') } } - console.log('compareCurrent', compareCurrent); - console.log('isComponents', isComponents); - console.log('searchEndTime', searchEndTime); - console.log('searchStartTime', searchStartTime); const req: any = { DataType: 1, StartDate: isComponents ? compareCurrent?.searchStart : searchStartTime, @@ -1555,7 +1526,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, } setSearchParams(req) const data = await getMobilePayRoyaltyReport(req); - console.log('data', data); // 给最里层的门店加一个标识 data.data.forEach((item: any) => { @@ -1608,7 +1578,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, setNoShopList([]) } const res = JSON.parse(JSON.stringify(data.data)) - console.log('1', res); if (res && res.length > 0) { const reduceData = res.reduce((p: { 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) } } - console.log('232131321', data) if (data.data && data.data.length > 0) { const exportList: any = [] 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) } @@ -2218,7 +2185,6 @@ const ReportTable: React.FC<{ currentUser?: CurrentUser, isComponents?: boolean, bodyStyle={{ backgroundColor: "#fff", padding: 16 }} footer={
}