Commit bdc66ced authored by Bill's avatar Bill

feat: 会员考评

parent 7551c287
......@@ -5,7 +5,7 @@
* @LastEditTime: 2021-04-21 16:53:13
*/
// import CommodityRoute from './commodityRoute' // 商品能力路由
// import MemberRoute from './memberRoute' // 会员能力路由
import MemberRoute from './memberRoute' // 会员能力路由
import ShopRoute from './shopRoute' // 店铺能力路由
import ChannelRoute from './channelRoute' // 渠道能力路由
// import TranactionRoute from './tranactionRoute' // 交易能力路由
......
......@@ -295,17 +295,41 @@ const MemberRoute: RouterChild = {
path: '/memberCenter/memberAbility/memberInspection/inspection',
name: '会员考察管理',
component: '@/pages/member/memberInspection/index',
},
// 会员考察 -- 新增
{
path: '/memberCenter/memberAbility/memberInspection/inspection/add',
name: '新建会员考察',
hideInMenu: true,
component: '@/pages/member/memberInspection/add'
},
// 会员考察 -- 详情
{
path: '/memberCenter/memberAbility/memberInspection/inspection/detail',
name: '会员考察详情',
hideInMenu: true,
component: '@/pages/member/memberInspection/detail',
noMargin: true,
}
]
},
// 会员考评
{
path: '/memberCenter/memberAbility/memberEvaluate',
name: '会员考评',
routes: [
{
path: '/memberCenter/memberAbility/memberEvaluate/createEvaluate',
name: '会员考评管理',
component: '@/pages/member/memberEvaluate/createEvaluate/index',
},
{
path: '/memberCenter/memberAbility/memberEvaluate/evaluate/createEvaluate/add',
name: '新建考评单',
component: '@/pages/member/memberEvaluate/createEvaluate/add',
},
]
},
]
}
......
......@@ -35,9 +35,10 @@ const Search = props => {
});
};
return (
<Space size={[16, 0]} style={{ justifyContent: justifyAlign, width: '100%' }}>
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: justifyAlign, width: '100%' }}>
<Tooltip title={tip}>
<Input.Search
style={{width: '200px'}}
value={props.value || ''}
onChange={e => props.mutators.change(e.target.value)}
onSearch={(_, e) => {
......@@ -48,7 +49,7 @@ const Search = props => {
/>
</Tooltip>
{advanced && (
<Button onClick={changeFilterVisible}>
<Button onClick={changeFilterVisible} style={{margin: '0 16px'}}>
高级筛选
{state.filterSearch ? <CaretUpOutlined /> : <CaretDownOutlined />}
</Button>
......@@ -62,7 +63,7 @@ const Search = props => {
>
重置
</Button>
</Space>
</div>
);
};
......
import React, { useEffect } from 'react';
import RangeTime from './index';
import { UploadProps, UploadChangeParam, UploadFile } from 'antd/lib/upload/interface'
import { Button } from 'antd';
import { Moment } from 'moment';
import { useSchemaProps } from '@formily/antd';
interface Iprops {
value: Moment[] | string,
editable: boolean,
ruleErrors: string[],
props: {
['x-component-props']: any,
},
mutators: {
change: (params: Moment[]) => void
},
}
const toArray = (value: string | Moment[]): Moment[] => {
if (!value) {
return [];
}
if (Array.isArray(value)) {
return value;
}
}
const FormilyRangeTime: React.FC<Iprops> = (props: Iprops) => {
const { value, editable, ruleErrors } = props;
// const schemaProps = useSchemaProps()
// console.log(schemaProps);
const componentProps = props.props?.['x-component-props'] || {};
const momentValue = toArray(value)
const hasError = ruleErrors.length > 0;
const onChange = (info: Moment[]) => {
props.mutators.change(info)
}
return (
<div>
<RangeTime rangeTime={momentValue} onChange={onChange} {...componentProps} />
{
hasError && (
<p style={{marginBottom: 0, color: '#ff4d4f'}} >{ruleErrors.join(",")}</p>
)
}
</div>
)
}
const WrapFormilyRangeTime: typeof FormilyRangeTime & {
isFieldComponent?: boolean,
} = FormilyRangeTime;
WrapFormilyRangeTime.isFieldComponent = true
export default WrapFormilyRangeTime
.container {
display: flex;
flex-direction: row;
align-items: center;
.wrapFlex {
flex: 1;
}
.splitChar {
text-align: center;
width: 32px;
}
}
import React, { CSSProperties, useEffect, useState } from 'react';
import { DatePicker } from 'antd';
import cx from 'classnames';
import styles from './index.less';
import moment, { Moment } from 'moment';
interface Iprops {
containerStyle?: CSSProperties,
/**
* 默认时间
*/
rangeTime?: Moment[],
/**
* placeholader
*/
placeholader?: [string, string],
onChange?: ((rangeTime: Moment[]) => void) | null,
}
const RangeTime: React.FC<Iprops> = (props: Iprops) => {
const { containerStyle, rangeTime, onChange, placeholader } = props;
const [innerRangeTime, setInnerRangeTime] = useState({
startTime: null,
endTime: null
});
useEffect(() => {
const [startTime = null, endTime = null] = rangeTime;
setInnerRangeTime({
startTime: startTime,
endTime: endTime,
})
}, [props.rangeTime])
const handleChange = (date: Moment, dateString: string, mode: "startTime" | "endTime") => {
const newObject = {
...innerRangeTime,
[mode]: date,
}
onChange?.([newObject.startTime, newObject.endTime])
setInnerRangeTime(newObject)
}
const getDisableDate = (current: Moment, mode: "startTime" | "endTime") => {
const reverseMode = mode === 'startTime' ? 'endTime' : 'startTime';
// const time
const modeTime = innerRangeTime[reverseMode];
if(!modeTime) {
return false
}
// 如果我当前选择的是startTime, 并选择了结束时间,那么
return mode === 'startTime' ? current > innerRangeTime[reverseMode].endOf('day') : current < innerRangeTime[reverseMode].endOf('day')
}
return (
<div className={cx(styles.container, containerStyle)}>
<div className={styles.wrapFlex}>
<DatePicker
style={{width: '100%'}}
value={innerRangeTime.startTime} onChange={(date: Moment, dateString: string) => handleChange(date, dateString, "startTime")}
disabledDate={(current) => getDisableDate(current, 'startTime')}
placeholder={placeholader[0]}
/>
</div>
<span className={styles.splitChar}>~</span>
<div className={styles.wrapFlex}>
<DatePicker
style={{width: '100%'}}
value={innerRangeTime.endTime}
onChange={(date: Moment, dateString: string) => handleChange(date, dateString, "endTime")}
disabledDate={(current) => getDisableDate(current, 'endTime')}
placeholder={placeholader[1]}
/>
</div>
</div>
)
}
RangeTime.defaultProps = {
containerStyle: {},
rangeTime: [],
onChange: null,
placeholader: ["开始时间", "结束时间"]
}
export default RangeTime
......@@ -5,8 +5,13 @@ import { Button } from 'antd';
interface Iprops {
value: UploadFile[],
props: any,
mutators: any,
editable: boolean,
props: {
['x-component-props']: any,
},
mutators: {
change: (params: UploadFile[]) => void
},
}
const toArray = (value: string | UploadFile[]): UploadFile[] => {
......@@ -19,8 +24,7 @@ const toArray = (value: string | UploadFile[]): UploadFile[] => {
}
const FormilyUploadFiles: React.FC<Iprops> = (props: Iprops) => {
// const editable = props.editable;
const { value } = props;
const { value, editable } = props;
const componentProps = props.props?.['x-component-props'] || {};
const fileList = toArray(value)
......@@ -47,7 +51,7 @@ const FormilyUploadFiles: React.FC<Iprops> = (props: Iprops) => {
}
return (
<UploadFiles fileList={fileList} onChange={onChange} onRemove={onRemove} {...componentProps} />
<UploadFiles fileList={fileList} onChange={onChange} onRemove={onRemove} disable={!editable} {...componentProps} />
)
}
......
......@@ -5,7 +5,7 @@
.renderFileItemContainer {
position: relative;
padding: 0 @padding-sm;
padding: 0 @padding-xs;
display: flex;
flex-direction: column;
justify-content: center;
......@@ -27,6 +27,7 @@
.img {
width: 16px;
height: 16px;
margin-right: @margin-sm;
}
}
&:hover {
......
......@@ -13,11 +13,14 @@ interface PickUploadProps extends Pick<UploadProps, PickProps> {
children?: React.ReactElement,
customizeItemRender?: ((files: UploadFile[], handleRemove: (fileItem: UploadFile) => void) => React.ReactNode) | null,
onRemove?: ((fileItem: UploadFile) => void) | null,
disable?: boolean,
mode?: "text" | "link" | "ghost" | "default" | "primary" | "dashed",
buttonText?: string,
}
const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
const { headers, action, accept, beforeUpload, onChange, children, customizeItemRender, onRemove } = props;
const { headers, action, accept, beforeUpload, onChange, children, customizeItemRender, onRemove, disable, mode, buttonText } = props;
const hasFileListProps = "fileList" in props;
const [files, setFiles] = useState<UploadFile[]>([]);
const renderFiles = hasFileListProps ? props.fileList : files;
......@@ -50,6 +53,9 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
}
const handleRemove = (fileItem: UploadFile) => {
if (disable) {
return;
}
if(onRemove) {
onRemove(fileItem);
}
......@@ -78,7 +84,11 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
<img className={styles.img} src={pdf_icon} />
<span>{_item.name}</span>
</div>
<DeleteOutlined onClick={() => handleRemove(_item)} />
{
!disable && (
<DeleteOutlined onClick={() => handleRemove(_item)} />
)
}
</div>
</div>
)
......@@ -93,15 +103,20 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
{
!!customizeItemRender ? customizeItemRender(renderFiles, handleRemove) : renderFileItem()
}
<Upload {...uploadProps}>
{
children || (
<Button>
<CloudUploadOutlined /> 上传文件
</Button>
)
}
</Upload>
{
!disable && (
<Upload {...uploadProps}>
{
children || (
<Button type={mode}>
<CloudUploadOutlined /> {buttonText}
</Button>
)
}
</Upload>
)
}
</div>
)
}
......@@ -113,6 +128,9 @@ UploadFiles.defaultProps = {
onChange: (file: UploadChangeParam) => {},
customizeItemRender: null,
onRemove: null,
disable: false,
mode: 'default',
buttonText: '上传文件'
// fileList: []
}
......
.card {
:global {
.ant-table-cell {
padding: 8px 8px;
}
}
}
import React, { useEffect, useState } from 'react';
import { Card, Button } from 'antd';
import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { LinkOutlined, PlusOutlined, SaveOutlined } from '@ant-design/icons';
import { createFormActions } from '@formily/antd';
import {
Input,
ArrayTable,
DatePicker,
FormBlock,
FormItemGrid,
FormLayout
} from '@formily/antd-components'
import ReutrnEle from '@/components/ReturnEle';
import NiceForm from '@/components/NiceForm';
import { evaluateAddSchema } from '../schema/add';
import UploadFiles from '@/components/UploadFiles/UploadFiles';
import { UploadProps, UploadChangeParam, UploadFile } from 'antd/lib/upload/interface'
import FormilyUploadFiles from '@/components/UploadFiles/FormilyUploadFiles';
import FormilyRangeTime from '@/components/RangeTime/FormilyRangeTime';
import moment from 'moment';
import theme from '../../../../../config/lingxi.theme.config';
import styles from './add.less';
const formActions = createFormActions()
const EvaluateAdd = () => {
const [initialValue, setInitialValue] = useState<any>({});
useEffect(() => {
async function init() {
return new Promise<void>((resolve) => {
setTimeout(() => {
setInitialValue({
files: [
{
uid: '3',
name: 'zzz.png',
status: 'error',
response: 'Server Error 500', // custom error message to show
url: 'http://www.baidu.com/zzz.png',
},
],
time: [
moment('2015/01/01', 'YYYY/MM/DD'),
moment('2015/01/08', 'YYYY/MM/DD'),
]
})
resolve()
}, 3000)
})
}
init()
}, [])
const onSubmit = (values: any) => {
console.log(values);
}
const renderAddition = () => (
<div style={{padding: '8px 0', display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center', color: theme["@primary-color"]}}>
<PlusOutlined /> 添加
</div>
)
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
title="新建整改通知单"
extra={
(
<Button
key={1}
type="primary"
icon={<SaveOutlined />}
// loading={submitLoading}
onClick={() => formActions.submit()}
>
保存
</Button>
)
}
>
<Card className={styles.card}>
<NiceForm
editable={true}
onSubmit={onSubmit}
initialValues={initialValue}
schema={evaluateAddSchema}
actions={formActions}
components={{FormilyUploadFiles, FormilyRangeTime, ArrayTable}}
expressionScope={{
renderAddition: renderAddition,
connectMember: (
<div>
<LinkOutlined style={{marginRight: 4}}/>
选择
</div>
),
}}
effects={() => {}}
/>
</Card>
</PageHeaderWrapper>
)
}
export default EvaluateAdd;
import React, { useRef } from 'react';
import { Card, Space, Button } from 'antd';
import { ColumnsType } from 'antd/es/table';
import { StandardTable } from 'god';
import { PlusOutlined } from '@ant-design/icons';
import { createFormActions } from '@formily/antd';
import NiceForm from '@/components/NiceForm';
import { evaluationListSchema } from '../schema';
import { PublicApi } from '@/services/api';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import useEvaluateColumn from '../hooks/useEvaluateColumn';
const formActions = createFormActions();
/**
* 会员咔嚓
*/
interface Iprops {};
/**
* @todo 修改类型
*/
interface InspectionData {
id: number,
/**
* 会员名称
*/
name: string;
/**
* 考察主题
*/
theme: string,
/**
* 考察类型
* 1 => 入库考察, 2 => 真该考察, 3 => 计划考察, 4 => 入库考察
*/
type: number,
/**
* 考察日期
*/
date: number,
/**
* 考察评分
*/
score: number,
/**
* 内部状态
*/
status: 0 | 1,
}
type PaginationParam = {
current: number,
pageSize: number,
}
const MemberEvaluate: React.FC<Iprops> = (props: Iprops) => {
const ref = useRef<any>({});
const { columns } = useEvaluateColumn<InspectionData>([
{
title: '操作',
render: (_text, _record) => (
<Space>
<a>删除</a>
</Space>
)
}
])
const controllerBtns = (
<div>
<Button type="primary">
<PlusOutlined /> 新建
</Button>
<Button>
导入
</Button>
</div>
)
const fetchListData = async (params: PaginationParam & { theme?: string, type?: number }) => {
console.log(params);
return {
totalCount: 0,
data: []
}
}
return (
<Card>
<StandardTable
tableProps={{
rowKey: 'validateId',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
schema={evaluationListSchema}
actions={formActions}
onSubmit={values => ref.current?.reload(values)}
expressionScope={{
controllerBtns,
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
// useAsyncInitSelect(
// ['memberTypeId', 'roleId', 'level', 'source', 'innerStatus', 'outerStatus'],
// fetchSelectOptions,
// );
}}
/>
}
/>
</Card>
)
}
export default MemberEvaluate
import React, { useState } from 'react';
import { ColumnsType } from 'antd/es/table';
/**
* 根据类型获取考评column
*/
function useEvaluateColumn<T extends { [key: string]: any } = any>(mergeColumn?: ColumnsType<T>) {
const defaultColumns: ColumnsType<T> = [
{
title: '考评单号/主题',
dataIndex: 'name',
},
{
title: '会员名称',
dataIndex: 'memberName',
},
{
title: '考评范围',
dataIndex: 'type',
filters: [],
onFilter: (_value, record) => record.type === _value,
},
{
title: '考评完成时间',
dataIndex: 'date',
sorter: (_a, _b) => _a.date - _b.date,
},
{
title: '内部状态',
dataIndex: 'status',
filters: [
{
text: '合格',
value: 1,
},
{
text: '不合格',
value: 0,
},
],
onFilter: (_value, record) => record.type === _value,
},
]
const [columns, setColumns] = useState(() => defaultColumns.concat(mergeColumn));
return {columns}
}
export default useEvaluateColumn
import { ISchema } from '@formily/antd';
import React from 'react';
import styles from '../createEvaluate/add.less';
export const evaluateAddSchema: ISchema = {
type: "object",
properties: {
tabs: {
type: "object",
"x-component": "tab",
// "x-component-props": {
// "defaultActiveKey": "tab-2"
// },
properties: {
"tab-1": {
type: "object",
"x-component": "tabpane",
"x-component-props": {
"tab": "基本信息"
},
properties: {
layout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelCol: 4,
wrapperCol: 10,
labelAlign: 'left'
},
properties: {
theme: {
title: '修改主题',
type: 'string',
'x-rules': [
{
required: true,
message: '请填写修改主题'
},
{
limitByte: true, // 自定义校验规则
maxByte: 60
}
],
'x-component-props': {
placeholder: '最长60个字符,30个汉字'
}
},
memberName: {
title: '会员名称',
type: 'string',
"x-component-props": {
disabled: true,
addonAfter: "{{connectMember}}"
},
// "x-rules": [
// {
// required: true,
// message: '请选择会员名称'
// }
// ],
},
time: {
title: "整改时间",
type: 'object',
"x-component": 'FormilyRangeTime',
"x-rules": [
{
required: true,
message: '请选择时间'
}
],
},
reason: {
type: 'textarea',
title: "整改原因",
"x-rules": [
{
required: true,
message: '请填写整改原因'
}
],
},
require: {
title: '整改要求',
type: 'textarea',
"x-rules": [
{
required: true,
message: '请填写整改原因'
}
],
},
files: {
title: '考察要求附件',
type: 'object',
'x-component': 'FormilyUploadFiles',
}
}
}
}
},
"tab-2": {
type: "object",
"x-component": "tabpane",
"x-component-props": {
"tab": "详细信息"
},
properties: {
// selectProject: {
// type: 'object',
// 'x-component': 'Children',
// 'x-component-props': {
// children: '{{selectProject}}',
// },
// },
"array": {
"type": "array",
"x-component": "arraytable",
"x-component-props": {
// "operationsWidth": 300
// rowClassName: styles.evaluateRow,
operations: false,
renderAddition: "{{renderAddition}}",
},
items: {
type: "object",
properties: {
id: {
title: "序号",
// type: 'Text',
"x-component": 'Text',
"x-component-props": {
style: {
width: 30
},
operations: {
operationsWidth: 30,
width: 30
}
}
// 'x-component': 'Children',
// "x-component": "input",
// "description": "hello world",
},
projectName: {
title: '考评项目',
type: 'string',
"x-component-props": {
operations: {
operationsWidth: 30,
width: 30
}
// operationswidth: 30,
}
},
projectContent: {
title: '考评内容',
type: 'textarea',
"x-component-props": {
style: {
// width: 408,
},
width: 30,
}
},
memberName: {
title: "考评人",
type: 'string'
},
// memberScore: {
// title: "考评人打分",
// type: 'string',
// 'x-component': 'CheckboxGroup',
// enum: []
// },
weight: {
title: '考评权重',
type: 'string',
"x-component-props": {
style: {
width: 80
}
}
},
score1: {
title: '考评计分',
type: 'string',
"x-component-props": {
style: {
width: 80
}
}
},
score: {
title: '考评内容',
"x-component-props": {
style: {
width: 80
}
},
type: 'string'
},
moban: {
title: '考评模板',
type: "object",
'x-component': 'FormilyUploadFiles',
'x-component-props': {
mode: 'link',
buttonText: '上传'
}
},
baogao: {
title: '考评报告',
type: "object",
'x-component': 'FormilyUploadFiles',
'x-component-props': {
mode: 'link',
buttonText: '上传'
}
}
}
}
}
}
},
}
}
}
}
export default evaluateAddSchema;
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
/**
* 会员考评页scheam
*/
export const evaluationListSchema: ISchema = {
type: 'object',
properties: {
mageLayout: {
type: 'object',
'x-component': 'Mega-Layout',
properties: {
topLayout: {
type: 'object',
'x-component': 'Mega-Layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
tip: '输入 会员名称 进行搜索',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'Flex-Layout',
'x-component-props': {
colStyle: {
marginLeft: 20,
},
},
properties: {
memberTypeId: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员类型(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
roleId: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员角色(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
level: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '会员等级(全部)',
allowClear: true,
style: {
width: 160,
},
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
......@@ -14,21 +14,7 @@ import FormilyUploadFiles from '@/components/UploadFiles/FormilyUploadFiles'
const formActions = createFormActions()
const InspectionAdd = () => {
const [fileList, setFileList] = useState<any[]>([ {
uid: '1',
name: 'xxx.png',
status: 'done',
response: 'Server Error 500', // custom error message to show
url: 'http://www.baidu.com/xxx.png',
},]);
const onChange = (file: UploadChangeParam) => {
console.log(file);
setFileList([]);
// setFileList(list)
// const newList = [...fileList];
// newList.push(file);
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......@@ -50,6 +36,7 @@ const InspectionAdd = () => {
>
<Card>
<NiceForm
editable={true}
initialValues={{
files: [
{
......
import React, { useEffect, useState } from 'react';
import { Spin, Card } from 'antd';
import AnchorPage from '@/layouts/AnchorPage';
import theme from '../../../../config/lingxi.theme.config'
interface Iprops {}
const InspectionDetail: React.FC<Iprops> = (props: Iprops) => {
const [inspectInfo, setInspectInfo] = useState<any>({});
const anchorHeader = [
{
key: 'basicInfo',
name: '基本信息',
},
{
key: 'detail',
name: '详细信息',
},
]
const rowStyle = { display: 'flex', FlexDirection: 'row', marginBottom: theme["@margin-xs"] };
const colStyle = { flex: 1 };
const titleStyle = { color: "#909399", fontSize: 12, width: '104px', display: 'inline-block' };
const columnList = {
col1: [
{
title: '考察主题',
dataIndex: 'theme',
},
{
title: '会员名称',
dataIndex: 'memberName',
},
{
title: '考察类型',
dataIndex: 'type'
}
],
col2: [
{
title: '考察日期',
datIndex: 'date'
},
{
title: '考察代表',
dataIndex: 'present'
},
{
title: "考察原因",
dataIndex: 'reason'
}
],
col3: [
{
title: '考察要求附件',
datIndex: 'file',
render: (value?) => {
return (
<div>132</div>
)
}
},
]
}
const detailColumnList = {
col1: [
{
title: '考察评分',
dataIndex: 'score'
},
{
title: '考察结果',
dataIndex: 'result',
}
],
col2: [
{
title: '考察要求附件',
datIndex: 'file',
render: (value?) => {
return (
<div>132</div>
)
}
},
],
col3: [],
}
useEffect(() => {
async function fetchDetail() {
}
}, [])
return (
<Spin spinning={false}>
<AnchorPage
title={`温州市隆昌皮业有限公式`}
anchors={anchorHeader}
// extra={headExtra && headExtra(detailInfo, returnAddress, exchangeAddress)}
>
<Card title="基本信息" id="basicInfo" style={{ marginBottom: theme["@margin-md"] }}>
<div style={{...rowStyle, marginBottom: '0px'}}>
{
Object.keys(columnList).map((_item) => {
return (
<div style={colStyle} key={_item}>
{
columnList[_item].map((_row) => {
return (
<div style={rowStyle} key={_row.dataIndex}>
<span style={titleStyle}>{_row.title}</span>
{
_row.render && (_row.render()) || (<span>温州市隆昌皮业有限公式</span>)
}
</div>
)
})
}
</div>
)
})
}
</div>
</Card>
<Card title="详细信息" id="detail">
<div style={{...rowStyle, marginBottom: '0px'}}>
{
Object.keys(detailColumnList).map((_item) => {
return (
<div style={colStyle} key={_item}>
{
detailColumnList[_item].map((_row) => {
return (
<div style={rowStyle} key={_row.dataIndex}>
<span style={titleStyle}>{_row.title}</span>
{
_row.render && (_row.render()) || (<span>温州市隆昌皮业有限公式</span>)
}
</div>
)
})
}
</div>
)
})
}
</div>
</Card>
</AnchorPage>
</Spin>
)
}
export default InspectionDetail
......@@ -118,6 +118,12 @@ const MemberInspection: React.FC<Iprops> = (props: Iprops) => {
const fetchListData = async (params: PaginationParam & { theme?: string, type?: number }) => {
console.log(params);
// return [];
// const res = await PublicApi.getMemberAbilitySubPage(params)
// if (res.code === 1000) {
// return res.data;
// }
return [];
}
......@@ -134,7 +140,7 @@ const MemberInspection: React.FC<Iprops> = (props: Iprops) => {
<NiceForm
schema={inspectionListSchema}
actions={formActions}
onSubmit={values => ref.current?.reload(values)}
onSubmit={values => ref.current?.reload({...values, hello: 'world' })}
expressionScope={{
controllerBtns,
}}
......
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