update
This commit is contained in:
parent
27ce6e9675
commit
d7338647f1
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ant-design-pro",
|
||||
"version": "4.5.72",
|
||||
"version": "4.5.73",
|
||||
"private": true,
|
||||
"description": "An out-of-box UI solution for enterprise applications",
|
||||
"scripts": {
|
||||
|
||||
@ -31,7 +31,7 @@ import IconFont from '@/components/IconFont';
|
||||
import type { CurrentUser } from '@/models/user'
|
||||
import session from '@/utils/session';
|
||||
import upMenu from '../assets/tab/upMenu.png'
|
||||
import { getFieldEnum, getFieldEnumTree, getFieldGetFieEnumList} from "@/services/options";
|
||||
import { getFieldEnum, getFieldEnumTree, getFieldGetFieEnumList } from "@/services/options";
|
||||
import { handleGetServerpartTree } from '@/pages/basicManage/serverpartAssets/service';
|
||||
import list from '@/pages/Invoicing/list';
|
||||
|
||||
|
||||
@ -944,7 +944,7 @@ const ItemDetail: React.FC<{ currentItem?: any, showDetail?: any, currentRow?: a
|
||||
</div>
|
||||
</div>
|
||||
{
|
||||
selectTab === 1 ?
|
||||
selectTab === 1 && currentDetail?.Endaccount_Id ?
|
||||
<iframe
|
||||
style={{ borderWidth: '0px' }}
|
||||
width={'100%'}
|
||||
|
||||
@ -1,55 +1,76 @@
|
||||
import React, {useEffect, useRef, useState} from "react";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import closeIcon from "@/assets/brand/closeIcon.png";
|
||||
|
||||
import './reportDetail.less'
|
||||
import ProTable from "@ant-design/pro-table";
|
||||
import { handleGetDataList, handleGetMobilePayment,handleGetShopTypeTree} from "@/pages/DataVerification/list/service";
|
||||
import {Button, Input, Select, TreeSelect,Table} from "antd";
|
||||
import { handleGetDataList, handleGetMobilePayment, handleGetShopTypeTree } from "@/pages/DataVerification/list/service";
|
||||
import { Button, Input, Select, TreeSelect, Table } from "antd";
|
||||
|
||||
|
||||
const reportDetail: React.FC<{queryRecords: boolean,selectQueryType: number,currentItem: any,currentRow: any,currentUser: any}>=({queryRecords,selectQueryType,currentItem,currentRow,currentUser})=>{
|
||||
const reportDetail: React.FC<{ queryRecords: boolean, selectQueryType: number, currentItem: any, currentRow: any, currentUser: any }> = ({ queryRecords, selectQueryType, currentItem, currentRow, currentUser }) => {
|
||||
const tableRef = useRef()
|
||||
// 收银前端流水合计
|
||||
const [totalRepayment,setTotalRepayment] = useState<number>(0)
|
||||
const [totalRepayment, setTotalRepayment] = useState<number>(0)
|
||||
// 单品报表
|
||||
const firstColumns = [
|
||||
{
|
||||
title: '序',
|
||||
dataIndex: 'index',
|
||||
width: 70,
|
||||
align: 'center',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '商品名称',
|
||||
width: 250,
|
||||
align: 'center',
|
||||
dataIndex: 'commodity_name',
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '商品条码',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
dataIndex: 'Commodity_Barcode',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '销售数量',
|
||||
title: <div style={{ textAlign: 'center' }}>销售数量</div>,
|
||||
width: 80,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
dataIndex: 'Total_Count',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '销售单价',
|
||||
title: <div style={{ textAlign: 'center' }}>销售单价</div>,
|
||||
width: 80,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
dataIndex: 'Commodity_RetailPrice',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '优惠金额',
|
||||
title: <div style={{ textAlign: 'center' }}>优惠金额</div>,
|
||||
width: 80,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
dataIndex: 'Total_OffAmount',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '实收总额',
|
||||
title: <div style={{ textAlign: 'center' }}>实收总额</div>,
|
||||
width: 80,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
dataIndex: 'Total_SellAmount',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '商品类型',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
dataIndex: 'CommodityType_Name',
|
||||
// request: async () => {
|
||||
// return await getFieldEnumTree({ FieldExplainField: 'CommodityType_Id', sessionName: 'CommodityType_Id' });
|
||||
@ -57,6 +78,8 @@ const reportDetail: React.FC<{queryRecords: boolean,selectQueryType: number,curr
|
||||
},
|
||||
{
|
||||
title: '单品扫码标识',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
dataIndex: 'ScanSymbol',
|
||||
hideInSearch: true,
|
||||
}
|
||||
@ -65,41 +88,62 @@ const reportDetail: React.FC<{queryRecords: boolean,selectQueryType: number,curr
|
||||
const secondColumns = [
|
||||
{
|
||||
title: '序',
|
||||
width: 70,
|
||||
align: 'center',
|
||||
dataIndex: 'index',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '商品名称',
|
||||
width: 250,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'commodity_name',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '商品条码',
|
||||
width: 150,
|
||||
align: 'center',
|
||||
dataIndex: 'Commodity_Barcode',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '销售数量',
|
||||
title: <div style={{ textAlign: 'center' }}>销售数量</div>,
|
||||
width: 80,
|
||||
dataIndex: 'Total_Count',
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '销售单价',
|
||||
title: <div style={{ textAlign: 'center' }}>销售单价</div>,
|
||||
dataIndex: 'Commodity_RetailPrice',
|
||||
width: 80,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '优惠金额',
|
||||
title: <div style={{ textAlign: 'center' }}>优惠金额</div>,
|
||||
dataIndex: 'Total_OffAmount',
|
||||
width: 80,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '实收总额',
|
||||
title: <div style={{ textAlign: 'center' }}>实收总额</div>,
|
||||
dataIndex: 'Total_SellAmount',
|
||||
width: 80,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '商品类型',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
dataIndex: 'CommodityType_Name',
|
||||
hideInSearch: true,
|
||||
},
|
||||
@ -108,11 +152,15 @@ const reportDetail: React.FC<{queryRecords: boolean,selectQueryType: number,curr
|
||||
const thirdColumns = [
|
||||
{
|
||||
title: '序',
|
||||
width: 70,
|
||||
align: 'center',
|
||||
dataIndex: 'index',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '交易结果',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
dataIndex: 'FactTradeState',
|
||||
hideInSearch: true,
|
||||
},
|
||||
@ -120,16 +168,21 @@ const reportDetail: React.FC<{queryRecords: boolean,selectQueryType: number,curr
|
||||
title: '销售时间',
|
||||
dataIndex: 'MobilePayDate',
|
||||
hideInSearch: true,
|
||||
width:200
|
||||
align: 'center',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '单据编号',
|
||||
dataIndex: 'TicketCode',
|
||||
hideInSearch: true,
|
||||
width:300
|
||||
align: 'center',
|
||||
width: 250
|
||||
},
|
||||
{
|
||||
title: '销售金额',
|
||||
title: <div style={{ textAlign: 'center' }}>销售金额</div>,
|
||||
width: 120,
|
||||
valueType: 'digit',
|
||||
align: 'right',
|
||||
dataIndex: 'TicketAmount',
|
||||
hideInSearch: true,
|
||||
},
|
||||
@ -137,39 +190,43 @@ const reportDetail: React.FC<{queryRecords: boolean,selectQueryType: number,curr
|
||||
title: '后台交易状态',
|
||||
dataIndex: 'ChannelTradeState',
|
||||
hideInSearch: true,
|
||||
width:150
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '前端交易状态',
|
||||
dataIndex: 'CashierTradeState',
|
||||
hideInSearch: true,
|
||||
width:150
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '支付方式',
|
||||
dataIndex: 'OperatorType',
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
]
|
||||
const [tableData,setTableData] = useState<any>()
|
||||
const [exceptionType,setExceptionType] = useState<number>(5)
|
||||
const [treeData,setTreeData] = useState<any>()
|
||||
const [tableData, setTableData] = useState<any>()
|
||||
const [exceptionType, setExceptionType] = useState<number>(5)
|
||||
const [treeData, setTreeData] = useState<any>()
|
||||
// 搜索表格内的 输入框的值
|
||||
const [searchText,setSearchText] = useState<string>()
|
||||
const [searchText, setSearchText] = useState<string>()
|
||||
// 若搜索的输入框有值 出现的表格内容列表
|
||||
const [showDataList,setShowDataList]= useState<any>()
|
||||
const [showDataList, setShowDataList] = useState<any>()
|
||||
// 商品类型的搜索项
|
||||
const [selectShopType,setSelectShopType] = useState<any>()
|
||||
console.log('currentItem',currentItem)
|
||||
console.log('currentRow',currentRow)
|
||||
const [selectShopType, setSelectShopType] = useState<any>()
|
||||
console.log('currentItem', currentItem)
|
||||
console.log('currentRow', currentRow)
|
||||
|
||||
|
||||
// 商品类型列表
|
||||
|
||||
useEffect(async () => {
|
||||
if (queryRecords && selectQueryType===1){
|
||||
const options = await handleGetShopTypeTree({PROVINCE_CODE:currentUser?.ProvinceCode})
|
||||
console.log('options',options)
|
||||
if (queryRecords && selectQueryType === 1) {
|
||||
const options = await handleGetShopTypeTree({ PROVINCE_CODE: currentUser?.ProvinceCode })
|
||||
console.log('options', options)
|
||||
setTreeData(options)
|
||||
}
|
||||
}, [queryRecords]);
|
||||
@ -178,70 +235,70 @@ const reportDetail: React.FC<{queryRecords: boolean,selectQueryType: number,curr
|
||||
return (
|
||||
<div className={'reportDetail'}>
|
||||
<div className={'detailTop'}>
|
||||
<p className={'detailTitle'}>{selectQueryType===1?'单品报表':selectQueryType===2?'香烟记录':selectQueryType===3?'支付记录':''}</p>
|
||||
<img className={'closeIcon'} src={closeIcon}/>
|
||||
<p className={'detailTitle'}>{selectQueryType === 1 ? '单品报表' : selectQueryType === 2 ? '香烟记录' : selectQueryType === 3 ? '支付记录' : ''}</p>
|
||||
<img className={'closeIcon'} src={closeIcon} />
|
||||
</div>
|
||||
<div className={'searchBox'}>
|
||||
<div style={{display:'flex',alignItems:'center'}}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
{
|
||||
selectQueryType===1?
|
||||
<div className={'searchLabel'}>
|
||||
<span className={'label'}>商品类型:</span>
|
||||
<TreeSelect
|
||||
showSearch
|
||||
style={{width:'250px'}}
|
||||
allowClear
|
||||
treeData={treeData}
|
||||
onChange={(e: any)=>{
|
||||
console.log('e',e)
|
||||
setSelectShopType(e)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
:''
|
||||
selectQueryType === 1 ?
|
||||
<div className={'searchLabel'}>
|
||||
<span className={'label'}>商品类型:</span>
|
||||
<TreeSelect
|
||||
showSearch
|
||||
style={{ width: '250px' }}
|
||||
allowClear
|
||||
treeData={treeData}
|
||||
onChange={(e: any) => {
|
||||
console.log('e', e)
|
||||
setSelectShopType(e)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
: ''
|
||||
}
|
||||
{
|
||||
selectQueryType===3?
|
||||
<div className={'searchLabel'}>
|
||||
selectQueryType === 3 ?
|
||||
<div className={'searchLabel'}>
|
||||
<span className={'label'}>交易状态: </span>
|
||||
<Select
|
||||
style={{width:'250px'}}
|
||||
style={{ width: '250px' }}
|
||||
value={exceptionType}
|
||||
options={[
|
||||
{label:'异常数据',value:5},
|
||||
{label:'交易成功',value:9},
|
||||
{label:'人工确认',value:1},
|
||||
{label:'交易失败',value:0},
|
||||
{ label: '异常数据', value: 5 },
|
||||
{ label: '交易成功', value: 9 },
|
||||
{ label: '人工确认', value: 1 },
|
||||
{ label: '交易失败', value: 0 },
|
||||
]}
|
||||
onChange={(e: any)=>{
|
||||
onChange={(e: any) => {
|
||||
setExceptionType(e)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
:''
|
||||
: ''
|
||||
}
|
||||
<Input
|
||||
allowClear
|
||||
value={searchText}
|
||||
style={{width:'300px'}}
|
||||
style={{ width: '300px' }}
|
||||
// onInput={(e: any)=>{
|
||||
// console.log('e',e)
|
||||
// setSearchText(e.target.value)
|
||||
// }}
|
||||
onChange={(e: any)=>{
|
||||
console.log('e',e)
|
||||
onChange={(e: any) => {
|
||||
console.log('e', e)
|
||||
setSearchText(e.target.value)
|
||||
}}
|
||||
// placeholder={'商品名称/商品条码/销售数量/销售单价/优惠金额/实收总额/商品类型'}
|
||||
placeholder={'商品名称/商品条码/销售数量/销售单价/优惠金额/实收总额/商品类型'}
|
||||
/>
|
||||
</div>
|
||||
<div className={'btnBox'}>
|
||||
<Button style={{marginRight:'8px'}} onClick={()=>{
|
||||
<Button style={{ marginRight: '8px' }} onClick={() => {
|
||||
setSearchText('')
|
||||
setSelectShopType(undefined)
|
||||
tableRef.current?.reset()
|
||||
}}>重置</Button>
|
||||
<Button type={'primary'} onClick={()=>{
|
||||
<Button type={'primary'} onClick={() => {
|
||||
tableRef.current?.reload()
|
||||
}}>查询</Button>
|
||||
</div>
|
||||
@ -250,106 +307,107 @@ const reportDetail: React.FC<{queryRecords: boolean,selectQueryType: number,curr
|
||||
actionRef={tableRef}
|
||||
options={false}
|
||||
search={false}
|
||||
columns={selectQueryType===1?firstColumns:selectQueryType===2?secondColumns:selectQueryType===3?thirdColumns:[]}
|
||||
request={async (params)=>{
|
||||
console.log('params',params)
|
||||
if (selectQueryType!==3){
|
||||
bordered
|
||||
columns={selectQueryType === 1 ? firstColumns : selectQueryType === 2 ? secondColumns : selectQueryType === 3 ? thirdColumns : []}
|
||||
request={async (params) => {
|
||||
console.log('params', params)
|
||||
if (selectQueryType !== 3) {
|
||||
let req
|
||||
if (selectQueryType===1){
|
||||
if (selectQueryType === 1) {
|
||||
req = {
|
||||
ServerpartCode:currentItem?.Serverpart_Code,
|
||||
ShopCode:currentItem?.ServerpartShop_Code,
|
||||
MachineCode:currentItem?.MachineCode,
|
||||
StartDate:currentItem?.Endaccount_StartDate,
|
||||
EndDate:currentItem?.Endaccount_EndDate,
|
||||
CommodityTypeId:selectShopType
|
||||
ServerpartCode: currentItem?.Serverpart_Code,
|
||||
ShopCode: currentItem?.ServerpartShop_Code,
|
||||
MachineCode: currentItem?.MachineCode,
|
||||
StartDate: currentItem?.Endaccount_StartDate,
|
||||
EndDate: currentItem?.Endaccount_EndDate,
|
||||
CommodityTypeId: selectShopType
|
||||
}
|
||||
}else if(selectQueryType===2){
|
||||
} else if (selectQueryType === 2) {
|
||||
req = {
|
||||
ServerpartCode:currentItem?.Serverpart_Code,
|
||||
ShopCode:currentItem?.ServerpartShop_Code,
|
||||
MachineCode:currentItem?.MachineCode,
|
||||
StartDate:currentItem?.Endaccount_StartDate,
|
||||
EndDate:currentItem?.Endaccount_EndDate,
|
||||
CommodityTypeId:currentItem?.CigaretteTypeIds
|
||||
ServerpartCode: currentItem?.Serverpart_Code,
|
||||
ShopCode: currentItem?.ServerpartShop_Code,
|
||||
MachineCode: currentItem?.MachineCode,
|
||||
StartDate: currentItem?.Endaccount_StartDate,
|
||||
EndDate: currentItem?.Endaccount_EndDate,
|
||||
CommodityTypeId: currentItem?.CigaretteTypeIds
|
||||
}
|
||||
}
|
||||
const data = await handleGetDataList(req)
|
||||
const list = JSON.parse(JSON.stringify(data.List))
|
||||
list.forEach((item: any,index: number)=>{
|
||||
list.forEach((item: any, index: number) => {
|
||||
item.index = index + 1
|
||||
})
|
||||
if (searchText){
|
||||
if (searchText) {
|
||||
const newList: any = []
|
||||
list.forEach((item: any)=>{
|
||||
if (item.commodity_name.toString().indexOf(searchText)!==-1 ||
|
||||
item.Commodity_Barcode.toString().indexOf(searchText)!==-1 ||
|
||||
item.Total_Count.toString().indexOf(searchText)!==-1 ||
|
||||
item.Commodity_RetailPrice.toString().indexOf(searchText)!==-1 ||
|
||||
item.Total_OffAmount.toString().indexOf(searchText)!==-1 ||
|
||||
item.Total_SellAmount.toString().indexOf(searchText)!==-1 ||
|
||||
item.CommodityType_Name.toString().indexOf(searchText)!==-1
|
||||
){
|
||||
list.forEach((item: any) => {
|
||||
if (item.commodity_name.toString().indexOf(searchText) !== -1 ||
|
||||
item.Commodity_Barcode.toString().indexOf(searchText) !== -1 ||
|
||||
item.Total_Count.toString().indexOf(searchText) !== -1 ||
|
||||
item.Commodity_RetailPrice.toString().indexOf(searchText) !== -1 ||
|
||||
item.Total_OffAmount.toString().indexOf(searchText) !== -1 ||
|
||||
item.Total_SellAmount.toString().indexOf(searchText) !== -1 ||
|
||||
item.CommodityType_Name.toString().indexOf(searchText) !== -1
|
||||
) {
|
||||
newList.push(item)
|
||||
}
|
||||
})
|
||||
return {data: newList}
|
||||
return { data: newList }
|
||||
}
|
||||
setTableData(list)
|
||||
return {data: list}
|
||||
setTableData(list)
|
||||
return { data: list }
|
||||
}
|
||||
if(selectQueryType===3){
|
||||
if (selectQueryType === 3) {
|
||||
const req = {
|
||||
ExceptionType:exceptionType,
|
||||
ServerpartCode:currentItem?.Serverpart_Code,
|
||||
ShopCode:currentItem?.ServerpartShop_Code,
|
||||
MachineCode:currentItem?.MachineCode,
|
||||
StartDate:currentItem?.Endaccount_StartDate,
|
||||
EndDate:currentItem?.Endaccount_EndDate
|
||||
ExceptionType: exceptionType,
|
||||
ServerpartCode: currentItem?.Serverpart_Code,
|
||||
ShopCode: currentItem?.ServerpartShop_Code,
|
||||
MachineCode: currentItem?.MachineCode,
|
||||
StartDate: currentItem?.Endaccount_StartDate,
|
||||
EndDate: currentItem?.Endaccount_EndDate
|
||||
}
|
||||
const data = await handleGetMobilePayment(req)
|
||||
const list = JSON.parse(JSON.stringify(data.List))
|
||||
let money: number = 0
|
||||
list.forEach((item: any,index: number)=>{
|
||||
item.index = index + 1
|
||||
money+=Number(item.TicketAmount)
|
||||
list.forEach((item: any, index: number) => {
|
||||
item.index = index + 1
|
||||
money += Number(item.TicketAmount)
|
||||
})
|
||||
setTotalRepayment(money)
|
||||
if (searchText){
|
||||
if (searchText) {
|
||||
const newList: any = []
|
||||
list.forEach((item: any)=>{
|
||||
if (item.FactTradeState.toString().indexOf(searchText)!==-1 ||
|
||||
item.MobilePayDate.toString().indexOf(searchText)!==-1 ||
|
||||
item.TicketCode.toString().indexOf(searchText)!==-1 ||
|
||||
item.TicketAmount.toString().indexOf(searchText)!==-1 ||
|
||||
item.ChannelTradeState.toString().indexOf(searchText)!==-1 ||
|
||||
item.CashierTradeState.toString().indexOf(searchText)!==-1 ||
|
||||
item.OperatorType.toString().indexOf(searchText)!==-1
|
||||
){
|
||||
list.forEach((item: any) => {
|
||||
if (item.FactTradeState.toString().indexOf(searchText) !== -1 ||
|
||||
item.MobilePayDate.toString().indexOf(searchText) !== -1 ||
|
||||
item.TicketCode.toString().indexOf(searchText) !== -1 ||
|
||||
item.TicketAmount.toString().indexOf(searchText) !== -1 ||
|
||||
item.ChannelTradeState.toString().indexOf(searchText) !== -1 ||
|
||||
item.CashierTradeState.toString().indexOf(searchText) !== -1 ||
|
||||
item.OperatorType.toString().indexOf(searchText) !== -1
|
||||
) {
|
||||
newList.push(item)
|
||||
}
|
||||
})
|
||||
return {data: newList}
|
||||
return { data: newList }
|
||||
}
|
||||
setTableData(list)
|
||||
return {data: list}
|
||||
return { data: list }
|
||||
}
|
||||
return { data: [], success: true }
|
||||
return { data: [], success: true }
|
||||
}}
|
||||
pagination={false}
|
||||
scroll={{y: 'calc(100vh - 310px)',x:'100%'}}
|
||||
scroll={{ y: 'calc(100vh - 310px)', x: '100%' }}
|
||||
>
|
||||
</ProTable>
|
||||
{
|
||||
selectQueryType===3?
|
||||
<div style={{width:'100%',boxSizing:'border-box',paddingLeft:'24px'}}>
|
||||
移动支付金额:收银前端<span style={{color:'red'}}>{currentItem?.MobilePay_Amount}</span>元, 后台交易<span style={{color:'red'}}>{currentItem?.MobilePay_Amount}</span>元, 金额差异<span style={{color:'red'}}>0.00</span>元
|
||||
{
|
||||
tableData && tableData.length>0?
|
||||
<>;收银前端流水合计<span style={{color:'red'}}>{totalRepayment}</span>元</>:''
|
||||
}
|
||||
</div>:''
|
||||
}
|
||||
{
|
||||
selectQueryType === 3 ?
|
||||
<div style={{ width: '100%', boxSizing: 'border-box', paddingLeft: '24px' }}>
|
||||
移动支付金额:收银前端<span style={{ color: 'red' }}>{currentItem?.MobilePay_Amount}</span>元, 后台交易<span style={{ color: 'red' }}>{currentItem?.MobilePay_Amount}</span>元, 金额差异<span style={{ color: 'red' }}>0.00</span>元
|
||||
{
|
||||
tableData && tableData.length > 0 ?
|
||||
<>;收银前端流水合计<span style={{ color: 'red' }}>{totalRepayment.toFixed(2)}</span>元</> : ''
|
||||
}
|
||||
</div> : ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -168,6 +168,9 @@ const RoleList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
const [userTableData, setUserTableData] = useState<any>()
|
||||
// loading
|
||||
const [tableLoading, setTableLoading] = useState<boolean>(false)
|
||||
// 当前新增觉得 可以选的父级角色的列表
|
||||
const [currentSelectParentRoleList, setCurrentSelectParentRoleList] = useState<any>([])
|
||||
|
||||
// 表格配置列数据
|
||||
const columns: ProColumns<SystemRoleModel>[] = [
|
||||
{
|
||||
@ -492,6 +495,10 @@ const RoleList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
key: '1000',
|
||||
label: <span>业主{renderBadge(!typeCountLoading ? typeCount?.OwnerUnitCount : '', activeKey === '1000')}</span>,
|
||||
},
|
||||
// {
|
||||
// key: '2000',
|
||||
// label: <span>商户{renderBadge(!typeCountLoading ? typeCount?.MerchantCount : '', activeKey === '2000')}</span>,
|
||||
// },
|
||||
{
|
||||
key: '4000',
|
||||
label: <span>供应商{renderBadge(!typeCountLoading ? typeCount?.SupplierCount : '', activeKey === '4000')}</span>,
|
||||
@ -557,6 +564,12 @@ const RoleList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
onClick={() => {
|
||||
getRoleMenu(currentUser?.TopSystemRoleId)
|
||||
// 新增角色时,若账号为内部账号则默认角色父级为-1 ,否则则为账号所属角色的父级角色
|
||||
|
||||
console.log('bigTabSelectbigTabSelect', bigTabSelect);
|
||||
console.log('currentUsercurrentUser', currentUser);
|
||||
|
||||
|
||||
|
||||
setCurrentRow({ SYSTEMROLE_PID: bigTabSelect === '1' ? currentUser?.TopSystemRoleId : '-1', SYSTEMROLE_STATUS: 1 })
|
||||
handleModalVisible(true)
|
||||
}}
|
||||
@ -640,6 +653,9 @@ const RoleList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
handleGetRoleTree(currentRow?.SYSTEMROLE_PATTERN)
|
||||
}
|
||||
}
|
||||
|
||||
setCurrentSelectParentRoleList(roleTree)
|
||||
|
||||
} else {
|
||||
setRoleCheckedMenu([])
|
||||
formRef.current?.resetFields();
|
||||
@ -650,6 +666,8 @@ const RoleList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
setUserTableData([])
|
||||
setDefaultSelectRole([])
|
||||
setDefaultRoleTree([])
|
||||
|
||||
setCurrentSelectParentRoleList([])
|
||||
}
|
||||
}}
|
||||
onFinish={async (value) => {
|
||||
@ -727,7 +745,8 @@ const RoleList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
<TreeSelect
|
||||
placeholder="请选择父级角色"
|
||||
dropdownStyle={{ maxHeight: 300, overflow: 'auto' }}
|
||||
treeData={roleTree}
|
||||
// treeData={roleTree}
|
||||
treeData={currentSelectParentRoleList}
|
||||
onSelect={(value: any) => {
|
||||
getRoleMenu(value)
|
||||
return value
|
||||
@ -751,14 +770,34 @@ const RoleList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
message: '请选择角色类型',
|
||||
},
|
||||
]}
|
||||
|
||||
options={[
|
||||
{ label: '业主', value: 1000 },
|
||||
{ label: '商户', value: 2000 },
|
||||
{ label: '游客', value: 3000 },
|
||||
{ label: '供应商', value: 4000 },
|
||||
{ label: '内部人员', value: 9000 }
|
||||
]}></ProFormSelect>
|
||||
]}
|
||||
fieldProps={{
|
||||
onChange: async (e: any) => {
|
||||
console.log('eee', e);
|
||||
const req = {
|
||||
ShowStatus: true,
|
||||
SYSTEMROLE_STATUS: 1,
|
||||
// current: 1,
|
||||
// pageSize: 20,
|
||||
SystemRolePattern: e
|
||||
}
|
||||
const list = await getRoleList(req)
|
||||
console.log('listlistlist', list);
|
||||
setCurrentSelectParentRoleList(list)
|
||||
if (list && list.length > 0) {
|
||||
formRef.current?.setFieldsValue({ SYSTEMROLE_PID: list[0].SYSTEMROLE_ID })
|
||||
} else {
|
||||
formRef.current?.setFieldsValue({ SYSTEMROLE_PID: "" })
|
||||
}
|
||||
}
|
||||
}}
|
||||
></ProFormSelect>
|
||||
{currentUser?.UserPattern === 9000 && <ProFormSelect
|
||||
name="SYSTEMROLE_PROVINCE"
|
||||
label="业主单位"
|
||||
|
||||
@ -81,12 +81,17 @@ const inventoryInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
dataIndex: 'searchText',
|
||||
title: '查询内容',
|
||||
dataIndex: "calcType",
|
||||
title: "统计类型",
|
||||
hideInTable: true,
|
||||
valueType: 'select',
|
||||
fieldProps: {
|
||||
placeholder: "请输入商品名称/商品条码/商品编码"
|
||||
}
|
||||
options: [
|
||||
{ label: "一品一码", value: 1 },
|
||||
{ label: "一品多码", value: 2 },
|
||||
]
|
||||
},
|
||||
initialValue: 1,
|
||||
},
|
||||
{
|
||||
title: "商品类别",
|
||||
@ -107,7 +112,6 @@ const inventoryInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
ShowCode: false
|
||||
}
|
||||
const data = await handleGetNestingCOMMODITYTYPETree(req)
|
||||
console.log('商品类型', buildLeafMaps(data));
|
||||
|
||||
if (data && data.length > 0) {
|
||||
let list: any = []
|
||||
@ -121,6 +125,14 @@ const inventoryInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
return []
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex: 'searchText',
|
||||
title: '查询内容',
|
||||
hideInTable: true,
|
||||
fieldProps: {
|
||||
placeholder: "请输入商品名称/商品条码/商品编码"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: "序号",
|
||||
@ -445,6 +457,7 @@ const inventoryInformation: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
})
|
||||
|
||||
const req: any = {
|
||||
calcType: params?.calcType || "",
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
ServerpartId: serverpartId && serverpartId.length > 0 ? serverpartId.toString() : "",
|
||||
ServerpartShopId: selectedId,
|
||||
|
||||
@ -468,11 +468,11 @@ const servicePartAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
console.log('data', data);
|
||||
let author: string[] = []
|
||||
if (PROWERSET && PROWERSET.length > 0) {
|
||||
let str: string = data.WORKER_OTHER.toString()
|
||||
let str: string = data.WORKER_OTHER
|
||||
PROWERSET.forEach((item: any) => {
|
||||
if (str[item.value - 1] === '1') {
|
||||
if (author) {
|
||||
author.push(item.value.toString())
|
||||
author.push(item.value)
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -610,7 +610,7 @@ const servicePartAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
if (PROWERSET && PROWERSET.length > 0) {
|
||||
PROWERSET.forEach((item: any) => {
|
||||
if (item.value === 50 || item.value === '50') {
|
||||
item.value = item.value.toString()
|
||||
item.value = item.value
|
||||
list.push(item)
|
||||
}
|
||||
})
|
||||
@ -642,7 +642,7 @@ const servicePartAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
let res: any = []
|
||||
if (PROWERSET && PROWERSET.length > 0) {
|
||||
PROWERSET.forEach((item: any) => {
|
||||
res.push(item.value.toString())
|
||||
res.push(item.value)
|
||||
})
|
||||
}
|
||||
editFormRef.current?.setFieldsValue({ WORKER_OTHER: res })
|
||||
@ -657,7 +657,7 @@ const servicePartAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
let resList: any = JSON.parse(JSON.stringify(PROWERSET))
|
||||
res.forEach((item: any) => {
|
||||
resList.forEach((subItem: any) => {
|
||||
if (subItem.value.toString() === item) {
|
||||
if (subItem.value === item) {
|
||||
subItem.show = true
|
||||
}
|
||||
})
|
||||
@ -667,7 +667,7 @@ const servicePartAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
if (item.show) {
|
||||
|
||||
} else {
|
||||
list.push(item.value.toString())
|
||||
list.push(item.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -676,7 +676,7 @@ const servicePartAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
let list: any = []
|
||||
if (PROWERSET && PROWERSET.length > 0) {
|
||||
PROWERSET.forEach((item: any) => {
|
||||
list.push(item.value.toString())
|
||||
list.push(item.value)
|
||||
})
|
||||
}
|
||||
editFormRef.current?.setFieldsValue({ WORKER_OTHER: list })
|
||||
|
||||
@ -385,7 +385,6 @@ const operatingBrand: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
|
||||
let enumList: any = ["BRAND_STATE",]
|
||||
let newPrintData: any = formatTreeData(JSON.parse(JSON.stringify(data)), fieldData, enumList, [[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]], [])
|
||||
console.log('newPrintDatanewPrintData', newPrintData);
|
||||
|
||||
setReqDetailList(newPrintData)
|
||||
return { data: data, success: true }
|
||||
|
||||
@ -470,11 +470,11 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
console.log('data', data);
|
||||
let author: string[] = []
|
||||
if (PROWERSET && PROWERSET.length > 0) {
|
||||
let str: string = data.WORKER_OTHER.toString()
|
||||
let str: string = data.WORKER_OTHER
|
||||
PROWERSET.forEach((item: any) => {
|
||||
if (str[item.value - 1] === '1') {
|
||||
if (author) {
|
||||
author.push(item.value.toString())
|
||||
author.push(item.value)
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -681,11 +681,14 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
<Row>
|
||||
<Button style={{ marginRight: '16px' }} onClick={() => {
|
||||
let res: any = []
|
||||
console.log('PROWERSETPROWERSET', PROWERSET);
|
||||
|
||||
if (PROWERSET && PROWERSET.length > 0) {
|
||||
PROWERSET.forEach((item: any) => {
|
||||
res.push(item.value.toString())
|
||||
res.push(item.value)
|
||||
})
|
||||
}
|
||||
console.log('resresresres', res);
|
||||
editFormRef.current?.setFieldsValue({ WORKER_OTHER: res })
|
||||
}}>全选</Button>
|
||||
<Button onClick={() => {
|
||||
@ -698,7 +701,7 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
let resList: any = JSON.parse(JSON.stringify(PROWERSET))
|
||||
res.forEach((item: any) => {
|
||||
resList.forEach((subItem: any) => {
|
||||
if (subItem.value.toString() === item) {
|
||||
if (subItem.value === item) {
|
||||
subItem.show = true
|
||||
}
|
||||
})
|
||||
@ -708,7 +711,7 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
if (item.show) {
|
||||
|
||||
} else {
|
||||
list.push(item.value.toString())
|
||||
list.push(item.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -717,7 +720,7 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
let list: any = []
|
||||
if (PROWERSET && PROWERSET.length > 0) {
|
||||
PROWERSET.forEach((item: any) => {
|
||||
list.push(item.value.toString())
|
||||
list.push(item.value)
|
||||
})
|
||||
}
|
||||
editFormRef.current?.setFieldsValue({ WORKER_OTHER: list })
|
||||
|
||||
@ -105,6 +105,8 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) =>
|
||||
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
|
||||
// 判断是否是同一天
|
||||
const [isSameDay, setIsSameDay] = useState<boolean>(true)
|
||||
// 抽屉里面的数据
|
||||
const [dailyDrawerData, setDailyDrawerData] = useState<any>()
|
||||
|
||||
const BUSINESSTYPEObj = session.get('BUSINESSTYPEObj')
|
||||
// 总服务区列表配置
|
||||
@ -275,70 +277,71 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) =>
|
||||
render: (_, record) => {
|
||||
return showDailyDrawer ?
|
||||
record?.SPRegionType_Name ? record?.SPRegionType_Name : record?.ServerpartShop_Name ? record?.ServerpartShop_Name : record?.Serverpart_Name :
|
||||
<div>
|
||||
<a style={{ color: isSameDay ? '#000' : '#1890ff' }} onClick={() => {
|
||||
if (moment(searchParamsTime?.StartDate).format('YYYY-MM-DD') === moment(searchParamsTime?.EndDate).format('YYYY-MM-DD')) {
|
||||
} else {
|
||||
console.log('record', record)
|
||||
if (record?.Serverpart_Name === '合计') {
|
||||
let serverpartId: string = ''
|
||||
if (record?.children && record?.children.length > 0) {
|
||||
record?.children.forEach((item: any) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any) => {
|
||||
if (serverpartId) {
|
||||
serverpartId += `,${subItem.Serverpart_ID}`
|
||||
} else {
|
||||
serverpartId = subItem.Serverpart_ID
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
setCurrentRow({
|
||||
...record,
|
||||
Serverpart_ID: serverpartId
|
||||
})
|
||||
setShowDailyDrawer(true)
|
||||
} else if (record?.SPRegionType_Name && record?.SPRegionType_Name.indexOf('管理中心') !== -1) {
|
||||
let serverpartId: string = ''
|
||||
if (record?.children && record?.children.length > 0) {
|
||||
record?.children.forEach((item: any) => {
|
||||
if (serverpartId) {
|
||||
serverpartId += `,${item.Serverpart_ID}`
|
||||
} else {
|
||||
serverpartId = item.Serverpart_ID
|
||||
}
|
||||
})
|
||||
}
|
||||
setCurrentRow({
|
||||
...record,
|
||||
Serverpart_ID: serverpartId
|
||||
})
|
||||
setShowDailyDrawer(true)
|
||||
record?.SPRegionType_Name ? record?.SPRegionType_Name :
|
||||
<div>
|
||||
<a style={{ color: isSameDay ? '#000' : '#1890ff' }} onClick={() => {
|
||||
if (moment(searchParamsTime?.StartDate).format('YYYY-MM-DD') === moment(searchParamsTime?.EndDate).format('YYYY-MM-DD')) {
|
||||
} else {
|
||||
setCurrentRow(record)
|
||||
setShowDailyDrawer(true)
|
||||
console.log('record', record)
|
||||
if (record?.Serverpart_Name === '合计') {
|
||||
let serverpartId: string = ''
|
||||
if (record?.children && record?.children.length > 0) {
|
||||
record?.children.forEach((item: any) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any) => {
|
||||
if (serverpartId) {
|
||||
serverpartId += `,${subItem.Serverpart_ID}`
|
||||
} else {
|
||||
serverpartId = subItem.Serverpart_ID
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
setCurrentRow({
|
||||
...record,
|
||||
Serverpart_ID: serverpartId
|
||||
})
|
||||
setShowDailyDrawer(true)
|
||||
} else if (record?.SPRegionType_Name && record?.SPRegionType_Name.indexOf('管理中心') !== -1) {
|
||||
let serverpartId: string = ''
|
||||
if (record?.children && record?.children.length > 0) {
|
||||
record?.children.forEach((item: any) => {
|
||||
if (serverpartId) {
|
||||
serverpartId += `,${item.Serverpart_ID}`
|
||||
} else {
|
||||
serverpartId = item.Serverpart_ID
|
||||
}
|
||||
})
|
||||
}
|
||||
setCurrentRow({
|
||||
...record,
|
||||
Serverpart_ID: serverpartId
|
||||
})
|
||||
setShowDailyDrawer(true)
|
||||
} else {
|
||||
setCurrentRow(record)
|
||||
setShowDailyDrawer(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}}>
|
||||
}}>
|
||||
{
|
||||
record?.SPRegionType_Name ? record?.SPRegionType_Name : record?.ServerpartShop_Name ? record?.ServerpartShop_Name : record?.Serverpart_Name
|
||||
}
|
||||
{
|
||||
record?.Transfer_Type > 0 ?
|
||||
<img style={{ width: '16px', height: '16px', marginLeft: '4px' }} src={record?.Transfer_Type === 1 ? codeIcon : interfaceIcon} />
|
||||
: ''
|
||||
}
|
||||
</a>
|
||||
{
|
||||
record?.SPRegionType_Name ? record?.SPRegionType_Name : record?.ServerpartShop_Name ? record?.ServerpartShop_Name : record?.Serverpart_Name
|
||||
}
|
||||
{
|
||||
record?.Transfer_Type > 0 ?
|
||||
<img style={{ width: '16px', height: '16px', marginLeft: '4px' }} src={record?.Transfer_Type === 1 ? codeIcon : interfaceIcon} />
|
||||
record?.TotalRevenue?.Supplement_Amount && record?.ServerpartShop_Name ?
|
||||
<Tooltip title={record?.TotalRevenue?.Supplement_Amount}>
|
||||
<img style={{ width: '20px', height: '20px', marginLeft: '4px' }} src={rectification} />
|
||||
</Tooltip>
|
||||
: ''
|
||||
}
|
||||
</a>
|
||||
{
|
||||
record?.TotalRevenue?.Supplement_Amount && record?.ServerpartShop_Name ?
|
||||
<Tooltip title={record?.TotalRevenue?.Supplement_Amount}>
|
||||
<img style={{ width: '20px', height: '20px', marginLeft: '4px' }} src={rectification} />
|
||||
</Tooltip>
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
},
|
||||
// onCell: (record) => ({
|
||||
@ -397,7 +400,6 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) =>
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
// title: () => <Text strong>合计</Text>,
|
||||
title: '合计',
|
||||
hideInSearch: true,
|
||||
@ -635,6 +637,145 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) =>
|
||||
]
|
||||
},
|
||||
];
|
||||
|
||||
// 导出的columns
|
||||
const exportColumns: any = [
|
||||
{
|
||||
title: "时间",
|
||||
width: 150,
|
||||
align: 'center',
|
||||
dataIndex: "Statistics_Date"
|
||||
},
|
||||
{
|
||||
// title: () => <Text strong>合计</Text>,
|
||||
title: '合计',
|
||||
hideInSearch: true,
|
||||
children: [
|
||||
{
|
||||
title: '实收金额',
|
||||
dataIndex: 'TotalRevenue.Revenue_Amount',
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '移动支付',
|
||||
dataIndex: 'TotalRevenue.MobilePay_Amount',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '现金支付',
|
||||
dataIndex: 'TotalRevenue.CashPay_Amount',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '移动支付冲正',
|
||||
dataIndex: 'TotalRevenue.Mobile_Correct',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '现金支付冲正',
|
||||
dataIndex: 'TotalRevenue.Cash_Correct',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
// title: () => <Text strong>东(南)区</Text>,
|
||||
title: "东(南)区",
|
||||
hideInSearch: true,
|
||||
children: [
|
||||
{
|
||||
title: '实收金额',
|
||||
dataIndex: 'RegionARevenue.Revenue_Amount',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '移动支付',
|
||||
dataIndex: 'RegionARevenue.MobilePay_Amount',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '现金支付',
|
||||
dataIndex: 'RegionARevenue.CashPay_Amount',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '移动支付冲正',
|
||||
dataIndex: 'RegionARevenue.Mobile_Correct',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '现金支付冲正',
|
||||
dataIndex: 'RegionARevenue.Cash_Correct',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
title: "西(北)区",
|
||||
// title: () => <Text strong>西(北)区</Text>,
|
||||
hideInSearch: true,
|
||||
children: [
|
||||
{
|
||||
title: '实收金额',
|
||||
dataIndex: 'RegionBRevenue.Revenue_Amount',
|
||||
align: 'right',
|
||||
width: 120,
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '移动支付',
|
||||
dataIndex: 'RegionBRevenue.MobilePay_Amount',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '现金支付',
|
||||
dataIndex: 'RegionBRevenue.CashPay_Amount',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '移动支付冲正',
|
||||
dataIndex: 'RegionBRevenue.Mobile_Correct',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
},
|
||||
{
|
||||
title: '现金支付冲正',
|
||||
dataIndex: 'RegionBRevenue.Cash_Correct',
|
||||
width: 120,
|
||||
align: 'right',
|
||||
valueType: 'digit',
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
// 导出excel方法
|
||||
const exportTable = (e, haveType?: boolean) => {
|
||||
// haveType判断要不要带上其他参数
|
||||
@ -670,7 +811,7 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) =>
|
||||
// 自营业态的选择的列表方法
|
||||
const handleGetShopNamesList = async (id: any) => {
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.USER_PROVINCE,
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
BusinessType: 1000,
|
||||
ServerpartId: id || selectedId
|
||||
}
|
||||
@ -1077,9 +1218,33 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) =>
|
||||
handleCallLogs()
|
||||
const data = await handleGetRevenueReportByDate(req);
|
||||
console.log('data2222', data)
|
||||
|
||||
|
||||
if (data && data.length > 0) {
|
||||
let fieldData: any = [
|
||||
"TotalRevenue.Revenue_Amount",
|
||||
"TotalRevenue.MobilePay_Amount",
|
||||
"TotalRevenue.CashPay_Amount",
|
||||
"TotalRevenue.Mobile_Correct",
|
||||
"TotalRevenue.Cash_Correct",
|
||||
"RegionARevenue.Revenue_Amount",
|
||||
"RegionARevenue.MobilePay_Amount",
|
||||
"RegionARevenue.CashPay_Amount",
|
||||
"RegionARevenue.Mobile_Correct",
|
||||
"RegionARevenue.Cash_Correct",
|
||||
"RegionBRevenue.Revenue_Amount",
|
||||
"RegionBRevenue.MobilePay_Amount",
|
||||
"RegionBRevenue.CashPay_Amount",
|
||||
"RegionBRevenue.Mobile_Correct",
|
||||
"RegionBRevenue.Cash_Correct"
|
||||
]
|
||||
|
||||
let newPrintData: any = formatTreeData(JSON.parse(JSON.stringify(data)), fieldData, [], [], [])
|
||||
console.log('newPrintDatanewPrintDatanewPrintData', newPrintData);
|
||||
setDailyDrawerData(newPrintData[0].children)
|
||||
return { data, success: true }
|
||||
}
|
||||
setDailyDrawerData([])
|
||||
return { data: [], success: true }
|
||||
|
||||
}}
|
||||
@ -1092,6 +1257,29 @@ const RevenueSummaryTable: React.FC<{ currentUser?: CurrentUser }> = (props) =>
|
||||
defaultExpandAllRows: true,
|
||||
defaultExpandedRowKeys: ['0-0合计0'],
|
||||
}}
|
||||
toolbar={{
|
||||
actions: [
|
||||
<Button
|
||||
key="new"
|
||||
type="primary"
|
||||
onClick={(e) => {
|
||||
console.log('dailyDrawerDatadailyDrawerDatadailyDrawerDatadailyDrawerData', dailyDrawerData);
|
||||
|
||||
exportXlsxFromProColumnsExcelJS(exportColumns,
|
||||
dailyDrawerData,
|
||||
`${`${currentRow?.SPRegionType_Name || ''}` + `${currentRow?.Serverpart_Name || ''}` + ` ${currentRow?.ServerpartShop_Name || ''}`}每日营收汇总报表${moment(searchParamsTime?.StartDate).format('YYYY-MM-DD')}-${moment(searchParamsTime?.EndDate).format('YYYY-MM-DD')}`,
|
||||
{
|
||||
|
||||
topTitle: `${`${currentRow?.SPRegionType_Name || ''}` + `${currentRow?.Serverpart_Name || ''}` + ` ${currentRow?.ServerpartShop_Name || ''}`}每日营收汇总报表`, // 顶部大标题
|
||||
}
|
||||
)
|
||||
}}
|
||||
>
|
||||
导出excel
|
||||
</Button>
|
||||
|
||||
]
|
||||
}}
|
||||
/>
|
||||
</Drawer>
|
||||
</PageContainer>
|
||||
|
||||
@ -21,6 +21,7 @@ import { handleGetShopShortNamesGet } from "@/pages/reports/BusinessAnalysis/tra
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||
import { formatTreeData } from "@/utils/format";
|
||||
import session from "@/utils/session";
|
||||
|
||||
|
||||
const personSellReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
@ -32,6 +33,7 @@ const personSellReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
|
||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||
const [treeView, setTreeView] = useState<any>()
|
||||
const BUSINESSTYPEObj = session.get('BUSINESSTYPEObj')
|
||||
// 加载服务区树
|
||||
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
||||
const data = await handleGetServiceShopTreeList({
|
||||
@ -55,21 +57,25 @@ const personSellReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const [tableData, setTableData] = useState<any>()
|
||||
// 自营业态的选择的列表方法
|
||||
const handleGetShopNamesList = async (id: any) => {
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.USER_PROVINCE,
|
||||
BusinessType: 1000,
|
||||
ServerpartId: id || selectedId
|
||||
}
|
||||
const data = await handleGetShopShortNamesGet(req)
|
||||
console.log('data', data)
|
||||
if (data && data.length > 0) {
|
||||
const obj: any = {}
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
obj[item] = item
|
||||
})
|
||||
if (id) {
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
BusinessType: 1000,
|
||||
ServerpartId: id || selectedId
|
||||
}
|
||||
setShopNamesList(obj)
|
||||
const data = await handleGetShopShortNamesGet(req)
|
||||
console.log('data', data)
|
||||
if (data && data.length > 0) {
|
||||
const obj: any = {}
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
obj[item] = item
|
||||
})
|
||||
}
|
||||
setShopNamesList(obj)
|
||||
}
|
||||
} else {
|
||||
setShopNamesList([])
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,7 +106,8 @@ const personSellReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
key: 'BusinessType',
|
||||
dataIndex: 'BusinessType',
|
||||
valueType: 'select',
|
||||
valueEnum: contractType,
|
||||
// valueEnum: contractType,
|
||||
valueEnum: BUSINESSTYPEObj,
|
||||
hideInTable: true,
|
||||
},
|
||||
{
|
||||
@ -347,7 +354,30 @@ const personSellReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
onCheck={(checkedKeys: React.Key[] | any, info) => {
|
||||
const selectedIds = info.checkedNodes.filter(n => n?.type === 2)
|
||||
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
handleGetShopNamesList(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
|
||||
|
||||
// 根据选的门店 找出他的服务区
|
||||
let serverpartId: any = []
|
||||
if (selectedIds && selectedIds.length > 0) {
|
||||
selectedIds.forEach((item: any) => {
|
||||
treeView.forEach((subItem: any) => {
|
||||
if (subItem.children && subItem.children.length > 0) {
|
||||
subItem.children.forEach((thirdItem: any) => {
|
||||
if (thirdItem.children && thirdItem.children.length > 0) {
|
||||
thirdItem.children.forEach((fourthItem: any) => {
|
||||
if (item.value === fourthItem.value) {
|
||||
serverpartId.push(thirdItem.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// handleGetShopNamesList(selectShopId.map(n => n?.value)?.toString() || '')
|
||||
handleGetShopNamesList(serverpartId.toString() || '')
|
||||
// actionRef?.current?.reload()
|
||||
// getData(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
}}
|
||||
|
||||
@ -46,7 +46,6 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
const { currentUser } = props
|
||||
const actionRef = useRef<ActionType>();
|
||||
const formRef = useRef<ProFormInstance>();
|
||||
const downloadBtnRef = useRef<any>()
|
||||
|
||||
const [currentRow, setCurrentRow] = useState<YSSELLMASTERModel | undefined>(); // 选中的流水
|
||||
const [visible, setVisible] = useState<boolean>(); // 流水明显弹出框
|
||||
@ -90,22 +89,54 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
// return reocrd?.index
|
||||
// }
|
||||
},
|
||||
|
||||
|
||||
// {
|
||||
// dataIndex: 'SELLMASTER_DATE',
|
||||
// valueType: "date",
|
||||
// width: 150,
|
||||
// title: '销售时间',
|
||||
// align: 'center',
|
||||
// initialValue: moment().add(-1, 'day'),
|
||||
// sorter: (a, b) => new Date(a.SELLMASTER_DATE).getTime() - new Date(b.SELLMASTER_DATE).getTime(),
|
||||
// defaultSortOrder: 'descend',
|
||||
// render: (_, record) => {
|
||||
// return record?.SELLMASTER_DATE
|
||||
// },
|
||||
// fieldProps: {
|
||||
// disabledDate: (current: any) => current && current > moment().endOf('day').add(-1, 'day')
|
||||
// }
|
||||
// },
|
||||
{
|
||||
title: '交易时间',
|
||||
dataIndex: 'SELLMASTER_DATE',
|
||||
valueType: "date",
|
||||
width: 150,
|
||||
title: '销售时间',
|
||||
align: 'center',
|
||||
initialValue: moment().add(-1, 'day'),
|
||||
sorter: (a, b) => new Date(a.SELLMASTER_DATE).getTime() - new Date(b.SELLMASTER_DATE).getTime(),
|
||||
defaultSortOrder: 'descend',
|
||||
render: (_, record) => {
|
||||
return record?.SELLMASTER_DATE
|
||||
valueType: 'dateRange',
|
||||
hideInTable: true,
|
||||
hideInDescriptions: true,
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return {
|
||||
SELLMASTER_DATE_Start: value[0],
|
||||
SELLMASTER_DATE_End: value[1],
|
||||
};
|
||||
},
|
||||
},
|
||||
fieldProps: {
|
||||
disabledDate: (current: any) => current && current > moment().endOf('day').add(-1, 'day')
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')]
|
||||
}
|
||||
},
|
||||
initialValue: [moment(), moment()],
|
||||
},
|
||||
{
|
||||
title: "查询内容",
|
||||
dataIndex: "searchValue",
|
||||
hideInTable: true,
|
||||
fieldProps: {
|
||||
placeholder: "请输入商品名称/商品条码"
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
dataIndex: 'TICKET_CODE',
|
||||
@ -118,6 +149,22 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
return record?.TICKET_CODE ? <a>{record?.TICKET_CODE}</a> : "-"
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex: 'SELLMASTER_DATE',
|
||||
title: <div style={{ textAlign: 'center' }}>销售时间</div>,
|
||||
hideInSearch: true,
|
||||
width: 150,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>商品明细</div>,
|
||||
dataIndex: 'SaleDetail',
|
||||
width: 350,
|
||||
hideInSearch: true,
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'SELLMASTER_COUNT',
|
||||
title: <div style={{ textAlign: 'center' }}>销售数量</div>,
|
||||
@ -187,28 +234,6 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
];
|
||||
|
||||
|
||||
const exportTable = (e) => {
|
||||
e.stopPropagation(); // 防止Collapse组件收起
|
||||
const main = document.getElementsByClassName(`saleReportHideBox${printIndex}`)[0]
|
||||
const thead = main.querySelector('thead').cloneNode(true); // 深克隆DOM节点
|
||||
const tbody = main.querySelector('tbody').cloneNode(true); // 深克隆DOM节点
|
||||
const container = document.querySelector('#hiddenBox');
|
||||
|
||||
const tempTable = document.createElement('table');
|
||||
tempTable.appendChild(thead);
|
||||
tempTable.appendChild(tbody);
|
||||
|
||||
tempTable.setAttribute('id', 'table-to-xls-saleRankReport'); // 给table添加id,值与按钮上的table字段对应
|
||||
|
||||
container.appendChild(tempTable); // 把创建的节点添加到页面容器中
|
||||
|
||||
setShowLoading(false)
|
||||
|
||||
downloadBtnRef.current.handleDownload();
|
||||
setShowExportTable(false)
|
||||
tempTable.remove() // 防止重复打印一个内容
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
{
|
||||
@ -286,7 +311,6 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
onCheck={(checkedKeys: React.Key[] | any, info) => {
|
||||
const selectedIds = info.checkedNodes.filter(n => n?.type === 2)
|
||||
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
console.log('1111', selectedIds.map(n => n?.value)?.toString() || '')
|
||||
// actionRef?.current?.reload()
|
||||
// getData(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
}}
|
||||
@ -307,16 +331,26 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
pagination={{ pageSize: 20 }}
|
||||
scroll={{ x: '100%', y: 'calc(100vh - 590px)' }}
|
||||
request={async (params) => {
|
||||
console.log('paramsparamsparams', params);
|
||||
|
||||
if (selectedId || currenMenu) {
|
||||
handleCallLogs()
|
||||
const req: any = {
|
||||
...params,
|
||||
// SERVERPART_ID: currenType === 1 ? currenMenu && currenMenu.length > 0 ? currenMenu.toString() : currentUser?.ServerpartIds : '',
|
||||
SERVERPARTSHOP_ID: selectedId || ''
|
||||
SearchParameter: {
|
||||
...params,
|
||||
// SERVERPART_ID: currenType === 1 ? currenMenu && currenMenu.length > 0 ? currenMenu.toString() : currentUser?.ServerpartIds : '',
|
||||
SERVERPARTSHOP_ID: selectedId || '',
|
||||
},
|
||||
PageIndex: 1,
|
||||
PageSize: 999999,
|
||||
keyWord: {
|
||||
Key: "COMMODITY_NAME,COMMODITY_BARCODE,TICKET_CODE",
|
||||
Value: params?.searchValue
|
||||
},
|
||||
SortStr: "SELLMASTER_DATE desc"
|
||||
}
|
||||
setSearchParams(req)
|
||||
setSearchParams(params)
|
||||
const data = await getYSSellMasterListAllData(req);
|
||||
console.log('data1', data);
|
||||
if (data.List && data.List.length > 0) {
|
||||
const list: any = JSON.parse(JSON.stringify(data.List))
|
||||
|
||||
@ -329,7 +363,6 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
let newPrintData: any = formatTreeData(JSON.parse(JSON.stringify(list)), fieldData, enumList, [], [])
|
||||
|
||||
setReqDetailList(newPrintData);
|
||||
console.log('data.otherData', data.otherData)
|
||||
setOtherData(data.OtherData)
|
||||
return { data: list, success: true }
|
||||
}
|
||||
@ -343,35 +376,16 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
columns={columns}
|
||||
toolbar={{
|
||||
actions: [
|
||||
// <span style={{ visibility: 'hidden' }}>
|
||||
// <ReactHTMLTableToExcel
|
||||
// buttonText={'导出excel'}
|
||||
// ref={downloadBtnRef}
|
||||
// table="table-to-xls-saleRankReport"
|
||||
// filename={`销售流水统计${searchParams?.SELLMASTER_DATE}`}
|
||||
// sheet="sheet1"
|
||||
// />
|
||||
// </span>,
|
||||
<Button
|
||||
key="new"
|
||||
type="primary"
|
||||
onClick={async (e) => {
|
||||
// if (reqDetailList && reqDetailList.length > 0) {
|
||||
// setShowLoading(true)
|
||||
// setTimeout(() => {
|
||||
// setShowExportTable(true)
|
||||
// setTimeout(() => {
|
||||
// exportTable(e)
|
||||
// }, 100)
|
||||
// }, 100)
|
||||
// } else {
|
||||
// message.error('暂无数据可导出!')
|
||||
// }
|
||||
if (reqDetailList && reqDetailList.length > 0) {
|
||||
// 尝试一下 导出新方法
|
||||
exportXlsxFromProColumnsExcelJS(columns,
|
||||
reqDetailList,
|
||||
`销售流水查询${searchParams?.SELLMASTER_DATE}`,
|
||||
// `销售流水查询${searchParams?.SELLMASTER_DATE}`,
|
||||
`销售流水查询${searchParams?.SELLMASTER_DATE_Start}-${searchParams?.SELLMASTER_DATE_End}`,
|
||||
// {
|
||||
// topTitle: `单品销售排行统计`, // 顶部大标题
|
||||
// }
|
||||
@ -379,16 +393,6 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
} else {
|
||||
message.error('暂无数据可导出!')
|
||||
}
|
||||
|
||||
|
||||
// const success = await exportExcel(
|
||||
// columns.slice(2),
|
||||
// reqDetailList || [],
|
||||
// `销售流水统计_${moment(searchParams?.SELLMASTER_DATE).format('YYYY/MM/DD')}`,
|
||||
// );
|
||||
// if (success.message !== 'ok') {
|
||||
// message.info({ content: success.message });
|
||||
// }
|
||||
}}
|
||||
>
|
||||
导出excel
|
||||
@ -497,7 +501,6 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
}
|
||||
onRow={(record) => {
|
||||
return {
|
||||
|
||||
onClick: () => {
|
||||
setCurrentRow(record)
|
||||
setVisible(true)
|
||||
@ -510,14 +513,18 @@ const saleFlow: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
title={currentRow ? `${currentRow?.SERVERPART_NAME + currentRow?.SHOPNAME}销售流水明细` : '销售流水明细'}
|
||||
centered
|
||||
visible={visible}
|
||||
onOk={() => setVisible(false)}
|
||||
onOk={() => {
|
||||
setCurrentRow(undefined)
|
||||
setVisible(false)
|
||||
}}
|
||||
onCancel={() => setVisible(false)}
|
||||
width={1024}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
destroyOnClose
|
||||
>
|
||||
{currentRow && <FlowDetail id={currentRow?.SELLMASTER_CODE} />}
|
||||
</Modal>
|
||||
</div>
|
||||
</div >
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -4,35 +4,36 @@ import { tableList } from '@/utils/format';
|
||||
|
||||
// 获取交易流水订单表列表
|
||||
export async function getYSSellMasterList(params: any) {
|
||||
const data = await request('/Revenue/GetYSSellMasterList', {
|
||||
method: 'POST',
|
||||
data: {SearchParameter : {...params},SortStr: params.SortStr, keyWord:params?.keyWord, pageindex: params.current,pagesize:9999},
|
||||
})
|
||||
const data = await request('/Revenue/GetYSSellMasterList', {
|
||||
method: 'POST',
|
||||
data: { SearchParameter: { ...params }, SortStr: params.SortStr, keyWord: params?.keyWord, pageindex: params.current, pagesize: 9999 },
|
||||
})
|
||||
|
||||
if (data.Result_Code !== 100) {
|
||||
return {
|
||||
data: [],
|
||||
current: 1,
|
||||
pageSize:20,
|
||||
total: 0,
|
||||
success: true,
|
||||
};
|
||||
}
|
||||
return tableList(data.Result_Data)
|
||||
if (data.Result_Code !== 100) {
|
||||
return {
|
||||
data: [],
|
||||
current: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
success: true,
|
||||
};
|
||||
}
|
||||
return tableList(data.Result_Data)
|
||||
}
|
||||
|
||||
// 输出整个数据 不止list
|
||||
export async function getYSSellMasterListAllData(params: any) {
|
||||
const data = await request('/Revenue/GetYSSellMasterList', {
|
||||
method: 'POST',
|
||||
data: {SearchParameter : {...params},SortStr: params.SortStr, keyWord:params?.keyWord, pageindex: params.current,pagesize:9999},
|
||||
// data: {SearchParameter : {...params},SortStr: params.SortStr, keyWord:params?.keyWord, pageindex: params.current,pagesize:9999},
|
||||
data: params,
|
||||
})
|
||||
|
||||
if (data.Result_Code !== 100) {
|
||||
return {
|
||||
data: [],
|
||||
current: 1,
|
||||
pageSize:20,
|
||||
current: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
success: true,
|
||||
};
|
||||
@ -41,20 +42,20 @@ export async function getYSSellMasterListAllData(params: any) {
|
||||
}
|
||||
// 获取交易流水明细表列表
|
||||
export async function getYSSellDetailsList(params: any) {
|
||||
const data = await request('/Revenue/GetYSSellDetailsList', {
|
||||
method: 'POST',
|
||||
data: {QueryType: 1, SearchParameter : {...params}, SortStr: params.SortStr, keyWord:params?.keyWord, pageindex: params.current,pagesize:params.pageSize},
|
||||
})
|
||||
const data = await request('/Revenue/GetYSSellDetailsList', {
|
||||
method: 'POST',
|
||||
data: { QueryType: 1, SearchParameter: { ...params }, SortStr: params.SortStr, keyWord: params?.keyWord, pageindex: params.current, pagesize: params.pageSize },
|
||||
})
|
||||
|
||||
if (data.Result_Code !== 100) {
|
||||
return {
|
||||
data: [],
|
||||
current: 1,
|
||||
pageSize:20,
|
||||
total: 0,
|
||||
success: true,
|
||||
};
|
||||
}
|
||||
return tableList(data.Result_Data)
|
||||
if (data.Result_Code !== 100) {
|
||||
return {
|
||||
data: [],
|
||||
current: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
success: true,
|
||||
};
|
||||
}
|
||||
return tableList(data.Result_Data)
|
||||
}
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ import numeral from "numeral";
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||
import { formatTreeData } from "@/utils/format";
|
||||
import { handleGetServerpartShopTrade } from "../saleTypeReport/service";
|
||||
|
||||
|
||||
const saleHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
@ -60,7 +61,7 @@ const saleHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
|
||||
// 商品业态列表
|
||||
const [commodityFormatsObj, setCommodityFormatsObj] = useState<any>()
|
||||
|
||||
const SHOPTRADEObj = session.get('SHOPTRADEObj')
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
@ -121,9 +122,21 @@ const saleHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
hideInTable: true,
|
||||
valueType: 'select',
|
||||
request: async () => {
|
||||
const data = await getFieldEnumTree({ FieldExplainField: 'BUSINESSTYPE' })
|
||||
console.log('data', data)
|
||||
// 拿到建工的全部商品业态
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
ServerpartId: "",
|
||||
ShopTrade: "",
|
||||
BusinessType: "",
|
||||
ExcludeShopTrade: "",
|
||||
ExcludeBusinessType: ""
|
||||
}
|
||||
const data = await handleGetServerpartShopTrade(req)
|
||||
console.log('data321312', data)
|
||||
return data
|
||||
// const data = await getFieldEnumTree({ FieldExplainField: 'BUSINESSTYPE' })
|
||||
// console.log('data', data)
|
||||
// return data
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -22,6 +22,7 @@ import { handleGetShopShortNamesGet } from "@/pages/reports/BusinessAnalysis/tra
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
import { exportXlsxFromProColumnsExcelJS } from "@/utils/exportExcelFun";
|
||||
import { formatTreeData } from "@/utils/format";
|
||||
import session from "@/utils/session";
|
||||
|
||||
|
||||
const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
@ -69,26 +70,30 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
console.log('data2', data)
|
||||
setCommodityTypeList(data)
|
||||
})
|
||||
|
||||
const BUSINESSTYPEObj = session.get('BUSINESSTYPEObj')
|
||||
// 自营业态的选择列表
|
||||
const [shopNamesList, setShopNamesList] = useState<any>()
|
||||
// 自营业态的选择的列表方法
|
||||
const handleGetShopNamesList = async (id: any) => {
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.USER_PROVINCE,
|
||||
BusinessType: 1000,
|
||||
ServerpartId: id || selectedId
|
||||
}
|
||||
const data = await handleGetShopShortNamesGet(req)
|
||||
console.log('data', data)
|
||||
if (data && data.length > 0) {
|
||||
const obj: any = {}
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
obj[item] = item
|
||||
})
|
||||
if (id) {
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
BusinessType: 1000,
|
||||
ServerpartId: id || selectedId
|
||||
}
|
||||
setShopNamesList(obj)
|
||||
const data = await handleGetShopShortNamesGet(req)
|
||||
console.log('data', data)
|
||||
if (data && data.length > 0) {
|
||||
const obj: any = {}
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
obj[item] = item
|
||||
})
|
||||
}
|
||||
setShopNamesList(obj)
|
||||
}
|
||||
} else {
|
||||
setShopNamesList([])
|
||||
}
|
||||
}
|
||||
const columns: any = [
|
||||
@ -143,7 +148,8 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
key: 'BusinessType',
|
||||
dataIndex: 'BusinessType',
|
||||
valueType: 'select',
|
||||
valueEnum: contractType,
|
||||
// valueEnum: contractType,
|
||||
valueEnum: BUSINESSTYPEObj,
|
||||
hideInTable: true,
|
||||
},
|
||||
{
|
||||
@ -338,9 +344,31 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
console.log('info', info)
|
||||
// const selectedIds = info.checkedNodes.filter(n => n?.type === 1)
|
||||
const selectShopId = info.checkedNodes.filter(n => n?.type === 2)
|
||||
|
||||
// setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
setSelectShopId(selectShopId.map(n => n?.value)?.toString() || '')
|
||||
handleGetShopNamesList(selectShopId.map(n => n?.value)?.toString() || '')
|
||||
// 根据选的门店 找出他的服务区
|
||||
let serverpartId: any = []
|
||||
if (selectShopId && selectShopId.length > 0) {
|
||||
selectShopId.forEach((item: any) => {
|
||||
treeView.forEach((subItem: any) => {
|
||||
if (subItem.children && subItem.children.length > 0) {
|
||||
subItem.children.forEach((thirdItem: any) => {
|
||||
if (thirdItem.children && thirdItem.children.length > 0) {
|
||||
thirdItem.children.forEach((fourthItem: any) => {
|
||||
if (item.value === fourthItem.value) {
|
||||
serverpartId.push(thirdItem.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// handleGetShopNamesList(selectShopId.map(n => n?.value)?.toString() || '')
|
||||
handleGetShopNamesList(serverpartId.toString() || '')
|
||||
// actionRef?.current?.reload()
|
||||
// getData(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
}}
|
||||
|
||||
@ -18,7 +18,7 @@ import { handleGetCommodityTypeHistory } from "@/pages/reports/BusinessAnalysis/
|
||||
import session from "@/utils/session";
|
||||
import moment from "moment/moment";
|
||||
import { handleGetBusinessTrades } from "@/pages/reports/BusinessAnalysis/saleReport/service";
|
||||
import { handleGetNestingCOMMODITYTYPETree } from "@/pages/reports/BusinessAnalysis/saleTypeReport/service";
|
||||
import { handleGetNestingCOMMODITYTYPETree, handleGetServerpartShopTrade } from "@/pages/reports/BusinessAnalysis/saleTypeReport/service";
|
||||
import ProDescriptions from "@ant-design/pro-descriptions";
|
||||
import numeral from "numeral";
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
@ -130,9 +130,21 @@ const saleTypeHisReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
hideInTable: true,
|
||||
valueType: 'select',
|
||||
request: async () => {
|
||||
const data = await getFieldEnumTree({ FieldExplainField: 'BUSINESSTYPE' })
|
||||
console.log('data', data)
|
||||
// 拿到建工的全部商品业态
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
ServerpartId: "",
|
||||
ShopTrade: "",
|
||||
BusinessType: "",
|
||||
ExcludeShopTrade: "",
|
||||
ExcludeBusinessType: ""
|
||||
}
|
||||
const data = await handleGetServerpartShopTrade(req)
|
||||
console.log('data321312', data)
|
||||
return data
|
||||
// const data = await getFieldEnumTree({ FieldExplainField: 'BUSINESSTYPE' })
|
||||
// console.log('data', data)
|
||||
// return data
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -16,7 +16,8 @@ import session from "@/utils/session";
|
||||
import moment from "moment/moment";
|
||||
import {
|
||||
handleGetCommodityTypeSummary,
|
||||
handleGetNestingCOMMODITYTYPETree
|
||||
handleGetNestingCOMMODITYTYPETree,
|
||||
handleGetServerpartShopTrade
|
||||
} from "@/pages/reports/BusinessAnalysis/saleTypeReport/service";
|
||||
import { handleGetBusinessTrades } from "./service";
|
||||
import ProDescriptions from "@ant-design/pro-descriptions";
|
||||
@ -135,9 +136,21 @@ const saleReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
hideInTable: true,
|
||||
valueType: 'select',
|
||||
request: async () => {
|
||||
const data = await getFieldEnumTree({ FieldExplainField: 'BUSINESSTYPE' })
|
||||
console.log('data', data)
|
||||
// 拿到建工的全部商品业态
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
ServerpartId: "",
|
||||
ShopTrade: "",
|
||||
BusinessType: "",
|
||||
ExcludeShopTrade: "",
|
||||
ExcludeBusinessType: ""
|
||||
}
|
||||
const data = await handleGetServerpartShopTrade(req)
|
||||
console.log('data321312', data)
|
||||
return data
|
||||
// const data = await getFieldEnumTree({ FieldExplainField: 'BUSINESSTYPE' })
|
||||
// console.log('data', data)
|
||||
// return data
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -1,25 +1,26 @@
|
||||
import request from '@/utils/request';
|
||||
import {wrapTreeNode} from "@/utils/format";
|
||||
import requestEncryption from '@/utils/requestEncryption';
|
||||
import { wrapTreeNode } from "@/utils/format";
|
||||
|
||||
// 获取销售同环比
|
||||
export async function handleGetCommodityTypeSummary(params: any) {
|
||||
const data = await request('/Sales/GetCommodityTypeSummary', {
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
const data = await request('/Sales/GetCommodityTypeSummary', {
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
|
||||
if (data.Result_Code !== 100) {
|
||||
return {
|
||||
data: [],
|
||||
otherData: '',
|
||||
current: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
success: true,
|
||||
};
|
||||
}
|
||||
if (data.Result_Code !== 100) {
|
||||
return {
|
||||
data: [],
|
||||
otherData: '',
|
||||
current: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
success: true,
|
||||
};
|
||||
}
|
||||
|
||||
return data.Result_Data.List
|
||||
return data.Result_Data.List
|
||||
}
|
||||
|
||||
|
||||
@ -53,3 +54,18 @@ export async function handleGetBusinessTrades(params: any) {
|
||||
|
||||
return data.Result_Data.List
|
||||
}
|
||||
|
||||
|
||||
// 拿到建工的全部商品业态
|
||||
// 获取商品业态
|
||||
export async function handleGetServerpartShopTrade(params: any) {
|
||||
const data = await requestEncryption('/Commodity/GetServerpartShopTrade', {
|
||||
method: 'POST',
|
||||
data: {
|
||||
...params,
|
||||
requestEncryption: true
|
||||
}
|
||||
})
|
||||
|
||||
return data.Result_Data.List
|
||||
}
|
||||
@ -32,6 +32,8 @@ const ConvenienceStoreProductReview: React.FC<{ currentUser: CurrentUser }> = (p
|
||||
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
|
||||
|
||||
const serverpartObj = session.get('serverpartObj')
|
||||
console.log('serverpartObjserverpartObj', serverpartObj);
|
||||
|
||||
// 商品类型
|
||||
const [commodityTree, setCommodityTree] = useState<any>()
|
||||
// 商品类型的默认值
|
||||
|
||||
@ -664,6 +664,7 @@ const NewApplicationModal = ({ modalType, parentRow, tableRef, onShow, handleCen
|
||||
obj.newPrice = item.COMMODITY_CURRPRICE
|
||||
obj.COMMODITY_RETAILPRICE = item.COMMODITY_ORIPRICE
|
||||
obj.COMMODITY_CURRPRICE = item.COMMODITY_ORIPRICE
|
||||
obj.COMMODITY_MEMBERPRICE = item.COMMODITY_ORIPRICE
|
||||
obj.COMMODITY_ORIPRICE = null
|
||||
list.push(obj)
|
||||
})
|
||||
@ -694,6 +695,8 @@ const NewApplicationModal = ({ modalType, parentRow, tableRef, onShow, handleCen
|
||||
obj.COMMODITY_ORIPRICE = oldPrice
|
||||
obj.COMMODITY_RETAILPRICE = item.newPrice
|
||||
obj.COMMODITY_CURRPRICE = item.newPrice
|
||||
obj.COMMODITY_MEMBERPRICE = item.newPrice
|
||||
|
||||
list.push(obj)
|
||||
})
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ import type { ConnectState } from "@/models/connect";
|
||||
import { FormInstance, Modal } from "antd";
|
||||
import ProTable from "@ant-design/pro-table";
|
||||
import { useRef } from "react";
|
||||
import { handleGetCommodityList } from "../../commodityInfo/service";
|
||||
import { handleGetCommodityList, handleGetServerpartShopTrade } from "../../commodityInfo/service";
|
||||
import { getFieldEnum } from "@/services/options";
|
||||
|
||||
type DetailProps = {
|
||||
@ -54,8 +54,20 @@ const SelectShopModal = ({ onShow, setShowAddShopModal, setShopData, selectRowLi
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
request: async () => {
|
||||
const BUSINESSTYPERes = await getFieldEnum({ FieldExplainField: 'BUSINESSTYPE', sessionName: 'SHOPTRADE', notformate: true })
|
||||
return BUSINESSTYPERes
|
||||
// const BUSINESSTYPERes = await getFieldEnum({ FieldExplainField: 'BUSINESSTYPE', sessionName: 'SHOPTRADE', notformate: true })
|
||||
// return BUSINESSTYPERes
|
||||
let formRes = formRef.current.modalFormRef.current?.getFieldsValue()
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.ProvinceCode,
|
||||
ServerpartId: formRes?.ServerpartId,
|
||||
ShopTrade: "",
|
||||
BusinessType: "",
|
||||
ExcludeShopTrade: "",
|
||||
ExcludeBusinessType: ""
|
||||
}
|
||||
const data = await handleGetServerpartShopTrade(req)
|
||||
console.log('data321312', data)
|
||||
return data
|
||||
},
|
||||
fieldProps: {
|
||||
showSearch: true,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// 由 scripts/writeVersion.js 自动生成
|
||||
export const VERSION = "4.5.72";
|
||||
export const GIT_HASH = "77be21b";
|
||||
export const BUILD_TIME = "2025-10-10T10:31:31.402Z";
|
||||
export const VERSION = "4.5.73";
|
||||
export const GIT_HASH = "27ce6e9";
|
||||
export const BUILD_TIME = "2025-10-15T08:25:48.245Z";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user