Commit bcc65e42 authored by 前端-彭佳文's avatar 前端-彭佳文

Merge branch '418-jxc' into 'v2-220418'

418 jxc See merge request linkseeks-design/pro-platform!577
parents 60888b07 1df2d037
......@@ -22,6 +22,7 @@ export interface FormDetailHeaderProps {
* 表单描述schema
*/
schema: ISchema
styles?: any
}
......@@ -39,6 +40,7 @@ const FormDetailHeader: React.FC<FormDetailHeaderProps> = ({
extraRight,
backLink,
schema,
styles
}) => {
const ctx = useContext(FormDetailContext)
const flagRef = useRef({
......@@ -83,7 +85,7 @@ const FormDetailHeader: React.FC<FormDetailHeaderProps> = ({
}
return (
<div className={isFixed ? [style.detailHeader, style.anchorTitleFixed].join(' ') : style.detailHeader} id="detailHeader">
<div className={isFixed ? [style.detailHeader, style.anchorTitleFixed].join(' ') : style.detailHeader} id="detailHeader" style={styles}>
<Row>
{
<>
......
......@@ -28,8 +28,8 @@ import EllipsisText from '../EllipsisText';
import { useFormDetail } from '@/formSchema/effects/useFormDetail';
import FormDetailHeader from '@/components/FormDetailHeader';
import { FormDetailContext } from '@/formSchema/context';
import FormDetailWrapper from '@/components/FormDetailWrapper';
const intl = getIntl();
const addSchemaAction = createFormActions();
const { onFormInputChange$ } = FormEffectHooks;
......@@ -309,7 +309,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
: []
}
/>
<div style={{ margin: 12 }}>
<FormDetailWrapper>
<NiceForm
value={billInfo}
previewPlaceholder=" "
......@@ -340,7 +340,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
actions={addSchemaAction}
schema={addBillSchema}
/>
</div>
</FormDetailWrapper>
<ModalTable
modalTitle={intl.formatMessage({
......
......@@ -73,40 +73,41 @@ const BillTypeForm: React.FC<BillTypeFormProps> = ({ id, isEdit = false }) => {
return (
<Spin spinning={infoLoading}>
<FormDetailContext.Provider value={providerValue}>
<FormDetailHeader
title={
!id
? intl.formatMessage({
id: 'stockSellStorage.xinjiandanjuleixing',
})
: isEdit
? intl.formatMessage({
id: 'stockSellStorage.bianjidanjuleixing',
})
: intl.formatMessage({
id: 'stockSellStorage.zhakandanjuleixing',
})
}
schema={billsTypeDetailSchema}
extraRight={
isEdit || !id
? [
<Button
key="1"
type="primary"
icon={<SaveOutlined />}
loading={submitLoading}
onClick={() => formActions.submit()}
>
{intl.formatMessage({ id: 'stockSellStorage.baocun' })}
</Button>,
]
: []
}
/>
<FormDetailHeader
styles={{ marginTop: -67, paddingBottom: 12 }}
title={
!id
? intl.formatMessage({
id: 'stockSellStorage.xinjiandanjuleixing',
})
: isEdit
? intl.formatMessage({
id: 'stockSellStorage.bianjidanjuleixing',
})
: intl.formatMessage({
id: 'stockSellStorage.zhakandanjuleixing',
})
}
schema={billsTypeDetailSchema}
extraRight={
isEdit || !id
? [
<Button
key="1"
type="primary"
icon={<SaveOutlined />}
loading={submitLoading}
onClick={() => formActions.submit()}
>
{intl.formatMessage({ id: 'stockSellStorage.baocun' })}
</Button>,
]
: []
}
/>
<Card
style={{
margin: 24,
margin: '68px 12px 0 12px',
}}
>
<NiceForm
......@@ -119,7 +120,7 @@ const BillTypeForm: React.FC<BillTypeFormProps> = ({ id, isEdit = false }) => {
}
});
// 注入表单完成进度
formContext.useAttachmentChangeForContext(ctx)
formContext.useAttachmentChangeForContext(ctx);
}}
initialValues={info}
onSubmit={handleSubmit}
......
......@@ -128,6 +128,7 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({
<Spin spinning={infoLoading}>
<FormDetailContext.Provider value={providerValue}>
<FormDetailHeader
styles={{ marginTop: -67, paddingBottom: 12 }}
title={
!id
? intl.formatMessage({ id: 'stockSellStorage.xinjiancangku' })
......@@ -152,7 +153,11 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({
: []
}
/>
<Card style={{ margin: 12 }}>
<Card
style={{
margin: '68px 12px 0 12px',
}}
>
<NiceForm
previewPlaceholder="' '"
editable={isEdit || !id}
......
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