Commit b2d5a596 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

feat: 新增待发货订单页面

parent 0646817e
...@@ -364,6 +364,20 @@ export default [ ...@@ -364,6 +364,20 @@ export default [
hideInMenu: true, hideInMenu: true,
noMargin: true, noMargin: true,
}, },
// 待发货订单
{
path: '/memberCenter/tranactionAbility/purchaseOrder/readyDelevedOrder',
name: 'readyDelevedOrder',
component: '@/pages/transaction/purchaseOrder/readyDelevedOrder'
},
// 待发货订单-详情
{
path: '/memberCenter/tranactionAbility/purchaseOrder/readyDelevedOrder/detail',
name: 'readyDelevedOrderDetail',
component: '@/pages/transaction/purchaseOrder/readyDelevedOrder/detail',
hideInMenu: true,
noMargin: true,
},
] ]
} }
] ]
...@@ -409,6 +409,8 @@ export default { ...@@ -409,6 +409,8 @@ export default {
'saleOrder.querenshougongfa': 'Confirm manual delivery', 'saleOrder.querenshougongfa': 'Confirm manual delivery',
'saleOrder.qufahuo': 'Go to ship', 'saleOrder.qufahuo': 'Go to ship',
'saleOrder.querenfahuo': 'Confirm shipment', 'saleOrder.querenfahuo': 'Confirm shipment',
'saleOrder.haoyoupintuan': 'Invite friends to join a group',
'saleOrder.shouhou': 'after sale',
'saleOrder.xianshangzhifu': 'Online payment', 'saleOrder.xianshangzhifu': 'Online payment',
'saleOrder.xianxiazhifu': 'Offline payment', 'saleOrder.xianxiazhifu': 'Offline payment',
'saleOrder.shouxinzhifu': 'Credit Payment', 'saleOrder.shouxinzhifu': 'Credit Payment',
......
...@@ -409,6 +409,8 @@ export default { ...@@ -409,6 +409,8 @@ export default {
'saleOrder.querenshougongfa': '수동 배송 확인', 'saleOrder.querenshougongfa': '수동 배송 확인',
'saleOrder.qufahuo': '출하하다', 'saleOrder.qufahuo': '출하하다',
'saleOrder.querenfahuo': '배송 확인', 'saleOrder.querenfahuo': '배송 확인',
'saleOrder.haoyoupintuan': '친한 친구를 초청하여 단체 모임을 결성하다',
'saleOrder.shouhou': '판매 후',
'saleOrder.xianshangzhifu': '온라인 지불', 'saleOrder.xianshangzhifu': '온라인 지불',
'saleOrder.xianxiazhifu': '오프라인 지불', 'saleOrder.xianxiazhifu': '오프라인 지불',
'saleOrder.shouxinzhifu': '여신 지불', 'saleOrder.shouxinzhifu': '여신 지불',
......
...@@ -409,6 +409,8 @@ export default { ...@@ -409,6 +409,8 @@ export default {
'saleOrder.querenshougongfa': '确认手工发货', 'saleOrder.querenshougongfa': '确认手工发货',
'saleOrder.qufahuo': '去发货', 'saleOrder.qufahuo': '去发货',
'saleOrder.querenfahuo': '确认发货', 'saleOrder.querenfahuo': '确认发货',
'saleOrder.haoyoupintuan': '邀请好友拼团',
'saleOrder.shouhou': '售后',
'saleOrder.xianshangzhifu': '线上支付', 'saleOrder.xianshangzhifu': '线上支付',
'saleOrder.xianxiazhifu': '线下支付', 'saleOrder.xianxiazhifu': '线下支付',
'saleOrder.shouxinzhifu': '授信支付', 'saleOrder.shouxinzhifu': '授信支付',
......
...@@ -12,10 +12,8 @@ import { encryptedByAES } from '@/utils/cryptoAes' ...@@ -12,10 +12,8 @@ import { encryptedByAES } from '@/utils/cryptoAes'
import QRCode from 'qrcode' import QRCode from 'qrcode'
import { getOrderBuyerValidatePayResult, postOrderBuyerValidatePay } from '@/services/OrderNewV2Api' import { getOrderBuyerValidatePayResult, postOrderBuyerValidatePay } from '@/services/OrderNewV2Api'
import { getSettleAccountsCommonCorporateAccountDetail } from '@/services/SettleV2Api' import { getSettleAccountsCommonCorporateAccountDetail } from '@/services/SettleV2Api'
import { getPayAssetAccountBalance, getPayCreditGetCredit, getPayEAccountAllInPayGetUserBalance, getPayEAccountAllInPayReSendPayCode } from '@/services/PayV2Api' import { getPayAssetAccountBalance, getPayCreditGetCredit, getPayEAccountAllInPayGetAccountDetail, getPayEAccountAllInPayGetUserBalance, getPayEAccountAllInPayReSendPayCode, postPayEAccountAllInPayConfirmPay } from '@/services/PayV2Api'
import useCountDown from '@/utils/hooks' import useCountDown from '@/utils/hooks'
import { postPayEAccountAllInPayConfirmPay } from '@/services/PayV2Api/id13209'
import { getPayEAccountAllInPayGetAccountDetail } from '@/services/PayV2Api/id13209'
const intl = getIntl(); const intl = getIntl();
export interface OrderPayModalProps { export interface OrderPayModalProps {
currentRef: any, currentRef: any,
......
import React, { useCallback, useRef } from 'react';
import { OrderDetailContext } from '../../../_public/order/context';
import { Button } from 'antd';
import OrderDetailHeader from '@/pages/transaction/components/orderDetailHeader';
import OrderDetailWrapper from '@/pages/transaction/components/orderDetailWrapper';
import PreLoading from '@/components/PreLoading';
import { useOrderDetail } from '../../../_public/order/effects/useOrderDetail';
import OrderHandDeleved from '../../../components/orderHandDeleved';
import OrderDetailSection from '../../../components/orderDetailSection';
import { usePageStatus } from '@/hooks/usePageStatus';
import { useIntl } from 'umi';
const ReadyConfirmDelevedOrderDetail: React.FC = () => {
const { formContext, id, detailList } = useOrderDetail({type: 's_readyConfirmDelevedOrder'})
const { batchNo } = usePageStatus()
const intl = useIntl()
// // 是否是手工发货
// const isHandDeleved = formContext.data && formContext.data.purchaseOrderInteriorState === SaleOrderInsideWorkState.HAND_DELEVED_ORDER
// // 所有发货单都是否已经发货了
// const isShowBtn = isHandDeleved || formContext.data?.orderDeliveryDetailsResponses?.some(v => v.interiorState === DeliverySideState.ADD_LOGISTICS_ORDER)
// 是否发过货
// const isHandDeleved = Number(batchNo) <= 0
const isHandDeleved = true
// 是否发货完成
const approvedRef = useRef<any>({})
const handleClick = useCallback(() => {
if (isHandDeleved) {
approvedRef.current.setVisible(true)
} else {
const deleveBox = document.querySelector('#deleveBox') as any
window.scrollTo(0, deleveBox.offsetTop)
}
}, [isHandDeleved])
return (
<div>
<OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<Button type='primary' onClick={handleClick}>
{ isHandDeleved ? intl.formatMessage({ id: 'saleOrder.querenshougongfa', defaultMessage: '确认手工发货' }) : intl.formatMessage({ id: 'saleOrder.qufahuo', defaultMessage: '去发货' }) }
</Button>
} />
<OrderDetailWrapper>
<PreLoading loading={!formContext.data} active paragraph={{rows: 6}}>
<OrderDetailSection formContext={formContext} type='saleOrder'/>
</PreLoading>
</OrderDetailWrapper>
{/* 提交时触发的弹窗集合 */}
<OrderHandDeleved
currentRef={approvedRef}
/>
</OrderDetailContext.Provider>
</div>
);
};
export default ReadyConfirmDelevedOrderDetail;
import React from 'react'
import { Card } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { useSelfTable } from './model/useSelfTable'
import { baseOrderListColumns } from '../constant'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import '../index.less'
import { getOrderBuyerValidateDeliveryPage } from '@/services/OrderNewV2Api'
// 待发货订单
export interface ReadyDelevedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await getOrderBuyerValidateDeliveryPage(params)
return data
}
const ReadyDelevedOrder:React.FC<ReadyDelevedOrderProps> = () => {
const {
columns
} = useSelfTable()
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
columns={columns}
rowKey={'orderNo'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: baseOrderListColumns(),
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
}
}}
/>
</Card>
</PageHeaderWrapper>
}
ReadyDelevedOrder.defaultProps = {}
export default ReadyDelevedOrder
import { useRef } from 'react'
import { history, useIntl } from 'umi'
import { Button } from 'antd'
import EyePreview from '@/components/EyePreview'
import { formatTimeString } from '@/utils'
import StatusColors from '@/pages/transaction/components/statusColors'
import { FieldTimeOutlined } from '@ant-design/icons'
import { ORDER_TYPE_CHANNEL_POINTS, ORDER_TYPE_POINTS } from '@/constants/order'
// 业务hooks, 待支付订单
export const useSelfTable = () => {
const ref = useRef<any>({})
const intl = useIntl()
const customOrderColumns: any[] = [
{
title: intl.formatMessage({ id: 'saleOrder.dingdanhao', defaultMessage: '订单号' }),
align: 'center',
dataIndex: 'orderNo',
key: 'orderNo',
render: (text, record) => {
// 查看订单, 需根据状态显示不同schema
return (
<EyePreview url={`/memberCenter/tranactionAbility/saleOrder/readyConfirmDelevedOrder/preview?id=${record.orderId}`}>
{text}
</EyePreview>
)
}
},
{
title: intl.formatMessage({ id: 'saleOrder.dingdanzhaiyao', defaultMessage: '订单摘要/下单时间' }),
align: 'center',
dataIndex: 'digest',
key: 'digest',
render: (text, record) => <>
<div>{text}</div>
<div><FieldTimeOutlined />{formatTimeString(record.createTime)}</div>
</>,
width: 200
},
{
title: intl.formatMessage({ id: 'saleOrder.caigouhuiyuan', defaultMessage: '采购会员' }),
align: 'left',
dataIndex: 'memberName',
key: 'memberName',
},
{
title: intl.formatMessage({ id: 'saleOrder.zongjine', defaultMessage: '总金额' }),
align: 'center',
dataIndex: 'amount',
key: 'amount',
render: (t, r) => (r.orderType === ORDER_TYPE_POINTS || r.orderType === ORDER_TYPE_CHANNEL_POINTS) ? t : `¥${t}`
},
{
title: intl.formatMessage({ id: 'saleOrder.dingdanleixing', defaultMessage: '订单类型' }),
align: 'center',
dataIndex: 'orderTypeName',
key: 'orderTypeName',
},
{
title: intl.formatMessage({ id: 'saleOrder.waibuzhuangtai', defaultMessage: '外部状态' }),
align: 'center',
dataIndex: 'outerStatus',
key: 'outerStatus',
render: (text, record) => <StatusColors status={text} type='out' text={record['outerStatusName']} />,
},
{
title: intl.formatMessage({ id: 'saleOrder.neibuzhuangtai', defaultMessage: '内部状态' }),
align: 'center',
dataIndex: 'innerStatus',
key: 'innerStatus',
render: (text, record) => <StatusColors status={text} type='saleInside' text={record['innerStatusName']} />,
},
{
title: intl.formatMessage({ id: 'saleOrder.caozuo', defaultMessage: '操作' }),
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <>
{
record.showInvite &&
<Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.haoyoupintuan', defaultMessage: '邀请好友拼团' })}</Button>
}
{
record.showAfterSales &&
<Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.shouhou', defaultMessage: '售后' })}</Button>
}
</>
}
]
const handleConfirm = async (record) => {
// history.push(`/memberCenter/tranactionAbility/saleOrder/readyConfirmDelevedOrder/detail?id=${record.orderId}&batchNo=${record.batchNo}`)
}
return {
columns: customOrderColumns
}
}
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getSaleOrderAuditPageSelectOption } from '@/pages/transaction/effect';
import { useIntl } from 'umi';
export const tableListSchema: any = () => {
const intl = useIntl()
const res = getSaleOrderAuditPageSelectOption()
if(res) {
const {
orderTypes: OrderType,
} = res
return {
type: 'object',
properties: {
orderNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'saleOrder.qingshurudingdanOrderNo', defaultMessage: '请输入订单编号' }),
align: 'flex-start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginRight: 20
}
},
properties: {
digest: {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({ id: 'saleOrder.qingshurudingdanDigest', defaultMessage: '请输入订单摘要' }),
}
},
"memberName": {
type: 'string',
"x-component-props": {
placeholder: intl.formatMessage({ id: 'saleOrder.qingshurucaigouMemberName', defaultMessage: '请输入采购会员名称' })
}
},
"orderType": {
type: 'string',
"x-component-props": {
placeholder: intl.formatMessage({ id: 'saleOrder.qingxuanzedingdanOrderType', defaultMessage: '请选择订单类型' })
},
enum: OrderType.map(item => ({
label: item['text'],
value: item['id'],
}))
},
"[startDate,endDate]": {
type: 'daterange',
// "x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: [intl.formatMessage({ id: 'saleOrder.kaishishijian', defaultMessage: '开始时间' }),intl.formatMessage({ id: 'saleOrder.jieshushijian', defaultMessage: '结束时间' })],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: intl.formatMessage({ id: 'saleOrder.chaxun', defaultMessage: '查询' }),
},
},
},
},
}
}
}
}
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