|
@@ -12,7 +12,7 @@ import { TagTypeEnum, TagDataTypeEnum, LabelModeType } from './components/Person
|
|
|
import { Add, Down, Check } from '@icon-park/react'
|
|
import { Add, Down, Check } from '@icon-park/react'
|
|
|
import { apiBatchLink } from '@/services/customer'
|
|
import { apiBatchLink } from '@/services/customer'
|
|
|
import styles from './index.less'
|
|
import styles from './index.less'
|
|
|
-import { refactorFilterField, refactorSortField } from '@/utils/utils'
|
|
|
|
|
|
|
+import { generateFilterField, generateSortField } from '@/utils/utils'
|
|
|
import { PermDataTypeEunm } from './components/PermSelect'
|
|
import { PermDataTypeEunm } from './components/PermSelect'
|
|
|
import BasicTable from '@/components/Table'
|
|
import BasicTable from '@/components/Table'
|
|
|
import { getPermAuthCache } from '@/utils/auth'
|
|
import { getPermAuthCache } from '@/utils/auth'
|
|
@@ -168,7 +168,8 @@ const Company = props => {
|
|
|
render: (companyName, record) => (
|
|
render: (companyName, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => showDrawer(record.id)}
|
|
onClick={() => showDrawer(record.id)}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
+ >
|
|
|
{companyName}
|
|
{companyName}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -214,7 +215,8 @@ const Company = props => {
|
|
|
tagType={TagTypeEnum.PERSONTAG}
|
|
tagType={TagTypeEnum.PERSONTAG}
|
|
|
tagColumn={TagDataTypeEnum.COMPANY}
|
|
tagColumn={TagDataTypeEnum.COMPANY}
|
|
|
checkCallBack={refreshData}
|
|
checkCallBack={refreshData}
|
|
|
- modeType={LabelModeType.column}>
|
|
|
|
|
|
|
+ modeType={LabelModeType.column}
|
|
|
|
|
+ >
|
|
|
<Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
|
|
<Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
|
|
|
</PersonLabel>
|
|
</PersonLabel>
|
|
|
</div>
|
|
</div>
|
|
@@ -245,7 +247,8 @@ const Company = props => {
|
|
|
tagType={TagTypeEnum.TEAMTAG}
|
|
tagType={TagTypeEnum.TEAMTAG}
|
|
|
tagColumn={TagDataTypeEnum.COMPANY}
|
|
tagColumn={TagDataTypeEnum.COMPANY}
|
|
|
checkCallBack={refreshData}
|
|
checkCallBack={refreshData}
|
|
|
- modeType={LabelModeType.column}>
|
|
|
|
|
|
|
+ modeType={LabelModeType.column}
|
|
|
|
|
+ >
|
|
|
<Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
|
|
<Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
|
|
|
</PersonLabel>
|
|
</PersonLabel>
|
|
|
</div>
|
|
</div>
|
|
@@ -413,7 +416,8 @@ const Company = props => {
|
|
|
tagType={TagTypeEnum.PERSONTAG}
|
|
tagType={TagTypeEnum.PERSONTAG}
|
|
|
tagColumn={TagDataTypeEnum.COMPANY}
|
|
tagColumn={TagDataTypeEnum.COMPANY}
|
|
|
checkCallBack={toolbarOptionsChange}
|
|
checkCallBack={toolbarOptionsChange}
|
|
|
- modeType={LabelModeType.toolbar}>
|
|
|
|
|
|
|
+ modeType={LabelModeType.toolbar}
|
|
|
|
|
+ >
|
|
|
{tagState.tagIds.length ? (
|
|
{tagState.tagIds.length ? (
|
|
|
<Button>
|
|
<Button>
|
|
|
{tagState.tagIds.map(item => (
|
|
{tagState.tagIds.map(item => (
|
|
@@ -438,7 +442,8 @@ const Company = props => {
|
|
|
tagType={TagTypeEnum.TEAMTAG}
|
|
tagType={TagTypeEnum.TEAMTAG}
|
|
|
tagColumn={TagDataTypeEnum.COMPANY}
|
|
tagColumn={TagDataTypeEnum.COMPANY}
|
|
|
checkCallBack={toolbarOptionsChange}
|
|
checkCallBack={toolbarOptionsChange}
|
|
|
- modeType={LabelModeType.toolbar}>
|
|
|
|
|
|
|
+ modeType={LabelModeType.toolbar}
|
|
|
|
|
+ >
|
|
|
{tagState.tagCooperationIds.length ? (
|
|
{tagState.tagCooperationIds.length ? (
|
|
|
<Button>
|
|
<Button>
|
|
|
{tagState.tagCooperationIds.map(item => (
|
|
{tagState.tagCooperationIds.map(item => (
|
|
@@ -477,8 +482,8 @@ const Company = props => {
|
|
|
columnStateType="COMPANY"
|
|
columnStateType="COMPANY"
|
|
|
params={state.params}
|
|
params={state.params}
|
|
|
request={async (params, sort, filter) => {
|
|
request={async (params, sort, filter) => {
|
|
|
- const srotOrder = refactorSortField(sort)
|
|
|
|
|
- const nFilter = refactorFilterField(filter)
|
|
|
|
|
|
|
+ const srotOrder = generateSortField(sort)
|
|
|
|
|
+ const nFilter = generateFilterField(filter)
|
|
|
const { code = -1, data: { customer = [], total = 0 } = { customer: [], total: 0 } } =
|
|
const { code = -1, data: { customer = [], total = 0 } = { customer: [], total: 0 } } =
|
|
|
await queryCompany({ ...params, ...srotOrder, ...nFilter })
|
|
await queryCompany({ ...params, ...srotOrder, ...nFilter })
|
|
|
setState({ ...state, orderIds: customer.map(item => item.id) })
|
|
setState({ ...state, orderIds: customer.map(item => item.id) })
|