Commit 14b3cdb1 authored by rex's avatar rex

选择会员的多肽因态兼容性 优化

DeliveryNoteUploadService 修个的时候去掉 table 的校验
parent 3332d315
......@@ -24,11 +24,13 @@ interface AddressDrawerProps {
sumbitRequest?: SumbitRequest
addressListRequest?: (values?: any) => Promise<any>
value?: any
disabled?: boolean
}
function AddressDrawer(props: AddressDrawerProps) {
const { onChange, formInstance, renderForm, sumbitRequest, addressListRequest, value: addr } = props;
const { onChange, formInstance, renderForm, sumbitRequest, addressListRequest, value: addr, disabled = false } = props;
const [visible, setVisible] = useState<boolean>(false);
const [showForm, setShowForm] = useState<boolean>(false);
......@@ -88,11 +90,11 @@ function AddressDrawer(props: AddressDrawerProps) {
<AddressRaioContextProvider value={addrList}>
<Row gutter={10}>
<Col span={20}>
<Input.TextArea value={`${value?.fullAddress} ${value?.shipperName ? value?.shipperName : value?.receiverName} ${value?.phone}`} />
<Input.TextArea disabled={disabled} value={`${value?.fullAddress} ${value?.shipperName ? value?.shipperName : value?.receiverName} ${value?.phone}`} />
</Col>
<Col span={4}>
<Button className='w-full' onClick={() => setVisible(true)}>管理</Button>
<Button disabled={disabled} className='w-full' onClick={() => setVisible(true)}>管理</Button>
</Col>
</Row>
......
......@@ -97,7 +97,7 @@ function RoleSelect(props: RoleSelectProps) {
);
}
RoleSelect.defaultProps = {
request: getMemberManageLowerConsumerMemberPage,
request: getMemberManageUpperConsumerMerchantPage,
params: {},
onChange: (e) => { }
}
......
......@@ -13,6 +13,7 @@ class DeliveryNoticeOrder {
getOrderDeliveryPlanOrderProductPage(form: FormInstance) {
let fields = form.getFieldsValue();
console.log(fields)
let payload: any = {
memberId: fields.member?.buyerMemberId,
roleId: fields.member?.buyerRoleId,
......
......@@ -189,6 +189,11 @@ export class DeliveryNoteAddService extends HandleFormSubmit {
}
export class DeliveryNoteUploadService extends DeliveryNoteAddService {
handleBeforeFields(): boolean {
return false;
}
getSubmitRequest(): any {
return postOrderDeliveryOrderUpdate
}
......
......@@ -46,19 +46,7 @@ export const DeliveryNoticeTableColumn: any = [
UntilColumn,
OrderNoColumn,
OrderCreatedAtColumn,
OredrNumColumn,
{
...DeliveryNumColumn,
render: (t, rcode, index) => {
return (
<HarvestMaterialInput
value={rcode[OredrNumColumn.key]}
index={index}
keyUp="deliveryCount"
/>
)
}
}
OredrNumColumn
];
// 计划送货物料表格
......
......@@ -14,7 +14,7 @@ import { DatePickerSelect } from '@/components/DatePickerSelect'
import { AddressDrawer } from '@/components/AddressDrawer';
import { getLogisticsSelectListReceiverAddress, getLogisticsSelectListShipperAddress, postLogisticsReceiverAddressAdd, postLogisticsReceiverAddressUpdate, postLogisticsShipperAddressAdd, postLogisticsShipperAddressUpdate } from '@/services/LogisticsV2Api';
import DeliveryGoodTableSelect from '../../components/DeliveryGoodTableSelect/DeliveryGoodTableSelect';
import { HarvestMaterialContextProvider, HarvestMaterialContext } from '../../assets/context';
import { HarvestMaterialContextProvider, HarvestMaterialContext, HarvestMaterialInput } from '../../assets/context';
import moment from 'moment';
import { HandelFormFieldsKeyValue } from '@/utils/form';
import { DeliveryNoteAddService } from '../../assets/handles/HandleFormSubmit';
......@@ -22,6 +22,7 @@ import { RoleSelect } from '@/components/RoleSelect';
import DeliveryNoticeOrderFactory from '../../assets/handles/DeliveryNoticeOrder';
import LogisticsCompanyMerchantsSelect from '@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect';
import { values } from 'lodash';
import { DeliveryNumColumn, OredrNumColumn } from '../../constants/table-column';
const ContentBoxItem = ContentBox.BaseInfoItem;
......@@ -82,7 +83,14 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
</FormItem>
<FormItem label={BuyerLabel} name="member">
<RoleSelect />
<RoleSelect formatFeils={(e) => {
return {
buyerMemberId: e.memberId,
buyerRoleId: e.roleId,
roleType: 2,
name: e.name
}
}} />
</FormItem>
</ContentBox>
......@@ -181,7 +189,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
phone: value[0].phone,
consignee: value[0].consignee,
receiverName: value[0].consignee,
fullAddress:`${value[0].provinceName}${value[0].cityName}${value[0].districtName}${value[0].streetName}${value[0].address}`
fullAddress: `${value[0].provinceName}${value[0].cityName}${value[0].districtName}${value[0].streetName}${value[0].address}`
}
form.setFieldsValue({
'receiveVO': addr
......@@ -197,7 +205,22 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
}}>
<Table
rowKey={row => row.orderNo}
columns={DeliveryNoticeTableColumn}
columns={
[
...DeliveryNoticeTableColumn
, {
...DeliveryNumColumn,
render: (t, rcode, index) => {
return (
<HarvestMaterialInput
value={rcode[OredrNumColumn.key]}
index={index}
keyUp="deliveryCount"
/>
)
}
}
]}
dataSource={tableDataSource}
/>
</HarvestMaterialContextProvider>
......
......@@ -22,6 +22,7 @@ import { RoleSelect } from '@/components/RoleSelect';
import DeliveryNoticeOrderFactory from '../../assets/handles/DeliveryNoticeOrder';
import LogisticsCompanyMerchantsSelect from '@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect';
import { useLocation } from 'umi';
import { DeliveryNumColumn } from '../../constants/table-column';
const ContentBoxItem = ContentBox.BaseInfoItem;
......@@ -100,7 +101,14 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
</FormItem>
<FormItem label={BuyerLabel} name="member">
<RoleSelect />
<RoleSelect formatFeils={(e) => {
return {
buyerMemberId: e.id,
buyerRoleId: e.roleId,
roleType: 2,
name: e.name
}
}} />
</FormItem>
</ContentBox>
......@@ -142,6 +150,7 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<FormItem label={ReceivingAddress} name="receiveVO">
<AddressDrawer
disabled={true}
addressListRequest={(val) => {
return getLogisticsSelectListShipperAddress(val)
}}
......@@ -162,8 +171,8 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<FormItem label={DeliveryTypeLabel} name="deliveryType">
<Radio.Group>
<Radio.Button value={1}>物流</Radio.Button>
<Radio.Button value={2}>自提</Radio.Button>
<Radio value={0}>物流</Radio>
<Radio value={1}>自提</Radio>
{/* <Radio.Button value={3}>无效配送</Radio.Button> */}
</Radio.Group>
</FormItem>
......@@ -198,15 +207,12 @@ const DeliveryNoticeManageSRMEdit: React.FC = () => {
<Table
rowKey={row => row.orderNo}
columns={[
...DeliveryNoticeTableColumn, {
title: '操作',
...DeliveryNoticeTableColumn,
{
...DeliveryNumColumn,
dataIndex: 'deliveryCount',
render: (t, rcode, index) => {
return (
<Button type='link' onClick={() => {
const r = tableDataSource.splice(index, 1)
setTableDataSource(r)
}}>删除</Button>
)
return t
}
}
]}
......
......@@ -52,8 +52,12 @@ const DeliveryNoticeManageSRM: React.FC = () => {
}
const operationHandler = {
'修改': () => { history.push(`/memberCenter/order/deliveryNotice/manageSRM/edit?id=${record.id}`) },
'作废': () => { console.log('作废 :>> ',) },
'查看': () => { console.log('查看 :>> ',) },
'作废': () => {
// /order/delivery/order/invalid
},
'查看': () => {
history.push(`/memberCenter/order/deliveryNotice/manageSRM/details?id=${record.id}`)
},
}
return (
<TableOperation
......
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