Commit 11fe4abb authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

修改报价提交调了修改接口的问题

parent 53b5ed62
/**
* @Name: 新增编辑 - 待提交物流单 - 基本信息
* @Date: 2020-11-06
* @Author: HJX
*/
import React from 'react';
import { Form } from 'antd';
const layout: any = {
colon: false,
labelCol: { style: { width: '174px' } },
wrapperCol: { span: 9 },
labelAlign: "left"
};
const BasicInfo:React.FC<{}> = () => {
return(
<Form
{...layout}
>
</Form>
)
}
export default BasicInfo;
\ No newline at end of file
import React from 'react';
import { Button, Input, Table, Row, Col, Statistic } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { PlusOutlined } from '@ant-design/icons';
const AddGoods: React.FC<{}> = () => {
const columns: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'productId'
},
{
title: '商品名称',
dataIndex: 'productName'
},
{
title: '品类',
dataIndex: 'productName'
},
{
title: '品牌',
dataIndex: 'productName'
},
{
title: '单位',
dataIndex: 'productName'
},
{
title: '数量',
dataIndex: 'productName',
render:(text:any, record:any) =>
<Input />
},
{
title: '箱数',
dataIndex: 'productName',
render:(text:any, record:any) =>
<Input />
},
{
title: '重量 (KG)',
dataIndex: 'productName',
render:(text:any, record:any) =>
<Input />
},
{
title: '体积 (M3)',
dataIndex: 'productName',
render:(text:any, record:any) =>
<Input />
},
{
title: '操作',
dataIndex: 'options',
render:(text:any, record:any) =>
<Input />
}
]
return (
<>
<Button block type='dashed' style={{marginBottom: '24px'}}><PlusOutlined />添加商品</Button>
<Table columns={columns} />
<Row gutter={[24,24]} style={{margin: '0 0 0 65%',width: '35%'}}>
<Col span={8}><Statistic title="总箱数(箱)" value={112893} /></Col>
<Col span={8}><Statistic title="总重量(KG)" value={112893} /></Col>
<Col span={8}><Statistic title="总体积(M3)" value={112893} /></Col>
</Row>
</>
)
}
export default AddGoods;
\ No newline at end of file
/**
* @Name: 新增编辑 - 待提交物流单 - 流转记录
* @Date: 2020-11-06
* @Author: HJX
*/
import React from 'react';
import { Table } from 'antd';
import {ColumnType} from 'antd/lib/table/interface'
const TableLOG:React.FC<{}> = () => {
const columns: ColumnType<any>[] = [
{
title: '序号',
dataIndex: 'operatorRoleId'
},{
title: '操作角色',
dataIndex: 'operatorRoleName'
},{
title: '状态',
dataIndex: 'status'
},{
title: '操作',
dataIndex: 'type'
},{
title: '操作时间',
dataIndex: 'operateTime'
},{
title: '审核意见',
dataIndex: 'remark'
}
]
return(
<Table columns={columns} />
)
}
export default TableLOG
\ No newline at end of file
/**
* @Name: 新增编辑 - 待提交物流单
* @Date: 2020-11-06
* @Author: HJX
*/
import React from 'react';
import { Button, Card, Tabs } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReturnEle from '@/components/ReturnEle';
import { history } from 'umi';
import Table from './components/table';//流转记录
import BasicInfo from './components/basicInfo';//基本信息
import Goods from './components/goods';//物流单明细
const { TabPane } = Tabs
const AddEditLogistics: React.FC<{}> = () => {
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReturnEle description='返回' />}
extra={<Button type="primary"> 保存</Button>}
>
<Card>
<Tabs type="card">
<TabPane key='tab-1' tab='基本信息'>
<BasicInfo />
</TabPane>
<TabPane key='tab-2' tab='物流单明细'>
<Goods />
</TabPane>
<TabPane key='tab-3' tab='运费'></TabPane>
<TabPane key='tab-4' tab='流转记录'>
<Table />
</TabPane>
</Tabs>
</Card>
</PageHeaderWrapper>
)
}
export default AddEditLogistics
\ No newline at end of file
......@@ -272,8 +272,8 @@ const Deatail: React.FC<{}> = () => {
* @return:
*/
useEffect(() => {
let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
setHeaderTitle(`${_title}物流单`)
// let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
// setHeaderTitle(`${_title}物流单`)
PublicApi.getLogisticsSelectListCompany({cooperateType: '1'}).then(res => {
let list = []
res.data.forEach(item => {
......@@ -289,7 +289,7 @@ const Deatail: React.FC<{}> = () => {
})
setshipperAddress(list)
})
//详情
if (id) {
PublicApi.getLogisticsOrderWaitSubmitGet({ id: id }).then(res => {
......@@ -299,51 +299,61 @@ const Deatail: React.FC<{}> = () => {
}
})
}
console.log('query', query)
//从销售订单来
if (query.orderId) {
PublicApi.getOrderPurchaseOrderDetails({id: query.orderId}).then(res => {
if(res.code === 1000) {
const data = res.data;
console.log(res.data, '查询销售订单详情')
actions.setFieldValue('receiverName', data.receiverName);// 收货人
actions.setFieldValue('receiverAddressId', data.deliveryAddresId);//收货地址id
actions.setFieldValue('receiverFullAddress', data.fullAddress); // 收货地址
setshipmentOrderCode(data.deliverNo);
setinvoicesNo(data.orderNo);
}
})
//发货单号
if (query.shipmentOrderCode) {
setshipmentOrderCode(query.shipmentOrderCode)
}
// if (query.shipmentOrderCode) {
// setshipmentOrderCode(query.shipmentOrderCode)
// }
//设置地址 发货单id 逻辑有物流单的用物流单优先 无物流单用订单 二选一
setShipmentOrderID(query.orderDeliveryDetailsId || null)//发货单id
setInvoicesId(query.invoicesId || null)//订单id
// setShipmentOrderID(query.orderDeliveryDetailsId || null)//发货单id
// setInvoicesId(query.invoicesId || null)//订单id
//订单号
if (query.invoicesNo) {
setinvoicesNo(query.invoicesNo)
}
if (query.orderDeliveryDetailsId) {//发货单
PublicApi.getWarehouseInvoicesList({
current: '1',
pageSize: '100000'
}).then(res => {
if (res.code === 1000) {
console.log(res.data, 100086)
let v = res.data.data.filter(v => v.id == query.orderDeliveryDetailsId).map(v => v)
let { memberName, fullAddress, deliveryAddresId } = v[0] || {}
actions.setFieldValue('receiverName', memberName)
actions.setFieldValue('receiverAddressId', deliveryAddresId)
actions.setFieldValue('receiverFullAddress', fullAddress)
}
})
return
}
if(query.invoicesId){//订单
PublicApi.getOrderLogisticsOrderList({
current: '1',
pageSize: '100000'
}).then(res => {
if (res.code === 1000) {
let v = res.data.data.filter(v => v.id == query.invoicesId).map(v => v)
let { memberName, fullAddress, deliveryAddresId } = v[0] || {}
actions.setFieldValue('receiverName', memberName)
actions.setFieldValue('receiverAddressId', deliveryAddresId)
actions.setFieldValue('receiverFullAddress', fullAddress)
}
})
}
// if (query.invoicesNo) {
// setinvoicesNo(query.invoicesNo)
// }
// if (query.orderDeliveryDetailsId) {//发货单
// PublicApi.getWarehouseInvoicesList({
// current: '1',
// pageSize: '100000'
// }).then(res => {
// if (res.code === 1000) {
// console.log(res.data, 100086)
// let v = res.data.data.filter(v => v.id == query.orderDeliveryDetailsId).map(v => v)
// let { memberName, fullAddress, deliveryAddresId } = v[0] || {}
// actions.setFieldValue('receiverName', memberName)
// actions.setFieldValue('receiverAddressId', deliveryAddresId)
// actions.setFieldValue('receiverFullAddress', fullAddress)
// }
// })
// return
// }
// if(query.invoicesId){//订单
// PublicApi.getOrderLogisticsOrderList({
// current: '1',
// pageSize: '100000'
// }).then(res => {
// if (res.code === 1000) {
// let v = res.data.data.filter(v => v.id == query.invoicesId).map(v => v)
// let { memberName, fullAddress, deliveryAddresId } = v[0] || {}
// actions.setFieldValue('receiverName', memberName)
// actions.setFieldValue('receiverAddressId', deliveryAddresId)
// actions.setFieldValue('receiverFullAddress', fullAddress)
// }
// })
// }
}
return () => {
......@@ -351,11 +361,6 @@ const Deatail: React.FC<{}> = () => {
}
}, [])
// const { form } = useFormSpy({ selector: [['onFieldValueChange', 'detailList']], reducer: v => v })
// console.log(form);
// const detailData;// = form.getFieldValue('detailList')
//具体可以看 formProduct
const formSearch: ISchema = {
type: 'object',
......@@ -692,19 +697,8 @@ const Deatail: React.FC<{}> = () => {
const res = await PublicApi.getOrderProcurementOrderProductPageList({ ...params, id: invoicesId })
return res.data
}
// return new Promise((resolve, reject) => {
// const queryResult = data.find(v => v.key === params.keywords)
// setTimeout(() => {
// resolve({
// code: 200,
// message: '',
// data: queryResult ? [queryResult] : data2
// })
// }, 1000)
// })
}
return (
<>
<PageHeaderWrapper
......
......@@ -154,7 +154,7 @@ const List:React.FC<{listParams}> = (props) => {
// 提交报价
const handleQuote = (recordId: number, id: any) => {
history.push(`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/add?id=${id}`);
history.push(`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/quote?id=${id}`);
}
useEffect(()=> {
......
......@@ -793,8 +793,10 @@ const Detail: React.FC<{}> = () => {
console.log('item', item)
})
values['quoteDetailss'] = [...productList]
console.log('valse', JSON.stringify(values))
if (id) {//修改
const pathname = history.location.pathname
const pathType = pathname.split('/');
const quote = pathType[pathType.length - 1];
if (id && quote !== 'quote' ) {//修改
values['id'] = id
console.log('编辑', values)
PublicApi.postOrderQuotationUpdate(values).then(res => {
......
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