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