Commit c39df004 authored by rainbowmorel@163.com's avatar rainbowmorel@163.com

修改文案问题

parent 93a935d3
......@@ -63,6 +63,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
service.setTableData(tableDataSource);
service.submit().then(res => {
if (res.code === 1000) {
handleLeave(false)
history.go(-1)
}
});
......@@ -74,9 +75,19 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
}, [form, tableDataSource])
const handleRemoveMaterialTableRow = (i: number) => {
const source: any[] = tableDataSource;
const newSource = source.splice(i, 0)
setTableDataSource(newSource);
const source: any[] = JSON.parse(JSON.stringify(tableDataSource));
source.splice(i, 1);
setTableDataSource(source);
let atpm = JSON.parse(JSON.stringify(anchors));
atpm.pop()
setAnchors([
...atpm,
{
...DeliveryGood,
name: `${DeliveryGood.name}(${source.length})`
}
])
}
return (
......@@ -107,7 +118,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem>
<FormItem label={NoteLabel} name="remark">
<Input />
<Input placeholder='最长100字符,50个汉字' maxLength={100} />
</FormItem>
<FormItem
......@@ -137,9 +148,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem>
<FormItem
rules={[
required()
]}
label={DeliveryNameLabel} name="executorVO.consignee">
<Input />
</FormItem>
......@@ -155,7 +163,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<FormItem
rules={[
required('请出入正确的手机号'),
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]}
label={DeliveryPhoneLabel} name="executorVO.phone">
......@@ -175,11 +182,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem>
<FormItem
rules={[
required()
]}
label={ReceivingAddress} name="receiveVO">
<ReceiverAddress
disabled={true}
/>
......@@ -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)
}}
/>
......
......@@ -32,7 +32,6 @@ const ContentBoxItem = ContentBox.BaseInfoItem;
const DeliveryNoticeManageSRMEdit: React.FC = () => {
const [tableDataSource, setTableDataSource] = useState<any>([]);
const [outerHistoryList, setOuterHistoryList] = useState<any>([]);
const { renderPrompt, handleLeave } = usePrompt()
const location: any = useLocation()
const { id } = location.query
......@@ -46,18 +45,24 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
Distribution,
DeliveryInfo,
LogisticsInfo,
DeliveryGood,
])
useEffect(() => {
form.setFieldsValue({ sourceType: 0, id: id })
service.getDetailById(id).then(res => {
form.setFieldsValue(res)
setOuterHistoryList(res?.outerHistoryList)
})
service.getOrderDeliveryOrderDetailProductPage({ id }).then(res => {
setTableDataSource(res?.data)
setAnchors([
...anchors,
{
...DeliveryGood,
name: `${DeliveryGood.name}(${res?.data?.length})`
}
])
})
}, [id])
......@@ -72,6 +77,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
service.setTableData(tableDataSource);
service.submit().then(res => {
if (res.code === 1000) {
handleLeave(false)
history.go(-1)
}
});
......@@ -109,7 +115,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<FormItem rules={[
required()
]} label={DeliveryAbstractLabel} name="digest">
<Input />
<Input placeholder='最长100字符,50个汉字' />
</FormItem>
<FormItem label={NoteLabel} name="remark">
......@@ -121,7 +127,9 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
required()
]}
label={BuyerLabel} name="member">
<RoleSelect formatFeils={(e) => {
<RoleSelect
disabled={true}
formatFeils={(e) => {
return {
buyerMemberId: e.id,
buyerRoleId: e.roleId,
......@@ -142,26 +150,21 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<DatePickerSelect disabled={true} className='w-full' />
</FormItem>
<FormItem
rules={[
required()
]}
label={DeliveryTimeLabel} name="deliveryRangeTime">
<DatePickerSelect.RangePicker disabled={true} className="w-full" picker='time' />
label={DeliveryNameLabel} name="executorVO.consignee">
<Input />
</FormItem>
<FormItem
rules={[
required()
]}
label={DeliveryNameLabel} name="executorVO.consignee">
<Input />
label={DeliveryTimeLabel} name="deliveryRangeTime">
<DatePickerSelect.RangePicker disabled={true} className="w-full" picker='time' />
</FormItem>
<FormItem
rules={[
required('请出入正确的手机号'),
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]}
label={DeliveryPhoneLabel} name="executorVO.phone">
......@@ -180,11 +183,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</FormItem>
<FormItem
rules={[
required()
]}
label={ReceivingAddress} name="receiveVO">
<ReceiverAddress
disabled={true}
/>
......@@ -255,15 +254,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</ContentBox>
</Form>
<ContentBox title={ExternalRoamRecord.name} key={ExternalRoamRecord.key} cols={1}>
<Table
columns={ExternalRoamRecordTableColumn}
rowKey="id"
dataSource={outerHistoryList}
/>
</ContentBox>
</AnchorPage>
)
}
......
......@@ -5,7 +5,7 @@
*/
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
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 { Input, Table, Row, Col, Select, Radio, Form, Button, Modal } from 'antd';
import { DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM } from '../../constants/page-table-column';
......@@ -32,7 +32,7 @@ const ContentBoxItem = ContentBox.BaseInfoItem;
const DeliveryNoticeManageSRMDetails: React.FC = () => {
const [tableDataSource, setTableDataSource] = useState();
const [tableDataSource, setTableDataSource] = useState<any[]>();
const { renderPrompt, handleLeave } = usePrompt()
......@@ -44,7 +44,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
Distribution,
DeliveryInfo,
LogisticsInfo,
DeliveryGood,
Material,
])
useEffect(() => {
......@@ -104,8 +104,12 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<Input />
</FormItem>
<FormItem label={NoteLabel} name="remark">
<Input.TextArea rows={1} />
<FormItem label={NoteLabel} rules={[
{
max: 100, message: '最长100字符,50个行字'
}
]} name="remark">
<Input.TextArea placeholder='最长100字符,50个行字' maxLength={100} rows={1} />
</FormItem>
<FormItem
......@@ -137,9 +141,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem>
<FormItem
rules={[
required()
]}
label={DeliveryNameLabel} name="executorVO.consignee">
<Input />
</FormItem>
......@@ -154,7 +155,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<FormItem
rules={[
required('请出入正确的手机号'),
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]}
label={DeliveryPhoneLabel} name="executorVO.phone">
......@@ -174,19 +174,15 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem>
<FormItem
rules={[
required()
]}
label={ReceivingAddress} name="receiveVO">
<ReceiverAddress
disabled={true}
/>
</FormItem>
<FormItem
rules={[
required()
required(`请输入${DeliverySlefAddrLabel}`)
]}
label={DeliverySlefAddrLabel} name="deliveryVO">
......@@ -213,21 +209,22 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
{/* <Radio.Button value={3}>无效配送</Radio.Button> */}
</Radio.Group>
</FormItem>
<FormItem label={LogisticsCarNoLabel} name="executorVO.carNumbers">
<Input maxLength={20} />
<FormItem
label={LogisticsNoLabel} name="logisticsNo">
<Input maxLength={20} placeholder={`请输入${LogisticsNoLabel}`} />
</FormItem>
<FormItem label={LogisticsCompanyLabel} name="logisticsCompanyInt">
<LogisticsCompanyMerchantsSelect />
</FormItem>
<FormItem
label={LogisticsNoLabel} name="logisticsNo">
<Input maxLength={20} />
<FormItem label={LogisticsCarNoLabel} name="executorVO.carNumbers">
<Input maxLength={20} placeholder={`请输入${LogisticsCarNoLabel}`} />
</FormItem>
</ContentBox>
<ContentBox title={DeliveryGood.name} id={DeliveryGood.key} cols={1}>
<ContentBox title={Material.name} id={Material.key} cols={1}>
{/* 在编辑的时候不需要进行此操作 */}
<DeliveryGoodTableSelectSRM
form={form}
......@@ -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)
}}
/>
......@@ -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}
......
......@@ -5,7 +5,7 @@
*/
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
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 { Table } from 'antd';
import { DeliveryNoteAddFromTableColumn, DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM, ExternalRoamRecordTableColumn } from '../../constants/page-table-column';
......@@ -27,8 +27,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
Distribution,
DeliveryInfo,
LogisticsInfo,
Material,
ExternalRoamRecord
])
const [info, setInfo] = useState<any>();
......@@ -39,15 +38,25 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
useEffect(() => {
service.getDetailInfoById(query.id as string).then(res => {
setInfo(res)
})
service.getDetailInfoById(query.id as string).then(info => {
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)
})
})
}, [])
......@@ -69,6 +78,10 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
{info?.deliveryNo}
</ContentBoxItem>
<ContentBoxItem label={BuyerLabel}>
{info?.buyerMemberName}
</ContentBoxItem>
<ContentBoxItem label={DeliveryAbstractLabel}>
{info?.digest}
</ContentBoxItem>
......@@ -88,7 +101,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</ContentBoxItem>
<ContentBoxItem label={DeliveryNameLabel}>
{info?.executorVO?.consignee}
{info?.executorVO?.consignee ?? '暂无信息'}
</ContentBoxItem>
<ContentBoxItem label={DeliveryTime}>
......@@ -96,7 +109,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</ContentBoxItem>
<ContentBoxItem label={DeliveryPhoneLabel}>
{info?.executorVO?.phone}
{info?.executorVO?.phone ?? '暂无信息'}
</ContentBoxItem>
</ContentBox>
......@@ -105,21 +118,6 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
{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>
<ContentBoxItem label={DeliveryAddrLabel}>
<div>
{info?.receiverBO?.provinceName ?? ''}
......@@ -135,6 +133,20 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</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 title={LogisticsInfo.name} id={LogisticsInfo.key}>
......@@ -142,14 +154,14 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<ContentBoxItem label={DeliveryTypeLabel}>
{service.getDeliveryType(info?.deliveryType)}
</ContentBoxItem>
<ContentBoxItem label={LogisticsCarNoLabel}>
{info?.executorVO?.carNumbers}
<ContentBoxItem label={LogisticsNoLabel}>
{info?.logisticsNo}
</ContentBoxItem>
<ContentBoxItem label={LogisticsCompanyLabel}>
{info?.logisticsCompany}
</ContentBoxItem>
<ContentBoxItem label={LogisticsNoLabel}>
{info?.logisticsNo}
<ContentBoxItem label={LogisticsCarNoLabel}>
{info?.executorVO?.carNumbers}
</ContentBoxItem>
</ContentBox>
......
......@@ -5,7 +5,7 @@
*/
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
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 { Input, Table, Row, Col, Select, Radio, Form, Button, message, Modal } from 'antd';
import { DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM, ExternalRoamRecordTableColumn } from '../../constants/page-table-column';
......@@ -48,7 +48,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
Distribution,
DeliveryInfo,
LogisticsInfo,
DeliveryGood,
])
useEffect(() => {
......@@ -60,6 +59,13 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
service.getOrderDeliveryOrderDetailProductPage({ id }).then(res => {
setTableDataSource(res.data)
setAnchors([
...anchors,
{
...Material,
name: `${Material.name}(${res?.data?.length})`
}
])
})
}, [id])
......@@ -73,6 +79,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
service.setTableData(tableDataSource);
service.submit().then(res => {
if (res.code === 1000) {
handleLeave(false)
history.go(-1)
}
});
......@@ -115,7 +122,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</FormItem>
<FormItem label={NoteLabel} name="remark">
<Input.TextArea rows={1} />
<Input.TextArea rows={1} placeholder="最长100字符,50个汉字" maxLength={100} />
</FormItem>
<FormItem
......@@ -123,7 +130,9 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
required()
]}
label={BuyerLabel} name="member">
<RoleSelect formatFeils={(e) => {
<RoleSelect
disabled={true}
formatFeils={(e) => {
return {
buyerMemberId: e.id,
buyerRoleId: e.roleId,
......@@ -145,9 +154,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</FormItem>
<FormItem
rules={[
required()
]}
label={DeliveryNameLabel} name="executorVO.consignee">
<Input />
</FormItem>
......@@ -162,7 +168,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<FormItem
rules={[
required('请出入正确的手机号'),
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]}
label={DeliveryPhoneLabel} name="executorVO.phone">
......@@ -181,9 +186,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</FormItem>
<FormItem
rules={[
required()
]}
label={ReceivingAddress} name="receiveVO">
<ReceiverAddress
......@@ -253,13 +256,13 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</ContentBox>
</Form>
<ContentBox title={ExternalRoamRecord.name} key={ExternalRoamRecord.key} cols={1}>
{/* <ContentBox title={ExternalRoamRecord.name} key={ExternalRoamRecord.key} cols={1}>
<Table
columns={ExternalRoamRecordTableColumn}
rowKey="id"
dataSource={outerHistoryList}
/>
</ContentBox>
</ContentBox> */}
</AnchorPage>
......
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