update
This commit is contained in:
parent
7fe7fe34e3
commit
4e48dc4a94
BIN
src/assets/detail/closeIcon.png
Normal file
BIN
src/assets/detail/closeIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/assets/detail/memberDetailIcon.png
Normal file
BIN
src/assets/detail/memberDetailIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 569 B |
BIN
src/assets/detail/memberInfoIcon.png
Normal file
BIN
src/assets/detail/memberInfoIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 818 B |
@ -29,7 +29,7 @@ import IconFont from '@/components/IconFont';
|
|||||||
import type { CurrentUser } from '@/models/user'
|
import type { CurrentUser } from '@/models/user'
|
||||||
import session from '@/utils/session';
|
import session from '@/utils/session';
|
||||||
import upMenu from '@/assets/tab/upMenu.svg'
|
import upMenu from '@/assets/tab/upMenu.svg'
|
||||||
import { getFieldEnum, getFieldEnumTree, getFieldGetFieEnumList } from "@/services/options";
|
import { getFieldEnum, getFieldEnumTree, getFieldGetFieEnumList, getTravelFieldEnumTree } from "@/services/options";
|
||||||
import { handleGetServerpartTree } from '@/pages/basicManage/serverpartAssets/service';
|
import { handleGetServerpartTree } from '@/pages/basicManage/serverpartAssets/service';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -185,6 +185,7 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
"驿付商家版": "驿付商家版",
|
"驿付商家版": "驿付商家版",
|
||||||
"微信公众号": "微信公众号",
|
"微信公众号": "微信公众号",
|
||||||
"驿商云客户端": "驿商云客户端",
|
"驿商云客户端": "驿商云客户端",
|
||||||
|
"彩云驿出行": "彩云驿出行",
|
||||||
},
|
},
|
||||||
initialValue: '驿商云平台'
|
initialValue: '驿商云平台'
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// 预约点餐订单
|
// 预约点餐订单 预约订单管理
|
||||||
import { ConnectState } from "@/models/connect";
|
import { ConnectState } from "@/models/connect";
|
||||||
import { connect, CurrentUser } from "umi";
|
import { connect, CurrentUser } from "umi";
|
||||||
import { useRef, useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
@ -6,11 +6,13 @@ import ProTable, { ActionType } from "@ant-design/pro-table";
|
|||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
import { Button, Col, FormInstance, message, Modal, Popconfirm, Row, Space } from "antd";
|
import { Button, Col, FormInstance, message, Modal, Popconfirm, Row, Space } from "antd";
|
||||||
import { PlusOutlined } from "@ant-design/icons";
|
import { PlusOutlined } from "@ant-design/icons";
|
||||||
import { handeDeleteMERCHANTS, handeGetMERCHANTSList, handeGetSALEBILLList, handeSynchroMERCHANTS } from "../service";
|
import { handeDeleteMERCHANTS, handeGetMERCHANTSList, handeGetSALEBILLDetail, handeGetSALEBILLList, handeGetSaleBillWholeList, handeGetSALEDETAILList, handeSynchroMERCHANTS } from "../service";
|
||||||
import Draggable from "react-draggable";
|
import Draggable from "react-draggable";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
|
import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import session from "@/utils/session";
|
||||||
|
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||||
|
|
||||||
const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
@ -29,6 +31,8 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
const [currentRow, setCurrentRow] = useState<any>();
|
const [currentRow, setCurrentRow] = useState<any>();
|
||||||
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
|
const [confirmLoading, handleConfirmLoading] = useState<boolean>(false) // 弹出框的内容表单是否在提交
|
||||||
|
|
||||||
|
let SALEBILLSTATEObj = session.get('SALEBILLSTATEObj')
|
||||||
|
|
||||||
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();
|
||||||
@ -44,6 +48,22 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
};
|
};
|
||||||
|
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
|
{
|
||||||
|
title: '查询时间',
|
||||||
|
dataIndex: 'search_date',
|
||||||
|
valueType: 'dateRange',
|
||||||
|
hideInTable: true,
|
||||||
|
hideInDescriptions: true,
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return {
|
||||||
|
ORDER_DATE_Start: value[0],
|
||||||
|
ORDER_DATE_End: value[1],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
initialValue: [moment().format('YYYY-MM-DD'), moment().add(-1, 'M').format('YYYY-MM-DD')],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "index",
|
dataIndex: "index",
|
||||||
title: "序号",
|
title: "序号",
|
||||||
@ -54,143 +74,159 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'MERCHANTS_TYPE',
|
dataIndex: 'SALEBILL_CODE',
|
||||||
title: '商户类型',
|
title: '订单编号',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
width: 150,
|
width: 200,
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'MERCHANTS_NAME',
|
|
||||||
title: '商户名称',
|
|
||||||
align: 'center',
|
|
||||||
hideInSearch: true,
|
|
||||||
width: 300,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'MERCHANTS_EN',
|
|
||||||
title: '商户简称',
|
|
||||||
align: 'center',
|
|
||||||
hideInSearch: true,
|
|
||||||
width: 150,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'MERCHANTS_AUTOTYPE',
|
|
||||||
title: '商户性质',
|
|
||||||
align: 'center',
|
|
||||||
hideInSearch: true,
|
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
valueEnum: {
|
|
||||||
"1000": "企业公司",
|
|
||||||
"2000": "个体",
|
|
||||||
"3000": "自然人"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'TAXPAYER_IDENTIFYCODE',
|
|
||||||
title: '统一信用代码',
|
|
||||||
align: 'center',
|
|
||||||
hideInSearch: true,
|
|
||||||
width: 150,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'MERCHANTS_TELEPHONE',
|
|
||||||
title: '联系电话',
|
|
||||||
align: 'center',
|
|
||||||
hideInSearch: true,
|
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'option',
|
|
||||||
title: '操作',
|
|
||||||
valueType: 'option',
|
|
||||||
align: 'center',
|
|
||||||
hideInSearch: true,
|
|
||||||
width: 120,
|
|
||||||
fixed: "right",
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return (
|
return record?.SALEBILL_CODE ? <a onClick={() => {
|
||||||
<Space>
|
setCurrentRow(record);
|
||||||
<a
|
handleModalVisible(true)
|
||||||
onClick={() => {
|
}}>{record?.SALEBILL_CODE}</a> : "-"
|
||||||
setCurrentRow({ ...record });
|
}
|
||||||
handleModalVisible(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
编辑
|
|
||||||
</a>
|
|
||||||
<Popconfirm
|
|
||||||
title="确认删除该商品管理列表信息吗?"
|
|
||||||
onConfirm={async () => {
|
|
||||||
await handelDelete(record.MERCHANTS_ID);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<a>删除</a>
|
|
||||||
</Popconfirm>
|
|
||||||
</Space>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'SHOPNAME',
|
||||||
|
title: '门店名称',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
width: 150,
|
||||||
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'ORDER_PERSON',
|
||||||
|
title: '下单人员',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
width: 250,
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'ORDER_AMOUNT',
|
||||||
|
title: '订单金额',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'COUPON_AMOUNT',
|
||||||
|
title: '优惠金额',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'PAY_AMOUNT',
|
||||||
|
title: '实付金额',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// dataIndex: 'COUPON_SEND_ID',
|
||||||
|
// title: '优惠券名',
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// width: 120,
|
||||||
|
// ellipsis: true,
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
dataIndex: 'ORDER_DATE',
|
||||||
|
title: '订单时间',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
width: 170,
|
||||||
|
ellipsis: true,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'SALEBILL_STATE',
|
||||||
|
title: '订单状态',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
|
"1005": "订单待支付",
|
||||||
|
"1010": "订单待制作",
|
||||||
|
"2000": "订单待取餐",
|
||||||
|
"3000": "订单已完成",
|
||||||
|
"8000": "退款申请中",
|
||||||
|
"8900": "订单已退款",
|
||||||
|
"9000": "订单已关闭",
|
||||||
|
"9999": "订单已撤销",
|
||||||
|
},
|
||||||
|
initialValue: "0"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const handelDelete = async (MERCHANTS_ID: number) => {
|
// 订单详情的表格
|
||||||
const result = await handeDeleteMERCHANTS({ MERCHANTSId: MERCHANTS_ID });
|
const orderDetailColumns: any = [
|
||||||
|
{
|
||||||
if (result.Result_Code !== 100) {
|
dataIndex: "index",
|
||||||
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
|
title: "序号",
|
||||||
} else {
|
align: 'center',
|
||||||
message.success('删除成功!');
|
hideInSearch: true,
|
||||||
actionRef.current?.reload()
|
valueType: "index",
|
||||||
}
|
width: 70,
|
||||||
};
|
ellipsis: true,
|
||||||
|
},
|
||||||
const handleAddUpdate = async (res: any) => {
|
{
|
||||||
let req: any = {}
|
dataIndex: 'COMMODITY_NAME',
|
||||||
if (currentRow?.USERDEFINEDTYPE_ID) {
|
title: '商品名称',
|
||||||
req = {
|
align: 'center',
|
||||||
...currentRow,
|
hideInSearch: true,
|
||||||
...res,
|
width: 150,
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
ellipsis: true,
|
||||||
OWNERUNIT_NAME: currentUser?.OwnerUnitName,
|
},
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
{
|
||||||
OPERATE_PERSON: currentUser?.ID,
|
dataIndex: 'COMMODITY_BARCODE',
|
||||||
OPERATE_TIME: moment().format('YYYY-MM-DD HH:mm:ss'),
|
title: '商品条码',
|
||||||
}
|
align: 'center',
|
||||||
} else {
|
hideInSearch: true,
|
||||||
req = {
|
width: 150,
|
||||||
...res,
|
ellipsis: true,
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
},
|
||||||
OWNERUNIT_NAME: currentUser?.OwnerUnitName,
|
{
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
dataIndex: 'ORDER_COUNT',
|
||||||
OPERATE_PERSON: currentUser?.ID,
|
title: '数量',
|
||||||
OPERATE_TIME: moment().format('YYYY-MM-DD HH:mm:ss'),
|
align: 'center',
|
||||||
}
|
hideInSearch: true,
|
||||||
}
|
width: 150,
|
||||||
const data = await handeSynchroMERCHANTS(req)
|
ellipsis: true,
|
||||||
handleConfirmLoading(false)
|
},
|
||||||
if (data.Result_Code === 100) {
|
{
|
||||||
message.success("新增成功!")
|
dataIndex: 'AVERAGE_PRICE',
|
||||||
setCurrentRow(undefined)
|
title: '单价',
|
||||||
formRef?.current?.resetFields()
|
align: 'center',
|
||||||
handleModalVisible(false)
|
hideInSearch: true,
|
||||||
actionRef.current?.reload()
|
width: 150,
|
||||||
} else {
|
ellipsis: true,
|
||||||
message.error(data.Result_Desc)
|
},
|
||||||
}
|
{
|
||||||
};
|
dataIndex: 'ORDER_AMOUNT',
|
||||||
|
title: '金额',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
width: 150,
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||||
|
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
||||||
<div style={{
|
<div style={{
|
||||||
width: '100%',
|
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||||
paddingTop: 0,
|
paddingTop: 0,
|
||||||
paddingBottom: 0,
|
paddingBottom: 0,
|
||||||
paddingRight: 0
|
paddingRight: 0
|
||||||
@ -207,17 +243,35 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
search={{ span: 6, labelWidth: 'auto' }}
|
search={{ span: 6, labelWidth: 'auto' }}
|
||||||
// 请求数据
|
// 请求数据
|
||||||
request={async (params, sorter) => {
|
request={async (params, sorter) => {
|
||||||
|
if (!selectedId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const req = {
|
const req = {
|
||||||
searchParameter: {
|
searchParameter: {
|
||||||
RESERVATION_DATE: "2025-06-01",
|
SERVERPART_IDS: selectedId,
|
||||||
RESERVATION_ENDDATE: "2025-07-01",
|
SALEBILL_TYPES: 6000,
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
ORDER_DATE_Start: params?.ORDER_DATE_Start || "",
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
ORDER_DATE_End: params?.ORDER_DATE_End || "",
|
||||||
|
SALEBILL_STATES: params?.SALEBILL_STATE === "0" ? "1010,2000,3000" : params?.SALEBILL_STATE
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
|
SortStr: "ORDER_DATE desc",
|
||||||
}
|
}
|
||||||
const data = await handeGetSALEBILLList(req);
|
const data = await handeGetSaleBillWholeList(req)
|
||||||
|
// const req = {
|
||||||
|
// searchParameter: {
|
||||||
|
// ORDER_DATE_Start: params?.ORDER_DATE_Start || "",
|
||||||
|
// ORDER_DATE_End: params?.ORDER_DATE_End || "",
|
||||||
|
// SALEBILL_TYPE: 6000,
|
||||||
|
// OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
|
// PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
|
// SALEBILL_STATE: params?.SALEBILL_STATE === "0" ? "" : params?.SALEBILL_STATE
|
||||||
|
// },
|
||||||
|
// PageIndex: 1,
|
||||||
|
// PageSize: 999999,
|
||||||
|
// }
|
||||||
|
// const data = await handeGetSALEBILLList(req);
|
||||||
console.log('datadatadatadatadata', data);
|
console.log('datadatadatadatadata', data);
|
||||||
if (data.List && data.List.length > 0) {
|
if (data.List && data.List.length > 0) {
|
||||||
return { data: data.List, success: true, total: data.TotalCount }
|
return { data: data.List, success: true, total: data.TotalCount }
|
||||||
@ -227,17 +281,6 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
toolbar={{
|
toolbar={{
|
||||||
actions: [
|
actions: [
|
||||||
// 新增按钮
|
|
||||||
<Button
|
|
||||||
key="new"
|
|
||||||
icon={<PlusOutlined />}
|
|
||||||
type="primary"
|
|
||||||
onClick={() => {
|
|
||||||
handleModalVisible(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
新增商户
|
|
||||||
</Button>
|
|
||||||
],
|
],
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -264,7 +307,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
onFocus={() => { }}
|
onFocus={() => { }}
|
||||||
onBlur={() => { }}
|
onBlur={() => { }}
|
||||||
>
|
>
|
||||||
{currentRow ? '更新商品管理' : '新建商品管理'}
|
{'订单详情'}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
@ -278,14 +321,9 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
handleConfirmLoading(false)
|
handleConfirmLoading(false)
|
||||||
handleModalVisible(false)
|
handleModalVisible(false)
|
||||||
|
setCurrentRow(undefined);
|
||||||
}}
|
}}
|
||||||
|
footer={false}
|
||||||
onOk={async () => { // 提交框内的数据
|
|
||||||
formRef?.current?.validateFields().then(() => {
|
|
||||||
handleConfirmLoading(true)
|
|
||||||
formRef?.current?.submit()
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
modalRender={(modal) => {
|
modalRender={(modal) => {
|
||||||
return <Draggable
|
return <Draggable
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
@ -296,136 +334,41 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
|
|||||||
</Draggable>
|
</Draggable>
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ProForm
|
|
||||||
layout={'horizontal'}
|
|
||||||
formRef={formRef}
|
|
||||||
autoFocusFirstInput
|
|
||||||
submitter={false}
|
|
||||||
preserve={false}
|
|
||||||
initialValues={currentRow ? {
|
|
||||||
...currentRow
|
|
||||||
} : {
|
|
||||||
OWNERUNIT_NAME: currentUser?.OwnerUnitName
|
|
||||||
}}
|
|
||||||
onFinish={async (values) => {
|
|
||||||
let newValue: any = { ...values };
|
|
||||||
if (currentRow) {
|
|
||||||
// 编辑数据
|
|
||||||
newValue = { ...values, COMMODITY_ID: currentRow.COMMODITY_ID };
|
|
||||||
}
|
|
||||||
// 如果有开关,要把开关的代码写进去
|
|
||||||
await handleAddUpdate(newValue);
|
|
||||||
|
|
||||||
handleConfirmLoading(false)
|
<ProTable
|
||||||
handleModalVisible(false);
|
columns={orderDetailColumns}
|
||||||
|
bordered
|
||||||
|
search={false}
|
||||||
|
request={async () => {
|
||||||
|
const req: any = {
|
||||||
|
searchParameter: {
|
||||||
|
SALEBILL_ID: currentRow?.SALEBILL_ID
|
||||||
|
},
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 999999,
|
||||||
|
}
|
||||||
|
const data = await handeGetSALEDETAILList(req)
|
||||||
|
console.log('datadatadata', data);
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
return { data: data.List, success: true, total: data.TotalCount }
|
||||||
|
}
|
||||||
|
return { data: [], success: true }
|
||||||
|
}}
|
||||||
|
summary={() => {
|
||||||
|
// extra 是 request 返回的 extra 字段
|
||||||
|
return (
|
||||||
|
<tr>
|
||||||
|
<td colSpan={2} style={{ textAlign: 'center', fontWeight: 'bold' }}>合计</td>
|
||||||
|
<td />
|
||||||
|
<td style={{ textAlign: 'center', fontWeight: 'bold' }}>{currentRow?.TOTAL_COUNT || 0}</td>
|
||||||
|
<td />
|
||||||
|
<td style={{ textAlign: 'center', fontWeight: 'bold' }}>{currentRow?.ORDER_AMOUNT?.toFixed(2) || '0.00'}</td>
|
||||||
|
</tr>
|
||||||
|
)
|
||||||
}}
|
}}
|
||||||
>
|
|
||||||
<Row gutter={8}>
|
|
||||||
<Col span={8}>
|
|
||||||
<ProFormText
|
|
||||||
name="OWNERUNIT_NAME"
|
|
||||||
label="业主单位"
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入业主单位!"
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
disabled
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
|
||||||
<Col span={8}>
|
|
||||||
<ProFormSelect
|
|
||||||
name="MERCHANTS_TYPE"
|
|
||||||
label="商户类型"
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择商户类型!"
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={8}>
|
|
||||||
<ProFormSelect
|
|
||||||
name="MERCHANTS_AUTOTYPE"
|
|
||||||
label="商户性质"
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择商户性质!"
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
options={[{ label: "企业公司", value: 1000 }, { label: "个体", value: 2000 }, { label: "自然人", value: 3000 }]}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={8}>
|
|
||||||
<ProFormText
|
|
||||||
name="MERCHANTS_NAME"
|
|
||||||
label="商户名称"
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入商户名称!"
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={8}>
|
|
||||||
<ProFormText
|
|
||||||
name="MERCHANTS_EN"
|
|
||||||
label="商户简称"
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={8}>
|
|
||||||
<ProFormText
|
|
||||||
name="TAXPAYER_IDENTIFYCODE"
|
|
||||||
label="统一信用代码"
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入统一信用代码!"
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={8}>
|
|
||||||
<ProFormText
|
|
||||||
name="MERCHANTS_LINKMAN"
|
|
||||||
label="联系人员"
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={8}>
|
|
||||||
<ProFormText
|
|
||||||
name="MERCHANTS_TELEPHONE"
|
|
||||||
label="手机号码"
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={8}>
|
|
||||||
<ProFormSelect
|
|
||||||
name="MERCHANTS_STATE"
|
|
||||||
label="商户状态"
|
|
||||||
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
|
|
||||||
<Col span={24}>
|
|
||||||
<ProFormText
|
|
||||||
name="MERCHANTS_ADDRESS "
|
|
||||||
label="商户地址"
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={24}>
|
|
||||||
<ProFormTextArea
|
|
||||||
name="MERCHANTS_DESC"
|
|
||||||
label="商户简介"
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</ProForm>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import type { ActionType } from "@ant-design/pro-table";
|
|||||||
import ProTable from "@ant-design/pro-table";
|
import ProTable from "@ant-design/pro-table";
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { handeGetSALEBILLList, handeGetSALEDETAILList } from "../service";
|
import { handeGetSALEBILLList, handeGetSaleBillWholeList, handeGetSALEDETAILList } from "../service";
|
||||||
|
|
||||||
|
|
||||||
const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -16,51 +16,73 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
const formRef = useRef<FormInstance>();
|
const formRef = useRef<FormInstance>();
|
||||||
|
|
||||||
|
|
||||||
// 查询的条件
|
// 查询的条件
|
||||||
const [searchParams, setSearchParams] = useState<any>()
|
const [searchParams, setSearchParams] = useState<any>()
|
||||||
|
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
{
|
{
|
||||||
title: "查询时间",
|
title: '查询时间',
|
||||||
dataIndex: "searchTime",
|
dataIndex: 'search_date',
|
||||||
valueType: "dateRange",
|
valueType: 'dateRange',
|
||||||
hideInTable: true,
|
hideInTable: true,
|
||||||
initialValue: [moment().subtract(1, 'day'), moment().subtract(1, 'day').startOf('M')],
|
hideInDescriptions: true,
|
||||||
search: {
|
search: {
|
||||||
transform: (value) => {
|
transform: (value) => {
|
||||||
return {
|
return {
|
||||||
ORDERDATE_START: moment(value[0]).format('YYYY-MM-DD'),
|
ORDER_DATE_Start: value[0],
|
||||||
ORDERDATE_END: moment(value[1]).format('YYYY-MM-DD'),
|
ORDER_DATE_End: value[1],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fieldProps: {
|
initialValue: [moment().format('YYYY-MM-DD'), moment().add(-1, 'M').format('YYYY-MM-DD')],
|
||||||
picker: "month",
|
|
||||||
format: 'YYYY-MM',
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "订单状态",
|
title: "订单状态",
|
||||||
dataIndex: "orderStatus",
|
dataIndex: "orderStatus",
|
||||||
valueType: "select",
|
valueType: "select",
|
||||||
valueEnum: {},
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
|
"1005": "订单待支付",
|
||||||
|
"1010": "订单待发货",
|
||||||
|
"2010": "订单已发货",
|
||||||
|
"3000": "订单已完成",
|
||||||
|
"8000": "退款申请中",
|
||||||
|
"8900": "订单已退款",
|
||||||
|
"9000": "订单已关闭",
|
||||||
|
"9999": "订单已撤销"
|
||||||
|
},
|
||||||
|
initialValue: '0',
|
||||||
hideInTable: true,
|
hideInTable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "订单类型",
|
title: "订单类型",
|
||||||
dataIndex: "orderType",
|
dataIndex: "orderType",
|
||||||
valueType: "select",
|
valueType: "select",
|
||||||
valueEnum: {},
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
|
"3000": "零售商城",
|
||||||
|
"3001": "工会商城",
|
||||||
|
"3002": "品诺商城",
|
||||||
|
"3010": "积分商城"
|
||||||
|
},
|
||||||
|
initialValue: '0',
|
||||||
hideInTable: true,
|
hideInTable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "支付方式",
|
title: "支付方式",
|
||||||
dataIndex: "paymentMethod",
|
dataIndex: "PAYMETHOD",
|
||||||
valueType: "select",
|
valueType: "select",
|
||||||
valueEnum: {},
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
|
"支付宝": "支付宝",
|
||||||
|
"微信": "微信",
|
||||||
|
"积分兑换": "积分兑换",
|
||||||
|
"余额支付": "余额支付",
|
||||||
|
},
|
||||||
|
initialValue: '0',
|
||||||
hideInTable: true,
|
hideInTable: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "序号",
|
title: "序号",
|
||||||
dataIndex: "index",
|
dataIndex: "index",
|
||||||
@ -126,13 +148,27 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
align: "center",
|
align: "center",
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
"2000": "充值驿付会员",
|
"3000": "零售商城",
|
||||||
"6000": "预约点餐"
|
"3001": "工会商城",
|
||||||
}
|
"3002": "品诺商城",
|
||||||
|
"3010": "积分商城"
|
||||||
|
},
|
||||||
|
// valueEnum: {
|
||||||
|
// "2000": "充值驿付会员",
|
||||||
|
// "6000": "预约点餐"
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "支付方式",
|
title: "支付方式",
|
||||||
dataIndex: "PAY_METHOD",
|
dataIndex: "PAY_METHOD",
|
||||||
|
valueType: "select",
|
||||||
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
|
"支付宝": "支付宝",
|
||||||
|
"微信": "微信",
|
||||||
|
"积分兑换": "积分兑换",
|
||||||
|
"余额支付": "余额支付",
|
||||||
|
},
|
||||||
width: 120,
|
width: 120,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@ -163,6 +199,18 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
width: 120,
|
width: 120,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
valueType: "select",
|
||||||
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
|
"1005": "订单待支付",
|
||||||
|
"1010": "订单待发货",
|
||||||
|
"2010": "订单已发货",
|
||||||
|
"3000": "订单已完成",
|
||||||
|
"8000": "退款申请中",
|
||||||
|
"8900": "订单已退款",
|
||||||
|
"9000": "订单已关闭",
|
||||||
|
"9999": "订单已撤销"
|
||||||
|
},
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -203,16 +251,20 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode,
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
SALEBILL_TYPE: "3000",
|
SALEBILL_TYPES: params?.orderType === '0' ? '3000,3001,3002,3010' : params?.orderType,
|
||||||
ORDERDATE_START: params?.ORDERDATE_START || "",
|
ORDER_DATE_Start: params?.ORDER_DATE_Start || "",
|
||||||
ORDERDATE_END: params?.ORDERDATE_END || "",
|
ORDER_DATE_End: params?.ORDER_DATE_End || "",
|
||||||
SALEBILL_STATE: ""
|
SALEBILL_STATES: params?.SALEBILL_STATE === "0" ? "1010,2010,3000" : params?.SALEBILL_STATE,
|
||||||
|
CHANNEL_TYPE: params?.PAY_METHOD === "0" ? "" : params?.PAY_METHOD
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
SortStr: "ORDER_DATE desc",
|
SortStr: "ORDER_DATE desc",
|
||||||
}
|
}
|
||||||
const data = await handeGetSALEBILLList(req);
|
console.log('reqreqreqreqreq', req);
|
||||||
|
|
||||||
|
// const data = await handeGetSALEBILLList(req);
|
||||||
|
const data = await handeGetSaleBillWholeList(req);
|
||||||
console.log('datadatadatadatadata', data);
|
console.log('datadatadatadatadata', data);
|
||||||
if (data.List && data.List.length > 0) {
|
if (data.List && data.List.length > 0) {
|
||||||
return { data: data.List, success: true, total: data.TotalCount }
|
return { data: data.List, success: true, total: data.TotalCount }
|
||||||
|
|||||||
@ -19,7 +19,7 @@ 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 { handleDeleteMEMBERADDRESS, handleGetMEMBERADDRESSList, handleSynchroMEMBERADDRESS } from '../service';
|
import { handeGetMemberAddressCombineList, handleDeleteMEMBERADDRESS, handleGetMEMBERADDRESSList, handleSynchroMEMBERADDRESS } from '../service';
|
||||||
import PageTitleBox from '@/components/PageTitleBox';
|
import PageTitleBox from '@/components/PageTitleBox';
|
||||||
|
|
||||||
|
|
||||||
@ -27,6 +27,7 @@ import PageTitleBox from '@/components/PageTitleBox';
|
|||||||
const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
const actionRef = useRef<ActionType>();
|
const actionRef = useRef<ActionType>();
|
||||||
|
const modalActionRef = useRef<ActionType>();
|
||||||
const formRef = useRef<FormInstance>();
|
const formRef = useRef<FormInstance>();
|
||||||
const [currentRow, setCurrentRow] = useState<MEMBERADDRESSModel>();
|
const [currentRow, setCurrentRow] = useState<MEMBERADDRESSModel>();
|
||||||
const [showDetail, setShowDetail] = useState<boolean>();
|
const [showDetail, setShowDetail] = useState<boolean>();
|
||||||
@ -43,6 +44,11 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
const [city, setCity] = useState<string>('');
|
const [city, setCity] = useState<string>('');
|
||||||
const [county, setCounty] = useState<string>('');
|
const [county, setCounty] = useState<string>('');
|
||||||
const [address, setAddress] = useState<string>('');
|
const [address, setAddress] = useState<string>('');
|
||||||
|
// 显示详情抽屉
|
||||||
|
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
|
||||||
|
// 显示当前选中的外层表格数据
|
||||||
|
const [currentBigRow, setCurrentBigRow] = useState<any>(false)
|
||||||
|
|
||||||
|
|
||||||
const onDraggaleStart = (event, uiData) => {
|
const onDraggaleStart = (event, uiData) => {
|
||||||
const { clientWidth, clientHeight } = window.document.documentElement;
|
const { clientWidth, clientHeight } = window.document.documentElement;
|
||||||
@ -86,6 +92,12 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
width: 150,
|
width: 150,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.USER_NAME ? <a onClick={() => {
|
||||||
|
setCurrentBigRow(record)
|
||||||
|
setShowDetailDrawer(true)
|
||||||
|
}}>{record?.USER_NAME}</a> : "-"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'USER_SEX',
|
dataIndex: 'USER_SEX',
|
||||||
@ -128,6 +140,175 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
// align: 'center',
|
// align: 'center',
|
||||||
// hideInSearch: true,
|
// hideInSearch: true,
|
||||||
// },
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'ADDRESS',
|
||||||
|
// title: '收货地址',
|
||||||
|
// width: 300,
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'DOORPLATE',
|
||||||
|
// title: '门牌号码',
|
||||||
|
// width: 300,
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'ISDEFAULT',
|
||||||
|
// title: '默认地址',
|
||||||
|
// width: 120,
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// valueType: 'select',
|
||||||
|
// valueEnum: {
|
||||||
|
// "1": "是",
|
||||||
|
// "0": "否",
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'TAGTYPE',
|
||||||
|
// title: '地址类型',
|
||||||
|
// width: 120,
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// valueType: 'select',
|
||||||
|
// valueEnum: {
|
||||||
|
// "1000": "家",
|
||||||
|
// "2000": "公司",
|
||||||
|
// "3000": "其他",
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
|
||||||
|
// {
|
||||||
|
// dataIndex: 'CREATE_STAFF_NAME',
|
||||||
|
// title: '创建人名称',
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'CREATE_DATE',
|
||||||
|
// title: '创建时间',
|
||||||
|
// valueType: 'date',
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'UPDATE_STAFF_NAME',
|
||||||
|
// title: '更新人名称',
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'UPDATE_DATE',
|
||||||
|
// title: '更新时间',
|
||||||
|
// valueType: 'date',
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'MEMBERADDRESS_DESC',
|
||||||
|
// title: '备注说明',
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// dataIndex: 'option',
|
||||||
|
// title: '操作',
|
||||||
|
// width: 120,
|
||||||
|
// align: 'center',
|
||||||
|
// valueType: 'option',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// render: (_, record) => {
|
||||||
|
// return (
|
||||||
|
// <Space>
|
||||||
|
// <a
|
||||||
|
// onClick={() => {
|
||||||
|
// console.log('record', record);
|
||||||
|
|
||||||
|
// setProvince(record?.RECEIVE_PROVINCE)
|
||||||
|
// setCity(record?.RECEIVE_CITY)
|
||||||
|
// setCounty(record?.RECEIVE_COUNTY)
|
||||||
|
// setCurrentRow({ ...record });
|
||||||
|
// handleModalVisible(true);
|
||||||
|
// }}
|
||||||
|
// >
|
||||||
|
// 编辑
|
||||||
|
// </a>
|
||||||
|
// <Popconfirm
|
||||||
|
// title="确认删除该会员收货地址列表信息吗?"
|
||||||
|
// onConfirm={async () => {
|
||||||
|
// await handelDelete(record.MEMBERADDRESS_ID);
|
||||||
|
// }}
|
||||||
|
// >
|
||||||
|
// <a>删除</a>
|
||||||
|
// </Popconfirm>
|
||||||
|
// </Space>
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
];
|
||||||
|
|
||||||
|
// 抽屉里面的table的columns
|
||||||
|
const drawerColumns: any = [
|
||||||
|
{
|
||||||
|
dataIndex: 'searchText',
|
||||||
|
title: '',
|
||||||
|
width: 150,
|
||||||
|
align: 'center',
|
||||||
|
hideInTable: true,
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: "输入收货人名称"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'USER_NAME',
|
||||||
|
title: '收货人名称',
|
||||||
|
width: 150,
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'USER_SEX',
|
||||||
|
title: '收货人性别',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: {
|
||||||
|
"1": "男",
|
||||||
|
"2": "女",
|
||||||
|
"0": "-",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'MOBILEPHONE',
|
||||||
|
title: '手机号码',
|
||||||
|
width: 150,
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'RECEIVE_PROVINCE',
|
||||||
|
title: '省/直辖市',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'RECEIVE_CITY',
|
||||||
|
title: '城市/直辖市',
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'RECEIVE_COUNTY',
|
||||||
|
title: '区/县',
|
||||||
|
width: 150,
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'ADDRESS',
|
dataIndex: 'ADDRESS',
|
||||||
title: '收货地址',
|
title: '收货地址',
|
||||||
@ -207,6 +388,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
valueType: 'option',
|
valueType: 'option',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
fixed: 'right',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return (
|
return (
|
||||||
<Space>
|
<Space>
|
||||||
@ -247,7 +429,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
|
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
|
||||||
} else {
|
} else {
|
||||||
message.success('删除成功!');
|
message.success('删除成功!');
|
||||||
actionRef.current?.reload()
|
modalActionRef.current?.reload()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -276,7 +458,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
formRef?.current?.resetFields()
|
formRef?.current?.resetFields()
|
||||||
setCurrentRow(undefined)
|
setCurrentRow(undefined)
|
||||||
handleModalVisible(false)
|
handleModalVisible(false)
|
||||||
actionRef.current?.reload()
|
modalActionRef.current?.reload()
|
||||||
} else {
|
} else {
|
||||||
message.error(data.Result_Desc)
|
message.error(data.Result_Desc)
|
||||||
}
|
}
|
||||||
@ -303,8 +485,69 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
request={async (params, sorter) => {
|
request={async (params, sorter) => {
|
||||||
console.log('params', params);
|
console.log('params', params);
|
||||||
|
|
||||||
|
// const req = {
|
||||||
|
// SearchParameter: {
|
||||||
|
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
|
// OWNERUNIT_ID: 911,
|
||||||
|
// ISVALID: 1
|
||||||
|
// },
|
||||||
|
// PageIndex: params.current,
|
||||||
|
// PageSize: params.pageSize,
|
||||||
|
// SortStr: "CREATE_DATE desc",
|
||||||
|
// keyWord: {
|
||||||
|
// Key: "USER_NAME",
|
||||||
|
// Value: params?.searchText
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// const data = await handleGetMEMBERADDRESSList(req);
|
||||||
|
|
||||||
|
const req = {
|
||||||
|
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
|
OwnerUnitId: currentUser?.OwnerUnitId || "",
|
||||||
|
Isvalid: 1,
|
||||||
|
PageIndex: params.current,
|
||||||
|
PageSize: params.pageSize,
|
||||||
|
SortStr: "CREATE_DATE desc",
|
||||||
|
SearchKeyName: "USER_NAME",
|
||||||
|
SearchKeyValue: params?.searchText || ""
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('reqreqreqreqreqreqreq', req);
|
||||||
|
const data = await handeGetMemberAddressCombineList(req)
|
||||||
|
console.log('datadatadatadatadata', data);
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
return { data: data.List, success: true, total: data.TotalCount }
|
||||||
|
}
|
||||||
|
return { data: [], success: true }
|
||||||
|
}}
|
||||||
|
columns={columns}
|
||||||
|
toolbar={{
|
||||||
|
actions: []
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Drawer
|
||||||
|
width={'80%'}
|
||||||
|
visible={showDetailDrawer}
|
||||||
|
onClose={() => {
|
||||||
|
setCurrentBigRow(undefined);
|
||||||
|
setShowDetailDrawer(false);
|
||||||
|
}}
|
||||||
|
closable={false}
|
||||||
|
destroyOnClose
|
||||||
|
>
|
||||||
|
<ProTable
|
||||||
|
search={false}
|
||||||
|
pagination={false}
|
||||||
|
options={false}
|
||||||
|
scroll={{ x: "100%", y: '500px' }}
|
||||||
|
columns={drawerColumns}
|
||||||
|
headerTitle={"用户地址"}
|
||||||
|
actionRef={modalActionRef}
|
||||||
|
request={async (params, sorter) => {
|
||||||
const req = {
|
const req = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
|
MEMBERSHIP_ID: currentBigRow?.MEMBERSHIP_ID,
|
||||||
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
PROVINCE_CODE: currentUser?.ProvinceCode || "",
|
||||||
OWNERUNIT_ID: 911,
|
OWNERUNIT_ID: 911,
|
||||||
ISVALID: 1
|
ISVALID: 1
|
||||||
@ -324,36 +567,13 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
}
|
}
|
||||||
return { data: [], success: true }
|
return { data: [], success: true }
|
||||||
}}
|
}}
|
||||||
columns={columns}
|
|
||||||
toolbar={{
|
|
||||||
actions: []
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
<Drawer
|
|
||||||
width={600}
|
|
||||||
visible={showDetail}
|
|
||||||
onClose={() => {
|
|
||||||
setCurrentRow(undefined);
|
|
||||||
setShowDetail(false);
|
|
||||||
}}
|
|
||||||
closable={false}
|
|
||||||
>
|
|
||||||
{currentRow?.MEMBERADDRESS_ID && (
|
|
||||||
<ProDescriptions
|
|
||||||
column={2}
|
|
||||||
request={async () => ({
|
|
||||||
data: currentRow || {},
|
|
||||||
})}
|
|
||||||
params={{
|
|
||||||
id: currentRow?.MEMBERADDRESS_ID,
|
|
||||||
}}
|
|
||||||
columns={columns}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Drawer>
|
</Drawer>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
|
className="modal-drag-title"
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
@ -400,6 +620,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
bounds={bounds}
|
bounds={bounds}
|
||||||
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
||||||
|
handle=".modal-drag-title"
|
||||||
>
|
>
|
||||||
<div ref={draggleRef}>{modal}</div>
|
<div ref={draggleRef}>{modal}</div>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
|
|||||||
@ -1,11 +1,156 @@
|
|||||||
// 商家评价管理
|
// 商家评价管理
|
||||||
import { ConnectState } from "@/models/connect";
|
import { connect } from "umi";
|
||||||
import { connect, CurrentUser } from "umi";
|
import type { CurrentUser } from "umi";
|
||||||
|
import type { ConnectState } from "@/models/connect";
|
||||||
|
import React, { useRef, useState } from "react";
|
||||||
|
import type { FormInstance } from "antd";
|
||||||
|
import { Button, message, Space, Spin, Tree } from "antd";
|
||||||
|
import useRequest from "@ahooksjs/use-request";
|
||||||
|
import type { ActionType } from "@ant-design/pro-table";
|
||||||
|
import ProTable from "@ant-design/pro-table";
|
||||||
|
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||||
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
|
import { handeGetCOMMENTList } from "../service";
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
|
|
||||||
|
const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
|
const { currentUser } = props
|
||||||
|
const actionRef = useRef<ActionType>();
|
||||||
|
const formRef = useRef<FormInstance>();
|
||||||
|
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||||
|
|
||||||
|
|
||||||
|
// 树相关的属性和方法
|
||||||
|
const [selectedId, setSelectedId] = useState<string>()
|
||||||
|
|
||||||
|
|
||||||
|
const columns: any = [
|
||||||
|
{
|
||||||
|
title: "序号",
|
||||||
|
dataIndex: "index",
|
||||||
|
valueType: "index",
|
||||||
|
hideInSearch: true,
|
||||||
|
align: "center",
|
||||||
|
width: 60,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "商家名称",
|
||||||
|
dataIndex: "MERCHANTS_ID",
|
||||||
|
width: 300,
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "评价时间",
|
||||||
|
dataIndex: "CREATE_DATE",
|
||||||
|
width: 180,
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
align: "center",
|
||||||
|
render: (_, record) => {
|
||||||
|
return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "评价人员",
|
||||||
|
dataIndex: "UPDATE_STAFF_NAME",
|
||||||
|
width: 150,
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "会员类型",
|
||||||
|
dataIndex: "会员类型",
|
||||||
|
width: 150,
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "消费评价",
|
||||||
|
dataIndex: "消费评价",
|
||||||
|
width: 120,
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "评分",
|
||||||
|
dataIndex: "COMMENT_SCORE",
|
||||||
|
width: 120,
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "评价内容",
|
||||||
|
dataIndex: "COMMENT_CONTENT",
|
||||||
|
width: 250,
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "回复内容",
|
||||||
|
dataIndex: "回复内容",
|
||||||
|
width: 250,
|
||||||
|
hideInSearch: true,
|
||||||
|
ellipsis: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||||
|
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
||||||
|
<div style={{
|
||||||
|
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||||
|
paddingTop: 0,
|
||||||
|
paddingBottom: 0,
|
||||||
|
paddingRight: 0
|
||||||
|
}}>
|
||||||
|
<ProTable
|
||||||
|
actionRef={actionRef}
|
||||||
|
formRef={formRef}
|
||||||
|
columns={columns}
|
||||||
|
bordered
|
||||||
|
expandable={{
|
||||||
|
expandRowByClick: true
|
||||||
|
}}
|
||||||
|
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
|
||||||
|
headerTitle={<PageTitleBox props={props} />} // 列表表头
|
||||||
|
search={{ span: 6 }}
|
||||||
|
request={async (params) => {
|
||||||
|
if (!selectedId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const req: any = {
|
||||||
|
SearchParameter: {
|
||||||
|
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
|
PROVINCE_CODE: currentUser?.ProvinceCode,
|
||||||
|
COMMENT_ISVALID: 1
|
||||||
|
},
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 999999,
|
||||||
|
}
|
||||||
|
const data = await handeGetCOMMENTList(req)
|
||||||
|
console.log('datadatadatadatadata', data);
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
return { data: data.List, success: true, total: data.TotalCount }
|
||||||
|
}
|
||||||
|
return { data: [], success: true }
|
||||||
|
}}
|
||||||
|
toolbar={{
|
||||||
|
actions: [
|
||||||
|
]
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import Draggable from 'react-draggable';
|
|||||||
import SubMenu from "antd/lib/menu/SubMenu";
|
import SubMenu from "antd/lib/menu/SubMenu";
|
||||||
import ProTable from '@ant-design/pro-table';
|
import ProTable from '@ant-design/pro-table';
|
||||||
import ProDescriptions from '@ant-design/pro-descriptions';
|
import ProDescriptions from '@ant-design/pro-descriptions';
|
||||||
import ProForm, { ProFormDatePicker, ProFormDateTimePicker, ProFormDateTimeRangePicker, ProFormDigit, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect, ProFormUploadButton } from '@ant-design/pro-form';
|
import ProForm, { ProFormDatePicker, ProFormDateRangePicker, ProFormDateTimePicker, ProFormDateTimeRangePicker, ProFormDigit, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect, 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 } from 'antd';
|
||||||
@ -23,7 +23,7 @@ import type { FormInstance } from 'antd';
|
|||||||
import { getFieldEnumTree, getFieldEnumName } from "@/services/options"; // 枚举的引用,没有使用可以删除
|
import { getFieldEnumTree, getFieldEnumName } from "@/services/options"; // 枚举的引用,没有使用可以删除
|
||||||
import { handeDeleteCOMMODITY, handeGetCOMMODITYList, handeSynchroCOMMODITY, handlDeleteUSERDEFINEDTYPE, handlGetUSERDEFINEDTYPEList, handlSynchroUSERDEFINEDTYPE } from '../service';
|
import { handeDeleteCOMMODITY, handeGetCOMMODITYList, handeSynchroCOMMODITY, handlDeleteUSERDEFINEDTYPE, handlGetUSERDEFINEDTYPEList, handlSynchroUSERDEFINEDTYPE } from '../service';
|
||||||
import PageTitleBox from '@/components/PageTitleBox';
|
import PageTitleBox from '@/components/PageTitleBox';
|
||||||
import { 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';
|
||||||
|
|
||||||
@ -96,42 +96,53 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
dataIndex: 'USERDEFINEDTYPE_NAME',
|
dataIndex: 'USERDEFINEDTYPE_NAME',
|
||||||
title: '类别名称',
|
title: '商品类别',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
hideInSearch: true,
|
||||||
|
hideInDescriptions: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'COMMODITY_NAME',
|
||||||
|
title: '商品名称',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 300,
|
width: 300,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
hideInDescriptions: true,
|
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-start' }}>
|
return record?.COMMODITY_NAME ? <a onClick={() => {
|
||||||
<img style={{ width: '30px', height: '30px', marginRight: '5px', borderRadius: '50%' }} src={record?.USERDEFINEDTYPE_ICO || defaultIcon} />
|
setCurrentRow(record)
|
||||||
<span style={{ width: '240px', display: "inline-block", whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', textAlign: 'left' }}>{record?.USERDEFINEDTYPE_NAME}</span>
|
setShowDetail(true)
|
||||||
</div>
|
}}>{record?.COMMODITY_NAME}</a> : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'USERDEFINEDTYPE_INDEX',
|
dataIndex: 'COMMODITY_RETAILPRICE',
|
||||||
title: '类别索引',
|
title: '零售价',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'USERDEFINEDTYPE_STATE',
|
dataIndex: 'COMMODITY_UNIT',
|
||||||
title: '有效状态',
|
title: '商品单位',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: "select",
|
hideInSearch: true,
|
||||||
valueEnum: {
|
|
||||||
"1": "有效",
|
|
||||||
"0": "无效"
|
|
||||||
},
|
|
||||||
initialValue: "1"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'SCANCODE_ORDER',
|
dataIndex: 'COMMODITY_RULE',
|
||||||
|
title: '商品规格',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'UPPER_STATE',
|
||||||
title: '上架状态',
|
title: '上架状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
@ -144,70 +155,29 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "PRESALE_TYPE",
|
dataIndex: 'OPERATE_DATE',
|
||||||
title: "是否预售",
|
title: '修改时间',
|
||||||
align: 'center',
|
|
||||||
hideInSearch: true,
|
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
valueType: "select",
|
|
||||||
valueEnum: {
|
|
||||||
"0": "否",
|
|
||||||
"1": "是"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'OWNERUNIT_NAME',
|
|
||||||
title: '业主单位',
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'option',
|
dataIndex: 'SERVERPART_NAME',
|
||||||
title: '操作',
|
title: '服务区名称',
|
||||||
width: 100,
|
|
||||||
ellipsis: true,
|
|
||||||
valueType: 'option',
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
ellipsis: true,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
render: (_, record) => {
|
|
||||||
return (
|
|
||||||
<Space>
|
|
||||||
<a
|
|
||||||
onClick={() => {
|
|
||||||
console.log('recordrecordrecord', record);
|
|
||||||
if (record?.USERDEFINEDTYPE_ICO) {
|
|
||||||
setFileList([{
|
|
||||||
name: "",
|
|
||||||
url: record?.USERDEFINEDTYPE_ICO
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
if (record?.PRESALE_TYPE) {
|
|
||||||
setFormPRESALE_TYPE(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
setCurrentRow({ ...record });
|
|
||||||
handleModalVisible(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
编辑
|
|
||||||
</a>
|
|
||||||
<Popconfirm
|
|
||||||
title="确认删除该商品自定义类别列表信息吗?"
|
|
||||||
onConfirm={async () => {
|
|
||||||
handelDelete(record.USERDEFINEDTYPE_ID);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<a>删除</a>
|
|
||||||
</Popconfirm>
|
|
||||||
</Space>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
dataIndex: 'SHOPNAME',
|
||||||
|
title: '门店名称',
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
ellipsis: true,
|
||||||
|
hideInSearch: true,
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
// 预览上传后的图片
|
// 预览上传后的图片
|
||||||
@ -293,7 +263,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
request={async (params, sorter) => {
|
request={async (params, sorter) => {
|
||||||
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,
|
UPPER_STATE: params?.UPPER_STATE,
|
||||||
@ -303,6 +273,8 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
}
|
}
|
||||||
|
console.log('reqreqreqreq', req);
|
||||||
|
|
||||||
const data = await handeGetCOMMODITYList(req);
|
const data = await handeGetCOMMODITYList(req);
|
||||||
console.log('datadatadatadatadata', data);
|
console.log('datadatadatadatadata', data);
|
||||||
if (data.List && data.List.length > 0) {
|
if (data.List && data.List.length > 0) {
|
||||||
@ -313,17 +285,9 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
toolbar={{
|
toolbar={{
|
||||||
actions: [
|
actions: [
|
||||||
// 新增按钮
|
<Button type={"primary"} onClick={() => {
|
||||||
<Button
|
setShowDetail(true)
|
||||||
key="new"
|
}}>新增商品</Button>
|
||||||
icon={<PlusOutlined />}
|
|
||||||
type="primary"
|
|
||||||
onClick={() => {
|
|
||||||
handleModalVisible(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
商品自定义类别
|
|
||||||
</Button>,
|
|
||||||
],
|
],
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -348,6 +312,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
<Modal
|
<Modal
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
|
className="modal-drag-title"
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
@ -364,12 +329,12 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
onFocus={() => { }}
|
onFocus={() => { }}
|
||||||
onBlur={() => { }}
|
onBlur={() => { }}
|
||||||
>
|
>
|
||||||
{currentRow ? '更新商品自定义类别' : '新建商品自定义类别'}
|
{currentRow?.COMMODITY_ID ? '编辑商品详情' : '新增商品'}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
width={900}
|
width={1200}
|
||||||
visible={modalVisible}
|
visible={showDetail}
|
||||||
confirmLoading={confirmLoading}
|
confirmLoading={confirmLoading}
|
||||||
afterClose={() => {
|
afterClose={() => {
|
||||||
formRef.current?.resetFields();
|
formRef.current?.resetFields();
|
||||||
@ -377,9 +342,8 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
}}
|
}}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
handleConfirmLoading(false)
|
handleConfirmLoading(false)
|
||||||
handleModalVisible(false)
|
setShowDetail(false)
|
||||||
setFormPRESALE_TYPE(false)
|
setCurrentRow(undefined)
|
||||||
setFileList([])
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
onOk={async () => { // 提交框内的数据
|
onOk={async () => { // 提交框内的数据
|
||||||
@ -393,6 +357,7 @@ const OrderProductManage: 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=".modal-drag-title"
|
||||||
>
|
>
|
||||||
<div ref={draggleRef}>{modal}</div>
|
<div ref={draggleRef}>{modal}</div>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
@ -406,11 +371,10 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
preserve={false}
|
preserve={false}
|
||||||
initialValues={currentRow ? {
|
initialValues={currentRow ? {
|
||||||
...currentRow,
|
...currentRow,
|
||||||
PRESALE_TIME: currentRow?.PRESALE_TYPE ? [currentRow?.PRESALE_STARTTIME, currentRow?.PRESALE_ENDTIME] : ""
|
OPERATE_TIME: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
} : {
|
} : {
|
||||||
USERDEFINEDTYPE_STATE: 1,
|
OPERATE_TIME: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
USERDEFINEDTYPE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
|
OPERATE_PERSON: currentUser?.Name
|
||||||
OWNERUNIT_NAME: currentUser?.OwnerUnitName
|
|
||||||
}}
|
}}
|
||||||
onFinish={async (values) => {
|
onFinish={async (values) => {
|
||||||
let newValue = { ...values };
|
let newValue = { ...values };
|
||||||
@ -419,7 +383,6 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
newValue = { ...values, USERDEFINEDTYPE_ID: currentRow.USERDEFINEDTYPE_ID };
|
newValue = { ...values, USERDEFINEDTYPE_ID: currentRow.USERDEFINEDTYPE_ID };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log('fileListfileList', fileList);
|
console.log('fileListfileList', fileList);
|
||||||
console.log('newValuenewValuenewValue', newValue);
|
console.log('newValuenewValuenewValue', newValue);
|
||||||
|
|
||||||
@ -431,41 +394,41 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Row gutter={8}>
|
<Row gutter={8}>
|
||||||
<Col span={12}>
|
<Col span={8}>
|
||||||
<ProFormTreeSelect
|
<ProFormTreeSelect
|
||||||
name="USERDEFINEDTYPE_PID"
|
name="COMMODITY_TYPE"
|
||||||
label="上级类别"
|
label="商品类别"
|
||||||
request={async () => {
|
request={async () => {
|
||||||
if (typeTreeData && typeTreeData.length > 0) {
|
// if (typeTreeData && typeTreeData.length > 0) {
|
||||||
let list: any = [{ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 }, ...typeTreeData]
|
// let list: any = [{ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 }, ...typeTreeData]
|
||||||
return list
|
// return list
|
||||||
} else {
|
// } else {
|
||||||
const req = {
|
// const req = {
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
// OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
PROVINCE_CODE: "",
|
// PROVINCE_CODE: "",
|
||||||
GOODSTYPE: 4000,
|
// GOODSTYPE: 4000,
|
||||||
}
|
// }
|
||||||
const data = await handlGetUSERDEFINEDTYPEList(req);
|
// const data = await handlGetUSERDEFINEDTYPEList(req);
|
||||||
console.log('datadatadatadatadata', data);
|
// console.log('datadatadatadatadata', data);
|
||||||
if (data.List && data.List.length > 0) {
|
// if (data.List && data.List.length > 0) {
|
||||||
data.List.unshirft({ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 })
|
// data.List.unshirft({ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 })
|
||||||
setTypeTreeData(data.List)
|
// setTypeTreeData(data.List)
|
||||||
return data.List
|
// return data.List
|
||||||
} else {
|
// } else {
|
||||||
return [{ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 }]
|
// return [{ USERDEFINEDTYPE_NAME: "默认类别", USERDEFINEDTYPE_ID: -1 }]
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}}
|
|
||||||
fieldProps={{
|
|
||||||
fieldNames: {
|
|
||||||
label: 'USERDEFINEDTYPE_NAME',
|
|
||||||
value: 'USERDEFINEDTYPE_ID',
|
|
||||||
children: 'children'
|
|
||||||
},
|
|
||||||
showSearch: true,
|
|
||||||
filterTreeNode: (input, node) =>
|
|
||||||
(node.USERDEFINEDTYPE_NAME || '').toLowerCase().includes(input.toLowerCase())
|
|
||||||
}}
|
}}
|
||||||
|
// fieldProps={{
|
||||||
|
// fieldNames: {
|
||||||
|
// label: 'USERDEFINEDTYPE_NAME',
|
||||||
|
// value: 'USERDEFINEDTYPE_ID',
|
||||||
|
// children: 'children'
|
||||||
|
// },
|
||||||
|
// showSearch: true,
|
||||||
|
// filterTreeNode: (input, node) =>
|
||||||
|
// (node.USERDEFINEDTYPE_NAME || '').toLowerCase().includes(input.toLowerCase())
|
||||||
|
// }}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@ -474,163 +437,163 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={8}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="USERDEFINEDTYPE_NAME"
|
name="COMMODITY_NAME"
|
||||||
label="类别名称"
|
label="商品名称"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入类别名称"
|
message: "请输入商品名称"
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={8}>
|
||||||
<ProFormDigit
|
<ProFormDigit
|
||||||
name="USERDEFINEDTYPE_INDEX"
|
name="COMMODITY_BARCODE"
|
||||||
label="类别索引"
|
label="商品条码"
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<ProFormText
|
||||||
|
name="LIMIT_DAILYCOUNT"
|
||||||
|
label="每日可售"
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={16}>
|
||||||
|
<ProFormDateRangePicker
|
||||||
|
width={'lg'}
|
||||||
|
name=""
|
||||||
|
label="生效时间"
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<ProFormText
|
||||||
|
name="COMMODITY_UNIT"
|
||||||
|
label="商品单位"
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<ProFormText
|
||||||
|
name="COMMODITY_RULE"
|
||||||
|
label="商品规格"
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<ProFormText
|
||||||
|
name="COMMODITY_HOTKEY"
|
||||||
|
label="快捷键码"
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<ProFormDigit
|
||||||
|
name="COMMODITY_RETAILPRICE"
|
||||||
|
label="零售价格"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入类别索引"
|
message: "请输入零售价格"
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={8}>
|
||||||
<ProFormSelect
|
<ProFormDigit
|
||||||
name="SCANCODE_ORDER"
|
name="COMMODITY_PURCHASEPRICE"
|
||||||
label="上架状态"
|
label="进货价格"
|
||||||
options={[{ label: "上架", value: 1 }, { label: "下架", value: 0 }]}
|
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={8}>
|
||||||
|
<ProFormDigit
|
||||||
|
name="COMMODITY_MEMBERPRICE"
|
||||||
|
label="会员价格"
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
name="USERDEFINEDTYPE_STATE"
|
name="UPPER_STATE"
|
||||||
label="有效状态"
|
label="上架状态"
|
||||||
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
|
options={[{ label: "有效", value: 1 }, { label: "无效", value: 0 }]}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择有效状态"
|
message: "请选择上架状态"
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={8}>
|
||||||
<ProFormSelect
|
|
||||||
name="PRESALE_TYPE"
|
|
||||||
label="是否预售"
|
|
||||||
options={[{ label: "是", value: 1 }, { label: "否", value: 0 }]}
|
|
||||||
fieldProps={{
|
|
||||||
onChange: (e: any) => {
|
|
||||||
setFormPRESALE_TYPE(e)
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
{
|
|
||||||
formPRESALE_TYPE ?
|
|
||||||
<Col span={12}>
|
|
||||||
<ProFormDateTimeRangePicker
|
|
||||||
width={'lg'}
|
|
||||||
name="PRESALE_TIME"
|
|
||||||
label="预售时间"
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择预售时间"
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
<Col span={12}>
|
|
||||||
<ProFormUploadButton
|
|
||||||
name="USERDEFINEDTYPE_ICO"
|
|
||||||
label="图标地址"
|
|
||||||
fileList={fileList || []}
|
|
||||||
listType="picture-card"
|
|
||||||
accept="image/*"
|
|
||||||
fieldProps={{
|
|
||||||
beforeUpload,
|
|
||||||
maxCount: 1,
|
|
||||||
onPreview: handlePreview,
|
|
||||||
customRequest: async (info) => {
|
|
||||||
const formData = new FormData();
|
|
||||||
formData.append('files', info.file);
|
|
||||||
formData.append('TableType', '1215');
|
|
||||||
formData.append('ImageName', typeof info.file !== 'string' ? info.file?.name : '');
|
|
||||||
if (info.filename) {
|
|
||||||
const success = await uploadPicture(formData)
|
|
||||||
if (success) {
|
|
||||||
const list = [{
|
|
||||||
// uid: `${success.ImageId}`, // 注意,这个uid一定不能少,否则上传失败
|
|
||||||
name: success.Result_Data.ImageName,
|
|
||||||
// status: 'done',
|
|
||||||
url: success.Result_Data.ImageUrl, // url 是展示在页面上的绝对链接
|
|
||||||
// imgUrl: success.ImagePath // + success.ImageUrl,
|
|
||||||
}]
|
|
||||||
setFileList(list)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message.error("您上传的图片不存在.")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onChange: async (info: any) => {
|
|
||||||
if (info.file.status === 'removed') {
|
|
||||||
confirm({
|
|
||||||
title: '确认删除该图片吗?',
|
|
||||||
icon: <ExclamationCircleOutlined rev={undefined} />,
|
|
||||||
async onOk() {
|
|
||||||
setFileList([])
|
|
||||||
|
|
||||||
// const deleteLoading = message.loading('正在删除...')
|
|
||||||
// try {
|
|
||||||
|
|
||||||
// const deleteIndex = fileList?.findIndex((n: any) => n.uid === info.file.uid)
|
|
||||||
// const success = await deletePicture(info.file?.ImagePath, info.file?.ImageId, '1208')
|
|
||||||
// if (deleteIndex !== -1) {
|
|
||||||
// const files = [...fileList]
|
|
||||||
// files.splice(deleteIndex, 1)
|
|
||||||
// setFileList(files)
|
|
||||||
// }
|
|
||||||
// deleteLoading()
|
|
||||||
// return true
|
|
||||||
// } catch (error) {
|
|
||||||
// deleteLoading()
|
|
||||||
// return false
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col span={12}>
|
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="USERDEFINEDTYPE_DATE"
|
name="OPERATE_PERSON"
|
||||||
label="添加时间"
|
label="操作人员"
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={8}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="OWNERUNIT_NAME"
|
name="OPERATE_TIME"
|
||||||
label="业主单位"
|
label="操作时间"
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ProFormTextArea
|
<ProFormText
|
||||||
name="USERDEFINEDTYPE_DESC"
|
name="COMMODITY_INTRO"
|
||||||
label="备注"
|
label="商品简介"
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
|
<ProFormUploadButton
|
||||||
|
name=""
|
||||||
|
label="商品图片"
|
||||||
|
listType="picture-card"
|
||||||
|
accept="image/*"
|
||||||
|
max={1}
|
||||||
|
fieldProps={{
|
||||||
|
beforeUpload,
|
||||||
|
onPreview: handlePreview,
|
||||||
|
fileList: fileList, // 绑定 fileList
|
||||||
|
onChange: async (info: any) => {
|
||||||
|
console.log('info', info);
|
||||||
|
console.log('fileList', fileList);
|
||||||
|
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, '', '5000')
|
||||||
|
deleteLoading()
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
const files = [...fileList]
|
||||||
|
files.splice(index, 1)
|
||||||
|
setFileList(files)
|
||||||
|
message.success("删除成功")
|
||||||
|
actionRef.current?.reload()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
message.error("删除失败")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const files = [...fileList];
|
||||||
|
files.splice(index, 1);
|
||||||
|
setFileList(files);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setFileList(info.fileList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</ProForm>
|
</ProForm>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@ -68,6 +68,8 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
// 选择的规格内容
|
// 选择的规格内容
|
||||||
const [selectedRowKeys, setSelectedRowKeys] = useState<any>()
|
const [selectedRowKeys, setSelectedRowKeys] = useState<any>()
|
||||||
const [selectedRows, setSelectedRows] = useState<any>()
|
const [selectedRows, setSelectedRows] = useState<any>()
|
||||||
|
// 当前商品关联的规格数据
|
||||||
|
const [specsData, setSpecsData] = useState<any>()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -246,12 +248,11 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
valueType: 'index',
|
valueType: 'index',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: '',
|
dataIndex: 'COMMODITY_MULTI_ID',
|
||||||
title: '规格分类',
|
title: '规格分类',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'index',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'USERDEFINEDTYPE_NAME ',
|
dataIndex: 'USERDEFINEDTYPE_NAME ',
|
||||||
@ -259,39 +260,34 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'index',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: '',
|
dataIndex: 'COMMODITY_STOCK',
|
||||||
title: '商品库存',
|
title: '商品库存',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'index',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: '',
|
dataIndex: 'COMMODITY_RETAILPRICE',
|
||||||
title: '商品原价',
|
title: '商品原价',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'index',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: '',
|
dataIndex: 'COMMODITY_MEMBERPRICE',
|
||||||
title: '零售价格',
|
title: '零售价格',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'index',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: '',
|
dataIndex: 'COMMODITY_PURCHASEPRICE',
|
||||||
title: '商品成本',
|
title: '商品成本',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
valueType: 'index',
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -387,6 +383,11 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
formRef?.current?.resetFields()
|
formRef?.current?.resetFields()
|
||||||
handleModalVisible(false)
|
handleModalVisible(false)
|
||||||
actionRef.current?.reload()
|
actionRef.current?.reload()
|
||||||
|
// 清空一下 商品关联表的数据
|
||||||
|
setSpecsData([])
|
||||||
|
// 清空一下 商品关联表的选择行
|
||||||
|
setSelectedRowKeys([])
|
||||||
|
setSelectedRows([])
|
||||||
} else {
|
} else {
|
||||||
message.error(data.Result_Desc)
|
message.error(data.Result_Desc)
|
||||||
}
|
}
|
||||||
@ -541,8 +542,6 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
{
|
{
|
||||||
currentRow ?
|
currentRow ?
|
||||||
<Button type={"primary"} onClick={() => {
|
<Button type={"primary"} onClick={() => {
|
||||||
console.log('currentRow', currentRow);
|
|
||||||
|
|
||||||
setShowMoreSpecs(true)
|
setShowMoreSpecs(true)
|
||||||
}}>多规格管理</Button> : ""
|
}}>多规格管理</Button> : ""
|
||||||
}
|
}
|
||||||
@ -552,6 +551,11 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
handleConfirmLoading(false)
|
handleConfirmLoading(false)
|
||||||
handleModalVisible(false)
|
handleModalVisible(false)
|
||||||
setBRAND_NAMEList([])
|
setBRAND_NAMEList([])
|
||||||
|
// 清空一下 商品关联表的数据
|
||||||
|
setSpecsData([])
|
||||||
|
// 清空一下 商品关联表的选择行
|
||||||
|
setSelectedRowKeys([])
|
||||||
|
setSelectedRows([])
|
||||||
}}>取 消</Button>
|
}}>取 消</Button>
|
||||||
<Button type={"primary"} loading={confirmLoading} onClick={() => {
|
<Button type={"primary"} loading={confirmLoading} onClick={() => {
|
||||||
formRef?.current?.validateFields().then(() => {
|
formRef?.current?.validateFields().then(() => {
|
||||||
@ -1005,7 +1009,7 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
<Modal
|
<Modal
|
||||||
title={"多规格管理"}
|
title={"多规格管理"}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
width={900}
|
width={1000}
|
||||||
visible={showMoreSpecs}
|
visible={showMoreSpecs}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setShowMoreSpecs(false)
|
setShowMoreSpecs(false)
|
||||||
@ -1027,19 +1031,30 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
}}>新增规格</Button>
|
}}>新增规格</Button>
|
||||||
]
|
]
|
||||||
}}
|
}}
|
||||||
|
dataSource={specsData}
|
||||||
request={async () => {
|
request={async () => {
|
||||||
|
console.log('currentRowcurrentRowcurrentRow', currentRow);
|
||||||
|
|
||||||
const req: any = {
|
const req: any = {
|
||||||
searchParameter: {
|
searchParameter: {
|
||||||
OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
COMMODITY_IDS: currentRow?.COMMODITY_ID,
|
||||||
PROVINCE_CODE: "",
|
// OWNERUNIT_ID: currentUser?.OwnerUnitId,
|
||||||
|
// PROVINCE_CODE: "",
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
}
|
}
|
||||||
const data = await handeGetCOMMODITY_MULTIList(req)
|
const data = await handeGetRTCOMMODITY_MULTIList(req)
|
||||||
console.log('多规格管理', data);
|
console.log('多规格管理', data);
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
setSpecsData(data.List)
|
||||||
|
// return { data: data.List, success: true, total: data.TotalCount }
|
||||||
|
} else {
|
||||||
|
setSpecsData([])
|
||||||
|
}
|
||||||
|
// return { data: [], success: true }
|
||||||
|
|
||||||
return selectedRows
|
// return selectedRows
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -1056,6 +1071,9 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop
|
|||||||
}}
|
}}
|
||||||
onOk={async () => { // 提交框内的数据
|
onOk={async () => { // 提交框内的数据
|
||||||
setShowAddSpecsModal(false)
|
setShowAddSpecsModal(false)
|
||||||
|
console.log('specsDataspecsDataspecsData', specsData);
|
||||||
|
console.log('selectedRowsselectedRowsselectedRows', selectedRows);
|
||||||
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ProTable
|
<ProTable
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import React, { useRef, useState } from "react";
|
|||||||
import ProCard from "@ant-design/pro-card";
|
import ProCard from "@ant-design/pro-card";
|
||||||
import { MenuFoldOutlined } from "@ant-design/icons";
|
import { MenuFoldOutlined } from "@ant-design/icons";
|
||||||
import type { FormInstance } from "antd";
|
import type { FormInstance } from "antd";
|
||||||
import { Button, Drawer, message, Space, Spin, Tree } from "antd";
|
import { Button, Col, Drawer, message, Modal, Row, Space, Spin, Tree } 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,13 +16,22 @@ import PageTitleBox from "@/components/PageTitleBox";
|
|||||||
import { handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetMEMBERSHIPList, handleGetPOINTRECORDList } from "../service";
|
import { handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetMEMBERSHIPList, handleGetPOINTRECORDList } from "../service";
|
||||||
import session from "@/utils/session";
|
import session from "@/utils/session";
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import Draggable from "react-draggable";
|
||||||
|
import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
|
||||||
|
import './style.less'
|
||||||
|
import memberInfoIcon from '@/assets/detail/memberInfoIcon.png'
|
||||||
|
import closeIcon from '@/assets/detail/closeIcon.png'
|
||||||
|
import memberDetailIcon from '@/assets/detail/memberDetailIcon.png'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
const downloadBtnRef = useRef<any>()
|
const downloadBtnRef = useRef<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 [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
|
const [reqDetailList, setReqDetailList] = useState<any>(); // 合计项数据源
|
||||||
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
|
const [printOut, setPrintOut] = useState<any>(); // 打印数据的内容
|
||||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||||
@ -32,7 +41,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
|
|
||||||
let MEMBERSHIP_TYPEObj = session.get('MEMBERSHIP_TYPEObj');
|
let MEMBERSHIP_TYPEObj = session.get('MEMBERSHIP_TYPEObj');
|
||||||
let MEMBERSHIP_LEVELObj = session.get('MEMBERSHIP_LEVELObj');
|
let MEMBERSHIP_LEVELObj = session.get('MEMBERSHIP_LEVELObj');
|
||||||
|
let MEMBERSHIP_LEVELList = session.get('MEMBERSHIP_LEVELList');
|
||||||
let COMPANY_STATEObj = session.get('COMPANY_STATEObj');
|
let COMPANY_STATEObj = session.get('COMPANY_STATEObj');
|
||||||
|
let COMPANY_STATEList = session.get('COMPANY_STATEList');
|
||||||
let CONSUMPTIONRECORDTYPEObj = session.get('CONSUMPTIONRECORDTYPEObj')
|
let CONSUMPTIONRECORDTYPEObj = session.get('CONSUMPTIONRECORDTYPEObj')
|
||||||
|
|
||||||
// 树相关的属性和方法
|
// 树相关的属性和方法
|
||||||
@ -51,38 +62,80 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
|
const [showDetailDrawer, setShowDetailDrawer] = useState<boolean>(false)
|
||||||
// 当前行数据
|
// 当前行数据
|
||||||
const [currentRow, setCurrentRow] = useState<any>()
|
const [currentRow, setCurrentRow] = useState<any>()
|
||||||
|
// 弹出框拖动效果
|
||||||
|
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
|
||||||
|
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
|
||||||
|
|
||||||
|
const [columnsStateMap, setColumnsStateMap] = useState<any>({
|
||||||
|
MEMBERSHIP_CODE: { show: false },
|
||||||
|
MEMBERSHIP_CARD: { show: false },
|
||||||
|
MEMBERSHIP_ADDRESS: { show: false },
|
||||||
|
PLUS_EXPIRYDATE: { show: false },
|
||||||
|
RECOMMEND_NAME: { show: false },
|
||||||
|
ADDTIME: { show: false },
|
||||||
|
MEMBERSHIP_DESC: { show: false },
|
||||||
|
});
|
||||||
|
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 columns: any = [
|
const columns: any = [
|
||||||
{
|
{
|
||||||
title: "会员名称",
|
title: "查询内容",
|
||||||
width: 200,
|
width: 200,
|
||||||
dataIndex: "MEMBERSHIP_NAME",
|
dataIndex: "MEMBERSHIP_NAME",
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
fixed: 'left',
|
fixed: 'left',
|
||||||
render: (_, record) => {
|
// render: (_, record) => {
|
||||||
return <a onClick={() => {
|
// return <a onClick={() => {
|
||||||
console.log('recordrecord', record);
|
// console.log('recordrecord', record);
|
||||||
setCurrentRow(record)
|
// setCurrentRow(record)
|
||||||
setShowDetailDrawer(true)
|
// setShowDetailDrawer(true)
|
||||||
}}>
|
// }}>
|
||||||
{record?.MEMBERSHIP_NAME || ""}
|
// {record?.MEMBERSHIP_NAME || ""}
|
||||||
</a>
|
// </a>
|
||||||
|
// }
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: "请输入要查询的内容"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "会员类型",
|
title: "会员类型",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "MEMBERSHIP_TYPE",
|
dataIndex: "MEMBERSHIP_TYPE",
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
hideInTable: true,
|
||||||
|
align: 'center',
|
||||||
|
valueType: 'select',
|
||||||
|
valueEnum: {
|
||||||
|
...MEMBERSHIP_TYPEObj,
|
||||||
|
0: '全部'
|
||||||
|
},
|
||||||
|
initialValue: "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "会员类型",
|
||||||
|
width: 120,
|
||||||
|
dataIndex: "MEMBERSHIP_TYPE",
|
||||||
|
ellipsis: true,
|
||||||
|
hideInSearch: true,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: {
|
valueEnum: {
|
||||||
...MEMBERSHIP_TYPEObj,
|
...MEMBERSHIP_TYPEObj,
|
||||||
0: '-'
|
0: '-'
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "会员编码",
|
title: "会员编码",
|
||||||
@ -127,7 +180,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "证件号码",
|
title: "证件号码",
|
||||||
width: 120,
|
width: 150,
|
||||||
dataIndex: "CERTIFICATE_NUMBER",
|
dataIndex: "CERTIFICATE_NUMBER",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@ -141,22 +194,22 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: "会员头像",
|
// title: "会员头像",
|
||||||
width: 120,
|
// width: 120,
|
||||||
dataIndex: "MEMBERSHIP_HEADIMAGEURL",
|
// dataIndex: "MEMBERSHIP_HEADIMAGEURL",
|
||||||
hideInSearch: true,
|
// hideInSearch: true,
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
render: (_, record) => {
|
// render: (_, record) => {
|
||||||
return record?.MEMBERSHIP_HEADIMAGEURL ? <a onClick={() => {
|
// return record?.MEMBERSHIP_HEADIMAGEURL ? <a onClick={() => {
|
||||||
window.open(record?.MEMBERSHIP_HEADIMAGEURL)
|
// window.open(record?.MEMBERSHIP_HEADIMAGEURL)
|
||||||
}}>点击查看</a> : ""
|
// }}>点击查看</a> : ""
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: "联系地址",
|
title: "联系地址",
|
||||||
width: 120,
|
width: 180,
|
||||||
dataIndex: "MEMBERSHIP_ADDRESS",
|
dataIndex: "MEMBERSHIP_ADDRESS",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@ -164,7 +217,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "车牌号",
|
title: "车牌号",
|
||||||
width: 120,
|
width: 150,
|
||||||
dataIndex: "LICENSEPLATE_NUMBER",
|
dataIndex: "LICENSEPLATE_NUMBER",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@ -174,11 +227,14 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
title: "会员等级",
|
title: "会员等级",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "MEMBERSHIP_LEVEL",
|
dataIndex: "MEMBERSHIP_LEVEL",
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: MEMBERSHIP_LEVELObj
|
valueEnum: {
|
||||||
|
"0": "全部",
|
||||||
|
...MEMBERSHIP_LEVELObj
|
||||||
|
},
|
||||||
|
initialValue: "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "会员积分",
|
title: "会员积分",
|
||||||
@ -229,16 +285,17 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
title: "会员状态",
|
title: "会员状态",
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "MEMBERSHIP_STATE",
|
dataIndex: "MEMBERSHIP_STATE",
|
||||||
hideInSearch: true,
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
valueEnum: COMPANY_STATEObj
|
valueEnum: COMPANY_STATEObj,
|
||||||
|
initialValue: "1000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "添加时间",
|
title: "添加时间",
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "ADDTIME",
|
dataIndex: "ADDTIME",
|
||||||
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@ -252,6 +309,23 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
dataIndex: "MEMBERSHIP_DESC",
|
dataIndex: "MEMBERSHIP_DESC",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
width: 120,
|
||||||
|
dataIndex: "options",
|
||||||
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
|
fixed: "right",
|
||||||
|
render: (_, record) => {
|
||||||
|
return <Space>
|
||||||
|
<a onClick={() => {
|
||||||
|
setCurrentRow(record)
|
||||||
|
setShowDetailDrawer(true)
|
||||||
|
}}>详情</a>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -485,6 +559,11 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// 悬浮框的关闭方法
|
||||||
|
const handleCloseModal = () => {
|
||||||
|
setShowDetailDrawer(false)
|
||||||
|
setCurrentRow(undefined);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={(el) => {
|
<div ref={(el) => {
|
||||||
@ -560,10 +639,17 @@ const memberInfor: 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,
|
||||||
|
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === "0" ? "" : params?.MEMBERSHIP_TYPE,
|
||||||
|
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === "0" ? "" : params?.MEMBERSHIP_LEVEL,
|
||||||
|
MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
keyWord: {
|
||||||
PageSize: 20
|
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,CERTIFICATE_NUMBER,MEMBERSHIP_CARD,MEMBERSHIP_ADDRESS,LICENSEPLATE_NUMBER",
|
||||||
|
value: params?.MEMBERSHIP_NAME || ""
|
||||||
|
},
|
||||||
|
PageIndex: params.current || 1,
|
||||||
|
PageSize: 20,
|
||||||
}
|
}
|
||||||
setSearchParams(params)
|
setSearchParams(params)
|
||||||
const data = await handleGetMEMBERSHIPList(req)
|
const data = await handleGetMEMBERSHIPList(req)
|
||||||
@ -590,12 +676,257 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
defaultPageSize: 20,
|
defaultPageSize: 20,
|
||||||
showTotal: (total) => `共 ${total} 条记录`
|
showTotal: (total) => `共 ${total} 条记录`
|
||||||
}}
|
}}
|
||||||
|
columnsState={{
|
||||||
|
value: columnsStateMap,
|
||||||
|
onChange: setColumnsStateMap,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
className="memberInfoDetailModal"
|
||||||
|
title={false}
|
||||||
|
// title={
|
||||||
|
// <div
|
||||||
|
// className="modal-drag-title"
|
||||||
|
// style={{
|
||||||
|
// width: '100%',
|
||||||
|
// cursor: 'move',
|
||||||
|
// }}
|
||||||
|
// onMouseOver={() => {
|
||||||
|
// if (disabled) {
|
||||||
|
// setDraggleDisabled(false)
|
||||||
|
// }
|
||||||
|
// }}
|
||||||
|
// onMouseOut={() => {
|
||||||
|
// setDraggleDisabled(true)
|
||||||
|
// }}
|
||||||
|
|
||||||
<Drawer
|
// onFocus={() => { }}
|
||||||
|
// onBlur={() => { }}
|
||||||
|
// >
|
||||||
|
// {'会员详情'}
|
||||||
|
// </div>
|
||||||
|
// }
|
||||||
|
closeIcon={<div></div>}
|
||||||
|
destroyOnClose={true}
|
||||||
|
width={1200}
|
||||||
|
visible={showDetailDrawer}
|
||||||
|
footer={false}
|
||||||
|
afterClose={() => {
|
||||||
|
modalRef.current?.resetFields();
|
||||||
|
setCurrentRow(undefined);
|
||||||
|
}}
|
||||||
|
onCancel={() => {
|
||||||
|
setShowDetailDrawer(false)
|
||||||
|
setCurrentRow(undefined);
|
||||||
|
}}
|
||||||
|
modalRender={(modal) => {
|
||||||
|
return <Draggable
|
||||||
|
disabled={disabled}
|
||||||
|
bounds={bounds}
|
||||||
|
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
|
||||||
|
handle=".modal-drag-title"
|
||||||
|
>
|
||||||
|
<div ref={draggleRef}>{modal}</div>
|
||||||
|
</Draggable>
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
|
||||||
|
<ProForm
|
||||||
|
layout={'horizontal'}
|
||||||
|
formRef={modalRef}
|
||||||
|
submitter={false}
|
||||||
|
initialValues={currentRow ? {
|
||||||
|
...currentRow,
|
||||||
|
MEMBERSHIP_BIRTHDAY: currentRow?.MEMBERSHIP_BIRTHDAY ? moment(currentRow?.MEMBERSHIP_BIRTHDAY).format('YYYY-MM-DD') : '',
|
||||||
|
ADDTIME: currentRow?.ADDTIME ? moment(currentRow?.ADDTIME).format('YYYY-MM-DD HH:mm:ss') : ''
|
||||||
|
} : {}}
|
||||||
|
>
|
||||||
|
<div className="modalTop">
|
||||||
|
<div className="modalTopLeft">
|
||||||
|
<img className="memberIcon" src={memberInfoIcon} />
|
||||||
|
<span className="modalTitle">会员详情</span>
|
||||||
|
</div>
|
||||||
|
<div className="modalTopRight">
|
||||||
|
<img className="memberIcon" src={closeIcon} onClick={() => {
|
||||||
|
handleCloseModal()
|
||||||
|
}} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="topDetail">
|
||||||
|
<div className="topDetailLeft">
|
||||||
|
<img className="headerImage" src={currentRow?.MEMBERSHIP_HEADIMAGEURL || "https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="topDetailRight">
|
||||||
|
<div className="topDetailRightTop">
|
||||||
|
<span className="detailName">{currentRow?.MEMBERSHIP_NAME || "-"}</span>
|
||||||
|
<span className="detailSex">{currentRow?.MEMBERSHIP_SEX === 1 ? '男' : currentRow?.MEMBERSHIP_SEX === 2 ? '女' : ''}</span>
|
||||||
|
{
|
||||||
|
currentRow?.MEMBERSHIP_TYPE && MEMBERSHIP_TYPEObj && MEMBERSHIP_TYPEObj[currentRow?.MEMBERSHIP_TYPE] ?
|
||||||
|
<span className="memberType">{MEMBERSHIP_TYPEObj[currentRow?.MEMBERSHIP_TYPE]}</span> : ""
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="topDetailItem">
|
||||||
|
<Row gutter={8}>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"CERTIFICATE_NUMBER"}
|
||||||
|
label={"身份证号"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"MEMBERSHIP_MOBILEPHONE"}
|
||||||
|
label={"联系电话"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"LICENSEPLATE_NUMBER"}
|
||||||
|
label={"车牌号"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={8} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"MEMBERSHIP_BIRTHDAY"}
|
||||||
|
label={"会员生日"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={16} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"MEMBERSHIP_ADDRESS"}
|
||||||
|
label={"联系地址"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="carNavBox">
|
||||||
|
<img className="carNavIcon" src={memberDetailIcon} />
|
||||||
|
<span className="carNavTitle">详情信息</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="bottomDetailBox">
|
||||||
|
<Row gutter={8}>
|
||||||
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"MEMBERSHIP_CARD"}
|
||||||
|
label={"会员卡号"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"MEMBERSHIP_CODE"}
|
||||||
|
label={"会员编码"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
|
<ProFormSelect
|
||||||
|
name={"MEMBERSHIP_LEVEL"}
|
||||||
|
label={"会员等级"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
options={MEMBERSHIP_LEVELList}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"ACCOUNT_BALANCE"}
|
||||||
|
label={"账户余额"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"MEMBERSHIP_POINT"}
|
||||||
|
label={"会员积分"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
|
<ProFormSelect
|
||||||
|
name={"MEMBERSHIP_STATE"}
|
||||||
|
label={"会员状态"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
options={COMPANY_STATEList}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
|
<ProFormSelect
|
||||||
|
name={"ISPLUS"}
|
||||||
|
label={"付费会员"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
options={[{ label: "是", value: 1 }, { label: "否", value: 0 }]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"PLUS_EXPIRYDATE"}
|
||||||
|
label={"付费有效期"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={6} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"RECOMMEND_NAME"}
|
||||||
|
label={"推荐人"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={18} className="memberInfoDetailItem">
|
||||||
|
<ProFormText
|
||||||
|
name={"ADDTIME"}
|
||||||
|
label={"添加时间"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={24} className="memberInfoDetailItem">
|
||||||
|
<ProFormTextArea
|
||||||
|
name={"MEMBERSHIP_DESC"}
|
||||||
|
label={"备注说明"}
|
||||||
|
readonly
|
||||||
|
style={{ marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</ProForm>
|
||||||
|
|
||||||
|
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
{/* <Drawer
|
||||||
width={'80%'}
|
width={'80%'}
|
||||||
open={showDetailDrawer}
|
open={showDetailDrawer}
|
||||||
closable={false}
|
closable={false}
|
||||||
@ -688,7 +1019,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
return { data: [], success: true }
|
return { data: [], success: true }
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Drawer>
|
</Drawer> */}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
176
src/pages/travelMember/memberInfor/style.less
Normal file
176
src/pages/travelMember/memberInfor/style.less
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
.memberInfoDetailModal {
|
||||||
|
.react-draggable {
|
||||||
|
.ant-modal-content {
|
||||||
|
border-radius: 16px;
|
||||||
|
|
||||||
|
.ant-modal-body {
|
||||||
|
padding: 0;
|
||||||
|
height: 700px;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.ant-form {
|
||||||
|
.modalTop {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.topDetail {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30px 28px;
|
||||||
|
|
||||||
|
.topDetailLeft {
|
||||||
|
width: 120px;
|
||||||
|
height: 120px;
|
||||||
|
margin-right: 28px;
|
||||||
|
|
||||||
|
.headerImage {
|
||||||
|
width: 120px;
|
||||||
|
height: 120px;
|
||||||
|
border-radius: 50%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.topDetailRight {
|
||||||
|
width: calc(100% - 148px);
|
||||||
|
height: 120px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 8px 0;
|
||||||
|
|
||||||
|
.topDetailRightTop {
|
||||||
|
.detailName {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 14px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detailSex {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 14px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.memberType {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 14px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
padding: 2px 8px;
|
||||||
|
background: linear-gradient(0deg, #A13B00 0%, #D7AB0E 100%);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.topDetailItem {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
|
.ant-row {
|
||||||
|
.memberInfoDetailItem {
|
||||||
|
.ant-form-item {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.carNavBox {
|
||||||
|
width: calc(100% - 42px);
|
||||||
|
background-color: #F3F4F8;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 21px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 12px 16px;
|
||||||
|
|
||||||
|
.carNavIcon {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carNavTitle {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 12px;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottomDetailBox {
|
||||||
|
width: calc(100% - 42px);
|
||||||
|
margin-left: 30px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-modal-body::-webkit-scrollbar {
|
||||||
|
width: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,8 +5,8 @@ import React, { useRef, useState } from "react";
|
|||||||
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||||
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 { MenuFoldOutlined } from "@ant-design/icons";
|
import { ExclamationCircleOutlined, MenuFoldOutlined } from "@ant-design/icons";
|
||||||
import { Button, message, Tree } from "antd";
|
import { Button, Col, FormInstance, message, Modal, Row, Tree, Image } 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'
|
||||||
@ -14,10 +14,26 @@ import { handleSynchroSERVERPART } from "@/pages/newDataAnalysis/service";
|
|||||||
import useRequest from "@ahooksjs/use-request";
|
import useRequest from "@ahooksjs/use-request";
|
||||||
import { getServerpartTree } from "@/services/options";
|
import { getServerpartTree } from "@/services/options";
|
||||||
import { handleSynchroNOTICEINFO } from "@/pages/basicManage/highwayHeadlines/service";
|
import { handleSynchroNOTICEINFO } from "@/pages/basicManage/highwayHeadlines/service";
|
||||||
|
import ProForm, { ProFormUploadButton } from "@ant-design/pro-form";
|
||||||
|
import { deletePicture, getPictureList, uploadPicture } from "@/services/picture";
|
||||||
|
import { handeGetPictureList } from "../service";
|
||||||
|
|
||||||
|
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 serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
|
const { confirm } = Modal;
|
||||||
const { currentUser } = props
|
const { currentUser } = props
|
||||||
|
const modalRef = useRef<FormInstance>();
|
||||||
const [collapsible, setCollapsible] = useState<boolean>(false)
|
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||||
const [treeView, setTreeView] = useState<any>()
|
const [treeView, setTreeView] = useState<any>()
|
||||||
// 树相关的属性和方法
|
// 树相关的属性和方法
|
||||||
@ -26,6 +42,15 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const [showRightForm, setShowRightForm] = useState<boolean>(true)
|
const [showRightForm, setShowRightForm] = useState<boolean>(true)
|
||||||
const serverPartRef = useRef<any>()
|
const serverPartRef = useRef<any>()
|
||||||
const shopregionObj = session.get('shopregionObj')
|
const shopregionObj = session.get('shopregionObj')
|
||||||
|
// 显示上传图片的悬浮框
|
||||||
|
const [showUploadImgModal, setShowUploadImgModal] = useState<boolean>(false)
|
||||||
|
// 点击的按钮类型 1 服务区图片上传 2 母婴室图片上传 3 司机之家图片上传 4 住宿客房图片上传 5 便利店图片上传
|
||||||
|
const [showType, setShowType] = useState<number>(0)
|
||||||
|
// 悬浮框的点击确认的效果
|
||||||
|
const [confirmLoading, setConfirmLoading] = useState<boolean>(false)
|
||||||
|
// 文件列表
|
||||||
|
const [fileList, setFileList] = useState<any>([])
|
||||||
|
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
|
||||||
|
|
||||||
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)
|
||||||
@ -41,6 +66,15 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 预览上传后的图片
|
||||||
|
const handlePreview = async () => {
|
||||||
|
setFileList(fileList)
|
||||||
|
setImagePreviewVisible(true)
|
||||||
|
};
|
||||||
|
const handleChangePreview = (val: any) => {
|
||||||
|
setImagePreviewVisible(val)
|
||||||
|
}
|
||||||
|
|
||||||
// 保存方法
|
// 保存方法
|
||||||
const handleSubmitForm = async () => {
|
const handleSubmitForm = async () => {
|
||||||
let res: any = serverPartRef.current?.formRef.current?.getFieldsValue()
|
let res: any = serverPartRef.current?.formRef.current?.getFieldsValue()
|
||||||
@ -272,14 +306,44 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
paddingRight: 0,
|
paddingRight: 0,
|
||||||
overflowY: "auto"
|
overflowY: "auto"
|
||||||
}}>
|
}}>
|
||||||
<div style={{ height: 'calc(100% - 60px)', overflowY: 'auto', }}>
|
<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: selectedId ? selectedId : '' }} onShow={showRightForm} /> :
|
||||||
<LoadingBox />
|
<LoadingBox />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div style={{ height: '60px', width: '100%', display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
|
<div style={{ height: '60px', width: '100%', display: 'flex', justifyContent: 'space-between', alignItems: 'center', boxSizing: "border-box", padding: "0 16px" }}>
|
||||||
|
{/* 上传设施图片 */}
|
||||||
|
{/* 点击的按钮类型 1 服务区图片上传 2 母婴室图片上传 3 司机之家图片上传 4 住宿客房图片上传 5 便利店图片上传 */}
|
||||||
|
{
|
||||||
|
selectedId ? <div>
|
||||||
|
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
||||||
|
setShowType(1)
|
||||||
|
setShowUploadImgModal(true)
|
||||||
|
}}>服务区图片上传</Button>
|
||||||
|
|
||||||
|
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
||||||
|
setShowType(2)
|
||||||
|
setShowUploadImgModal(true)
|
||||||
|
}}>母婴室图片上传</Button>
|
||||||
|
|
||||||
|
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
||||||
|
setShowType(3)
|
||||||
|
setShowUploadImgModal(true)
|
||||||
|
}}>司机之家图片上传</Button>
|
||||||
|
|
||||||
|
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
||||||
|
setShowType(4)
|
||||||
|
setShowUploadImgModal(true)
|
||||||
|
}}>住宿客房图片上传</Button>
|
||||||
|
|
||||||
|
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
|
||||||
|
setShowType(5)
|
||||||
|
setShowUploadImgModal(true)
|
||||||
|
}}>便利店图片上传</Button>
|
||||||
|
</div> : ""
|
||||||
|
}
|
||||||
{
|
{
|
||||||
selectedId ?
|
selectedId ?
|
||||||
<Button type="primary" onClick={() => {
|
<Button type="primary" onClick={() => {
|
||||||
@ -287,9 +351,167 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
}}>保存</Button> : ''
|
}}>保存</Button> : ''
|
||||||
}
|
}
|
||||||
</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
|
||||||
|
title={showType === 1 ? '服务区图片' : showType === 2 ? '母婴室图片' : showType === 3 ? '司机之家图片' : showType === 4 ? '住宿客房图片' : showType === 5 ? '便利店图片' : ''}
|
||||||
|
destroyOnClose={true}
|
||||||
|
width={1200}
|
||||||
|
visible={showUploadImgModal}
|
||||||
|
confirmLoading={confirmLoading}
|
||||||
|
onCancel={() => {
|
||||||
|
setConfirmLoading(false)
|
||||||
|
setShowType(0)
|
||||||
|
setShowUploadImgModal(false);
|
||||||
|
setFileList([])
|
||||||
|
}}
|
||||||
|
onOk={async () => {
|
||||||
|
console.log('file', fileList);
|
||||||
|
let form: any = await modalRef.current?.getFieldsValue({})
|
||||||
|
console.log('formDataformDataformData', form);
|
||||||
|
// 判断这次上传图片了没
|
||||||
|
if (form.SCENICAREA_Image && form.SCENICAREA_Image.length > 0) {
|
||||||
|
const formData = new FormData();
|
||||||
|
form.SCENICAREA_Image.forEach((file: any) => {
|
||||||
|
formData.append('files[]', file.originFileObj);
|
||||||
|
formData.append('ImageName', typeof file !== 'string' ? file?.name : '');
|
||||||
|
});
|
||||||
|
formData.append('TableId', selectedId!);
|
||||||
|
formData.append('imageType', showType === 1 ? '' : showType === 2 ? '1001' : showType === 3 ? '1002' : showType === 4 ? '2001' : showType === 5 ? '2002' : '');
|
||||||
|
formData.append('TableType', showType === 1 ? '1123' : showType === 2 ? '1131' : showType === 3 ? '1131' : showType === 4 ? '1131' : showType === 5 ? '1131' : '');
|
||||||
|
|
||||||
|
console.log('formData', formData);
|
||||||
|
let res = await uploadPicture(formData)
|
||||||
|
console.log('resresresres', res);
|
||||||
|
if (res.Result_Code === 100) {
|
||||||
|
message.success("上传成功!")
|
||||||
|
setConfirmLoading(false)
|
||||||
|
setShowType(0)
|
||||||
|
setShowUploadImgModal(false);
|
||||||
|
setFileList([])
|
||||||
|
setShowRightForm(false)
|
||||||
|
setTimeout(() => {
|
||||||
|
setShowRightForm(true)
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
message.error(res.Result_Desc)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setConfirmLoading(false)
|
||||||
|
setShowType(0)
|
||||||
|
setShowUploadImgModal(false);
|
||||||
|
setFileList([])
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProForm
|
||||||
|
layout={'horizontal'}
|
||||||
|
formRef={modalRef}
|
||||||
|
submitter={false}
|
||||||
|
preserve={false}
|
||||||
|
request={async () => {
|
||||||
|
let req: any = {
|
||||||
|
TableId: selectedId,
|
||||||
|
TableName: showType === 1 ? 'SERVERPART' : showType === 2 ? 'SERVERPARTINFO' : showType === 3 ? 'SERVERPARTINFO' : showType === 4 ? 'SERVERPARTINFO' : showType === 5 ? 'SERVERPARTINFO' : '',
|
||||||
|
TableType: showType === 1 ? '1123' : showType === 2 ? '1131' : showType === 3 ? '1131' : showType === 4 ? '1131' : showType === 5 ? '1131' : '',
|
||||||
|
ImageType: showType === 1 ? '' : showType === 2 ? '1001' : showType === 3 ? '1002' : showType === 4 ? '2001' : showType === 5 ? '2002' : '',
|
||||||
|
}
|
||||||
|
const data = await handeGetPictureList(req)
|
||||||
|
console.log('datadatadatadata', data);
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
let list: any = []
|
||||||
|
if (data.List && data.List.length > 0) {
|
||||||
|
data.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'
|
||||||
|
list.push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
setFileList(list);
|
||||||
|
return {
|
||||||
|
SCENICAREA_Image: list
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Row>
|
||||||
|
<Col span={24}>
|
||||||
|
<ProFormUploadButton
|
||||||
|
name="SCENICAREA_Image"
|
||||||
|
label={showType === 1 ? '服务区图片' : showType === 2 ? '母婴室图片' : showType === 3 ? '司机之家图片' : showType === 4 ? '住宿客房图片' : showType === 5 ? '便利店图片' : ''}
|
||||||
|
listType="picture-card"
|
||||||
|
accept="image/*"
|
||||||
|
fieldProps={{
|
||||||
|
beforeUpload,
|
||||||
|
onPreview: handlePreview,
|
||||||
|
fileList: fileList, // 绑定 fileList
|
||||||
|
onChange: async (info: any) => {
|
||||||
|
console.log('info', info);
|
||||||
|
console.log('fileList', fileList);
|
||||||
|
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, 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' : '')
|
||||||
|
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 {
|
||||||
|
setFileList(info.fileList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
|
||||||
|
</ProForm>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import { wrapTreeNode } from '@/utils/format';
|
import { wrapTreeNode } from '@/utils/format';
|
||||||
import requestEncryption from '@/utils/requestEncryption';
|
import requestEncryption from '@/utils/requestEncryption';
|
||||||
|
|
||||||
@ -337,9 +337,6 @@ export async function handeGetCOMMODITY_MULTIList(params: any) {
|
|||||||
return data.Result_Data
|
return data.Result_Data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取商户列表
|
// 获取商户列表
|
||||||
export async function handeGetMERCHANTSList(params: any) {
|
export async function handeGetMERCHANTSList(params: any) {
|
||||||
const data = await requestEncryption(`/MallBasic/GetMERCHANTSList`, {
|
const data = await requestEncryption(`/MallBasic/GetMERCHANTSList`, {
|
||||||
@ -501,7 +498,7 @@ export async function handeDeleteCOMMODITY_MULTI(params: any) {
|
|||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取商品多规格关联表列表
|
// 获取商品规格关联的列表(就是拿到商品已经关联了的规格)
|
||||||
export async function handeGetRTCOMMODITY_MULTIList(params: any) {
|
export async function handeGetRTCOMMODITY_MULTIList(params: any) {
|
||||||
const data = await requestEncryption(`/MemberConfig/GetRTCOMMODITY_MULTIList`, {
|
const data = await requestEncryption(`/MemberConfig/GetRTCOMMODITY_MULTIList`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@ -510,7 +507,71 @@ export async function handeGetRTCOMMODITY_MULTIList(params: any) {
|
|||||||
if (data.Result_Code !== 100) {
|
if (data.Result_Code !== 100) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
return data
|
return data.Result_Data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询线上订单详情
|
||||||
|
export async function handeGetSALEBILLDetail(params: any) {
|
||||||
|
const data = await requestEncryption(`/OnlineOrder/GetSALEBILLDetail`, {
|
||||||
|
method: 'POST',
|
||||||
|
data: { ...params, requestEncryption: true }
|
||||||
|
})
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return data.Result_Data
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获取评价表列表
|
||||||
|
export async function handeGetCOMMENTList(params: any) {
|
||||||
|
const data = await requestEncryption(`/Comment/GetCOMMENTList`, {
|
||||||
|
method: 'POST',
|
||||||
|
data: { ...params, requestEncryption: true }
|
||||||
|
})
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return data.Result_Data
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 服务区的图片
|
||||||
|
export async function handeGetPictureList(params: any) {
|
||||||
|
const data = await request(`/Picture/GetPictureList`, {
|
||||||
|
method: 'GET',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return data.Result_Data
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询线上订单列表信息(含子订单)
|
||||||
|
export async function handeGetSaleBillWholeList(params: any) {
|
||||||
|
const data = await requestEncryption(`/OnlineOrder/GetSaleBillWholeList`, {
|
||||||
|
method: 'POST',
|
||||||
|
data: { ...params, requestEncryption: true }
|
||||||
|
})
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return data.Result_Data
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 用户为树形的 用户地址
|
||||||
|
export async function handeGetMemberAddressCombineList(params: any) {
|
||||||
|
const data = await requestEncryption(`/Member/GetMemberAddressCombineList`, {
|
||||||
|
method: 'POST',
|
||||||
|
data: { ...params, requestEncryption: true }
|
||||||
|
})
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return data.Result_Data
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import {
|
|||||||
wrapTreeNode
|
wrapTreeNode
|
||||||
} from '@/utils/format';
|
} from '@/utils/format';
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
import requestEncryption from '@/utils/requestEncryption'
|
||||||
import session from '@/utils/session';
|
import session from '@/utils/session';
|
||||||
import type { CommonTypeModel, FieldParamsModel } from './typings';
|
import type { CommonTypeModel, FieldParamsModel } from './typings';
|
||||||
import useRequest from "@ahooksjs/use-request";
|
import useRequest from "@ahooksjs/use-request";
|
||||||
@ -114,6 +115,21 @@ export async function getFieldEnumTree(params: FieldParamsModel) {
|
|||||||
return [...options];
|
return [...options];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 获取枚举列表 出行平台的枚举 */
|
||||||
|
export async function getTravelFieldEnumTree(params: FieldParamsModel) {
|
||||||
|
|
||||||
|
const data = await requestEncryption(`/FrameWork/GetFieldEnumByField`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...params },
|
||||||
|
});
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
const options = wrapTreeNode(data.Result_Data.List);
|
||||||
|
return [...options];
|
||||||
|
}
|
||||||
|
|
||||||
/* 获取枚举列表 */
|
/* 获取枚举列表 */
|
||||||
export async function getFieldEnum(params: FieldParamsModel): Promise<{ label: string; value: string | number }[]> {
|
export async function getFieldEnum(params: FieldParamsModel): Promise<{ label: string; value: string | number }[]> {
|
||||||
// const FieldExplain = session.get(params.sessionName ? params.sessionName : params.FieldExplainField);
|
// const FieldExplain = session.get(params.sessionName ? params.sessionName : params.FieldExplainField);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user