update
This commit is contained in:
parent
a07144f2c3
commit
c1f19fdafc
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ant-design-pro",
|
||||
"version": "4.5.17",
|
||||
"version": "4.5.18",
|
||||
"private": true,
|
||||
"description": "An out-of-box UI solution for enterprise applications",
|
||||
"scripts": {
|
||||
|
||||
@ -31,7 +31,7 @@ import session from '@/utils/session';
|
||||
import upMenu from '@/assets/tab/upMenu.svg'
|
||||
import { getFieldEnum, getFieldEnumTravel, getFieldEnumTree, getFieldGetFieEnumList, getTravelFieldEnumTree, handleGetFieldEnumTreeTravel, handleGetNestingFIELDENUMList } from "@/services/options";
|
||||
import { handleGetServerpartTree } from '@/pages/basicManage/serverpartAssets/service';
|
||||
import { handeGetNestingFIELDENUMList } from '@/pages/travelMember/service';
|
||||
import { handeGetFieldEnumByFieldYN, handeGetNestingFIELDENUMList } from '@/pages/travelMember/service';
|
||||
import list from '@/pages/Invoicing/list';
|
||||
|
||||
|
||||
@ -680,6 +680,17 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
|
||||
}
|
||||
})
|
||||
|
||||
// 云南 商家信息管理 里面的 经营业态 的枚举
|
||||
handeGetFieldEnumByFieldYN({ FieldExplainField: 'BUSINESS_TRADE' }).then(BUSINESSTRADE => {
|
||||
session.set('BUSINESSTRADESHOPYN', BUSINESSTRADE);
|
||||
const BUSINESSTRADESHOPYNObj: any = {}
|
||||
if (BUSINESSTRADE && BUSINESSTRADE.length > 0) {
|
||||
BUSINESSTRADE.forEach((item: any) => {
|
||||
BUSINESSTRADESHOPYNObj[item.value] = item.label
|
||||
})
|
||||
}
|
||||
session.set('BUSINESSTRADESHOPYNObj', BUSINESSTRADESHOPYNObj);
|
||||
})
|
||||
|
||||
|
||||
// 商品业态
|
||||
|
||||
@ -181,7 +181,7 @@ const SelectServiceShop = ({ currentUser, showDetail, onCancel, onOk, currentRow
|
||||
PageIndex: params?.current,
|
||||
PageSize: params?.pageSize,
|
||||
keyWord: {
|
||||
Key: "SHOPNAME",
|
||||
Key: "SHOPNAME,SERVERPART_NAME",
|
||||
Value: params?.searchText
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import { handeGetCouponStockList } from "@/pages/travelMember/service";
|
||||
import moment from 'moment'
|
||||
import CardVoucherSearch from "../CardVoucherSearch";
|
||||
import { highlightText } from "@/utils/highlightText";
|
||||
import CardInfo from "../CardInformationManager/components/CardInfo";
|
||||
|
||||
|
||||
const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
@ -37,6 +38,8 @@ const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const [currentRow, setCurrentRow] = useState<any>()
|
||||
// 显示详情
|
||||
const [showDetial, setShowDetail] = useState<any>()
|
||||
// 显示详情
|
||||
const [showCouponDetial, setShowCouponDetail] = useState<any>()
|
||||
// 当前查询的文字
|
||||
const [currentSearchText, setCurrentSearchText] = useState<string>('')
|
||||
|
||||
@ -89,7 +92,13 @@ const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
render: (_, record) => {
|
||||
return highlightText(record?.COUPON_NAME, currentSearchText)
|
||||
return record?.COUPON_NAME ?
|
||||
<a onClick={() => {
|
||||
setCurrentRow(record)
|
||||
setShowCouponDetail(true)
|
||||
}}>
|
||||
{highlightText(record?.COUPON_NAME, currentSearchText)}
|
||||
</a> : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -244,6 +253,10 @@ const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
>
|
||||
<CardVoucherSearch isComponent={true} parentRow={currentRow} />
|
||||
</Drawer>
|
||||
|
||||
{/* 卡券的编辑 还是 新增 组件 */}
|
||||
|
||||
<CardInfo showDetail={showCouponDetial} currentRow={currentRow} currentUser={currentUser} parentRef={actionRef} setShowDetail={setShowCouponDetail} setCurrentRow={setCurrentRow} readonly={true} />
|
||||
</div >
|
||||
)
|
||||
}
|
||||
|
||||
@ -0,0 +1,681 @@
|
||||
import { connect } from "umi";
|
||||
import type { ConnectState } from "@/models/connect";
|
||||
import { Col, Divider, FormInstance, message, Modal, Row } from "antd";
|
||||
import { useRef, useState } from "react";
|
||||
import ProForm, { ProFormDatePicker, ProFormSelect, ProFormText, ProFormTextArea, ProFormUploadButton } from "@ant-design/pro-form";
|
||||
import { handeGetCOUPONDetail, handeGetWECHATAPPSIGNList } from "@/pages/travelMember/service";
|
||||
import session from "@/utils/session";
|
||||
import { handleDeleteCOUPON, handleGetCOOPSHOP_RULEList, handleSynchroCOUPONService } from "../../service";
|
||||
import { uploadPicture } from "@/services/picture";
|
||||
import { ExclamationCircleOutlined } from "@ant-design/icons";
|
||||
import ModalFooter from "@/pages/travelMember/scenicSpotConfig/component/modalFooter";
|
||||
import { handleSetlogSave } from "@/utils/format";
|
||||
import moment from 'moment'
|
||||
|
||||
|
||||
const beforeUpload = (file: any) => {
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||
if (!isJpgOrPng) {
|
||||
message.error('请上传JPEG、jpg、png格式的图片文件!');
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
message.error('图片大小不超过 2MB!');
|
||||
}
|
||||
return isJpgOrPng && isLt2M;
|
||||
}
|
||||
|
||||
type DetailProps = {
|
||||
showDetail: boolean
|
||||
currentRow: any
|
||||
currentUser: any
|
||||
parentRef?: any
|
||||
setShowDetail: any
|
||||
setCurrentRow: any
|
||||
readonly?: boolean // 判断是不是只读
|
||||
}
|
||||
const CardInfo = ({ showDetail, currentRow, currentUser, parentRef, setShowDetail, setCurrentRow, readonly }: DetailProps) => {
|
||||
const { confirm } = Modal;
|
||||
// 表单数据
|
||||
const ModalFormRef = useRef<FormInstance>();
|
||||
// 卡券详情
|
||||
const [couponDetail, setCouponDetail] = useState<any>()
|
||||
// 小程序列表数据
|
||||
const [wxMinList, setWxMinList] = useState<any>([])
|
||||
// 文件列表
|
||||
const [fileList, setFileList] = useState<any>([])
|
||||
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
|
||||
// 悬浮框 按钮加载的属性
|
||||
const [modalLoading, setModalLoading] = useState<boolean>(false)
|
||||
|
||||
|
||||
// 预览上传后的图片
|
||||
const handlePreview = async () => {
|
||||
setFileList(fileList)
|
||||
setImagePreviewVisible(true)
|
||||
};
|
||||
|
||||
|
||||
// 删除的方法
|
||||
const handleDeleteShopRule = async (id: any) => {
|
||||
const req: any = {
|
||||
COUPONId: id
|
||||
}
|
||||
const data = await handleDeleteCOUPON(req)
|
||||
console.log('datadatadatadata', data);
|
||||
if (data.Result_Code === 100) {
|
||||
handleSetlogSave(`删除【${couponDetail?.COUPON_NAME || "-"}(${id})】卡券`)
|
||||
message.success(data.Result_Desc)
|
||||
if (parentRef) {
|
||||
parentRef.current?.reload()
|
||||
}
|
||||
ModalFormRef?.current?.resetFields()
|
||||
setCurrentRow(null)
|
||||
setShowDetail(false)
|
||||
setFileList([])
|
||||
} else {
|
||||
message.error(data.Result_Desc)
|
||||
}
|
||||
}
|
||||
|
||||
// 同步的方法
|
||||
const handleSynchroCOUPON = async (res: any) => {
|
||||
let req: any = {}
|
||||
let minDetail: any = {}
|
||||
if (wxMinList && wxMinList.length > 0 && res.WECHATAPPSIGN_ID) {
|
||||
|
||||
let filterObj: any = wxMinList.filter((n: any) => n.WECHATAPPSIGN_ID === res.WECHATAPPSIGN_ID)
|
||||
|
||||
if (filterObj && filterObj.length > 0) {
|
||||
let obj = filterObj[0]
|
||||
minDetail = {
|
||||
WECHATAPPSIGN_ID: obj.WECHATAPPSIGN_ID,
|
||||
WECHATAPPSIGN_NAME: obj.WECHATAPPSIGN_NAME,
|
||||
WECHATAPP_APPID: obj.WECHATAPP_APPID
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (currentRow?.COUPON_ID) {
|
||||
req = {
|
||||
...couponDetail,
|
||||
...res,
|
||||
END_TIME: moment(res.END_TIME).format("YYYY-MM-DD"),
|
||||
START_TIME: moment(res.START_TIME).format("YYYY-MM-DD"),
|
||||
VALID_END_TIME: moment(res.VALID_END_TIME).format("YYYY-MM-DD"),
|
||||
VALID_START_TIME: moment(res.VALID_START_TIME).format("YYYY-MM-DD"),
|
||||
UPDATE_STAFF_ID: currentUser?.ID,
|
||||
UPDATE_STAFF_NAME: currentUser?.Name,
|
||||
UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
COUPON_IMAGEURL: fileList && fileList.length > 0 ? fileList[0].url : "",
|
||||
...minDetail
|
||||
}
|
||||
} else {
|
||||
req = {
|
||||
...res,
|
||||
END_TIME: moment(res.END_TIME).format("YYYY-MM-DD"),
|
||||
START_TIME: moment(res.START_TIME).format("YYYY-MM-DD"),
|
||||
VALID_END_TIME: moment(res.VALID_END_TIME).format("YYYY-MM-DD"),
|
||||
VALID_START_TIME: moment(res.VALID_START_TIME).format("YYYY-MM-DD"),
|
||||
COUPON_IMAGEURL: fileList && fileList.length > 0 ? fileList[0].url : "",
|
||||
CREATE_STAFF_ID: currentUser?.ID,
|
||||
CREATE_STAFF_NAME: currentUser?.Name,
|
||||
CREATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
...minDetail
|
||||
}
|
||||
}
|
||||
|
||||
console.log('reqreqreqreq', req);
|
||||
|
||||
const data = await handleSynchroCOUPONService(req)
|
||||
console.log('datadatadatadata', data);
|
||||
if (data.Result_Code === 100) {
|
||||
handleSetlogSave(`${currentRow?.COUPON_ID ? '更新' : '新增'}【${data.Result_Data.COUPON_NAME}】卡券`)
|
||||
message.success(data.Result_Desc)
|
||||
ModalFormRef?.current?.resetFields()
|
||||
setCurrentRow(undefined)
|
||||
setShowDetail(false)
|
||||
if (parentRef) {
|
||||
parentRef.current?.reload()
|
||||
}
|
||||
} else {
|
||||
message.error(data.Result_Desc)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Modal
|
||||
open={showDetail}
|
||||
className={"CardInformationManager"}
|
||||
onCancel={() => {
|
||||
ModalFormRef?.current?.resetFields()
|
||||
setCurrentRow(null)
|
||||
setShowDetail(false)
|
||||
setFileList([])
|
||||
}}
|
||||
confirmLoading={modalLoading}
|
||||
width={1400}
|
||||
bodyStyle={{
|
||||
height: '700px', // 你可以根据需要调整高度
|
||||
overflowY: 'auto',
|
||||
}}
|
||||
destroyOnClose
|
||||
title={currentRow?.COUPON_ID ? currentRow?.COUPON_NAME : "新增卡券"}
|
||||
onOk={() => {
|
||||
ModalFormRef?.current?.validateFields().then(async (res) => {
|
||||
await handleSynchroCOUPON(res)
|
||||
})
|
||||
}}
|
||||
footer={readonly ? false : <ModalFooter
|
||||
confirmLoading={modalLoading}
|
||||
hideDelete={!currentRow?.COUPON_ID}
|
||||
handleDelete={async () => {
|
||||
await handleDeleteShopRule(currentRow?.COUPON_ID)
|
||||
}}
|
||||
handleCancel={() => {
|
||||
ModalFormRef?.current?.resetFields()
|
||||
setCurrentRow(null)
|
||||
setShowDetail(false)
|
||||
setFileList([])
|
||||
}}
|
||||
handleOK={() => {
|
||||
ModalFormRef?.current?.validateFields().then(async (res) => {
|
||||
setModalLoading(true)
|
||||
await handleSynchroCOUPON(res)
|
||||
setModalLoading(false)
|
||||
})
|
||||
}}
|
||||
|
||||
/>}
|
||||
>
|
||||
<div className="CardInformationManagerModalContent" >
|
||||
<ProForm formRef={ModalFormRef} layout={'horizontal'} submitter={false} labelCol={{ style: { width: 80 } }}
|
||||
request={async () => {
|
||||
if (currentRow?.COUPON_ID) {
|
||||
const req: any = {
|
||||
COUPONId: currentRow?.COUPON_ID
|
||||
}
|
||||
const data = await handeGetCOUPONDetail(req)
|
||||
setCouponDetail(data)
|
||||
return data
|
||||
} else {
|
||||
return {}
|
||||
}
|
||||
}}
|
||||
|
||||
>
|
||||
<Divider orientation="left">基本信息</Divider>
|
||||
|
||||
<Row gutter={8}>
|
||||
<Col span={16}>
|
||||
<ProFormSelect
|
||||
label={"发券业主"}
|
||||
name={"OWNERUNIT_ID"}
|
||||
options={[
|
||||
{ label: currentUser?.OwnerUnitName, value: currentUser?.OwnerUnitId }
|
||||
]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择发券业主'
|
||||
}
|
||||
]}
|
||||
disabled={currentRow?.COUPON_ID}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"卡券类型"}
|
||||
name={"COUPON_TYPE"}
|
||||
request={() => {
|
||||
const COUPONTYPEList = session.get('COUPONTYPEList')
|
||||
return COUPONTYPEList
|
||||
}}
|
||||
// options={COUPONTYPEList}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择卡券类型'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormText
|
||||
label={"卡券名称"}
|
||||
name={"COUPON_NAME"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入卡券名称'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormText
|
||||
label={"卡券成本"}
|
||||
name={"COST_AMOUNT"}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"发售即用"}
|
||||
name={"CATEGORY_RULE_ID"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择发售类型'
|
||||
}
|
||||
]}
|
||||
options={[
|
||||
{ label: '是', value: 1 },
|
||||
{ label: '否', value: 0 },
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
label={"购买满:"}
|
||||
name={"WITH_AMOUNT"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入满足条件'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
label={"减:"}
|
||||
name={"USED_AMOUNT"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入减免金额'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDatePicker
|
||||
width="lg"
|
||||
label={"活动时间"}
|
||||
name={"START_TIME"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择活动时间'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormDatePicker
|
||||
width="lg"
|
||||
label={"截止时间"}
|
||||
name={"END_TIME"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择截止时间'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormText
|
||||
label={"发放数量"}
|
||||
name={"COUPON_QUOTA"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入发放数量'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"消费模式"}
|
||||
name={"PAY_METHOD"}
|
||||
options={[
|
||||
{ label: "直接领取", value: 1000 },
|
||||
{ label: "积分兑换", value: 2000 },
|
||||
]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择消费模式'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormText
|
||||
label={"积分兑换"}
|
||||
name={"COUPON_POINT"}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<ProFormTextArea
|
||||
label={"使用说明"}
|
||||
name={"COUPON_INSTRUCTIONS"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入使用说明'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Divider orientation="left">基本规则</Divider>
|
||||
<Row gutter={8}>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"适用门店"}
|
||||
name={"COOPSHOP_RULE_ID"}
|
||||
request={async () => {
|
||||
const req: any = {
|
||||
SearchParameter: {
|
||||
OWNERUNIT_ID: 911,
|
||||
ISVALID: 1
|
||||
},
|
||||
PageIndex: 1,
|
||||
PageSize: 999999
|
||||
}
|
||||
|
||||
const data = await handleGetCOOPSHOP_RULEList(req)
|
||||
let list: any = []
|
||||
console.log('data', data);
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
list.push({ label: item.COOPSHOP_RULE_NAME, value: item.COOPSHOP_RULE_ID })
|
||||
})
|
||||
}
|
||||
// setCOOPSHOPRULEIDOPTIONS(list)
|
||||
return list
|
||||
}}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择适用门店'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"使用期限"}
|
||||
name={"VALID_TYPE"}
|
||||
options={[
|
||||
{ label: "固定时间段", value: 1000 },
|
||||
{ label: "固定天数", value: 2000 },
|
||||
]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择使用期限'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<ProFormDatePicker
|
||||
label={"有效日期"}
|
||||
name={"VALID_START_TIME"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择有效开始日期'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<ProFormDatePicker
|
||||
label={""}
|
||||
name={"VALID_END_TIME"}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择有效结束日期'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"允许叠加"}
|
||||
name={"OVERLAY"}
|
||||
options={[
|
||||
{ label: "否", value: 0 },
|
||||
{ label: "是", value: 1 },
|
||||
]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择叠加规则'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"限领数量"}
|
||||
name={"LIMIT_COUNT"}
|
||||
options={[
|
||||
{ label: "不限量", value: -1 },
|
||||
{ label: "1", value: 1 },
|
||||
{ label: "2", value: 2 },
|
||||
{ label: "3", value: 3 },
|
||||
{ label: "4", value: 4 },
|
||||
{ label: "5", value: 5 },
|
||||
{ label: "6", value: 6 },
|
||||
{ label: "7", value: 7 },
|
||||
{ label: "8", value: 8 },
|
||||
{ label: "9", value: 9 },
|
||||
{ label: "10", value: 10 },
|
||||
]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择限领数量'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"每日限领"}
|
||||
name={"LIMIT_COUNT_PERDAY"}
|
||||
options={[
|
||||
{ label: "不限量", value: -1 },
|
||||
{ label: "1", value: 1 },
|
||||
{ label: "2", value: 2 },
|
||||
{ label: "3", value: 3 },
|
||||
{ label: "4", value: 4 },
|
||||
{ label: "5", value: 5 },
|
||||
{ label: "6", value: 6 },
|
||||
{ label: "7", value: 7 },
|
||||
{ label: "8", value: 8 },
|
||||
{ label: "9", value: 9 },
|
||||
{ label: "10", value: 10 },
|
||||
]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择每日限领'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Divider orientation="left">上架信息</Divider>
|
||||
<Row gutter={8}>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"小程序"}
|
||||
name={"WECHATAPPSIGN_ID"}
|
||||
request={async () => {
|
||||
const req: any = {
|
||||
SearchParameter: {
|
||||
OWNERUNIT_ID: 911,
|
||||
}
|
||||
}
|
||||
const data = await handeGetWECHATAPPSIGNList(req)
|
||||
console.log('datadatadatadata', data);
|
||||
setWxMinList(data || [])
|
||||
let list: any = []
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((item: any) => {
|
||||
list.push({ label: item.WECHATAPPSIGN_NAME, value: item.WECHATAPPSIGN_ID })
|
||||
})
|
||||
}
|
||||
return list
|
||||
}}
|
||||
// options={[
|
||||
// { label: "彩云驿", value: 37 },
|
||||
// { label: "彩云驿出行", value: 38 },
|
||||
// ]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择小程序'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
label={"是否有效"}
|
||||
name={"COUPON_ISVALID"}
|
||||
options={[
|
||||
{ label: "否", value: 0 },
|
||||
{ label: "是", value: 1 },
|
||||
]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择是否有效'
|
||||
}
|
||||
]}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Divider orientation="left">详情介绍</Divider>
|
||||
<Row>
|
||||
<Col span={24}>
|
||||
<ProFormTextArea
|
||||
label={"详情介绍"}
|
||||
name={"COUPON_DESC"}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<ProFormTextArea
|
||||
label={"适用门店"}
|
||||
name={"COOPSHOP_DESC"}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Divider orientation="left">卡券图标</Divider>
|
||||
<Row>
|
||||
<Col span={24}>
|
||||
<ProFormUploadButton
|
||||
label={"卡券图标"}
|
||||
name={"COUPON_IMAGEURL"}
|
||||
fileList={fileList}
|
||||
listType="picture-card"
|
||||
accept="image/*"
|
||||
fieldProps={{
|
||||
beforeUpload,
|
||||
maxCount: 1,
|
||||
onPreview: handlePreview,
|
||||
customRequest: async (info) => {
|
||||
const formData = new FormData();
|
||||
formData.append('files', info.file);
|
||||
formData.append('TableType', '1208');
|
||||
formData.append('ImageName', typeof info.file !== 'string' ? info.file?.name : '');
|
||||
if (info.filename) {
|
||||
const success = await uploadPicture(formData)
|
||||
if (success) {
|
||||
const list = [{
|
||||
// uid: `${success.ImageId}`, // 注意,这个uid一定不能少,否则上传失败
|
||||
name: success.Result_Data.ImageName,
|
||||
// status: 'done',
|
||||
url: success.Result_Data.ImageUrl, // url 是展示在页面上的绝对链接
|
||||
// imgUrl: success.ImagePath // + success.ImageUrl,
|
||||
}]
|
||||
setFileList(list)
|
||||
}
|
||||
} else {
|
||||
message.error("您上传的图片不存在.")
|
||||
}
|
||||
},
|
||||
onChange: async (info: any) => {
|
||||
if (info.file.status === 'removed') {
|
||||
confirm({
|
||||
title: '确认删除该图片吗?',
|
||||
icon: <ExclamationCircleOutlined rev={undefined} />,
|
||||
async onOk() {
|
||||
setFileList([])
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}}
|
||||
disabled={readonly}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</ProForm>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default connect(({ user, }: ConnectState) => ({
|
||||
currentUser: user.currentUser,
|
||||
}))(CardInfo);
|
||||
@ -24,6 +24,7 @@ import { uploadPicture } from "@/services/picture";
|
||||
import ModalFooter from "@/pages/travelMember/scenicSpotConfig/component/modalFooter";
|
||||
import { handeGetWECHATAPPSIGNList } from "@/pages/travelMember/service";
|
||||
import { highlightText } from "@/utils/highlightText";
|
||||
import CardInfo from "./components/CardInfo";
|
||||
|
||||
const beforeUpload = (file: any) => {
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||
@ -207,7 +208,6 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
// }
|
||||
]
|
||||
|
||||
|
||||
// 删除的方法
|
||||
const handleDeleteShopRule = async (id: any) => {
|
||||
const req: any = {
|
||||
@ -368,7 +368,12 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
</Image.PreviewGroup>
|
||||
</div>}
|
||||
|
||||
<Modal
|
||||
|
||||
{/* 卡券的编辑 还是 新增 组件 */}
|
||||
<CardInfo showDetail={showDetail} currentRow={currentRow} currentUser={currentUser} parentRef={actionRef} setShowDetail={setShowDetail} setCurrentRow={setCurrentRow} />
|
||||
|
||||
|
||||
{/* <Modal
|
||||
open={showDetail}
|
||||
className={"CardInformationManager"}
|
||||
onCancel={() => {
|
||||
@ -409,7 +414,7 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
|
||||
/>}
|
||||
>
|
||||
<div className="CardInformationManagerModalContent" style={{}}>
|
||||
<div className="CardInformationManagerModalContent" >
|
||||
<ProForm formRef={ModalFormRef} layout={'horizontal'} submitter={false} labelCol={{ style: { width: 80 } }} initialValues={{
|
||||
...currentRow,
|
||||
OWNERUNIT_ID: currentRow?.OWNERUNIT_ID || currentUser?.OwnerUnitId,
|
||||
@ -881,7 +886,7 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
</Row>
|
||||
</ProForm>
|
||||
</div>
|
||||
</Modal>
|
||||
</Modal> */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import PageTitleBox from "@/components/PageTitleBox";
|
||||
import { handeGetCouponStockList } from "@/pages/travelMember/service";
|
||||
import moment from 'moment'
|
||||
import { highlightText } from "@/utils/highlightText";
|
||||
import CardInfo from "../CardInformationManager/components/CardInfo";
|
||||
|
||||
|
||||
const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
@ -33,7 +34,10 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
// 当前查询的文字
|
||||
const [currentSearchText, setCurrentSearchText] = useState<string>('')
|
||||
|
||||
// 显示详情的抽屉
|
||||
const [showDetail, setShowDetail] = useState<boolean>(false)
|
||||
// 当前行数据
|
||||
const [currentRow, setCurrentRow] = useState<any>()
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
@ -84,7 +88,12 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
render: (_, record) => {
|
||||
return highlightText(record?.COUPON_NAME, currentSearchText)
|
||||
return record?.COUPON_NAME ? <a onClick={() => {
|
||||
setCurrentRow(record)
|
||||
setShowDetail(true)
|
||||
}}>
|
||||
{highlightText(record?.COUPON_NAME, currentSearchText)}
|
||||
</a> : "-"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -163,10 +172,6 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
setPrintOut(el);
|
||||
}} >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
<div style={{
|
||||
width: '100%',
|
||||
@ -221,6 +226,11 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) =>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{/* 卡券的编辑 还是 新增 组件 */}
|
||||
<CardInfo showDetail={showDetail} currentRow={currentRow} currentUser={currentUser} parentRef={actionRef} setShowDetail={setShowDetail} setCurrentRow={setCurrentRow} readonly={true} />
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import { FormInstance } from "antd";
|
||||
import { handeGetCouponExchangeSummary } from "@/pages/travelMember/service";
|
||||
import moment from 'moment'
|
||||
import { highlightText } from "@/utils/highlightText";
|
||||
import CardInfo from "../CardInformationManager/components/CardInfo";
|
||||
|
||||
const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
||||
const { currentUser } = props
|
||||
@ -19,6 +20,10 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||
// 当前查询的文字
|
||||
const [currentSearchText, setCurrentSearchText] = useState<string>('')
|
||||
// 显示详情的抽屉
|
||||
const [showDetail, setShowDetail] = useState<boolean>(false)
|
||||
// 当前行数据
|
||||
const [currentRow, setCurrentRow] = useState<any>()
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
@ -69,7 +74,13 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
render: (_, record) => {
|
||||
return highlightText(record?.CouponName, currentSearchText)
|
||||
return record?.CouponName ?
|
||||
record?.ServerpartShop_Id ? <a onClick={() => {
|
||||
setCurrentRow({ ...record, COUPON_ID: record?.CouponId })
|
||||
setShowDetail(true)
|
||||
}}>
|
||||
{highlightText(record?.CouponName, currentSearchText)}
|
||||
</a> : highlightText(record?.CouponName, currentSearchText) : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -179,6 +190,9 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 卡券的编辑 还是 新增 组件 */}
|
||||
<CardInfo showDetail={showDetail} currentRow={currentRow} currentUser={currentUser} parentRef={actionRef} setShowDetail={setShowDetail} setCurrentRow={setCurrentRow} readonly={true} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -18,6 +18,8 @@ import SelectCardVouch from "./components/selectCardVouch";
|
||||
import { handeGetCOUPON_SENDList } from "@/pages/travelMember/service";
|
||||
import moment from 'moment'
|
||||
import { highlightText } from "@/utils/highlightText";
|
||||
import MemberDetail from "@/pages/travelMember/memberInfor/component/memberDetail";
|
||||
import CardInfo from "../CardInformationManager/components/CardInfo";
|
||||
|
||||
|
||||
const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, parentRow?: any }> = (props) => {
|
||||
@ -42,6 +44,13 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
// 当前查询的文字
|
||||
const [currentSearchText, setCurrentSearchText] = useState<string>('')
|
||||
// 显示详情抽屉
|
||||
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
|
||||
// 当前行数据
|
||||
const [currentRow, setCurrentRow] = useState<any>()
|
||||
// 显示卡券详情的抽屉
|
||||
const [showDetail, setShowDetail] = useState<boolean>(false)
|
||||
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
@ -108,7 +117,12 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
render: (_, record) => {
|
||||
return highlightText(record?.COUPON_NAME, currentSearchText)
|
||||
return record?.COUPON_NAME ? <a onClick={() => {
|
||||
setCurrentRow(record)
|
||||
setShowDetail(true)
|
||||
}}>
|
||||
{highlightText(record?.COUPON_NAME, currentSearchText)}
|
||||
</a> : "-"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -127,7 +141,12 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
render: (_, record) => {
|
||||
return highlightText(record?.MEMBERSHIP_NAME, currentSearchText)
|
||||
return record?.MEMBERSHIP_NAME ? <a onClick={() => {
|
||||
setCurrentRow(record)
|
||||
setShowDetailDrawer(true)
|
||||
}}>
|
||||
{highlightText(record?.MEMBERSHIP_NAME, currentSearchText)}
|
||||
</a> : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -184,6 +203,12 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool
|
||||
},
|
||||
]
|
||||
|
||||
// 悬浮框的关闭方法
|
||||
const handleCloseModal = () => {
|
||||
setShowDetailDrawer(false)
|
||||
setCurrentRow(undefined);
|
||||
}
|
||||
|
||||
return (
|
||||
<div ref={(el) => {
|
||||
// 打印报表
|
||||
@ -191,7 +216,6 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool
|
||||
setPrintOut(el);
|
||||
}} >
|
||||
|
||||
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
{
|
||||
isComponent ? '' :
|
||||
@ -231,7 +255,7 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool
|
||||
PageIndex: 1,
|
||||
PageSize: 999999,
|
||||
keyWord: {
|
||||
key: "COUPON_NAME",
|
||||
key: "COUPON_NAME,MEMBERSHIP_NAME",
|
||||
value: params?.searchValue || ""
|
||||
},
|
||||
}
|
||||
@ -251,7 +275,7 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool
|
||||
PageIndex: 1,
|
||||
PageSize: 999999,
|
||||
keyWord: {
|
||||
key: "COUPON_NAME",
|
||||
key: "COUPON_NAME,MEMBERSHIP_NAME",
|
||||
value: params?.searchValue || ""
|
||||
},
|
||||
}
|
||||
@ -274,6 +298,15 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 会员详情 */}
|
||||
<MemberDetail showDetailDrawer={showDetailDrawer}
|
||||
currentRow={currentRow}
|
||||
handleCloseModal={handleCloseModal}
|
||||
currentUser={currentUser} />
|
||||
|
||||
{/* 卡券的编辑 还是 新增 组件 */}
|
||||
<CardInfo showDetail={showDetail} currentRow={currentRow} currentUser={currentUser} parentRef={actionRef} setShowDetail={setShowDetail} setCurrentRow={setCurrentRow} readonly={true} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ import { handleDeleteSERVERPARTSELLER, handleGetMEMBERADDRESSList, handleGetRela
|
||||
import LeftSelectTree from '@/pages/reports/settlementAccount/component/leftSelectTree';
|
||||
import session from '@/utils/session';
|
||||
import PageTitleBox from '@/components/PageTitleBox';
|
||||
import { handeGetCOMMENTList, handeGetPictureList, handeGetRevenueReport } from '@/pages/travelMember/service';
|
||||
import { handeDeleteSERVERPARTSELLER, handeGetCOMMENTList, handeGetPictureList, handeGetRevenueReport } from '@/pages/travelMember/service';
|
||||
import { deletePicture, uploadPicture } from '@/services/picture';
|
||||
import { handleGetServerPartShopNewList } from '@/pages/basicManage/serviceArea/service';
|
||||
import { handleGetServerpartShopList } from '@/pages/DataVerification/service';
|
||||
@ -82,7 +82,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
const [revenueLoading, setRevenueLoading] = useState<boolean>(false)
|
||||
|
||||
|
||||
let SHOPTRADEObj = session.get('SHOPTRADEObj')
|
||||
let BUSINESSTRADESHOPYNObj = session.get('BUSINESSTRADESHOPYNObj')
|
||||
let SHOPTRADEList = session.get('SHOPTRADEList')
|
||||
// 云南 门店业态
|
||||
let BUSINESSTRADEYNTree = session.get('BUSINESSTRADEYNTree')
|
||||
@ -175,6 +175,13 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
title: '经营业态',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
// ellipsis: true,
|
||||
// valueType: 'select',
|
||||
// valueEnum: BUSINESSTRADESHOPYNObj
|
||||
// request: () => {
|
||||
// const SHOPTRADEList = session.get('SHOPTRADEList')
|
||||
// return SHOPTRADEList
|
||||
// }
|
||||
valueType: 'treeSelect',
|
||||
ellipsis: true,
|
||||
fieldProps: {
|
||||
@ -919,7 +926,8 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
|
||||
setCurrentRow({
|
||||
...detail,
|
||||
SHOPTRADE: obj.SHOPTRADE,
|
||||
// SHOPTRADE: obj.SHOPTRADE,
|
||||
SHOPTRADE: '',
|
||||
SERVERPART_ID: Number(obj.SERVERPART_ID),
|
||||
SERVERPARTSHOP_IDS: SERVERPARTSHOP_IDS,
|
||||
SERVERPART_NAME: obj.SERVERPART_NAME
|
||||
@ -1227,6 +1235,35 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
handleGetRevenueData()
|
||||
handleSetlogSave(`点击获取营收按钮`)
|
||||
}}>获取营收</Button>
|
||||
|
||||
<Popconfirm
|
||||
title="确认删除?"
|
||||
onConfirm={async () => {
|
||||
if (!currentRow?.SELLER_ID) {
|
||||
return
|
||||
}
|
||||
const req: any = { SERVERPARTSELLERId: currentRow?.SELLER_ID }
|
||||
const data = await handeDeleteSERVERPARTSELLER(req)
|
||||
if (data.Result_Code === 100) {
|
||||
message.success(data.Result_Desc)
|
||||
formRef?.current?.resetFields()
|
||||
handleConfirmLoading(false)
|
||||
handleModalVisible(false)
|
||||
setCurrentRowDetail(null)
|
||||
setCurrentRow(undefined)
|
||||
setMerchantLogoList([])
|
||||
setDoorImageList([])
|
||||
setInteriorImageList([])
|
||||
setCurrentShopData([])
|
||||
actionRef.current?.reload()
|
||||
} else {
|
||||
message.error(data.Result_Desc)
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Button danger>删除商家信息</Button>
|
||||
</Popconfirm>
|
||||
|
||||
</div>
|
||||
: <div></div>
|
||||
}
|
||||
@ -1458,6 +1495,22 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
{/* <ProFormSelect
|
||||
name="SHOPTRADE"
|
||||
label="门店业态"
|
||||
request={() => {
|
||||
const BUSINESSTRADESHOPYN = session.get('BUSINESSTRADESHOPYN')
|
||||
return BUSINESSTRADESHOPYN
|
||||
}}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择门店业态!'
|
||||
}
|
||||
]}
|
||||
disabled={currentRow?.SHOPTRADE}
|
||||
/> */}
|
||||
|
||||
<ProFormTreeSelect
|
||||
name="SHOPTRADE"
|
||||
label="门店业态"
|
||||
|
||||
@ -37,6 +37,8 @@ const ActiveMemberStatistics: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
const [showLoading, setShowLoading] = useState<boolean>(false)
|
||||
// 当前的搜索条件
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
// 是否排除测试会员
|
||||
const [ExcludeTest, setExcludeTest] = useState<boolean>(true)
|
||||
|
||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
||||
@ -74,6 +76,8 @@ const ActiveMemberStatistics: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
MembershipLevel: "",
|
||||
}
|
||||
|
||||
setExcludeTest(formData ? formData?.ExcludeTest === 1 ? true : false : true)
|
||||
|
||||
setShowLoading(true)
|
||||
const data = await handeGetMembershipCount(req)
|
||||
setShowLoading(false)
|
||||
@ -285,7 +289,7 @@ const ActiveMemberStatistics: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
setShowDetail(false)
|
||||
}}
|
||||
>
|
||||
<MemberInfor searchType={2} valueType={valueType} isComponent={true} come={'ActiveMemberStatistics'} comeParams={searchParams} noMemberLevel={true} />
|
||||
<MemberInfor searchType={2} valueType={valueType} isComponent={true} come={'ActiveMemberStatistics'} comeParams={searchParams} noMemberLevel={true} ExcludeTest={ExcludeTest} />
|
||||
</Drawer>
|
||||
</div >
|
||||
)
|
||||
|
||||
@ -139,10 +139,16 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
},
|
||||
// valueEnum: {
|
||||
// "1": "有效",
|
||||
// "0": "无效"
|
||||
// },
|
||||
initialValue: "1"
|
||||
},
|
||||
{
|
||||
|
||||
@ -139,9 +139,11 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
},
|
||||
initialValue: "1"
|
||||
},
|
||||
@ -415,7 +417,7 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
}}
|
||||
>
|
||||
<Row gutter={8}>
|
||||
{/* <Col span={12}>
|
||||
<Col span={12}>
|
||||
<ProFormTreeSelect
|
||||
name="FIELDENUM_PID"
|
||||
label="上级类别"
|
||||
@ -458,7 +460,7 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</Col> */}
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
name="FIELDENUM_NAME"
|
||||
|
||||
@ -7,6 +7,7 @@ import { useRef, useState } from "react";
|
||||
import { connect, CurrentUser } from "umi";
|
||||
import { handeGetCommoditySaleSummary } from "../service";
|
||||
import moment from 'moment'
|
||||
import { highlightText } from "@/utils/highlightText";
|
||||
|
||||
const AnalysisOfHotSellingButUnsoldProducts: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
||||
const { currentUser } = props
|
||||
@ -16,6 +17,8 @@ const AnalysisOfHotSellingButUnsoldProducts: React.FC<{ currentUser: CurrentUser
|
||||
const [selectedId, setSelectedId] = useState<string>()
|
||||
// 查询的条件
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
// 当前查询的文字
|
||||
const [currentSearchText, setCurrentSearchText] = useState<string>('')
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
@ -63,6 +66,9 @@ const AnalysisOfHotSellingButUnsoldProducts: React.FC<{ currentUser: CurrentUser
|
||||
hideInSearch: true,
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
render: (_, record) => {
|
||||
return highlightText(record?.Commodity_Name, currentSearchText)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "商品条码",
|
||||
@ -143,11 +149,15 @@ const AnalysisOfHotSellingButUnsoldProducts: React.FC<{ currentUser: CurrentUser
|
||||
ServerpartId: "",
|
||||
StartDate: params?.StartDate || "",
|
||||
EndDate: params?.EndDate || "",
|
||||
SaleBillType: params?.SaleBillType || ""
|
||||
SaleBillType: params?.SaleBillType || "",
|
||||
SearchKeyName: "Commodity_Name",
|
||||
SearchKeyValue: params?.searchText || "",
|
||||
SortStr: ""
|
||||
}
|
||||
|
||||
setSearchParams(params)
|
||||
const data = await handeGetCommoditySaleSummary(req)
|
||||
setCurrentSearchText(params?.searchText || "")
|
||||
console.log('datadatadatadata', data);
|
||||
if (data.List && data.List.length > 0) {
|
||||
return { data: data.List, success: true }
|
||||
|
||||
@ -17,7 +17,7 @@ import './style.less'
|
||||
import orderIcon from '@/assets/detail/orderIcon.png'
|
||||
import closeIcon from '@/assets/detail/closeIcon.png'
|
||||
import OrderDetailModal from "./components/orderDetailModal";
|
||||
import { handleSetlogSave } from "@/utils/format";
|
||||
import { convertTreeFieldToNumber, handleSetlogSave } from "@/utils/format";
|
||||
import { highlightText } from "@/utils/highlightText";
|
||||
|
||||
|
||||
@ -127,6 +127,40 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '会员标签',
|
||||
dataIndex: "MEMBERSHIP_TARGET",
|
||||
width: 150,
|
||||
align: 'center',
|
||||
valueType: 'treeSelect',
|
||||
request: async () => {
|
||||
const req = {
|
||||
AUTOTYPE_TYPEID: '2000',
|
||||
AUTOTYPE_PID: "",
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
AUTOTYPE_VALID: 1,
|
||||
SearchKey: ""
|
||||
}
|
||||
const data = await handeGetNestingAUTOTYPEList(req);
|
||||
console.log('datadatadatadatadata', data);
|
||||
let res = convertTreeFieldToNumber(data, 'AUTOTYPE_ID')
|
||||
return res
|
||||
},
|
||||
hideInSearch: true,
|
||||
fieldProps: {
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
filterTreeNode: (input, node) => {
|
||||
// ✅ 输入时根据 AUTOTYPE_NAME 模糊匹配
|
||||
return node?.AUTOTYPE_NAME?.toLowerCase()?.includes(input.toLowerCase());
|
||||
},
|
||||
treeDefaultExpandAll: true,
|
||||
fieldNames: {
|
||||
label: 'AUTOTYPE_NAME',
|
||||
value: 'AUTOTYPE_ID',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex: 'ORDER_DATE',
|
||||
title: '订单时间',
|
||||
|
||||
@ -39,6 +39,8 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine
|
||||
const [valueType, setValueType] = useState<any>()
|
||||
// 显示加载效果
|
||||
const [showLoading, setShowLoading] = useState<boolean>(false)
|
||||
// 是否排除测试会员
|
||||
const [ExcludeTest, setExcludeTest] = useState<boolean>(true)
|
||||
|
||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList')
|
||||
@ -72,6 +74,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine
|
||||
MembershipLevel: formData?.MembershipLevel === '1' ? '' : formData?.MembershipLevel || "",
|
||||
}
|
||||
|
||||
setExcludeTest(formData ? formData?.ExcludeTest === 1 ? true : false : true)
|
||||
|
||||
setShowLoading(true)
|
||||
const data = await handeGetMembershipCount(req)
|
||||
@ -466,7 +469,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine
|
||||
setShowDetail(false)
|
||||
}}
|
||||
>
|
||||
<MemberInfor searchType={searchType} valueType={valueType} isComponent={true} />
|
||||
<MemberInfor searchType={searchType} valueType={valueType} isComponent={true} ExcludeTest={ExcludeTest} />
|
||||
</Drawer>
|
||||
</div >
|
||||
)
|
||||
|
||||
@ -14,11 +14,11 @@ 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 { handleGetCONSUMPTIONRECORDList } from "../service";
|
||||
import { handeGetNestingAUTOTYPEList, handleGetCONSUMPTIONRECORDList } from "../service";
|
||||
import moment from 'moment'
|
||||
import session from "@/utils/session";
|
||||
import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal";
|
||||
import { handleSetlogSave } from "@/utils/format";
|
||||
import { convertTreeFieldToNumber, handleSetlogSave } from "@/utils/format";
|
||||
import MemberDetail from "../memberInfor/component/memberDetail";
|
||||
|
||||
|
||||
@ -163,6 +163,40 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
},
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: '会员标签',
|
||||
dataIndex: "MEMBERSHIP_TARGET",
|
||||
valueType: 'treeSelect',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
hideInSearch: true,
|
||||
request: async () => {
|
||||
const req = {
|
||||
AUTOTYPE_TYPEID: '2000',
|
||||
AUTOTYPE_PID: "",
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
AUTOTYPE_VALID: 1,
|
||||
SearchKey: ""
|
||||
}
|
||||
const data = await handeGetNestingAUTOTYPEList(req);
|
||||
let res = convertTreeFieldToNumber(data, 'AUTOTYPE_ID')
|
||||
return res
|
||||
},
|
||||
fieldProps: {
|
||||
// multiple: true,
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
filterTreeNode: (input, node) => {
|
||||
// ✅ 输入时根据 AUTOTYPE_NAME 模糊匹配
|
||||
return node?.AUTOTYPE_NAME?.toLowerCase()?.includes(input.toLowerCase());
|
||||
},
|
||||
treeDefaultExpandAll: true,
|
||||
fieldNames: {
|
||||
label: 'AUTOTYPE_NAME',
|
||||
value: 'AUTOTYPE_ID',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "订单编号",
|
||||
width: 200,
|
||||
@ -225,6 +259,41 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
},
|
||||
sorter: true
|
||||
},
|
||||
|
||||
{
|
||||
title: '会员标签',
|
||||
dataIndex: "MEMBERSHIP_TARGET",
|
||||
valueType: 'treeSelect',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
hideInTable: true,
|
||||
request: async () => {
|
||||
const req = {
|
||||
AUTOTYPE_TYPEID: '2000',
|
||||
AUTOTYPE_PID: "",
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
AUTOTYPE_VALID: 1,
|
||||
SearchKey: ""
|
||||
}
|
||||
const data = await handeGetNestingAUTOTYPEList(req);
|
||||
let res = convertTreeFieldToNumber(data, 'AUTOTYPE_ID')
|
||||
return res
|
||||
},
|
||||
fieldProps: {
|
||||
multiple: true,
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
filterTreeNode: (input, node) => {
|
||||
// ✅ 输入时根据 AUTOTYPE_NAME 模糊匹配
|
||||
return node?.AUTOTYPE_NAME?.toLowerCase()?.includes(input.toLowerCase());
|
||||
},
|
||||
treeDefaultExpandAll: true,
|
||||
fieldNames: {
|
||||
label: 'AUTOTYPE_NAME',
|
||||
value: 'AUTOTYPE_ID',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "获得积分",
|
||||
width: 120,
|
||||
@ -344,7 +413,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
expandRowByClick: true
|
||||
}}
|
||||
headerTitle={isComponent ? '' : <PageTitleBox props={props} />}
|
||||
scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 450px)' }}
|
||||
scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 480px)' }}
|
||||
search={isComponent ? false : { span: 6, defaultCollapsed: false }}
|
||||
options={isComponent ? false : {
|
||||
density: true,
|
||||
@ -367,7 +436,8 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
OWNERUNIT_ID: 911,
|
||||
MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID,
|
||||
CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999'
|
||||
CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999',
|
||||
MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : ""
|
||||
},
|
||||
PageIndex: params?.current,
|
||||
PageSize: params?.pageSize,
|
||||
@ -386,7 +456,8 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
CONSUMPTIONRECORD_DATE_Start: params?.CONSUMPTIONRECORD_DATE_Start || "",
|
||||
CONSUMPTIONRECORD_DATE_End: params?.CONSUMPTIONRECORD_DATE_End || "",
|
||||
CONSUMPTIONRECORD_TYPE: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE,
|
||||
CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999'
|
||||
CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999',
|
||||
MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : ""
|
||||
},
|
||||
PageIndex: params?.current,
|
||||
PageSize: params?.pageSize,
|
||||
|
||||
@ -138,9 +138,15 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
// valueEnum: {
|
||||
// "1": "有效",
|
||||
// "0": "无效"
|
||||
// },
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
},
|
||||
initialValue: "1"
|
||||
},
|
||||
|
||||
@ -63,7 +63,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
dataIndex: 'searchText',
|
||||
hideInTable: true,
|
||||
fieldProps: {
|
||||
placeholder: '请输入门店名称/用户昵称'
|
||||
placeholder: '请输入门店名称/用户昵称/订单编号'
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -149,7 +149,6 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
SearchKey: ""
|
||||
}
|
||||
const data = await handeGetNestingAUTOTYPEList(req);
|
||||
console.log('datadatadatadatadata', data);
|
||||
return data
|
||||
},
|
||||
fieldProps: {
|
||||
@ -362,7 +361,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
// sortStr: "OPERATE_DATE desc",
|
||||
sortStr: sortstr.toString(),
|
||||
keyWord: {
|
||||
Key: "MEMBERSHIP_NAME,SHOPNAME",
|
||||
Key: "MEMBERSHIP_NAME,SHOPNAME,TICKET_CODE",
|
||||
Value: params?.searchText
|
||||
}
|
||||
}
|
||||
@ -371,6 +370,9 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?
|
||||
|
||||
handleSetlogSave(`点击查询按钮`)
|
||||
if (data.List && data.List.length > 0) {
|
||||
data.List.forEach((item: any) => {
|
||||
item.MEMBERSHIP_TARGET = item.MEMBERSHIP_TARGET ? [Number(item.MEMBERSHIP_TARGET)] : ""
|
||||
})
|
||||
return { data: data.List, success: true, total: data.TotalCount }
|
||||
}
|
||||
return { data: [], success: true }
|
||||
|
||||
@ -189,11 +189,17 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
width: 120,
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
"0": "无效",
|
||||
"1": "有效",
|
||||
},
|
||||
initialValue: "1"
|
||||
// valueEnum: {
|
||||
// "1": "有效",
|
||||
// "0": "无效",
|
||||
// },
|
||||
initialValue: "1",
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
}
|
||||
},
|
||||
// {
|
||||
// dataIndex: 'STAFF_NAME',
|
||||
@ -442,12 +448,14 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
OWNERUNIT_ID: 911,
|
||||
GROWTHSETTING_STATE: params?.GROWTHSETTING_STATE,
|
||||
MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE
|
||||
MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE === 1 ? '' : params?.MEMBERSHIP_TYPE || ""
|
||||
},
|
||||
SortStr: "MEMBERSHIP_TYPE,MEMBERSHIP_LEVEL,PROMOTION_LEVEL desc",
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
console.log('reqreqreqreq', req);
|
||||
|
||||
const data = await handleGetGROWTHSETTINGList(req);
|
||||
if (data.List && data.List.length > 0) {
|
||||
handleSetlogSave(`查看了成长规则配置列表`)
|
||||
|
||||
@ -147,10 +147,11 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
align: 'center',
|
||||
width: 120,
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
"-1": "全部",
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
},
|
||||
initialValue: "1"
|
||||
},
|
||||
@ -238,7 +239,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
|
||||
|
||||
let req: any = {}
|
||||
if (currentRow?.SELLER_ID) {
|
||||
if (currentRow?.BRAND_ID) {
|
||||
req = {
|
||||
...currentRow,
|
||||
...res,
|
||||
@ -265,7 +266,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
handleConfirmLoading(false)
|
||||
if (data.Result_Code === 100) {
|
||||
message.success("新增成功!")
|
||||
handleSetlogSave(`${currentRow?.SELLER_ID ? '更新' : '新增'}品牌【${data.Result_Data.BRAND_NAME}】`)
|
||||
handleSetlogSave(`${currentRow?.BRAND_ID ? '更新' : '新增'}品牌【${data.Result_Data.BRAND_NAME}】`)
|
||||
setCurrentRow(undefined)
|
||||
formRef?.current?.resetFields()
|
||||
handleModalVisible(false)
|
||||
@ -279,7 +280,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
|
||||
// 预览上传后的图片
|
||||
const handlePreview = async () => {
|
||||
setFileList(file)
|
||||
setFileList(fileList)
|
||||
setImagePreviewVisible(true)
|
||||
};
|
||||
const handleChangePreview = (val: any) => {
|
||||
@ -439,9 +440,9 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
</Draggable>
|
||||
}}
|
||||
footer={<ModalFooter
|
||||
hideDelete={!currentRow?.SELLER_ID}
|
||||
hideDelete={!currentRow?.BRAND_ID}
|
||||
handleDelete={async () => {
|
||||
await handelDelete(currentRow?.SELLER_ID)
|
||||
await handelDelete(currentRow?.BRAND_ID)
|
||||
}}
|
||||
handleCancel={() => {
|
||||
handleConfirmLoading(false)
|
||||
|
||||
@ -166,7 +166,8 @@ const MallClassificationManage: React.FC<{ currentUser: CurrentUser | undefined
|
||||
valueEnum: {
|
||||
"1": "上架",
|
||||
"0": "下架"
|
||||
}
|
||||
},
|
||||
initialValue: "1"
|
||||
},
|
||||
{
|
||||
dataIndex: "PRESALE_TYPE",
|
||||
|
||||
@ -15,12 +15,12 @@ import ProForm, { ProFormSelect, ProFormText } from "@ant-design/pro-form";
|
||||
|
||||
import orderIcon from '@/assets/detail/orderIcon.png'
|
||||
import closeIcon from '@/assets/detail/closeIcon.png'
|
||||
import { handleSetlogSave } from "@/utils/format";
|
||||
import { convertTreeFieldToNumber, handleSetlogSave } from "@/utils/format";
|
||||
import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal";
|
||||
import { highlightText } from "@/utils/highlightText";
|
||||
|
||||
const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const { currentUser } = props
|
||||
const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, searchReq?: any }> = (props) => {
|
||||
const { currentUser, isComponent, searchReq } = props
|
||||
const draggleRef = React.createRef<any>()
|
||||
const actionRef = useRef<ActionType>();
|
||||
const formRef = useRef<FormInstance>();
|
||||
@ -158,6 +158,41 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: '会员标签',
|
||||
width: 150,
|
||||
dataIndex: "MEMBERSHIP_TARGET",
|
||||
valueType: 'treeSelect',
|
||||
align: "center",
|
||||
request: async () => {
|
||||
const req = {
|
||||
AUTOTYPE_TYPEID: '2000',
|
||||
AUTOTYPE_PID: "",
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
AUTOTYPE_VALID: 1,
|
||||
SearchKey: ""
|
||||
}
|
||||
const data = await handeGetNestingAUTOTYPEList(req);
|
||||
console.log('datadatadatadatadata', data);
|
||||
let res = convertTreeFieldToNumber(data, 'AUTOTYPE_ID')
|
||||
return res
|
||||
},
|
||||
hideInSearch: true,
|
||||
fieldProps: {
|
||||
multiple: true,
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
filterTreeNode: (input, node) => {
|
||||
// ✅ 输入时根据 AUTOTYPE_NAME 模糊匹配
|
||||
return node?.AUTOTYPE_NAME?.toLowerCase()?.includes(input.toLowerCase());
|
||||
},
|
||||
treeDefaultExpandAll: true,
|
||||
fieldNames: {
|
||||
label: 'AUTOTYPE_NAME',
|
||||
value: 'AUTOTYPE_ID',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "联系电话",
|
||||
dataIndex: "ORDER_PERSONTEL",
|
||||
@ -464,14 +499,14 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
}}
|
||||
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
|
||||
headerTitle={<PageTitleBox props={props} />} // 列表表头
|
||||
search={{
|
||||
search={isComponent ? false : {
|
||||
span: 6,
|
||||
defaultCollapsed: false
|
||||
}}
|
||||
request={async (params) => {
|
||||
console.log('paramsparamsparams', params);
|
||||
|
||||
const req = {
|
||||
const req = isComponent ? searchReq : {
|
||||
SearchParameter: {
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||
|
||||
@ -55,7 +55,24 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined }
|
||||
// 显示详情抽屉
|
||||
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
|
||||
// 传入给子组件的搜索内容
|
||||
const [toChildrenSearchParams, setToChildrenSearchParams] = useState<any>()
|
||||
const [toChildrenSearchParams, setToChildrenSearchParams] = useState<any>({
|
||||
SearchParameter: {
|
||||
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
OPERATE_DATE_Start: searchParams?.StartDate || "",
|
||||
OPERATE_DATE_End: searchParams?.EndDate || "",
|
||||
OWNERUNIT_ID: 911,
|
||||
POINT_TYPE: '',
|
||||
POINT_SOURCE: '',
|
||||
MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : ""
|
||||
},
|
||||
keyWord: {
|
||||
Key: "MEMBERSHIP_NAME",
|
||||
Value: searchParams?.searchText || ""
|
||||
},
|
||||
PageIndex: searchParams?.current,
|
||||
PageSize: 20,
|
||||
sortstr: "OPERATE_DATE desc",
|
||||
})
|
||||
|
||||
// 积分的columns
|
||||
const columns: any = [
|
||||
@ -351,15 +368,16 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined }
|
||||
]
|
||||
|
||||
useEffect(() => {
|
||||
handleGetTopData()
|
||||
let [StartDate, EndDate] = [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
|
||||
handleGetTopData(StartDate, EndDate)
|
||||
}, [])
|
||||
// 获取顶部的数据
|
||||
const handleGetTopData = async (StartDate?: string, EndDate?: string, MEMBERSHIP_TARGET?: string) => {
|
||||
const req: any = {
|
||||
CalcType: 1, // 1 汇总 2 会员等级 3 会员类型
|
||||
OwnerUnitId: currentUser?.OwnerUnitId,
|
||||
StartDate: StartDate ? StartDate : searchParams?.StartDate ? searchParams?.StartDate : "",
|
||||
EndDate: EndDate ? EndDate : searchParams?.EndDate ? searchParams?.EndDate : "",
|
||||
StartDate: StartDate ? StartDate : "",
|
||||
EndDate: EndDate ? EndDate : "",
|
||||
PointSource: "",
|
||||
ServerpartId: "",
|
||||
MemberShipId: "",
|
||||
@ -457,6 +475,49 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined }
|
||||
StartDate: StartDate,
|
||||
EndDate: EndDate
|
||||
})
|
||||
let req: any = {}
|
||||
if (selectTab <= 3) {
|
||||
req = {
|
||||
SearchParameter: {
|
||||
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
OPERATE_DATE_Start: StartDate || "",
|
||||
OPERATE_DATE_End: EndDate || "",
|
||||
OWNERUNIT_ID: 911,
|
||||
POINT_TYPE: selectTab === 1 ? '' : selectTab === 2 ? '1' : selectTab === 3 ? '-1' : '',
|
||||
POINT_SOURCE: '',
|
||||
MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : ""
|
||||
},
|
||||
keyWord: {
|
||||
Key: "MEMBERSHIP_NAME",
|
||||
Value: searchParams?.searchText || ""
|
||||
},
|
||||
PageIndex: searchParams?.current,
|
||||
PageSize: 20,
|
||||
sortstr: "OPERATE_DATE desc",
|
||||
}
|
||||
} else {
|
||||
req = {
|
||||
searchParameter: {
|
||||
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||
OPERATE_DATE_Start: StartDate || "",
|
||||
OPERATE_DATE_End: EndDate || "",
|
||||
OWNERUNIT_ID: 911,
|
||||
SCORESETTING_STATE: 1,
|
||||
GROWTH_SOURCES: "",
|
||||
GROWTH_TYPE: selectTab === 4 ? '' : selectTab === 5 ? '1' : selectTab === 6 ? '-1' : '',
|
||||
MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : ""
|
||||
},
|
||||
PageIndex: searchParams?.current,
|
||||
PageSize: 20,
|
||||
sortstr: "OPERATE_DATE desc",
|
||||
keyWord: {
|
||||
Key: "MEMBERSHIP_NAME",
|
||||
Value: searchParams?.searchText || ""
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
setToChildrenSearchParams(req)
|
||||
actionRef.current?.reload()
|
||||
PointsRecordSearchRef.current?.actionRef?.current?.reload()
|
||||
}}
|
||||
|
||||
@ -140,11 +140,18 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
},
|
||||
initialValue: "1"
|
||||
// valueEnum: {
|
||||
// "1": "有效",
|
||||
// "0": "无效"
|
||||
// },
|
||||
initialValue: "1",
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
dataIndex: 'AUTOTYPE_DESC',
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// 会员等级管理
|
||||
// 会员等级管理 会员等级配置
|
||||
import React, { useRef, useState, Suspense } from 'react';
|
||||
import moment from 'moment'; // 时间相关引用,没有使用可以删除
|
||||
import numeral from "numeral"; // 数字相关引用,没有使用可以删除
|
||||
@ -138,11 +138,18 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
},
|
||||
initialValue: "1"
|
||||
// valueEnum: {
|
||||
// "1": "有效",
|
||||
// "0": "无效"
|
||||
// },
|
||||
initialValue: "1",
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
dataIndex: 'FIELDENUM_DESC',
|
||||
|
||||
@ -281,7 +281,8 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
||||
|
||||
useEffect(() => {
|
||||
const initData = async () => {
|
||||
await handleGetTopData();
|
||||
let [StartDate, EndDate] = [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
|
||||
await handleGetTopData(StartDate, EndDate);
|
||||
// 使用最新的selectBigTab值触发表格加载
|
||||
// actionRef.current?.reload();
|
||||
};
|
||||
@ -293,8 +294,8 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
||||
const req: any = {
|
||||
CalcType: 2, // 1 汇总 2 会员等级 3 会员类型
|
||||
OwnerUnitId: currentUser?.OwnerUnitId,
|
||||
StartDate: StartDate ? StartDate : searchParams?.StartDate ? searchParams?.StartDate : "",
|
||||
EndDate: EndDate ? EndDate : searchParams?.EndDate ? searchParams?.EndDate : "",
|
||||
StartDate: StartDate ? StartDate : "",
|
||||
EndDate: EndDate ? EndDate : "",
|
||||
PointSource: "",
|
||||
ServerpartId: "",
|
||||
MemberShipId: "",
|
||||
|
||||
@ -368,7 +368,10 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
||||
|
||||
useEffect(() => {
|
||||
const initData = async () => {
|
||||
await handleGetTopData();
|
||||
|
||||
let [StartDate, EndDate] = [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
|
||||
|
||||
await handleGetTopData(StartDate, EndDate);
|
||||
// 使用最新的selectBigTab值触发表格加载
|
||||
actionRef.current?.reload();
|
||||
};
|
||||
@ -379,8 +382,8 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined
|
||||
const req: any = {
|
||||
CalcType: 3, // 1 汇总 2 会员等级 3 会员类型
|
||||
OwnerUnitId: currentUser?.OwnerUnitId,
|
||||
StartDate: StartDate ? StartDate : searchParams?.StartDate ? searchParams?.StartDate : "",
|
||||
EndDate: EndDate ? EndDate : searchParams?.EndDate ? searchParams?.EndDate : "",
|
||||
StartDate: StartDate ? StartDate : "",
|
||||
EndDate: EndDate ? EndDate : "",
|
||||
PointSource: "",
|
||||
ServerpartId: "",
|
||||
MemberShipId: "",
|
||||
|
||||
@ -140,10 +140,16 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
},
|
||||
// valueEnum: {
|
||||
// "1": "有效",
|
||||
// "0": "无效"
|
||||
// },
|
||||
initialValue: "1"
|
||||
},
|
||||
{
|
||||
@ -471,7 +477,7 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
// treeData: tableData,
|
||||
fieldNames: {
|
||||
label: 'FIELDENUM_NAME',
|
||||
value: 'FIELDENUM_VALUE',
|
||||
value: 'FIELDENUM_ID',
|
||||
children: 'children'
|
||||
},
|
||||
treeDefaultExpandAll: true,
|
||||
|
||||
@ -210,12 +210,13 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"-1": "全部",
|
||||
"1": "上架",
|
||||
"0": "下架"
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '上架', value: "1" },
|
||||
{ label: '下架', value: "0" }
|
||||
]
|
||||
},
|
||||
initialValue: '-1'
|
||||
initialValue: '1'
|
||||
},
|
||||
{
|
||||
dataIndex: 'OPERATE_DATE',
|
||||
|
||||
@ -365,6 +365,9 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo
|
||||
handleSetlogSave(`点击查询按钮`)
|
||||
|
||||
if (data.List && data.List.length > 0) {
|
||||
data.List.forEach((item: any) => {
|
||||
item.MEMBERSHIP_TARGET = item.MEMBERSHIP_TARGET ? [Number(item.MEMBERSHIP_TARGET)] : ""
|
||||
})
|
||||
return { data: data.List, success: true, total: data.TotalCount }
|
||||
}
|
||||
return { data: [], success: true }
|
||||
|
||||
@ -139,11 +139,17 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
},
|
||||
initialValue: "1"
|
||||
// valueEnum: {
|
||||
// "1": "有效",
|
||||
// "0": "无效"
|
||||
// },
|
||||
initialValue: "1",
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex: 'FIELDENUM_DESC',
|
||||
@ -430,7 +436,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
||||
}}
|
||||
>
|
||||
<Row gutter={8}>
|
||||
{/* <Col span={12}>
|
||||
<Col span={12}>
|
||||
<ProFormTreeSelect
|
||||
name="FIELDENUM_PID"
|
||||
label="上级类别"
|
||||
@ -462,7 +468,9 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
||||
value: 'FIELDENUM_ID',
|
||||
children: 'children'
|
||||
},
|
||||
placeholder: "请选择上级类别",
|
||||
showSearch: true,
|
||||
treeDefaultExpandAll: true,
|
||||
filterTreeNode: (input, node) =>
|
||||
(node.FIELDENUM_NAME || '').toLowerCase().includes(input.toLowerCase())
|
||||
}}
|
||||
@ -473,7 +481,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</Col> */}
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<ProFormText
|
||||
name="FIELDENUM_NAME"
|
||||
|
||||
@ -216,9 +216,15 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
||||
width: 120,
|
||||
align: 'center',
|
||||
valueType: 'select',
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
// valueEnum: {
|
||||
// "1": "有效",
|
||||
// "0": "无效"
|
||||
// },
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
},
|
||||
initialValue: "1",
|
||||
hideInTable: true
|
||||
|
||||
@ -496,6 +496,11 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
} else {
|
||||
message.success('删除成功!');
|
||||
handleSetlogSave(`删除商品【${currentRow?.COMMODITY_NAME}】`)
|
||||
handleConfirmLoading(false)
|
||||
handleModalVisible(false)
|
||||
setMainImgList([])
|
||||
setHeaderImgList([])
|
||||
setDetailImgList([])
|
||||
actionRef.current?.reload()
|
||||
}
|
||||
};
|
||||
@ -846,11 +851,17 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
||||
setShowMoreSpecs(true)
|
||||
}}>多规格管理</Button>
|
||||
|
||||
<Button danger onClick={async () => {
|
||||
<Popconfirm
|
||||
title="确认删除该商品?"
|
||||
onConfirm={async (e: any) => {
|
||||
await handelDelete(currentRow?.COMMODITY_ID);
|
||||
}}>
|
||||
}}
|
||||
>
|
||||
<Button danger>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
|
||||
</div>
|
||||
: ""
|
||||
}
|
||||
|
||||
@ -147,10 +147,13 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
||||
title: '有效状态',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
valueType: 'select',
|
||||
ellipsis: true,
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
},
|
||||
initialValue: "1",
|
||||
render: (_, record) => {
|
||||
@ -475,6 +478,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
||||
<Modal
|
||||
title={
|
||||
<div
|
||||
className='ProductSpecificationManageBox'
|
||||
style={{
|
||||
width: '100%',
|
||||
cursor: 'move',
|
||||
@ -505,6 +509,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
||||
afterClose={() => {
|
||||
formRef.current?.resetFields();
|
||||
setCurrentRow(undefined);
|
||||
setFileList([])
|
||||
}}
|
||||
onCancel={() => {
|
||||
handleConfirmLoading(false)
|
||||
@ -524,6 +529,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
||||
disabled={disabled}
|
||||
bounds={bounds}
|
||||
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
||||
handle='.ProductSpecificationManageBox'
|
||||
>
|
||||
<div ref={draggleRef}>{modal}</div>
|
||||
</Draggable>
|
||||
@ -565,8 +571,13 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
|
||||
labelCol={{ style: { width: 80 } }}
|
||||
// initialValues={currentRow}
|
||||
request={async () => {
|
||||
if (currentRow?.USERDEFINEDTYPE_ICO) {
|
||||
setFileList([{ url: currentRow?.USERDEFINEDTYPE_ICO }])
|
||||
}
|
||||
|
||||
return currentRow ? {
|
||||
...currentRow,
|
||||
|
||||
} : dataType === 1 ? {
|
||||
USERDEFINEDTYPE_STATE: 1
|
||||
} : {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// 活跃会员统计
|
||||
// 注册途径统计
|
||||
import { connect, CurrentUser } from "umi";
|
||||
import { ConnectState } from "@/models/connect";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
@ -41,6 +41,8 @@ const RegistrationStatistics: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
|
||||
let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList')
|
||||
|
||||
// 是否排除测试会员
|
||||
const [ExcludeTest, setExcludeTest] = useState<boolean>(true)
|
||||
|
||||
const handleGetData = async (formData?: any) => {
|
||||
console.log('formDataformDataformData', formData);
|
||||
@ -63,7 +65,7 @@ const RegistrationStatistics: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
}
|
||||
|
||||
console.log('reqreqreq', req);
|
||||
|
||||
setExcludeTest(formData ? formData?.ExcludeTest === 1 ? true : false : true)
|
||||
|
||||
setShowLoading(true)
|
||||
const data = await handeGetMembershipCount(req)
|
||||
@ -267,7 +269,7 @@ const RegistrationStatistics: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
setShowDetail(false)
|
||||
}}
|
||||
>
|
||||
<MemberInfor searchType={searchType} valueType={valueType} isComponent={true} />
|
||||
<MemberInfor searchType={searchType} valueType={valueType} isComponent={true} ExcludeTest={ExcludeTest} />
|
||||
</Drawer>
|
||||
</div >
|
||||
)
|
||||
|
||||
@ -37,6 +37,8 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi
|
||||
const [valueType, setValueType] = useState<any>()
|
||||
// 显示加载效果
|
||||
const [showLoading, setShowLoading] = useState<boolean>(false)
|
||||
// 是否排除测试会员
|
||||
const [ExcludeTest, setExcludeTest] = useState<boolean>(true)
|
||||
|
||||
let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj')
|
||||
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj')
|
||||
@ -62,6 +64,7 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi
|
||||
MembershipType: "",
|
||||
MembershipLevel: ""
|
||||
}
|
||||
setExcludeTest(formData ? formData?.ExcludeTest === 1 ? true : false : true)
|
||||
setShowLoading(true)
|
||||
const data = await handeGetMembershipCount(req)
|
||||
const data2 = await handeGetMembershipCount(req2)
|
||||
@ -243,7 +246,7 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi
|
||||
setShowDetail(false)
|
||||
}}
|
||||
>
|
||||
<MemberInfor searchType={searchType} valueType={valueType} isComponent={true} noMemberType={searchType === 1} noMemberLevel={searchType === 2} />
|
||||
<MemberInfor searchType={searchType} valueType={valueType} isComponent={true} noMemberType={searchType === 1} noMemberLevel={searchType === 2} ExcludeTest={ExcludeTest} />
|
||||
</Drawer>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -34,7 +34,25 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
const [tableSumDetail, setTableSumDetail] = useState<any>()
|
||||
// 选择的tab
|
||||
const [selectPageTab, setSelectPageTab] = useState<any>(1)
|
||||
// 会员标签的枚举
|
||||
const [MEMBERSHIP_TARGETOBJ, setMEMBERSHIP_TARGETOBJ] = useState<any>()
|
||||
|
||||
// 把树形的数据 全部层级的value 和label都匹配上
|
||||
const flattenGrowthType = (list: any[], nameKey: string, valueKey: any) => {
|
||||
const result: Record<string, string> = {}
|
||||
|
||||
function traverse(items: any[]) {
|
||||
items.forEach(item => {
|
||||
result[item[valueKey]] = item[nameKey]
|
||||
if (Array.isArray(item.children) && item.children.length > 0) {
|
||||
traverse(item.children)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
traverse(list)
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
const columns: any = [
|
||||
@ -106,6 +124,32 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
hideInSearch: true,
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
valueType: 'treeSelect',
|
||||
request: async () => {
|
||||
const req = {
|
||||
AUTOTYPE_TYPEID: '2000',
|
||||
AUTOTYPE_PID: "",
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
AUTOTYPE_VALID: 1,
|
||||
SearchKey: ""
|
||||
}
|
||||
const data = await handeGetNestingAUTOTYPEList(req);
|
||||
return data
|
||||
},
|
||||
fieldProps: {
|
||||
multiple: true,
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
filterTreeNode: (input, node) => {
|
||||
// ✅ 输入时根据 AUTOTYPE_NAME 模糊匹配
|
||||
return node?.AUTOTYPE_NAME?.toLowerCase()?.includes(input.toLowerCase());
|
||||
},
|
||||
treeDefaultExpandAll: true,
|
||||
fieldNames: {
|
||||
label: 'AUTOTYPE_NAME',
|
||||
value: 'AUTOTYPE_ID',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex: 'TOTAL_COUNT',
|
||||
@ -205,8 +249,8 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
const req: any = {
|
||||
CalcType: 1,
|
||||
OwnerUnitId: currentUser?.OwnerUnitId,
|
||||
StartDate: StartDate || searchParams?.StartDate || "",
|
||||
EndDate: EndDate || searchParams?.EndDate || "",
|
||||
StartDate: StartDate || "",
|
||||
EndDate: EndDate || "",
|
||||
SalebillType: selectPageTab === 1 ? "6000" : "3000,3001,3002",
|
||||
MerchantId: ""
|
||||
}
|
||||
@ -231,7 +275,8 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
handleGetTopData()
|
||||
let [StartDate, EndDate] = [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
|
||||
handleGetTopData(StartDate, EndDate)
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
@ -305,7 +350,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
SearchKey: ""
|
||||
}
|
||||
const data = await handeGetNestingAUTOTYPEList(req);
|
||||
console.log('datadatadatadatadata', data);
|
||||
console.log('datadatadatadatadata333333', data);
|
||||
return data
|
||||
}}
|
||||
fieldProps={{
|
||||
@ -630,6 +675,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
let COUPON_AMOUNTSUM: number = 0
|
||||
let TOTAL_COUNTSUM: number = 0
|
||||
data.List.forEach((item: any) => {
|
||||
item.MEMBERSHIP_TARGET = item.MEMBERSHIP_TARGET ? [Number(item.MEMBERSHIP_TARGET)] : ""
|
||||
PAY_AMOUNTSUM += item.PAY_AMOUNT
|
||||
ORDER_AMOUNTSUM += item.ORDER_AMOUNT
|
||||
COUPON_AMOUNTSUM += item.COUPON_AMOUNT
|
||||
@ -650,6 +696,9 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
||||
children: data.List
|
||||
}]
|
||||
|
||||
console.log('resresresres', res);
|
||||
|
||||
|
||||
return { data: res, success: true }
|
||||
// , total: data.TotalCount
|
||||
}
|
||||
|
||||
@ -131,9 +131,15 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"1": "有效",
|
||||
"0": "无效"
|
||||
// valueEnum: {
|
||||
// "1": "有效",
|
||||
// "0": "无效"
|
||||
// },
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
},
|
||||
initialValue: "1"
|
||||
},
|
||||
|
||||
@ -125,10 +125,11 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
valueType: "select",
|
||||
valueEnum: {
|
||||
"-1": "全部",
|
||||
"0": "无效",
|
||||
"1": "有效"
|
||||
fieldProps: {
|
||||
options: [
|
||||
{ label: '有效', value: "1" },
|
||||
{ label: '无效', value: "0" }
|
||||
]
|
||||
},
|
||||
initialValue: "1"
|
||||
},
|
||||
@ -218,11 +219,10 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
|
||||
const handleAddUpdate = async (res: any) => {
|
||||
let req: any = {}
|
||||
if (currentRow?.USERDEFINEDTYPE_ID) {
|
||||
if (currentRow?.MERCHANTS_ID) {
|
||||
req = {
|
||||
...currentRow,
|
||||
...res,
|
||||
MERCHANTS_STATE: 1,
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
OWNERUNIT_NAME: currentUser?.OwnerUnitName,
|
||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||
@ -243,7 +243,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
const data = await handeSynchroMERCHANTS(req)
|
||||
handleConfirmLoading(false)
|
||||
if (data.Result_Code === 100) {
|
||||
handleSetlogSave(`${currentRow?.USERDEFINEDTYPE_ID ? '编辑' : '新增'}【${data.Result_Data?.MERCHANTS_NAME}】`)
|
||||
handleSetlogSave(`${currentRow?.MERCHANTS_ID ? '编辑' : '新增'}【${data.Result_Data?.MERCHANTS_NAME}】`)
|
||||
message.success("新增成功!")
|
||||
setCurrentRow(undefined)
|
||||
formRef?.current?.resetFields()
|
||||
@ -416,7 +416,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
let newValue: any = { ...values };
|
||||
if (currentRow) {
|
||||
// 编辑数据
|
||||
newValue = { ...values, COMMODITY_ID: currentRow.COMMODITY_ID };
|
||||
newValue = { ...values, MERCHANTS_ID: currentRow.MERCHANTS_ID };
|
||||
}
|
||||
// 如果有开关,要把开关的代码写进去
|
||||
await handleAddUpdate(newValue);
|
||||
@ -524,7 +524,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
||||
|
||||
<Col span={24}>
|
||||
<ProFormText
|
||||
name="MERCHANTS_ADDRESS "
|
||||
name="MERCHANTS_ADDRESS"
|
||||
label="商户地址"
|
||||
/>
|
||||
</Col>
|
||||
|
||||
@ -6,7 +6,7 @@ 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 { Button, Drawer, message, Modal, Space, Spin, Tree } from "antd";
|
||||
import useRequest from "@ahooksjs/use-request";
|
||||
import { getServerpartTree } from "@/services/options";
|
||||
import type { ActionType } from "@ant-design/pro-table";
|
||||
@ -17,11 +17,14 @@ import PageTitleBox from "@/components/PageTitleBox";
|
||||
import SupplierLeftSelectTree from "./components/SupplierLeftSelectTree";
|
||||
import { handeGetGetOnlineOrderSummary } from "../service";
|
||||
import moment from 'moment'
|
||||
import Draggable from "react-draggable";
|
||||
import MallOrderManage from "../MallOrderManage";
|
||||
|
||||
|
||||
const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const { currentUser } = props
|
||||
const downloadBtnRef = useRef<any>()
|
||||
const draggleRef = React.createRef<any>()
|
||||
const actionRef = useRef<ActionType>();
|
||||
const formRef = useRef<FormInstance>();
|
||||
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
|
||||
@ -39,6 +42,17 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
|
||||
const [showExportTable, setShowExportTable] = useState<boolean>(false)
|
||||
// 查询的条件
|
||||
const [searchParams, setSearchParams] = useState<any>()
|
||||
// 显示供应商订单详情
|
||||
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
|
||||
// 弹出框拖动效果
|
||||
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
|
||||
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
|
||||
// 点击行数据
|
||||
const [currentRow, setCurrentRow] = useState<any>()
|
||||
// 要传给组件的搜索参数
|
||||
const [searchReq, setSearchReq] = useState<any>()
|
||||
|
||||
|
||||
|
||||
const [columnsStateMap, setColumnsStateMap] = useState<any>({
|
||||
'TotalActualAmount.maxData': { show: false },
|
||||
@ -108,7 +122,35 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
|
||||
align: 'center',
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
fixed: 'left'
|
||||
fixed: 'left',
|
||||
render: (_, record) => {
|
||||
return record?.StatisticalName ? <a onClick={() => {
|
||||
|
||||
setSearchReq({
|
||||
SearchParameter: {
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||
SALEBILL_TYPES: "",
|
||||
ORDER_DATE_Start: searchParams?.StartDate,
|
||||
ORDER_DATE_End: searchParams?.EndDate,
|
||||
SALEBILL_STATES: "1010,2010,3000",
|
||||
CHANNEL_TYPE: "",
|
||||
SearchKeyValue: "",
|
||||
MERCHANTS_IDS: record?.StatisticalId || "",
|
||||
MEMBERSHIP_TARGET: "",
|
||||
},
|
||||
PageIndex: 1,
|
||||
PageSize: 999999,
|
||||
SortStr: "ORDER_DATE desc",
|
||||
|
||||
})
|
||||
|
||||
setCurrentRow(record)
|
||||
setShowDetailDrawer(true)
|
||||
}}>
|
||||
{record?.StatisticalName}
|
||||
</a> : "-"
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex: 'TotalActualAmount',
|
||||
@ -695,6 +737,19 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
|
||||
tempTable.remove() // 防止重复打印一个内容
|
||||
}
|
||||
|
||||
const onDraggaleStart = (event, uiData) => {
|
||||
const { clientWidth, clientHeight } = window.document.documentElement;
|
||||
const targetRect = draggleRef.current?.getBoundingClientRect();
|
||||
if (!targetRect) {
|
||||
return;
|
||||
}
|
||||
setBounds({
|
||||
left: -targetRect.left + uiData.x,
|
||||
right: clientWidth - (targetRect.right - uiData.x),
|
||||
top: -targetRect.top + uiData.y,
|
||||
bottom: clientHeight - (targetRect.bottom - uiData.y),
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div ref={(el) => {
|
||||
@ -827,6 +882,25 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props)
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<Drawer
|
||||
title={currentRow?.StatisticalName || ""}
|
||||
destroyOnClose={true}
|
||||
width={'80%'}
|
||||
visible={showDetailDrawer}
|
||||
footer={false}
|
||||
closable={false}
|
||||
maskClosable={true}
|
||||
onClose={() => {
|
||||
setShowDetailDrawer(false)
|
||||
setCurrentRow(undefined)
|
||||
}}
|
||||
>
|
||||
|
||||
<MallOrderManage isComponent={true} searchReq={searchReq} />
|
||||
|
||||
</Drawer>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
}}
|
||||
scroll={{ x: "100%", y: "calc(100vh - 430px)" }}
|
||||
headerTitle={<PageTitleBox props={props} />} // 列表表头
|
||||
search={{ span: 6 }}
|
||||
search={{ span: 6, defaultCollapsed: false }}
|
||||
request={async (params) => {
|
||||
|
||||
const req: any = {
|
||||
|
||||
@ -14,7 +14,7 @@ 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 { handeGetMemberShipLicenseList, handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetMEMBERSHIPList, handleGetPOINTRECORDList } from "../service";
|
||||
import { handeGetMemberShipLicenseList, handeGetNestingAUTOTYPEList, handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetMEMBERSHIPList, handleGetPOINTRECORDList } from "../service";
|
||||
import session from "@/utils/session";
|
||||
import moment from 'moment'
|
||||
import Draggable from "react-draggable";
|
||||
@ -36,9 +36,10 @@ import { highlightText } from "@/utils/highlightText";
|
||||
// noMemberLevel 判断是否隐藏 会员等级得筛选条件
|
||||
// come 具体来自哪个页面
|
||||
// comeParams 来自哪个页面 可能需要带上那个页面的查询参数
|
||||
// ExcludeTest 是否排除测试会员
|
||||
|
||||
const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueType?: any, isComponent?: boolean, noMemberType?: boolean, noMemberLevel?: boolean, come?: string, comeParams?: any }> = (props) => {
|
||||
const { currentUser, searchType, valueType, isComponent, noMemberType, noMemberLevel, come, comeParams } = props
|
||||
const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueType?: any, isComponent?: boolean, noMemberType?: boolean, noMemberLevel?: boolean, come?: string, comeParams?: any, ExcludeTest?: boolean }> = (props) => {
|
||||
const { currentUser, searchType, valueType, isComponent, noMemberType, noMemberLevel, come, comeParams, ExcludeTest } = props
|
||||
const downloadBtnRef = useRef<any>()
|
||||
const draggleRef = React.createRef<any>()
|
||||
const actionRef = useRef<ActionType>();
|
||||
@ -225,6 +226,39 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
|
||||
// return newList
|
||||
// }
|
||||
},
|
||||
{
|
||||
title: '会员标签',
|
||||
dataIndex: "MEMBERSHIP_TARGET",
|
||||
valueType: 'treeSelect',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
request: async () => {
|
||||
const req = {
|
||||
AUTOTYPE_TYPEID: '2000',
|
||||
AUTOTYPE_PID: "",
|
||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||
AUTOTYPE_VALID: 1,
|
||||
SearchKey: ""
|
||||
}
|
||||
const data = await handeGetNestingAUTOTYPEList(req);
|
||||
console.log('datadatadatadatadata', data);
|
||||
return data
|
||||
},
|
||||
fieldProps: {
|
||||
multiple: true,
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
filterTreeNode: (input, node) => {
|
||||
// ✅ 输入时根据 AUTOTYPE_NAME 模糊匹配
|
||||
return node?.AUTOTYPE_NAME?.toLowerCase()?.includes(input.toLowerCase());
|
||||
},
|
||||
treeDefaultExpandAll: true,
|
||||
fieldNames: {
|
||||
label: 'AUTOTYPE_NAME',
|
||||
value: 'AUTOTYPE_ID',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "会员积分",
|
||||
width: 120,
|
||||
@ -730,9 +764,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
|
||||
expandable={{
|
||||
expandRowByClick: true
|
||||
}}
|
||||
scroll={{ x: '100%', y: 'calc(100vh - 450px)' }}
|
||||
scroll={{ x: '100%', y: 'calc(100vh - 460px)' }}
|
||||
headerTitle={<PageTitleBox props={props} />}
|
||||
search={{ span: 6 }}
|
||||
search={{ span: 6, defaultCollapsed: false }}
|
||||
request={async (params, sorter) => {
|
||||
|
||||
const sortstr = Object.keys(sorter).map(n => {
|
||||
@ -751,6 +785,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
|
||||
MEMBERSHIP_STATE: 1000,
|
||||
ACTIVE_DATE_Start: come === 'ActiveMemberStatistics' ? comeParams?.start || '' : '',
|
||||
ACTIVE_DATE_End: come === 'ActiveMemberStatistics' ? comeParams?.end || '' : '',
|
||||
MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "",
|
||||
ExcludeTest: ExcludeTest || ''
|
||||
},
|
||||
keyWord: {
|
||||
// PLATE_NUMBER
|
||||
@ -770,6 +806,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
|
||||
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === "1" ? "" : params?.MEMBERSHIP_TYPE,
|
||||
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === "1" ? "" : params?.MEMBERSHIP_LEVEL,
|
||||
MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE,
|
||||
MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : ""
|
||||
// PLATE_NUMBER: params?.MEMBERSHIP_NAME || ""
|
||||
},
|
||||
keyWord: {
|
||||
@ -809,6 +846,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT
|
||||
// const data = await handeGetMemberShipLicenseList(req)
|
||||
console.log('datadatadatadatadata', data);
|
||||
if (data.List && data.List.length > 0) {
|
||||
data.List.forEach((item: any) => {
|
||||
item.MEMBERSHIP_TARGET = item.MEMBERSHIP_TARGET ? [Number(item.MEMBERSHIP_TARGET)] : ""
|
||||
})
|
||||
return { data: data.List, success: true, total: data.TotalCount }
|
||||
}
|
||||
return { data: [], success: true }
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { connect } from "umi";
|
||||
import type { ConnectState } from "@/models/connect";
|
||||
import { Button } from "antd";
|
||||
import Popconfirm from "antd/es/popconfirm";
|
||||
|
||||
type DetailProps = {
|
||||
hideDelete?: boolean
|
||||
@ -9,19 +10,26 @@ type DetailProps = {
|
||||
handleCancel?: any
|
||||
hideOK?: boolean
|
||||
handleOK?: any
|
||||
confirmLoading?: boolean // 确认按钮的加载效果
|
||||
}
|
||||
const ModalFooter = ({ hideDelete, handleDelete, hideCancel, handleCancel, hideOK, handleOK }: DetailProps) => {
|
||||
const ModalFooter = ({ hideDelete, handleDelete, hideCancel, handleCancel, hideOK, handleOK, confirmLoading }: DetailProps) => {
|
||||
|
||||
return (
|
||||
<div style={{ width: '100%', boxSizing: 'border-box', padding: '0 12px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||
<div>
|
||||
{
|
||||
hideDelete ? "" :
|
||||
<Button type="primary" danger onClick={() => {
|
||||
<Popconfirm
|
||||
title="确认删除?"
|
||||
onConfirm={async () => {
|
||||
if (handleDelete) {
|
||||
handleDelete()
|
||||
}
|
||||
}}>删除</Button>
|
||||
}}
|
||||
>
|
||||
<Button type="primary" danger>删除</Button>
|
||||
</Popconfirm>
|
||||
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
@ -35,7 +43,7 @@ const ModalFooter = ({ hideDelete, handleDelete, hideCancel, handleCancel, hideO
|
||||
}
|
||||
{
|
||||
hideOK ? '' :
|
||||
<Button type={"primary"} onClick={() => {
|
||||
<Button type={"primary"} loading={confirmLoading} onClick={() => {
|
||||
if (handleOK) {
|
||||
handleOK()
|
||||
}
|
||||
|
||||
@ -1246,3 +1246,41 @@ export async function handeGetSynchroMEMBERSHIP(params: any) {
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
// 获取卡券详情
|
||||
export async function handeGetCOUPONDetail(params: any) {
|
||||
const data = await requestEncryption(`/Coupon/GetCOUPONDetail`, {
|
||||
method: 'POST',
|
||||
data: { ...params, requestEncryption: true }
|
||||
})
|
||||
if (data.Result_Code !== 100) {
|
||||
return data
|
||||
}
|
||||
return data.Result_Data
|
||||
}
|
||||
|
||||
|
||||
// 云南取枚举的
|
||||
export async function handeGetFieldEnumByFieldYN(params: any) {
|
||||
const data = await requestEncryption(`/FrameWork/GetFieldEnumByField`, {
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
if (data.Result_Code !== 100) {
|
||||
return data
|
||||
}
|
||||
return data.Result_Data.List
|
||||
}
|
||||
|
||||
// 删除商家信息
|
||||
export async function handeDeleteSERVERPARTSELLER(params: any) {
|
||||
const data = await requestEncryption(`/BaseInfo/DeleteSERVERPARTSELLER`, {
|
||||
method: 'POST',
|
||||
data: { ...params, requestEncryption: true }
|
||||
})
|
||||
if (data.Result_Code !== 100) {
|
||||
return data
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
@ -558,3 +558,18 @@ export function convertTreeToLabelValue<T>(
|
||||
return node;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function convertTreeFieldToNumber(tree: any[], key: string): any[] {
|
||||
return tree.map(node => {
|
||||
const newNode = {
|
||||
...node,
|
||||
[key]: typeof node[key] === 'number' ? node[key].toString() : node[key],
|
||||
};
|
||||
if (Array.isArray(node.children) && node.children.length > 0) {
|
||||
newNode.children = convertTreeFieldToNumber(node.children, key);
|
||||
}
|
||||
return newNode;
|
||||
});
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
// 由 scripts/writeVersion.js 自动生成
|
||||
export const VERSION = "4.5.17";
|
||||
export const GIT_HASH = "9900baf";
|
||||
export const BUILD_TIME = "2025-08-06T07:38:47.218Z";
|
||||
export const VERSION = "4.5.18";
|
||||
export const GIT_HASH = "a07144f";
|
||||
export const BUILD_TIME = "2025-08-06T11:01:18.410Z";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user