Commit 8aa13f6c authored by LeeJiancong's avatar LeeJiancong

'新增确认报价-待确认报价单页面和对接'

parent 049e27ad
......@@ -3,7 +3,7 @@
* @Date: 2020-07-31 19:56:22
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-28 11:27:23
* @LastEditTime: 2020-09-29 17:47:43
*/
const TranactionRoute = {
......@@ -253,8 +253,15 @@ const TranactionRoute = {
path:'/memberCenter/tranactionAbility/enquiryOfferConfirm/enquiryTwo',
name:'enquiryTwo',
component: '@/pages/transaction/enquiryOfferConfirm/enquiryTwo'
},
//待确认报价单
{
path:'/memberCenter/tranactionAbility/enquiryOfferConfirm/enquiryOfferComfirmSearch',
name:'enquiryOfferComfirmSearch',
component: '@/pages/transaction/enquiryOfferConfirm/enquiryOfferComfirmSearch'
}
]
},
/**
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-28 17:37:59
* @LastEditTime: 2020-09-29 17:48:52
*/
export default {
......@@ -202,6 +202,8 @@ export default {
'menu.tranactionAbility.enquiryOfferConfirm.enquiryOne': '待审核报价单(一级)',
'menu.tranactionAbility.enquiryOfferConfirm.enquiryTwo': '待审核报价单(二级)',
'menu.tranactionAbility.enquiryOfferConfirm.viewEnquiryDetail':'报价单详情',
'menu.tranactionAbility.enquiryOfferConfirm.enquiryOfferComfirmSearch':'待确认报价单',
// 供应商评价
'menu.tranactionAbility.supplierEvaluation': '供应会员评价管理',
......
......@@ -228,9 +228,9 @@ const detailInfo: React.FC<{}> = () => {
setdataInfo(res.data)
let current = 0
if(res.data.status <= 2){
current = 0
}else if(res.data.status == 3 || res.data.status == 4){
current = 1
}else if(res.data.status == 3 || res.data.status == 4){
current = 2
}
setDetailData({...detailData,current: current})
})
......@@ -259,10 +259,10 @@ const detailInfo: React.FC<{}> = () => {
if(res.data.status == 1){
current = 0
}else if(res.data.status == 2){
current = 0
current = 1
setIsextraOption(true)
}else if(res.data.status == 3 || res.data.status == 4){
current = 1
current = 2
}
setDetailData({...detailData,current: current})
})
......
......@@ -3,7 +3,7 @@
* @Date: 2020-09-23 10:24:42
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-24 14:21:32
* @LastEditTime: 2020-09-29 14:25:20
* 外部流转记录
*/
import React, { Component,useRef,ReactNode } from 'react';
......@@ -34,8 +34,8 @@ const columns: ColumnType<any>[] = [
let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="待提交" />:
text === 2 ? component = <Badge status='processing' text="待确认" />:
text === 3 ? component = <Badge status='success' text="接受物流单" />:
component = <Badge status='error' text="不接受物流单" />
text === 3 ? component = <Badge status='error' text="不接受物流单" />:
component = <Badge status='success' text="接受物流单" />
return component;
},
},
......
......@@ -3,7 +3,7 @@
* @Date: 2020-07-28 11:25:30
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-29 10:54:58
* @LastEditTime: 2020-09-29 11:47:41
*/
import React, { Component, useEffect, useRef, useState, ReactNode } from 'react'
......@@ -802,7 +802,6 @@ const Deatail: React.FC<{}> = () => {
</Row>
{state.value.map((item: any, index: any) => {
const onRemove = (index: number) => {
console.log(index)
// let _list = list.splice(index, 1)
// console.log('_list', _list,mutators)
mutators.remove(index)
......
......@@ -286,7 +286,7 @@ export const enquieryOfferSearchSchema: ISchema = {
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'价会员'
placeholder:'价会员'
}
},
// category:{
......
......@@ -10,7 +10,7 @@ import { PublicApi } from '@/services/api'
import {PATTERN_MAPS} from '@/constants/regExp'
export interface Params {
id: number | string;
type: number|string;//1是一级 2是二级 3是待提交审核
type: number|string;//1是一级 2是二级 3是待提交审核 5确认报价单
dialogVisible: boolean;
onCancel: Function;
onOK?: Function;
......@@ -44,8 +44,13 @@ const comfirmDialog: React.FC<Params> = (props) => {
props.onOK()
}
})
}else if(props.type == 5){//确认报价单
PublicApi.postOrderToBeConfirmed(value).then(res => {
if (res.code === 1000) {
props.onOK()
}
})
}
}
useEffect(() => {
return () => {
......
......@@ -3,7 +3,7 @@
* @Date: 2020-08-24 11:32:05
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-28 15:56:00
* @LastEditTime: 2020-09-29 19:18:31
*/
import React, { Component, useEffect, useState, ReactNode, useRef } from 'react';
import { Row, Col, Modal, Table, Tooltip, Input, Select,Switch, Button, Popconfirm, Card, Tag, Badge, Steps, Tabs, } from 'antd'
......@@ -342,6 +342,8 @@ const detailInfo: React.FC<{}> = () => {
if(data.externalState == 1){
setIsextraOption(true)
}
}else if(pagetype == 5){
setIsextraOption(true)
}
// PublicApi.getLogisticsSelectListShipperAddress().then(res => {
......@@ -531,15 +533,15 @@ const detailInfo: React.FC<{}> = () => {
(isextraOption &&
<>
{
(pagetype == 1 || pagetype == 2) &&
(pagetype == 1 || pagetype == 2 || pagetype == 5) &&
<>
<Button onClick={() => setvisible(true)}>
<StopOutlined />
审核不通过
pagetype == 5 ? '不接受报价':'审核不通过'
</Button>
<Button onClick={() => setvisible(true)} className={style['saveBtn']}>
<CheckSquareOutlined />
审核通过
pagetype == 5 ? '接受报价':'审核通过'
</Button>
</>
}
......
/*
* @Author: LeeJiancong
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-29 19:09:40
*/
/**
* @description: 组件描述: 只有在左边的 没有其他提交条件
* @param {type}
* @return {type}
*/
import React, { ReactNode, useRef, useState, useEffect } from 'react';
import { history } from 'umi';
import {
Button,
Card,
Space,
Row,
Col,
Dropdown,
Menu,
Popconfirm
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
PlusOutlined, DownOutlined, DeleteOutlined
} from '@ant-design/icons';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import {
IFormFilter,
IButtonFilter,
} from 'god/dist/src/standard-table/TableController';
import EyePreview from '@/components/EyePreview';
import StatusSwitch from '@/components/StatusSwitch';
import {
interiorState, interiorStateTwo,
enquirySearchInteriorState, enquirySearchexternalState
} from '../../common/tableStatusList'
import statuStyle from '../../common/colorTag'
import NiceForm from '@/components/NiceForm';
import { timeRange } from '@/utils/index'
import { filterInteriorStateList, filterExternalStateList } from '../../common/statusList'
import moment from 'moment'
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { PageStatus } from '@/hooks/usePageStatus'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { searchSelectGetSelectCategoryOptionEffect } from '../../effect/index'
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { enquieryOfferSearchSchema } from '../schema';
import { PublicApi } from '@/services/api';
import { values, action } from 'mobx';
export interface listParams {
type: number;
des?: string;
}
const formActions = createFormActions();
const List: React.FC<listParams> = (props) => {
const ref = useRef<any>({})
const [more, setmore] = useState(false)
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
/**
* @description:
* @param {type} type: 1报价单查询 2待确认报价单
* @return {type}
*/
const handleToDetail = (type, id) => {
if(props.type === 1){
if (type === 1) {
history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?page_type=${4}&id=${id}`)
} else {
history.push(`/memberCenter/tranactionAbility/enquiryOfferConfirm/viewEnquiryDetail?page_type=${4}&id=${id}`)
}
}else if(props.type === 2){
if (type === 1) {
history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?page_type=${4}&id=${id}`)
} else {
history.push(`/memberCenter/tranactionAbility/enquiryOfferConfirm/viewEnquiryDetail?page_type=${5}&id=${id}`)
}
}
}
const fetchData = async (params: any) => {
if(props.type === 1){
const res = await PublicApi.getOrderConfirmationQuotationList(params);
return res.data
}else if(props.type === 2){//待确认
const res = await PublicApi.getOrderPendingReviewListList(params);
return res.data
}
}
const columns: ColumnType<any>[] = [
{
title: '报价单号',
key: 'quotationNo',
dataIndex: 'quotationNo',
align: 'center',
render: (text: any, records: any) => <EyePreview type="button" handleClick={() => {
handleToDetail(2, records.id)
}}>{text}</EyePreview>
},
{
title: '需求单号',
key: 'requisitionFormNo',
dataIndex: 'requisitionFormNo',
align: 'center',
render: (text: any, records: any) => <EyePreview type="button" handleClick={() => {
handleToDetail(1, records.requisitionId)//需求单id
}}>{text}</EyePreview>
},
{
title: '报价单摘要',
key: 'quotationSummary',
dataIndex: 'quotationSummary',
align: 'left'
},
{
title: '需求会员',
key: 'demandMembers',
dataIndex: 'demandMembers',
align: 'left'
},
{
title: '报价截至时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
align: 'center',
render: (text: any) => format(text)
},
{
title: '单据时间',
key: 'documentsTime',
dataIndex: 'documentsTime',
align: 'center',
render: (text: any) => format(text)
},
{
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
align: 'center',
render: (text: any, reconds) => {
let component: ReactNode = null
if (text == 3) {
component = <><span style={statuStyle.warn}>审核不通过需求单</span></>
} else if (text == 1) {
component = <><span style={statuStyle.default}>待提交需求单</span></>
}
return component
}
},
{
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
align: 'center',
render: (text: any) =>
enquirySearchInteriorState(text)
}
]
useEffect(() => {
}, [])
const toEdit = (id: number | string) => {
history.push(`/memberCenter/tranactionAbility/enquirySubmit/addEnquiry?id=${id}`)
}
/**
* @description: 删除
* @param {type}
* @return {type}
*/
const handleDelete = (arr: number[] | string[]) => {
PublicApi.postOrderRequisitionFormDeleteAll({ ids: arr }).then(res => {
ref.current.reload()
})
}
//提交审核
const handleSubmit = (id) => {
PublicApi.postOrderNewRequisitionFormAudit({ id: id }).then(res => {
ref.current.reload()
})
}
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 handleBatchDel = (e: any) => {
}
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}>
</Col>
</Row>
return (
<PageHeaderWrapper>
<Card>
{
props.type === 1 ?//无多选
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => handleSumbit(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'quotationNo', FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions, 'category')
})
}}
schema={enquieryOfferSearchSchema}
>
</NiceForm>
}
/>
:
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
fetchTableData={(params: any) => fetchData(params)}
rowSelection={rowSelection}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => handleSumbit(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'quotationNo', FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions, 'category')
})
}}
schema={enquieryOfferSearchSchema}
>
</NiceForm>
}
/>
}
</Card>
</PageHeaderWrapper>
)
}
export default List
\ No newline at end of file
import React, { Component } from 'react'
import OrderList from "../components/formleftIndex"
const List = () => {
return (
<OrderList des='待确认报价单' type={2}/>
)
}
export default List
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-26 16:39:15
*/
/**
* @description: 组件描述:
* @param {type}
* @return {type}
*/
import React, { ReactNode, useRef, useState,useEffect } from 'react';
import { history } from 'umi';
import {
Button,
Card,
Space,
Row,
Col,
Dropdown,
Menu,
Popconfirm
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
PlusOutlined,DownOutlined,DeleteOutlined
} from '@ant-design/icons';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import {
IFormFilter,
IButtonFilter,
} from 'god/dist/src/standard-table/TableController';
import EyePreview from '@/components/EyePreview';
import StatusSwitch from '@/components/StatusSwitch';
import {interiorState,interiorStateTwo,
enquirySearchInteriorState,enquirySearchexternalState} from '../../common/tableStatusList'
import statuStyle from '../../common/colorTag'
import NiceForm from '@/components/NiceForm';
import {timeRange} from '@/utils/index'
import {filterInteriorStateList,filterExternalStateList} from './../../common/statusList'
import moment from 'moment'
import { createFormActions, FormEffectHooks } from '@formily/antd';
import {PageStatus} from '@/hooks/usePageStatus'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import {searchSelectGetSelectCategoryOptionEffect} from '../../effect/index'
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { enquieryOfferSearchSchema } from '../schema';
import { PublicApi } from '@/services/api';
import { values, action } from 'mobx';
export interface listParams{
type: number;
des?: string;
}
const formActions = createFormActions();
const List:React.FC<{listParams}> = (props) => {
const ref = useRef<any>({})
const [more, setmore] = useState(false)
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
/**
* @description:
* @param {type} type: 1 需求发布 2报价 可以根据props.type处理
* @return {type}
*/
const handleToDetail= (type,id) => {
if(type === 1){
history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?page_type=${4}&id=${id}`)
}else{
history.push(`/memberCenter/tranactionAbility/enquiryOfferConfirm/viewEnquiryDetail?page_type=${4}&id=${id}`)
}
}
const fetchData = async (params: any) => {
const res = await PublicApi.getOrderConfirmationQuotationList(params);
return res.data
}
const columns : ColumnType<any>[] = [
{
title:'报价单号',
key:'quotationNo',
dataIndex:'quotationNo',
align:'center',
render: (text: any,records: any) => <EyePreview type="button" handleClick={() => {
handleToDetail(2,records.id)
}}>{text}</EyePreview>
},
{
title:'需求单号',
key:'requisitionFormNo',
dataIndex:'requisitionFormNo',
align:'center',
render: (text: any,records: any) => <EyePreview type="button" handleClick={() => {
handleToDetail(1,records.requisitionId)//需求单id
}}>{text}</EyePreview>
},
{
title:'报价单摘要',
key:'quotationSummary',
dataIndex:'quotationSummary',
align:'left'
},
{
title:'需求会员',
key:'demandMembers',
dataIndex:'demandMembers',
align:'left'
},
{
title:'报价截至时间',
key:'quotationAsTime',
dataIndex:'quotationAsTime',
align:'center',
render:(text:any)=> format(text)
},
{
title:'单据时间',
key:'documentsTime',
dataIndex:'documentsTime',
align:'center',
render:(text:any)=> format(text)
},
{
title:'外部状态',
key:'externalState',
dataIndex:'externalState',
align:'center',
render: (text: any, reconds) => {
let component: ReactNode = null
if (text == 3) {
component = <><span style={statuStyle.warn}>审核不通过需求单</span></>
}else if (text == 1) {
component = <><span style={statuStyle.default}>待提交需求单</span></>
}
return component
}
},
{
title:'内部状态',
key:'interiorState',
dataIndex:'interiorState',
align:'center',
render:(text:any) =>
enquirySearchInteriorState(text)
}
]
useEffect(()=> {
},[])
const toEdit = (id:number | string) => {
history.push(`/memberCenter/tranactionAbility/enquirySubmit/addEnquiry?id=${id}`)
}
/**
* @description: 删除
* @param {type}
* @return {type}
*/
const handleDelete = (arr:number[]| string[]) => {
PublicApi.postOrderRequisitionFormDeleteAll({ ids: arr }).then(res => {
ref.current.reload()
})
}
//提交审核
const handleSubmit = (id) => {
PublicApi.postOrderNewRequisitionFormAudit({ id: id }).then(res => {
ref.current.reload()
})
}
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 handleBatchDel = (e:any) => {
}
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}>
</Col>
</Row>
import React, { Component } from 'react'
import OrderList from "../components/formleftIndex"
const List = () => {
return (
<PageHeaderWrapper>
<Card>
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{rowKew:'id'}}
fetchTableData={(params: any) => fetchData(params)}
// rowSelection={rowSelection}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => handleSumbit(values)}
effects={($,actions) => {
useStateFilterSearchLinkageEffect($,actions,'quotationNo',FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
searchSelectGetSelectCategoryOptionEffect(actions,'category')
})
}}
schema={enquieryOfferSearchSchema}
>
</NiceForm>
}
/>
</Card>
</PageHeaderWrapper>
<OrderList des='报价单查询' type={1}/>
)
}
export default List
\ No newline at end of file
......@@ -78,7 +78,7 @@ export const commonEnquieryOfferSchema: ISchema = {
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'价会员'
placeholder:'价会员'
}
},
// category:{
......@@ -286,7 +286,7 @@ export const enquieryOfferSearchSchema: ISchema = {
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'价会员'
placeholder:'价会员'
}
},
// category:{
......
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