update
This commit is contained in:
parent
42ecaa9eb3
commit
fa1840d21b
@ -1,3 +1,4 @@
|
||||
// 多维招商优化分析
|
||||
import { connect } from "umi";
|
||||
import type { CurrentUser } from "umi";
|
||||
import type { ConnectState } from "@/models/connect";
|
||||
@ -832,6 +833,7 @@ const BUSINESSANALYSIS: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
paddingRight: 0
|
||||
}}>
|
||||
<ProTable
|
||||
className="businessAnalysisProTable"
|
||||
actionRef={actionRef}
|
||||
formRef={formRef}
|
||||
columns={columns}
|
||||
@ -839,6 +841,9 @@ const BUSINESSANALYSIS: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
expandable={{
|
||||
expandRowByClick: true
|
||||
}}
|
||||
rowClassName={(record) => {
|
||||
return new Date(record?.PROJECT_ENDDATE).getTime() < new Date().getTime() ? 'garyRowBg' : ''
|
||||
}}
|
||||
headerTitle={<PageTitleBox props={props} showAI={true} AIFun={handleGetAIAnalysis} />}
|
||||
loading={tableLoading}
|
||||
search={{
|
||||
|
||||
@ -1,11 +1,35 @@
|
||||
.BusinessDetail{
|
||||
.ant-drawer-content-wrapper{
|
||||
.ant-drawer-content{
|
||||
.ant-drawer-wrapper-body{
|
||||
.ant-pro-page-container-warp{
|
||||
padding-top: 0!important;
|
||||
.BusinessDetail {
|
||||
.ant-drawer-content-wrapper {
|
||||
.ant-drawer-content {
|
||||
.ant-drawer-wrapper-body {
|
||||
.ant-pro-page-container-warp {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.businessAnalysisProTable {
|
||||
.garyRowBg {
|
||||
|
||||
.ant-table-column-sort {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.ant-table-cell {
|
||||
color: #ccc;
|
||||
|
||||
a {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
span {
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -293,7 +293,7 @@ const contractWarningQuery: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
"下半年": [moment(), moment(moment().endOf('y'))],
|
||||
}
|
||||
},
|
||||
initialValue: [moment(), moment().add(1, 'months')],
|
||||
initialValue: [moment(), moment().add(3, 'months')],
|
||||
},
|
||||
{
|
||||
title: '合同状态',
|
||||
|
||||
@ -1,29 +1,51 @@
|
||||
import { connect } from "umi";
|
||||
import type { ConnectState } from "@/models/connect";
|
||||
import ProTable, { ActionType } from "@ant-design/pro-table";
|
||||
import { useRef } from "react";
|
||||
import { Button, FormInstance, Tooltip } from "antd";
|
||||
import { useImperativeHandle, useRef, useState } from "react";
|
||||
import { Button, Col, Divider, FormInstance, Input, InputNumber, Modal, Row, Tooltip } from "antd";
|
||||
import { handleGetProjectPeriodAccount } from "../../ShopExpenseDetail/service";
|
||||
import { wrapTreeNode } from "@/utils/format";
|
||||
import { handleFormatNumber } from "@/services/options";
|
||||
import numeral from 'numeral'
|
||||
import { handleGetShopRoyaltyList } from "../../comparisonOfBusiness/service";
|
||||
import moment from 'moment'
|
||||
import ProForm, { ProFormDigit } from "@ant-design/pro-form";
|
||||
|
||||
type DetailProps = {
|
||||
parentRow?: any // 外面的一些行数据
|
||||
onRef?: any // 实例
|
||||
}
|
||||
const HistoricalProjects = ({ parentRow }: DetailProps) => {
|
||||
const HistoricalProjects = ({ parentRow, onRef }: DetailProps) => {
|
||||
const actionRef = useRef<ActionType>();
|
||||
const formRef = useRef<FormInstance>();
|
||||
const modalFormRef = useRef<FormInstance>();
|
||||
|
||||
// 表格数据
|
||||
const [tableData, setTableData] = useState<any>()
|
||||
// 显示赋值抽屉
|
||||
const [showDetail, setShowDetail] = useState<boolean>(false)
|
||||
// 当前点击的行数据
|
||||
const [currentRow, setCurrentRow] = useState<any>()
|
||||
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>期限</div>,
|
||||
dataIndex: 'PeriodDesc',
|
||||
dataIndex: 'STARTDATEENDDATE',
|
||||
align: 'left',
|
||||
width: 250,
|
||||
fixed: 'left',
|
||||
hideInSearch: true,
|
||||
render: (_, record) => {
|
||||
return <a onClick={() => {
|
||||
console.log('recordrecordrecordrecord', record);
|
||||
|
||||
setCurrentRow(record)
|
||||
setShowDetail(true)
|
||||
}}>
|
||||
{`${record?.STARTDATE ? moment(record?.STARTDATE).format('YYYY/MM/DD') : ""}${record?.ENDDATE ? '-' : ''}${record?.ENDDATE ? moment(record?.ENDDATE).format('YYYY/MM/DD') : ""}`}
|
||||
</a>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: <div style={{ textAlign: 'center' }}>结算状态</div>,
|
||||
@ -104,7 +126,7 @@ const HistoricalProjects = ({ parentRow }: DetailProps) => {
|
||||
width: 150,
|
||||
hideInSearch: true,
|
||||
render: (_, record) => {
|
||||
return <span style={{ color: '#1890ff' }}>{record?.RevenueAmount ? `${numeral(record?.RevenueAmount).format('0,0.00')}${record?.addRevenueMoney ? `(${record?.addRevenueMoney > 0 ? '+' : record?.addRevenueMoney < 0 ? '-' : ''}${record?.addRevenueMoney})` : ''}` : '0'}</span>
|
||||
return <span>{record?.RevenueAmount ? `${handleFormatNumber(record?.RevenueAmount)}` : ''}</span>
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -248,7 +270,7 @@ const HistoricalProjects = ({ parentRow }: DetailProps) => {
|
||||
hideInSearch: true,
|
||||
render: (_, record) => {
|
||||
const str: string = `水费(${numeral(record?.PaidFee_9010).format('0.00')}) + 电费(${numeral(record?.PaidFee_9020).format('0.00')}) + 房租(${numeral(record?.PaidFee_9030).format('0.00')})
|
||||
+ 物业费(${numeral(record?.PaidFee_9050).format('0.00')})+ 租金(${numeral(record?.PaidFee_9090).format('0.00')})+ 其他(${numeral(record?.PaidFee_9099).format('0.00')})`
|
||||
+ 物业费(${numeral(record?.PaidFee_9050).format('0.00')})+ 租金(${numeral(record?.PaidFee_9090).format('0.00')})+ 其他(${numeral(record?.PaidFee_9099).format('0.00')})`
|
||||
return record?.PaidFee
|
||||
?
|
||||
<Tooltip title={str}>
|
||||
@ -356,6 +378,11 @@ const HistoricalProjects = ({ parentRow }: DetailProps) => {
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
useImperativeHandle(onRef, () => ({
|
||||
tableData
|
||||
}));
|
||||
|
||||
return (
|
||||
<div style={{ boxSizing: 'border-box', paddingBottom: "30px" }}>
|
||||
<ProTable
|
||||
@ -366,36 +393,333 @@ const HistoricalProjects = ({ parentRow }: DetailProps) => {
|
||||
formRef={formRef}
|
||||
columns={columns}
|
||||
bordered
|
||||
search={false}
|
||||
options={false}
|
||||
pagination={false}
|
||||
expandable={{
|
||||
expandRowByClick: true
|
||||
}}
|
||||
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
|
||||
headerTitle={'往期项目'} // 列表表头
|
||||
search={{ span: 6 }}
|
||||
dataSource={tableData}
|
||||
request={async (params) => {
|
||||
console.log('parentRowparentRowparentRowparentRow321', parentRow);
|
||||
if (!parentRow?.BUSINESSPROJECT_ID) {
|
||||
return { data: [], success: true }
|
||||
}
|
||||
|
||||
const req: any = {
|
||||
BUSINESSPROJECT_ID: parentRow?.BUSINESSPROJECT_ID,
|
||||
SearchParameter: {
|
||||
BUSINESSPROJECT_ID: parentRow?.BUSINESSPROJECT_ID,
|
||||
},
|
||||
PageIndex: 1,
|
||||
PageSize: 99,
|
||||
SortStr: 'ENDDATE desc',
|
||||
}
|
||||
const data = await handleGetProjectPeriodAccount(req)
|
||||
console.log('datadatadatadatadatadata321', data);
|
||||
let list: any = data.ProjectPeriodList
|
||||
if (list && list.length > 0) {
|
||||
let res: any = wrapTreeNode(list)
|
||||
const data = await handleGetShopRoyaltyList(req)
|
||||
console.log('datadatadatadatadata321', data);
|
||||
|
||||
if (data && data.length > 0) {
|
||||
let SHOPROYALTY_IDList: any = []
|
||||
let res = data.filter((item: any) => item.SHOPROYALTY_ID !== 0 && item.SHOPROYALTY_ID !== parentRow?.SHOPROYALTY_ID)
|
||||
console.log('resresresresresresresresres', res);
|
||||
if (res && res.length > 0) {
|
||||
res.forEach((item: any, index: number) => {
|
||||
item.id = index + 1
|
||||
SHOPROYALTY_IDList.push(item.SHOPROYALTY_ID)
|
||||
})
|
||||
}
|
||||
console.log('SHOPROYALTY_IDListSHOPROYALTY_IDListSHOPROYALTY_IDList', SHOPROYALTY_IDList);
|
||||
|
||||
const req: any = {
|
||||
BUSINESSPROJECT_ID: parentRow?.BUSINESSPROJECT_ID,
|
||||
}
|
||||
const data2 = await handleGetProjectPeriodAccount(req)
|
||||
console.log('data2data2data2data2data2data2', data2);
|
||||
let list: any = []
|
||||
if (data2.ProjectPeriodList && data2.ProjectPeriodList.length > 0) {
|
||||
list = wrapTreeNode(data2.ProjectPeriodList)
|
||||
|
||||
let resultList: any = []
|
||||
if (list && list.length > 0) {
|
||||
list.forEach((item: any) => {
|
||||
if (SHOPROYALTY_IDList && SHOPROYALTY_IDList.length > 0 && SHOPROYALTY_IDList.indexOf(item.ShopRoyalty_Id) !== -1) {
|
||||
resultList.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
setTableData(res)
|
||||
|
||||
return { data: res, success: true }
|
||||
}
|
||||
return { data: [], success: true }
|
||||
|
||||
|
||||
// const req: any = {
|
||||
// BUSINESSPROJECT_ID: parentRow?.BUSINESSPROJECT_ID,
|
||||
// }
|
||||
// const data = await handleGetProjectPeriodAccount(req)
|
||||
// console.log('datadatadatadatadatadata321', data);
|
||||
// let list: any = data.ProjectPeriodList
|
||||
// if (list && list.length > 0) {
|
||||
// let res: any = wrapTreeNode(list)
|
||||
// res = res.filter((item: any) => item.ShopRoyalty_Id !== 0 && item.ShopRoyalty_Id !== parentRow?.SHOPROYALTY_ID)
|
||||
// console.log('resresresresresresresresres', res);
|
||||
// return { data: res, success: true }
|
||||
// }
|
||||
// return { data: [], success: true }
|
||||
}}
|
||||
toolbar={{
|
||||
actions: []
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<Modal
|
||||
title={"往期项目数据录入"}
|
||||
destroyOnClose={true}
|
||||
width={1200}
|
||||
bodyStyle={{
|
||||
height: '700px', // 你可以根据需要调整高度
|
||||
overflowY: 'auto',
|
||||
}}
|
||||
visible={showDetail}
|
||||
onCancel={() => {
|
||||
setShowDetail(false)
|
||||
setCurrentRow(null)
|
||||
}}
|
||||
onOk={() => {
|
||||
modalFormRef?.current?.validateFields().then(() => {
|
||||
modalFormRef?.current?.submit()
|
||||
})
|
||||
}}
|
||||
>
|
||||
<ProForm
|
||||
formRef={modalFormRef}
|
||||
submitter={false}
|
||||
layout={'horizontal'}
|
||||
labelCol={{ style: { width: 80 } }}
|
||||
request={async () => {
|
||||
return {
|
||||
...currentRow
|
||||
}
|
||||
}}
|
||||
onFinish={async (values) => {
|
||||
console.log('values', values);
|
||||
let list: any = JSON.parse(JSON.stringify(tableData))
|
||||
console.log('listlistlistlistlist', list);
|
||||
let newList: any = []
|
||||
list.forEach((item: any) => {
|
||||
if (item.id === currentRow?.id) {
|
||||
let obj: any = {
|
||||
...item,
|
||||
...values
|
||||
}
|
||||
newList.push(obj)
|
||||
} else {
|
||||
newList.push(item)
|
||||
}
|
||||
})
|
||||
setTableData(newList)
|
||||
setShowDetail(false)
|
||||
setCurrentRow(null)
|
||||
}}
|
||||
>
|
||||
<Row gutter={8}>
|
||||
<Divider orientation="left">营业额</Divider>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"现金"}
|
||||
name={"CashAmount"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"微支付"}
|
||||
name={"MobilePayAmount"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"小计"}
|
||||
name={"RevenueAmount"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
// rules={[{
|
||||
// required: true,
|
||||
// message: '请输入营业额小计'
|
||||
// }]}
|
||||
/>
|
||||
</Col>
|
||||
<Divider orientation="left">业主收款</Divider>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"业主收款"}
|
||||
name={"RoyaltyAmount"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={16}></Col>
|
||||
|
||||
<Divider orientation="left">应收费用</Divider>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"合计"}
|
||||
name={"ReceivableAmount"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"租金"}
|
||||
name={"GuaranteeFee"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"物业费"}
|
||||
name={"PropertyFee"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"住宿费"}
|
||||
name={"HouseRent"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"罚款"}
|
||||
name={"BreachPenalty"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"电费"}
|
||||
name={"ElectricityCharge"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"水费"}
|
||||
name={"WaterCharge"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"其他"}
|
||||
name={"OtherFee"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Divider orientation="left">已缴费用</Divider>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"合计"}
|
||||
name={"PaidFee"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"水费"}
|
||||
name={"PaidFee_9010"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"电费"}
|
||||
name={"PaidFee_9020"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"住宿费"}
|
||||
name={"PaidFee_9030"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"物业费"}
|
||||
name={"PaidFee_9050"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"租金"}
|
||||
name={"PaidFee_9090"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"其他"}
|
||||
name={"PaidFee_9099"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Divider orientation="left">退补款</Divider>
|
||||
<Col span={8}>
|
||||
<ProFormDigit
|
||||
label={"退补款"}
|
||||
name={"RefundSupplement"}
|
||||
fieldProps={{
|
||||
controls: false
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
</ProForm>
|
||||
|
||||
</Modal>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -2767,10 +2767,10 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
|
||||
|
||||
|
||||
{/* 判断当期项目 是不是最后一期 是最后一期的话 就显示 历史期的数据 */}
|
||||
<HistoricalProjects parentRow={parentRow} />
|
||||
{/* <HistoricalProjects parentRow={parentRow} /> */}
|
||||
{/* {
|
||||
parentRow?.PROJECT_ENDDATE === parentRow?.ENDDATE ?
|
||||
<HistoricalProjects /> : ""
|
||||
parentRow?.PROJECT_ENDDATE === parentRow?.ENDDATE && parentRow?.SETTLEMENT_STATE > 0 ?
|
||||
< HistoricalProjects /> : ""
|
||||
} */}
|
||||
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@ import ReviewProcess from "../../revenueConfirmation/components/ReviewProcess";
|
||||
import { getMoney } from "@/services/options";
|
||||
import { wrapTreeNode } from "@/utils/format";
|
||||
import { handleGetBUSINESSAPPROVALDetail } from "@/pages/examine/monthSettlement/service";
|
||||
import HistoricalProjects from "./HistoricalProjects";
|
||||
|
||||
type DetailProps = {
|
||||
parentRow: any
|
||||
@ -31,6 +32,7 @@ type DetailProps = {
|
||||
const AfterSettlement = ({ parentRow, dataRef, onShow, setIsFinishCalibration, onRef, currentUser, readonly }: DetailProps) => {
|
||||
const SETTLEMENTMODESOBJ: any = session.get('SETTLEMENT_MODESObj')
|
||||
const settlementRef = useRef<FormInstance>();
|
||||
const HistoricalProjectsRef = useRef<any>()
|
||||
|
||||
// 表格数据
|
||||
const [tableData, setTableData] = useState<any>()
|
||||
@ -418,7 +420,8 @@ const AfterSettlement = ({ parentRow, dataRef, onShow, setIsFinishCalibration, o
|
||||
settlementRef,
|
||||
tableData,
|
||||
fileList,
|
||||
nextState
|
||||
nextState,
|
||||
HistoricalProjectsRef
|
||||
}));
|
||||
|
||||
|
||||
@ -452,8 +455,6 @@ const AfterSettlement = ({ parentRow, dataRef, onShow, setIsFinishCalibration, o
|
||||
const res: any = dataRef.current?.YearExamineDetailTableRef?.current?.selectDetailList
|
||||
setTableData(res)
|
||||
console.log('res', res);
|
||||
|
||||
|
||||
// 拿最小的开始 最大的结束
|
||||
let startTime: string = ''
|
||||
let endTime: string = ''
|
||||
@ -558,6 +559,7 @@ const AfterSettlement = ({ parentRow, dataRef, onShow, setIsFinishCalibration, o
|
||||
dataSource={tableData}
|
||||
/>
|
||||
</>
|
||||
{/* <HistoricalProjects parentRow={parentRow} onRef={HistoricalProjectsRef} /> */}
|
||||
<>
|
||||
{
|
||||
tableLoading ? '' :
|
||||
@ -742,6 +744,8 @@ const AfterSettlement = ({ parentRow, dataRef, onShow, setIsFinishCalibration, o
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
</>
|
||||
</PageContainer>
|
||||
</div>
|
||||
|
||||
@ -119,7 +119,7 @@ const CorrectTable = ({ data, show, currentRow, money }: DetailProps) => {
|
||||
search={false}
|
||||
bordered
|
||||
headerTitle={<div style={{ fontWeight: 'bold' }}>
|
||||
日结冲正信息表
|
||||
日结冲正信息
|
||||
</div>}
|
||||
expandable={{
|
||||
defaultExpandAllRows: true
|
||||
|
||||
@ -16,7 +16,7 @@ import MonthSettlement from "../../revenueConfirmation/components/monthSettlemen
|
||||
import { ExclamationCircleOutlined, PlusOutlined } from "@ant-design/icons";
|
||||
import { handleApproveAccount, handleApproveMonthAccountProinst, handleRejectAccount, handleRejectMonthAccountProinst } from "@/pages/examine/reconciliationApproval/base/service";
|
||||
import React from "react";
|
||||
import { handleCreateSettlement } from "@/pages/reports/settlementDetail/service";
|
||||
import { handleCreateSettlement, handleSynchroRevenueConfirmList } from "@/pages/reports/settlementDetail/service";
|
||||
import Item from "antd/lib/list/Item";
|
||||
import { deletePicture, uploadPicture } from "@/services/picture";
|
||||
|
||||
@ -77,6 +77,13 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare
|
||||
|
||||
// 新建结算申请
|
||||
const handleCreateSettlementApplication = async () => {
|
||||
// let previousPeriodRes: boolean = await handlePreviousPeriod()
|
||||
// if (!previousPeriodRes) {
|
||||
// message.error('往期数据同步失败,请检查!')
|
||||
// return
|
||||
// }
|
||||
// return
|
||||
|
||||
setSubmitBtnLoading(true)
|
||||
// node
|
||||
const allList: any = []
|
||||
@ -408,6 +415,70 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare
|
||||
setSubmitBtnLoading(false)
|
||||
}
|
||||
|
||||
// 往期项目存一下
|
||||
const handlePreviousPeriod = async () => {
|
||||
let historyList: any = AfterSettlementRef.current?.HistoricalProjectsRef.current
|
||||
console.log('historyListhistoryListhistoryList', historyList);
|
||||
console.log('parentRowparentRowparentRowparentRow', parentRow);
|
||||
|
||||
const req: any = []
|
||||
if (historyList && historyList.length > 0) {
|
||||
historyList.forEach((item: any) => {
|
||||
req.push({
|
||||
node: {
|
||||
BUSINESSPROJECT_ID: item.BUSINESSPROJECT_ID,
|
||||
BUSINESSPROJECT_NAME: parentRow?.BUSINESSPROJECT_NAME,
|
||||
SHOPROYALTY_ID: item.SHOPROYALTY_ID,
|
||||
SERVERPARTSHOP_ID: item.SERVERPARTSHOP_ID,
|
||||
BUSINESS_TRADE: "", // 经营业态
|
||||
BUSINESS_BRAND: "",// 经营品牌
|
||||
BUSINESS_MONTH: "",// 经营年月
|
||||
BUSINESS_STARTDATE: "",// 开始日期
|
||||
BUSINESS_ENDDATE: "",// 结束日期
|
||||
BUSINESS_PERIOD: "",// 经营期数
|
||||
PERIOD_INDEX: "",// 第几期
|
||||
BUSINESS_DAYS: "",// 拆分天数
|
||||
GUARANTEE_AMOUNT: "",// 保底营业额
|
||||
GUARANTEERATIO: item.GUARANTEERATIO,
|
||||
ACTUAL_REVENUE: item.RevenueAmount, // 实际营业额 营业额小计
|
||||
CORRECT_AMOUNT: "",// 冲正金额
|
||||
PARTYA_SHAREPROFIT: "",// 甲方分润
|
||||
PARTYB_SHAREPROFIT: "",// 乙方分润
|
||||
PARTYC_SHAREPROFIT: "",// 丙方分润
|
||||
LIQUIDATION_AMOUNT: item.RefundSupplement,// 清算金额 退补款
|
||||
ACTUAL_ACCOUNTS: item.GuaranteeFee,// 实际应收账款 应收费用租金
|
||||
ROYALTY_PRICE: item.RoyaltyAmount,// 甲方到账 业主收款
|
||||
SUBROYALTY_PRICE: "",// 乙方到账
|
||||
MOBILEPAY_AMOUNT: item.MobilePayAmount,
|
||||
CASHPAY_AMOUNT: item.CashAmount,
|
||||
OTHERPAY_AMOUNT: "",// 其他支付
|
||||
PROPERTYFEE: item.PropertyFee,
|
||||
HOUSERENT: item.HouseRent,
|
||||
BREACHPENALTY: item.BreachPenalty,
|
||||
ELECTRICITYCHARGE: item.ElectricityCharge,
|
||||
WATERCHARGE: item.WATERCHARGE,
|
||||
OTHERFEE: item.OtherFee,
|
||||
PAID_AMOUNT: item.PaidFee,
|
||||
EARLY_SETTLEMENT: 1,
|
||||
REVENUE_VALID: 1,
|
||||
REVENUECONFIRM_DESC: `9010:${item.PaidFee_9010},9020:${item.PaidFee_9020},9030:${item.PaidFee_9030},9050:${item.PaidFee_9050},9090:${item.PaidFee_9090},9099:${item.PaidFee_9099}`,
|
||||
MERCHANTS_ID: item.MERCHANTS_ID,
|
||||
MERCHANTS_NAME: parentRow?.MERCHANTS_ID,
|
||||
BUSINESSAPPROVAL_ID: "",
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// 营业额小计 业主收款 应收费用合计 租金 水费 电费 住宿费 物业费 租金 其他 退补款
|
||||
const data = await handleSynchroRevenueConfirmList(req)
|
||||
console.log('datadatadatadata', data);
|
||||
if (data.Result_Code === 100) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// 审批的方法
|
||||
const handleGetToExamine = async (desc: string, target: any, nextPerson: any, allForm?: any) => {
|
||||
let req: any = {}
|
||||
@ -613,6 +684,13 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare
|
||||
''
|
||||
}
|
||||
</>
|
||||
|
||||
{/*
|
||||
<Button type="primary" style={{ marginLeft: '8px' }} onClick={() => {
|
||||
// || currentUser?.ID === 2785
|
||||
setShowSettlementDrawer(true)
|
||||
}}>年度结算</Button> */}
|
||||
|
||||
{
|
||||
isYearAllowSettlement ?
|
||||
<Button type="primary" style={{ marginLeft: '8px' }} onClick={() => {
|
||||
@ -675,6 +753,9 @@ const YearExamineProcess = ({ currentUser, onShow, setOnShow, parentRow, setPare
|
||||
title={'确认发起结算?'}
|
||||
onConfirm={() => {
|
||||
|
||||
|
||||
// handleCreateSettlementApplication()
|
||||
// return
|
||||
AfterSettlementRef.current?.settlementRef?.current?.validateFields().then(res => {
|
||||
if (!isFinishCalibration) {
|
||||
// 校准数据之后才能结算
|
||||
|
||||
@ -20,3 +20,20 @@ export async function handleCreateSettlement(params?: any) {
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 上传退场结算应收拆分数据
|
||||
export async function handleSynchroRevenueConfirmList(params?: any) {
|
||||
const data = await request(`/BusinessProject/SynchroRevenueConfirmList`, {
|
||||
method: 'POST',
|
||||
data: params
|
||||
});
|
||||
|
||||
if (data.Result_Code !== 100) {
|
||||
return []
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -75,7 +75,16 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
},
|
||||
// initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
},
|
||||
{
|
||||
dataIndex: "index",
|
||||
|
||||
@ -52,8 +52,8 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
title: '查询内容',
|
||||
dataIndex: 'searchText',
|
||||
hideInTable: true,
|
||||
fieldprop: {
|
||||
placeholder: "请输入用户昵称/手机号"
|
||||
fieldProps: {
|
||||
placeholder: '请输入用户昵称/手机号码/订单编号'
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -65,12 +65,21 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return {
|
||||
CHECK_STARTDATE: value[0],
|
||||
CHECK_ENDDATE: value[1],
|
||||
CONSUMPTIONRECORD_DATE_Start: value[0],
|
||||
CONSUMPTIONRECORD_DATE_End: value[1],
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
},
|
||||
// initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
},
|
||||
// {
|
||||
// title: "服务区名称",
|
||||
@ -121,20 +130,14 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "服务区名称",
|
||||
title: "消费时间",
|
||||
width: 150,
|
||||
dataIndex: "SERVERPART_NAME",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "门店名称",
|
||||
width: 150,
|
||||
dataIndex: "SHOPNAME",
|
||||
dataIndex: "CONSUMPTIONRECORD_DATE",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
render: (_, record) => {
|
||||
return record?.CONSUMPTIONRECORD_DATE ? moment(record?.CONSUMPTIONRECORD_DATE).format('YYYY-MM-DD HH:mm:ss') : '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "消费类型",
|
||||
@ -149,6 +152,22 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
},
|
||||
initialValue: "0"
|
||||
},
|
||||
{
|
||||
title: "获得积分",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_POINT",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "获得成长值",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERGROWTH_VALUE",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "订单金额",
|
||||
width: 120,
|
||||
@ -193,31 +212,22 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "获得积分",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_POINT",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "获得成长值",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERGROWTH_VALUE",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "消费时间 ",
|
||||
title: "服务区名称",
|
||||
width: 150,
|
||||
align: 'center',
|
||||
dataIndex: "CONSUMPTIONRECORD_DATE",
|
||||
dataIndex: "SERVERPART_NAME",
|
||||
hideInSearch: true,
|
||||
render: (_, record) => {
|
||||
return record?.CONSUMPTIONRECORD_DATE ? moment(record?.CONSUMPTIONRECORD_DATE).format('YYYY-MM-DD HH:mm:ss') : '-'
|
||||
}
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "门店名称",
|
||||
width: 150,
|
||||
dataIndex: "SHOPNAME",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
]
|
||||
const handleCloseModal = () => {
|
||||
@ -267,7 +277,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
SearchParameter: {
|
||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
OWNERUNIT_ID: 911,
|
||||
MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID
|
||||
MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID,
|
||||
},
|
||||
PageIndex: params?.current,
|
||||
PageSize: params?.pageSize,
|
||||
@ -282,12 +292,14 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
SERVERPART_IDS: selectedId,
|
||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
OWNERUNIT_ID: 911,
|
||||
CONSUMPTIONRECORD_DATE_Start: params?.CONSUMPTIONRECORD_DATE_Start || "",
|
||||
CONSUMPTIONRECORD_DATE_End: params?.CONSUMPTIONRECORD_DATE_End || "",
|
||||
CONSUMPTIONRECORD_TYPE: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE
|
||||
},
|
||||
PageIndex: params?.current,
|
||||
PageSize: params?.pageSize,
|
||||
keyWord: {
|
||||
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE",
|
||||
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,TICKET_CODE",
|
||||
Value: params?.searchText || ""
|
||||
},
|
||||
sortStr: "CONSUMPTIONRECORD_DATE desc"
|
||||
|
||||
@ -44,6 +44,14 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '查询内容',
|
||||
dataIndex: 'searchText',
|
||||
hideInTable: true,
|
||||
fieldProps: {
|
||||
placeholder: '请输入门店名称/用户昵称'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '查询时间',
|
||||
dataIndex: 'search_date',
|
||||
@ -58,7 +66,16 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
// initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "服务区名称",
|
||||
@ -84,33 +101,6 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "累计成长值",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_GROWTH",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
valueType: 'digit'
|
||||
},
|
||||
{
|
||||
title: "本次成长值",
|
||||
width: 120,
|
||||
dataIndex: "CURRENT_GROWTH",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
valueType: 'digit'
|
||||
},
|
||||
{
|
||||
title: "实付金额",
|
||||
width: 120,
|
||||
dataIndex: "PAY_AMOUNT",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
valueType: 'digit'
|
||||
},
|
||||
{
|
||||
title: "成长来源",
|
||||
width: 120,
|
||||
@ -148,6 +138,33 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
},
|
||||
initialValue: "-2"
|
||||
},
|
||||
{
|
||||
title: "累计成长值",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_GROWTH",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
valueType: 'digit'
|
||||
},
|
||||
{
|
||||
title: "本次成长值",
|
||||
width: 120,
|
||||
dataIndex: "CURRENT_GROWTH",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
valueType: 'digit'
|
||||
},
|
||||
{
|
||||
title: "实付金额",
|
||||
width: 120,
|
||||
dataIndex: "PAY_AMOUNT",
|
||||
hideInSearch: true,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
valueType: 'digit'
|
||||
},
|
||||
{
|
||||
title: "操作时间",
|
||||
width: 180,
|
||||
@ -216,7 +233,11 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
},
|
||||
PageIndex: params?.current,
|
||||
PageSize: 20,
|
||||
sortStr: "OPERATE_DATE desc"
|
||||
sortStr: "OPERATE_DATE desc",
|
||||
keyWord: {
|
||||
Key: "MEMBERSHIP_NAME,SHOPNAME",
|
||||
Value: params?.searchText
|
||||
}
|
||||
}
|
||||
const data = await handleGetMEMBERGROWTHList(req);
|
||||
|
||||
|
||||
@ -46,6 +46,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
let GROWTHTYPEObj = session.get('GROWTHTYPEObj')
|
||||
let MEMBERSHIP_TYPEList = session.get('MEMBERSHIP_TYPEList')
|
||||
let MEMBERSHIP_TYPEObj = session.get('MEMBERSHIP_TYPEObj')
|
||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
|
||||
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||
|
||||
@ -110,7 +111,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
width: 120,
|
||||
// hideInSearch: true,
|
||||
valueType: 'select',
|
||||
valueEnum: MEMBERSHIP_TYPEObj
|
||||
valueEnum: MEMBERSHIPTYPEYNObj
|
||||
},
|
||||
{
|
||||
dataIndex: 'MEMBERSHIP_LEVEL',
|
||||
@ -169,8 +170,8 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
"0": "无效",
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
},
|
||||
initialValue: "1"
|
||||
},
|
||||
@ -442,7 +443,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
autoFocusFirstInput
|
||||
submitter={false}
|
||||
preserve={false}
|
||||
labelCol={{ style: { width: 100 } }}
|
||||
labelCol={{ style: { width: 120 } }}
|
||||
initialValues={{
|
||||
...currentRow,
|
||||
SCORESETTING_STATE: (currentRow?.GROWTHSETTING_STATE || currentRow?.GROWTHSETTING_STATE === 0) ? currentRow?.GROWTHSETTING_STATE : 1,
|
||||
@ -543,12 +544,14 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
name="PROMOTION_LEVEL"
|
||||
label="晋升等级"
|
||||
options={promotionMemberLevel}
|
||||
tooltip="用户晋升后的目标等级,必须选择当前会员等级的下一级"
|
||||
/>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
name="GROWTH_VALUE"
|
||||
label="所需成长值"
|
||||
tooltip="用户从当前等级晋升到下一等级需要累积的成长值"
|
||||
/>
|
||||
</Col>
|
||||
{/* <Col span={12}>
|
||||
@ -561,6 +564,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
<ProFormText
|
||||
name="GROWTHTOTAL_CAP"
|
||||
label="晋升后成长值"
|
||||
tooltip="用户晋升到新等级后,系统自动设置的初始成长值"
|
||||
/>
|
||||
</Col>
|
||||
|
||||
|
||||
@ -86,7 +86,16 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isC
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
},
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
// initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
},
|
||||
{
|
||||
dataIndex: 'index',
|
||||
|
||||
@ -70,7 +70,16 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
},
|
||||
// initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
},
|
||||
{
|
||||
title: "订单状态",
|
||||
@ -167,6 +176,53 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
}}>{record?.SALEBILL_CODE}</a> : "-"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "订单时间",
|
||||
dataIndex: "ORDER_DATE",
|
||||
width: 180,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
render: (_, record) => {
|
||||
return record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "订单状态",
|
||||
dataIndex: "SALEBILL_STATE",
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"0": "全部",
|
||||
"1005": "订单待支付",
|
||||
"1010": "订单待发货",
|
||||
"2010": "订单已发货",
|
||||
"3000": "订单已完成",
|
||||
"8000": "退款申请中",
|
||||
"8900": "订单已退款",
|
||||
"9000": "订单已关闭",
|
||||
"9999": "订单已撤销"
|
||||
},
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "获得积分",
|
||||
dataIndex: "MEMBERSHIP_POINT",
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "获得成长值",
|
||||
dataIndex: "MEMBERGROWTH_VALUE",
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "购买的商品",
|
||||
dataIndex: "COMMODITY_NAME",
|
||||
@ -226,33 +282,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "获得积分",
|
||||
dataIndex: "MEMBERSHIP_POINT",
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "获得成长值",
|
||||
dataIndex: "MEMBERGROWTH_VALUE",
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "订单时间",
|
||||
dataIndex: "ORDER_DATE",
|
||||
width: 180,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
render: (_, record) => {
|
||||
return record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
|
||||
}
|
||||
},
|
||||
|
||||
// {
|
||||
// title: "订单编号",
|
||||
// dataIndex: "SALEBILL_CODE",
|
||||
@ -261,26 +291,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
// ellipsis: true,
|
||||
// align: "center",
|
||||
// },
|
||||
{
|
||||
title: "订单状态",
|
||||
dataIndex: "SALEBILL_STATE",
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"0": "全部",
|
||||
"1005": "订单待支付",
|
||||
"1010": "订单待发货",
|
||||
"2010": "订单已发货",
|
||||
"3000": "订单已完成",
|
||||
"8000": "退款申请中",
|
||||
"8900": "订单已退款",
|
||||
"9000": "订单已关闭",
|
||||
"9999": "订单已撤销"
|
||||
},
|
||||
align: "center",
|
||||
},
|
||||
|
||||
{
|
||||
title: "备注说明",
|
||||
dataIndex: "SALEBILL_DESC",
|
||||
|
||||
@ -327,7 +327,15 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined }
|
||||
<ProFormDateRangePicker
|
||||
label={"查询时间"}
|
||||
name={"searchTime"}
|
||||
initialValue={[moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]}
|
||||
initialValue={[moment().startOf('M'), moment()]}
|
||||
fieldProps={{
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ProForm>
|
||||
</Col>
|
||||
|
||||
@ -418,7 +418,15 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
||||
<ProFormDateRangePicker
|
||||
label={"查询时间"}
|
||||
name={"searchTime"}
|
||||
initialValue={[moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]}
|
||||
initialValue={[moment().startOf('M'), moment()]}
|
||||
fieldProps={{
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ProForm>
|
||||
</Col>
|
||||
|
||||
@ -419,7 +419,15 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
||||
<ProFormDateRangePicker
|
||||
label={"查询时间"}
|
||||
name={"searchTime"}
|
||||
initialValue={[moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]}
|
||||
initialValue={[moment().startOf('M'), moment()]}
|
||||
fieldProps={{
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ProForm>
|
||||
</Col>
|
||||
|
||||
@ -85,7 +85,16 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
},
|
||||
// initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
},
|
||||
{
|
||||
title: "序号",
|
||||
|
||||
@ -69,7 +69,16 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
},
|
||||
// initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
},
|
||||
{
|
||||
title: "订单状态",
|
||||
@ -134,6 +143,21 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "订单状态",
|
||||
dataIndex: "SALEBILL_STATE",
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"8000": "退款申请中",
|
||||
"8020": "退款审核中",
|
||||
"8900": "订单已退款",
|
||||
"9000": "订单已关闭",
|
||||
},
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "退款金额",
|
||||
dataIndex: "ORDER_AMOUNT",
|
||||
@ -161,21 +185,6 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "订单状态",
|
||||
dataIndex: "SALEBILL_STATE",
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"8000": "退款申请中",
|
||||
"8020": "退款审核中",
|
||||
"8900": "订单已退款",
|
||||
"9000": "订单已关闭",
|
||||
},
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "备注说明",
|
||||
dataIndex: "SALEBILL_DESC",
|
||||
|
||||
@ -44,6 +44,14 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '查询内容',
|
||||
dataIndex: 'searchText',
|
||||
hideInTable: true,
|
||||
fieldProps: {
|
||||
placeholder: '请输入门店名称/用户昵称'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '查询时间',
|
||||
dataIndex: 'search_date',
|
||||
@ -58,7 +66,15 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
},
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
},
|
||||
{
|
||||
title: "服务区名称",
|
||||
@ -76,6 +92,14 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "用户昵称",
|
||||
width: 150,
|
||||
dataIndex: "MEMBERSHIP_NAME",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "积分方式",
|
||||
width: 120,
|
||||
@ -84,11 +108,11 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
|
||||
valueType: 'select',
|
||||
align: 'center',
|
||||
valueEnum: {
|
||||
"-2": "全部",
|
||||
"0": "全部",
|
||||
"1": "累计",
|
||||
"-1": "消耗"
|
||||
},
|
||||
initialValue: "-2"
|
||||
initialValue: "0"
|
||||
},
|
||||
{
|
||||
title: "积分来源",
|
||||
@ -196,12 +220,16 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
|
||||
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_TYPE: params?.POINT_TYPE === '0' ? '' : params?.POINT_TYPE,
|
||||
POINT_SOURCE: params?.POINT_SOURCE === '0' ? '' : params?.POINT_SOURCE
|
||||
},
|
||||
PageIndex: params?.current,
|
||||
PageSize: 20,
|
||||
sortstr: "OPERATE_DATE desc",
|
||||
keyWord: {
|
||||
Key: "MEMBERSHIP_NAME,SHOPNAME",
|
||||
Value: params?.searchText
|
||||
}
|
||||
}
|
||||
const data = await handleGetPOINTRECORDList(req)
|
||||
handleSetlogSave(`点击查询按钮`)
|
||||
|
||||
@ -77,6 +77,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
dataIndex: 'SCORE_TYPE',
|
||||
title: '积分类别',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
hideInSearch: true,
|
||||
valueType: 'treeSelect',
|
||||
request: () => {
|
||||
@ -120,6 +121,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
dataIndex: 'EXCHANGE_BASE',
|
||||
title: '兑换基数',
|
||||
width: 120,
|
||||
tooltip: "每1个[兑换单位]可获得的积分数(具体单位由业务决定,如:元、次、件等)",
|
||||
align: 'center',
|
||||
hideInSearch: true,
|
||||
},
|
||||
@ -470,7 +472,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
autoFocusFirstInput
|
||||
submitter={false}
|
||||
preserve={false}
|
||||
labelCol={{ style: { width: 80 } }}
|
||||
labelCol={{ style: { width: 130 } }}
|
||||
initialValues={{
|
||||
...currentRow,
|
||||
SCORESETTING_STATE: (currentRow?.SCORESETTING_STATE || currentRow?.SCORESETTING_STATE === 0) ? currentRow?.SCORESETTING_STATE : 1,
|
||||
@ -546,21 +548,21 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
<ProFormText
|
||||
name="EXCHANGE_BASE"
|
||||
label="兑换基数"
|
||||
tooltip="获得1积分需要消费的金额"
|
||||
/>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
name="EARN_POINTS"
|
||||
label="赚取积分"
|
||||
tooltip="获得的积分值"
|
||||
/>
|
||||
</Col>
|
||||
|
||||
|
||||
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
name="CONVERTIBLE_PROPORTION"
|
||||
label="兑换基数"
|
||||
label="成长值兑换基数"
|
||||
tooltip="获取1成长值需要消费的金额"
|
||||
/>
|
||||
</Col>
|
||||
{/* <Col span={12}>
|
||||
|
||||
@ -24,7 +24,7 @@ import { getFieldEnumTree, getFieldEnumName } from "@/services/options"; // 枚
|
||||
import { getList, delcommodity, updatecommodity } from './service'; // 接口相关对象的引用
|
||||
import PageTitleBox from "@/components/PageTitleBox";
|
||||
import LeftSelectMallType from './component/LeftSelectMallType';
|
||||
import { handeDeleteCOMMODITY, handeDeleteRTCOMMODITY_MULTI, handeGetCOMMODITY_MULTIList, handeGetCOMMODITYDetail, handeGetCOMMODITYList, handeGetMERCHANTSList, handeGetRTCOMMODITY_MULTIList, handeSynchroCOMMODITY, handeSynchroRTCOMMODITYMULTIList, handleGetBRANDList, handlGetUSERDEFINEDTYPEList } from '../service';
|
||||
import { handeDeleteCOMMODITY, handeDeleteRTCOMMODITY_MULTI, handeGetCOMMODITY_MULTIList, handeGetCOMMODITYDetail, handeGetCOMMODITYList, handeGetMERCHANTSList, handeGetRTCOMMODITY_MULTIList, handeSetCommodityState, handeSynchroCOMMODITY, handeSynchroRTCOMMODITYMULTIList, handleGetBRANDList, handlGetUSERDEFINEDTYPEList } from '../service';
|
||||
import session from '@/utils/session';
|
||||
import { deletePicture, uploadPicture } from '@/services/picture';
|
||||
import { handleSetlogSave } from '@/utils/format';
|
||||
@ -95,6 +95,10 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
// 文件列表
|
||||
const [fileList, setFileList] = useState<any>([])
|
||||
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
|
||||
// 选择的商品id
|
||||
const [selectShopRowKey, setSelectShopRowKey] = useState<any>([])
|
||||
// 上下架的加载效果
|
||||
const [toListLoading, setToListLoading] = useState<boolean>(false)
|
||||
|
||||
// 预览上传后的图片
|
||||
const handlePreview = async () => {
|
||||
@ -188,7 +192,7 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
title: '消费模式',
|
||||
align: 'center',
|
||||
hideInSearch: true,
|
||||
width: 120,
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
valueType: 'select',
|
||||
valueEnum: PAYMETHODObj
|
||||
@ -216,8 +220,8 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueEnum: {
|
||||
"-1": "全部",
|
||||
...DUTYPARAGRAPHObj,
|
||||
"-1": "全部",
|
||||
},
|
||||
initialValue: "-1"
|
||||
},
|
||||
@ -606,8 +610,30 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
return result;
|
||||
}
|
||||
|
||||
// 同步商品多规格
|
||||
// 商品批量上下架
|
||||
const handleBatchShopShelves = async (type: number) => {
|
||||
if (!(selectShopRowKey && selectShopRowKey.length > 0)) {
|
||||
message.error('请先选择商品!')
|
||||
return
|
||||
}
|
||||
|
||||
// type 1 上架 2 下架
|
||||
const req: any = {
|
||||
CommodityIds: selectShopRowKey.toString(),
|
||||
UpperState: type === 1 ? '1' : type === 2 ? '0' : "",
|
||||
CommodityState: "1"
|
||||
}
|
||||
setToListLoading(true)
|
||||
const data = await handeSetCommodityState(req)
|
||||
setToListLoading(false)
|
||||
if (data.Result_Code === 100) {
|
||||
message.success(type === 1 ? '上架成功!' : '下架成功!')
|
||||
setSelectShopRowKey([])
|
||||
actionRef.current?.reload()
|
||||
} else {
|
||||
message.error(data.Result_Desc)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
@ -651,6 +677,7 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
const data = await handeGetCOMMODITYList(req);
|
||||
console.log('datadatadatadatadata', data);
|
||||
handleSetlogSave(`点击查询按钮`)
|
||||
setSelectShopRowKey([])
|
||||
if (data.List && data.List.length > 0) {
|
||||
return { data: data.List, success: true, total: data.TotalCount }
|
||||
}
|
||||
@ -673,7 +700,9 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
<Button
|
||||
key="new"
|
||||
type="primary"
|
||||
loading={toListLoading}
|
||||
onClick={() => {
|
||||
handleBatchShopShelves(1)
|
||||
}}
|
||||
>
|
||||
审核上架
|
||||
@ -681,7 +710,9 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
<Button
|
||||
key="new"
|
||||
type="primary"
|
||||
loading={toListLoading}
|
||||
onClick={() => {
|
||||
handleBatchShopShelves(2)
|
||||
}}
|
||||
>
|
||||
下架
|
||||
@ -691,10 +722,10 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
pagination={{ defaultPageSize: 10 }}
|
||||
rowSelection={{
|
||||
type: 'checkbox',
|
||||
selectedRowKeys: selectShopRowKey,
|
||||
onChange: (rowKeys, rowDetail) => {
|
||||
console.log('rowKeysrowKeysrowKeys', rowKeys);
|
||||
console.log('rowDetailrowDetailrowDetail', rowKeys);
|
||||
|
||||
setSelectShopRowKey(rowKeys)
|
||||
},
|
||||
}}
|
||||
/>
|
||||
@ -766,7 +797,7 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
<Button onClick={() => {
|
||||
handleConfirmLoading(false)
|
||||
handleModalVisible(false)
|
||||
setBRAND_NAMEList([])
|
||||
// setBRAND_NAMEList([])
|
||||
// 清空一下 商品关联表的数据
|
||||
setSpecsData([])
|
||||
// 清空一下 商品关联表的选择行
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// 注册留存分析 用户行为记录分析
|
||||
// 注册留存分析 用户行为记录分析
|
||||
|
||||
import { connect, Link } from "umi";
|
||||
import type { CurrentUser } from "umi";
|
||||
@ -61,6 +61,29 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
|
||||
};
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '查询时间',
|
||||
dataIndex: 'search_date',
|
||||
valueType: 'dateRange',
|
||||
hideInTable: true,
|
||||
hideInDescriptions: true,
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return {
|
||||
BEHAVIORRECORD_TIME_Start: value[0],
|
||||
BEHAVIORRECORD_TIME_End: value[1],
|
||||
};
|
||||
},
|
||||
},
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"当日": [moment(), moment()],
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
}
|
||||
},
|
||||
initialValue: [moment(), moment()],
|
||||
// initialValue: [moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
},
|
||||
{
|
||||
title: '日志编号',
|
||||
width: 120,
|
||||
@ -70,10 +93,13 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
|
||||
{
|
||||
title: '查询内容',
|
||||
hideInTable: true,
|
||||
dataIndex: 'searchValue'
|
||||
dataIndex: 'searchValue',
|
||||
fieldProps: {
|
||||
placeholder: '请输入操作人员/访问页面'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '系统模块',
|
||||
title: '访问页面',
|
||||
width: 150,
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
@ -174,7 +200,7 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
|
||||
valueType: 'date',
|
||||
align: 'center',
|
||||
dataIndex: 'BEHAVIORRECORD_TIME',
|
||||
initialValue: moment(),
|
||||
hideInSearch: true,
|
||||
render: (_, record) => {
|
||||
return record?.BEHAVIORRECORD_TIME
|
||||
}
|
||||
@ -256,15 +282,19 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
|
||||
const handleGetTableData = async (paramsObj?: any) => {
|
||||
const res: any = formRef.current?.getFieldsValue()
|
||||
console.log('resresres', res);
|
||||
let [start, end] = res.search_date
|
||||
let params: any = {
|
||||
BEHAVIORRECORD_TIME: res && res.BEHAVIORRECORD_TIME ? moment(res.BEHAVIORRECORD_TIME._d).format('YYYY-MM-DD') : "",
|
||||
SOURCE_PLATFORM: res && res.SOURCE_PLATFORM ? res.SOURCE_PLATFORM : "",
|
||||
BEHAVIORRECORD_TYPE: res && res.BEHAVIORRECORD_TYPE ? res.BEHAVIORRECORD_TYPE : "",
|
||||
start: start,
|
||||
end: end,
|
||||
...res
|
||||
}
|
||||
|
||||
setTableLoading(true)
|
||||
console.log('isComponentisComponent', isComponent);
|
||||
console.log('paramsparamsparamsparamsparams', params);
|
||||
|
||||
const req: any = isComponent ? {
|
||||
SearchParameter: {
|
||||
@ -276,8 +306,8 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
|
||||
PageSize: paramsObj?.pageSize || 999999
|
||||
} : {
|
||||
SearchParameter: {
|
||||
BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
||||
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
||||
BEHAVIORRECORD_TIME_Start: moment(params?.start).format('YYYY-MM-DD'),
|
||||
BEHAVIORRECORD_TIME_End: moment(params?.end).format('YYYY-MM-DD'),
|
||||
SOURCE_PLATFORMS: params?.SOURCE_PLATFORM,
|
||||
// BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE
|
||||
},
|
||||
@ -289,6 +319,8 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
|
||||
PageIndex: 1,
|
||||
PageSize: 100
|
||||
}
|
||||
console.log('reqreqreqreq', req);
|
||||
|
||||
setSearchParams(params)
|
||||
const data = await handleGetBEHAVIORRECORDList(req)
|
||||
setReqDetailList(data)
|
||||
@ -300,8 +332,8 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp
|
||||
} else {
|
||||
const allReq: any = {
|
||||
SearchParameter: {
|
||||
BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
||||
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
|
||||
BEHAVIORRECORD_TIME_Start: moment(params?.start).format('YYYY-MM-DD'),
|
||||
BEHAVIORRECORD_TIME_End: moment(params?.end).format('YYYY-MM-DD'),
|
||||
SOURCE_PLATFORMS: params?.SOURCE_PLATFORM,
|
||||
// BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE
|
||||
},
|
||||
|
||||
@ -13,9 +13,23 @@
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
// justify-content: space-between;
|
||||
|
||||
|
||||
.SummaryOfReservationTitle {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #757575;
|
||||
line-height: 18px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-left: 12px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.SummaryOfReservationTitleSelect {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
@ -27,7 +41,7 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.SummaryOfReservationTitle::after {
|
||||
.SummaryOfReservationTitleSelect::after {
|
||||
content: "";
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
|
||||
@ -32,6 +32,8 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
const [currentRow, setCurrentRow] = useState<any>();
|
||||
// 算的列表合计
|
||||
const [tableSumDetail, setTableSumDetail] = useState<any>()
|
||||
// 选择的tab
|
||||
const [selectPageTab, setSelectPageTab] = useState<any>(1)
|
||||
|
||||
|
||||
|
||||
@ -186,7 +188,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
OwnerUnitId: currentUser?.OwnerUnitId,
|
||||
StartDate: StartDate || searchParams?.StartDate || "",
|
||||
EndDate: EndDate || searchParams?.EndDate || "",
|
||||
SalebillType: "6000",
|
||||
SalebillType: selectPageTab === 1 ? "6000" : "3000,3001,3002",
|
||||
MerchantId: ""
|
||||
}
|
||||
const data = await handeGetGetOnlineOrderSummary(req)
|
||||
@ -212,11 +214,24 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
useEffect(() => {
|
||||
handleGetTopData()
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
// 每当 selectPageTab 改变时执行
|
||||
handleGetTopData()
|
||||
actionRef.current?.reload()
|
||||
}, [selectPageTab])
|
||||
|
||||
|
||||
return (
|
||||
<div className="SummaryOfReservationMain">
|
||||
<div className="SummaryOfReservationTop">
|
||||
<div className="SummaryOfReservationTitleBox">
|
||||
<div className="SummaryOfReservationTitle">预约点餐订单汇总</div>
|
||||
<div className={selectPageTab === 1 ? 'SummaryOfReservationTitle SummaryOfReservationTitleSelect' : 'SummaryOfReservationTitle'} onClick={() => {
|
||||
setSelectPageTab(1)
|
||||
}}>预约点餐订单汇总</div>
|
||||
<div style={{ marginLeft: '48px' }} className={selectPageTab === 2 ? 'SummaryOfReservationTitle SummaryOfReservationTitleSelect' : 'SummaryOfReservationTitle'} onClick={() => {
|
||||
setSelectPageTab(2)
|
||||
}}>商城订单汇总</div>
|
||||
</div>
|
||||
|
||||
<Row style={{ marginTop: "16px" }}>
|
||||
@ -242,7 +257,16 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
<ProFormDateRangePicker
|
||||
label={"查询时间"}
|
||||
name={"searchTime"}
|
||||
initialValue={[moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]}
|
||||
// initialValue={[moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]}
|
||||
initialValue={[moment().startOf('M'), moment()]}
|
||||
fieldProps={{
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ProForm>
|
||||
</Col>
|
||||
@ -511,7 +535,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
request={async (params, sorter) => {
|
||||
const req = {
|
||||
searchParameter: {
|
||||
SALEBILL_TYPES: 6000,
|
||||
SALEBILL_TYPES: selectPageTab === 1 ? 6000 : "3000,3001,3002",
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
ORDER_DATE_Start: searchParams?.StartDate || "",
|
||||
ORDER_DATE_End: searchParams?.EndDate || "",
|
||||
|
||||
@ -65,7 +65,16 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
};
|
||||
},
|
||||
},
|
||||
initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
fieldProps: {
|
||||
ranges: {
|
||||
"本月": [moment().startOf('M'), moment()],
|
||||
"上月": [moment().subtract(1, 'M').startOf('M'), moment().subtract(1, 'M').endOf('M')],
|
||||
"近三月": [moment().subtract(3, 'M').startOf('M'), moment().endOf('M')],
|
||||
"近半年": [moment().subtract(6, 'M').startOf('M'), moment().endOf('M')],
|
||||
}
|
||||
},
|
||||
// initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
|
||||
initialValue: [moment().startOf('M'), moment()],
|
||||
},
|
||||
|
||||
{
|
||||
@ -109,6 +118,25 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'ORDER_PERSON',
|
||||
title: '收货人',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
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') : "-"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "订单类型",
|
||||
width: 150,
|
||||
@ -177,25 +205,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
align: "center",
|
||||
initialValue: '0',
|
||||
},
|
||||
{
|
||||
dataIndex: 'ORDER_PERSON',
|
||||
title: '收货人',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
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) => {
|
||||
|
||||
@ -113,7 +113,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
</a>
|
||||
},
|
||||
fieldProps: {
|
||||
placeholder: "请输入要查询的内容"
|
||||
placeholder: "请输入用户昵称/联系电话"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -162,6 +162,50 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
1: '女',
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "联系电话",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_MOBILEPHONE",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "会员等级",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_LEVEL",
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
valueEnum: MEMBERSHIPLEVELYNObj,
|
||||
// initialValue: "0"
|
||||
},
|
||||
{
|
||||
title: "会员积分",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_POINT",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
sorter: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "会员成长值",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERGROWTH_VALUE",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "账户余额",
|
||||
width: 120,
|
||||
dataIndex: "ACCOUNT_BALANCE",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
sorter: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "会员生日",
|
||||
width: 150,
|
||||
@ -173,14 +217,6 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
return record?.MEMBERSHIP_BIRTHDAY ? moment(record?.MEMBERSHIP_BIRTHDAY).format('YYYY-MM-DD') : '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "联系电话",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_MOBILEPHONE",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
width: 150,
|
||||
@ -226,34 +262,6 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "会员等级",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_LEVEL",
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
valueEnum: MEMBERSHIPLEVELYNObj,
|
||||
// initialValue: "0"
|
||||
},
|
||||
{
|
||||
title: "会员积分",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERSHIP_POINT",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
sorter: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "会员成长值",
|
||||
width: 120,
|
||||
dataIndex: "MEMBERGROWTH_VALUE",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
sorter: true,
|
||||
align: 'center',
|
||||
},
|
||||
// {
|
||||
// title: "付费会员",
|
||||
// width: 120,
|
||||
@ -275,15 +283,6 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
ellipsis: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "账户余额",
|
||||
width: 120,
|
||||
dataIndex: "ACCOUNT_BALANCE",
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
sorter: true,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: "推荐人",
|
||||
width: 120,
|
||||
@ -671,11 +670,13 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
search={{ span: 6 }}
|
||||
request={async (params, sorter) => {
|
||||
console.log('paramsparamsparams', params);
|
||||
console.log('sortersortersortersorter', sorter);
|
||||
|
||||
const sortstr = Object.keys(sorter).map(n => {
|
||||
const value = sorter[n]
|
||||
return value ? `${n} ${value.replace('end', '')}` : ''
|
||||
})
|
||||
console.log('sortstrsortstrsortstrsortstr', sortstr.toString());
|
||||
const req: any = {
|
||||
SearchParameter: {
|
||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
@ -691,7 +692,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
},
|
||||
PageIndex: params.current || 1,
|
||||
PageSize: params?.pageSize,
|
||||
sortstr: sortstr.length ? sortstr.toString() : "",
|
||||
sortstr: sortstr.length ? sortstr.toString() === "MEMBERGROWTH_VALUE asc" || sortstr.toString() === "MEMBERGROWTH_VALUE desc" ? "" : sortstr.toString() : "",
|
||||
}
|
||||
setSearchParams(params)
|
||||
|
||||
|
||||
@ -957,4 +957,17 @@ export async function handeSynchroReplyList(params: any) {
|
||||
return data
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
// 商品批量上下架
|
||||
export async function handeSetCommodityState(params: any) {
|
||||
const data = await requestEncryption(`/MallBasic/SetCommodityState`, {
|
||||
method: 'POST',
|
||||
data: { ...params, requestEncryption: true }
|
||||
})
|
||||
if (data.Result_Code !== 100) {
|
||||
return data
|
||||
}
|
||||
return data
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user