Commit 175721e5 authored by 田翔's avatar 田翔

fix: 台账选择器问题修复

parent af4a21c6
{
"name": "panda-xform",
"version": "4.4.4",
"description": "4.4.4 台账列表接口取值修改",
"version": "4.4.5",
"description": "4.4.5 台账选择器问题修复",
"keywords": [
"panda-xform"
],
......
......@@ -46,7 +46,6 @@ const RelationForm = (props) => {
const [schemaValues, setSchemaValues] = useState([])
const [loading, setLoading] = useState(false)
const baseFormRef = useRef(null)
const baseTableRef = useRef(null)
const formDataObj = useMemo(() => {
let formDataObj = {}
......
......@@ -8,17 +8,28 @@ import TablePack from '../../../../core/Account/components/TablePack'
import SearchGroup from '../../../../core/Account/components/SearchGroup'
import Drag from '../../../components/Drag'
const initConfig = {
accountFieids: [],
formJson: {},
enableBatchOperation: 0, //批量操作
enableImportExport: 0, //导入导出
enablePrint: 0, //打印
enableQuickSearch: 0, //快捷搜索
enableSiteFilter: 0, //站点过滤
enableTimeFilter: 0, //时间筛选
}
const AccountSelector = (props) => {
const userID = window?.globalConfig?.userInfo?.OID || 1
const { value, onChange, schema, addons } = props
const { disabled, accountName, fieldshine, siteFilter, sql, isMultiple, presetValue, placeholder, fieldList } = schema
const initParams = { userID: userID, accountName, sortFields: '录入时间', direction: 'desc', total: 0, pageIndex: 1, pageSize: 100, siteFilter }
const initParams = { user: userID, accountName, sortFields: '录入时间', direction: 'desc', total: 0, pageIndex: 1, pageSize: 100, siteFilter }
const [params, setParams] = useState(initParams)
const [loading, setLoading] = useState(false)
const [dataSource, setDataSource] = useState([])
const [config, setConfig] = useState({ accountFieids: [], webShowFieldGroup: '', addFieldGroup: '', formJson: {} })
const [config, setConfig] = useState(initConfig)
const [visible, setVisible] = useState(false)
const [keys, setKeys] = useState([])
const tablePackRef = useRef(null)
......@@ -47,11 +58,10 @@ const AccountSelector = (props) => {
const getDataSource = async (outParams = {}) => {
setLoading(true);
let param = {
...params,
user: userID,
accountName: accountName,
condition: sql ? window.btoa(encodeURIComponent(sql)) : '',
sortFields: '录入时间',
...params,
...outParams,
};
const { data, code, msg } = await GetAccountPageList(param);
......@@ -132,9 +142,8 @@ const AccountSelector = (props) => {
getDataSource({ ...values })
}
const btnsClick = (type) => {
const btnsClick = ({ type }) => {
if (type === '重置') {
console.log('type', type)
tablePackRef.current.setFilteredInfo({})
setParams({ ...params, queryWheres: [] })
getDataSource({ queryWheres: [] })
......@@ -179,6 +188,7 @@ const AccountSelector = (props) => {
onChange={search}
readOnly={true}
btnsClick={btnsClick}
config={config}
/>
</div>
<div className={styles.bottom}>
......
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