Commit 724e2ca1 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

Merge branch 'dev' into test

parents 9d0f54c6 6c5035f9
......@@ -201,6 +201,13 @@ const LogisticsRoute: RouterChild = {
component: '@/pages/logistics/components/orderSearchDetail',
hideInMenu: true
},
// 待确认物流单-详情
{
path: '/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList/option',
name: 'orderResultDeatil',
component: '@/pages/logistics/components/orderSearchDetail',
hideInMenu: true
},
]
}
]
......
......@@ -9,7 +9,7 @@ export const productModalByMemberSchema: ISchema = {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入商品名称/ID',
placeholder: '请输入商品名称',
align: 'flex-left',
},
},
......
......@@ -13,6 +13,7 @@ export interface Params {
dialogVisible: boolean;
onCancel: Function;
onOK?: Function;
freightPrice?: any;
dontReceive?: boolean; //默认展示
}
const actions = createFormActions()
......@@ -24,7 +25,9 @@ const comfirmDialog: React.FC<Params> = (props) => {
const handletOk = (values: any) => {
let value = { ...values }
value.id = props.id
console.log(values)
if(props.freightPrice) {
value.freightPrice = props.freightPrice
}
PublicApi.postLogisticsOrderWaitConfirmConfirm(value).then(res => {
if (res.code === 1000) {
props.onOK()
......@@ -81,19 +84,6 @@ const comfirmDialog: React.FC<Params> = (props) => {
status: 4
}}
>
{props.dontReceive &&
<>
<Field
title='运费'
name='freightPrice'
x-component="numberpicker"
x-mega-prop={{
wrapperWidth: 300,
labelAlign: 'left'
}}
/>
</>
}
<Field
enum={
[
......
......@@ -254,7 +254,7 @@ const detailInfo: React.FC<{}> = () => {
//待确认物流单
if (pathname === '/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList/detail') {
PublicApi.getLogisticsOrderWaitConfirmGet({ id: id }).then(res => {
setdataInfo(res.data)
let current = 0
......@@ -288,6 +288,15 @@ const detailInfo: React.FC<{}> = () => {
history.goBack()
}
// 获取路由link
const { pathname } = history.location;
const type = pathname.split('/')[pathname.split('/').length - 1];
const [freightPrice, setfreightPrice] = useState<any>(null);
// 输入报价价格
const inputOnchange = (e: any) => {
const value = e.target.value;
setfreightPrice(value);
}
return (
<PageHeaderWrapper
......@@ -303,19 +312,15 @@ const detailInfo: React.FC<{}> = () => {
</div>
</>
}
// extra={
// dataInfo.status === 2 &&
// <>
// <Button onClick={() => setvisible(true)}>
// <StopOutlined />
// 不接受物流单
// </Button>
// <Button onClick={() => setvisible(true)} className={style['saveBtn']}>
// <CheckSquareOutlined />
// 接受物流单
// </Button>
// </>
// }
extra={
type === 'option' &&
<>
<Button onClick={() => setvisible(true)} className={style['saveBtn']}>
<CheckSquareOutlined />
确认物流单
</Button>
</>
}
content={
<div className={style['headerMain']}>
<div className={style['headerMain-left']}>
......@@ -410,7 +415,7 @@ const detailInfo: React.FC<{}> = () => {
{infoTem['base'].rightElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main']} key={`base${index + 1}`}>
<div className={style['cols-main-options']}>
{item.title}
</div>
......@@ -421,22 +426,7 @@ const detailInfo: React.FC<{}> = () => {
},
)}
</div>
</div>
{/* <div className={style['mainCol-row']}>
{infoTem['base'].elem.map((item: any, index: number) => {
return (
<div className={style['mainCol-row-col']} key={index}>
<div className={style['mainCol-row-col-option']}>
{item.title}
</div>
<div className={style['mainCol-row-col-option']}>
185 2929 6547
</div>
</div>
);
})}
</div> */}
</Col>
<Col className={style['mainCol']} span={24}>
<div className={style['mainCol-title']}>
......@@ -473,16 +463,27 @@ const detailInfo: React.FC<{}> = () => {
{infoTem['freight'].leftElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
<div className={style['cols-main']} key={`freight${index + 1}`}>
<div className={style['cols-main-options']}>
{item.title}
</div>
{
item.key === 'freight' ?
<div className={style['cols-main-options']}>
{dataInfo.status < 3 ? '未报价' : item.value}
</div>
<>
{type === 'option' ?
<Input
addonBefore="¥"
onBlur={inputOnchange}
type='number'
maxLength={25}
style={{width: '300px'}}
/>
:
<div className={style['cols-main-options']}>
{dataInfo.status < 3 ? '未报价' : item.value}
</div>
}
</>
: <div className={style['cols-main-options']}>
{item.value}
</div>
......@@ -501,19 +502,12 @@ const detailInfo: React.FC<{}> = () => {
外部流转记录
</div>
<OrderLog id={id} pathName={history.location.pathname} />
{/* <StandardTable
tableProps={{rowKey:'id'}}
currentRef={ref}
columns={columns}
fetchTableData={(params: any) => fetchData(params)}
/> */}
</Col>
</Row>
<ConfirmModal
id={id}
dialogVisible={visible}
freightPrice={freightPrice}
onCancel={() => setvisible(false)}
onOK={() => handleModalOK()}
/>
......
......@@ -158,7 +158,7 @@ const OrderList: React.FC<ListProps> = (props) => {
align: 'center',
key: 'logisticsOrderNo',
render: (text: any, reconds: any) =>
<span className="commonPickColor" onClick={() => handleSee(reconds.id)}>{text}&nbsp;<EyeOutlined /></span>
<span className="commonPickColor" onClick={() => handleSee(false ,reconds.id)}>{text}&nbsp;<EyeOutlined /></span>
},
{
title: '对应订单号',
......@@ -232,7 +232,7 @@ const OrderList: React.FC<ListProps> = (props) => {
render: (_: any, record: any) => {
return (
<>
<Button type='link' onClick={() => handleDialog(record.id)}>确认</Button>
<Button type='link' onClick={() => handleSee(true, record.id)}>确认</Button>
</>
)
}
......@@ -271,8 +271,12 @@ const OrderList: React.FC<ListProps> = (props) => {
const handleDelete = () => {
console.log('delete')
}
const handleSee = (id: any) => {
history.push(`/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList/detail?id=${id}`)
const handleSee = (option: boolean ,id: any) => {
if(option) {
history.push(`/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList/option?id=${id}`)
}else {
history.push(`/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList/detail?id=${id}`)
}
}
const confirm = () => {
......
......@@ -359,7 +359,7 @@ const Details: React.FC<parmas> = (props) => {
</div >
}
>
<Card className={style.item_wrap}>
<div className={style.item_wrap}>
{
Number(page_type) === 4 ?
<>
......@@ -419,8 +419,8 @@ const Details: React.FC<parmas> = (props) => {
</Tabs>
}
</Card>
<Card className={style.item_wrap}>
</div>
<div className={style.item_wrap}>
<div className={style.mainCol_title} style={view === 2 ? {paddingBottom: '0px'}: {paddingBottom: '24px'}}>询价商品</div>
{view === 1 && <Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />}
{view === 2 &&
......@@ -431,12 +431,12 @@ const Details: React.FC<parmas> = (props) => {
fetchTableData={(params: any) => fetchData(params)}
/>
}
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].title}</div>
</div>
<div className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem[type === 'quote' ? 'freight' : 'base'].title}</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].leftElem.map(
{infoTem[type === 'quote' ? 'freight' : 'base'].leftElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -452,7 +452,7 @@ const Details: React.FC<parmas> = (props) => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].centerElem.map(
{infoTem[type === 'quote' ? 'freight' : 'base'].centerElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -467,7 +467,7 @@ const Details: React.FC<parmas> = (props) => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].rightElem.map(
{infoTem[type === 'quote' ? 'freight' : 'base'].rightElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -482,8 +482,8 @@ const Details: React.FC<parmas> = (props) => {
)}
</div>
</div>
</Card>
<Card className={style.item_wrap}>
</div>
<div className={style.item_wrap}>
<div className={style.mainCol_title}>附件</div>
<div className={style.upload_data}>
{
......@@ -498,8 +498,8 @@ const Details: React.FC<parmas> = (props) => {
))
}
</div>
</Card>
<Card className={style.item_wrap}>
</div>
<div className={style.item_wrap}>
{
Number(page_type) === 4 ?
<>
......@@ -516,7 +516,7 @@ const Details: React.FC<parmas> = (props) => {
</TabPane>
</Tabs>
}
</Card>
</div>
<AuditModal
id={id}
type={page_type}
......
......@@ -3,6 +3,7 @@
margin-bottom: 24px;
background-color: #FFF;
border-radius: 8px;
padding: 24px;
&:last-child {
margin-bottom: 0px;
......
......@@ -79,6 +79,12 @@ const TradingConditions: React.FC<queryProps> = (props) => {
const addressOnChange = (value:any, option:any) => {
getAddress(option)
}
const disabledDate = (current) => {
return current && current < moment().endOf('day');
}
return (
<Form
{...layout}
......@@ -88,7 +94,10 @@ const TradingConditions: React.FC<queryProps> = (props) => {
<Row gutter={70}>
<Col span={12}>
<Form.Item label='交付日期' name='deliveryTime' rules={[{ required: true, message: '请选择交付日期' }]}>
<DatePicker format="YYYY-MM-DD HH:mm:ss" />
<DatePicker
disabledDate={disabledDate}
format="YYYY-MM-DD HH:mm:ss"
/>
</Form.Item>
<Form.Item label='交付地址' name='fullAddressId' rules={[{ required: true, message: '请选择交付地址' }]}>
<Select onChange={addressOnChange}>
......@@ -98,7 +107,10 @@ const TradingConditions: React.FC<queryProps> = (props) => {
</Select>
</Form.Item>
<Form.Item label='报价截止时间' name='quotationAsTime' rules={[{ required: true, message: '请选择报价截止时间' }]}>
<DatePicker format="YYYY-MM-DD HH:mm:ss" />
<DatePicker
format="YYYY-MM-DD HH:mm:ss"
disabledDate={disabledDate}
/>
</Form.Item>
<Form.Item label='报价要求' name='offer'>
<Input.TextArea placeholder='最长100个字符,50个汉字' />
......
import React, { useState, useEffect } from 'react';
import React, { useState, useEffect, ReactNode } from 'react';
import styles from './index.less';
import { Input, Table, Form } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
......@@ -17,16 +17,24 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
// 会员添加弹窗控制
const [goodsList, setgoodsList] = useState([]);
// 计算金额
const countMoney = (num: any, money: any) => {
let price: ReactNode = null;
price = (Number(money) * 1) / Number(num);
return Number(price).toFixed(4);
}
/**输入框输入 */
const inputOnchange = (id, e) => {
const { value } = e.target
goodsList.forEach(v => {
if (v.productId === id) {
v.money = value
v.price = countMoney(v.purchaseCount, value);
}
})
getGoodsList(goodsList) // 返回给父级
setgoodsList(goodsList)
getGoodsList([...goodsList]) // 返回给父级
setgoodsList([...goodsList])
}
const columns: ColumnType<any>[] = [{
......@@ -70,8 +78,12 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
console.log(123)
PublicApi.getOrderProductInquiryDetails({ id: inquiryNo.orderId }).then(res => {
if (res.code === 1000) {
getGoodsList(res.data.inquiryListProductRequests)
setgoodsList(res.data.inquiryListProductRequests)
const data = res.data.inquiryListProductRequests;
data.forEach((item: any) => {
item.money = item.purchaseCount * item.price
})
getGoodsList(data)
setgoodsList(data)
}
})
}
......
......@@ -403,7 +403,7 @@ const Details: React.FC<parmas> = (props) => {
</div >
}
>
<Card className={style.item_wrap}>
<div className={style.item_wrap}>
{
Number(page_type) === 4 ?
<>
......@@ -463,8 +463,8 @@ const Details: React.FC<parmas> = (props) => {
</Tabs>
}
</Card>
<Card className={style.item_wrap}>
</div>
<div className={style.item_wrap}>
<div className={style.mainCol_title}>询价商品</div>
{view === 1 && <Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />}
{view === 2 &&
......@@ -475,12 +475,12 @@ const Details: React.FC<parmas> = (props) => {
fetchTableData={(params: any) => fetchData(params)}
/>
}
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].title}</div>
</div>
<div className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem[type === 'quote' ? 'freight' : 'base'].title}</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].leftElem.map(
{infoTem[type === 'quote' ? 'freight' : 'base'].leftElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -496,7 +496,7 @@ const Details: React.FC<parmas> = (props) => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].centerElem.map(
{infoTem[type === 'quote' ? 'freight' : 'base'].centerElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -511,7 +511,7 @@ const Details: React.FC<parmas> = (props) => {
)}
</div>
<div className={style['mainCol-rows-cols']}>
{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].rightElem.map(
{infoTem[type === 'quote' ? 'freight' : 'base'].rightElem.map(
(item: any, index: number) => {
return (
<div className={style['cols-main']} key={index}>
......@@ -526,8 +526,8 @@ const Details: React.FC<parmas> = (props) => {
)}
</div>
</div>
</Card>
<Card className={style.item_wrap}>
</div>
<div className={style.item_wrap}>
<div className={style.mainCol_title}>附件</div>
<div className={style.upload_data}>
{
......@@ -542,8 +542,8 @@ const Details: React.FC<parmas> = (props) => {
))
}
</div>
</Card>
<Card className={style.item_wrap}>
</div>
<div className={style.item_wrap}>
{
Number(page_type) === 4 ?
<>
......@@ -560,7 +560,7 @@ const Details: React.FC<parmas> = (props) => {
</TabPane>
</Tabs>
}
</Card>
</div>
<AuditModal
id={id}
type={page_type}
......
......@@ -3,6 +3,7 @@
margin-bottom: 24px;
background-color: #FFF;
border-radius: 8px;
padding: 24px;
&:last-child {
margin-bottom: 0px;
......
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