Commit 15d0e50e authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

Merge branch 'v2-220418' of…

Merge branch 'v2-220418' of https://gitlab.shushangyun.com/linkseeks-design/pro-platform into fix418
parents 5fbb4352 8bd9c80b
......@@ -99,26 +99,26 @@
hideInMenu: true,
hidePageHeader: true,
},
//广告管理 todo:wuting
// {
// path: '/memberCenter/contentAbility/advertisement',
// name: 'advertisement',
// component: '@/pages/content/advertisement',
// },
// {
// path: '/memberCenter/contentAbility/advertisement/add',
// name: 'advertisementAdd',
// component: '@/pages/content/advertisement/advertisementInfo',
// hideInMenu: true,
// hidePageHeader: true,
// },
// {
// path: '/memberCenter/contentAbility/advertisement/detail',
// name: 'advertisementInfo',
// component: '@/pages/content/advertisement/advertisementInfo',
// hideInMenu: true,
// hidePageHeader: true,
// },
//广告管理
{
path: '/memberCenter/contentAbility/advertisement',
name: 'advertisement',
component: '@/pages/content/advertisement',
},
{
path: '/memberCenter/contentAbility/advertisement/add',
name: 'advertisementAdd',
component: '@/pages/content/advertisement/advertisementInfo',
hideInMenu: true,
hidePageHeader: true,
},
{
path: '/memberCenter/contentAbility/advertisement/detail',
name: 'advertisementInfo',
component: '@/pages/content/advertisement/advertisementInfo',
hideInMenu: true,
hidePageHeader: true,
},
]
}
......
......@@ -170,26 +170,6 @@ export const purchaseInquiryRoute = [
hideInMenu: true,
noMargin: true,
},
// //广告管理
// {
// path: '/memberCenter/procurementAbility/purchaseInquiry/advertisement',
// name: 'advertisement',
// component: '@/pages/content/advertisement',
// },
// {
// path: '/memberCenter/procurementAbility/purchaseInquiry/advertisement/add',
// name: 'advertisementAdd',
// component: '@/pages/content/advertisement/advertisementInfo',
// hideInMenu: true,
// hidePageHeader: true,
// },
// {
// path: '/memberCenter/procurementAbility/purchaseInquiry/advertisement/detail',
// name: 'advertisementInfo',
// component: '@/pages/content/advertisement/advertisementInfo',
// hideInMenu: true,
// hidePageHeader: true,
// },
]
},
]
......@@ -3,7 +3,7 @@ import StandardTable from '@/components/StandardTable';
import NestTable from '@/components/NestTable';
import { IStandardTableProps } from 'god/dist/src/standard-table';
import { Row, Col, Modal } from 'antd';
import { productModalSchema, productModalByMemberSchema, memberModalSchema, inquirySchema, demandSchema, enquirySchema, mergeOrderSchema, goodsModalSchema, demandNumberSchema, logisticsDeliverySearchSchema, addOrderModalSchema , logisticsSelectGoodsSearchSchema, SelectRfqOrderSearchSchema, SelectLogisticsService, contractSchema, departmentSchema, requisitionSchema} from './schema';
import { requisitSchema, productModalSchema, productModalByMemberSchema, memberModalSchema, inquirySchema, demandSchema, enquirySchema, mergeOrderSchema, goodsModalSchema, demandNumberSchema, logisticsDeliverySearchSchema, addOrderModalSchema, logisticsSelectGoodsSearchSchema, SelectRfqOrderSearchSchema, SelectLogisticsService, contractSchema, departmentSchema, requisitionSchema } from './schema';
import Search from '../NiceForm/components/Search';
import SearchSelect from '../NiceForm/components/SearchSelect';
import Submit from '../NiceForm/components/Submit';
......@@ -18,7 +18,7 @@ export interface ModalTableProps extends IStandardTableProps<any> {
cancel?(),
visible?: boolean,
resetModal?: object,
modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'goodsModalSchema' | 'demandNumberSchema' | 'logisticsDelivery' | 'addOrderModalSchema' | 'selectGoodsSchema' | 'selectRfqOrder' | 'SelectLogisticsService' | 'contractByDefault' | 'departmentSchema' | 'requisitionSchema' | 'none' ,
modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'goodsModalSchema' | 'demandNumberSchema' | 'logisticsDelivery' | 'addOrderModalSchema' | 'selectGoodsSchema' | 'selectRfqOrder' | 'SelectLogisticsService' | 'contractByDefault' | 'departmentSchema' | 'requisitionSchema' | 'requisitSchema' | 'none',
useNestTable?: boolean, // 是否使用嵌套表格
nestColumns?: any[],
nestTableProps?: any,
......@@ -27,8 +27,8 @@ export interface ModalTableProps extends IStandardTableProps<any> {
searchName?: string
}
const ModalTable:React.FC<ModalTableProps> = (props) => {
const { width = 704, modalTitle, confirm, cancel, visible, currentRef, resetModal, modalType = 'none', forceRender, useNestTable = false, nestColumns, nestTableProps,searchName , ...resetTable } = props
const ModalTable: React.FC<ModalTableProps> = (props) => {
const { width = 704, modalTitle, confirm, cancel, visible, currentRef, resetModal, modalType = 'none', forceRender, useNestTable = false, nestColumns, nestTableProps, searchName, ...resetTable } = props
const selfRef = currentRef || useRef<any>({})
useEffect(() => {
if (visible && forceRender) {
......@@ -59,7 +59,7 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
return inquirySchema
}
case 'enquiryModel':{
case 'enquiryModel': {
return enquirySchema
}
......@@ -100,6 +100,9 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
case 'requisitionSchema': {
return requisitionSchema
}
case 'requisitSchema': {
return requisitSchema
}
case 'none': {
return {}
}
......@@ -122,33 +125,33 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
rowClassName={(_, index) => (index % 2) === 0 && "tb_bg"}
{...nestTableProps}
/>
) : (
<StandardTable
tableType='small'
currentRef={selfRef}
formRender={(child, ps) => <Row justify='space-between' style={{marginBottom: 16}}>
<Col style={{ zIndex: 99, width: 'calc(100% - 130px)' }}>{child}</Col>
<Col style={{ marginTop: 4, minWidth: 128 }}>{ps}</Col>
</Row >}
formilyProps={
modalType === 'none' ? null : {
ctx: {
schema: modelSchemaRender(),
components: { ModalSearch: Search, SearchSelect, Submit, DateSelect },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
searchName ? searchName : 'name',
FORM_FILTER_PATH,
);
) : (
<StandardTable
tableType='small'
currentRef={selfRef}
formRender={(child, ps) => <Row justify='space-between' style={{ marginBottom: 16 }}>
<Col style={{ zIndex: 99, width: 'calc(100% - 130px)' }}>{child}</Col>
<Col style={{ marginTop: 4, minWidth: 128 }}>{ps}</Col>
</Row >}
formilyProps={
modalType === 'none' ? null : {
ctx: {
schema: modelSchemaRender(),
components: { ModalSearch: Search, SearchSelect, Submit, DateSelect },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
searchName ? searchName : 'name',
FORM_FILTER_PATH,
);
}
}
}
}
{...resetTable}
/>
}
{...resetTable}
/>
)
}
......
......@@ -1173,3 +1173,31 @@ export const departmentSchema: ISchema = {
}
}
}
export const requisitSchema: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
"x-component": 'Search',
"x-component-props": {
placeholder: '请输入姓名'
}
},
// org: {
// type: 'string',
// "x-component": 'Search',
// "x-component-props": {
// placeholder: '请输入所属机构'
// }
// },
// jobTitle: {
// type: 'string',
// "x-component": 'Search',
// "x-component-props": {
// placeholder: '请输入职位'
// }
// }
}
}
\ No newline at end of file
......@@ -970,6 +970,7 @@ export default {
'member.management.assigned.query.sourceName': '申请来源',
'member.management.assigned.query.receive': '领取',
'member.management.assigned.query.batchReceive': '批量领取',
'member.management.assigned.query.bind.suc': '会员领取成功!',
}
......@@ -246,11 +246,11 @@ const Products: React.FC<{}> = () => {
dataIndex: ['draft', 'type'],
key: 'type',
render: t => {
if(t === 1) {
if (t === 1) {
return intl.formatMessage({ id: 'commodity.products.columns.type.1' })
} else if(t === 2) {
} else if (t === 2) {
return intl.formatMessage({ id: 'commodity.products.columns.type.2' })
} else if(t === 3) {
} else if (t === 3) {
return intl.formatMessage({ id: 'commodity.products.columns.type.3' })
}
}
......@@ -293,8 +293,8 @@ const Products: React.FC<{}> = () => {
dataIndex: 'option',
width: 160,
render: (text, record) => (<>
<Button type='link' onClick={()=>clickDraftModify(record)}>{intl.formatMessage({ id: 'commodity.products.products.button.draft.option1' })}</Button>
<Button type='link' onClick={()=>clickDraftDelete(record)}>{intl.formatMessage({ id: 'commodity.products.products.button.draft.option2' })}</Button>
<Button type='link' onClick={() => clickDraftModify(record)}>{intl.formatMessage({ id: 'commodity.products.products.button.draft.option1' })}</Button>
<Button type='link' onClick={() => clickDraftDelete(record)}>{intl.formatMessage({ id: 'commodity.products.products.button.draft.option2' })}</Button>
</>)
}
];
......@@ -311,8 +311,8 @@ const Products: React.FC<{}> = () => {
okType: 'danger',
cancelText: intl.formatMessage({ id: 'commodity.products.confirmDelete.cancelText' }),
onOk() {
postProductCommodityDeleteCommodityDraftBatch({idList: [record['id']]}).then(({code}) => {
if(code === 1000) {
postProductCommodityDeleteCommodityDraftBatch({ idList: [record['id']] }).then(({ code }) => {
if (code === 1000) {
refDraft.current.reload()
}
})
......@@ -419,7 +419,7 @@ const Products: React.FC<{}> = () => {
let a: any = document.createElement("a")
document.body.appendChild(a)
a.style = "display: none"
getProductCommodityExportCommodityTemplate({ }, { responseType: 'blob', getResponse: true }).then((res: any) => {
getProductCommodityExportCommodityTemplate({}, { responseType: 'blob', getResponse: true }).then((res: any) => {
const { data, response } = res
const filename = response.headers.get('content-disposition').split('=')[1]
let blob = new Blob([data], { type: "application/vnd.ms-excel" })
......@@ -491,13 +491,13 @@ const Products: React.FC<{}> = () => {
setCurrentOptionRow(record)
const fn = record?.id ? getProductCommodityGetShop : postProductCommodityGetShopBatch
// @ts-ignore
fn(record?.id ? { id: record.id } : { idList: currentCtrlRef.current.selectedRowKeys }, { ctlType: 'none' }).then(({data}) => {
fn(record?.id ? { id: record.id } : { idList: currentCtrlRef.current.selectedRowKeys }, { ctlType: 'none' }).then(({ data }) => {
setShopsOption(data.sort((a, b) => a.shopId - b.shopId))
let initValue = {}
data.forEach(item => {
initValue[item.shopId] = item.isCheck
})
upForm.setFieldsValue({...initValue})
upForm.setFieldsValue({ ...initValue })
})
setIsUp(param)
setUpDownModal(true)
......@@ -513,8 +513,8 @@ const Products: React.FC<{}> = () => {
const checkShops = [...params.upShops]
// 1. 判断是否有店铺
const hasShop = await judgeStop(checkShops)
if(hasShop) {
const params = isBatch ? currentCtrlRef.current.selectedRowKeys: [currentOptionRow.id]
if (hasShop) {
const params = isBatch ? currentCtrlRef.current.selectedRowKeys : [currentOptionRow.id]
// 2. 判断是否库存
const hasStore = await judgeStore(params)
if (hasStore) {
......@@ -603,7 +603,7 @@ const Products: React.FC<{}> = () => {
const shopId = shopIdRef.current
// @ts-ignore
fn(isBatch ? { storeId: shopId['id'], storeName: shopId['name'], storeLogo: shopId['logo'], shopList: params.shopList, idList: RowCtl.selectedRowKeys } : { storeId: shopId?.id || null, storeName: shopId?.name || null, storeLogo: shopId?.logo || null, ...params }).then((res) => {
if(res.code === 1000) {
if (res.code === 1000) {
setGiudeVisible(false)
ref.current.reload()
setIsDisabledOKbtn(false)
......@@ -620,7 +620,7 @@ const Products: React.FC<{}> = () => {
}
if (isUp) {
if (upShops.length > 0) {
handlePutwayGuide({upShops}).then(res => {
handlePutwayGuide({ upShops }).then(res => {
// 返回true时 全部验证通过
if (res) {
// 执行上架逻辑
......@@ -759,7 +759,7 @@ const Products: React.FC<{}> = () => {
if (selectedRowKeys.length > 1000) {
return message.error(intl.formatMessage({ id: 'commodity.products.schema.fastSchema.zuiduodaochuyiqiange' }))
}
postProductCommodityExportCommoditySkuByCommodityIdList({idList: selectedRowKeys}, { responseType: 'blob', getResponse: true }).then((res:any) => {
postProductCommodityExportCommoditySkuByCommodityIdList({ idList: selectedRowKeys }, { responseType: 'blob', getResponse: true }).then((res: any) => {
const { data, response } = res
const filename = response.headers.get('content-disposition').split('=')[1]
let blob = new Blob([data], { type: "application/vnd.ms-excel" })
......@@ -875,7 +875,7 @@ const Products: React.FC<{}> = () => {
{intl.formatMessage({ id: 'commodity.products.menuMore.5' })}
</Menu.Item>
<Menu.Item key="6" icon={<ExportOutlined />}>
{intl.formatMessage({ id: 'commodity.products.huoqushangyougongyingshangpin'})}
{intl.formatMessage({ id: 'commodity.products.huoqushangyougongyingshangpin' })}
</Menu.Item>
{/* <Menu.Item key="7" icon={<ExportOutlined />}>
{intl.formatMessage({ id: 'commodity.products.huoquxiayouxiaoshoushangpin'})}
......@@ -893,7 +893,7 @@ const Products: React.FC<{}> = () => {
<PlusOutlined />{intl.formatMessage({ id: 'commodity.products.controllerBtns.button.1' })}
</Button>
</AuthButton>
<Button style={{margin:'0 16px'}} onClick={()=>setImportModal(true)}>{intl.formatMessage({ id: 'commodity.products.controllerBtns.button.3' })}</Button>
<Button style={{ margin: '0 16px' }} onClick={() => setImportModal(true)}>{intl.formatMessage({ id: 'commodity.products.controllerBtns.button.3' })}</Button>
<AuthButton btnCode='products.batch' >
<Dropdown overlay={menuMore} trigger={['click']}>
<Button>
......@@ -1057,31 +1057,31 @@ const Products: React.FC<{}> = () => {
<Modal
title={isUp ? intl.formatMessage({ id: 'commodity.products.modal.title.2' }) : intl.formatMessage({ id: 'commodity.products.modal.title.3' })}
visible={upDownModal}
onOk={()=>upForm.submit()}
onOk={() => upForm.submit()}
onCancel={handleCancelUp}
forceRender={true}
okButtonProps={{ disabled: isDisabledOKbtn }}
width={600}
>
<Form
labelCol={{span: 12}}
wrapperCol={{span: 12}}
labelCol={{ span: 12 }}
wrapperCol={{ span: 12 }}
form={upForm}
onFinish={handleUp}
>
{/* 优化上下架操作用户体验 */}
<h4>{isUp ? intl.formatMessage({ id: 'commodity.products.modal.form.label.1.isUpTrue1' }) : intl.formatMessage({ id: 'commodity.products.modal.form.label.1.isUpFalse1' })}</h4>
<Row>
{
Array.isArray(shopsOption) && shopsOption.map((item, index) =><Col span={12} key={item.shopId}>
<Form.Item name={item.shopId} label={item.name}>
<Radio.Group>
<Radio value={true}>{intl.formatMessage({id: 'commodity.products.operationHandler.5'})}</Radio>
<Radio value={false}>{intl.formatMessage({id: 'commodity.products.operationHandler.6'})}</Radio>
</Radio.Group>
</Form.Item>
</Col>)
}
{
Array.isArray(shopsOption) && shopsOption.map((item, index) => <Col span={12} key={item.shopId}>
<Form.Item name={item.shopId} label={item.name}>
<Radio.Group>
<Radio value={true}>{intl.formatMessage({ id: 'commodity.products.operationHandler.5' })}</Radio>
<Radio value={false}>{intl.formatMessage({ id: 'commodity.products.operationHandler.6' })}</Radio>
</Radio.Group>
</Form.Item>
</Col>)
}
</Row>
</Form>
</Modal>
......@@ -1117,7 +1117,7 @@ const Products: React.FC<{}> = () => {
title={intl.formatMessage({ id: 'common.tip.modal.tip' })}
visible={exportVisible}
onOk={handleExport}
onCancel={()=>setExportVisible(false)}
onCancel={() => setExportVisible(false)}
confirmLoading={exportLoading}
>
<h2>{intl.formatMessage({ id: 'commodity.products.handleExport.querendaochu' })}</h2>
......
......@@ -38,7 +38,7 @@ const AllQuery = () => {
dataIndex: 'title',
render: (text: string, record: any) => (
<EyePreview
url={`/content/advertisement/detail?id=${record.id}&preview=1`}
url={`/memberCenter/contentAbility/advertisement/detail?id=${record.id}&preview=1`}
>
{text}
</EyePreview>
......@@ -118,7 +118,7 @@ const AllQuery = () => {
<Space>
<Button
type="primary"
onClick={() => { history.push('/content/advertisement/add') }}
onClick={() => { history.push('/memberCenter/contentAbility/advertisement/add') }}
icon={<PlusOutlined />}
>
{getIntl().formatMessage({ id: 'common.button.add'})}
......
......@@ -15,9 +15,9 @@ import NiceForm from '@/components/NiceForm';
import LevelBrand from '@/components/LevelBrand';
import StatusTag from '@/components/StatusTag';
import {
getMemberAbilityMaintenancePage,
getMemberAbilityMaintenancePageitems,
postMemberDepositVerifyBatch,
getMemberAbilityAssignedPage,
getMemberAbilityAssignedPageitems,
postMemberAbilityAssignedBind,
} from '@/services/MemberV2Api';
import useSpliceArray from '@/hooks/useSpliceArray';
import { querySchema } from './schema2';
......@@ -30,26 +30,30 @@ import styles from './index.less';
const formActions = createFormActions();
const fetchData = async (params: any) => {
const { startDate = null, endDate = null } = params;
const payload = { ...params };
if (startDate) {
payload.startDate = moment(+startDate).format('YYYY-MM-DD');
}
if (endDate) {
payload.endDate = moment(+endDate).format('YYYY-MM-DD');
}
const res = await getMemberAbilityMaintenancePage(payload);
if (res.code === 1000) {
return res.data;
}
return { data: [], totalCount: 0 };
};
const MemberMaintain: React.FC<[]> = () => {
const [selectedRowKeys, setSelectedRowKeys] = useState<number[]>([]);
const [data,setData] = useState<any>([])
const fetchData = async (params: any) => {
const { startDate = null, endDate = null } = params;
const payload = { ...params };
if (startDate) {
payload.startDate = moment(+startDate).format('YYYY-MM-DD');
}
if (endDate) {
payload.endDate = moment(+endDate).format('YYYY-MM-DD');
}
const res = await getMemberAbilityAssignedPage(payload);
if (res.code === 1000) {
setData(res.data.data)
return res.data;
}
return { data: [], totalCount: 0 };
};
const ref = useRef<any>({});
const intl = useIntl();
......@@ -63,6 +67,7 @@ const MemberMaintain: React.FC<[]> = () => {
id: 'member.management.maintain.query.memberName',
})}`,
dataIndex: 'memberId',
width:150,
render: (text, record) => (
<>
<div>{text}</div>
......@@ -170,7 +175,7 @@ const MemberMaintain: React.FC<[]> = () => {
title: intl.formatMessage({ id: 'common.table.action' }),
dataIndex: 'option',
render: (_, record) => (
<Button type="link" onClick={() => handleReceive(record.memberId)}>
<Button type="link" onClick={() => handleReceive(record.memberId,record.roleId)}>
{intl.formatMessage({
id: 'member.management.assigned.query.receive',
})}
......@@ -185,7 +190,7 @@ const MemberMaintain: React.FC<[]> = () => {
// 初始化高级筛选选项
const fetchSelectOptions = async () => {
const res = await getMemberAbilityMaintenancePageitems();
const res = await getMemberAbilityAssignedPageitems();
if (res.code === 1000) {
const { data = {} }: any = res;
......@@ -269,10 +274,28 @@ const MemberMaintain: React.FC<[]> = () => {
selectedRowKeys: selectedRowKeys,
};
const handleReceive = id => {
console.log('lingqu', id);
const handleReceive = (memberId,roleId) => {
let selectDataParam = [{subMemberId:memberId,subRoleId:roleId}]
postMemberAbilityAssignedBind(selectDataParam,{ctlType:'none'})
.then(res => {
if (res.code === 1000) {
message.success(intl.formatMessage({
id: 'member.management.assigned.query.bind.suc',
}) )
setTimeout(() => {
ref.current.reload();
setSelectedRowKeys([]);
}, 200);
}
})
.catch((err) => {
message.error(err.message)
});
};
const handleBatch = () => {
if (!selectedRowKeys.length) {
message.warning(
......@@ -280,6 +303,18 @@ const MemberMaintain: React.FC<[]> = () => {
);
return;
}
let selectDataParam = []
data?.length && data.map((item)=>{
selectedRowKeys.map((i)=>{
if(item.validateId === i){
selectDataParam.push({subMemberId:item.memberId,subRoleId:item.roleId})
}
})
})
console.log('选中data:',selectDataParam)
confirm({
title: intl.formatMessage({ id: 'member.actions.verify-tip' }),
icon: <QuestionCircleOutlined />,
......@@ -288,21 +323,23 @@ const MemberMaintain: React.FC<[]> = () => {
}),
onOk() {
return new Promise<void>((resolve, reject) => {
console.log('提交的会员idlist:', selectedRowKeys);
// postMemberDepositVerifyBatch({
// validateIds: selectedRowKeys,
// })
// .then(res => {
// if (res.code === 1000) {
// ref.current.reload();
// setSelectedRowKeys([]);
// resolve();
// }
// reject();
// })
// .catch(() => {
// reject();
// });
postMemberAbilityAssignedBind(selectDataParam,{ctlType:'none'})
.then(res => {
if (res.code === 1000) {
resolve();
message.success(intl.formatMessage({
id: 'member.management.assigned.query.bind.suc',
}) )
setTimeout(() => {
ref.current.reload();
setSelectedRowKeys([]);
}, 200);
}
reject();
})
.catch(() => {
reject();
});
});
},
});
......
......@@ -7,7 +7,7 @@ import { useIntl } from 'umi'
import moment from 'moment';
import styles from './index.less';
import { UPLOAD_TYPE } from '@/constants'
import { postManageMaterialLibraryPage, postManageMaterialLibraryAdd, postManageMaterialLibraryBatchDel } from '@/services/MaterialV2Api';
import { postManageMaterialLibraryPage, postManageMaterialLibraryAdd, postManageMaterialLibraryBatchDel } from '@/services/ManageV2Api';
const { RangePicker } = DatePicker
const { Option } = Select;
......
......@@ -28,7 +28,6 @@ const fetchMemberAbilitySelect = async (params) => {
}
const SalesmanBindAdded = (props) => {
const ref = useRef<any>({})
const staticData = useRef<any>([])
const [rowSelection, rowCtl] = useRowSelectionTable({ customKey: 'relationId' })
const [realRowSelection, realRowCtl] = useRowSelectionTable({ customKey: 'relationId' })
......@@ -38,8 +37,6 @@ const SalesmanBindAdded = (props) => {
const [keywordName, setKeywordName] = useState<string>('')
const intl = useIntl()
console.log(rowSelection, rowCtl, '测试')
const fliterTableData = useMemo(() => {
if (!keywordName) {
return tableData
......@@ -63,6 +60,7 @@ const SalesmanBindAdded = (props) => {
if (res.code === 1000) {
formAction.setFieldValue('userId', [res.data])
// 添加一个remote标识, 带有此标识的 将会调用接口解绑
console.log(res.data.data.map(v => ({ ...v, isRemote: true })))
setTableData(res.data.data.map(v => ({ ...v, isRemote: true })))
}
})
......@@ -76,7 +74,6 @@ const SalesmanBindAdded = (props) => {
}, [realRowCtl.selectedRowKeys])
useEffect(() => {
console.log(tableData, 'tableData')
rowCtl.setSelectedRowKeys(tableData.map(v => v.relationId))
rowCtl.setSelectRow([...tableData])
......@@ -308,10 +305,12 @@ const SalesmanBindAdded = (props) => {
userId,
...params
})
if (code === 1000) {
setTableData(data.data)
if (code !== 1000) {
message.error(intl.formatMessage({ id: code }))
setTableData([])
return
}
return code === 1000 ? data : []
setTableData([...data.data.map(v => ({ ...v, isRemote: true }))])
} else {
return []
}
......@@ -344,11 +343,6 @@ const SalesmanBindAdded = (props) => {
actions={formAction}
editable={pageStatus !== PageStatus.PREVIEW}
previewPlaceholder=" "
effects={($, ctx) => {
$('onFieldChange', 'userId').subscribe(async state => {
fetchMemberSaleChannel({current: 1, pageSize: 10})
})
}}
schema={{
type: 'object',
properties: {
......@@ -358,9 +352,9 @@ const SalesmanBindAdded = (props) => {
'x-component': 'CustomRelevance',
'x-component-props': {
title: intl.formatMessage({ id: 'common.text.select' }),
disabled: (pageStatus === PageStatus.EDIT),
modalProps: {
title: intl.formatMessage({ id: 'channel.form.modal.salesman.title' }),
},
columns: abilityColumns,
fetchTableData: fetchMemberAbilitySelect,
......
......@@ -11,19 +11,38 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
import '../index.less'
import { tableListSchema } from '../constant'
import { getPurchaseRequisitionFirstAuditPage } from '@/services/PurchaseV2Api'
import NiceForm from '@/components/NiceForm';
import { createFormActions } from '@formily/antd';
import { getMemberUserPage } from '@/services/MemberV2Api';
// 待审核请购单 一级
export interface FirstApprovedBillProps {}
export interface FirstApprovedBillProps { }
const fetchTableData = async (params) => {
const { data } = await getPurchaseRequisitionFirstAuditPage(params)
return data
}
const FirstApprovedBill:React.FC<FirstApprovedBillProps> = () => {
const FirstApprovedBill: React.FC<FirstApprovedBillProps> = () => {
const { columns, ref } = useSelfTable()
const intl = useIntl()
const formActions = createFormActions();
const handleSearch = async value => {
if (!value) {
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = [];
});
return;
}
const data: any = { name: value, status: '1', pageSize: 10, current: 1 }
const res = await getMemberUserPage(data)
const list = res.data.data.map((item) => { return { label: item.name, value: item.userId } })
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = list;
});
};
const controllerBtns = null;
return <PageHeaderWrapper>
<Card>
<StandardTable
......@@ -31,31 +50,29 @@ const FirstApprovedBill:React.FC<FirstApprovedBillProps> = () => {
columns={columns}
currentRef={ref}
rowKey="id"
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema(),
effects: ($, actions) => {
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
handleSearch,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'requisitionNo',
FORM_FILTER_PATH,
);
},
components: {
}}
schema={tableListSchema()}
components={{
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
Submit,
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
......
import { postMemberManageLowerProviderPage } from "@/services/MemberV2Api"
import { getMemberUserPage, postMemberManageLowerProviderPage } from "@/services/MemberV2Api"
import { getProductCommodityCommonGetCommodityListByBuyer, getProductGoodsGetGoodsList } from "@/services/ProductV2Api"
export const fetchOrderApi = {
......@@ -20,5 +20,11 @@ export const fetchOrderApi = {
return data
},
/** 查询请购人 */
async getMemberUserPageList (params) {
const {data} = await getMemberUserPage(params)
return data;
}
}
import React, { useEffect } from 'react'
import ModalTable, { ModalTableProps } from '@/components/ModalTable'
import { fetchOrderApi } from '../../apis'
import { useModalTable } from '../../model/useModalTable'
import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd'
import { RequisitiColumns } from '../../constant'
import { useIntl } from 'umi'
export interface MemberModalTableProps extends ModalTableProps {
type?: 'radio' | 'checkbox',
schemaAction: ISchemaFormActions | ISchemaFormAsyncActions,
currentRef?: any,
confirmModal?(),
productRef?: any,
}
const RequisitionerTable: React.FC<MemberModalTableProps> = (props) => {
const { type = 'radio', schemaAction, confirmModal, currentRef, ...restProps } = props
const { visible, setVisible, rowSelection, rowSelectionCtl } = useModalTable({ type, customKey: 'userId' })
const intl = useIntl()
useEffect(() => {
if (currentRef) {
currentRef.current = {
setVisible,
visible,
rowSelectionCtl
}
}
}, [])
useEffect(() => {
if (visible) {
const memberId = schemaAction.getFieldValue('requisitionerId')
rowSelectionCtl.setSelectedRowKeys([memberId])
}
}, [visible])
const handleConfirm = () => {
const rowItem = rowSelectionCtl.selectRow[0]
console.log(rowItem, 'row')
if (rowItem) {
schemaAction.setFieldValue('requisitioner', rowItem.name)
schemaAction.setFieldValue('requisitionerId', rowItem.userId)
// schemaAction.setFieldValue('vendorMemberName', rowItem.name)
}
confirmModal && confirmModal()
setVisible(false)
}
return (
<ModalTable
modalTitle="选择请购人"
columns={RequisitiColumns}
visible={visible}
confirm={handleConfirm}
cancel={() => setVisible(false)}
fetchTableData={(params) => fetchOrderApi.getMemberUserPageList({ ...params })}
rowSelection={rowSelection}
modalType='requisitSchema'
tableProps={{
rowKey: 'userId'
}}
{...restProps}
/>
)
}
RequisitionerTable.defaultProps = {}
export default RequisitionerTable
......@@ -180,3 +180,33 @@ export const materialInfoColumns: any[] = [
key: 'ctl',
},
]
export const RequisitiColumns: any[] = [
{
title: "姓名",
dataIndex: 'name',
align: 'center',
key: 'name',
},
{
title: "手机号",
dataIndex: 'phone',
align: 'center',
key: 'phone',
},
{
title: "所属机构",
dataIndex: 'orgName',
align: 'center',
key: 'orgName',
},
{
title: "职位",
dataIndex: 'jobTitle',
align: 'center',
key: 'jobTitle',
},
]
......@@ -14,14 +14,19 @@ import { useMaterialTable } from './model/useMaterialTable'
import MaterialModalTable from './components/materialModalTable'
import DepartmentModalTable from './components/departmentModalTable'
import MemberModalTable from './components/memberModalTable'
import RequisitionerTable from './components/requisitionerTable'
import AddressSelect from '@/components/AddressSelect'
import styled from 'styled-components'
import FormDetailHeader from '@/components/FormDetailHeader'
import FormDetailWrapper from '@/components/FormDetailWrapper'
import { FormDetailContext } from '@/formSchema/context'
import { useFormDetail } from '@/formSchema/effects/useFormDetail'
import { getPurchaseRequisitionDetail, postPurchaseRequisitionCreate, postPurchaseRequisitionUpdate } from '@/services/PurchaseV2Api'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { getPurchaseRequisitionDeliveryMethodItems, getPurchaseRequisitionDetail, postPurchaseRequisitionCreate, postPurchaseRequisitionUpdate } from '@/services/PurchaseV2Api'
import { UPLOAD_TYPE } from '@/constants'
import styles from './index.less'
import { ADDRESS_TYPE } from '../../purchaseAbility/purchaseBid/readyAdd/components/condition'
const addSchemaAction = createFormActions()
const { Option } = Select;
......@@ -60,8 +65,11 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', () => {
const IncreaseRequisition: React.FC<{}> = () => {
const departmentRef = useRef<any>({}) // 选部门
const memberRef = useRef<any>({})
const RequisRef = useRef<any>({}) // 请购人
const AddressRef = useRef<any>({});
const [formLoading, setFormLoading] = useState(false)
const [btnLoading, setBtnLoading] = useState(false)
const [selAddress, setSelAddress] = useState<ADDRESS_TYPE>();
const update = useUpdate()
const { id } = usePageStatus()
const [initFormValue, setInitFormValue] = useState<any>({})
......@@ -130,6 +138,12 @@ const IncreaseRequisition: React.FC<{}> = () => {
}
}
// 选中请购人
const handleOrder = () => {
RequisRef.current.setVisible(true)
}
const RequisitionerBtn = <div className='connectBtn' onClick={handleOrder}><LinkOutlined style={{ marginRight: 4 }} />{intl.formatMessage({ id: 'purchaseRequisition.xuanze', defaultMessage: '选择' })}</div>
// 选择会员弹窗
const handleOrderMember = () => {
memberRef.current.setVisible(true)
......@@ -154,13 +168,13 @@ const IncreaseRequisition: React.FC<{}> = () => {
const enclosureColumns = [
{
title: '文件',
key: 'deliveryTime',
dataIndex: 'deliveryTime',
key: 'name',
dataIndex: 'name',
},
{
title: '关联物料',
key: 'deliveryTime1',
dataIndex: 'deliveryTime',
key: 'goodsName',
dataIndex: 'goodsName',
render: (text, record) => {
return (
<Select defaultValue="全部" style={{ width: 230 }} >
......@@ -173,25 +187,16 @@ const IncreaseRequisition: React.FC<{}> = () => {
}
}
]
// const dataSource = [
// {
// deliveryTime1: 'xxxx',
// deliveryTime: 'xxxx',
// id: 1,
// },
// {
// deliveryTime1: 'xxxx',
// deliveryTime: 'xxxx',
// id: 2,
// }
// ]
// 上传
const handleFrontUrl = async ({ fileList }) => {
if (fileList[0].response) {
if (fileList[0].response.code === 1000) {
const data = [...dataSource];
data.push({
deliveryTime: fileList[0].name,
name: fileList[0].name,
url: fileList[0].url,
index: dataSource.length + 1
})
setdataSource(data);
addSchemaAction.setFieldValue('productsList', data)
......@@ -199,6 +204,16 @@ const IncreaseRequisition: React.FC<{}> = () => {
}
}
const fetchOptions = (service) => {
console.log(service, 'service')
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.deliveryMethods.map((item) => { return { label: item.deliveryMethodName, value: item.deliveryMethod } })
}
return [];
}
}
/**
* 上传大小限制
* */
......@@ -250,7 +265,12 @@ const IncreaseRequisition: React.FC<{}> = () => {
effects={($, ctx) => {
$('onFormMount').subscribe(() => { })
useEditHideField()
useAsyncSelect(
"deliveryMethod",
fetchOptions(
getPurchaseRequisitionDeliveryMethodItems,
)
)
// ctx.setFieldValue('productsList', dataSource)
// 物料信息的改动 渲染总额
useMaterialTableChangeForAmount(ctx, update)
......@@ -258,12 +278,31 @@ const IncreaseRequisition: React.FC<{}> = () => {
// 注入表单完成进度
formContext.useAttachmentChangeForContext(ctx)
$('onFieldChange', 'deliveryMethod').subscribe(res => {
if (res.value === 2) {
addSchemaAction.setFieldState('deliveryAddress', state => {
state.visible = false;
});
addSchemaAction.setFieldState('deliveryAddressId', state => {
state.visible = true;
});
} else {
addSchemaAction.setFieldState('deliveryAddress', state => {
state.visible = true;
});
addSchemaAction.setFieldState('deliveryAddressId', state => {
state.visible = false;
});
}
})
}}
expressionScope={{
memberBtn,
departmentBtn,
materialColumns,
materialAddButton,
RequisitionerBtn,
materialComponents,
help,
enclosureColumns,
......@@ -280,6 +319,8 @@ const IncreaseRequisition: React.FC<{}> = () => {
<MaterialModalTable currentRef={materialRef} schemaAction={addSchemaAction} sectionProps={surplusProps} />
{/* 选择供应会员 */}
<MemberModalTable currentRef={memberRef} schemaAction={addSchemaAction} />
{/* 请购人选择会员 */}
<RequisitionerTable currentRef={RequisRef} schemaAction={addSchemaAction} />
{/* </PageHeaderWrapper> */}
</div>)
......
......@@ -110,24 +110,21 @@ const basicInfo: ISchema = {
title: getIntl().formatMessage({ id: 'purchaseRequisition.neibuzhuangtai', defaultMessage: '内部状态' }),
visible: false
},
deliverTime: {
// 请购人
requisitioner: {
type: 'string',
title: "请购人",
"x-rules": [
{
required: true,
message:"请输入请购人"
},
{
limitByte: true,
maxByte: 100
}
],
"x-mega-props": {
span: 1
}
title: '请购人',
"x-component-props": {
disabled: true,
addonAfter: "{{RequisitionerBtn}}"
},
required: true,
},
requisitionerId:{
type: 'string',
visible: false
}
}
},
......@@ -171,9 +168,10 @@ const delivery: ISchema = {
span: 1
}
},
purpose: {
deliveryMethod: {
type: 'string',
title: "配送方式",
enum: [],
"x-rules": [
{
required: true,
......@@ -188,7 +186,22 @@ const delivery: ISchema = {
span: 1
}
},
vendorMemberName: {
//
deliveryAddressId: {
visible:false,
type: 'string',
title: '送货地址',
required: true,
'x-component': 'CustomAddressSelect',
'x-component-props': {
isDefaultAddress: true,
},
"x-mega-props": {
span: 1
}
},
deliveryAddress: {
// visible:false,
type: 'string',
title: "送货地址",
"x-rules": [
......@@ -226,7 +239,7 @@ const material: ISchema = {
"x-component": 'MultTable',
required: true,
"x-component-props": {
rowKey: 'id',
rowKey: 'index',
columns: "{{materialColumns}}",
components: "{{materialComponents}}",
prefix: "{{materialAddButton}}",
......
......@@ -18,6 +18,7 @@ import {
postPurchaseRequisitionPause,
} from '@/services/PurchaseV2Api';
import { useIntl } from 'umi';
import { getMemberUserPage } from '@/services/MemberV2Api';
// 请购单查询
......@@ -144,13 +145,21 @@ const RequestBill: React.FC<RequestBillProps> = () => {
]);
}
};
const handleSearch = value => {
const handleSearch = async value => {
console.log(value)
if (!value) {
formActions.setFieldState('qinggouPenson', fieldState => {
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = [];
});
return;
}
const data: any = { name: value, status: '1', pageSize: 10, current: 1 }
const res = await getMemberUserPage(data)
const list = res.data.data.map((item) => { return { label: item.name, value: item.userId } })
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = list;
});
console.log(list)
};
return (
<PageHeaderWrapper>
......
......@@ -12,8 +12,10 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
import '../index.less'
import { tableListSchema } from '../constant'
import { getPurchaseRequisitionCreatePage } from '@/services/PurchaseV2Api'
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { createAsyncFormActions, createFormActions, FormEffectHooks } from '@formily/antd';
import { searchOptionEffect } from './effect';
import { getMemberUserPage } from '@/services/MemberV2Api';
import NiceForm from '@/components/NiceForm';
// 待新增请购单
......@@ -33,7 +35,32 @@ const ReadyAddBill: React.FC<ReadyAddBillProps> = () => {
const formActions = createFormActions();
const handleSearch = async value => {
if (!value) {
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = [];
});
return;
}
const data: any = { name: value, status: '1', pageSize: 10, current: 1 }
const res = await getMemberUserPage(data)
const list = res.data.data.map((item) => { return { label: item.name, value: item.userId } })
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = list;
});
};
const controllerBtns = (
<Space>
<Button
icon={<PlusCircleOutlined />}
type='primary'
onClick={clickAdd}
>
{intl.formatMessage({ id: 'purchaseRequisition.xinjian', defaultMessage: '新建' })}
</Button>
</Space>
)
return <PageHeaderWrapper>
<Card>
<StandardTable
......@@ -41,53 +68,32 @@ const ReadyAddBill: React.FC<ReadyAddBillProps> = () => {
columns={columns}
currentRef={ref}
rowKey="id"
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema(),
effects: ($, actions) => {
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
handleSearch,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'requisitionNo',
FORM_FILTER_PATH,
);
FormEffectHooks.onFieldChange$('brandId').subscribe(state => {
searchOptionEffect(actions, 'brandId')
})
},
components: {
}}
schema={tableListSchema()}
components={{
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button
icon={<PlusCircleOutlined />}
type='primary'
onClick={clickAdd}
>
{intl.formatMessage({ id: 'purchaseRequisition.xinjian', defaultMessage: '新建' })}
</Button>
</Space>,
layouts: {
span: 8
}
}}
Submit,
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -10,19 +10,37 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
import '../index.less'
import { tableListSchema } from '../constant'
import { getPurchaseRequisitionSubmitPage } from '@/services/PurchaseV2Api'
import { getMemberUserPage } from '@/services/MemberV2Api';
import NiceForm from '@/components/NiceForm';
import { createFormActions } from '@formily/antd';
// 待提交请购单
export interface ReadySubmitBillProps {}
export interface ReadySubmitBillProps { }
const fetchTableData = async (params) => {
const { data } = await getPurchaseRequisitionSubmitPage(params)
return data
}
const ReadySubmitBill:React.FC<ReadySubmitBillProps> = () => {
const ReadySubmitBill: React.FC<ReadySubmitBillProps> = () => {
const { columns, ref } = useSelfTable()
const formActions = createFormActions();
const handleSearch = async value => {
if (!value) {
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = [];
});
return;
}
const data: any = { name: value, status: '1', pageSize: 10, current: 1 }
const res = await getMemberUserPage(data)
const list = res.data.data.map((item) => { return { label: item.name, value: item.userId } })
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = list;
});
};
const controllerBtns = null;
return <PageHeaderWrapper>
<Card>
<StandardTable
......@@ -30,32 +48,31 @@ const ReadySubmitBill:React.FC<ReadySubmitBillProps> = () => {
columns={columns}
currentRef={ref}
rowKey="id"
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema(),
effects: ($, actions) => {
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
handleSearch,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'requisitionNo',
FORM_FILTER_PATH,
);
},
components: {
}}
schema={tableListSchema()}
components={{
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
Submit,
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
}
......
......@@ -10,19 +10,37 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
import '../index.less'
import { tableListSchema } from '../constant'
import { getPurchaseRequisitionTwoAuditPage } from '@/services/PurchaseV2Api'
import { createFormActions } from '@formily/antd';
import { getMemberUserPage } from '@/services/MemberV2Api';
import NiceForm from '@/components/NiceForm';
// 待审核请购单 二级
export interface SecondApprovedBillProps {}
export interface SecondApprovedBillProps { }
const fetchTableData = async (params) => {
const { data } = await getPurchaseRequisitionTwoAuditPage(params)
return data
}
const SecondApprovedBill:React.FC<SecondApprovedBillProps> = () => {
const SecondApprovedBill: React.FC<SecondApprovedBillProps> = () => {
const { columns, ref } = useSelfTable()
const formActions = createFormActions();
const handleSearch = async value => {
if (!value) {
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = [];
});
return;
}
const data: any = { name: value, status: '1', pageSize: 10, current: 1 }
const res = await getMemberUserPage(data)
const list = res.data.data.map((item) => { return { label: item.name, value: item.userId } })
formActions.setFieldState('requisitionerId', fieldState => {
fieldState.props.enum = list;
});
};
const controllerBtns = null;
return <PageHeaderWrapper>
<Card>
<StandardTable
......@@ -30,31 +48,29 @@ const SecondApprovedBill:React.FC<SecondApprovedBillProps> = () => {
columns={columns}
currentRef={ref}
rowKey="id"
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema(),
effects: ($, actions) => {
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
handleSearch,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'requisitionNo',
FORM_FILTER_PATH,
);
},
components: {
}}
schema={tableListSchema()}
components={{
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
Submit,
}}
/>
}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -15,7 +15,7 @@ const SalesPerformanceStatistics: React.FC = () => {
const intl = getIntl();
const { token } = (getAuth() || {})
const ref = useRef<any>({});
const [organizationList,setOrganizationList] = useState<Array<{value:string,label:string}>>()
const [organizationList,setOrganizationList] = useState<Array<{value:number,label:string}>>()
const [paramsData,setParamsData] = useState<{ name:string,time:string,organization:number,pageSize:number,current:number }>()
const defaultColumns: ColumnType<any>[] = [
......@@ -139,8 +139,8 @@ const SalesPerformanceStatistics: React.FC = () => {
/** 获取机构列表 */
const getOrganizationList = async ()=>{
let res = await getMemberFeignAbilitySalesOrganizationList()
const list = res.data?.map((i)=>({
value:i,
const list = res.data?.map((i,k)=>({
value:k,
label:i
}))
setOrganizationList(list)
......@@ -164,7 +164,6 @@ const SalesPerformanceStatistics: React.FC = () => {
console.log('exporturl:',`${process.env.BACK_GATEWAY}/order/member/sales/achievement/count/export/memberSales/information?token=${token}${exportParams}`)
window.open(`${process.env.BACK_GATEWAY}/order/member/sales/achievement/count/export/memberSales/information?token=${token}${exportParams}`, '_blank')
}
return (
<PageHeaderWrapper>
<Card>
......@@ -176,7 +175,12 @@ const SalesPerformanceStatistics: React.FC = () => {
currentRef={ref}
rowKey='userId'
fetchTableData={(params: any) => {
console.log('params:',params)
delete params.account
let num = Number(params.title)
if(num > -1 && organizationList?.length){
params.title = organizationList[params.title].label
}
setParamsData({...params})
return fetchListData(params)
}}
......@@ -227,7 +231,7 @@ const SalesPerformanceStatistics: React.FC = () => {
type: 'Search',
"x-component-props": {
placeholder: intl.formatMessage({ id: 'salesPerformanceStatistics.placeholder.name' }),
allowClear:true,
allowClear:true,
}
},
......
......@@ -234,7 +234,7 @@ const StatistticsList: React.FC<{ searchType: string; id: number }> = ({
return new Promise((resolve, reject) => {
api(
{
userId: 700,
userId: id,
...rest,
countTime: searchType === 'membership' ? memberTime : productTime,
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment