This commit is contained in:
ylj20011123 2025-06-20 19:26:23 +08:00
parent 09d7a93e89
commit aea7dea7c1
34 changed files with 869 additions and 316 deletions

View File

@ -692,6 +692,174 @@ export default [
path: 'MemberAddress', path: 'MemberAddress',
name: 'MemberAddress', name: 'MemberAddress',
component: './travelMember/MemberAddress/index' component: './travelMember/MemberAddress/index'
},
// 失物招领申请
{
path: 'LostandFoundAPPliance',
name: 'LostandFoundAPPliance',
component: './travelMember/LostandFoundAPPliance/index'
},
// 失物招领审核
{
path: 'LostandFoundReview',
name: 'LostandFoundReview',
component: './travelMember/LostandFoundReview/index'
},
// 图库类型管理
{
path: 'LibraryTypeManager',
name: 'LibraryTypeManager',
component: './travelMember/LibraryTypeManager/index'
},
// 图库信息管理
{
path: 'LibraryInformationManager',
name: 'LibraryInformationManager',
component: './travelMember/LibraryInformationManager/index'
},
// 点餐类别管理
{
path: 'OrderCategoryManage',
name: 'OrderCategoryManage',
component: './travelMember/OrderCategoryManage/index'
},
// 点餐商品管理
{
path: 'OrderProductManage',
name: 'OrderProductManage',
component: './travelMember/OrderProductManage/index'
},
// 商家评价管理
{
path: 'MerchantEvaluationManage',
name: 'MerchantEvaluationManage',
component: './travelMember/MerchantEvaluationManage/index'
},
// 自营餐饮商品申请
{
path: 'SelfOperatedProductApplication',
name: 'SelfOperatedProductApplication',
component: './travelMember/SelfOperatedProductApplication/index'
},
// 自营餐饮商品审核
{
path: 'SelfOperatedProductReview',
name: 'SelfOperatedProductReview',
component: './travelMember/SelfOperatedProductReview/index'
},
// 合作商户商品申请
{
path: 'MerchantProductApplication',
name: 'MerchantProductApplication',
component: './travelMember/MerchantProductApplication/index'
},
// 合作商户商品审核
{
path: 'MerchantProductReview',
name: 'MerchantProductReview',
component: './travelMember/MerchantProductReview/index'
},
// 供货商户分类
{
path: 'SupplierClassification',
name: 'SupplierClassification',
component: './travelMember/SupplierClassification/index'
},
// 供货商户管理
{
path: 'SupplierMerchantManage',
name: 'SupplierMerchantManage',
component: './travelMember/SupplierMerchantManage/index'
},
// 商城品牌管理
{
path: 'MallBrandManage',
name: 'MallBrandManage',
component: './travelMember/MallBrandManage/index'
},
// 商城分类管理
{
path: 'MallClassificationManage',
name: 'MallClassificationManage',
component: './travelMember/MallClassificationManage/index'
},
// 商品规格管理
{
path: 'ProductSpecificationManage',
name: 'ProductSpecificationManage',
component: './travelMember/ProductSpecificationManage/index'
},
// 商品上架管理
{
path: 'ProductListingManagement',
name: 'ProductListingManagement',
component: './travelMember/ProductListingManagement/index'
},
// 商城商品查询
{
path: 'ShoppingMallProductSearch',
name: 'ShoppingMallProductSearch',
component: './travelMember/ShoppingMallProductSearch/index'
},
// 售后类型管理
{
path: 'AfterSalesTypeManage',
name: 'AfterSalesTypeManage',
component: './travelMember/AfterSalesTypeManage/index'
},
// 商城订单管理
{
path: 'MallOrderManage',
name: 'MallOrderManage',
component: './travelMember/MallOrderManage/index'
},
// 订单售后管理
{
path: 'OrderAfterSalesManage',
name: 'OrderAfterSalesManage',
component: './travelMember/OrderAfterSalesManage/index'
},
// 商城评价管理
{
path: 'MallEvaluationManage',
name: 'MallEvaluationManage',
component: './travelMember/MallEvaluationManage/index'
},
// 首页精选商家
{
path: 'HomeSelectedMerchants',
name: 'HomeSelectedMerchants',
component: './travelMember/HomeSelectedMerchants/index'
},
// 首页精选卡券
{
path: 'HomeSelectedCoupons',
name: 'HomeSelectedCoupons',
component: './travelMember/HomeSelectedCoupons/index'
},
// 首页精选商城
{
path: 'HomeSelectedMall',
name: 'HomeSelectedMall',
component: './travelMember/HomeSelectedMall/index'
},
// 预约点餐订单
{
path: 'BookingMealOrder',
name: 'BookingMealOrder',
component: './travelMember/BookingMealOrder/index'
},
// 点餐售后管理
{
path: 'AfterSalesManage',
name: 'AfterSalesManage',
component: './travelMember/AfterSalesManage/index'
},
// 预约订单汇总
{
path: 'SummaryOfReservation',
name: 'SummaryOfReservation',
component: './travelMember/SummaryOfReservation/index'
} }
] ]
}, },
@ -729,7 +897,25 @@ export default [
path: 'CardVoucherSearch', path: 'CardVoucherSearch',
name: 'CardVoucherSearch', name: 'CardVoucherSearch',
component: './CardInformation/CardVoucherSearch/index' component: './CardInformation/CardVoucherSearch/index'
},
// 新增卡券申请
{
path: 'NewCouponApplication',
name: 'NewCouponApplication',
component: './CardInformation/NewCouponApplication/index'
},
// 新增卡券审核
{
path: 'NewCouponReview',
name: 'NewCouponReview',
component: './CardInformation/NewCouponReview/index'
} }
] ]
}, },
{ {

View File

@ -0,0 +1 @@
// 新增卡券申请

View File

@ -0,0 +1 @@
// 新增卡券审核

View File

@ -12,14 +12,14 @@ import ProDescriptions from '@ant-design/pro-descriptions';
import ProForm, { ProFormDatePicker, ProFormDateTimePicker, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea, ProFormUploadButton } from '@ant-design/pro-form'; import ProForm, { ProFormDatePicker, ProFormDateTimePicker, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea, ProFormUploadButton } from '@ant-design/pro-form';
import { MenuFoldOutlined, PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons'; import { MenuFoldOutlined, PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
import { PageContainer } from '@ant-design/pro-layout'; import { PageContainer } from '@ant-design/pro-layout';
import { Button, Col, Drawer, message, Row, Popconfirm, Space, Image, Modal, Form, Switch, Upload, Tooltip, Descriptions, TreeSelect } from 'antd'; import { Button, Col, Drawer, message, Row, Popconfirm, Space, Image, Modal, Form, Switch, Upload, Tooltip, Descriptions, TreeSelect, Divider, Tabs, Select, Input, Tree } from 'antd';
import type { CurrentUser } from "umi"; import type { CurrentUser } from "umi";
import type { ConnectState } from '@/models/connect'; import type { ConnectState } from '@/models/connect';
import type { ActionType, ProColumns } from '@ant-design/pro-table'; import type { ActionType, ProColumns } from '@ant-design/pro-table';
import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import type { FormInstance } from 'antd'; import type { FormInstance } from 'antd';
import { handleGetMEMBERADDRESSList, handleGetSERVERPARTSHOPList } from '../service'; import { handleDeleteSERVERPARTSELLER, handleGetMEMBERADDRESSList, handleGetRelateShopToSeller, handleGetSERVERPARTSELLERDetail, handleGetSERVERPARTSHOPList, handleRemoveShopFromSeller, handleSynchroSERVERPARTSELLER } from '../service';
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';
@ -29,6 +29,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
const { currentUser } = props const { currentUser } = props
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>(); const formRef = useRef<FormInstance>();
const formMerchantRef = useRef<FormInstance>();
const associationActionRef = useRef<ActionType>(); const associationActionRef = useRef<ActionType>();
const [currentRow, setCurrentRow] = useState<any>(); const [currentRow, setCurrentRow] = useState<any>();
const [showDetail, setShowDetail] = useState<boolean>(); const [showDetail, setShowDetail] = useState<boolean>();
@ -41,10 +42,23 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
// 新增关联选择的方法 // 新增关联选择的方法
const [selectedRowKeys, setSelectRowKeys] = useState<any>(); const [selectedRowKeys, setSelectRowKeys] = useState<any>();
const [selectedRowDetail, setSelectRowDetail] = useState<any>(); const [selectedRowDetail, setSelectRowDetail] = useState<any>();
// 在关联编辑页里面的tab选择
const [selectTab, setSelectTab] = useState<string>("1")
// 当前编辑商家的关联门店数据
const [currentShopData, setCurrentShopData] = useState<any>()
// 当前编辑商家的详情
const [currentRowDetail, setCurrentRowDetail] = useState<any>()
// 选择的 要关联的服务区
const [selectAssociationServerpart, setSelectAssociationServerpart] = useState<any>()
let SHOPTRADEObj = session.get('SHOPTRADEObj') let SHOPTRADEObj = session.get('SHOPTRADEObj')
let SHOPTRADEList = session.get('SHOPTRADEList')
let shopregionObj = session.get('shopregionObj') let shopregionObj = session.get('shopregionObj')
let businessStateObj = session.get('businessStateObj') let businessStateObj = session.get('businessStateObj')
let SERVERPARTTree = session.get('SERVERPARTTree')
let serverpartList = session.get('serverpartList')
// 弹出框拖动效果 // 弹出框拖动效果
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置 const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
@ -83,7 +97,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
dataIndex: 'SHOPTRADE', dataIndex: 'SHOPTRADE',
title: '经营业态', title: '经营业态',
align: 'center', align: 'center',
width: 150, width: 120,
valueType: 'select', valueType: 'select',
valueEnum: SHOPTRADEObj, valueEnum: SHOPTRADEObj,
fieldProps: { fieldProps: {
@ -96,35 +110,35 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
dataIndex: '', dataIndex: '',
title: '预约点餐', title: '预约点餐',
align: 'center', align: 'center',
width: 150, width: 120,
hideInSearch: true, hideInSearch: true,
}, },
{ {
dataIndex: 'MONTHLYSALES', dataIndex: 'MONTHLYSALES',
title: '月销售量', title: '月销售量',
align: 'center', align: 'center',
width: 150, width: 120,
hideInSearch: true, hideInSearch: true,
}, },
{ {
dataIndex: 'PERCAPITA', dataIndex: 'PERCAPITA',
title: '人均消费', title: '人均消费',
align: 'center', align: 'center',
width: 150, width: 120,
hideInSearch: true, hideInSearch: true,
}, },
{ {
dataIndex: 'SELLER_SCORE', dataIndex: 'SELLER_SCORE',
title: '评价分数', title: '评价分数',
align: 'center', align: 'center',
width: 150, width: 120,
hideInSearch: true, hideInSearch: true,
}, },
{ {
dataIndex: 'COMMENT_COUNT', dataIndex: 'COMMENT_COUNT',
title: '评价数量', title: '评价数量',
align: 'center', align: 'center',
width: 150, width: 120,
hideInSearch: true, hideInSearch: true,
}, },
{ {
@ -139,7 +153,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
dataIndex: 'option', dataIndex: 'option',
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: 150, width: 120,
align: 'center', align: 'center',
hideInSearch: true, hideInSearch: true,
render: (_, record) => { render: (_, record) => {
@ -147,6 +161,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
<Space> <Space>
<a <a
onClick={() => { onClick={() => {
console.log('recordrecordrecordrecord', record);
setCurrentRow({ ...record }); setCurrentRow({ ...record });
handleModalVisible(true); handleModalVisible(true);
}} }}
@ -156,7 +171,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
<Popconfirm <Popconfirm
title="确认删除该服务区商家信息列表信息吗?" title="确认删除该服务区商家信息列表信息吗?"
onConfirm={async () => { onConfirm={async () => {
await handelDelete(record.SERVERPARTSELLER_ID); await handelDelete(record.SELLER_ID);
}} }}
> >
<a></a> <a></a>
@ -211,7 +226,6 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
title: '经营状态', title: '经营状态',
align: 'center', align: 'center',
width: 120, width: 120,
hideInSearch: true,
valueType: "select", valueType: "select",
valueEnum: businessStateObj valueEnum: businessStateObj
}, },
@ -241,40 +255,245 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
width: 150, width: 150,
ellipsis: true, ellipsis: true,
hideInSearch: true, hideInSearch: true,
}, }
{
dataIndex: 'option',
title: '操作',
valueType: 'option',
width: 150,
align: 'center',
hideInSearch: true,
render: (_, record) => {
return (
<Space>
<a
onClick={() => {
setCurrentRow({ ...record });
handleModalVisible(true);
}}
>
</a>
</Space>
);
},
},
] ]
const handelDelete = async (serverpartsellerid: number) => { // 门店信息的表格
const shopColumns: any = [
{
title: "序号",
dataIndex: "index",
valueType: "index",
align: 'center',
width: 80
},
{
title: "门店",
dataIndex: "SHOPNAME",
width: 150,
align: 'center'
},
{
title: "门店简称",
dataIndex: "SHOPSHORTNAME",
width: 150,
align: 'center'
},
{
title: "门店方向",
dataIndex: "SHOPDIRECTION",
width: 150,
align: 'center',
render: (_, record) => {
return <Input defaultValue={record?.SHOPDIRECTION} onBlur={(e) => {
if (e.target.value !== record?.SHOPDIRECTION) {
let list: any = JSON.parse(JSON.stringify(currentShopData))
if (list && list.length > 0) {
list.forEach((item: any) => {
if (item.SERVERPARTSHOP_ID === record?.SERVERPARTSHOP_ID) {
item.SHOPDIRECTION = e.target.value
}
})
}
setCurrentShopData(list)
}
}} />
}
},
{
title: "扫码点餐",
dataIndex: "SCANCODE_ORDER",
width: 150,
align: 'center',
render: (_, record) => {
return <Select
value={record?.SCANCODE_ORDER || 0}
options={[{ label: "启用", value: 1 }, { label: "禁用", value: 0 }]}
onChange={(e: any) => {
let list: any = JSON.parse(JSON.stringify(currentShopData))
if (list && list.length > 0) {
list.forEach((item: any) => {
if (item.SERVERPARTSHOP_ID === record?.SERVERPARTSHOP_ID) {
item.SCANCODE_ORDER = e
}
})
}
setCurrentShopData(list)
}}
></Select>
}
},
{
title: "联系人名称",
dataIndex: "SHOP_LINKMAN",
width: 150,
align: 'center'
},
{
title: "联系电话",
dataIndex: "SHOP_TELEPHONE",
width: 150,
align: 'center'
},
{
title: "操作",
dataIndex: "option",
width: 120,
align: 'center',
render: (_, record) => {
return <Space>
<Popconfirm
title="确认解除关联?"
onConfirm={async () => {
await handleRemoveSeller(record)
}}
>
<a></a>
</Popconfirm>
</Space>
}
}
]
// 评论信息表格
const commentColumns: any = [
{
title: "序号",
dataIndex: "index",
valueType: "index",
width: 80
},
{
title: "评价时间",
dataIndex: "",
width: 150
},
{
title: "评价人员",
dataIndex: "",
width: 120
},
{
title: "会员类型",
dataIndex: "",
width: 120
},
{
title: "匿名评价",
dataIndex: "",
width: 120
},
{
title: "评分",
dataIndex: "",
width: 120
},
{
title: "评价内容",
dataIndex: "",
width: 200
},
{
title: "回复内容",
dataIndex: "",
width: 200
},
{
title: "图片信息",
dataIndex: "",
width: 200
}
]
const handelDelete = async (id: number) => {
console.log('fjsdfsdflksa', id);
const req: any = {
SERVERPARTSELLERId: id
}
const result = await handleDeleteSERVERPARTSELLER(req)
if (result.Result_Code !== 100) {
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
} else {
message.success('删除成功!');
actionRef.current?.reload()
}
}; };
const handleAddUpdate = async (res: any) => { const handleAddUpdate = async (res: any) => {
let req: any = {}
if (currentRow?.SELLER_ID) {
req = {
...currentRowDetail,
...res,
UPDATE_STAFF_ID: currentUser?.ID,
UPDATE_STAFF_NAME: currentUser?.Name,
UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
}
} else {
req = {
...res,
PROVINCE_CODE: currentUser?.ProvinceCode,
ISVALID: 1,
CREATE_STAFF_ID: currentUser?.ID,
CREATE_STAFF_NAME: currentUser?.Name,
CREATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
}
}
const data = await handleSynchroSERVERPARTSELLER(req)
handleConfirmLoading(false)
if (data.Result_Code === 100) {
message.success(data.Result_Desc)
formRef?.current?.resetFields()
setCurrentRow(undefined)
handleModalVisible(false)
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
}
}; };
// 移除门店关联
const handleRemoveSeller = async (obj: any) => {
const req: any = {
SellerId: obj.SELLER_ID,
ShopIds: obj?.SERVERPARTSHOP_ID
}
const result = await handleRemoveShopFromSeller(req)
if (result.Result_Code !== 100) {
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
} else {
message.success('删除成功!');
// formRef.current?.resetFields()
await handleGetMemberDetail()
}
}
// 服务区商家的详情信息
const handleGetMemberDetail = async () => {
if (currentRow?.SELLER_ID) {
const data = await handleGetSERVERPARTSELLERDetail({ SERVERPARTSELLERId: currentRow?.SELLER_ID })
setCurrentShopData(data.ShopList)
setCurrentRowDetail(data)
formRef.current?.setFieldsValue(data)
return {
...data,
SHOPTRADE: currentRow?.SHOPTRADE ? Number(currentRow?.SHOPTRADE) : ""
}
} else {
return {
ISSHOW: 1
}
}
}
return ( return (
<div> <div>
<div style={{ backgroundColor: '#fff', display: 'flex' }}> <div style={{ backgroundColor: '#fff', display: 'flex' }}>
@ -310,6 +529,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
PageIndex: params.current, PageIndex: params.current,
PageSize: params.pageSize, PageSize: params.pageSize,
} }
console.log('reqreqreqreq', req);
const data = await handleGetMEMBERADDRESSList(req); const data = await handleGetMEMBERADDRESSList(req);
console.log('datadatadatadatadata', data); console.log('datadatadatadatadata', data);
if (data.List && data.List.length > 0) { if (data.List && data.List.length > 0) {
@ -319,19 +539,20 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
}} }}
columns={columns} columns={columns}
toolbar={{ toolbar={{
actions: selectedId ? [ actions: [
// 新增按钮 // 新增按钮
<Button <Button
key="new" key="new"
icon={<PlusOutlined />} icon={<PlusOutlined />}
type="primary" type="primary"
onClick={() => { onClick={() => {
setShowAddModal(true) // setShowAddModal(true)
handleModalVisible(true);
}} }}
> >
</Button>, </Button>,
] : "", ],
}} }}
pagination={{ defaultPageSize: 10 }} pagination={{ defaultPageSize: 10 }}
/> />
@ -354,11 +575,34 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
}} }}
okText={"关联"} okText={"关联"}
onOk={async () => { // 提交框内的数据 onOk={async () => { // 提交框内的数据
console.log('selectedRowKeysselectedRowKeys', selectedRowKeys); console.log('selectedRowKeysselectedRowKeysselectedRowKeys', selectedRowKeys);
console.log('selectedRowDetailselectedRowDetail', selectedRowDetail);
if (!(selectedRowKeys && selectedRowKeys.length > 0)) {
message.error('请选择要关联的门店!')
return
}
// 关联 接口
const req: any = {
SellerId: currentRow?.SELLER_ID,
ShopIds: selectedRowKeys.toString()
}
const data = await handleGetRelateShopToSeller(req)
if (data.Result_Code === 100) {
message.success(data.Result_Desc)
setShowAddModal(false)
setSelectRowKeys(null)
setSelectRowDetail(null)
// formRef.current?.resetFields()
handleGetMemberDetail()
} else {
message.error(data.Result_Desc)
}
}} }}
> >
<div style={{ display: 'flex', alignItems: 'flex-start' }}>
<LeftSelectTree setSelectedId={setSelectAssociationServerpart} />
<div style={{ width: 'calc(100% - 300px)' }}>
<ProTable <ProTable
actionRef={associationActionRef} actionRef={associationActionRef}
columns={merchantColumns} columns={merchantColumns}
@ -366,10 +610,14 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
bordered bordered
rowKey={"SERVERPARTSHOP_ID"} rowKey={"SERVERPARTSHOP_ID"}
request={async (params) => { request={async (params) => {
if (!selectAssociationServerpart) {
return
}
const req: any = { const req: any = {
searchParameter: { searchParameter: {
SERVERPART_IDS: selectedId, SERVERPART_IDS: selectAssociationServerpart,
ISVALID: params?.ISVALID ISVALID: params?.ISVALID,
BUSINESS_STATE: params?.BUSINESS_STATE
}, },
PageIndex: 1, PageIndex: 1,
PageSize: 999999, PageSize: 999999,
@ -397,13 +645,12 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
}, },
}} }}
/> />
</div>
</div>
</Modal> </Modal>
{/* 同步商户门店信息的悬浮框 */}
<Modal <Modal
title={ title={
<div <div
@ -427,7 +674,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
</div> </div>
} }
destroyOnClose={true} destroyOnClose={true}
width={900} width={'65%'}
visible={modalVisible} visible={modalVisible}
confirmLoading={confirmLoading} confirmLoading={confirmLoading}
afterClose={() => { afterClose={() => {
@ -437,14 +684,15 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
onCancel={() => { onCancel={() => {
handleConfirmLoading(false) handleConfirmLoading(false)
handleModalVisible(false) handleModalVisible(false)
setCurrentRowDetail(null)
setCurrentRow(null)
}} }}
// onOk={async () => { // 提交框内的数据
onOk={async () => { // 提交框内的数据 // formRef?.current?.validateFields().then(() => {
formRef?.current?.validateFields().then(() => { // handleConfirmLoading(true)
handleConfirmLoading(true) // formRef?.current?.submit()
formRef?.current?.submit() // })
}) // }}
}}
modalRender={(modal) => { modalRender={(modal) => {
return <Draggable return <Draggable
disabled={disabled} disabled={disabled}
@ -454,265 +702,270 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
<div ref={draggleRef}>{modal}</div> <div ref={draggleRef}>{modal}</div>
</Draggable> </Draggable>
}} }}
footer={<div style={{ width: '100%', display: 'flex', justifyContent: 'space-between' }}>
{
currentRow?.SELLER_ID ?
<div>
<Button type={"primary"} onClick={() => {
setShowAddModal(true)
}}></Button>
<Button type={"primary"}></Button>
</div>
: <div></div>
}
<div>
<Button onClick={() => {
handleConfirmLoading(false)
handleModalVisible(false)
setCurrentRowDetail(null)
setCurrentRow(null)
}}></Button>
<Button type={"primary"} onClick={() => {
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
})
}}></Button>
</div>
</div>}
> >
<ProForm <ProForm
layout={'horizontal'} layout={'horizontal'}
wrapperCol={{ span: 16 }} // 表单项 填写部分所占的栅格数
labelCol={{ span: 6 }} // 表单项 标题所占的栅格数
formRef={formRef} formRef={formRef}
autoFocusFirstInput autoFocusFirstInput
submitter={false} submitter={false}
preserve={false} preserve={false}
initialValues={currentRow} request={async () => {
const data = await handleGetMemberDetail()
return data
// if (currentRow?.SELLER_ID) {
// const data = await handleGetSERVERPARTSELLERDetail({ SERVERPARTSELLERId: currentRow?.SELLER_ID })
// console.log('fdsjkfjsadl', data);
// setCurrentShopData(data.ShopList)
// setCurrentRowDetail(data)
// return {
// ...data,
// SHOPTRADE: currentRow?.SHOPTRADE ? Number(currentRow?.SHOPTRADE) : ""
// }
// } else {
// return {
// ISSHOW: 1
// }
// }
}}
// initialValues={{
// ...currentRow,
// SHOPTRADE: currentRow?.SHOPTRADE ? Number(currentRow?.SHOPTRADE) : ""
// }}
onFinish={async (values) => { onFinish={async (values) => {
let newValue: any = { ...values }; let newValue: any = { ...values };
if (currentRow) { if (currentRow) {
// 编辑数据 // 编辑数据
newValue = { ...values, SERVERPARTSELLER_ID: currentRow.SERVERPARTSELLER_ID }; newValue = {
} ...values,
// 如果有开关,要把开关的代码写进去 SERVERPARTSELLER_ID: currentRow.SERVERPARTSELLER_ID,
const success = await handleAddUpdate(newValue as SERVERPARTSELLERModel); ShopList: currentShopData
};
handleConfirmLoading(false)
if (success) {
if (actionRef.current) {
actionRef.current.reload();
}
handleModalVisible(false);
} }
await handleAddUpdate(newValue);
}} }}
> >
<Row> <Row gutter={8}>
<Col span={12}> <Col span={8}>
<ProFormText <ProFormText
name="SELLER_NAME" name="SELLER_NAME"
label="商家名称" label="商家名称"
rules={[
{
required: true,
message: '请输入商家名称!'
}
]}
/> />
</Col> </Col>
<Col span={12}> <Col span={8}>
<ProFormText <ProFormSelect
name="PROVINCE_CODE"
label="省份编码"
/>
</Col>
<Col span={12}>
<ProFormText
name="SERVERPARTSHOP_IDS"
label="东西区门店内码"
/>
</Col>
<Col span={12}>
<ProFormText
name="SHOPTRADE" name="SHOPTRADE"
label="行业名称" label="门店业态"
options={SHOPTRADEList}
rules={[
{
required: true,
message: '请选择门店业态!'
}
]}
/> />
</Col> </Col>
<Col span={12}> <Col span={8}>
<ProFormText <ProFormText
name="SHOPDIRECTION"
label="门店方向"
/>
</Col>
<Col span={12}>
<ProFormText
name="SHOPREGION"
label="所属方位"
/>
</Col>
<Col span={12}>
<ProFormMoney
width="lg"
fieldProps={{
moneySymbol: false,
}}
name="SELLER_INDEX" name="SELLER_INDEX"
label="排序索引" label="排序索引"
/> />
</Col> </Col>
<Col span={12}> <Col span={8}>
<ProFormText
name="BUS_STARTDATE"
label="营业时间"
/>
</Col>
<Col span={8}>
<ProFormSelect
name="SERVERPART_ID"
label="服务区名"
options={serverpartList}
rules={[
{
required: true,
message: '请选择服务区!'
}
]}
fieldProps={{
showSearch: true,
filterOption: (input, option) =>
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
}}
/>
</Col>
<Col span={8}>
<ProFormSelect
name="ISSHOW"
label="小程序呈现"
options={[
{ label: "是", value: 1 },
{ label: "否", value: 0 },
]}
rules={[
{
required: true,
message: '请选择是否在小程序呈现'
}
]}
/>
</Col>
<Col span={8}>
<ProFormText
name="MONTHLYSALES"
label="上月销量"
/>
</Col>
<Col span={8}>
<ProFormText
name="CASHPAY"
label="月销售额"
/>
</Col>
<Col span={8}>
<ProFormText
name="PERCAPITA"
label="人均价格"
/>
</Col>
<Col span={8}>
<ProFormText <ProFormText
name="SELLER_LINKMAN" name="SELLER_LINKMAN"
label="联系人员" label="联系人员"
/> />
</Col> </Col>
<Col span={12}> <Col span={8}>
<ProFormText <ProFormText
name="SELLER_TELEPHONE" name="SELLER_TELEPHONE"
label="商家电话" label="商家电话"
/> />
</Col> </Col>
<Col span={12}> <Col span={8}>
<ProFormText <ProFormText
name="SELLER_ADDRESS" name="SELLER_ADDRESS"
label="商家地址" label="商家地址"
/> />
</Col> </Col>
<Col span={12}> <Col span={24}>
<ProFormDatePicker <ProFormText
name="BUS_STARTDATE" name="SELF_COMMENT"
label="营业时间" label="掌柜寄语"
width="lg"
/> />
</Col> </Col>
<Col span={24}> <Col span={24}>
<ProFormTextArea <ProFormTextArea
name="SELLER_DESC" name="SELLER_DESC"
label="商家介绍" label="商家介绍"
labelCol={{ span: 3 }}
wrapperCol={{ span: 20 }}
/> />
</Col> </Col>
<Col span={12}>
<ProFormMoney
width="lg" </Row>
fieldProps={{
moneySymbol: false,
<Tabs
onChange={(e: any) => {
setSelectTab(e)
}} }}
name="SELLER_SCORE" activeKey={selectTab}
label="平均评分" type="card"
items={[
{ label: "门店信息", key: "1" },
{ label: "评论信息", key: "2" },
]}
/>
<ProTable
search={false}
options={false}
columns={shopColumns}
bordered
style={{ display: selectTab === '1' ? 'block' : 'none' }}
dataSource={currentShopData}
/>
<div style={{ display: selectTab === '1' ? 'block' : 'none' }}>
<Row gutter={8}>
<Col span={8}>
<ProFormUploadButton
label={"商家Logo"}
name={""}
/> />
</Col> </Col>
<Col span={12}>
<ProFormMoney <Col span={8}>
width="lg" <ProFormUploadButton
fieldProps={{ label={"门头图片"}
moneySymbol: false, name={""}
}}
name="COMMENT_COUNT"
label="评价数量"
/> />
</Col> </Col>
<Col span={12}>
<ProFormMoney <Col span={8}>
width="lg" <ProFormUploadButton
fieldProps={{ label={"内景图片"}
moneySymbol: false, name={""}
}}
name="MONTHLYSALES"
label="销量"
/>
</Col>
<Col span={12}>
<ProFormMoney
width="lg"
fieldProps={{
moneySymbol: false,
}}
name="CASHPAY"
label="销售额"
/>
</Col>
<Col span={12}>
<ProFormMoney
width="lg"
fieldProps={{
moneySymbol: false,
}}
name="PERCAPITA"
label="人均"
/>
</Col>
<Col span={12}>
<ProFormMoney
width="lg"
fieldProps={{
moneySymbol: false,
}}
name="SHOW_HOME"
label="是否显示在首页"
/>
</Col>
<Col span={12}>
<ProFormMoney
width="lg"
fieldProps={{
moneySymbol: false,
}}
name="SHOW_HOME_INDEX"
label="精选商户排序"
/>
</Col>
<Col span={12}>
<ProFormMoney
width="lg"
fieldProps={{
moneySymbol: false,
}}
name="ISSHOW"
label="是否显示在发现页"
/>
</Col>
<Col span={12}>
<ProFormText
name="SELF_COMMENT"
label="掌柜自评"
/>
</Col>
<Col span={12}>
<ProFormSelect
name="ISVALID"
label="是否有效数据"
/>
</Col>
<Col span={12}>
<ProFormText
name="CREATE_STAFF_NAME"
label="创建人员"
/>
</Col>
<Col span={12}>
<ProFormDatePicker
name="CREATE_DATE"
label="创建时间"
width="lg"
/>
</Col>
<Col span={12}>
<ProFormText
name="UPDATE_STAFF_NAME"
label="修改人员"
/>
</Col>
<Col span={12}>
<ProFormDatePicker
name="UPDATE_DATE"
label="修改时间"
width="lg"
/>
</Col>
<Col span={24}>
<ProFormTextArea
name="SERVERPARTSELLER_DESC"
label="备注说明"
labelCol={{ span: 3 }}
wrapperCol={{ span: 20 }}
/>
</Col>
<Col style={{ display: 'none' }}>
<ProFormText
name="SELLER_ID"
label="内码"
/>
</Col>
<Col style={{ display: 'none' }}>
<ProFormText
name="SERVERPART_ID"
label="服务区内码"
/>
</Col>
<Col style={{ display: 'none' }}>
<ProFormText
name="CREATE_STAFF_ID"
label="创建人内码"
/>
</Col>
<Col style={{ display: 'none' }}>
<ProFormText
name="UPDATE_STAFF_ID"
label="修改人内码"
/> />
</Col> </Col>
</Row> </Row>
</div>
<ProTable
search={false}
options={false}
bordered
columns={commentColumns}
style={{ display: selectTab === '2' ? 'block' : 'none' }}
request={async () => {
const req: any = {
}
}}
/>
</ProForm> </ProForm>
</Modal> </Modal>
</div> </div>

View File

@ -1,3 +1,4 @@
import { wrapTreeNode } from '@/utils/format';
import requestEncryption from '@/utils/requestEncryption'; import requestEncryption from '@/utils/requestEncryption';
// 拿到服务区商家信息表 // 拿到服务区商家信息表
@ -48,4 +49,39 @@ export async function handleGetSERVERPARTSHOPList(params: any) {
return data.Result_Data return data.Result_Data
} }
// 获取服务区商家信息表明细
export async function handleGetSERVERPARTSELLERDetail(params: any) {
const data = await requestEncryption(`/BaseInfo/GetSERVERPARTSELLERDetail`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return []
}
return data.Result_Data
}
// 关联商家经营门店
export async function handleGetRelateShopToSeller(params: any) {
const data = await requestEncryption(`/BaseInfo/RelateShopToSeller`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return data
}
return data
}
// 解除门店关联
export async function handleRemoveShopFromSeller(params: any) {
const data = await requestEncryption(`/BaseInfo/RemoveShopFromSeller`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return data
}
return data
}

View File

@ -25,8 +25,9 @@ type DetailProps = {
haveTest?: boolean;// 是否有测试服务区 haveTest?: boolean;// 是否有测试服务区
handleGetLeftTreeData?: any // 拿到树数据的方法 必须要有输出值的 handleGetLeftTreeData?: any // 拿到树数据的方法 必须要有输出值的
noWj?: any // 把万佳商贸隐藏 noWj?: any // 把万佳商贸隐藏
selectOnly?: boolean// 传入的时候 仅支持单选
} }
const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width, otherFun, setCollapsible, collapsible, haveTest, handleGetLeftTreeData, noWj }: DetailProps) => { const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width, otherFun, setCollapsible, collapsible, haveTest, handleGetLeftTreeData, noWj, selectOnly }: DetailProps) => {
const searchTreeRef = useRef<FormInstance>(); const searchTreeRef = useRef<FormInstance>();
// 默认的服务区树 // 默认的服务区树
const [allTreeViews, setAllTreeViews] = useState<any>() const [allTreeViews, setAllTreeViews] = useState<any>()
@ -72,6 +73,9 @@ const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width,
list = handleFilterList(list, 89) list = handleFilterList(list, 89)
} }
console.log('list2', list); console.log('list2', list);
sessionStorage.setItem('SERVERPARTTree', JSON.stringify(list))
if (handleGetLeftTreeData) { if (handleGetLeftTreeData) {
let newData: any = await handleGetLeftTreeData() let newData: any = await handleGetLeftTreeData()
console.log('newData', newData); console.log('newData', newData);
@ -144,6 +148,19 @@ const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width,
return res return res
} }
// 仅支持单选一个服务区的时候 调用的方法
const convertTreeForSelectOnly = (treeData: any[]): any[] => {
return treeData.map(item => {
const newItem = {
...item,
disabled: item.type !== 1,
};
if (item.children) {
newItem.children = convertTreeForSelectOnly(item.children);
}
return newItem;
});
};
return ( return (
<div> <div>
@ -203,28 +220,58 @@ const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width,
> >
{treeView && treeView.length > 0 ? <Tree {treeView && treeView.length > 0 ? <Tree
checkable checkable
treeData={isShowAllInTree ? [{ treeData={selectOnly
? (isShowAllInTree
? [{
label: '全部',
value: 0,
key: '0-0',
children: convertTreeForSelectOnly(treeView)
}]
: convertTreeForSelectOnly(treeView))
: (isShowAllInTree
? [{
label: '全部', label: '全部',
value: 0, value: 0,
key: '0-0', key: '0-0',
children: treeView children: treeView
}] : treeView} }]
fieldNames={{ : treeView)}
title: "label",
key: "key"
}}
blockNode blockNode
defaultExpandAll={isShowAllInTree ? false : true} defaultExpandAll={isShowAllInTree ? false : 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) => {
if (selectOnly) {
// 只允许单选且只允许type为1
const checked = Array.isArray(checkedKeys.checked) ? checkedKeys.checked : checkedKeys;
const node = info.node;
if (node.type === 1) {
setSelectedId(node.value);
if (reload) {
actionRef?.current?.reload();
}
if (otherFun) {
otherFun(info);
}
} else {
// 取消非type=1的勾选
setSelectedId('');
}
} else {
// 多选逻辑
const selectedIds = info.checkedNodes.filter((n: any) => n?.type === 1) const selectedIds = info.checkedNodes.filter((n: any) => n?.type === 1)
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '') setSelectedId(selectedIds.map((n: any) => n?.value)?.toString() || '')
if (reload) { if (reload) {
actionRef?.current?.reload() actionRef?.current?.reload()
} }
if (otherFun) { if (otherFun) {
otherFun(info) otherFun(info)
} }
}
}}
fieldNames={{
title: "label",
key: "key"
}} }}
/> : ''} /> : ''}
</ProCard> </ProCard>

View File

@ -0,0 +1 @@
// 点餐售后管理

View File

@ -0,0 +1 @@
// 售后类型管理

View File

@ -0,0 +1 @@
// 预约点餐订单

View File

@ -0,0 +1 @@
// 首页精选卡券

View File

@ -0,0 +1 @@
// 首页精选商城

View File

@ -0,0 +1 @@
// 首页精选商家

View File

@ -0,0 +1 @@
// 图库信息管理

View File

@ -0,0 +1 @@
// 图库类型管理

View File

@ -0,0 +1,2 @@
// 失物招领申请

View File

@ -0,0 +1 @@
// 失物招领审核

View File

@ -0,0 +1 @@
// 商城品牌管理

View File

@ -0,0 +1 @@
// 商城分类管理

View File

@ -0,0 +1 @@
// 商城评价管理

View File

@ -0,0 +1 @@
// 商城订单管理

View File

@ -0,0 +1 @@
// 商家评价管理

View File

@ -0,0 +1 @@
// 合作商户商品申请

View File

@ -0,0 +1 @@
// 合作商户商品审核

View File

@ -0,0 +1 @@
// 订单售后管理

View File

@ -0,0 +1 @@
// 点餐类别管理

View File

@ -0,0 +1 @@
// 点餐商品管理

View File

@ -0,0 +1 @@
// 商品上架管理

View File

@ -0,0 +1 @@
// 商品规格管理

View File

@ -0,0 +1 @@
// 自营餐饮商品申请

View File

@ -0,0 +1 @@
// 自营餐饮商品审核

View File

@ -0,0 +1 @@
//商城商品查询

View File

@ -0,0 +1 @@
// 预约订单汇总

View File

@ -0,0 +1 @@
// 供货商户分类

View File

@ -0,0 +1 @@
// 供货商户管理