Commit 7d4f8798 authored by 前端-许佳敏's avatar 前端-许佳敏
parents d3026192 559d819d
......@@ -17,7 +17,7 @@ export default [
// 询价单查询详情
{
path: '/memberCenter/tranactionAbility/goodsOffer/enquiryOrder/details',
name: 'quoteOrderDetails',
name: 'enquiryOrderDetails',
hideInMenu: true,
component: '@/pages/transaction/goodsOffer/components/details'
},
......
......@@ -41,8 +41,8 @@ h6 {
a {
&:hover {
color: var(--mall_main_color) !important;
}
color: var(--mall_main_color);
}
}
.tb_bg {
......@@ -319,8 +319,10 @@ a {
// 重置Card样式
.ant-card {
border-radius: 8px !important;
.ant-card-head {
border-bottom: none;
.ant-card-head-title {
// line-height: 24px;
// padding-bottom: 0;
......@@ -329,5 +331,4 @@ a {
color: #343031;
}
}
}
}
\ No newline at end of file
......@@ -478,6 +478,10 @@ const CommodityDetail = (props) => {
}
const handleInquiry = () => {
window.location.href = `/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/add?id=${id}&memberId=${memberId}`
}
/**
* 根据条件渲染页面按钮
*/
......@@ -496,7 +500,7 @@ const CommodityDetail = (props) => {
<Button className={cx(styles.product_info_btn_item, styles.buy)} >暂无库存</Button>
)
case COMMODITY_TYPE.inquiry:
return <div className={cx(styles.product_info_btn_item, styles.buy)}>立即询价</div>
return <div className={cx(styles.product_info_btn_item, styles.buy)} onClick={() => handleInquiry()}>立即询价</div>
case COMMODITY_TYPE.integral:
return stockCount > 0 ? <div className={cx(styles.product_info_btn_item, styles.buy)} onClick={() => handleToBuy(COMMODITY_TYPE.integral)}>立即兑换</div> : <Button className={cx(styles.product_info_btn_item, styles.buy)} >暂无库存</Button>
}
......
......@@ -30,12 +30,19 @@
padding: 0 16px;
color: #303133;
a {
&:hover {
color: var(--mall_main_color);
}
}
&.username {
position: relative;
cursor: pointer;
border-left: 1px solid #ffffff;
border-right: 1px solid #ffffff;
&:hover {
border-left: 1px solid #EEF0F3;
......
......@@ -179,6 +179,12 @@
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
&:hover {
&>a {
color: #ffffff !important;
}
}
&>a {
color: #ffffff;
}
......
......@@ -2,17 +2,17 @@ import React from 'react'
import cx from 'classnames'
import { Skeleton } from 'antd'
import { LAYOUT_TYPE } from '@/constants'
import { GetSearchShopEnterpriseGetCommodityListResponseDetail } from '@/services/SearchApi'
import { PostSearchShopEnterpriseGetCommodityListResponseDetail } from '@/services/SearchApi'
import styles from './list.less'
interface CommodityListPropsType {
showType: number;
commodityList: GetSearchShopEnterpriseGetCommodityListResponseDetail[]
commodityList: PostSearchShopEnterpriseGetCommodityListResponseDetail[]
layoutType: LAYOUT_TYPE
}
const CommodityList: React.FC<CommodityListPropsType> = (props) => {
const { showType, commodityList = [], layoutType = LAYOUT_TYPE.mall } = props
const { commodityList = [], layoutType = LAYOUT_TYPE.mall } = props
const getCommodityDetailUrl = (item) => {
switch (layoutType) {
......
......@@ -178,6 +178,12 @@
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
&:hover {
&>a {
color: #ffffff !important;
}
}
&>a {
color: #ffffff;
}
......
import React, { useState } from 'react'
import React, { useState, useEffect } from 'react'
import { CaretUpOutlined, CaretDownOutlined, UnorderedListOutlined, AppstoreOutlined, CloseOutlined } from '@ant-design/icons'
import Filter from '../components/Filter'
import { FILTER_TYPE } from '@/constants'
import cx from 'classnames'
import { Pagination } from 'antd'
import SearchNoResult from '../components/SearchNoResult'
import { Pagination, message } from 'antd'
import CommodityList from './list'
import NoResult from './noResult'
import { useLocalStore, observer } from 'mobx-react'
import { store } from '@/store'
import isEmpty from 'lodash/isEmpty'
import { PublicApi } from '@/services/api'
import { LAYOUT_TYPE } from '@/constants'
import { GetOrderRequisitionFormOnlineShoppingListResponseDetail } from '@/services/OrderApi'
import styles from './index.less'
interface PurchaseOnlinePropsType {
location: any
location: any,
layoutType: LAYOUT_TYPE,
memberId: number;
shopId: number;
}
const PurchaseOnline: React.FC<PurchaseOnlinePropsType> = (props) => {
const FilterStore = useLocalStore(() => store.FilterStore)
const { filterList, filterUpdate, filterParam, onDeleteFilterItem, onResetFilter, onFilter, onFilterParamChange } = FilterStore
const { query: { search = "" } } = props.location
const { layoutType, shopId } = props
const [showType, setShowType] = useState<number>(1) // 展示方式:1:矩阵排列; 2:列表排列
// const [filterList, setFilterList] = useState([])
const [loading, setLoading] = useState<boolean>(true)
const [commodityList, setCommodityList] = useState<GetOrderRequisitionFormOnlineShoppingListResponseDetail[]>([])
const [current, setCurrent] = useState<number>(1)
const [pageSize] = useState<number>(20)
const [totalCount, setTotalCount] = useState<number>(0)
const filterConfig = [FILTER_TYPE.category, FILTER_TYPE.useArea]
useEffect(() => {
setCurrent(1)
fetchCommodityList(1)
}, [filterParam])
useEffect(() => {
if (!isEmpty(filterList) || filterUpdate) {
handleFilterChange(filterList)
}
}, [filterList])
useEffect(() => {
return (() => {
onResetFilter()
})
}, [])
const fetchCommodityList = (currentParam?: number) => {
let param: any = {
current: currentParam ? currentParam : current,
pageSize
}
if (!isEmpty(filterParam)) {
param = Object.assign(param, filterParam)
}
setLoading(true)
//@ts-ignore
PublicApi.getOrderRequisitionFormOnlineShoppingList(param).then(res => {
setLoading(false)
if (res.code === 1000) {
message.destroy()
setCommodityList(res.data.data)
setTotalCount(res.data.totalCount)
}
})
}
const handleFilterChange = (newFilterList: any) => {
onFilterParamChange(newFilterList)
}
/**
* 重置筛选
*/
......@@ -141,7 +196,7 @@ const PurchaseOnline: React.FC<PurchaseOnlinePropsType> = (props) => {
<div className={styles.tool_bar_right}>
<div className={styles.count}>
<span></span>
<label>43</label>
<label>{totalCount}</label>
<span>条求购信息</span>
</div>
</div>
......@@ -166,11 +221,11 @@ const PurchaseOnline: React.FC<PurchaseOnlinePropsType> = (props) => {
)
}
{
!!search ? <NoResult search={search} /> : (
(commodityList.length === 0 || !commodityList) ? !loading && <SearchNoResult search="" /> : (
<>
<CommodityList showType={showType} />
<CommodityList showType={showType} commodityList={commodityList} layoutType={layoutType} />
<div className={styles.pagination_wrap}>
<Pagination showQuickJumper showSizeChanger={false} defaultCurrent={1} total={100} />
<Pagination showQuickJumper showSizeChanger={false} current={current} total={totalCount} pageSize={pageSize} />
</div>
</>
)
......
......@@ -29,6 +29,10 @@
font-weight: 500;
padding-left: 15px;
background-color: #FAFAFA;
a {
color: #303133;
}
}
&_info_box {
......@@ -68,6 +72,7 @@
margin-top: 20px;
&>a {
display: block;
color: #fff;
}
......
import React from 'react'
import cx from 'classnames'
import { Link } from 'umi'
import { LAYOUT_TYPE } from '@/constants'
import { GetOrderRequisitionFormOnlineShoppingListResponseDetail } from '@/services/OrderApi'
import creditIcon from '@/assets/imgs/credit_icon.png'
import moment from 'moment'
import './list.less'
interface CommodityListPropsType {
showType: number
showType: number;
commodityList: GetOrderRequisitionFormOnlineShoppingListResponseDetail[]
layoutType: LAYOUT_TYPE
}
const CommodityList: React.FC<CommodityListPropsType> = (props) => {
const { showType } = props
const { commodityList = [], layoutType = LAYOUT_TYPE.mall } = props
let dataList = []
for (let i = 0; i < 20; i++) {
dataList.push(i)
const showRequisitionFormAddress = (list: any) => {
if (list) {
let result = list.map(item => `${item.province}/${item.city}`).join('、')
return result
}
return ""
}
return (
<div className={cx("purchase_list")}>
{
dataList.map((item, index) => (
<div key={item} className="purchase_list_item row">
<div className="purchase_list_item_title">头层自然摔牛皮,箱包鞋面料</div>
commodityList.map((item, index) => (
<div key={item.id} className="purchase_list_item row">
<div className="purchase_list_item_title">
<Link to={`/memberCenter/tranactionAbility/inquiryQuote/quoteOrder/details?id=${item.id}&page_type=5&view=2`}>{item.details}</Link>
</div>
<div className="purchase_list_item_info_box">
<div className="purchase_list_item_info_line">
<label>品类:</label>
<span>硬度适中偏软</span>
<span>{item.categoryName}</span>
</div>
<div className="purchase_list_item_info_line">
<label>发货地:</label>
<span>广东省/广州市、广东省/深圳市、广东省/东莞市</span>
<span>{showRequisitionFormAddress(item.requisitionFormAddress)}</span>
</div>
<div className="purchase_list_item_info_line">
<label>交付地址:</label>
<span>广东省广州市海珠区新港东路1068号</span>
<span>{item.addres}</span>
</div>
<div className="purchase_list_item_info_line">
<label>交付日期:</label>
<span>2020-08-12</span>
<span>{moment(item.deliveryTime).format("YYYY-MM-DD")}</span>
</div>
<div className="purchase_list_item_info_line">
<label>截止时间:</label>
<span>2020-08-12 11:58:26</span>
<span>{moment(item.quotationAsTime).format("YYYY-MM-DD HH:mm:ss")}</span>
</div>
<div className="purchase_list_item_info_line_split"></div>
<div className="purchase_list_item_info_name">温州市龙昌皮业有限公司</div>
<div className="purchase_list_item_info_name">{item.memberName}</div>
<div className="purchase_list_item_info_line">
<img className="credit_icon" src={creditIcon} />
<span className="credit_text">1288</span>
<span className="credit_text">{item.memberCreditDcore || 0}</span>
</div>
<div className="quoted_price_btn">
<a href={`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/add`}> 立即报价 </a>
<Link to={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/add?id=${item.id}`}> 立即报价 </Link>
</div>
</div>
</div>
......
......@@ -64,7 +64,7 @@ const PendingReviewOne: React.FC<{}> = () => {
})
})
} else {
message.error('请选择要操作的价单!')
message.error('请选择要操作的价单!')
}
}
......
......@@ -64,7 +64,7 @@ const PendingReviewTwo: React.FC<{}> = () => {
})
})
} else {
message.error('请选择要操作的价单!')
message.error('请选择要操作的价单!')
}
}
......
import React, { useRef, useState, useEffect } from 'react';
import { Card, Button, Row, Col } from 'antd';
import { Card, Button, Row, Col, message } from 'antd';
import { history, Link } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
......@@ -97,22 +97,22 @@ const PendingSubmit: React.FC<{}> = () => {
</Row>
/**列表数据 */
const data = {
totalCount: 2,
data: [{
id: 1,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}]
}
// const data = {
// totalCount: 2,
// data: [{
// id: 1,
// quotationNo: 'BPTY12',
// inquiryListNo: 'SZX125KJS',
// details: '模拟的数据',
// memberName: '冰红茶',
// memberId: 10,
// deliveryTime: '2020-10-13 13:59:00',
// quotationAsTime: '2020-10-13 23:59:00',
// voucherTime: '2020-10-13 13:59:00',
// externalState: 1,
// interiorState: 1
// }]
// }
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
......@@ -137,9 +137,14 @@ const PendingSubmit: React.FC<{}> = () => {
}
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
if(selectRow.length > 0) {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的审核报价单!')
}
}
const handleModalOK = () => {
setvisible(false)
......
......@@ -16,10 +16,13 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { commonEnquieryOfferSchema } from '../schema';
import { PublicApi } from '@/services/api';
import AuditModal from '../components/auditModel';
const formActions = createFormActions();
const AddEnquiryOrder: React.FC<{}> = () => {
const ref = useRef<any>({});
const [id, setId] = useState<any>(0);
const [visible, setvisible] = useState<boolean>(false);
const [selectRow, setSelectRow] = useState([]);
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([]);
const columns: ColumnType<any>[] = [
......@@ -88,7 +91,7 @@ const AddEnquiryOrder: React.FC<{}> = () => {
render: (text: any, record: any) => {
return (
<>
<Button type='link' disabled={record.interiorState !== 1}>提交审核</Button>
<Button type='link' disabled={record.interiorState !== 1} onClick={() => { setId(record.id); setvisible(true)}}>提交审核</Button>
<Button type="link" disabled={record.interiorState !== 4 && record.externalState !== 1 }><Link to={`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/edit?id=${record.id}`}>编辑</Link></Button>
<Popconfirm
title="确定要删除吗?"
......@@ -151,11 +154,19 @@ const AddEnquiryOrder: React.FC<{}> = () => {
</Menu.Item>
</Menu>
)
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderInquiryListSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
}
const controllerBtns = <Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/add`)}>新建</Button>
<Button>批量提交审核</Button>
<Button onClick={() => handleSubmitAll(selectedRowKeys)}>批量提交审核</Button>
<Dropdown.Button
overlay={menu}
trigger={['click']}
......@@ -197,6 +208,13 @@ const AddEnquiryOrder: React.FC<{}> = () => {
}
})
}
const handleModalOK = () => {
setvisible(false)
setTimeout(() => {
history.goBack()
}, 1000)
}
return (
<PageHeaderWrapper>
<Card>
......@@ -220,6 +238,13 @@ const AddEnquiryOrder: React.FC<{}> = () => {
>
</StandardTable>
</Card>
<AuditModal
id={id}
type={4}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
/>
</PageHeaderWrapper>
)
}
......
......@@ -56,6 +56,13 @@ const AuditModal: React.FC<Params> = (props) => {
}
})
break;
case 4:
PublicApi.postOrderInquiryListSubmit(value).then(res => {
if(res.code === 1000) {
props.onOK()
}
})
break;
}
}
return (
......
......@@ -18,7 +18,7 @@ export interface parmas {
const Attached: React.FC<parmas> = (props) => {
const { handleGetEnclosureUrls, editData } = props;
const [files, setFiles] = useState([]);
const [files, setFiles] = useState<Array<any>>([]);
/**判断文件类型和大小 */
const beforeDocUpload = (file: UploadFile) => {
const isLt20M = file.size / 1024 / 1024 < 20;
......@@ -56,6 +56,7 @@ const Attached: React.FC<parmas> = (props) => {
}
}, [editData])
return (
<Form
{...layout}
......@@ -63,7 +64,7 @@ const Attached: React.FC<parmas> = (props) => {
>
<Form.Item label='附件' name='upload'>
<div className={styles.upload_data}>
{files.length > 0 && files.map((v, index) => (
{(files && files.length > 0) && files.map((v, index) => (
<div key={index} className={styles.upload_item}>
<div className={styles.upload_left}>
<LinkOutlined />
......
......@@ -73,24 +73,24 @@ const BasicInfo: React.FC<queryProps> = (props) => {
}
}
// 模拟数据
const data = {
totalCount: 1,
data: [{
orderId: 6,
orderNo: 'SZ1008',
details: '可可西',
memberName: '超级会员',
documentTime: '2020-10-20 11:22:00',
}]
}
// const data = {
// totalCount: 1,
// data: [{
// orderId: 6,
// orderNo: 'SZ1008',
// details: '可可西',
// memberName: '超级会员',
// documentTime: '2020-10-20 11:22:00',
// }]
// }
const fetchMemberList = async (params) => {
return new Promise((resolve, reject) => {
// PublicApi.postOrderCorrespondingInquiryNumber({...params}).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
PublicApi.postOrderCorrespondingInquiryNumber({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
});
}
// 选择会员弹框结束
......
......@@ -75,15 +75,15 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
}]
useEffect(() => {
// if(Object.keys(inquiryNo).length > 0 && inquiryNo.orderId) {
// PublicApi.getOrderProductInquiryDetails({id: inquiryNo.orderId}).then(res => {
// if(res.code === 1000) {
// setgoodsList(res.data.inquiryListProductRequests)
// }
// })
// }
// // 询价单重选,清空数据
// setgoodsList([])
if(Object.keys(inquiryNo).length > 0 && inquiryNo.orderId) {
PublicApi.getOrderProductInquiryDetails({id: inquiryNo.orderId}).then(res => {
if(res.code === 1000) {
setgoodsList(res.data.inquiryListProductRequests)
}
})
}
// 询价单重选,清空数据
setgoodsList([])
}, [inquiryNo])
// 编辑时回显的数据
......
......@@ -16,10 +16,13 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { commonEnquieryOfferSchema } from '../schema';
import { PublicApi } from '@/services/api';
import AuditModal from '../components/auditModel';
const formActions = createFormActions();
const AddInquiryOrder: React.FC<{}> = () => {
const ref = useRef<any>({});
const [id, setId] = useState<any>(0);
const [visible, setvisible] = useState<boolean>(false);
const [selectRow, setSelectRow] = useState([]);
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([]);
const columns: ColumnType<any>[] = [{
......@@ -77,7 +80,7 @@ const AddInquiryOrder: React.FC<{}> = () => {
console.log(record.interiorState)
return (
<>
<Button type='link' >提交审核</Button>
<Button type='link' onClick={() => { setId(record.id); setvisible(true)}}>提交审核</Button>
<Button type="link"><Link to={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/edit?id=${record.id}`}>编辑</Link></Button>
<Popconfirm
destroyTooltipOnHide
......@@ -118,54 +121,85 @@ const AddInquiryOrder: React.FC<{}> = () => {
const menu = (
<Menu>
<Menu.Item key='1' icon={<DeleteOutlined />}>
批量删除
<span onClick={() => handleBatchDelete()}>批量删除</span>
</Menu.Item>
</Menu>
)
//列表数据
const data = {
totalCount: 2,
data: [{
id: 1,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}]
}
// const data = {
// totalCount: 2,
// data: [{
// id: 1,
// quotationNo: 'BPTY12',
// inquiryListNo: 'SZX125KJS',
// details: '模拟的数据',
// memberName: '冰红茶',
// memberId: 10,
// deliveryTime: '2020-10-13 13:59:00',
// quotationAsTime: '2020-10-13 23:59:00',
// voucherTime: '2020-10-13 13:59:00',
// externalState: 1,
// interiorState: 1
// }]
// }
const fetchData = async (params: any) => {
return new Promise((resolve, reject) => {
// PublicApi.getOrderStayProductQuotationList({ ...params }).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
PublicApi.getOrderStayProductQuotationList({ ...params }).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
})
}
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
if (selectRow.length > 0) {
PublicApi.postOrderProductQuotationtAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的审核报价单!')
}
}
//批量删除
const handleBatchDelete = () => {
if(selectedRowKeys.length === 0) {
return message.error('请选择要删除的询价单')
}
PublicApi.postOrderProductQuotationDeleteAll({ids: selectedRowKeys}).then(res => {
if(res.code === 1000) {
ref.current.reload();
}
})
}
//批量审核&批量删除按钮
const controllerBtns = <Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/add`)}>新建</Button>
<Button>批量提交审核</Button>
<Button onClick={() => handleSubmitAll(selectedRowKeys)}>批量提交审核</Button>
<Dropdown.Button
overlay={menu}
trigger={['click']}
icon={<DownOutlined />}
>
更多
</Dropdown.Button>
</Dropdown.Button>
</Space>
</Col>
</Row>
const handleModalOK = () => {
setvisible(false)
setTimeout(() => {
history.goBack()
}, 1000)
}
return (
<PageHeaderWrapper>
<Card>
......@@ -189,6 +223,13 @@ const AddInquiryOrder: React.FC<{}> = () => {
>
</StandardTable>
</Card>
<AuditModal
id={id}
type={4}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
/>
</PageHeaderWrapper>
)
}
......
......@@ -11,7 +11,7 @@ const actions = createFormActions()
const { onFieldChange$ } = FormEffectHooks;
export interface Params {
id: number | string;
type: number | string; //1.待提交报价单,2.待审核报价单一级,3.待审核报价单二级
type: number | string; //1.待提交报价单,2.询价报价-待审核报价单(一级),3.询价报价-待审核报价单(二级),4.询价报价-待新增提交审核
dialogVisible: boolean;
onCancel: Function;
onOK?: Function;
......@@ -37,21 +37,28 @@ const AuditModal: React.FC<Params> = (props) => {
switch (props.type) {
case 1:
PublicApi.postOrderProductQuotationtToSubmit(value).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
props.onOK()
}
})
break;
case 2:
PublicApi.postOrderProductQuotationtAuditSubmit(value).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
props.onOK()
}
})
break;
case 3:
PublicApi.postOrderProductQuotationtAuditSubmitTwo(value).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
props.onOK()
}
})
break;
case 4:
PublicApi.postOrderProductQuotationtSubmit(value).then(res => {
if (res.code === 1000) {
props.onOK()
}
})
......
import React, { useRef, useEffect } from 'react';
import {Link} from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Button } from 'antd';
import { StandardTable } from 'god';
......@@ -56,31 +57,31 @@ const EnquiryOrder: React.FC<{}> = (props) => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'>报价</Button>
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/add?id=${record.id}`}>报价</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 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)
PublicApi.getOrderProductInquiryList({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 1000)
})
}
// 搜索
......
......@@ -15,41 +15,41 @@ const PendingReviewOne: React.FC<{}> = () => {
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 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)
PublicApi.getOrderAuditProductQuotationList({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
})
}
// 批量操作
......@@ -64,7 +64,7 @@ const PendingReviewOne: React.FC<{}> = () => {
})
})
} else {
message.error('请选择要操作的价单!')
message.error('请选择要操作的价单!')
}
}
const column: ColumnType<any>[] = [{
......
......@@ -15,41 +15,41 @@ const PendingReviewTwo: React.FC<{}> = () => {
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 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)
PublicApi.getOrderAuditProductQuotationListTwo({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
})
}
// 批量操作
......@@ -64,7 +64,7 @@ const PendingReviewTwo: React.FC<{}> = () => {
})
})
} else {
message.error('请选择要操作的价单!')
message.error('请选择要操作的价单!')
}
}
const column: ColumnType<any>[] = [{
......
import React, { useRef, useState, useEffect } from 'react';
import { Card, Button, Row, Col } from 'antd';
import { Card, Button, Row, Col, message } from 'antd';
import { history, Link } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
......@@ -96,31 +96,31 @@ const PendingSubmit: React.FC<{}> = () => {
</Row>
/**列表数据 */
const data = {
totalCount: 2,
data: [{
id: 1,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}]
}
// const data = {
// totalCount: 2,
// data: [{
// id: 1,
// quotationNo: 'BPTY12',
// inquiryListNo: 'SZX125KJS',
// details: '模拟的数据',
// memberName: '冰红茶',
// memberId: 10,
// deliveryTime: '2020-10-13 13:59:00',
// quotationAsTime: '2020-10-13 23:59:00',
// voucherTime: '2020-10-13 13:59:00',
// externalState: 1,
// interiorState: 1
// }]
// }
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getOrderToSubmitProductQuotationList({ ...params }).then(res => {
// resolve(res.data)
// })
setTimeout(() => {
resolve(data)
}, 500)
PublicApi.getOrderToSubmitProductQuotationList({ ...params }).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
})
}
......@@ -136,9 +136,14 @@ const PendingSubmit: React.FC<{}> = () => {
}
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
if(selectRow.length > 0) {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的报价单!')
}
}
const handleModalOK = () => {
......
......@@ -65,29 +65,29 @@ const EnquiryOrder: React.FC<{}> = (props) => {
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 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)
PublicApi.getOrderProductQuotationList({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 1000)
})
}
// 搜索
......
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