Commit 66c92236 authored by leimo's avatar leimo

Merge branch '20418order' into 'v2-220418'

提交收货人地址 See merge request linkseeks-design/pro-platform!549
parents 38cc842f 8f1b7e63
......@@ -219,9 +219,13 @@ export class DeliveryNoteAddService extends HandleFormSubmit {
validateFormFields() {
return this.getForm().validateFields().then(values => {
values = HandelFormFieldsKeyValue(values)
console.log(values);
values.deliveryStartTime = values.deliveryRangeTime[0]
values.deliveryEndTime = values.deliveryRangeTime[1]
values.deliveryVO.consignee = values?.deliveryVO?.shipperName
values.buyerRoleId = values.member.buyerRoleId
values.buyerMemberId = values.member.buyerMemberId
values.buyerMemberName = values.member.buyerMemberName
......
......@@ -50,6 +50,11 @@ const HarvestMaterial: AnchorsItem = {
name: "收货物料"
}
const HarvestGood: AnchorsItem = {
key: "HarvestMaterial",
name: "收货商品"
}
const Circulation: AnchorsItem = {
key: 'Circulation',
name: "流转进度"
......@@ -129,14 +134,14 @@ const DeliveryPlanCollaborationAnchors: AnchorsItem[] = [
]
// deliveryNoticeManagement -> deliveryNoticeDetaitls
const DeliveryNoticeDetaitlsAnchors: AnchorsItem[] =[
const DeliveryNoticeDetaitlsAnchors: AnchorsItem[] = [
Circulation,
BaseInfo,
ShippingInfo,
// Material,
]
const B2BDeliveryNoticeDetaitlsAnchors: AnchorsItem[] =[
const B2BDeliveryNoticeDetaitlsAnchors: AnchorsItem[] = [
Circulation,
BaseInfo,
ShippingInfo,
......@@ -181,4 +186,5 @@ export {
DeliveryList,
DeliveryNoticeAwaitAnchors,
ExternalDeliveryPlanCirculation,
HarvestGood
}
......@@ -25,7 +25,7 @@ import { RoleSelect } from '@/components/RoleSelect';
import LogisticsCompanyMerchantsSelect from '@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect';
import { DeliveryNumColumn, OrderNumColumn } from '../../constants/table-column';
import { DeliveryAddFactory } from '../../assets/factory/DeliveryAddFactory';
import { useLocation } from 'umi';
import { history, useLocation } from 'umi';
import { SourceTypeEnum } from '../../constants/SourceTypeEnum';
import { ShipperAddress, ReceiverAddress } from '@/components/AddressDrawer'
......
......@@ -6,7 +6,7 @@ import {
ReceiptAddLabel, NoteLabel, DeliveryTimeLabel,
ConsigneeTimeLabel, LogisticsCompanyLabel, LogisticsCarNoLabel, LogisticsNoLabel,
DeliveryAbstractLabel, BuyerLabel, DeliveryDateLabel, DeliveryNameLabel,
DeliveryPhoneLabel, ReceivingAddress, DeliveryTypeLabel, DeliveryNoLabel, ExternalRoamRecord, DeliverySlefAddrLabel, DeliveryDate, DeliveryTime, ShippingInfo, ReceiptAbstractLabel, SupplyMembersLabel, ReceivingTime, ConsigneeLabel, ConsigneePhoneLabel
DeliveryPhoneLabel, ReceivingAddress, DeliveryTypeLabel, DeliveryNoLabel, ExternalRoamRecord, DeliverySlefAddrLabel, DeliveryDate, DeliveryTime, ShippingInfo, ReceiptAbstractLabel, SupplyMembersLabel, ReceivingTime, ConsigneeLabel, ConsigneePhoneLabel, HarvestGood, DeliveryGood
} from '../../constants'
import { Button, Form, Input, message, Radio, Table } from 'antd'
import { FormItem, required } from '@/components/FormItem'
......@@ -53,29 +53,30 @@ function DeliveryNoteAddForm() {
useEffect(() => {
service.getDetailById(id).then(info => {
const target = noteService.formatField(info);
form.setFieldsValue({
deliveryOrderId: id,
...target
})
setInfo({
...info,
deliveryVO: noteService.formatAddress(target.deliveryVO)
});
setType(info?.type)
noteService.getDetailInfoProductById(id).then(res => {
setTableDataSource(res.data)
setAnchors([
...anchors,
{
...HarvestMaterial,
name: `${HarvestMaterial.name}(${res.data.length})`
name: `${info?.type == 1 ? HarvestGood.name : HarvestMaterial.name}(${res.data.length})`
}
])
});
service.getDetailById(id).then(res => {
const target = noteService.formatField(res);
form.setFieldsValue({
deliveryOrderId: id,
...target
})
setInfo({
...res,
deliveryVO: noteService.formatAddress(target.deliveryVO)
});
setType(res?.type)
})
}, [])
......@@ -146,7 +147,7 @@ function DeliveryNoteAddForm() {
<FormItem label={NoteLabel} name="remark" rules={[
validatorByteObject(100)
]}>
<Input placeholder="最长100字,50个汉字" maxLength={100} />
<Input placeholder="最长100字,50个汉字" maxLength={100} />
</FormItem>
</ContentBox>
......@@ -200,7 +201,13 @@ function DeliveryNoteAddForm() {
<div>
<FormItem
label={DeliverySlefAddrLabel}>
{FormatValue(info?.deliveryVO) ?? ''}
{info?.deliverVO?.provinceName ?? ''}
{info?.deliverVO?.cityName ?? ''}
{info?.deliverVO?.districtName ?? ''}
{info?.deliverVO?.streetName ?? ''}
{info?.deliverVO?.address ?? ''}
</FormItem>
</div>
</ContentBox>
......@@ -234,7 +241,8 @@ function DeliveryNoteAddForm() {
</FormItem>
</ContentBox>
<ContentBox title={HarvestMaterial.name} id={HarvestMaterial.key} cols={1}>
<ContentBox title={info?.type == 1 ? DeliveryGood.name : HarvestMaterial.name}
id={info?.type == 1 ? DeliveryGood.key : HarvestMaterial.key} cols={1}>
<HarvestMaterialContextProvider value={{
dataSource: tableDataSource
......@@ -269,7 +277,7 @@ function DeliveryNoteAddForm() {
</Form>
</AnchorPage>
</AnchorPage >
)
}
......
......@@ -6,7 +6,7 @@
import React, { useEffect, useState } from 'react'
import AnchorPage from '@/components/AnchorPage'
import { BaseInfo as ListInfo } from '@/components/BaseInfo'
import { BillsInfo, DeliveryInfo, DeliveryNoteQuery, Distribution, ExternalRoamRecord, Harvest, HarvestMaterial, LogisticsInfo, Material } from '../../constants'
import { BillsInfo, DeliveryInfo, DeliveryNoteQuery, Distribution, ExternalRoamRecord, Harvest, HarvestGood, HarvestMaterial, LogisticsInfo, Material } from '../../constants'
import { Space, Spin, Table, Tag } from 'antd';
import ReceiveNoteFacotry from '../../assets/handles/ReceiveNotePage';
import { useLocation } from 'umi';
......@@ -47,7 +47,7 @@ const DeliveryNoteManageDetails: React.FC = () => {
{
...HarvestMaterial,
...{
name: `${HarvestMaterial.name}(${values[1].totalCount})`
name: `${info?.type == 1 ? HarvestGood.name : HarvestMaterial.name}(${values[1].totalCount})`
}
},
{
......@@ -129,7 +129,11 @@ const DeliveryNoteManageDetails: React.FC = () => {
<div>
<ListInfoItem className="mt-16" label='发货(自提)地址'>
{info?.deliverVO?.provinceName ?? ''}{info?.deliverVO?.cityName ?? ''}{info?.deliverVO?.districtName ?? ''}{info?.deliverVO?.streetName ?? ''}{info?.deliverVO?.address ?? ''}
{info?.deliverVO?.provinceName ?? ''}
{info?.deliverVO?.cityName ?? ''}
{info?.deliverVO?.districtName ?? ''}
{info?.deliverVO?.streetName ?? ''}
{info?.deliverVO?.address ?? ''}
</ListInfoItem>
</div>
......@@ -152,7 +156,12 @@ const DeliveryNoteManageDetails: React.FC = () => {
</ListInfo>
<ListInfo className='mt-15' title={HarvestMaterial.name} id={HarvestMaterial.key} cols={1}>
<ListInfo className='mt-15' title={
info?.type == 1 ? HarvestGood.name : HarvestMaterial.name}
id={
info?.type == 1 ?
HarvestGood.key :
HarvestMaterial.key} cols={1}>
<Table
rowKey={row => row.orderNo}
columns={
......
......@@ -6,7 +6,7 @@
import React, { useEffect, useState } from 'react'
import AnchorPage from '@/components/AnchorPage'
import { BaseInfo as ListInfo } from '@/components/BaseInfo'
import { BillsInfo, DeliveryInfo, DeliveryNoteQuery, LogisticsInfo, Material, Distribution, BaseInfo, ExternalRoamRecord, HarvestMaterial } from '../../constants'
import { BillsInfo, DeliveryInfo, DeliveryNoteQuery, LogisticsInfo, Material, Distribution, BaseInfo, ExternalRoamRecord, HarvestMaterial, HarvestGood } from '../../constants'
import { Table, Tag } from 'antd'
import ReceiveNoteFacotry from '../../assets/handles/ReceiveNotePage'
import { useLocation } from 'umi'
......@@ -43,9 +43,9 @@ const DeliveryNoteDetails: React.FC = () => {
setAnchors([
...anchors,
{
...HarvestMaterial,
...{
name: `${HarvestMaterial.name}(${values[1].totalCount})`
name: `${values[0]?.type == 1 ? HarvestGood.name : HarvestMaterial.name}(${values[1].totalCount})`,
key: HarvestMaterial.key
}
},
{
......@@ -153,7 +153,12 @@ const DeliveryNoteDetails: React.FC = () => {
</ListInfoItem>
</ListInfo>
<ListInfo className='mt-15' title={HarvestMaterial.name} id={HarvestMaterial.key} cols={1} >
<ListInfo className='mt-15' title={
info?.type ? HarvestGood.name :
HarvestMaterial.name}
id={
info?.type ? HarvestGood.key :
HarvestMaterial.key} cols={1} >
<Table
rowKey={row => row.orderNo}
columns={
......
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