Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
c6f338ce
提交
c6f338ce
authored
3月 19, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(plan): 完成计划批量修改给别人功能
同上
上级
e7f50ca2
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
101 行增加
和
13 行删除
+101
-13
plan.js
src/api/promotion/plan.js
+12
-1
index.vue
src/views/bi/supply/index.vue
+0
-1
index.vue
src/views/promotion/plan/index.vue
+89
-11
没有找到文件。
src/api/promotion/plan.js
浏览文件 @
c6f338ce
...
@@ -91,7 +91,7 @@ export function addPlanByWebAPI(data) {
...
@@ -91,7 +91,7 @@ export function addPlanByWebAPI(data) {
export
function
updatePlanByWebAPI
(
data
)
{
export
function
updatePlanByWebAPI
(
data
)
{
return
request
({
return
request
({
baseURL
:
VITE_APP_PROMOTION
,
baseURL
:
VITE_APP_PROMOTION
,
url
:
'/plan/v2/core/
updat
e'
,
url
:
'/plan/v2/core/
on
e'
,
method
:
'PUT'
,
method
:
'PUT'
,
data
data
})
})
...
@@ -119,3 +119,13 @@ export function updatePlanAPI(data) {
...
@@ -119,3 +119,13 @@ export function updatePlanAPI(data) {
data
data
})
})
}
}
// 批量修改计划归属人
export
function
batchUpdatePlanAPI
(
data
)
{
return
request
({
baseURL
:
VITE_APP_PROMOTION
,
url
:
'/plan/v2/core/more'
,
method
:
'PUT'
,
data
})
}
\ No newline at end of file
src/views/bi/supply/index.vue
浏览文件 @
c6f338ce
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
</div>
</div>
</div>
</div>
</el-card>
</el-card>
<el-dialog
title=
"编辑常用报表"
<el-dialog
title=
"编辑常用报表"
v-model=
"visible"
>
v-model=
"visible"
>
<div
class=
"wrap"
>
<div
class=
"wrap"
>
...
...
src/views/promotion/plan/index.vue
浏览文件 @
c6f338ce
...
@@ -140,6 +140,10 @@
...
@@ -140,6 +140,10 @@
plain
plain
icon=
"Plus"
icon=
"Plus"
@
click=
"handleAdd"
>
新增
</el-button>
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
type=
"primary"
plain
icon=
"Edit"
@
click=
"handleEditEmp"
>
修改归属人
</el-button>
<el-button
type=
"warning"
<el-button
type=
"warning"
plain
plain
icon=
"Download"
>
icon=
"Download"
>
...
@@ -325,7 +329,6 @@
...
@@ -325,7 +329,6 @@
filterable
filterable
clearable
clearable
style=
"width: 95%"
style=
"width: 95%"
:disabled=
"cityManagerPrivilege || !!addOrEditPlanForm.id"
@
change=
"selEmployee"
>
@
change=
"selEmployee"
>
<el-option
v-for=
"item in managerList"
<el-option
v-for=
"item in managerList"
:key=
"item.employeeNo"
:key=
"item.employeeNo"
...
@@ -398,12 +401,50 @@
...
@@ -398,12 +401,50 @@
</div>
</div>
</
template
>
</
template
>
</el-dialog>
</el-dialog>
<!-- 修改计划归属人 -->
<el-dialog
title=
"修改计划归属人"
v-model=
"editPlanEmpVisible"
width=
"60%"
>
<!-- 表单 -->
<el-form
:model=
"editPlanEmpForm"
label-width=
"150px"
:rules=
"editPlanEmpRules"
ref=
"editPlanEmpRef"
inline
>
<el-form-item
label=
"归属人"
prop=
"employeeId"
>
<el-select
v-model=
"editPlanEmpForm.employeeId"
placeholder=
"请选择归属人(搜索)"
filterable
clearable
>
<el-option
v-for=
"item in managerList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
</el-form>
<!-- 取消确定 -->
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
type=
"default"
@
click=
"editPlanEmpVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleEditPlanEmp"
:disabled=
"!editPlanEmpForm.employeeId"
>
确定保存
</el-button>
</div>
</
template
>
</el-dialog>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
getPlanListAPI
,
uploadFileToOSSAPI
,
addPlanAPI
,
savePlanAPI
,
deletePlanAPI
,
addPlanByRoleAPI
,
getProCityAPI
,
getDealerListAPI
,
getWarZoneListAPI
,
getChargeListAPI
,
addPlanByWebAPI
,
updatePlanByWebAPI
,
getPlanStoreListAPI
,
updatePlanAPI
}
from
'@/api'
import
{
getPlanListAPI
,
uploadFileToOSSAPI
,
addPlanAPI
,
savePlanAPI
,
deletePlanAPI
,
addPlanByRoleAPI
,
getProCityAPI
,
getDealerListAPI
,
getWarZoneListAPI
,
getChargeListAPI
,
addPlanByWebAPI
,
updatePlanByWebAPI
,
getPlanStoreListAPI
,
updatePlanAPI
,
batchUpdatePlanAPI
}
from
'@/api'
import
{
useDatePickerOptions
}
from
'@/hooks'
import
{
useDatePickerOptions
}
from
'@/hooks'
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
store
from
'@/store'
import
store
from
'@/store'
...
@@ -435,6 +476,7 @@ const taskStatusList = ref([
...
@@ -435,6 +476,7 @@ const taskStatusList = ref([
// 查询参数-区域查询
// 查询参数-区域查询
const
provinceList
=
ref
([])
const
provinceList
=
ref
([])
const
cityList
=
ref
([])
const
cityList
=
ref
([])
const
getProCity
=
async
()
=>
{
const
getProCity
=
async
()
=>
{
const
{
data
}
=
await
getProCityAPI
(
queryParams
)
const
{
data
}
=
await
getProCityAPI
(
queryParams
)
if
(
queryParams
.
provinceId
)
{
if
(
queryParams
.
provinceId
)
{
...
@@ -514,13 +556,13 @@ const regionChange = (val) => {
...
@@ -514,13 +556,13 @@ const regionChange = (val) => {
getPlanList
()
getPlanList
()
}
}
//
等待被删除
的数据
//
表格复选框
的数据
const
delete
List
=
ref
([])
const
checkedRow
List
=
ref
([])
// 全选
// 全选
const
handleSelectionChange
=
(
val
)
=>
{
const
handleSelectionChange
=
(
val
)
=>
{
delete
List
.
value
=
val
checkedRow
List
.
value
=
val
multiple
.
value
=
!
(
delete
List
.
value
.
length
>
0
)
multiple
.
value
=
!
(
checkedRow
List
.
value
.
length
>
0
)
}
}
// 任务列表
// 任务列表
...
@@ -698,6 +740,38 @@ const tableRowTimeOutClassName = ({ row }) => {
...
@@ -698,6 +740,38 @@ const tableRowTimeOutClassName = ({ row }) => {
}
}
}
}
// 批量修改归属人
const
editPlanEmpVisible
=
ref
(
false
)
const
editPlanEmpForm
=
ref
({
employeeId
:
null
})
const
editPlanEmpRules
=
ref
({
employeeId
:
[{
required
:
true
,
message
:
'请选择归属人'
,
trigger
:
'change'
}]
})
const
handleEditEmp
=
()
=>
{
editPlanEmpVisible
.
value
=
true
nextTick
(()
=>
{
editPlanEmpForm
.
value
.
employeeId
=
null
proxy
.
resetForm
(
"editPlanEmpRef"
);
})
}
// 确定批量修改计划人
const
handleEditPlanEmp
=
async
()
=>
{
const
res
=
await
batchUpdatePlanAPI
({
employeeId
:
editPlanEmpForm
.
value
.
employeeId
,
operName
:
store
.
state
.
value
.
user
.
userInfo
.
userName
,
planIds
:
checkedRowList
.
value
.
map
(
item
=>
item
.
id
)
})
ElMessage
.
success
(
res
.
msg
)
editPlanEmpVisible
.
value
=
false
getPlanList
()
}
// 上传计划表格
// 上传计划表格
const
uploadFile
=
async
(
file
)
=>
{
const
uploadFile
=
async
(
file
)
=>
{
proxy
.
$modal
.
loading
(
"正在上传数据,请稍后..."
);
proxy
.
$modal
.
loading
(
"正在上传数据,请稍后..."
);
...
@@ -956,9 +1030,9 @@ const disabledDateFn = (time) => {
...
@@ -956,9 +1030,9 @@ const disabledDateFn = (time) => {
const
handleAdd
=
()
=>
{
const
handleAdd
=
()
=>
{
resetAddOrEditPlanForm
()
resetAddOrEditPlanForm
()
// 只有城市经理情况下,默认填充当前登录人为归属人
// 只有城市经理情况下,默认填充当前登录人为归属人
if
(
cityManagerPrivilege
.
value
)
{
//
if (cityManagerPrivilege.value) {
addOrEditPlanForm
.
value
.
employeeNo
=
store
.
state
.
value
.
user
.
userInfo
.
userName
//
addOrEditPlanForm.value.employeeNo = store.state.value.user.userInfo.userName
}
//
}
addOrEditPlanVisible
.
value
=
true
addOrEditPlanVisible
.
value
=
true
}
}
const
activityModeList
=
ref
([
const
activityModeList
=
ref
([
...
@@ -1017,6 +1091,10 @@ const handleAddOrEditPlan = async () => {
...
@@ -1017,6 +1091,10 @@ const handleAddOrEditPlan = async () => {
addOrEditPlanForm
.
value
.
operName
=
store
.
state
.
value
.
user
.
userInfo
.
nickName
addOrEditPlanForm
.
value
.
operName
=
store
.
state
.
value
.
user
.
userInfo
.
nickName
addOrEditPlanForm
.
value
.
operId
=
store
.
state
.
value
.
user
.
userInfo
.
userId
addOrEditPlanForm
.
value
.
operId
=
store
.
state
.
value
.
user
.
userInfo
.
userId
if
(
addOrEditPlanForm
.
value
.
id
)
{
if
(
addOrEditPlanForm
.
value
.
id
)
{
// 根据归属人 employeeId 查询它的 id 和名字
const
employeeInfo
=
managerList
.
value
.
find
(
item
=>
item
.
employeeNo
===
addOrEditPlanForm
.
value
.
employeeNo
)
addOrEditPlanForm
.
value
.
employeeId
=
employeeInfo
.
value
addOrEditPlanForm
.
value
.
employeeName
=
employeeInfo
.
label
await
updatePlanByWebAPI
(
addOrEditPlanForm
.
value
)
await
updatePlanByWebAPI
(
addOrEditPlanForm
.
value
)
}
else
{
}
else
{
await
addPlanByWebAPI
(
addOrEditPlanForm
.
value
)
await
addPlanByWebAPI
(
addOrEditPlanForm
.
value
)
...
@@ -1029,7 +1107,7 @@ const handleAddOrEditPlan = async () => {
...
@@ -1029,7 +1107,7 @@ const handleAddOrEditPlan = async () => {
// 删除计划
// 删除计划
const
deletePlane
=
(
row
)
=>
{
const
deletePlane
=
(
row
)
=>
{
delete
List
.
value
=
[
row
]
checkedRow
List
.
value
=
[
row
]
handleDelete
()
handleDelete
()
}
}
const
handleDelete
=
async
()
=>
{
const
handleDelete
=
async
()
=>
{
...
@@ -1040,7 +1118,7 @@ const handleDelete = async () => {
...
@@ -1040,7 +1118,7 @@ const handleDelete = async () => {
type
:
'warning'
type
:
'warning'
})
})
await
deletePlanAPI
({
await
deletePlanAPI
({
planIds
:
delete
List
.
value
.
map
(
o
=>
o
.
id
),
planIds
:
checkedRow
List
.
value
.
map
(
o
=>
o
.
id
),
employeeNo
:
store
.
state
.
value
.
user
.
userInfo
.
userName
employeeNo
:
store
.
state
.
value
.
user
.
userInfo
.
userName
})
})
ElMessage
.
success
(
'删除成功'
)
ElMessage
.
success
(
'删除成功'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论