Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
4dabfcba
authored
Mar 09, 2024
by
芋道源码
Committed by
Gitee
Mar 09, 2024
Browse files
Options
Browse Files
Download
Plain Diff
!399 CRM:完善数据权限,实现数据权限同时添加、同时转移
Merge pull request !399 from puhui999/dev-crm
parents
1a5e7902
13e925e2
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
278 additions
and
208 deletions
+278
-208
src/api/crm/business/index.ts
+1
-1
src/api/crm/clue/index.ts
+1
-1
src/api/crm/contact/index.ts
+1
-1
src/api/crm/contract/index.ts
+1
-1
src/api/crm/customer/index.ts
+1
-6
src/api/crm/permission/index.ts
+8
-0
src/api/crm/receivable/index.ts
+6
-4
src/api/crm/receivable/plan/index.ts
+1
-1
src/views/crm/business/detail/index.vue
+11
-11
src/views/crm/clue/detail/index.vue
+3
-3
src/views/crm/contact/components/ContactList.vue
+24
-21
src/views/crm/contact/components/ContactListModal.vue
+28
-22
src/views/crm/contact/detail/index.vue
+8
-8
src/views/crm/contract/detail/index.vue
+2
-3
src/views/crm/customer/detail/index.vue
+2
-2
src/views/crm/permission/components/PermissionForm.vue
+10
-7
src/views/crm/permission/components/TransferForm.vue
+57
-23
src/views/crm/receivable/ReceivableForm.vue
+14
-13
src/views/crm/receivable/plan/ReceivablePlanForm.vue
+9
-6
src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue
+23
-19
src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue
+23
-19
src/views/infra/demo/demo03/erp/index.vue
+44
-36
No files found.
src/api/crm/business/index.ts
View file @
4dabfcba
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
import
{
TransferReqVO
}
from
'@/api/crm/
customer
'
import
{
TransferReqVO
}
from
'@/api/crm/
permission
'
export
interface
BusinessVO
{
export
interface
BusinessVO
{
id
:
number
id
:
number
...
...
src/api/crm/clue/index.ts
View file @
4dabfcba
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
import
{
TransferReqVO
}
from
'@/api/crm/
customer
'
import
{
TransferReqVO
}
from
'@/api/crm/
permission
'
export
interface
ClueVO
{
export
interface
ClueVO
{
id
:
number
// 编号
id
:
number
// 编号
...
...
src/api/crm/contact/index.ts
View file @
4dabfcba
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
import
{
TransferReqVO
}
from
'@/api/crm/
customer
'
import
{
TransferReqVO
}
from
'@/api/crm/
permission
'
export
interface
ContactVO
{
export
interface
ContactVO
{
id
:
number
// 编号
id
:
number
// 编号
...
...
src/api/crm/contract/index.ts
View file @
4dabfcba
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
import
{
TransferReqVO
}
from
'@/api/crm/
customer
'
import
{
TransferReqVO
}
from
'@/api/crm/
permission
'
export
interface
ContractVO
{
export
interface
ContractVO
{
id
:
number
id
:
number
...
...
src/api/crm/customer/index.ts
View file @
4dabfcba
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
import
{
TransferReqVO
}
from
'@/api/crm/permission'
export
interface
CustomerVO
{
export
interface
CustomerVO
{
id
:
number
// 编号
id
:
number
// 编号
...
@@ -102,12 +103,6 @@ export const getCustomerSimpleList = async () => {
...
@@ -102,12 +103,6 @@ export const getCustomerSimpleList = async () => {
// ======================= 业务操作 =======================
// ======================= 业务操作 =======================
export
interface
TransferReqVO
{
id
:
number
|
undefined
// 客户编号
newOwnerUserId
:
number
|
undefined
// 新负责人的用户编号
oldOwnerPermissionLevel
:
number
|
undefined
// 老负责人加入团队后的权限级别
}
// 客户转移
// 客户转移
export
const
transferCustomer
=
async
(
data
:
TransferReqVO
)
=>
{
export
const
transferCustomer
=
async
(
data
:
TransferReqVO
)
=>
{
return
await
request
.
put
({
url
:
'/crm/customer/transfer'
,
data
})
return
await
request
.
put
({
url
:
'/crm/customer/transfer'
,
data
})
...
...
src/api/crm/permission/index.ts
View file @
4dabfcba
...
@@ -6,6 +6,7 @@ export interface PermissionVO {
...
@@ -6,6 +6,7 @@ export interface PermissionVO {
bizType
:
number
// Crm 类型
bizType
:
number
// Crm 类型
bizId
:
number
// Crm 类型数据编号
bizId
:
number
// Crm 类型数据编号
level
:
number
// 权限级别
level
:
number
// 权限级别
toBizTypes
?:
number
[]
// 同时添加至
deptName
?:
string
// 部门名称
deptName
?:
string
// 部门名称
nickname
?:
string
// 用户昵称
nickname
?:
string
// 用户昵称
postNames
?:
string
[]
// 岗位名称数组
postNames
?:
string
[]
// 岗位名称数组
...
@@ -13,6 +14,13 @@ export interface PermissionVO {
...
@@ -13,6 +14,13 @@ export interface PermissionVO {
ids
?:
number
[]
ids
?:
number
[]
}
}
export
interface
TransferReqVO
{
bizId
:
number
// 模块编号
newOwnerUserId
:
number
// 新负责人的用户编号
oldOwnerPermissionLevel
:
number
// 老负责人加入团队后的权限级别
toBizTypes
?:
number
[]
// 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择
}
/**
/**
* CRM 业务类型枚举
* CRM 业务类型枚举
*
*
...
...
src/api/crm/receivable/index.ts
View file @
4dabfcba
...
@@ -3,18 +3,20 @@ import request from '@/config/axios'
...
@@ -3,18 +3,20 @@ import request from '@/config/axios'
export
interface
ReceivableVO
{
export
interface
ReceivableVO
{
id
:
number
id
:
number
no
:
string
no
:
string
planId
:
number
planId
?
:
number
customerId
:
number
customerId
?
:
number
customerName
?:
string
customerName
?:
string
contractId
:
number
contractId
?
:
number
contract
?:
{
contract
?:
{
id
?:
number
name
?:
string
no
:
string
no
:
string
totalPrice
:
number
totalPrice
:
number
}
}
auditStatus
:
number
auditStatus
:
number
processInstanceId
:
number
processInstanceId
:
number
returnTime
:
Date
returnTime
:
Date
returnType
:
string
returnType
:
number
price
:
number
price
:
number
ownerUserId
:
number
ownerUserId
:
number
ownerUserName
?:
string
ownerUserName
?:
string
...
...
src/api/crm/receivable/plan/index.ts
View file @
4dabfcba
...
@@ -11,7 +11,7 @@ export interface ReceivablePlanVO {
...
@@ -11,7 +11,7 @@ export interface ReceivablePlanVO {
remindTime
:
Date
remindTime
:
Date
customerId
:
number
customerId
:
number
customerName
?:
string
customerName
?:
string
contractId
:
number
contractId
?
:
number
contractNo
?:
string
contractNo
?:
string
ownerUserId
:
number
ownerUserId
:
number
ownerUserName
?:
string
ownerUserName
?:
string
...
...
src/views/crm/business/detail/index.vue
View file @
4dabfcba
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
编辑
编辑
</el-button>
</el-button>
<el-button
<el-button
:disabled=
"business.endStatus"
v-if=
"permissionListRef?.validateWrite"
v-if=
"permissionListRef?.validateWrite"
:disabled=
"business.endStatus"
type=
"success"
type=
"success"
@
click=
"openStatusForm()"
@
click=
"openStatusForm()"
>
>
...
@@ -53,13 +53,12 @@
...
@@ -53,13 +53,12 @@
</el-col>
</el-col>
<!-- 表单弹窗:添加/修改 -->
<!-- 表单弹窗:添加/修改 -->
<BusinessForm
ref=
"formRef"
@
success=
"getBusiness
(business.id)
"
/>
<BusinessForm
ref=
"formRef"
@
success=
"getBusiness"
/>
<BusinessUpdateStatusForm
ref=
"statusFormRef"
@
success=
"getBusiness
(business.id)
"
/>
<BusinessUpdateStatusForm
ref=
"statusFormRef"
@
success=
"getBusiness"
/>
<CrmTransferForm
ref=
"transferFormRef"
@
success=
"close"
/>
<CrmTransferForm
ref=
"transferFormRef"
:biz-type=
"BizTypeEnum.CRM_BUSINESS"
@
success=
"close"
/>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
import
*
as
ContactApi
from
'@/api/crm/contact'
import
*
as
BusinessApi
from
'@/api/crm/business'
import
*
as
BusinessApi
from
'@/api/crm/business'
import
BusinessDetailsHeader
from
'./BusinessDetailsHeader.vue'
import
BusinessDetailsHeader
from
'./BusinessDetailsHeader.vue'
import
BusinessDetailsInfo
from
'./BusinessDetailsInfo.vue'
import
BusinessDetailsInfo
from
'./BusinessDetailsInfo.vue'
...
@@ -73,6 +72,7 @@ import FollowUpList from '@/views/crm/followup/index.vue'
...
@@ -73,6 +72,7 @@ import FollowUpList from '@/views/crm/followup/index.vue'
import
ContactList
from
'@/views/crm/contact/components/ContactList.vue'
import
ContactList
from
'@/views/crm/contact/components/ContactList.vue'
import
BusinessUpdateStatusForm
from
'@/views/crm/business/BusinessUpdateStatusForm.vue'
import
BusinessUpdateStatusForm
from
'@/views/crm/business/BusinessUpdateStatusForm.vue'
import
ContractList
from
'@/views/crm/contract/components/ContractList.vue'
import
ContractList
from
'@/views/crm/contract/components/ContractList.vue'
import
BusinessProductList
from
'@/views/crm/business/detail/BusinessProductList.vue'
defineOptions
({
name
:
'CrmBusinessDetail'
})
defineOptions
({
name
:
'CrmBusinessDetail'
})
...
@@ -80,15 +80,15 @@ const message = useMessage()
...
@@ -80,15 +80,15 @@ const message = useMessage()
const
businessId
=
ref
(
0
)
// 线索编号
const
businessId
=
ref
(
0
)
// 线索编号
const
loading
=
ref
(
true
)
// 加载中
const
loading
=
ref
(
true
)
// 加载中
const
business
=
ref
<
ContactApi
.
ContactVO
>
({}
as
ContactApi
.
ContactVO
)
// 联系人
详情
const
business
=
ref
<
BusinessApi
.
BusinessVO
>
({}
as
BusinessApi
.
BusinessVO
)
// 商机
详情
const
permissionListRef
=
ref
<
InstanceType
<
typeof
PermissionList
>>
()
// 团队成员列表 Ref
const
permissionListRef
=
ref
<
InstanceType
<
typeof
PermissionList
>>
()
// 团队成员列表 Ref
/** 获取详情 */
/** 获取详情 */
const
getBusiness
=
async
(
id
:
number
)
=>
{
const
getBusiness
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
business
.
value
=
await
BusinessApi
.
getBusiness
(
id
)
business
.
value
=
await
BusinessApi
.
getBusiness
(
businessId
.
value
)
await
getOperateLog
(
id
)
await
getOperateLog
(
businessId
.
value
)
}
finally
{
}
finally
{
loading
.
value
=
false
loading
.
value
=
false
}
}
...
@@ -109,7 +109,7 @@ const openStatusForm = () => {
...
@@ -109,7 +109,7 @@ const openStatusForm = () => {
/** 联系人转移 */
/** 联系人转移 */
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 联系人转移表单 ref
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 联系人转移表单 ref
const
transfer
=
()
=>
{
const
transfer
=
()
=>
{
transferFormRef
.
value
?.
open
(
'商机转移'
,
business
.
value
.
id
,
BusinessApi
.
transferBusiness
)
transferFormRef
.
value
?.
open
(
business
.
value
.
id
)
}
}
/** 获取操作日志 */
/** 获取操作日志 */
...
@@ -141,6 +141,6 @@ onMounted(async () => {
...
@@ -141,6 +141,6 @@ onMounted(async () => {
return
return
}
}
businessId
.
value
=
params
.
id
as
unknown
as
number
businessId
.
value
=
params
.
id
as
unknown
as
number
await
getBusiness
(
businessId
.
value
)
await
getBusiness
()
})
})
</
script
>
</
script
>
src/views/crm/clue/detail/index.vue
View file @
4dabfcba
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
>
>
转化为客户
转化为客户
</el-button>
</el-button>
<el-button
v-else
type=
"success"
disabled
>
已转化客户
</el-button>
<el-button
v-else
disabled
type=
"success"
>
已转化客户
</el-button>
</ClueDetailsHeader>
</ClueDetailsHeader>
<el-col>
<el-col>
<el-tabs>
<el-tabs>
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<!-- 表单弹窗:添加/修改 -->
<!-- 表单弹窗:添加/修改 -->
<ClueForm
ref=
"formRef"
@
success=
"getClue"
/>
<ClueForm
ref=
"formRef"
@
success=
"getClue"
/>
<CrmTransferForm
ref=
"transferFormRef"
@
success=
"close"
/>
<CrmTransferForm
ref=
"transferFormRef"
:biz-type=
"BizTypeEnum.CRM_CLUE"
@
success=
"close"
/>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
...
@@ -91,7 +91,7 @@ const openForm = () => {
...
@@ -91,7 +91,7 @@ const openForm = () => {
/** 线索转移 */
/** 线索转移 */
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 线索转移表单 ref
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 线索转移表单 ref
const
transfer
=
()
=>
{
const
transfer
=
()
=>
{
transferFormRef
.
value
?.
open
(
'线索转移'
,
clueId
.
value
,
ClueApi
.
transferC
lue
)
transferFormRef
.
value
?.
open
(
clueId
.
va
lue
)
}
}
/** 转化为客户 */
/** 转化为客户 */
...
...
src/views/crm/contact/components/ContactList.vue
View file @
4dabfcba
...
@@ -6,18 +6,20 @@
...
@@ -6,18 +6,20 @@
创建联系人
创建联系人
</el-button>
</el-button>
<el-button
<el-button
@
click=
"openBusinessModal"
v-hasPermi=
"['crm:contact:create-business']"
v-if=
"queryParams.businessId"
v-if=
"queryParams.businessId"
v-hasPermi=
"['crm:contact:create-business']"
@
click=
"openBusinessModal"
>
>
<Icon
class=
"mr-5px"
icon=
"ep:circle-plus"
/>
关联
<Icon
class=
"mr-5px"
icon=
"ep:circle-plus"
/>
关联
</el-button>
</el-button>
<el-button
<el-button
@
click=
"deleteContactBusinessList"
v-hasPermi=
"['crm:contact:delete-business']"
v-if=
"queryParams.businessId"
v-if=
"queryParams.businessId"
v-hasPermi=
"['crm:contact:delete-business']"
@
click=
"deleteContactBusinessList"
>
>
<Icon
class=
"mr-5px"
icon=
"ep:remove"
/>
解除关联
<Icon
class=
"mr-5px"
icon=
"ep:remove"
/>
解除关联
</el-button>
</el-button>
</el-row>
</el-row>
...
@@ -27,21 +29,21 @@
...
@@ -27,21 +29,21 @@
ref=
"contactRef"
ref=
"contactRef"
v-loading=
"loading"
v-loading=
"loading"
:data=
"list"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
:show-overflow-tooltip=
"true"
:stripe=
"true"
>
>
<el-table-column
type=
"selection"
width=
"55"
v-if=
"queryParams.businessId
"
/>
<el-table-column
v-if=
"queryParams.businessId"
type=
"selection"
width=
"55
"
/>
<el-table-column
label=
"姓名"
fixed=
"left"
align=
"center
"
prop=
"name"
>
<el-table-column
align=
"center"
fixed=
"left"
label=
"姓名
"
prop=
"name"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-link
type=
"primary"
:underline=
"false
"
@
click=
"openDetail(scope.row.id)"
>
<el-link
:underline=
"false"
type=
"primary
"
@
click=
"openDetail(scope.row.id)"
>
{{
scope
.
row
.
name
}}
{{
scope
.
row
.
name
}}
</el-link>
</el-link>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"手机号"
align=
"center
"
prop=
"mobile"
/>
<el-table-column
align=
"center"
label=
"手机号
"
prop=
"mobile"
/>
<el-table-column
label=
"职位"
align=
"center
"
prop=
"post"
/>
<el-table-column
align=
"center"
label=
"职位
"
prop=
"post"
/>
<el-table-column
label=
"直属上级"
align=
"center
"
prop=
"parentName"
/>
<el-table-column
align=
"center"
label=
"直属上级
"
prop=
"parentName"
/>
<el-table-column
label=
"是否关键决策人"
align=
"center"
prop=
"master"
min-width=
"100
"
>
<el-table-column
align=
"center"
label=
"是否关键决策人"
min-width=
"100"
prop=
"master
"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.master"
/>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.master"
/>
</
template
>
</
template
>
...
@@ -49,9 +51,9 @@
...
@@ -49,9 +51,9 @@
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
<Pagination
<Pagination
:total=
"total"
v-model:page=
"queryParams.pageNo"
v-model:limit=
"queryParams.pageSize"
v-model:limit=
"queryParams.pageSize"
v-model:page=
"queryParams.pageNo"
:total=
"total"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
...
@@ -60,12 +62,13 @@
...
@@ -60,12 +62,13 @@
<ContactForm
ref=
"formRef"
@
success=
"getList"
/>
<ContactForm
ref=
"formRef"
@
success=
"getList"
/>
<!-- 关联商机选择弹框 -->
<!-- 关联商机选择弹框 -->
<ContactListModal
<ContactListModal
v-if=
"customerId"
ref=
"contactModalRef"
ref=
"contactModalRef"
:customer-id=
"
props.
customerId"
:customer-id=
"customerId"
@
success=
"createContactBusinessList"
@
success=
"createContactBusinessList"
/>
/>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
lang=
"ts"
setup
>
import
*
as
ContactApi
from
'@/api/crm/contact'
import
*
as
ContactApi
from
'@/api/crm/contact'
import
ContactForm
from
'./../ContactForm.vue'
import
ContactForm
from
'./../ContactForm.vue'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
...
@@ -76,8 +79,8 @@ defineOptions({ name: 'CrmContactList' })
...
@@ -76,8 +79,8 @@ defineOptions({ name: 'CrmContactList' })
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
bizType
:
number
// 业务类型
bizType
:
number
// 业务类型
bizId
:
number
// 业务编号
bizId
:
number
// 业务编号
customerId
:
number
// 特殊:客户编号;在【商机】详情中,可以传递客户编号,默认新建的联系人关联到该客户
customerId
?
:
number
// 特殊:客户编号;在【商机】详情中,可以传递客户编号,默认新建的联系人关联到该客户
businessId
:
number
// 特殊:商机编号;在【商机】详情中,可以传递商机编号,默认新建的联系人关联到该商机
businessId
?
:
number
// 特殊:商机编号;在【商机】详情中,可以传递商机编号,默认新建的联系人关联到该商机
}
>
()
}
>
()
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
...
@@ -147,7 +150,7 @@ const createContactBusinessList = async (contactIds: number[]) => {
...
@@ -147,7 +150,7 @@ const createContactBusinessList = async (contactIds: number[]) => {
contactIds
:
contactIds
contactIds
:
contactIds
}
as
ContactApi
.
ContactBusiness2ReqVO
}
as
ContactApi
.
ContactBusiness2ReqVO
contactRef
.
value
.
getSelectionRows
().
forEach
((
row
:
ContactApi
.
ContactVO
)
=>
{
contactRef
.
value
.
getSelectionRows
().
forEach
((
row
:
ContactApi
.
ContactVO
)
=>
{
data
.
business
Ids
.
push
(
row
.
id
)
data
.
contact
Ids
.
push
(
row
.
id
)
})
})
await
ContactApi
.
createContactBusinessList2
(
data
)
await
ContactApi
.
createContactBusinessList2
(
data
)
// 刷新列表
// 刷新列表
...
...
src/views/crm/contact/components/ContactListModal.vue
View file @
4dabfcba
<
template
>
<
template
>
<Dialog
title=
"关联联系人"
v-model=
"dialogVisible
"
>
<Dialog
v-model=
"dialogVisible"
title=
"关联联系人
"
>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<ContentWrap>
<ContentWrap>
<el-form
<el-form
class=
"-mb-15px"
:model=
"queryParams"
ref=
"queryFormRef"
ref=
"queryFormRef"
:inline=
"true"
:inline=
"true"
:model=
"queryParams"
class=
"-mb-15px"
label-width=
"90px"
label-width=
"90px"
>
>
<el-form-item
label=
"联系人名称"
prop=
"name"
>
<el-form-item
label=
"联系人名称"
prop=
"name"
>
<el-input
<el-input
v-model=
"queryParams.name"
v-model=
"queryParams.name"
placeholder=
"请输入联系人名称
"
class=
"!w-240px
"
clearable
clearable
placeholder=
"请输入联系人名称"
@
keyup
.
enter=
"handleQuery"
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"handleQuery"
>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<Icon
class=
"mr-5px"
icon=
"ep:search"
/>
<el-button
type=
"primary"
@
click=
"openForm()"
v-hasPermi=
"['crm:business:create']"
>
搜索
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
</el-button>
<el-button
@
click=
"resetQuery"
>
<Icon
class=
"mr-5px"
icon=
"ep:refresh"
/>
重置
</el-button>
<el-button
v-hasPermi=
"['crm:business:create']"
type=
"primary"
@
click=
"openForm()"
>
<Icon
class=
"mr-5px"
icon=
"ep:plus"
/>
新增
</el-button>
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -31,24 +38,24 @@
...
@@ -31,24 +38,24 @@
<!-- 列表 -->
<!-- 列表 -->
<ContentWrap
class=
"mt-10px"
>
<ContentWrap
class=
"mt-10px"
>
<el-table
<el-table
v-loading=
"loading"
ref=
"contactRef"
ref=
"contactRef"
v-loading=
"loading"
:data=
"list"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
:show-overflow-tooltip=
"true"
:stripe=
"true"
>
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
label=
"姓名"
fixed=
"left"
align=
"center
"
prop=
"name"
>
<el-table-column
align=
"center"
fixed=
"left"
label=
"姓名
"
prop=
"name"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-link
type=
"primary"
:underline=
"false
"
@
click=
"openDetail(scope.row.id)"
>
<el-link
:underline=
"false"
type=
"primary
"
@
click=
"openDetail(scope.row.id)"
>
{{
scope
.
row
.
name
}}
{{
scope
.
row
.
name
}}
</el-link>
</el-link>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"手机号"
align=
"center
"
prop=
"mobile"
/>
<el-table-column
align=
"center"
label=
"手机号
"
prop=
"mobile"
/>
<el-table-column
label=
"职位"
align=
"center
"
prop=
"post"
/>
<el-table-column
align=
"center"
label=
"职位
"
prop=
"post"
/>
<el-table-column
label=
"直属上级"
align=
"center
"
prop=
"parentName"
/>
<el-table-column
align=
"center"
label=
"直属上级
"
prop=
"parentName"
/>
<el-table-column
label=
"是否关键决策人"
align=
"center"
prop=
"master"
min-width=
"100
"
>
<el-table-column
align=
"center"
label=
"是否关键决策人"
min-width=
"100"
prop=
"master
"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.master"
/>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"scope.row.master"
/>
</
template
>
</
template
>
...
@@ -56,14 +63,14 @@
...
@@ -56,14 +63,14 @@
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
<Pagination
<Pagination
:total=
"total"
v-model:page=
"queryParams.pageNo"
v-model:limit=
"queryParams.pageSize"
v-model:limit=
"queryParams.pageSize"
v-model:page=
"queryParams.pageNo"
:total=
"total"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
<
template
#
footer
>
<
template
#
footer
>
<el-button
@
click=
"submitForm"
type=
"primary"
:disabled=
"formLoading
"
>
确 定
</el-button>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm
"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</
template
>
</
template
>
...
@@ -71,10 +78,9 @@
...
@@ -71,10 +78,9 @@
<ContactForm
ref=
"formRef"
@
success=
"getList"
/>
<ContactForm
ref=
"formRef"
@
success=
"getList"
/>
</Dialog>
</Dialog>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
lang=
"ts"
setup
>
import
*
as
ContactApi
from
'@/api/crm/contact'
import
*
as
ContactApi
from
'@/api/crm/contact'
import
ContactForm
from
'../ContactForm.vue'
import
ContactForm
from
'../ContactForm.vue'
import
{
erpPriceTableColumnFormatter
}
from
'@/utils'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
...
...
src/views/crm/contact/detail/index.vue
View file @
4dabfcba
...
@@ -31,15 +31,15 @@
...
@@ -31,15 +31,15 @@
<BusinessList
<BusinessList
:biz-id=
"contact.id!"
:biz-id=
"contact.id!"
:biz-type=
"BizTypeEnum.CRM_CONTACT"
:biz-type=
"BizTypeEnum.CRM_CONTACT"
:customer-id=
"contact.customerId"
:contact-id=
"contact.id"
:contact-id=
"contact.id"
:customer-id=
"contact.customerId"
/>
/>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</el-col>
</el-col>
<!-- 表单弹窗:添加/修改 -->
<!-- 表单弹窗:添加/修改 -->
<ContactForm
ref=
"formRef"
@
success=
"getContact
(contact.id)
"
/>
<ContactForm
ref=
"formRef"
@
success=
"getContact"
/>
<CrmTransferForm
ref=
"transferFormRef"
@
success=
"close"
/>
<CrmTransferForm
ref=
"transferFormRef"
:biz-type=
"BizTypeEnum.CRM_CONTACT"
@
success=
"close"
/>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
...
@@ -65,11 +65,11 @@ const contact = ref<ContactApi.ContactVO>({} as ContactApi.ContactVO) // 联系
...
@@ -65,11 +65,11 @@ const contact = ref<ContactApi.ContactVO>({} as ContactApi.ContactVO) // 联系
const
permissionListRef
=
ref
<
InstanceType
<
typeof
PermissionList
>>
()
// 团队成员列表 Ref
const
permissionListRef
=
ref
<
InstanceType
<
typeof
PermissionList
>>
()
// 团队成员列表 Ref
/** 获取详情 */
/** 获取详情 */
const
getContact
=
async
(
id
:
number
)
=>
{
const
getContact
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
contact
.
value
=
await
ContactApi
.
getContact
(
id
)
contact
.
value
=
await
ContactApi
.
getContact
(
contactId
.
value
)
await
getOperateLog
(
id
)
await
getOperateLog
(
contactId
.
value
)
}
finally
{
}
finally
{
loading
.
value
=
false
loading
.
value
=
false
}
}
...
@@ -84,7 +84,7 @@ const openForm = (type: string, id?: number) => {
...
@@ -84,7 +84,7 @@ const openForm = (type: string, id?: number) => {
/** 联系人转移 */
/** 联系人转移 */
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 联系人转移表单 ref
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 联系人转移表单 ref
const
transfer
=
()
=>
{
const
transfer
=
()
=>
{
transferFormRef
.
value
?.
open
(
'联系人转移'
,
contact
.
value
.
id
,
ContactApi
.
transferContact
)
transferFormRef
.
value
?.
open
(
contact
.
value
.
id
)
}
}
/** 获取操作日志 */
/** 获取操作日志 */
...
@@ -116,6 +116,6 @@ onMounted(async () => {
...
@@ -116,6 +116,6 @@ onMounted(async () => {
return
return
}
}
contactId
.
value
=
params
.
id
as
unknown
as
number
contactId
.
value
=
params
.
id
as
unknown
as
number
await
getContact
(
contactId
.
value
)
await
getContact
()
})
})
</
script
>
</
script
>
src/views/crm/contract/detail/index.vue
View file @
4dabfcba
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<!-- 表单弹窗:添加/修改 -->
<!-- 表单弹窗:添加/修改 -->
<ContractForm
ref=
"formRef"
@
success=
"getContractData"
/>
<ContractForm
ref=
"formRef"
@
success=
"getContractData"
/>
<CrmTransferForm
ref=
"transferFormRef"
@
success=
"close"
/>
<CrmTransferForm
ref=
"transferFormRef"
:biz-type=
"BizTypeEnum.CRM_CONTRACT"
@
success=
"close"
/>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
...
@@ -113,10 +113,9 @@ const createReceivable = (planData: any) => {
...
@@ -113,10 +113,9 @@ const createReceivable = (planData: any) => {
}
}
/** 转移 */
/** 转移 */
// TODO @puhui999:这个组件,要不传递业务类型,然后组件里判断 title 和 api 能调用哪个;整体治理掉;好呢
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 合同转移表单 ref
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 合同转移表单 ref
const
transferContract
=
()
=>
{
const
transferContract
=
()
=>
{
transferFormRef
.
value
?.
open
(
'合同转移'
,
contract
.
value
.
id
,
ContractApi
.
transferContract
)
transferFormRef
.
value
?.
open
(
contract
.
value
.
id
)
}
}
/** 关闭 */
/** 关闭 */
...
...
src/views/crm/customer/detail/index.vue
View file @
4dabfcba
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
<!-- 表单弹窗:添加/修改 -->
<!-- 表单弹窗:添加/修改 -->
<CustomerForm
ref=
"formRef"
@
success=
"getCustomer"
/>
<CustomerForm
ref=
"formRef"
@
success=
"getCustomer"
/>
<CustomerDistributeForm
ref=
"distributeForm"
@
success=
"getCustomer"
/>
<CustomerDistributeForm
ref=
"distributeForm"
@
success=
"getCustomer"
/>
<CrmTransferForm
ref=
"transferFormRef"
@
success=
"getCustomer
"
/>
<CrmTransferForm
ref=
"transferFormRef"
:biz-type=
"BizTypeEnum.CRM_CUSTOMER"
@
success=
"close
"
/>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
...
@@ -142,7 +142,7 @@ const handleUpdateDealStatus = async () => {
...
@@ -142,7 +142,7 @@ const handleUpdateDealStatus = async () => {
/** 客户转移 */
/** 客户转移 */
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 客户转移表单 ref
const
transferFormRef
=
ref
<
InstanceType
<
typeof
CrmTransferForm
>>
()
// 客户转移表单 ref
const
transfer
=
()
=>
{
const
transfer
=
()
=>
{
transferFormRef
.
value
?.
open
(
'客户转移'
,
customerId
.
value
,
CustomerApi
.
transferCustomer
)
transferFormRef
.
value
?.
open
(
customerId
.
value
)
}
}
/** 锁定客户 */
/** 锁定客户 */
...
...
src/views/crm/permission/components/PermissionForm.vue
View file @
4dabfcba
...
@@ -29,12 +29,15 @@
...
@@ -29,12 +29,15 @@
</
template
>
</
template
>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<!-- TODO @puhui999:同时添加至,还没想好下次搞 -->
<el-form-item
<el-form-item
v-if=
"false && formType === 'create'"
label=
"同时添加至"
prop=
"toBizType"
>
v-if=
"formType === 'create' && formData.bizType === BizTypeEnum.CRM_CUSTOMER"
<el-select
v-model=
"formData.userId"
>
label=
"同时添加至"
<el-option
:value=
"1"
label=
"联系人"
/>
>
<el-option
:value=
"1"
label=
"商机"
/>
<el-checkbox-group
v-model=
"formData.toBizTypes"
>
</el-select>
<el-checkbox
:label=
"BizTypeEnum.CRM_CONTACT"
>
联系人
</el-checkbox>
<el-checkbox
:label=
"BizTypeEnum.CRM_BUSINESS"
>
商机
</el-checkbox>
<el-checkbox
:label=
"BizTypeEnum.CRM_CONTRACT"
>
合同
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<
template
#
footer
>
<
template
#
footer
>
...
@@ -46,7 +49,7 @@
...
@@ -46,7 +49,7 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
*
as
UserApi
from
'@/api/system/user'
import
*
as
UserApi
from
'@/api/system/user'
import
*
as
PermissionApi
from
'@/api/crm/permission'
import
*
as
PermissionApi
from
'@/api/crm/permission'
import
{
PermissionLevelEnum
}
from
'@/api/crm/permission'
import
{
BizTypeEnum
,
PermissionLevelEnum
}
from
'@/api/crm/permission'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
defineOptions
({
name
:
'CrmPermissionForm'
})
defineOptions
({
name
:
'CrmPermissionForm'
})
...
...
src/views/crm/permission/components/TransferForm.vue
View file @
4dabfcba
...
@@ -19,10 +19,7 @@
...
@@ -19,10 +19,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"老负责人"
>
<el-form-item
label=
"老负责人"
>
<el-radio-group
<el-radio-group
v-model=
"oldOwnerHandler"
@
change=
"formData.oldOwnerPermissionLevel"
>
v-model=
"oldOwnerHandler"
@
change=
"formData.oldOwnerPermissionLevel = undefined"
>
<el-radio
:label=
"false"
size=
"large"
>
移除
</el-radio>
<el-radio
:label=
"false"
size=
"large"
>
移除
</el-radio>
<el-radio
:label=
"true"
size=
"large"
>
加入团队
</el-radio>
<el-radio
:label=
"true"
size=
"large"
>
加入团队
</el-radio>
</el-radio-group>
</el-radio-group>
...
@@ -39,8 +36,14 @@
...
@@ -39,8 +36,14 @@
</
template
>
</
template
>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"bizType === BizTypeEnum.CRM_CUSTOMER"
label=
"同时转移"
>
<el-checkbox-group
v-model=
"formData.toBizTypes"
>
<el-checkbox
:label=
"BizTypeEnum.CRM_CONTACT"
>
联系人
</el-checkbox>
<el-checkbox
:label=
"BizTypeEnum.CRM_BUSINESS"
>
商机
</el-checkbox>
<el-checkbox
:label=
"BizTypeEnum.CRM_CONTRACT"
>
合同
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
</el-form>
<!-- TODO @puhui999 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择 -->
<
template
#
footer
>
<
template
#
footer
>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
...
@@ -49,23 +52,27 @@
...
@@ -49,23 +52,27 @@
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
*
as
UserApi
from
'@/api/system/user'
import
*
as
UserApi
from
'@/api/system/user'
import
type
{
TransferReqVO
}
from
'@/api/crm/customer'
import
*
as
BusinessApi
from
'@/api/crm/business'
import
*
as
ClueApi
from
'@/api/crm/clue'
import
*
as
ContactApi
from
'@/api/crm/contact'
import
*
as
CustomerApi
from
'@/api/crm/customer'
import
*
as
ContractApi
from
'@/api/crm/contract'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
PermissionLevelEnum
}
from
'@/api/crm/permission'
import
{
BizTypeEnum
,
PermissionLevelEnum
,
TransferReqVO
}
from
'@/api/crm/permission'
defineOptions
({
name
:
'CrmTransferForm'
})
defineOptions
({
name
:
'CrmTransferForm'
})
const
props
=
defineProps
<
{
bizType
:
number
}
>
()
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
dialogVisible
=
ref
(
false
)
// 弹窗的是否展示
const
dialogVisible
=
ref
(
false
)
// 弹窗的是否展示
const
dialogTitle
=
ref
(
''
)
// 弹窗的标题
const
dialogTitle
=
ref
(
''
)
// 弹窗的标题
const
formLoading
=
ref
(
false
)
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const
formLoading
=
ref
(
false
)
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const
userOptions
=
ref
<
UserApi
.
UserVO
[]
>
([])
// 用户列表
const
userOptions
=
ref
<
UserApi
.
UserVO
[]
>
([])
// 用户列表
const
oldOwnerHandler
=
ref
(
false
)
// 老负责人的处理方式
const
oldOwnerHandler
=
ref
(
false
)
// 老负责人的处理方式
const
formData
=
ref
<
TransferReqVO
>
({
const
formData
=
ref
<
TransferReqVO
>
({}
as
TransferReqVO
)
id
:
undefined
,
// 客户编号
newOwnerUserId
:
undefined
,
// 新负责人的用户编号
oldOwnerPermissionLevel
:
undefined
// 老负责人加入团队后的权限级别
})
const
formRules
=
reactive
({
const
formRules
=
reactive
({
newOwnerUserId
:
[{
required
:
true
,
message
:
'新负责人不能为空'
,
trigger
:
'blur'
}],
newOwnerUserId
:
[{
required
:
true
,
message
:
'新负责人不能为空'
,
trigger
:
'blur'
}],
oldOwnerPermissionLevel
:
[
oldOwnerPermissionLevel
:
[
...
@@ -73,15 +80,13 @@ const formRules = reactive({
...
@@ -73,15 +80,13 @@ const formRules = reactive({
]
]
})
})
const
formRef
=
ref
()
// 表单 Ref
const
formRef
=
ref
()
// 表单 Ref
const
transferFuncRef
=
ref
<
Function
>
(()
=>
{})
// 转移所需回调
/** 打开弹窗 */
/** 打开弹窗 */
const
open
=
async
(
title
:
string
,
bizId
:
number
,
transferFunc
:
Function
)
=>
{
const
open
=
async
(
bizId
:
number
)
=>
{
dialogVisible
.
value
=
true
dialogVisible
.
value
=
true
dialogTitle
.
value
=
title
dialogTitle
.
value
=
getDialogTitle
()
transferFuncRef
.
value
=
transferFunc
resetForm
()
resetForm
()
formData
.
value
.
i
d
=
bizId
formData
.
value
.
bizI
d
=
bizId
}
}
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
...
@@ -96,7 +101,7 @@ const submitForm = async () => {
...
@@ -96,7 +101,7 @@ const submitForm = async () => {
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
const
data
=
formData
.
value
const
data
=
formData
.
value
await
transfer
FuncRef
.
value
(
unref
(
data
))
await
transfer
(
unref
(
data
))
message
.
success
(
dialogTitle
.
value
+
'成功'
)
message
.
success
(
dialogTitle
.
value
+
'成功'
)
dialogVisible
.
value
=
false
dialogVisible
.
value
=
false
// 发送操作成功的事件
// 发送操作成功的事件
...
@@ -105,15 +110,44 @@ const submitForm = async () => {
...
@@ -105,15 +110,44 @@ const submitForm = async () => {
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
}
}
const
transfer
=
async
(
data
:
TransferReqVO
)
=>
{
switch
(
props
.
bizType
)
{
case
BizTypeEnum
.
CRM_CLUE
:
return
await
ClueApi
.
transferClue
(
data
)
case
BizTypeEnum
.
CRM_CUSTOMER
:
return
await
CustomerApi
.
transferCustomer
(
data
)
case
BizTypeEnum
.
CRM_CONTACT
:
return
await
ContactApi
.
transferContact
(
data
)
case
BizTypeEnum
.
CRM_BUSINESS
:
return
await
BusinessApi
.
transferBusiness
(
data
)
case
BizTypeEnum
.
CRM_CONTRACT
:
return
await
ContractApi
.
transferContract
(
data
)
default
:
message
.
error
(
'【转移失败】没有转移接口'
)
throw
new
Error
(
'【转移失败】没有转移接口'
)
}
}
const
getDialogTitle
=
()
=>
{
switch
(
props
.
bizType
)
{
case
BizTypeEnum
.
CRM_CLUE
:
return
'线索转移'
case
BizTypeEnum
.
CRM_CUSTOMER
:
return
'客户转移'
case
BizTypeEnum
.
CRM_CONTACT
:
return
'联系人转移'
case
BizTypeEnum
.
CRM_BUSINESS
:
return
'商机转移'
case
BizTypeEnum
.
CRM_CONTRACT
:
return
'合同转移'
default
:
return
'转移'
}
}
/** 重置表单 */
/** 重置表单 */
const
resetForm
=
()
=>
{
const
resetForm
=
()
=>
{
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
formData
.
value
=
{
formData
.
value
=
{}
as
TransferReqVO
id
:
undefined
,
// 客户编号
newOwnerUserId
:
undefined
,
// 新负责人的用户编号
oldOwnerPermissionLevel
:
undefined
// 老负责人加入团队后的权限级别
}
}
}
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
// 获得用户列表
// 获得用户列表
...
...
src/views/crm/receivable/ReceivableForm.vue
View file @
4dabfcba
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"回款编号"
prop=
"no"
>
<el-form-item
label=
"回款编号"
prop=
"no"
>
<el-input
disabled
v-model=
"formData.no"
placeholder=
"保存时自动生成"
/>
<el-input
v-model=
"formData.no"
disabled
placeholder=
"保存时自动生成"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -38,8 +38,8 @@
...
@@ -38,8 +38,8 @@
:disabled=
"formType !== 'create'"
:disabled=
"formType !== 'create'"
class=
"w-1/1"
class=
"w-1/1"
filterable
filterable
@
change=
"handleCustomerChange"
placeholder=
"请选择客户"
placeholder=
"请选择客户"
@
change=
"handleCustomerChange"
>
>
<el-option
<el-option
v-for=
"item in customerList"
v-for=
"item in customerList"
...
@@ -57,15 +57,15 @@
...
@@ -57,15 +57,15 @@
:disabled=
"formType !== 'create' || !formData.customerId"
:disabled=
"formType !== 'create' || !formData.customerId"
class=
"w-1/1"
class=
"w-1/1"
filterable
filterable
@
change=
"handleContractChange"
placeholder=
"请选择合同"
placeholder=
"请选择合同"
@
change=
"handleContractChange"
>
>
<el-option
<el-option
v-for=
"data in contractList"
v-for=
"data in contractList"
:key=
"data.id"
:key=
"data.id"
:disabled=
"data.auditStatus !== 20"
:label=
"data.name"
:label=
"data.name"
:value=
"data.id!"
:value=
"data.id!"
:disabled=
"data.auditStatus !== 20"
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -78,15 +78,15 @@
...
@@ -78,15 +78,15 @@
v-model=
"formData.planId"
v-model=
"formData.planId"
:disabled=
"formType !== 'create' || !formData.contractId"
:disabled=
"formType !== 'create' || !formData.contractId"
class=
"!w-1/1"
class=
"!w-1/1"
@
change=
"handleReceivablePlanChange"
placeholder=
"请选择回款期数"
placeholder=
"请选择回款期数"
@
change=
"handleReceivablePlanChange"
>
>
<el-option
<el-option
v-for=
"data in receivablePlanList"
v-for=
"data in receivablePlanList"
:key=
"data.id"
:key=
"data.id"
:disabled=
"data.receivableId"
:label=
"'第 ' + data.period + ' 期'"
:label=
"'第 ' + data.period + ' 期'"
:value=
"data.id!"
:value=
"data.id!"
:disabled=
"data.receivableId"
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -109,11 +109,11 @@
...
@@ -109,11 +109,11 @@
<el-form-item
label=
"回款金额"
prop=
"price"
>
<el-form-item
label=
"回款金额"
prop=
"price"
>
<el-input-number
<el-input-number
v-model=
"formData.price"
v-model=
"formData.price"
:min=
"0.01"
:precision=
"2"
class=
"!w-100%"
class=
"!w-100%"
controls-position=
"right"
controls-position=
"right"
placeholder=
"请输入回款金额"
placeholder=
"请输入回款金额"
:min=
"0.01"
:precision=
"2"
/>
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -145,12 +145,12 @@
...
@@ -145,12 +145,12 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
*
as
ReceivablePlanApi
from
'@/api/crm/receivable/plan'
import
*
as
ReceivablePlanApi
from
'@/api/crm/receivable/plan'
import
*
as
ReceivableApi
from
'@/api/crm/receivable'
import
*
as
ReceivableApi
from
'@/api/crm/receivable'
import
{
ReceivableVO
}
from
'@/api/crm/receivable'
import
*
as
UserApi
from
'@/api/system/user'
import
*
as
UserApi
from
'@/api/system/user'
import
*
as
CustomerApi
from
'@/api/crm/customer'
import
*
as
CustomerApi
from
'@/api/crm/customer'
import
*
as
ContractApi
from
'@/api/crm/contract'
import
*
as
ContractApi
from
'@/api/crm/contract'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
form
from
'@/components/Form/src/Form.vue'
const
{
t
}
=
useI18n
()
// 国际化
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
...
@@ -185,9 +185,10 @@ const open = async (
...
@@ -185,9 +185,10 @@ const open = async (
if
(
id
)
{
if
(
id
)
{
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
formData
.
value
=
await
ReceivableApi
.
getReceivable
(
id
)
const
data
=
(
await
ReceivableApi
.
getReceivable
(
id
))
as
ReceivableVO
await
handleCustomerChange
(
formData
.
value
.
customerId
)
formData
.
value
=
data
formData
.
value
.
contractId
=
formData
.
value
.
contract
.
id
await
handleCustomerChange
(
data
.
customerId
!
)
formData
.
value
.
contractId
=
data
?.
contract
?.
id
}
finally
{
}
finally
{
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
...
@@ -266,7 +267,7 @@ const handleContractChange = async (contractId: number) => {
...
@@ -266,7 +267,7 @@ const handleContractChange = async (contractId: number) => {
// 获得回款计划列表
// 获得回款计划列表
receivablePlanList
.
value
=
[]
receivablePlanList
.
value
=
[]
receivablePlanList
.
value
=
await
ReceivablePlanApi
.
getReceivablePlanSimpleList
(
receivablePlanList
.
value
=
await
ReceivablePlanApi
.
getReceivablePlanSimpleList
(
formData
.
value
.
customerId
,
formData
.
value
.
customerId
!
,
contractId
contractId
)
)
// 设置金额
// 设置金额
...
...
src/views/crm/receivable/plan/ReceivablePlanForm.vue
View file @
4dabfcba
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"还款期数"
prop=
"period"
>
<el-form-item
label=
"还款期数"
prop=
"period"
>
<el-input
disabled
v-model=
"formData.period"
placeholder=
"保存时自动生成"
/>
<el-input
v-model=
"formData.period"
disabled
placeholder=
"保存时自动生成"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -38,8 +38,8 @@
...
@@ -38,8 +38,8 @@
:disabled=
"formType !== 'create'"
:disabled=
"formType !== 'create'"
class=
"w-1/1"
class=
"w-1/1"
filterable
filterable
@
change=
"handleCustomerChange"
placeholder=
"请选择客户"
placeholder=
"请选择客户"
@
change=
"handleCustomerChange"
>
>
<el-option
<el-option
v-for=
"item in customerList"
v-for=
"item in customerList"
...
@@ -74,11 +74,11 @@
...
@@ -74,11 +74,11 @@
<el-form-item
label=
"计划回款金额"
prop=
"price"
>
<el-form-item
label=
"计划回款金额"
prop=
"price"
>
<el-input-number
<el-input-number
v-model=
"formData.price"
v-model=
"formData.price"
:min=
"0.01"
:precision=
"2"
class=
"!w-100%"
class=
"!w-100%"
controls-position=
"right"
controls-position=
"right"
placeholder=
"请输入计划回款金额"
placeholder=
"请输入计划回款金额"
:min=
"0.01"
:precision=
"2"
/>
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -136,7 +136,7 @@ import * as CustomerApi from '@/api/crm/customer'
...
@@ -136,7 +136,7 @@ import * as CustomerApi from '@/api/crm/customer'
import
*
as
ContractApi
from
'@/api/crm/contract'
import
*
as
ContractApi
from
'@/api/crm/contract'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
aw
}
from
'../../../../../dist-prod/assets/index-9eac537b
'
import
{
cloneDeep
}
from
'lodash-es
'
const
{
t
}
=
useI18n
()
// 国际化
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
...
@@ -167,7 +167,10 @@ const open = async (type: string, id?: number, customerId?: number, contractId?:
...
@@ -167,7 +167,10 @@ const open = async (type: string, id?: number, customerId?: number, contractId?:
if
(
id
)
{
if
(
id
)
{
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
formData
.
value
=
await
ReceivablePlanApi
.
getReceivablePlan
(
id
)
const
data
=
await
ReceivablePlanApi
.
getReceivablePlan
(
id
)
formData
.
value
=
cloneDeep
(
data
)
await
handleCustomerChange
(
data
.
customerId
!
)
formData
.
value
.
contractId
=
data
?.
contractId
}
finally
{
}
finally
{
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
...
...
src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue
View file @
4dabfcba
...
@@ -2,39 +2,40 @@
...
@@ -2,39 +2,40 @@
<!-- 列表 -->
<!-- 列表 -->
<ContentWrap>
<ContentWrap>
<el-button
<el-button
type=
"primary
"
v-hasPermi=
"['infra:demo03-student:create']
"
plain
plain
type=
"primary"
@
click=
"openForm('create')"
@
click=
"openForm('create')"
v-hasPermi=
"['infra:demo03-student:create']"
>
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
<Icon
class=
"mr-5px"
icon=
"ep:plus"
/>
新增
</el-button>
</el-button>
<el-table
v-loading=
"loading"
:data=
"list"
:s
tripe=
"true"
:show-overflow-tooltip
=
"true"
>
<el-table
v-loading=
"loading"
:data=
"list"
:s
how-overflow-tooltip=
"true"
:stripe
=
"true"
>
<el-table-column
label=
"编号"
align=
"center
"
prop=
"id"
/>
<el-table-column
align=
"center"
label=
"编号
"
prop=
"id"
/>
<el-table-column
label=
"名字"
align=
"center
"
prop=
"name"
/>
<el-table-column
align=
"center"
label=
"名字
"
prop=
"name"
/>
<el-table-column
label=
"分数"
align=
"center
"
prop=
"score"
/>
<el-table-column
align=
"center"
label=
"分数
"
prop=
"score"
/>
<el-table-column
<el-table-column
label=
"创建时间
"
:formatter=
"dateFormatter
"
align=
"center"
align=
"center"
label=
"创建时间"
prop=
"createTime"
prop=
"createTime"
:formatter=
"dateFormatter"
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
label=
"操作"
align=
"center
"
>
<el-table-column
align=
"center"
label=
"操作
"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-button
<el-button
v-hasPermi=
"['infra:demo03-student:update']"
link
link
type=
"primary"
type=
"primary"
@
click=
"openForm('update', scope.row.id)"
@
click=
"openForm('update', scope.row.id)"
v-hasPermi=
"['infra:demo03-student:update']"
>
>
编辑
编辑
</el-button>
</el-button>
<el-button
<el-button
v-hasPermi=
"['infra:demo03-student:delete']"
link
link
type=
"danger"
type=
"danger"
@
click=
"handleDelete(scope.row.id)"
@
click=
"handleDelete(scope.row.id)"
v-hasPermi=
"['infra:demo03-student:delete']"
>
>
删除
删除
</el-button>
</el-button>
...
@@ -43,9 +44,9 @@
...
@@ -43,9 +44,9 @@
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
<Pagination
<Pagination
:total=
"total"
v-model:page=
"queryParams.pageNo"
v-model:limit=
"queryParams.pageSize"
v-model:limit=
"queryParams.pageSize"
v-model:page=
"queryParams.pageNo"
:total=
"total"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
...
@@ -53,7 +54,7 @@
...
@@ -53,7 +54,7 @@
<Demo03CourseForm
ref=
"formRef"
@
success=
"getList"
/>
<Demo03CourseForm
ref=
"formRef"
@
success=
"getList"
/>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
lang=
"ts"
setup
>
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
Demo03StudentApi
from
'@/api/infra/demo/demo03/erp'
import
*
as
Demo03StudentApi
from
'@/api/infra/demo/demo03/erp'
import
Demo03CourseForm
from
'./Demo03CourseForm.vue'
import
Demo03CourseForm
from
'./Demo03CourseForm.vue'
...
@@ -62,7 +63,7 @@ const { t } = useI18n() // 国际化
...
@@ -62,7 +63,7 @@ const { t } = useI18n() // 国际化
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
studentId
:
undefined
// 学生编号(主表的关联字段)
studentId
?:
number
// 学生编号(主表的关联字段)
}
>
()
}
>
()
const
loading
=
ref
(
false
)
// 列表的加载中
const
loading
=
ref
(
false
)
// 列表的加载中
const
list
=
ref
([])
// 列表的数据
const
list
=
ref
([])
// 列表的数据
...
@@ -70,17 +71,20 @@ const total = ref(0) // 列表的总页数
...
@@ -70,17 +71,20 @@ const total = ref(0) // 列表的总页数
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
studentId
:
undefined
studentId
:
undefined
as
unknown
})
})
/** 监听主表的关联字段的变化,加载对应的子表数据 */
/** 监听主表的关联字段的变化,加载对应的子表数据 */
watch
(
watch
(
()
=>
props
.
studentId
,
()
=>
props
.
studentId
,
(
val
)
=>
{
(
val
:
number
)
=>
{
if
(
!
val
)
{
return
}
queryParams
.
studentId
=
val
queryParams
.
studentId
=
val
handleQuery
()
handleQuery
()
},
},
{
immediate
:
fals
e
}
{
immediate
:
true
,
deep
:
tru
e
}
)
)
/** 查询列表 */
/** 查询列表 */
...
...
src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue
View file @
4dabfcba
...
@@ -2,39 +2,40 @@
...
@@ -2,39 +2,40 @@
<!-- 列表 -->
<!-- 列表 -->
<ContentWrap>
<ContentWrap>
<el-button
<el-button
type=
"primary
"
v-hasPermi=
"['infra:demo03-student:create']
"
plain
plain
type=
"primary"
@
click=
"openForm('create')"
@
click=
"openForm('create')"
v-hasPermi=
"['infra:demo03-student:create']"
>
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
<Icon
class=
"mr-5px"
icon=
"ep:plus"
/>
新增
</el-button>
</el-button>
<el-table
v-loading=
"loading"
:data=
"list"
:s
tripe=
"true"
:show-overflow-tooltip
=
"true"
>
<el-table
v-loading=
"loading"
:data=
"list"
:s
how-overflow-tooltip=
"true"
:stripe
=
"true"
>
<el-table-column
label=
"编号"
align=
"center
"
prop=
"id"
/>
<el-table-column
align=
"center"
label=
"编号
"
prop=
"id"
/>
<el-table-column
label=
"名字"
align=
"center
"
prop=
"name"
/>
<el-table-column
align=
"center"
label=
"名字
"
prop=
"name"
/>
<el-table-column
label=
"班主任"
align=
"center
"
prop=
"teacher"
/>
<el-table-column
align=
"center"
label=
"班主任
"
prop=
"teacher"
/>
<el-table-column
<el-table-column
label=
"创建时间
"
:formatter=
"dateFormatter
"
align=
"center"
align=
"center"
label=
"创建时间"
prop=
"createTime"
prop=
"createTime"
:formatter=
"dateFormatter"
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
label=
"操作"
align=
"center
"
>
<el-table-column
align=
"center"
label=
"操作
"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-button
<el-button
v-hasPermi=
"['infra:demo03-student:update']"
link
link
type=
"primary"
type=
"primary"
@
click=
"openForm('update', scope.row.id)"
@
click=
"openForm('update', scope.row.id)"
v-hasPermi=
"['infra:demo03-student:update']"
>
>
编辑
编辑
</el-button>
</el-button>
<el-button
<el-button
v-hasPermi=
"['infra:demo03-student:delete']"
link
link
type=
"danger"
type=
"danger"
@
click=
"handleDelete(scope.row.id)"
@
click=
"handleDelete(scope.row.id)"
v-hasPermi=
"['infra:demo03-student:delete']"
>
>
删除
删除
</el-button>
</el-button>
...
@@ -43,9 +44,9 @@
...
@@ -43,9 +44,9 @@
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
<Pagination
<Pagination
:total=
"total"
v-model:page=
"queryParams.pageNo"
v-model:limit=
"queryParams.pageSize"
v-model:limit=
"queryParams.pageSize"
v-model:page=
"queryParams.pageNo"
:total=
"total"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
...
@@ -53,7 +54,7 @@
...
@@ -53,7 +54,7 @@
<Demo03GradeForm
ref=
"formRef"
@
success=
"getList"
/>
<Demo03GradeForm
ref=
"formRef"
@
success=
"getList"
/>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
lang=
"ts"
setup
>
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
Demo03StudentApi
from
'@/api/infra/demo/demo03/erp'
import
*
as
Demo03StudentApi
from
'@/api/infra/demo/demo03/erp'
import
Demo03GradeForm
from
'./Demo03GradeForm.vue'
import
Demo03GradeForm
from
'./Demo03GradeForm.vue'
...
@@ -62,7 +63,7 @@ const { t } = useI18n() // 国际化
...
@@ -62,7 +63,7 @@ const { t } = useI18n() // 国际化
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
studentId
:
undefined
// 学生编号(主表的关联字段)
studentId
?:
number
// 学生编号(主表的关联字段)
}
>
()
}
>
()
const
loading
=
ref
(
false
)
// 列表的加载中
const
loading
=
ref
(
false
)
// 列表的加载中
const
list
=
ref
([])
// 列表的数据
const
list
=
ref
([])
// 列表的数据
...
@@ -70,17 +71,20 @@ const total = ref(0) // 列表的总页数
...
@@ -70,17 +71,20 @@ const total = ref(0) // 列表的总页数
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
studentId
:
undefined
studentId
:
undefined
as
unknown
})
})
/** 监听主表的关联字段的变化,加载对应的子表数据 */
/** 监听主表的关联字段的变化,加载对应的子表数据 */
watch
(
watch
(
()
=>
props
.
studentId
,
()
=>
props
.
studentId
,
(
val
)
=>
{
(
val
:
number
)
=>
{
if
(
!
val
)
{
return
}
queryParams
.
studentId
=
val
queryParams
.
studentId
=
val
handleQuery
()
handleQuery
()
},
},
{
immediate
:
fals
e
}
{
immediate
:
true
,
deep
:
tru
e
}
)
)
/** 查询列表 */
/** 查询列表 */
...
...
src/views/infra/demo/demo03/erp/index.vue
View file @
4dabfcba
...
@@ -4,23 +4,23 @@
...
@@ -4,23 +4,23 @@
<ContentWrap>
<ContentWrap>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-form
<el-form
class=
"-mb-15px"
:model=
"queryParams"
ref=
"queryFormRef"
ref=
"queryFormRef"
:inline=
"true"
:inline=
"true"
:model=
"queryParams"
class=
"-mb-15px"
label-width=
"68px"
label-width=
"68px"
>
>
<el-form-item
label=
"名字"
prop=
"name"
>
<el-form-item
label=
"名字"
prop=
"name"
>
<el-input
<el-input
v-model=
"queryParams.name"
v-model=
"queryParams.name"
placeholder=
"请输入名字
"
class=
"!w-240px
"
clearable
clearable
placeholder=
"请输入名字"
@
keyup
.
enter=
"handleQuery"
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"性别"
prop=
"sex"
>
<el-form-item
label=
"性别"
prop=
"sex"
>
<el-select
v-model=
"queryParams.sex"
placeholder=
"请选择性别"
clearable
class=
"!w-240px
"
>
<el-select
v-model=
"queryParams.sex"
class=
"!w-240px"
clearable
placeholder=
"请选择性别
"
>
<el-option
<el-option
v-for=
"dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)"
v-for=
"dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)"
:key=
"dict.value"
:key=
"dict.value"
...
@@ -32,33 +32,41 @@
...
@@ -32,33 +32,41 @@
<el-form-item
label=
"创建时间"
prop=
"createTime"
>
<el-form-item
label=
"创建时间"
prop=
"createTime"
>
<el-date-picker
<el-date-picker
v-model=
"queryParams.createTime"
v-model=
"queryParams.createTime"
value-format=
"YYYY-MM-DD HH:mm:ss"
type=
"daterange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"[new Date('1 00:00:00'), new Date('1 23:59:59')]"
:default-time=
"[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class=
"!w-240px"
class=
"!w-240px"
end-placeholder=
"结束日期"
start-placeholder=
"开始日期"
type=
"daterange"
value-format=
"YYYY-MM-DD HH:mm:ss"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"handleQuery"
>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<Icon
class=
"mr-5px"
icon=
"ep:search"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
>
<Icon
class=
"mr-5px"
icon=
"ep:refresh"
/>
重置
</el-button>
<el-button
<el-button
type=
"primary
"
v-hasPermi=
"['infra:demo03-student:create']
"
plain
plain
type=
"primary"
@
click=
"openForm('create')"
@
click=
"openForm('create')"
v-hasPermi=
"['infra:demo03-student:create']"
>
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
新增
<Icon
class=
"mr-5px"
icon=
"ep:plus"
/>
新增
</el-button>
</el-button>
<el-button
<el-button
type=
"success"
v-hasPermi=
"['infra:demo03-student:export']"
:loading=
"exportLoading"
plain
plain
type=
"success"
@
click=
"handleExport"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['infra:demo03-student:export']"
>
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
<Icon
class=
"mr-5px"
icon=
"ep:download"
/>
导出
</el-button>
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -69,48 +77,48 @@
...
@@ -69,48 +77,48 @@
<el-table
<el-table
v-loading=
"loading"
v-loading=
"loading"
:data=
"list"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
:show-overflow-tooltip=
"true"
:stripe=
"true"
highlight-current-row
highlight-current-row
@
current-change=
"handleCurrentChange"
@
current-change=
"handleCurrentChange"
>
>
<el-table-column
label=
"编号"
align=
"center
"
prop=
"id"
/>
<el-table-column
align=
"center"
label=
"编号
"
prop=
"id"
/>
<el-table-column
label=
"名字"
align=
"center
"
prop=
"name"
/>
<el-table-column
align=
"center"
label=
"名字
"
prop=
"name"
/>
<el-table-column
label=
"性别"
align=
"center
"
prop=
"sex"
>
<el-table-column
align=
"center"
label=
"性别
"
prop=
"sex"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.SYSTEM_USER_SEX"
:value=
"scope.row.sex"
/>
<dict-tag
:type=
"DICT_TYPE.SYSTEM_USER_SEX"
:value=
"scope.row.sex"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"出生日期
"
:formatter=
"dateFormatter
"
align=
"center"
align=
"center"
label=
"出生日期"
prop=
"birthday"
prop=
"birthday"
:formatter=
"dateFormatter"
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
label=
"简介"
align=
"center
"
prop=
"description"
/>
<el-table-column
align=
"center"
label=
"简介
"
prop=
"description"
/>
<el-table-column
<el-table-column
label=
"创建时间
"
:formatter=
"dateFormatter
"
align=
"center"
align=
"center"
label=
"创建时间"
prop=
"createTime"
prop=
"createTime"
:formatter=
"dateFormatter"
width=
"180px"
width=
"180px"
/>
/>
<el-table-column
label=
"操作"
align=
"center
"
>
<el-table-column
align=
"center"
label=
"操作
"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
v-hasPermi=
"['infra:demo03-student:update']"
link
link
type=
"primary"
type=
"primary"
@
click=
"openForm('update', scope.row.id)"
@
click=
"openForm('update', scope.row.id)"
v-hasPermi=
"['infra:demo03-student:update']"
>
>
编辑
编辑
</el-button>
</el-button>
<el-button
<el-button
v-hasPermi=
"['infra:demo03-student:delete']"
link
link
type=
"danger"
type=
"danger"
@
click=
"handleDelete(scope.row.id)"
@
click=
"handleDelete(scope.row.id)"
v-hasPermi=
"['infra:demo03-student:delete']"
>
>
删除
删除
</el-button>
</el-button>
...
@@ -119,9 +127,9 @@
...
@@ -119,9 +127,9 @@
</el-table>
</el-table>
<!-- 分页 -->
<!-- 分页 -->
<Pagination
<Pagination
:total=
"total"
v-model:page=
"queryParams.pageNo"
v-model:limit=
"queryParams.pageSize"
v-model:limit=
"queryParams.pageSize"
v-model:page=
"queryParams.pageNo"
:total=
"total"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</ContentWrap>
</ContentWrap>
...
@@ -132,17 +140,17 @@
...
@@ -132,17 +140,17 @@
<ContentWrap>
<ContentWrap>
<el-tabs
model-value=
"demo03Course"
>
<el-tabs
model-value=
"demo03Course"
>
<el-tab-pane
label=
"学生课程"
name=
"demo03Course"
>
<el-tab-pane
label=
"学生课程"
name=
"demo03Course"
>
<Demo03CourseList
:student-id=
"currentRow.id"
/>
<Demo03CourseList
:student-id=
"currentRow
?
.id"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"学生班级"
name=
"demo03Grade"
>
<el-tab-pane
label=
"学生班级"
name=
"demo03Grade"
>
<Demo03GradeList
:student-id=
"currentRow.id"
/>
<Demo03GradeList
:student-id=
"currentRow
?
.id"
/>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</ContentWrap>
</ContentWrap>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
lang=
"ts"
setup
>
import
{
getIntDictOptions
,
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
download
from
'@/utils/download'
import
download
from
'@/utils/download'
import
*
as
Demo03StudentApi
from
'@/api/infra/demo/demo03/erp'
import
*
as
Demo03StudentApi
from
'@/api/infra/demo/demo03/erp'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment