This commit is contained in:
ylj20011123 2025-09-01 18:27:05 +08:00
parent a05dd915f3
commit d3a4c2ad28
21 changed files with 285 additions and 189 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "ant-design-pro", "name": "ant-design-pro",
"version": "4.5.40", "version": "4.5.42",
"private": true, "private": true,
"description": "An out-of-box UI solution for enterprise applications", "description": "An out-of-box UI solution for enterprise applications",
"scripts": { "scripts": {

View File

@ -193,6 +193,28 @@ const List: React.FC<{ currentUser?: CurrentUser }> = ({ currentUser }) => {
} }
}) })
setSelectServicePartId(list[0].value) 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 return list
}) })

View File

@ -157,6 +157,8 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a
} }
const handleGetItemDetail = async () => { const handleGetItemDetail = async () => {
console.log('currentRowcurrentRowcurrentRow', currentRow);
setShowChangeLoading(true) setShowChangeLoading(true)
const req = { const req = {
RoleType: 1, RoleType: 1,
@ -166,6 +168,8 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a
EndDate: moment(searchTime[1]).format('YYYY-MM-DD'), EndDate: moment(searchTime[1]).format('YYYY-MM-DD'),
} }
const data = await handleBrandDetailList(req) const data = await handleBrandDetailList(req)
console.log('dsadasdsad', data);
const resultData = JSON.parse(JSON.stringify(data)) const resultData = JSON.parse(JSON.stringify(data))
setTopDetail(resultData) setTopDetail(resultData)
if (resultData.VerifyList && resultData.VerifyList.length > 0) { 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]) setLeftTimeList([resultData.VerifyList, resultData.VerifiedList][selectTab - 1])
console.log('selectTabListselectTabListselectTabList', selectTabList)
if (selectTabList[0].number === 0) { if (selectTabList[0].number === 0) {
setSelectTab(2) setSelectTab(2)
@ -207,8 +212,8 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a
if (leftList && leftList.length > 0) { if (leftList && leftList.length > 0) {
// setSelectLeftTime(leftList[0].value) // setSelectLeftTime(leftList[0].value)
// handleGetDetail(leftList[0].value, selectTab) // handleGetDetail(leftList[0].value, selectTab)
setSelectLeftTime(currentRow?.Endaccount_Id) setSelectLeftTime(currentRow?.Endaccount_Id || leftList[0].value)
handleGetDetail(currentRow?.Endaccount_Id, selectTab) handleGetDetail(currentRow?.Endaccount_Id || leftList[0].value, selectTab)
} else { } else {
formRef.current?.resetFields() formRef.current?.resetFields()
} }
@ -278,23 +283,23 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a
EndaccountId: id EndaccountId: id
} }
const data = await handleDetail(req) const data = await handleDetail(req)
setAuditTableData(data.AuditInfoList) setAuditTableData(data?.AuditInfoList || [])
if (tabSelect !== 2) { if (tabSelect !== 2) {
handleGetShopPriceData(1, data.Endaccount_Id) handleGetShopPriceData(1, data?.Endaccount_Id)
handleGetShopPriceData(3, data.Endaccount_Id) handleGetShopPriceData(3, data?.Endaccount_Id)
if (data.ShowCigarette) { if (data?.ShowCigarette) {
handleGetShopPriceData(2, data.Endaccount_Id, data.CigaretteType) handleGetShopPriceData(2, data?.Endaccount_Id, data?.CigaretteType)
} }
} }
setCurrentDetail(data) setCurrentDetail(data)
formRef.current?.setFieldsValue( formRef.current?.setFieldsValue(
{ {
...data, ...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) setShowChangeLoading(false)
getPictureList(data.Endaccount_Id) getPictureList(data?.Endaccount_Id || "")
} }
const handleGetShopPriceData = async (type: number, id: number, CigaretteType?: any) => { 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) setProductData(data)
formRef?.current?.setFieldsValue({ formRef?.current?.setFieldsValue({
...data, ...data,
SellCount_Sale: data.count, SellCount_Sale: data?.count,
FactAmount_Sale: data.amount FactAmount_Sale: data?.amount
}) })
} }
else if (type === 2) { else if (type === 2) {
setCigarettePayment(data) setCigarettePayment(data)
formRef?.current?.setFieldsValue({ formRef?.current?.setFieldsValue({
...data, ...data,
FactAmount_Cigarette: data.amount, FactAmount_Cigarette: data?.amount,
SellCount_Cigarette: data.count SellCount_Cigarette: data?.count
}) })
} }
else if (type === 3) { else if (type === 3) {
setMobilePayment(data) setMobilePayment(data)
formRef?.current?.setFieldsValue({ formRef?.current?.setFieldsValue({
...data, ...data,
FactAmount_Mobilepayment: data.amount FactAmount_Mobilepayment: data?.amount
}) })
} }
setShowChangeLoading(false) setShowChangeLoading(false)
@ -350,6 +355,9 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a
const getPictureList = (id: any) => { const getPictureList = (id: any) => {
setShowChangeLoading(true) setShowChangeLoading(true)
if (!id) {
return
}
const req = { const req = {
TableId: id, TableId: id,
TableName: "ENDACCOUNT", TableName: "ENDACCOUNT",

View File

@ -611,7 +611,7 @@ const COMMODITYINFO = ({ onShow, onCancel, parentRow }: DetailProps) => {
options={false} options={false}
scroll={{ x: '100%', y: 400 }} scroll={{ x: '100%', y: 400 }}
request={async (params) => { request={async (params) => {
console.log('parentRow', parentRow);
// 拿个商品详情 // 拿个商品详情
const commodityDetail = await handleGetGetCOMMODITYDetail({ COMMODITYId: parentRow?.COMMODITY_ID }) const commodityDetail = await handleGetGetCOMMODITYDetail({ COMMODITYId: parentRow?.COMMODITY_ID })
setCommodityInfo(commodityDetail) setCommodityInfo(commodityDetail)

View File

@ -169,11 +169,11 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps
} else if (item.OPERATE_TYPE === 6000) { } else if (item.OPERATE_TYPE === 6000) {
obj = { obj = {
...obj, ...obj,
PURCHASE_COUNT: item.OPERATE_COUNT,// 入库数量 OVERPLUSCOUNT: item.OPERATE_COUNT,// 入库数量
PURCHASE_TAXPRICE: item.PURCHASE_TAXPRICE,// 含税单价 PURCHASE_TAXPRICE: item.PURCHASE_TAXPRICE,// 含税单价
PURCHASE_TOTALTAXPRICE: item.OPERATE_TAXAMOUNT,// 含税金额 OVERPLUS_AMOUNT: item.OPERATE_TAXAMOUNT,// 含税金额
PURCHASE_PRICE: item.PURCHASE_PRICE,// 除税单价 PURCHASE_PRICE: item.PURCHASE_PRICE,// 除税单价
LAST_OVERPLUSPRICE: item.OPERATE_AMOUNT,// 上期库存除税 OVERPLUS_PRICE: item.OPERATE_AMOUNT,// 上期库存除税
} }
} else if (item.OPERATE_TYPE === 6001) { } else if (item.OPERATE_TYPE === 6001) {
obj = { obj = {
@ -190,7 +190,12 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps
LAST_OVERPLUSPRICE: item.OPERATE_AMOUNT,// 上期库存除税 LAST_OVERPLUSPRICE: item.OPERATE_AMOUNT,// 上期库存除税
} }
} else if (item.OPERATE_TYPE === 6003) { } 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); console.log('detaildetaildetaildetail', detail);
obj = { obj = {
...obj, ...obj,
...detail,
SERVERPART_NAME: parentRow?.Serverpart_Name, // 服务区名 SERVERPART_NAME: parentRow?.Serverpart_Name, // 服务区名
SHOPNAME: parentRow?.ServerpartShop_Name, // 门店名称 SHOPNAME: parentRow?.ServerpartShop_Name, // 门店名称
SERVERPARTSHOP_ID: parentRow?.ServerpartShop_Id, // 门店ID
COMMODITY_CODE: detail?.COMMODITY_CODE, // 商品编码 COMMODITY_CODE: detail?.COMMODITY_CODE, // 商品编码
BUSINESSTYPE: detail?.BUSINESSTYPE, // 业态 BUSINESSTYPE: detail?.BUSINESSTYPE, // 业态
COMMODITY_TYPE: detail?.COMMODITY_TYPE, // 商品类型 COMMODITY_TYPE: detail?.COMMODITY_TYPE, // 商品类型
@ -211,6 +218,7 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps
CHECKDATE_Start: "", CHECKDATE_Start: "",
CHECKDATE: "", CHECKDATE: "",
} }
setCommodityDetail(obj)
return obj return obj
} else { } else {
if (!parentRow?.INSALES_STATISTIC_ID) { if (!parentRow?.INSALES_STATISTIC_ID) {
@ -341,7 +349,7 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps
<Col span={8}> <Col span={8}>
<ProFormDigit <ProFormDigit
label={'损溢数量'} label={'损溢数量'}
name={'LOSSPROFIT_COUNT'} name={'LAST_LOSSPROFIT_COUNT'}
fieldProps={{ fieldProps={{
addonAfter: false addonAfter: false
}} }}
@ -350,7 +358,7 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps
<Col span={8}> <Col span={8}>
<ProFormDigit <ProFormDigit
label={'损溢金额'} label={'损溢金额'}
name={'LOSSPROFIT_AMOUNT'} name={'LAST_LOSSPROFIT_AMOUNT'}
fieldProps={{ fieldProps={{
addonAfter: false addonAfter: false
}} }}
@ -359,7 +367,7 @@ const InventoryDetailModal = ({ onShow, parentRow, onCancel, come }: DetailProps
<Col span={8}> <Col span={8}>
<ProFormDigit <ProFormDigit
label={'损溢除税'} label={'损溢除税'}
name={'LOSSPROFIT_PRICE'} name={'LAST_LOSSPROFIT_PRICE'}
fieldProps={{ fieldProps={{
addonAfter: false addonAfter: false
}} }}

View File

@ -1,3 +1,4 @@
// 项目拆分审批流程查询
import React, { useRef, useState } from "react"; import React, { useRef, useState } from "react";
import type { CurrentUser } from "@/models/user"; import type { CurrentUser } from "@/models/user";
import { connect } from "umi"; import { connect } from "umi";
@ -361,7 +362,7 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
// hideInSearch: true // hideInSearch: true
// }, // },
{ {
title: '业务名称', title: <div style={{ textAlign: 'center' }}></div>,
width: 400, width: 400,
ellipsis: true, ellipsis: true,
dataIndex: 'BusinessProcess_Name', dataIndex: 'BusinessProcess_Name',
@ -422,8 +423,8 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
} }
}, },
{ {
title: '经办人', title: <div style={{ textAlign: 'center' }}></div>,
width: 120, width: 140,
dataIndex: 'Staff_Name', dataIndex: 'Staff_Name',
ellipsis: true, ellipsis: true,
hideInSearch: true, hideInSearch: true,
@ -433,6 +434,14 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
</Tooltip> </Tooltip>
} }
}, },
{
title: '经营商户',
width: 140,
dataIndex: 'MERCHANTS_NAME',
align: 'center',
ellipsis: true,
hideInSearch: true,
},
{ {
title: '业务时间', title: '业务时间',
width: 100, width: 100,
@ -444,7 +453,7 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
} }
}, },
{ {
title: '业务状态', title: <div style={{ textAlign: 'center' }}></div>,
width: 300, width: 300,
ellipsis: true, ellipsis: true,
dataIndex: 'BusinessProcess_States', dataIndex: 'BusinessProcess_States',
@ -454,7 +463,7 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
hideInTable: busninessType === 2, hideInTable: busninessType === 2,
// hideInSearch: true, // hideInSearch: true,
render: (_, record) => { 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: '本期累计时间', title: '本期累计时间',
width: 180, width: 180,
ellipsis: true, ellipsis: true,
align: 'center',
hideInTable: busninessType === 2, hideInTable: busninessType === 2,
dataIndex: 'STARTDATEENDDATE', dataIndex: 'STARTDATEENDDATE',
hideInSearch: true, hideInSearch: true,

View File

@ -127,6 +127,7 @@ const CommoditysaleTable: React.FC<{ currentUser: CurrentUser | undefined }> = (
picker: "month", picker: "month",
format: 'YYYY-MM', format: 'YYYY-MM',
disabledDate: (current: any) => current && current > moment().subtract(2, 'months').startOf("month") disabledDate: (current: any) => current && current > moment().subtract(2, 'months').startOf("month")
// 月度数据 查询的是历史的 所以中间必须要隔一个月份 不能修改
} }
}, },
{ {

View File

@ -373,7 +373,7 @@ const cigaretteReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
expandable={{ expandable={{
expandRowByClick: true expandRowByClick: true
}} }}
scroll={{ x: 'max-content', y: 'calc(100vh - 450px)' }} scroll={{ x: 'max-content', y: 'calc(100vh - 470px)' }}
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
search={{ span: 6 }} search={{ span: 6 }}
request={async (params) => { request={async (params) => {

View File

@ -1,3 +1,4 @@
// 收银员统计表
import { connect } from "umi"; import { connect } from "umi";
import type { CurrentUser } from "umi"; import type { CurrentUser } from "umi";
import type { ConnectState } from "@/models/connect"; import type { ConnectState } from "@/models/connect";
@ -360,7 +361,7 @@ const personSellReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
formRef={formRef} formRef={formRef}
columns={columns} columns={columns}
bordered bordered
scroll={{ x: 1600 }} scroll={{ x: '100%', y: 'calc(100vh - 520px)' }}
// pagination={false} // pagination={false}
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
search={{ span: 8 }} search={{ span: 8 }}

View File

@ -303,7 +303,7 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
actionRef={actionRef} actionRef={actionRef}
search={{ span: 6 }} search={{ span: 6 }}
pagination={{ pageSize: 20 }} pagination={{ pageSize: 20 }}
scroll={{ x: '100%', y: 'calc(100vh - 470px)' }} scroll={{ x: '100%', y: 'calc(100vh - 590px)' }}
request={async (params) => { request={async (params) => {
if (selectedId || currenMenu) { if (selectedId || currenMenu) {
handleCallLogs() handleCallLogs()

View File

@ -1,3 +1,5 @@
// 历史销售单品报表
import { connect } from "umi"; import { connect } from "umi";
import type { CurrentUser } from "umi"; import type { CurrentUser } from "umi";
import type { ConnectState } from "@/models/connect"; import type { ConnectState } from "@/models/connect";
@ -326,7 +328,7 @@ const saleHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
columns={columns} columns={columns}
bordered bordered
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
scroll={{ y: 'calc(100vh - 470px)' }} scroll={{ y: 'calc(100vh - 540px)' }}
search={{ span: 6 }} search={{ span: 6 }}
pagination={{ pageSize: 100 }} pagination={{ pageSize: 100 }}
request={async (params) => { request={async (params) => {

View File

@ -173,10 +173,10 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
hideInSearch: true hideInSearch: true
}, },
{ {
title: '商品名称', title: <div style={{ textAlign: 'center' }}></div>,
width: 240, width: 250,
ellipsis: true, ellipsis: true,
align: 'center', align: 'left',
dataIndex: 'Commodity_Name', dataIndex: 'Commodity_Name',
hideInSearch: true hideInSearch: true
}, },

View File

@ -1,3 +1,4 @@
// 销售单品报表 区域销售单品报表
import { connect } from "umi"; import { connect } from "umi";
import type { CurrentUser } from "umi"; import type { CurrentUser } from "umi";
import type { ConnectState } from "@/models/connect"; import type { ConnectState } from "@/models/connect";
@ -190,9 +191,9 @@ const saleReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
{ {
dataIndex: 'Commodity_Name', dataIndex: 'Commodity_Name',
title: <div style={{ textAlign: 'center' }}></div>, title: <div style={{ textAlign: 'center' }}></div>,
width: 150, width: 250,
ellipsis: true, ellipsis: true,
align: 'center', align: 'left',
hideInSearch: true, hideInSearch: true,
sorter: (a, b) => a.Commodity_Name.localeCompare(b.Commodity_Name) sorter: (a, b) => a.Commodity_Name.localeCompare(b.Commodity_Name)
}, },
@ -369,7 +370,7 @@ const saleReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
bordered bordered
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
search={{ span: 6 }} search={{ span: 6 }}
scroll={{ x: "100%", y: 'calc(100vh - 490px)' }} scroll={{ x: "100%", y: 'calc(100vh - 510px)' }}
pagination={{ pageSize: 100 }} pagination={{ pageSize: 100 }}
request={async (params, sorter) => { request={async (params, sorter) => {
if (isFirst) { if (isFirst) {

View File

@ -304,6 +304,7 @@ const saleTypeHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
bordered bordered
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
search={{ span: 6 }} search={{ span: 6 }}
scroll={{ x: '100%', y: 'calc(100vh - 540px)' }}
request={async (params) => { request={async (params) => {
if (isFirst) { if (isFirst) {
setIsFirst(false) setIsFirst(false)

View File

@ -474,7 +474,7 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => {
bordered bordered
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
search={{ span: 6, defaultCollapsed: false, }} search={{ span: 6, defaultCollapsed: false, }}
scroll={{ y: 'calc(100vh - 470px)' }} scroll={{ x: '100%', y: 'calc(100vh - 520px)' }}
request={async (params) => { request={async (params) => {
if (isFirst) { if (isFirst) {
setIsFirst(false) setIsFirst(false)

View File

@ -1,3 +1,4 @@
// 销售金额异常
import { connect } from "umi"; import { connect } from "umi";
import type { CurrentUser } from "umi"; import type { CurrentUser } from "umi";
import type { ConnectState } from "@/models/connect"; import type { ConnectState } from "@/models/connect";
@ -68,11 +69,12 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => {
title: '序号', title: '序号',
dataIndex: 'index', dataIndex: 'index',
width: 70, width: 70,
align: 'center',
hideInSearch: true, hideInSearch: true,
valueType: 'index' valueType: 'index'
}, },
{ {
title: '门店名称', title: <div style={{ textAlign: 'center' }}></div>,
width: 140, width: 140,
dataIndex: 'SHOPNAME', dataIndex: 'SHOPNAME',
hideInSearch: true, hideInSearch: true,
@ -80,6 +82,7 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => {
{ {
title: '异常类型', title: '异常类型',
width: 100, width: 100,
align: 'center',
dataIndex: 'ABNORMALITY_TYPE', dataIndex: 'ABNORMALITY_TYPE',
valueType: 'treeSelect', valueType: 'treeSelect',
request: async () => { request: async () => {
@ -94,6 +97,7 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => {
}, },
{ {
title: '统计时间', title: '统计时间',
align: 'center',
dataIndex: 'search_date', dataIndex: 'search_date',
valueType: 'dateRange', valueType: 'dateRange',
hideInTable: true, hideInTable: true,
@ -113,25 +117,30 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => {
} }
}, },
{ {
title: '商品数量', title: <div style={{ textAlign: 'center' }}></div>,
align: 'right',
width: 100, width: 100,
valueType: 'digit',
dataIndex: 'COMMOTITY_COUNT', dataIndex: 'COMMOTITY_COUNT',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '销售金额', title: <div style={{ textAlign: 'center' }}></div>,
align: 'right',
width: 100, width: 100,
valueType: 'digit',
dataIndex: 'TOTALAMOUNT', dataIndex: 'TOTALAMOUNT',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '异常记录时间', title: <div style={{ textAlign: 'center' }}></div>,
align: 'center',
width: 150, width: 150,
dataIndex: 'ABNORMALITY_TIME', dataIndex: 'ABNORMALITY_TIME',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '审核意见', title: <div style={{ textAlign: 'center' }}></div>,
width: 200, width: 200,
dataIndex: 'ABNORMALITY_DESC', dataIndex: 'ABNORMALITY_DESC',
ellipsis: true, ellipsis: true,
@ -139,18 +148,22 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => {
}, },
{ {
title: '服务区', title: '服务区',
width: 120, align: 'center',
width: 140,
dataIndex: 'SERVERPART_NAME', dataIndex: 'SERVERPART_NAME',
ellipsis: true,
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '收银机号', title: '收银机号',
align: 'center',
width: 120, width: 120,
dataIndex: 'MACHINECODE', dataIndex: 'MACHINECODE',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '收银员', title: '收银员',
align: 'center',
width: 100, width: 100,
dataIndex: 'SELLWORK_NAME', dataIndex: 'SELLWORK_NAME',
hideInSearch: true, hideInSearch: true,
@ -314,6 +327,7 @@ const abnormalAmount: React.FC<{ currentUser: CurrentUser }> = (props) => {
columns={columns} columns={columns}
bordered bordered
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
scroll={{ x: '100%', y: 'calc(100vh - 430px)' }}
search={{ span: 6 }} search={{ span: 6 }}
pagination={{ pageSize: 20 }} pagination={{ pageSize: 20 }}
request={async (params) => { request={async (params) => {

View File

@ -1,11 +1,12 @@
import {connect} from "umi"; // 稽核联动查询
import type {CurrentUser} from "umi"; import { connect } from "umi";
import type {ConnectState} from "@/models/connect"; import type { CurrentUser } from "umi";
import React, {useRef, useState} from "react"; import type { ConnectState } from "@/models/connect";
import React, { useRef, useState } from "react";
import ProCard from "@ant-design/pro-card"; import ProCard from "@ant-design/pro-card";
import {MenuFoldOutlined} from "@ant-design/icons"; import { MenuFoldOutlined } from "@ant-design/icons";
import type {FormInstance} from "antd"; import type { FormInstance } from "antd";
import {Avatar, Button, Menu, message, Space, Spin, Tree} from "antd"; import { Avatar, Button, Menu, message, Space, Spin, Tree } from "antd";
import useRequest from "@ahooksjs/use-request"; import useRequest from "@ahooksjs/use-request";
import { import {
getFieldEnum, getFieldEnum,
@ -14,15 +15,15 @@ import {
getServerpartTree, getServerpartTree,
handleCallLogs handleCallLogs
} from "@/services/options"; } from "@/services/options";
import type {ActionType} from "@ant-design/pro-table"; import type { ActionType } from "@ant-design/pro-table";
import ProTable from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table";
import ReactHTMLTableToExcel from "react-html-table-to-excel"; import ReactHTMLTableToExcel from "react-html-table-to-excel";
import SubMenu from "antd/lib/menu/SubMenu"; import SubMenu from "antd/lib/menu/SubMenu";
import moment from "moment/moment"; 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"; import PageTitleBox from "@/components/PageTitleBox";
const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => { const abnormalExamine: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { currentUser } = props const { currentUser } = props
const downloadBtnRef = useRef<any>() const downloadBtnRef = useRef<any>()
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
@ -30,25 +31,25 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源 const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容 const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
const [collapsible, setCollapsible] = useState<boolean>(false) const [collapsible, setCollapsible] = useState<boolean>(false)
const [treeView,setTreeView] = useState<any>() const [treeView, setTreeView] = useState<any>()
// 加载服务区树 // 加载服务区树
const { loading: treeLoading, data: treeViews } = useRequest(async () => { const { loading: treeLoading, data: treeViews } = useRequest(async () => {
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true) const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
setTreeView(data) setTreeView(data)
return data return data
}) })
// 树相关的属性和方法 // 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>() const [selectedId, setSelectedId] = useState<string>()
// 导出的加载效果 // 导出的加载效果
const [showLoading,setShowLoading] = useState<boolean>(false) const [showLoading, setShowLoading] = useState<boolean>(false)
// 显示点击服务区 请求门店的加载效果 // 显示点击服务区 请求门店的加载效果
const [serverpartShopLoading,setServerpartShopLoading] = useState<boolean>(false) const [serverpartShopLoading, setServerpartShopLoading] = useState<boolean>(false)
// 是否显示打印的表格 // 是否显示打印的表格
const [showExportTable,setShowExportTable] = useState<boolean>(false) const [showExportTable, setShowExportTable] = useState<boolean>(false)
const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点 const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点
const [serverpartShopObj,setServerpartShopObj] = useState<any>() const [serverpartShopObj, setServerpartShopObj] = useState<any>()
const columns: any = [ const columns: any = [
{ {
@ -57,9 +58,9 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
valueType: 'select', valueType: 'select',
hideInTable: true, hideInTable: true,
valueEnum: serverpartShopObj, valueEnum: serverpartShopObj,
fieldProps:{ fieldProps: {
showSearch: true, 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: '序号', title: '序号',
dataIndex: 'index', dataIndex: 'index',
align: 'center',
width: 70, width: 70,
hideInSearch: true, hideInSearch: true,
valueType: 'index' valueType: 'index'
}, },
{ {
title: '门店名称', title: <div style={{ textAlign: 'center' }}></div>,
width: 140, width: 140,
dataIndex:'SHOPNAME', align: 'left',
dataIndex: 'SHOPNAME',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title:'异常类型', title: '异常类型',
width: 100, width: 100,
dataIndex:'ABNORMALITY_TYPE', align: 'center',
dataIndex: 'ABNORMALITY_TYPE',
valueType: 'treeSelect', valueType: 'treeSelect',
request: async () => { request: async () => {
const data: any = await getFieldEnumTreeNoSession({ FieldExplainField: 'ABNORMALITY_TYPE',FieldEnumStatus: true }); const data: any = await getFieldEnumTreeNoSession({ FieldExplainField: 'ABNORMALITY_TYPE', FieldEnumStatus: true });
return data return data
}, },
fieldProps: { fieldProps: {
treeDefaultExpandAll: true, treeDefaultExpandAll: true,
mode:'multiple' mode: 'multiple'
} }
}, },
{ {
title:'审核意见', title: '审核意见',
dataIndex: '', dataIndex: '',
hideInTable:true, hideInTable: true,
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
'':'全部', '': '全部',
0:'未审核', 0: '未审核',
1:'已审核' 1: '已审核'
}, },
initialValue: '' initialValue: ''
}, },
{ {
title: '商品数量', title: <div style={{ textAlign: 'center' }}></div>,
width: 100, width: 100,
dataIndex:'COMMOTITY_COUNT', align: 'right',
valueType: 'digit',
dataIndex: 'COMMOTITY_COUNT',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '销售金额', title: <div style={{ textAlign: 'center' }}></div>,
width: 100, width: 100,
dataIndex:'TOTALAMOUNT', align: 'right',
valueType: 'digit',
dataIndex: 'TOTALAMOUNT',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '异常记录时间', title: '异常记录时间',
align: 'center',
width: 150, width: 150,
dataIndex:'ABNORMALITY_TIME', dataIndex: 'ABNORMALITY_TIME',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '审核意见', title: <div style={{ textAlign: 'center' }}></div>,
width: 200, width: 200,
dataIndex:'ABNORMALITY_DESC', dataIndex: 'ABNORMALITY_DESC',
ellipsis: true, ellipsis: true,
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '服务区', title: '服务区',
align: 'center',
width: 120, width: 120,
dataIndex:'SERVERPART_NAME', dataIndex: 'SERVERPART_NAME',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '收银机号', title: '收银机号',
align: 'center',
width: 120, width: 120,
dataIndex:'MACHINECODE', dataIndex: 'MACHINECODE',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '收银员', title: '收银员',
align: 'center',
width: 120, width: 120,
dataIndex:'SELLWORK_NAME', dataIndex: 'SELLWORK_NAME',
ellipsis: true, ellipsis: true,
hideInSearch: true, hideInSearch: true,
}, },
@ -190,10 +202,10 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
tempTable.remove() // 防止重复打印一个内容 tempTable.remove() // 防止重复打印一个内容
} }
// 查询的条件 // 查询的条件
const [searchParams,setSearchParams] = useState<any>() const [searchParams, setSearchParams] = useState<any>()
// 获取门店列表 // 获取门店列表
const handleGetShopList = async (id: any)=>{ const handleGetShopList = async (id: any) => {
const req = { const req = {
ProvinceCode: currentUser?.ProvinceCode, ProvinceCode: currentUser?.ProvinceCode,
ServerpartId: id, ServerpartId: id,
@ -201,8 +213,8 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
} }
const data = await handleGetServerpartShopDDL(req) const data = await handleGetServerpartShopDDL(req)
const obj: any = {} const obj: any = {}
if (data && data.length>0){ if (data && data.length > 0) {
data.forEach((item: any)=>{ data.forEach((item: any) => {
obj[item.value] = item.label obj[item.value] = item.label
}) })
} }
@ -238,13 +250,13 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
borderRadius: '8px', borderRadius: '8px',
width: '200px' width: '200px'
}}> }}>
<Spin/> <Spin />
<span style={{marginLeft: '5px'}}>...</span> <span style={{ marginLeft: '5px' }}>...</span>
</div> </div>
</div> : '' </div> : ''
} }
<div className={'abnormalExamineHideBox'} style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}> <div className={'abnormalExamineHideBox'} style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }}>
{ {
showExportTable && reqDetailList && reqDetailList.length > 0 ? showExportTable && reqDetailList && reqDetailList.length > 0 ?
<ProTable <ProTable
@ -257,13 +269,13 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
/> : '' /> : ''
} }
</div> </div>
<div id='hiddenBox' style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}/> <div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
<div style={{backgroundColor: '#fff',display:'flex'}}> <div style={{ backgroundColor: '#fff', display: 'flex' }}>
{ {
serverpartShopLoading ? serverpartShopLoading ?
<div style={{width:'100%',height:'100%',background:'rgba(0,0,0,0.1)',display:'flex',alignItems:'center',justifyContent:'center'}}> <div style={{ width: '100%', height: '100%', background: 'rgba(0,0,0,0.1)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<div style={{display:'flex',alignItems:'center',padding:'15px 20px 10px',background:'#fff',borderRadius:'8px'}}> <div style={{ display: 'flex', alignItems: 'center', padding: '15px 20px 10px', background: '#fff', borderRadius: '8px' }}>
<Spin /> <Spin />
<span style={{ marginLeft: '5px' }}>...</span> <span style={{ marginLeft: '5px' }}>...</span>
</div> </div>
@ -272,12 +284,12 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
} }
<ProCard <ProCard
style={{width:!collapsible ? "300px" : "60px"}} style={{ width: !collapsible ? "300px" : "60px" }}
className="pageTable-leftnav" className="pageTable-leftnav"
bodyStyle={{padding: 0, paddingTop: 20, paddingLeft: 20,width:!collapsible ? "300px" : "60px"}} bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? "300px" : "60px" }}
extra={<MenuFoldOutlined onClick={() => { extra={<MenuFoldOutlined onClick={() => {
setCollapsible(!collapsible) setCollapsible(!collapsible)
}}/>} }} />}
colSpan={!collapsible ? "300px" : "60px"} colSpan={!collapsible ? "300px" : "60px"}
title={!collapsible ? "请选择服务区" : ""} title={!collapsible ? "请选择服务区" : ""}
headerBordered headerBordered
@ -299,20 +311,20 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
defaultExpandedKeys={['0-0']} defaultExpandedKeys={['0-0']}
onCheck={(checkedKeys: React.Key[] | any, info) => { onCheck={(checkedKeys: React.Key[] | any, info) => {
const selectedIds = info.checkedNodes.filter(n => n?.type === 1) 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) handleGetShopList(selectedIds)
}else{ } else {
setServerpartShopObj({}) setServerpartShopObj({})
} }
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '') setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
// actionRef?.current?.reload() // actionRef?.current?.reload()
// getData(selectedIds.map(n => n?.value)?.toString() || '') // getData(selectedIds.map(n => n?.value)?.toString() || '')
}} }}
// switcherIcon={<PlusOutlined />} // switcherIcon={<PlusOutlined />}
/> : ''} /> : ''}
</ProCard> </ProCard>
<div style={{ <div style={{
width:!collapsible?'calc(100% - 300px)':'calc(100% - 60px)', width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0, paddingTop: 0,
paddingBottom: 0, paddingBottom: 0,
paddingRight: 0 paddingRight: 0
@ -323,15 +335,16 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
columns={columns} columns={columns}
bordered bordered
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
search={{span: 6}} scroll={{ x: "100%", y: 'calc(100vh - 470px)' }}
pagination={{pageSize: 20}} search={{ span: 6, defaultCollapsed: false }}
request={async(params)=>{ pagination={{ pageSize: 20 }}
if (!selectedId){ request={async (params) => {
if (!selectedId) {
return return
} }
handleCallLogs() handleCallLogs()
const req = { const req = {
SearchParameter:{ SearchParameter: {
...params, ...params,
SERVERPART_IDS: selectedId SERVERPART_IDS: selectedId
}, },
@ -340,15 +353,15 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
} }
setSearchParams(params) setSearchParams(params)
const data = await handleGetYSABNORMALITYList(req) const data = await handleGetYSABNORMALITYList(req)
if (data && data.length>0){ if (data && data.length > 0) {
setReqDetailList(data) setReqDetailList(data)
return { data, success: true } return { data, success: true }
} }
return { data:[], success: true } return { data: [], success: true }
}} }}
toolbar={{ toolbar={{
actions: [ actions: [
<span style={{visibility: 'hidden'}}> <span style={{ visibility: 'hidden' }}>
<ReactHTMLTableToExcel <ReactHTMLTableToExcel
buttonText={'导出excel'} buttonText={'导出excel'}
ref={downloadBtnRef} ref={downloadBtnRef}
@ -385,6 +398,6 @@ const abnormalExamine: React.FC<{ currentUser: CurrentUser}> = (props) => {
) )
} }
export default connect(({user}: ConnectState) => ({ export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser currentUser: user.currentUser
}))(abnormalExamine); }))(abnormalExamine);

View File

@ -1,11 +1,11 @@
import {connect} from "umi"; import { connect } from "umi";
import type {CurrentUser} from "umi"; import type { CurrentUser } from "umi";
import type {ConnectState} from "@/models/connect"; import type { ConnectState } from "@/models/connect";
import React, {useRef, useState} from "react"; import React, { useRef, useState } from "react";
import ProCard from "@ant-design/pro-card"; import ProCard from "@ant-design/pro-card";
import {MenuFoldOutlined} from "@ant-design/icons"; import { MenuFoldOutlined } from "@ant-design/icons";
import type {FormInstance} from "antd"; import type { FormInstance } from "antd";
import {Avatar, Button, Menu, message, Space, Spin, Tree} from "antd"; import { Avatar, Button, Menu, message, Space, Spin, Tree } from "antd";
import useRequest from "@ahooksjs/use-request"; import useRequest from "@ahooksjs/use-request";
import { import {
getFieldEnum, getFieldEnum,
@ -14,15 +14,15 @@ import {
getServerpartTree, getServerpartTree,
handleCallLogs handleCallLogs
} from "@/services/options"; } from "@/services/options";
import type {ActionType} from "@ant-design/pro-table"; import type { ActionType } from "@ant-design/pro-table";
import ProTable from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table";
import ReactHTMLTableToExcel from "react-html-table-to-excel"; import ReactHTMLTableToExcel from "react-html-table-to-excel";
import SubMenu from "antd/lib/menu/SubMenu"; import SubMenu from "antd/lib/menu/SubMenu";
import moment from "moment/moment"; 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"; import PageTitleBox from "@/components/PageTitleBox";
const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => { const abnormalSale: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { currentUser } = props const { currentUser } = props
const downloadBtnRef = useRef<any>() const downloadBtnRef = useRef<any>()
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
@ -30,25 +30,25 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源 const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容 const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
const [collapsible, setCollapsible] = useState<boolean>(false) const [collapsible, setCollapsible] = useState<boolean>(false)
const [treeView,setTreeView] = useState<any>() const [treeView, setTreeView] = useState<any>()
// 加载服务区树 // 加载服务区树
const { loading: treeLoading, data: treeViews } = useRequest(async () => { const { loading: treeLoading, data: treeViews } = useRequest(async () => {
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true) const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
setTreeView(data) setTreeView(data)
return data return data
}) })
// 树相关的属性和方法 // 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>() const [selectedId, setSelectedId] = useState<string>()
// 导出的加载效果 // 导出的加载效果
const [showLoading,setShowLoading] = useState<boolean>(false) const [showLoading, setShowLoading] = useState<boolean>(false)
// 显示点击服务区 请求门店的加载效果 // 显示点击服务区 请求门店的加载效果
const [serverpartShopLoading,setServerpartShopLoading] = useState<boolean>(false) const [serverpartShopLoading, setServerpartShopLoading] = useState<boolean>(false)
// 是否显示打印的表格 // 是否显示打印的表格
const [showExportTable,setShowExportTable] = useState<boolean>(false) const [showExportTable, setShowExportTable] = useState<boolean>(false)
const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点 const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点
const [serverpartShopObj,setServerpartShopObj] = useState<any>() const [serverpartShopObj, setServerpartShopObj] = useState<any>()
const columns: any = [ const columns: any = [
@ -58,9 +58,9 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
valueType: 'select', valueType: 'select',
hideInTable: true, hideInTable: true,
valueEnum: serverpartShopObj, valueEnum: serverpartShopObj,
fieldProps:{ fieldProps: {
showSearch: true, 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', dataIndex: 'index',
width: 70, width: 70,
hideInSearch: true, hideInSearch: true,
valueType: 'index' valueType: 'index',
align: 'center'
}, },
{ {
title: '门店名称', title: <div style={{ textAlign: 'center' }}></div>,
width: 140, width: 140,
dataIndex:'SHOPNAME', dataIndex: 'SHOPNAME',
hideInSearch: true, hideInSearch: true,
align: 'left'
}, },
{ {
title:'异常类型', title: '异常类型',
width: 100, width: 100,
dataIndex:'ABNORMALITY_TYPE', dataIndex: 'ABNORMALITY_TYPE',
valueType: 'treeSelect', valueType: 'treeSelect',
align: 'center',
request: async () => { request: async () => {
const data = await getFieldEnumTreeNoSession({ FieldExplainField: 'EXCEPTION_TYPE', FieldEnumPID: 13852,FieldEnumStatus: true }); const data = await getFieldEnumTreeNoSession({ FieldExplainField: 'EXCEPTION_TYPE', FieldEnumPID: 13852, FieldEnumStatus: true });
console.log('data',data) console.log('data', data)
return data return data
}, },
fieldProps: { fieldProps: {
@ -113,46 +116,54 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
} }
}, },
{ {
title: '商品数量', title: <div style={{ textAlign: 'center' }}></div>,
width: 100, width: 100,
dataIndex:'COMMOTITY_COUNT', dataIndex: 'COMMOTITY_COUNT',
align: 'right',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '销售金额', title: <div style={{ textAlign: 'center' }}></div>,
width: 100, width: 100,
dataIndex:'TOTALAMOUNT', align: 'right',
dataIndex: 'TOTALAMOUNT',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '异常记录时间', title: '异常记录时间',
width: 150, width: 150,
dataIndex:'ABNORMALITY_TIME', dataIndex: 'ABNORMALITY_TIME',
align: 'center',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '审核意见', title: <div style={{ textAlign: 'center' }}></div>,
align: 'left',
width: 200, width: 200,
dataIndex:'ABNORMALITY_DESC', dataIndex: 'ABNORMALITY_DESC',
ellipsis: true, ellipsis: true,
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '服务区', title: '服务区',
width: 120, width: 140,
dataIndex:'SERVERPART_NAME', ellipsis: true,
align: 'center',
dataIndex: 'SERVERPART_NAME',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '收银机号', title: '收银机号',
width: 120, width: 120,
dataIndex:'MACHINECODE', dataIndex: 'MACHINECODE',
align: 'center',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '收银员', title: '收银员',
width: 100, width: 100,
dataIndex:'SELLWORK_NAME', align: 'center',
dataIndex: 'SELLWORK_NAME',
ellipsis: true, ellipsis: true,
hideInSearch: 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 = { const req = {
ProvinceCode: currentUser?.ProvinceCode, ProvinceCode: currentUser?.ProvinceCode,
ServerpartId: id, ServerpartId: id,
ShowWholePower: true ShowWholePower: true
} }
const data = await handleGetServerpartShopDDL(req) const data = await handleGetServerpartShopDDL(req)
console.log('data',data) console.log('data', data)
const obj: any = {} const obj: any = {}
if (data && data.length>0){ if (data && data.length > 0) {
data.forEach((item: any)=>{ data.forEach((item: any) => {
obj[item.value] = item.label obj[item.value] = item.label
}) })
} }
@ -198,7 +209,7 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
} }
// 查询的条件 // 查询的条件
const [searchParams,setSearchParams] = useState<any>() const [searchParams, setSearchParams] = useState<any>()
return ( return (
<div ref={(el) => { <div ref={(el) => {
@ -230,13 +241,13 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
borderRadius: '8px', borderRadius: '8px',
width: '200px' width: '200px'
}}> }}>
<Spin/> <Spin />
<span style={{marginLeft: '5px'}}>...</span> <span style={{ marginLeft: '5px' }}>...</span>
</div> </div>
</div> : '' </div> : ''
} }
<div className={'abnormalExamineHideBox'} style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}> <div className={'abnormalExamineHideBox'} style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }}>
{ {
showExportTable && reqDetailList && reqDetailList.length > 0 ? showExportTable && reqDetailList && reqDetailList.length > 0 ?
<ProTable <ProTable
@ -249,13 +260,13 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
/> : '' /> : ''
} }
</div> </div>
<div id='hiddenBox' style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}/> <div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
<div style={{backgroundColor: '#fff',display:'flex'}}> <div style={{ backgroundColor: '#fff', display: 'flex' }}>
{ {
serverpartShopLoading ? serverpartShopLoading ?
<div style={{width:'100%',height:'100%',background:'rgba(0,0,0,0.1)',display:'flex',alignItems:'center',justifyContent:'center'}}> <div style={{ width: '100%', height: '100%', background: 'rgba(0,0,0,0.1)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<div style={{display:'flex',alignItems:'center',padding:'15px 20px 10px',background:'#fff',borderRadius:'8px'}}> <div style={{ display: 'flex', alignItems: 'center', padding: '15px 20px 10px', background: '#fff', borderRadius: '8px' }}>
<Spin /> <Spin />
<span style={{ marginLeft: '5px' }}>...</span> <span style={{ marginLeft: '5px' }}>...</span>
</div> </div>
@ -264,12 +275,12 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
} }
<ProCard <ProCard
style={{width:!collapsible ? "300px" : "60px"}} style={{ width: !collapsible ? "300px" : "60px" }}
className="pageTable-leftnav" className="pageTable-leftnav"
bodyStyle={{padding: 0, paddingTop: 20, paddingLeft: 20,width:!collapsible ? "300px" : "60px"}} bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? "300px" : "60px" }}
extra={<MenuFoldOutlined onClick={() => { extra={<MenuFoldOutlined onClick={() => {
setCollapsible(!collapsible) setCollapsible(!collapsible)
}}/>} }} />}
colSpan={!collapsible ? "300px" : "60px"} colSpan={!collapsible ? "300px" : "60px"}
title={!collapsible ? "请选择服务区" : ""} title={!collapsible ? "请选择服务区" : ""}
headerBordered headerBordered
@ -291,20 +302,20 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
defaultExpandedKeys={['0-0']} defaultExpandedKeys={['0-0']}
onCheck={(checkedKeys: React.Key[] | any, info) => { onCheck={(checkedKeys: React.Key[] | any, info) => {
const selectedIds = info.checkedNodes.filter(n => n?.type === 1) 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) handleGetShopList(selectedIds)
}else{ } else {
setServerpartShopObj({}) setServerpartShopObj({})
} }
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '') setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
// actionRef?.current?.reload() // actionRef?.current?.reload()
// getData(selectedIds.map(n => n?.value)?.toString() || '') // getData(selectedIds.map(n => n?.value)?.toString() || '')
}} }}
// switcherIcon={<PlusOutlined />} // switcherIcon={<PlusOutlined />}
/> : ''} /> : ''}
</ProCard> </ProCard>
<div style={{ <div style={{
width:!collapsible?'calc(100% - 300px)':'calc(100% - 60px)', width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0, paddingTop: 0,
paddingBottom: 0, paddingBottom: 0,
paddingRight: 0 paddingRight: 0
@ -315,16 +326,17 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
columns={columns} columns={columns}
bordered bordered
headerTitle={<PageTitleBox props={props} />} headerTitle={<PageTitleBox props={props} />}
search={{span: 6}} search={{ span: 6 }}
pagination={{pageSize: 20}} pagination={{ pageSize: 20 }}
request={async(params)=>{ scroll={{ x: '100%', y: 'calc(100vh - 430px)' }}
console.log('params',params) request={async (params) => {
if (!selectedId){ console.log('params', params)
if (!selectedId) {
return return
} }
handleCallLogs() handleCallLogs()
const req = { const req = {
SearchParameter:{ SearchParameter: {
...params, ...params,
SERVERPART_IDS: selectedId, SERVERPART_IDS: selectedId,
EXCEPTION_TYPE: 1000 EXCEPTION_TYPE: 1000
@ -334,16 +346,16 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
} }
setSearchParams(params) setSearchParams(params)
const data = await handleGetYSABNORMALITYList(req) const data = await handleGetYSABNORMALITYList(req)
console.log('data',data) console.log('data', data)
if (data && data.length>0){ if (data && data.length > 0) {
setReqDetailList(data) setReqDetailList(data)
return { data, success: true } return { data, success: true }
} }
return { data:[], success: true } return { data: [], success: true }
}} }}
toolbar={{ toolbar={{
actions: [ actions: [
<span style={{visibility: 'hidden'}}> <span style={{ visibility: 'hidden' }}>
<ReactHTMLTableToExcel <ReactHTMLTableToExcel
buttonText={'导出excel'} buttonText={'导出excel'}
ref={downloadBtnRef} ref={downloadBtnRef}
@ -380,6 +392,6 @@ const abnormalSale: React.FC<{ currentUser: CurrentUser}> = (props) => {
) )
} }
export default connect(({user}: ConnectState) => ({ export default connect(({ user }: ConnectState) => ({
currentUser: user.currentUser currentUser: user.currentUser
}))(abnormalSale); }))(abnormalSale);

View File

@ -2089,7 +2089,7 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
summary={() => { summary={() => {
return <> return <>
<tr> <tr>
<td colSpan={2} align={'center'}>{exportSumRow?.PeriodIndexStr}</td> <td colSpan={2} align={'center'}>{exportSumRow?.PeriodIndexStr}1</td>
<td>{exportSumRow?.MinturnOver ? handleFormatNumber(exportSumRow?.MinturnOver) : '0'}</td> <td>{exportSumRow?.MinturnOver ? handleFormatNumber(exportSumRow?.MinturnOver) : '0'}</td>
<td></td> <td></td>
<td>{exportSumRow?.CashAmount ? handleFormatNumber(exportSumRow?.CashAmount) : '0'}</td> <td>{exportSumRow?.CashAmount ? handleFormatNumber(exportSumRow?.CashAmount) : '0'}</td>
@ -2113,9 +2113,9 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
</tr> </tr>
<tr></tr> <tr></tr>
<tr> <tr>
<td colSpan={1} align={'right'}>{'财务部:'}</td> <td colSpan={1} align={'right'}>{`${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司' : ''}财务部:`}</td>
<td colSpan={6}>{signature?.financeName || ''}</td> <td colSpan={6}>{signature?.financeName || ''}</td>
<td colSpan={1} align={'right'}>{'经发部:'}</td> <td colSpan={1} align={'right'}>{`${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司运营服务部:' : '经发部:'}`}</td>
<td colSpan={6}>{signature?.developmentName || ''}</td> <td colSpan={6}>{signature?.developmentName || ''}</td>
</tr> </tr>
<tr></tr> <tr></tr>
@ -2638,11 +2638,11 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
const footer: string = `<div style="width:100%;box-sizing: border-box;padding: 12px 12px 12px 20px;"> const footer: string = `<div style="width:100%;box-sizing: border-box;padding: 12px 12px 12px 20px;">
<div style="width: 100%;display: flex;align-items: center;"> <div style="width: 100%;display: flex;align-items: center;">
<div style="width: 33%;box-sizing: border-box;padding-left: 5%"> <div style="width: 33%;box-sizing: border-box;padding-left: 5%">
<span style="font-size: 14px;font-weight: 600;margin-right: 2px;"></span> <span style="font-size: 14px;font-weight: 600;margin-right: 2px;">${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司' : ''}</span>
<span style="font-size: 12px;">${signature?.financeRealName || ''}</span> <span style="font-size: 12px;">${signature?.financeRealName || ''}</span>
</div> </div>
<div style="width: 33%;box-sizing: border-box;padding-left: 5%"> <div style="width: 33%;box-sizing: border-box;padding-left: 5%">
<span style="font-size: 14px;font-weight: 600;margin-right: 2px;"></span> <span style="font-size: 14px;font-weight: 600;margin-right: 2px;">${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司运营服务部:' : '经发部'}</span>
<span style="font-size: 12px;">${signature?.developmentRealName || ''}</span> <span style="font-size: 12px;">${signature?.developmentRealName || ''}</span>
</div> </div>
<div style="width: 33%;box-sizing: border-box;padding-left: 5%"> <div style="width: 33%;box-sizing: border-box;padding-left: 5%">
@ -2684,6 +2684,8 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
<Button style={{ marginLeft: '8px' }} key="new" onClick={() => { <Button style={{ marginLeft: '8px' }} key="new" onClick={() => {
setIsPrinting(true) setIsPrinting(true)
console.log('exportData', exportData); console.log('exportData', exportData);
console.log('parentRow', parentRow);
// window.print(); // window.print();
const printName: string = `${parentRow?.MERCHANTS_NAME}-${parentRow?.SETTLEMENT_DATE ? `${moment(parentRow?.SETTLEMENT_DATE).format('YYYY')}年度` : ''}结算明细表` const printName: string = `${parentRow?.MERCHANTS_NAME}-${parentRow?.SETTLEMENT_DATE ? `${moment(parentRow?.SETTLEMENT_DATE).format('YYYY')}年度` : ''}结算明细表`
@ -2736,11 +2738,11 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
const footer: string = `<div style="width:100%;box-sizing: border-box;padding: 12px 12px 12px 20px;"> const footer: string = `<div style="width:100%;box-sizing: border-box;padding: 12px 12px 12px 20px;">
<div style="width: 100%;display: flex;align-items: center;"> <div style="width: 100%;display: flex;align-items: center;">
<div style="width: 33%;box-sizing: border-box;padding-left: 5%"> <div style="width: 33%;box-sizing: border-box;padding-left: 5%">
<span style="font-size: 14px;font-weight: 600;margin-right: 2px;"></span> <span style="font-size: 14px;font-weight: 600;margin-right: 2px;"> ${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司' : ''}</span>
<span style="font-size: 12px;">${signature?.financeRealName || ''}</span> <span style="font-size: 12px;">${signature?.financeRealName || ''}</span>
</div> </div>
<div style="width: 33%;box-sizing: border-box;padding-left: 5%"> <div style="width: 33%;box-sizing: border-box;padding-left: 5%">
<span style="font-size: 14px;font-weight: 600;margin-right: 2px;"></span> <span style="font-size: 14px;font-weight: 600;margin-right: 2px;">${new Date(parentRow?.CLOSED_DATE || parentRow?.ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime() ? '运营管理子公司运营服务部:' : '经发部:'}</span>
<span style="font-size: 12px;">${signature?.developmentRealName || ''}</span> <span style="font-size: 12px;">${signature?.developmentRealName || ''}</span>
</div> </div>
<div style="width: 33%;box-sizing: border-box;padding-left: 5%"> <div style="width: 33%;box-sizing: border-box;padding-left: 5%">

View File

@ -77,6 +77,7 @@ const PrintContent = ({ pageName, exportColumns, exportData, exportSumRow, type
<td align={'right'}>{exportSumRow?.PaidFee_9099 ? formatToTwoDecimalPlaces(exportSumRow?.PaidFee_9099) : '0.00'}</td> <td align={'right'}>{exportSumRow?.PaidFee_9099 ? formatToTwoDecimalPlaces(exportSumRow?.PaidFee_9099) : '0.00'}</td>
</> </>
} }
<td align={'right'}>{exportSumRow?.ReductionAmountSum ? formatToTwoDecimalPlaces(exportSumRow?.ReductionAmountSum) : '0'}</td>
<td align={'right'}>{exportSumRow?.RefundSupplement ? formatToTwoDecimalPlaces(exportSumRow?.RefundSupplement) : '0'}</td> <td align={'right'}>{exportSumRow?.RefundSupplement ? formatToTwoDecimalPlaces(exportSumRow?.RefundSupplement) : '0'}</td>
<td>{exportSumRow?.desc}</td> <td>{exportSumRow?.desc}</td>
</tr> : '' </tr> : ''

View File

@ -1,4 +1,4 @@
// 由 scripts/writeVersion.js 自动生成 // 由 scripts/writeVersion.js 自动生成
export const VERSION = "4.5.40"; export const VERSION = "4.5.42";
export const GIT_HASH = "debd5be"; export const GIT_HASH = "a05dd91";
export const BUILD_TIME = "2025-08-29T07:11:29.945Z"; export const BUILD_TIME = "2025-09-01T07:45:38.579Z";