update
This commit is contained in:
parent
e03ffe4902
commit
9fb0245d17
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ant-design-pro",
|
||||
"version": "4.5.35",
|
||||
"version": "4.5.36",
|
||||
"private": true,
|
||||
"description": "An out-of-box UI solution for enterprise applications",
|
||||
"scripts": {
|
||||
|
||||
@ -206,7 +206,7 @@ const CommoditysaleTable: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
||||
...params,
|
||||
SERVERPARTSHOP_ID: shopId && shopId.length > 0 ? shopId.toString() : currentUser?.ServerpartShopIds,
|
||||
});
|
||||
setReqDetailList(data.data);
|
||||
setReqDetailList(data.List);
|
||||
console.log('data', data);
|
||||
const list: any = JSON.parse(JSON.stringify(data.List))
|
||||
if (list && list.length > 0) {
|
||||
@ -346,7 +346,6 @@ const CommoditysaleTable: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
||||
}
|
||||
onRow={(record) => {
|
||||
return {
|
||||
|
||||
onClick: () => {
|
||||
setCurrentRow(record)
|
||||
setVisible(true)
|
||||
|
||||
@ -11,7 +11,7 @@ import type { CurrentUser } from "umi";
|
||||
import type { ConnectState } from "@/models/connect";
|
||||
import React, { useRef, useState } from "react";
|
||||
import ProCard from "@ant-design/pro-card";
|
||||
import { MenuFoldOutlined } from "@ant-design/icons";
|
||||
import { MenuFoldOutlined, PlusOutlined } from "@ant-design/icons";
|
||||
import { Col, Divider, FormInstance, Modal, Row } from "antd";
|
||||
import { Button, message, Space, Spin, Tree } from "antd";
|
||||
import useRequest from "@ahooksjs/use-request";
|
||||
@ -23,6 +23,8 @@ import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSele
|
||||
import ProForm, { ProFormCheckbox, ProFormRadio, ProFormSelect, ProFormText } from "@ant-design/pro-form";
|
||||
import { handleGetCASHWORKERDetail, handleGetCASHWORKERList, handleGetServerpartShopList, handleSynchroCASHWORKER } from "./service";
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
import session from "@/utils/session";
|
||||
import { handleNewGetSERVERPARTDetail } from "../service";
|
||||
|
||||
|
||||
const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
@ -55,7 +57,7 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
// 关联门店悬浮框
|
||||
const [relatedShop, setRelatedShop] = useState<any>()
|
||||
// 选择的门店id数组
|
||||
const [selectShop,setSelectShop] = useState<any>()
|
||||
const [selectShop, setSelectShop] = useState<any>()
|
||||
|
||||
const { loading: PROWERSETLoading, data: PROWERSET } = useRequest(async () => {
|
||||
const data = await getFieldEnum({ FieldExplainField: 'PROWERSET' })
|
||||
@ -65,7 +67,7 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
|
||||
const addQuotesToNumbers = (value: any) => {
|
||||
return /^-?\d+(\.\d+)?$/.test(value) ? `'${value}` : value;
|
||||
};
|
||||
};
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
@ -273,10 +275,10 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
}
|
||||
const data = await handleGetCASHWORKERList(req)
|
||||
if (data && data.length > 0) {
|
||||
console.log('data',data);
|
||||
console.log('data', data);
|
||||
let res = JSON.parse(JSON.stringify(data))
|
||||
let list: any = []
|
||||
data.forEach((item: any)=>{
|
||||
data.forEach((item: any) => {
|
||||
item.CASHWORKER_LOGINNAME = `"${item.CASHWORKER_LOGINNAME}"`
|
||||
item.CASHWORKER_LOGINPWD = `"${item.CASHWORKER_LOGINPWD}"`
|
||||
list.push(item)
|
||||
@ -316,7 +318,10 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
}}
|
||||
>
|
||||
导出excel
|
||||
</Button>
|
||||
</Button>,
|
||||
<Button icon={<PlusOutlined />} type={"primary"} onClick={() => {
|
||||
setEditModal(true)
|
||||
}}>服务区人员</Button>
|
||||
]
|
||||
}}
|
||||
/>
|
||||
@ -331,7 +336,6 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
open={editModal}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
|
||||
onCancel={() => {
|
||||
setEditModal(false)
|
||||
setCurrentRow(undefined)
|
||||
@ -339,13 +343,19 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
}}
|
||||
footer={<div style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||
<div>
|
||||
<Button type='primary' onClick={() => {
|
||||
{/* <Button type='primary' onClick={() => {
|
||||
setRelatedShop(true)
|
||||
}}>关联门店</Button>
|
||||
}}>关联门店</Button> */}
|
||||
</div>
|
||||
<div>
|
||||
<Button type='primary' style={{ marginRight: '16px' }} onClick={() => {
|
||||
editFormRef.current?.validateFields().then(async (res) => {
|
||||
|
||||
// 根据当前的服务区 去拿个code
|
||||
const code = await handleNewGetSERVERPARTDetail({ SERVERPARTId: res.SERVERPART_ID })
|
||||
console.log('codecodecodecode', code);
|
||||
|
||||
let SERVERPART_CODE = code.SERVERPART_CODE
|
||||
// 255个0
|
||||
let defaultAuthor: string = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
console.log('personDetail', personDetail);
|
||||
@ -360,10 +370,22 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
actionRef.current?.reload()
|
||||
})
|
||||
}
|
||||
const req: any = {
|
||||
...personDetail,
|
||||
WORKER_OTHER: defaultAuthor
|
||||
let req: any = {}
|
||||
if (currentRow?.CASHWORKER_ID) {
|
||||
req = {
|
||||
...res,
|
||||
WORKER_OTHER: defaultAuthor,
|
||||
SERVERPART_CODE: SERVERPART_CODE
|
||||
}
|
||||
} else {
|
||||
req = {
|
||||
...personDetail,
|
||||
...res,
|
||||
WORKER_OTHER: defaultAuthor,
|
||||
SERVERPART_CODE: SERVERPART_CODE
|
||||
}
|
||||
}
|
||||
|
||||
const data = await handleSynchroCASHWORKER(req)
|
||||
console.log('data', data);
|
||||
if (data.Result_Code === 100) {
|
||||
@ -371,6 +393,8 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
setEditModal(false)
|
||||
setCurrentRow(undefined)
|
||||
setPersonDetail(undefined)
|
||||
|
||||
actionRef.current?.reload()
|
||||
} else {
|
||||
message.error(data.Result_Desc)
|
||||
}
|
||||
@ -388,31 +412,36 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
formRef={editFormRef}
|
||||
request={async () => {
|
||||
console.log('currentRow', currentRow);
|
||||
|
||||
const req: any = {
|
||||
CASHWORKERId: currentRow?.CASHWORKER_ID
|
||||
}
|
||||
const data = await handleGetCASHWORKERDetail(req)
|
||||
console.log('data', data);
|
||||
let author: string[] = []
|
||||
if (PROWERSET && PROWERSET.length > 0) {
|
||||
let str: string = data.WORKER_OTHER.toString()
|
||||
PROWERSET.forEach((item: any) => {
|
||||
if (str[item.value - 1] === '1') {
|
||||
if (author) {
|
||||
author.push(item.value.toString())
|
||||
if (currentRow?.CASHWORKER_ID) {
|
||||
const req: any = {
|
||||
CASHWORKERId: currentRow?.CASHWORKER_ID
|
||||
}
|
||||
const data = await handleGetCASHWORKERDetail(req)
|
||||
console.log('data', data);
|
||||
let author: string[] = []
|
||||
if (PROWERSET && PROWERSET.length > 0) {
|
||||
let str: string = data.WORKER_OTHER.toString()
|
||||
PROWERSET.forEach((item: any) => {
|
||||
if (str[item.value - 1] === '1') {
|
||||
if (author) {
|
||||
author.push(item.value.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log('author', author);
|
||||
setPersonDetail({
|
||||
...data,
|
||||
WORKER_OTHER: author
|
||||
})
|
||||
}
|
||||
console.log('author', author);
|
||||
setPersonDetail({
|
||||
...data,
|
||||
WORKER_OTHER: author
|
||||
})
|
||||
return {
|
||||
...data,
|
||||
WORKER_OTHER: author
|
||||
return {
|
||||
...data,
|
||||
WORKER_OTHER: author
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
WORKER_VALID: 1
|
||||
}
|
||||
}
|
||||
}}
|
||||
submitter={{
|
||||
@ -422,6 +451,19 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
}}
|
||||
>
|
||||
<Row gutter={18}>
|
||||
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
label='人员名称'
|
||||
name="CASHWORKER_NAME"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入人员名称',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<ProFormSelect
|
||||
label='人员类别'
|
||||
@ -437,32 +479,18 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入名称',
|
||||
message: '请选择人员类别',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
disabled
|
||||
disabled={currentRow?.CASHWORKER_ID}
|
||||
label="人员账号"
|
||||
name="CASHWORKER_LOGINNAME"
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row gutter={18}>
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
label='人员名称'
|
||||
name="CASHWORKER_NAME"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入名称',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
label="人员密码"
|
||||
@ -470,13 +498,27 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入名称',
|
||||
message: '请输入人员密码',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<ProFormSelect
|
||||
label='服务区'
|
||||
name="SERVERPART_ID"
|
||||
request={() => {
|
||||
let serverpartList = session.get('ServerpartIdsTree')
|
||||
return serverpartList
|
||||
}}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择服务区',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row gutter={18}>
|
||||
<Col span={12}>
|
||||
<ProFormSelect
|
||||
label='人员状态'
|
||||
@ -491,7 +533,7 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入名称',
|
||||
message: '请选择人员状态',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
@ -599,7 +641,7 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
setSelectShop(undefined)
|
||||
}}
|
||||
footer={
|
||||
<div style={{width:'100%',display:'flex',justifyContent:'flex-end'}}>
|
||||
<div style={{ width: '100%', display: 'flex', justifyContent: 'flex-end' }}>
|
||||
<Button type={'primary'}>保存</Button>
|
||||
</div>
|
||||
}
|
||||
@ -607,17 +649,20 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
<ProTable
|
||||
actionRef={realteActionRef}
|
||||
columns={relateColumns}
|
||||
rowKey={(record)=>{
|
||||
rowKey={(record) => {
|
||||
return `${record?.SERVERPARTSHOP_ID}`
|
||||
}}
|
||||
request={async () => {
|
||||
if (!currentRow?.SERVERPART_ID) {
|
||||
return
|
||||
let id: string = ''
|
||||
if (!currentRow?.CASHWORKER_ID) {
|
||||
let formRef: any = editFormRef.current?.getFieldsValue()
|
||||
console.log('formRefformRefformRef', formRef);
|
||||
id = formRef.SERVERPART_ID
|
||||
}
|
||||
const req: any = {
|
||||
SearchParameter: {
|
||||
ISVALID: 1,
|
||||
SERVERPART_IDS: currentRow?.SERVERPART_ID,
|
||||
SERVERPART_IDS: id || currentRow?.SERVERPART_ID,
|
||||
SortStr: "BUSINESS_STATE,SHOPTRADE,SHOPSHORTNAME,SHOPREGION"
|
||||
},
|
||||
SortStr: "BUSINESS_STATE,SHOPTRADE,SHOPSHORTNAME,SHOPREGION",
|
||||
@ -629,13 +674,13 @@ const serviceAreaPersonnel: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
}
|
||||
return { data: [], success: true }
|
||||
}}
|
||||
headerTitle={`当前收银员为【${currentRow?.CASHWORKER_NAME}】`}
|
||||
headerTitle={`当前收银员为【${currentRow?.CASHWORKER_NAME || ""}】`}
|
||||
pagination={false}
|
||||
scroll={{ y: 400 }}
|
||||
rowSelection={{
|
||||
onChange: (selectedRowKeys, selectedRows) => { // 选中行时 存储选中的行数据
|
||||
console.log('selectedRowKeys',selectedRowKeys);
|
||||
console.log('selectedRows',selectedRows);
|
||||
console.log('selectedRowKeys', selectedRowKeys);
|
||||
console.log('selectedRows', selectedRows);
|
||||
setSelectShop(selectedRowKeys)
|
||||
},
|
||||
defaultSelectedRowKeys: selectShop
|
||||
|
||||
@ -4,7 +4,7 @@ import request from "@/utils/request";
|
||||
export async function handleGetCASHWORKERList(params?: any) {
|
||||
const data = await request(`/BaseInfo/GetCASHWORKERList`, {
|
||||
method: 'POST',
|
||||
data:params
|
||||
data: params
|
||||
});
|
||||
|
||||
if (data.Result_Code !== 100) {
|
||||
@ -17,7 +17,7 @@ export async function handleGetCASHWORKERList(params?: any) {
|
||||
}
|
||||
}
|
||||
|
||||
return data.Result_Data.List;
|
||||
return data.Result_Data.List;
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ export async function handleGetCASHWORKERDetail(params?: any) {
|
||||
}
|
||||
}
|
||||
|
||||
return data.Result_Data;
|
||||
return data.Result_Data;
|
||||
}
|
||||
|
||||
// 同步收银人员表
|
||||
@ -49,16 +49,10 @@ export async function handleSynchroCASHWORKER(params?: any) {
|
||||
});
|
||||
|
||||
if (data.Result_Code !== 100) {
|
||||
return {
|
||||
data: [],
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
success: false
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
return data;
|
||||
return data;
|
||||
}
|
||||
|
||||
// 获得可以关联的门店列表
|
||||
@ -78,5 +72,5 @@ export async function handleGetServerpartShopList(params?: any) {
|
||||
}
|
||||
}
|
||||
|
||||
return data.Result_Data.List;
|
||||
return data.Result_Data.List;
|
||||
}
|
||||
@ -1,18 +1,18 @@
|
||||
import {connect} from "umi";
|
||||
import type {CurrentUser} from "umi";
|
||||
import type {ConnectState} from "@/models/connect";
|
||||
import React, {useRef, useState} from "react";
|
||||
import { connect } from "umi";
|
||||
import type { CurrentUser } from "umi";
|
||||
import type { ConnectState } from "@/models/connect";
|
||||
import React, { useRef, useState } from "react";
|
||||
import ProCard from "@ant-design/pro-card";
|
||||
import {MenuFoldOutlined} from "@ant-design/icons";
|
||||
import type { FormInstance} from "antd";
|
||||
import {Drawer} from "antd";
|
||||
import { Select} from "antd";
|
||||
import {Button, message, Space, Spin, Tree} from "antd";
|
||||
import { MenuFoldOutlined } from "@ant-design/icons";
|
||||
import type { FormInstance } from "antd";
|
||||
import { Drawer } from "antd";
|
||||
import { Select } from "antd";
|
||||
import { Button, message, Space, Spin, Tree } from "antd";
|
||||
import useRequest from "@ahooksjs/use-request";
|
||||
import {getFieldEnum, getMoney, getServerpartTree, handleCallLogs} from "@/services/options";
|
||||
import type {ActionType} from "@ant-design/pro-table";
|
||||
import { getFieldEnum, getMoney, getServerpartTree, handleCallLogs } from "@/services/options";
|
||||
import type { ActionType } from "@ant-design/pro-table";
|
||||
import ProTable from "@ant-design/pro-table";
|
||||
import {handleGetExamineList} from "@/pages/examine/examineList/service";
|
||||
import { handleGetExamineList } from "@/pages/examine/examineList/service";
|
||||
import moment from "moment";
|
||||
import session from "@/utils/session";
|
||||
import {
|
||||
@ -24,11 +24,11 @@ import * as numeral from "numeral";
|
||||
import {
|
||||
handleGetShopShortNamesGet
|
||||
} from "@/pages/reports/BusinessAnalysis/transactionAnalysis/service";
|
||||
import {handleGetGetRevenueYOYQOQByDate} from "@/pages/reports/BusinessAnalysis/revenueYOYQOQReport/service";
|
||||
import { handleGetGetRevenueYOYQOQByDate } from "@/pages/reports/BusinessAnalysis/revenueYOYQOQReport/service";
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
|
||||
|
||||
const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
const transactionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const { currentUser } = props
|
||||
|
||||
const downloadBtnRef = useRef<any>()
|
||||
@ -39,45 +39,45 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
|
||||
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
|
||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||
const [treeView,setTreeView] = useState<any>()
|
||||
const [treeView, setTreeView] = useState<any>()
|
||||
// 加载服务区树
|
||||
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
||||
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, false, true)
|
||||
setTreeView(data)
|
||||
return data
|
||||
})
|
||||
// 树相关的属性和方法
|
||||
// 树相关的属性和方法
|
||||
const [selectedId, setSelectedId] = useState<string>()
|
||||
const businessTypeList = session.get("BUSINESSTYPEList")
|
||||
const businessTypeObj = session.get("BUSINESSTYPEObj")
|
||||
const BUSINESSTYPEObj = session.get('BUSINESSTYPEObj')
|
||||
// 判断是不是第一次进入页面
|
||||
const [isFirst,setIsFirst] = useState<boolean>(true)
|
||||
// 导出的加载效果
|
||||
const [showLoading,setShowLoading] = useState<boolean>(false)
|
||||
const [isFirst, setIsFirst] = useState<boolean>(true)
|
||||
// 导出的加载效果
|
||||
const [showLoading, setShowLoading] = useState<boolean>(false)
|
||||
// 是否显示打印的表格
|
||||
const [showExportTable,setShowExportTable] = useState<boolean>(false)
|
||||
const [showExportTable, setShowExportTable] = useState<boolean>(false)
|
||||
// 查询的条件
|
||||
const [searchParams,setSearchParams] = useState<any>()
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
// 自营业态的选择列表
|
||||
const [selfList,setSelfList] = useState<any>()
|
||||
const [businessModel,setBusinessModel] = useState<any>()
|
||||
const [selfList, setSelfList] = useState<any>()
|
||||
const [businessModel, setBusinessModel] = useState<any>()
|
||||
// 经营模式
|
||||
const [businessType,setBusinessType] = useState<any>()
|
||||
const [businessType, setBusinessType] = useState<any>()
|
||||
// 展示自营业态
|
||||
const [showSelfBusiness,setShowSelfBusiness] = useState<boolean>(true)
|
||||
const [showSelfBusiness, setShowSelfBusiness] = useState<boolean>(true)
|
||||
// 自营业态的选择列表
|
||||
const [shopNamesList,setShopNamesList] = useState<any>()
|
||||
const [printIndex,setPrintIndex] = useState<number>(new Date().getTime())
|
||||
const [shopNamesList, setShopNamesList] = useState<any>()
|
||||
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
|
||||
// 显示每日流水抽屉
|
||||
const [showDailyDrawer,setShowDailyDrawer] = useState<boolean>(false)
|
||||
const [currentRow,setCurrentRow] = useState<any>()
|
||||
const {loading: selfLoading,data: self} = useRequest(async ()=>{
|
||||
const [showDailyDrawer, setShowDailyDrawer] = useState<boolean>(false)
|
||||
const [currentRow, setCurrentRow] = useState<any>()
|
||||
const { loading: selfLoading, data: self } = useRequest(async () => {
|
||||
const data = await handleGetShopShortNames()
|
||||
if (data && data.length>0){
|
||||
if (data && data.length > 0) {
|
||||
const list: any = []
|
||||
data.forEach((item: any)=>{
|
||||
list.push({label: item,value: item})
|
||||
data.forEach((item: any) => {
|
||||
list.push({ label: item, value: item })
|
||||
})
|
||||
return list
|
||||
}
|
||||
@ -85,10 +85,10 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
|
||||
const [columnsStateMap, setColumnsStateMap] = useState<any>({
|
||||
// Business_Type:{show:false},
|
||||
ShopTrade:{show:false}
|
||||
ShopTrade: { show: false }
|
||||
})
|
||||
const [columnsDailyStateMap, setColumnsDailyStateMap] = useState<any>({
|
||||
ShopTrade:{show:false}
|
||||
ShopTrade: { show: false }
|
||||
})
|
||||
const columns: any = [
|
||||
{
|
||||
@ -111,21 +111,21 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'经营模式',
|
||||
dataIndex:'businessType',
|
||||
valueType:'select',
|
||||
title: '经营模式',
|
||||
dataIndex: 'businessType',
|
||||
valueType: 'select',
|
||||
hideInTable: true,
|
||||
valueEnum: BUSINESSTYPEObj,
|
||||
fieldProps:{
|
||||
fieldProps: {
|
||||
mode: "multiple",
|
||||
onChange:async (e)=>{
|
||||
console.log('e',e)
|
||||
const flag = e.filter(item=>item==='1000')?.toString() || ''
|
||||
console.log('flag',flag)
|
||||
if (flag){
|
||||
onChange: async (e) => {
|
||||
console.log('e', e)
|
||||
const flag = e.filter(item => item === '1000')?.toString() || ''
|
||||
console.log('flag', flag)
|
||||
if (flag) {
|
||||
setShowSelfBusiness(false)
|
||||
// handleGetShopNamesList(selectedId)
|
||||
}else{
|
||||
} else {
|
||||
setShowSelfBusiness(true)
|
||||
// setShopNamesList({})
|
||||
}
|
||||
@ -133,46 +133,46 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'自营业态',
|
||||
dataIndex:'shopNames',
|
||||
title: '自营业态',
|
||||
dataIndex: 'shopNames',
|
||||
hideInTable: true,
|
||||
hideInSearch: showSelfBusiness,
|
||||
valueType: 'select',
|
||||
valueEnum:shopNamesList,
|
||||
valueEnum: shopNamesList,
|
||||
// request: async () => {
|
||||
// return await getFieldEnum({ FieldExplainField: 'BUSINESSTYPE' })
|
||||
// },
|
||||
fieldProps:{
|
||||
fieldProps: {
|
||||
multiple: true,
|
||||
showSearch: true,
|
||||
filterOption:(input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()),
|
||||
filterOption: (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()),
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'外接系统',
|
||||
dataIndex:'targetSystem',
|
||||
title: '外接系统',
|
||||
dataIndex: 'targetSystem',
|
||||
valueType: 'select',
|
||||
hideInTable: true,
|
||||
valueEnum:{
|
||||
"":'全部',
|
||||
1:"是",
|
||||
0:"否"
|
||||
valueEnum: {
|
||||
"": '全部',
|
||||
1: "是",
|
||||
0: "否"
|
||||
},
|
||||
initialValue: ""
|
||||
},
|
||||
{
|
||||
title:'',
|
||||
dataIndex:'SearchKeyValue',
|
||||
title: '',
|
||||
dataIndex: 'SearchKeyValue',
|
||||
hideInTable: true,
|
||||
fieldProps:{
|
||||
fieldProps: {
|
||||
placeholder: "请输入商户/品牌/门店/服务区"
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'服务区信息',
|
||||
dataIndex:'',
|
||||
title: '服务区信息',
|
||||
dataIndex: '',
|
||||
hideInSearch: true,
|
||||
children:[
|
||||
children: [
|
||||
// {
|
||||
// title: '序号',
|
||||
// width: 120,
|
||||
@ -180,22 +180,22 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
// dataIndex: 'index'
|
||||
// },
|
||||
{
|
||||
title:'门店名称',
|
||||
title: '门店名称',
|
||||
width: 200,
|
||||
hideInSearch: true,
|
||||
dataIndex:'Name',
|
||||
ellipsis:true,
|
||||
render:(_,record)=>{
|
||||
return showDailyDrawer?record?.Name:<a onClick={()=>{
|
||||
if (record?.Name === '合计'){
|
||||
dataIndex: 'Name',
|
||||
ellipsis: true,
|
||||
render: (_, record) => {
|
||||
return showDailyDrawer ? record?.Name : <a onClick={() => {
|
||||
if (record?.Name === '合计') {
|
||||
let id: 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 (id){
|
||||
id +=`,${subItem.Id}`
|
||||
}else{
|
||||
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 (id) {
|
||||
id += `,${subItem.Id}`
|
||||
} else {
|
||||
id = subItem.Id
|
||||
}
|
||||
})
|
||||
@ -207,13 +207,13 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
Id: id
|
||||
})
|
||||
}
|
||||
else if(record?.Name && record?.Name.indexOf('管理中心')!==-1){
|
||||
else if (record?.Name && record?.Name.indexOf('管理中心') !== -1) {
|
||||
let id: string = ''
|
||||
if (record?.children && record?.children.length>0){
|
||||
record?.children.forEach((item: any)=>{
|
||||
if (id){
|
||||
id +=`,${item.Id}`
|
||||
}else{
|
||||
if (record?.children && record?.children.length > 0) {
|
||||
record?.children.forEach((item: any) => {
|
||||
if (id) {
|
||||
id += `,${item.Id}`
|
||||
} else {
|
||||
id = item.Id
|
||||
}
|
||||
})
|
||||
@ -225,13 +225,13 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
ServerpartId: id
|
||||
})
|
||||
}
|
||||
else if (record?.Name && record?.Name.indexOf('服务区')!==-1){
|
||||
else if (record?.Name && record?.Name.indexOf('服务区') !== -1) {
|
||||
setCurrentRow({
|
||||
...record,
|
||||
ServerpartId: record?.Id,
|
||||
ServerpartName: record?.Name,
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
setCurrentRow(record)
|
||||
}
|
||||
setShowDailyDrawer(true)
|
||||
@ -241,26 +241,26 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'门店数量',
|
||||
title: '门店数量',
|
||||
hideInSearch: true,
|
||||
valueType: 'digit',
|
||||
dataIndex:'ShopCount'
|
||||
dataIndex: 'ShopCount'
|
||||
},
|
||||
{
|
||||
title:'经营模式',
|
||||
title: '经营模式',
|
||||
width: 150,
|
||||
dataIndex:'Business_Type',
|
||||
dataIndex: 'Business_Type',
|
||||
valueType: 'select',
|
||||
valueEnum: businessTypeObj,
|
||||
render:(_,record)=>{
|
||||
return record.BusinessType?businessTypeObj[record.BusinessType]:'-'
|
||||
render: (_, record) => {
|
||||
return record.BusinessType ? businessTypeObj[record.BusinessType] : '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'经营商户',
|
||||
title: '经营商户',
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
dataIndex:'MERCHANTS_NAME',
|
||||
dataIndex: 'MERCHANTS_NAME',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
@ -279,45 +279,45 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
]
|
||||
},
|
||||
{
|
||||
title:'经营数据',
|
||||
dataIndex:'',
|
||||
title: '经营数据',
|
||||
dataIndex: '',
|
||||
hideInSearch: true,
|
||||
children:[
|
||||
children: [
|
||||
{
|
||||
title:'客单数量',
|
||||
title: '客单数量',
|
||||
hideInSearch: true,
|
||||
dataIndex:'TicketCount',
|
||||
dataIndex: 'TicketCount',
|
||||
valueType: 'digit'
|
||||
},
|
||||
{
|
||||
title:'销售数量',
|
||||
title: '销售数量',
|
||||
hideInSearch: true,
|
||||
valueType: 'digit',
|
||||
dataIndex:'TotalCount'
|
||||
dataIndex: 'TotalCount'
|
||||
},
|
||||
{
|
||||
title:'销售金额',
|
||||
title: '销售金额',
|
||||
hideInSearch: true,
|
||||
valueType: 'digit',
|
||||
dataIndex:'TotalSellAmount'
|
||||
dataIndex: 'TotalSellAmount'
|
||||
},
|
||||
{
|
||||
title:'客单均量',
|
||||
title: '客单均量',
|
||||
hideInSearch: true,
|
||||
valueType: 'digit',
|
||||
dataIndex:'AverageCount'
|
||||
dataIndex: 'AverageCount'
|
||||
},
|
||||
{
|
||||
title:'客单均价',
|
||||
title: '客单均价',
|
||||
hideInSearch: true,
|
||||
valueType: 'digit',
|
||||
dataIndex:'AverageAmount'
|
||||
dataIndex: 'AverageAmount'
|
||||
},
|
||||
{
|
||||
title:'商品均价',
|
||||
title: '商品均价',
|
||||
hideInSearch: true,
|
||||
valueType: 'digit',
|
||||
dataIndex:'AverageCommodity'
|
||||
dataIndex: 'AverageCommodity'
|
||||
},
|
||||
]
|
||||
}
|
||||
@ -346,18 +346,18 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}
|
||||
|
||||
// 自营业态的选择的列表方法
|
||||
const handleGetShopNamesList = async (id: any )=>{
|
||||
const handleGetShopNamesList = async (id: any) => {
|
||||
const req: any = {
|
||||
ProvinceCode: currentUser?.USER_PROVINCE,
|
||||
BusinessType:1000,
|
||||
BusinessType: 1000,
|
||||
ServerpartId: id || selectedId
|
||||
}
|
||||
const data = await handleGetShopShortNamesGet(req)
|
||||
console.log('data',data)
|
||||
if (data && data.length>0){
|
||||
console.log('data', data)
|
||||
if (data && data.length > 0) {
|
||||
const obj: any = {}
|
||||
if (data && data.length>0){
|
||||
data.forEach((item: any)=>{
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
obj[item] = item
|
||||
})
|
||||
}
|
||||
@ -394,13 +394,13 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
borderRadius: '8px',
|
||||
width: '200px'
|
||||
}}>
|
||||
<Spin/>
|
||||
<span style={{marginLeft: '5px'}}>数据导出中...</span>
|
||||
<Spin />
|
||||
<span style={{ marginLeft: '5px' }}>数据导出中...</span>
|
||||
</div>
|
||||
</div> : ''
|
||||
}
|
||||
|
||||
<div className={`transactionAnalysisHideBox${printIndex}`} style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}>
|
||||
<div className={`transactionAnalysisHideBox${printIndex}`} style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }}>
|
||||
{
|
||||
showExportTable && reqDetailList && reqDetailList.length > 0 ?
|
||||
<ProTable
|
||||
@ -413,15 +413,15 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
/> : ''
|
||||
}
|
||||
</div>
|
||||
<div id='hiddenBox' style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}/>
|
||||
<div style={{backgroundColor: '#fff', display: 'flex'}}>
|
||||
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
<ProCard
|
||||
style={{width: !collapsible ? "300px" : "60px"}}
|
||||
style={{ width: !collapsible ? "300px" : "60px" }}
|
||||
className="pageTable-leftnav"
|
||||
bodyStyle={{padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? "300px" : "60px"}}
|
||||
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? "300px" : "60px" }}
|
||||
extra={<MenuFoldOutlined onClick={() => {
|
||||
setCollapsible(!collapsible)
|
||||
}}/>}
|
||||
}} />}
|
||||
colSpan={!collapsible ? "300px" : "60px"}
|
||||
title={!collapsible ? "请选择服务区" : ""}
|
||||
headerBordered
|
||||
@ -448,7 +448,7 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
// actionRef?.current?.reload()
|
||||
// getData(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
}}
|
||||
// switcherIcon={<PlusOutlined />}
|
||||
// switcherIcon={<PlusOutlined />}
|
||||
/> : ''}
|
||||
</ProCard>
|
||||
<div style={{
|
||||
@ -466,8 +466,8 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}}
|
||||
bordered
|
||||
headerTitle={<PageTitleBox props={props} />}
|
||||
search={{span: 6,defaultCollapsed:false,}}
|
||||
scroll={{y: 'calc(100vh - 470px)'}}
|
||||
search={{ span: 6, defaultCollapsed: false, }}
|
||||
scroll={{ y: 'calc(100vh - 470px)' }}
|
||||
request={async (params) => {
|
||||
if (isFirst) {
|
||||
setIsFirst(false)
|
||||
@ -477,7 +477,7 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
message.error('请选择服务区')
|
||||
return
|
||||
}
|
||||
console.log('params',params)
|
||||
console.log('params', params)
|
||||
handleCallLogs()
|
||||
setSearchParams(params)
|
||||
const req = {
|
||||
@ -488,7 +488,7 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
// shopNames: businessModel,
|
||||
targetSystem: params.targetSystem || '',
|
||||
shopNames: params.shopNames || '',
|
||||
SearchKeyName:"MerchantName,Brand,Shop,Serverpart",
|
||||
SearchKeyName: "MerchantName,Brand,Shop,Serverpart",
|
||||
SearchKeyValue: params?.SearchKeyValue || ''
|
||||
}
|
||||
const data = await handleGetGetTransactionCustomer(req)
|
||||
@ -538,11 +538,11 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}
|
||||
console.log('list', list)
|
||||
setReqDetailList(list)
|
||||
return {data: list, success: true}
|
||||
return { data: list, success: true }
|
||||
}}
|
||||
toolbar={{
|
||||
actions: [
|
||||
<span style={{visibility: 'hidden'}}>
|
||||
<span style={{ visibility: 'hidden' }}>
|
||||
<ReactHTMLTableToExcel
|
||||
buttonText={'导出excel'}
|
||||
ref={downloadBtnRef}
|
||||
@ -587,11 +587,11 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
setCurrentRow(undefined);
|
||||
setShowDailyDrawer(false);
|
||||
}}
|
||||
bodyStyle={{backgroundColor: "#f9f9f9", padding: 16}}
|
||||
bodyStyle={{ backgroundColor: "#f9f9f9", padding: 16 }}
|
||||
destroyOnClose
|
||||
closable={false}
|
||||
>
|
||||
<div style={{width: '100%'}}>
|
||||
<div style={{ width: '100%' }}>
|
||||
<ProTable
|
||||
actionRef={actionByDateRef}
|
||||
formRef={formByDateRef}
|
||||
@ -603,12 +603,12 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
search={false}
|
||||
options={false}
|
||||
pagination={false}
|
||||
headerTitle={ currentRow?.Name==='合计'?'合计':`${currentRow?.SpregiontypeName}${currentRow?.ServerpartName?`-${currentRow?.ServerpartName}`:''}${currentRow?.SERVERPARTSHOP_NAME?`-${currentRow?.SERVERPARTSHOP_NAME}`:''}`}
|
||||
request={async (params)=>{
|
||||
console.log('currentRow',currentRow)
|
||||
headerTitle={currentRow?.Name === '合计' ? '合计' : `${currentRow?.SpregiontypeName}${currentRow?.ServerpartName ? `-${currentRow?.ServerpartName}` : ''}${currentRow?.SERVERPARTSHOP_NAME ? `-${currentRow?.SERVERPARTSHOP_NAME}` : ''}`}
|
||||
request={async (params) => {
|
||||
console.log('currentRow', currentRow)
|
||||
const req = {
|
||||
ServerpartIds: currentRow?.Name==='合计'?selectedId:currentRow?.ServerpartId?currentRow?.ServerpartId:'',
|
||||
ServerpartShopId:currentRow?.SERVERPARTSHOP_ID?currentRow?.SERVERPARTSHOP_ID:'',
|
||||
ServerpartIds: currentRow?.Name === '合计' ? selectedId : currentRow?.ServerpartId ? currentRow?.ServerpartId : '',
|
||||
ServerpartShopId: currentRow?.SERVERPARTSHOP_ID ? currentRow?.SERVERPARTSHOP_ID : '',
|
||||
startDate: searchParams?.StartDate,
|
||||
endDate: searchParams?.EndDate,
|
||||
businessType,
|
||||
@ -616,22 +616,22 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
targetSystem: searchParams?.targetSystem || '',
|
||||
}
|
||||
const data = await handleGetTransactionCustomerByDate(req)
|
||||
console.log('data22222',data)
|
||||
if (data && data.length>0){
|
||||
console.log('data',data)
|
||||
data.forEach((item: any,index: number)=>{
|
||||
console.log('data22222', data)
|
||||
if (data && data.length > 0) {
|
||||
console.log('data', data)
|
||||
data.forEach((item: any, index: number) => {
|
||||
item.index = index + 1
|
||||
if (item.children && item.children.length>0){
|
||||
item.children.forEach((subItem: any,subIndex: number)=>{
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any, subIndex: number) => {
|
||||
subItem.index = subIndex + 1
|
||||
})
|
||||
}
|
||||
})
|
||||
return {data, success: true}
|
||||
return { data, success: true }
|
||||
}
|
||||
return {data:[],success: true}
|
||||
return { data: [], success: true }
|
||||
}}
|
||||
scroll={{x: 1700}}
|
||||
scroll={{ x: 1700 }}
|
||||
columnsState={{
|
||||
value: columnsDailyStateMap,
|
||||
onChange: setColumnsDailyStateMap,
|
||||
@ -640,9 +640,9 @@ const transactionAnalysis: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
</div>
|
||||
</Drawer>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
export default connect(({user}: ConnectState) => ({
|
||||
export default connect(({ user }: ConnectState) => ({
|
||||
currentUser: user.currentUser
|
||||
}))(transactionAnalysis);
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
import {connect} from "umi";
|
||||
import type {CurrentUser} from "umi";
|
||||
import type {ConnectState} from "@/models/connect";
|
||||
import React, {useRef, useState} from "react";
|
||||
import { connect } from "umi";
|
||||
import type { CurrentUser } from "umi";
|
||||
import type { ConnectState } from "@/models/connect";
|
||||
import React, { useRef, useState } from "react";
|
||||
import ProCard from "@ant-design/pro-card";
|
||||
import {MenuFoldOutlined} from "@ant-design/icons";
|
||||
import type {FormInstance} from "antd";
|
||||
import {Avatar, Button, Menu, message, Space, Spin, Tree,Drawer} from "antd";
|
||||
import { MenuFoldOutlined } from "@ant-design/icons";
|
||||
import type { FormInstance } from "antd";
|
||||
import { Avatar, Button, Menu, message, Space, Spin, Tree, Drawer } from "antd";
|
||||
import useRequest from "@ahooksjs/use-request";
|
||||
import {getServerpartTree, handleCallLogs, handleGetDate} from "@/services/options";
|
||||
import type {ActionType} from "@ant-design/pro-table";
|
||||
import { getServerpartTree, handleCallLogs, handleGetDate } from "@/services/options";
|
||||
import type { ActionType } from "@ant-design/pro-table";
|
||||
import ProTable from "@ant-design/pro-table";
|
||||
import ReactHTMLTableToExcel from "react-html-table-to-excel";
|
||||
import SubMenu from "antd/lib/menu/SubMenu";
|
||||
import moment from "moment";
|
||||
import {handleGetABNORMALAUDITList} from "@/pages/reports/audit/abnormalAudit/service";
|
||||
import { handleGetABNORMALAUDITList } from "@/pages/reports/audit/abnormalAudit/service";
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
|
||||
|
||||
const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
const abnormalAudit: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const { currentUser } = props
|
||||
const downloadBtnRef = useRef<any>()
|
||||
const actionRef = useRef<ActionType>();
|
||||
@ -25,25 +25,25 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
|
||||
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
|
||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||
const [treeView,setTreeView] = useState<any>()
|
||||
const [treeView, setTreeView] = useState<any>()
|
||||
// 加载服务区树
|
||||
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
||||
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
||||
console.log('data',data)
|
||||
console.log('data', data)
|
||||
setTreeView(data)
|
||||
return data
|
||||
})
|
||||
// 树相关的属性和方法
|
||||
// 树相关的属性和方法
|
||||
const [selectedId, setSelectedId] = useState<string>()
|
||||
// 导出的加载效果
|
||||
const [showLoading,setShowLoading] = useState<boolean>(false)
|
||||
// 导出的加载效果
|
||||
const [showLoading, setShowLoading] = useState<boolean>(false)
|
||||
// 是否显示打印的表格
|
||||
const [showExportTable,setShowExportTable] = useState<boolean>(false)
|
||||
const [showExportTable, setShowExportTable] = useState<boolean>(false)
|
||||
const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点
|
||||
// 显示详情抽屉
|
||||
const [showDetailDrawer,setShowDetailDrawer] = useState<boolean>(false)
|
||||
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
|
||||
// 选择的当行详情
|
||||
const [currentRow,setCurrentRow] = useState<any>()
|
||||
const [currentRow, setCurrentRow] = useState<any>()
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
@ -53,7 +53,7 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
hideInTable: true,
|
||||
hideInDescriptions: true,
|
||||
colSize: 1,
|
||||
initialValue: [moment().add(-1, 'month').format('YYYY-MM-DD'), moment().add(-1,'day').format('YYYY-MM-DD')],
|
||||
initialValue: [moment().add(-1, 'month').format('YYYY-MM-DD'), moment().add(-1, 'day').format('YYYY-MM-DD')],
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return {
|
||||
@ -67,107 +67,107 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'序号',
|
||||
title: '序号',
|
||||
width: 60,
|
||||
dataIndex: '',
|
||||
valueType: 'index',
|
||||
hideInSearch: true
|
||||
},
|
||||
{
|
||||
title:'服务区名称',
|
||||
title: '服务区名称',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
dataIndex: 'SERVERPART_NAME',
|
||||
hideInSearch: true
|
||||
},
|
||||
{
|
||||
title:'门店名称',
|
||||
title: '门店名称',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
dataIndex: 'SHOPNAME',
|
||||
hideInSearch: true,
|
||||
render:(_,record)=>{
|
||||
return record?.SHOPNAME?<a onClick={()=>{
|
||||
render: (_, record) => {
|
||||
return record?.SHOPNAME ? <a onClick={() => {
|
||||
setCurrentRow(record)
|
||||
setShowDetailDrawer(true)
|
||||
}}>{record?.SHOPNAME}</a>:''
|
||||
}}>{record?.SHOPNAME}</a> : ''
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'总销售额',
|
||||
title: '总销售额',
|
||||
width: 120,
|
||||
valueType: 'digit',
|
||||
dataIndex: 'TOTALSELLAMOUNT',
|
||||
hideInSearch: true
|
||||
},
|
||||
{
|
||||
title:'长短款',
|
||||
title: '长短款',
|
||||
width: 120,
|
||||
valueType: 'digit',
|
||||
dataIndex: 'DIFFERENT_PRICE',
|
||||
hideInSearch: true
|
||||
},
|
||||
{
|
||||
title:'稽核金额/对客现金',
|
||||
title: '稽核金额/对客现金',
|
||||
width: 180,
|
||||
dataIndex: 'CHECK_CASHPAY/CASH_PAYMENT',
|
||||
hideInSearch: true,
|
||||
render:(_,record)=>{
|
||||
render: (_, record) => {
|
||||
return `${record?.CHECK_CASHPAY || '0'}/${record?.CASH_PAYMENT || '0'}`
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'间隔时长(分)',
|
||||
title: '间隔时长(分)',
|
||||
width: 120,
|
||||
dataIndex: 'TIME_INTERVAL',
|
||||
hideInSearch: true
|
||||
},
|
||||
{
|
||||
title:'结账时间',
|
||||
title: '结账时间',
|
||||
width: 180,
|
||||
dataIndex: 'ENDACCOUNT_DATE',
|
||||
hideInSearch: true,
|
||||
render:(_,record)=>{
|
||||
return record?.ENDACCOUNT_DATE?handleGetDate(record?.ENDACCOUNT_DATE):'-'
|
||||
render: (_, record) => {
|
||||
return record?.ENDACCOUNT_DATE ? handleGetDate(record?.ENDACCOUNT_DATE) : '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'稽查时间',
|
||||
title: '稽查时间',
|
||||
width: 180,
|
||||
dataIndex: 'CHECK_ENDDATE',
|
||||
hideInSearch: true,
|
||||
render:(_,record)=>{
|
||||
return record?.CHECK_ENDDATE?handleGetDate(record?.CHECK_ENDDATE):'-'
|
||||
render: (_, record) => {
|
||||
return record?.CHECK_ENDDATE ? handleGetDate(record?.CHECK_ENDDATE) : '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'起始时间',
|
||||
title: '起始时间',
|
||||
width: 180,
|
||||
dataIndex: 'CHECK_STARTDATE',
|
||||
hideInSearch: true,
|
||||
render:(_,record)=>{
|
||||
return record?.CHECK_STARTDATE?handleGetDate(record?.CHECK_STARTDATE):'-'
|
||||
render: (_, record) => {
|
||||
return record?.CHECK_STARTDATE ? handleGetDate(record?.CHECK_STARTDATE) : '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'稽查类型',
|
||||
title: '稽查类型',
|
||||
width: 120,
|
||||
dataIndex:'CHECK_TYPE',
|
||||
dataIndex: 'CHECK_TYPE',
|
||||
valueType: 'select',
|
||||
valueEnum:{
|
||||
"现场稽查":"现场稽查",
|
||||
"区域稽查":"区域稽查",
|
||||
"公司稽查":"公司稽查",
|
||||
valueEnum: {
|
||||
"现场稽查": "现场稽查",
|
||||
"区域稽查": "区域稽查",
|
||||
"公司稽查": "公司稽查",
|
||||
}
|
||||
},
|
||||
{
|
||||
title:'稽核人员',
|
||||
title: '稽核人员',
|
||||
width: 120,
|
||||
dataIndex: 'WORKER_NAME',
|
||||
hideInSearch: true
|
||||
},
|
||||
{
|
||||
title:'收银人员',
|
||||
title: '收银人员',
|
||||
width: 120,
|
||||
dataIndex: 'CASHIER_NAME',
|
||||
ellipsis: true,
|
||||
@ -197,7 +197,7 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
tempTable.remove() // 防止重复打印一个内容
|
||||
}
|
||||
// 查询的条件
|
||||
const [searchParams,setSearchParams] = useState<any>()
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
|
||||
|
||||
return (
|
||||
@ -230,13 +230,13 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
borderRadius: '8px',
|
||||
width: '200px'
|
||||
}}>
|
||||
<Spin/>
|
||||
<span style={{marginLeft: '5px'}}>数据导出中...</span>
|
||||
<Spin />
|
||||
<span style={{ marginLeft: '5px' }}>数据导出中...</span>
|
||||
</div>
|
||||
</div> : ''
|
||||
}
|
||||
|
||||
<div className={'saleReportHideBox'} style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}>
|
||||
<div className={'saleReportHideBox'} style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }}>
|
||||
{
|
||||
showExportTable && reqDetailList && reqDetailList.length > 0 ?
|
||||
<ProTable
|
||||
@ -249,16 +249,16 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
/> : ''
|
||||
}
|
||||
</div>
|
||||
<div id='hiddenBox' style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}/>
|
||||
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
|
||||
|
||||
<div style={{backgroundColor: '#fff',display:'flex'}}>
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
<ProCard
|
||||
style={{width:!collapsible ? "300px" : "60px"}}
|
||||
style={{ width: !collapsible ? "300px" : "60px" }}
|
||||
className="pageTable-leftnav"
|
||||
bodyStyle={{padding: 0, paddingTop: 20, paddingLeft: 20,width:!collapsible ? "300px" : "60px"}}
|
||||
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? "300px" : "60px" }}
|
||||
extra={<MenuFoldOutlined onClick={() => {
|
||||
setCollapsible(!collapsible)
|
||||
}}/>}
|
||||
}} />}
|
||||
colSpan={!collapsible ? "300px" : "60px"}
|
||||
title={!collapsible ? "请选择服务区" : ""}
|
||||
headerBordered
|
||||
@ -284,11 +284,11 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
// actionRef?.current?.reload()
|
||||
// getData(selectedIds.map(n => n?.value)?.toString() || '')
|
||||
}}
|
||||
// switcherIcon={<PlusOutlined />}
|
||||
// switcherIcon={<PlusOutlined />}
|
||||
/> : ''}
|
||||
</ProCard>
|
||||
<div style={{
|
||||
width:!collapsible?'calc(100% - 300px)':'calc(100% - 60px)',
|
||||
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||
paddingTop: 0,
|
||||
paddingBottom: 0,
|
||||
paddingRight: 0
|
||||
@ -299,15 +299,16 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
columns={columns}
|
||||
bordered
|
||||
headerTitle={<PageTitleBox props={props} />}
|
||||
search={{span: 6}}
|
||||
scroll={{x: 1500}}
|
||||
request={async(params)=>{
|
||||
if (!selectedId){
|
||||
search={{ span: 6 }}
|
||||
scroll={{ x: 1500 }}
|
||||
request={async (params) => {
|
||||
if (!selectedId) {
|
||||
return
|
||||
}
|
||||
const req = {
|
||||
SearchParameter:{
|
||||
SearchParameter: {
|
||||
...params,
|
||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||
SERVERPART_ID: selectedId
|
||||
},
|
||||
PageIndex: 1,
|
||||
@ -316,17 +317,17 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
handleCallLogs()
|
||||
setSearchParams(params)
|
||||
const data = await handleGetABNORMALAUDITList(req)
|
||||
console.log('data',data)
|
||||
if (data && data.length>0){
|
||||
console.log('data', data)
|
||||
if (data && data.length > 0) {
|
||||
setReqDetailList(data)
|
||||
return {data,success: true}
|
||||
return { data, success: true }
|
||||
}
|
||||
setReqDetailList([])
|
||||
return {data:[],success: true}
|
||||
return { data: [], success: true }
|
||||
}}
|
||||
toolbar={{
|
||||
actions: [
|
||||
<span style={{visibility: 'hidden'}}>
|
||||
<span style={{ visibility: 'hidden' }}>
|
||||
<ReactHTMLTableToExcel
|
||||
buttonText={'导出excel'}
|
||||
ref={downloadBtnRef}
|
||||
@ -369,7 +370,7 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
setCurrentRow(undefined);
|
||||
}}
|
||||
destroyOnClose
|
||||
bodyStyle={{backgroundColor: "#f9f9f9", padding: 16}}
|
||||
bodyStyle={{ backgroundColor: "#f9f9f9", padding: 16 }}
|
||||
closable={false}
|
||||
>
|
||||
|
||||
@ -378,6 +379,6 @@ const abnormalAudit: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
)
|
||||
}
|
||||
|
||||
export default connect(({user}: ConnectState) => ({
|
||||
export default connect(({ user }: ConnectState) => ({
|
||||
currentUser: user.currentUser
|
||||
}))(abnormalAudit);
|
||||
|
||||
@ -18,6 +18,7 @@ import useRequest from "@ahooksjs/use-request";
|
||||
import moment from 'moment'
|
||||
import { handleApproveCommodityProInst, handleCreateCommodityProInst, handleDeleteCOMMODITY_RUNNING, handleDeleteCommodityProInst, handleGetApprovalCommodityList, handleGetBUSINESSAPPROVALDetail, handleGetCOMMODITYRUNNINGList, handleReapplyCommodityProInst, handleRejectCommodityProInst } from "../ProductApprovalProcess/service";
|
||||
import './style.less'
|
||||
import session from "@/utils/session";
|
||||
|
||||
|
||||
const { Step } = Steps
|
||||
@ -867,23 +868,26 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props
|
||||
message: "请选择服务区!"
|
||||
}]}
|
||||
request={async () => {
|
||||
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
||||
console.log('data321312', data);
|
||||
const ServerpartIdsTree = session.get('ServerpartIdsTree')
|
||||
return ServerpartIdsTree
|
||||
|
||||
const list: any = []
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any) => {
|
||||
list.push({ label: subItem.label, value: subItem.value })
|
||||
})
|
||||
}
|
||||
})
|
||||
// data.forEach((item: any) => {
|
||||
// list.push({ label: item.label, value: item.value })
|
||||
// })
|
||||
}
|
||||
return list
|
||||
// const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
||||
// console.log('data321312', data);
|
||||
|
||||
// const list: any = []
|
||||
// if (data && data.length > 0) {
|
||||
// data.forEach((item: any) => {
|
||||
// if (item.children && item.children.length > 0) {
|
||||
// item.children.forEach((subItem: any) => {
|
||||
// list.push({ label: subItem.label, value: subItem.value })
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// // data.forEach((item: any) => {
|
||||
// // list.push({ label: item.label, value: item.value })
|
||||
// // })
|
||||
// }
|
||||
// return list
|
||||
}}
|
||||
disabled={currentRow?.BusinessProcess_State > 1000 || (currentRow?.BusinessApproval_ID && currentRow?.ApproveStaff_ID !== currentUser?.ID)}
|
||||
fieldProps={{
|
||||
|
||||
@ -1028,21 +1028,23 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props
|
||||
message: "请选择服务区!"
|
||||
}]}
|
||||
request={async () => {
|
||||
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
||||
const list: any = []
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any) => {
|
||||
list.push({ label: subItem.label, value: subItem.value })
|
||||
})
|
||||
}
|
||||
})
|
||||
// data.forEach((item: any) => {
|
||||
// list.push({ label: item.label, value: item.value })
|
||||
// })
|
||||
}
|
||||
return list
|
||||
const ServerpartIdsTree = session.get('ServerpartIdsTree')
|
||||
return ServerpartIdsTree
|
||||
// const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
||||
// const list: any = []
|
||||
// if (data && data.length > 0) {
|
||||
// data.forEach((item: any) => {
|
||||
// if (item.children && item.children.length > 0) {
|
||||
// item.children.forEach((subItem: any) => {
|
||||
// list.push({ label: subItem.label, value: subItem.value })
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// // data.forEach((item: any) => {
|
||||
// // list.push({ label: item.label, value: item.value })
|
||||
// // })
|
||||
// }
|
||||
// return list
|
||||
}}
|
||||
disabled={currentRow?.BusinessProcess_State > 1000 || (currentRow?.BusinessApproval_ID && currentRow?.ApproveStaff_ID !== currentUser?.ID)}
|
||||
fieldProps={{
|
||||
@ -1633,7 +1635,7 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props
|
||||
<ProFormText
|
||||
name="COMMODITY_BARCODE"
|
||||
label="商品条码"
|
||||
disabled={currentRow}
|
||||
disabled={true}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
|
||||
@ -1075,21 +1075,23 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop
|
||||
message: "请选择服务区!"
|
||||
}]}
|
||||
request={async () => {
|
||||
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
||||
const list: any = []
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any) => {
|
||||
list.push({ label: subItem.label, value: subItem.value })
|
||||
})
|
||||
}
|
||||
})
|
||||
// data.forEach((item: any) => {
|
||||
// list.push({ label: item.label, value: item.value })
|
||||
// })
|
||||
}
|
||||
return list
|
||||
const ServerpartIdsTree = session.get('ServerpartIdsTree')
|
||||
return ServerpartIdsTree
|
||||
// const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
||||
// const list: any = []
|
||||
// if (data && data.length > 0) {
|
||||
// data.forEach((item: any) => {
|
||||
// if (item.children && item.children.length > 0) {
|
||||
// item.children.forEach((subItem: any) => {
|
||||
// list.push({ label: subItem.label, value: subItem.value })
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// // data.forEach((item: any) => {
|
||||
// // list.push({ label: item.label, value: item.value })
|
||||
// // })
|
||||
// }
|
||||
// return list
|
||||
}}
|
||||
disabled={currentRow?.BusinessProcess_State > 1000 || (currentRow?.BusinessApproval_ID && currentRow?.ApproveStaff_ID !== currentUser?.ID)}
|
||||
fieldProps={{
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// 商品信息管理
|
||||
import { connect } from "umi";
|
||||
import type { CurrentUser } from "umi";
|
||||
import type { ConnectState } from "@/models/connect";
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
import {connect} from "umi";
|
||||
import type {CurrentUser} from "umi";
|
||||
import type {ConnectState} from "@/models/connect";
|
||||
import React, {useRef, useState} from "react";
|
||||
// 商品信息查询
|
||||
import { connect } from "umi";
|
||||
import type { CurrentUser } from "umi";
|
||||
import type { ConnectState } from "@/models/connect";
|
||||
import React, { useRef, useState } from "react";
|
||||
import ProCard from "@ant-design/pro-card";
|
||||
import {MenuFoldOutlined} from "@ant-design/icons";
|
||||
import type { FormInstance} from "antd";
|
||||
import {Col, Drawer, Row} from "antd";
|
||||
import {Avatar, Button, Menu, message, Modal, Popconfirm, Space, Spin, Tree} from "antd";
|
||||
import { MenuFoldOutlined } from "@ant-design/icons";
|
||||
import type { FormInstance } from "antd";
|
||||
import { Col, Drawer, Row } from "antd";
|
||||
import { Avatar, Button, Menu, message, Modal, Popconfirm, Space, Spin, Tree } from "antd";
|
||||
import useRequest from "@ahooksjs/use-request";
|
||||
import {
|
||||
getFieldEnum,
|
||||
@ -15,7 +16,7 @@ import {
|
||||
getServerpartTree,
|
||||
handleCallLogs
|
||||
} from "@/services/options";
|
||||
import type {ActionType} from "@ant-design/pro-table";
|
||||
import type { ActionType } from "@ant-design/pro-table";
|
||||
import ProTable from "@ant-design/pro-table";
|
||||
import ReactHTMLTableToExcel from "react-html-table-to-excel";
|
||||
import SubMenu from "antd/lib/menu/SubMenu";
|
||||
@ -24,26 +25,27 @@ import {
|
||||
handleGetCommodityList,
|
||||
handleGetNestingCOMMODITYTYPETree, handleSynchroCOMMODITY
|
||||
} from "@/pages/reports/productControl/commodityInfo/service";
|
||||
import ProForm, {ProFormDateTimePicker, ProFormDigit, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect} from "@ant-design/pro-form";
|
||||
import ProForm, { ProFormDateTimePicker, ProFormDigit, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect } from "@ant-design/pro-form";
|
||||
import moment from "moment";
|
||||
import session from "@/utils/session";
|
||||
import './style.less'
|
||||
import Detail from "@/pages/reports/productControl/components/detail";
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
|
||||
const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
const commoditySearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const { currentUser } = props
|
||||
const downloadBtnRef = useRef<any>()
|
||||
const actionRef = useRef<ActionType>();
|
||||
const formRef = useRef<FormInstance>();
|
||||
const modalFormRef = useRef<any>();
|
||||
const [currentRow,setCurrentRow] = useState<any>()
|
||||
const [currentRow, setCurrentRow] = useState<any>()
|
||||
|
||||
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
|
||||
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
|
||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||
const [treeView,setTreeView] = useState<any>()
|
||||
const [allTotal,setAllTotal] = useState<number>(20)
|
||||
const [treeView, setTreeView] = useState<any>()
|
||||
const [allTreeView, setAllTreeView] = useState<any>()
|
||||
const [allTotal, setAllTotal] = useState<number>(20)
|
||||
// 加载服务区树
|
||||
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
||||
const req = {
|
||||
@ -52,35 +54,45 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
ShowCode: true
|
||||
}
|
||||
const data = await handleGetNestingCOMMODITYTYPETree(req)
|
||||
console.log('data',data)
|
||||
setTreeView(data)
|
||||
let list: any = data
|
||||
if (currentUser?.ProvinceCode === '734100') {
|
||||
list.unshift({
|
||||
label: "全部",
|
||||
value: 999999,
|
||||
key: '1-999999',
|
||||
type: 1
|
||||
})
|
||||
console.log('listlistlistlist', list);
|
||||
}
|
||||
setTreeView(list)
|
||||
setAllTreeView(list)
|
||||
return data
|
||||
})
|
||||
// 树相关的属性和方法
|
||||
// 树相关的属性和方法
|
||||
const [selectedId, setSelectedId] = useState<string>()
|
||||
// 导出的加载效果
|
||||
const [showLoading,setShowLoading] = useState<boolean>(false)
|
||||
// 导出的加载效果
|
||||
const [showLoading, setShowLoading] = useState<boolean>(false)
|
||||
// 是否显示打印的表格
|
||||
const [showExportTable,setShowExportTable] = useState<boolean>(false)
|
||||
const [showExportTable, setShowExportTable] = useState<boolean>(false)
|
||||
const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点
|
||||
const [showModal,setShowModal] = useState<boolean>(false)
|
||||
const [showModal, setShowModal] = useState<boolean>(false)
|
||||
|
||||
const [showDetail,setShowDetail] = useState<boolean>(false)
|
||||
const [showDetail, setShowDetail] = useState<boolean>(false)
|
||||
|
||||
|
||||
|
||||
const ServerpartIdsList: any = session.get('ServerpartIdsList')
|
||||
const {loading: CommodityLoading,data: CommodityData} = useRequest(async()=>{
|
||||
const { loading: CommodityLoading, data: CommodityData } = useRequest(async () => {
|
||||
const data = await getFieldEnumTree({ FieldExplainField: 'CommodityTypeIds' })
|
||||
const obj: any = {}
|
||||
if (data && data.length>0){
|
||||
data.forEach((item: any)=>{
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
obj[item.value] = item.label
|
||||
if (item.children && item.children.length>0){
|
||||
item.children.forEach((subItem: any)=>{
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any) => {
|
||||
obj[subItem.value] = subItem.label
|
||||
if (subItem.children && subItem.children.length>0){
|
||||
subItem.children.forEach((thirdItem: any)=>{
|
||||
if (subItem.children && subItem.children.length > 0) {
|
||||
subItem.children.forEach((thirdItem: any) => {
|
||||
obj[thirdItem.value] = thirdItem.label
|
||||
})
|
||||
}
|
||||
@ -93,56 +105,58 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title:'状态',
|
||||
title: '状态',
|
||||
dataIndex: 'COMMODITY_STATE',
|
||||
hideInTable: true,
|
||||
valueType: 'select',
|
||||
valueEnum:{
|
||||
0:{text:'无效'},
|
||||
1:{text:'有效'}
|
||||
valueEnum: {
|
||||
0: { text: '无效' },
|
||||
1: { text: '有效' }
|
||||
},
|
||||
initialValue: '1'
|
||||
},
|
||||
{
|
||||
title:'服务区',
|
||||
title: '服务区',
|
||||
dataIndex: 'ServerpartID',
|
||||
valueType: 'select',
|
||||
hideInTable: true,
|
||||
request:async ()=>{
|
||||
const data = await getServerpartOption(340000)
|
||||
return data
|
||||
request: async () => {
|
||||
// const data = await getServerpartOption(currentUser?.ProvinceCode)
|
||||
// console.log('datadatadatadata', data);
|
||||
const serverpartList: any = session.get('serverpartList')
|
||||
return serverpartList
|
||||
},
|
||||
fieldProps:{
|
||||
fieldProps: {
|
||||
showSearch: true,
|
||||
filterOption:(input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()),
|
||||
filterOption: (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()),
|
||||
}
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>序号</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>序号</div>,
|
||||
width: 70,
|
||||
dataIndex:'index',
|
||||
dataIndex: 'index',
|
||||
hideInSearch: true,
|
||||
valueType:'index'
|
||||
valueType: 'index'
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>服务区</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>服务区</div>,
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
align:'center',
|
||||
align: 'center',
|
||||
dataIndex: 'SERVERPART_NAME',
|
||||
hideInSearch: true,
|
||||
render:(_,record)=>{
|
||||
render: (_, record) => {
|
||||
return <span>
|
||||
{record?.SERVERPART_ID ? ServerpartIdsList[record?.SERVERPART_ID] : '-'}
|
||||
</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>商品业态</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>商品业态</div>,
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
dataIndex: 'BUSINESSTYPE',
|
||||
align:'center',
|
||||
align: 'center',
|
||||
hideInSearch: true,
|
||||
valueType: 'select',
|
||||
request: async () => {
|
||||
@ -151,23 +165,23 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>商品类型</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>商品类型</div>,
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
dataIndex: 'COMMODITY_TYPE',
|
||||
align:'center',
|
||||
align: 'center',
|
||||
hideInSearch: true,
|
||||
valueEnum: CommodityData
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>商品名称</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>商品名称</div>,
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
align:'left',
|
||||
align: 'left',
|
||||
dataIndex: 'COMMODITY_NAME',
|
||||
hideInSearch: true,
|
||||
render:(_,record)=>{
|
||||
return <a onClick={()=>{
|
||||
render: (_, record) => {
|
||||
return <a onClick={() => {
|
||||
setCurrentRow(record)
|
||||
setShowDetail(true)
|
||||
}}>
|
||||
@ -176,51 +190,51 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>商品条码</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>商品条码</div>,
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
align:'left',
|
||||
align: 'left',
|
||||
dataIndex: 'COMMODITY_BARCODE',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>零售价</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>零售价</div>,
|
||||
width: 70,
|
||||
ellipsis: true,
|
||||
align:'right',
|
||||
align: 'right',
|
||||
dataIndex: 'COMMODITY_RETAILPRICE',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>进货价</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>进货价</div>,
|
||||
width: 70,
|
||||
ellipsis: true,
|
||||
align:'right',
|
||||
align: 'right',
|
||||
dataIndex: 'COMMODITY_PURCHASEPRICE',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>商品单位</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>商品单位</div>,
|
||||
width: 80,
|
||||
ellipsis: true,
|
||||
align:'right',
|
||||
align: 'right',
|
||||
dataIndex: 'COMMODITY_UNIT',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>状态</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>状态</div>,
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
dataIndex: 'COMMODITY_STATE',
|
||||
hideInSearch: true,
|
||||
align:'center',
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
valueEnum: { 0: { text: '无效', status: 'error' }, 1: { text: '有效', status: 'success' }, 2: { text: '不可选', status: 'default' } },
|
||||
},
|
||||
{
|
||||
title:<div style={{textAlign:'center'}}>审核时间</div>,
|
||||
title: <div style={{ textAlign: 'center' }}>审核时间</div>,
|
||||
width: 150,
|
||||
align:'center',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'OPERATE_DATE',
|
||||
hideInSearch: true,
|
||||
@ -228,42 +242,42 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
]
|
||||
|
||||
// 查询的条件
|
||||
const [searchParams,setSearchParams] = useState<any>()
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
const getMenuDom = (data: any[], callback: (item: any) => void) => {
|
||||
return (data.map((element: any) => {
|
||||
// 绑定嵌套树的子节点
|
||||
if (element.children && element.children.length > 0) {
|
||||
return (
|
||||
<SubMenu title={<span>{element.label}</span>}
|
||||
icon={element.ico ? <Avatar src={element.ico} size={16} style={{ marginRight: 4 }} shape="square" /> : null}
|
||||
key={`${element.key || element.value}`}
|
||||
onTitleClick={(item) => {
|
||||
// 选中一级菜单
|
||||
if (!currenMenu || item.key !== `${currenMenu?.key}`) {
|
||||
callback.call(callback, item)
|
||||
}
|
||||
item.domEvent.stopPropagation();
|
||||
}}
|
||||
icon={element.ico ? <Avatar src={element.ico} size={16} style={{ marginRight: 4 }} shape="square" /> : null}
|
||||
key={`${element.key || element.value}`}
|
||||
onTitleClick={(item) => {
|
||||
// 选中一级菜单
|
||||
if (!currenMenu || item.key !== `${currenMenu?.key}`) {
|
||||
callback.call(callback, item)
|
||||
}
|
||||
item.domEvent.stopPropagation();
|
||||
}}
|
||||
>
|
||||
{element.children && element.children.length > 0 && getMenuDom(element.children, callback)}
|
||||
</SubMenu>
|
||||
)
|
||||
}
|
||||
return (<Menu.Item icon={element.ico ? <Avatar src={element.ico} size={16} shape="square" /> : null}
|
||||
key={`${element.key || element.value}`}>{element.desc && element.desc !== '0/0' ? <><span>{element.label}</span>
|
||||
<span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px' }}>
|
||||
[<span style={{ color: 'red' }}>{element.desc.split('/')[0]}</span>/<span style={{ color: '#1890ff' }}>{element.desc.split('/')[1]}</span>]</span></> : element.label}</Menu.Item>)
|
||||
key={`${element.key || element.value}`}>{element.desc && element.desc !== '0/0' ? <><span>{element.label}</span>
|
||||
<span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px' }}>
|
||||
[<span style={{ color: 'red' }}>{element.desc.split('/')[0]}</span>/<span style={{ color: '#1890ff' }}>{element.desc.split('/')[1]}</span>]</span></> : element.label}</Menu.Item>)
|
||||
}))
|
||||
}
|
||||
|
||||
const loadSelectedId = (item?: any) => {
|
||||
console.log('item',item)
|
||||
console.log('item', item)
|
||||
// 选中的子菜单key
|
||||
const [type, value] = item.key.split('-')
|
||||
if (type === '1') {
|
||||
setCurrenMenu(value)
|
||||
// actionRef?.current?.reload()
|
||||
} else{
|
||||
} else {
|
||||
setCurrenMenu('')
|
||||
}
|
||||
}
|
||||
@ -320,13 +334,13 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
borderRadius: '8px',
|
||||
width: '200px'
|
||||
}}>
|
||||
<Spin/>
|
||||
<span style={{marginLeft: '5px'}}>数据导出中...</span>
|
||||
<Spin />
|
||||
<span style={{ marginLeft: '5px' }}>数据导出中...</span>
|
||||
</div>
|
||||
</div> : ''
|
||||
}
|
||||
|
||||
<div className={'commoditySearchHideBox'} style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}>
|
||||
<div className={'commoditySearchHideBox'} style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }}>
|
||||
{
|
||||
showExportTable && reqDetailList && reqDetailList.length > 0 ?
|
||||
<ProTable
|
||||
@ -339,16 +353,16 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
/> : ''
|
||||
}
|
||||
</div>
|
||||
<div id='hiddenBox' style={{position: 'fixed', zIndex: -1, top: 0, left: 0}}/>
|
||||
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
|
||||
|
||||
<div style={{backgroundColor: '#fff',display:'flex'}}>
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
<ProCard
|
||||
style={{width:!collapsible ? "300px" : "60px"}}
|
||||
style={{ width: !collapsible ? "300px" : "60px" }}
|
||||
className="pageTable-leftnav"
|
||||
bodyStyle={{padding: 0, paddingTop: 20, paddingLeft: 20,width:!collapsible ? "300px" : "60px"}}
|
||||
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20, width: !collapsible ? "300px" : "60px" }}
|
||||
extra={<MenuFoldOutlined onClick={() => {
|
||||
setCollapsible(!collapsible)
|
||||
}}/>}
|
||||
}} />}
|
||||
colSpan={!collapsible ? "300px" : "60px"}
|
||||
title={!collapsible ? "请选择服务区" : ""}
|
||||
headerBordered
|
||||
@ -359,7 +373,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
style={{ height: 'calc(100vh - 220px)', overflowY: 'auto', overflowX: 'hidden' }}
|
||||
selectedKeys={`1-${currenMenu}`}
|
||||
onSelect={(item) => {
|
||||
console.log('item',item)
|
||||
console.log('item', item)
|
||||
loadSelectedId(item)
|
||||
}}
|
||||
>
|
||||
@ -367,7 +381,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
</Menu>}
|
||||
</ProCard>
|
||||
<div style={{
|
||||
width:!collapsible?'calc(100% - 300px)':'calc(100% - 60px)',
|
||||
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||
paddingTop: 0,
|
||||
paddingBottom: 0,
|
||||
paddingRight: 0
|
||||
@ -377,20 +391,21 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
formRef={formRef}
|
||||
columns={columns}
|
||||
bordered
|
||||
scroll={{ x: '100%', y: 'calc(100vh - 450px)' }}
|
||||
headerTitle={<PageTitleBox props={props} />}
|
||||
search={{span: 6}}
|
||||
search={{ span: 6 }}
|
||||
pagination={{
|
||||
// defaultPageSize: 20,
|
||||
// total: allTotal || 20
|
||||
}}
|
||||
request={async(params)=>{
|
||||
if (!currenMenu){
|
||||
request={async (params) => {
|
||||
if (!currenMenu) {
|
||||
return
|
||||
}
|
||||
const req: any = {
|
||||
SearchType: 3,
|
||||
ProvinceCode: currentUser?.USER_PROVINCE,
|
||||
CommodityTypeId: currenMenu,
|
||||
CommodityTypeId: currenMenu === '999999' ? '' : currenMenu,
|
||||
CommodityState: params?.COMMODITY_STATE,
|
||||
ServerpartID: params?.ServerpartID,
|
||||
PageIndex: 1,
|
||||
@ -399,17 +414,17 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
}
|
||||
handleCallLogs()
|
||||
const data = await handleGetCommodityList(req)
|
||||
if (data.List && data.List.length>0){
|
||||
console.log('data',data)
|
||||
if (data.List && data.List.length > 0) {
|
||||
console.log('data', data)
|
||||
// setAllTotal(data.TotalCount)
|
||||
setReqDetailList(data.List)
|
||||
return { data: data.List,success: true}
|
||||
return { data: data.List, success: true }
|
||||
}
|
||||
return {data: [],success: true}
|
||||
return { data: [], success: true }
|
||||
}}
|
||||
toolbar={{
|
||||
actions: [
|
||||
<span style={{visibility: 'hidden'}}>
|
||||
<span style={{ visibility: 'hidden' }}>
|
||||
<ReactHTMLTableToExcel
|
||||
buttonText={'导出excel'}
|
||||
ref={downloadBtnRef}
|
||||
@ -450,7 +465,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
destroyOnClose
|
||||
title={'商品详情'}
|
||||
footer={false}
|
||||
onCancel={()=>{
|
||||
onCancel={() => {
|
||||
setCurrentRow(undefined)
|
||||
setShowModal(false)
|
||||
}}
|
||||
@ -497,12 +512,12 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
data.forEach((item: any) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any) => {
|
||||
list.push({label: subItem.label, value: subItem.value})
|
||||
list.push({ label: subItem.label, value: subItem.value })
|
||||
})
|
||||
}
|
||||
})
|
||||
data.forEach((item: any) => {
|
||||
list.push({label: item.label, value: item.value})
|
||||
list.push({ label: item.label, value: item.value })
|
||||
})
|
||||
}
|
||||
return list
|
||||
@ -526,7 +541,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
message: '请选择商品业态',
|
||||
},
|
||||
]}
|
||||
request={async ()=>{
|
||||
request={async () => {
|
||||
const BUSINESSTYPEList = await getFieldEnum({ FieldExplainField: 'BUSINESSTYPE' })
|
||||
return BUSINESSTYPEList
|
||||
}}
|
||||
@ -545,18 +560,18 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
]}
|
||||
request={async () => {
|
||||
const list: any = []
|
||||
if (treeView && treeView.length>0){
|
||||
treeView.forEach((item: any)=>{
|
||||
if (treeView && treeView.length > 0) {
|
||||
treeView.forEach((item: any) => {
|
||||
item.disabled = true
|
||||
if (item.children && item.children.length>0){
|
||||
item.children.forEach((subItem: any)=>{
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((subItem: any) => {
|
||||
subItem.disabled = true
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log('treeView',treeView)
|
||||
treeView.forEach((item: any)=>{
|
||||
if (item.value>=885 && item.value<=891){
|
||||
console.log('treeView', treeView)
|
||||
treeView.forEach((item: any) => {
|
||||
if (item.value >= 885 && item.value <= 891) {
|
||||
list.push(item)
|
||||
}
|
||||
})
|
||||
@ -622,7 +637,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
},
|
||||
]}
|
||||
initialValue={1000}
|
||||
options={[{label:'一等品',value:1000},{label:'二等品',value:2000},{label:'三等品',value:5000},{label:'优等品',value:3000},{label:'合格品',value:4000},]}
|
||||
options={[{ label: '一等品', value: 1000 }, { label: '二等品', value: 2000 }, { label: '三等品', value: 5000 }, { label: '优等品', value: 3000 }, { label: '合格品', value: 4000 },]}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
@ -686,7 +701,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
},
|
||||
]}
|
||||
initialValue={1}
|
||||
options={[{label:'是',value:1},{label:'否',value:0}]}
|
||||
options={[{ label: '是', value: 1 }, { label: '否', value: 0 }]}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
@ -701,7 +716,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
},
|
||||
]}
|
||||
initialValue={0}
|
||||
options={[{label:'是',value:1},{label:'否',value:0}]}
|
||||
options={[{ label: '是', value: 1 }, { label: '否', value: 0 }]}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
@ -716,7 +731,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
},
|
||||
]}
|
||||
initialValue={1}
|
||||
options={[{label:'计价',value:1},{label:'散装称重',value:0}]}
|
||||
options={[{ label: '计价', value: 1 }, { label: '散装称重', value: 0 }]}
|
||||
/>
|
||||
</Col>
|
||||
|
||||
@ -733,7 +748,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
},
|
||||
]}
|
||||
initialValue={1}
|
||||
options={[{label:'有效',value:1},{label:'审核中',value:2},{label:'无效',value:0}]}
|
||||
options={[{ label: '有效', value: 1 }, { label: '审核中', value: 2 }, { label: '无效', value: 0 }]}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
@ -844,7 +859,7 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
name="COMMODITY_FROZENCOUNT"
|
||||
label="采购状态"
|
||||
readonly
|
||||
options={[{label:'允许',value:1000},{label:'禁止',value:2000}]}
|
||||
options={[{ label: '允许', value: 1000 }, { label: '禁止', value: 2000 }]}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
@ -855,20 +870,20 @@ const commoditySearch: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
<Drawer
|
||||
width={1000}
|
||||
open={showDetail}
|
||||
onClose={()=>{
|
||||
onClose={() => {
|
||||
setCurrentRow(undefined)
|
||||
setShowDetail(false)
|
||||
}}
|
||||
closable={false}
|
||||
destroyOnClose
|
||||
>
|
||||
<Detail currentRow={currentRow} currentUser={currentUser} treeView={treeView}/>
|
||||
<Detail currentRow={currentRow} currentUser={currentUser} treeView={treeView} />
|
||||
</Drawer>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default connect(({user}: ConnectState) => ({
|
||||
export default connect(({ user }: ConnectState) => ({
|
||||
currentUser: user.currentUser
|
||||
}))(commoditySearch);
|
||||
|
||||
@ -34,7 +34,8 @@ const shopCommodity: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const [treeView, setTreeView] = useState<any>()
|
||||
// 加载服务区树
|
||||
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
||||
const data = await getSPRegionShopTree(currentUser?.ProvinceCode, '', '', '', '1000,2000,3000', '2000,3000,4000', true, false, true, 'SERVERPARTSHOP_INDEX,BUSINESS_STATE,SHOPSHORTNAME', false, true);
|
||||
// 734100 是建工 他要显示多一点
|
||||
const data = await getSPRegionShopTree(currentUser?.ProvinceCode, '', '', '', '1000,2000,3000', currentUser?.ProvinceCode === '734100' ? '' : '2000,3000,4000', true, true, true, 'SERVERPARTSHOP_INDEX,BUSINESS_STATE,SHOPSHORTNAME', false, true);
|
||||
setTreeView(data)
|
||||
console.log('data222', data)
|
||||
return data
|
||||
|
||||
@ -235,7 +235,7 @@ export async function getServerpartTree(ProvinceCode?: number | string, Serverpa
|
||||
const data = await request(`/BaseInfo/GetServerpartTree?
|
||||
ProvinceCode=${ProvinceCode || ''}&ServerpartCodes=${ServerpartCodes || ''}&
|
||||
ShowWholePower=${ShowWholePower || false}&ShowWholePower=${ShowSPRegion || true}&
|
||||
ShowRoyalty=${false}&ShowCompactCount=${ShowCompactCount || false}&StatisticsType=${StatisticsType || ''}`, {
|
||||
ShowRoyalty=${ShowRoyalty}&ShowCompactCount=${ShowCompactCount || false}&StatisticsType=${StatisticsType || ''}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// 由 scripts/writeVersion.js 自动生成
|
||||
export const VERSION = "4.5.35";
|
||||
export const GIT_HASH = "1ce314d";
|
||||
export const BUILD_TIME = "2025-08-21T11:03:22.048Z";
|
||||
export const VERSION = "4.5.36";
|
||||
export const GIT_HASH = "e03ffe4";
|
||||
export const BUILD_TIME = "2025-08-22T10:43:11.324Z";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user