Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
22f1d493
提交
22f1d493
authored
6月 09, 2023
作者:
翁进城
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://git.mmcuav.cn/root/sharefly-admin-uav
上级
43109a0c
2132850e
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
149 行增加
和
101 行删除
+149
-101
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
customManageType.ts
src/api/interface/customManageType.ts
+46
-2
customManage.ts
src/api/modules/customManage.ts
+15
-1
index.tsx
src/pages/customManage/customList/comp/changeModal/index.tsx
+48
-75
index.tsx
src/pages/customManage/customList/index.tsx
+38
-22
router.tsx
src/router/router.tsx
+1
-0
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
22f1d493
...
@@ -14,4 +14,4 @@ patches:
...
@@ -14,4 +14,4 @@ patches:
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag
:
1fdaab4f81ec6fb14f23e31f2238db2f1386909c
newTag
:
fc6718648897f381269cb10c9fafa0c95dacf0e1
src/api/interface/customManageType.ts
浏览文件 @
22f1d493
import
{
InterListFunction
}
from
'~/api/interface'
;
import
{
Inter
Function
,
Inter
ListFunction
}
from
'~/api/interface'
;
// 客户列表
// 客户列表
export
type
listAppUserType
=
InterListFunction
<
export
type
listAppUserType
=
InterListFunction
<
...
@@ -26,8 +26,52 @@ export type listAppUserType = InterListFunction<
...
@@ -26,8 +26,52 @@ export type listAppUserType = InterListFunction<
portType
:
number
;
portType
:
number
;
createTime
:
string
;
createTime
:
string
;
companyAuthStatus
:
number
;
companyAuthStatus
:
number
;
cooperationTagId
:
nu
ll
;
cooperationTagId
:
nu
mber
;
companyName
:
null
;
companyName
:
null
;
tagName
:
null
;
tagName
:
null
;
}
}
>
;
>
;
// 加盟标签列表
export
type
CompanyListTag
=
InterFunction
<
NonNullable
<
unknown
>
,
{
id
:
number
;
tagName
:
string
;
tagImg
:
null
;
tagDescription
:
string
;
createTime
:
string
;
}[]
>
;
// 修改用户信息
export
type
userAccountUpdateType
=
InterFunction
<
{
accountNo
?:
string
;
accountStatus
?:
number
;
accountType
?:
number
;
companyAuthStatus
?:
number
;
companyName
?:
string
;
cooperationTagId
?:
number
;
createTime
?:
string
;
email
?:
string
;
id
:
number
;
nickName
?:
string
;
phoneNum
?:
string
;
portType
?:
number
;
remark
?:
string
;
source
?:
number
;
tagName
?:
string
;
uid
?:
string
;
userImg
?:
string
;
userName
?:
string
;
userSex
?:
number
;
},
NonNullable
<
unknown
>
>
;
// 后台设置小程序用户标签
export
type
changeUserTagType
=
InterFunction
<
{
cooperationTagId
:
number
;
userAccountId
:
number
;
},
NonNullable
<
unknown
>
>
;
src/api/modules/customManage.ts
浏览文件 @
22f1d493
import
axios
from
'../request'
;
import
axios
from
'../request'
;
import
{
listAppUserType
}
from
'~/api/interface/customManageType'
;
import
{
changeUserTagType
,
CompanyListTag
,
listAppUserType
,
userAccountUpdateType
,
}
from
'~/api/interface/customManageType'
;
export
class
CustomManageAPI
{
export
class
CustomManageAPI
{
// 客户列表
// 客户列表
static
listAppUser
:
listAppUserType
=
(
params
)
=>
static
listAppUser
:
listAppUserType
=
(
params
)
=>
axios
.
post
(
'/userapp/user-account/listAppUser'
,
params
);
axios
.
post
(
'/userapp/user-account/listAppUser'
,
params
);
// 加盟列表
static
CompanyListTag
:
CompanyListTag
=
(
params
)
=>
axios
.
get
(
'/userapp/cooperation/listTag'
,
{
params
});
// 客户列表
static
userAccountUpdate
:
userAccountUpdateType
=
(
params
)
=>
axios
.
post
(
'/userapp/user-account/update'
,
params
);
// 后台设置小程序用户标签
static
changeUserTag
:
changeUserTagType
=
(
params
)
=>
axios
.
get
(
'/userapp/cooperation/changeUserTag'
,
{
params
});
}
}
src/pages/customManage/customList/comp/changeModal/index.tsx
浏览文件 @
22f1d493
import
{
FC
,
useEffect
,
useState
}
from
'react'
;
import
{
FC
,
useEffect
,
useState
}
from
'react'
;
import
{
Form
,
Modal
,
Select
}
from
'antd'
;
import
{
Form
,
Modal
,
Select
}
from
'antd'
;
// import { tagLevelEntity } from "@/api/modules/user";
import
{
InterListType
}
from
'~/api/interface'
;
// import { UserAPI } from "@/api";
import
{
listAppUserType
}
from
'~/api/interface/customManageType'
;
import
{
CustomManageAPI
}
from
'~/api'
;
// 表格数据类型
type
TableType
=
InterListType
<
listAppUserType
>
;
// 数据的类型
interface
PropsType
{
interface
PropsType
{
visible
:
boolean
;
open
:
boolean
;
closed
:
any
;
closed
:
any
;
data
:
any
;
data
?:
TableType
[
0
];
state
:
any
;
}
}
// 修改等级标签
// 修改等级标签
interface
tagLevelForm
{
interface
tagLevelForm
{
channelLevelId
:
number
;
cooperationTagId
:
number
;
mallOperator
:
number
;
mallSaleManager
:
number
;
}
}
export
const
ChangeModal
:
FC
<
PropsType
>
=
(
props
)
=>
{
export
const
ChangeModal
:
FC
<
PropsType
>
=
(
props
)
=>
{
ChangeModal
.
defaultProps
=
{
data
:
undefined
,
};
// 父组件传参
// 父组件传参
const
{
visible
,
closed
,
data
,
state
}
=
props
;
const
{
open
,
closed
,
data
}
=
props
;
// 个人等级标签
// 个人等级标签
const
[
tagLevelF
orm
]
=
Form
.
useForm
<
tagLevelForm
>
();
const
[
f
orm
]
=
Form
.
useForm
<
tagLevelForm
>
();
// 相关运营列表
// 相关运营列表
const
[
operationList
]
=
useState
([]);
const
[
operationList
]
=
useState
<
{
value
:
number
;
label
:
string
}[]
>
([]);
// 等级标签列表
const
[
cooperationTagIdList
,
setCooperationTagIdList
]
=
useState
<
{
value
:
number
;
label
:
string
}[]
>
([]);
// 关闭事件
// 关闭事件
const
handleClosed
=
()
=>
{
const
handleClosed
=
()
=>
{
tagLevelF
orm
.
resetFields
();
f
orm
.
resetFields
();
closed
();
closed
();
};
};
// 提交数据
// 提交数据
const
handleSubmit
=
()
=>
{
const
handleSubmit
=
()
=>
{
tagLevelForm
.
validateFields
().
then
(
async
(
value
:
tagLevelForm
)
=>
{
form
.
validateFields
().
then
(
async
(
value
)
=>
{
// 提交表单数据
const
res
=
await
CustomManageAPI
.
changeUserTag
({
const
SubmitFuc
=
async
()
=>
{
userAccountId
:
Number
(
data
?.
id
),
// const res: any = await UserAPI.mallUserChangeInfo({
cooperationTagId
:
value
.
cooperationTagId
,
// ...value,
});
// userAccountId: data.id,
if
(
res
&&
res
.
code
===
'200'
)
{
// });
handleClosed
();
// if (res.code === '200') {
// message.success('修改成功');
// handleClosed();
// } else {
// message.warning(res.message);
// }
};
// 如果之前填过等级标签,现在又删除了的话,调用删除等级标签的接口
if
(
data
.
channelClass
&&
!
value
.
channelLevelId
)
{
// 删除等级标签
// const res: any = await UserAPI.mallUserDeleteInfo({
// userAccountId: data.id,
// });
// if (res && res.code === '200') {
// await SubmitFuc();
// } else {
// message.warning(res.message);
// }
}
else
{
await
SubmitFuc
();
}
}
});
});
};
};
// 获取运营人员列表
// 获取加盟列表
const
getListOperate
=
()
=>
{
const
getCompanyListTag
=
async
()
=>
{
// UserAPI.getKbtUserList({ keyword: '' }).then(({ result }) => {
const
res
=
await
CustomManageAPI
.
CompanyListTag
({});
// if (result) {
if
(
res
&&
res
.
code
===
'200'
)
{
// setOperationList(
setCooperationTagIdList
(
res
.
result
.
map
((
i
)
=>
({
value
:
i
.
id
,
label
:
i
.
tagName
})));
// result.map((i: any) => {
// console.log(res.result);
// return {
}
// label: `${i.userName || i.nickName}(${i.uid})`,
// value: i.id,
// };
// }),
// );
// }
// });
};
};
// 组件启动
// 组件启动
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
data
)
{
if
(
!
data
)
return
;
getListOperate
();
getCompanyListTag
().
then
();
tagLevelForm
.
setFieldsValue
({
form
.
setFieldsValue
({
channelLevelId
:
data
.
channelClass
||
undefined
,
cooperationTagId
:
data
.
cooperationTagId
,
mallOperator
:
data
.
mallOperator
||
undefined
,
});
mallSaleManager
:
data
.
mallSaleManager
||
undefined
,
},
[
open
]);
});
}
},
[
data
]);
return
(
return
(
<
Modal
open=
{
visible
}
title=
'变更'
onCancel=
{
handleClosed
}
destroyOnClose
onOk=
{
handleSubmit
}
>
<
Modal
open=
{
open
}
title=
'变更'
onCancel=
{
handleClosed
}
destroyOnClose
onOk=
{
handleSubmit
}
>
<
Form
form=
{
tagLevelF
orm
}
labelCol=
{
{
span
:
5
}
}
wrapperCol=
{
{
span
:
16
}
}
>
<
Form
form=
{
f
orm
}
labelCol=
{
{
span
:
5
}
}
wrapperCol=
{
{
span
:
16
}
}
>
<
Form
.
Item
label=
'等级标签'
name=
'c
hannelLevel
Id'
>
<
Form
.
Item
label=
'等级标签'
name=
'c
ooperationTag
Id'
>
<
Select
<
Select
placeholder=
'请选择等级标签'
placeholder=
'请选择等级标签'
disabled=
{
!
data
?.
realAuthStatus
&&
!
data
?.
entAuthStatus
}
disabled=
{
!
data
?.
userName
&&
!
data
?.
companyName
}
allowClear
allowClear
>
options=
{
cooperationTagIdList
}
{
state
.
levelTags
.
map
((
item
:
any
,
index
:
number
)
=>
(
/>
<
Select
.
Option
value=
{
item
.
id
}
key=
{
index
}
>
{
item
.
tagName
}
</
Select
.
Option
>
))
}
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
'相关运营'
name=
'mallOperator'
>
<
Form
.
Item
label=
'相关运营'
name=
'mallOperator'
>
<
Select
placeholder=
'请选择相关运营'
allowClear
>
<
Select
placeholder=
'请选择相关运营'
allowClear
disabled
>
{
operationList
.
map
((
item
:
any
,
index
:
number
)
=>
(
{
operationList
.
map
((
item
:
any
,
index
:
number
)
=>
(
<
Select
.
Option
value=
{
item
.
value
}
key=
{
index
}
>
<
Select
.
Option
value=
{
item
.
value
}
key=
{
index
}
>
{
item
.
label
}
{
item
.
label
}
...
@@ -113,7 +86,7 @@ export const ChangeModal: FC<PropsType> = (props) => {
...
@@ -113,7 +86,7 @@ export const ChangeModal: FC<PropsType> = (props) => {
</
Select
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
'相关销售'
name=
'mallSaleManager'
>
<
Form
.
Item
label=
'相关销售'
name=
'mallSaleManager'
>
<
Select
placeholder=
'请选择相关销售'
allowClear
>
<
Select
placeholder=
'请选择相关销售'
allowClear
disabled
>
{
operationList
.
map
((
item
:
any
,
index
:
number
)
=>
(
{
operationList
.
map
((
item
:
any
,
index
:
number
)
=>
(
<
Select
.
Option
value=
{
item
.
value
}
key=
{
index
}
>
<
Select
.
Option
value=
{
item
.
value
}
key=
{
index
}
>
{
item
.
label
}
{
item
.
label
}
...
...
src/pages/customManage/customList/index.tsx
浏览文件 @
22f1d493
...
@@ -24,6 +24,10 @@ const portTypeList = [
...
@@ -24,6 +24,10 @@ const portTypeList = [
];
];
function
CustomListView
()
{
function
CustomListView
()
{
// 等级标签列表
const
[
cooperationTagIdList
,
setCooperationTagIdList
]
=
useState
<
{
value
:
number
;
label
:
string
}[]
>
([]);
// 是否打开变更弹窗
// 是否打开变更弹窗
const
[
isChangeVisModal
,
setIsChangeVisModal
]
=
useState
<
boolean
>
(
false
);
const
[
isChangeVisModal
,
setIsChangeVisModal
]
=
useState
<
boolean
>
(
false
);
// 表格分页配置
// 表格分页配置
...
@@ -36,7 +40,7 @@ function CustomListView() {
...
@@ -36,7 +40,7 @@ function CustomListView() {
// 表格数据
// 表格数据
const
[
tableData
,
setTableData
]
=
useState
<
TableType
>
([]);
const
[
tableData
,
setTableData
]
=
useState
<
TableType
>
([]);
// 需要编辑的数据
// 需要编辑的数据
const
[
editData
]
=
useState
<
TableType
[
0
]
>
();
const
[
editData
,
setEditData
]
=
useState
<
TableType
[
0
]
>
();
// 加载列表
// 加载列表
const
getTableList
=
async
(
value
=
{})
=>
{
const
getTableList
=
async
(
value
=
{})
=>
{
// 只需要修改这个地方的接口即可
// 只需要修改这个地方的接口即可
...
@@ -68,10 +72,21 @@ function CustomListView() {
...
@@ -68,10 +72,21 @@ function CustomListView() {
query
=
data
;
query
=
data
;
getTableList
(
data
).
then
();
getTableList
(
data
).
then
();
};
};
// 获取加盟列表
const
getCompanyListTag
=
async
()
=>
{
const
res
=
await
CustomManageAPI
.
CompanyListTag
({});
if
(
res
&&
res
.
code
===
'200'
)
{
setCooperationTagIdList
(
res
.
result
.
map
((
i
)
=>
({
value
:
i
.
id
,
label
:
i
.
tagName
})));
// console.log(res.result);
}
};
// componentDidMount
// componentDidMount
useEffect
(()
=>
{
useEffect
(()
=>
{
query
=
{};
query
=
{};
getTableList
().
then
();
(
async
()
=>
{
await
getCompanyListTag
();
await
getTableList
();
})();
},
[]);
},
[]);
// 表格结构
// 表格结构
const
columns
:
ColumnsType
<
TableType
[
0
]
>
=
[
const
columns
:
ColumnsType
<
TableType
[
0
]
>
=
[
...
@@ -131,7 +146,7 @@ function CustomListView() {
...
@@ -131,7 +146,7 @@ function CustomListView() {
title
:
'渠道等级'
,
title
:
'渠道等级'
,
dataIndex
:
'cooperationTagId'
,
dataIndex
:
'cooperationTagId'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
text
)
=>
text
,
render
:
(
text
)
=>
cooperationTagIdList
.
find
((
i
)
=>
i
.
value
===
text
)?.
label
||
text
,
},
},
{
{
title
:
'上级推荐人'
,
title
:
'上级推荐人'
,
...
@@ -162,12 +177,13 @@ function CustomListView() {
...
@@ -162,12 +177,13 @@ function CustomListView() {
dataIndex
:
'action'
,
dataIndex
:
'action'
,
align
:
'center'
,
align
:
'center'
,
fixed
:
'right'
,
fixed
:
'right'
,
width
:
'1
5
0px'
,
width
:
'1
0
0px'
,
render
:
(
_text
)
=>
(
render
:
(
_text
,
record
)
=>
(
<>
<>
<
Button
<
Button
type=
{
'link'
}
type=
{
'link'
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
setEditData
(
JSON
.
parse
(
JSON
.
stringify
(
record
)));
setIsChangeVisModal
(
true
);
setIsChangeVisModal
(
true
);
}
}
}
}
>
>
...
@@ -198,37 +214,37 @@ function CustomListView() {
...
@@ -198,37 +214,37 @@ function CustomListView() {
},
},
{
{
label
:
'来源'
,
label
:
'来源'
,
name
:
'
form
'
,
name
:
'
portType
'
,
type
:
'Select'
,
type
:
'Select'
,
placeholder
:
'请选择相关来源'
,
placeholder
:
'请选择相关来源'
,
options
:
portTypeList
,
options
:
portTypeList
,
},
},
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
name
:
'
t
ime'
,
name
:
'
rangeT
ime'
,
type
:
'rangePicker'
,
type
:
'rangePicker'
,
placeholder
:
'请选择创建时间'
,
placeholder
:
'请选择创建时间'
,
},
},
{
{
label
:
'企业认证'
,
label
:
'企业认证'
,
name
:
'enterprise'
,
name
:
'companyAuthStatus'
,
type
:
'Select'
,
placeholder
:
'请选择是否认证'
,
options
:
[
{
value
:
1
,
label
:
'未认证'
},
{
value
:
2
,
label
:
'已认证'
},
],
},
{
label
:
'电子签约认证'
,
name
:
'contract'
,
type
:
'Select'
,
type
:
'Select'
,
placeholder
:
'请选择是否认证'
,
placeholder
:
'请选择是否认证'
,
options
:
[
options
:
[
{
value
:
1
,
label
:
'未认证'
},
{
value
:
0
,
label
:
'未认证'
},
{
value
:
2
,
label
:
'已认证'
},
{
value
:
1
,
label
:
'已认证'
},
],
],
},
},
//
{
// label: '电子签约认证',
// name: 'contract',
// type: 'Select',
// placeholder: '请选择是否认证',
// options: [
//
{
value
:
1
,
label
:
'未认证'
},
//
{
value
:
2
,
label
:
'已认证'
},
// ],
//
},
]
}
]
}
searchData=
{
onFinish
}
searchData=
{
onFinish
}
/>
/>
...
@@ -250,12 +266,12 @@ function CustomListView() {
...
@@ -250,12 +266,12 @@ function CustomListView() {
// rowSelection={{ selectedRowKeys, onChange: onSelectChange }}
// rowSelection={{ selectedRowKeys, onChange: onSelectChange }}
/>
/>
<
ChangeModal
<
ChangeModal
visible
=
{
isChangeVisModal
}
open
=
{
isChangeVisModal
}
closed=
{
()
=>
{
closed=
{
()
=>
{
setIsChangeVisModal
(
false
);
setIsChangeVisModal
(
false
);
paginationChange
(
pagination
.
current
,
pagination
.
pageSize
);
}
}
}
}
data=
{
editData
}
data=
{
editData
}
state=
{
{
levelTags
:
[]
}
}
/>
/>
</>
</>
);
);
...
...
src/router/router.tsx
浏览文件 @
22f1d493
...
@@ -443,6 +443,7 @@ export const routerList: Array<RouteObjectType> = [
...
@@ -443,6 +443,7 @@ export const routerList: Array<RouteObjectType> = [
id
:
26200
,
id
:
26200
,
title
:
'现金管理'
,
title
:
'现金管理'
,
icon
:
<
RedEnvelopeOutlined
/>,
icon
:
<
RedEnvelopeOutlined
/>,
hidden
:
true
,
},
},
},
},
{
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论