Commit 48dead1a authored by 前端-彭佳文's avatar 前端-彭佳文

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

V2 220418 order See merge request linkseeks-design/pro-platform!182
parents 1c46e03d 4beddd16
...@@ -32,6 +32,7 @@ function RoleSelect(props: RoleSelectProps) { ...@@ -32,6 +32,7 @@ function RoleSelect(props: RoleSelectProps) {
const [dataSource, setDataSource] = useState([]) const [dataSource, setDataSource] = useState([])
const [total, setTotal] = useState(0) const [total, setTotal] = useState(0)
const [current, setCurrent] = useState(1); const [current, setCurrent] = useState(1);
const [pageSize, setPageSize] = useState(10);
const showDrawer = useCallback(() => { const showDrawer = useCallback(() => {
setVisible(true) setVisible(true)
...@@ -51,7 +52,7 @@ function RoleSelect(props: RoleSelectProps) { ...@@ -51,7 +52,7 @@ function RoleSelect(props: RoleSelectProps) {
request({ request({
...params, ...params,
...form.getFieldsValue(), ...form.getFieldsValue(),
...{ pageSize: 1 }, // ...{ pageSize: 1 },
}).then(res => { }).then(res => {
setDataSource(res.data.data) setDataSource(res.data.data)
setTotal(res.data.totalCount) setTotal(res.data.totalCount)
...@@ -106,12 +107,16 @@ function RoleSelect(props: RoleSelectProps) { ...@@ -106,12 +107,16 @@ function RoleSelect(props: RoleSelectProps) {
columns={TableMemberColumn} columns={TableMemberColumn}
dataSource={dataSource} dataSource={dataSource}
pagination={{ pagination={{
total: total, position: ['bottomCenter'],
pageSize: 1, total,
current: current, pageSize,
onChange: (page: number) => { current,
form.setFieldsValue({ 'current': page }); showTotal: (total: number, range: [number, number]) => (`共 ${total} 条`),
setCurrent(page); showQuickJumper: true,
onChange: (page: number, pageSize: number) => {
form.setFieldsValue({ 'current': page })
setCurrent(page)
setPageSize(pageSize)
fetchData() fetchData()
} }
}} }}
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*/ */
import { Button } from "antd"; import { Button } from "antd";
import { HarvestMaterialDelete, HarvestMaterialInput } from "../assets/context"; import { HarvestMaterialDelete, HarvestMaterialInput } from "../assets/context";
import { BrandColumn, ClassColumn, CommodityIdColumn, ConsigneeNumColumn, DeliveredNumColumn, DeliveryNumColumn, FlowNoteColumn, FlowOnColumn, FlowOptionsColumn, FlowOptionsTimeColumn, FlowRoleColumn, FlowStatusColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OredrNumColumn, PlannedDeliveryNumColumn, TradeNameColumn, TransitNumColumn, UntilColumn } from "./table-column"; import { BrandColumn, ClassColumn, CommodityIdColumn, ConsigneeNumColumn, DeliveredNumColumn, DeliveryNumColumn, FlowNoteColumn, FlowOnColumn, FlowOptionsColumn, FlowOptionsTimeColumn, FlowRoleColumn, FlowStatusColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OrderNumColumn, PlannedDeliveryNumColumn, TradeNameColumn, TransitNumColumn, UntilColumn } from "./table-column";
export const DeliveryNoteAddFromTableColumn: any = [ export const DeliveryNoteAddFromTableColumn: any = [
MaterialNoColumn, MaterialNoColumn,
...@@ -14,7 +14,7 @@ export const DeliveryNoteAddFromTableColumn: any = [ ...@@ -14,7 +14,7 @@ export const DeliveryNoteAddFromTableColumn: any = [
UntilColumn, UntilColumn,
OrderNoColumn, OrderNoColumn,
OrderCreatedAtColumn, OrderCreatedAtColumn,
OredrNumColumn, OrderNumColumn,
DeliveryNumColumn, DeliveryNumColumn,
{ {
...ConsigneeNumColumn, ...ConsigneeNumColumn,
...@@ -46,7 +46,7 @@ export const DeliveryNoticeTableColumn: any = [ ...@@ -46,7 +46,7 @@ export const DeliveryNoticeTableColumn: any = [
UntilColumn, UntilColumn,
OrderNoColumn, OrderNoColumn,
OrderCreatedAtColumn, OrderCreatedAtColumn,
OredrNumColumn OrderNumColumn
]; ];
// 计划送货物料表格 // 计划送货物料表格
...@@ -57,7 +57,7 @@ export const PlannedDeliveryMaterialTableColumn: any = [ ...@@ -57,7 +57,7 @@ export const PlannedDeliveryMaterialTableColumn: any = [
{ dataIndex: 'category', width: 96, ...ClassColumn, }, { dataIndex: 'category', width: 96, ...ClassColumn, },
{ dataIndex: 'brand', width: 96, ...BrandColumn, }, { dataIndex: 'brand', width: 96, ...BrandColumn, },
{ dataIndex: 'unit', width: 64, ...UntilColumn, }, { dataIndex: 'unit', width: 64, ...UntilColumn, },
{ width: 96, ...OredrNumColumn, dataIndex: 'purchaseCountSum', }, { width: 96, ...OrderNumColumn, dataIndex: 'purchaseCountSum', },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, }, { ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, }, { ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, },
...@@ -69,7 +69,7 @@ export const PlannedDeliveryMaterialExpandableTableColumn: any = [ ...@@ -69,7 +69,7 @@ export const PlannedDeliveryMaterialExpandableTableColumn: any = [
{ dataIndex: 'orderNo', ...OrderNoColumn, }, { dataIndex: 'orderNo', ...OrderNoColumn, },
{ dataIndex: 'orderDigest', ...OrderSummaryColumn, }, { dataIndex: 'orderDigest', ...OrderSummaryColumn, },
{ dataIndex: 'createTime', ...OrderCreatedAtColumn, }, { dataIndex: 'createTime', ...OrderCreatedAtColumn, },
{ dataIndex: 'purchaseCount', ...OredrNumColumn, }, { dataIndex: 'purchaseCount', ...OrderNumColumn, },
{ dataIndex: 'receiveCount', ...ConsigneeNumColumn, }, { dataIndex: 'receiveCount', ...ConsigneeNumColumn, },
{ dataIndex: 'transitCount', ...TransitNumColumn, }, { dataIndex: 'transitCount', ...TransitNumColumn, },
{ dataIndex: 'leftCount', ...DeliveredNumColumn, }, { dataIndex: 'leftCount', ...DeliveredNumColumn, },
...@@ -96,7 +96,7 @@ export const DeliveryMaterialsTableColumn: any = [ ...@@ -96,7 +96,7 @@ export const DeliveryMaterialsTableColumn: any = [
{ ...UntilColumn, dataIndex: 'unit' }, { ...UntilColumn, dataIndex: 'unit' },
{ ...OrderNoColumn, dataIndex: 'orderNo' }, { ...OrderNoColumn, dataIndex: 'orderNo' },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime' }, { ...OrderCreatedAtColumn, dataIndex: 'createTime' },
{ ...OredrNumColumn, dataIndex: 'purchaseCount' }, { ...OrderNumColumn, dataIndex: 'purchaseCount' },
{ ...PlannedDeliveryNumColumn, dataIndex: 'planCount' }, { ...PlannedDeliveryNumColumn, dataIndex: 'planCount' },
] ]
...@@ -109,6 +109,6 @@ export const DeliveryGoodsTableColumn: any = [ ...@@ -109,6 +109,6 @@ export const DeliveryGoodsTableColumn: any = [
{ dataIndex: 'name5', ...UntilColumn, }, { dataIndex: 'name5', ...UntilColumn, },
{ dataIndex: 'name6', ...OrderNoColumn, }, { dataIndex: 'name6', ...OrderNoColumn, },
{ dataIndex: 'name7', ...OrderCreatedAtColumn, }, { dataIndex: 'name7', ...OrderCreatedAtColumn, },
{ dataIndex: 'name8', ...OredrNumColumn, }, { dataIndex: 'name8', ...OrderNumColumn, },
{ dataIndex: 'name9', ...PlannedDeliveryNumColumn, }, { dataIndex: 'name9', ...PlannedDeliveryNumColumn, },
] ]
...@@ -84,7 +84,7 @@ export const OrderCreatedAtColumn: any = { ...@@ -84,7 +84,7 @@ export const OrderCreatedAtColumn: any = {
render: (txt, rcoed) => dayjs(rcoed.createTime).format('YYYY-MM-DD HH:mm:ss') render: (txt, rcoed) => dayjs(rcoed.createTime).format('YYYY-MM-DD HH:mm:ss')
} }
export const OredrNumColumn: any = { export const OrderNumColumn: any = {
title: '订单数量', title: '订单数量',
dataIndex: 'purchaseCount', dataIndex: 'purchaseCount',
key: 'purchaseCount', key: 'purchaseCount',
......
...@@ -18,7 +18,7 @@ import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../asse ...@@ -18,7 +18,7 @@ import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../asse
import { ReceivingNoteB2BAddService } from '../../assets/handles/HandleFormSubmit'; import { ReceivingNoteB2BAddService } from '../../assets/handles/HandleFormSubmit';
import { RoleSelect } from '@/components/RoleSelect'; import { RoleSelect } from '@/components/RoleSelect';
import LogisticsCompanyMerchantsSelect from '@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect'; import LogisticsCompanyMerchantsSelect from '@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect';
import { DeliveryNumColumn, OredrNumColumn } from '../../constants/table-column'; import { DeliveryNumColumn, OrderNumColumn } from '../../constants/table-column';
const DeliveryNoticeManageSRMDetails: React.FC = () => { const DeliveryNoticeManageSRMDetails: React.FC = () => {
...@@ -245,7 +245,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -245,7 +245,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
render: (t, rcode, index) => { render: (t, rcode, index) => {
return ( return (
<HarvestMaterialInput <HarvestMaterialInput
value={rcode[OredrNumColumn.key]} value={rcode[OrderNumColumn.key]}
index={index} index={index}
keyUp="deliveryCount" keyUp="deliveryCount"
/> />
......
...@@ -22,7 +22,7 @@ import { RoleSelect } from '@/components/RoleSelect'; ...@@ -22,7 +22,7 @@ import { RoleSelect } from '@/components/RoleSelect';
import DeliveryNoticeOrderFactory from '../../assets/handles/DeliveryNoticeOrder'; import DeliveryNoticeOrderFactory from '../../assets/handles/DeliveryNoticeOrder';
import LogisticsCompanyMerchantsSelect from '@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect'; import LogisticsCompanyMerchantsSelect from '@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect';
import { values } from 'lodash'; import { values } from 'lodash';
import { DeliveryNumColumn, OredrNumColumn } from '../../constants/table-column'; import { DeliveryNumColumn, OrderNumColumn } from '../../constants/table-column';
const ContentBoxItem = ContentBox.BaseInfoItem; const ContentBoxItem = ContentBox.BaseInfoItem;
...@@ -247,7 +247,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => { ...@@ -247,7 +247,7 @@ const DeliveryNoticeManageSRMDetails: React.FC = () => {
render: (t, rcode, index) => { render: (t, rcode, index) => {
return ( return (
<HarvestMaterialInput <HarvestMaterialInput
value={rcode[OredrNumColumn.key]} value={rcode[OrderNumColumn.key]}
index={index} index={index}
keyUp="deliveryCount" keyUp="deliveryCount"
/> />
......
...@@ -17,7 +17,7 @@ import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../../. ...@@ -17,7 +17,7 @@ import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../../.
import { getLogisticsSelectListReceiverAddress } from '@/services/LogisticsV2Api' import { getLogisticsSelectListReceiverAddress } from '@/services/LogisticsV2Api'
import { postOrderDeliveryNoticeOrderB2bCreate, getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDeliveryHistory, getOrderDeliveryNoticeOrderDetailPage, postOrderDeliveryNoticeOrderUpdate } from '@/services/OrderNewV2Api' import { postOrderDeliveryNoticeOrderB2bCreate, getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDeliveryHistory, getOrderDeliveryNoticeOrderDetailPage, postOrderDeliveryNoticeOrderUpdate } from '@/services/OrderNewV2Api'
import { BaseInfo as base_info, DeliveryList, Remarks, ExternalRoamRecord, Circulation, Purchaser, SubmitDeliveryNotice, Supplier, ConfirmDeliveryNotice, NoticeSummary, BuyerLabel, DeliveryDate, DeliveryTime, ReceivingAddress, ShippingInfo } from '../../../../constants' import { BaseInfo as base_info, DeliveryList, Remarks, ExternalRoamRecord, Circulation, Purchaser, SubmitDeliveryNotice, Supplier, ConfirmDeliveryNotice, NoticeSummary, BuyerLabel, DeliveryDate, DeliveryTime, ReceivingAddress, ShippingInfo } from '../../../../constants'
import { BrandColumn, ClassColumn, FlowOptionsColumn, MaterialModelColumn, CommodityNoColumn, TradeNameColumn, OrderCreatedAtColumn, OrderNoColumn, OredrNumColumn, UntilColumn } from '../../../../constants/table-column' import { BrandColumn, ClassColumn, FlowOptionsColumn, MaterialModelColumn, CommodityNoColumn, TradeNameColumn, OrderCreatedAtColumn, OrderNoColumn, OrderNumColumn, UntilColumn } from '../../../../constants/table-column'
import { ExternalRoamRecordTableColumn } from '../../../../constants/page-table-column' import { ExternalRoamRecordTableColumn } from '../../../../constants/page-table-column'
import moment from 'moment' import moment from 'moment'
...@@ -272,7 +272,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id ...@@ -272,7 +272,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
{ ...UntilColumn, dataIndex: 'unit' }, { ...UntilColumn, dataIndex: 'unit' },
{ ...OrderNoColumn, dataIndex: 'orderNo' }, { ...OrderNoColumn, dataIndex: 'orderNo' },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime' }, { ...OrderCreatedAtColumn, dataIndex: 'createTime' },
{ ...OredrNumColumn, dataIndex: 'purchaseCount' }, { ...OrderNumColumn, dataIndex: 'purchaseCount' },
{ {
title: '计划送货数量', title: '计划送货数量',
width: 100, width: 100,
......
...@@ -18,7 +18,7 @@ import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../../. ...@@ -18,7 +18,7 @@ import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../../.
import { getLogisticsSelectListReceiverAddress } from '@/services/LogisticsV2Api' import { getLogisticsSelectListReceiverAddress } from '@/services/LogisticsV2Api'
import { postOrderDeliveryNoticeOrderSrmCreate, getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDeliveryHistory, getOrderDeliveryNoticeOrderDetailPage, postOrderDeliveryNoticeOrderUpdate } from '@/services/OrderNewV2Api' import { postOrderDeliveryNoticeOrderSrmCreate, getOrderDeliveryNoticeOrderDetail, getOrderDeliveryNoticeOrderDeliveryHistory, getOrderDeliveryNoticeOrderDetailPage, postOrderDeliveryNoticeOrderUpdate } from '@/services/OrderNewV2Api'
import { BaseInfo as base_info, DeliveryList, Remarks, ExternalRoamRecord, Circulation, Purchaser, SubmitDeliveryNotice, Supplier, ConfirmDeliveryNotice, NoticeSummary, BuyerLabel, DeliveryDate, DeliveryTime, ReceivingAddress, ShippingInfo } from '../../../../constants' import { BaseInfo as base_info, DeliveryList, Remarks, ExternalRoamRecord, Circulation, Purchaser, SubmitDeliveryNotice, Supplier, ConfirmDeliveryNotice, NoticeSummary, BuyerLabel, DeliveryDate, DeliveryTime, ReceivingAddress, ShippingInfo } from '../../../../constants'
import { BrandColumn, ClassColumn, FlowOptionsColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OredrNumColumn, UntilColumn } from '../../../../constants/table-column' import { BrandColumn, ClassColumn, FlowOptionsColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderNumColumn, UntilColumn } from '../../../../constants/table-column'
import { ExternalRoamRecordTableColumn } from '../../../../constants/page-table-column' import { ExternalRoamRecordTableColumn } from '../../../../constants/page-table-column'
import moment from 'moment' import moment from 'moment'
...@@ -274,7 +274,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id ...@@ -274,7 +274,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
{ ...UntilColumn, dataIndex: 'unit' }, { ...UntilColumn, dataIndex: 'unit' },
{ ...OrderNoColumn, dataIndex: 'orderNo' }, { ...OrderNoColumn, dataIndex: 'orderNo' },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime' }, { ...OrderCreatedAtColumn, dataIndex: 'createTime' },
{ ...OredrNumColumn, dataIndex: 'purchaseCount' }, { ...OrderNumColumn, dataIndex: 'purchaseCount' },
{ {
title: '计划送货数量', title: '计划送货数量',
width: 100, width: 100,
......
...@@ -11,7 +11,7 @@ import { getLogisticsSelectListReceiverAddress, getLogisticsSelectListShipperAdd ...@@ -11,7 +11,7 @@ import { getLogisticsSelectListReceiverAddress, getLogisticsSelectListShipperAdd
import LogisticsCompanyMerchantsSelect from "@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect"; import LogisticsCompanyMerchantsSelect from "@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect";
import { HarvestMaterialContextProvider, HarvestMaterialInput } from "../../assets/context"; import { HarvestMaterialContextProvider, HarvestMaterialInput } from "../../assets/context";
import { DeliveryNoticeTableColumn } from "../../constants/page-table-column"; import { DeliveryNoticeTableColumn } from "../../constants/page-table-column";
import { DeliveryNumColumn, OredrNumColumn } from "../../constants/table-column"; import { DeliveryNumColumn, OrderNumColumn } from "../../constants/table-column";
import { DatePickerSelect } from "@/components/DatePickerSelect"; import { DatePickerSelect } from "@/components/DatePickerSelect";
import { SourceTypeEnum } from "../../constants/SourceTypeEnum"; import { SourceTypeEnum } from "../../constants/SourceTypeEnum";
import { useLocation } from "umi"; import { useLocation } from "umi";
...@@ -240,7 +240,7 @@ function DeliveryNoticeFromCreate() { ...@@ -240,7 +240,7 @@ function DeliveryNoticeFromCreate() {
render: (t, rcode, index) => { render: (t, rcode, index) => {
return ( return (
<HarvestMaterialInput <HarvestMaterialInput
value={rcode[OredrNumColumn.key]} value={rcode[OrderNumColumn.key]}
index={index} index={index}
keyUp="deliveryCount" keyUp="deliveryCount"
/> />
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
import BaseInfo from '@/components/BaseInfo/BaseInfo' import BaseInfo from '@/components/BaseInfo/BaseInfo'
import _ from 'lodash' import _ from 'lodash'
import { convertArrtoObj, getDayAll } from '../../utils' import { convertArrtoObj, getDayAll } from '../../utils'
import { BrandColumn, ClassColumn, CommodityNoColumn, ConsigneeNumColumn, DeliveredNumColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OredrNumColumn, PlannedDeliveryNumColumn, TradeNameColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column' import { BrandColumn, ClassColumn, CommodityNoColumn, ConsigneeNumColumn, DeliveredNumColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OrderNumColumn, PlannedDeliveryNumColumn, TradeNameColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column'
import { RoleSelect } from '@/components/RoleSelect' import { RoleSelect } from '@/components/RoleSelect'
import { getMemberManageSupplyMember } from '@/services/MemberV2Api' import { getMemberManageSupplyMember } from '@/services/MemberV2Api'
import { getOrderDeliveryPlanOrderProductPage, postOrderDeliveryPlanB2bCreate } from '@/services/OrderNewV2Api' import { getOrderDeliveryPlanOrderProductPage, postOrderDeliveryPlanB2bCreate } from '@/services/OrderNewV2Api'
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
{ ...ClassColumn, dataIndex: 'category', width: 96, }, { ...ClassColumn, dataIndex: 'category', width: 96, },
{ ...BrandColumn, dataIndex: 'brand', width: 96, }, { ...BrandColumn, dataIndex: 'brand', width: 96, },
{ ...UntilColumn, dataIndex: 'unit', width: 64, }, { ...UntilColumn, dataIndex: 'unit', width: 64, },
{ ...OredrNumColumn, dataIndex: 'purchaseCountSum', width: 96, }, { ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, }, { ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, }, { ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, },
...@@ -43,7 +43,7 @@ const initExpandIconColumn = [ ...@@ -43,7 +43,7 @@ const initExpandIconColumn = [
{ ...OrderNoColumn, dataIndex: 'orderNo', width: 80, }, { ...OrderNoColumn, dataIndex: 'orderNo', width: 80, },
{ ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, }, { ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, }, { ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, },
{ ...OredrNumColumn, dataIndex: 'purchaseCount', width: 86, }, { ...OrderNumColumn, dataIndex: 'purchaseCount', width: 86, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, },
{ ...TransitNumColumn, dataIndex: 'transitCount', width: 86, }, { ...TransitNumColumn, dataIndex: 'transitCount', width: 86, },
{ ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, }, { ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, },
...@@ -237,7 +237,6 @@ const initExpandIconColumn = [ ...@@ -237,7 +237,6 @@ const initExpandIconColumn = [
<RoleSelect <RoleSelect
request={getMemberManageSupplyMember} request={getMemberManageSupplyMember}
onChange={handleMemberInfo} onChange={handleMemberInfo}
params={{ current: '1', pageSize: '100' }}
/> />
</Form.Item> </Form.Item>
......
...@@ -13,7 +13,7 @@ import BaseInfo from '@/components/BaseInfo/BaseInfo' ...@@ -13,7 +13,7 @@ import BaseInfo from '@/components/BaseInfo/BaseInfo'
import { ExternalRoamRecordTableColumn } from '../../constants/page-table-column' import { ExternalRoamRecordTableColumn } from '../../constants/page-table-column'
import _ from 'lodash' import _ from 'lodash'
import { convertArrtoObj, getDayAll } from '../../utils' import { convertArrtoObj, getDayAll } from '../../utils'
import { BrandColumn, ClassColumn, CommodityNoColumn, ConsigneeNumColumn, DeliveredNumColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OredrNumColumn, PlannedDeliveryNumColumn, TradeNameColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column' import { BrandColumn, ClassColumn, CommodityNoColumn, ConsigneeNumColumn, DeliveredNumColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OrderNumColumn, PlannedDeliveryNumColumn, TradeNameColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column'
import { RoleSelect } from '@/components/RoleSelect' import { RoleSelect } from '@/components/RoleSelect'
import { getMemberManageLowerMerchantProviderPage } from '@/services/MemberV2Api' import { getMemberManageLowerMerchantProviderPage } from '@/services/MemberV2Api'
import { getOrderDeliveryPlanOrderProductPage, postOrderDeliveryPlanB2bCreate } from '@/services/OrderNewV2Api' import { getOrderDeliveryPlanOrderProductPage, postOrderDeliveryPlanB2bCreate } from '@/services/OrderNewV2Api'
...@@ -48,7 +48,7 @@ const DeliveryPlanAwaitB2BDetails: React.FC = () => { ...@@ -48,7 +48,7 @@ const DeliveryPlanAwaitB2BDetails: React.FC = () => {
{ ...ClassColumn, dataIndex: 'category', width: 96, }, { ...ClassColumn, dataIndex: 'category', width: 96, },
{ ...BrandColumn, dataIndex: 'brand', width: 96, }, { ...BrandColumn, dataIndex: 'brand', width: 96, },
{ ...UntilColumn, dataIndex: 'unit', width: 64, }, { ...UntilColumn, dataIndex: 'unit', width: 64, },
{ ...OredrNumColumn, dataIndex: 'purchaseCountSum', width: 96, }, { ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, }, { ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, }, { ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, },
...@@ -59,7 +59,7 @@ const DeliveryPlanAwaitB2BDetails: React.FC = () => { ...@@ -59,7 +59,7 @@ const DeliveryPlanAwaitB2BDetails: React.FC = () => {
{ ...OrderNoColumn, dataIndex: 'orderNo', width: 80, }, { ...OrderNoColumn, dataIndex: 'orderNo', width: 80, },
{ ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 200, }, { ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 200, },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 160, }, { ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 160, },
{ ...OredrNumColumn, dataIndex: 'purchaseCount', width: 96, }, { ...OrderNumColumn, dataIndex: 'purchaseCount', width: 96, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 96, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 96, },
{ ...TransitNumColumn, dataIndex: 'transitCount', width: 96, }, { ...TransitNumColumn, dataIndex: 'transitCount', width: 96, },
{ ...DeliveredNumColumn, dataIndex: 'leftCount', width: 96, }, { ...DeliveredNumColumn, dataIndex: 'leftCount', width: 96, },
......
...@@ -25,7 +25,7 @@ import { getOrderDeliveryPlanBuyerPage } from '@/services/OrderNewV2Api' ...@@ -25,7 +25,7 @@ import { getOrderDeliveryPlanBuyerPage } from '@/services/OrderNewV2Api'
// 外部状态1-待提交 2-已确认 // 外部状态1-待提交 2-已确认
const STATUS = 2 const STATUS = 2
// 订单类型1-B2B 2-SRM // 订单类型1-B2B 2-SRM
const OEDER_TYPE = 1 const ORDER_TYPE = 1
const tagStatus = new TagStatus() const tagStatus = new TagStatus()
const statusTxt = new Map([[1, '待提交'], [2, '待确认'], [3, '待修订'], [4, '已确认'], [5, '已删除']]) const statusTxt = new Map([[1, '待提交'], [2, '待确认'], [3, '待修订'], [4, '已确认'], [5, '已删除']])
const DeliveryPlanManagementAwaitB2B: React.FC = () => { const DeliveryPlanManagementAwaitB2B: React.FC = () => {
...@@ -103,7 +103,7 @@ const DeliveryPlanManagementAwaitB2B: React.FC = () => { ...@@ -103,7 +103,7 @@ const DeliveryPlanManagementAwaitB2B: React.FC = () => {
getOrderDeliveryPlanBuyerPage({ getOrderDeliveryPlanBuyerPage({
...params, ...params,
status: STATUS, status: STATUS,
orderType: OEDER_TYPE, orderType: ORDER_TYPE,
}).then((res) => { }).then((res) => {
resolve(res.data); resolve(res.data);
}) })
......
...@@ -12,7 +12,7 @@ import { SaveOutlined } from '@ant-design/icons' ...@@ -12,7 +12,7 @@ import { SaveOutlined } from '@ant-design/icons'
import BaseInfo from '@/components/BaseInfo/BaseInfo' import BaseInfo from '@/components/BaseInfo/BaseInfo'
import _ from 'lodash' import _ from 'lodash'
import { convertArrtoObj, getDayAll, godAtob, integrationArrtoObj, integrationOjb } from '../../utils' import { convertArrtoObj, getDayAll, godAtob, integrationArrtoObj, integrationOjb } from '../../utils'
import { BrandColumn, ClassColumn, CommodityNoColumn, ConsigneeNumColumn, DeliveredNumColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OredrNumColumn, PlannedDeliveryNumColumn, TradeNameColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column' import { BrandColumn, ClassColumn, CommodityNoColumn, ConsigneeNumColumn, DeliveredNumColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OrderNumColumn, PlannedDeliveryNumColumn, TradeNameColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column'
import { RoleSelect } from '@/components/RoleSelect' import { RoleSelect } from '@/components/RoleSelect'
import { getMemberManageSupplyMember } from '@/services/MemberV2Api' import { getMemberManageSupplyMember } from '@/services/MemberV2Api'
import { getOrderDeliveryPlanDeliveryHistory, getOrderDeliveryPlanDetail, getOrderDeliveryPlanDetailProductPage, getOrderDeliveryPlanOrderProductPage, postOrderDeliveryPlanB2bCreate, postOrderDeliveryPlanUpdate } from '@/services/OrderNewV2Api' import { getOrderDeliveryPlanDeliveryHistory, getOrderDeliveryPlanDetail, getOrderDeliveryPlanDetailProductPage, getOrderDeliveryPlanOrderProductPage, postOrderDeliveryPlanB2bCreate, postOrderDeliveryPlanUpdate } from '@/services/OrderNewV2Api'
...@@ -52,7 +52,7 @@ const DeliveryPlanAwaitB2BUpdate: React.FC = () => { ...@@ -52,7 +52,7 @@ const DeliveryPlanAwaitB2BUpdate: React.FC = () => {
{ ...ClassColumn, dataIndex: 'category', width: 96, }, { ...ClassColumn, dataIndex: 'category', width: 96, },
{ ...BrandColumn, dataIndex: 'brand', width: 96, }, { ...BrandColumn, dataIndex: 'brand', width: 96, },
{ ...UntilColumn, dataIndex: 'unit', width: 64, }, { ...UntilColumn, dataIndex: 'unit', width: 64, },
{ ...OredrNumColumn, dataIndex: 'purchaseCountSum', width: 96, }, { ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, }, { ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, }, { ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, },
...@@ -63,7 +63,7 @@ const DeliveryPlanAwaitB2BUpdate: React.FC = () => { ...@@ -63,7 +63,7 @@ const DeliveryPlanAwaitB2BUpdate: React.FC = () => {
{ ...OrderNoColumn, dataIndex: 'orderNo', width: 80, }, { ...OrderNoColumn, dataIndex: 'orderNo', width: 80, },
{ ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, }, { ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, }, { ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, },
{ ...OredrNumColumn, dataIndex: 'purchaseCount', width: 86, }, { ...OrderNumColumn, dataIndex: 'purchaseCount', width: 86, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, },
{ ...TransitNumColumn, dataIndex: 'transitCount', width: 86, }, { ...TransitNumColumn, dataIndex: 'transitCount', width: 86, },
{ ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, }, { ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, },
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
import { history } from 'umi' import { history } from 'umi'
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage' import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import { BaseInfo as base_Info, Remarks, PlanningCycle, SupplyMembersLabel, PlanSummary, ExternalState, Circulation, Purchaser, SubmitDeliveryPlan, Supplier, ConfirmDeliveryPlan, PlannedDelivery, DeliveryPlanText, DeliveryPlanRemark, CreateDeliveryPlanTitleSRM } from '../../constants' import { BaseInfo as base_Info, Remarks, PlanningCycle, SupplyMembersLabel, PlanSummary, ExternalState, Circulation, Purchaser, SubmitDeliveryPlan, Supplier, ConfirmDeliveryPlan, PlannedDelivery, DeliveryPlanText, DeliveryPlanRemark, CreateDeliveryPlanTitleSRM } from '../../constants'
import { Button, DatePicker, Form, Input, InputNumber, message, Space, Steps, Table } from 'antd' import { Button, DatePicker, Form, Input, InputNumber, message, Space, Spin, Steps, Table } from 'antd'
import { SaveOutlined } from '@ant-design/icons' import { SaveOutlined } from '@ant-design/icons'
import BaseInfo from '@/components/BaseInfo/BaseInfo' import BaseInfo from '@/components/BaseInfo/BaseInfo'
import _ from 'lodash' import _ from 'lodash'
import { convertArrtoObj, getDayAll } from '../../utils' import { convertArrtoObj, getDayAll } from '../../utils'
import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveredNumColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OredrNumColumn, PlannedDeliveryNumColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column' import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveredNumColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OrderNumColumn, PlannedDeliveryNumColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column'
import { RoleSelect } from '@/components/RoleSelect' import { RoleSelect } from '@/components/RoleSelect'
import { getOrderDeliveryPlanOrderProductPage, postOrderDeliveryPlanSrmCreate } from '@/services/OrderNewV2Api' import { getOrderDeliveryPlanOrderProductPage, postOrderDeliveryPlanSrmCreate } from '@/services/OrderNewV2Api'
import { getMemberManageLowerMerchantProviderPage } from '@/services/MemberV2Api' import { getMemberManageLowerMerchantProviderPage } from '@/services/MemberV2Api'
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
{ ...ClassColumn, dataIndex: 'category', width: 96, }, { ...ClassColumn, dataIndex: 'category', width: 96, },
{ ...BrandColumn, dataIndex: 'brand', width: 96, }, { ...BrandColumn, dataIndex: 'brand', width: 96, },
{ ...UntilColumn, dataIndex: 'unit', width: 64, }, { ...UntilColumn, dataIndex: 'unit', width: 64, },
{ ...OredrNumColumn, dataIndex: 'purchaseCountSum', width: 96, }, { ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, }, { ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, }, { ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, },
...@@ -44,7 +44,7 @@ const initExpandIconColumn = [ ...@@ -44,7 +44,7 @@ const initExpandIconColumn = [
{ ...OrderNoColumn, dataIndex: 'orderNo', width: 80, }, { ...OrderNoColumn, dataIndex: 'orderNo', width: 80, },
{ ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, }, { ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, }, { ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, },
{ ...OredrNumColumn, dataIndex: 'purchaseCount', width: 86, }, { ...OrderNumColumn, dataIndex: 'purchaseCount', width: 86, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, },
{ ...TransitNumColumn, dataIndex: 'transitCount', width: 86, }, { ...TransitNumColumn, dataIndex: 'transitCount', width: 86, },
{ ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, }, { ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, },
...@@ -54,8 +54,10 @@ const initExpandIconColumn = [ ...@@ -54,8 +54,10 @@ const initExpandIconColumn = [
const [form] = Form.useForm() const [form] = Form.useForm()
const datesRef = useRef<any>(null) const datesRef = useRef<any>(null)
const materialTableDataRef = useRef(null) const materialTableDataRef = useRef(null)
const [iAnchors, setiAnchors] = useState<AnchorsItem[]>([ const [spinning, setSpinning] = useState<boolean>(false)
const [iAnchors, setIAnchors] = useState<AnchorsItem[]>([
Circulation, Circulation,
base_Info, base_Info,
PlannedDelivery, PlannedDelivery,
...@@ -78,8 +80,6 @@ const initExpandIconColumn = [ ...@@ -78,8 +80,6 @@ const initExpandIconColumn = [
const [selectedMember, setSelectedMember] = useState<any>({}) const [selectedMember, setSelectedMember] = useState<any>({})
// 计划送货物料 列表 // 计划送货物料 列表
const [materialTableData, setMaterialTableData] = useState<any>(null) const [materialTableData, setMaterialTableData] = useState<any>(null)
// 外部流转单据记录
const [externalRoamRecordData, setExternalRoamRecordData] = useState<any>(null)
// 保存 // 保存
const save = () => { const save = () => {
...@@ -87,8 +87,10 @@ const initExpandIconColumn = [ ...@@ -87,8 +87,10 @@ const initExpandIconColumn = [
// console.log('values :>> ', values) // console.log('values :>> ', values)
if (_.isEmpty(materialTableDataRef.current)) { if (_.isEmpty(materialTableDataRef.current)) {
message.warning('没有找到可执行计划送货') message.warning('没有找到可执行计划送货')
setSpinning(false)
return return
} }
setSpinning(true)
const productList = materialTableDataRef.current.map((item: any) => { const productList = materialTableDataRef.current.map((item: any) => {
return { return {
...item, ...item,
...@@ -111,7 +113,12 @@ const initExpandIconColumn = [ ...@@ -111,7 +113,12 @@ const initExpandIconColumn = [
remark: values.remark, remark: values.remark,
productList productList
}).then((res: any) => { }).then((res: any) => {
console.log('保存 :>> ', res) setSpinning(false)
if (res.code === 1000) {
history.goBack()
}
}).catch(err => {
setSpinning(false)
}) })
}) })
} }
...@@ -202,88 +209,90 @@ const initExpandIconColumn = [ ...@@ -202,88 +209,90 @@ const initExpandIconColumn = [
}, [selectedDate, selectedMember]) }, [selectedDate, selectedMember])
return ( return (
<AnchorPage <Spin spinning={spinning}>
title={CreateDeliveryPlanTitleSRM} <AnchorPage
onBack={() => history.goBack()} title={CreateDeliveryPlanTitleSRM}
anchors={iAnchors} onBack={() => history.goBack()}
extra={ anchors={iAnchors}
<Space> extra={
{/* <Button>保存并新增</Button> */} <Space>
<Button type='primary' icon={<SaveOutlined />} onClick={save}>保存</Button> {/* <Button>保存并新增</Button> */}
</Space> <Button type='primary' icon={<SaveOutlined />} onClick={save}>保存</Button>
} </Space>
> }
<Form >
labelAlign='left' <Form
form={form} labelAlign='left'
> form={form}
<BaseInfo className='mt-0' title={Circulation.name} id={Circulation.key} cols={1}> >
<Steps progressDot current={0}> <BaseInfo className='mt-0' title={Circulation.name} id={Circulation.key} cols={1}>
<Steps.Step title={Purchaser} description={SubmitDeliveryPlan} /> <Steps progressDot current={0}>
<Steps.Step title={Supplier} description={ConfirmDeliveryPlan} /> <Steps.Step title={Purchaser} description={SubmitDeliveryPlan} />
</Steps> <Steps.Step title={Supplier} description={ConfirmDeliveryPlan} />
</BaseInfo> </Steps>
<BaseInfo className='mt-16' title={base_Info.name} id={base_Info.key}> </BaseInfo>
<Form.Item <BaseInfo className='mt-16' title={base_Info.name} id={base_Info.key}>
{...formItemLayout} <Form.Item
label={PlanningCycle} {...formItemLayout}
name='dates' label={PlanningCycle}
rules={[ name='dates'
{ required: true, message: '请选择' } rules={[
]} { required: true, message: '请选择' }
> ]}
<DatePicker.RangePicker style={{ width: '100%' }} onChange={(dates) => handleDateAssembleColumn(dates)} /> >
</Form.Item> <DatePicker.RangePicker style={{ width: '100%' }} onChange={(dates) => handleDateAssembleColumn(dates)} />
</Form.Item>
<Form.Item
{...formItemLayout} <Form.Item
label={SupplyMembersLabel} {...formItemLayout}
name='memberId' label={SupplyMembersLabel}
rules={[ name='memberId'
{ required: true, message: '请选择' } rules={[
]} { required: true, message: '请选择' }
> ]}
<RoleSelect >
request={getMemberManageLowerMerchantProviderPage} <RoleSelect
onChange={handleMemberInfo} request={getMemberManageLowerMerchantProviderPage}
params={{ current: '1', pageSize: '100' }} onChange={handleMemberInfo}
/> params={{ current: '1', pageSize: '100' }}
</Form.Item> />
</Form.Item>
<Form.Item
{...formItemLayout} <Form.Item
label={PlanSummary} {...formItemLayout}
name='planSummaryText' label={PlanSummary}
rules={[ name='planSummaryText'
{ required: true, message: '请选择' } rules={[
]} { required: true, message: '请选择' }
> ]}
<Input /> >
</Form.Item> <Input />
</BaseInfo> </Form.Item>
<BaseInfo className='mt-16' title={PlannedDelivery.name} id={PlannedDelivery.key} cols={1}> </BaseInfo>
<Table <BaseInfo className='mt-16' title={PlannedDelivery.name} id={PlannedDelivery.key} cols={1}>
// defaultExpandAllRows <Table
rowKey={'skuId'} // defaultExpandAllRows
columns={materialTableColumn} rowKey={'skuId'}
expandedRowRender={expandedRowRender} columns={materialTableColumn}
dataSource={materialTableData} expandedRowRender={expandedRowRender}
tableLayout="fixed" dataSource={materialTableData}
scroll={{ x: 2022 }} tableLayout="fixed"
/> scroll={{ x: 2022 }}
</BaseInfo> />
<BaseInfo className='mt-16' title={Remarks.name} id={Remarks.key} cols={1}> </BaseInfo>
<Form.Item <BaseInfo className='mt-16' title={Remarks.name} id={Remarks.key} cols={1}>
name='remark' <Form.Item
rules={[ name='remark'
{ required: true, message: '请输入' } rules={[
]} { required: true, message: '请输入' }
> ]}
<Input.TextArea rows={4} maxLength={300} placeholder={DeliveryPlanRemark} /> >
</Form.Item> <Input.TextArea rows={4} maxLength={300} placeholder={DeliveryPlanRemark} />
</BaseInfo> </Form.Item>
</Form> </BaseInfo>
</AnchorPage> </Form>
</AnchorPage>
</Spin>
) )
} }
......
...@@ -12,7 +12,7 @@ import BaseInfo from '@/components/BaseInfo/BaseInfo' ...@@ -12,7 +12,7 @@ import BaseInfo from '@/components/BaseInfo/BaseInfo'
import { ExternalRoamRecordTableColumn } from '../../constants/page-table-column' import { ExternalRoamRecordTableColumn } from '../../constants/page-table-column'
import _ from 'lodash' import _ from 'lodash'
import { getDayAll, godAtob, integrationArrtoObj, integrationOjb, TagStatus } from '../../utils' import { getDayAll, godAtob, integrationArrtoObj, integrationOjb, TagStatus } from '../../utils'
import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveredNumColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OredrNumColumn, PlannedDeliveryNumColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column' import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveredNumColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OrderNumColumn, PlannedDeliveryNumColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column'
import { getOrderDeliveryPlanDeliveryHistory, getOrderDeliveryPlanDetail, getOrderDeliveryPlanDetailProductPage, getOrderDeliveryPlanOrderProductPage } from '@/services/OrderNewV2Api' import { getOrderDeliveryPlanDeliveryHistory, getOrderDeliveryPlanDetail, getOrderDeliveryPlanDetailProductPage, getOrderDeliveryPlanOrderProductPage } from '@/services/OrderNewV2Api'
import moment from 'moment' import moment from 'moment'
...@@ -40,7 +40,7 @@ const DeliveryPlanAwaitSRMDetails: React.FC = () => { ...@@ -40,7 +40,7 @@ const DeliveryPlanAwaitSRMDetails: React.FC = () => {
{ ...ClassColumn, dataIndex: 'category', width: 96, }, { ...ClassColumn, dataIndex: 'category', width: 96, },
{ ...BrandColumn, dataIndex: 'brand', width: 96, }, { ...BrandColumn, dataIndex: 'brand', width: 96, },
{ ...UntilColumn, dataIndex: 'unit', width: 64, }, { ...UntilColumn, dataIndex: 'unit', width: 64, },
{ ...OredrNumColumn, dataIndex: 'purchaseCountSum', width: 96, }, { ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, }, { ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, }, { ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, },
...@@ -51,7 +51,7 @@ const DeliveryPlanAwaitSRMDetails: React.FC = () => { ...@@ -51,7 +51,7 @@ const DeliveryPlanAwaitSRMDetails: React.FC = () => {
{ ...OrderNoColumn, dataIndex: 'orderNo', width: 80, }, { ...OrderNoColumn, dataIndex: 'orderNo', width: 80, },
{ ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, }, { ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, }, { ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, },
{ ...OredrNumColumn, dataIndex: 'purchaseCount', width: 86, }, { ...OrderNumColumn, dataIndex: 'purchaseCount', width: 86, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, },
{ ...TransitNumColumn, dataIndex: 'transitCount', width: 86, }, { ...TransitNumColumn, dataIndex: 'transitCount', width: 86, },
{ ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, }, { ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, },
......
...@@ -130,7 +130,7 @@ const statusTxt = new Map([[1, '待提交'], [2, '待确认'], [3, '待修订'], ...@@ -130,7 +130,7 @@ const statusTxt = new Map([[1, '待提交'], [2, '待确认'], [3, '待修订'],
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'planCode', 'planNo',
FORM_FILTER_PATH, FORM_FILTER_PATH,
) )
}} }}
......
...@@ -7,13 +7,13 @@ import React, { useEffect, useRef, useState } from 'react' ...@@ -7,13 +7,13 @@ import React, { useEffect, useRef, useState } from 'react'
import { history, useHistory } from 'umi' import { history, useHistory } from 'umi'
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage' import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import { BaseInfo as base_Info, Remarks, PlanningCycle, SupplyMembersLabel, PlanSummary, ExternalRoamRecord, ExternalState, Circulation, Purchaser, SubmitDeliveryPlan, Supplier, ConfirmDeliveryPlan, PlannedDelivery, DeliveryPlanRemark } from '../../constants' import { BaseInfo as base_Info, Remarks, PlanningCycle, SupplyMembersLabel, PlanSummary, ExternalRoamRecord, ExternalState, Circulation, Purchaser, SubmitDeliveryPlan, Supplier, ConfirmDeliveryPlan, PlannedDelivery, DeliveryPlanRemark } from '../../constants'
import { Button, Form, Input, InputNumber, message, Space, Steps, Table, Tag } from 'antd' import { Button, Form, Input, InputNumber, message, Space, Spin, Steps, Table, Tag } from 'antd'
import { SaveOutlined } from '@ant-design/icons' import { SaveOutlined } from '@ant-design/icons'
import BaseInfo from '@/components/BaseInfo/BaseInfo' import BaseInfo from '@/components/BaseInfo/BaseInfo'
import { ExternalRoamRecordTableColumn } from '../../constants/page-table-column' import { ExternalRoamRecordTableColumn } from '../../constants/page-table-column'
import _ from 'lodash' import _ from 'lodash'
import { getDayAll, godAtob, integrationArrtoObj, integrationOjb, TagStatus } from '../../utils' import { getDayAll, godAtob, integrationArrtoObj, integrationOjb, TagStatus } from '../../utils'
import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveredNumColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OredrNumColumn, PlannedDeliveryNumColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column' import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveredNumColumn, MaterialModelColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OrderSummaryColumn, OrderNumColumn, PlannedDeliveryNumColumn, TransitNumColumn, UntilColumn } from '../../constants/table-column'
import { getOrderDeliveryPlanDeliveryHistory, getOrderDeliveryPlanDetail, getOrderDeliveryPlanDetailProductPage, postOrderDeliveryPlanUpdate } from '@/services/OrderNewV2Api' import { getOrderDeliveryPlanDeliveryHistory, getOrderDeliveryPlanDetail, getOrderDeliveryPlanDetailProductPage, postOrderDeliveryPlanUpdate } from '@/services/OrderNewV2Api'
import moment from 'moment' import moment from 'moment'
...@@ -32,7 +32,9 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => { ...@@ -32,7 +32,9 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
const datesRef = useRef(null) const datesRef = useRef(null)
const materialTableDataRef = useRef(null) const materialTableDataRef = useRef(null)
const [iAnchors, setiAnchors] = useState<AnchorsItem[]>([ const [spinning, setSpinning] = useState<boolean>(false)
const [iAnchors, setIAnchors] = useState<AnchorsItem[]>([
Circulation, Circulation,
base_Info, base_Info,
PlannedDelivery, PlannedDelivery,
...@@ -48,7 +50,7 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => { ...@@ -48,7 +50,7 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
{ ...ClassColumn, dataIndex: 'category', width: 96, }, { ...ClassColumn, dataIndex: 'category', width: 96, },
{ ...BrandColumn, dataIndex: 'brand', width: 96, }, { ...BrandColumn, dataIndex: 'brand', width: 96, },
{ ...UntilColumn, dataIndex: 'unit', width: 64, }, { ...UntilColumn, dataIndex: 'unit', width: 64, },
{ ...OredrNumColumn, dataIndex: 'purchaseCountSum', width: 96, }, { ...OrderNumColumn, dataIndex: 'purchaseCountSum', width: 96, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCountSum', width: 96, },
{ ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, }, { ...TransitNumColumn, dataIndex: 'transitCountSum', width: 96, },
{ ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, }, { ...DeliveredNumColumn, dataIndex: 'leftCountSum', width: 96, },
...@@ -59,7 +61,7 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => { ...@@ -59,7 +61,7 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
{ ...OrderNoColumn, dataIndex: 'orderNo', width: 80, }, { ...OrderNoColumn, dataIndex: 'orderNo', width: 80, },
{ ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, }, { ...OrderSummaryColumn, dataIndex: 'orderDigest', width: 150, },
{ ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, }, { ...OrderCreatedAtColumn, dataIndex: 'createTime', width: 120, },
{ ...OredrNumColumn, dataIndex: 'purchaseCount', width: 86, }, { ...OrderNumColumn, dataIndex: 'purchaseCount', width: 86, },
{ ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, }, { ...ConsigneeNumColumn, dataIndex: 'receiveCount', width: 86, },
{ ...TransitNumColumn, dataIndex: 'transitCount', width: 86, }, { ...TransitNumColumn, dataIndex: 'transitCount', width: 86, },
{ ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, }, { ...DeliveredNumColumn, dataIndex: 'leftCount', width: 86, },
...@@ -85,6 +87,7 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => { ...@@ -85,6 +87,7 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
message.warning('没有找到可执行计划送货') message.warning('没有找到可执行计划送货')
return return
} }
setSpinning(true)
const orders = materialTableDataRef.current.flatMap((item: any) => item.orders).flatMap((o: any) => ({ const orders = materialTableDataRef.current.flatMap((item: any) => item.orders).flatMap((o: any) => ({
...o, ...o,
planDays: Object.keys(o).filter((f: any) => f.startsWith('$')).map((p: any) => o[p]) planDays: Object.keys(o).filter((f: any) => f.startsWith('$')).map((p: any) => o[p])
...@@ -95,7 +98,12 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => { ...@@ -95,7 +98,12 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
remark: values.remark, remark: values.remark,
orders orders
}).then((res: any) => { }).then((res: any) => {
console.log('保存 :>> ', res) setSpinning(false)
if (res.code === 1000) {
history.goBack()
}
}).catch(err => {
setSpinning(false)
}) })
}) })
} }
...@@ -181,79 +189,81 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => { ...@@ -181,79 +189,81 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
}, []) }, [])
return ( return (
<AnchorPage <Spin spinning={spinning}>
title={details?.planNo} <AnchorPage
onBack={() => history.goBack()} title={details?.planNo}
anchors={iAnchors} onBack={() => history.goBack()}
extra={ anchors={iAnchors}
<Space> extra={
<Button type='primary' icon={<SaveOutlined />} onClick={save}>保存</Button> <Space>
</Space> <Button type='primary' icon={<SaveOutlined />} onClick={save}>保存</Button>
} </Space>
> }
<Form
labelAlign='left'
form={form}
> >
<BaseInfo className='mt-0' title={Circulation.name} id={Circulation.key} cols={1}> <Form
<Steps progressDot current={0}> labelAlign='left'
<Steps.Step title={Purchaser} description={SubmitDeliveryPlan} /> form={form}
<Steps.Step title={Supplier} description={ConfirmDeliveryPlan} /> >
</Steps> <BaseInfo className='mt-0' title={Circulation.name} id={Circulation.key} cols={1}>
</BaseInfo> <Steps progressDot current={0}>
<BaseInfo className='mt-16' title={base_Info.name} id={base_Info.key}> <Steps.Step title={Purchaser} description={SubmitDeliveryPlan} />
<BaseInfo.BaseInfoItem label={PlanningCycle}> {moment(details?.planStartTime).format('YYYY-MM-DD')} ~ {moment(details?.planEndTime).format('YYYY-MM-DD')} </BaseInfo.BaseInfoItem> <Steps.Step title={Supplier} description={ConfirmDeliveryPlan} />
</Steps>
</BaseInfo>
<BaseInfo className='mt-16' title={base_Info.name} id={base_Info.key}>
<BaseInfo.BaseInfoItem label={PlanningCycle}> {moment(details?.planStartTime).format('YYYY-MM-DD')} ~ {moment(details?.planEndTime).format('YYYY-MM-DD')} </BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label={SupplyMembersLabel}> {details?.vendorMemberName} </BaseInfo.BaseInfoItem> <BaseInfo.BaseInfoItem label={SupplyMembersLabel}> {details?.vendorMemberName} </BaseInfo.BaseInfoItem>
<Form.Item <Form.Item
{...formItemLayout} {...formItemLayout}
label={PlanSummary} label={PlanSummary}
name='planSummaryText' name='planSummaryText'
rules={[ rules={[
{ required: true, message: '请输入' } { required: true, message: '请输入' }
]} ]}
> >
<Input /> <Input />
</Form.Item> </Form.Item>
<BaseInfo.BaseInfoItem label={ExternalState}> <BaseInfo.BaseInfoItem label={ExternalState}>
<Tag color={tagStatus.getTagStyle(details?.status).bgColor}> <Tag color={tagStatus.getTagStyle(details?.status).bgColor}>
<span style={{ color: tagStatus.getTagStyle(details?.status).fontColor }}>{statusTxt.get(details?.status)}</span> <span style={{ color: tagStatus.getTagStyle(details?.status).fontColor }}>{statusTxt.get(details?.status)}</span>
</Tag> </Tag>
</BaseInfo.BaseInfoItem> </BaseInfo.BaseInfoItem>
</BaseInfo> </BaseInfo>
<BaseInfo className='mt-16' title={PlannedDelivery.name} id={PlannedDelivery.key} cols={1}> <BaseInfo className='mt-16' title={PlannedDelivery.name} id={PlannedDelivery.key} cols={1}>
<Table <Table
// defaultExpandAllRows // defaultExpandAllRows
rowKey={'skuId'} rowKey={'skuId'}
columns={materialTableColumn} columns={materialTableColumn}
expandedRowRender={expandedRowRender} expandedRowRender={expandedRowRender}
dataSource={materialTableData} dataSource={materialTableData}
tableLayout="fixed" tableLayout="fixed"
scroll={{ x: 2022 }} scroll={{ x: 2022 }}
/> />
</BaseInfo> </BaseInfo>
<BaseInfo className='mt-16' title={Remarks.name} id={Remarks.key} cols={1}> <BaseInfo className='mt-16' title={Remarks.name} id={Remarks.key} cols={1}>
<Form.Item <Form.Item
name='remark' name='remark'
rules={[ rules={[
{ required: true, message: '请输入' } { required: true, message: '请输入' }
]} ]}
> >
<Input.TextArea rows={4} maxLength={300} placeholder={DeliveryPlanRemark} /> <Input.TextArea rows={4} maxLength={300} placeholder={DeliveryPlanRemark} />
</Form.Item> </Form.Item>
</BaseInfo> </BaseInfo>
<BaseInfo className='mt-16' title={ExternalRoamRecord.name} id={ExternalRoamRecord.key} cols={1}> <BaseInfo className='mt-16' title={ExternalRoamRecord.name} id={ExternalRoamRecord.key} cols={1}>
<Table <Table
rowKey={'id'} rowKey={'id'}
dataSource={externalRoamRecordData} dataSource={externalRoamRecordData}
columns={ExternalRoamRecordTableColumn} columns={ExternalRoamRecordTableColumn}
pagination={false} pagination={false}
/> />
</BaseInfo> </BaseInfo>
</Form> </Form>
</AnchorPage> </AnchorPage>
</Spin>
) )
} }
......
...@@ -19,7 +19,7 @@ import { AddressDrawer } from "@/components/AddressDrawer" ...@@ -19,7 +19,7 @@ import { AddressDrawer } from "@/components/AddressDrawer"
import { getLogisticsSelectListReceiverAddress, getLogisticsSelectListShipperAddress, postLogisticsReceiverAddressAdd, postLogisticsReceiverAddressUpdate, postLogisticsShipperAddressAdd, postLogisticsShipperAddressUpdate } from "@/services/LogisticsV2Api" import { getLogisticsSelectListReceiverAddress, getLogisticsSelectListShipperAddress, postLogisticsReceiverAddressAdd, postLogisticsReceiverAddressUpdate, postLogisticsShipperAddressAdd, postLogisticsShipperAddressUpdate } from "@/services/LogisticsV2Api"
import { DatePickerSelect } from "@/components/DatePickerSelect" import { DatePickerSelect } from "@/components/DatePickerSelect"
import LogisticsCompanyMerchantsSelect from "@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect" import LogisticsCompanyMerchantsSelect from "@/components/LogisticsCompanySelect/LogisticsCompanyMerchantsSelect"
import { DeliveryNumColumn, OredrNumColumn } from "../../constants/table-column" import { DeliveryNumColumn, OrderNumColumn } from "../../constants/table-column"
import { useLocation } from "umi" import { useLocation } from "umi"
const { useForm } = Form; const { useForm } = Form;
...@@ -251,7 +251,7 @@ function DeliveryNoteAddForm() { ...@@ -251,7 +251,7 @@ function DeliveryNoteAddForm() {
render: (t, rcode, index) => { render: (t, rcode, index) => {
return ( return (
<HarvestMaterialInput <HarvestMaterialInput
value={rcode[OredrNumColumn.key]} value={rcode[OrderNumColumn.key]}
index={index} index={index}
keyUp="deliveryCount" keyUp="deliveryCount"
/> />
......
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