Commit 79fad5cf authored by 前端-许佳敏's avatar 前端-许佳敏

:wq

Merge branch 'dev' into test
parents d6caf595 26aeae59
......@@ -22,27 +22,32 @@ const TranactionRoute = {
name:'electronicContracts',
key:'electronicContracts',
routes: [
// 电子签章申请
{
path: '/memberCenter/tranactionAbility/electronicContracts/apply',
name: 'apply',
component: '@/pages/transaction/electronicContracts/apply/index',
},
// 合同模板参数查询
{
path: '/memberCenter/tranactionAbility/electronicContracts/classSearch',
name: 'classSearch',
component: '@/pages/transaction/electronicContracts/classSearch/index',
},
// 合同模板
{
path: '/memberCenter/tranactionAbility/electronicContracts/template',
name: 'template',
component: '@/pages/transaction/electronicContracts/template/index',
},
// 企业信息核验
{
path: '/memberCenter/tranactionAbility/electronicContracts/enterpriseCertified',
name: 'enterpriseCertified',
hideInMenu: true,
component: '@/pages/transaction/electronicContracts/enterpriseCertified/index',
},
// 新建合同模板
{
path: '/memberCenter/tranactionAbility/electronicContracts/addContract',
name: 'addContract',
......@@ -265,6 +270,49 @@ const TranactionRoute = {
]
},
/**
* @description: 询价报价
* @param {type}
* @return {type}
*/
{
path:'/memberCenter/tranactionAbility/inquiryQuote',
name:'inquiryQuote',
key:'inquiryQuote',
routes: [
//询价单查询
{
path: '/memberCenter/tranactionAbility/inquiryQuote/enquiryOrder',
name: 'enquiryOrder',
component: '@/pages/transaction/inquiryQuote/enquiryOrder'
},
//报价单查询
{
path: '/memberCenter/tranactionAbility/inquiryQuote/quoteOrder',
name: 'quoteOrder',
component: '@/pages/transaction/inquiryQuote/quoteOrder'
},
// 待审核询价单(一级)
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewOne',
name: 'pendingReviewOne',
component: '@/pages/transaction/inquiryQuote/pendingReviewOne'
},
// 待审核询价单(二级)
{
path: '/memberCenter/tranactionAbility/inquiryQuote/pendingReviewTwo',
name: 'pendingReviewTwo',
component: '@/pages/transaction/inquiryQuote/pendingReviewTwo'
},
// 详情
{
path: '/memberCenter/tranactionAbility/inquiryQuote/components/details',
name: 'details',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/components/details'
},
]
},
/**
* @description: 商品询价
* @param {type}
* @return {type}
......@@ -274,37 +322,44 @@ const TranactionRoute = {
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',
......
......@@ -44,8 +44,8 @@ export enum LAYOUT_TYPE {
}
// 本地环境跳过权限校验
export const isDev = process.env.NODE_ENV === "development"
// export const isDev = false
// export const isDev = process.env.NODE_ENV === "development"
export const isDev = false
export const Environment_Status = {
0: "所有",
......@@ -843,3 +843,11 @@ export const DeliverySideStateTexts = {
5: '待回单订单',
6: '已回单',
}
// 询价外部状态
export const InquiryStateTexts = {
1: '待提交',
2: '待确认',
3: '接受报价',
4: '不接受报价',
}
\ No newline at end of file
......@@ -120,8 +120,7 @@ export default {
'menu.tranactionAbility.electronicContracts.classSearch': '合同模板参数查询',
'menu.tranactionAbility.electronicContracts.template': '合同模板',
'menu.tranactionAbility.electronicContracts.addContract': '新建合同模板',
// 商品询价
// 询价报价
'menu.tranactionAbility.goodsOffer': '商品询价',
'menu.tranactionAbility.goodsOffer.enquiryOrder': '询价单查询',
'menu.tranactionAbility.goodsOffer.addEnquiryOrder': '待新增询价单',
......@@ -130,6 +129,16 @@ export default {
'menu.tranactionAbility.goodsOffer.pendingReviewOne': '待审核询价单(一级)',
'menu.tranactionAbility.goodsOffer.pendingReviewTwo': '待审核询价单(二级)',
'menu.tranactionAbility.goodsOffer.pendingSubmit': '待提交询价单',
// 商品询价
'menu.tranactionAbility.inquiryQuote': '询价报价',
'menu.tranactionAbility.inquiryQuote.enquiryOrder': '询价单查询',
'menu.tranactionAbility.inquiryQuote.quoteOrder': '报价单查询',
'menu.tranactionAbility.inquiryQuote.addEnquiryOrder': '待新增询价单',
'menu.tranactionAbility.inquiryQuote.add': '新建询价单',
'menu.tranactionAbility.inquiryQuote.details': '新建询价单',
'menu.tranactionAbility.inquiryQuote.pendingReviewOne': '待审核询价单(一级)',
'menu.tranactionAbility.inquiryQuote.pendingReviewTwo': '待审核询价单(二级)',
'menu.tranactionAbility.inquiryQuote.pendingSubmit': '待提交询价单',
//进销存
'menu.tranactionAbility.stockSellStorage': '进销存',
'menu.tranactionAbility.stockSellStorage.warehouse': '仓库',
......
import React, { useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { SaveOutlined } from '@ant-design/icons';
import { Button, Card, Input } from 'antd';
import { Button, Card, Input, Modal } from 'antd';
import { history } from 'umi';
import ReutrnEle from '@/components/ReturnEle';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import NiceForm from '@/components/NiceForm';
import addSchema from '../../schema/addSchema';
import { LinkOutlined, PlusOutlined } from '@ant-design/icons';
import ModalContainer from '../../components/ModalContainer';
import EnterPrise from '../../components/EnterPrise';
/*
* @Author: Bill
* @Date: 2020-10-12 11:36:38
* @Description: 新增生产通知单
*/
const CustomModal = ({visible, cancel}) => {
return (
<Modal visible={visible} onCancel={cancel} >
Hello World
</Modal>
)
}
const formActions = createFormActions();
const Add: React.FC<{}> = () => {
const [submitLoading, setSubmitLoading] = useState<boolean>(false);
const connectProduct = <div className='connectBtn'><LinkOutlined style={{marginRight: 4}}/>选择</div>
// 选择加工企业 modal 层
const connectProduct = (
<div>
<ModalContainer>
{
({visible, show, cancel}) => (
<>
<EnterPrise visible={visible} cancel={cancel} ></EnterPrise>
<div onClick={show}>
<LinkOutlined style={{marginRight: 4}}/>
选择
</div>
</>
)
}
</ModalContainer>
</div>
)
const tableAddButton = (
<Button
style={{marginBottom: 16}}
......@@ -41,7 +68,7 @@ const Add: React.FC<{}> = () => {
icon={<SaveOutlined />}
loading={submitLoading}
onClick={() => formActions.submit()}
>
>
保存
</Button>,
]}
......@@ -63,6 +90,8 @@ const Add: React.FC<{}> = () => {
// });
// }}
/>
</Card>
</PageHeaderWrapper>
)
......
......@@ -7,6 +7,7 @@ import Circulation from '../../components/Circulation';
import WrapTable from '../../components/WrapTable';
import OtherRequirement from '../../components/OtherRequirement';
import Appendix from '../../components/Appendix';
import ProcessDetail from '../../components/ProcessDetail';
const { TabPane } = Tabs;
const Detail: React.FC<{}> = () => {
......@@ -56,8 +57,8 @@ const Detail: React.FC<{}> = () => {
</Card>
</div>
<div style={{marginTop: '20px'}}style={{marginTop: '20px'}}>
<Card>
<div style={{marginTop: '20px'}} >
<Card bodyStyle={{padding: '10px 24px 24px 24px'}}>
<Tabs>
<TabPane tab="收发货统计" key="1">
<WrapTable />
......@@ -69,15 +70,27 @@ const Detail: React.FC<{}> = () => {
</Card>
</div>
<div style={{marginTop: '20px'}}>
<Row gutter={4}>
<Col span={18}>
<Row justify="space-between">
<Col flex={4}>
<OtherRequirement />
</Col>
<Col span={6}>
<Col flex={2} style={{marginLeft: '20px'}}>
<Appendix />
</Col>
</Row>
</div>
<div style={{marginTop: '20px'}} >
<Card bodyStyle={{padding: '10px 24px 24px 24px'}}>
<Tabs>
<TabPane tab="外部流转记录" key="1">
<WrapTable />
</TabPane>
<TabPane tab="内部流转记录" key="2">
<WrapTable />
</TabPane>
</Tabs>
</Card>
</div>
</PageHeaderWrapper>
)
}
......
/*
* @Author: your name
* @Date: 2020-10-12 18:27:56
* @LastEditTime: 2020-10-12 18:42:00
* @LastEditTime: 2020-10-13 10:01:23
* @Description: 附件
*/
......@@ -11,7 +11,6 @@
const styles = {
display: 'flex',
flexDirection: 'row',
// justifyContent: 'center',
alignItem: 'center',
color: '#00B37A',
backgroundColor: '#F4F5F7',
......
/**
* 选择加工企业 Modal 组件
*/
import React, { useRef, useEffect } from 'react';
import { Card, Space, Button, Select } from 'antd';
import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
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 columns = [
{
title: '会员ID',
dataIndex: 'id'
},
{
title: '会员名称',
dataIndex: 'name'
},
{
title: '会员类型',
dataIndex: 'type'
},
{
title: '会员角色',
dataIndex: 'role'
},
{
title: '会员等级',
dataIndex: 'level'
}
]
const schema = {
type: 'object',
properties: {
name: {
type: 'string',
'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": {
options: [],
style: {width: '160px'},
placeholder: '请选择会员角色'
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
const EnterPrisesModal = ({visible, cancel}) => {
const ref = useRef<any>({})
const fetchData = async (params: any) => {
let res = await PublicApi.getMemberAbilityInfoPage(params);
return res.data;
};
const handleOkAddMember = () => {
}
return (
<ModalTable
modalTitle='选择会员'
confirm={handleOkAddMember}
cancel={cancel}
visible={visible}
columns={columns}
// rowSelection={memberRowSelection}
fetchTableData={params => fetchData(params)}
formilyProps={
{
ctx: {
schema: schema,
components: { ModalSearch: Search, SearchSelect, Submit, Select } ,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
}
}
}
}
tableProps={{
rowKey: 'memberId'
}}
/>
)
}
export default EnterPrisesModal
\ No newline at end of file
import React, { Component } from 'react';
class ModalContainer extends Component {
state = {
visible: false
}
handleCancel = () => {
this.setState({
visible: false
})
}
show = () => {
this.setState({
visible: true
})
}
render() {
const { visible } = this.state;
const { children } = this.props;
return (
children({
visible: visible,
show: this.show,
cancel: this.handleCancel
})
)
}
}
export default ModalContainer;
\ No newline at end of file
......@@ -5,21 +5,21 @@ const OtherRequirement = () => {
return (
<Card title="其他要求">
<Row>
<Col span={4}>交付说明</Col>
<Col span={3}>交付说明</Col>
<Col span={8}>东莞市石龙镇西葫芦53号交付说明</Col>
<Col span={4}>物流说明</Col>
<Col span={3}>物流说明</Col>
<Col span={8}>东莞市石龙镇西葫芦53号交付说明</Col>
</Row>
<Row style={{margin: '20px 0'}}>
<Col span={4}>付款说明</Col>
<Col span={3}>付款说明</Col>
<Col span={8}>首付 30%, 收货后70%</Col>
<Col span={4}>包装说明</Col>
<Col span={3}>包装说明</Col>
<Col span={8}>纸箱</Col>
</Row>
<Row>
<Col span={4}>税收说明</Col>
<Col span={3}>税收说明</Col>
<Col span={8}>含税</Col>
<Col span={4}>其他说明</Col>
<Col span={3}>其他说明</Col>
<Col span={8}></Col>
</Row>
</Card>
......
.container {
display: flex;
flex-direction: row;
height: 100%;
.menu {
flex-basis: 159px;
display: flex;
flex-direction: column;
justify-content: start;
height: 100%;
.menuItem {
font-size: 12px;
font-weight: 500;
color: #303133;
line-height: 12px;
padding: 10px 24px;
margin-bottom: 15px;
cursor: pointer;
}
.active {
border-left: 2px solid #00B37A;
}
}
.body {
flex: 1;
display: flex;
flex-direction: column;
border-left: 1px solid #EEF0F3;
overflow: scroll;
.common {
padding: 24px 24px 0 24px;
.header {
border-left: 2px solid #00B37A;
color: #606266;
padding: 0 10px;
margin-bottom: 24px;
font-size: 14px;
}
.info {
.infoRow {
margin-bottom: 24px;
.label {
color: #909399;
}
}
}
}
}
}
\ No newline at end of file
import React, { useState, useRef } from 'react';
import styles from './content.less';
import { Row, Col } from 'antd';
import classnames from 'classnames';
const menuList = ["基本信息", "产地", "外观尺寸", "工艺", "特殊说明/其他", "附件", "加工要求"];
const HEIGHT_MAP = {
'基本信息': 0,
'产地': 238,
'外观尺寸': 476,
'工艺': 238 * 3,
'特殊说明/其他': 238 * 4,
'附件': 238 * 4 + 60,
'加工要求': 238 * 4 + 60
}
const Content = () => {
const [active, setActive] = useState<string>("基本信息");
const ref = useRef(null);
const getMenuItemCs = (name: string) => {
return classnames({
[styles.menuItem]: true,
[styles.active]: name === active
})
}
const activeAndScroll = (item) => {
const scrollHeight = HEIGHT_MAP[item];
console.log(scrollHeight);
setActive(item);
// window.scrollTo = scrollHeight;
console.log(ref.current);
ref.current.scrollTop = scrollHeight;
}
return (
<div className={styles.container}>
<div className={styles.menu}>
{
menuList.map((item:string) => {
return (
<div
key={item} className={getMenuItemCs(item)}
onClick={() => activeAndScroll(item)
}>{item}</div>
)
})
}
</div>
<div className={styles.body} ref={ref}>
{
menuList.map((item) => {
return (
<div className={styles.common} key={item}>
<div className={styles.header}>{item}</div>
<div className={styles.info}>
<Row className={styles.infoRow}>
<Col className={styles.label} span={4}>商品ID</Col>
<Col span={12}>11101</Col>
</Row>
<Row className={styles.infoRow}>
<Col className={styles.label} span={4}>商品名称</Col>
<Col span={12}>进口头层牛皮荔枝纹</Col>
</Row>
<Row className={styles.infoRow}>
<Col className={styles.label} span={4}>商品品类</Col>
<Col span={12}> 牛皮</Col>
</Row>
<Row className={styles.infoRow}>
<Col className={styles.label} span={4}>商品品牌</Col>
<Col span={12}>PELLE</Col>
</Row>
</div>
</div>
)
})
}
</div>
</div>
)
}
export default Content;
\ No newline at end of file
import React, { useState } from 'react';
import { Button, Drawer } from 'antd';
import Content from './content';
const ProcessDetail = () => {
const [visible, setVisible] = useState(false);
const onClose = () => {
setVisible(false)
}
const onOpen = () => {
setVisible(true)
}
return (
<>
<Button type="primary" onClick={onOpen}>
查看加工详情
</Button>
<Drawer
title="查看加工明细"
width={720}
onClose={onClose}
visible={visible}
bodyStyle={{ padding: '0'}}
footer={false}
>
<Content />
</Drawer>
</>
)
}
export default ProcessDetail;
\ No newline at end of file
import React, { Component, useEffect, useState, ReactNode, useRef } from 'react';
import { Row, Col, Modal,Table, Tooltip, Input, Select, Button, Popconfirm, Card, Tag, Badge, Steps, } from 'antd'
import { Row, Col, Modal, Table, Tooltip, Input, Select, Button, Popconfirm, Card, Tag, Badge, Steps, } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import { StandardTable } from 'god'
......@@ -23,10 +23,10 @@ const data = [
status: 2,
},
];
interface dataInfoType{
interface dataInfoType {
status: any;
digest?: any;
logisticsOrderNo:string;
logisticsOrderNo: string;
companyName: string;
invoicesTime: any,
detailList: Array<any>,
......@@ -44,17 +44,17 @@ const detailInfo: React.FC<{}> = () => {
let [dataInfo, setdataInfo] = useState<any>({
status: '',
digest: '',
logisticsOrderCode:'',
invoicesNo:'',
companyName:'',
invoicesTime:'',
detailList:[],
logList:[],
logisticsOrderCode: '',
invoicesNo: '',
companyName: '',
invoicesTime: '',
detailList: [],
logList: [],
totalCarton: 0,
totalVolume: 0,
totalWeight: 0,
freightPrice: 0,
settlementWay: ''
settlementWay: '',
})
const [id, setid] = useState(history.location.query.id)
let [visible, setvisible] = useState(false)
......@@ -86,15 +86,15 @@ const detailInfo: React.FC<{}> = () => {
base: {
title: '基本信息',
leftElem: [
{ title: '对应发货单号:', key: 'shipmentOrderNo',value: dataInfo.shipmentOrderCode },
{ title: '对应订单号/售后单:', key: '',value: dataInfo.invoicesNo }
{ title: '对应发货单号:', key: 'shipmentOrderNo', value: dataInfo.shipmentOrderCode || '' },
{ title: '对应订单号/售后单:', key: '', value: dataInfo.invoicesNo || '' }
],
centerElem: [
{ title: '收货方:', key: '',value: dataInfo.receiverName },
{ title: '收货地址:', key: '',value: dataInfo.receiverFullAddress }
{ title: '收货方:', key: '', value: dataInfo.receiverName || '' },
{ title: '收货地址:', key: '', value: dataInfo.receiverFullAddress || '' }
],
rightElem: [
{ title: '发货地址:', key: '',value:dataInfo.shipperFullAddress }
{ title: '发货地址:', key: '', value: dataInfo.shipperFullAddress || '' }
],
elem: [
......@@ -103,8 +103,8 @@ const detailInfo: React.FC<{}> = () => {
freight: {
title: '运费',
leftElem: [
{ title: '运费:', key: 'freight',value: dataInfo.freightPrice },
{ title: '结算方式:', key: '',value: dataInfo.settlementWay }
{ title: '运费:', key: 'freight', value: dataInfo.freightPrice || '' },
{ title: '结算方式:', key: '', value: dataInfo.settlementWay || '' }
]
}
}
......@@ -185,10 +185,10 @@ const detailInfo: React.FC<{}> = () => {
key: 'status',
render: (text: number, record: 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 === 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="不接受物流单" />
return component;
},
},
......@@ -197,16 +197,16 @@ const detailInfo: React.FC<{}> = () => {
dataIndex: 'type',
align: 'center',
key: 'type',
render: (text: number ,record:any) =>
<>{text === 1 ?'提交物流单':'确认物流单'}</>
render: (text: number, record: any) =>
<>{text === 1 ? '提交物流单' : '确认物流单'}</>
},
{
title: '操作时间',
dataIndex: 'operateTime',
align: 'center',
key: 'operateTime',
render:(text: any, record: any) => <>{moment(text).format('YYYY-MM-DD HH:mm:ss')}</>
},
render: (text: any, record: any) => <>{moment(text).format('YYYY-MM-DD HH:mm:ss')}</>
},
{
title: '审核意见',
dataIndex: 'remark',
......@@ -225,14 +225,16 @@ const detailInfo: React.FC<{}> = () => {
//待新增
if (pathname === '/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitDeatil') {
PublicApi.getLogisticsOrderSubmitGet({ id: id }).then(res => {
setdataInfo(res.data)
let current = 0
if(res.data.status <= 2){
current = 1
}else if(res.data.status == 3 || res.data.status == 4){
current = 2
if (res.code === 1000) {
setdataInfo(res.data)
let current = 0
if (res.data.status <= 2) {
current = 1
} else if (res.data.status == 3 || res.data.status == 4) {
current = 2
}
setDetailData({ ...detailData, current: current })
}
setDetailData({...detailData,current: current})
})
}
......@@ -241,30 +243,30 @@ const detailInfo: React.FC<{}> = () => {
PublicApi.getLogisticsOrderConfirmGet({ id: id }).then(res => {
setdataInfo(res.data)
let current = 0
if(res.data.status <= 2){
if (res.data.status <= 2) {
current = 1
}else if(res.data.status == 3 || res.data.status == 4){
} else if (res.data.status == 3 || res.data.status == 4) {
current = 2
}
setDetailData({...detailData,current: current})
setDetailData({ ...detailData, current: current })
})
}
//待确认物流单
if (pathname === '/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmDeatil') {
PublicApi.getLogisticsOrderWaitConfirmGet({ id: id }).then(res => {
setdataInfo(res.data)
let current = 0
if(res.data.status == 1){
if (res.data.status == 1) {
current = 0
}else if(res.data.status == 2){
} else if (res.data.status == 2) {
current = 1
setIsextraOption(true)
}else if(res.data.status == 3 || res.data.status == 4){
} else if (res.data.status == 3 || res.data.status == 4) {
current = 2
}
setDetailData({...detailData,current: current})
setDetailData({ ...detailData, current: current })
})
}
......@@ -273,20 +275,20 @@ const detailInfo: React.FC<{}> = () => {
}, [])
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
PublicApi.getLogisticsOrderWaitSubmitPageOrderLog({...params,orderId:id}).then(res => {
if(res.code === 1000){
PublicApi.getLogisticsOrderWaitSubmitPageOrderLog({ ...params, orderId: id }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
});
};
const handleModalOK = () => {
setvisible(false)
ref.current.reload()
setTimeout(()=> {
setTimeout(() => {
history.goBack()
},1000)
}, 1000)
}
......@@ -337,12 +339,12 @@ const detailInfo: React.FC<{}> = () => {
<div className={style['headerMain-left-option']}>
<div>外部状态:</div>
<div>
{
dataInfo.status == 1?<><span style={statuStyle.default}>待提交</span></>:
dataInfo.status == 2?<><span style={statuStyle.confirm}>待确认</span></>:
dataInfo.status == 3?<><span style={statuStyle.warn}>不接受物流单</span></>:
<><span style={statuStyle.success}>接受物流单</span></>
}
{
dataInfo.status == 1 ? <><span style={statuStyle.default}>待提交</span></> :
dataInfo.status == 2 ? <><span style={statuStyle.confirm}>待确认</span></> :
dataInfo.status == 3 ? <><span style={statuStyle.warn}>不接受物流单</span></> :
<><span style={statuStyle.success}>接受物流单</span></>
}
</div>
</div>
</div>
......@@ -381,7 +383,7 @@ const detailInfo: React.FC<{}> = () => {
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main-options']} style={{flex:'1.5 1'}}>
<div className={style['cols-main-options']} style={{ flex: '1.5 1' }}>
{item.title}
</div>
<div className={style['cols-main-options']}>
......@@ -443,7 +445,7 @@ const detailInfo: React.FC<{}> = () => {
<div className={style['mainCol-title']}>
物流单明细
</div>
<Table dataSource={dataInfo.detailList} columns={columns1} pagination={false} />
<Table dataSource={dataInfo.detailList} columns={columns1} pagination={false} />
<Row style={{ marginTop: '26px' }}>
<Col span={9} push={15}>
<Row align='middle' justify='center' gutter={[16, 16]}>
......@@ -481,12 +483,12 @@ const detailInfo: React.FC<{}> = () => {
{
item.key === 'freight' ?
<div className={style['cols-main-options']}>
{dataInfo.status < 3 ?'未报价':item.value}
{dataInfo.status < 3 ? '未报价' : item.value}
</div>
: <div className={style['cols-main-options']}>
{item.value}
</div>
</div>
}
</div>
);
......@@ -501,7 +503,7 @@ const detailInfo: React.FC<{}> = () => {
<div className={style['mainCol-title']}>
外部流转记录
</div>
<OrderLog id={id} pathName={history.location.pathname}/>
<OrderLog id={id} pathName={history.location.pathname} />
{/* <StandardTable
tableProps={{rowKey:'id'}}
currentRef={ref}
......@@ -516,7 +518,7 @@ const detailInfo: React.FC<{}> = () => {
id={id}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK = {() =>handleModalOK()}
onOK={() => handleModalOK()}
/>
</PageHeaderWrapper>
......
......@@ -4,6 +4,7 @@ import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { createFormActions } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
......@@ -48,7 +49,7 @@ const QuotaMenage: React.FC = () => {
const defaultColumns: ColumnType<any>[] = [
{
title: '会员归属',
dataIndex: 'memberName',
dataIndex: 'parentMemberName',
align: 'center',
render: (text, record) => (
<EyePreview
......@@ -60,34 +61,34 @@ const QuotaMenage: React.FC = () => {
},
{
title: '会员类型',
dataIndex: 'memberType',
dataIndex: 'memberTypeName',
align: 'center',
},
{
title: '会员角色',
dataIndex: 'memberRole',
dataIndex: 'memberRoleName',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '所属会员等级',
dataIndex: 'memberLevel',
dataIndex: 'memberLevelName',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '剩余可用额度(元)',
dataIndex: 'available',
dataIndex: 'canUseQuota',
align: 'center',
},
{
title: '总额度/已用额度(元)',
dataIndex: 'count',
dataIndex: 'quota',
align: 'center',
render: (text, record) => (
<>
<div>总额度:{text}</div>
<div>已使用:{record.used}</div>
<div>已使用:{record.useQuota}</div>
</>
),
},
......@@ -98,7 +99,7 @@ const QuotaMenage: React.FC = () => {
render: (text, record) => (
<Progress
type="circle"
percent={40}
percent={Math.floor(record.useQuota / record.quota)}
strokeColor="#41CC9E"
strokeWidth={12}
width={40}
......@@ -108,28 +109,41 @@ const QuotaMenage: React.FC = () => {
},
{
title: '还款状态',
dataIndex: 'repaymentStatus',
dataIndex: 'repayStatusName',
align: 'center',
render: (text, record) => (
<StatusTag type="warnning" title="逾期 3 天" />
<StatusTag type="warnning" title={text} />
),
},
{
title: '状态',
dataIndex: 'status',
dataIndex: 'statusName',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color="#41CC9E" text="正常" />,
render: (text, record) => <Badge color="#41CC9E" text={text} />,
},
];
const [columns, setColumns] = useState<any[]>(defaultColumns);
const fetchListData = (params: any) => {
return Promise.resolve({
total: 2,
data: mock,
const { status = 0, rePayStatus = 0, ...rest } = params;
return new Promise((resolve, reject) => {
PublicApi.getPayCreditApplyPageCredit({
status,
rePayStatus,
...rest,
})
.then(res => {
if (res.code === 1000) {
resolve(res.data);
}
reject();
})
.catch(() => {
reject();
});
});
};
......@@ -156,7 +170,7 @@ const QuotaMenage: React.FC = () => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
'parentMemberName',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
......
......@@ -16,7 +16,7 @@ export const listSearchSchema: ISchema = {
type: 'object',
'x-component': 'mega-layout',
properties: {
name: {
parentMemberName: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
......@@ -35,7 +35,7 @@ export const listSearchSchema: ISchema = {
columns: 6,
},
properties: {
repaymentStatus: {
rePayStatus: {
type: 'string',
default: undefined,
enum: [],
......
......@@ -98,23 +98,19 @@ export const filterInteriorStateList = [
*/
export const filterExternalState = [
{
text: '提交询价单', value: 1
text: '待提交', value: 1
},
{
text: '提交报价单', value: 2
text: '待确认', value: 2
},
{
text: '确认报价单', value: 3
text: '接受报价', value: 3
},
{
text: '报价通过', value: 4
},
{
text: '报价不通过', value: 5
text: '不接受报价', value: 4
}
]
/**
* @description: 商品询价内部状态筛选
* @param {type}
......@@ -136,3 +132,4 @@ export const filterInternalState = [
]
import React from 'react'
import { Tag } from 'antd'
import { PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkStateTexts, PurchaseOrderInsideWorkState, PurchaseOrderOutWorkState, SaleOrderInsideWorkState, SaleOrderInsideWorkStateTexts, PayOutWorkStateTexts, DeliverySideState, DeliverySideStateTexts } from '@/constants'
import { PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkStateTexts, PurchaseOrderInsideWorkState, PurchaseOrderOutWorkState, SaleOrderInsideWorkState, SaleOrderInsideWorkStateTexts, PayOutWorkStateTexts, DeliverySideState, DeliverySideStateTexts, InquiryStateTexts } from '@/constants'
export interface IStatusColor {
[key: string]: {
......@@ -12,7 +12,7 @@ export interface IStatusColor {
// 用于标签状态控制
export interface StatusColorsProps {
status: number,
type: 'out' | 'inside' | 'saleInside' | 'payOut' | 'deliveInside'
type: 'out' | 'inside' | 'saleInside' | 'payOut' | 'deliveInside' | 'inquiry'
}
export enum ORDER_EXAMINE_ENUM {
......@@ -92,7 +92,8 @@ const typeMaps = {
'inside': PurchaseOrderInsideWorkStateTexts,
'saleInside': SaleOrderInsideWorkStateTexts,
'payOut': PayOutWorkStateTexts,
'deliveInside': DeliverySideStateTexts
'deliveInside': DeliverySideStateTexts,
'inquiry': InquiryStateTexts,
}
// 订单内部状态显示
......
......@@ -13,6 +13,7 @@ import { PublicApi } from '@/services/api'
const { TabPane } = Tabs;
const AddQuotes: React.FC<{}> = () => {
const { id } = history.location.query;
const [count, setCount] = useState<string>('1')
const [memberList, setmemberList] = useState([]); //存放用户信息
const [goodsList, setgoodsList] = useState([]); //存放商品
const basicInfoRef = useRef<any>({});
......@@ -20,53 +21,61 @@ const AddQuotes: React.FC<{}> = () => {
const [editData, setEditData] = useState<any>({});
useEffect(() => {
if(id) {
PublicApi.getOrderInquiryListDetails({id}).then(res => {
if(res.code === 1000) {
if (id) {
PublicApi.getOrderInquiryListDetails({ id }).then(res => {
if (res.code === 1000) {
setEditData(res.data)
}
})
}
},[])
}, [])
/************* 页面的一些操作start *************/
const onSumbit = async (params: any) => {
const basicInfo = await basicInfoRef.current.validateFields();
const tradingConditions = await tradingConditionsRef.current.validateFields();
const basicInfoData = basicInfo.data;
const tradingConditionsData = tradingConditions.data;
if( basicInfo.state && tradingConditions.state) {
const parmas = {
inquiryListProductRequests: goodsList, // 商品列表 ,InquiryListProductRequest
...basicInfoData,
...tradingConditionsData,
memberName: memberList[0].name,
memberId: memberList[0].memberId
}
if(id) {
console.log(parmas)
if (count === '3') {
const tradingConditions = await tradingConditionsRef.current.validateFields();
const basicInfoData = basicInfo.data;
const tradingConditionsData = tradingConditions.data;
if (basicInfo.state && tradingConditions.state) {
const parmas = {
inquiryListProductRequests: goodsList, // 商品列表 ,InquiryListProductRequest
...basicInfoData,
...tradingConditionsData,
memberName: memberList[0].name,
memberId: memberList[0].memberId
}
if (id) {
console.log(parmas)
} else {
await PublicApi.postOrderInquiryListAdd(parmas).then(res => {
if (res.code === 1000) {
console.log(res.data)
}
})
}
} else {
await PublicApi.postOrderInquiryListAdd(parmas).then(res => {
if(res.code === 1000) {
console.log(res.data)
}
})
message.error('有必填字段没选择,请检查!');
}
} else {
}else {
message.error('有必填字段没选择,请检查!');
}
}
// 获取到会员信息
const getMemberList = (list: any) => {
setmemberList(list);
}
// 获取添加的商品列表
const getGoodsList = (list:any) => {
const getGoodsList = (list: any) => {
setgoodsList(list)
}
/************* 页面的一些操作end *************/
const handleClick = (key: string) => {
if (key === '3') {
setCount(key)
}
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......@@ -77,7 +86,7 @@ const AddQuotes: React.FC<{}> = () => {
}
>
<Card>
<Tabs>
<Tabs onTabClick={handleClick}>
<TabPane tab="基本信息" key="1">
<BasicInfo
currentRef={basicInfoRef}
......@@ -102,7 +111,9 @@ const AddQuotes: React.FC<{}> = () => {
<Attached />
</TabPane>
<TabPane tab="流转记录" key="5">
<FlowRecord />
<FlowRecord
editData={editData}
/>
</TabPane>
</Tabs>
</Card>
......
......@@ -34,7 +34,7 @@ const Attached: React.FC<{}> = () => {
{...layout}
className={styles.revise_style}
>
<Form.Item label='附件'>
<Form.Item label='附件' name='upload'>
<div className={styles.upload_data}>
{files.length > 0 && files.map(v => (
<div className={styles.upload_item}>
......
import React, { useState } from 'react';
import styles from './index.less';
import { Radio } from 'antd';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import PolymericTable from '@/components/PolymericTable';
import { EditableColumns } from '@/components/PolymericTable/interface';
const FlowRecord: React.FC<{}> = () => {
export interface parmas {
editData?: any
}
const FlowRecord: React.FC<parmas> = (props) => {
const { editData } = props;
const [radio, setRadio] = useState<string>('outer'); //切换单据
const outerColumns: ColumnType<any>[] = [{
const outerColumns: EditableColumns[] = [{
title: '序号',
dataIndex: 'inquiryListId',
}, {
......@@ -25,7 +30,7 @@ const FlowRecord: React.FC<{}> = () => {
title: '审核意见',
dataIndex: 'auditOpinion',
}]
const insideColumns: ColumnType<any>[] = [{
const insideColumns: EditableColumns[] = [{
title: '序号',
dataIndex: 'inquiryListId',
}, {
......@@ -50,7 +55,7 @@ const FlowRecord: React.FC<{}> = () => {
title: '审核意见',
dataIndex: 'auditOpinion',
}]
const onChange = (e:any) => {
const onChange = (e: any) => {
setRadio(e.target.value)
}
return (
......@@ -60,20 +65,18 @@ const FlowRecord: React.FC<{}> = () => {
<Radio.Button value="inside">内部单据(0)</Radio.Button>
</Radio.Group>
{radio === 'outer' ?
<StandardTable
tableProps={{
rowKey: 'id',
pagination: false
}}
<PolymericTable
dataSource={editData.interiorInquiryListLogResponses}
columns={outerColumns}
loading={false}
pagination={null}
/>
:
<StandardTable
tableProps={{
rowKey: 'id',
pagination: false
}}
<PolymericTable
dataSource={editData.externalInquiryListLogResponses}
columns={insideColumns}
loading={false}
pagination={null}
/>
}
</div>
......
......@@ -18,8 +18,6 @@ export interface Params {
}
const AuditModal: React.FC<Params> = (props) => {
const actions = createFormActions()
const useFormEffects = () => {
const { setFieldState } = createFormActions()
onFieldChange$('state').subscribe(({ value }) => {
......
import React, { useRef, useState } from 'react';
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';
......@@ -8,21 +9,54 @@ 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 } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
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();
const ReviewList: React.FC<{}> = () => {
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 [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: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}`}>{text}</EyePreview>
},
{
title: '询价单摘要',
......@@ -53,16 +87,25 @@ const ReviewList: React.FC<{}> = () => {
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
},
{
filters: filterExternalState,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: text => <StatusColors status={text} type='out' />
}, {
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' onClick={()=>{setId(record.id);setvisible(true);}}>审核</Button>
},
]
const format = (text) => {
......@@ -74,16 +117,32 @@ const ReviewList: React.FC<{}> = () => {
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectRow(selectedRows);
setSelectedRowKeys(selectedRowKeys);
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
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>批量提交审核</Button>
<Button onClick={() => batchAction()}>批量提交审核</Button>
</Col>
</Row>
</Row>
// 单个审核
const handleModalOK = () => {
setvisible(false)
setTimeout(()=> {
ref.current.reload()
},1000)
}
return (
<PageHeaderWrapper>
......@@ -93,9 +152,11 @@ const ReviewList: React.FC<{}> = () => {
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)
}}
......@@ -110,6 +171,13 @@ const ReviewList: React.FC<{}> = () => {
</StandardTable>
</Card>
<AuditModal
id={id}
type={type}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={ handleModalOK}
/>
</PageHeaderWrapper>
)
}
......
......@@ -12,6 +12,8 @@ import { ColumnType } from 'antd/lib/table/interface';
import { filterInternalState, filterExternalState } from './../../common/statusList';
import { quoteOrderInternalState } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
import EyePreview from '@/components/EyePreview';
import { timeRange } from '@/utils/index';
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
......@@ -21,6 +23,8 @@ const EnquiryOrder: React.FC<{}> = (props) => {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
......@@ -60,9 +64,39 @@ const EnquiryOrder: React.FC<{}> = (props) => {
quoteOrderInternalState(text)
}];
//交易能力 询价报价 询价单查询
const fetchData = async (params: any) => {
const res = await PublicApi.getOrderProductInquiryList(params);
return res.data
const data = {
totalCount: 1,
data: [{
id: 91,
inquiryListNo: 'SD2015PPLJ',
details: '阿珍爱上阿强',
memberName: 'wutiaoren',
memberId: 5,
deliveryTime: '2020-10-14 15:37:00',
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.getOrderProductInquiryList({...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 (
......@@ -76,6 +110,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($,actions,'inquiryListNo',FORM_FILTER_PATH)
FormEffectHooks.onFieldChange$('category').subscribe(state => {
......
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,
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
}, {
id: 2,
inquiryListNo: 'SZX125LIP',
details: '模拟的数据10086',
memberName: '打喷嚏',
memberId: 1,
deliveryTime: '2020-10-12 13:59:00',
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.getOrderInquiryToAuditList({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
})
}
// 批量操作
const batchAction = () => {
if (selectRow.length > 0) {
return new Promise((resolve, reject) => {
PublicApi.postOrderInquiryDocumentsReviewAll({ ids: selectRow }).then(res => {
if (res.code === 1000) {
resolve(res.data)
ref.current.reload();
}
})
})
} else {
message.error('请选择要操作的询价单!')
}
}
return (
<ReviewList />
<ReviewList
reloadRef={ref}
fetchData={fetchData}
selectAll={selectAll}
batchAction={batchAction}
type={2}
/>
)
}
......
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,
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
}, {
id: 2,
inquiryListNo: 'SZX125LIP',
details: '模拟的数据10086',
memberName: '打喷嚏',
memberId: 1,
deliveryTime: '2020-10-12 13:59:00',
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.getOrderInquiryToAuditListTwo({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
})
}
// 批量操作
const batchAction = () => {
if (selectRow.length > 0) {
return new Promise((resolve, reject) => {
PublicApi.postOrderInquiryDocumentsReviewAllTwo({ ids: selectRow }).then(res => {
if (res.code === 1000) {
resolve(res.data)
ref.current.reload();
}
})
})
} else {
message.error('请选择要操作的询价单!')
}
}
return (
<ReviewList />
<ReviewList
reloadRef={ref}
fetchData={fetchData}
selectAll={selectAll}
batchAction={batchAction}
type={3}
/>
)
}
......
......@@ -10,6 +10,7 @@ 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';
......@@ -31,6 +32,8 @@ const PendingSubmit: React.FC<{}> = () => {
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/goodsOffer/components/details?id=${record.id}`}>{text}</EyePreview>
},
{
title: '询价单摘要',
......@@ -79,7 +82,7 @@ const PendingSubmit: React.FC<{}> = () => {
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' onClick={() => { setId(record.id); setvisible(true) }}>审核</Button>
},
]
const format = (text) => {
......@@ -102,12 +105,30 @@ const PendingSubmit: React.FC<{}> = () => {
</Row>
/**列表数据 */
const data = {
totalCount: 2,
data: [{
id: 1,
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.getOrderSubmitInquirySheetList({ ...params }).then(res => {
resolve(res.data)
})
// PublicApi.getOrderSubmitInquirySheetList({ ...params }).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
})
}
......@@ -130,9 +151,9 @@ const PendingSubmit: React.FC<{}> = () => {
const handleModalOK = () => {
setvisible(false)
setTimeout(()=> {
setTimeout(() => {
history.goBack()
},1000)
}, 1000)
}
......@@ -163,12 +184,12 @@ const PendingSubmit: React.FC<{}> = () => {
</StandardTable>
</Card>
<AuditModal
<AuditModal
id={id}
type={1}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={ handleModalOK}
onOK={handleModalOK}
/>
</PageHeaderWrapper>
)
......
......@@ -291,7 +291,7 @@ export const enquieryOfferSearchSchema: ISchema = {
"x-component-props":{
placeholder:'外部状态'
},
enum: TimeList
enum: []
},
interiorState :{
type:'string',
......@@ -299,7 +299,7 @@ export const enquieryOfferSearchSchema: ISchema = {
"x-component-props":{
placeholder:'内部状态'
},
enum: TimeList
enum: []
},
}
},
......@@ -401,4 +401,5 @@ export const dialogEqformSearch: ISchema = {
}
}
}
}
\ 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.postOrderInquirySubmit(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 } from 'react';
import { history } from 'umi';
import { Button, Card, Tabs, Steps, Table } from 'antd';
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 style from './index.less'
const { TabPane } = Tabs;
const { Step } = Steps;
const Details: React.FC<{}> = () => {
// steps 切换
const [detailData, setDetailData] = useState<any>({
externalStateStep: {
current: 0,
title: '外部流转',
items: [
{
title: '采购商',
desc: '提交需求单',
},
{
title: '平台',
desc: '审核需求单',
},
{
title: '供应商',
desc: '提交报价单',
},
{
title: '采购商',
desc: '确认报价单',
},
,
{
title: '完成',
desc: ''
}
]
},
interiorStateStep: {
current: 0,
title: '内部流转',
items: [
{
title: '业务员',
desc: '新增报价单',
},
{
title: '业务经理',
desc: '审核报价单',
},
{
title: '副总经理',
desc: '审核报价',
},
{
title: '业务员',
desc: '提交报价单',
},
{
title: '完成',
desc: ''
}
]
}
})
// 询价商品
const inquiryGoods: ColumnType<any>[] = [{
title: 'ID',
key: 'id',
dataIndex: 'id',
}, {
title: '报价商品名称',
key: 'name',
dataIndex: 'name',
}, {
title: '品类',
key: 'id',
dataIndex: 'id',
}, {
title: '品牌',
key: 'name',
dataIndex: 'name',
}, {
title: '单位',
key: 'id',
dataIndex: 'id',
}, {
title: '采购数量',
key: 'name',
dataIndex: 'name',
}]
// 条件交易&其他报价说明
const infoTem = {
base: {
title: '其他报价说明',
leftElem: [
{ title: '最小起订', key: '', value: '1,000' },
{ title: '交付说明', key: '', value: '东莞市石龙镇西葫芦53号' },
{ title: '付款说明', key: '', value: '首付30%,收货后70%' }
],
centerElem: [
{ title: '税费说明', key: '', value: '含税' },
{ title: '物流说明', key: '', value: '要求送至指定收货地址' },
{ title: '包装说明', key: '', value: '纸箱' },
],
rightElem: [
{ title: '其他说明', key: '', value: '无' }
],
},
freight: {
title: '条件交易',
leftElem: [
{ title: '交付日期', key: '', value: '2020-08-25' },
{ title: '交付地址', key: '', value: '东莞市石龙镇西葫芦53号' },
{ title: '物流要求', key: '', value: '要求送至指定收货地址' }
],
centerElem: [
{ title: '报价截止日期', key: '', value: '2020-12-26 13:45' },
{ title: '报价要求', key: '', value: '实价' },
{ title: '包装要求', key: '', value: '纸箱' },
],
rightElem: [
{ title: '付款方式', key: '', value: '首付30%,收货后70%' },
{ title: '税费要求', key: '', value: '含税' },
{ title: '其他要求', key: '', value: '无' }
],
}
}
// 外部流转记录&内部流转记录
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',
}],
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
title={
<>
<div className={style['headerTop']}>
<div className={style['headerTop-prefix']}></div>
<div className={style['headerTop-name']}>
报价单号:10086
</div>
<div className={style[`levelIcon${'1'}`]}></div>
</div>
</>
}
extra={
<>
<Button>
<StopOutlined />审核不通过
</Button>
<Button className={style['saveBtn']}>
<CheckSquareOutlined />审核通过
</Button>
</>
}
content={
<div className={style['headerMain']}>
<div className={style['headerMain-left']}>
<div className={style['headerMain-left-option']}>
<div>对应需求单号:</div>
<div><Button type="link">SPTY12</Button> </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 className={style['headerMain-left-option']}>
<div>外部状态:</div>
<div>
待提交
</div>
</div>
<div className={style['headerMain-left-option']}>
<div>内部状态:</div>
<div>
待审核
</div>
</div>
</div>
</div>
}
>
<Card className={style.item_wrap}>
<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} />
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem['base'].title}</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem['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['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['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>
</Card>
<Card className={style.item_wrap}>
<Tabs>
<TabPane tab="外部流转记录" key="1">
<Table columns={flowRecord.external} pagination={false} />
</TabPane>
<TabPane tab="内部流转记录" key="2">
<Table columns={flowRecord.interior} pagination={false} />
</TabPane>
</Tabs>
</Card>
</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;
}
}
}
}
\ 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 } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
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',
},
{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}`}>{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='out' />
}, {
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' 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, 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 { enquieryOfferSearchSchema } 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 } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
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: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}`}>{text}</EyePreview>
}, {
title: '询价单摘要',
key: 'details',
dataIndex: 'details',
}, {
title: '询价会员',
key: 'memberName',
dataIndex: 'memberName',
}, {
title: '交付日期',
key: 'deliveryTime',
dataIndex: 'deliveryTime',
}, {
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: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'>报价</Button>
}];
//交易能力 询价报价 询价单查询
const data = {
totalCount: 1,
data: [{
id: 91,
inquiryListNo: 'SD2015PPLJ',
details: '阿珍爱上阿强',
memberName: 'wutiaoren',
memberId: 5,
deliveryTime: '2020-10-14 15:37:00',
quotationAsTime: '2020-10-13 15:37:00',
voucherTime: '2020-10-13 15:37:00',
externalState: 1,
}]
}
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
// PublicApi.getOrderProductInquiryList({...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={enquieryOfferSearchSchema}
>
</NiceForm>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default EnquiryOrder;
\ 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, 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 } from '../../common/tableStatusList';
import StatusColors from '@/pages/transaction/components/StatusColors';
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',
},{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/components/details?id=${record.id}`}>{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)
}];
//交易能力 询价报价 询价单查询
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:'查询'
}
}
}
}
}
}
......@@ -230,7 +230,7 @@ const CommonOrderDetail:React.FC<CommonOrderDetailProps> = (props) => {
{ label: '对应报价单号', name: 'quotationNo', span: 8, render: text => <Link to={'/'}>{text}</Link> },
{ label: '订单摘要', name: 'orderThe', span: 8 },
{ label: '供应会员', name: 'supplyMembersName', span: 8 },
{ label: '下单模式', name: 'orderModel', span: 8, render: text => GlobalConfig.web.orderMode[text].label },
{ label: '下单模式', name: 'orderModel', span: 8, render: text => GlobalConfig.web.orderMode.find(v => v.value === text)?.label || '' },
{ label: '订单类型', name: 'type', span: 8, render: text => orderTypeLabel[text] },
{ label: '下单时间', name: 'createTime', span: 8, render: text => formatTimeString(text) },
{ label: '外部状态', name: 'externalState', span: 8, render: text => <StatusColors type='out' status={text}/> },
......
......@@ -520,8 +520,8 @@ const AddBills: React.FC<{}> = (props: any) => {
goodsId: item.id,
itemName: item.name,
specifications: item.type,
category: item.customerCategory.name,
brand: item.brand.name,
category: item.customerCategory ? item.customerCategory.name : '',
brand: item.brand ? item.brand.name : '',
unit: item.unitName,
costPrice: item.costPrice,
product: undefined,
......
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