Commit 3e2d8bc1 authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev

parents 2bf79e86 10c01578
......@@ -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: 询价报价
* @param {type}
* @return {type}
......@@ -310,62 +366,61 @@ const TranactionRoute = {
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/components/details'
},
// 待提交报价单
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingSubmit',
name: 'pendingSubmit',
component: '@/pages/transaction/inquiryQuote/pendingSubmit'
},
]
},
/**
* @description: 商品询
* @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/confirmInquiryQuote',
name:'confirmInquiryQuote',
key:'confirmInquiryQuote',
routes: [
// 报价单查询
{
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder',
name: 'addEnquiryOrder',
component: '@/pages/transaction/goodsOffer/addEnquiryOrder'
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/quoteOrder',
name: 'quoteOrder',
component: '@/pages/transaction/confirmInquiryQuote/quoteOrder'
},
// 新建报价单
// 待提交审核报价单
{
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/add',
name: 'add',
hideInMenu: true,
component: '@/pages/transaction/goodsOffer/addEnquiryOrder/add'
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/pendingSubmitReview',
name: 'pendingSubmitReview',
component: '@/pages/transaction/confirmInquiryQuote/pendingSubmitReview'
},
// 待审核询价单(一级)
{
path: '/memberCenter/tranactionAbility/goodsOffer/pendingReviewOne',
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/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',
component: '@/pages/transaction/goodsOffer/pendingReviewTwo'
},
// 待提交询价单
{
path: '/memberCenter/tranactionAbility/goodsOffer/pendingSubmit',
name: 'pendingSubmit',
component: '@/pages/transaction/goodsOffer/pendingSubmit'
component: '@/pages/transaction/confirmInquiryQuote/pendingReviewTwo'
},
// 详情
{
path: '/memberCenter/tranactionAbility/goodsOffer/components/details',
path: '/memberCenter/tranactionAbility/confirmInquiryQuote/components/details',
name: 'details',
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 {
'menu.tranactionAbility.electronicContracts.classSearch': '合同模板参数查询',
'menu.tranactionAbility.electronicContracts.template': '合同模板',
'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.enquiryOrder': '询价单查询',
'menu.tranactionAbility.goodsOffer.addEnquiryOrder': '待新增价单',
'menu.tranactionAbility.goodsOffer.add': '新建价单',
'menu.tranactionAbility.goodsOffer.addEnquiryOrder': '待新增价单',
'menu.tranactionAbility.goodsOffer.add': '新建价单',
'menu.tranactionAbility.goodsOffer.details': '新建询价单',
'menu.tranactionAbility.goodsOffer.pendingReviewOne': '待审核价单(一级)',
'menu.tranactionAbility.goodsOffer.pendingReviewTwo': '待审核价单(二级)',
'menu.tranactionAbility.goodsOffer.pendingSubmit': '待提交价单',
// 商品询
'menu.tranactionAbility.goodsOffer.pendingReviewOne': '待审核价单(一级)',
'menu.tranactionAbility.goodsOffer.pendingReviewTwo': '待审核价单(二级)',
'menu.tranactionAbility.goodsOffer.pendingSubmit': '待提交价单',
// 询价报
'menu.tranactionAbility.inquiryQuote': '询价报价',
'menu.tranactionAbility.inquiryQuote.enquiryOrder': '询价单查询',
'menu.tranactionAbility.inquiryQuote.quoteOrder': '报价单查询',
......
import React, { Component,ReactNode } from 'react';
import {Badge} from 'antd'
import {Badge, Tag} from 'antd'
import statuStyle from './colorTag'
/****** *********************** 需求单 ************************** */
/**
......@@ -136,8 +136,21 @@ export const enquiryOfferConfirmSearchInteriorState = (text:any) => {
export const quoteOrderInternalState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="待提交审核" />:
text === 2 ? component = <Badge status='default' text="待审核" />:
text === 3 ? component = <Badge status='default' text="审核通过" />:
component = <Badge status='processing' text="审核不通过" />
text === 2 ? component = <Badge status='warning' text="待审核" />:
text === 3 ? component = <Badge status='success' 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;
}
\ 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 "../../../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
This diff is collapsed.
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()
const { onFieldChange$ } = FormEffectHooks;
export interface Params {
id: number | string;
type: number | string; //1是待提交询价单 2是一级 3是二级
type: number | string; //1.待提交报价单,2.待审核报价单一级,3.待审核报价单二级
dialogVisible: boolean;
onCancel: Function;
onOK?: Function;
......@@ -36,7 +36,7 @@ const AuditModal: React.FC<Params> = (props) => {
value.id = props.id
switch (props.type) {
case 1:
PublicApi.postOrderInquirySubmit(value).then(res => {
PublicApi.postOrderProductQuotationtToSubmit(value).then(res => {
if(res.code === 1000) {
props.onOK()
}
......
......@@ -22,4 +22,35 @@
}
}
}
}
.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) => {
title: '报价单号',
key: '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: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
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: '询价单摘要',
......@@ -105,7 +107,7 @@ const ReviewList: React.FC<parmas> = (props) => {
title: '操作',
key: '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) => {
......
......@@ -24,7 +24,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
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: '询价单摘要',
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) => {
title: '报价单号',
key: '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: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
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: '询价单摘要',
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