diff --git a/package.json b/package.json index 0f2becb..97ff304 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-pro", - "version": "4.5.40", + "version": "4.5.42", "private": true, "description": "An out-of-box UI solution for enterprise applications", "scripts": { diff --git a/src/pages/DataVerification/handleDailyError/list.tsx b/src/pages/DataVerification/handleDailyError/list.tsx index 00c54f7..9f91f4b 100644 --- a/src/pages/DataVerification/handleDailyError/list.tsx +++ b/src/pages/DataVerification/handleDailyError/list.tsx @@ -193,6 +193,28 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => { } }) setSelectServicePartId(list[0].value) + + + const req = { + SearchParameter: { + SERVERPART_IDS: list[0].value, + ISVALID: 1 + }, + PageIndex: 1, + PageSize: 999999, + SortStr: "SHOPREGION,SHOPTRADE,SHOPSHORTNAME,SHOPCODE" + } + const data = await handleGetServerpartShopList(req) + console.log('shop', data); + let shopList: any = [] + if (data && data.length > 0) { + data.forEach((item: any) => { + shopList.push({ label: item.SHOPNAME, value: item.SHOPCODE }) + }) + } + + setSelectShopId(null) + setShopList(shopList) } return list }) diff --git a/src/pages/DataVerification/list/components/ItemDetail.tsx b/src/pages/DataVerification/list/components/ItemDetail.tsx index 3144621..94c17ef 100644 --- a/src/pages/DataVerification/list/components/ItemDetail.tsx +++ b/src/pages/DataVerification/list/components/ItemDetail.tsx @@ -157,6 +157,8 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a } const handleGetItemDetail = async () => { + console.log('currentRowcurrentRowcurrentRow', currentRow); + setShowChangeLoading(true) const req = { RoleType: 1, @@ -166,6 +168,8 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a EndDate: moment(searchTime[1]).format('YYYY-MM-DD'), } const data = await handleBrandDetailList(req) + console.log('dsadasdsad', data); + const resultData = JSON.parse(JSON.stringify(data)) setTopDetail(resultData) if (resultData.VerifyList && resultData.VerifyList.length > 0) { @@ -192,6 +196,7 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a setLeftTimeList([resultData.VerifyList, resultData.VerifiedList][selectTab - 1]) + console.log('selectTabListselectTabListselectTabList', selectTabList) if (selectTabList[0].number === 0) { setSelectTab(2) @@ -207,8 +212,8 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a if (leftList && leftList.length > 0) { // setSelectLeftTime(leftList[0].value) // handleGetDetail(leftList[0].value, selectTab) - setSelectLeftTime(currentRow?.Endaccount_Id) - handleGetDetail(currentRow?.Endaccount_Id, selectTab) + setSelectLeftTime(currentRow?.Endaccount_Id || leftList[0].value) + handleGetDetail(currentRow?.Endaccount_Id || leftList[0].value, selectTab) } else { formRef.current?.resetFields() } @@ -278,23 +283,23 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a EndaccountId: id } const data = await handleDetail(req) - setAuditTableData(data.AuditInfoList) + setAuditTableData(data?.AuditInfoList || []) if (tabSelect !== 2) { - handleGetShopPriceData(1, data.Endaccount_Id) - handleGetShopPriceData(3, data.Endaccount_Id) - if (data.ShowCigarette) { - handleGetShopPriceData(2, data.Endaccount_Id, data.CigaretteType) + handleGetShopPriceData(1, data?.Endaccount_Id) + handleGetShopPriceData(3, data?.Endaccount_Id) + if (data?.ShowCigarette) { + handleGetShopPriceData(2, data?.Endaccount_Id, data?.CigaretteType) } } setCurrentDetail(data) formRef.current?.setFieldsValue( { ...data, - AvgTicketPrice: data.Ticket_Count ? fmoney(data.TotalSell_Amount / data.Ticket_Count, 2) : '' + AvgTicketPrice: data?.Ticket_Count ? fmoney(data?.TotalSell_Amount / data?.Ticket_Count, 2) : '' } ) setShowChangeLoading(false) - getPictureList(data.Endaccount_Id) + getPictureList(data?.Endaccount_Id || "") } const handleGetShopPriceData = async (type: number, id: number, CigaretteType?: any) => { @@ -325,23 +330,23 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a setProductData(data) formRef?.current?.setFieldsValue({ ...data, - SellCount_Sale: data.count, - FactAmount_Sale: data.amount + SellCount_Sale: data?.count, + FactAmount_Sale: data?.amount }) } else if (type === 2) { setCigarettePayment(data) formRef?.current?.setFieldsValue({ ...data, - FactAmount_Cigarette: data.amount, - SellCount_Cigarette: data.count + FactAmount_Cigarette: data?.amount, + SellCount_Cigarette: data?.count }) } else if (type === 3) { setMobilePayment(data) formRef?.current?.setFieldsValue({ ...data, - FactAmount_Mobilepayment: data.amount + FactAmount_Mobilepayment: data?.amount }) } setShowChangeLoading(false) @@ -350,6 +355,9 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a const getPictureList = (id: any) => { setShowChangeLoading(true) + if (!id) { + return + } const req = { TableId: id, TableName: "ENDACCOUNT", diff --git a/src/pages/ahjgPage/InventoryDetails/components/COMMODITYINFO.tsx b/src/pages/ahjgPage/InventoryDetails/components/COMMODITYINFO.tsx index 37d66fe..80b075f 100644 --- a/src/pages/ahjgPage/InventoryDetails/components/COMMODITYINFO.tsx +++ b/src/pages/ahjgPage/InventoryDetails/components/COMMODITYINFO.tsx @@ -611,7 +611,7 @@ const COMMODITYINFO = ({ onShow, onCancel, parentRow }: DetailProps) => { options={false} scroll={{ x: '100%', y: 400 }} request={async (params) => { - + console.log('parentRow', parentRow); // 拿个商品详情 const commodityDetail = await handleGetGetCOMMODITYDetail({ COMMODITYId: parentRow?.COMMODITY_ID }) setCommodityInfo(commodityDetail) diff --git a/src/pages/ahjgPage/InventoryDetails/components/InventoryDetailModal.tsx b/src/pages/ahjgPage/InventoryDetails/components/InventoryDetailModal.tsx index bc3b5e4..b1e76d5 100644 --- a/src/pages/ahjgPage/InventoryDetails/components/InventoryDetailModal.tsx +++ b/src/pages/ahjgPage/InventoryDetails/components/InventoryDetailModal.tsx @@ -169,11 +169,11 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps } else if (item.OPERATE_TYPE === 6000) { obj = { ...obj, - PURCHASE_COUNT: item.OPERATE_COUNT,// 入库数量 + OVERPLUSCOUNT: item.OPERATE_COUNT,// 入库数量 PURCHASE_TAXPRICE: item.PURCHASE_TAXPRICE,// 含税单价 - PURCHASE_TOTALTAXPRICE: item.OPERATE_TAXAMOUNT,// 含税金额 + OVERPLUS_AMOUNT: item.OPERATE_TAXAMOUNT,// 含税金额 PURCHASE_PRICE: item.PURCHASE_PRICE,// 除税单价 - LAST_OVERPLUSPRICE: item.OPERATE_AMOUNT,// 上期库存除税 + OVERPLUS_PRICE: item.OPERATE_AMOUNT,// 上期库存除税 } } else if (item.OPERATE_TYPE === 6001) { obj = { @@ -190,7 +190,12 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps LAST_OVERPLUSPRICE: item.OPERATE_AMOUNT,// 上期库存除税 } } else if (item.OPERATE_TYPE === 6003) { - + obj = { + ...obj, + LAST_LOSSPROFIT_COUNT: item.OPERATE_COUNT,// 上期损溢数量 + LAST_LOSSPROFIT_AMOUNT: item.OPERATE_TAXAMOUNT,// 上期损溢金额 + LAST_LOSSPROFIT_PRICE: item.OPERATE_AMOUNT,// 上期损溢除税 + } } }) } @@ -199,8 +204,10 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps console.log('detaildetaildetaildetail', detail); obj = { ...obj, + ...detail, SERVERPART_NAME: parentRow?.Serverpart_Name, // 服务区名 SHOPNAME: parentRow?.ServerpartShop_Name, // 门店名称 + SERVERPARTSHOP_ID: parentRow?.ServerpartShop_Id, // 门店ID COMMODITY_CODE: detail?.COMMODITY_CODE, // 商品编码 BUSINESSTYPE: detail?.BUSINESSTYPE, // 业态 COMMODITY_TYPE: detail?.COMMODITY_TYPE, // 商品类型 @@ -211,6 +218,7 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps CHECKDATE_Start: "", CHECKDATE: "", } + setCommodityDetail(obj) return obj } else { if (!parentRow?.INSALES_STATISTIC_ID) { @@ -341,7 +349,7 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps = (props) => { // hideInSearch: true // }, { - title: '业务名称', + title:
业务名称
, width: 400, ellipsis: true, dataIndex: 'BusinessProcess_Name', @@ -422,8 +423,8 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => { } }, { - title: '经办人', - width: 120, + title:
经办人
, + width: 140, dataIndex: 'Staff_Name', ellipsis: true, hideInSearch: true, @@ -433,6 +434,14 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => { } }, + { + title: '经营商户', + width: 140, + dataIndex: 'MERCHANTS_NAME', + align: 'center', + ellipsis: true, + hideInSearch: true, + }, { title: '业务时间', width: 100, @@ -444,7 +453,7 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => { } }, { - title: '业务状态', + title:
业务状态
, width: 300, ellipsis: true, dataIndex: 'BusinessProcess_States', @@ -454,7 +463,7 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => { hideInTable: busninessType === 2, // hideInSearch: true, render: (_, record) => { - return record?.BusinessProcess_State ? `${monthStateObj[record?.BusinessProcess_State]}${record?.BusinessProcess_State === 9000 ? '' : `:${record?.ApproveStaff_Name}`}` : '' + return record?.BusinessProcess_State && monthStateObj ? `${monthStateObj[record?.BusinessProcess_State]}${record?.BusinessProcess_State === 9000 ? '' : `:${record?.ApproveStaff_Name}`}` : '' } }, { @@ -531,6 +540,7 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => { title: '本期累计时间', width: 180, ellipsis: true, + align: 'center', hideInTable: busninessType === 2, dataIndex: 'STARTDATEENDDATE', hideInSearch: true, diff --git a/src/pages/merchantManagement/reports/CommitySaleReport/index.tsx b/src/pages/merchantManagement/reports/CommitySaleReport/index.tsx index b249556..1735f6c 100644 --- a/src/pages/merchantManagement/reports/CommitySaleReport/index.tsx +++ b/src/pages/merchantManagement/reports/CommitySaleReport/index.tsx @@ -127,6 +127,7 @@ const CommoditysaleTable: React.FC<{ currentUser: CurrentUser | undefined }> = ( picker: "month", format: 'YYYY-MM', disabledDate: (current: any) => current && current > moment().subtract(2, 'months').startOf("month") + // 月度数据 查询的是历史的 所以中间必须要隔一个月份 不能修改 } }, { diff --git a/src/pages/reports/BusinessAnalysis/cigaretteReport/index.tsx b/src/pages/reports/BusinessAnalysis/cigaretteReport/index.tsx index fd912e9..c5ed94d 100644 --- a/src/pages/reports/BusinessAnalysis/cigaretteReport/index.tsx +++ b/src/pages/reports/BusinessAnalysis/cigaretteReport/index.tsx @@ -373,7 +373,7 @@ const cigaretteReport: React.FC<{ currentUser: CurrentUser }> = (props) => { expandable={{ expandRowByClick: true }} - scroll={{ x: 'max-content', y: 'calc(100vh - 450px)' }} + scroll={{ x: 'max-content', y: 'calc(100vh - 470px)' }} headerTitle={} search={{ span: 6 }} request={async (params) => { diff --git a/src/pages/reports/BusinessAnalysis/personSellReport/index.tsx b/src/pages/reports/BusinessAnalysis/personSellReport/index.tsx index bd5e52b..076cd5f 100644 --- a/src/pages/reports/BusinessAnalysis/personSellReport/index.tsx +++ b/src/pages/reports/BusinessAnalysis/personSellReport/index.tsx @@ -1,3 +1,4 @@ +// 收银员统计表 import { connect } from "umi"; import type { CurrentUser } from "umi"; import type { ConnectState } from "@/models/connect"; @@ -360,7 +361,7 @@ const personSellReport: React.FC<{ currentUser: CurrentUser }> = (props) => { formRef={formRef} columns={columns} bordered - scroll={{ x: 1600 }} + scroll={{ x: '100%', y: 'calc(100vh - 520px)' }} // pagination={false} headerTitle={} search={{ span: 8 }} diff --git a/src/pages/reports/BusinessAnalysis/saleFlow/index.tsx b/src/pages/reports/BusinessAnalysis/saleFlow/index.tsx index 67f8cd2..c7af533 100644 --- a/src/pages/reports/BusinessAnalysis/saleFlow/index.tsx +++ b/src/pages/reports/BusinessAnalysis/saleFlow/index.tsx @@ -303,7 +303,7 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => actionRef={actionRef} search={{ span: 6 }} pagination={{ pageSize: 20 }} - scroll={{ x: '100%', y: 'calc(100vh - 470px)' }} + scroll={{ x: '100%', y: 'calc(100vh - 590px)' }} request={async (params) => { if (selectedId || currenMenu) { handleCallLogs() diff --git a/src/pages/reports/BusinessAnalysis/saleHisReport/index.tsx b/src/pages/reports/BusinessAnalysis/saleHisReport/index.tsx index 822e0e7..8a63055 100644 --- a/src/pages/reports/BusinessAnalysis/saleHisReport/index.tsx +++ b/src/pages/reports/BusinessAnalysis/saleHisReport/index.tsx @@ -1,3 +1,5 @@ +// 历史销售单品报表 + import { connect } from "umi"; import type { CurrentUser } from "umi"; import type { ConnectState } from "@/models/connect"; @@ -326,7 +328,7 @@ const saleHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => { columns={columns} bordered headerTitle={} - scroll={{ y: 'calc(100vh - 470px)' }} + scroll={{ y: 'calc(100vh - 540px)' }} search={{ span: 6 }} pagination={{ pageSize: 100 }} request={async (params) => { diff --git a/src/pages/reports/BusinessAnalysis/saleRankReport/index.tsx b/src/pages/reports/BusinessAnalysis/saleRankReport/index.tsx index 09eaeb5..bdcf964 100644 --- a/src/pages/reports/BusinessAnalysis/saleRankReport/index.tsx +++ b/src/pages/reports/BusinessAnalysis/saleRankReport/index.tsx @@ -173,10 +173,10 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => { hideInSearch: true }, { - title: '商品名称', - width: 240, + title:
商品名称
, + width: 250, ellipsis: true, - align: 'center', + align: 'left', dataIndex: 'Commodity_Name', hideInSearch: true }, diff --git a/src/pages/reports/BusinessAnalysis/saleReport/index.tsx b/src/pages/reports/BusinessAnalysis/saleReport/index.tsx index 29c8f67..7e44f54 100644 --- a/src/pages/reports/BusinessAnalysis/saleReport/index.tsx +++ b/src/pages/reports/BusinessAnalysis/saleReport/index.tsx @@ -1,3 +1,4 @@ +// 销售单品报表 区域销售单品报表 import { connect } from "umi"; import type { CurrentUser } from "umi"; import type { ConnectState } from "@/models/connect"; @@ -190,9 +191,9 @@ const saleReport: React.FC<{ currentUser: CurrentUser }> = (props) => { { dataIndex: 'Commodity_Name', title:
商品名称
, - width: 150, + width: 250, ellipsis: true, - align: 'center', + align: 'left', hideInSearch: true, sorter: (a, b) => a.Commodity_Name.localeCompare(b.Commodity_Name) }, @@ -369,7 +370,7 @@ const saleReport: React.FC<{ currentUser: CurrentUser }> = (props) => { bordered headerTitle={} search={{ span: 6 }} - scroll={{ x: "100%", y: 'calc(100vh - 490px)' }} + scroll={{ x: "100%", y: 'calc(100vh - 510px)' }} pagination={{ pageSize: 100 }} request={async (params, sorter) => { if (isFirst) { diff --git a/src/pages/reports/BusinessAnalysis/saleTypeHisReport/index.tsx b/src/pages/reports/BusinessAnalysis/saleTypeHisReport/index.tsx index aa3f04e..069c056 100644 --- a/src/pages/reports/BusinessAnalysis/saleTypeHisReport/index.tsx +++ b/src/pages/reports/BusinessAnalysis/saleTypeHisReport/index.tsx @@ -304,6 +304,7 @@ const saleTypeHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => { bordered headerTitle={} search={{ span: 6 }} + scroll={{ x: '100%', y: 'calc(100vh - 540px)' }} request={async (params) => { if (isFirst) { setIsFirst(false) diff --git a/src/pages/reports/BusinessAnalysis/transactionAnalysis/index.tsx b/src/pages/reports/BusinessAnalysis/transactionAnalysis/index.tsx index 82c3ab2..6c86a1f 100644 --- a/src/pages/reports/BusinessAnalysis/transactionAnalysis/index.tsx +++ b/src/pages/reports/BusinessAnalysis/transactionAnalysis/index.tsx @@ -474,7 +474,7 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => { bordered headerTitle={} search={{ span: 6, defaultCollapsed: false, }} - scroll={{ y: 'calc(100vh - 470px)' }} + scroll={{ x: '100%', y: 'calc(100vh - 520px)' }} request={async (params) => { if (isFirst) { setIsFirst(false) diff --git a/src/pages/reports/audit/abnormalAmount/index.tsx b/src/pages/reports/audit/abnormalAmount/index.tsx index 01140d0..944c64d 100644 --- a/src/pages/reports/audit/abnormalAmount/index.tsx +++ b/src/pages/reports/audit/abnormalAmount/index.tsx @@ -1,3 +1,4 @@ +// 销售金额异常 import { connect } from "umi"; import type { CurrentUser } from "umi"; import type { ConnectState } from "@/models/connect"; @@ -68,11 +69,12 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => { title: '序号', dataIndex: 'index', width: 70, + align: 'center', hideInSearch: true, valueType: 'index' }, { - title: '门店名称', + title:
门店名称
, width: 140, dataIndex: 'SHOPNAME', hideInSearch: true, @@ -80,6 +82,7 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => { { title: '异常类型', width: 100, + align: 'center', dataIndex: 'ABNORMALITY_TYPE', valueType: 'treeSelect', request: async () => { @@ -94,6 +97,7 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => { }, { title: '统计时间', + align: 'center', dataIndex: 'search_date', valueType: 'dateRange', hideInTable: true, @@ -113,25 +117,30 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => { } }, { - title: '商品数量', + title:
商品数量
, + align: 'right', width: 100, + valueType: 'digit', dataIndex: 'COMMOTITY_COUNT', hideInSearch: true, }, { - title: '销售金额', + title:
销售金额
, + align: 'right', width: 100, + valueType: 'digit', dataIndex: 'TOTALAMOUNT', hideInSearch: true, }, { - title: '异常记录时间', + title:
异常记录时间
, + align: 'center', width: 150, dataIndex: 'ABNORMALITY_TIME', hideInSearch: true, }, { - title: '审核意见', + title:
审核意见
, width: 200, dataIndex: 'ABNORMALITY_DESC', ellipsis: true, @@ -139,18 +148,22 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => { }, { title: '服务区', - width: 120, + align: 'center', + width: 140, dataIndex: 'SERVERPART_NAME', + ellipsis: true, hideInSearch: true, }, { title: '收银机号', + align: 'center', width: 120, dataIndex: 'MACHINECODE', hideInSearch: true, }, { title: '收银员', + align: 'center', width: 100, dataIndex: 'SELLWORK_NAME', hideInSearch: true, @@ -314,6 +327,7 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => { columns={columns} bordered headerTitle={} + scroll={{ x: '100%', y: 'calc(100vh - 430px)' }} search={{ span: 6 }} pagination={{ pageSize: 20 }} request={async (params) => { diff --git a/src/pages/reports/audit/abnormalExamine/index.tsx b/src/pages/reports/audit/abnormalExamine/index.tsx index 27afa4a..0caa6b6 100644 --- a/src/pages/reports/audit/abnormalExamine/index.tsx +++ b/src/pages/reports/audit/abnormalExamine/index.tsx @@ -1,11 +1,12 @@ -import {connect} from "umi"; -import type {CurrentUser} from "umi"; -import type {ConnectState} from "@/models/connect"; -import React, {useRef, useState} from "react"; +// 稽核联动查询 +import { connect } from "umi"; +import type { CurrentUser } from "umi"; +import type { ConnectState } from "@/models/connect"; +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 {Avatar, Button, Menu, message, Space, Spin, Tree} from "antd"; +import { MenuFoldOutlined } from "@ant-design/icons"; +import type { FormInstance } from "antd"; +import { Avatar, Button, Menu, message, Space, Spin, Tree } from "antd"; import useRequest from "@ahooksjs/use-request"; import { getFieldEnum, @@ -14,15 +15,15 @@ import { getServerpartTree, handleCallLogs } from "@/services/options"; -import type {ActionType} from "@ant-design/pro-table"; +import type { ActionType } from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table"; import ReactHTMLTableToExcel from "react-html-table-to-excel"; import SubMenu from "antd/lib/menu/SubMenu"; import moment from "moment/moment"; -import {handleGetServerpartShopDDL, handleGetYSABNORMALITYList} from "@/pages/reports/audit/abnormalExamine/service"; +import { handleGetServerpartShopDDL, handleGetYSABNORMALITYList } from "@/pages/reports/audit/abnormalExamine/service"; import PageTitleBox from "@/components/PageTitleBox"; -const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { +const abnormalExamine: React.FC<{ currentUser: CurrentUser }> = (props) => { const { currentUser } = props const downloadBtnRef = useRef() const actionRef = useRef(); @@ -30,25 +31,25 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { const [reqDetailList, setReqDetailList] = useState(); // 合计项数据源 const [printOut, setPrintOut] = useState(); // 打印数据的内容 const [collapsible, setCollapsible] = useState(false) - const [treeView,setTreeView] = useState() + const [treeView, setTreeView] = useState() // 加载服务区树 const { loading: treeLoading, data: treeViews } = useRequest(async () => { const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true) setTreeView(data) return data }) -// 树相关的属性和方法 + // 树相关的属性和方法 const [selectedId, setSelectedId] = useState() -// 导出的加载效果 - const [showLoading,setShowLoading] = useState(false) + // 导出的加载效果 + const [showLoading, setShowLoading] = useState(false) // 显示点击服务区 请求门店的加载效果 - const [serverpartShopLoading,setServerpartShopLoading] = useState(false) + const [serverpartShopLoading, setServerpartShopLoading] = useState(false) // 是否显示打印的表格 - const [showExportTable,setShowExportTable] = useState(false) + const [showExportTable, setShowExportTable] = useState(false) const [currenMenu, setCurrenMenu] = useState(); // 当前选中左侧菜单的服务区节点 - const [serverpartShopObj,setServerpartShopObj] = useState() + const [serverpartShopObj, setServerpartShopObj] = useState() const columns: any = [ { @@ -57,9 +58,9 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { valueType: 'select', hideInTable: true, valueEnum: serverpartShopObj, - fieldProps:{ + fieldProps: { showSearch: true, - filterOption:(input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()), + filterOption: (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()), } }, { @@ -86,83 +87,94 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { { title: '序号', dataIndex: 'index', + align: 'center', width: 70, hideInSearch: true, valueType: 'index' }, { - title: '门店名称', + title:
门店名称
, width: 140, - dataIndex:'SHOPNAME', + align: 'left', + dataIndex: 'SHOPNAME', hideInSearch: true, }, { - title:'异常类型', + title: '异常类型', width: 100, - dataIndex:'ABNORMALITY_TYPE', + align: 'center', + dataIndex: 'ABNORMALITY_TYPE', valueType: 'treeSelect', request: async () => { - const data: any = await getFieldEnumTreeNoSession({ FieldExplainField: 'ABNORMALITY_TYPE',FieldEnumStatus: true }); + const data: any = await getFieldEnumTreeNoSession({ FieldExplainField: 'ABNORMALITY_TYPE', FieldEnumStatus: true }); return data }, fieldProps: { treeDefaultExpandAll: true, - mode:'multiple' + mode: 'multiple' } }, { - title:'审核意见', + title: '审核意见', dataIndex: '', - hideInTable:true, + hideInTable: true, valueType: 'select', valueEnum: { - '':'全部', - 0:'未审核', - 1:'已审核' + '': '全部', + 0: '未审核', + 1: '已审核' }, initialValue: '' }, { - title: '商品数量', + title:
商品数量
, width: 100, - dataIndex:'COMMOTITY_COUNT', + align: 'right', + valueType: 'digit', + dataIndex: 'COMMOTITY_COUNT', hideInSearch: true, }, { - title: '销售金额', + title:
销售金额
, width: 100, - dataIndex:'TOTALAMOUNT', + align: 'right', + valueType: 'digit', + dataIndex: 'TOTALAMOUNT', hideInSearch: true, }, { title: '异常记录时间', + align: 'center', width: 150, - dataIndex:'ABNORMALITY_TIME', + dataIndex: 'ABNORMALITY_TIME', hideInSearch: true, }, { - title: '审核意见', + title:
审核意见
, width: 200, - dataIndex:'ABNORMALITY_DESC', + dataIndex: 'ABNORMALITY_DESC', ellipsis: true, hideInSearch: true, }, { title: '服务区', + align: 'center', width: 120, - dataIndex:'SERVERPART_NAME', + dataIndex: 'SERVERPART_NAME', hideInSearch: true, }, { title: '收银机号', + align: 'center', width: 120, - dataIndex:'MACHINECODE', + dataIndex: 'MACHINECODE', hideInSearch: true, }, { title: '收银员', + align: 'center', width: 120, - dataIndex:'SELLWORK_NAME', + dataIndex: 'SELLWORK_NAME', ellipsis: true, hideInSearch: true, }, @@ -190,10 +202,10 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { tempTable.remove() // 防止重复打印一个内容 } // 查询的条件 - const [searchParams,setSearchParams] = useState() + const [searchParams, setSearchParams] = useState() // 获取门店列表 - const handleGetShopList = async (id: any)=>{ + const handleGetShopList = async (id: any) => { const req = { ProvinceCode: currentUser?.ProvinceCode, ServerpartId: id, @@ -201,8 +213,8 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { } const data = await handleGetServerpartShopDDL(req) const obj: any = {} - if (data && data.length>0){ - data.forEach((item: any)=>{ + if (data && data.length > 0) { + data.forEach((item: any) => { obj[item.value] = item.label }) } @@ -238,13 +250,13 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { borderRadius: '8px', width: '200px' }}> - - 数据导出中... + + 数据导出中... : '' } -
+
{ showExportTable && reqDetailList && reqDetailList.length > 0 ? = (props) => { /> : '' }
-
+
-
+
{ serverpartShopLoading ? -
-
+
+
加载中...
@@ -272,12 +284,12 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { } { setCollapsible(!collapsible) - }}/>} + }} />} colSpan={!collapsible ? "300px" : "60px"} title={!collapsible ? "请选择服务区" : ""} headerBordered @@ -299,20 +311,20 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { defaultExpandedKeys={['0-0']} onCheck={(checkedKeys: React.Key[] | any, info) => { const selectedIds = info.checkedNodes.filter(n => n?.type === 1) - if (selectedIds.map(n => n?.value)?.toString().indexOf(',')===-1){ + if (selectedIds.map(n => n?.value)?.toString().indexOf(',') === -1) { handleGetShopList(selectedIds) - }else{ + } else { setServerpartShopObj({}) } setSelectedId(selectedIds.map(n => n?.value)?.toString() || '') // actionRef?.current?.reload() // getData(selectedIds.map(n => n?.value)?.toString() || '') }} - // switcherIcon={} + // switcherIcon={} /> : ''}
= (props) => { columns={columns} bordered headerTitle={} - search={{span: 6}} - pagination={{pageSize: 20}} - request={async(params)=>{ - if (!selectedId){ + scroll={{ x: "100%", y: 'calc(100vh - 470px)' }} + search={{ span: 6, defaultCollapsed: false }} + pagination={{ pageSize: 20 }} + request={async (params) => { + if (!selectedId) { return } handleCallLogs() const req = { - SearchParameter:{ + SearchParameter: { ...params, SERVERPART_IDS: selectedId }, @@ -340,15 +353,15 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { } setSearchParams(params) const data = await handleGetYSABNORMALITYList(req) - if (data && data.length>0){ + if (data && data.length > 0) { setReqDetailList(data) return { data, success: true } } - return { data:[], success: true } + return { data: [], success: true } }} toolbar={{ actions: [ - + = (props) => { ) } -export default connect(({user}: ConnectState) => ({ +export default connect(({ user }: ConnectState) => ({ currentUser: user.currentUser }))(abnormalExamine); diff --git a/src/pages/reports/audit/abnormalSale/index.tsx b/src/pages/reports/audit/abnormalSale/index.tsx index 8c71047..296252c 100644 --- a/src/pages/reports/audit/abnormalSale/index.tsx +++ b/src/pages/reports/audit/abnormalSale/index.tsx @@ -1,11 +1,11 @@ -import {connect} from "umi"; -import type {CurrentUser} from "umi"; -import type {ConnectState} from "@/models/connect"; -import React, {useRef, useState} from "react"; +import { connect } from "umi"; +import type { CurrentUser } from "umi"; +import type { ConnectState } from "@/models/connect"; +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 {Avatar, Button, Menu, message, Space, Spin, Tree} from "antd"; +import { MenuFoldOutlined } from "@ant-design/icons"; +import type { FormInstance } from "antd"; +import { Avatar, Button, Menu, message, Space, Spin, Tree } from "antd"; import useRequest from "@ahooksjs/use-request"; import { getFieldEnum, @@ -14,15 +14,15 @@ import { getServerpartTree, handleCallLogs } from "@/services/options"; -import type {ActionType} from "@ant-design/pro-table"; +import type { ActionType } from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table"; import ReactHTMLTableToExcel from "react-html-table-to-excel"; import SubMenu from "antd/lib/menu/SubMenu"; import moment from "moment/moment"; -import {handleGetServerpartShopDDL, handleGetYSABNORMALITYList} from "@/pages/reports/audit/abnormalSale/service"; +import { handleGetServerpartShopDDL, handleGetYSABNORMALITYList } from "@/pages/reports/audit/abnormalSale/service"; import PageTitleBox from "@/components/PageTitleBox"; -const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { +const abnormalSale: React.FC<{ currentUser: CurrentUser }> = (props) => { const { currentUser } = props const downloadBtnRef = useRef() const actionRef = useRef(); @@ -30,25 +30,25 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { const [reqDetailList, setReqDetailList] = useState(); // 合计项数据源 const [printOut, setPrintOut] = useState(); // 打印数据的内容 const [collapsible, setCollapsible] = useState(false) - const [treeView,setTreeView] = useState() + const [treeView, setTreeView] = useState() // 加载服务区树 const { loading: treeLoading, data: treeViews } = useRequest(async () => { const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true) setTreeView(data) return data }) -// 树相关的属性和方法 + // 树相关的属性和方法 const [selectedId, setSelectedId] = useState() -// 导出的加载效果 - const [showLoading,setShowLoading] = useState(false) + // 导出的加载效果 + const [showLoading, setShowLoading] = useState(false) // 显示点击服务区 请求门店的加载效果 - const [serverpartShopLoading,setServerpartShopLoading] = useState(false) + const [serverpartShopLoading, setServerpartShopLoading] = useState(false) // 是否显示打印的表格 - const [showExportTable,setShowExportTable] = useState(false) + const [showExportTable, setShowExportTable] = useState(false) const [currenMenu, setCurrenMenu] = useState(); // 当前选中左侧菜单的服务区节点 - const [serverpartShopObj,setServerpartShopObj] = useState() + const [serverpartShopObj, setServerpartShopObj] = useState() const columns: any = [ @@ -58,9 +58,9 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { valueType: 'select', hideInTable: true, valueEnum: serverpartShopObj, - fieldProps:{ + fieldProps: { showSearch: true, - filterOption:(input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()), + filterOption: (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()), } }, @@ -70,22 +70,25 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { dataIndex: 'index', width: 70, hideInSearch: true, - valueType: 'index' + valueType: 'index', + align: 'center' }, { - title: '门店名称', + title:
门店名称
, width: 140, - dataIndex:'SHOPNAME', + dataIndex: 'SHOPNAME', hideInSearch: true, + align: 'left' }, { - title:'异常类型', + title: '异常类型', width: 100, - dataIndex:'ABNORMALITY_TYPE', + dataIndex: 'ABNORMALITY_TYPE', valueType: 'treeSelect', + align: 'center', request: async () => { - const data = await getFieldEnumTreeNoSession({ FieldExplainField: 'EXCEPTION_TYPE', FieldEnumPID: 13852,FieldEnumStatus: true }); - console.log('data',data) + const data = await getFieldEnumTreeNoSession({ FieldExplainField: 'EXCEPTION_TYPE', FieldEnumPID: 13852, FieldEnumStatus: true }); + console.log('data', data) return data }, fieldProps: { @@ -113,46 +116,54 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { } }, { - title: '商品数量', + title:
商品数量
, width: 100, - dataIndex:'COMMOTITY_COUNT', + dataIndex: 'COMMOTITY_COUNT', + align: 'right', hideInSearch: true, }, { - title: '销售金额', + title:
销售金额
, width: 100, - dataIndex:'TOTALAMOUNT', + align: 'right', + dataIndex: 'TOTALAMOUNT', hideInSearch: true, }, { title: '异常记录时间', width: 150, - dataIndex:'ABNORMALITY_TIME', + dataIndex: 'ABNORMALITY_TIME', + align: 'center', hideInSearch: true, }, { - title: '审核意见', + title:
审核意见
, + align: 'left', width: 200, - dataIndex:'ABNORMALITY_DESC', + dataIndex: 'ABNORMALITY_DESC', ellipsis: true, hideInSearch: true, }, { title: '服务区', - width: 120, - dataIndex:'SERVERPART_NAME', + width: 140, + ellipsis: true, + align: 'center', + dataIndex: 'SERVERPART_NAME', hideInSearch: true, }, { title: '收银机号', width: 120, - dataIndex:'MACHINECODE', + dataIndex: 'MACHINECODE', + align: 'center', hideInSearch: true, }, { title: '收银员', width: 100, - dataIndex:'SELLWORK_NAME', + align: 'center', + dataIndex: 'SELLWORK_NAME', ellipsis: true, hideInSearch: true, }, @@ -180,17 +191,17 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { } // 获取门店列表 - const handleGetShopList = async (id: any)=>{ + const handleGetShopList = async (id: any) => { const req = { ProvinceCode: currentUser?.ProvinceCode, ServerpartId: id, ShowWholePower: true } const data = await handleGetServerpartShopDDL(req) - console.log('data',data) + console.log('data', data) const obj: any = {} - if (data && data.length>0){ - data.forEach((item: any)=>{ + if (data && data.length > 0) { + data.forEach((item: any) => { obj[item.value] = item.label }) } @@ -198,7 +209,7 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { } // 查询的条件 - const [searchParams,setSearchParams] = useState() + const [searchParams, setSearchParams] = useState() return (
{ @@ -230,13 +241,13 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { borderRadius: '8px', width: '200px' }}> - - 数据导出中... + + 数据导出中...
: '' } -
+
{ showExportTable && reqDetailList && reqDetailList.length > 0 ? = (props) => { /> : '' }
-
+
-
+
{ serverpartShopLoading ? -
-
+
+
加载中...
@@ -264,12 +275,12 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { } { setCollapsible(!collapsible) - }}/>} + }} />} colSpan={!collapsible ? "300px" : "60px"} title={!collapsible ? "请选择服务区" : ""} headerBordered @@ -291,20 +302,20 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { defaultExpandedKeys={['0-0']} onCheck={(checkedKeys: React.Key[] | any, info) => { const selectedIds = info.checkedNodes.filter(n => n?.type === 1) - if (selectedIds.map(n => n?.value)?.toString().indexOf(',')===-1){ + if (selectedIds.map(n => n?.value)?.toString().indexOf(',') === -1) { handleGetShopList(selectedIds) - }else{ + } else { setServerpartShopObj({}) } setSelectedId(selectedIds.map(n => n?.value)?.toString() || '') // actionRef?.current?.reload() // getData(selectedIds.map(n => n?.value)?.toString() || '') }} - // switcherIcon={} + // switcherIcon={} /> : ''}
= (props) => { columns={columns} bordered headerTitle={} - search={{span: 6}} - pagination={{pageSize: 20}} - request={async(params)=>{ - console.log('params',params) - if (!selectedId){ + search={{ span: 6 }} + pagination={{ pageSize: 20 }} + scroll={{ x: '100%', y: 'calc(100vh - 430px)' }} + request={async (params) => { + console.log('params', params) + if (!selectedId) { return } handleCallLogs() const req = { - SearchParameter:{ + SearchParameter: { ...params, SERVERPART_IDS: selectedId, EXCEPTION_TYPE: 1000 @@ -334,16 +346,16 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { } setSearchParams(params) const data = await handleGetYSABNORMALITYList(req) - console.log('data',data) - if (data && data.length>0){ + console.log('data', data) + if (data && data.length > 0) { setReqDetailList(data) return { data, success: true } } - return { data:[], success: true } + return { data: [], success: true } }} toolbar={{ actions: [ - + = (props) => { ) } -export default connect(({user}: ConnectState) => ({ +export default connect(({ user }: ConnectState) => ({ currentUser: user.currentUser }))(abnormalSale); diff --git a/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx b/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx index 2545eba..9cb0a42 100644 --- a/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx +++ b/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx @@ -2089,7 +2089,7 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS summary={() => { return <> - {exportSumRow?.PeriodIndexStr} + {exportSumRow?.PeriodIndexStr}1 {exportSumRow?.MinturnOver ? handleFormatNumber(exportSumRow?.MinturnOver) : '0'} {exportSumRow?.CashAmount ? handleFormatNumber(exportSumRow?.CashAmount) : '0'} @@ -2113,9 +2113,9 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS - {'财务部:'} + {`${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司' : ''}财务部:`} {signature?.financeName || ''} - {'经发部:'} + {`${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司运营服务部:' : '经发部:'}`} {signature?.developmentName || ''} @@ -2638,11 +2638,11 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS const footer: string = `
- 运营管理子公司财务部: + ${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司' : ''}财务部: ${signature?.financeRealName || ''}
- 运营管理子公司运营服务部: + ${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司运营服务部:' : '经发部'} ${signature?.developmentRealName || ''}
@@ -2684,6 +2684,8 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS