Commit c45aab7d authored by XieZhiXiong's avatar XieZhiXiong
parents 3637c1be 0d5fced6
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"antd-img-crop": "^3.12.0", "antd-img-crop": "^3.12.0",
"bizcharts": "^4.0.14", "bizcharts": "^4.0.14",
"copy-to-clipboard": "^3.3.1", "copy-to-clipboard": "^3.3.1",
"god": "0.1.28", "god": "0.1.29",
"lingxi-design": "^1.0.8", "lingxi-design": "^1.0.8",
"lingxi-design-ui": "^1.1.10", "lingxi-design-ui": "^1.1.10",
"lingxi-editor-core": "^1.0.6", "lingxi-editor-core": "^1.0.6",
......
...@@ -155,6 +155,10 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => { ...@@ -155,6 +155,10 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
const pathname = history.location.pathname const pathname = history.location.pathname
const isPreview = pathname.lastIndexOf('/preview') !== -1 const isPreview = pathname.lastIndexOf('/preview') !== -1
// 是否是确认收货页
const isReceived = pathname.indexOf('readyReceiveOrder') !== -1
// 是否是确认回单页
const isReturn = pathname.indexOf('readyConfirmReturnOrder') !== -1
// 用于储存已经修改过的订单id // 用于储存已经修改过的订单id
const dataRef = useRef<any>([]) const dataRef = useRef<any>([])
...@@ -219,8 +223,8 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => { ...@@ -219,8 +223,8 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
key: 'ctl', key: 'ctl',
render: (text, record) => <> render: (text, record) => <>
{/* todo 需根据内部状态判断显示哪个按钮 */} {/* todo 需根据内部状态判断显示哪个按钮 */}
{ !isPreview && !dataRef.current.includes(record.id) && record.interiorState === DeliverySideState.CONFIRM_RECEIPT_ORDER && <Button type='link' onClick={() => handleReturn(record)}>确认回单</Button> } { !isPreview && isReturn && !dataRef.current.includes(record.id) && record.interiorState === DeliverySideState.CONFIRM_RECEIPT_ORDER && <Button type='link' onClick={() => handleReturn(record)}>确认回单</Button> }
{ !isPreview && !dataRef.current.includes(record.id) && record.interiorState === DeliverySideState.WAREHOUSE_ORDER && <Button type='link' onClick={() => handleConfirm(record)}>确认收货</Button> } { !isPreview && isReceived && !dataRef.current.includes(record.id) && record.interiorState === DeliverySideState.WAREHOUSE_ORDER && <Button type='link' onClick={() => handleConfirm(record)}>确认收货</Button> }
</> </>
}, },
] ]
......
...@@ -154,11 +154,15 @@ const sideChildrenCols: any[] = [ ...@@ -154,11 +154,15 @@ const sideChildrenCols: any[] = [
const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => { const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
const pathname = history.location.pathname const pathname = history.location.pathname
const isPreview = pathname.lastIndexOf('/preview') !== -1 const isPreview = pathname.lastIndexOf('/preview') !== -1
// 是否是确认发货页
const isDeleved = pathname.indexOf('readyConfirmDelevedOrder') !== -1
// 是否是确认回单页
const isReturn = pathname.indexOf('readyConfirmReturnOrder') !== -1
// 用于储存已经修改过的订单id // 用于储存已经修改过的订单id
const dataRef = useRef<any>([]) const dataRef = useRef<any>([])
const { data, reloadFormData } = useContext(OrderDetailContext) const { data, reloadFormData } = useContext(OrderDetailContext)
const { orderReceivingStatisticsResponses, orderDeliveryDetailsResponses } = data const { orderReceivingStatisticsResponses, orderDeliveryDetailsResponses } = data
console.log(dataRef, isPreview)
const sideOrderCols: any[] = [ const sideOrderCols: any[] = [
{ {
title: '发货批次', title: '发货批次',
...@@ -217,8 +221,8 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => { ...@@ -217,8 +221,8 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
align: 'center', align: 'center',
key: 'ctl', key: 'ctl',
render: (text, record) => <> render: (text, record) => <>
{ !isPreview && !dataRef.current.includes(record.id) && record.interiorState === DeliverySideState.CONFIRM_RECEIPT_ORDER && <Button type='link' onClick={() => handleReturn(record)}>确认回单</Button> } { !isPreview && isReturn && !dataRef.current.includes(record.id) && record.interiorState === DeliverySideState.CONFIRM_RECEIPT_ORDER && <Button type='link' onClick={() => handleReturn(record)}>确认回单</Button> }
{ !isPreview && !dataRef.current.includes(record.id) && record.interiorState === DeliverySideState.ADD_LOGISTICS_ORDER && <Button type='link' onClick={() => handleConfirm(record)}>确认发货</Button> } { !isPreview && isDeleved && !dataRef.current.includes(record.id) && record.interiorState === DeliverySideState.ADD_LOGISTICS_ORDER && <Button type='link' onClick={() => handleConfirm(record)}>确认发货</Button> }
</> </>
}, },
] ]
......
...@@ -51,7 +51,6 @@ const CircleChart = props => { ...@@ -51,7 +51,6 @@ const CircleChart = props => {
// 业务hooks, 待支付订单 // 业务hooks, 待支付订单
export const useSelfTable = () => { export const useSelfTable = () => {
const ref = useRef<any>({}) const ref = useRef<any>({})
const showOutPayState = PurchaseOrderOutWorkState.PAY_ORDER || PurchaseOrderOutWorkState.CONFIRM_NOT_ARRIVED_ACCOUNT
const payOrderColumns: any[] = [ const payOrderColumns: any[] = [
{ {
title: '订单号', title: '订单号',
...@@ -127,7 +126,8 @@ export const useSelfTable = () => { ...@@ -127,7 +126,8 @@ export const useSelfTable = () => {
<Col>{record.currentPayments} / {record.sum}</Col> <Col>{record.currentPayments} / {record.sum}</Col>
<Col> <Col>
{ {
record.currentPayments !== record.sum && showOutPayState && record.currentPayments !== record.sum &&
(record.externalState === PurchaseOrderOutWorkState.PAY_ORDER || record.externalState === PurchaseOrderOutWorkState.CONFIRM_NOT_ARRIVED_ACCOUNT) &&
<Link to={`/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=${record.id}`}>去支付</Link> <Link to={`/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=${record.id}`}>去支付</Link>
} }
</Col> </Col>
......
...@@ -10,7 +10,7 @@ import ApprovedOrderModal from '../../../components/approvedOrderModal'; ...@@ -10,7 +10,7 @@ import ApprovedOrderModal from '../../../components/approvedOrderModal';
import { history } from 'umi' import { history } from 'umi'
import { useHttpRequest } from '@/hooks/useHttpRequest'; import { useHttpRequest } from '@/hooks/useHttpRequest';
import OrderDetailSection from '../../../components/orderDetailSection'; import OrderDetailSection from '../../../components/orderDetailSection';
import { PurchaseOrderInsideWorkState } from '@/constants'; import { PurchaseOrderInsideWorkState, DeliverySideState } from '@/constants';
import OrderHandReceivedModal from '@/pages/transaction/components/orderHandReceivedModal'; import OrderHandReceivedModal from '@/pages/transaction/components/orderHandReceivedModal';
const ReadyReceiveOrderDetail: React.FC = () => { const ReadyReceiveOrderDetail: React.FC = () => {
...@@ -20,6 +20,8 @@ const ReadyReceiveOrderDetail: React.FC = () => { ...@@ -20,6 +20,8 @@ const ReadyReceiveOrderDetail: React.FC = () => {
// 是否是手工收货 // 是否是手工收货
const isHeadReceipt = formContext.data && formContext.data.interiorState === PurchaseOrderInsideWorkState.HAND_RECEIPT_ORDER const isHeadReceipt = formContext.data && formContext.data.interiorState === PurchaseOrderInsideWorkState.HAND_RECEIPT_ORDER
// 所有收货订单都是否已经收货了
const isShowBtn = isHeadReceipt || formContext.data?.orderDeliveryDetailsResponses?.some(v => v.interiorState === DeliverySideState.WAREHOUSE_ORDER)
const handleClick = useCallback(() => { const handleClick = useCallback(() => {
if (isHeadReceipt) { if (isHeadReceipt) {
// 手工收货 // 手工收货
...@@ -36,7 +38,7 @@ const ReadyReceiveOrderDetail: React.FC = () => { ...@@ -36,7 +38,7 @@ const ReadyReceiveOrderDetail: React.FC = () => {
<div> <div>
<OrderDetailContext.Provider value={formContext}> <OrderDetailContext.Provider value={formContext}>
<OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={ <OrderDetailHeader detailList={detailList} detailData={formContext.data} extraRight={
<Button type='primary' onClick={handleClick}> isShowBtn && <Button type='primary' onClick={handleClick}>
{isHeadReceipt ? '手工收货' : '去确认收货'} {isHeadReceipt ? '手工收货' : '去确认收货'}
</Button> </Button>
} /> } />
......
...@@ -14,6 +14,7 @@ import Submit from '@/components/NiceForm/components/Submit' ...@@ -14,6 +14,7 @@ import Submit from '@/components/NiceForm/components/Submit'
import { DatePicker } from '@formily/antd-components' import { DatePicker } from '@formily/antd-components'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable' import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState, SaleOrderInsideWorkState } from '@/constants' import { PurchaseOrderInsideWorkState, SaleOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 一级待审核订单 // 一级待审核订单
...@@ -33,19 +34,20 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => { ...@@ -33,19 +34,20 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
rowSelectionCtl rowSelectionCtl
} = useSelfTable() } = useSelfTable()
// const handleSubmitBatch = async () => { const { run, loading } = useHttpRequest(PublicApi.postOrderSubmittedReviewOrderOneAll)
// if (rowSelectionCtl.selectRow.length === 0) {
// message.error('请先勾选订单') const handleBitchPush = async () => {
// return ; if (rowSelectionCtl.selectedRowKeys.length > 0) {
// } const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
// const canBitch = !rowSelectionCtl.selectRow.some(v => v.purchaseOrderInteriorState !== SaleOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER) if (code === 1000) {
// if (canBitch) { rowSelectionCtl.setSelectRow([])
// await PublicApi.postOrderSubmittedReviewOrderOneAll({ids: rowSelectionCtl.selectedRowKeys}) rowSelectionCtl.setSelectedRowKeys([])
// ref.current.reload() ref.current.reload()
// } else { }
// message.error('只能批量提交内部状态为审核中的订单') } else {
// } message.error('请勾选要审核的订单')
// } }
}
return <PageHeaderWrapper> return <PageHeaderWrapper>
<Card> <Card>
<StandardTable <StandardTable
...@@ -74,19 +76,19 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => { ...@@ -74,19 +76,19 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
Submit Submit
} }
}, },
// layouts: { layouts: {
// order: 2, order: 2,
// span: 16 span: 16
// } }
}}
formilyChilds={{
children: <Space>
<Button onClick={handleBitchPush} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}} }}
// formilyChilds={{
// children: <Space>
// <Button onClick={handleSubmitBatch}>批量提交审核</Button>
// </Space>,
// layouts: {
// span: 8
// }
// }}
/> />
</Card> </Card>
</PageHeaderWrapper> </PageHeaderWrapper>
......
...@@ -12,7 +12,7 @@ export const tableListSchema: ISchema = { ...@@ -12,7 +12,7 @@ export const tableListSchema: ISchema = {
"x-component": 'SearchFilter', "x-component": 'SearchFilter',
'x-component-props': { 'x-component-props': {
placeholder: '请输入订单编号', placeholder: '请输入订单编号',
align: 'flex-start', align: 'flex-end',
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -21,7 +21,7 @@ export const tableListSchema: ISchema = { ...@@ -21,7 +21,7 @@ export const tableListSchema: ISchema = {
'x-component-props': { 'x-component-props': {
inline: true, inline: true,
colStyle: { colStyle: {
marginRight: 20 marginLeft: 20
} }
}, },
properties: { properties: {
......
...@@ -39,14 +39,6 @@ const ReadyApprovedOrder:React.FC<ReadyApprovedOrderProps> = (props) => { ...@@ -39,14 +39,6 @@ const ReadyApprovedOrder:React.FC<ReadyApprovedOrderProps> = (props) => {
} else { } else {
message.error('请勾选要审核的订单') message.error('请勾选要审核的订单')
} }
// const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER)
// if (canBitch) {
// await PublicApi.postOrderSubmittedReviewOrderOneAll({ids: rowSelectionCtl.selectedRowKeys})
// ref.current.reload()
// } else {
// message.error('只能删除内部状态为未审核过的订单')
// }
} }
return <PageHeaderWrapper> return <PageHeaderWrapper>
...@@ -76,19 +68,19 @@ const ReadyApprovedOrder:React.FC<ReadyApprovedOrderProps> = (props) => { ...@@ -76,19 +68,19 @@ const ReadyApprovedOrder:React.FC<ReadyApprovedOrderProps> = (props) => {
Submit Submit
} }
}, },
layouts: { // layouts: {
order: 2, // order: 2,
span: 16 // span: 16
} // }
}}
formilyChilds={{
children: <Space>
<Button onClick={handleBitchPush} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}} }}
// formilyChilds={{
// children: <Space>
// <Button onClick={handleBitchPush} loading={loading}>批量提交审核</Button>
// </Space>,
// layouts: {
// span: 8
// }
// }}
/> />
</Card> </Card>
</PageHeaderWrapper> </PageHeaderWrapper>
......
...@@ -16,7 +16,7 @@ export const tableListSchema: ISchema = { ...@@ -16,7 +16,7 @@ export const tableListSchema: ISchema = {
"x-component": 'SearchFilter', "x-component": 'SearchFilter',
'x-component-props': { 'x-component-props': {
placeholder: '请输入订单编号', placeholder: '请输入订单编号',
align: 'flex-end', align: 'flex-start',
}, },
}, },
[FORM_FILTER_PATH]: { [FORM_FILTER_PATH]: {
...@@ -25,7 +25,7 @@ export const tableListSchema: ISchema = { ...@@ -25,7 +25,7 @@ export const tableListSchema: ISchema = {
'x-component-props': { 'x-component-props': {
inline: true, inline: true,
colStyle: { colStyle: {
marginLeft: 20 marginRight: 20
} }
}, },
properties: { properties: {
......
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