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

fix:

parents 2f3b9f57 0604d4ac
......@@ -14,10 +14,10 @@ const router = {
component: '@/pages/trademark/trademarkSearch',
},
{
path: '/trademark/trademarkSearch/checkBrand',
path: '/trademark/trademarkWillCheck/checkBrand',
name: 'checkBrand',
hideInMenu: true,
component: '@/pages/trademark/trademarkSearch/checkBrand',
component: '@/pages/trademark/trademarkWillCheck/checkBrand',
},
{
path: '/trademark/trademarkSearch/viewBrand',
......
......@@ -20,9 +20,9 @@ const router = {
hideInMenu: true,
},
{
path: '/commodity/products/checkProducts',
path: '/commodity/productWillCheck/checkProducts',
name: 'checkProducts',
component: '@/pages/commodity/products/checkProducts',
component: '@/pages/commodity/productWillCheck/checkProducts',
hideInMenu: true,
},
{
......
......@@ -40,7 +40,7 @@
"braft-editor": "^2.3.9",
"classnames": "^2.2.6",
"core-js": "^3.6.5",
"god": "^0.1.28",
"god": "0.1.28",
"lingxi-design": "^1.0.7",
"lingxi-design-ui": "^1.1.0",
"lingxi-editor-core": "^1.0.6",
......
......@@ -2,17 +2,26 @@ import React, { ReactText, useRef, useEffect } from 'react'
import {StandardTable} from 'god'
import { IStandardTableProps } from 'god/dist/src/standard-table'
import { Row, Col, Modal } from 'antd'
import { productModalSchema, productModalByMemberSchema, memberModalSchema, inquirySchema, demandSchema,enquirySchema, mergeOrderSchema } from './schema'
import Search from '../NiceForm/components/Search'
import SearchSelect from '../NiceForm/components/SearchSelect'
import Submit from '../NiceForm/components/Submit'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import DateSelect from '../NiceForm/components/DateSelect'
export interface ModalTableProps extends IStandardTableProps<any> {
width?: number,
modalTitle?: ReactText,
confirm?(),
cancel?(),
visible?: boolean
visible?: boolean,
resetModal?: object,
modalType?: 'productByDefault' | 'productByMember' | 'memberByDefault' | 'inquiryByDefault' | 'demandByDefault' | 'enquiryModel' | 'MergeOrderByDefault' | 'none'
}
const ModalTable:React.FC<ModalTableProps> = (props) => {
const { width = 704, modalTitle, confirm, cancel, visible, currentRef, ...resetTable } = props
const { width = 704,modalTitle, confirm, cancel, visible, currentRef, resetModal, modalType = 'none', ...resetTable } = props
const selfRef = currentRef || useRef<any>({})
useEffect(() => {
if (visible) {
......@@ -24,6 +33,39 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
})
}
}, [visible, selfRef.current])
const modelSchemaRender = () => {
switch (modalType) {
case 'productByDefault': {
return productModalSchema
}
case 'productByMember': {
return productModalByMemberSchema
}
case 'memberByDefault': {
return memberModalSchema
}
case 'inquiryByDefault': {
return inquirySchema
}
case 'enquiryModel':{
return enquirySchema
}
case 'demandByDefault': {
return demandSchema
}
case 'MergeOrderByDefault': {
return mergeOrderSchema
}
case 'none': {
return {}
}
}
}
return (
<Modal
width={width}
......@@ -31,14 +73,31 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
onOk={confirm}
onCancel={cancel}
visible={visible}
{...resetModal}
>
<StandardTable
tableType='small'
currentRef={selfRef}
formRender={(child, ps) => <Row justify='space-between'>
<Col>{child}</Col>
<Col span={18}>{child}</Col>
<Col style={{marginTop: 4}}>{ps}</Col>
</Row>}
formilyProps={
modalType === 'none' ? null : {
ctx: {
schema: modelSchemaRender(),
components: { ModalSearch: Search, SearchSelect, Submit, DateSelect } ,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
}
}
}
}
{...resetTable}
>
</StandardTable>
......
This diff is collapsed.
......@@ -163,7 +163,6 @@ const viewProducts: React.FC<{}> = () => {
let dataByTab = groupBy(archiveByAttributeGroup, 'groupName')
setDataByTab(Object.values(dataByTab))
setDataByTabTitle(Object.keys(dataByTab))
console.log(dataByTab,'dataByData')
}
/* 按属性归类 */
......
......@@ -148,7 +148,7 @@ const Products: React.FC<{}> = () => {
render: (text: any, record: any) => {
return (
<>
<Button type='link' onClick={() => history.push(`/commodity/products/checkProducts?id=${record.id}`)}>审核</Button>
<Button type='link' onClick={() => history.push(`/commodity/productWillCheck/checkProducts?id=${record.id}`)}>审核</Button>
</>
)
}
......
......@@ -9,7 +9,6 @@ import {
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import moment from 'moment'
// import styles from "./index.less"
import { PublicApi } from '@/services/api'
import EyePreview from '@/components/EyePreview'
......
......@@ -156,6 +156,7 @@ const CheckBrand: React.FC<{}> = () => {
const handleOK = () => {
checkForm.validateFields().then(values => {
//@ts-ignore
PublicApi.postProductBrandCheckBrand({ id: brandInfo?.id, ...values }).then(res=>{
if(res.code=1000){
handleCancel()
......
......@@ -80,7 +80,7 @@ const Trademark: React.FC<{}> = () => {
render: (text: any, record: any) => {
return (
<>
<Button type='link' onClick={()=> history.push(`/trademark/trademarkSearch/checkBrand?id=${record.id}`)}>审核</Button>
<Button type='link' onClick={()=> history.push(`/trademark/trademarkWillCheck/checkBrand?id=${record.id}`)}>审核</Button>
</>
)
}
......
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