|
@@ -1,7 +1,8 @@
|
|
|
import React, { useState } from 'react'
|
|
import React, { useState } from 'react'
|
|
|
-import { Tag } from 'antd'
|
|
|
|
|
|
|
+import { Tag, Select } from 'antd'
|
|
|
import ProTable from '@ant-design/pro-table'
|
|
import ProTable from '@ant-design/pro-table'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
|
|
+import { useModel } from 'umi'
|
|
|
import { queryLock } from '@/services/lock'
|
|
import { queryLock } from '@/services/lock'
|
|
|
import LocksDetail from '@/pages/Product/Lock/LockStore/components/LocksDetail'
|
|
import LocksDetail from '@/pages/Product/Lock/LockStore/components/LocksDetail'
|
|
|
import ContactDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
import ContactDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
@@ -42,8 +43,9 @@ const longleStatusNum = {
|
|
|
const LockStore = () => {
|
|
const LockStore = () => {
|
|
|
const [selectKeys] = useState([])
|
|
const [selectKeys] = useState([])
|
|
|
const { toggleDrawer, setDrawerProps } = useModal()
|
|
const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
|
|
+ const { initialState: { permData } = { permData: {} } } = useModel('@@initialState')
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
- params: {},
|
|
|
|
|
|
|
+ params: { dataPermission: 'oneself' },
|
|
|
data: [],
|
|
data: [],
|
|
|
total: 0,
|
|
total: 0,
|
|
|
id: ''
|
|
id: ''
|
|
@@ -171,7 +173,16 @@ const LockStore = () => {
|
|
|
<ProTable
|
|
<ProTable
|
|
|
rowKey={record => record.id}
|
|
rowKey={record => record.id}
|
|
|
search={false}
|
|
search={false}
|
|
|
- headerTitle="公共锁库"
|
|
|
|
|
|
|
+ headerTitle={
|
|
|
|
|
+ <Select
|
|
|
|
|
+ defaultValue="oneself"
|
|
|
|
|
+ dropdownMatchSelectWidth={false}
|
|
|
|
|
+ onChange={e => {
|
|
|
|
|
+ setState({ ...state, params: { ...state.params, dataPermission: e } })
|
|
|
|
|
+ }}
|
|
|
|
|
+ options={permData?.customer || []}
|
|
|
|
|
+ />
|
|
|
|
|
+ }
|
|
|
bordered
|
|
bordered
|
|
|
params={state.params}
|
|
params={state.params}
|
|
|
columns={columns}
|
|
columns={columns}
|