update
This commit is contained in:
parent
59c2d7d5bd
commit
b3eba7b8bd
@ -992,7 +992,14 @@ export default [
|
||||
path: 'scenicSpotConfig',
|
||||
name: 'scenicSpotConfig',
|
||||
component: './travelMember/scenicSpotConfig/index'
|
||||
}
|
||||
},
|
||||
// 交易台账
|
||||
{
|
||||
path: 'TradingLedger',
|
||||
name: 'TradingLedger',
|
||||
component: './travelMember/TradingLedger/index'
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@ -195,6 +195,12 @@ const ServiceConfig: React.FC<{ currentUser: CurrentUser}> = (props) => {
|
||||
return record?.RECORD_DATE ? moment(record?.RECORD_DATE).format('YYYY-MM-DD') : ''
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '业主单位',
|
||||
width: 120,
|
||||
dataIndex: 'PROVINCE_CODE',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'option',
|
||||
title: '操作',
|
||||
|
||||
@ -2374,7 +2374,6 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
|
||||
}
|
||||
setPrintDetailTableData(exportDetailList)
|
||||
// exportDetailList.push(sumObj)
|
||||
console.log('exportDetailListexportDetailListexportDetailListexportDetailList', exportDetailList);
|
||||
|
||||
setExportDetailTableData(exportDetailList)
|
||||
}
|
||||
@ -2382,30 +2381,17 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
|
||||
}
|
||||
|
||||
// 如果是第一次进入到页面 再判断是不是退场项目 是的话 就弹出询问的内容问它要不要进行退场结算
|
||||
console.log('isFirst.currentisFirst.currentisFirst.currentisFirst.current', isFirst.current);
|
||||
|
||||
if (isFirst.current) {
|
||||
isFirst.current = false
|
||||
// 年度结算页面进来
|
||||
console.log('isYearisYearisYearisYear', isYear);
|
||||
console.log('isShowClosebtn.currentisShowClosebtn.current isShowClosebtn.current ', isShowClosebtn.current);
|
||||
console.log('parentRow?.PeriodClosed', parentRow?.PeriodClosed);
|
||||
console.log('parentRow?.CLOSED_DATE', parentRow?.CLOSED_DATE);
|
||||
console.log('parentRow?.PeriodClosed', parentRow?.PeriodClosed);
|
||||
|
||||
|
||||
|
||||
if (isYear && isShowClosebtn.current && parentRow?.PeriodClosed) {
|
||||
handleCloseSettlement(closeReqTableDataRef.current)
|
||||
} else if (isShowClosebtn.current && parentRow?.CLOSED_DATE && !isYear && parentRow?.PeriodClosed) {
|
||||
console.log('parentRow', parentRow);
|
||||
confirm({
|
||||
title: '该项目为提前撤场项目,是否进行撤场结算?',
|
||||
icon: <ExclamationCircleOutlined />,
|
||||
async onOk() {
|
||||
console.log('isFirst', isFirst.current);
|
||||
console.log('closeReqTableDataRef', closeReqTableDataRef.current);
|
||||
|
||||
handleCloseSettlement(closeReqTableDataRef.current)
|
||||
},
|
||||
onCancel() {
|
||||
|
||||
@ -244,6 +244,7 @@ const YearExamine = ({ searchParams, parentRow, examineState, searchContent, cur
|
||||
title: '操作',
|
||||
hideInTable: !endReject,
|
||||
dataIndex: 'option',
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
render: (_, record) => {
|
||||
return <a onClick={() => {
|
||||
|
||||
@ -846,6 +846,8 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare
|
||||
}
|
||||
]}
|
||||
request={async () => {
|
||||
console.log('parentRowparentRowparentRowparentRow211', parentRow);
|
||||
|
||||
// merchantState 判断哪几个状态是商户的 商户调用拿到 商户下面的全部人列表选择一个 不是商户的 就根据选择了的人去指定一个人
|
||||
// 接口直接返回就不用判断了
|
||||
if (toExamineType !== 1) {
|
||||
@ -872,15 +874,18 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare
|
||||
setCurrentNowState(data.BUSINESSAPPROVAL_STATE)
|
||||
// 拿到下一环节
|
||||
const nextReq: any = {
|
||||
OperationType: parentRow?.SETTLEMENT_TYPE === '1' ? 11 : 12,
|
||||
OperationType: parentRow?.SETTLEMENT_TYPE === '1' || parentRow?.SETTLEMENT_TYPE === 1 ? 11 : 12,
|
||||
CurState: data.BUSINESSAPPROVAL_STATE,
|
||||
IsValid: 1
|
||||
}
|
||||
console.log('nextReq', nextReq);
|
||||
|
||||
const nextData = await handleGetAPPROVALROUTEDetail(nextReq)
|
||||
setCurrentNextState(nextData)
|
||||
console.log('data', data);
|
||||
console.log('nextDatanextDatanextDatanextData2', nextData);
|
||||
console.log('datadatadatadatadatadatadatadata2', data);
|
||||
|
||||
const list: any = []
|
||||
let list: any = []
|
||||
if (data.UserList && data.UserList.length > 0) {
|
||||
data.UserList.forEach((item: any) => {
|
||||
if (item.USER_STATUS === 1) {
|
||||
@ -889,13 +894,25 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare
|
||||
})
|
||||
}
|
||||
if (list && list.length > 0 && list.length === 1) {
|
||||
if (list[0].value !== 827) {
|
||||
formDescRef.current?.setFieldsValue({ nextPerson: list[0].value })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 剔除 结算时间在2025年4月1日 之后的数据 不给孙青
|
||||
if (parentRow?.PROJECT_ENDDATE && new Date(parentRow?.PROJECT_ENDDATE).getTime() > new Date('2025-04-01 00:00:00').getTime()) {
|
||||
list = list.filter((item: any) => item.value !== 827);
|
||||
}
|
||||
|
||||
|
||||
if (currentUser?.ID === 2785) {
|
||||
list.push({ label: '严琅杰', value: 2785 })
|
||||
}
|
||||
|
||||
console.log('listlistlistlist213231', list);
|
||||
|
||||
|
||||
return list
|
||||
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
||||
const [treeView, setTreeView] = useState<any>()
|
||||
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
|
||||
|
||||
let POINTTYPEObj = session.get('POINTTYPEObj')
|
||||
let SCORETYPETree = session.get('SCORETYPETree')
|
||||
|
||||
|
||||
// 树相关的属性和方法
|
||||
@ -52,12 +52,12 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return {
|
||||
CHECK_STARTDATE: value[0],
|
||||
CHECK_ENDDATE: value[1],
|
||||
OPERATE_DATE_Start: value[0],
|
||||
OPERATE_DATE_End: value[1],
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')],
|
||||
initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
},
|
||||
{
|
||||
title: "服务区名称",
|
||||
@ -99,18 +99,16 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
||||
dataIndex: "GROWTH_SOURCE",
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
"0": "全部",
|
||||
...POINTTYPEObj
|
||||
},
|
||||
valueType: 'treeSelect',
|
||||
request: () => {
|
||||
return SCORETYPETree
|
||||
}
|
||||
// valueEnum: {
|
||||
// "0": "全部",
|
||||
// "1000": "消费赠送",
|
||||
// "2000": "消费抵扣",
|
||||
// "3000": "注册赠送",
|
||||
// },
|
||||
initialValue: "0"
|
||||
},
|
||||
{
|
||||
title: "成长方式",
|
||||
@ -170,6 +168,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
||||
const req: any = {
|
||||
searchParameter: {
|
||||
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
OPERATE_DATE_Start: params?.OPERATE_DATE_Start || "",
|
||||
OPERATE_DATE_End: params?.OPERATE_DATE_End || "",
|
||||
OWNERUNIT_ID: 911,
|
||||
SCORESETTING_STATE: 1,
|
||||
GROWTH_SOURCES: params?.GROWTH_SOURCE === "0" ? "" : params?.GROWTH_SOURCE,
|
||||
|
||||
@ -31,6 +31,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
|
||||
|
||||
let POINTTYPEObj = session.get('POINTTYPEObj')
|
||||
let SCORETYPETree = session.get('SCORETYPETree')
|
||||
|
||||
// 树相关的属性和方法
|
||||
const [selectedId, setSelectedId] = useState<string>()
|
||||
@ -51,12 +52,12 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return {
|
||||
CHECK_STARTDATE: value[0],
|
||||
CHECK_ENDDATE: value[1],
|
||||
OPERATE_DATE_Start: value[0],
|
||||
OPERATE_DATE_End: value[1],
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')],
|
||||
initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
},
|
||||
{
|
||||
title: "服务区名称",
|
||||
@ -93,19 +94,18 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
width: 120,
|
||||
dataIndex: "POINT_SOURCE",
|
||||
ellipsis: true,
|
||||
valueType: 'select',
|
||||
valueType: 'treeSelect',
|
||||
align: 'center',
|
||||
valueEnum: {
|
||||
"0": "全部",
|
||||
...POINTTYPEObj
|
||||
},
|
||||
request: () => {
|
||||
return SCORETYPETree
|
||||
}
|
||||
// valueEnum: {
|
||||
// "0": "全部",
|
||||
// "1000": "消费赠送",
|
||||
// "2000": "消费抵扣",
|
||||
// "3000": "注册赠送"
|
||||
// },
|
||||
initialValue: "0"
|
||||
// initialValue: "0"
|
||||
},
|
||||
{
|
||||
title: "本次积分",
|
||||
@ -168,12 +168,15 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const req: any = {
|
||||
SearchParameter: {
|
||||
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
OPERATE_DATE_Start: params?.OPERATE_DATE_Start || "",
|
||||
OPERATE_DATE_End: params?.OPERATE_DATE_End || "",
|
||||
OWNERUNIT_ID: 911,
|
||||
POINT_TYPE: params?.POINT_TYPE === '-2' ? '' : params?.POINT_TYPE,
|
||||
POINT_SOURCE: params?.POINT_SOURCE === '0' ? '' : params?.POINT_SOURCE
|
||||
},
|
||||
PageIndex: params?.current,
|
||||
PageSize: 20
|
||||
PageSize: 20,
|
||||
sortstr: "OPERATE_DATE desc",
|
||||
}
|
||||
const data = await handleGetPOINTRECORDList(req)
|
||||
if (data.List && data.List.length > 0) {
|
||||
|
||||
@ -138,6 +138,9 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
hideInTable: true,
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
fieldProps: {
|
||||
placeholder: "请输入商户名称/商户ID"
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex: 'MERCHANTS_TELEPHONE',
|
||||
|
||||
359
src/pages/travelMember/TradingLedger/index.tsx
Normal file
359
src/pages/travelMember/TradingLedger/index.tsx
Normal file
@ -0,0 +1,359 @@
|
||||
// 商城交易台账
|
||||
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 { Button, message, Space, Spin, Tree } from "antd";
|
||||
import useRequest from "@ahooksjs/use-request";
|
||||
import { getServerpartTree } 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 LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
import { handeGetSupplierSaleBillList } from "../service";
|
||||
import moment from 'moment'
|
||||
import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal";
|
||||
|
||||
const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const { currentUser } = props
|
||||
const downloadBtnRef = useRef<any>()
|
||||
const actionRef = useRef<ActionType>();
|
||||
const formRef = useRef<FormInstance>();
|
||||
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
|
||||
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
|
||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||
const [treeView, setTreeView] = useState<any>()
|
||||
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
|
||||
|
||||
|
||||
// 树相关的属性和方法
|
||||
const [selectedId, setSelectedId] = useState<string>()
|
||||
// 导出的加载效果
|
||||
const [showLoading, setShowLoading] = useState<boolean>(false)
|
||||
// 是否显示打印的表格
|
||||
const [showExportTable, setShowExportTable] = useState<boolean>(false)
|
||||
// 查询的条件
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
const [currentRow, setCurrentRow] = useState<any>();
|
||||
const [modalVisible, handleModalVisible] = useState<boolean>(false);
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '查询内容',
|
||||
hideInTable: true,
|
||||
dataIndex: 'searchText',
|
||||
fieldprop: {
|
||||
placeholder: "请输入供应商名称/订单号等"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '下单时间',
|
||||
dataIndex: 'search_date',
|
||||
valueType: 'dateRange',
|
||||
hideInTable: true,
|
||||
hideInDescriptions: true,
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return {
|
||||
ORDER_DATE_Start: value[0],
|
||||
ORDER_DATE_End: value[1],
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'MERCHANTS_NAME',
|
||||
title: <div style={{ textAlign: 'center' }}>供应商名称</div>,
|
||||
align: 'left',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'SALEBILL_CODE',
|
||||
title: <div style={{ textAlign: 'center' }}>订单编码</div>,
|
||||
align: 'left',
|
||||
width: 220,
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
render: (_, record) => {
|
||||
return record?.SALEBILL_CODE ?
|
||||
<a onClick={() => {
|
||||
setCurrentRow(record);
|
||||
handleModalVisible(true)
|
||||
}}>{record?.SALEBILL_CODE}</a> : "-"
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex: 'COMMODITY_NAME',
|
||||
title: <div style={{ textAlign: 'center' }}>购买商品</div>,
|
||||
align: 'left',
|
||||
width: 300,
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: "订单类型",
|
||||
width: 150,
|
||||
dataIndex: "SALEBILL_TYPE",
|
||||
valueType: "select",
|
||||
align: 'center',
|
||||
valueEnum: {
|
||||
"0": "全部",
|
||||
"3000": "零售商城",
|
||||
"3001": "工会商城",
|
||||
"3002": "品诺商城",
|
||||
"3010": "积分商城"
|
||||
},
|
||||
initialValue: '0',
|
||||
},
|
||||
{
|
||||
title: "订单状态",
|
||||
dataIndex: "SALEBILL_STATE",
|
||||
width: 150,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"0": "全部",
|
||||
"1005": "订单待支付",
|
||||
"1010": "订单待发货",
|
||||
"2010": "订单已发货",
|
||||
"3000": "订单已完成",
|
||||
"8000": "退款申请中",
|
||||
"8900": "订单已退款",
|
||||
"9000": "订单已关闭",
|
||||
"9999": "订单已撤销"
|
||||
},
|
||||
align: "center",
|
||||
initialValue: '0',
|
||||
},
|
||||
{
|
||||
dataIndex: 'ORDER_AMOUNT',
|
||||
title: '订单金额',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'PAY_AMOUNT',
|
||||
title: '实付金额',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: "支付方式",
|
||||
dataIndex: "CHANNEL_TYPE",
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"0": "全部",
|
||||
"支付宝": "支付宝",
|
||||
"微信": "微信",
|
||||
"积分兑换": "积分兑换",
|
||||
"余额支付": "余额支付",
|
||||
},
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
initialValue: '0',
|
||||
},
|
||||
{
|
||||
dataIndex: 'ORDER_DATE',
|
||||
title: '下单时间',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
render: (_, record) => {
|
||||
return record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
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-TradingLedger'); // 给table添加id,值与按钮上的table字段对应
|
||||
|
||||
container.appendChild(tempTable); // 把创建的节点添加到页面容器中
|
||||
|
||||
setShowLoading(false)
|
||||
|
||||
downloadBtnRef.current.handleDownload();
|
||||
setShowExportTable(false)
|
||||
tempTable.remove() // 防止重复打印一个内容
|
||||
}
|
||||
|
||||
const handleCloseModal = () => {
|
||||
handleModalVisible(false)
|
||||
}
|
||||
|
||||
return (
|
||||
<div ref={(el) => {
|
||||
// 打印报表
|
||||
if (!reqDetailList || reqDetailList.length === 0) return;
|
||||
setPrintOut(el);
|
||||
}} >
|
||||
|
||||
{
|
||||
showLoading ?
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
background: 'rgba(0,0,0,0.1)',
|
||||
position: 'fixed',
|
||||
zIndex: 5,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
padding: '15px 20px 10px',
|
||||
background: '#fff',
|
||||
borderRadius: '8px',
|
||||
width: '200px'
|
||||
}}>
|
||||
<Spin />
|
||||
<span style={{ marginLeft: '5px' }}>数据导出中...</span>
|
||||
</div>
|
||||
</div> : ''
|
||||
}
|
||||
|
||||
<div className={`saleReportHideBox${printIndex}`} style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }}>
|
||||
{
|
||||
showExportTable && reqDetailList && reqDetailList.length > 0 ?
|
||||
<ProTable
|
||||
columns={columns}
|
||||
dataSource={reqDetailList}
|
||||
pagination={false}
|
||||
expandable={{
|
||||
defaultExpandAllRows: true
|
||||
}}
|
||||
/> : ''
|
||||
}
|
||||
</div>
|
||||
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
|
||||
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
{/* <LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} /> */}
|
||||
<div style={{
|
||||
width: '100%',
|
||||
paddingTop: 0,
|
||||
paddingBottom: 0,
|
||||
paddingRight: 0
|
||||
}}>
|
||||
<ProTable
|
||||
actionRef={actionRef}
|
||||
formRef={formRef}
|
||||
columns={columns}
|
||||
bordered
|
||||
expandable={{
|
||||
expandRowByClick: true
|
||||
}}
|
||||
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
|
||||
headerTitle={<PageTitleBox props={props} />} // 列表表头
|
||||
search={{ span: 6 }}
|
||||
request={async (params) => {
|
||||
|
||||
const req: any = {
|
||||
SearchParameter: {
|
||||
SALEBILL_IDS: "",
|
||||
SALEBILL_TYPES: params?.SALEBILL_TYPE === '0' ? '' : params?.SALEBILL_TYPE,
|
||||
MEMBERSHIP_IDS: "",
|
||||
MERCHANTS_IDS: "",
|
||||
// PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||
SERVERPART_IDS: "",
|
||||
SERVERPARTSHOP_IDS: "",
|
||||
ORDER_DATE_Start: params?.ORDER_DATE_Start || "",
|
||||
ORDER_DATE_End: params?.ORDER_DATE_End || "",
|
||||
SALEBILL_STATES: params?.SALEBILL_STATE === "0" ? "1010,2010,3000" : params?.SALEBILL_STATE || "",
|
||||
CHANNEL_TYPE: params?.CHANNEL_TYPE === "0" ? "" : params?.CHANNEL_TYPE || "",
|
||||
WECHATAPPSIGN_ID: "",
|
||||
WECHATAPP_APPID: "",
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
SearchKeyValue: params?.searchText || "",
|
||||
},
|
||||
PageIndex: 1,
|
||||
PageSize: 999999
|
||||
}
|
||||
|
||||
setSearchParams(params)
|
||||
|
||||
console.log('reqreqreqreq', req);
|
||||
const data = await handeGetSupplierSaleBillList(req)
|
||||
console.log('datadatadatadatadata', data);
|
||||
|
||||
setReqDetailList(data)
|
||||
if (data && data.length > 0) {
|
||||
return { data, success: true }
|
||||
}
|
||||
return { data: [], success: true }
|
||||
}}
|
||||
toolbar={{
|
||||
actions: [
|
||||
<span style={{ visibility: 'hidden' }}>
|
||||
<ReactHTMLTableToExcel
|
||||
buttonText={'导出excel'}
|
||||
ref={downloadBtnRef}
|
||||
table="table-to-xls-TradingLedger"
|
||||
filename={`交易台账${searchParams?.ORDER_DATE_Start}-${searchParams?.ORDER_DATE_End}`}
|
||||
sheet="sheet1"
|
||||
/>
|
||||
</span>,
|
||||
<Button
|
||||
key="new"
|
||||
type="primary"
|
||||
onClick={(e) => {
|
||||
if (reqDetailList && reqDetailList.length > 0) {
|
||||
setShowLoading(true)
|
||||
setTimeout(() => {
|
||||
setShowExportTable(true)
|
||||
setTimeout(() => {
|
||||
exportTable(e)
|
||||
}, 100)
|
||||
}, 100)
|
||||
} else {
|
||||
message.error('暂无数据可导出!')
|
||||
}
|
||||
}}
|
||||
>
|
||||
导出excel
|
||||
</Button>
|
||||
]
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<OrderDetailModal modalVisible={modalVisible} handleCloseModal={handleCloseModal} currentRow={currentRow} />
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default connect(({ user }: ConnectState) => ({
|
||||
currentUser: user.currentUser
|
||||
}))(TradingLedger);
|
||||
@ -42,7 +42,6 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
|
||||
|
||||
let MEMBERSHIP_TYPEObj = session.get('MEMBERSHIP_TYPEObj');
|
||||
let MEMBERSHIP_LEVELObj = session.get('MEMBERSHIP_LEVELObj');
|
||||
let MEMBERSHIP_LEVELList = session.get('MEMBERSHIP_LEVELList');
|
||||
let COMPANY_STATEObj = session.get('COMPANY_STATEObj');
|
||||
let COMPANY_STATEList = session.get('COMPANY_STATEList');
|
||||
@ -70,6 +69,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
// 当前选中在详情里面要查看的内容
|
||||
const [selectTab, setSelectTab] = useState<number>(1)
|
||||
|
||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||
let SCORETYPETree = session.get('SCORETYPETree')
|
||||
|
||||
const [columnsStateMap, setColumnsStateMap] = useState<any>({
|
||||
MEMBERSHIP_CODE: { show: false },
|
||||
@ -233,11 +234,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
"0": "全部",
|
||||
...MEMBERSHIP_LEVELObj,
|
||||
"9000": "VIP会员"
|
||||
},
|
||||
valueEnum: MEMBERSHIPLEVELYNObj,
|
||||
initialValue: "0"
|
||||
},
|
||||
{
|
||||
@ -476,20 +473,18 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
valueEnum: {
|
||||
"1": "累计",
|
||||
"-1": "消耗"
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "积分来源",
|
||||
width: 120,
|
||||
dataIndex: "POINT_TYPE",
|
||||
dataIndex: "POINT_SOURCE",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
valueType: 'treeSelect',
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
"1000": "消费赠送",
|
||||
"2000": "消费抵扣",
|
||||
"3000": "注册赠送"
|
||||
request: () => {
|
||||
return SCORETYPETree
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -558,15 +553,13 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
{
|
||||
title: "成长来源",
|
||||
width: 120,
|
||||
dataIndex: "GROWTH_VALUE",
|
||||
dataIndex: "GROWTH_SOURCE",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
valueType: 'treeSelect',
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
"1000": "消费赠送",
|
||||
"2000": "消费抵扣",
|
||||
"3000": "注册赠送",
|
||||
request: () => {
|
||||
return SCORETYPETree
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -713,3 +713,15 @@ export async function handeGetFIELDEXPLAINList(params: any) {
|
||||
}
|
||||
return data.Result_Data.List
|
||||
}
|
||||
|
||||
// 交易台账列表接口
|
||||
export async function handeGetSupplierSaleBillList(params: any) {
|
||||
const data = await requestEncryption(`/OnlineOrder/GetSupplierSaleBillList`, {
|
||||
method: 'POST',
|
||||
data: { ...params, requestEncryption: true }
|
||||
})
|
||||
if (data.Result_Code !== 100) {
|
||||
return []
|
||||
}
|
||||
return data.Result_Data.List
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user