Commit 364b1d8a authored by XieZhiXiong's avatar XieZhiXiong

Merge branch 'v2-220418' of…

Merge branch 'v2-220418' of ssh://gitlab.shushangyun.com:8122/linkseeks-design/pro-platform into fix-v2-220418
parents 1b3fffa7 2c8cd070
...@@ -90,7 +90,7 @@ function AddressDrawer(props: AddressDrawerProps) { ...@@ -90,7 +90,7 @@ function AddressDrawer(props: AddressDrawerProps) {
<AddressRaioContextProvider value={addrList}> <AddressRaioContextProvider value={addrList}>
<Row gutter={10}> <Row gutter={10}>
<Col span={20}> <Col span={20}>
<Input.TextArea disabled={disabled} value={`${value?.fullAddress} ${value?.shipperName ? value?.shipperName : value?.receiverName} ${value?.phone}`} /> <Input.TextArea disabled={disabled} value={`${value?.fullAddress??''} ${value?.shipperName ? value?.shipperName : value?.receiverName ?? ''} ${value?.phone??''}`} />
</Col> </Col>
<Col span={4}> <Col span={4}>
......
...@@ -2,25 +2,26 @@ ...@@ -2,25 +2,26 @@
import { getAuth } from "@/utils/auth"; import { getAuth } from "@/utils/auth";
export const AuthUrl = (btnCode: string) => { export const AuthUrl = (btnCode: string) => {
const { auth } = getAuth() const { auth } = getAuth()
const { pathname } = new URL(window.location.href); // const { pathname } = new URL(window.location.href);
const RoutesAuth = auth.filter((item: any) => item?.u === pathname) // const RoutesAuth = auth.filter((item: any) => item?.u === pathname)
// 默认 让所以按钮权限 打开
// console.log(AuthCode, 'AuthCode') return true;
if (btnCode === 'DevTest') return true // 先把全部按钮打开
// 本地开发时传的特殊标识,直接开放权限 // if (btnCode === 'DevTest') return true
if (RoutesAuth.length > 0) { // // 本地开发时传的特殊标识,直接开放权限
const { b } = RoutesAuth[0]; // if (RoutesAuth.length > 0) {
// 本地开发时传的特殊标识,直接开放权限 // const { b } = RoutesAuth[0];
for (let i = 0; i < b.length; i++) { // // 本地开发时传的特殊标识,直接开放权限
if (btnCode) { // for (let i = 0; i < b.length; i++) {
// 是否有页面标识 // if (btnCode) {
// 找到该页面标识的按钮权限数据,并匹配权限按钮是否勾选 // // 是否有页面标识
if (b[i] === btnCode) { // // 找到该页面标识的按钮权限数据,并匹配权限按钮是否勾选
return true // if (b[i] === btnCode) {
} // return true
} // }
continue // }
} // continue
return false // }
} // return false
// }
} }
...@@ -25,23 +25,24 @@ const AuthButton = (props: AuthButtonProps) => { ...@@ -25,23 +25,24 @@ const AuthButton = (props: AuthButtonProps) => {
const RoutesAuth = auth.filter((item: any) => item?.u === pathname) const RoutesAuth = auth.filter((item: any) => item?.u === pathname)
const _authorityBtn = () => { const _authorityBtn = () => {
// 本地开发时传的特殊标识,直接开放权限 // 本地开发时传的特殊标识,直接开放权限
if (btnCode === 'DevTest') return true return true;
if (RoutesAuth.length > 0) { // 全部按钮打开
// if (btnCode === 'DevTest') return true
const { b } = RoutesAuth[0]; // if (RoutesAuth.length > 0) {
console.log(RoutesAuth.length, RoutesAuth) // const { b } = RoutesAuth[0];
for (let i = 0; i < b.length; i++) { // console.log(RoutesAuth.length, RoutesAuth)
if (btnCode) { // for (let i = 0; i < b.length; i++) {
// 是否有页面标识 // if (btnCode) {
// 找到该页面标识的按钮权限数据,并匹配权限按钮是否勾选 // // 是否有页面标识
if (b[i] === btnCode) { // // 找到该页面标识的按钮权限数据,并匹配权限按钮是否勾选
return true // if (b[i] === btnCode) {
} // return true
} // }
continue // }
} // continue
return false // }
} // return false
// }
} }
return _authorityBtn() ? children : null return _authorityBtn() ? children : null
} }
......
...@@ -28,15 +28,16 @@ function BaseInfo({ title, className, children, cols = 2, id }: BaseInfoPorps) { ...@@ -28,15 +28,16 @@ function BaseInfo({ title, className, children, cols = 2, id }: BaseInfoPorps) {
) )
} }
function BaseInfoItem({ label, children }: { function BaseInfoItem({ label, children, className }: {
label: string label: string
children: JSX.Element | string | React.ReactNode children: JSX.Element | string | React.ReactNode,
className?: string
}) { }) {
return ( return (
<div className='base_info_item'> <div className={`base_info_item ${className}`}>
<Row> <Row>
<Col span={6}> <Col span={6}>
<span style={{ color: '#91959B'}}>{label}</span> <span style={{ color: '#91959B' }}>{label}</span>
</Col> </Col>
<Col span={18}> <Col span={18}>
{typeof children === 'string' ? <div>{children}</div> : children} {typeof children === 'string' ? <div>{children}</div> : children}
......
...@@ -90,6 +90,7 @@ export class HandleFormSubmit { ...@@ -90,6 +90,7 @@ export class HandleFormSubmit {
"executorVO.phone": data.executorVO.phone, "executorVO.phone": data.executorVO.phone,
sendTime: moment(data.sendTime), sendTime: moment(data.sendTime),
"executorVO.carNumbers": data.executorVO.carNumbers, "executorVO.carNumbers": data.executorVO.carNumbers,
"receiverBO.phone": data.receiverBO.phone,
logisticsNo: data.logisticsNo, logisticsNo: data.logisticsNo,
logisticsCompanyInt: { logisticsCompanyInt: {
label: data.logisticsCompany, label: data.logisticsCompany,
......
import { getOrderReceiveOrderDeliveryPage } from '@/services/OrderNewV2Api'; import {
getOrderReceiveOrderDeliveryPage,
getOrderReceiveOrderDetail,
getOrderReceiveOrderDetailProductPage,
getOrderReceiveOrderPage,
} from '@/services/OrderNewV2Api';
// /order/receive/order/detail
class ReceiveNoteBase {
getDetailById(id: string) {
return getOrderReceiveOrderDetail({ id }).then(res => res.data)
}
getDetailProduct({ id, current }) {
return getOrderReceiveOrderDetailProductPage({
id,
current,
...{ pageSize: "10" }
}).then(res => res.data)
}
}
// 收货单送货单管理 // 收货单送货单管理
class ReceiveNoteManage { class ReceiveNoteManage extends ReceiveNoteBase {
getQuery(payload?: any) { getQuery(payload?: any) {
return getOrderReceiveOrderDeliveryPage().then(res => { return getOrderReceiveOrderPage().then(res => {
return res.data; return res.data;
}) })
} }
} }
class ReceiveNoteQuery { class ReceiveNoteQuery extends ReceiveNoteBase {
getQuery(payload?: any) { getQuery(payload?: any) {
return getOrderReceiveOrderDeliveryPage().then(res => { return getOrderReceiveOrderDeliveryPage().then(res => {
return res.data; return res.data;
}) })
} }
} }
......
...@@ -82,10 +82,11 @@ const Remarks: AnchorsItem = { ...@@ -82,10 +82,11 @@ const Remarks: AnchorsItem = {
const DeliveryNoteQuery: AnchorsItem[] = [ const DeliveryNoteQuery: AnchorsItem[] = [
BillsInfo, BillsInfo,
Distribution, Harvest,
DeliveryInfo, DeliveryInfo,
LogisticsInfo, LogisticsInfo,
Material Material,
ExternalRoamRecord
] ]
const DeliveryPlanDetails: AnchorsItem[] = [ const DeliveryPlanDetails: AnchorsItem[] = [
......
...@@ -6,11 +6,11 @@ import { ...@@ -6,11 +6,11 @@ import {
ReceiptAddLabel, NoteLabel, DeliveryTimeLabel, ReceiptAddLabel, NoteLabel, DeliveryTimeLabel,
ConsigneeTimeLabel, LogisticsCompanyLabel, LogisticsCarNoLabel, LogisticsNoLabel, ConsigneeTimeLabel, LogisticsCompanyLabel, LogisticsCarNoLabel, LogisticsNoLabel,
DeliveryAbstractLabel, BuyerLabel, DeliveryDateLabel, DeliveryNameLabel, DeliveryAbstractLabel, BuyerLabel, DeliveryDateLabel, DeliveryNameLabel,
DeliveryPhoneLabel, ReceivingAddress, DeliveryTypeLabel, DeliveryNoLabel DeliveryPhoneLabel, ReceivingAddress, DeliveryTypeLabel, DeliveryNoLabel, ExternalRoamRecord
} from '../../constants' } from '../../constants'
import { Button, Form, Input, Radio, Table } from 'antd' import { Button, Form, Input, Radio, Table } from 'antd'
import { FormItem, required } from '@/components/FormItem' import { FormItem, required } from '@/components/FormItem'
import { DeliveryNoticeTableColumn } from "../../constants/page-table-column" import { DeliveryNoticeTableColumn, ExternalRoamRecordTableColumn } from "../../constants/page-table-column"
import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../assets/context' import { HarvestMaterialContextProvider, HarvestMaterialInput } from '../../assets/context'
import { DeliveryNoteB2bUploadService, ReceiveOrderCreate, ReceivingNoteAddService } from "../../assets/handles/HandleFormSubmit" import { DeliveryNoteB2bUploadService, ReceiveOrderCreate, ReceivingNoteAddService } from "../../assets/handles/HandleFormSubmit"
import NoteFactoryService from "../../assets/handles/DeliveryNoteService" import NoteFactoryService from "../../assets/handles/DeliveryNoteService"
...@@ -30,6 +30,7 @@ const ContentBox = BaseInfo; ...@@ -30,6 +30,7 @@ const ContentBox = BaseInfo;
function DeliveryNoteAddForm() { function DeliveryNoteAddForm() {
const [tableDataSource, setTableDataSource] = useState<any>([]) const [tableDataSource, setTableDataSource] = useState<any>([])
const [outerHistoryList, setOuterHistoryList] = useState([])
const location = useLocation() const location = useLocation()
const { id } = (location as any).query const { id } = (location as any).query
const [form] = useForm() const [form] = useForm()
...@@ -53,10 +54,12 @@ function DeliveryNoteAddForm() { ...@@ -53,10 +54,12 @@ function DeliveryNoteAddForm() {
}); });
service.getDetailById(id).then(res => { service.getDetailById(id).then(res => {
console.log(res)
form.setFieldsValue({ form.setFieldsValue({
deliveryOrderId: id, deliveryOrderId: id,
...res ...res
}) })
setOuterHistoryList(res.outerHistoryList)
}) })
}, []) }, [])
...@@ -69,6 +72,14 @@ function DeliveryNoteAddForm() { ...@@ -69,6 +72,14 @@ function DeliveryNoteAddForm() {
}) })
} }
function RenaderDeliveryType({ value }: { value?: any }) {
return (
<>
{value === 0 ? '自提' : '物流'}
</>
)
}
return ( return (
<AnchorPage title={ReceiptAddLabel} <AnchorPage title={ReceiptAddLabel}
anchors={anchors} anchors={anchors}
...@@ -92,10 +103,6 @@ function DeliveryNoteAddForm() { ...@@ -92,10 +103,6 @@ function DeliveryNoteAddForm() {
<Input /> <Input />
</FormItem> </FormItem>
<FormItem label={NoteLabel} name="remark">
<Input />
</FormItem>
<FormItem <FormItem
rules={[ rules={[
required() required()
...@@ -112,24 +119,29 @@ function DeliveryNoteAddForm() { ...@@ -112,24 +119,29 @@ function DeliveryNoteAddForm() {
} }
}} /> }} />
</FormItem> </FormItem>
<FormItem label={NoteLabel} name="remark">
<Input />
</FormItem>
</ContentBox> </ContentBox>
<ContentBox title={DeliveryInfo.name} id={DeliveryInfo.key}> <ContentBox title={Harvest.name} id={Harvest.key}>
<FormItem <FormItem
rules={[ rules={[
required() required()
]} ]}
label={DeliveryDateLabel} name="deliveryTime"> label={ConsigneeTimeLabel} name="sendTime">
<DatePickerSelect className='w-full' /> <DatePickerSelect className="w-full" />
</FormItem> </FormItem>
<FormItem <FormItem
rules={[ rules={[
required() required()
]} ]}
label={DeliveryNameLabel} name="deliveryVO"> label={ReceivingAddress} name="receiveVO">
<AddressDrawer <AddressDrawer
disabled={false}
addressListRequest={(val) => { addressListRequest={(val) => {
return getLogisticsSelectListReceiverAddress(val) return getLogisticsSelectListReceiverAddress(val)
}} }}
...@@ -148,34 +160,36 @@ function DeliveryNoteAddForm() { ...@@ -148,34 +160,36 @@ function DeliveryNoteAddForm() {
rules={[ rules={[
required() required()
]} ]}
label={DeliveryTimeLabel} name="deliveryRangeTime"> label={DeliveryPhoneLabel} name="receiverBO.phone">
<DatePickerSelect.RangePicker className="w-full" picker='time' /> <Input />
</FormItem> </FormItem>
</ContentBox>
<ContentBox title={DeliveryInfo.name} id={DeliveryInfo.key}>
<FormItem <FormItem
rules={[ rules={[
required() required()
]} ]}
label={DeliveryPhoneLabel} name="executorVO.phone"> label={DeliveryNoLabel} name="deliveryNo">
<Input /> <Input disabled={true} />
</FormItem> </FormItem>
</ContentBox>
<ContentBox
title={Harvest.name} id={Harvest.key}>
<FormItem <FormItem
rules={[ rules={[
required() required()
]} ]}
label={DeliveryNoLabel} name="deliveryNo"> label={DeliveryDateLabel} name="deliveryTime">
<Input disabled={true} /> <DatePickerSelect disabled={true} className='w-full' />
</FormItem> </FormItem>
<FormItem <FormItem
rules={[ rules={[
required() required()
]} ]}
label={ReceivingAddress} name="receiveVO"> label={DeliveryNameLabel} name="deliveryVO">
<AddressDrawer <AddressDrawer
disabled={true} disabled={true}
addressListRequest={(val) => { addressListRequest={(val) => {
...@@ -196,8 +210,8 @@ function DeliveryNoteAddForm() { ...@@ -196,8 +210,8 @@ function DeliveryNoteAddForm() {
rules={[ rules={[
required() required()
]} ]}
label={ConsigneeTimeLabel} name="sendTime"> label={DeliveryTimeLabel} name="deliveryRangeTime">
<DatePickerSelect disabled={true} className="w-full" /> <DatePickerSelect.RangePicker disabled={true} className="w-full" />
</FormItem> </FormItem>
</ContentBox> </ContentBox>
...@@ -209,11 +223,7 @@ function DeliveryNoteAddForm() { ...@@ -209,11 +223,7 @@ function DeliveryNoteAddForm() {
required() required()
]} ]}
label={DeliveryTypeLabel} name="deliveryType"> label={DeliveryTypeLabel} name="deliveryType">
<Radio.Group disabled={true}> <RenaderDeliveryType />
<Radio.Button value={1}>物流</Radio.Button>
<Radio.Button value={2}>自提</Radio.Button>
{/* <Radio.Button value={3}>无效配送</Radio.Button> */}
</Radio.Group>
</FormItem> </FormItem>
<FormItem label={LogisticsCarNoLabel} name="executorVO.carNumbers"> <FormItem label={LogisticsCarNoLabel} name="executorVO.carNumbers">
...@@ -227,7 +237,6 @@ function DeliveryNoteAddForm() { ...@@ -227,7 +237,6 @@ function DeliveryNoteAddForm() {
</FormItem> </FormItem>
</ContentBox> </ContentBox>
<ContentBox title={HarvestMaterial.name} id={HarvestMaterial.key} cols={1}> <ContentBox title={HarvestMaterial.name} id={HarvestMaterial.key} cols={1}>
<HarvestMaterialContextProvider value={{ <HarvestMaterialContextProvider value={{
...@@ -256,6 +265,17 @@ function DeliveryNoteAddForm() { ...@@ -256,6 +265,17 @@ function DeliveryNoteAddForm() {
</HarvestMaterialContextProvider> </HarvestMaterialContextProvider>
</ContentBox> </ContentBox>
<ContentBox className='mt-15' title={ExternalRoamRecord.name} id={ExternalRoamRecord.key} cols={1}>
<Table
columns={[
...ExternalRoamRecordTableColumn,
]}
rowKey="id"
dataSource={outerHistoryList}
/>
</ContentBox>
</Form> </Form>
</AnchorPage> </AnchorPage>
......
...@@ -3,105 +3,155 @@ ...@@ -3,105 +3,155 @@
* @author: Gavin * @author: Gavin
* @description: * @description:
*/ */
import React, { useState } from 'react' import React, { useEffect, useState } from 'react'
import AnchorPage from '@/components/AnchorPage' import AnchorPage from '@/components/AnchorPage'
import { BaseInfo as ListInfo } from '@/components/BaseInfo' import { BaseInfo as ListInfo } from '@/components/BaseInfo'
import { BillsInfo, DeliveryInfo, DeliveryNoteQuery, Distribution, LogisticsInfo, Material } from '../../constants' import { BillsInfo, DeliveryInfo, DeliveryNoteQuery, Distribution, ExternalRoamRecord, Harvest, LogisticsInfo, Material } from '../../constants'
import { Tag } from 'antd'; import { Space, Spin, Table, Tag } from 'antd';
import ReceiveNoteFacotry from '../../assets/handles/ReceiveNotePage';
import { useLocation } from 'umi';
import { DeliveryNoticeTableColumn, ExternalRoamRecordTableColumn } from '../../constants/page-table-column';
import { DeliveryNumColumn } from '../../constants/table-column';
const ListInfoItem = ListInfo.BaseInfoItem; const ListInfoItem = ListInfo.BaseInfoItem;
const service = ReceiveNoteFacotry.getInstance()
const DeliveryNoteManageDetails: React.FC = () => { const DeliveryNoteManageDetails: React.FC = () => {
const anchors = DeliveryNoteQuery const anchors = DeliveryNoteQuery
const [info, setInfo] = useState<any>({})
const [tableDataSource, setTableDataSource] = useState([])
const location = useLocation()
const { id } = (location as any).query
const [loading, setLoading] = useState(true)
useEffect(() => {
Promise.all([
service.getDetailById(id),
service.getDetailProduct({ id, current: 1 })
]).then((values) => {
setInfo(values[0])
setTableDataSource(values[1].data)
setLoading(false)
})
}, [])
return ( return (
<Spin spinning={loading}>
<AnchorPage <AnchorPage
title="2014-07-01 进口头层黄牛皮荔枝纹送货单|FH2014070100001" title={`${info?.deliveryNo}送货单详情`}
anchors={anchors} anchors={anchors}
> >
<ListInfo className='mt-15' title={BillsInfo.name} id={BillsInfo.key}> <ListInfo className='mt-15' title={BillsInfo.name} id={BillsInfo.key}>
<ListInfoItem label='送货单'> <ListInfoItem label='送货单'>
SH2014071000001 {info?.deliveryNo}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='供应会员'> <ListInfoItem label='供应会员'>
广州白马 {info?.buyerMemberName}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货单摘要'> <ListInfoItem label='送货单摘要'>
广州白马 {info?.digest}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='备注'> <ListInfoItem label='备注'>
广州白马 {info?.remark}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='外部状态'> <ListInfoItem label='外部状态'>
<Tag color="green">已提交</Tag> <Tag color="green">
{info?.outerStatusName}
</Tag>
</ListInfoItem> </ListInfoItem>
</ListInfo> </ListInfo>
<ListInfo className='mt-15' title={Distribution.name} id={Distribution.key}> <ListInfo className='mt-15' title={Harvest.name} id={Harvest.key}>
<ListInfoItem label='送货日期'> <div>
SH2014071000001 <ListInfoItem className="mt-16" label='送货日期'>
{info?.receiveTime}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货人'> <ListInfoItem className="mt-16" label='送货人'>
广州白马 {info?.receiverBO?.consignee}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货时间'> <ListInfoItem className="mt-16" label='送货电话'>
广州白马 {info?.receiverBO?.phone}
</ListInfoItem> </ListInfoItem>
</div>
<ListInfoItem label='送货电话'> <div>
广州白马 <ListInfoItem className="mt-16" label='送货地址'>
{info?.receiverBO?.provinceName ?? ''}{info?.receiverBO?.cityName ?? ''}{info?.receiverBO?.districtName ?? ''}{info?.receiverBO?.streetName ?? ''}{info?.receiverBO?.address ?? ''}
</ListInfoItem> </ListInfoItem>
</div>
</ListInfo> </ListInfo>
<ListInfo className='mt-15' title={DeliveryInfo.name} id={DeliveryInfo.key}> <ListInfo className='mt-15' title={DeliveryInfo.name} id={DeliveryInfo.key}>
<ListInfoItem label='送货日期'> <div>
SH2014071000001 <ListInfoItem className="mt-16" label='送货单编号'>
{info?.deliveryNo}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货人'> <ListInfoItem className="mt-16" label='发货时间'>
广州白马 {info?.sendTime}
</ListInfoItem> </ListInfoItem>
</div>
<ListInfoItem label='送货时间'> <div>
广州白马 <ListInfoItem className="mt-16" label='发货(自提)地址'>
</ListInfoItem> {info?.deliverVO?.provinceName ?? ''}{info?.deliverVO?.cityName ?? ''}{info?.deliverVO?.districtName ?? ''}{info?.deliverVO?.streetName ?? ''}{info?.deliverVO?.address ?? ''}
<ListInfoItem label='送货电话'>
广州白马
</ListInfoItem> </ListInfoItem>
</div>
</ListInfo> </ListInfo>
<ListInfo className='mt-15' title={LogisticsInfo.name} id={LogisticsInfo.key}> <ListInfo className='mt-15' title={LogisticsInfo.name} id={LogisticsInfo.key}>
<ListInfoItem label='物流方式'>
SH2014071000001
</ListInfoItem>
<ListInfoItem label='物流单号'> <ListInfoItem label='物流单号'>
广州白马 {info?.logisticsNo ?? '-'}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='物流公司'> <ListInfoItem label='物流公司'>
广州白马 {info?.logisticsCompany}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='车牌号码'> <ListInfoItem label='车牌号码'>
广州白马 {info?.deliverVO?.carNumbers ?? '-'}
</ListInfoItem> </ListInfoItem>
</ListInfo> </ListInfo>
<ListInfo className='mt-15' title={Material.name} id={Material.key}> <ListInfo className='mt-15' title={Material.name} id={Material.key} cols={1}>
<Table
rowKey={row => row.orderNo}
columns={
[
...DeliveryNoticeTableColumn
, {
...DeliveryNumColumn,
render: (t, rcode, index) => {
return rcode.deliveryCount
}
}
]}
dataSource={tableDataSource}
/>
</ListInfo>
<ListInfo className='mt-15' title={ExternalRoamRecord.name} id={ExternalRoamRecord.key} cols={1}>
<Table
columns={[
...ExternalRoamRecordTableColumn,
]}
rowKey="id"
dataSource={info?.outerHistoryList}
/>
</ListInfo> </ListInfo>
</AnchorPage> </AnchorPage>
</Spin>
) )
} }
......
...@@ -39,9 +39,13 @@ const DeliveryNoteManage: React.FC = () => { ...@@ -39,9 +39,13 @@ const DeliveryNoteManage: React.FC = () => {
'查看': true, '查看': true,
} }
const operationHandler = { const operationHandler = {
'修改': () => { console.log('修改 :>> ',) }, '修改': () => {
},
'作废': () => { console.log('作废 :>> ',) }, '作废': () => { console.log('作废 :>> ',) },
'查看': () => { console.log('查看 :>> ',) }, '查看': () => {
},
} }
return ( return (
<TableOperation <TableOperation
...@@ -57,9 +61,9 @@ const DeliveryNoteManage: React.FC = () => { ...@@ -57,9 +61,9 @@ const DeliveryNoteManage: React.FC = () => {
dataIndex: 'id', dataIndex: 'id',
key: 'id', key: 'id',
width: 160, width: 160,
render: (text, record) => render: (t, r) =>
<EyePreview url='/memberCenter/order/receivingNote/deliveryNoteManage/details'> <EyePreview url={`/memberCenter/order/receivingNote/deliveryNoteManage/details?id=${r.id}`}>
{text} {r.receiveNo}
</EyePreview> </EyePreview>
}, },
{ title: '收货单摘要', dataIndex: 'digest', key: 'digest' }, { title: '收货单摘要', dataIndex: 'digest', key: 'digest' },
...@@ -71,7 +75,7 @@ const DeliveryNoteManage: React.FC = () => { ...@@ -71,7 +75,7 @@ const DeliveryNoteManage: React.FC = () => {
title: '外部状态', title: '外部状态',
dataIndex: 'id6', dataIndex: 'id6',
key: 'id6', key: 'id6',
render: (text: string, record: any) => { render: (text, record) => {
const styles = tagService.getTagStyle(record.outerStatus); const styles = tagService.getTagStyle(record.outerStatus);
return ( return (
<Tag color={styles.bgColor}> <Tag color={styles.bgColor}>
...@@ -80,13 +84,13 @@ const DeliveryNoteManage: React.FC = () => { ...@@ -80,13 +84,13 @@ const DeliveryNoteManage: React.FC = () => {
) )
} }
}, },
{ /*{
title: '操作', title: '操作',
dataIndex: '', dataIndex: '',
key: 'x', key: 'x',
align: 'center', align: 'center',
render: (record) => renderOptionButton(record) render: (record) => renderOptionButton(record)
}, },*/
] ]
const fetchData = (params: unknown) => { const fetchData = (params: unknown) => {
......
...@@ -3,17 +3,38 @@ ...@@ -3,17 +3,38 @@
* @author: Gavin * @author: Gavin
* @description: * @description:
*/ */
import React, { useState } from 'react' import React, { useEffect, useState } from 'react'
import AnchorPage from '@/components/AnchorPage' import AnchorPage from '@/components/AnchorPage'
import { BaseInfo as ListInfo } from '@/components/BaseInfo' import { BaseInfo as ListInfo } from '@/components/BaseInfo'
import { BillsInfo, DeliveryInfo, DeliveryNoteQuery, LogisticsInfo, Material, Distribution } from '../../constants' import { BillsInfo, DeliveryInfo, DeliveryNoteQuery, LogisticsInfo, Material, Distribution } from '../../constants'
import { Tag } from 'antd' import { Table, Tag } from 'antd'
import ReceiveNoteFacotry from '../../assets/handles/ReceiveNotePage'
import { useLocation } from 'umi'
import { DeliveryNoticeTableColumn } from '../../constants/page-table-column'
import { DeliveryNumColumn } from '../../constants/table-column'
const service = ReceiveNoteFacotry.getInstance('Query')
const ListInfoItem = ListInfo.BaseInfoItem; const ListInfoItem = ListInfo.BaseInfoItem;
const DeliveryNoteDetails: React.FC = () => { const DeliveryNoteDetails: React.FC = () => {
const anchors = DeliveryNoteQuery const anchors = DeliveryNoteQuery
const [info, setInfo] = useState<any>({})
const [tableDataSource, setTableDataSource] = useState<any>([])
const location = useLocation()
const { id } = (location as any).query
useEffect(() => {
Promise.all([
service.getDetailById(id),
service.getDetailProduct({ id, current: "1" })
]).then(values => {
console.log(values[0])
setInfo(values[0])
setTableDataSource(values[1].data)
})
}, [])
return ( return (
<AnchorPage <AnchorPage
...@@ -23,19 +44,19 @@ const DeliveryNoteDetails: React.FC = () => { ...@@ -23,19 +44,19 @@ const DeliveryNoteDetails: React.FC = () => {
<ListInfo className='mt-15' title={BillsInfo.name} id={BillsInfo.key}> <ListInfo className='mt-15' title={BillsInfo.name} id={BillsInfo.key}>
<ListInfoItem label='送货单'> <ListInfoItem label='送货单'>
SH2014071000001 {info?.deliveryNo}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='供应会员'> <ListInfoItem label='供应会员'>
广州白马 {info?.buyerMemberName}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货单摘要'> <ListInfoItem label='送货单摘要'>
广州白马 {info?.digest}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='备注'> <ListInfoItem label='备注'>
广州白马 {info?.remark}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='外部状态'> <ListInfoItem label='外部状态'>
...@@ -45,60 +66,75 @@ const DeliveryNoteDetails: React.FC = () => { ...@@ -45,60 +66,75 @@ const DeliveryNoteDetails: React.FC = () => {
<ListInfo className='mt-15' title={Distribution.name} id={Distribution.key}> <ListInfo className='mt-15' title={Distribution.name} id={Distribution.key}>
<ListInfoItem label='送货日期'> <ListInfoItem label='送货日期'>
SH2014071000001 {info?.deliveryTime}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货人'> <ListInfoItem label='送货人'>
广州白马 {info?.deliverVO?.consignee}
</ListInfoItem>
<ListInfoItem label='送货时间'>
广州白马
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货电话'> <ListInfoItem label='送货电话'>
广州白马 {info?.deliverVO?.phone}
</ListInfoItem> </ListInfoItem>
</ListInfo> </ListInfo>
<ListInfo className='mt-15' title={DeliveryInfo.name} id={DeliveryInfo.key}> <ListInfo className='mt-15' title={DeliveryInfo.name} id={DeliveryInfo.key}>
<ListInfoItem label='送货日期'> <ListInfoItem label='发货时间'>
SH2014071000001 {info?.sendTime}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货人'> <ListInfoItem label='收货地址'>
广州白马 {info?.receiverBO?.provinceName}
{info?.receiverBO?.cityName}
{info?.receiverBO?.districtName}
{info?.receiverBO?.streetName}
{info?.receiverBO?.address}
{info?.receiverBO?.consignee} /
{info?.receiverBO?.phone}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货时间'> <ListInfoItem label='发货(自提)地址'>
广州白马 {info?.deliverVO?.provinceName}
{info?.deliverVO?.cityName}
{info?.deliverVO?.districtName}
{info?.deliverVO?.streetName}
{info?.deliverVO?.address}
{info?.deliverVO?.consignee} /
{info?.deliverVO?.phone}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='送货电话'>
广州白马
</ListInfoItem>
</ListInfo> </ListInfo>
<ListInfo className='mt-15' title={LogisticsInfo.name} id={LogisticsInfo.key}> <ListInfo className='mt-15' title={LogisticsInfo.name} id={LogisticsInfo.key}>
<ListInfoItem label='物流方式'>
SH2014071000001
</ListInfoItem>
<ListInfoItem label='物流单号'> <ListInfoItem label='物流单号'>
广州白马 {info?.logisticsNo}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='物流公司'> <ListInfoItem label='物流公司'>
广州白马 {info?.logisticsCompany}
</ListInfoItem> </ListInfoItem>
<ListInfoItem label='车牌号码'> <ListInfoItem label='车牌号码'>
广州白马 {info?.deliverVO?.carNumbers}
</ListInfoItem> </ListInfoItem>
</ListInfo> </ListInfo>
<ListInfo className='mt-15' title={Material.name} id={Material.key}> <ListInfo className='mt-15' title={Material.name} id={Material.key} cols={1}>
<Table
rowKey={row => row.orderNo}
columns={
[
...DeliveryNoticeTableColumn
, {
...DeliveryNumColumn,
render: (t, rcode, index) => {
return rcode.deliveryCount
}
}
]}
dataSource={tableDataSource}
/>
</ListInfo> </ListInfo>
</AnchorPage> </AnchorPage>
......
...@@ -42,7 +42,9 @@ const DeliveryNoteQuery: React.FC = () => { ...@@ -42,7 +42,9 @@ const DeliveryNoteQuery: React.FC = () => {
'生产收货单': () => { '生产收货单': () => {
history.push(`/memberCenter/order/receivingNote/deliveryNoteManage/add?id=${r.id}`) history.push(`/memberCenter/order/receivingNote/deliveryNoteManage/add?id=${r.id}`)
}, },
'查看': () => { console.log('查看 :>> ',) }, '查看': () => {
history.push(`/memberCenter/order/receivingNote/deliveryNoteQuery/details?id=${r.id}`)
},
} }
return ( return (
<TableOperation <TableOperation
......
...@@ -84,12 +84,8 @@ const PriceLibrary: React.FC<{}> = () => { ...@@ -84,12 +84,8 @@ const PriceLibrary: React.FC<{}> = () => {
id: 'priceManage.priceStrategy.columns.currency', id: 'priceManage.priceStrategy.columns.currency',
})} })}
defaultValue={text} defaultValue={text}
onPressEnter={(e: any) => onBlur={(e: any) => updatePrice(record, e)}
updatePrice({ onPressEnter={(e: any) => updatePrice(record, e)}
goodsPriceId: record.id,
marketPrice: e.target.value,
})
}
/> />
); );
}, },
...@@ -174,7 +170,15 @@ const PriceLibrary: React.FC<{}> = () => { ...@@ -174,7 +170,15 @@ const PriceLibrary: React.FC<{}> = () => {
`${history.location.pathname}/detail?goodsPriceId=${record.id}`, `${history.location.pathname}/detail?goodsPriceId=${record.id}`,
); );
}; };
const updatePrice = params => { const updatePrice = (record, e) => {
const val = e.target.value;
if (!val || val === record.marketPrice) {
return;
}
const params = {
goodsPriceId: record.id,
marketPrice: val,
};
getProductPriceManagementAddGoodsPrice(params).then(res => { getProductPriceManagementAddGoodsPrice(params).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
message.success(res.message); message.success(res.message);
......
import React, { useState, useRef, useEffect } from 'react'; import React, { useState, useRef, useEffect } from 'react';
import { getIntl, history } from 'umi'; import { getIntl, history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Button, Card, Dropdown, Menu, Space, Badge, Popconfirm } from 'antd'; import { Button, Card, Dropdown, Menu, Space, Badge, Popconfirm, message } from 'antd';
import { import {
PlusOutlined, PlusOutlined,
DownOutlined, DownOutlined,
...@@ -98,9 +98,16 @@ const Bills: React.FC<{}> = () => { ...@@ -98,9 +98,16 @@ const Bills: React.FC<{}> = () => {
postProductInvoicesBatchReview({ postProductInvoicesBatchReview({
ids, ids,
reviewType, reviewType,
}, {
ctlType: 'none',
}) })
.then(res => { .then(res => {
if (res.code !== 1000) { if (res.code !== 1000) {
if(res.code === 9999) {
message.info(res.message)
} else {
message.info(intl.formatMessage({ id: `${res.code}`, defaultMessage: res.message}))
}
return; return;
} }
if (callback) { if (callback) {
......
...@@ -47,8 +47,8 @@ export const billsTypeDetailSchema: ISchema = { ...@@ -47,8 +47,8 @@ export const billsTypeDetailSchema: ISchema = {
'x-component-props': { 'x-component-props': {
placeholder: intl.formatMessage({ id: 'stockSellStorage.zuichang20gezifu10ge' }), placeholder: intl.formatMessage({ id: 'stockSellStorage.zuichang20gezifu10ge' }),
}, },
required: true,
'x-rules': [ 'x-rules': [
{ required: true },
{ {
limitByte: true, // 自定义校验规则 limitByte: true, // 自定义校验规则
maxByte: 20, maxByte: 20,
......
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