Commit 7969648a authored by 前端-许佳敏's avatar 前端-许佳敏

merge: 合并0418修复的bug

parents 0da76bff 19c903b4
......@@ -10,7 +10,7 @@ import CommodityRoute from './commodityRoute'; // 商品能力路由
// import ChannelRoute from './channelRoute' // 渠道能力路由
import TranactionRoute from './tranactionRoute'; // 交易能力路由
// import LogisticsRoute from './logisticsRoutes' // 物流能力路由
// import PayandSettleRoute from './payandSettle' //支付与结算
import PayandSettleRoute from './payandSettle' //支付与结算
// import AuthConfigRoute from './authConfigRoute'
// import AfterService from './afterServiceRoute' // 售后
// import HandlingRoute from './handlingRoute'; // 加工能力
......
......@@ -80,6 +80,12 @@ const UploadVoucherModal: React.FC<UploadVocherProps> = (props) => {
}, [])
const handleOnFileChange = (info: UploadChangeParam) => {
console.log(info);
const isSizeLimit = info.file.size / 1024 < fileMaxSize;
if (!isSizeLimit) {
return;
}
const fileList = info.fileList;
const newList = fileList.map((file) => {
return {
......
......@@ -98,9 +98,9 @@ export class HandleFormSubmit {
moment().endOf('day')
],
receiveVO: {
...data?.receiverBO,
receiverName: data?.receiverBO?.consignee,
fullAddress: `${data?.receiverBO?.provinceName ?? ''}${data?.receiverBO?.cityName ?? ''}${data?.receiverBO?.districtName ?? ''}${data?.receiverBO?.streetName ?? ''}`
...data?.receiveVO,
receiverName: data?.receiveVO?.consignee,
fullAddress: `${data?.receiveVO?.provinceName ?? ''}${data?.receiveVO?.cityName ?? ''}${data?.receiveVO?.districtName ?? ''}${data?.receiveVO?.streetName ?? ''}`
},
executorVO: {
...data?.executorVO,
......@@ -110,7 +110,8 @@ export class HandleFormSubmit {
"executorVO.phone": data?.executorVO?.phone,
sendTime: data?.sendTime ? moment(data?.sendTime) : moment().startOf('day'),
"executorVO.carNumbers": data?.executorVO?.carNumbers,
"receiverBO.phone": data?.receiverBO?.phone,
"receiveVO.phone": data?.receiveVO?.phone,
"receiveVO.consignee":data?.receiveVO?.consignee,
logisticsNo: data?.logisticsNo,
logisticsCompanyInt: {
label: data?.logisticsCompany,
......@@ -332,15 +333,15 @@ export class ReceiveOrderCreate extends DeliveryNoteAddService {
fullAddress: data.deliverVO?.provinceName ?? '' + data.deliverVO?.cityName ?? '' + data.deliverVO?.districtName ?? '' + data.deliverVO?.streetName ?? ''
},
receiveVO: {
...data.receiverBO,
receiverName: data.receiverBO?.consignee,
fullAddress: data?.receiverBO?.provinceName ?? '' + data?.receiverBO?.cityName ?? '' + data?.receiverBO?.districtName ?? '' + data?.receiverBO?.streetName ?? ''
...data.receiveVO,
receiverName: data.receiveVO?.consignee,
fullAddress: data?.receiveVO?.provinceName ?? '' + data?.receiveVO?.cityName ?? '' + data?.receiveVO?.districtName ?? '' + data?.receiveVO?.streetName ?? ''
},
"executorVO.phone": data.executorVO.phone,
sendTime: moment(data.sendTime),
receiveTime: moment(data.receiveTime),
"executorVO.carNumbers": data.executorVO.carNumbers,
"receiverBO.phone": data.receiverBO.phone,
"receiveVO.phone": data.receiveVO.phone,
logisticsNo: data.logisticsNo,
logisticsCompanyInt: {
label: data.logisticsCompany,
......@@ -402,7 +403,7 @@ export class DeliveryNoticeOrderAddService extends DeliveryNoteAddService {
receiverName: data.receiveVO.consignee,
fullAddress: data.receiveVO.provinceName + data.receiveVO.cityName + data.receiveVO.districtName + data.receiveVO.streetName ?? '' + data.receiveVO.address
},
"receiverBO.phone": data.receiveVO.phone,
"receiveVO.phone": data.receiveVO.phone,
products: data.products,
orderType: data.orderType,
sourceNo: data.sourceNo
......
......@@ -77,5 +77,5 @@ export const AlreadyDeliveryNoteGenerated = intl.formatMessage({id: 'order.yishe
export const Deliverylimit = intl.formatMessage({id: 'order.songhuoshuliangbunengdayu',defaultMessage: '送货数量不能大于待送货数量'})
export const PlearInput = '请输入'
......@@ -198,7 +198,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
validatorByteObject(16)
]}
label={DeliveryNameLabel} name="executorVO.consignee">
<Input maxLength={16} />
<Input maxLength={16} placeholder={`请输入${DeliveryNameLabel}`} />
</FormItem>
<FormItem
......@@ -215,7 +215,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
validatorByteObject(20)
]}
label={DeliveryPhoneLabel} name="executorVO.phone">
<Input type="tel" maxLength={20} />
<Input type="tel" maxLength={20} placeholder={`请输入${DeliveryPhoneLabel}`} />
</FormItem>
</ContentBox>
......@@ -236,7 +236,10 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
// ]}
label={ReceivingAddressLabel} name="receiveVO">
<ReceiverAddress />
<ReceiverAddress
hiddenBtn={true}
disabled={true}
/>
</FormItem>
......
......@@ -28,6 +28,7 @@ import usePrompt from '@/hooks/usePrompt';
import useLogistics from '../../assets/hooks/useLogistics';
import { validatorByteObject } from '@/utils/regExp';
import { formatTable, formMapData } from '../../components/DeliveryGoodTableSelect/useformatTable';
import { getMemberManageBuyerMember } from '@/services/MemberV2Api';
const DeliveryNoticeManageSRMDetails: React.FC = () => {
......@@ -144,7 +145,9 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
required()
]}
label={BuyerLabel} name="member">
<RoleSelect formatFeils={(e) => {
<RoleSelect
request={getMemberManageBuyerMember}
formatFeils={(e) => {
return {
buyerMemberId: e.memberId,
buyerRoleId: e.roleId,
......
......@@ -80,7 +80,6 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
title: "提示",
content: "确认送货单资料填写是否正确,提交后不能再撤回!",
onOk: () => {
service.setTableData(tableDataSource);
service.submit().then(res => {
if (res.code === 1000) {
......
......@@ -185,7 +185,7 @@ function DeliveryNoticeFromCreate() {
<FormItem
label={DeliveryNameLabel} name="executorVO.consignee">
<Input />
<Input placeholder={`请输入${DeliveryNameLabel}`} />
</FormItem>
<FormItem
......@@ -198,7 +198,7 @@ function DeliveryNoticeFromCreate() {
<FormItem
label={DeliveryPhoneLabel} name="executorVO.phone">
<Input />
<Input placeholder={`请输入${DeliveryPhoneLabel}`} />
</FormItem>
</ContentBox>
......
......@@ -99,11 +99,11 @@ const DeliveryNoteManageDetails: React.FC = () => {
{info?.receiveTime}
</ListInfoItem>
<ListInfoItem className="mt-16" label='收货人'>
{info?.receiverBO?.consignee}
<ListInfoItem className="mt-16" label='收货人'>
{info?.executorVO?.consignee}
</ListInfoItem>
<ListInfoItem className="mt-16" label='收货电话'>
{info?.receiverBO?.phone}
{info?.executorVO?.phone}
</ListInfoItem>
</div>
......
......@@ -6,9 +6,9 @@ import {
ReceiptAddLabel, NoteLabel, DeliveryTimeLabel,
ConsigneeTimeLabel, LogisticsCompanyLabel, LogisticsCarNoLabel, LogisticsNoLabel,
DeliveryAbstractLabel, BuyerLabel, DeliveryDateLabel, DeliveryNameLabel,
DeliveryPhoneLabel, ReceivingAddress, DeliveryTypeLabel, DeliveryNoLabel, ExternalRoamRecord, DeliverySlefAddrLabel, DeliveryDate, ReceivingTime, ConsigneeLabel, ConsigneePhoneLabel
DeliveryPhoneLabel, ReceivingAddress, DeliveryTypeLabel, DeliveryNoLabel, ExternalRoamRecord, DeliverySlefAddrLabel, DeliveryDate, ReceivingTime, ConsigneeLabel, ConsigneePhoneLabel, PlearInput
} from '../../constants'
import { Button, Form, Input, message, Radio, Table } from 'antd'
import { Button, Form, Input, message, Modal, Radio, Table } from 'antd'
import { FormItem, required } from '@/components/FormItem'
import { DeliveryNoticeTableColumn, DeliveryNoticeTableColumnSRM, ExternalRoamRecordTableColumn } from "../../constants/page-table-column"
import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../assets/context'
......@@ -59,12 +59,17 @@ function DeliveryNoteAddForm() {
});
noteService.getDetailInfoById(id).then(res => {
console.log(res, 'sssssssss');
res.receiveVO = res.receiverBO; // 重置一下 receiveVO 字段 防止报错 后期可以去掉 因为后台字段不统一导致的
console.log(res);
setReceiveTitle(res)
const target = {
...service.formatField(res),
"executorVO.phone": res?.executorVO?.phone,
"executorVO.consignee": res?.executorVO?.consignee,
"executorVO.carNumbers": res?.executorVO?.carNumbers,
"receiveVO.phone": res?.receiveVO?.phone,
"receiveVO.consignee": res?.receiveVO?.consignee,
logisticsCompanyInt: {
label: res?.logisticsCompany,
value: res?.logisticsCompanyId
......@@ -84,12 +89,21 @@ function DeliveryNoteAddForm() {
function handleSubmit() {
console.log(tableDataSource)
Modal.confirm({
title: "提示",
content: "确认送货单资料填写是否正确,提交后不能再撤回!",
onOk: () => {
service.setTableData(tableDataSource);
service.submit().then(res => {
if (res.code == 1000) {
message.success(res.message)
if (res.code === 1000) {
handleLeave(false)
setTimeout(() => {
history.go(-1)
} else {
message.error(res.message)
}, 1000);
}
});
}
})
}
......@@ -123,7 +137,7 @@ function DeliveryNoteAddForm() {
required()
]}
label={DeliveryNoLabel} name="deliveryNo">
<Input disabled={true} />
<Input disabled={true} placeholder={`${PlearInput}${DeliveryNoLabel}`}/>
</FormItem>
<FormItem
......@@ -131,7 +145,7 @@ function DeliveryNoteAddForm() {
required()
]}
label={DeliveryAbstractLabel} name="digest">
<Input disabled={true} />
<Input disabled={true} placeholder={`${PlearInput}${DeliveryAbstractLabel}`} />
</FormItem>
<FormItem
......@@ -152,7 +166,7 @@ function DeliveryNoteAddForm() {
</FormItem>
<FormItem label={NoteLabel} name="remark">
<Input />
<Input placeholder={`${PlearInput}${NoteLabel}`} />
</FormItem>
</ContentBox>
......@@ -170,21 +184,12 @@ function DeliveryNoteAddForm() {
<FormItem
rules={[
{
required: false,
message: '',
}
]}
label={ConsigneeLabel} name="receiveVO.consignee">
<Input />
</FormItem>
<FormItem
rules={[
required()
]}
label={ReceivingAddress} name="receiveVO">
<ReceiverAddress
disabled={true}
hiddenBtn
/>
</FormItem>
......@@ -195,8 +200,20 @@ function DeliveryNoteAddForm() {
message: '',
}
]}
label={ConsigneePhoneLabel} name="receiveVO.phone">
<Input />
label={ConsigneeLabel} name="executorVO.consignee">
<Input placeholder={`${PlearInput}${ConsigneeLabel}`} />
</FormItem>
<FormItem
rules={[
{
required: false,
message: '',
}
]}
label={ConsigneePhoneLabel} name="executorVO.phone">
<Input placeholder={`${PlearInput}${ConsigneePhoneLabel}`} />
</FormItem>
......@@ -235,7 +252,7 @@ function DeliveryNoteAddForm() {
</FormItem>
<FormItem label={LogisticsCarNoLabel} name="executorVO.carNumbers">
<Input />
<Input placeholder={`${PlearInput}${LogisticsCarNoLabel}`} />
</FormItem>
<FormItem label={LogisticsCompanyLabel} name="logisticsCompanyInt">
<LogisticsCompanyMerchantsSelect />
......@@ -247,7 +264,7 @@ function DeliveryNoteAddForm() {
}
]}
name="logisticsNo">
<Input maxLength={20} />
<Input maxLength={20} placeholder={`${PlearInput}${LogisticsNoLabel}`} />
</FormItem>
</ContentBox>
......
......@@ -249,7 +249,9 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
}
} catch (error) {
setBtnLoading(false)
if(error?.code !== 1102) {
error?.message && message.error(error.message)
}
console.log(error)
}
}
......
......@@ -34,7 +34,7 @@ const BillDelivery: React.FC<BasicInfoProps> = ({ cardTitle, type, styles }) =>
span: 12,
fieldList: [
{ title: "预交日期:", name: 'advanceDeliveryDate' },
{ title: "送货地址:", name: _data.deliveryMethod != 2 ? 'deliveryAddress' : 'receiverAddressResponse' },
{ title: "送货地址:", name: _data.deliveryMethod == 2 ? 'deliveryAddress' : 'receiverAddressResponse' },
]
},
......
......@@ -4,6 +4,7 @@ import { EnvironmentOutlined } from '@ant-design/icons';
import { FormDetailContext } from '@/formSchema/context';
import { getLogisticsSelectListMemberShipperAddress } from '@/services/LogisticsV2Api';
import { useIntl } from 'umi';
import { validatorByte } from '@/utils/regExp';
export interface MaterialTableCellProps {
title: React.ReactNode;
......@@ -147,15 +148,11 @@ export const MaterialTableCell: React.FC<MaterialTableCellProps> = ({
callback(err)
}
}
let childNode = children;
if (editable) {
childNode =
<>
<Form.Item
style={{ margin: 0 }}
name={dataIndex}
initialValue={record[dataIndex] || ''}
rules={dataIndex === 'quantity' ? [
const switchValidator = () => {
switch (dataIndex) {
case 'quantity': {
return [
{
required: true,
message: `${title}${intl.formatMessage({ id: 'purchaseRequisition.bixutianxie', defaultMessage: '必须填写' })}`,
......@@ -167,7 +164,11 @@ export const MaterialTableCell: React.FC<MaterialTableCellProps> = ({
{
validator: validatorNumber
},
] : [
]
}
case 'price' : {
return [
{
pattern: /^\d+(\.\d{1,4})?$/,
message: intl.formatMessage({ id: 'purchaseRequisition.danjiajinxiansi', defaultMessage: '单价仅限四位小数' }),
......@@ -175,7 +176,33 @@ export const MaterialTableCell: React.FC<MaterialTableCellProps> = ({
{
validator: validatorNumber
}
]}
]
}
case 'remark': {
return [
{
validator: (r, v, c) => validatorByte(r, v, c, 200)
}
]
}
default : {
return []
}
}
}
let childNode = children;
if (editable) {
childNode =
<>
<Form.Item
style={{ margin: 0 }}
name={dataIndex}
initialValue={record[dataIndex] || ''}
rules={switchValidator()}
>
{chooseFormItem(formItem, record[dataIndex] || '')}
</Form.Item>
......
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