Selaa lähdekoodia

feat: 客户数据列增加创建人和软件锁数据列增加数据权限

outaozhen 5 vuotta sitten
vanhempi
commit
6675861379

+ 10 - 0
src/pages/Customer/Company/index.jsx

@@ -310,6 +310,13 @@ const Company = props => {
       key: 'remarks',
       key: 'remarks',
       search: false,
       search: false,
       width: 80
       width: 80
+    },
+    {
+      title: '创建人',
+      dataIndex: 'staffName',
+      key: 'staffName',
+      search: false,
+      width: 80
     }
     }
   ]
   ]
   const [columnsStateMap, setColumnsStateMap] = useState({
   const [columnsStateMap, setColumnsStateMap] = useState({
@@ -336,6 +343,9 @@ const Company = props => {
     },
     },
     remarks: {
     remarks: {
       show: false
       show: false
+    },
+    staffName: {
+      show: false
     }
     }
   })
   })
 
 

+ 14 - 3
src/pages/Product/Lock/Lockstore/index.jsx

@@ -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}