Commit 526c3c57 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

fix: 修改营销活动执行明细列表单号显示

parent 728672c8
...@@ -54,11 +54,13 @@ interface Iprops { ...@@ -54,11 +54,13 @@ interface Iprops {
/** customKey */ /** customKey */
customKey?: string, customKey?: string,
/** 宽度 */ /** 宽度 */
width?: number width?: number,
/** 是否可选 */
ctl?: boolean
} }
const TableModal: React.FC<Iprops> = (props: Iprops) => { const TableModal: React.FC<Iprops> = (props: Iprops) => {
const { title, visible, schema, columns, effects, tableProps, mode, expressionScope, fetchData, onClose, onOk, value, format, customizeRadio, modalType, footer, customKey, width } = props; const { title, visible, schema, columns, effects, tableProps, mode, expressionScope, fetchData, onClose, onOk, value, format, customizeRadio, modalType, footer, customKey, width, ctl } = props;
const ref = useRef<any>({}); const ref = useRef<any>({});
const [rowSelection, RowCtl] = useRowSelectionTable({ type: customizeRadio && mode === 'radio' ? 'checkbox' : mode, customKey: customKey }); const [rowSelection, RowCtl] = useRowSelectionTable({ type: customizeRadio && mode === 'radio' ? 'checkbox' : mode, customKey: customKey });
const isFirstLoad = useRef<boolean>(true); const isFirstLoad = useRef<boolean>(true);
...@@ -113,7 +115,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => { ...@@ -113,7 +115,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
) )
} }
const otherProps = modalType === 'Drawer' ? { footer: renderFooter() } : { onOk: handleOk } const otherProps = (modalType === 'Drawer' && ctl) && { footer: renderFooter() }
return ( return (
...@@ -136,7 +138,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => { ...@@ -136,7 +138,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
tableType="small" tableType="small"
fetchTableData={fetchData} fetchTableData={fetchData}
currentRef={ref} currentRef={ref}
rowSelection={{ rowSelection={ctl && {
...rowSelection, ...rowSelection,
hideSelectAll: customizeRadio, hideSelectAll: customizeRadio,
}} }}
...@@ -172,7 +174,8 @@ TableModal.defaultProps = { ...@@ -172,7 +174,8 @@ TableModal.defaultProps = {
customizeRadio: false, customizeRadio: false,
modalType: "Modal", modalType: "Modal",
footer: null, footer: null,
width: 900 width: 900,
ctl: true,
} }
export default TableModal; export default TableModal;
...@@ -243,7 +243,7 @@ const DetialLayout = () => { ...@@ -243,7 +243,7 @@ const DetialLayout = () => {
dataIndex: 'orderId', dataIndex: 'orderId',
render: (_text, _r) => ( render: (_text, _r) => (
<> <>
{_r.recordType === 1 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${_r.skuId}`)}>{_r.skuId}</Button>} {_r.recordType === 1 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${_r.skuId}`)}>{_r.orderNo}</Button>}
{_r.recordType === 2 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/afterService/returnManage/returnQuery/detail?id=${_text}`)}>{_r.orderNo}</Button>} {_r.recordType === 2 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/afterService/returnManage/returnQuery/detail?id=${_text}`)}>{_r.orderNo}</Button>}
</> </>
) )
...@@ -407,6 +407,7 @@ const DetialLayout = () => { ...@@ -407,6 +407,7 @@ const DetialLayout = () => {
tableProps={{ tableProps={{
rowKey: 'orderId', rowKey: 'orderId',
}} }}
ctl={false}
effects={($, actions) => { effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, "orderNo", FORM_FILTER_PATH) useStateFilterSearchLinkageEffect($, actions, "orderNo", FORM_FILTER_PATH)
useStateEffects() useStateEffects()
......
...@@ -241,7 +241,7 @@ const DetialLayout = () => { ...@@ -241,7 +241,7 @@ const DetialLayout = () => {
dataIndex: 'orderId', dataIndex: 'orderId',
render: (_text, _r) => ( render: (_text, _r) => (
<> <>
{_r.recordType === 1 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${_r.skuId}`)}>{_r.skuId}</Button>} {_r.recordType === 1 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${_r.skuId}`)}>{_r.orderNo}</Button>}
{_r.recordType === 2 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/afterService/returnManage/returnQuery/detail?id=${_text}`)}>{_r.orderNo}</Button>} {_r.recordType === 2 && <Button type='link' target='_blank' onClick={() => history.push(`/memberCenter/afterService/returnManage/returnQuery/detail?id=${_text}`)}>{_r.orderNo}</Button>}
</> </>
) )
...@@ -405,6 +405,7 @@ const DetialLayout = () => { ...@@ -405,6 +405,7 @@ const DetialLayout = () => {
tableProps={{ tableProps={{
rowKey: 'orderId', rowKey: 'orderId',
}} }}
ctl={false}
effects={($, actions) => { effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, "orderNo", FORM_FILTER_PATH) useStateFilterSearchLinkageEffect($, actions, "orderNo", FORM_FILTER_PATH)
useStateEffects() useStateEffects()
......
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