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