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',
name: 'MemberAddress',
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',
name: 'CardVoucherSearch',
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 { MenuFoldOutlined, PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
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 { ConnectState } from '@/models/connect';
import type { ActionType, ProColumns } from '@ant-design/pro-table';
import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
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 session from '@/utils/session';
@ -29,6 +29,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
const { currentUser } = props
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const formMerchantRef = useRef<FormInstance>();
const associationActionRef = useRef<ActionType>();
const [currentRow, setCurrentRow] = useState<any>();
const [showDetail, setShowDetail] = useState<boolean>();
@ -41,10 +42,23 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
// 新增关联选择的方法
const [selectedRowKeys, setSelectRowKeys] = 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 SHOPTRADEList = session.get('SHOPTRADEList')
let shopregionObj = session.get('shopregionObj')
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 }>() // 移动的位置
@ -83,7 +97,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
dataIndex: 'SHOPTRADE',
title: '经营业态',
align: 'center',
width: 150,
width: 120,
valueType: 'select',
valueEnum: SHOPTRADEObj,
fieldProps: {
@ -96,35 +110,35 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
dataIndex: '',
title: '预约点餐',
align: 'center',
width: 150,
width: 120,
hideInSearch: true,
},
{
dataIndex: 'MONTHLYSALES',
title: '月销售量',
align: 'center',
width: 150,
width: 120,
hideInSearch: true,
},
{
dataIndex: 'PERCAPITA',
title: '人均消费',
align: 'center',
width: 150,
width: 120,
hideInSearch: true,
},
{
dataIndex: 'SELLER_SCORE',
title: '评价分数',
align: 'center',
width: 150,
width: 120,
hideInSearch: true,
},
{
dataIndex: 'COMMENT_COUNT',
title: '评价数量',
align: 'center',
width: 150,
width: 120,
hideInSearch: true,
},
{
@ -139,7 +153,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
dataIndex: 'option',
title: '操作',
valueType: 'option',
width: 150,
width: 120,
align: 'center',
hideInSearch: true,
render: (_, record) => {
@ -147,6 +161,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
<Space>
<a
onClick={() => {
console.log('recordrecordrecordrecord', record);
setCurrentRow({ ...record });
handleModalVisible(true);
}}
@ -156,7 +171,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
<Popconfirm
title="确认删除该服务区商家信息列表信息吗?"
onConfirm={async () => {
await handelDelete(record.SERVERPARTSELLER_ID);
await handelDelete(record.SELLER_ID);
}}
>
<a></a>
@ -211,7 +226,6 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
title: '经营状态',
align: 'center',
width: 120,
hideInSearch: true,
valueType: "select",
valueEnum: businessStateObj
},
@ -241,40 +255,245 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
width: 150,
ellipsis: 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) => {
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 (
<div>
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
@ -310,6 +529,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
PageIndex: params.current,
PageSize: params.pageSize,
}
console.log('reqreqreqreq', req);
const data = await handleGetMEMBERADDRESSList(req);
console.log('datadatadatadatadata', data);
if (data.List && data.List.length > 0) {
@ -319,19 +539,20 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
}}
columns={columns}
toolbar={{
actions: selectedId ? [
actions: [
// 新增按钮
<Button
key="new"
icon={<PlusOutlined />}
type="primary"
onClick={() => {
setShowAddModal(true)
// setShowAddModal(true)
handleModalVisible(true);
}}
>
</Button>,
] : "",
],
}}
pagination={{ defaultPageSize: 10 }}
/>
@ -354,11 +575,34 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
}}
okText={"关联"}
onOk={async () => { // 提交框内的数据
console.log('selectedRowKeysselectedRowKeys', selectedRowKeys);
console.log('selectedRowDetailselectedRowDetail', selectedRowDetail);
console.log('selectedRowKeysselectedRowKeysselectedRowKeys', selectedRowKeys);
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
actionRef={associationActionRef}
columns={merchantColumns}
@ -366,10 +610,14 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
bordered
rowKey={"SERVERPARTSHOP_ID"}
request={async (params) => {
if (!selectAssociationServerpart) {
return
}
const req: any = {
searchParameter: {
SERVERPART_IDS: selectedId,
ISVALID: params?.ISVALID
SERVERPART_IDS: selectAssociationServerpart,
ISVALID: params?.ISVALID,
BUSINESS_STATE: params?.BUSINESS_STATE
},
PageIndex: 1,
PageSize: 999999,
@ -397,13 +645,12 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
},
}}
/>
</div>
</div>
</Modal>
{/* 同步商户门店信息的悬浮框 */}
<Modal
title={
<div
@ -427,7 +674,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
</div>
}
destroyOnClose={true}
width={900}
width={'65%'}
visible={modalVisible}
confirmLoading={confirmLoading}
afterClose={() => {
@ -437,14 +684,15 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
onCancel={() => {
handleConfirmLoading(false)
handleModalVisible(false)
setCurrentRowDetail(null)
setCurrentRow(null)
}}
onOk={async () => { // 提交框内的数据
formRef?.current?.validateFields().then(() => {
handleConfirmLoading(true)
formRef?.current?.submit()
})
}}
// onOk={async () => { // 提交框内的数据
// formRef?.current?.validateFields().then(() => {
// handleConfirmLoading(true)
// formRef?.current?.submit()
// })
// }}
modalRender={(modal) => {
return <Draggable
disabled={disabled}
@ -454,265 +702,270 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
<div ref={draggleRef}>{modal}</div>
</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
layout={'horizontal'}
wrapperCol={{ span: 16 }} // 表单项 填写部分所占的栅格数
labelCol={{ span: 6 }} // 表单项 标题所占的栅格数
formRef={formRef}
autoFocusFirstInput
submitter={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) => {
let newValue: any = { ...values };
if (currentRow) {
// 编辑数据
newValue = { ...values, SERVERPARTSELLER_ID: currentRow.SERVERPARTSELLER_ID };
}
// 如果有开关,要把开关的代码写进去
const success = await handleAddUpdate(newValue as SERVERPARTSELLERModel);
handleConfirmLoading(false)
if (success) {
if (actionRef.current) {
actionRef.current.reload();
}
handleModalVisible(false);
newValue = {
...values,
SERVERPARTSELLER_ID: currentRow.SERVERPARTSELLER_ID,
ShopList: currentShopData
};
}
await handleAddUpdate(newValue);
}}
>
<Row>
<Col span={12}>
<Row gutter={8}>
<Col span={8}>
<ProFormText
name="SELLER_NAME"
label="商家名称"
rules={[
{
required: true,
message: '请输入商家名称!'
}
]}
/>
</Col>
<Col span={12}>
<ProFormText
name="PROVINCE_CODE"
label="省份编码"
/>
</Col>
<Col span={12}>
<ProFormText
name="SERVERPARTSHOP_IDS"
label="东西区门店内码"
/>
</Col>
<Col span={12}>
<ProFormText
<Col span={8}>
<ProFormSelect
name="SHOPTRADE"
label="行业名称"
label="门店业态"
options={SHOPTRADEList}
rules={[
{
required: true,
message: '请选择门店业态!'
}
]}
/>
</Col>
<Col span={12}>
<Col span={8}>
<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"
label="排序索引"
/>
</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
name="SELLER_LINKMAN"
label="联系人员"
/>
</Col>
<Col span={12}>
<Col span={8}>
<ProFormText
name="SELLER_TELEPHONE"
label="商家电话"
/>
</Col>
<Col span={12}>
<Col span={8}>
<ProFormText
name="SELLER_ADDRESS"
label="商家地址"
/>
</Col>
<Col span={12}>
<ProFormDatePicker
name="BUS_STARTDATE"
label="营业时间"
width="lg"
<Col span={24}>
<ProFormText
name="SELF_COMMENT"
label="掌柜寄语"
/>
</Col>
<Col span={24}>
<ProFormTextArea
name="SELLER_DESC"
label="商家介绍"
labelCol={{ span: 3 }}
wrapperCol={{ span: 20 }}
/>
</Col>
<Col span={12}>
<ProFormMoney
width="lg"
fieldProps={{
moneySymbol: false,
</Row>
<Tabs
onChange={(e: any) => {
setSelectTab(e)
}}
name="SELLER_SCORE"
label="平均评分"
activeKey={selectTab}
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 span={12}>
<ProFormMoney
width="lg"
fieldProps={{
moneySymbol: false,
}}
name="COMMENT_COUNT"
label="评价数量"
<Col span={8}>
<ProFormUploadButton
label={"门头图片"}
name={""}
/>
</Col>
<Col span={12}>
<ProFormMoney
width="lg"
fieldProps={{
moneySymbol: false,
}}
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 span={8}>
<ProFormUploadButton
label={"内景图片"}
name={""}
/>
</Col>
</Row>
</div>
<ProTable
search={false}
options={false}
bordered
columns={commentColumns}
style={{ display: selectTab === '2' ? 'block' : 'none' }}
request={async () => {
const req: any = {
}
}}
/>
</ProForm>
</Modal>
</div>

View File

@ -1,3 +1,4 @@
import { wrapTreeNode } from '@/utils/format';
import requestEncryption from '@/utils/requestEncryption';
// 拿到服务区商家信息表
@ -48,4 +49,39 @@ export async function handleGetSERVERPARTSHOPList(params: any) {
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;// 是否有测试服务区
handleGetLeftTreeData?: 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 [allTreeViews, setAllTreeViews] = useState<any>()
@ -72,6 +73,9 @@ const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width,
list = handleFilterList(list, 89)
}
console.log('list2', list);
sessionStorage.setItem('SERVERPARTTree', JSON.stringify(list))
if (handleGetLeftTreeData) {
let newData: any = await handleGetLeftTreeData()
console.log('newData', newData);
@ -144,6 +148,19 @@ const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width,
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 (
<div>
@ -203,28 +220,58 @@ const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width,
>
{treeView && treeView.length > 0 ? <Tree
checkable
treeData={isShowAllInTree ? [{
treeData={selectOnly
? (isShowAllInTree
? [{
label: '全部',
value: 0,
key: '0-0',
children: convertTreeForSelectOnly(treeView)
}]
: convertTreeForSelectOnly(treeView))
: (isShowAllInTree
? [{
label: '全部',
value: 0,
key: '0-0',
children: treeView
}] : treeView}
fieldNames={{
title: "label",
key: "key"
}}
}]
: treeView)}
blockNode
defaultExpandAll={isShowAllInTree ? false : true}
defaultExpandedKeys={isShowAllInTree ? treeShowRow && treeShowRow.length > 0 ? treeShowRow : ['0-0'] : []}
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)
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
setSelectedId(selectedIds.map((n: any) => n?.value)?.toString() || '')
if (reload) {
actionRef?.current?.reload()
}
if (otherFun) {
otherFun(info)
}
}
}}
fieldNames={{
title: "label",
key: "key"
}}
/> : ''}
</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 @@
// 供货商户管理