Commit 71386912 authored by XieZhiXiong's avatar XieZhiXiong

chore: 处理使用到相同 columns 的Table布局

parent 76a7c072
......@@ -88,6 +88,9 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = () => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -4,6 +4,7 @@ import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import AuthButton from '@/components/AuthButton'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -18,7 +19,9 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <AuthButton btnCode="firstApprovedOrder.tijiao"><Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button></AuthButton>
render: (text, record) => <AuthButton btnCode="firstApprovedOrder.tijiao"><Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button></AuthButton>,
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
......
......@@ -134,6 +134,9 @@ const ReadyAddB2bOrder:React.FC<ReadyAddB2bOrderProps> = () => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
......
......@@ -4,6 +4,7 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import { postOrderBuyerCreateDelete, postOrderBuyerCreateSubmit } from '@/services/OrderNewV2Api'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
// 业务hooks, 待新增询价报价订单
export const useSelfTable = () => {
......@@ -63,7 +64,9 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text: any, record: any) => renderOptionButton(record)
render: (text: any, record: any) => renderOptionButton(record),
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -132,6 +132,9 @@ const ReadyAddCashOrder:React.FC<ReadyAddCashOrderProps> = () => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
......
......@@ -4,6 +4,7 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import { postOrderBuyerCreateDelete, postOrderBuyerCreateSubmit } from '@/services/OrderNewV2Api'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
// 业务hooks, 待新增订单
export const useSelfTable = () => {
......@@ -63,7 +64,9 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text: any, record: any) => renderOptionButton(record)
render: (text: any, record: any) => renderOptionButton(record),
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -153,6 +153,9 @@ const ReadyAddOrder:React.FC<ReadyAddOrderProps> = (props) => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
......
......@@ -4,6 +4,7 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import { postOrderBuyerCreateDelete, postOrderBuyerCreateSubmit } from '@/services/OrderNewV2Api'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
// 业务hooks, 待新增订单
export const useSelfTable = () => {
......@@ -58,7 +59,9 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text: any, record: any) => renderOptionButton(record)
render: (text: any, record: any) => renderOptionButton(record),
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -136,6 +136,9 @@ const ReadyAddRequisitionOrder:React.FC<ReadyAddRequisitionOrderProps> = () => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
......
......@@ -4,6 +4,7 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import { postOrderBuyerCreateDelete, postOrderBuyerCreateSubmit } from '@/services/OrderNewV2Api'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
// 业务hooks, 待新增订单
export const useSelfTable = () => {
......@@ -62,7 +63,9 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => renderOptionButton(record)
render: (text, record) => renderOptionButton(record),
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -138,6 +138,9 @@ const ReadyAddSrmOrder:React.FC<ReadyAddSrmOrderProps> = () => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
......
......@@ -4,6 +4,7 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { history, useIntl } from 'umi'
import TableOperation from '@/components/TableOperation'
import { postOrderBuyerCreateDelete, postOrderBuyerCreateSubmit } from '@/services/OrderNewV2Api'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
// 业务hooks, 待新增订单
export const useSelfTable = () => {
......@@ -62,7 +63,9 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text: any, record: any) => renderOptionButton(record)
render: (text: any, record: any) => renderOptionButton(record),
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -52,6 +52,9 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
}
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -3,6 +3,7 @@ import { history, useIntl } from 'umi'
import { Button, Modal } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { getContractSignatureAuthAuthState } from '@/services/ContractV2Api'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
// 业务hooks, 待新增订单
export const useSelfTable = () => {
......@@ -40,7 +41,9 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => <>
<Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'purchaseOrder.querendianzihetong', defaultMessage: '确认电子合同' })}</Button>
</>
</>,
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
......
......@@ -90,6 +90,9 @@ const ReadyDistributionOrder:React.FC<ReadyDistributionOrderProps> = (props) =>
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -5,6 +5,7 @@ import { useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { postOrderBuyerTake } from '@/services/OrderNewV2Api'
import AuthButton from '@/components/AuthButton'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -46,7 +47,9 @@ export const useSelfTable = () => {
key: 'ctl',
render: (text, record) => <AuthButton btnCode="readyDistributionOrder.lingqu">
<Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'purchaseOrder.lingqu', defaultMessage: '领取' })}</Button>
</AuthButton>
</AuthButton>,
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -89,6 +89,9 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -4,6 +4,7 @@ import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants/order'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
// 业务hooks
export const useSelfTable = () => {
......@@ -27,7 +28,9 @@ export const useSelfTable = () => {
record.interiorState === PurchaseOrderInsideWorkState.FILLING_ORDER && */}
<Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'purchaseOrder.guidang', defaultMessage: '归档' })}</Button>
{/* } */}
</>
</>,
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
......
......@@ -89,6 +89,9 @@ const ReadySubmitOrder:React.FC<ReadySubmitOrderProps> = (props) => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -4,6 +4,7 @@ import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import AuthButton from '@/components/AuthButton'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -20,7 +21,9 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <AuthButton btnCode="readySubmitOrder.tijiao"><Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaodingdan', defaultMessage: '提交订单' })}</Button></AuthButton>
render: (text, record) => <AuthButton btnCode="readySubmitOrder.tijiao"><Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaodingdan', defaultMessage: '提交订单' })}</Button></AuthButton>,
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
......
......@@ -89,6 +89,9 @@ const SecondApprovedOrder:React.FC<SecondApprovedOrderProps> = (props) => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -3,6 +3,7 @@ import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import AuthButton from '@/components/AuthButton'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -21,7 +22,9 @@ export const useSelfTable = () => {
<AuthButton btnCode="secondApprovedOrder.tijiao">
<Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'purchaseOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
</AuthButton>
</>
</>,
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
......
......@@ -88,6 +88,9 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = () => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -4,6 +4,7 @@ import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import AuthButton from '@/components/AuthButton'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -31,7 +32,9 @@ export const useSelfTable = () => {
<Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
</AuthButton>
</>
}
},
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -51,6 +51,9 @@ const ReadyApprovedOrder:React.FC<ReadyApprovedOrderProps> = () => {
}
},
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -3,6 +3,7 @@ import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import AuthButton from '@/components/AuthButton'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -27,7 +28,9 @@ export const useSelfTable = () => {
<Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
</AuthButton>
</>
}
},
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -52,6 +52,9 @@ const ReadyConfirmOrder:React.FC<ReadyConfirmOrderProps> = () => {
}
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -2,6 +2,7 @@ import { history, useIntl } from 'umi'
import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import AuthButton from '@/components/AuthButton'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
export const useSelfTable = () => {
const intl = useIntl()
......@@ -25,7 +26,9 @@ export const useSelfTable = () => {
<Button type='link' onClick={() => handleConfirm(record)}>{intl.formatMessage({ id: 'saleOrder.querendingdan', defaultMessage: '确认订单' })}</Button>
</AuthButton>
</>
}
},
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -90,6 +90,9 @@ const ReadyDistributionOrder:React.FC<ReadyDistributionOrderProps> = () => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -5,6 +5,7 @@ import { useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { postOrderVendorTake } from '@/services/OrderNewV2Api'
import AuthButton from '@/components/AuthButton'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
export const useSelfTable = () => {
const ref = useRef<any>({})
......@@ -45,7 +46,9 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <AuthButton btnCode="s.readyDistributionOrder.lingqu"><Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'purchaseOrder.lingqu', defaultMessage: '领取' })}</Button></AuthButton>
render: (text, record) => <AuthButton btnCode="s.readyDistributionOrder.lingqu"><Button type='link' onClick={() => handleSubmit(record.orderId)}>{intl.formatMessage({ id: 'purchaseOrder.lingqu', defaultMessage: '领取' })}</Button></AuthButton>,
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
......@@ -90,6 +90,9 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -3,6 +3,7 @@ import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
// 业务hooks
export const useSelfTable = () => {
......@@ -20,6 +21,8 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
render: (text, record) =>
// <>
// {
......
......@@ -89,6 +89,9 @@ const SecondApprovedOrder:React.FC<SecondApprovedOrderProps> = (props) => {
span: 8
}
}}
tableProps={{
scroll: { x: 1200 },
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -3,6 +3,7 @@ import { Button } from 'antd'
import { baseOrderListColumns } from '../../constant'
import { history, useIntl } from 'umi'
import AuthButton from '@/components/AuthButton'
import { COLUMNS_ACTION_WIDTH } from '@/constants/table'
// 业务hooks, 待新增订单
export const useSelfTable = () => {
......@@ -29,7 +30,9 @@ export const useSelfTable = () => {
<Button type='link' onClick={() => handleSubmit(record)}>{intl.formatMessage({ id: 'saleOrder.tijiaoshenhe', defaultMessage: '提交审核' })}</Button>
</AuthButton>
</>
}
},
fixed: 'right',
width: COLUMNS_ACTION_WIDTH,
}
])
}
......
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