update
This commit is contained in:
parent
4e48dc4a94
commit
3fbb6dc0b0
BIN
src/assets/detail/orderIcon.png
Normal file
BIN
src/assets/detail/orderIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 516 B |
@ -23,10 +23,23 @@ import { handleDeleteSERVERPARTSELLER, handleGetMEMBERADDRESSList, handleGetRela
|
|||||||
import LeftSelectTree from '@/pages/reports/settlementAccount/component/leftSelectTree';
|
import LeftSelectTree from '@/pages/reports/settlementAccount/component/leftSelectTree';
|
||||||
import session from '@/utils/session';
|
import session from '@/utils/session';
|
||||||
import PageTitleBox from '@/components/PageTitleBox';
|
import PageTitleBox from '@/components/PageTitleBox';
|
||||||
|
import { handeGetCOMMENTList, handeGetPictureList } from '@/pages/travelMember/service';
|
||||||
|
import { deletePicture, uploadPicture } from '@/services/picture';
|
||||||
|
|
||||||
|
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 < 5;
|
||||||
|
if (!isLt2M) {
|
||||||
|
message.error('图片大小不超过 5MB!');
|
||||||
|
}
|
||||||
|
return isJpgOrPng && isLt2M;
|
||||||
|
}
|
||||||
|
|
||||||
const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
||||||
|
const { confirm } = Modal;
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
const formRef = useRef<FormInstance>();
|
const formRef = useRef<FormInstance>();
|
||||||
@ -51,6 +64,15 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
const [currentRowDetail, setCurrentRowDetail] = useState<any>()
|
const [currentRowDetail, setCurrentRowDetail] = useState<any>()
|
||||||
// 选择的 要关联的服务区
|
// 选择的 要关联的服务区
|
||||||
const [selectAssociationServerpart, setSelectAssociationServerpart] = useState<any>()
|
const [selectAssociationServerpart, setSelectAssociationServerpart] = useState<any>()
|
||||||
|
// 文件列表
|
||||||
|
const [fileList, setFileList] = useState<any>([])
|
||||||
|
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
|
||||||
|
// 商家logo图片列表
|
||||||
|
const [MerchantLogoList, setMerchantLogoList] = useState<any>([])
|
||||||
|
// 门头图片列表
|
||||||
|
const [DoorImageList, setDoorImageList] = useState<any>([])
|
||||||
|
// 内景图片列表
|
||||||
|
const [InteriorImage, setInteriorImageList] = useState<any>([])
|
||||||
|
|
||||||
|
|
||||||
let SHOPTRADEObj = session.get('SHOPTRADEObj')
|
let SHOPTRADEObj = session.get('SHOPTRADEObj')
|
||||||
@ -59,6 +81,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
let businessStateObj = session.get('businessStateObj')
|
let businessStateObj = session.get('businessStateObj')
|
||||||
let SERVERPARTTree = session.get('SERVERPARTTree')
|
let SERVERPARTTree = session.get('SERVERPARTTree')
|
||||||
let serverpartList = session.get('serverpartList')
|
let serverpartList = session.get('serverpartList')
|
||||||
|
let MEMBERSHIP_TYPEObj = session.get('MEMBERSHIP_TYPEObj');
|
||||||
|
|
||||||
|
|
||||||
// 弹出框拖动效果
|
// 弹出框拖动效果
|
||||||
@ -67,6 +90,9 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
const draggleRef = React.createRef<any>()
|
const draggleRef = React.createRef<any>()
|
||||||
// 显示新增门店功能悬浮框
|
// 显示新增门店功能悬浮框
|
||||||
const [showAddModal, setShowAddModal] = useState<boolean>(false)
|
const [showAddModal, setShowAddModal] = useState<boolean>(false)
|
||||||
|
// 评论列表
|
||||||
|
const [commentFileList, setCommentFileList] = useState<any>()
|
||||||
|
const [imageCommentPreviewVisible, setImageCommentPreviewVisible] = useState<boolean>(false) // 预览图片
|
||||||
|
|
||||||
const onDraggaleStart = (event, uiData) => {
|
const onDraggaleStart = (event, uiData) => {
|
||||||
const { clientWidth, clientHeight } = window.document.documentElement;
|
const { clientWidth, clientHeight } = window.document.documentElement;
|
||||||
@ -88,8 +114,10 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
{
|
{
|
||||||
dataIndex: 'SELLER_NAME',
|
dataIndex: 'SELLER_NAME',
|
||||||
title: '商家名称',
|
title: '商家名称',
|
||||||
|
width: 300,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record?.SELLER_NAME ? `${record?.SERVERPART_NAME || ""}${record?.SELLER_NAME}` : "-"
|
return record?.SELLER_NAME ? `${record?.SERVERPART_NAME || ""}${record?.SELLER_NAME}` : "-"
|
||||||
}
|
}
|
||||||
@ -100,6 +128,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
|
ellipsis: true,
|
||||||
valueEnum: SHOPTRADEObj,
|
valueEnum: SHOPTRADEObj,
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
@ -108,40 +137,123 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: '',
|
dataIndex: 'SCANCODE_ORDER',
|
||||||
title: '预约点餐',
|
title: '预约点餐',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.SCANCODE_ORDER === 1 ? '是' : '否'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'MONTHLYSALES',
|
dataIndex: 'ShopList',
|
||||||
title: '月销售量',
|
title: '门店数量',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.ShopList && record?.ShopList.length > 0 ? <a onClick={() => {
|
||||||
|
console.log('recordrecordrecordrecord', record);
|
||||||
|
setCurrentRow({ ...record });
|
||||||
|
handleModalVisible(true);
|
||||||
|
}}>{record?.ShopList.length}</a> : '-'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'PERCAPITA',
|
dataIndex: 'IconList',
|
||||||
title: '人均消费',
|
title: '商家logo',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.IconList && record?.IconList.length > 0 ? <a onClick={() => {
|
||||||
|
console.log('recordrecordrecordrecord', record);
|
||||||
|
setCurrentRow({ ...record });
|
||||||
|
handleModalVisible(true);
|
||||||
|
}}>{record?.IconList.length}</a> : '-'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'SELLER_SCORE',
|
dataIndex: 'DoorImgList',
|
||||||
title: '评价分数',
|
title: '门头图片',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.DoorImgList && record?.DoorImgList.length > 0 ? <a onClick={() => {
|
||||||
|
console.log('recordrecordrecordrecord', record);
|
||||||
|
setCurrentRow({ ...record });
|
||||||
|
handleModalVisible(true);
|
||||||
|
}}>{record?.DoorImgList.length}</a> : '-'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'COMMENT_COUNT',
|
dataIndex: 'InsideImgList',
|
||||||
title: '评价数量',
|
title: '内景图片',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.InsideImgList && record?.InsideImgList.length > 0 ? <a onClick={() => {
|
||||||
|
console.log('recordrecordrecordrecord', record);
|
||||||
|
setCurrentRow({ ...record });
|
||||||
|
handleModalVisible(true);
|
||||||
|
}}>{record?.InsideImgList.length}</a> : '-'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// dataIndex: 'MONTHLYSALES',
|
||||||
|
// title: '月销售量',
|
||||||
|
// align: 'center',
|
||||||
|
// width: 120,
|
||||||
|
// ellipsis: true,
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'PERCAPITA',
|
||||||
|
// title: '人均消费',
|
||||||
|
// align: 'center',
|
||||||
|
// width: 120,
|
||||||
|
// ellipsis: true,
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'SELLER_SCORE',
|
||||||
|
// title: '评价分数',
|
||||||
|
// align: 'center',
|
||||||
|
// width: 120,
|
||||||
|
// ellipsis: true,
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'COMMENT_COUNT',
|
||||||
|
// title: '评价数量',
|
||||||
|
// align: 'center',
|
||||||
|
// width: 120,
|
||||||
|
// ellipsis: true,
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
dataIndex: 'ISSHOW',
|
||||||
|
title: '小程序呈现',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
hideInSearch: true,
|
||||||
|
valueType: "select",
|
||||||
|
valueEnum: {
|
||||||
|
"-1": "全部",
|
||||||
|
"0": "否",
|
||||||
|
"1": "是"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'SERVERPARTSELLER_DESC',
|
dataIndex: 'SERVERPARTSELLER_DESC',
|
||||||
title: '备注说明',
|
title: '备注说明',
|
||||||
@ -156,6 +268,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
valueType: 'option',
|
valueType: 'option',
|
||||||
width: 120,
|
width: 120,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return (
|
return (
|
||||||
@ -363,52 +476,85 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
title: "序号",
|
title: "序号",
|
||||||
dataIndex: "index",
|
dataIndex: "index",
|
||||||
valueType: "index",
|
valueType: "index",
|
||||||
width: 80
|
width: 80,
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "评价时间",
|
title: "评价时间",
|
||||||
dataIndex: "",
|
dataIndex: "CREATE_DATE",
|
||||||
width: 150
|
width: 150,
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "评价人员",
|
title: "评价人员",
|
||||||
dataIndex: "",
|
dataIndex: "MEMBERSHIP_NAME",
|
||||||
width: 120
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "会员类型",
|
title: "会员类型",
|
||||||
dataIndex: "",
|
dataIndex: "MEMBERSHIP_TYPE",
|
||||||
width: 120
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: {
|
||||||
|
...MEMBERSHIP_TYPEObj,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "匿名评价",
|
title: "匿名评价",
|
||||||
dataIndex: "",
|
dataIndex: "ISANONYMOUS",
|
||||||
width: 120
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: {
|
||||||
|
"0": "否",
|
||||||
|
"1": "是",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "评分",
|
title: "评分",
|
||||||
dataIndex: "",
|
dataIndex: "COMMENT_SCORE",
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
width: 120
|
width: 120
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "评价内容",
|
title: "评价内容",
|
||||||
dataIndex: "",
|
dataIndex: "COMMENT_CONTENT",
|
||||||
width: 200
|
align: 'center',
|
||||||
},
|
ellipsis: true,
|
||||||
{
|
|
||||||
title: "回复内容",
|
|
||||||
dataIndex: "",
|
|
||||||
width: 200
|
width: 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "图片信息",
|
title: "图片信息",
|
||||||
dataIndex: "",
|
dataIndex: "ImageList",
|
||||||
width: 200
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
|
width: 200,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.ImageList && record?.ImageList.length > 0 ?
|
||||||
|
<img style={{ width: '60px', height: '60px', cursor: 'pointer', borderRadius: '8px' }} src={record?.ImageList[0].ImageUrl} onClick={() => {
|
||||||
|
let list: any = []
|
||||||
|
record?.ImageList.forEach((item: any) => {
|
||||||
|
list.push({ url: item.ImageUrl })
|
||||||
|
})
|
||||||
|
setCommentFileList(list)
|
||||||
|
handleChangePreview2(true)
|
||||||
|
}} /> : "-"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const handelDelete = async (id: number) => {
|
const handelDelete = async (id: number) => {
|
||||||
console.log('fjsdfsdflksa', id);
|
|
||||||
const req: any = {
|
const req: any = {
|
||||||
SERVERPARTSELLERId: id
|
SERVERPARTSELLERId: id
|
||||||
}
|
}
|
||||||
@ -442,13 +588,22 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('resresresres', res);
|
||||||
|
|
||||||
const data = await handleSynchroSERVERPARTSELLER(req)
|
const data = await handleSynchroSERVERPARTSELLER(req)
|
||||||
handleConfirmLoading(false)
|
handleConfirmLoading(false)
|
||||||
if (data.Result_Code === 100) {
|
if (data.Result_Code === 100) {
|
||||||
|
await handleUploadAllImage(res, data)
|
||||||
message.success(data.Result_Desc)
|
message.success(data.Result_Desc)
|
||||||
formRef?.current?.resetFields()
|
formRef?.current?.resetFields()
|
||||||
setCurrentRow(undefined)
|
handleConfirmLoading(false)
|
||||||
handleModalVisible(false)
|
handleModalVisible(false)
|
||||||
|
setCurrentRowDetail(null)
|
||||||
|
setCurrentRow(undefined)
|
||||||
|
setMerchantLogoList([])
|
||||||
|
setDoorImageList([])
|
||||||
|
setInteriorImageList([])
|
||||||
|
setCurrentShopData([])
|
||||||
actionRef.current?.reload()
|
actionRef.current?.reload()
|
||||||
} else {
|
} else {
|
||||||
message.error(data.Result_Desc)
|
message.error(data.Result_Desc)
|
||||||
@ -456,6 +611,52 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 上传三个图片的方法
|
||||||
|
// MerchantLogoList imageType 3000 TableType 1204
|
||||||
|
// DoorImageList imageType 1000 TableType 1204
|
||||||
|
// InteriorImage imageType 2000 TableType 1204
|
||||||
|
const handleUploadAllImage = async (formValue: any, result: any) => {
|
||||||
|
// formValue 表单的数据 result 商家的数据
|
||||||
|
// 上传商家logo
|
||||||
|
if (formValue.MerchantLogo && formValue.MerchantLogo.length > 0) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formValue.MerchantLogo.forEach((file: any) => {
|
||||||
|
formData.append('files[]', file.originFileObj);
|
||||||
|
formData.append('ImageName', typeof file !== 'string' ? file?.name : '');
|
||||||
|
});
|
||||||
|
formData.append('TableId', result?.Result_Data.SELLER_ID);
|
||||||
|
formData.append('imageType', "1000");
|
||||||
|
formData.append('TableType', "1204");
|
||||||
|
|
||||||
|
let res = await uploadPicture(formData)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (formValue.DoorImage && formValue.DoorImage.length > 0) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formValue.DoorImage.forEach((file: any) => {
|
||||||
|
formData.append('files[]', file.originFileObj);
|
||||||
|
formData.append('ImageName', typeof file !== 'string' ? file?.name : '');
|
||||||
|
});
|
||||||
|
formData.append('TableId', result?.Result_Data.SELLER_ID);
|
||||||
|
formData.append('imageType', "2000");
|
||||||
|
formData.append('TableType', "1204");
|
||||||
|
|
||||||
|
let res = await uploadPicture(formData)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (formValue.InteriorImage && formValue.InteriorImage.length > 0) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formValue.InteriorImage.forEach((file: any) => {
|
||||||
|
formData.append('files[]', file.originFileObj);
|
||||||
|
formData.append('ImageName', typeof file !== 'string' ? file?.name : '');
|
||||||
|
});
|
||||||
|
formData.append('TableId', result?.Result_Data.SELLER_ID);
|
||||||
|
formData.append('imageType', "3000");
|
||||||
|
formData.append('TableType', "1204");
|
||||||
|
|
||||||
|
let res = await uploadPicture(formData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 移除门店关联
|
// 移除门店关联
|
||||||
const handleRemoveSeller = async (obj: any) => {
|
const handleRemoveSeller = async (obj: any) => {
|
||||||
@ -473,7 +674,6 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 服务区商家的详情信息
|
// 服务区商家的详情信息
|
||||||
const handleGetMemberDetail = async () => {
|
const handleGetMemberDetail = async () => {
|
||||||
if (currentRow?.SELLER_ID) {
|
if (currentRow?.SELLER_ID) {
|
||||||
@ -493,7 +693,18 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 预览上传后的图片
|
||||||
|
const handlePreview = async (value: number) => {
|
||||||
|
setFileList(value === 1 ? MerchantLogoList : value === 2 ? DoorImageList : value === 3 ? InteriorImage : '')
|
||||||
|
setImagePreviewVisible(true)
|
||||||
|
};
|
||||||
|
const handleChangePreview = (val: any) => {
|
||||||
|
setImagePreviewVisible(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleChangePreview2 = (val: any) => {
|
||||||
|
setImageCommentPreviewVisible(val)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@ -525,7 +736,8 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
searchParameter: {
|
searchParameter: {
|
||||||
SERVERPART_IDS: selectedId,
|
SERVERPART_IDS: selectedId,
|
||||||
SHOPTRADES: params?.SHOPTRADES,
|
SHOPTRADES: params?.SHOPTRADES,
|
||||||
ISVALID: 1
|
ISVALID: 1,
|
||||||
|
ISSHOW: params?.ISSHOW === "-1" ? "" : params?.ISSHOW
|
||||||
},
|
},
|
||||||
PageIndex: params.current,
|
PageIndex: params.current,
|
||||||
PageSize: params.pageSize,
|
PageSize: params.pageSize,
|
||||||
@ -555,11 +767,41 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
</Button>,
|
</Button>,
|
||||||
],
|
],
|
||||||
}}
|
}}
|
||||||
pagination={{ defaultPageSize: 10 }}
|
pagination={{ defaultPageSize: 20 }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* 图片预览组件 */}
|
||||||
|
{fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
|
||||||
|
<Image.PreviewGroup
|
||||||
|
preview={{
|
||||||
|
visible: imagePreviewVisible,
|
||||||
|
onVisibleChange: vis => {
|
||||||
|
handleChangePreview(vis)
|
||||||
|
}
|
||||||
|
}}>
|
||||||
|
{
|
||||||
|
fileList.map((n) => <Image src={n.url} key={n.url} />)
|
||||||
|
}
|
||||||
|
</Image.PreviewGroup>
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
{/* 图片预览组件 */}
|
||||||
|
{commentFileList && commentFileList.length > 0 && <div style={{ display: 'none' }}>
|
||||||
|
<Image.PreviewGroup
|
||||||
|
preview={{
|
||||||
|
visible: imageCommentPreviewVisible,
|
||||||
|
onVisibleChange: vis => {
|
||||||
|
handleChangePreview2(vis)
|
||||||
|
}
|
||||||
|
}}>
|
||||||
|
{
|
||||||
|
commentFileList.map((n) => <Image src={n.url} key={n.url} />)
|
||||||
|
}
|
||||||
|
</Image.PreviewGroup>
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
{/* 添加服务区商家信息表 */}
|
{/* 添加服务区商家信息表 */}
|
||||||
<Modal
|
<Modal
|
||||||
@ -576,8 +818,6 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
}}
|
}}
|
||||||
okText={"关联"}
|
okText={"关联"}
|
||||||
onOk={async () => { // 提交框内的数据
|
onOk={async () => { // 提交框内的数据
|
||||||
console.log('selectedRowKeysselectedRowKeysselectedRowKeys', selectedRowKeys);
|
|
||||||
|
|
||||||
if (!(selectedRowKeys && selectedRowKeys.length > 0)) {
|
if (!(selectedRowKeys && selectedRowKeys.length > 0)) {
|
||||||
message.error('请选择要关联的门店!')
|
message.error('请选择要关联的门店!')
|
||||||
return
|
return
|
||||||
@ -632,7 +872,6 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
list.push(item)
|
list.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log('datadatadatadatadata2', list);
|
|
||||||
return { data: list, success: true }
|
return { data: list, success: true }
|
||||||
}
|
}
|
||||||
return { data: [], success: true }
|
return { data: [], success: true }
|
||||||
@ -653,6 +892,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
|
className="MerchantInformationModal"
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@ -675,6 +915,10 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
|
bodyStyle={{
|
||||||
|
maxHeight: '700px', // 你可以根据需要调整高度
|
||||||
|
overflowY: 'auto',
|
||||||
|
}}
|
||||||
width={'65%'}
|
width={'65%'}
|
||||||
visible={modalVisible}
|
visible={modalVisible}
|
||||||
confirmLoading={confirmLoading}
|
confirmLoading={confirmLoading}
|
||||||
@ -687,6 +931,10 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
handleModalVisible(false)
|
handleModalVisible(false)
|
||||||
setCurrentRowDetail(null)
|
setCurrentRowDetail(null)
|
||||||
setCurrentRow(null)
|
setCurrentRow(null)
|
||||||
|
setMerchantLogoList([])
|
||||||
|
setDoorImageList([])
|
||||||
|
setInteriorImageList([])
|
||||||
|
setCurrentShopData([])
|
||||||
}}
|
}}
|
||||||
// onOk={async () => { // 提交框内的数据
|
// onOk={async () => { // 提交框内的数据
|
||||||
// formRef?.current?.validateFields().then(() => {
|
// formRef?.current?.validateFields().then(() => {
|
||||||
@ -699,6 +947,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
bounds={bounds}
|
bounds={bounds}
|
||||||
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
||||||
|
handle=".MerchantInformationModal"
|
||||||
>
|
>
|
||||||
<div ref={draggleRef}>{modal}</div>
|
<div ref={draggleRef}>{modal}</div>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
@ -723,7 +972,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
setCurrentRowDetail(null)
|
setCurrentRowDetail(null)
|
||||||
setCurrentRow(null)
|
setCurrentRow(null)
|
||||||
}}>取消</Button>
|
}}>取消</Button>
|
||||||
<Button type={"primary"} onClick={() => {
|
<Button type={"primary"} loading={confirmLoading} onClick={() => {
|
||||||
formRef?.current?.validateFields().then(() => {
|
formRef?.current?.validateFields().then(() => {
|
||||||
handleConfirmLoading(true)
|
handleConfirmLoading(true)
|
||||||
formRef?.current?.submit()
|
formRef?.current?.submit()
|
||||||
@ -741,10 +990,86 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
preserve={false}
|
preserve={false}
|
||||||
request={async () => {
|
request={async () => {
|
||||||
const data = await handleGetMemberDetail()
|
const data = await handleGetMemberDetail()
|
||||||
return data
|
let list1: any = []
|
||||||
|
let list2: any = []
|
||||||
|
let list3: any = []
|
||||||
|
|
||||||
|
if (currentRow?.SELLER_ID) {
|
||||||
|
let req: any = {
|
||||||
|
TableId: currentRow?.SELLER_ID,
|
||||||
|
// TableName: '',
|
||||||
|
TableType: "1204",
|
||||||
|
ImageType: "1000",
|
||||||
|
}
|
||||||
|
const MerchantLogoData = await handeGetPictureList(req)
|
||||||
|
|
||||||
|
if (MerchantLogoData.List && MerchantLogoData.List.length > 0) {
|
||||||
|
if (MerchantLogoData.List && MerchantLogoData.List.length > 0) {
|
||||||
|
MerchantLogoData.List.forEach((item: any) => {
|
||||||
|
let obj = JSON.parse(JSON.stringify(item))
|
||||||
|
obj.url = obj.ImageUrl
|
||||||
|
obj.name = obj.ImageName
|
||||||
|
obj.uid = item.ImageId
|
||||||
|
obj.status = 'done'
|
||||||
|
list1.push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
setMerchantLogoList(list1);
|
||||||
|
}
|
||||||
|
|
||||||
|
let req2: any = {
|
||||||
|
TableId: currentRow?.SELLER_ID,
|
||||||
|
// TableName: '',
|
||||||
|
TableType: "1204",
|
||||||
|
ImageType: "2000",
|
||||||
|
}
|
||||||
|
const DoorImageData = await handeGetPictureList(req2)
|
||||||
|
if (DoorImageData.List && DoorImageData.List.length > 0) {
|
||||||
|
if (DoorImageData.List && DoorImageData.List.length > 0) {
|
||||||
|
DoorImageData.List.forEach((item: any) => {
|
||||||
|
let obj = JSON.parse(JSON.stringify(item))
|
||||||
|
obj.url = obj.ImageUrl
|
||||||
|
obj.name = obj.ImageName
|
||||||
|
obj.uid = item.ImageId
|
||||||
|
obj.status = 'done'
|
||||||
|
list2.push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
setDoorImageList(list2);
|
||||||
|
}
|
||||||
|
let req3: any = {
|
||||||
|
TableId: currentRow?.SELLER_ID,
|
||||||
|
// TableName: '',
|
||||||
|
TableType: "1204",
|
||||||
|
ImageType: "3000",
|
||||||
|
}
|
||||||
|
const InteriorImageData = await handeGetPictureList(req3)
|
||||||
|
if (InteriorImageData.List && InteriorImageData.List.length > 0) {
|
||||||
|
if (InteriorImageData.List && InteriorImageData.List.length > 0) {
|
||||||
|
InteriorImageData.List.forEach((item: any) => {
|
||||||
|
let obj = JSON.parse(JSON.stringify(item))
|
||||||
|
obj.url = obj.ImageUrl
|
||||||
|
obj.name = obj.ImageName
|
||||||
|
obj.uid = item.ImageId
|
||||||
|
obj.status = 'done'
|
||||||
|
list3.push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
setInteriorImageList(list3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
...data,
|
||||||
|
MerchantLogo: list1,
|
||||||
|
DoorImage: list2,
|
||||||
|
InteriorImage: list3,
|
||||||
|
}
|
||||||
// if (currentRow?.SELLER_ID) {
|
// if (currentRow?.SELLER_ID) {
|
||||||
// const data = await handleGetSERVERPARTSELLERDetail({ SERVERPARTSELLERId: currentRow?.SELLER_ID })
|
// const data = await handleGetSERVERPARTSELLERDetail({ SERVERPARTSELLERId: currentRow?.SELLER_ID })
|
||||||
// console.log('fdsjkfjsadl', data);
|
|
||||||
|
|
||||||
// setCurrentShopData(data.ShopList)
|
// setCurrentShopData(data.ShopList)
|
||||||
// setCurrentRowDetail(data)
|
// setCurrentRowDetail(data)
|
||||||
@ -927,21 +1252,144 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<ProFormUploadButton
|
<ProFormUploadButton
|
||||||
label={"商家Logo"}
|
label={"商家Logo"}
|
||||||
name={""}
|
name={"MerchantLogo"}
|
||||||
|
listType="picture-card"
|
||||||
|
accept="image/*"
|
||||||
|
fieldProps={{
|
||||||
|
beforeUpload,
|
||||||
|
onPreview: () => handlePreview(1),
|
||||||
|
fileList: MerchantLogoList, // 绑定 fileList
|
||||||
|
onChange: async (info: any) => {
|
||||||
|
if (info.file.status === 'removed') {
|
||||||
|
const index = MerchantLogoList.findIndex(n => n.uid === info.file.uid);
|
||||||
|
confirm({
|
||||||
|
title: '确认删除该文件吗?',
|
||||||
|
icon: <ExclamationCircleOutlined />,
|
||||||
|
async onOk() {
|
||||||
|
if (info.file.ImageId) {
|
||||||
|
const deleteLoading = message.loading('正在删除...')
|
||||||
|
const success = await deletePicture(info.file?.ImagePath, info.file?.uid, '', '6000')
|
||||||
|
deleteLoading()
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
const files = [...MerchantLogoList]
|
||||||
|
files.splice(index, 1)
|
||||||
|
setMerchantLogoList(files)
|
||||||
|
message.success("删除成功")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
message.error("删除失败")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const files = [...fileList];
|
||||||
|
files.splice(index, 1);
|
||||||
|
setMerchantLogoList(files);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setMerchantLogoList(info.fileList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<ProFormUploadButton
|
<ProFormUploadButton
|
||||||
label={"门头图片"}
|
label={"门头图片"}
|
||||||
name={""}
|
name={"DoorImage"}
|
||||||
|
listType="picture-card"
|
||||||
|
accept="image/*"
|
||||||
|
fieldProps={{
|
||||||
|
beforeUpload,
|
||||||
|
onPreview: () => handlePreview(2),
|
||||||
|
fileList: DoorImageList, // 绑定 fileList
|
||||||
|
onChange: async (info: any) => {
|
||||||
|
if (info.file.status === 'removed') {
|
||||||
|
const index = DoorImageList.findIndex(n => n.uid === info.file.uid);
|
||||||
|
confirm({
|
||||||
|
title: '确认删除该文件吗?',
|
||||||
|
icon: <ExclamationCircleOutlined />,
|
||||||
|
async onOk() {
|
||||||
|
if (info.file.ImageId) {
|
||||||
|
const deleteLoading = message.loading('正在删除...')
|
||||||
|
const success = await deletePicture(info.file?.ImagePath, info.file?.uid, '', '6000')
|
||||||
|
deleteLoading()
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
const files = [...DoorImageList]
|
||||||
|
files.splice(index, 1)
|
||||||
|
setDoorImageList(files)
|
||||||
|
message.success("删除成功")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
message.error("删除失败")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const files = [...fileList];
|
||||||
|
files.splice(index, 1);
|
||||||
|
setDoorImageList(files);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setDoorImageList(info.fileList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<ProFormUploadButton
|
<ProFormUploadButton
|
||||||
label={"内景图片"}
|
label={"内景图片"}
|
||||||
name={""}
|
name={"InteriorImage"}
|
||||||
|
listType="picture-card"
|
||||||
|
accept="image/*"
|
||||||
|
fieldProps={{
|
||||||
|
beforeUpload,
|
||||||
|
onPreview: () => handlePreview(3),
|
||||||
|
fileList: InteriorImage, // 绑定 fileList
|
||||||
|
onChange: async (info: any) => {
|
||||||
|
if (info.file.status === 'removed') {
|
||||||
|
const index = InteriorImage.findIndex(n => n.uid === info.file.uid);
|
||||||
|
confirm({
|
||||||
|
title: '确认删除该文件吗?',
|
||||||
|
icon: <ExclamationCircleOutlined />,
|
||||||
|
async onOk() {
|
||||||
|
if (info.file.ImageId) {
|
||||||
|
const deleteLoading = message.loading('正在删除...')
|
||||||
|
const success = await deletePicture(info.file?.ImagePath, info.file?.uid, '', '6000')
|
||||||
|
deleteLoading()
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
const files = [...InteriorImage]
|
||||||
|
files.splice(index, 1)
|
||||||
|
setInteriorImageList(files)
|
||||||
|
message.success("删除成功")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
message.error("删除失败")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const files = [...fileList];
|
||||||
|
files.splice(index, 1);
|
||||||
|
setInteriorImageList(files);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setInteriorImageList(info.fileList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
@ -960,13 +1408,20 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
style={{ display: selectTab === '2' ? 'block' : 'none' }}
|
style={{ display: selectTab === '2' ? 'block' : 'none' }}
|
||||||
request={async () => {
|
request={async () => {
|
||||||
const req: any = {
|
const req: any = {
|
||||||
|
searchParameter: {
|
||||||
|
MERCHANTS_ID: currentRow?.SELLER_ID
|
||||||
|
},
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 999999,
|
||||||
}
|
}
|
||||||
|
const data = await handeGetCOMMENTList(req)
|
||||||
|
console.log('评论数据', data);
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
return { data: data.List, success: true, total: data.TotalCount }
|
||||||
|
}
|
||||||
|
return { data: [], success: true }
|
||||||
}}
|
}}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
</ProForm>
|
</ProForm>
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -13,12 +13,18 @@ import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-desig
|
|||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import session from "@/utils/session";
|
import session from "@/utils/session";
|
||||||
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||||
|
import './style.less'
|
||||||
|
import orderIcon from '@/assets/detail/orderIcon.png'
|
||||||
|
import closeIcon from '@/assets/detail/closeIcon.png'
|
||||||
|
|
||||||
|
|
||||||
const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
const draggleRef = React.createRef<any>()
|
const draggleRef = React.createRef<any>()
|
||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
const formRef = useRef<FormInstance>();
|
const formRef = useRef<FormInstance>();
|
||||||
|
const modalRef = useRef<FormInstance>();
|
||||||
|
|
||||||
// 树相关的属性和方法
|
// 树相关的属性和方法
|
||||||
const [selectedId, setSelectedId] = useState<string>()
|
const [selectedId, setSelectedId] = useState<string>()
|
||||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||||
@ -82,6 +88,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record?.SALEBILL_CODE ? <a onClick={() => {
|
return record?.SALEBILL_CODE ? <a onClick={() => {
|
||||||
|
console.log('recordrecordrecordrecord', record);
|
||||||
setCurrentRow(record);
|
setCurrentRow(record);
|
||||||
handleModalVisible(true)
|
handleModalVisible(true)
|
||||||
}}>{record?.SALEBILL_CODE}</a> : "-"
|
}}>{record?.SALEBILL_CODE}</a> : "-"
|
||||||
@ -221,6 +228,13 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// 关闭悬浮框
|
||||||
|
const handleCloseModal = () => {
|
||||||
|
handleConfirmLoading(false)
|
||||||
|
handleModalVisible(false)
|
||||||
|
setCurrentRow(undefined);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||||
@ -289,27 +303,30 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
|
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title={
|
className="BookingMealOrderDetailModal"
|
||||||
<div
|
// title={
|
||||||
style={{
|
// <div
|
||||||
width: '100%',
|
// style={{
|
||||||
cursor: 'move',
|
// width: '100%',
|
||||||
}}
|
// cursor: 'move',
|
||||||
onMouseOver={() => {
|
// }}
|
||||||
if (disabled) {
|
// onMouseOver={() => {
|
||||||
setDraggleDisabled(false)
|
// if (disabled) {
|
||||||
}
|
// setDraggleDisabled(false)
|
||||||
}}
|
// }
|
||||||
onMouseOut={() => {
|
// }}
|
||||||
setDraggleDisabled(true)
|
// onMouseOut={() => {
|
||||||
}}
|
// setDraggleDisabled(true)
|
||||||
|
// }}
|
||||||
|
|
||||||
onFocus={() => { }}
|
// onFocus={() => { }}
|
||||||
onBlur={() => { }}
|
// onBlur={() => { }}
|
||||||
>
|
// >
|
||||||
{'订单详情'}
|
// {'订单详情'}
|
||||||
</div>
|
// </div>
|
||||||
}
|
// }
|
||||||
|
title={false}
|
||||||
|
closeIcon={<div></div>}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
width={1200}
|
width={1200}
|
||||||
visible={modalVisible}
|
visible={modalVisible}
|
||||||
@ -329,16 +346,200 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
bounds={bounds}
|
bounds={bounds}
|
||||||
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
||||||
|
handle=".bookingOrderModalTop"
|
||||||
>
|
>
|
||||||
<div ref={draggleRef}>{modal}</div>
|
<div ref={draggleRef}>{modal}</div>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<ProForm
|
||||||
|
layout={'horizontal'}
|
||||||
|
formRef={modalRef}
|
||||||
|
submitter={false}
|
||||||
|
initialValues={currentRow ? {
|
||||||
|
...currentRow,
|
||||||
|
ORDER_DATE: currentRow?.ORDER_DATE ? moment(currentRow?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : ''
|
||||||
|
} : {}}
|
||||||
|
>
|
||||||
|
<div className="bookingOrderModalTop">
|
||||||
|
<div className="modalTopLeft">
|
||||||
|
<img className="memberIcon" src={orderIcon} />
|
||||||
|
<span className="modalTitle">订单详情</span>
|
||||||
|
</div>
|
||||||
|
<div className="modalTopRight">
|
||||||
|
<img className="memberIcon" src={closeIcon} onClick={() => {
|
||||||
|
handleCloseModal()
|
||||||
|
}} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="bookingOrderModalCenter">
|
||||||
|
<div className="smallTitle">订单信息</div>
|
||||||
|
|
||||||
|
<Row gutter={8}>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"SALEBILL_CODE"}
|
||||||
|
label={"订单编码"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormSelect
|
||||||
|
name={"CHANNEL_TYPE"}
|
||||||
|
label={"支付渠道"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"ORDER_DATE"}
|
||||||
|
label={"下单时间"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"RECORD_COUNT"}
|
||||||
|
label={"商品种类"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"TOTAL_COUNT"}
|
||||||
|
label={"商品件数"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"ORDER_AMOUNT"}
|
||||||
|
label={"订单金额"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"COUPON_AMOUNT"}
|
||||||
|
label={"优惠金额"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"PACK_AMOUNT"}
|
||||||
|
label={"打包金额"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"CONSUME_SCORE"}
|
||||||
|
label={"使用积分"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"PAY_AMOUNT"}
|
||||||
|
label={"实付金额"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"COST_AMOUNT"}
|
||||||
|
label={"成本金额"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormSelect
|
||||||
|
name={"SALEBILL_STATE"}
|
||||||
|
label={"订单状态"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
options={[
|
||||||
|
{ label: "订单待支付", value: 1005 },
|
||||||
|
{ label: "订单待制作", value: 1010 },
|
||||||
|
{ label: "订单待取餐", value: 2000 },
|
||||||
|
{ label: "订单已完成", value: 3000 },
|
||||||
|
{ label: "退款申请中", value: 8000 },
|
||||||
|
{ label: "订单已退款", value: 8900 },
|
||||||
|
{ label: "订单已关闭", value: 9000 },
|
||||||
|
{ label: "订单已撤销", value: 9999 },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormSelect
|
||||||
|
name={"COMMENT_STATE"}
|
||||||
|
label={"订单评价状态"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
options={[
|
||||||
|
{ label: "未评价", value: 0 },
|
||||||
|
{ label: "已评价", value: 1 },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormSelect
|
||||||
|
name={"TAKE_TYPE"}
|
||||||
|
label={"取餐方式"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
options={[
|
||||||
|
{ label: "堂食", value: 1000 },
|
||||||
|
{ label: "预约", value: 2000 },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormSelect
|
||||||
|
name={"PACK_TYPE"}
|
||||||
|
label={"就餐方式"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
options={[
|
||||||
|
{ label: "堂食", value: 1000 },
|
||||||
|
{ label: "打包", value: 2000 },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormSelect
|
||||||
|
name={"TAKE_NUMBER"}
|
||||||
|
label={"取餐码"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
</ProForm>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ProTable
|
<ProTable
|
||||||
columns={orderDetailColumns}
|
columns={orderDetailColumns}
|
||||||
bordered
|
bordered
|
||||||
search={false}
|
search={false}
|
||||||
|
options={false}
|
||||||
request={async () => {
|
request={async () => {
|
||||||
const req: any = {
|
const req: any = {
|
||||||
searchParameter: {
|
searchParameter: {
|
||||||
|
|||||||
106
src/pages/travelMember/BookingMealOrder/style.less
Normal file
106
src/pages/travelMember/BookingMealOrder/style.less
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
.BookingMealOrderDetailModal {
|
||||||
|
.react-draggable {
|
||||||
|
.ant-modal-content {
|
||||||
|
border-radius: 16px;
|
||||||
|
|
||||||
|
.ant-modal-body {
|
||||||
|
padding: 0;
|
||||||
|
height: 800px;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.ant-form {
|
||||||
|
.bookingOrderModalTop {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-bottom: 1px solid #D5D8DE;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30px 20px;
|
||||||
|
|
||||||
|
.modalTopLeft {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.memberIcon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modalTitle {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 18px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
line-height: 18px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.modalTopRight {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
|
||||||
|
.memberIcon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bookingOrderModalCenter {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin-top: 14px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 34px;
|
||||||
|
|
||||||
|
.smallTitle {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 10px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.smallTitle::after {
|
||||||
|
content: "";
|
||||||
|
width: 2px;
|
||||||
|
height: 14px;
|
||||||
|
background-color: #155DFE;
|
||||||
|
position: relative;
|
||||||
|
left: -5px;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.ant-row {
|
||||||
|
.memberInfoDetailItem {
|
||||||
|
.ant-form-item {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-modal-body::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -42,11 +42,28 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
const [searchParams, setSearchParams] = useState<any>()
|
const [searchParams, setSearchParams] = useState<any>()
|
||||||
|
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
|
{
|
||||||
|
title: '查询时间',
|
||||||
|
dataIndex: 'search_date',
|
||||||
|
valueType: 'dateRange',
|
||||||
|
hideInTable: true,
|
||||||
|
hideInDescriptions: true,
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return {
|
||||||
|
CHECK_STARTDATE: value[0],
|
||||||
|
CHECK_ENDDATE: value[1],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "服务区名称",
|
title: "服务区名称",
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "SERVERPART_NAME",
|
dataIndex: "SERVERPART_NAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -54,22 +71,28 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "SHOPNAME",
|
dataIndex: "SHOPNAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "消费类型",
|
title: "消费类型",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "CONSUMPTIONRECORD_TYPE",
|
dataIndex: "CONSUMPTIONRECORD_TYPE",
|
||||||
hideInSearch: true,
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: CONSUMPTIONRECORDTYPEObj
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
|
...CONSUMPTIONRECORDTYPEObj
|
||||||
|
},
|
||||||
|
initialValue: "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "订单金额",
|
title: "订单金额",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "CONSUME_AMOUNT",
|
dataIndex: "CONSUME_AMOUNT",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
@ -79,6 +102,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
dataIndex: "CONSUME_PRICE",
|
dataIndex: "CONSUME_PRICE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -86,6 +110,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "CONSUME_SCORE",
|
dataIndex: "CONSUME_SCORE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
@ -95,18 +120,21 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
dataIndex: "PAY_AMOUNT",
|
dataIndex: "PAY_AMOUNT",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "优惠金额",
|
title: "优惠金额",
|
||||||
width: 150,
|
width: 120,
|
||||||
dataIndex: "COUPON_AMOUNT",
|
dataIndex: "COUPON_AMOUNT",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "消费时间 ",
|
title: "消费时间 ",
|
||||||
width: 150,
|
width: 150,
|
||||||
|
align: 'center',
|
||||||
dataIndex: "CONSUMPTIONRECORD_DATE",
|
dataIndex: "CONSUMPTIONRECORD_DATE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
@ -145,9 +173,10 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
const req: any = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OWNERUNIT_ID: 911
|
OWNERUNIT_ID: 911,
|
||||||
|
CONSUMPTIONRECORD_TYPE: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: params?.current,
|
||||||
PageSize: 20
|
PageSize: 20
|
||||||
}
|
}
|
||||||
const data = await handleGetCONSUMPTIONRECORDList(req)
|
const data = await handleGetCONSUMPTIONRECORDList(req)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// 成长值记录查询
|
// 成长值记录查询 成长记录查询
|
||||||
import { connect } from "umi";
|
import { connect } from "umi";
|
||||||
import type { CurrentUser } from "umi";
|
import type { CurrentUser } from "umi";
|
||||||
import type { ConnectState } from "@/models/connect";
|
import type { ConnectState } from "@/models/connect";
|
||||||
@ -15,6 +15,7 @@ import ReactHTMLTableToExcel from "react-html-table-to-excel";
|
|||||||
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
import { handleGetMEMBERGROWTHList } from "../service";
|
import { handleGetMEMBERGROWTHList } from "../service";
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
|
|
||||||
const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -39,11 +40,28 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
const [searchParams, setSearchParams] = useState<any>()
|
const [searchParams, setSearchParams] = useState<any>()
|
||||||
|
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
|
{
|
||||||
|
title: '查询时间',
|
||||||
|
dataIndex: 'search_date',
|
||||||
|
valueType: 'dateRange',
|
||||||
|
hideInTable: true,
|
||||||
|
hideInDescriptions: true,
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return {
|
||||||
|
CHECK_STARTDATE: value[0],
|
||||||
|
CHECK_ENDDATE: value[1],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "服务区名称",
|
title: "服务区名称",
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "SERVERPART_NAME",
|
dataIndex: "SERVERPART_NAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -51,6 +69,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "SHOPNAME",
|
dataIndex: "SHOPNAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -58,6 +77,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "MEMBERSHIP_GROWTH",
|
dataIndex: "MEMBERSHIP_GROWTH",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'digit'
|
valueType: 'digit'
|
||||||
},
|
},
|
||||||
@ -66,6 +86,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "CURRENT_GROWTH",
|
dataIndex: "CURRENT_GROWTH",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'digit'
|
valueType: 'digit'
|
||||||
},
|
},
|
||||||
@ -73,31 +94,36 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
title: "成长来源",
|
title: "成长来源",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "GROWTH_VALUE",
|
dataIndex: "GROWTH_VALUE",
|
||||||
hideInSearch: true,
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
"1000": "消费赠送",
|
"1000": "消费赠送",
|
||||||
"2000": "消费抵扣",
|
"2000": "消费抵扣",
|
||||||
"3000": "注册赠送",
|
"3000": "注册赠送",
|
||||||
}
|
},
|
||||||
|
initialValue: "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "成长方式",
|
title: "成长方式",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "GROWTH_TYPE",
|
dataIndex: "GROWTH_TYPE",
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
|
"-2": "全部",
|
||||||
"1": "积累",
|
"1": "积累",
|
||||||
"-1": "消耗",
|
"-1": "消耗",
|
||||||
}
|
},
|
||||||
|
initialValue: "-2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作时间",
|
title: "操作时间",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "OPERATE_DATE",
|
dataIndex: "OPERATE_DATE",
|
||||||
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-"
|
return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-"
|
||||||
@ -138,9 +164,11 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
searchParameter: {
|
searchParameter: {
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
SCORESETTING_STATE: 1
|
SCORESETTING_STATE: 1,
|
||||||
|
GROWTH_VALUES: params?.GROWTH_VALUE === "0" ? "" : params?.GROWTH_VALUE,
|
||||||
|
GROWTH_TYPE: params?.GROWTH_TYPE === "-2" ? '' : params?.GROWTH_TYPE
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: params?.current,
|
||||||
PageSize: 20
|
PageSize: 20
|
||||||
}
|
}
|
||||||
const data = await handleGetMEMBERGROWTHList(req);
|
const data = await handleGetMEMBERGROWTHList(req);
|
||||||
|
|||||||
@ -430,12 +430,6 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="MEMBERSHIP_TYPE"
|
name="MEMBERSHIP_TYPE"
|
||||||
label="会员类型"
|
label="会员类型"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择会员类型'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
options={MEMBERSHIP_TYPEList}
|
options={MEMBERSHIP_TYPEList}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
@ -443,12 +437,6 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="MEMBERSHIP_LEVEL"
|
name="MEMBERSHIP_LEVEL"
|
||||||
label="会员等级"
|
label="会员等级"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择会员等级'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
options={MEMBERSHIP_LEVELList}
|
options={MEMBERSHIP_LEVELList}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
@ -456,12 +444,6 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="PROMOTION_LEVEL"
|
name="PROMOTION_LEVEL"
|
||||||
label="晋升等级"
|
label="晋升等级"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入晋升等级'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
options={MEMBERSHIP_LEVELList}
|
options={MEMBERSHIP_LEVELList}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
@ -469,36 +451,18 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
<ProFormText
|
<ProFormText
|
||||||
name="GROWTH_VALUE"
|
name="GROWTH_VALUE"
|
||||||
label="所需成长值"
|
label="所需成长值"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入所需成长值'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="GROWTHDAILY_CAP"
|
name="GROWTHDAILY_CAP"
|
||||||
label="每日上限"
|
label="每日上限"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入每日上限'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="GROWTHTOTAL_CAP"
|
name="GROWTHTOTAL_CAP"
|
||||||
label="总上限值"
|
label="总上限值"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入总上限值'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|||||||
@ -4,9 +4,9 @@ import type { CurrentUser } from "umi";
|
|||||||
import type { ConnectState } from "@/models/connect";
|
import type { ConnectState } from "@/models/connect";
|
||||||
import React, { useRef, useState } from "react";
|
import React, { useRef, useState } from "react";
|
||||||
import ProCard from "@ant-design/pro-card";
|
import ProCard from "@ant-design/pro-card";
|
||||||
import { MenuFoldOutlined, PlusOutlined } from "@ant-design/icons";
|
import { ExclamationCircleOutlined, MenuFoldOutlined, PlusOutlined } from "@ant-design/icons";
|
||||||
import type { FormInstance } from "antd";
|
import type { FormInstance } from "antd";
|
||||||
import { Button, Col, Form, message, Modal, Popconfirm, Row, Space, Spin, Tree, TreeSelect } from "antd";
|
import { Button, Col, Form, message, Modal, Popconfirm, Row, Space, Spin, Tree, Image, TreeSelect } from "antd";
|
||||||
import useRequest from "@ahooksjs/use-request";
|
import useRequest from "@ahooksjs/use-request";
|
||||||
import { getServerpartTree } from "@/services/options";
|
import { getServerpartTree } from "@/services/options";
|
||||||
import type { ActionType } from "@ant-design/pro-table";
|
import type { ActionType } from "@ant-design/pro-table";
|
||||||
@ -16,12 +16,25 @@ import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSele
|
|||||||
import { handlDeleteBRAND, handleGetBRANDList, handleSynchroBRAND } from "../service";
|
import { handlDeleteBRAND, handleGetBRANDList, handleSynchroBRAND } from "../service";
|
||||||
import session from "@/utils/session";
|
import session from "@/utils/session";
|
||||||
import Draggable from "react-draggable";
|
import Draggable from "react-draggable";
|
||||||
import ProForm, { ProFormDatePicker, ProFormDigit, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
|
import ProForm, { ProFormDatePicker, ProFormDigit, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea, ProFormUploadButton } from "@ant-design/pro-form";
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
|
import { deletePicture, uploadPicture } from "@/services/picture";
|
||||||
|
|
||||||
|
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 < 5;
|
||||||
|
if (!isLt2M) {
|
||||||
|
message.error('图片大小不超过 5MB!');
|
||||||
|
}
|
||||||
|
return isJpgOrPng && isLt2M;
|
||||||
|
}
|
||||||
|
|
||||||
const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
|
const { confirm } = Modal;
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
const downloadBtnRef = useRef<any>()
|
const downloadBtnRef = useRef<any>()
|
||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
@ -52,7 +65,9 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
|
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
|
||||||
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
|
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
|
||||||
const [selectBrandList, setSelectBrandList] = useState<any>([])
|
const [selectBrandList, setSelectBrandList] = useState<any>([])
|
||||||
|
// 文件列表
|
||||||
|
const [fileList, setFileList] = useState<any>([])
|
||||||
|
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
|
||||||
const onDraggaleStart = (event, uiData) => {
|
const onDraggaleStart = (event, uiData) => {
|
||||||
const { clientWidth, clientHeight } = window.document.documentElement;
|
const { clientWidth, clientHeight } = window.document.documentElement;
|
||||||
const targetRect = draggleRef.current?.getBoundingClientRect();
|
const targetRect = draggleRef.current?.getBoundingClientRect();
|
||||||
@ -113,12 +128,13 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
title: '有效状态',
|
title: '有效状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
hideInSearch: true,
|
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
|
"-1": "全部",
|
||||||
"1": "有效",
|
"1": "有效",
|
||||||
"0": "无效"
|
"0": "无效"
|
||||||
}
|
},
|
||||||
|
initialValue: "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'BRAND_DESC',
|
dataIndex: 'BRAND_DESC',
|
||||||
@ -141,6 +157,10 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
<Space>
|
<Space>
|
||||||
<a
|
<a
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
console.log('recordrecordrecord', record);
|
||||||
|
if (record?.BRAND_INTRO) {
|
||||||
|
setFileList([{ url: record?.BRAND_INTRO }])
|
||||||
|
}
|
||||||
setCurrentRow({ ...record });
|
setCurrentRow({ ...record });
|
||||||
handleModalVisible(true);
|
handleModalVisible(true);
|
||||||
}}
|
}}
|
||||||
@ -176,11 +196,29 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleAddUpdate = async (res: any) => {
|
const handleAddUpdate = async (res: any) => {
|
||||||
|
let imgData: string = ''
|
||||||
|
if (res.brandImgList && res.brandImgList.length > 0) {
|
||||||
|
const formData = new FormData();
|
||||||
|
res.brandImgList.forEach((file: any) => {
|
||||||
|
formData.append('files[]', file.originFileObj);
|
||||||
|
formData.append('ImageName', typeof file !== 'string' ? file?.name : '');
|
||||||
|
});
|
||||||
|
formData.append('TableId', '111');
|
||||||
|
// formData.append('imageType', "1204");
|
||||||
|
formData.append('TableType', "1125");
|
||||||
|
|
||||||
|
let imgRes = await uploadPicture(formData)
|
||||||
|
console.log('imgResimgResimgResimgRes', imgRes);
|
||||||
|
imgData = imgRes.Result_Data.ImageUrl
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let req: any = {}
|
let req: any = {}
|
||||||
if (currentRow?.SELLER_ID) {
|
if (currentRow?.SELLER_ID) {
|
||||||
req = {
|
req = {
|
||||||
...currentRow,
|
...currentRow,
|
||||||
...res,
|
...res,
|
||||||
|
BRAND_INTRO: fileList && fileList.length > 0 ? imgData || currentRow?.BRAND_INTRO || "" : "",
|
||||||
BRAND_CATEGORY: 2000,
|
BRAND_CATEGORY: 2000,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
STAFF_ID: currentUser?.ID,
|
STAFF_ID: currentUser?.ID,
|
||||||
@ -190,6 +228,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...res,
|
...res,
|
||||||
|
BRAND_INTRO: imgData || "",
|
||||||
BRAND_CATEGORY: 2000,
|
BRAND_CATEGORY: 2000,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
STAFF_ID: currentUser?.ID,
|
STAFF_ID: currentUser?.ID,
|
||||||
@ -206,12 +245,21 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
formRef?.current?.resetFields()
|
formRef?.current?.resetFields()
|
||||||
handleModalVisible(false)
|
handleModalVisible(false)
|
||||||
actionRef.current?.reload()
|
actionRef.current?.reload()
|
||||||
|
setFileList([])
|
||||||
} else {
|
} else {
|
||||||
message.error(data.Result_Desc)
|
message.error(data.Result_Desc)
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 预览上传后的图片
|
||||||
|
const handlePreview = async () => {
|
||||||
|
setFileList(file)
|
||||||
|
setImagePreviewVisible(true)
|
||||||
|
};
|
||||||
|
const handleChangePreview = (val: any) => {
|
||||||
|
setImagePreviewVisible(val)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={(el) => {
|
<div ref={(el) => {
|
||||||
@ -248,7 +296,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
BRAND_TYPE: params?.BRAND_TYPE,
|
BRAND_TYPE: params?.BRAND_TYPE,
|
||||||
BRAND_STATE: 1,
|
BRAND_STATE: params?.BRAND_STATE === '-1' ? '' : params?.BRAND_STATE,
|
||||||
BRAND_CATEGORY: 2000
|
BRAND_CATEGORY: 2000
|
||||||
},
|
},
|
||||||
keyWord: {
|
keyWord: {
|
||||||
@ -289,10 +337,26 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* 图片预览组件 */}
|
||||||
|
{fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
|
||||||
|
<Image.PreviewGroup
|
||||||
|
preview={{
|
||||||
|
visible: imagePreviewVisible,
|
||||||
|
onVisibleChange: vis => {
|
||||||
|
handleChangePreview(vis)
|
||||||
|
}
|
||||||
|
}}>
|
||||||
|
{
|
||||||
|
fileList.map((n) => <Image src={n.url} key={n.url} />)
|
||||||
|
}
|
||||||
|
</Image.PreviewGroup>
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
|
className="brandManager"
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
@ -323,6 +387,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
handleConfirmLoading(false)
|
handleConfirmLoading(false)
|
||||||
handleModalVisible(false)
|
handleModalVisible(false)
|
||||||
|
setFileList([])
|
||||||
}}
|
}}
|
||||||
|
|
||||||
onOk={async () => { // 提交框内的数据
|
onOk={async () => { // 提交框内的数据
|
||||||
@ -336,6 +401,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
bounds={bounds}
|
bounds={bounds}
|
||||||
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
||||||
|
handle=".brandManager"
|
||||||
>
|
>
|
||||||
<div ref={draggleRef}>{modal}</div>
|
<div ref={draggleRef}>{modal}</div>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
@ -432,6 +498,59 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
|
<ProFormUploadButton
|
||||||
|
label={"品牌图标"}
|
||||||
|
name={"brandImgList"}
|
||||||
|
listType="picture-card"
|
||||||
|
accept="image/*"
|
||||||
|
fieldProps={{
|
||||||
|
beforeUpload,
|
||||||
|
onPreview: handlePreview,
|
||||||
|
fileList: fileList, // 绑定 fileList
|
||||||
|
onChange: async (info: any) => {
|
||||||
|
if (info.file.status === 'removed') {
|
||||||
|
const index = fileList.findIndex(n => n.uid === info.file.uid);
|
||||||
|
confirm({
|
||||||
|
title: '确认删除该文件吗?',
|
||||||
|
icon: <ExclamationCircleOutlined />,
|
||||||
|
async onOk() {
|
||||||
|
if (info.file.ImageId) {
|
||||||
|
const deleteLoading = message.loading('正在删除...')
|
||||||
|
const success = await deletePicture(info.file?.ImagePath, info.file?.uid, '', '6000')
|
||||||
|
deleteLoading()
|
||||||
|
if (success) {
|
||||||
|
const files = [...fileList]
|
||||||
|
files.splice(index, 1)
|
||||||
|
setFileList(files)
|
||||||
|
message.success("删除成功")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
message.error("删除失败")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const files = [...fileList];
|
||||||
|
files.splice(index, 1);
|
||||||
|
setFileList(files);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 只保留最新上传的那一张图片
|
||||||
|
let newFileList = info.fileList;
|
||||||
|
if (newFileList.length > 1) {
|
||||||
|
newFileList = [newFileList[newFileList.length - 1]];
|
||||||
|
}
|
||||||
|
setFileList(newFileList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
name="BRAND_DESC"
|
name="BRAND_DESC"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// 地址管理
|
// 地址管理 会员地址管理
|
||||||
import React, { useRef, useState, Suspense, useEffect } from 'react';
|
import React, { useRef, useState, Suspense, useEffect } from 'react';
|
||||||
import moment from 'moment'; // 时间相关引用,没有使用可以删除
|
import moment from 'moment'; // 时间相关引用,没有使用可以删除
|
||||||
import numeral from "numeral"; // 数字相关引用,没有使用可以删除
|
import numeral from "numeral"; // 数字相关引用,没有使用可以删除
|
||||||
@ -29,7 +29,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
const modalActionRef = useRef<ActionType>();
|
const modalActionRef = useRef<ActionType>();
|
||||||
const formRef = useRef<FormInstance>();
|
const formRef = useRef<FormInstance>();
|
||||||
const [currentRow, setCurrentRow] = useState<MEMBERADDRESSModel>();
|
const [currentRow, setCurrentRow] = useState<any>();
|
||||||
const [showDetail, setShowDetail] = useState<boolean>();
|
const [showDetail, setShowDetail] = useState<boolean>();
|
||||||
const [modalVisible, handleModalVisible] = useState<boolean>();
|
const [modalVisible, handleModalVisible] = useState<boolean>();
|
||||||
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
|
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
|
||||||
@ -266,6 +266,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
title: '收货人名称',
|
title: '收货人名称',
|
||||||
width: 150,
|
width: 150,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
hideInSearch: true
|
hideInSearch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -286,6 +287,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
title: '手机号码',
|
title: '手机号码',
|
||||||
width: 150,
|
width: 150,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -293,12 +295,13 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
title: '省/直辖市',
|
title: '省/直辖市',
|
||||||
width: 120,
|
width: 120,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'RECEIVE_CITY',
|
dataIndex: 'RECEIVE_CITY',
|
||||||
title: '城市/直辖市',
|
title: '城市/直辖市',
|
||||||
width: 120,
|
width: 150,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
@ -329,6 +332,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
width: 120,
|
width: 120,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
"1": "是",
|
"1": "是",
|
||||||
@ -341,6 +345,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
width: 120,
|
width: 120,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
"1000": "家",
|
"1000": "家",
|
||||||
@ -544,6 +549,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
columns={drawerColumns}
|
columns={drawerColumns}
|
||||||
headerTitle={"用户地址"}
|
headerTitle={"用户地址"}
|
||||||
actionRef={modalActionRef}
|
actionRef={modalActionRef}
|
||||||
|
bordered
|
||||||
request={async (params, sorter) => {
|
request={async (params, sorter) => {
|
||||||
const req = {
|
const req = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
|
|||||||
@ -26,6 +26,22 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
|
|
||||||
|
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
|
{
|
||||||
|
title: '评价时间',
|
||||||
|
dataIndex: 'search_date',
|
||||||
|
valueType: 'dateRange',
|
||||||
|
hideInTable: true,
|
||||||
|
hideInDescriptions: true,
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return {
|
||||||
|
CREATE_DATE_Start: value[0],
|
||||||
|
CREATE_DATE_End: value[1],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
initialValue: [moment().format('YYYY-MM-DD'), moment().add(-1, 'M').format('YYYY-MM-DD')],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "序号",
|
title: "序号",
|
||||||
dataIndex: "index",
|
dataIndex: "index",
|
||||||
@ -36,8 +52,8 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "商家名称",
|
title: "商家名称",
|
||||||
dataIndex: "MERCHANTS_ID",
|
dataIndex: "SELLER_NAME",
|
||||||
width: 300,
|
width: 270,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
@ -45,7 +61,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
{
|
{
|
||||||
title: "评价时间",
|
title: "评价时间",
|
||||||
dataIndex: "CREATE_DATE",
|
dataIndex: "CREATE_DATE",
|
||||||
width: 180,
|
width: 170,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
@ -55,7 +71,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "评价人员",
|
title: "评价人员",
|
||||||
dataIndex: "UPDATE_STAFF_NAME",
|
dataIndex: "MEMBERSHIP_NAME",
|
||||||
width: 150,
|
width: 150,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@ -63,7 +79,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "会员类型",
|
title: "会员类型",
|
||||||
dataIndex: "会员类型",
|
dataIndex: "MEMBERSHIP_TYPE",
|
||||||
width: 150,
|
width: 150,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@ -71,11 +87,14 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "消费评价",
|
title: "消费评价",
|
||||||
dataIndex: "消费评价",
|
dataIndex: "SALEBILL_ID",
|
||||||
width: 120,
|
width: 120,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.SALEBILL_ID ? '是' : '-'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "评分",
|
title: "评分",
|
||||||
@ -93,14 +112,14 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: "回复内容",
|
// title: "回复内容",
|
||||||
dataIndex: "回复内容",
|
// dataIndex: "回复内容",
|
||||||
width: 250,
|
// width: 250,
|
||||||
hideInSearch: true,
|
// hideInSearch: true,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
// },
|
||||||
]
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -132,7 +151,9 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
|
|||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
COMMENT_ISVALID: 1
|
COMMENT_ISVALID: 1,
|
||||||
|
CREATE_DATE_Start: params?.CREATE_DATE_Start || "",
|
||||||
|
CREATE_DATE_End: params?.CREATE_DATE_End || "",
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// 点餐类别管理
|
// 点餐类别管理 点餐分类管理
|
||||||
import React, { useRef, useState, Suspense } from 'react';
|
import React, { useRef, useState, Suspense } from 'react';
|
||||||
import moment from 'moment'; // 时间相关引用,没有使用可以删除
|
import moment from 'moment'; // 时间相关引用,没有使用可以删除
|
||||||
import numeral from "numeral"; // 数字相关引用,没有使用可以删除
|
import numeral from "numeral"; // 数字相关引用,没有使用可以删除
|
||||||
@ -25,6 +25,7 @@ import { handlDeleteUSERDEFINEDTYPE, handlGetUSERDEFINEDTYPEList, handlSynchroUS
|
|||||||
import PageTitleBox from '@/components/PageTitleBox';
|
import PageTitleBox from '@/components/PageTitleBox';
|
||||||
import { uploadPicture } from '@/services/picture';
|
import { uploadPicture } from '@/services/picture';
|
||||||
import defaultIcon from '../../../assets/brand/defaultIcon.png'
|
import defaultIcon from '../../../assets/brand/defaultIcon.png'
|
||||||
|
import classNames from 'classnames';
|
||||||
|
|
||||||
|
|
||||||
const beforeUpload = (file: any) => {
|
const beforeUpload = (file: any) => {
|
||||||
@ -77,8 +78,6 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
bottom: clientHeight - (targetRect.bottom - uiData.y),
|
bottom: clientHeight - (targetRect.bottom - uiData.y),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 拖动结束
|
|
||||||
|
|
||||||
// 定义列表字段内容
|
// 定义列表字段内容
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
// {
|
// {
|
||||||
@ -344,6 +343,7 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
<Modal
|
<Modal
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
|
className='orderCategoryModal'
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
@ -371,6 +371,10 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
formRef.current?.resetFields();
|
formRef.current?.resetFields();
|
||||||
setCurrentRow(undefined);
|
setCurrentRow(undefined);
|
||||||
}}
|
}}
|
||||||
|
bodyStyle={{
|
||||||
|
maxHeight: '700px', // 你可以根据需要调整高度
|
||||||
|
overflowY: 'auto',
|
||||||
|
}}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
handleConfirmLoading(false)
|
handleConfirmLoading(false)
|
||||||
handleModalVisible(false)
|
handleModalVisible(false)
|
||||||
@ -389,6 +393,7 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
bounds={bounds}
|
bounds={bounds}
|
||||||
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
||||||
|
handle='.orderCategoryModal'
|
||||||
>
|
>
|
||||||
<div ref={draggleRef}>{modal}</div>
|
<div ref={draggleRef}>{modal}</div>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
@ -630,7 +635,7 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> =
|
|||||||
</Row>
|
</Row>
|
||||||
</ProForm>
|
</ProForm>
|
||||||
</Modal>
|
</Modal>
|
||||||
</PageContainer>
|
</PageContainer >
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default connect(({ user }: ConnectState) => ({
|
export default connect(({ user }: ConnectState) => ({
|
||||||
|
|||||||
@ -5,13 +5,13 @@ import searchIcon from '@/assets/ai/searchIcon.png'
|
|||||||
import { useRef, useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
import { MenuFoldOutlined } from "@ant-design/icons";
|
import { MenuFoldOutlined } from "@ant-design/icons";
|
||||||
import ProForm, { ProFormText } from "@ant-design/pro-form";
|
import ProForm, { ProFormText } from "@ant-design/pro-form";
|
||||||
import { Button, Col, FormInstance, Row, Tree } from "antd";
|
import { Button, Col, FormInstance, Menu, Row, Tree } from "antd";
|
||||||
import close from '@/assets/ai/close.png'
|
import close from '@/assets/ai/close.png'
|
||||||
import { getServerpartTree } from "@/services/options";
|
import { getServerpartTree } from "@/services/options";
|
||||||
import useRequest from "@ahooksjs/use-request";
|
import useRequest from "@ahooksjs/use-request";
|
||||||
import './style.less'
|
import './style.less'
|
||||||
import { getMerchantShopTree } from "@/pages/Setting/Users/service";
|
import { getMerchantShopTree } from "@/pages/Setting/Users/service";
|
||||||
import { handlGetUSERDEFINEDTYPEList } from "../../service";
|
import { handeGetSPRegionShopTree, handlGetUSERDEFINEDTYPEList } from "../../service";
|
||||||
|
|
||||||
|
|
||||||
type DetailProps = {
|
type DetailProps = {
|
||||||
@ -28,16 +28,29 @@ type DetailProps = {
|
|||||||
noWj?: any // 把万佳商贸隐藏
|
noWj?: any // 把万佳商贸隐藏
|
||||||
selectOnly?: boolean// 传入的时候 仅支持单选
|
selectOnly?: boolean// 传入的时候 仅支持单选
|
||||||
setData?: any // 把树形的数据 传出去
|
setData?: any // 把树形的数据 传出去
|
||||||
|
selectedId?: any
|
||||||
}
|
}
|
||||||
const OrderCategoryTree = ({ setSelectedId, reload, actionRef, currentUser, width, otherFun, setCollapsible, collapsible, haveTest, handleGetLeftTreeData, noWj, selectOnly, setData }: DetailProps) => {
|
const OrderCategoryTree = ({ setSelectedId, reload, actionRef, currentUser, width, otherFun, setCollapsible, collapsible, haveTest, handleGetLeftTreeData, noWj, selectOnly, setData, selectedId }: DetailProps) => {
|
||||||
const searchTreeRef = useRef<FormInstance>();
|
const searchTreeRef = useRef<FormInstance>();
|
||||||
// 默认的服务区树
|
// 默认的服务区树
|
||||||
const [allTreeViews, setAllTreeViews] = useState<any>()
|
const [allTreeViews, setAllTreeViews] = useState<any>()
|
||||||
// 是否要显示全部
|
// 是否要显示全部
|
||||||
const [isShowAllInTree, setIsShowAllInTree] = useState<boolean>(false)
|
const [isShowAllInTree, setIsShowAllInTree] = useState<boolean>(false)
|
||||||
|
// 菜单的显示key
|
||||||
|
const [menuKey, setMenuKey] = useState<any>()
|
||||||
// 加载服务区树
|
// 加载服务区树
|
||||||
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
||||||
|
const req: any = {
|
||||||
|
ProvinceCode: currentUser?.ProvinceCode,
|
||||||
|
// BusinessState: 1,
|
||||||
|
ShowOrder: true
|
||||||
|
|
||||||
|
}
|
||||||
|
console.log('reqreqreqreqreq', req);
|
||||||
|
|
||||||
|
const data = await handeGetSPRegionShopTree(req)
|
||||||
|
console.log('获取服务区经营商家树', data);
|
||||||
|
setTreeView(data)
|
||||||
})
|
})
|
||||||
// 显示服务区树搜索框
|
// 显示服务区树搜索框
|
||||||
const [showServiceSearchBox, setShowServiceSearchBox] = useState<boolean>(false)
|
const [showServiceSearchBox, setShowServiceSearchBox] = useState<boolean>(false)
|
||||||
@ -114,6 +127,52 @@ const OrderCategoryTree = ({ setSelectedId, reload, actionRef, currentUser, widt
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const renderMenu = (data: any[]) => {
|
||||||
|
return data.map(item => {
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
return (
|
||||||
|
<Menu.SubMenu key={item.key} title={item.label}>
|
||||||
|
{renderMenu(item.children)}
|
||||||
|
</Menu.SubMenu>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 只渲染type为2的可选项
|
||||||
|
if (item.type === 2) {
|
||||||
|
return (
|
||||||
|
<Menu.Item key={item.key} title={item.label}>
|
||||||
|
{item.label}
|
||||||
|
</Menu.Item>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSelect = ({ key }) => {
|
||||||
|
// 通过key找到对应的节点
|
||||||
|
const findNode = (nodes: any[]): any | null => {
|
||||||
|
for (let n of nodes) {
|
||||||
|
if (n.key === key) return n;
|
||||||
|
if (n.children) {
|
||||||
|
const res = findNode(n.children);
|
||||||
|
if (res) return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
const node = findNode(treeView);
|
||||||
|
if (node && node.type === 2) {
|
||||||
|
setSelectedId(node.value?.toString() || '');
|
||||||
|
setMenuKey(node.key)
|
||||||
|
if (reload) {
|
||||||
|
actionRef?.current?.reload();
|
||||||
|
}
|
||||||
|
if (otherFun) {
|
||||||
|
otherFun(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<ProCard
|
<ProCard
|
||||||
@ -170,37 +229,40 @@ const OrderCategoryTree = ({ setSelectedId, reload, actionRef, currentUser, widt
|
|||||||
headerBordered
|
headerBordered
|
||||||
collapsed={collapsible}
|
collapsed={collapsible}
|
||||||
>
|
>
|
||||||
{treeView && treeView.length > 0 ? <Tree
|
|
||||||
|
|
||||||
|
{
|
||||||
|
treeView && treeView.length > 0 ? <Menu
|
||||||
|
mode="inline"
|
||||||
|
selectedKeys={menuKey ? [menuKey] : []}
|
||||||
|
onSelect={handleSelect}
|
||||||
|
style={{ height: '100%', borderRight: 0 }}
|
||||||
|
>
|
||||||
|
{renderMenu(treeView)}
|
||||||
|
</Menu> : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
{/* {treeView && treeView.length > 0 ? <Tree
|
||||||
checkable
|
checkable
|
||||||
treeData={selectOnly
|
treeData={[{
|
||||||
? (isShowAllInTree
|
label: '全部',
|
||||||
? [{
|
value: 0,
|
||||||
label: '全部',
|
key: '0-0',
|
||||||
value: 0,
|
children: treeView
|
||||||
key: '0-0',
|
}]}
|
||||||
children: convertTreeForSelectOnly(treeView)
|
key={'key'}
|
||||||
}]
|
|
||||||
: convertTreeForSelectOnly(treeView))
|
|
||||||
: (isShowAllInTree
|
|
||||||
? [{
|
|
||||||
label: '全部',
|
|
||||||
value: 0,
|
|
||||||
key: '0-0',
|
|
||||||
children: treeView
|
|
||||||
}]
|
|
||||||
: treeView)}
|
|
||||||
blockNode
|
blockNode
|
||||||
// defaultExpandAll={isShowAllInTree ? false : true}
|
// defaultExpandAll={true}
|
||||||
// defaultExpandedKeys={isShowAllInTree ? treeShowRow && treeShowRow.length > 0 ? treeShowRow : ['0-0'] : []}
|
defaultExpandedKeys={['0-0']}
|
||||||
onCheck={(checkedKeys: React.Key[] | any, info) => {
|
onCheck={(checkedKeys: React.Key[] | any, info) => {
|
||||||
console.log('checkedKeyscheckedKeyscheckedKeys', checkedKeys);
|
console.log('checkedKeyscheckedKeyscheckedKeys', checkedKeys);
|
||||||
console.log('infoinfoinfoinfoinfoinfo', info);
|
console.log('infoinfoinfoinfoinfoinfo', info);
|
||||||
|
|
||||||
// 多选逻辑
|
// 多选逻辑
|
||||||
// const selectedIds = info.checkedNodes.filter((n: any) => n?.USERDEFINEDTYPE_PID !== -1)
|
// const selectedIds = info.checkedNodes.filter((n: any) => n?.USERDEFINEDTYPE_PID !== -1)
|
||||||
const selectedIds = info.checkedNodes.filter((n: any) => n?.USERDEFINEDTYPE_ID)
|
const selectedIds = info.checkedNodes.filter((n: any) => n?.type === 2)
|
||||||
console.log('selectedIdsselectedIds', selectedIds);
|
console.log('selectedIdsselectedIds', selectedIds);
|
||||||
setSelectedId(selectedIds.map((n: any) => n?.USERDEFINEDTYPE_ID)?.toString() || '')
|
setSelectedId(selectedIds.map((n: any) => n?.value)?.toString() || '')
|
||||||
if (reload) {
|
if (reload) {
|
||||||
actionRef?.current?.reload()
|
actionRef?.current?.reload()
|
||||||
}
|
}
|
||||||
@ -209,10 +271,10 @@ const OrderCategoryTree = ({ setSelectedId, reload, actionRef, currentUser, widt
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
fieldNames={{
|
fieldNames={{
|
||||||
title: "USERDEFINEDTYPE_NAME",
|
title: "label",
|
||||||
key: "USERDEFINEDTYPE_ID"
|
key: "value"
|
||||||
}}
|
}}
|
||||||
/> : ''}
|
/> : ''} */}
|
||||||
</ProCard>
|
</ProCard>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -26,6 +26,8 @@ import PageTitleBox from '@/components/PageTitleBox';
|
|||||||
import { deletePicture, uploadPicture } from '@/services/picture';
|
import { deletePicture, uploadPicture } from '@/services/picture';
|
||||||
import defaultIcon from '../../../assets/brand/defaultIcon.png'
|
import defaultIcon from '../../../assets/brand/defaultIcon.png'
|
||||||
import OrderCategoryTree from './components/OrderCategoryTree';
|
import OrderCategoryTree from './components/OrderCategoryTree';
|
||||||
|
import OrderCategoryManage from '../OrderCategoryManage';
|
||||||
|
import session from '@/utils/session';
|
||||||
|
|
||||||
|
|
||||||
const beforeUpload = (file: any) => {
|
const beforeUpload = (file: any) => {
|
||||||
@ -55,6 +57,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
const [typeTreeData, setTypeTreeData] = useState<any>()
|
const [typeTreeData, setTypeTreeData] = useState<any>()
|
||||||
// 表单里面的是否预售
|
// 表单里面的是否预售
|
||||||
const [formPRESALE_TYPE, setFormPRESALE_TYPE] = useState<boolean>(false)
|
const [formPRESALE_TYPE, setFormPRESALE_TYPE] = useState<boolean>(false)
|
||||||
|
const serverpartObj = session.get('serverpartObj')
|
||||||
|
|
||||||
// 弹出框拖动效果
|
// 弹出框拖动效果
|
||||||
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
|
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
|
||||||
@ -67,6 +70,9 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
|
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
|
||||||
// 树相关的属性和方法
|
// 树相关的属性和方法
|
||||||
const [selectedId, setSelectedId] = useState<string>()
|
const [selectedId, setSelectedId] = useState<string>()
|
||||||
|
// 显示新增点餐分类的悬浮框
|
||||||
|
const [showFoodTypeModal, setShowFoodTypeModal] = useState<boolean>(false)
|
||||||
|
|
||||||
|
|
||||||
const onDraggaleStart = (event, uiData) => {
|
const onDraggaleStart = (event, uiData) => {
|
||||||
const { clientWidth, clientHeight } = window.document.documentElement;
|
const { clientWidth, clientHeight } = window.document.documentElement;
|
||||||
@ -81,10 +87,24 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
bottom: clientHeight - (targetRect.bottom - uiData.y),
|
bottom: clientHeight - (targetRect.bottom - uiData.y),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 拖动结束
|
|
||||||
|
|
||||||
// 定义列表字段内容
|
// 定义列表字段内容
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
|
{
|
||||||
|
title: '查询时间',
|
||||||
|
dataIndex: 'search_date',
|
||||||
|
valueType: 'dateRange',
|
||||||
|
hideInTable: true,
|
||||||
|
hideInDescriptions: true,
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return {
|
||||||
|
OPERATE_DATE_Start: value[0],
|
||||||
|
OPERATE_DATE_End: value[1],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')],
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// title: '上级类别',
|
// title: '上级类别',
|
||||||
// align: 'center',
|
// align: 'center',
|
||||||
@ -94,6 +114,17 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
// hideInSearch: true,
|
// hideInSearch: true,
|
||||||
// hideInDescriptions: true,
|
// hideInDescriptions: true,
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
title: '服务区',
|
||||||
|
dataIndex: "SERVERPART_IDS",
|
||||||
|
hideInTable: true,
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: serverpartObj,
|
||||||
|
fieldProps: {
|
||||||
|
showSearch: true, // 支持输入文字搜索
|
||||||
|
filterOption: (input, option) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()),
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'USERDEFINEDTYPE_NAME',
|
dataIndex: 'USERDEFINEDTYPE_NAME',
|
||||||
title: '商品类别',
|
title: '商品类别',
|
||||||
@ -147,12 +178,13 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
|
||||||
valueType: "select",
|
valueType: "select",
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
|
"-1": "全部",
|
||||||
"1": "上架",
|
"1": "上架",
|
||||||
"0": "下架"
|
"0": "下架"
|
||||||
}
|
},
|
||||||
|
initialValue: '-1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'OPERATE_DATE',
|
dataIndex: 'OPERATE_DATE',
|
||||||
@ -180,6 +212,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
// 预览上传后的图片
|
// 预览上传后的图片
|
||||||
const handlePreview = async () => {
|
const handlePreview = async () => {
|
||||||
setFileList(fileList)
|
setFileList(fileList)
|
||||||
@ -240,7 +273,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||||
<OrderCategoryTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
<OrderCategoryTree setSelectedId={setSelectedId} selectedId={selectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
||||||
|
|
||||||
<div style={{
|
<div style={{
|
||||||
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||||
@ -261,17 +294,23 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
bordered
|
bordered
|
||||||
// 请求数据
|
// 请求数据
|
||||||
request={async (params, sorter) => {
|
request={async (params, sorter) => {
|
||||||
|
|
||||||
|
console.log('selectedIdselectedIdselectedIdselectedIdselectedId', selectedId);
|
||||||
|
|
||||||
const req = {
|
const req = {
|
||||||
searchParameter: {
|
searchParameter: {
|
||||||
// OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
// OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
USERDEFINEDTYPE_IDS: selectedId,
|
// USERDEFINEDTYPE_IDS: selectedId,
|
||||||
UPPER_STATE: params?.UPPER_STATE,
|
OPERATE_DATE_Start: params?.OPERATE_DATE_Start || "",
|
||||||
DUTY_PARAGRAPH: params?.DUTY_PARAGRAPH === "-1" ? "" : params?.DUTY_PARAGRAPH,
|
OPERATE_DATE_End: params?.OPERATE_DATE_End || "",
|
||||||
|
UPPER_STATE: params?.UPPER_STATE === "-1" ? "" : params?.UPPER_STATE,
|
||||||
|
SELLER_IDS: selectedId || "",
|
||||||
COMMODITY_TYPE: 3000
|
COMMODITY_TYPE: 3000
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
|
SortStr: "OPERATE_DATE desc"
|
||||||
}
|
}
|
||||||
console.log('reqreqreqreq', req);
|
console.log('reqreqreqreq', req);
|
||||||
|
|
||||||
@ -352,6 +391,10 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
formRef?.current?.submit()
|
formRef?.current?.submit()
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
|
bodyStyle={{
|
||||||
|
maxHeight: '700px', // 你可以根据需要调整高度
|
||||||
|
overflowY: 'auto',
|
||||||
|
}}
|
||||||
modalRender={(modal) => {
|
modalRender={(modal) => {
|
||||||
return <Draggable
|
return <Draggable
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
@ -395,47 +438,56 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
>
|
>
|
||||||
<Row gutter={8}>
|
<Row gutter={8}>
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<ProFormTreeSelect
|
<Row gutter={8}>
|
||||||
name="COMMODITY_TYPE"
|
<Col span={18}>
|
||||||
label="商品类别"
|
<ProFormTreeSelect
|
||||||
request={async () => {
|
name="COMMODITY_TYPE"
|
||||||
// if (typeTreeData && typeTreeData.length > 0) {
|
label="商品类别"
|
||||||
// let list: any = [{ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 }, ...typeTreeData]
|
request={async () => {
|
||||||
// return list
|
// if (typeTreeData && typeTreeData.length > 0) {
|
||||||
// } else {
|
// let list: any = [{ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 }, ...typeTreeData]
|
||||||
// const req = {
|
// return list
|
||||||
// OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
// } else {
|
||||||
// PROVINCE_CODE: "",
|
// const req = {
|
||||||
// GOODSTYPE: 4000,
|
// OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
// }
|
// PROVINCE_CODE: "",
|
||||||
// const data = await handlGetUSERDEFINEDTYPEList(req);
|
// GOODSTYPE: 4000,
|
||||||
// console.log('datadatadatadatadata', data);
|
// }
|
||||||
// if (data.List && data.List.length > 0) {
|
// const data = await handlGetUSERDEFINEDTYPEList(req);
|
||||||
// data.List.unshirft({ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 })
|
// console.log('datadatadatadatadata', data);
|
||||||
// setTypeTreeData(data.List)
|
// if (data.List && data.List.length > 0) {
|
||||||
// return data.List
|
// data.List.unshirft({ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 })
|
||||||
// } else {
|
// setTypeTreeData(data.List)
|
||||||
// return [{ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 }]
|
// return data.List
|
||||||
// }
|
// } else {
|
||||||
// }
|
// return [{ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 }]
|
||||||
}}
|
// }
|
||||||
// fieldProps={{
|
// }
|
||||||
// fieldNames: {
|
}}
|
||||||
// label: 'USERDEFINEDTYPE_NAME',
|
fieldProps={{
|
||||||
// value: 'USERDEFINEDTYPE_ID',
|
// fieldNames: {
|
||||||
// children: 'children'
|
// label: 'USERDEFINEDTYPE_NAME',
|
||||||
// },
|
// value: 'USERDEFINEDTYPE_ID',
|
||||||
// showSearch: true,
|
// children: 'children'
|
||||||
// filterTreeNode: (input, node) =>
|
// },
|
||||||
// (node.USERDEFINEDTYPE_NAME || '').toLowerCase().includes(input.toLowerCase())
|
// showSearch: true,
|
||||||
// }}
|
// filterTreeNode: (input, node) =>
|
||||||
rules={[
|
// (node.USERDEFINEDTYPE_NAME || '').toLowerCase().includes(input.toLowerCase())
|
||||||
{
|
}}
|
||||||
required: true,
|
rules={[
|
||||||
message: "请选择上级类别"
|
{
|
||||||
}
|
required: true,
|
||||||
]}
|
message: "请选择上级类别"
|
||||||
/>
|
}
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={4}>
|
||||||
|
<Button type='primary' onClick={() => {
|
||||||
|
setShowFoodTypeModal(true)
|
||||||
|
}}>新增</Button>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
@ -463,7 +515,6 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={16}>
|
<Col span={16}>
|
||||||
<ProFormDateRangePicker
|
<ProFormDateRangePicker
|
||||||
width={'lg'}
|
|
||||||
name=""
|
name=""
|
||||||
label="生效时间"
|
label="生效时间"
|
||||||
/>
|
/>
|
||||||
@ -555,8 +606,6 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
onPreview: handlePreview,
|
onPreview: handlePreview,
|
||||||
fileList: fileList, // 绑定 fileList
|
fileList: fileList, // 绑定 fileList
|
||||||
onChange: async (info: any) => {
|
onChange: async (info: any) => {
|
||||||
console.log('info', info);
|
|
||||||
console.log('fileList', fileList);
|
|
||||||
if (info.file.status === 'removed') {
|
if (info.file.status === 'removed') {
|
||||||
const index = fileList.findIndex(n => n.uid === info.file.uid);
|
const index = fileList.findIndex(n => n.uid === info.file.uid);
|
||||||
confirm({
|
confirm({
|
||||||
@ -597,6 +646,26 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
</Row>
|
</Row>
|
||||||
</ProForm>
|
</ProForm>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
title={"新增点餐分类"}
|
||||||
|
destroyOnClose={true}
|
||||||
|
width={1400}
|
||||||
|
visible={showFoodTypeModal}
|
||||||
|
footer={false}
|
||||||
|
onCancel={() => {
|
||||||
|
setShowFoodTypeModal(false)
|
||||||
|
}}
|
||||||
|
bodyStyle={{
|
||||||
|
maxHeight: '700px', // 你可以根据需要调整高度
|
||||||
|
overflowY: 'auto',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<OrderCategoryManage />
|
||||||
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import ReactHTMLTableToExcel from "react-html-table-to-excel";
|
|||||||
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||||
import { handleGetCONSUMPTIONRECORDList, handleGetPOINTRECORDList } from "../service";
|
import { handleGetCONSUMPTIONRECORDList, handleGetPOINTRECORDList } from "../service";
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
|
|
||||||
const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -39,11 +40,28 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const [searchParams, setSearchParams] = useState<any>()
|
const [searchParams, setSearchParams] = useState<any>()
|
||||||
|
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
|
{
|
||||||
|
title: '查询时间',
|
||||||
|
dataIndex: 'search_date',
|
||||||
|
valueType: 'dateRange',
|
||||||
|
hideInTable: true,
|
||||||
|
hideInDescriptions: true,
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return {
|
||||||
|
CHECK_STARTDATE: value[0],
|
||||||
|
CHECK_ENDDATE: value[1],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "服务区名称",
|
title: "服务区名称",
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "SERVERPART_NAME",
|
dataIndex: "SERVERPART_NAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -52,31 +70,36 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "SHOPNAME",
|
dataIndex: "SHOPNAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "积分方式",
|
title: "积分方式",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "POINT_TYPE",
|
dataIndex: "POINT_TYPE",
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
|
align: 'center',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
|
"-2": "全部",
|
||||||
"1": "累计",
|
"1": "累计",
|
||||||
"-1": "消耗"
|
"-1": "消耗"
|
||||||
}
|
},
|
||||||
|
initialValue: "-2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "积分来源",
|
title: "积分来源",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "POINT_TYPE",
|
dataIndex: "POINT_SOURCE",
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
|
align: 'center',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
"1000": "消费赠送",
|
"1000": "消费赠送",
|
||||||
"2000": "消费抵扣",
|
"2000": "消费抵扣",
|
||||||
"3000": "注册赠送"
|
"3000": "注册赠送"
|
||||||
}
|
},
|
||||||
|
initialValue: "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "本次积分",
|
title: "本次积分",
|
||||||
@ -84,6 +107,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "CURRENT_POINT",
|
dataIndex: "CURRENT_POINT",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: "digit"
|
valueType: "digit"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -92,14 +116,19 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "MEMBERSHIP_POINT",
|
dataIndex: "MEMBERSHIP_POINT",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: "digit"
|
valueType: "digit"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "获取时间",
|
title: "获取时间",
|
||||||
width: 120,
|
width: 150,
|
||||||
dataIndex: "CREATE_DATE",
|
dataIndex: "CREATE_DATE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD') : "-"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -133,9 +162,11 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const req: any = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OWNERUNIT_ID: 911
|
OWNERUNIT_ID: 911,
|
||||||
|
POINT_TYPE: params?.POINT_TYPE === '-2' ? '' : params?.POINT_TYPE,
|
||||||
|
POINT_SOURCE: params?.POINT_SOURCE === '0' ? '' : params?.POINT_SOURCE
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: params?.current,
|
||||||
PageSize: 20
|
PageSize: 20
|
||||||
}
|
}
|
||||||
const data = await handleGetPOINTRECORDList(req)
|
const data = await handleGetPOINTRECORDList(req)
|
||||||
|
|||||||
@ -430,60 +430,30 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
<ProFormText
|
<ProFormText
|
||||||
name="EXCHANGE_BASE"
|
name="EXCHANGE_BASE"
|
||||||
label="兑换基数"
|
label="兑换基数"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入兑换基数'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="CONVERTIBLE_PROPORTION"
|
name="CONVERTIBLE_PROPORTION"
|
||||||
label="兑换比例"
|
label="兑换比例"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入兑换比例'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="MEET_AMOUNT"
|
name="MEET_AMOUNT"
|
||||||
label="满足金额"
|
label="满足金额"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入满足金额'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="EARN_POINTS"
|
name="EARN_POINTS"
|
||||||
label="赚取积分"
|
label="赚取积分"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入赚取积分'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="GROWTH_VALUE"
|
name="GROWTH_VALUE"
|
||||||
label="获得成长值"
|
label="获得成长值"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入成长值'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
@ -501,12 +471,6 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
width="lg"
|
width="lg"
|
||||||
name="START_DATE"
|
name="START_DATE"
|
||||||
label="开始时间"
|
label="开始时间"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择开始时间'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
@ -514,12 +478,6 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
width="lg"
|
width="lg"
|
||||||
name="END_DATE"
|
name="END_DATE"
|
||||||
label="结束时间"
|
label="结束时间"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择结束时间'
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ const LeftSelectMallType = ({ setSelectedId, reload, actionRef, currentUser, wid
|
|||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
let obj: any = {}
|
let obj: any = {}
|
||||||
data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
obj[item.AUTOTYPE_CODE] = item.AUTOTYPE_NAME
|
obj[item.AUTOTYPE_ID] = item.AUTOTYPE_NAME
|
||||||
})
|
})
|
||||||
setData(obj)
|
setData(obj)
|
||||||
}
|
}
|
||||||
@ -190,31 +190,20 @@ const LeftSelectMallType = ({ setSelectedId, reload, actionRef, currentUser, wid
|
|||||||
>
|
>
|
||||||
{treeView && treeView.length > 0 ? <Tree
|
{treeView && treeView.length > 0 ? <Tree
|
||||||
checkable
|
checkable
|
||||||
treeData={selectOnly
|
treeData={[{
|
||||||
? (isShowAllInTree
|
AUTOTYPE_NAME: '全部',
|
||||||
? [{
|
AUTOTYPE_ID: 0,
|
||||||
label: '全部',
|
key: '0-0',
|
||||||
value: 0,
|
children: treeView
|
||||||
key: '0-0',
|
}]}
|
||||||
children: convertTreeForSelectOnly(treeView)
|
|
||||||
}]
|
|
||||||
: convertTreeForSelectOnly(treeView))
|
|
||||||
: (isShowAllInTree
|
|
||||||
? [{
|
|
||||||
label: '全部',
|
|
||||||
value: 0,
|
|
||||||
key: '0-0',
|
|
||||||
children: treeView
|
|
||||||
}]
|
|
||||||
: treeView)}
|
|
||||||
blockNode
|
blockNode
|
||||||
// defaultExpandAll={isShowAllInTree ? false : true}
|
defaultExpandAll={true}
|
||||||
// defaultExpandedKeys={isShowAllInTree ? treeShowRow && treeShowRow.length > 0 ? treeShowRow : ['0-0'] : []}
|
// defaultExpandedKeys={isShowAllInTree ? treeShowRow && treeShowRow.length > 0 ? treeShowRow : ['0-0'] : []}
|
||||||
onCheck={(checkedKeys: React.Key[] | any, info) => {
|
onCheck={(checkedKeys: React.Key[] | any, info) => {
|
||||||
// 多选逻辑
|
// 多选逻辑
|
||||||
// const selectedIds = info.checkedNodes.filter((n: any) => n?.USERDEFINEDTYPE_PID !== -1)
|
// const selectedIds = info.checkedNodes.filter((n: any) => n?.USERDEFINEDTYPE_PID !== -1)
|
||||||
const selectedIds = info.checkedNodes.filter((n: any) => n?.USERDEFINEDTYPE_ID)
|
const selectedIds = info.checkedNodes.filter((n: any) => n?.AUTOTYPE_ID)
|
||||||
setSelectedId(selectedIds.map((n: any) => n?.USERDEFINEDTYPE_ID)?.toString() || '')
|
setSelectedId(selectedIds.map((n: any) => n?.AUTOTYPE_ID)?.toString() || '')
|
||||||
if (reload) {
|
if (reload) {
|
||||||
actionRef?.current?.reload()
|
actionRef?.current?.reload()
|
||||||
}
|
}
|
||||||
@ -224,7 +213,7 @@ const LeftSelectMallType = ({ setSelectedId, reload, actionRef, currentUser, wid
|
|||||||
}}
|
}}
|
||||||
fieldNames={{
|
fieldNames={{
|
||||||
title: "AUTOTYPE_NAME",
|
title: "AUTOTYPE_NAME",
|
||||||
key: "AUTOTYPE_CODE"
|
key: "AUTOTYPE_ID"
|
||||||
}}
|
}}
|
||||||
/> : ''}
|
/> : ''}
|
||||||
</ProCard>
|
</ProCard>
|
||||||
|
|||||||
@ -55,14 +55,14 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'MERCHANTS_TYPE',
|
dataIndex: 'MERCHANTSTYPE_NAME',
|
||||||
title: '商户类型',
|
title: '商户类型',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
width: 150,
|
width: 150,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: "select",
|
// valueType: "select",
|
||||||
valueEnum: leftTreeData
|
// valueEnum: leftTreeData
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'MERCHANTS_NAME',
|
dataIndex: 'MERCHANTS_NAME',
|
||||||
@ -81,17 +81,19 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'MERCHANTS_AUTOTYPE',
|
dataIndex: 'MERCHANTS_TYPE',
|
||||||
title: '商户性质',
|
title: '商户性质',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
hideInSearch: true,
|
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
"1000": "企业公司",
|
"1000": "企业公司",
|
||||||
"2000": "个体",
|
"2000": "个体",
|
||||||
"3000": "自然人"
|
"3000": "自然人"
|
||||||
}
|
},
|
||||||
|
valueType: 'select',
|
||||||
|
initialValue: "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'TAXPAYER_IDENTIFYCODE',
|
dataIndex: 'TAXPAYER_IDENTIFYCODE',
|
||||||
@ -101,6 +103,20 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
width: 150,
|
width: 150,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'MERCHANTS_STATE',
|
||||||
|
title: '有效状态',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
valueType: "select",
|
||||||
|
valueEnum: {
|
||||||
|
"-1": "全部",
|
||||||
|
"0": "无效",
|
||||||
|
"1": "有效"
|
||||||
|
},
|
||||||
|
initialValue: "1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'MERCHANTS_TELEPHONE',
|
dataIndex: 'MERCHANTS_TELEPHONE',
|
||||||
title: '联系电话',
|
title: '联系电话',
|
||||||
@ -160,6 +176,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
req = {
|
req = {
|
||||||
...currentRow,
|
...currentRow,
|
||||||
...res,
|
...res,
|
||||||
|
MERCHANTS_STATE: 1,
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
OWNERUNIT_NAME: currentUser?.OwnerUnitName,
|
OWNERUNIT_NAME: currentUser?.OwnerUnitName,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
@ -169,6 +186,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
} else {
|
} else {
|
||||||
req = {
|
req = {
|
||||||
...res,
|
...res,
|
||||||
|
MERCHANTS_STATE: 1,
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
OWNERUNIT_NAME: currentUser?.OwnerUnitName,
|
OWNERUNIT_NAME: currentUser?.OwnerUnitName,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
@ -211,11 +229,17 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
search={{ span: 6, labelWidth: 'auto' }}
|
search={{ span: 6, labelWidth: 'auto' }}
|
||||||
// 请求数据
|
// 请求数据
|
||||||
request={async (params, sorter) => {
|
request={async (params, sorter) => {
|
||||||
|
console.log('selectedId', selectedId);
|
||||||
|
if (!selectedId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const req = {
|
const req = {
|
||||||
searchParameter: {
|
searchParameter: {
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
MERCHANTS_TYPE: params?.MERCHANTS_TYPE ? params?.MERCHANTS_TYPE : ""
|
MERCHANTS_TYPE: params?.MERCHANTS_TYPE === '0' ? '' : params?.MERCHANTS_TYPE,
|
||||||
|
MERCHANTS_AUTOTYPE: selectedId,
|
||||||
|
MERCHANTS_STATE: params?.MERCHANTS_STATE === '-1' ? '' : params?.MERCHANTS_STATE
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
@ -340,10 +364,11 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="MERCHANTS_TYPE"
|
name="MERCHANTS_AUTOTYPE"
|
||||||
label="商户类型"
|
label="商户类型"
|
||||||
request={() => {
|
request={() => {
|
||||||
let list: any = []
|
let list: any = []
|
||||||
|
|
||||||
for (let key in leftTreeData) {
|
for (let key in leftTreeData) {
|
||||||
list.push({ label: leftTreeData[key], value: key })
|
list.push({ label: leftTreeData[key], value: key })
|
||||||
}
|
}
|
||||||
@ -359,7 +384,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }>
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="MERCHANTS_AUTOTYPE"
|
name="MERCHANTS_TYPE"
|
||||||
label="商户性质"
|
label="商户性质"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
// 会员账户管理
|
||||||
import { connect } from "umi";
|
import { connect } from "umi";
|
||||||
import type { CurrentUser } from "umi";
|
import type { CurrentUser } from "umi";
|
||||||
import type { ConnectState } from "@/models/connect";
|
import type { ConnectState } from "@/models/connect";
|
||||||
@ -65,6 +66,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
// 弹出框拖动效果
|
// 弹出框拖动效果
|
||||||
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
|
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
|
||||||
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
|
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
|
||||||
|
// 当前选中在详情里面要查看的内容
|
||||||
|
const [selectTab, setSelectTab] = useState<number>(1)
|
||||||
|
|
||||||
|
|
||||||
const [columnsStateMap, setColumnsStateMap] = useState<any>({
|
const [columnsStateMap, setColumnsStateMap] = useState<any>({
|
||||||
MEMBERSHIP_CODE: { show: false },
|
MEMBERSHIP_CODE: { show: false },
|
||||||
@ -232,7 +236,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
"0": "全部",
|
"0": "全部",
|
||||||
...MEMBERSHIP_LEVELObj
|
...MEMBERSHIP_LEVELObj,
|
||||||
|
"9000": "VIP会员"
|
||||||
},
|
},
|
||||||
initialValue: "0"
|
initialValue: "0"
|
||||||
},
|
},
|
||||||
@ -359,6 +364,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "SERVERPART_NAME",
|
dataIndex: "SERVERPART_NAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "门店名称",
|
title: "门店名称",
|
||||||
@ -366,6 +372,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "SHOPNAME",
|
dataIndex: "SHOPNAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "消费类型",
|
title: "消费类型",
|
||||||
@ -374,7 +381,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: CONSUMPTIONRECORDTYPEObj
|
valueEnum: CONSUMPTIONRECORDTYPEObj,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "订单金额",
|
title: "订单金额",
|
||||||
@ -383,6 +391,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "消费金额",
|
title: "消费金额",
|
||||||
@ -391,6 +400,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "消费积分",
|
title: "消费积分",
|
||||||
@ -399,6 +409,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "实付金额",
|
title: "实付金额",
|
||||||
@ -407,6 +418,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
valueType: 'digit',
|
valueType: 'digit',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "优惠金额",
|
title: "优惠金额",
|
||||||
@ -414,12 +426,14 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "COUPON_AMOUNT",
|
dataIndex: "COUPON_AMOUNT",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "消费时间 ",
|
title: "消费时间 ",
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "CONSUMPTIONRECORD_DATE",
|
dataIndex: "CONSUMPTIONRECORD_DATE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record?.CONSUMPTIONRECORD_DATE ? moment(record?.CONSUMPTIONRECORD_DATE).format('YYYY-MM-DD HH:mm:ss') : '-'
|
return record?.CONSUMPTIONRECORD_DATE ? moment(record?.CONSUMPTIONRECORD_DATE).format('YYYY-MM-DD HH:mm:ss') : '-'
|
||||||
}
|
}
|
||||||
@ -433,6 +447,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "SERVERPART_NAME",
|
dataIndex: "SERVERPART_NAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "门店名称",
|
title: "门店名称",
|
||||||
@ -440,6 +455,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "SHOPNAME",
|
dataIndex: "SHOPNAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "积分方式",
|
title: "积分方式",
|
||||||
@ -447,6 +463,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "POINT_TYPE",
|
dataIndex: "POINT_TYPE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
"1": "累计",
|
"1": "累计",
|
||||||
@ -459,6 +476,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "POINT_TYPE",
|
dataIndex: "POINT_TYPE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
"1000": "消费赠送",
|
"1000": "消费赠送",
|
||||||
@ -472,6 +490,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "CURRENT_POINT",
|
dataIndex: "CURRENT_POINT",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: "digit"
|
valueType: "digit"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -480,6 +499,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "MEMBERSHIP_POINT",
|
dataIndex: "MEMBERSHIP_POINT",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: "digit"
|
valueType: "digit"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -487,10 +507,10 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "CREATE_DATE",
|
dataIndex: "CREATE_DATE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// 成长值的列表
|
// 成长值的列表
|
||||||
let GrowthValueColumns: any = [
|
let GrowthValueColumns: any = [
|
||||||
{
|
{
|
||||||
@ -498,6 +518,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "SERVERPART_NAME",
|
dataIndex: "SERVERPART_NAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -505,6 +526,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "SHOPNAME",
|
dataIndex: "SHOPNAME",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -513,6 +535,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "MEMBERSHIP_GROWTH",
|
dataIndex: "MEMBERSHIP_GROWTH",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: 'digit'
|
valueType: 'digit'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -521,6 +544,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "CURRENT_GROWTH",
|
dataIndex: "CURRENT_GROWTH",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: 'digit'
|
valueType: 'digit'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -529,6 +553,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "GROWTH_VALUE",
|
dataIndex: "GROWTH_VALUE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
align: 'center',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
"1000": "消费赠送",
|
"1000": "消费赠送",
|
||||||
@ -541,6 +566,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "GROWTH_TYPE",
|
dataIndex: "GROWTH_TYPE",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
@ -552,13 +578,13 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
title: "操作时间",
|
title: "操作时间",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "OPERATE_DATE",
|
dataIndex: "OPERATE_DATE",
|
||||||
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-"
|
return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// 悬浮框的关闭方法
|
// 悬浮框的关闭方法
|
||||||
const handleCloseModal = () => {
|
const handleCloseModal = () => {
|
||||||
setShowDetailDrawer(false)
|
setShowDetailDrawer(false)
|
||||||
@ -821,10 +847,24 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
|
|
||||||
<div className="carNavBox">
|
<div className="carNavBox">
|
||||||
<img className="carNavIcon" src={memberDetailIcon} />
|
<img className="carNavIcon" src={memberDetailIcon} />
|
||||||
<span className="carNavTitle">详情信息</span>
|
<span className={selectTab === 1 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
|
||||||
|
setSelectTab(1)
|
||||||
|
}}>详情信息</span>
|
||||||
|
<span className={selectTab === 2 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
|
||||||
|
setSelectTab(2)
|
||||||
|
}}>消费记录</span>
|
||||||
|
<span className={selectTab === 3 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
|
||||||
|
setSelectTab(3)
|
||||||
|
}}>积分记录</span>
|
||||||
|
<span className={selectTab === 4 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
|
||||||
|
setSelectTab(4)
|
||||||
|
}}>成长值记录</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="bottomDetailBox">
|
|
||||||
|
|
||||||
|
|
||||||
|
<div className="bottomDetailBox" style={{ display: selectTab === 1 ? 'block' : "none" }}>
|
||||||
<Row gutter={8}>
|
<Row gutter={8}>
|
||||||
<Col span={6} className="memberInfoDetailItem">
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
<ProFormText
|
<ProFormText
|
||||||
@ -848,7 +888,10 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
label={"会员等级"}
|
label={"会员等级"}
|
||||||
readonly
|
readonly
|
||||||
style={{ marginBottom: '16px' }}
|
style={{ marginBottom: '16px' }}
|
||||||
options={MEMBERSHIP_LEVELList}
|
options={[
|
||||||
|
...MEMBERSHIP_LEVELList,
|
||||||
|
{ label: "VIP会员", value: 9000 }
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={6} className="memberInfoDetailItem">
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
@ -920,10 +963,96 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{
|
||||||
|
selectTab === 2 ? <ProTable
|
||||||
|
// headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>消费记录</span>}
|
||||||
|
search={false}
|
||||||
|
options={false}
|
||||||
|
bordered
|
||||||
|
columns={consumptionColumns}
|
||||||
|
scroll={{ x: '100%', y: '350px' }}
|
||||||
|
request={async (params: any) => {
|
||||||
|
const req: any = {
|
||||||
|
SearchParameter: {
|
||||||
|
MEMBERSHIP_IDS: currentRow?.MEMBERSHIP_ID,
|
||||||
|
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
|
OWNERUNIT_ID: 911
|
||||||
|
},
|
||||||
|
PageIndex: params.current,
|
||||||
|
PageSize: 20,
|
||||||
|
SortStr: "CONSUMPTIONRECORD_DATE desc"
|
||||||
|
}
|
||||||
|
const data = await handleGetCONSUMPTIONRECORDList(req)
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
return { data: data.List, success: true, total: data.TotalCount }
|
||||||
|
}
|
||||||
|
return { data: [], success: true }
|
||||||
|
}}
|
||||||
|
/> : ""
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
selectTab === 3 ?
|
||||||
|
<ProTable
|
||||||
|
// headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>积分记录</span>}
|
||||||
|
search={false}
|
||||||
|
options={false}
|
||||||
|
bordered
|
||||||
|
scroll={{ x: '100%', y: '350px' }}
|
||||||
|
columns={PointColumns}
|
||||||
|
request={async (params: any) => {
|
||||||
|
const req: any = {
|
||||||
|
SearchParameter: {
|
||||||
|
MEMBERSHIP_IDS: currentRow?.MEMBERSHIP_ID,
|
||||||
|
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
|
OWNERUNIT_ID: 911
|
||||||
|
},
|
||||||
|
PageIndex: params.current,
|
||||||
|
PageSize: 20,
|
||||||
|
SortStr: "OPERATE_DATE desc"
|
||||||
|
}
|
||||||
|
const data = await handleGetPOINTRECORDList(req)
|
||||||
|
console.log('22222', data);
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
return { data: data.List, success: true, total: data.TotalCount }
|
||||||
|
}
|
||||||
|
return { data: [], success: true }
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
selectTab === 4 ?
|
||||||
|
<ProTable
|
||||||
|
// headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>成长值记录</span>}
|
||||||
|
search={false}
|
||||||
|
options={false}
|
||||||
|
bordered
|
||||||
|
scroll={{ x: '100%', y: '350px' }}
|
||||||
|
columns={GrowthValueColumns}
|
||||||
|
request={async (params: any) => {
|
||||||
|
const req: any = {
|
||||||
|
SearchParameter: {
|
||||||
|
MEMBERSHIP_IDS: currentRow?.MEMBERSHIP_ID,
|
||||||
|
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
|
OWNERUNIT_ID: 911
|
||||||
|
},
|
||||||
|
PageIndex: params.current,
|
||||||
|
PageSize: 20,
|
||||||
|
SortStr: "OPERATE_DATE desc"
|
||||||
|
}
|
||||||
|
const data = await handleGetMEMBERGROWTHList(req)
|
||||||
|
console.log('33333', data);
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
return { data: data.List, success: true, total: data.TotalCount }
|
||||||
|
}
|
||||||
|
return { data: [], success: true }
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
: ''
|
||||||
|
}
|
||||||
</ProForm>
|
</ProForm>
|
||||||
|
|
||||||
|
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
{/* <Drawer
|
{/* <Drawer
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
.ant-modal-body {
|
.ant-modal-body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 700px;
|
height: 800px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
@ -138,9 +138,10 @@
|
|||||||
margin-left: 21px;
|
margin-left: 21px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
|
||||||
.carNavIcon {
|
.carNavIcon {
|
||||||
width: 26px;
|
width: 30px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
@ -153,6 +154,23 @@
|
|||||||
line-height: 12px;
|
line-height: 12px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
padding: 0 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectCarNavTitle {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectCarNavTitle::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
bottom: -10px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 2rem;
|
||||||
|
height: 2px;
|
||||||
|
background-color: #2B7CF0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -399,6 +399,7 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
<Modal
|
<Modal
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
|
className='scenicSpotConfig'
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
@ -420,6 +421,10 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
}
|
}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
width={900}
|
width={900}
|
||||||
|
bodyStyle={{
|
||||||
|
maxHeight: '700px', // 你可以根据需要调整高度
|
||||||
|
overflowY: 'auto',
|
||||||
|
}}
|
||||||
visible={modalVisible}
|
visible={modalVisible}
|
||||||
confirmLoading={confirmLoading}
|
confirmLoading={confirmLoading}
|
||||||
afterClose={() => {
|
afterClose={() => {
|
||||||
@ -443,6 +448,7 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
bounds={bounds}
|
bounds={bounds}
|
||||||
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
||||||
|
handle='.scenicSpotConfig'
|
||||||
>
|
>
|
||||||
<div ref={draggleRef}>{modal}</div>
|
<div ref={draggleRef}>{modal}</div>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
@ -499,7 +505,7 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={24}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="SCENICAREA_LOCATION"
|
name="SCENICAREA_LOCATION"
|
||||||
label="景区地址"
|
label="景区地址"
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSele
|
|||||||
import ServerpartInfo from "./components/serverpartInfo";
|
import ServerpartInfo from "./components/serverpartInfo";
|
||||||
import ProCard from "@ant-design/pro-card";
|
import ProCard from "@ant-design/pro-card";
|
||||||
import { ExclamationCircleOutlined, MenuFoldOutlined } from "@ant-design/icons";
|
import { ExclamationCircleOutlined, MenuFoldOutlined } from "@ant-design/icons";
|
||||||
import { Button, Col, FormInstance, message, Modal, Row, Tree, Image } from "antd";
|
import { Button, Col, FormInstance, message, Modal, Row, Tree, Image, Menu, Avatar, Tabs } from "antd";
|
||||||
import LoadingBox from "@/pages/reports/Finance/businessAnalysis/components/loading";
|
import LoadingBox from "@/pages/reports/Finance/businessAnalysis/components/loading";
|
||||||
import session from "@/utils/session";
|
import session from "@/utils/session";
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
@ -17,6 +17,8 @@ import { handleSynchroNOTICEINFO } from "@/pages/basicManage/highwayHeadlines/se
|
|||||||
import ProForm, { ProFormUploadButton } from "@ant-design/pro-form";
|
import ProForm, { ProFormUploadButton } from "@ant-design/pro-form";
|
||||||
import { deletePicture, getPictureList, uploadPicture } from "@/services/picture";
|
import { deletePicture, getPictureList, uploadPicture } from "@/services/picture";
|
||||||
import { handeGetPictureList } from "../service";
|
import { handeGetPictureList } from "../service";
|
||||||
|
import SubMenu from "antd/lib/menu/SubMenu";
|
||||||
|
import Draggable from "react-draggable";
|
||||||
|
|
||||||
const beforeUpload = (file: any) => {
|
const beforeUpload = (file: any) => {
|
||||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||||
@ -51,6 +53,29 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
// 文件列表
|
// 文件列表
|
||||||
const [fileList, setFileList] = useState<any>([])
|
const [fileList, setFileList] = useState<any>([])
|
||||||
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
|
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
|
||||||
|
const [currenRegion, setCurrenRegion] = useState<any>(); // 当前选中左侧菜单的片区节点
|
||||||
|
const [currenMenu, setCurrenMenu] = useState<any>(); // 当前选中左侧菜单的服务区节点
|
||||||
|
// 上传文件选择的tab
|
||||||
|
const [selectActiveKey, setSelectActiveKey] = useState<string>('1')
|
||||||
|
|
||||||
|
// 弹出框拖动效果
|
||||||
|
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
|
||||||
|
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
|
||||||
|
const draggleRef = React.createRef<any>()
|
||||||
|
|
||||||
|
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),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
const { loading: treeLoading, data: treeViews } = useRequest(async () => {
|
||||||
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true)
|
||||||
@ -64,7 +89,36 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
setTreeView(list)
|
setTreeView(list)
|
||||||
return data
|
return data
|
||||||
})
|
})
|
||||||
|
// 根据左侧选中的菜单加载右侧数据
|
||||||
|
const loadSelectedId = (item?: any) => {
|
||||||
|
console.log('itemitemitem', item);
|
||||||
|
|
||||||
|
// 选中的子菜单key
|
||||||
|
const [type, value] = item.key.split('-')
|
||||||
|
|
||||||
|
if (type === '1') {
|
||||||
|
setCurrenMenu(value)
|
||||||
|
setSelectedId('')
|
||||||
|
setCurrenRegion('')
|
||||||
|
|
||||||
|
// 只有修改服务区的时候 触发刷新
|
||||||
|
setShowRightForm(false)
|
||||||
|
setTimeout(() => {
|
||||||
|
setShowRightForm(true)
|
||||||
|
}, 10)
|
||||||
|
}
|
||||||
|
else if (type === '2') {
|
||||||
|
setSelectedId(value)
|
||||||
|
setCurrenMenu('')
|
||||||
|
setCurrenRegion('')
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setCurrenRegion(value)
|
||||||
|
setSelectedId('')
|
||||||
|
setCurrenMenu('')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 预览上传后的图片
|
// 预览上传后的图片
|
||||||
const handlePreview = async () => {
|
const handlePreview = async () => {
|
||||||
@ -110,20 +164,20 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
detailServerPartList.forEach((item: any) => {
|
detailServerPartList.forEach((item: any) => {
|
||||||
if (Number(item.SERVERPART_REGION) === Number(objA.SERVERPART_REGION)) {
|
if (Number(item.SERVERPART_REGION) === Number(objA.SERVERPART_REGION)) {
|
||||||
objA.SERVERPARTINFO_ID = item.SERVERPARTINFO_ID
|
objA.SERVERPARTINFO_ID = item.SERVERPARTINFO_ID
|
||||||
objA.SERVERPART_ID = selectedId
|
objA.SERVERPART_ID = currenMenu
|
||||||
objA.GREENSPACEAREA = item.GREENSPACEAREA
|
objA.GREENSPACEAREA = item.GREENSPACEAREA
|
||||||
objA.SCENICAREA = item.SCENICAREA
|
objA.SCENICAREA = item.SCENICAREA
|
||||||
}
|
}
|
||||||
if (Number(item.SERVERPART_REGION) === Number(objB.SERVERPART_REGION)) {
|
if (Number(item.SERVERPART_REGION) === Number(objB.SERVERPART_REGION)) {
|
||||||
objB.SERVERPARTINFO_ID = item.SERVERPARTINFO_ID
|
objB.SERVERPARTINFO_ID = item.SERVERPARTINFO_ID
|
||||||
objB.SERVERPART_ID = selectedId
|
objB.SERVERPART_ID = currenMenu
|
||||||
objB.GREENSPACEAREA = item.GREENSPACEAREA
|
objB.GREENSPACEAREA = item.GREENSPACEAREA
|
||||||
objB.SCENICAREA = item.SCENICAREA
|
objB.SCENICAREA = item.SCENICAREA
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (objB.SERVERPART_REGION) {
|
if (objB.SERVERPART_REGION) {
|
||||||
objB.SERVERPART_ID = selectedId
|
objB.SERVERPART_ID = currenMenu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,13 +264,13 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
carryReq = {
|
carryReq = {
|
||||||
...formDetailAll.carryingCapacityObj,
|
...formDetailAll.carryingCapacityObj,
|
||||||
NOTICEINFO_TYPE: "3020",
|
NOTICEINFO_TYPE: "3020",
|
||||||
SERVERPART_ID: selectedId,
|
SERVERPART_ID: currenMenu,
|
||||||
FEEDBACK_CONTENT: res.carryingCapacity
|
FEEDBACK_CONTENT: res.carryingCapacity
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
carryReq = {
|
carryReq = {
|
||||||
NOTICEINFO_TYPE: "3020",
|
NOTICEINFO_TYPE: "3020",
|
||||||
SERVERPART_ID: selectedId,
|
SERVERPART_ID: currenMenu,
|
||||||
FEEDBACK_CONTENT: res.carryingCapacity
|
FEEDBACK_CONTENT: res.carryingCapacity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -246,6 +300,85 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 生成左侧菜单
|
||||||
|
const getMenuDom = (data: any[], callback: (item: any) => void) => {
|
||||||
|
return (data.map((element: any) => {
|
||||||
|
if (element.node) {
|
||||||
|
// 绑定当前节点的子集
|
||||||
|
if (element.node.children && element.node.children.length > 0) {
|
||||||
|
return (
|
||||||
|
<SubMenu title={element.node.desc !== '0' ? <><span>{element.node.label}</span>
|
||||||
|
{/* <span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px', color: 'red' }}>
|
||||||
|
[{element.node.desc}]</span> */}
|
||||||
|
</> : element.node.label}
|
||||||
|
icon={element.node.ico ? <Avatar src={element.node.ico} size={16} style={{ marginRight: 4 }} shape="square" /> : null}
|
||||||
|
key={`${element.node.key || element.node.value}`}
|
||||||
|
onTitleClick={(item) => {
|
||||||
|
// 选中一级菜单
|
||||||
|
if (!currenMenu || item.key !== `${currenMenu?.key}`) {
|
||||||
|
callback.call(callback, item)
|
||||||
|
}
|
||||||
|
item.domEvent.stopPropagation();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{element.node.children && element.node.children.length > 0 && getMenuDom(element.node.children, callback)}
|
||||||
|
</SubMenu>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// 绑定嵌套树的子节点
|
||||||
|
if (element.children && element.children.length > 0) {
|
||||||
|
return (
|
||||||
|
<SubMenu title={element.node.label}
|
||||||
|
icon={element.node.ico ? <Avatar src={element.node.ico} size={16} style={{ marginRight: 4 }} shape="square" /> : null}
|
||||||
|
key={`${element.node.key || element.node.value}`}
|
||||||
|
onTitleClick={(item) => {
|
||||||
|
// 选中一级菜单
|
||||||
|
if (!currenMenu || item.key !== `${currenMenu?.key}`) {
|
||||||
|
callback.call(callback, item)
|
||||||
|
}
|
||||||
|
item.domEvent.stopPropagation();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{element.children && element.children.length > 0 && getMenuDom(element.children, callback)}
|
||||||
|
</SubMenu>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return (<Menu.Item icon={element.node.ico ? <Avatar src={element.node.ico} size={16} shape="square" /> : null}
|
||||||
|
key={`${element.node.key || element.node.value}`}>
|
||||||
|
{element.node.desc !== '0' ? <><span>{element.node.label}</span>
|
||||||
|
{/* <span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px', color: 'red' }}>
|
||||||
|
[{element.node.desc}]</span> */}
|
||||||
|
</> : element.node.label}</Menu.Item>)
|
||||||
|
}
|
||||||
|
// 绑定嵌套树的子节点
|
||||||
|
if (element.children && element.children.length > 0) {
|
||||||
|
return (
|
||||||
|
<SubMenu title={element.desc !== '0' ? <><span>{element.label}</span>
|
||||||
|
{/* <span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px', color: 'red' }}>
|
||||||
|
[{element.desc}]</span> */}
|
||||||
|
</> : element.label}
|
||||||
|
icon={element.ico ? <Avatar src={element.ico} size={16} style={{ marginRight: 4 }} shape="square" /> : null}
|
||||||
|
key={`${element.key || element.value}`}
|
||||||
|
onTitleClick={(item) => {
|
||||||
|
// 选中一级菜单
|
||||||
|
if (!currenMenu || item.key !== `${currenMenu?.key}`) {
|
||||||
|
callback.call(callback, item)
|
||||||
|
}
|
||||||
|
item.domEvent.stopPropagation();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{element.children && element.children.length > 0 && getMenuDom(element.children, callback)}
|
||||||
|
</SubMenu>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return (<Menu.Item icon={element.ico ? <Avatar src={element.ico} size={16} shape="square" /> : null}
|
||||||
|
key={`${element.key || element.value}`}>{element.desc !== '0' ? <><span>{element.label}</span>
|
||||||
|
{/* <span style={{ position: 'absolute', right: '10', top: '9px', lineHeight: '20px', padding: '2px 3px', color: 'red' }}>
|
||||||
|
[{element.desc}]</span> */}
|
||||||
|
</> : element.label}</Menu.Item>)
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div >
|
<div >
|
||||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||||
@ -264,7 +397,24 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
}} rev={undefined} />
|
}} rev={undefined} />
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{treeView && treeView.length > 0 ? <Tree
|
|
||||||
|
{!treeLoading && <Menu
|
||||||
|
mode="inline"
|
||||||
|
style={{ height: 'calc(100vh - 220px)', overflowY: 'auto', overflowX: 'hidden' }}
|
||||||
|
selectedKeys={selectedId
|
||||||
|
? [`2-${selectedId}`]
|
||||||
|
: currenMenu
|
||||||
|
? [`1-${currenMenu}`]
|
||||||
|
: currenRegion
|
||||||
|
? [`0-${currenRegion}`]
|
||||||
|
: []}
|
||||||
|
onSelect={(item, key, keyPath, selectedKeys, domEvent) => {
|
||||||
|
loadSelectedId(item)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{getMenuDom(treeView, loadSelectedId)}
|
||||||
|
</Menu>}
|
||||||
|
{/* {treeView && treeView.length > 0 ? <Tree
|
||||||
treeData={[{
|
treeData={[{
|
||||||
label: '全部',
|
label: '全部',
|
||||||
value: 0,
|
value: 0,
|
||||||
@ -296,7 +446,7 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
/> : ''}
|
/> : ''} */}
|
||||||
</ProCard>
|
</ProCard>
|
||||||
<div style={{
|
<div style={{
|
||||||
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||||
@ -309,7 +459,7 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
<div style={{ height: 'calc(100% - 60px)', overflowY: 'auto', boxSizing: "border-box", paddingTop: '12px' }}>
|
<div style={{ height: 'calc(100% - 60px)', overflowY: 'auto', boxSizing: "border-box", paddingTop: '12px' }}>
|
||||||
{
|
{
|
||||||
showRightForm ?
|
showRightForm ?
|
||||||
<ServerpartInfo onRef={serverPartRef} currentRow={{ SERVERPART_ID: selectedId ? selectedId : '' }} onShow={showRightForm} /> :
|
<ServerpartInfo onRef={serverPartRef} currentRow={{ SERVERPART_ID: currenMenu ? currenMenu : '' }} onShow={showRightForm} /> :
|
||||||
<LoadingBox />
|
<LoadingBox />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@ -317,8 +467,13 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
{/* 上传设施图片 */}
|
{/* 上传设施图片 */}
|
||||||
{/* 点击的按钮类型 1 服务区图片上传 2 母婴室图片上传 3 司机之家图片上传 4 住宿客房图片上传 5 便利店图片上传 */}
|
{/* 点击的按钮类型 1 服务区图片上传 2 母婴室图片上传 3 司机之家图片上传 4 住宿客房图片上传 5 便利店图片上传 */}
|
||||||
{
|
{
|
||||||
selectedId ? <div>
|
currenMenu ? <div>
|
||||||
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
||||||
|
setShowType(0)
|
||||||
|
setShowUploadImgModal(true)
|
||||||
|
}}>服务区设施图片上传</Button>
|
||||||
|
|
||||||
|
{/* <Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
||||||
setShowType(1)
|
setShowType(1)
|
||||||
setShowUploadImgModal(true)
|
setShowUploadImgModal(true)
|
||||||
}}>服务区图片上传</Button>
|
}}>服务区图片上传</Button>
|
||||||
@ -341,11 +496,11 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
||||||
setShowType(5)
|
setShowType(5)
|
||||||
setShowUploadImgModal(true)
|
setShowUploadImgModal(true)
|
||||||
}}>便利店图片上传</Button>
|
}}>便利店图片上传</Button> */}
|
||||||
</div> : ""
|
</div> : ""
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
selectedId ?
|
currenMenu ?
|
||||||
<Button type="primary" onClick={() => {
|
<Button type="primary" onClick={() => {
|
||||||
handleSubmitForm()
|
handleSubmitForm()
|
||||||
}}>保存</Button> : ''
|
}}>保存</Button> : ''
|
||||||
@ -372,9 +527,35 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
|
|
||||||
{/* */}
|
{/* */}
|
||||||
<Modal
|
<Modal
|
||||||
title={showType === 1 ? '服务区图片' : showType === 2 ? '母婴室图片' : showType === 3 ? '司机之家图片' : showType === 4 ? '住宿客房图片' : showType === 5 ? '便利店图片' : ''}
|
title={
|
||||||
|
<div
|
||||||
|
className='scenicSpotConfig'
|
||||||
|
style={{
|
||||||
|
width: '100%',
|
||||||
|
cursor: 'move',
|
||||||
|
}}
|
||||||
|
onMouseOver={() => {
|
||||||
|
if (disabled) {
|
||||||
|
setDraggleDisabled(false)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onMouseOut={() => {
|
||||||
|
setDraggleDisabled(true)
|
||||||
|
}}
|
||||||
|
|
||||||
|
onFocus={() => { }}
|
||||||
|
onBlur={() => { }}
|
||||||
|
>
|
||||||
|
服务区设施图片上传
|
||||||
|
{/* {showType === 1 ? '服务区图片' : showType === 2 ? '母婴室图片' : showType === 3 ? '司机之家图片' : showType === 4 ? '住宿客房图片' : showType === 5 ? '便利店图片' : ''} */}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
width={1200}
|
width={1200}
|
||||||
|
bodyStyle={{
|
||||||
|
maxHeight: '700px', // 你可以根据需要调整高度
|
||||||
|
overflowY: 'auto',
|
||||||
|
}}
|
||||||
visible={showUploadImgModal}
|
visible={showUploadImgModal}
|
||||||
confirmLoading={confirmLoading}
|
confirmLoading={confirmLoading}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
@ -382,6 +563,7 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
setShowType(0)
|
setShowType(0)
|
||||||
setShowUploadImgModal(false);
|
setShowUploadImgModal(false);
|
||||||
setFileList([])
|
setFileList([])
|
||||||
|
setSelectActiveKey('1')
|
||||||
}}
|
}}
|
||||||
onOk={async () => {
|
onOk={async () => {
|
||||||
console.log('file', fileList);
|
console.log('file', fileList);
|
||||||
@ -394,9 +576,9 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
formData.append('files[]', file.originFileObj);
|
formData.append('files[]', file.originFileObj);
|
||||||
formData.append('ImageName', typeof file !== 'string' ? file?.name : '');
|
formData.append('ImageName', typeof file !== 'string' ? file?.name : '');
|
||||||
});
|
});
|
||||||
formData.append('TableId', selectedId!);
|
formData.append('TableId', currenMenu!);
|
||||||
formData.append('imageType', showType === 1 ? '' : showType === 2 ? '1001' : showType === 3 ? '1002' : showType === 4 ? '2001' : showType === 5 ? '2002' : '');
|
formData.append('imageType', selectActiveKey === '1' ? '' : selectActiveKey === '2' ? '1001' : selectActiveKey === '3' ? '1002' : selectActiveKey === '4' ? '2001' : selectActiveKey === '5' ? '2002' : '');
|
||||||
formData.append('TableType', showType === 1 ? '1123' : showType === 2 ? '1131' : showType === 3 ? '1131' : showType === 4 ? '1131' : showType === 5 ? '1131' : '');
|
formData.append('TableType', selectActiveKey === '1' ? '1123' : selectActiveKey === '2' ? '1131' : selectActiveKey === '3' ? '1131' : selectActiveKey === '4' ? '1131' : selectActiveKey === '5' ? '1131' : '');
|
||||||
|
|
||||||
console.log('formData', formData);
|
console.log('formData', formData);
|
||||||
let res = await uploadPicture(formData)
|
let res = await uploadPicture(formData)
|
||||||
@ -406,6 +588,7 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
setConfirmLoading(false)
|
setConfirmLoading(false)
|
||||||
setShowType(0)
|
setShowType(0)
|
||||||
setShowUploadImgModal(false);
|
setShowUploadImgModal(false);
|
||||||
|
setSelectActiveKey('1')
|
||||||
setFileList([])
|
setFileList([])
|
||||||
setShowRightForm(false)
|
setShowRightForm(false)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -419,48 +602,91 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
setShowType(0)
|
setShowType(0)
|
||||||
setShowUploadImgModal(false);
|
setShowUploadImgModal(false);
|
||||||
setFileList([])
|
setFileList([])
|
||||||
|
setSelectActiveKey('1')
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
modalRender={(modal) => {
|
||||||
|
return <Draggable
|
||||||
|
disabled={disabled}
|
||||||
|
bounds={bounds}
|
||||||
|
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
||||||
|
handle='.scenicSpotConfig'
|
||||||
|
>
|
||||||
|
<div ref={draggleRef}>{modal}</div>
|
||||||
|
</Draggable>
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<Tabs
|
||||||
|
onChange={(e: any) => {
|
||||||
|
setSelectActiveKey(e)
|
||||||
|
}}
|
||||||
|
activeKey={selectActiveKey}
|
||||||
|
items={[
|
||||||
|
{
|
||||||
|
label: `服务区图片上传`,
|
||||||
|
key: '1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: `母婴室图片上传`,
|
||||||
|
key: '2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: `司机之家图片上传`,
|
||||||
|
key: '3',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: `住宿客房图片上传`,
|
||||||
|
key: '4',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: `便利店图片上传`,
|
||||||
|
key: '5',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ProForm
|
<ProForm
|
||||||
|
key={selectActiveKey}
|
||||||
layout={'horizontal'}
|
layout={'horizontal'}
|
||||||
formRef={modalRef}
|
formRef={modalRef}
|
||||||
submitter={false}
|
submitter={false}
|
||||||
preserve={false}
|
preserve={false}
|
||||||
request={async () => {
|
request={async () => {
|
||||||
|
console.log('selectActiveKey', selectActiveKey);
|
||||||
|
|
||||||
let req: any = {
|
let req: any = {
|
||||||
TableId: selectedId,
|
TableId: currenMenu,
|
||||||
TableName: showType === 1 ? 'SERVERPART' : showType === 2 ? 'SERVERPARTINFO' : showType === 3 ? 'SERVERPARTINFO' : showType === 4 ? 'SERVERPARTINFO' : showType === 5 ? 'SERVERPARTINFO' : '',
|
TableName: selectActiveKey === '1' ? 'SERVERPART' : selectActiveKey === '2' ? 'SERVERPARTINFO' : selectActiveKey === '3' ? 'SERVERPARTINFO' : selectActiveKey === '4' ? 'SERVERPARTINFO' : selectActiveKey === '5' ? 'SERVERPARTINFO' : '',
|
||||||
TableType: showType === 1 ? '1123' : showType === 2 ? '1131' : showType === 3 ? '1131' : showType === 4 ? '1131' : showType === 5 ? '1131' : '',
|
TableType: selectActiveKey === '1' ? '1123' : selectActiveKey === '2' ? '1131' : selectActiveKey === '3' ? '1131' : selectActiveKey === '4' ? '1131' : selectActiveKey === '5' ? '1131' : '',
|
||||||
ImageType: showType === 1 ? '' : showType === 2 ? '1001' : showType === 3 ? '1002' : showType === 4 ? '2001' : showType === 5 ? '2002' : '',
|
ImageType: selectActiveKey === '1' ? '' : selectActiveKey === '2' ? '1001' : selectActiveKey === '3' ? '1002' : selectActiveKey === '4' ? '2001' : selectActiveKey === '5' ? '2002' : '',
|
||||||
}
|
}
|
||||||
const data = await handeGetPictureList(req)
|
const data = await handeGetPictureList(req)
|
||||||
console.log('datadatadatadata', data);
|
console.log('datadatadatadata', data);
|
||||||
|
let list: any = []
|
||||||
if (data.List && data.List.length > 0) {
|
if (data.List && data.List.length > 0) {
|
||||||
let list: any = []
|
data.List.forEach((item: any) => {
|
||||||
if (data.List && data.List.length > 0) {
|
let obj = JSON.parse(JSON.stringify(item))
|
||||||
data.List.forEach((item: any) => {
|
obj.url = obj.ImageUrl
|
||||||
let obj = JSON.parse(JSON.stringify(item))
|
obj.name = obj.ImageName
|
||||||
obj.url = obj.ImageUrl
|
obj.uid = item.ImageId
|
||||||
obj.name = obj.ImageName
|
obj.status = 'done'
|
||||||
obj.uid = item.ImageId
|
list.push(obj)
|
||||||
obj.status = 'done'
|
})
|
||||||
list.push(obj)
|
}
|
||||||
})
|
setFileList(list);
|
||||||
}
|
return {
|
||||||
setFileList(list);
|
SCENICAREA_Image: list
|
||||||
return {
|
|
||||||
SCENICAREA_Image: list
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return {}
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormUploadButton
|
<ProFormUploadButton
|
||||||
name="SCENICAREA_Image"
|
name="SCENICAREA_Image"
|
||||||
label={showType === 1 ? '服务区图片' : showType === 2 ? '母婴室图片' : showType === 3 ? '司机之家图片' : showType === 4 ? '住宿客房图片' : showType === 5 ? '便利店图片' : ''}
|
label={selectActiveKey === '1' ? '服务区图片' : selectActiveKey === '2' ? '母婴室图片' : selectActiveKey === '3' ? '司机之家图片' : selectActiveKey === '4' ? '住宿客房图片' : selectActiveKey === '5' ? '便利店图片' : ''}
|
||||||
listType="picture-card"
|
listType="picture-card"
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
fieldProps={{
|
fieldProps={{
|
||||||
@ -478,7 +704,7 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
async onOk() {
|
async onOk() {
|
||||||
if (info.file.ImageId) {
|
if (info.file.ImageId) {
|
||||||
const deleteLoading = message.loading('正在删除...')
|
const deleteLoading = message.loading('正在删除...')
|
||||||
const success = await deletePicture(info.file?.ImagePath, info.file?.uid, showType === 1 ? 'SERVERPART' : showType === 2 ? 'SERVERPARTINFO' : showType === 3 ? 'SERVERPARTINFO' : showType === 4 ? 'SERVERPARTINFO' : showType === 5 ? 'SERVERPARTINFO' : '', showType === 1 ? '1123' : showType === 2 ? '1131' : showType === 3 ? '1131' : showType === 4 ? '1131' : showType === 5 ? '1131' : '')
|
const success = await deletePicture(info.file?.ImagePath, info.file?.uid, selectActiveKey === '1' ? 'SERVERPART' : selectActiveKey === '2' ? 'SERVERPARTINFO' : selectActiveKey === '3' ? 'SERVERPARTINFO' : selectActiveKey === '4' ? 'SERVERPARTINFO' : selectActiveKey === '5' ? 'SERVERPARTINFO' : '', selectActiveKey === '1' ? '1123' : selectActiveKey === '2' ? '1131' : selectActiveKey === '3' ? '1131' : selectActiveKey === '4' ? '1131' : selectActiveKey === '5' ? '1131' : '')
|
||||||
deleteLoading()
|
deleteLoading()
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
|
|||||||
@ -575,3 +575,14 @@ export async function handeGetMemberAddressCombineList(params: any) {
|
|||||||
return data.Result_Data
|
return data.Result_Data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取服务区经营商家树
|
||||||
|
export async function handeGetSPRegionShopTree(params: any) {
|
||||||
|
const data = await requestEncryption(`/BaseInfo/GetSPRegionShopTree`, {
|
||||||
|
method: 'POST',
|
||||||
|
data: { ...params, requestEncryption: true }
|
||||||
|
})
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return wrapTreeNode(data.Result_Data.List)
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user