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

Merge branch 'v2-0418-transferOrder-molei' into 'v2-220418'

新增收货单 See merge request GavinPeng/pro-platform!5
parents 6b6e8145 c5e179c5
...@@ -30,6 +30,13 @@ const ReceivingNote = [ ...@@ -30,6 +30,13 @@ const ReceivingNote = [
component: '@/pages/order/receivingNote/deliveryNoteManage' component: '@/pages/order/receivingNote/deliveryNoteManage'
}, },
{ {
/** 收货单新增*/
path: '/memberCenter/order/receivingNote/deliveryNoteManage/add',
name: '新增收货单',
component: '@/pages/order/receivingNote/deliveryNoteManage/add',
noMargin: true
},
{
/** 收货单管理详情*/ /** 收货单管理详情*/
path: '/memberCenter/order/receivingNote/deliveryNoteManage/details', path: '/memberCenter/order/receivingNote/deliveryNoteManage/details',
name: '收货单管理详情', name: '收货单管理详情',
......
...@@ -30,14 +30,14 @@ function BaseInfo({ title, className, children, cols = 2, id }: BaseInfoPorps) { ...@@ -30,14 +30,14 @@ function BaseInfo({ title, className, children, cols = 2, id }: BaseInfoPorps) {
function BaseInfoItem({ label, children }: { function BaseInfoItem({ label, children }: {
label: string label: string
children: JSX.Element | string children: JSX.Element | string | React.ReactNode
}) { }) {
return ( return (
<div className='base_info_item flex text-lg'> <div className='base_info_item flex text-lg'>
<div className='label flex-4 flex-grow-0 w-100 text-gray-400'> <div className='label flex-4 flex items-center flex-grow-0 w-100 text-gray-400'>
{label} {label}
</div> </div>
<div className='value flex-auto'> <div className='value flex items-center flex-auto'>
{typeof children === 'string' ? <span>{children}</span> : children} {typeof children === 'string' ? <span>{children}</span> : children}
</div> </div>
</div> </div>
......
import { Form, FormItemProps } from "antd";
function FormItem<values = any>(prosp: FormItemProps<values>) {
return (
<Form.Item {...prosp} style={{ margin: 0 }} />
);
}
export default FormItem
\ No newline at end of file
export { default as FormItem } from './FormItem'
\ No newline at end of file
...@@ -12,7 +12,7 @@ const BillsInfo: AnchorsItem = { ...@@ -12,7 +12,7 @@ const BillsInfo: AnchorsItem = {
const Distribution: AnchorsItem = { const Distribution: AnchorsItem = {
key: "Distribution", key: "Distribution",
name: "单据信息" name: "送货信息"
} }
const DeliveryInfo: AnchorsItem = { const DeliveryInfo: AnchorsItem = {
...@@ -21,8 +21,8 @@ const DeliveryInfo: AnchorsItem = { ...@@ -21,8 +21,8 @@ const DeliveryInfo: AnchorsItem = {
} }
const LogisticsInfo: AnchorsItem = { const LogisticsInfo: AnchorsItem = {
key: "DeliveryInfo", key: "LogisticsInfo",
name: "物流信息" name: "物流信息"
} }
const Material: AnchorsItem = { const Material: AnchorsItem = {
...@@ -30,6 +30,17 @@ const Material: AnchorsItem = { ...@@ -30,6 +30,17 @@ const Material: AnchorsItem = {
name: "送货物料" name: "送货物料"
} }
const Harvest: AnchorsItem = {
key: "Harvest",
name: "收货信息"
}
const HarvestMaterial: AnchorsItem = {
key: "HarvestMaterial",
name: "收货物料"
}
const Circulation: AnchorsItem = { const Circulation: AnchorsItem = {
key: 'Circulation', key: 'Circulation',
name: "流转进度" name: "流转进度"
...@@ -41,9 +52,8 @@ const PlanMaterial: AnchorsItem = { ...@@ -41,9 +52,8 @@ const PlanMaterial: AnchorsItem = {
} }
const DeliveryNoteQuery: AnchorsItem[] = [ const DeliveryNoteQuery: AnchorsItem[] = [
BaseInfo,
Distribution,
BillsInfo, BillsInfo,
Distribution,
DeliveryInfo, DeliveryInfo,
LogisticsInfo, LogisticsInfo,
Material Material
...@@ -62,6 +72,8 @@ export { ...@@ -62,6 +72,8 @@ export {
LogisticsInfo, LogisticsInfo,
Material, Material,
Distribution, Distribution,
Harvest,
HarvestMaterial,
Circulation, Circulation,
PlanMaterial, PlanMaterial,
DeliveryNoteQuery, DeliveryNoteQuery,
......
import AnchorPage, { AnchorsItem } from "@/components/AnchorPage"
import { BaseInfo } from "@/components/BaseInfo"
import { useState } from "react"
import { BillsInfo, DeliveryInfo, LogisticsInfo, Harvest, HarvestMaterial } from '../columns'
import { DatePicker, Form, Input } from 'antd'
import { FormItem } from '@/components/FormItem'
function DeliveryNoteAddForm() {
const [anchors, setAnchors] = useState<AnchorsItem[]>(() => {
return [
BillsInfo,
Harvest,
DeliveryInfo,
LogisticsInfo,
HarvestMaterial
]
})
return (
<AnchorPage title="新增收获单"
anchors={anchors}>
<BaseInfo title={BillsInfo.name} id={BillsInfo.key}>
<BaseInfo.BaseInfoItem label="收货单摘要">
<FormItem>
<Input />
</FormItem>
</BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label="供应会员">
<FormItem>
<Input />
</FormItem>
</BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label="备注">
<FormItem>
<Input />
</FormItem>
</BaseInfo.BaseInfoItem>
</BaseInfo>
<BaseInfo title={DeliveryInfo.name} id={DeliveryInfo.key}>
<BaseInfo.BaseInfoItem label="发货时间">
<FormItem>
<DatePicker className="w-full" />
</FormItem>
</BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label="收货人">
<FormItem>
<Input />
</FormItem>
</BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label="收货人电话">
<FormItem>
<Input />
</FormItem>
</BaseInfo.BaseInfoItem>
</BaseInfo>
<BaseInfo title={LogisticsInfo.name} id={LogisticsInfo.key}>
<BaseInfo.BaseInfoItem label=" 送货订单号">
HF200019343344
</BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label="送货自提地址">
<div className="#LogisticsAddr">
<div className="#LogisticsAddrDisc leading-10">
广东省广州市海珠区新港东路1068号中洲中心
</div>
<div className="#LogisticsAddrName">
张三/13400001999
</div>
</div>
</BaseInfo.BaseInfoItem>
<BaseInfo.BaseInfoItem label="收货人电话">
<FormItem>
<Input />
</FormItem>
</BaseInfo.BaseInfoItem>
</BaseInfo>
</AnchorPage>
)
}
export default DeliveryNoteAddForm
\ No newline at end of file
...@@ -3,22 +3,36 @@ ...@@ -3,22 +3,36 @@
* @author: Gavin * @author: Gavin
* @description: * @description:
*/ */
import React, { useRef, useState } from 'react' import React, { useRef, useState } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Card, Space, Tag } from 'antd' import { Card, Space, Tag } from 'antd'
import StandardTable from '@/components/StandardTable' import StandardTable from '@/components/StandardTable'
import { ColumnType } from 'antd/lib/table' import { ColumnType } from 'antd/lib/table'
import TableOperation from '@/components/TableOperation' import TableOperation from '@/components/TableOperation'
import EyePreview from '@/components/EyePreview' import EyePreview from '@/components/EyePreview'
import NiceForm from '@/components/NiceForm' import NiceForm from '@/components/NiceForm'
import { createFormActions } from '@formily/antd' import { createFormActions } from '@formily/antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch' import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const' import { FORM_FILTER_PATH } from '@/formSchema/const'
import { deliveryNoteQuerySchema } from './schema' import { deliveryNoteQuerySchema } from './schema'
const tagStatusColor = {
interface IStatusEnum {
[key: number]: {
color: string,
fontColor: string
}
}
enum StatusEnum {
ToSbumit = 2
}
const tagStatusColor: IStatusEnum = {
// 待提交 // 待提交
2: { color: '#f4f5f7', fontColor: '#5c626a' }, [StatusEnum.ToSbumit]: { color: '#f4f5f7', fontColor: '#5c626a' },
// 待确认 // 待确认
3: { color: '#ecf2fe', fontColor: '#4787f0' }, 3: { color: '#ecf2fe', fontColor: '#4787f0' },
// 待修订 // 待修订
......
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