Commit 5640aa4a authored by leimo's avatar leimo

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

修改送货单收货单的页面 See merge request linkseeks-design/pro-platform!462
parents 0f8b53c3 a00f1b49
...@@ -3,6 +3,7 @@ export const ReceiptAddLabel = '新增收货单'; ...@@ -3,6 +3,7 @@ export const ReceiptAddLabel = '新增收货单';
export const ReceiptAbstractLabel = '收货单摘要'; export const ReceiptAbstractLabel = '收货单摘要';
export const DeliveryAbstractLabel = '送货单摘要'; export const DeliveryAbstractLabel = '送货单摘要';
export const DeliveryAbstractNoLabel = '送货通知编号'; export const DeliveryAbstractNoLabel = '送货通知编号';
export const ReNoLabel = '收货单编号';
export const DeliveryPanleNoLabel = '送货计划编号' export const DeliveryPanleNoLabel = '送货计划编号'
export const SupplyMembersLabel = '供应会员'; export const SupplyMembersLabel = '供应会员';
export const NoteLabel = '备注'; export const NoteLabel = '备注';
......
...@@ -63,6 +63,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -63,6 +63,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
service.setTableData(tableDataSource); service.setTableData(tableDataSource);
service.submit().then(res => { service.submit().then(res => {
if (res.code === 1000) { if (res.code === 1000) {
handleLeave(false)
history.go(-1) history.go(-1)
} }
}); });
...@@ -74,9 +75,19 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -74,9 +75,19 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
}, [form, tableDataSource]) }, [form, tableDataSource])
const handleRemoveMaterialTableRow = (i: number) => { const handleRemoveMaterialTableRow = (i: number) => {
const source: any[] = tableDataSource; const source: any[] = JSON.parse(JSON.stringify(tableDataSource));
const newSource = source.splice(i, 0) source.splice(i, 1);
setTableDataSource(newSource); setTableDataSource(source);
let atpm = JSON.parse(JSON.stringify(anchors));
atpm.pop()
setAnchors([
...atpm,
{
...DeliveryGood,
name: `${DeliveryGood.name}(${source.length})`
}
])
} }
return ( return (
...@@ -107,7 +118,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -107,7 +118,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem> </FormItem>
<FormItem label={NoteLabel} name="remark"> <FormItem label={NoteLabel} name="remark">
<Input /> <Input placeholder='最长100字符,50个汉字' maxLength={100} />
</FormItem> </FormItem>
<FormItem <FormItem
...@@ -137,9 +148,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -137,9 +148,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem> </FormItem>
<FormItem <FormItem
rules={[
required()
]}
label={DeliveryNameLabel} name="executorVO.consignee"> label={DeliveryNameLabel} name="executorVO.consignee">
<Input /> <Input />
</FormItem> </FormItem>
...@@ -155,7 +163,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -155,7 +163,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<FormItem <FormItem
rules={[ rules={[
required('请出入正确的手机号'),
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" } { pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]} ]}
label={DeliveryPhoneLabel} name="executorVO.phone"> label={DeliveryPhoneLabel} name="executorVO.phone">
...@@ -175,11 +182,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -175,11 +182,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem> </FormItem>
<FormItem <FormItem
rules={[
required()
]}
label={ReceivingAddress} name="receiveVO"> label={ReceivingAddress} name="receiveVO">
<ReceiverAddress <ReceiverAddress
disabled={true} disabled={true}
/> />
...@@ -254,6 +257,17 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -254,6 +257,17 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
}) })
} }
let atpm = JSON.parse(JSON.stringify(anchors));
atpm.pop()
setAnchors([
...atpm,
{
...DeliveryGood,
name: `${DeliveryGood.name}(${value.length})`
}
])
setTableDataSource(value) setTableDataSource(value)
}} }}
/> />
......
...@@ -32,7 +32,6 @@ const ContentBoxItem = ContentBox.BaseInfoItem; ...@@ -32,7 +32,6 @@ const ContentBoxItem = ContentBox.BaseInfoItem;
const DeliveryNoticeManageSRMEdit: React.FC = () => { const DeliveryNoticeManageSRMEdit: React.FC = () => {
const [tableDataSource, setTableDataSource] = useState<any>([]); const [tableDataSource, setTableDataSource] = useState<any>([]);
const [outerHistoryList, setOuterHistoryList] = useState<any>([]);
const { renderPrompt, handleLeave } = usePrompt() const { renderPrompt, handleLeave } = usePrompt()
const location: any = useLocation() const location: any = useLocation()
const { id } = location.query const { id } = location.query
...@@ -46,18 +45,24 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -46,18 +45,24 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
Distribution, Distribution,
DeliveryInfo, DeliveryInfo,
LogisticsInfo, LogisticsInfo,
DeliveryGood,
]) ])
useEffect(() => { useEffect(() => {
form.setFieldsValue({ sourceType: 0, id: id }) form.setFieldsValue({ sourceType: 0, id: id })
service.getDetailById(id).then(res => { service.getDetailById(id).then(res => {
form.setFieldsValue(res) form.setFieldsValue(res)
setOuterHistoryList(res?.outerHistoryList)
}) })
service.getOrderDeliveryOrderDetailProductPage({ id }).then(res => { service.getOrderDeliveryOrderDetailProductPage({ id }).then(res => {
setTableDataSource(res?.data) setTableDataSource(res?.data)
setAnchors([
...anchors,
{
...DeliveryGood,
name: `${DeliveryGood.name}(${res?.data?.length})`
}
])
}) })
}, [id]) }, [id])
...@@ -72,6 +77,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -72,6 +77,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
service.setTableData(tableDataSource); service.setTableData(tableDataSource);
service.submit().then(res => { service.submit().then(res => {
if (res.code === 1000) { if (res.code === 1000) {
handleLeave(false)
history.go(-1) history.go(-1)
} }
}); });
...@@ -109,7 +115,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -109,7 +115,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<FormItem rules={[ <FormItem rules={[
required() required()
]} label={DeliveryAbstractLabel} name="digest"> ]} label={DeliveryAbstractLabel} name="digest">
<Input /> <Input placeholder='最长100字符,50个汉字' />
</FormItem> </FormItem>
<FormItem label={NoteLabel} name="remark"> <FormItem label={NoteLabel} name="remark">
...@@ -121,14 +127,16 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -121,14 +127,16 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
required() required()
]} ]}
label={BuyerLabel} name="member"> label={BuyerLabel} name="member">
<RoleSelect formatFeils={(e) => { <RoleSelect
return { disabled={true}
buyerMemberId: e.id, formatFeils={(e) => {
buyerRoleId: e.roleId, return {
roleType: 2, buyerMemberId: e.id,
name: e.name buyerRoleId: e.roleId,
} roleType: 2,
}} /> name: e.name
}
}} />
</FormItem> </FormItem>
</ContentBox> </ContentBox>
...@@ -142,26 +150,21 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -142,26 +150,21 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<DatePickerSelect disabled={true} className='w-full' /> <DatePickerSelect disabled={true} className='w-full' />
</FormItem> </FormItem>
<FormItem <FormItem
rules={[ label={DeliveryNameLabel} name="executorVO.consignee">
required() <Input />
]}
label={DeliveryTimeLabel} name="deliveryRangeTime">
<DatePickerSelect.RangePicker disabled={true} className="w-full" picker='time' />
</FormItem> </FormItem>
<FormItem <FormItem
rules={[ rules={[
required() required()
]} ]}
label={DeliveryNameLabel} name="executorVO.consignee"> label={DeliveryTimeLabel} name="deliveryRangeTime">
<Input /> <DatePickerSelect.RangePicker disabled={true} className="w-full" picker='time' />
</FormItem> </FormItem>
<FormItem <FormItem
rules={[ rules={[
required('请出入正确的手机号'),
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" } { pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]} ]}
label={DeliveryPhoneLabel} name="executorVO.phone"> label={DeliveryPhoneLabel} name="executorVO.phone">
...@@ -180,11 +183,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -180,11 +183,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</FormItem> </FormItem>
<FormItem <FormItem
rules={[
required()
]}
label={ReceivingAddress} name="receiveVO"> label={ReceivingAddress} name="receiveVO">
<ReceiverAddress <ReceiverAddress
disabled={true} disabled={true}
/> />
...@@ -255,15 +254,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -255,15 +254,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</ContentBox> </ContentBox>
</Form> </Form>
<ContentBox title={ExternalRoamRecord.name} key={ExternalRoamRecord.key} cols={1}>
<Table
columns={ExternalRoamRecordTableColumn}
rowKey="id"
dataSource={outerHistoryList}
/>
</ContentBox>
</AnchorPage> </AnchorPage>
) )
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*/ */
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage' import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import React, { useCallback, useEffect, useState, useContext } from 'react' import React, { useCallback, useEffect, useState, useContext } from 'react'
import { BaseInfo, BillsInfo, BuyerLabel, ConsigneeLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel, DeliveryDate, DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel, DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTime, DeliveryTimeLabel, DeliveryTypeLabel, Distribution, LogisticsCarNoLabel, LogisticsCompanyLabel, LogisticsInfo, LogisticsNoLabel, NoteLabel, OutStatusLabel, ReceivingAddress } from '../../constants' import { BaseInfo, BillsInfo, BuyerLabel, ConsigneeLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel, DeliveryDate, DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel, DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTime, DeliveryTimeLabel, DeliveryTypeLabel, Distribution, LogisticsCarNoLabel, LogisticsCompanyLabel, LogisticsInfo, LogisticsNoLabel, Material, NoteLabel, OutStatusLabel, ReceivingAddress } from '../../constants'
import { BaseInfo as ContentBox } from '@/components/BaseInfo' import { BaseInfo as ContentBox } from '@/components/BaseInfo'
import { Input, Table, Row, Col, Select, Radio, Form, Button, Modal } from 'antd'; import { Input, Table, Row, Col, Select, Radio, Form, Button, Modal } from 'antd';
import { DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM } from '../../constants/page-table-column'; import { DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM } from '../../constants/page-table-column';
...@@ -32,7 +32,7 @@ const ContentBoxItem = ContentBox.BaseInfoItem; ...@@ -32,7 +32,7 @@ const ContentBoxItem = ContentBox.BaseInfoItem;
const DeliveryNoticeManageSRMDetails: React.FC = () => { const DeliveryNoticeManageSRMDetails: React.FC = () => {
const [tableDataSource, setTableDataSource] = useState(); const [tableDataSource, setTableDataSource] = useState<any[]>();
const { renderPrompt, handleLeave } = usePrompt() const { renderPrompt, handleLeave } = usePrompt()
...@@ -44,7 +44,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -44,7 +44,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
Distribution, Distribution,
DeliveryInfo, DeliveryInfo,
LogisticsInfo, LogisticsInfo,
DeliveryGood, Material,
]) ])
useEffect(() => { useEffect(() => {
...@@ -104,8 +104,12 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -104,8 +104,12 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<Input /> <Input />
</FormItem> </FormItem>
<FormItem label={NoteLabel} name="remark"> <FormItem label={NoteLabel} rules={[
<Input.TextArea rows={1} /> {
max: 100, message: '最长100字符,50个行字'
}
]} name="remark">
<Input.TextArea placeholder='最长100字符,50个行字' maxLength={100} rows={1} />
</FormItem> </FormItem>
<FormItem <FormItem
...@@ -137,9 +141,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -137,9 +141,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem> </FormItem>
<FormItem <FormItem
rules={[
required()
]}
label={DeliveryNameLabel} name="executorVO.consignee"> label={DeliveryNameLabel} name="executorVO.consignee">
<Input /> <Input />
</FormItem> </FormItem>
...@@ -154,7 +155,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -154,7 +155,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<FormItem <FormItem
rules={[ rules={[
required('请出入正确的手机号'),
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" } { pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]} ]}
label={DeliveryPhoneLabel} name="executorVO.phone"> label={DeliveryPhoneLabel} name="executorVO.phone">
...@@ -174,19 +174,15 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -174,19 +174,15 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem> </FormItem>
<FormItem <FormItem
rules={[
required()
]}
label={ReceivingAddress} name="receiveVO"> label={ReceivingAddress} name="receiveVO">
<ReceiverAddress <ReceiverAddress
disabled={true}
/> />
</FormItem> </FormItem>
<FormItem <FormItem
rules={[ rules={[
required() required(`请输入${DeliverySlefAddrLabel}`)
]} ]}
label={DeliverySlefAddrLabel} name="deliveryVO"> label={DeliverySlefAddrLabel} name="deliveryVO">
...@@ -213,21 +209,22 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -213,21 +209,22 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
{/* <Radio.Button value={3}>无效配送</Radio.Button> */} {/* <Radio.Button value={3}>无效配送</Radio.Button> */}
</Radio.Group> </Radio.Group>
</FormItem> </FormItem>
<FormItem
<FormItem label={LogisticsCarNoLabel} name="executorVO.carNumbers"> label={LogisticsNoLabel} name="logisticsNo">
<Input maxLength={20} /> <Input maxLength={20} placeholder={`请输入${LogisticsNoLabel}`} />
</FormItem> </FormItem>
<FormItem label={LogisticsCompanyLabel} name="logisticsCompanyInt"> <FormItem label={LogisticsCompanyLabel} name="logisticsCompanyInt">
<LogisticsCompanyMerchantsSelect /> <LogisticsCompanyMerchantsSelect />
</FormItem> </FormItem>
<FormItem
label={LogisticsNoLabel} name="logisticsNo"> <FormItem label={LogisticsCarNoLabel} name="executorVO.carNumbers">
<Input maxLength={20} /> <Input maxLength={20} placeholder={`请输入${LogisticsCarNoLabel}`} />
</FormItem> </FormItem>
</ContentBox> </ContentBox>
<ContentBox title={DeliveryGood.name} id={DeliveryGood.key} cols={1}> <ContentBox title={Material.name} id={Material.key} cols={1}>
{/* 在编辑的时候不需要进行此操作 */} {/* 在编辑的时候不需要进行此操作 */}
<DeliveryGoodTableSelectSRM <DeliveryGoodTableSelectSRM
form={form} form={form}
...@@ -250,6 +247,17 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -250,6 +247,17 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
}) })
} }
let atpm = JSON.parse(JSON.stringify(anchors));
atpm.pop()
setAnchors([
...atpm,
{
...Material,
name: `${Material.name}(${value.length})`
}
])
setTableDataSource(value) setTableDataSource(value)
}} }}
/> />
...@@ -273,6 +281,29 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -273,6 +281,29 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
/> />
) )
} }
},
{
title: '操作',
render: (t, r, i) => {
return (
<Button type='link' onClick={() => {
let tpm = JSON.parse(JSON.stringify(tableDataSource))
tpm.splice(i, 1);
let atpm = JSON.parse(JSON.stringify(anchors));
atpm.pop();
setAnchors([
...atpm,
{
...Material,
name: `${Material.name}(${tpm.length})`
}
])
setTableDataSource(tpm);
}}>删除</Button>
)
}
} }
]} ]}
dataSource={tableDataSource} dataSource={tableDataSource}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*/ */
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage' import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import React, { useEffect, useLayoutEffect, useState } from 'react' import React, { useEffect, useLayoutEffect, useState } from 'react'
import { BillsInfo, ConsigneeLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel, DeliveryDate, DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel, DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTime, DeliveryTimeLabel, DeliveryTypeLabel, Distribution, ExternalRoamRecord, LogisticsCarNoLabel, LogisticsCompanyLabel, LogisticsInfo, LogisticsNoLabel, Material, NoteLabel, OutStatusLabel } from '../../constants' import { BillsInfo, BuyerLabel, ConsigneeLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel, DeliveryDate, DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel, DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTime, DeliveryTimeLabel, DeliveryTypeLabel, Distribution, ExternalRoamRecord, LogisticsCarNoLabel, LogisticsCompanyLabel, LogisticsInfo, LogisticsNoLabel, Material, NoteLabel, OutStatusLabel } from '../../constants'
import { BaseInfo as ContentBox } from '@/components/BaseInfo' import { BaseInfo as ContentBox } from '@/components/BaseInfo'
import { Table } from 'antd'; import { Table } from 'antd';
import { DeliveryNoteAddFromTableColumn, DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM, ExternalRoamRecordTableColumn } from '../../constants/page-table-column'; import { DeliveryNoteAddFromTableColumn, DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM, ExternalRoamRecordTableColumn } from '../../constants/page-table-column';
...@@ -27,8 +27,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -27,8 +27,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
Distribution, Distribution,
DeliveryInfo, DeliveryInfo,
LogisticsInfo, LogisticsInfo,
Material,
ExternalRoamRecord
]) ])
const [info, setInfo] = useState<any>(); const [info, setInfo] = useState<any>();
...@@ -39,15 +38,25 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -39,15 +38,25 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
useEffect(() => { useEffect(() => {
service.getDetailInfoById(query.id as string).then(res => { service.getDetailInfoById(query.id as string).then(info => {
setInfo(res) setInfo(info)
service.getDetailInfoProductById(query.id as string).then(res => {
setTableDataSource(res.data)
setAnchors([
...anchors,
{
...Material,
name: `${Material.name}(${res.data.length})`
},
{
...ExternalRoamRecord,
name: `${ExternalRoamRecord.name}(${info?.outerHistoryList?.length})`
}
])
setTotalCount(res.totalCount)
})
}) })
service.getDetailInfoProductById(query.id as string).then(res => {
setTableDataSource(res.data)
setTotalCount(res.totalCount)
})
}, []) }, [])
...@@ -69,6 +78,10 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -69,6 +78,10 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
{info?.deliveryNo} {info?.deliveryNo}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={BuyerLabel}>
{info?.buyerMemberName}
</ContentBoxItem>
<ContentBoxItem label={DeliveryAbstractLabel}> <ContentBoxItem label={DeliveryAbstractLabel}>
{info?.digest} {info?.digest}
</ContentBoxItem> </ContentBoxItem>
...@@ -88,7 +101,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -88,7 +101,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={DeliveryNameLabel}> <ContentBoxItem label={DeliveryNameLabel}>
{info?.executorVO?.consignee} {info?.executorVO?.consignee ?? '暂无信息'}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={DeliveryTime}> <ContentBoxItem label={DeliveryTime}>
...@@ -96,7 +109,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -96,7 +109,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={DeliveryPhoneLabel}> <ContentBoxItem label={DeliveryPhoneLabel}>
{info?.executorVO?.phone} {info?.executorVO?.phone ?? '暂无信息'}
</ContentBoxItem> </ContentBoxItem>
</ContentBox> </ContentBox>
...@@ -105,21 +118,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -105,21 +118,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
{info?.sendTime} {info?.sendTime}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={DeliverySlefAddrLabel}>
<div>
{info?.deliverVO?.provinceName ?? ''}
{info?.deliverVO?.cityName ?? ''}
{info?.deliverVO?.districtName ?? ''}
{info?.deliverVO?.streetName ?? ''}
{info?.deliverVO?.address ?? ''}
</div>
<div>
{info?.deliverVO.phone}
{info?.deliverVO.consignee}
</div>
</ContentBoxItem>
<ContentBoxItem label={DeliveryAddrLabel}> <ContentBoxItem label={DeliveryAddrLabel}>
<div> <div>
{info?.receiverBO?.provinceName ?? ''} {info?.receiverBO?.provinceName ?? ''}
...@@ -135,6 +133,20 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -135,6 +133,20 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={DeliverySlefAddrLabel}>
<div>
{info?.deliverVO?.provinceName ?? ''}
{info?.deliverVO?.cityName ?? ''}
{info?.deliverVO?.districtName ?? ''}
{info?.deliverVO?.streetName ?? ''}
{info?.deliverVO?.address ?? ''}
</div>
<div>
{info?.deliverVO.phone}
{info?.deliverVO.consignee}
</div>
</ContentBoxItem>
</ContentBox> </ContentBox>
<ContentBox title={LogisticsInfo.name} id={LogisticsInfo.key}> <ContentBox title={LogisticsInfo.name} id={LogisticsInfo.key}>
...@@ -142,14 +154,14 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -142,14 +154,14 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<ContentBoxItem label={DeliveryTypeLabel}> <ContentBoxItem label={DeliveryTypeLabel}>
{service.getDeliveryType(info?.deliveryType)} {service.getDeliveryType(info?.deliveryType)}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={LogisticsCarNoLabel}> <ContentBoxItem label={LogisticsNoLabel}>
{info?.executorVO?.carNumbers} {info?.logisticsNo}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={LogisticsCompanyLabel}> <ContentBoxItem label={LogisticsCompanyLabel}>
{info?.logisticsCompany} {info?.logisticsCompany}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={LogisticsNoLabel}> <ContentBoxItem label={LogisticsCarNoLabel}>
{info?.logisticsNo} {info?.executorVO?.carNumbers}
</ContentBoxItem> </ContentBoxItem>
</ContentBox> </ContentBox>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*/ */
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage' import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import React, { useCallback, useEffect, useState, useContext } from 'react' import React, { useCallback, useEffect, useState, useContext } from 'react'
import { BillsInfo, BuyerLabel, ConsigneeLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel, DeliveryDate, DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel, DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTimeLabel, DeliveryTypeLabel, Distribution, ExternalRoamRecord, LogisticsCarNoLabel, LogisticsCompanyLabel, LogisticsInfo, LogisticsNoLabel, NoteLabel, OutStatusLabel, ReceivingAddress } from '../../constants' import { BillsInfo, BuyerLabel, ConsigneeLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel, DeliveryDate, DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel, DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTimeLabel, DeliveryTypeLabel, Distribution, ExternalRoamRecord, LogisticsCarNoLabel, LogisticsCompanyLabel, LogisticsInfo, LogisticsNoLabel, Material, NoteLabel, OutStatusLabel, ReceivingAddress } from '../../constants'
import { BaseInfo as ContentBox } from '@/components/BaseInfo' import { BaseInfo as ContentBox } from '@/components/BaseInfo'
import { Input, Table, Row, Col, Select, Radio, Form, Button, message, Modal } from 'antd'; import { Input, Table, Row, Col, Select, Radio, Form, Button, message, Modal } from 'antd';
import { DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM, ExternalRoamRecordTableColumn } from '../../constants/page-table-column'; import { DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM, ExternalRoamRecordTableColumn } from '../../constants/page-table-column';
...@@ -48,7 +48,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -48,7 +48,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
Distribution, Distribution,
DeliveryInfo, DeliveryInfo,
LogisticsInfo, LogisticsInfo,
DeliveryGood,
]) ])
useEffect(() => { useEffect(() => {
...@@ -60,6 +59,13 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -60,6 +59,13 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
service.getOrderDeliveryOrderDetailProductPage({ id }).then(res => { service.getOrderDeliveryOrderDetailProductPage({ id }).then(res => {
setTableDataSource(res.data) setTableDataSource(res.data)
setAnchors([
...anchors,
{
...Material,
name: `${Material.name}(${res?.data?.length})`
}
])
}) })
}, [id]) }, [id])
...@@ -73,6 +79,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -73,6 +79,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
service.setTableData(tableDataSource); service.setTableData(tableDataSource);
service.submit().then(res => { service.submit().then(res => {
if (res.code === 1000) { if (res.code === 1000) {
handleLeave(false)
history.go(-1) history.go(-1)
} }
}); });
...@@ -115,7 +122,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -115,7 +122,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</FormItem> </FormItem>
<FormItem label={NoteLabel} name="remark"> <FormItem label={NoteLabel} name="remark">
<Input.TextArea rows={1} /> <Input.TextArea rows={1} placeholder="最长100字符,50个汉字" maxLength={100} />
</FormItem> </FormItem>
<FormItem <FormItem
...@@ -123,14 +130,16 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -123,14 +130,16 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
required() required()
]} ]}
label={BuyerLabel} name="member"> label={BuyerLabel} name="member">
<RoleSelect formatFeils={(e) => { <RoleSelect
return { disabled={true}
buyerMemberId: e.id, formatFeils={(e) => {
buyerRoleId: e.roleId, return {
roleType: 2, buyerMemberId: e.id,
name: e.name buyerRoleId: e.roleId,
} roleType: 2,
}} /> name: e.name
}
}} />
</FormItem> </FormItem>
</ContentBox> </ContentBox>
...@@ -145,9 +154,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -145,9 +154,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</FormItem> </FormItem>
<FormItem <FormItem
rules={[
required()
]}
label={DeliveryNameLabel} name="executorVO.consignee"> label={DeliveryNameLabel} name="executorVO.consignee">
<Input /> <Input />
</FormItem> </FormItem>
...@@ -162,7 +168,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -162,7 +168,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<FormItem <FormItem
rules={[ rules={[
required('请出入正确的手机号'),
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" } { pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]} ]}
label={DeliveryPhoneLabel} name="executorVO.phone"> label={DeliveryPhoneLabel} name="executorVO.phone">
...@@ -181,9 +186,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -181,9 +186,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</FormItem> </FormItem>
<FormItem <FormItem
rules={[
required()
]}
label={ReceivingAddress} name="receiveVO"> label={ReceivingAddress} name="receiveVO">
<ReceiverAddress <ReceiverAddress
...@@ -253,13 +256,13 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => { ...@@ -253,13 +256,13 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</ContentBox> </ContentBox>
</Form> </Form>
<ContentBox title={ExternalRoamRecord.name} key={ExternalRoamRecord.key} cols={1}> {/* <ContentBox title={ExternalRoamRecord.name} key={ExternalRoamRecord.key} cols={1}>
<Table <Table
columns={ExternalRoamRecordTableColumn} columns={ExternalRoamRecordTableColumn}
rowKey="id" rowKey="id"
dataSource={outerHistoryList} dataSource={outerHistoryList}
/> />
</ContentBox> </ContentBox> */}
</AnchorPage> </AnchorPage>
......
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage' import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
import { import {
BillsInfo, ConsigneeLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel, BillsInfo, BuyerLabel, ConsigneeLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel,
DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel, DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel,
DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTimeLabel, DeliveryTypeLabel, DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTimeLabel, DeliveryTypeLabel,
Distribution, ExternalRoamRecord, Harvest, LogisticsCarNoLabel, LogisticsCompanyLabel, Distribution, ExternalRoamRecord, Harvest, LogisticsCarNoLabel, LogisticsCompanyLabel,
LogisticsInfo, LogisticsNoLabel, NoteLabel, OutStatusLabel, ReceivingAddress, ReceivingTime LogisticsInfo, LogisticsNoLabel, NoteLabel, OutStatusLabel, ReceiptAbstractLabel, ReceivingAddress, ReceivingTime, ReNoLabel
} from '../../constants' } from '../../constants'
import { BaseInfo as ContentBox } from '@/components/BaseInfo' import { BaseInfo as ContentBox } from '@/components/BaseInfo'
import { Table } from 'antd'; import { Table } from 'antd';
import { DeliveryNoticeTableColumn, ExternalRoamRecordTableColumn } from '../../constants/page-table-column'; import { DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM, ExternalRoamRecordTableColumn } from '../../constants/page-table-column';
import { useLocation } from 'umi'; import { useLocation } from 'umi';
import NoteFactoryService from '../../assets/handles/DeliveryNoteService'; import NoteFactoryService from '../../assets/handles/DeliveryNoteService';
...@@ -71,11 +71,15 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -71,11 +71,15 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
> >
<ContentBox title={BillsInfo.name} id={BillsInfo.key}> <ContentBox title={BillsInfo.name} id={BillsInfo.key}>
<ContentBoxItem label={DeliveryNoLabel}> <ContentBoxItem label={ReNoLabel}>
{info?.deliveryNo} {info?.receiveNo}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={DeliveryAbstractLabel}> <ContentBoxItem label={BuyerLabel}>
{info?.buyerMemberName}
</ContentBoxItem>
<ContentBoxItem label={ReceiptAbstractLabel}>
{info?.digest} {info?.digest}
</ContentBoxItem> </ContentBoxItem>
...@@ -90,53 +94,66 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -90,53 +94,66 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<ContentBox title={Harvest.name} id={Harvest.key}> <ContentBox title={Harvest.name} id={Harvest.key}>
<ContentBoxItem label={ReceivingTime}> <div>
{info?.receiveTime} <ContentBoxItem label={ReceivingTime}>
</ContentBoxItem> {info?.receiveTime}
</ContentBoxItem>
<ContentBoxItem label={ConsigneeLabel}> <ContentBoxItem label={ConsigneeLabel}>
{info?.receiveVO?.consignee}
</ContentBoxItem>
<ContentBoxItem label={ReceivingAddress}>
<div>
{info?.receiveVO?.provinceName}
{info?.receiveVO?.cityName}
{info?.receiveVO?.districtName}
{info?.receiveVO?.streetName}
{info?.receiveVO?.address}
</div>
<div>
{info?.receiveVO?.phone}
{info?.receiveVO?.consignee} {info?.receiveVO?.consignee}
</div> </ContentBoxItem>
</ContentBoxItem> <ContentBoxItem label={DeliveryPhoneLabel}>
{info?.receiveVO?.phone}
</ContentBoxItem>
</div>
<div>
<ContentBoxItem label={ReceivingAddress}>
<div>
{info?.receiveVO?.provinceName}
{info?.receiveVO?.cityName}
{info?.receiveVO?.districtName}
{info?.receiveVO?.streetName}
{info?.receiveVO?.address}
</div>
<div>
{info?.receiveVO?.phone}
{info?.receiveVO?.consignee}
</div>
</ContentBoxItem>
</div>
<ContentBoxItem label={DeliveryPhoneLabel}>
{info?.receiveVO?.phone}
</ContentBoxItem>
</ContentBox> </ContentBox>
<ContentBox title={DeliveryInfo.name} id={DeliveryInfo.key}> <ContentBox title={DeliveryInfo.name} id={DeliveryInfo.key}>
<ContentBoxItem label={ConsigneeTimeLabel}>
{info?.sendTime}
</ContentBoxItem>
<ContentBoxItem label={DeliverySlefAddrLabel}>
<div>
{info?.deliverVO?.provinceName}
{info?.deliverVO?.cityName}
{info?.deliverVO?.districtName}
{info?.deliverVO?.streetName}
{info?.deliverVO?.address}
</div>
<div>
{info?.deliverVO?.phone}
{info?.deliverVO?.consignee}
</div>
</ContentBoxItem> <div>
<ContentBoxItem label={DeliveryNoLabel}>
{info?.deliveryNo}
</ContentBoxItem>
<ContentBoxItem label={ConsigneeTimeLabel}>
{info?.sendTime}
</ContentBoxItem>
</div>
<div>
<ContentBoxItem label={DeliverySlefAddrLabel}>
<div>
{info?.deliverVO?.provinceName}
{info?.deliverVO?.cityName}
{info?.deliverVO?.districtName}
{info?.deliverVO?.streetName}
{info?.deliverVO?.address}
</div>
<div>
{info?.deliverVO?.phone}
{info?.deliverVO?.consignee}
</div>
</ContentBoxItem>
</div>
</ContentBox> </ContentBox>
...@@ -145,22 +162,28 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -145,22 +162,28 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<ContentBoxItem label={DeliveryTypeLabel}> <ContentBoxItem label={DeliveryTypeLabel}>
{service.getDeliveryType(info?.deliveryType)} {service.getDeliveryType(info?.deliveryType)}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={LogisticsCarNoLabel}>
{info?.executorVO?.carNumbers} <ContentBoxItem label={LogisticsNoLabel}>
{info?.logisticsNo}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={LogisticsCompanyLabel}> <ContentBoxItem label={LogisticsCompanyLabel}>
{info?.logisticsCompany} {info?.logisticsCompany}
</ContentBoxItem> </ContentBoxItem>
<ContentBoxItem label={LogisticsNoLabel}>
{info?.logisticsNo} <ContentBoxItem label={LogisticsCarNoLabel}>
{info?.executorVO?.carNumbers}
</ContentBoxItem> </ContentBoxItem>
</ContentBox> </ContentBox>
<ContentBox title={DeliveryGood.name} id={DeliveryGood.key} cols={1}> <ContentBox title={DeliveryGood.name} id={DeliveryGood.key} cols={1}>
<Table <Table
columns={DeliveryNoticeTableColumn} columns={
info?.type == 1 ? DeliveryNoticeTableColumn : DeliveryNoticeTableColumnSRM
}
rowKey="id" rowKey="id"
dataSource={tableDataSource} dataSource={tableDataSource}
pagination={{ pagination={{
......
...@@ -75,13 +75,13 @@ const ReceivingNoteQuery: React.FC = () => { ...@@ -75,13 +75,13 @@ const ReceivingNoteQuery: React.FC = () => {
) )
} }
}, },
{ // {
title: '操作', // title: '操作',
dataIndex: '', // dataIndex: '',
key: 'x', // key: 'x',
align: 'center', // align: 'center',
render: (record) => renderOptionButton(record) // render: (record) => renderOptionButton(record)
}, // },
] ]
const fetchData = (params: unknown) => { const fetchData = (params: unknown) => {
......
...@@ -2,85 +2,86 @@ ...@@ -2,85 +2,86 @@
* 订单能力 -送货通知单协同 - 待确认送货通知单 - Schema * 订单能力 -送货通知单协同 - 待确认送货通知单 - Schema
* @author: Gavin * @author: Gavin
*/ */
import { ISchema } from '@formily/antd' import { ISchema } from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const' import { FORM_FILTER_PATH } from '@/formSchema/const'
export const receivingNoteQuerySchema: ISchema = { export const receivingNoteQuerySchema: ISchema = {
type: 'object', type: 'object',
properties: { properties: {
mageLayout: { mageLayout: {
type: 'object', type: 'object',
'x-component': 'mega-layout', 'x-component': 'mega-layout',
properties: { properties: {
topLayout: { topLayout: {
type: 'object', type: 'object',
'x-component': 'mega-layout', 'x-component': 'mega-layout',
'x-component-props': { 'x-component-props': {
grid: true, className: 'useMegaStart'
}, },
properties: { properties: {
ctl: { ctl: {
type: 'object', type: 'object',
'x-component': 'Children', 'x-component': 'Children',
'x-component-props': { 'x-component-props': {
children: '{{controllerBtns}}', children: '{{controllerBtns}}',
}, },
}, },
receiveNo: { receiveNo: {
type: 'string', type: 'string',
'x-component': 'Search', 'x-component': 'Search',
'x-component-props': { 'x-component-props': {
allowClear: true, allowClear: true,
placeholder: '请输入收货单号' placeholder: '请输入收货单号'
}, },
}, },
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
type: 'object', type: 'object',
'x-component': 'flex-layout', 'x-component': 'flex-layout',
'x-component-props': { 'x-component-props': {
rowStyle: { rowStyle: {
flexWrap: 'nowrap', flexWrap: 'nowrap',
}, justifyContent: 'flex-start'
colStyle: { },
marginLeft: 20, colStyle: {
}, marginRight: 20,
}, },
properties: { },
abstract: { properties: {
type: 'string', abstract: {
'x-component-props': { type: 'string',
allowClear: true, 'x-component-props': {
placeholder: '收货单摘要' allowClear: true,
} placeholder: '收货单摘要'
}, }
'[startDate, endDate]': { },
type: 'daterange', '[startDate, endDate]': {
'x-component-props': { type: 'daterange',
allowClear: true, 'x-component-props': {
placeholder: ['收货开始日期', '收货结束日期'], allowClear: true,
}, placeholder: ['收货开始日期', '收货结束日期'],
}, },
supplyMember: { },
type: 'string', supplyMember: {
'x-component-props': { type: 'string',
allowClear: true, 'x-component-props': {
placeholder: '采购会员' allowClear: true,
} placeholder: '采购会员'
}, }
submit: { },
'x-component': 'Submit', submit: {
'x-mega-props': { 'x-component': 'Submit',
span: 1, 'x-mega-props': {
}, span: 1,
'x-component-props': { },
children: '查询', 'x-component-props': {
}, children: '查询',
}, },
} },
} }
} }
} }
} }
} }
\ No newline at end of file }
\ No newline at end of file
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