Commit 194aa009 authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加查看订单页面

parent 2d4cf0af
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 10:42:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-18 14:05:58
* @Description: 换货查询相关路由
*/
const exchangeManageRoute = {
path: '/exchangeManage',
name: 'exchangeManage',
icon: 'SmileOutlined',
routes: [
// 换货申请单查询
{
path: '/exchangeManage/query',
name: 'query',
component: '@/pages/exchangeManage/query/index',
},
// 换货申请单详情
{
path: '/exchangeManage/query/detail',
name: 'queryDetail',
component: '@/pages/exchangeManage/query/detail',
hideInMenu: true,
hidePageHeader: true,
},
],
};
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 10:42:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-18 14:05:58
* @Description: 换货查询相关路由
*/
const exchangeManageRoute = {
path: '/exchangeManage',
name: 'exchangeManage',
icon: 'SmileOutlined',
routes: [
// 换货申请单查询
{
path: '/exchangeManage/query',
name: 'query',
component: '@/pages/exchangeManage/query/index',
},
// 换货申请单详情
{
path: '/exchangeManage/query/detail',
name: 'queryDetail',
component: '@/pages/exchangeManage/query/detail',
hideInMenu: true,
hidePageHeader: true,
},
// 换货申请单详情-订单详情
{
path: '/exchangeManage/query/orderDetail',
name: 'orderDetail',
component: '@/pages/orderSystem/orderDetail',
hideInMenu: true,
hidePageHeader: true
},
],
};
export default exchangeManageRoute;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 17:16:23
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-18 17:16:24
* @Description: 维修查询相关路由
*/
const repairManageRoute = {
path: '/repairManage',
name: 'repairManage',
icon: 'SmileOutlined',
routes: [
// 维修申请单查询
{
path: '/repairManage/query',
name: 'query',
component: '@/pages/repairManage/query/index',
},
// 维修申请单详情
{
path: '/repairManage/query/detail',
name: 'queryDetail',
component: '@/pages/repairManage/query/detail',
hideInMenu: true,
hidePageHeader: true,
},
],
};
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 17:16:23
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-18 17:16:24
* @Description: 维修查询相关路由
*/
const repairManageRoute = {
path: '/repairManage',
name: 'repairManage',
icon: 'SmileOutlined',
routes: [
// 维修申请单查询
{
path: '/repairManage/query',
name: 'query',
component: '@/pages/repairManage/query/index',
},
// 维修申请单详情
{
path: '/repairManage/query/detail',
name: 'queryDetail',
component: '@/pages/repairManage/query/detail',
hideInMenu: true,
hidePageHeader: true,
},
// 维修申请单详情-订单详情
{
path: '/repairManage/query/orderDetail',
name: 'orderDetail',
component: '@/pages/orderSystem/orderDetail',
hideInMenu: true,
hidePageHeader: true
},
],
};
export default repairManageRoute;
\ No newline at end of file
......@@ -24,6 +24,14 @@ const returnManageRoute = {
hideInMenu: true,
hidePageHeader: true,
},
// 退货申请单详情-订单详情
{
path: '/returnManage/query/orderDetail',
name: 'orderDetail',
component: '@/pages/orderSystem/orderDetail',
hideInMenu: true,
hidePageHeader: true
},
// 待退款
{
path: '/returnManage/returnPrReturn',
......@@ -46,6 +54,14 @@ const returnManageRoute = {
hideInMenu: true,
hidePageHeader: true,
},
// 待退款-订单详情
{
path: '/returnManage/returnPrReturn/orderDetail',
name: 'orderDetail',
component: '@/pages/orderSystem/orderDetail',
hideInMenu: true,
hidePageHeader: true
},
],
};
......
/*
* @Author: LeeJiancong
* @Date: 2020-08-04 15:05:52
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-10-30 17:21:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-22 13:45:50
*/
import utils from '@/utils'
import menu from '../en-US/menu'
......@@ -232,11 +232,13 @@ export default {
'menu.exchangeManage': '换货申请单管理',
'menu.exchangeManage.query': '换货申请单查询',
'menu.exchangeManage.queryDetail': '换货申请单详情',
'menu.exchangeManage.orderDetail': '查看订单',
// 维修管理
'menu.repairManage': '维修申请单管理',
'menu.repairManage.query': '维修申请单查询',
'menu.repairManage.queryDetail': '维修申请单详情',
'menu.repairManage.orderDetail': '查看订单',
// 退货管理
'menu.returnManage': '退货申请单管理',
......@@ -245,6 +247,7 @@ export default {
'menu.returnManage.returnPrReturn': '待退款',
'menu.returnManage.returnPrReturnDetail': '待退款详情',
'menu.returnManage.prReturnVerify': '退款',
'menu.returnManage.orderDetail': '查看订单',
}
// export default utils.transformDataPre(data, 'menu')
......@@ -106,7 +106,7 @@ const DetailInfo: React.FC = () => {
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`/exchangeManage/query/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......
import React, { useState, useEffect, useContext, useRef } from 'react'
import OrderDetailHeader from '../components/OrderDetailHeader'
import { Link, history } from 'umi'
import { orderTypeLabel, SALE_ORDER_STATUS } from './constant'
import { formatTimeString } from '@/utils'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import { PublicApi } from '@/services/api'
import AuditProcess from '@/components/AuditProcess'
import { findLastIndexFlowState } from '@/utils'
import OrderDetailWrapper from '../components/OrderDetailWrapper'
import { GlobalConfig } from '@/global/config'
import OrderProductTable from './components/orderProductTable'
import { OrderDetailContext } from './context'
import OrderMergeInfo from './components/orderMergeInfo'
import OrderTransformRecord from './components/orderTransformRecord'
import OrderPayTabs from './components/orderPayTabs'
import StatusColors from '../components/StatusColors'
import OrderDeleveRecord from './components/orderDeleveRecord'
export interface CommonOrderDetailProps {}
const CommonOrderDetail:React.FC<CommonOrderDetailProps> = (props) => {
const [formData, setFormData] = useState<any>(null)
let { id, pageStatus, page_type = SALE_ORDER_STATUS.READY_APPROVED_ORDER } = usePageStatus()
page_type = Number(page_type)
const payResultVisible = useRef<any>({})
const [payResultType, setPayResultType] = useState<'default' | 'preview'>('default')
useEffect(() => {
reloadFormData()
}, [])
const reloadFormData = () => {
if (id) {
PublicApi.getOrderPlatformOrderDetails({id}).then(({data, code}) => {
if (code === 1000) {
setFormData(data)
}
})
}
}
const formContext = {
data: formData,
payResultType,
setPayResultType,
payResultVisible,
reloadFormData,
ctl: {
setData: setFormData
}
}
const detailList = [
{ label: '对应报价单号', name: 'quotationNo', span: 8, render: text => <Link to={'/'}>{text}</Link> },
{ label: '订单摘要', name: 'orderThe', span: 8 },
{ label: '供应会员', name: 'supplyMembersName', span: 8 },
{ label: '下单模式', name: 'orderModel', span: 8, render: text => GlobalConfig.web.orderMode.find(v => v.value === text)?.label || '' },
{ label: '订单类型', name: 'type', span: 8, render: text => orderTypeLabel[text] },
{ label: '下单时间', name: 'createTime', span: 8, render: text => formatTimeString(text) },
{ label: '外部状态', name: 'externalState', span: 8, render: text => <StatusColors type='out' status={text}/> },
// { label: '内部状态', name: 'purchaseOrderInteriorState', span: 8, render: text => <StatusColors type='saleInside' status={text}/> },
]
const headerTiTle = formData ? {
picName: '单',
titleLabel: '订单号: ',
titleValue: formData.orderNo
} : null
return formData ? (
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader headerTitle={headerTiTle} detailList={detailList} detailData={formData}/>
<OrderDetailWrapper>
<div className='gray-wrap'>
{/* 工作流进度 */}
{ pageStatus !== PageStatus.ADD && formData && formData.externalWorkflowFlowRecordLogResponses && <AuditProcess
customTitleKey='operationalProcess'
customKey='state'
outerVerifyCurrent={findLastIndexFlowState(formData.externalWorkflowFlowRecordLogResponses)}
innerVerifyCurrent={findLastIndexFlowState(formData.interiorWorkflowFlowRecordLogResponses)}
outerVerifySteps={formData.externalWorkflowFlowRecordLogResponses || []}
innerVerifySteps={formData.interiorWorkflowFlowRecordLogResponses || []}
></AuditProcess> }
{/* 商品列表 */}
<OrderProductTable/>
{/* 支付信息 todo */}
<OrderPayTabs/>
{/* 杂项 */}
<OrderMergeInfo/>
{/* 订单发货记录 */}
<OrderDeleveRecord/>
{/* 订单流转记录 */}
<OrderTransformRecord/>
</div>
</OrderDetailWrapper>
</OrderDetailContext.Provider>
</div>
) : null
}
CommonOrderDetail.defaultProps = {}
export default CommonOrderDetail
import React, { useState, useEffect, useContext, useRef } from 'react'
import OrderDetailHeader from '../components/OrderDetailHeader'
import { Link, history } from 'umi'
import { orderTypeLabel, SALE_ORDER_STATUS } from './constant'
import { formatTimeString } from '@/utils'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import { PublicApi } from '@/services/api'
import AuditProcess from '@/components/AuditProcess'
import { findLastIndexFlowState } from '@/utils'
import OrderDetailWrapper from '../components/OrderDetailWrapper'
import { GlobalConfig } from '@/global/config'
import OrderProductTable from './components/orderProductTable'
import { OrderDetailContext } from './context'
import OrderMergeInfo from './components/orderMergeInfo'
import OrderTransformRecord from './components/orderTransformRecord'
import OrderPayTabs from './components/orderPayTabs'
import StatusColors from '../components/StatusColors'
import OrderDeleveRecord from './components/orderDeleveRecord'
export interface CommonOrderDetailProps {}
const CommonOrderDetail:React.FC<CommonOrderDetailProps> = (props) => {
const [formData, setFormData] = useState<any>(null)
let { id, pageStatus, page_type = SALE_ORDER_STATUS.READY_APPROVED_ORDER, orderNo } = usePageStatus()
page_type = Number(page_type)
const payResultVisible = useRef<any>({})
const [payResultType, setPayResultType] = useState<'default' | 'preview'>('default')
useEffect(() => {
reloadFormData()
}, [])
const reloadFormData = () => {
if (id || orderNo) {
PublicApi.getOrderPlatformOrderDetails({ id, orderNo }).then(({data, code}) => {
if (code === 1000) {
setFormData(data)
}
})
}
}
const formContext = {
data: formData,
payResultType,
setPayResultType,
payResultVisible,
reloadFormData,
ctl: {
setData: setFormData
}
}
const detailList = [
{ label: '对应报价单号', name: 'quotationNo', span: 8, render: text => <Link to={'/'}>{text}</Link> },
{ label: '订单摘要', name: 'orderThe', span: 8 },
{ label: '供应会员', name: 'supplyMembersName', span: 8 },
{ label: '下单模式', name: 'orderModel', span: 8, render: text => GlobalConfig.web.orderMode.find(v => v.value === text)?.label || '' },
{ label: '订单类型', name: 'type', span: 8, render: text => orderTypeLabel[text] },
{ label: '下单时间', name: 'createTime', span: 8, render: text => formatTimeString(text) },
{ label: '外部状态', name: 'externalState', span: 8, render: text => <StatusColors type='out' status={text}/> },
// { label: '内部状态', name: 'purchaseOrderInteriorState', span: 8, render: text => <StatusColors type='saleInside' status={text}/> },
]
const headerTiTle = formData ? {
picName: '单',
titleLabel: '订单号: ',
titleValue: formData.orderNo
} : null
return formData ? (
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader headerTitle={headerTiTle} detailList={detailList} detailData={formData}/>
<OrderDetailWrapper>
<div className='gray-wrap'>
{/* 工作流进度 */}
{ pageStatus !== PageStatus.ADD && formData && formData.externalWorkflowFlowRecordLogResponses && <AuditProcess
customTitleKey='operationalProcess'
customKey='state'
outerVerifyCurrent={findLastIndexFlowState(formData.externalWorkflowFlowRecordLogResponses)}
innerVerifyCurrent={findLastIndexFlowState(formData.interiorWorkflowFlowRecordLogResponses)}
outerVerifySteps={formData.externalWorkflowFlowRecordLogResponses || []}
innerVerifySteps={formData.interiorWorkflowFlowRecordLogResponses || []}
></AuditProcess> }
{/* 商品列表 */}
<OrderProductTable/>
{/* 支付信息 todo */}
<OrderPayTabs/>
{/* 杂项 */}
<OrderMergeInfo/>
{/* 订单发货记录 */}
<OrderDeleveRecord/>
{/* 订单流转记录 */}
<OrderTransformRecord/>
</div>
</OrderDetailWrapper>
</OrderDetailContext.Provider>
</div>
) : null
}
CommonOrderDetail.defaultProps = {}
export default CommonOrderDetail
......@@ -52,7 +52,7 @@ const DetailInfo: React.FC = () => {
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`/repairManage/query/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......
......@@ -55,9 +55,13 @@ interface DetailInfo extends GetAsReturnGoodsGetDetailPlatformResponse {
};
interface DetailInfoProps {
// 记录id
/**
* 记录id
*/
id: string;
// 历史记录目标路径
/**
* 历史记录目标路径
*/
target?: string;
/**
* 是否是采购商
......@@ -67,7 +71,7 @@ interface DetailInfoProps {
const DetailInfo: React.FC<DetailInfoProps> = ({
id,
target,
target = '/returnManage/query/orderDetail',
isPurchaser = false,
}) => {
const [detailInfo, setDetailInfo] = useState<DetailInfo>({});
......@@ -104,7 +108,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`${target}?orderNo=${text}`}
>
{text}
</EyePreview>
......
import React from 'react';
import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
const ReturnPrReturnDetailInfo: React.FC = () => {
const { id } = usePageStatus();
return (
<DetailInfo id={id} isPurchaser />
);
};
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 17:44:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-22 13:54:53
* @Description:
*/
import React from 'react';
import { usePageStatus } from '@/hooks/usePageStatus';
import DetailInfo from '../components/DetailInfo';
const ReturnPrReturnDetailInfo: React.FC = () => {
const { id } = usePageStatus();
return (
<DetailInfo
id={id}
target="/returnManage/returnPrReturn/orderDetail"
isPurchaser
/>
);
};
export default ReturnPrReturnDetailInfo;
\ No newline at end of file
......@@ -2680,6 +2680,11 @@
dependencies:
"@types/node" "*"
"@types/sortablejs@^1.10.6":
version "1.10.6"
resolved "http://10.0.0.19:4873/@types%2fsortablejs/-/sortablejs-1.10.6.tgz#98725ae08f1dfe28b8da0fdf302c417f5ff043c0"
integrity sha512-QRz8Z+uw2Y4Gwrtxw8hD782zzuxxugdcq8X/FkPsXUa1kfslhGzy13+4HugO9FXNo+jlWVcE6DYmmegniIQ30A==
"@types/source-list-map@*":
version "0.1.2"
resolved "http://10.0.0.21:8081/repository/node-group/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9"
......@@ -9639,10 +9644,10 @@ lines-and-columns@^1.1.6:
resolved "http://10.0.0.21:8081/repository/node-group/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
lingxi-design-ui@^1.1.15:
version "1.1.15"
resolved "http://10.0.0.21:8081/repository/node-group/lingxi-design-ui/-/lingxi-design-ui-1.1.15.tgz#e4e8f04e36f673dcad7423b0cd946f1ee76df62e"
integrity sha512-I5MrPZ1VWImwZn5ZUao2KU+kkatjOPyhxtHG7H6xZ/BFZRKVED6cjL6+4E1NKHn9KGi700xefkBfbY7PgTn4Cw==
lingxi-design-ui@^1.1.19:
version "1.1.19"
resolved "http://10.0.0.19:4873/lingxi-design-ui/-/lingxi-design-ui-1.1.19.tgz#6e360011d9c4a8cd246127fd52b8d3032f39b226"
integrity sha512-IYTiAB1zR3EPI7iC9kYV+BI3MQaiI3eSppNKRD01K12MTyrtwaXSsDS/tSWvkLkEX3RCg87HsPAomuj8nvwDKQ==
dependencies:
"@ant-design/icons" "^4.2.1"
"@ant-design/react-slick" "~0.26.1"
......@@ -9653,7 +9658,18 @@ lingxi-design-ui@^1.1.15:
react-slick "^0.26.1"
rgbaster "^2.1.1"
lingxi-design@^1.0.6, lingxi-design@^1.0.8:
lingxi-design@^1.0.12:
version "1.0.12"
resolved "http://10.0.0.19:4873/lingxi-design/-/lingxi-design-1.0.12.tgz#e9a58e4330c603219b21145991942155f93d1f32"
integrity sha512-r5elokQwzDj/KhZhjUKXZreXXII/y796ILhnpAx1yJ5dDRxh0cOgveT911Tw5VJBVIddog8lGSWlEdurmgG39Q==
dependencies:
"@ant-design/icons" "^4.2.1"
lingxi-editor-core "^1.0.7"
lodash "^4.17.15"
react "^16.8.0"
react-dom "^16.8.0"
lingxi-design@^1.0.6:
version "1.0.8"
resolved "http://10.0.0.21:8081/repository/node-group/lingxi-design/-/lingxi-design-1.0.8.tgz#4f7ca5623c645ec2f4f55b243944022f7b3aa406"
integrity sha512-8EWkcEM2OB/fihN6b/pE72AjZGOOi1KBFIC7gJ8PAz/QHM0vTW6PzKCdqJiJLNRToalpfouu9TXZqQWU/DbDGw==
......@@ -9674,6 +9690,16 @@ lingxi-editor-core@^1.0.6:
react "^16.8.0"
redux "^4.0.5"
lingxi-editor-core@^1.0.7:
version "1.0.7"
resolved "http://10.0.0.19:4873/lingxi-editor-core/-/lingxi-editor-core-1.0.7.tgz#5b2987d8fd3526f9b8e454ac07bf390b95e17778"
integrity sha512-wXSnWz0dKwuZKr81xw7r6klizY33vlEmuR6DiaydBdMUikoKCLFIOZQloJjX6rlJWl7xxVDfJTCchtym0KHrCQ==
dependencies:
immer "^6.0.5"
lodash "^4.17.15"
react "^16.8.0"
redux "^4.0.5"
lingxi-web@^1.0.6:
version "1.0.6"
resolved "http://10.0.0.21:8081/repository/node-group/lingxi-web/-/lingxi-web-1.0.6.tgz#f898b8e7488533666c1e1a141c36bdfa49e487dc"
......@@ -13534,6 +13560,14 @@ react-slick@~0.25.2:
lodash.debounce "^4.0.8"
resize-observer-polyfill "^1.5.0"
react-sortablejs@^6.0.0:
version "6.0.0"
resolved "http://10.0.0.19:4873/react-sortablejs/-/react-sortablejs-6.0.0.tgz#ba75ded6dce3fa1b5b3b52c70d1928fcdee2003d"
integrity sha512-vzi+TWOnofcYg+dYnC/Iz/ZZkBGG76uM6KaLwuAqBk0349JQxIy3PZizbK0TJdLlK6NnLt4CiEyyQXSSnVYvEw==
dependencies:
classnames "^2.2.6"
tiny-invariant "^1.1.0"
react-stikky@^0.1.15:
version "0.1.30"
resolved "http://10.0.0.21:8081/repository/node-group/react-stikky/-/react-stikky-0.1.30.tgz#20b159455fc7d28a26b48e25319b70a3129f680e"
......@@ -14627,6 +14661,11 @@ sortablejs@^1.10.2:
resolved "http://10.0.0.21:8081/repository/node-group/sortablejs/-/sortablejs-1.12.0.tgz#ee6d7ece3598c2af0feb1559d98595e5ea37cbd6"
integrity sha1-7m1+zjWYwq8P6xVZ2YWV5eo3y9Y=
sortablejs@^1.12.0:
version "1.13.0"
resolved "http://10.0.0.19:4873/sortablejs/-/sortablejs-1.13.0.tgz#3ab2473f8c69ca63569e80b1cd1b5669b51269e9"
integrity sha512-RBJirPY0spWCrU5yCmWM1eFs/XgX2J5c6b275/YyxFRgnzPhKl/TDeU2hNR8Dt7ITq66NRPM4UlOt+e5O4CFHg==
source-list-map@^2.0.0:
version "2.0.1"
resolved "http://10.0.0.21:8081/repository/node-group/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
......@@ -15348,7 +15387,7 @@ timsort@^0.3.0:
resolved "http://10.0.0.21:8081/repository/node-group/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4"
integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=
tiny-invariant@^1.0.2:
tiny-invariant@^1.0.2, tiny-invariant@^1.1.0:
version "1.1.0"
resolved "http://10.0.0.21:8081/repository/node-group/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875"
integrity sha1-Y0xfjv3CdxS384bDXmdgmR0jCHU=
......
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