Commit 8e86ceff authored by rainbowmorel@163.com's avatar rainbowmorel@163.com

小细节 添加placeholder

parent a176888c
...@@ -44,12 +44,14 @@ function LogisticsCompanySelect(props: LogisticsCompanySelectProps) { ...@@ -44,12 +44,14 @@ function LogisticsCompanySelect(props: LogisticsCompanySelectProps) {
} }
return ( return (
<Select disabled={disabled} value={value} options={options} onChange={(v) => { <Select
const option = options.find(o => { placeholder={`请选择物流公司`}
return o.value == v disabled={disabled} value={value} options={options} onChange={(v) => {
}) const option = options.find(o => {
onChange(option) return o.value == v
}} /> })
onChange(option)
}} />
) )
} }
......
...@@ -99,7 +99,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -99,7 +99,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
const handleAnchor = (len) => { const handleAnchor = (len) => {
update([ update([
ot === RoleTypeEnum.B2B ? { ot == RoleTypeEnum.B2B ? {
...DeliveryGood, ...DeliveryGood,
name: `${DeliveryGood.name}(${len})` name: `${DeliveryGood.name}(${len})`
} : } :
...@@ -112,7 +112,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -112,7 +112,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
const handleDelAnchor = (len) => { const handleDelAnchor = (len) => {
delUpdate([ delUpdate([
ot === RoleTypeEnum.B2B ? { ot == RoleTypeEnum.B2B ? {
...DeliveryGood, ...DeliveryGood,
name: `${DeliveryGood.name}(${len})` name: `${DeliveryGood.name}(${len})`
} : } :
...@@ -160,7 +160,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -160,7 +160,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
validatorByteObject(150) validatorByteObject(150)
]} ]}
label={NoteLabel} name="remark"> label={NoteLabel} name="remark">
<Input maxLength={150} placeholder="150个汉字" /> <Input maxLength={150} placeholder="最长150个汉字" />
</FormItem> </FormItem>
<FormItem <FormItem
...@@ -279,7 +279,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -279,7 +279,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
validatorByteObject(20) validatorByteObject(20)
]} ]}
hidden={isLogistics} label={LogisticsCarNoLabel} name="executorVO.carNumbers"> hidden={isLogistics} label={LogisticsCarNoLabel} name="executorVO.carNumbers">
<Input maxLength={20} /> <Input placeholder={`请选择${LogisticsCarNoLabel}`} maxLength={20} />
</FormItem> </FormItem>
<FormItem hidden={isLogistics} label={LogisticsCompanyLabel} name="logisticsCompanyInt"> <FormItem hidden={isLogistics} label={LogisticsCompanyLabel} name="logisticsCompanyInt">
...@@ -292,11 +292,11 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -292,11 +292,11 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
]} ]}
hidden={isLogistics} hidden={isLogistics}
label={LogisticsNoLabel} name="logisticsNo"> label={LogisticsNoLabel} name="logisticsNo">
<Input maxLength={20} /> <Input placeholder={`请选择${LogisticsNoLabel}`} maxLength={20} />
</FormItem> </FormItem>
</ContentBox> </ContentBox>
<ContentBox title={ot === 1 ? DeliveryGood.name : Material.name} <ContentBox title={ot == 1 ? DeliveryGood.name : Material.name}
id={ot == 1 ? DeliveryGood.key : Material.key} id={ot == 1 ? DeliveryGood.key : Material.key}
cols={1}> cols={1}>
...@@ -307,7 +307,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -307,7 +307,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
rowKey={row => row.orderNo} rowKey={row => row.orderNo}
columns={ columns={
[ [
...(ot === 1 ? DeliveryNoticeTableColumn : DeliveryNoticeTableColumnSRM) ...(ot == 1 ? DeliveryNoticeTableColumn : DeliveryNoticeTableColumnSRM)
, { , {
...DeliveryNumColumn, ...DeliveryNumColumn,
render: (t, rcode, index) => { render: (t, rcode, index) => {
......
...@@ -26,6 +26,7 @@ import { PATTERN_MAPS } from '@/constants/regExp'; ...@@ -26,6 +26,7 @@ import { PATTERN_MAPS } from '@/constants/regExp';
import { size } from 'lodash'; import { size } from 'lodash';
import usePrompt from '@/hooks/usePrompt'; import usePrompt from '@/hooks/usePrompt';
import useLogistics from '../../assets/hooks/useLogistics'; import useLogistics from '../../assets/hooks/useLogistics';
import { validatorByteObject } from '@/utils/regExp';
const DeliveryNoticeManageSRMDetails: React.FC = () => { const DeliveryNoticeManageSRMDetails: React.FC = () => {
...@@ -122,7 +123,11 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -122,7 +123,11 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<Input /> <Input />
</FormItem> </FormItem>
<FormItem label={NoteLabel} name="remark"> <FormItem
rules={[
validatorByteObject(100)
]}
label={NoteLabel} name="remark">
<Input placeholder='最长100字符,50个汉字' maxLength={100} /> <Input placeholder='最长100字符,50个汉字' maxLength={100} />
</FormItem> </FormItem>
...@@ -154,7 +159,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -154,7 +159,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<FormItem <FormItem
label={DeliveryNameLabel} name="executorVO.consignee"> label={DeliveryNameLabel} name="executorVO.consignee">
<Input /> <Input placeholder={`请输入${DeliveryNameLabel}`} />
</FormItem> </FormItem>
<FormItem <FormItem
...@@ -171,7 +176,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -171,7 +176,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" } { pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]} ]}
label={DeliveryPhoneLabel} name="executorVO.phone"> label={DeliveryPhoneLabel} name="executorVO.phone">
<Input /> <Input placeholder={`请输入${DeliveryPhoneLabel}`} />
</FormItem> </FormItem>
</ContentBox> </ContentBox>
...@@ -225,7 +230,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -225,7 +230,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem> </FormItem>
<FormItem hidden={isLogistics} label={LogisticsCarNoLabel} name="executorVO.carNumbers"> <FormItem hidden={isLogistics} label={LogisticsCarNoLabel} name="executorVO.carNumbers">
<Input maxLength={20} /> <Input placeholder={`请输入${LogisticsCarNoLabel}`} maxLength={20} />
</FormItem> </FormItem>
<FormItem hidden={isLogistics} label={LogisticsCompanyLabel} name="logisticsCompanyInt"> <FormItem hidden={isLogistics} label={LogisticsCompanyLabel} name="logisticsCompanyInt">
<LogisticsCompanyMerchantsSelect /> <LogisticsCompanyMerchantsSelect />
...@@ -234,7 +239,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -234,7 +239,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
hidden={isLogistics} hidden={isLogistics}
label={LogisticsNoLabel} label={LogisticsNoLabel}
name="logisticsNo"> name="logisticsNo">
<Input maxLength={20} /> <Input placeholder={`请输入${LogisticsNoLabel}`} maxLength={20} />
</FormItem> </FormItem>
</ContentBox> </ContentBox>
......
...@@ -28,6 +28,7 @@ import DeliveryGoodTableSelectSRM from '../../components/DeliveryGoodTableSelect ...@@ -28,6 +28,7 @@ import DeliveryGoodTableSelectSRM from '../../components/DeliveryGoodTableSelect
import { PATTERN_MAPS } from '@/constants/regExp'; import { PATTERN_MAPS } from '@/constants/regExp';
import usePrompt from '@/hooks/usePrompt'; import usePrompt from '@/hooks/usePrompt';
import useLogistics from '../../assets/hooks/useLogistics'; import useLogistics from '../../assets/hooks/useLogistics';
import { validatorByteObject } from '@/utils/regExp';
const ContentBoxItem = ContentBox.BaseInfoItem; const ContentBoxItem = ContentBox.BaseInfoItem;
...@@ -110,9 +111,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -110,9 +111,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem> </FormItem>
<FormItem label={NoteLabel} rules={[ <FormItem label={NoteLabel} rules={[
{ validatorByteObject(100)
max: 100, message: '最长100字符,50个汉字'
}
]} name="remark"> ]} name="remark">
<Input.TextArea placeholder='最长100字符,50个汉字' maxLength={100} rows={1} /> <Input.TextArea placeholder='最长100字符,50个汉字' maxLength={100} rows={1} />
</FormItem> </FormItem>
...@@ -147,7 +146,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -147,7 +146,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
<FormItem <FormItem
label={DeliveryNameLabel} name="executorVO.consignee"> label={DeliveryNameLabel} name="executorVO.consignee">
<Input maxLength={16} /> <Input placeholder={`请输入${DeliveryNameLabel}`} maxLength={16} />
</FormItem> </FormItem>
<FormItem <FormItem
...@@ -163,7 +162,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -163,7 +162,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
{ pattern: PATTERN_MAPS.phone, message: "手机号是否正确" } { pattern: PATTERN_MAPS.phone, message: "手机号是否正确" }
]} ]}
label={DeliveryPhoneLabel} name="executorVO.phone"> label={DeliveryPhoneLabel} name="executorVO.phone">
<Input maxLength={20} /> <Input placeholder={`请输入${DeliveryPhoneLabel}`} maxLength={20} />
</FormItem> </FormItem>
</ContentBox> </ContentBox>
......
...@@ -144,9 +144,7 @@ function DeliveryNoteAddForm() { ...@@ -144,9 +144,7 @@ function DeliveryNoteAddForm() {
</FormItem> </FormItem>
<FormItem label={NoteLabel} name="remark" rules={[ <FormItem label={NoteLabel} name="remark" rules={[
{ validatorByteObject(100)
max: 100, message: '最长100字节,50个汉字'
}
]}> ]}>
<Input placeholder="最长100字节,50个汉字" maxLength={100} /> <Input placeholder="最长100字节,50个汉字" maxLength={100} />
</FormItem> </FormItem>
...@@ -166,12 +164,12 @@ function DeliveryNoteAddForm() { ...@@ -166,12 +164,12 @@ function DeliveryNoteAddForm() {
<FormItem <FormItem
label={ConsigneeLabel} name="executorVO.consignee"> label={ConsigneeLabel} name="executorVO.consignee">
<Input /> <Input placeholder={`请输入${ConsigneeLabel}`} />
</FormItem> </FormItem>
<FormItem <FormItem
label={ConsigneePhoneLabel} name="executorVO.phone"> label={ConsigneePhoneLabel} name="executorVO.phone">
<Input /> <Input placeholder={`请输入${ConsigneePhoneLabel}`} />
</FormItem> </FormItem>
</div> </div>
...@@ -224,7 +222,7 @@ function DeliveryNoteAddForm() { ...@@ -224,7 +222,7 @@ function DeliveryNoteAddForm() {
{info?.executorVO?.carNumbers} {info?.executorVO?.carNumbers}
</FormItem> </FormItem>
<FormItem label={LogisticsCompanyLabel} > <FormItem label={LogisticsCompanyLabel} >
{info?.logisticsCompany} {info?.logisticsCompany ?? '暂无信息'}
</FormItem> </FormItem>
<FormItem <FormItem
rules={[ rules={[
...@@ -232,7 +230,7 @@ function DeliveryNoteAddForm() { ...@@ -232,7 +230,7 @@ function DeliveryNoteAddForm() {
]} ]}
label={LogisticsNoLabel} > label={LogisticsNoLabel} >
<Input hidden maxLength={20} disabled={true} /> <Input hidden maxLength={20} disabled={true} />
{info?.logisticsNo} {info?.logisticsNo ?? '暂无信息'}
</FormItem> </FormItem>
</ContentBox> </ContentBox>
......
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