Commit 221da183 authored by Bill's avatar Bill

Merge branch 'dev' into test

parents 9ac4a889 ba817cdb
/* /*
* @Author: Bill * @Author: Bill
* @Date: 2020-10-12 09:45:20 * @Date: 2020-10-12 09:45:20
* @LastEditTime: 2020-10-12 16:48:05 * @LastEditTime: 2020-10-15 10:18:54
* @Description: 加工能力路由 * @Description: 加工能力路由
*/ */
...@@ -22,21 +22,21 @@ const HandlingRoute = { ...@@ -22,21 +22,21 @@ const HandlingRoute = {
{ {
path: '/memberCenter/handling/assign/All', path: '/memberCenter/handling/assign/All',
name: 'assignProductionAll', name: 'assignProductionAll',
key: 'assignProductionAll', icon: 'smile',
component: '@/pages/handling/assign/all', component: '@/pages/handling/assign/all',
}, },
// 指派生产通知单 -> 待新增生产通知单 // 指派生产通知单 -> 待新增生产通知单
{ {
path: '/memberCenter/handling/assign/ToBeAdd', path: '/memberCenter/handling/assign/ToBeAdd',
name: 'assignProductionToBeAdd', name: 'assignProductionToBeAdd',
key: 'assignProductionToBeAdd', icon: 'smile',
component: '@/pages/handling/assign/tobeAdd' component: '@/pages/handling/assign/tobeAdd'
}, },
// 指派生产通知单 -> 新增成产通知单(新建) // 指派生产通知单 -> 新增成产通知单(新建)
{ {
path: '/memberCenter/handling/assign/add', path: '/memberCenter/handling/assign/add',
name: 'assignProductionAdd', name: 'assignProductionAdd',
key: 'assignProductionAdd', icon: 'smile',
component: '@/pages/handling/assign/add', component: '@/pages/handling/assign/add',
// hideInMenu: true // hideInMenu: true
}, },
...@@ -44,9 +44,16 @@ const HandlingRoute = { ...@@ -44,9 +44,16 @@ const HandlingRoute = {
{ {
path: '/memberCenter/handling/assign/detail', path: '/memberCenter/handling/assign/detail',
name: 'assignProductionDetail', name: 'assignProductionDetail',
key: 'assignProductionDetail', icon: 'smile',
component: '@/pages/handling/assign/detail' component: '@/pages/handling/assign/detail'
} },
// 指派生产通知单 -> 待审核通知单(一级)
// {
// path: '/memberCenter/handling/assign/examineFirst',
// name: 'examineFirst',
// icon: 'smile',
// component: '@/page/'
// }
] ]
} }
......
...@@ -270,6 +270,62 @@ const TranactionRoute = { ...@@ -270,6 +270,62 @@ const TranactionRoute = {
] ]
}, },
/** /**
* @description: 商品询价
* @param {type}
* @return {type}
*/
{
path:'/memberCenter/tranactionAbility/goodsOffer',
name:'goodsOffer',
key:'goodsOffer',
routes:[
// 询价单查询
{
path: '/memberCenter/tranactionAbility/goodsOffer/enquiryOrder',
name: 'enquiryOrder',
component: '@/pages/transaction/goodsOffer/enquiryOrder'
},
// 待新增询价单
{
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder',
name: 'addEnquiryOrder',
component: '@/pages/transaction/goodsOffer/addEnquiryOrder'
},
// 新建报价单
{
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/add',
name: 'add',
hideInMenu: true,
component: '@/pages/transaction/goodsOffer/addEnquiryOrder/add'
},
// 待审核询价单(一级)
{
path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewOne',
name: 'pendingReviewOne',
component: '@/pages/transaction/goodsOffer/pendingReviewOne'
},
// 待审核询价单(二级)
{
path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewTwo',
name: 'pendingReviewTwo',
component: '@/pages/transaction/goodsOffer/pendingReviewTwo'
},
// 待提交询价单
{
path: '/memberCenter/tranactionAbility/goodsOffer/pendingSubmit',
name: 'pendingSubmit',
component: '@/pages/transaction/goodsOffer/pendingSubmit'
},
// 详情
{
path: '/memberCenter/tranactionAbility/goodsOffer/components/details',
name: 'details',
hideInMenu: true,
component: '@/pages/transaction/goodsOffer/components/details'
}
]
},
/**
* @description: 询价报价 * @description: 询价报价
* @param {type} * @param {type}
* @return {type} * @return {type}
...@@ -310,62 +366,61 @@ const TranactionRoute = { ...@@ -310,62 +366,61 @@ const TranactionRoute = {
hideInMenu: true, hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/components/details' component: '@/pages/transaction/inquiryQuote/components/details'
}, },
// 待提交报价单
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingSubmit',
name: 'pendingSubmit',
component: '@/pages/transaction/inquiryQuote/pendingSubmit'
},
] ]
}, },
/** /**
* @description: 商品询 * @description: 确认询价报
* @param {type} * @param {type}
* @return {type} * @return {type}
*/ */
{ {
path:'/memberCenter/tranactionAbility/goodsOffer', path:'/memberCenter/tranactionAbility/confirmInquiryQuote',
name:'goodsOffer', name:'confirmInquiryQuote',
key:'goodsOffer', key:'confirmInquiryQuote',
routes:[ routes: [
// 询价单查询 // 报价单查询
{
path: '/memberCenter/tranactionAbility/goodsOffer/enquiryOrder',
name: 'enquiryOrder',
component: '@/pages/transaction/goodsOffer/enquiryOrder'
},
// 待新增询价单
{ {
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder', path: '/memberCenter/tranactionAbility/confirmInquiryQuote/quoteOrder',
name: 'addEnquiryOrder', name: 'quoteOrder',
component: '@/pages/transaction/goodsOffer/addEnquiryOrder' component: '@/pages/transaction/confirmInquiryQuote/quoteOrder'
}, },
// 新建报价单 // 待提交审核报价单
{ {
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/add', path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmitReview',
name: 'add', name: 'pendingSubmitReview',
hideInMenu: true, component: '@/pages/transaction/confirmInquiryQuote/pendingSubmitReview'
component: '@/pages/transaction/goodsOffer/addEnquiryOrder/add'
}, },
// 待审核询价单(一级) // 待审核询价单(一级)
{ {
path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewOne', path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewOne',
name: 'pendingReviewOne', name: 'pendingReviewOne',
component: '@/pages/transaction/goodsOffer/pendingReviewOne' component: '@/pages/transaction/confirmInquiryQuote/pendingReviewOne'
}, },
// 待审核询价单(二级) // 待审核询价单(二级)
{ {
path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewTwo', path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingReviewTwo',
name: 'pendingReviewTwo', name: 'pendingReviewTwo',
component: '@/pages/transaction/goodsOffer/pendingReviewTwo' component: '@/pages/transaction/confirmInquiryQuote/pendingReviewTwo'
},
// 待提交询价单
{
path: '/memberCenter/tranactionAbility/goodsOffer/pendingSubmit',
name: 'pendingSubmit',
component: '@/pages/transaction/goodsOffer/pendingSubmit'
}, },
// 详情 // 详情
{ {
path: '/memberCenter/tranactionAbility/goodsOffer/components/details', path: '/memberCenter/tranactionAbility/confirmInquiryQuote/components/details',
name: 'details', name: 'details',
hideInMenu: true, hideInMenu: true,
component: '@/pages/transaction/goodsOffer/components/details' component: '@/pages/transaction/confirmInquiryQuote/components/details'
} },
// 待提交报价单
{
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmit',
name: 'pendingSubmit',
component: '@/pages/transaction/confirmInquiryQuote/pendingSubmit'
},
] ]
}, },
// 采购订单 // 采购订单
......
...@@ -120,16 +120,24 @@ export default { ...@@ -120,16 +120,24 @@ export default {
'menu.tranactionAbility.electronicContracts.classSearch': '合同模板参数查询', 'menu.tranactionAbility.electronicContracts.classSearch': '合同模板参数查询',
'menu.tranactionAbility.electronicContracts.template': '合同模板', 'menu.tranactionAbility.electronicContracts.template': '合同模板',
'menu.tranactionAbility.electronicContracts.addContract': '新建合同模板', 'menu.tranactionAbility.electronicContracts.addContract': '新建合同模板',
// 询价报价 // 确认询价报价
'menu.tranactionAbility.confirmInquiryQuote': '确认询价报价',
'menu.tranactionAbility.confirmInquiryQuote.quoteOrder': '报价单查询',
'menu.tranactionAbility.confirmInquiryQuote.details': '新建询价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmitReview': '待提交审核报价单',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewOne': '待审核询价单(一级)',
'menu.tranactionAbility.confirmInquiryQuote.pendingReviewTwo': '待审核询价单(二级)',
'menu.tranactionAbility.confirmInquiryQuote.pendingSubmit': '待提交询价单',
// 商品询价
'menu.tranactionAbility.goodsOffer': '商品询价', 'menu.tranactionAbility.goodsOffer': '商品询价',
'menu.tranactionAbility.goodsOffer.enquiryOrder': '询价单查询', 'menu.tranactionAbility.goodsOffer.enquiryOrder': '询价单查询',
'menu.tranactionAbility.goodsOffer.addEnquiryOrder': '待新增价单', 'menu.tranactionAbility.goodsOffer.addEnquiryOrder': '待新增价单',
'menu.tranactionAbility.goodsOffer.add': '新建价单', 'menu.tranactionAbility.goodsOffer.add': '新建价单',
'menu.tranactionAbility.goodsOffer.details': '新建询价单', 'menu.tranactionAbility.goodsOffer.details': '新建询价单',
'menu.tranactionAbility.goodsOffer.pendingReviewOne': '待审核价单(一级)', 'menu.tranactionAbility.goodsOffer.pendingReviewOne': '待审核价单(一级)',
'menu.tranactionAbility.goodsOffer.pendingReviewTwo': '待审核价单(二级)', 'menu.tranactionAbility.goodsOffer.pendingReviewTwo': '待审核价单(二级)',
'menu.tranactionAbility.goodsOffer.pendingSubmit': '待提交价单', 'menu.tranactionAbility.goodsOffer.pendingSubmit': '待提交价单',
// 商品询 // 询价报
'menu.tranactionAbility.inquiryQuote': '询价报价', 'menu.tranactionAbility.inquiryQuote': '询价报价',
'menu.tranactionAbility.inquiryQuote.enquiryOrder': '询价单查询', 'menu.tranactionAbility.inquiryQuote.enquiryOrder': '询价单查询',
'menu.tranactionAbility.inquiryQuote.quoteOrder': '报价单查询', 'menu.tranactionAbility.inquiryQuote.quoteOrder': '报价单查询',
......
import React, { useState } from 'react'; import React, { useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { SaveOutlined } from '@ant-design/icons'; import { SaveOutlined } from '@ant-design/icons';
import { Button, Card, Input, Modal } from 'antd'; import { Button, Card, Select, DatePicker } from 'antd';
import { history } from 'umi'; import { history } from 'umi';
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd'; import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
...@@ -10,50 +10,44 @@ import addSchema from '../../schema/addSchema'; ...@@ -10,50 +10,44 @@ import addSchema from '../../schema/addSchema';
import { LinkOutlined, PlusOutlined } from '@ant-design/icons'; import { LinkOutlined, PlusOutlined } from '@ant-design/icons';
import ModalContainer from '../../components/ModalContainer'; import ModalContainer from '../../components/ModalContainer';
import EnterPrise from '../../components/EnterPrise'; import EnterPrise from '../../components/EnterPrise';
import ProcessProducts from '../../components/ProcessProducts';
import {WrapUploadFile} from '../../components/UploadFile';
/* /*
* @Author: Bill * @Author: Bill
* @Date: 2020-10-12 11:36:38 * @Date: 2020-10-12 11:36:38
* @Description: 新增生产通知单 * @Description: 新增生产通知单
*/ */
const CustomModal = ({visible, cancel}) => {
return (
<Modal visible={visible} onCancel={cancel} >
Hello World
</Modal>
)
}
const formActions = createFormActions(); const formActions = createFormActions();
const Add: React.FC<{}> = () => { const Add: React.FC<{}> = () => {
const [submitLoading, setSubmitLoading] = useState<boolean>(false); const [submitLoading, setSubmitLoading] = useState<boolean>(false);
// 加工企业
const [modalEnterPriseVisible, setEnterPriseModalVisible] = useState<boolean>(false);
// 加工商品
const [modalProducVisible, setModalProductVisible] = useState<boolean>(false);
// 选择加工企业 modal 层 // 选择加工企业 modal 层
const connectProduct = ( const connectProduct = (
<div> <div>
<ModalContainer> <div onClick={() => setEnterPriseModalVisible(true)} >
{
({visible, show, cancel}) => (
<>
<EnterPrise visible={visible} cancel={cancel} ></EnterPrise>
<div onClick={show}>
<LinkOutlined style={{marginRight: 4}}/> <LinkOutlined style={{marginRight: 4}}/>
选择 选择
</div> </div>
</>
)
}
</ModalContainer>
</div> </div>
) )
const tableAddButton = ( const tableAddButton = (
<div>
<Button <Button
onClick={() => setModalProductVisible(true)}
style={{marginBottom: 16}} style={{marginBottom: 16}}
block block
icon={<PlusOutlined/>} icon={<PlusOutlined/>}
type='dashed' type='dashed'
>选择指定会员</Button> >
选择指定会员
</Button>
</div>
) )
return ( return (
...@@ -75,23 +69,25 @@ const Add: React.FC<{}> = () => { ...@@ -75,23 +69,25 @@ const Add: React.FC<{}> = () => {
> >
<Card> <Card>
<NiceForm <NiceForm
// onSubmit={handleSubmit}
schema={addSchema} schema={addSchema}
actions={formActions} actions={formActions}
components={{WrapUploadFile, DatePicker, Select}}
expressionScope={{ expressionScope={{
connectProduct, connectProduct,
tableAddButton tableAddButton
}} }}
// effects={($, actions) => {
// onFormInputChange$().subscribe(() => {
// if (!unsaved) {
// setUnsaved(true);
// }
// });
// }}
/>
/>
{/* 加工企业 Modal 框 */}
<EnterPrise
visible={modalEnterPriseVisible}
cancel={() => setEnterPriseModalVisible(false)}
></EnterPrise>
{/* 加工商品Modal框 */}
<ProcessProducts
visible={modalProducVisible}
cancel={() => setModalProductVisible(false)}
></ProcessProducts>
</Card> </Card>
</PageHeaderWrapper> </PageHeaderWrapper>
) )
......
...@@ -91,6 +91,7 @@ const Detail: React.FC<{}> = () => { ...@@ -91,6 +91,7 @@ const Detail: React.FC<{}> = () => {
</Tabs> </Tabs>
</Card> </Card>
</div> </div>
<ProcessDetail />
</PageHeaderWrapper> </PageHeaderWrapper>
) )
} }
......
/** import React, { useState } from 'react';
* 选择加工企业 Modal 组件 import { Modal} from 'antd';
*/
import React, { useRef, useEffect } from 'react';
import { Card, Space, Button, Select } from 'antd';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'; import { BasicForm, TablePagination, SearchForm } from '../ModalForTable'
import { createFormActions, FormEffectHooks } from '@formily/antd'; import { createFormActions } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import processProductSchema from '../../schema/processProductSchema';
import ModalTable from '@/components/ModalTable'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
const formActions = createFormActions();
const actions = createFormActions();
const columns = [ const columns = [
{ {
title: '会员ID', title: '会员ID',
...@@ -39,99 +30,50 @@ const columns = [ ...@@ -39,99 +30,50 @@ const columns = [
} }
] ]
const schema = { const tableSchema = {
type: 'object', table: {
properties: { type: "object",
name: { name: "table",
type: 'string', "x-component": "Table",
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入会员名字',
align: 'flex-left',
style: {
width: '180px'
}
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
roleId: {
type: 'string',
"x-component": 'Select',
"x-component-props": { "x-component-props": {
options: [], "columns": columns,
style: {width: '160px'}, "rowKey": "id",
placeholder: '请选择会员角色' "pagination":false,
"rowSelection": "{{rowSelection}}"
} }
}, },
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
} }
const schema = processProductSchema(tableSchema);
const EnterPrisesModal = ({visible, cancel}) => { const EnterPrise = ({visible, cancel, ...restProps}) => {
const ref = useRef<any>({}) const [selectRow, setSelectRow] = useState({});
const fetchData = async (params: any) => { const fetchData = async (params: any) => {
let res = await PublicApi.getMemberAbilityInfoPage(params); let res = await PublicApi.getMemberAbilityInfoPage(params);
return res.data; return res.data;
}; };
const handleOkAddMember = () => { const rowSelection = {
onSelect: (record, selectRow, selected) => {
setSelectRow(record);
}
} }
return ( return (
<ModalTable <Modal
modalTitle='选择会员' title="选择加工商品"
confirm={handleOkAddMember} width={704}
cancel={cancel}
visible={visible} visible={visible}
columns={columns} onCancel={cancel}
// rowSelection={memberRowSelection} >
fetchTableData={params => fetchData(params)} <SearchForm
formilyProps={ schema={schema}
{ actions={actions}
ctx: { expressionScope={{rowSelection: rowSelection}}
schema: schema, ></SearchForm>
components: { ModalSearch: Search, SearchSelect, Submit, Select } ,
effects: ($, actions) => { </Modal>
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
}
}
}
}
tableProps={{
rowKey: 'memberId'
}}
/>
) )
} }
export default EnterPrisesModal
\ No newline at end of file export default EnterPrise
\ No newline at end of file
import React from 'react';
import {
SchemaForm,
registerVirtualBox,
SchemaField,
} from '@formily/antd';
import { Row, Col } from 'antd';
const renderCol = (schema) => {
const { flexcol = {}, } = schema && schema['x-component-props'] || {};
const flexProps = schema['x-flex-props'] || {}
return <Col {...flexcol} {...flexProps} key={schema.path}>
<SchemaField schema={schema.toJSON()} path={schema.path}/>
</Col>
}
registerVirtualBox('CustomFlexRowLayout', (props) => {
const schemaProps = props;
const childProperties = schemaProps.schema && schemaProps.schema.getOrderProperties() || [];
const { justify = "start", align = "top" } = schemaProps && schemaProps.props && schemaProps.props['x-component-props'] || {}
return (
<Row justify={justify} align={align}>
{
childProperties.map((v, i, arr) => renderCol(v.schema))
}
</Row>
)
})
const FlexColumnLayoutStyle = {
'display': 'flex',
'flexDirection': 'column'
}
registerVirtualBox('CustomFlexColumnLayout', (props) => {
const schemaProps = props;
const childProperties = schemaProps.schema && schemaProps.schema.getOrderProperties() || [];
const { style } = schemaProps && schemaProps.props && schemaProps.props['x-component-props'] || {};
return (
<div style={{...FlexColumnLayoutStyle, ...style}}>
{
childProperties.map((v) => {
const { flexCol = {} } = v.schema && v.schema['x-component-props'] || {};
return (
<div {...flexCol} key={v.schema.path}>
<SchemaField schema={v.schema.toJSON()} path={v.schema.path}/>
</div>
)
})
}
</div>
)
})
const SearchForm = (props) => {
const { actions, schema, components, ...rest } = props;
return (
<div>
<SchemaForm
components={components}
actions={actions}
schema={schema}
{...rest}
>
</SchemaForm>
</div>
)
}
export default SearchForm;
\ No newline at end of file
import React from 'react';
import BasicForm from './BasicForm'
import TablePagination from './TablePagination';
import { createVirtualBox, createFormActions, FormEffectHooks, createEffectHook } from '@formily/antd';
import { UpOutlined, DownOutlined } from '@ant-design/icons'
import { Select, Input, Button, Table } from 'antd';
const Search = Input.Search;
const { onFormInit$, onFieldValueChange$ } = FormEffectHooks
const actions = createFormActions();
const SearchForm = (props) => {
const { schema, components, actions, effects, expressionScope } = props;
const effectInstance = () => () => {
onFormInit$().subscribe(() => {
actions.setFieldState('FILTERS', state => {
state.visible = false;
})
})
onFieldValueChange$('pagination').subscribe((state) => {
// handleSearch({...state.value})
})
!!effects && effects();
}
return (
<BasicForm
schema={schema}
components={{Select, Input, Button, Search, TablePagination, Table, ...components}}
actions={actions}
effects={effectInstance()}
expressionScope={{
HIGHT_FILTER_BTN: (
<div>高级搜索 <DownOutlined /></div>
),
reset: () => {
},
search: (value) => {
},
toggleFilters: () => {
actions.setFieldState('FILTERS', state => {
const visible = !state.visible;
state.visible = visible;
actions.setFieldState('HIGHT_FILTER_BTN', (state) => {
//@ts-ignore
state.props['x-component-props'].children = (
<div>高级搜索 {visible ? <UpOutlined /> : <DownOutlined /> }</div>
)
})
});
},
...expressionScope
}}
></BasicForm>
)
}
export default SearchForm
\ No newline at end of file
import React from 'react';
import { Pagination } from 'antd';
const TablePagination = (props) => {
const componentProps = props.props["x-component-props"];
const total = componentProps.total;
const parentStyle = props.props['x-style'];
const handleChange = (page, pageSize) => {
props.mutators.change({current: page, pageSize});
}
return (
<div style={parentStyle}>
<Pagination {...componentProps} current={props.value?.current || 1} onChange={handleChange} ></Pagination>
</div>
)
}
TablePagination.isFieldComponent = true
export default TablePagination
\ No newline at end of file
import React from 'react';
import { Modal } from 'antd';
const WrapModal = () => {
return (
<div></div>
)
}
export default WrapModal;
\ No newline at end of file
import BasicForm from './BasicForm';
import TablePagination from './TablePagination';
import SearchForm from './SearchForm';
export {
BasicForm,
TablePagination,
SearchForm
}
\ No newline at end of file
import React, { useState } from 'react';
import { Modal} from 'antd';
import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview';
import { BasicForm, TablePagination, SearchForm } from '../ModalForTable'
import { createFormActions } from '@formily/antd';
import processProductSchema from '../../schema/processProductSchema';
const actions = createFormActions();
const columns = [
{
title: '会员ID',
dataIndex: 'id'
},
{
title: '会员名称',
dataIndex: 'name'
},
{
title: '会员类型',
dataIndex: 'type'
},
{
title: '会员角色',
dataIndex: 'role'
},
{
title: '会员等级',
dataIndex: 'level'
}
]
const tableSchema = {
table: {
type: "object",
name: "table",
"x-component": "Table",
"x-component-props": {
"columns": columns,
"rowKey": "id",
"pagination":false,
"rowSelection": "{{rowSelection}}"
}
},
}
const schema = processProductSchema(tableSchema);
const ProcessProducts = ({visible, cancel, ...restProps}) => {
const [selectRow, setSelectRow] = useState({});
const fetchData = async (params: any) => {
let res = await PublicApi.getMemberAbilityInfoPage(params);
return res.data;
};
const rowSelection = {
onSelect: (record, selectRow, selected) => {
setSelectRow(record);
}
}
return (
<Modal
title="选择加工商品"
width={704}
visible={visible}
onCancel={cancel}
>
<SearchForm
schema={schema}
actions={actions}
expressionScope={{rowSelection: rowSelection}}
></SearchForm>
</Modal>
)
}
export default ProcessProducts
\ No newline at end of file
import React, { useState } from 'react';
import styles from './index.less';
import { Upload, Button, message } from 'antd';
import { DeleteOutlined, UploadOutlined } from '@ant-design/icons'
import { UPLOAD_TYPE } from '@/constants'
import pdf_icon from '@/assets/imgs/pdf_icon.png';
const UploadFile = (props) => {
const { fileList = [], onChange, fileMaxSize = 20 } = props
const [loading, setLoading] = useState<boolean>(false)
const beforeUpload = (file) => {
const isSizeLimit = file.size / 1024 < fileMaxSize;
if (!isSizeLimit) {
message.error(`上传文件不超过${fileMaxSize}K!`);
}
return isSizeLimit;
}
const uploadProps = {
name: 'file',
action: '/api/file/file/upload',
headers: {},
data: {
fileType: UPLOAD_TYPE
},
disabled: loading,
showUploadList: false,
onChange(info) {
if (info.file.status === 'uploading') {
setLoading(true)
return;
}
if (info.file.status === 'done') {
// 图片回显
const { code, data } = info.file.response
if (code === 1000) {
console.log('upload success')
const temp = fileList.push(data);
onChange(temp)
}
setLoading(false)
}
},
beforeUpload
};
const removeFile = (key) => {
const res = fileList.filter((item) => item != key);
console.log(res);
onChange(res);
}
return (
<div className={styles.upload_file_container}>
<div className={styles.fileList}>
{
fileList.map((item, key) => {
return (
<div className={styles.item} key={item}>
<div className={styles.icon}>
<img src={pdf_icon} className={styles.img} />
</div>
<div className={styles.fileName}>交付要求</div>
<div className={styles.remove} onClick={() => removeFile(item)}>
<DeleteOutlined />
</div>
</div>
)
})
}
</div>
<Upload {...uploadProps}>
<Button icon={<UploadOutlined />} loading={loading}>上传文件</Button>
</Upload>
<div className={styles.tips}>一次上传一个文件,每个附件大小不能超过{fileMaxSize}M</div>
</div>
)
}
export default UploadFile;
\ No newline at end of file
import UploadFile from './UploadFile';
const WrapUpload = (props) => {
const { mutators } = props
const uploadProps = props.props['x-component-props'] || {}
console.log(props.value);
return (
<UploadFile
fileList = {props.value}
onChange={data => {
// 这里能拿到change后的data值
mutators.change(data)
}}
{...uploadProps}
/>
)
}
WrapUpload.isFieldComponent = true
export default WrapUpload
\ No newline at end of file
.upload_file_container {
display: flex;
flex-direction: column;
.fileList {
display: flex;
flex-direction: column;
.item {
display: flex;
flex-direction: row;
align-items: center;
background-color: #F4F5F7;
padding: 5px 10px;
margin-bottom: 10px;
border-radius: 4px;
cursor: pointer;
.icon {
width: 20px;
height: 20px;
display: flex;
margin-right: 10px;
.img {
width: 100%;
height: 100%;
}
}
.fileName {
color: @main-color;
font-size: 14px;
}
.remove {
margin-left: auto;
}
}
}
.tips {
color: #909399;
font-size: 12px;
}
}
\ No newline at end of file
import UploadFile from './UploadFile';
import WrapUploadFile from './WrapUploadFile';
export {
UploadFile,
WrapUploadFile
}
\ No newline at end of file
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-10-12 13:37:06 * @Date: 2020-10-12 13:37:06
* @LastEditTime: 2020-10-12 16:04:41 * @LastEditTime: 2020-10-14 17:05:52
* @Description: 新建生产通知单 schema * @Description: 新建生产通知单 schema
*/ */
const basicTab = {
'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: 8,
labelAlign: 'left'
},
properties: {
desc: {
title: '通知单摘要',
type: 'string',
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 60
}
],
'x-component-props': {
placeholder: '最长60个字符,30个汉字'
}
},
handleBusiness: {
type: 'string',
title: '加工企业',
"x-component-props": {
disabled: true,
addonAfter: "{{connectProduct}}"
},
"x-rules": [
{
required: true,
message: '请选择商品'
}
],
},
source: {
type: 'radio',
title: '通知单来源',
required: true,
enum: [
{
label: '订单加工',
value: 1
},
{
label: '商品加工',
value: 2
}
],
default: 1
},
time: {
type: 'string',
title: '交期',
'x-component': 'DatePicker',
'x-rules': [
{
required: true,
message: '请选择交期'
}
]
},
method: {
type: 'string',
title: '配送方式',
'x-component': 'Select',
'x-component-props': {
options: [
{label: '物流', value: 1},
{label: '自提', value: 2}
]
},
'x-rules': [
{
required: true,
message: '请选择物流方式'
}
]
},
address: {
type: 'string',
title: '收货地址',
'x-component': 'Select',
'x-rules': [
{
required: true,
message: '请选择收货地址'
}
]
},
docNo: {
type: 'string',
title: '通知单号',
'x-component': 'Text'
},
docTime: {
type: 'string',
title: '单据时间',
'x-component': 'Text'
},
status: {
type: 'string',
title: '外部状态',
'x-component': 'Text',
'x-component-props': {
children: '待提交通知单'
}
},
status2: {
type: 'string',
title: '内部状态',
'x-component': 'Text',
'x-component-props': {
children: '待提交审核'
}
}
}
}
}
}
}
/** /**
* 通知单明细 * 通知单明细
*/ */
...@@ -21,7 +153,7 @@ const detailTab = { ...@@ -21,7 +153,7 @@ const detailTab = {
'x-component': 'mega-layout', 'x-component': 'mega-layout',
'x-component-props': { 'x-component-props': {
labelCol: 4, labelCol: 4,
wrapperCol: 8, wrapperCol: 24,
labelAlign: 'left' labelAlign: 'left'
}, },
properties: { properties: {
...@@ -67,7 +199,7 @@ const otherRequired = { ...@@ -67,7 +199,7 @@ const otherRequired = {
type: 'object', type: 'object',
'x-component': 'tabpane', 'x-component': 'tabpane',
'x-component-props': { 'x-component-props': {
tab: '通知单明细' tab: '其他要求'
}, },
properties: { properties: {
layout: { layout: {
...@@ -161,8 +293,11 @@ const enclosure = { ...@@ -161,8 +293,11 @@ const enclosure = {
}, },
properties: { properties: {
enclosure: { enclosure: {
type: 'string', type: 'object',
title: '附件', title: '附件',
'x-component': 'WrapUploadFile',
'x-component-props': {
}
} }
} }
} }
...@@ -194,92 +329,7 @@ const addSchema = { ...@@ -194,92 +329,7 @@ const addSchema = {
type: 'card' type: 'card'
}, },
properties: { properties: {
'tab-1': { ...basicTab,
type: 'object',
'x-component': 'tabpane',
'x-component-props': {
'tab': '基本信息'
},
properties: {
layout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelCol: 4,
wrapperCol: 8,
labelAlign: 'left'
},
properties: {
desc: {
title: '通知单摘要',
type: 'string',
'x-rules': [
{
limitByte: true, // 自定义校验规则
maxByte: 60
}
],
'x-component-props': {
placeholder: '最长60个字符,30个汉字'
}
},
handleBusiness: {
type: 'string',
title: '加工企业',
"x-mega-props": {
full: true
},
"x-component-props": {
disabled: true,
addonAfter: "{{connectProduct}}"
},
"x-rules": [
{
required: true,
message: '请选择商品'
}
],
},
source: {
type: 'radio',
title: '通知单来源',
required: true,
enum: [
{
label: '订单加工',
value: 1
},
{
label: '商品加工',
value: 2
}
],
default: 1
},
no: {
type: 'string',
title: '通知单号',
'x-component': 'Text',
},
time: {
type: 'string',
title: '单据时间',
'x-component': 'Text',
},
status: {
type: 'string',
title: '外部状态',
'x-component': 'Text',
},
status2: {
type: 'string',
title: '内部状态',
'x-component': 'Text',
}
}
}
}
},
...detailTab, ...detailTab,
...otherRequired, ...otherRequired,
...enclosure, ...enclosure,
......
/*
* @Author: Bill
* @Date: 2020-10-14 18:45:31
* @LastEditTime: 2020-10-14 18:56:00
* @desc 选择加工商品schema
* 这里其实就是两个flex 布局加一个table, 通过expressScrope 注入代码
*/
const schema = (others) => {
return {
type: 'object',
properties: {
layout: {
type: 'object',
'x-component': 'CustomFlexRowLayout',
'x-component-props': {
justify: 'space-between',
align: 'center'
},
properties: {
'right-layout': {
type: 'object',
name: 'rigth-layout',
"x-component": 'CustomFlexColumnLayout',
properties: {
controllers: {
type: 'object',
name: 'controllers',
'x-component': 'CustomFlexRowLayout',
'x-component-props': {
justify: 'end',
},
properties: {
search: {
type: 'string',
name: 'name',
'x-component': 'Search',
'x-component-props': {
placeholder: "请填写标题名称",
"onSearch": "{{search}}",
}
},
'HIGHT_FILTER_BTN': {
type: 'string',
name: 'HIGHT_FILTER_BTN',
'x-component': 'button',
'x-component-props': {
"children": "{{HIGHT_FILTER_BTN}}",
"onClick": "{{toggleFilters}}",
style: {
margin: '0 15px'
}
}
},
reset: {
type: 'string',
name: 'reset',
"x-component": "button",
"x-component-props": {
"onClick": "{{reset}}",
"children": "重置",
}
},
}
},
'FILTERS': {
type: 'object',
name: 'FILTERS',
'x-component': 'CustomFlexRowLayout',
'x-component-props': {
justify: 'start'
},
properties: {
columns: {
name: 'columns',
type: 'string',
'x-component': 'Select',
'x-component-props': {
placeholder: '请选择栏目',
style: {
width: '160px'
}
}
},
status: {
name: 'status',
type: 'string',
'x-component': 'Select',
'x-component-props': {
options: [
{label: '全部', value: '0'},
{label: '待上架', value: '1'},
{label: '已上架',value: '2'},
{label: '已下架',value: '3'},
],
placeholder: '请选择状态',
style: {
width: '160px',
margin: '0 15px'
}
}
},
}
}
}
},
pagination: {
type: 'object',
'x-component': "TablePagination",
'x-style': {
display: 'flex',
flexDirection: 'row',
justifyContent: 'flex-end'
},
'x-component-props': {
showQuickJumper: true,
pageSize: 10,
simple: true
}
}
}
},
...others
}
}
}
export default schema
...@@ -142,7 +142,8 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => { ...@@ -142,7 +142,8 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
// 会员选择后的表格 // 会员选择后的表格
const handleDeleteTable = (id) => { const handleDeleteTable = (id) => {
const value = addSchemaAction.getFieldValue('applyMember') const value = addSchemaAction.getFieldValue('applyMember')
addSchemaAction.setFieldValue('applyMember', findItemAndDelete(value, id)) const res = value.filter((item) => item.memberId != id);
addSchemaAction.setFieldValue('applyMember', res)
} }
const handleAddMemberBtn = () => { const handleAddMemberBtn = () => {
...@@ -183,7 +184,7 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => { ...@@ -183,7 +184,7 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
{ dataIndex: 'memberId', title: 'ID', align: 'center' }, { dataIndex: 'memberId', title: 'ID', align: 'center' },
{ dataIndex: 'name', align: 'center', title: '会员名称', render: (_, record) => <EyePreview url={`/memberCenter/memberAbility/manage/addMember?id=${record.memberId}&preview=1`}>{_}</EyePreview> }, { dataIndex: 'name', align: 'center', title: '会员名称', render: (_, record) => <EyePreview url={`/memberCenter/memberAbility/manage/addMember?id=${record.memberId}&preview=1`}>{_}</EyePreview> },
{ dataIndex: 'memberTypeName', title: '会员类型', align: 'center' }, { dataIndex: 'memberTypeName', title: '会员类型', align: 'center' },
{ dataIndex: 'ctl', title: '操作', align: 'center', render: (_, record) => <Button type='link' onClick={() => handleDeleteTable(record.id)}>删除</Button> } { dataIndex: 'ctl', title: '操作', align: 'center', render: (_, record) => <Button type='link' onClick={() => handleDeleteTable(record.memberId)}>删除</Button> }
] ]
...@@ -494,6 +495,7 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => { ...@@ -494,6 +495,7 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
|| (CANAL.includes(prev) && BUSINESS_INTEGRATE.includes(parentState.value)) || (CANAL.includes(prev) && BUSINESS_INTEGRATE.includes(parentState.value))
) { ) {
setFieldState('applyMember', (state) => { setFieldState('applyMember', (state) => {
console.log("applyMember")
state.value = [] state.value = []
}) })
} }
......
import React, { Component,ReactNode } from 'react'; import React, { Component,ReactNode } from 'react';
import {Badge} from 'antd' import {Badge, Tag} from 'antd'
import statuStyle from './colorTag' import statuStyle from './colorTag'
/****** *********************** 需求单 ************************** */ /****** *********************** 需求单 ************************** */
/** /**
...@@ -136,8 +136,21 @@ export const enquiryOfferConfirmSearchInteriorState = (text:any) => { ...@@ -136,8 +136,21 @@ export const enquiryOfferConfirmSearchInteriorState = (text:any) => {
export const quoteOrderInternalState = (text:any) => { export const quoteOrderInternalState = (text:any) => {
let component: ReactNode = null; let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="待提交审核" />: text === 1 ? component = <Badge status='default' text="待提交审核" />:
text === 2 ? component = <Badge status='default' text="待审核" />: text === 2 ? component = <Badge status='warning' text="待审核" />:
text === 3 ? component = <Badge status='default' text="审核通过" />: text === 3 ? component = <Badge status='success' text="审核通过" />:
component = <Badge status='processing' text="审核不通过" /> component = <Badge status='error' text="审核不通过" />
return component;
}
/**
* @description: 确认询价报价-报价单查询-外部状态查询
* @param {type}
* @return {type} 外
*/
export const inquiryQuoteOuterState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Tag color="processing">待确认</Tag>:
text === 2 ? component = <Tag color="success">接受报价</Tag>:
component = <Tag color="error">不接受报价</Tag>
return component; return component;
} }
\ No newline at end of file
import React from 'react';
import { Modal } from 'antd';
import {
SchemaForm, SchemaMarkupField as Field,
createFormActions,
FormEffectHooks
} from '@formily/antd'
import { Input, Radio, FormMegaLayout } from '@formily/antd-components'
import { PublicApi } from '@/services/api';
const actions = createFormActions()
const { onFieldChange$ } = FormEffectHooks;
export interface Params {
id: number | string;
type: number | string; //1.待提交报价单,2.待审核报价单一级,3.待审核报价单二级
dialogVisible: boolean;
onCancel: Function;
onOK?: Function;
}
const AuditModal: React.FC<Params> = (props) => {
const useFormEffects = () => {
const { setFieldState } = createFormActions()
onFieldChange$('state').subscribe(({ value }) => {
setFieldState('cause', state => {
if (value == 1) {
state.visible = false
} else {
state.visible = true
}
})
})
}
const handletOk = (values: any) => {
let value = { ...values }
value.id = props.id
switch (props.type) {
case 1:
PublicApi.postOrderProductQuotationtToSubmit(value).then(res => {
if(res.code === 1000) {
props.onOK()
}
})
break;
case 2:
PublicApi.postOrderProductQuotationtAuditSubmit(value).then(res => {
if(res.code === 1000) {
props.onOK()
}
})
break;
case 3:
PublicApi.postOrderProductQuotationtAuditSubmitTwo(value).then(res => {
if(res.code === 1000) {
props.onOK()
}
})
break;
}
}
/**操作 */
return (
<Modal
title='单据审核'
width={576}
visible={props.dialogVisible}
onOk={() => actions.submit()}
onCancel={() => props.onCancel()}
destroyOnClose
afterClose={() => actions.reset()}
okText='确定'
cancelText={`取消`}
>
<SchemaForm
layout="vertical"
labelCol={6}
components={{
Input, Radio: Radio.Group, TextArea: Input.TextArea
}}
actions={actions}
effects={() => useFormEffects()}
onSubmit={(values) => handletOk(values)}
initialValues={{
state: 1
}}
>
<Field
enum={
[
{ label: '审核通过', value: 1 },
{ label: '审核不通过', value: 0 }
]}
name='state'
required
x-component="Radio"
x-component-props={{
}}
/>
<Field
title='审核不通过原因'
name="cause"
x-component="TextArea"
required
x-component-props={{
placeholder: '在此输入你的内容,最多60个汉字'
}}
x-rules={{
max: 60,
// maximum:10,//最大数值
message: '原因最多60个汉字'
}}
/>
</SchemaForm>
</Modal>
)
}
export default AuditModal
\ No newline at end of file
import React, { useState, useEffect } from 'react';
import style from './index.less'
import { history } from 'umi';
import { Button, Card, Tabs, Steps, Table } from 'antd';
import { LinkOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface';
import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import StatusColors from '@/pages/transaction/components/StatusColors';
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../common/tableStatusList';
import AuditModal from '../components/auditModel';
import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api';
const { TabPane } = Tabs;
const { Step } = Steps;
export const HEADER_WRAPPER_TEXTS = {
'details': '报价单摘要',
'voucherTime': '单据时间',
'quotationAsTime': '报价截止时间',
'externalState': '外部状态',
'interiorState': '内部状态',
}
const Details: React.FC<{}> = () => {
const [visible, setvisible] = useState(false)
//type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询
//view: 1.询价单号,2.报价单号
const { id, type, view } = history.location.query;
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
// steps 切换
const [detailData, setDetailData] = useState<any>({
externalStateStep: {
current: 0,
title: '外部流转',
items: [
{
title: '采购商',
desc: '提交询价单',
},
{
title: '供应商',
desc: '提交报价单',
},
{
title: '采购商',
desc: '确认报价单',
},
,
{
title: '完成',
desc: ''
}
]
},
interiorStateStep: {
current: 0,
title: '内部流转',
items: [
{
title: '采购员',
desc: '新增询价单',
},
{
title: '采购经理',
desc: '审核询价单',
},
{
title: '副总经理',
desc: '审核询价单',
},
{
title: '采购员',
desc: '提交询价单',
},
{
title: '完成',
desc: ''
}
]
}
})
// 模拟数据
const [data, setdata] = useState<any>({
id: 91,
inquiryListNo: 'SD2015PPLJ',
quotationNo: 'BPTY12',
details: '阿珍爱上阿强',
memberName: 'wutiaoren',
deliveryTime: '2020-10-14 15:37:00',
quotationAsTime: '2020-10-13 15:37:00',
voucherTime: '2020-10-13 15:37:00',
externalState: 1,
interiorState: 3,
fullAddress: '东莞市石龙镇西葫芦53号',
offer: '报价要求',
paymentType: '付款方式',
taxes: '税费要求',
logistics: '物流要求',
packRequire: '包装要求',
otherRequire: '其他要求',
minimumOrder: 1000,
inquiryListProductRequests: [{
id: 1,
productId: 10,
productName: 'APPLE Pro Max 12',
inquiryListNo: '智能手机',
brand: 'APPLE',
nuit: '台',
purchaseQuantity: 1,
productQuotationId: 20,
money: 8699,
pric: 8699
}],
externalInquiryListLogResponses: [{
id: 200,
inquiryListId: 63,
roleName: '管理员',
state: 1,
operation: '操作',
operationTime: '2020-10-13 15:37:00',
auditOpinion: '通过'
}],
interiorInquiryListLogResponses: [{
id: 200,
inquiryListId: 63,
roleName: '管理员',
state: 1,
operation: '操作',
operationTime: '2020-10-13 15:37:00',
auditOpinion: '通过',
department: '销售部',
position: '经理'
}],
enclosureUrls: [{
name: '我是附件.doc',
url: 'http://www.hao123.com'
}]
});
// 询价商品
const inquiryGoods: ColumnType<any>[] = [{
title: 'ID',
key: 'productId',
dataIndex: 'productId',
}, {
title: '报价商品名称',
key: 'productName',
dataIndex: 'productName',
render: (text: any, record: any) => <EyePreview>{text}</EyePreview>
}, {
title: '品类',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
}, {
title: '品牌',
key: 'brand',
dataIndex: 'brand',
}, {
title: '单位',
key: 'nuit',
dataIndex: 'nuit',
}, {
title: '采购数量',
key: 'purchaseQuantity',
dataIndex: 'purchaseQuantity',
}, {
title: '报价单价',
key: 'pric',
dataIndex: 'pric',
}, {
title: '金额',
key: 'money',
dataIndex: 'money',
}]
// 条件交易&其他报价说明
const infoTem = {
base: {
title: '交易条件',
leftElem: [
{ title: '交付日期', key: '', value: data.deliveryTime },
{ title: '交付地址', key: '', value: data.fullAddress },
{ title: '物流要求', key: '', value: data.logistics }
],
centerElem: [
{ title: '报价截止日期', key: '', value: data.quotationAsTime },
{ title: '报价要求', key: '', value: data.offer },
{ title: '包装要求', key: '', value: data.packRequire },
],
rightElem: [
{ title: '付款方式', key: '', value: data.paymentType },
{ title: '税费要求', key: '', value: data.taxes },
{ title: '其他要求', key: '', value: data.otherRequire }
],
},
freight: {
title: '其他报价说明',
leftElem: [
{ title: '最小起订', key: '', value: data.minimumOrder },
{ title: '交付说明', key: '', value: data.fullAddress },
{ title: '付款说明', key: '', value: data.paymentType }
],
centerElem: [
{ title: '税费说明', key: '', value: data.taxes },
{ title: '物流说明', key: '', value: data.logistics },
{ title: '包装说明', key: '', value: data.packRequire },
],
rightElem: [
{ title: '其他说明', key: '', value: data.otherRequire }
],
},
}
// 外部流转记录&内部流转记录
const flowRecord = {
external: [{
title: '序号',
key: 'inquiryListId',
dataIndex: 'inquiryListId',
}, {
title: '操作角色',
key: 'roleName',
dataIndex: 'roleName',
}, {
title: '状态',
key: 'state',
dataIndex: 'state',
}, {
title: '操作',
key: 'operation',
dataIndex: 'operation',
}, {
title: '操作时间',
key: 'operationTime',
dataIndex: 'operationTime',
}, {
title: '审核意见',
key: 'auditOpinion',
dataIndex: 'auditOpinion',
}],
interior: [{
title: '流转记录',
key: 'inquiryListId',
dataIndex: 'inquiryListId',
}, {
title: '操作人',
key: 'roleName',
dataIndex: 'roleName',
}, {
title: '部门',
key: 'department',
dataIndex: 'department',
}, {
title: '职位',
key: 'position',
dataIndex: 'position',
}, {
title: '状态',
key: 'state',
dataIndex: 'state',
}, {
title: '操作',
key: 'operation',
dataIndex: 'operation',
}, {
title: '操作时间',
key: 'operationTime',
dataIndex: 'operationTime',
}, {
title: '审核意见',
key: 'auditOpinion',
dataIndex: 'auditOpinion',
}],
}
// 详情请求
useEffect(() => {
switch (Number(type)) {
case 1:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 2:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 3:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 4:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 5:
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
}
}, [])
useEffect(() => {
if (Object.keys(data).length > 0) {
// 组合数据
const arr = [];
Object.keys(data).forEach((key) => {
if (HEADER_WRAPPER_TEXTS[key]) {
arr.push({
label: HEADER_WRAPPER_TEXTS[key],
value: data[key],
name: key,
})
}
})
setheaderWrapperData(arr)
console.log(arr, '组合的数据')
}
}, [data])
// 提交后返回
const handleModalOK = () => {
setvisible(false)
setTimeout(() => {
history.goBack()
}, 1000)
}
return (
<PageHeaderWrapper
className={style.header}
onBack={() => history.goBack()}
title={
<>
<div className={style['headerTop']}>
<div className={style['headerTop-prefix']}></div>
<div className={style['headerTop-name']}>
{ Number(view) === 1 ? '询价单号' : '报价单号'}{ Number(view) === 1 ? data.inquiryListNo : data.quotationNo}
</div>
<div className={style[`levelIcon${'1'}`]}></div>
</div>
</>
}
extra={
<>
{
(Number(type) === 4 && data.interiorState === 1) &&
<>
<Button>
<StopOutlined />审核不通过
</Button>
<Button className={style['saveBtn']}>
<CheckSquareOutlined />审核通过
</Button>
</>
}
{
(Number(type) === 1 && data.externalState === 1 && data.interiorState === 3) &&
<Button className={style['saveBtn']} onClick={()=>setvisible(true)}>
<CheckSquareOutlined />提交
</Button>
}
</>
}
content={
< div className={style['headerMain']} >
<div className={style['headerMain-left']}>
{
Number(type) !== 4 &&
<div className={style['headerMain-left-option']}>
<div>询价单号:</div>
<div><a>{data.inquiryListNo}</a> </div>
</div>
}
<div className={style['headerMain-left-option']}>
<div>询价会员:</div>
<div><a>{data.memberName}</a> </div>
</div>
{headerWrapperData && headerWrapperData.map(item => (
<div key={item.name} className={style['headerMain-left-option']}>
<div>{item.label}</div>
<div>
{ item.name === 'externalState' ?
inquiryQuoteOuterState(item.value) :
item.name === 'interiorState' ?
quoteOrderInternalState(item.value) :
item.value
}
</div>
</div>
))}
</div>
</div >
}
>
<Card className={style.item_wrap}>
{
Number(type) === 4 ?
<>
<div className={style.mainCol_title}>外部流转</div>
<Steps
style={{ padding: '20px 0' }}
progressDot
current={1}
>
{detailData.externalStateStep.items.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
/>
);
})}
</Steps>
</>
:
<Tabs>
<TabPane tab="外部流转" key="1">
<Steps
style={{ padding: '20px 0' }}
progressDot
current={1}
>
{detailData.externalStateStep.items.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
/>
);
})}
</Steps>
</TabPane>
<TabPane tab="内部流转" key="2">
<Steps
style={{ padding: '20px 0' }}
progressDot
current={0}
>
{detailData.interiorStateStep.items.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
/>
);
})}
</Steps>
</TabPane>
</Tabs>
}
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>询价商品</div>
<Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].title}</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].leftElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']} style={{ flex: '1.5 1' }}>
{item.title}
</div>
<div className={style['cols-main-options']}>
{item.value}
</div>
</div>
);
},
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].centerElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']}>
{item.title}
</div>
<div className={style['cols-main-options']}>{item.value}</div>
</div>
);
},
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].rightElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']}>
{item.title}
</div>
<div className={style['cols-main-options']}>{item.value}</div>
</div>
);
},
)}
</div>
</div>
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>附件</div>
{/* <div className={style.upload_data}>
{
data.enclosureUrls &&
data.enclosureUrls.map((v,i) => (
<div key={i} className={style.upload_item}>
<div className={style.upload_left}>
<LinkOutlined />
<span>{v.name}</span>
</div>
</div>
))
}
</div> */}
</Card>
<Card className={style.item_wrap}>
{
Number(type) === 4 ?
<>
<div className={style.mainCol_title}>外部流转记录</div>
<Table columns={flowRecord.external} rowKey='id' pagination={false} dataSource={data.externalInquiryListLogResponses} />
</>
:
<Tabs>
<TabPane tab="外部流转记录" key="1">
<Table columns={flowRecord.external} rowKey='id' pagination={false} dataSource={data.externalInquiryListLogResponses} />
</TabPane>
<TabPane tab="内部流转记录" key="2">
<Table columns={flowRecord.interior} rowKey='id' pagination={false} dataSource={data.interiorInquiryListLogResponses} />
</TabPane>
</Tabs>
}
</Card>
<AuditModal
id={id}
type={type}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
/>
</PageHeaderWrapper >
)
}
export default Details
\ No newline at end of file
@import "../../../member/components/index.less";
.item_wrap {
margin-bottom: 24px;
background-color: #FFF;
border-radius: 8px;
&:last-child {
margin-bottom: 0px;
}
.mainCol_title {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
padding: 0px 0 20px;
}
:global {
.ant-tabs-nav {
&::before {
border-bottom-color: #FFF;
}
}
}
}
.header {
:global {
.ant-page-header {
padding: 24px 24px !important;
}
}
}
.upload_item {
width: 498px;
padding: 5px 8px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #FAFBFC;
.upload_left {
display: flex;
align-items: center;
color: #00B37A;
cursor: pointer;
:global {
.anticon-link {
color: #00B37A;
font-size: 16px;
margin-right: 8px;
}
}
}
}
\ No newline at end of file
import React, { useRef, useState, useEffect } from 'react';
import { Card, Button, Row, Col } from 'antd';
import { history } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
import moment from 'moment';
import { timeRange } from '@/utils/index';
import { ColumnType } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../common/tableStatusList';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { pendingReviewSchema } from '../schema/pendingReview';
import { PageStatus } from '@/hooks/usePageStatus';
import { values, action } from 'mobx';
import AuditModal from './auditModel';
import EyePreview from '@/components/EyePreview';
const formActions = createFormActions();
export interface parmas {
fetchData?: Function,
selectAll?: Function,
batchAction?: Function,
reloadRef?: any,
type?: number,
}
const ReviewList: React.FC<parmas> = (props) => {
const ref = useRef<any>({});
const { fetchData, selectAll, batchAction, reloadRef, type } = props;
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([]);
const [id, setId] = useState<number>();
const [visible, setvisible] = useState<boolean>(false);
useEffect(() => {
if (reloadRef) {
const userAction = {
reload: () => ref.current.reload()
}
if (reloadRef && typeof reloadRef === 'function') {
reloadRef(userAction);
}
if (reloadRef && typeof reloadRef !== 'function') {
reloadRef.current = userAction;
}
}
})
const columns: ColumnType<any>[] = [
{
title: '报价单号',
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=${type}&view=2`}>{text}</EyePreview>
},
{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=${type}&view=1`}>{text}</EyePreview>
},
{
title: '询价单摘要',
key: 'details',
dataIndex: 'details',
},
{
title: '被询价会员',
key: 'memberName',
dataIndex: 'memberName',
},
{
title: '报价截止时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
},
{
title: '询价时间',
key: 'voucherTime',
dataIndex: 'voucherTime',
},
{
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => inquiryQuoteOuterState(text)
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
filters: filterInternalState,
filterMultiple: false,
onFilter: (value, record) => record.interiorState === value,
render: (text: any) =>
quoteOrderInternalState(text)
},
{
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link' disabled={record.interiorState === 1} onClick={()=>{setId(record.id);setvisible(true);}}>审核</Button>
},
]
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
/**多选 */
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectRow(selectedRows);
setSelectedRowKeys(selectedRowKeys);
selectAll(selectedRowKeys) // 返回给父级
},
}
// 搜索
const search = (values: any) => {
if (values.voucherTime) {
values.startVoucherTime = timeRange(values.voucherTime).st
values.endVoucherTime = timeRange(values.voucherTime).et
delete values.voucherTime
}
ref.current.reload(values)
}
/**批量审核通过按钮 */
const controllerBtns = <Row>
<Col span={6}>
<Button onClick={() => batchAction()}>批量提交审核</Button>
</Col>
</Row>
// 单个审核
const handleModalOK = () => {
setvisible(false)
setTimeout(()=> {
ref.current.reload()
},1000)
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'inquiryListNo', FORM_FILTER_PATH)
}}
expressionScope={{
controllerBtns
}}
schema={pendingReviewSchema}
>
</NiceForm>
}
>
</StandardTable>
</Card>
<AuditModal
id={id}
type={type}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={ handleModalOK}
/>
</PageHeaderWrapper>
)
}
export default ReviewList
\ No newline at end of file
import React, { useRef, useState } from 'react';
import { message } from 'antd';
import ReviewList from '../components/reviewList';
import { timeRange } from '@/utils/index';
import { PublicApi } from '@/services/api';
const PendingReviewOne: React.FC<{}> = () => {
const [selectRow, setSelectRow] = useState<Array<number>>([]);
const ref = useRef<any>({});
// 多选
const selectAll = (values: any) => {
setSelectRow(values);
console.log(values, '我是多选的id')
}
// 列表数据
const data = { // 模拟的数据
totalCount: 6,
data: [{
id: 1,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 2
}, {
id: 2,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125LIP',
details: '模拟的数据10086',
memberName: '打喷嚏',
memberId: 1,
quotationAsTime: '2020-10-14 23:59:00',
voucherTime: '2020-10-12 13:59:00',
externalState: 1,
interiorState: 1
}]
}
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderAuditProductQuotationList({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
})
}
// 批量操作
const batchAction = () => {
if (selectRow.length > 0) {
return new Promise((resolve, reject) => {
PublicApi.postOrderProductQuotationtAuditAll({ ids: selectRow }).then(res => {
if (res.code === 1000) {
resolve(res.data)
ref.current.reload();
}
})
})
} else {
message.error('请选择要操作的询价单!')
}
}
return (
<ReviewList
reloadRef={ref}
fetchData={fetchData}
selectAll={selectAll}
batchAction={batchAction}
type={2}
/>
)
}
export default PendingReviewOne
\ No newline at end of file
import React, { useRef, useState } from 'react';
import { message } from 'antd';
import ReviewList from '../components/reviewList';
import { timeRange } from '@/utils/index';
import { PublicApi } from '@/services/api';
const PendingReviewTwo: React.FC<{}> = () => {
const [selectRow, setSelectRow] = useState<Array<number>>([]);
const ref = useRef<any>({});
// 多选
const selectAll = (values: any) => {
setSelectRow(values);
console.log(values, '我是多选的id')
}
// 列表数据
const data = { // 模拟的数据
totalCount: 6,
data: [{
id: 1,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}, {
id: 2,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125LIP',
details: '模拟的数据10086',
memberName: '打喷嚏',
memberId: 1,
quotationAsTime: '2020-10-14 23:59:00',
voucherTime: '2020-10-12 13:59:00',
externalState: 1,
interiorState: 1
}]
}
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderAuditProductQuotationListTwo({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
})
}
// 批量操作
const batchAction = () => {
if (selectRow.length > 0) {
return new Promise((resolve, reject) => {
PublicApi.postOrderProductQuotationtAuditAllTwo({ ids: selectRow }).then(res => {
if (res.code === 1000) {
resolve(res.data)
ref.current.reload();
}
})
})
} else {
message.error('请选择要操作的询价单!')
}
}
return (
<ReviewList
reloadRef={ref}
fetchData={fetchData}
selectAll={selectAll}
batchAction={batchAction}
type={3}
/>
)
}
export default PendingReviewTwo
\ No newline at end of file
import React, { useRef, useState, useEffect } from 'react';
import { Card, Button, Row, Col } from 'antd';
import { history, Link } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
import moment from 'moment';
import { timeRange } from '@/utils/index';
import { ColumnType } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import EyePreview from '@/components/EyePreview';
import { pendingReviewSchema } from '../schema/pendingReview';
import { PageStatus } from '@/hooks/usePageStatus';
import { values, action } from 'mobx';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const PendingSubmit: React.FC<{}> = () => {
const ref = useRef<any>({});
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const columns: ColumnType<any>[] = [{
title: '报价单号',
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=1&view=2`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=1&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
dataIndex: 'details',
}, {
title: '询价会员',
key: 'memberName',
dataIndex: 'memberName',
}, {
title: '报价截止时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
}, {
title: '单据时间',
key: 'voucherTime',
dataIndex: 'voucherTime',
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => <StatusColors status={text} type='inquiry' />
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
filters: filterInternalState,
filterMultiple: false,
onFilter: (value, record) => record.interiorState === value,
render: (text: any) =>
quoteOrderInternalState(text)
},
{
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=1&view=1`}>提交报价单</Link></Button>
}]
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
/**多选 */
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectRow(selectedRows);
setSelectedRowKeys(selectedRowKeys);
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
},
}
/**批量审核通过按钮 */
const controllerBtns = <Row>
<Col span={6}>
<Button onClick={() => handleSubmitAll(selectedRowKeys)}>批量提交审核</Button>
</Col>
</Row>
/**列表数据 */
const data = {
totalCount: 2,
data: [{
id: 1,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}]
}
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderToSubmitProductQuotationList({ ...params }).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
})
}
/**搜索 */
const handleSumbit = (values: any) => {
if (values.voucherTime) {
values.startVoucherTime = timeRange(values.voucherTime).st
values.endVoucherTime = timeRange(values.voucherTime).et
delete values.voucherTime
}
console.log('values', values)
ref.current.reload(values)
}
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => handleSumbit(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'inquiryListNo', FORM_FILTER_PATH)
}}
expressionScope={{
controllerBtns
}}
schema={pendingReviewSchema}
>
</NiceForm>
}
>
</StandardTable>
</Card>
</PageHeaderWrapper>
)
}
export default PendingSubmit
\ No newline at end of file
import React, { useRef, useState } from 'react';
import { history, Link } from 'umi';
import { Button, Card, Space, Row, Col, Dropdown, Menu, Popconfirm } from 'antd';
import { PlusOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import {
interiorState, interiorStateTwo,
quoteOrderInternalState, enquirySearchexternalState,
inquiryQuoteOuterState
} from '../../common/tableStatusList';
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { timeRange } from '@/utils/index';
import { ColumnType } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { commonEnquieryOfferSchema } from '../schema';
import { PageStatus } from '@/hooks/usePageStatus';
import { values, action } from 'mobx';
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const PendingSubmitReview: React.FC<{}> = () => {
const ref = useRef<any>({});
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const columns: ColumnType<any>[] = [{
title: '报价单号',
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=5&view=2`}>{text}</EyePreview>
},{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=5&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
dataIndex: 'details',
}, {
title: '询价会员',
key: 'memberName',
dataIndex: 'memberName',
},{
title: '报价截止时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
}, {
title: '单据时间',
key: 'voucherTime',
dataIndex: 'voucherTime',
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => inquiryQuoteOuterState(text)
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
filters: filterInternalState,
filterMultiple: false,
onFilter: (value, record) => record.interiorState === value,
render: (text: any) =>
quoteOrderInternalState(text)
},{
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=1&view=1`}>提交审核</Link></Button>
}];
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
/**多选 */
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectRow(selectedRows);
setSelectedRowKeys(selectedRowKeys);
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
},
}
/**批量审核通过按钮 */
const controllerBtns = <Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button>批量提交审核</Button>
</Space>
</Col>
</Row>
// 列表数据
const data = { // 模拟的数据
totalCount: 6,
data: [{
id: 1,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}, {
id: 2,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125LIP',
details: '模拟的数据10086',
memberName: '打喷嚏',
memberId: 1,
quotationAsTime: '2020-10-14 23:59:00',
voucherTime: '2020-10-12 13:59:00',
externalState: 1,
interiorState: 1
}]
}
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(data)
}, 500)
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'quotationNo', FORM_FILTER_PATH)
}}
expressionScope={{
controllerBtns
}}
schema={commonEnquieryOfferSchema}
>
</NiceForm>
}
>
</StandardTable>
</Card>
</PageHeaderWrapper>
)
}
export default PendingSubmitReview
\ No newline at end of file
import React, { useRef, useEffect } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Button } from 'antd';
import { StandardTable } from 'god';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { quoteFormSearch } from '../schema';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { searchSelectGetSelectCategoryOptionEffect } from '../../effect/index'
import { ColumnType } from 'antd/lib/table/interface';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState,inquiryQuoteOuterState } from '../../common/tableStatusList';
import EyePreview from '@/components/EyePreview';
import { timeRange } from '@/utils/index';
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const EnquiryOrder: React.FC<{}> = (props) => {
const ref = useRef<any>({});
const columns: ColumnType<any>[] = [{
title: '报价单号',
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=5&view=2`}>{text}</EyePreview>
},{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/confirmInquiryQuote/components/details?id=${record.id}&type=5&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
dataIndex: 'details',
}, {
title: '询价会员',
key: 'memberName',
dataIndex: 'memberName',
},{
title: '报价截止时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
}, {
title: '单据时间',
key: 'voucherTime',
dataIndex: 'voucherTime',
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => inquiryQuoteOuterState(text)
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
filters: filterInternalState,
filterMultiple: false,
onFilter: (value, record) => record.interiorState === value,
render: (text: any) =>
quoteOrderInternalState(text)
}];
//交易能力 询价报价 询价单查询
const data = {
totalCount: 1,
data: [{
id: 91,
quotationNo: 'BPTY12',
inquiryListNo: 'SD2015PPLJ',
details: '阿珍爱上阿强',
memberName: 'wutiaoren',
memberId: 5,
quotationAsTime: '2020-10-13 15:37:00',
voucherTime: '2020-10-13 15:37:00',
externalState: 1,
interiorState: 2
}]
}
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
// PublicApi.getOrderProductQuotationList({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 1000)
})
}
// 搜索
const search = (values: any) => {
if (values.voucherTime) {
values.startVoucherTime = timeRange(values.voucherTime).st
values.endVoucherTime = timeRange(values.voucherTime).et
delete values.voucherTime
}
ref.current.reload(values)
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'inquiryListNo', FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions, 'category')
})
}}
schema={quoteFormSearch}
>
</NiceForm>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default EnquiryOrder;
\ No newline at end of file
import { ISchema} from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import {TimeList, filterExternalState, filterInternalState} from '../../common/statusList'
import TranactionRoute from 'config/routes/tranactionRoute'
/**
* @description: 公用
* @param {type}
* @return {type}
*/
export const commonEnquieryOfferSchema: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
"x-component-props":{
grid:true
},
properties:{
ctl:{
type:'object',
"x-component":"Children",
"x-component-props":{
children:"{{controllerBtns}}"
}
},
quotationNo:{//报价单号
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'报价单搜索'
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
flexWrap:'nowrap'
},
colStyle:{
marginLeft: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
inquiryListNo:{//需求单号
type:'string',
"x-mega-props":{
},
"x-component-props":{
placeholder:'询价单号'
}
},
details:{
type:'string',
"x-component-props":{
placeholder:'询价单摘要'
}
},
memberName:{
type:'string',
"x-component-props":{
placeholder:'被询价会员'
}
},
// category:{
// type:'string',
// 'x-component': 'CustomInputSearch',
// 'x-component-props': {
// placeholder: '商品品类',
// showSearch: true,
// showArrow: true,
// defaultActiveFirstOption: false,
// filterOption: false,
// notFoundContent: null,
// style: { width: '174px', lineHeight: '32px' },
// searchValue: null,
// dataoption: []
// }
// // "x-component-props":{
// // placeholder:'请选择品类'
// // },
// // enum:[]
// },
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span:1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
/**
* @description: 需求报价-需求单查询
* @param {type}
* @return {type}
*/
export const enquierySearchSchema: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
properties:{
requisitionFormNo:{
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'搜索',
align: 'flex-left',
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
justifyContent: 'flex-start',
flexWrap:'nowrap'
},
colStyle:{//改变间隔
marginRight: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'询价会员'
}
},
// category:{
// type:'string',
// 'x-component': 'CustomInputSearch',
// 'x-component-props': {
// placeholder: '商品品类',
// showSearch: true,
// showArrow: true,
// defaultActiveFirstOption: false,
// filterOption: false,
// notFoundContent: null,
// style: { width: '174px', lineHeight: '32px' },
// searchValue: null,
// dataoption: []
// }
// // "x-component-props":{
// // placeholder:'请选择品类'
// // },
// // enum:[]
// },
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span: 1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
/**
* @description: 需求报价-报价查询
* @param {type}
* @return {type}
*/
export const enquieryOfferSearchSchema: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
properties:{
inquiryListNo:{
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'搜索',
align: 'flex-left',
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
justifyContent: 'flex-start',
flexWrap:'nowrap'
},
colStyle:{//改变间隔
marginRight: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
memberName:{
type:'string',
"x-component-props":{
placeholder:'询价会员'
},
},
voucherTime:{
type:'string',
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
externalState:{
type:'string',
"x-component-props":{
placeholder:'外部状态'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span: 1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
/**
* @description: 报价单新增编辑-需求单查询
* @param {type}
* @return {type}
*/
export const dialogEqformSearch: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
properties:{
requisitionFormNo:{
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'需求单号',
align: 'flex-left',
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
justifyContent: 'flex-start',
flexWrap:'nowrap'
},
colStyle:{//改变间隔
marginRight: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
details:{
type:'string',
"x-component-props":{
placeholder:'需求摘要'
}
},
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'需求会员'
}
},
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span: 1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
/**
* @description: 报价单查询-搜索
* @param {type}
* @return {type}
*/
export const quoteFormSearch: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
properties:{
inquiryListNo:{
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'搜索',
align: 'flex-left',
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
justifyContent: 'flex-start',
flexWrap:'nowrap'
},
colStyle:{//改变间隔
marginRight: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
memberName:{
type:'string',
"x-component-props":{
placeholder:'询价会员'
}
},
voucherTime:{
type:'string',
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
externalState:{
type:'string',
"x-component-props":{
placeholder:'外部状态'
},
enum: []
},
interiorState :{
type:'string',
"x-component-props":{
placeholder:'内部状态'
},
enum: []
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span: 1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
\ No newline at end of file
import { ISchema} from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import {TimeList} from '../../common/statusList'
import TranactionRoute from 'config/routes/tranactionRoute'
/**
* @description: 待审核询价单
* @param {type}
* @return {type}
*/
export const pendingReviewSchema: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
"x-component-props":{
grid:true
},
properties:{
ctl:{
type:'object',
"x-component":"Children",
"x-component-props":{
children:"{{controllerBtns}}"
}
},
inquiryListNo:{//报价单号
type:'string',
"x-component":"Search",
"x-mega-props":{
},
"x-component-props":{
placeholder:'报价单搜索'
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
flexWrap:'nowrap'
},
colStyle:{
marginLeft: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
span: 5
},
"x-component-props":{
inline: true
},
properties:{
details:{
type:'string',
"x-component-props":{
placeholder:'询价单摘要'
}
},
memberName:{
type:'string',
"x-component-props":{
placeholder:'被询价会员'
}
},
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span:1
},
"x-component-props":{
children:'查询'
}
}
}
}
}
}
...@@ -11,7 +11,7 @@ const actions = createFormActions() ...@@ -11,7 +11,7 @@ const actions = createFormActions()
const { onFieldChange$ } = FormEffectHooks; const { onFieldChange$ } = FormEffectHooks;
export interface Params { export interface Params {
id: number | string; id: number | string;
type: number | string; //1是待提交询价单 2是一级 3是二级 type: number | string; //1.待提交报价单,2.待审核报价单一级,3.待审核报价单二级
dialogVisible: boolean; dialogVisible: boolean;
onCancel: Function; onCancel: Function;
onOK?: Function; onOK?: Function;
...@@ -36,7 +36,7 @@ const AuditModal: React.FC<Params> = (props) => { ...@@ -36,7 +36,7 @@ const AuditModal: React.FC<Params> = (props) => {
value.id = props.id value.id = props.id
switch (props.type) { switch (props.type) {
case 1: case 1:
PublicApi.postOrderInquirySubmit(value).then(res => { PublicApi.postOrderProductQuotationtToSubmit(value).then(res => {
if(res.code === 1000) { if(res.code === 1000) {
props.onOK() props.onOK()
} }
......
import React, { useState } from 'react'; import React, { useState, useEffect } from 'react';
import style from './index.less'
import { history } from 'umi'; import { history } from 'umi';
import { Button, Card, Tabs, Steps, Table } from 'antd'; import { Button, Card, Tabs, Steps, Table } from 'antd';
import { LinkOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons' import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle'; import ReutrnEle from '@/components/ReturnEle';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import style from './index.less' import StatusColors from '@/pages/transaction/components/StatusColors';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import AuditModal from '../components/auditModel';
import { PublicApi } from '@/services/api';
const { TabPane } = Tabs; const { TabPane } = Tabs;
const { Step } = Steps; const { Step } = Steps;
export const HEADER_WRAPPER_TEXTS = {
'details': '询价摘要',
'voucherTime': '单据时间',
'quotationAsTime': '报价截止时间',
'deliveryTime': '交付日期',
'externalState': '外部状态',
'interiorState': '内部状态',
}
const Details: React.FC<{}> = () => { const Details: React.FC<{}> = () => {
const [visible, setvisible] = useState(false)
//type: 1.待提交报价单,2.待审核报价单1级,3.待审核报价单2级,4.询价单查询,5.报价单查询
//view: 1.询价单号,2.报价单号
const { id, type, view } = history.location.query;
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
// steps 切换 // steps 切换
const [detailData, setDetailData] = useState<any>({ const [detailData, setDetailData] = useState<any>({
externalStateStep: { externalStateStep: {
...@@ -18,11 +38,7 @@ const Details: React.FC<{}> = () => { ...@@ -18,11 +38,7 @@ const Details: React.FC<{}> = () => {
items: [ items: [
{ {
title: '采购商', title: '采购商',
desc: '提交需求单', desc: '提交询价单',
},
{
title: '平台',
desc: '审核需求单',
}, },
{ {
title: '供应商', title: '供应商',
...@@ -45,20 +61,20 @@ const Details: React.FC<{}> = () => { ...@@ -45,20 +61,20 @@ const Details: React.FC<{}> = () => {
title: '内部流转', title: '内部流转',
items: [ items: [
{ {
title: '业务员', title: '采购员',
desc: '新增价单', desc: '新增价单',
}, },
{ {
title: '业务经理', title: '采购经理',
desc: '审核价单', desc: '审核价单',
}, },
{ {
title: '副总经理', title: '副总经理',
desc: '审核报价', desc: '审核询价单',
}, },
{ {
title: '业务员', title: '采购员',
desc: '提交价单', desc: '提交价单',
}, },
{ {
title: '完成', title: '完成',
...@@ -68,68 +84,125 @@ const Details: React.FC<{}> = () => { ...@@ -68,68 +84,125 @@ const Details: React.FC<{}> = () => {
] ]
} }
}) })
// 模拟数据
const [data, setdata] = useState<any>({
id: 91,
inquiryListNo: 'SD2015PPLJ',
quotationNo: 'BPTY12',
details: '阿珍爱上阿强',
memberName: 'wutiaoren',
deliveryTime: '2020-10-14 15:37:00',
quotationAsTime: '2020-10-13 15:37:00',
voucherTime: '2020-10-13 15:37:00',
externalState: 1,
interiorState: 3,
fullAddress: '东莞市石龙镇西葫芦53号',
offer: '报价要求',
paymentType: '付款方式',
taxes: '税费要求',
logistics: '物流要求',
packRequire: '包装要求',
otherRequire: '其他要求',
minimumOrder: 1000,
inquiryListProductRequests: [{
id: 1,
productId: 10,
productName: 'APPLE Pro Max 12',
inquiryListNo: '智能手机',
brand: 'APPLE',
nuit: '台',
purchaseQuantity: 1,
productQuotationId: 20,
money: 8699,
pric: 8699
}],
externalInquiryListLogResponses: [{
id: 200,
inquiryListId: 63,
roleName: '管理员',
state: 1,
operation: '操作',
operationTime: '2020-10-13 15:37:00',
auditOpinion: '通过'
}],
interiorInquiryListLogResponses: [{
id: 200,
inquiryListId: 63,
roleName: '管理员',
state: 1,
operation: '操作',
operationTime: '2020-10-13 15:37:00',
auditOpinion: '通过',
department: '销售部',
position: '经理'
}],
enclosureUrls: [{
name: '我是附件.doc',
url: 'http://www.hao123.com'
}]
});
// 询价商品 // 询价商品
const inquiryGoods: ColumnType<any>[] = [{ const inquiryGoods: ColumnType<any>[] = [{
title: 'ID', title: 'ID',
key: 'id', key: 'productId',
dataIndex: 'id', dataIndex: 'productId',
}, { }, {
title: '报价商品名称', title: '报价商品名称',
key: 'name', key: 'productName',
dataIndex: 'name', dataIndex: 'productName',
}, { }, {
title: '品类', title: '品类',
key: 'id', key: 'inquiryListNo',
dataIndex: 'id', dataIndex: 'inquiryListNo',
}, { }, {
title: '品牌', title: '品牌',
key: 'name', key: 'brand',
dataIndex: 'name', dataIndex: 'brand',
}, { }, {
title: '单位', title: '单位',
key: 'id', key: 'nuit',
dataIndex: 'id', dataIndex: 'nuit',
}, { }, {
title: '采购数量', title: '采购数量',
key: 'name', key: 'purchaseQuantity',
dataIndex: 'name', dataIndex: 'purchaseQuantity',
}] }]
// 条件交易&其他报价说明 // 条件交易&其他报价说明
const infoTem = { const infoTem = {
base: { base: {
title: '其他报价说明', title: '交易条件',
leftElem: [ leftElem: [
{ title: '最小起订', key: '', value: '1,000' }, { title: '交付日期', key: '', value: data.deliveryTime },
{ title: '交付说明', key: '', value: '东莞市石龙镇西葫芦53号' }, { title: '交付地址', key: '', value: data.fullAddress },
{ title: '付款说明', key: '', value: '首付30%,收货后70%' } { title: '物流要求', key: '', value: data.logistics }
], ],
centerElem: [ centerElem: [
{ title: '税费说明', key: '', value: '含税' }, { title: '报价截止日期', key: '', value: data.quotationAsTime },
{ title: '物流说明', key: '', value: '要求送至指定收货地址' }, { title: '报价要求', key: '', value: data.offer },
{ title: '包装说明', key: '', value: '纸箱' }, { title: '包装要求', key: '', value: data.packRequire },
], ],
rightElem: [ rightElem: [
{ title: '其他说明', key: '', value: '无' } { title: '付款方式', key: '', value: data.paymentType },
{ title: '税费要求', key: '', value: data.taxes },
{ title: '其他要求', key: '', value: data.otherRequire }
], ],
}, },
freight: { freight: {
title: '条件交易', title: '其他报价说明',
leftElem: [ leftElem: [
{ title: '交付日期', key: '', value: '2020-08-25' }, { title: '最小起订', key: '', value: data.minimumOrder },
{ title: '交付地址', key: '', value: '东莞市石龙镇西葫芦53号' }, { title: '交付说明', key: '', value: data.fullAddress },
{ title: '物流要求', key: '', value: '要求送至指定收货地址' } { title: '付款说明', key: '', value: data.paymentType }
], ],
centerElem: [ centerElem: [
{ title: '报价截止日期', key: '', value: '2020-12-26 13:45' }, { title: '税费说明', key: '', value: data.taxes },
{ title: '报价要求', key: '', value: '实价' }, { title: '物流说明', key: '', value: data.logistics },
{ title: '包装要求', key: '', value: '纸箱' }, { title: '包装说明', key: '', value: data.packRequire },
], ],
rightElem: [ rightElem: [
{ title: '付款方式', key: '', value: '首付30%,收货后70%' }, { title: '其他说明', key: '', value: data.otherRequire }
{ title: '税费要求', key: '', value: '含税' },
{ title: '其他要求', key: '', value: '无' }
], ],
} },
} }
// 外部流转记录&内部流转记录 // 外部流转记录&内部流转记录
const flowRecord = { const flowRecord = {
...@@ -137,23 +210,23 @@ const Details: React.FC<{}> = () => { ...@@ -137,23 +210,23 @@ const Details: React.FC<{}> = () => {
title: '序号', title: '序号',
key: 'inquiryListId', key: 'inquiryListId',
dataIndex: 'inquiryListId', dataIndex: 'inquiryListId',
},{ }, {
title: '操作角色', title: '操作角色',
key: 'roleName', key: 'roleName',
dataIndex: 'roleName', dataIndex: 'roleName',
},{ }, {
title: '状态', title: '状态',
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
},{ }, {
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
},{ }, {
title: '操作时间', title: '操作时间',
key: 'operationTime', key: 'operationTime',
dataIndex: 'operationTime', dataIndex: 'operationTime',
},{ }, {
title: '审核意见', title: '审核意见',
key: 'auditOpinion', key: 'auditOpinion',
dataIndex: 'auditOpinion', dataIndex: 'auditOpinion',
...@@ -162,46 +235,114 @@ const Details: React.FC<{}> = () => { ...@@ -162,46 +235,114 @@ const Details: React.FC<{}> = () => {
title: '流转记录', title: '流转记录',
key: 'inquiryListId', key: 'inquiryListId',
dataIndex: 'inquiryListId', dataIndex: 'inquiryListId',
},{ }, {
title: '操作人', title: '操作人',
key: 'roleName', key: 'roleName',
dataIndex: 'roleName', dataIndex: 'roleName',
},{ }, {
title: '部门', title: '部门',
key: 'department', key: 'department',
dataIndex: 'department', dataIndex: 'department',
},{ }, {
title: '职位', title: '职位',
key: 'position', key: 'position',
dataIndex: 'position', dataIndex: 'position',
},{ }, {
title: '状态', title: '状态',
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
},{ }, {
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
},{ }, {
title: '操作时间', title: '操作时间',
key: 'operationTime', key: 'operationTime',
dataIndex: 'operationTime', dataIndex: 'operationTime',
},{ }, {
title: '审核意见', title: '审核意见',
key: 'auditOpinion', key: 'auditOpinion',
dataIndex: 'auditOpinion', dataIndex: 'auditOpinion',
}], }],
} }
// 详情请求
useEffect(() => {
switch (Number(type)) {
case 1:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 2:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 3:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 4:
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
case 5:
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setdata(res.data)
}
})
break;
}
}, [])
useEffect(() => {
if (Object.keys(data).length > 0) {
// 组合数据
const arr = [];
Object.keys(data).forEach((key) => {
if (HEADER_WRAPPER_TEXTS[key]) {
arr.push({
label: HEADER_WRAPPER_TEXTS[key],
value: data[key],
name: key,
})
}
})
setheaderWrapperData(arr)
console.log(arr, '组合的数据')
}
}, [data])
// 提交后返回
const handleModalOK = () => {
setvisible(false)
setTimeout(() => {
history.goBack()
}, 1000)
}
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
className={style.header}
onBack={() => history.goBack()} onBack={() => history.goBack()}
title={ title={
<> <>
<div className={style['headerTop']}> <div className={style['headerTop']}>
<div className={style['headerTop-prefix']}></div> <div className={style['headerTop-prefix']}></div>
<div className={style['headerTop-name']}> <div className={style['headerTop-name']}>
报价单号:10086 { Number(view) === 1 ? '询价单号' : '报价单号'}{ Number(view) === 1 ? data.inquiryListNo : data.quotationNo}
</div> </div>
<div className={style[`levelIcon${'1'}`]}></div> <div className={style[`levelIcon${'1'}`]}></div>
</div> </div>
...@@ -209,6 +350,9 @@ const Details: React.FC<{}> = () => { ...@@ -209,6 +350,9 @@ const Details: React.FC<{}> = () => {
} }
extra={ extra={
<> <>
{
(Number(type) === 4 && data.interiorState === 1) &&
<>
<Button> <Button>
<StopOutlined />审核不通过 <StopOutlined />审核不通过
</Button> </Button>
...@@ -217,58 +361,67 @@ const Details: React.FC<{}> = () => { ...@@ -217,58 +361,67 @@ const Details: React.FC<{}> = () => {
</Button> </Button>
</> </>
} }
{
(Number(type) === 1 && data.externalState === 1 && data.interiorState === 3) &&
<Button className={style['saveBtn']} onClick={()=>setvisible(true)}>
<CheckSquareOutlined />提交
</Button>
}
</>
}
content={ content={
<div className={style['headerMain']}> < div className={style['headerMain']} >
<div className={style['headerMain-left']}> <div className={style['headerMain-left']}>
{
Number(type) !== 4 &&
<div className={style['headerMain-left-option']}> <div className={style['headerMain-left-option']}>
<div>对应需求单号:</div> <div>询价单号:</div>
<div><Button type="link">SPTY12</Button> </div> <div><a>{data.inquiryListNo}</a> </div>
</div>
<div className={style['headerMain-left-option']}>
<div>需求摘要:</div>
<div>进口头层黄牛皮荔枝纹</div>
</div>
<div className={style['headerMain-left-option']}>
<div>商品品类:</div>
<div>
成品皮 --> 牛皮 --> 头层牛皮
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>会员名称:</div>
<div>
温州隆昌手袋有限公司
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>报价截止时间:</div>
<div>
2020-09-09 12:58:25
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>单据时间:</div>
<div>
2020-09-09 12:58:25
</div>
</div> </div>
}
<div className={style['headerMain-left-option']}> <div className={style['headerMain-left-option']}>
<div>外部状态:</div> <div>询价会员:</div>
<div> <div><a>{data.memberName}</a> </div>
待提交
</div> </div>
</div> {headerWrapperData && headerWrapperData.map(item => (
<div className={style['headerMain-left-option']}> <div key={item.name} className={style['headerMain-left-option']}>
<div>内部状态</div> <div>{item.label}</div>
<div> <div>
待审核 { item.name === 'externalState' ?
</div> <StatusColors status={item.value} type='inquiry' /> :
item.name === 'interiorState' ?
quoteOrderInternalState(item.value) :
item.value
}
</div> </div>
</div> </div>
))}
</div> </div>
</div >
} }
> >
<Card className={style.item_wrap}> <Card className={style.item_wrap}>
{
Number(type) === 4 ?
<>
<div className={style.mainCol_title}>外部流转</div>
<Steps
style={{ padding: '20px 0' }}
progressDot
current={1}
>
{detailData.externalStateStep.items.map((item, index) => {
return (
<Step
key={index}
title={item.title}
description={item.desc}
/>
);
})}
</Steps>
</>
:
<Tabs> <Tabs>
<TabPane tab="外部流转" key="1"> <TabPane tab="外部流转" key="1">
<Steps <Steps
...@@ -305,16 +458,18 @@ const Details: React.FC<{}> = () => { ...@@ -305,16 +458,18 @@ const Details: React.FC<{}> = () => {
</Steps> </Steps>
</TabPane> </TabPane>
</Tabs> </Tabs>
}
</Card> </Card>
<Card className={style.item_wrap}> <Card className={style.item_wrap}>
<div className={style.mainCol_title}>询价商品</div> <div className={style.mainCol_title}>询价商品</div>
<Table columns={inquiryGoods} pagination={false} /> <Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />
</Card> </Card>
<Card className={style.item_wrap}> <Card className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem['base'].title}</div> <div className={style.mainCol_title}>{infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].title}</div>
<div className={style['mainCol-rows']}> <div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}> <div className={style['mainCol-rows-cols']}>
{infoTem['base'].leftElem.map( {infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].leftElem.map(
(item: any, index: number) => { (item: any, index: number) => {
return ( return (
<div className={style['cols-main']} key={index}> <div className={style['cols-main']} key={index}>
...@@ -330,7 +485,7 @@ const Details: React.FC<{}> = () => { ...@@ -330,7 +485,7 @@ const Details: React.FC<{}> = () => {
)} )}
</div> </div>
<div className={style['mainCol-rows-cols']}> <div className={style['mainCol-rows-cols']}>
{infoTem['base'].centerElem.map( {infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].centerElem.map(
(item: any, index: number) => { (item: any, index: number) => {
return ( return (
<div className={style['cols-main']} key={index}> <div className={style['cols-main']} key={index}>
...@@ -345,7 +500,7 @@ const Details: React.FC<{}> = () => { ...@@ -345,7 +500,7 @@ const Details: React.FC<{}> = () => {
)} )}
</div> </div>
<div className={style['mainCol-rows-cols']}> <div className={style['mainCol-rows-cols']}>
{infoTem['base'].rightElem.map( {infoTem[(Number(type) === 1 || Number(type) === 5) ? 'freight' : 'base'].rightElem.map(
(item: any, index: number) => { (item: any, index: number) => {
return ( return (
<div className={style['cols-main']} key={index}> <div className={style['cols-main']} key={index}>
...@@ -363,18 +518,46 @@ const Details: React.FC<{}> = () => { ...@@ -363,18 +518,46 @@ const Details: React.FC<{}> = () => {
</Card> </Card>
<Card className={style.item_wrap}> <Card className={style.item_wrap}>
<div className={style.mainCol_title}>附件</div> <div className={style.mainCol_title}>附件</div>
{/* <div className={style.upload_data}>
{
data.enclosureUrls &&
data.enclosureUrls.map((v,i) => (
<div key={i} className={style.upload_item}>
<div className={style.upload_left}>
<LinkOutlined />
<span>{v.name}</span>
</div>
</div>
))
}
</div> */}
</Card> </Card>
<Card className={style.item_wrap}> <Card className={style.item_wrap}>
{
Number(type) === 4 ?
<>
<div className={style.mainCol_title}>外部流转记录</div>
<Table columns={flowRecord.external} rowKey='id' pagination={false} dataSource={data.externalInquiryListLogResponses} />
</>
:
<Tabs> <Tabs>
<TabPane tab="外部流转记录" key="1"> <TabPane tab="外部流转记录" key="1">
<Table columns={flowRecord.external} pagination={false} /> <Table columns={flowRecord.external} rowKey='id' pagination={false} dataSource={data.externalInquiryListLogResponses} />
</TabPane> </TabPane>
<TabPane tab="内部流转记录" key="2"> <TabPane tab="内部流转记录" key="2">
<Table columns={flowRecord.interior} pagination={false} /> <Table columns={flowRecord.interior} rowKey='id' pagination={false} dataSource={data.interiorInquiryListLogResponses} />
</TabPane> </TabPane>
</Tabs> </Tabs>
}
</Card> </Card>
</PageHeaderWrapper> <AuditModal
id={id}
type={type}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
/>
</PageHeaderWrapper >
) )
} }
......
...@@ -23,3 +23,34 @@ ...@@ -23,3 +23,34 @@
} }
} }
} }
.header {
:global {
.ant-page-header {
padding: 24px 24px !important;
}
}
}
.upload_item {
width: 498px;
padding: 5px 8px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #FAFBFC;
.upload_left {
display: flex;
align-items: center;
color: #00B37A;
cursor: pointer;
:global {
.anticon-link {
color: #00B37A;
font-size: 16px;
margin-right: 8px;
}
}
}
}
\ No newline at end of file
...@@ -55,13 +55,15 @@ const ReviewList: React.FC<parmas> = (props) => { ...@@ -55,13 +55,15 @@ const ReviewList: React.FC<parmas> = (props) => {
title: '报价单号', title: '报价单号',
key: 'quotationNo', key: 'quotationNo',
dataIndex: 'quotationNo', dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=${type}&view=2`}>{text}</EyePreview>
}, },
{ {
title: '询价单号', title: '询价单号',
key: 'inquiryListNo', key: 'inquiryListNo',
dataIndex: 'inquiryListNo', dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}`}>{text}</EyePreview> url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=${type}&view=1`}>{text}</EyePreview>
}, },
{ {
title: '询价单摘要', title: '询价单摘要',
...@@ -105,7 +107,7 @@ const ReviewList: React.FC<parmas> = (props) => { ...@@ -105,7 +107,7 @@ const ReviewList: React.FC<parmas> = (props) => {
title: '操作', title: '操作',
key: 'options', key: 'options',
dataIndex: 'options', dataIndex: 'options',
render: (text: any, record: any) => <Button type='link' onClick={()=>{setId(record.id);setvisible(true);}}>审核</Button> render: (text: any, record: any) => <Button type='link' disabled={record.interiorState === 1} onClick={()=>{setId(record.id);setvisible(true);}}>审核</Button>
}, },
] ]
const format = (text) => { const format = (text) => {
......
...@@ -24,7 +24,7 @@ const EnquiryOrder: React.FC<{}> = (props) => { ...@@ -24,7 +24,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'inquiryListNo', key: 'inquiryListNo',
dataIndex: 'inquiryListNo', dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}`}>{text}</EyePreview> url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=4&view=1`}>{text}</EyePreview>
}, { }, {
title: '询价单摘要', title: '询价单摘要',
key: 'details', key: 'details',
......
import React, { useRef, useState, useEffect } from 'react';
import { Card, Button, Row, Col } from 'antd';
import { history, Link } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
import moment from 'moment';
import { timeRange } from '@/utils/index';
import { ColumnType } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import EyePreview from '@/components/EyePreview';
import { pendingReviewSchema } from '../schema/pendingReview';
import { PageStatus } from '@/hooks/usePageStatus';
import { values, action } from 'mobx';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const PendingSubmit: React.FC<{}> = () => {
const ref = useRef<any>({});
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const columns: ColumnType<any>[] = [{
title: '报价单号',
key: 'quotationNo',
dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=1&view=2`}>{text}</EyePreview>
}, {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=1&view=1`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
dataIndex: 'details',
}, {
title: '询价会员',
key: 'memberName',
dataIndex: 'memberName',
}, {
title: '报价截止时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
}, {
title: '单据时间',
key: 'voucherTime',
dataIndex: 'voucherTime',
}, {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => <StatusColors status={text} type='inquiry' />
}, {
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
filters: filterInternalState,
filterMultiple: false,
onFilter: (value, record) => record.interiorState === value,
render: (text: any) =>
quoteOrderInternalState(text)
},
{
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=1&view=1`}>提交报价单</Link></Button>
}]
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
/**多选 */
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectRow(selectedRows);
setSelectedRowKeys(selectedRowKeys);
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
},
}
/**批量审核通过按钮 */
const controllerBtns = <Row>
<Col span={6}>
<Button onClick={() => handleSubmitAll(selectedRowKeys)}>批量提交审核</Button>
</Col>
</Row>
/**列表数据 */
const data = {
totalCount: 2,
data: [{
id: 1,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}]
}
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderToSubmitProductQuotationList({ ...params }).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
})
}
/**搜索 */
const handleSumbit = (values: any) => {
if (values.voucherTime) {
values.startVoucherTime = timeRange(values.voucherTime).st
values.endVoucherTime = timeRange(values.voucherTime).et
delete values.voucherTime
}
console.log('values', values)
ref.current.reload(values)
}
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
}
return (
<PageHeaderWrapper>
<Card>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => handleSumbit(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'inquiryListNo', FORM_FILTER_PATH)
}}
expressionScope={{
controllerBtns
}}
schema={pendingReviewSchema}
>
</NiceForm>
}
>
</StandardTable>
</Card>
</PageHeaderWrapper>
)
}
export default PendingSubmit
\ No newline at end of file
...@@ -23,12 +23,14 @@ const EnquiryOrder: React.FC<{}> = (props) => { ...@@ -23,12 +23,14 @@ const EnquiryOrder: React.FC<{}> = (props) => {
title: '报价单号', title: '报价单号',
key: 'quotationNo', key: 'quotationNo',
dataIndex: 'quotationNo', dataIndex: 'quotationNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=5&view=2`}>{text}</EyePreview>
},{ },{
title: '询价单号', title: '询价单号',
key: 'inquiryListNo', key: 'inquiryListNo',
dataIndex: 'inquiryListNo', dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}`}>{text}</EyePreview> url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}&type=5&view=1`}>{text}</EyePreview>
}, { }, {
title: '询价单摘要', title: '询价单摘要',
key: 'details', key: 'details',
......
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