Commit 4b4ff9be authored by 田翔's avatar 田翔

fix: 增加自定义模板

parent 9b753402
...@@ -73,6 +73,7 @@ const BookConfigNew = props => { ...@@ -73,6 +73,7 @@ const BookConfigNew = props => {
const [viewModalLoading, setViewModalLoading] = useState(false); // 表单预览弹窗 const [viewModalLoading, setViewModalLoading] = useState(false); // 表单预览弹窗
const [parentData, setParentData] = useState([]); // 父级台账下拉框数据 const [parentData, setParentData] = useState([]); // 父级台账下拉框数据
const [currentId, setCurrentId] = useState(''); // 新增成功后保存的ID const [currentId, setCurrentId] = useState(''); // 新增成功后保存的ID
const [EnableImportExport, setEnableImportExport] = useState(false) //是否导入导出
const [form] = Form.useForm(); const [form] = Form.useForm();
const tableRef = useRef(null); const tableRef = useRef(null);
const accountRef = useRef(null); const accountRef = useRef(null);
...@@ -249,12 +250,14 @@ const BookConfigNew = props => { ...@@ -249,12 +250,14 @@ const BookConfigNew = props => {
Ledger_QueryLedger({ ledgerId: formObj.ID }).then(res => { Ledger_QueryLedger({ ledgerId: formObj.ID }).then(res => {
if (res.code === 0) { if (res.code === 0) {
form.setFieldsValue({ ...res.data }); form.setFieldsValue({ ...res.data });
setEnableImportExport(res.data.EnableImportExport)
setOrder(res.data.Order); setOrder(res.data.Order);
let editArr = res.data.LedgerFieids; let editArr = res.data.LedgerFieids;
changTable(res.data.TableName, editArr); changTable(res.data.TableName, editArr);
} }
}); });
} else { } else {
setEnableImportExport(true)
form.setFieldsValue({ form.setFieldsValue({
EnableTimeFilter: true, EnableTimeFilter: true,
EnableQuickSearch: true, EnableQuickSearch: true,
...@@ -611,6 +614,9 @@ const BookConfigNew = props => { ...@@ -611,6 +614,9 @@ const BookConfigNew = props => {
})[0].text; })[0].text;
form.setFieldsValue({ AccountType }); form.setFieldsValue({ AccountType });
} }
if ('EnableImportExport' in changedValues) {
setEnableImportExport(changedValues['EnableImportExport'])
}
}; };
return ( return (
...@@ -765,47 +771,56 @@ const BookConfigNew = props => { ...@@ -765,47 +771,56 @@ const BookConfigNew = props => {
<Input placeholder="服务项目dll库" allowClear /> <Input placeholder="服务项目dll库" allowClear />
</Item> </Item>
</Col> </Col>
<Col span={4}> <Col span={6}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
valuePropName="checked" label="分页默认数量"
label="时间筛选" name="PageSize"
name="EnableTimeFilter"
> >
<Switch checkedChildren="是" unCheckedChildren="否" /> <Select style={{ width: 200 }} options={pagingOptions} />
</Form.Item> </Form.Item>
</Col> </Col>
{/* <Col span={4}> <Col span={3}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
labelCol={15}
valuePropName="checked" valuePropName="checked"
label="快速检索" label="导入导出"
name="EnableQuickSearch" name="EnableImportExport"
> >
<Switch checkedChildren="是" unCheckedChildren="否" /> <Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item> </Form.Item>
</Col> */} </Col>
<Col span={4}> <Col span={6}>
<Form.Item
{...switchLayout}
label="导出模板名称"
name="ExportTemplateName"
>
<Input disabled={!EnableImportExport} placeholder='请输入导出模板名称' />
</Form.Item>
</Col>
<Col span={3}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
valuePropName="checked" valuePropName="checked"
label="站点过滤" label="时间筛选"
name="EnableSiteFilter" name="EnableTimeFilter"
> >
<Switch checkedChildren="是" unCheckedChildren="否" /> <Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={4}> <Col span={3}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
valuePropName="checked" valuePropName="checked"
label="导入导出" label="站点过滤"
name="EnableImportExport" name="EnableSiteFilter"
> >
<Switch checkedChildren="是" unCheckedChildren="否" /> <Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={4}> <Col span={3}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
valuePropName="checked" valuePropName="checked"
...@@ -815,7 +830,7 @@ const BookConfigNew = props => { ...@@ -815,7 +830,7 @@ const BookConfigNew = props => {
<Switch checkedChildren="是" unCheckedChildren="否" /> <Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={4}> {/* <Col span={4}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
valuePropName="checked" valuePropName="checked"
...@@ -824,16 +839,7 @@ const BookConfigNew = props => { ...@@ -824,16 +839,7 @@ const BookConfigNew = props => {
> >
<Switch checkedChildren="是" unCheckedChildren="否" /> <Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item> </Form.Item>
</Col> </Col> */}
<Col span={4}>
<Form.Item
{...switchLayout}
label="分页默认数量"
name="PageSize"
>
<Select options={pagingOptions} />
</Form.Item>
</Col>
</Row> </Row>
</Form> </Form>
<ChangeAdd <ChangeAdd
......
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