Commit d05626f6 authored by 涂伟's avatar 涂伟
parents 94bbcf6d d0d77258
Pipeline #85428 waiting for manual action with stages
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
"js-calendar-converter": "0.0.4", "js-calendar-converter": "0.0.4",
"lodash": "4.17.11", "lodash": "4.17.11",
"minimist": "1.2.0", "minimist": "1.2.0",
"panda-xform": "5.9.13", "panda-xform": "5.9.18",
"parseForm": "^2.3.8", "parseForm": "^2.3.8",
"prop-types": "15.7.2", "prop-types": "15.7.2",
"qrcode.react": "^3.1.0", "qrcode.react": "^3.1.0",
......
...@@ -17,6 +17,7 @@ import { ...@@ -17,6 +17,7 @@ import {
Row, Row,
Col, Col,
Switch, Switch,
Checkbox,
} from 'antd'; } from 'antd';
import { PlusOutlined, InfoCircleOutlined, EyeOutlined } from '@ant-design/icons'; import { PlusOutlined, InfoCircleOutlined, EyeOutlined } from '@ant-design/icons';
import { LoadEventFields } from '@/services/tablemanager/tablemanager'; import { LoadEventFields } from '@/services/tablemanager/tablemanager';
...@@ -74,6 +75,7 @@ const BookConfigNew = props => { ...@@ -74,6 +75,7 @@ const BookConfigNew = props => {
const [parentData, setParentData] = useState([]); // 父级台账下拉框数据 const [parentData, setParentData] = useState([]); // 父级台账下拉框数据
const [currentId, setCurrentId] = useState(''); // 新增成功后保存的ID const [currentId, setCurrentId] = useState(''); // 新增成功后保存的ID
const [EnableImportExport, setEnableImportExport] = useState(false) //是否导入导出 const [EnableImportExport, setEnableImportExport] = useState(false) //是否导入导出
const [EnableSiteFilter, setEnableSiteFilter] = 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);
...@@ -251,6 +253,7 @@ const BookConfigNew = props => { ...@@ -251,6 +253,7 @@ const BookConfigNew = props => {
if (res.code === 0) { if (res.code === 0) {
form.setFieldsValue({ ...res.data }); form.setFieldsValue({ ...res.data });
setEnableImportExport(res.data.EnableImportExport) setEnableImportExport(res.data.EnableImportExport)
setEnableSiteFilter(res.data.EnableSiteFilter)
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);
...@@ -267,6 +270,8 @@ const BookConfigNew = props => { ...@@ -267,6 +270,8 @@ const BookConfigNew = props => {
Type: (!pickItem1 || pickItem1 == '全部') ? data[0] : pickItem1, Type: (!pickItem1 || pickItem1 == '全部') ? data[0] : pickItem1,
PageSize: 20 PageSize: 20
}) })
setEnableImportExport(true)
setEnableSiteFilter(false)
} }
getParentData({ ledgerId: type === 'edit' ? formObj.ID : '0' }); getParentData({ ledgerId: type === 'edit' ? formObj.ID : '0' });
} else { } else {
...@@ -618,6 +623,12 @@ const BookConfigNew = props => { ...@@ -618,6 +623,12 @@ const BookConfigNew = props => {
if ('EnableImportExport' in changedValues) { if ('EnableImportExport' in changedValues) {
setEnableImportExport(changedValues['EnableImportExport']) setEnableImportExport(changedValues['EnableImportExport'])
} }
if ('EnableSiteFilter' in changedValues) {
setEnableSiteFilter(changedValues['EnableSiteFilter'])
if (!changedValues['EnableSiteFilter']) {
form.setFieldsValue({ EnableSiteIDFilter: false })
}
}
}; };
return ( return (
...@@ -772,15 +783,8 @@ const BookConfigNew = props => { ...@@ -772,15 +783,8 @@ const BookConfigNew = props => {
<Input placeholder="服务项目dll库" allowClear /> <Input placeholder="服务项目dll库" allowClear />
</Item> </Item>
</Col> </Col>
<Col span={5}> </Row>
<Form.Item <Row style={{ marginLeft: '40px' }}>
{...switchLayout}
label="分页默认数量"
name="PageSize"
>
<Select style={{ width: 150 }} options={pagingOptions} />
</Form.Item>
</Col>
<Col span={2}> <Col span={2}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
...@@ -792,7 +796,7 @@ const BookConfigNew = props => { ...@@ -792,7 +796,7 @@ const BookConfigNew = props => {
<Switch checkedChildren="是" unCheckedChildren="否" /> <Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={4}> <Col span={6} style={{ position: 'relative', left: '-28px' }}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
label="导出模板名称" label="导出模板名称"
...@@ -801,6 +805,15 @@ const BookConfigNew = props => { ...@@ -801,6 +805,15 @@ const BookConfigNew = props => {
<Input disabled={!EnableImportExport} placeholder='请输入导出模板名称' /> <Input disabled={!EnableImportExport} placeholder='请输入导出模板名称' />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={4}>
<Form.Item
{...switchLayout}
label="分页默认数量"
name="PageSize"
>
<Select style={{ width: 100 }} options={pagingOptions} />
</Form.Item>
</Col>
<Col span={3}> <Col span={3}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
...@@ -815,8 +828,8 @@ const BookConfigNew = props => { ...@@ -815,8 +828,8 @@ const BookConfigNew = props => {
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
valuePropName="checked" valuePropName="checked"
label="站点过滤" label="批量操作"
name="EnableSiteFilter" name="EnableBatchOperation"
> >
<Switch checkedChildren="是" unCheckedChildren="否" /> <Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item> </Form.Item>
...@@ -825,20 +838,25 @@ const BookConfigNew = props => { ...@@ -825,20 +838,25 @@ const BookConfigNew = props => {
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
valuePropName="checked" valuePropName="checked"
label="站点ID过滤" label="站点过滤"
name="EnableSiteIDFilter" name="EnableSiteFilter"
> >
<Switch checkedChildren="是" unCheckedChildren="否" /> <Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={3}> <Col span={3} style={{ display: EnableSiteFilter ? 'block' : 'none' }}>
<Form.Item <Form.Item
{...switchLayout} {...switchLayout}
valuePropName="checked" valuePropName="checked"
label="批量操作" label=""
name="EnableBatchOperation" name="EnableSiteIDFilter"
> >
<Switch checkedChildren="是" unCheckedChildren="否" /> <Checkbox
value={true}
style={{ lineHeight: '32px' }}
>
站点ID过滤
</Checkbox>
</Form.Item> </Form.Item>
</Col> </Col>
{/* <Col span={4}> {/* <Col span={4}>
...@@ -852,6 +870,16 @@ const BookConfigNew = props => { ...@@ -852,6 +870,16 @@ const BookConfigNew = props => {
</Form.Item> </Form.Item>
</Col> */} </Col> */}
</Row> </Row>
<Row>
<Col span={8}>
<Form.Item
label="SQL过滤"
name="SqlFilter"
>
<Input.TextArea placeholder='示例:部门 = "XX部门"' />
</Form.Item>
</Col>
</Row>
</Form> </Form>
<ChangeAdd <ChangeAdd
visible={isVisible} visible={isVisible}
......
.top { .top {
height: 22%; height: 32%;
overflow: auto; overflow: auto;
} }
.bottom { .bottom {
height: 78%; height: 68%;
overflow: hidden; overflow: hidden;
} }
:global { :global {
.ant-modal-body { .ant-modal-body {
.ant-form { .ant-form {
...@@ -32,7 +34,6 @@ ...@@ -32,7 +34,6 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
>div:last-child { >div:last-child {
margin-right: 40px; margin-right: 40px;
} }
......
...@@ -885,7 +885,7 @@ const TableView = forwardRef((props, ref) => { ...@@ -885,7 +885,7 @@ const TableView = forwardRef((props, ref) => {
bordered bordered
dataSource={dataSource} dataSource={dataSource}
columns={columns} columns={columns}
scroll={{ y: '540px' }} scroll={{ y: '460px' }}
pagination={false} pagination={false}
id="box" id="box"
/> />
......
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