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

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

parent 728672c8
......@@ -54,11 +54,13 @@ interface Iprops {
/** customKey */
customKey?: string,
/** 宽度 */
width?: number
width?: number,
/** 是否可选 */
ctl?: boolean
}
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 [rowSelection, RowCtl] = useRowSelectionTable({ type: customizeRadio && mode === 'radio' ? 'checkbox' : mode, customKey: customKey });
const isFirstLoad = useRef<boolean>(true);
......@@ -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 (
......@@ -136,7 +138,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
tableType="small"
fetchTableData={fetchData}
currentRef={ref}
rowSelection={{
rowSelection={ctl && {
...rowSelection,
hideSelectAll: customizeRadio,
}}
......@@ -172,7 +174,8 @@ TableModal.defaultProps = {
customizeRadio: false,
modalType: "Modal",
footer: null,
width: 900
width: 900,
ctl: true,
}
export default TableModal;
......@@ -243,7 +243,7 @@ const DetialLayout = () => {
dataIndex: 'orderId',
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>}
</>
)
......@@ -407,6 +407,7 @@ const DetialLayout = () => {
tableProps={{
rowKey: 'orderId',
}}
ctl={false}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, "orderNo", FORM_FILTER_PATH)
useStateEffects()
......
......@@ -241,7 +241,7 @@ const DetialLayout = () => {
dataIndex: 'orderId',
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>}
</>
)
......@@ -405,6 +405,7 @@ const DetialLayout = () => {
tableProps={{
rowKey: 'orderId',
}}
ctl={false}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, "orderNo", FORM_FILTER_PATH)
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