Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
89a6758d
提交
89a6758d
authored
5月 21, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(store/user): 重构 pinia 中工号取值方式在页面修改
同上
上级
7259dcb0
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
57 行增加
和
58 行删除
+57
-58
index.vue
src/mobile/views/examine/index.vue
+26
-24
index.vue
src/mobile/views/promotion/plan/detail/index.vue
+1
-1
index.vue
src/mobile/views/promotion/plan/editing/index.vue
+0
-1
index.vue
src/mobile/views/promotion/plan/index/index.vue
+4
-5
planSearch.vue
src/mobile/views/promotion/plan/index/planSearch.vue
+2
-2
user.js
src/store/modules/user.js
+0
-4
index.vue
src/views/bi/livecate/index.vue
+3
-2
index.vue
src/views/bi/sale/index.vue
+1
-2
index.vue
src/views/jimureport/ext/index.vue
+1
-2
index.vue
src/views/promotion/task/index.vue
+19
-15
没有找到文件。
src/mobile/views/examine/index.vue
浏览文件 @
89a6758d
...
...
@@ -186,6 +186,8 @@ import { parseTime } from '@/utils'
const
route
=
useRoute
();
const
router
=
useRouter
();
const
employeeNo
=
userStore
().
empInfo
.
empNo
;
// 员工工号
const
form
=
ref
({
storePicture
:
[],
// 店铺门头照
temNum
:
null
,
// 促销员数量
...
...
@@ -231,7 +233,7 @@ const decreaseCount = async () => {
temNum
:
form
.
value
.
temNum
-
1
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
form
.
value
.
temNum
--
;
}
...
...
@@ -243,7 +245,7 @@ const increaseCount = async () => {
temNum
:
form
.
value
.
temNum
+
1
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
form
.
value
.
temNum
++
;
};
...
...
@@ -302,14 +304,14 @@ const storePictureRead = async (file) => {
const
date
=
new
Date
()
const
month
=
date
.
getMonth
()
+
1
const
theDate
=
date
.
getDate
()
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
userStore
().
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
await
createExamine
({
id
:
form
.
value
.
id
,
storePicture
:
pictureUrl
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
// 删除店铺门头照
...
...
@@ -319,7 +321,7 @@ const deleteStorePicture = async () => {
storePicture
:
''
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -331,7 +333,7 @@ const planStatusChange = async (val) => {
planStatus
:
form
.
value
.
planStatus
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -342,7 +344,7 @@ const changeStoreDd = async () => {
storeDd
:
form
.
value
.
storeDd
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -357,7 +359,7 @@ const changeTemOnWork = async () => {
temOnWork
:
form
.
value
.
temOnWork
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
const
changeTemOnWorkTimeRange
=
()
=>
{
...
...
@@ -378,7 +380,7 @@ const changeTemHs = async () => {
temHs
:
form
.
value
.
temHs
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
const
changeTemWl
=
async
()
=>
{
...
...
@@ -387,7 +389,7 @@ const changeTemWl = async () => {
temWl
:
form
.
value
.
temWl
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
const
changeTemZz
=
async
()
=>
{
...
...
@@ -396,7 +398,7 @@ const changeTemZz = async () => {
temZz
:
form
.
value
.
temZz
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -406,7 +408,7 @@ const temWorkPhotosRead = async (file) => {
const
date
=
new
Date
()
const
month
=
date
.
getMonth
()
+
1
const
theDate
=
date
.
getDate
()
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
userStore
().
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
// 如果当前对象包含 objectUrl 则是组件上传的,替换当前元素的对象
const
index
=
form
.
value
.
temWorkPhotos
.
findIndex
(
o
=>
o
.
objectUrl
)
form
.
value
.
temWorkPhotos
[
index
]
=
{
...
...
@@ -418,7 +420,7 @@ const temWorkPhotosRead = async (file) => {
temWorkPhotos
:
form
.
value
.
temWorkPhotos
.
map
(
o
=>
o
.
url
),
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -429,7 +431,7 @@ const deleteTemWorkPhotos = async () => {
temWorkPhotos
:
form
.
value
.
temWorkPhotos
.
map
(
o
=>
o
.
url
),
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -439,14 +441,14 @@ const storeTcPhotoRead = async (file) => {
const
date
=
new
Date
()
const
month
=
date
.
getMonth
()
+
1
const
theDate
=
date
.
getDate
()
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
userStore
().
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
await
createExamine
({
id
:
form
.
value
.
id
,
storeTcPhoto
:
pictureUrl
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -457,7 +459,7 @@ const deleteStoreTcPhoto = async () => {
storeTcPhoto
:
''
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -467,14 +469,14 @@ const temOnWorkPictureRead = async (file) => {
const
date
=
new
Date
()
const
month
=
date
.
getMonth
()
+
1
const
theDate
=
date
.
getDate
()
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
userStore
().
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
await
createExamine
({
id
:
form
.
value
.
id
,
storeZhjPhoto
:
pictureUrl
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
// 删除主货架照片
...
...
@@ -484,7 +486,7 @@ const deleteStoreZhjPhoto = async () => {
storeZhjPhoto
:
''
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -494,7 +496,7 @@ const posPhotosRead = async (file) => {
const
date
=
new
Date
()
const
month
=
date
.
getMonth
()
+
1
const
theDate
=
date
.
getDate
()
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
userStore
().
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
const
pictureUrl
=
await
uploadFileToOSSAPI
(
`examine/
${
date
.
getFullYear
()}
-
${
month
}
/
${
theDate
}
/
${
planId
.
value
}
/
${
employeeNo
}
/
${
uuidv4
()}
.png`
,
file
.
file
)
// 判断 objectUrl
const
index
=
form
.
value
.
posPhotos
.
findIndex
(
o
=>
o
.
objectUrl
)
form
.
value
.
posPhotos
[
index
]
=
{
...
...
@@ -506,7 +508,7 @@ const posPhotosRead = async (file) => {
posPhotos
:
form
.
value
.
posPhotos
.
map
(
o
=>
o
.
url
),
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
// 删除 POS 照片
...
...
@@ -516,7 +518,7 @@ const deletePosPhotos = async () => {
posPhotos
:
form
.
value
.
posPhotos
.
map
(
o
=>
o
.
url
),
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
@@ -527,7 +529,7 @@ const posRmbChange = async () => {
posRmb
:
form
.
value
.
posRmb
||
0
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
employeeNo
,
// 稽查人工号
})
}
...
...
src/mobile/views/promotion/plan/detail/index.vue
浏览文件 @
89a6758d
...
...
@@ -205,7 +205,7 @@ const clickExamine = async () => {
planStatus
:
planDetail
.
value
.
planStatus
===
0
?
'否'
:
'是'
,
employeeId
:
userStore
().
userInfo
.
userId
,
// 稽查人id
employeeName
:
userStore
().
userInfo
.
nickName
,
// 稽查人名字
employeeNo
:
userStore
().
employeeNo
,
// 稽查人工号
employeeNo
:
userStore
().
userInfo
.
userName
,
// 稽查人工号
}
)
if
(
!
result
.
data
)
{
return
proxy
.
$modal
.
msgError
(
'创建稽查任务失败'
)
...
...
src/mobile/views/promotion/plan/editing/index.vue
浏览文件 @
89a6758d
...
...
@@ -169,7 +169,6 @@ import PickerBelong from '../components/PickerBelong'
const
myForm
=
ref
({})
const
{
proxy
}
=
getCurrentInstance
();
const
employeeNo
=
computed
(()
=>
userStore
().
employeeNo
)
const
empInfo
=
userStore
().
empInfo
const
isCityManager
=
ref
(
userStore
().
promotionIdentity
)
const
form
=
reactive
({})
...
...
src/mobile/views/promotion/plan/index/index.vue
浏览文件 @
89a6758d
...
...
@@ -97,8 +97,7 @@ import PickerBelong from '../components/PickerBelong'
const
{
proxy
}
=
getCurrentInstance
();
const
router
=
useRouter
()
const
route
=
useRoute
()
const
promotionIdentity
=
computed
(()
=>
userStore
().
promotionIdentity
)
const
employeeNo
=
computed
(()
=>
userStore
().
employeeNo
)
const
isCityManager
=
userStore
().
promotionIdentity
const
empInfo
=
userStore
().
empInfo
// 搜索弹窗
...
...
@@ -153,7 +152,7 @@ const getPlanList = async () => {
activityStartDate
:
parseTime
(
query
.
activityStartDate
,
"{y
}
-{m
}
-{d
}
"
),
activityEndDate
:
parseTime
(
query
.
activityEndDate
,
"{y
}
-{m
}
-{d
}
"
),
planStatus
:
planColumns
.
find
(
item
=>
item
.
text
===
query
.
planStatus
)?.
value
,
employeeId
:
promotionIdentity
.
value
?
allEmpolyeeList
.
value
.
find
(
o
=>
o
.
employeeNo
===
employeeNo
.
value
)?.
value
:
query
.
employeeId
,
employeeId
:
isCityManager
?
allEmpolyeeList
.
value
.
find
(
o
=>
o
.
employeeNo
===
empInfo
.
empNo
)?.
value
:
query
.
employeeId
,
storeNameLike
:
query
.
storeNameLike
,
statusType
:
query
.
isDeleted
}
,
...
...
@@ -211,7 +210,7 @@ const deletePlan = (row) => {
proxy
.
$modal
.
confirm
(
`确认删除计划吗?`
).
then
(
async
()
=>
{
await
deletePlanAPI
({
planIds
:
[
row
.
id
],
employeeNo
:
emp
loyeeNo
.
value
employeeNo
:
emp
Info
.
empNo
}
)
proxy
.
$modal
.
msgSuccess
(
'删除成功'
)
// 重新获取列表
...
...
@@ -248,7 +247,7 @@ const clickDelSome = () => {
}
await
deletePlanAPI
({
planIds
:
ids
,
employeeNo
:
emp
loyeeNo
.
value
employeeNo
:
emp
Info
.
empNo
}
)
proxy
.
$modal
.
msgSuccess
(
'删除成功'
)
showSelect
.
value
=
false
...
...
src/mobile/views/promotion/plan/index/planSearch.vue
浏览文件 @
89a6758d
...
...
@@ -156,8 +156,8 @@ const showEmployee = ref(false)
// 如果是城市经理,设置默认归属人
watch
(()
=>
props
.
allEmpolyeeList
,
(
newVal
)
=>
{
if
(
newVal
.
length
>
0
&&
promotionIdentity
.
value
)
{
props
.
query
.
employeeName
=
newVal
.
find
(
o
=>
o
.
employeeNo
===
userStore
().
employeeNo
)?.
text
props
.
query
.
employeeId
=
newVal
.
find
(
o
=>
o
.
employeeNo
===
userStore
().
employeeNo
)?.
value
props
.
query
.
employeeName
=
newVal
.
find
(
o
=>
o
.
employeeNo
===
userStore
().
userInfo
.
userName
)?.
text
props
.
query
.
employeeId
=
newVal
.
find
(
o
=>
o
.
employeeNo
===
userStore
().
userInfo
.
userName
)?.
value
}
})
...
...
src/store/modules/user.js
浏览文件 @
89a6758d
...
...
@@ -110,10 +110,6 @@ export default defineStore(
empNo
:
state
.
userInfo
.
userName
,
// 员工工号
empName
:
state
.
userInfo
.
nickName
,
// 员工昵称名字
}
},
// 获取员工工号
employeeNo
(
state
)
{
return
state
.
userInfo
.
userName
}
}
})
...
...
src/views/bi/livecate/index.vue
浏览文件 @
89a6758d
...
...
@@ -36,7 +36,8 @@
<
script
setup
>
import
{
getLiveCate
,
uploadLiveCate
}
from
'@/api'
import
{
ElMessage
}
from
'element-plus'
const
{
proxy
}
=
getCurrentInstance
()
const
tableData
=
ref
([])
const
queryParams
=
ref
({
...
...
@@ -62,7 +63,7 @@ const uploadExcel = () => {
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
file
);
const
res
=
await
uploadLiveCate
(
formData
)
ElMessage
.
s
uccess
(
res
.
data
)
proxy
.
$modal
.
msgS
uccess
(
res
.
data
)
}
});
...
...
src/views/bi/sale/index.vue
浏览文件 @
89a6758d
...
...
@@ -303,7 +303,6 @@ import { getObjValueByPath, formatNumberWithUnit, deepClone, parseTime } from '@
import
LineChart
from
'./LineChart.vue'
;
import
gsap
from
'gsap'
import
{
useDatePickerOptions
}
from
'@/hooks'
import
{
ElMessage
}
from
'element-plus'
;
const
{
proxy
}
=
getCurrentInstance
();
const
dict
=
proxy
.
useDict
(
"sale_platform"
)
...
...
@@ -584,7 +583,7 @@ const submitUploadDemandFn = async () => {
fd
.
append
(
'file'
,
uploadDemand
.
file
)
fd
.
append
(
'year'
,
uploadDemand
.
year
.
getFullYear
())
const
res
=
await
uploadDemandImportAPI
(
fd
)
ElMessage
.
s
uccess
(
res
.
msg
)
proxy
.
$modal
.
msgS
uccess
(
res
.
msg
)
uploadDemandImportVisible
.
value
=
false
}
...
...
src/views/jimureport/ext/index.vue
浏览文件 @
89a6758d
...
...
@@ -43,7 +43,6 @@
</template>
<
script
setup
>
import
{
ElMessage
}
from
'element-plus'
import
{
enterOtherReportAPI
,
getReportFolderListAPI
}
from
'@/api'
const
{
proxy
}
=
getCurrentInstance
();
...
...
@@ -84,7 +83,7 @@ const handleSubmit = async () => {
if
(
valid
)
{
// 表单验证通过,进行提交操作
await
enterOtherReportAPI
(
form
.
value
)
ElMessage
.
s
uccess
(
'提交成功'
)
proxy
.
$modal
.
msgS
uccess
(
'提交成功'
)
// 清空表单
form
.
value
=
{
id
:
''
,
...
...
src/views/promotion/task/index.vue
浏览文件 @
89a6758d
...
...
@@ -71,7 +71,7 @@
placeholder=
"请选择战区"
clearable
filterable
:disabled=
"
cityManagerPrivilege
"
:disabled=
"
isCityManager
"
@
change=
"getTaskList"
>
<el-option
v-for=
"item in zoneList"
:key=
"item.value"
...
...
@@ -83,7 +83,7 @@
prop=
"manager"
>
<el-select
v-model=
"queryParams.managerId"
placeholder=
"请选择负责人"
:disabled=
"
cityManagerPrivilege
"
:disabled=
"
isCityManager
"
clearable
filterable
@
change=
"getTaskList"
>
...
...
@@ -125,7 +125,7 @@
查看照片
</el-button>
<el-button
type=
"danger"
v-if=
"showDelete(scope.row)"
v-if=
"showDelete(scope.row)"
@
click=
"deleteView(scope.row)"
text
>
删除
...
...
@@ -144,7 +144,8 @@
width=
"60%"
>
<p>
活动记录 ID :{{ photoLookInfoObj.id }}
</p>
<p>
活动时间 :{{ photoLookInfoObj.createDate }}
</p>
<el-card
v-for=
"obj in photoDialogList"
shadow=
"never"
>
<el-card
v-for=
"obj in photoDialogList"
shadow=
"never"
>
<
template
#
header
>
{{
obj
.
title
}}
</
template
>
<div
class=
"content"
>
<el-result
:title=
"item.time"
...
...
@@ -168,9 +169,14 @@ import { useDatePickerOptions } from '@/hooks'
import
{
getWarZoneListAPI
,
getChargeListAPI
,
getTaskListAPI
,
getProCityAPI
,
deletePromotionSystemAPI
,
getPromotionSystemAPI
,
getPromotionActivityAPI
}
from
'@/api'
import
{
parseTime
}
from
'@/utils'
import
store
from
'@/store'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
;
import
userStore
from
'@/store/modules/user'
const
{
recentPickerOptions
:
pickerOptions
,
last7Date
,
todayDate
}
=
useDatePickerOptions
(
0
)
// 城市经理状态为 true
const
isCityManager
=
userStore
().
promotionIdentity
const
empInfo
=
userStore
().
empInfo
const
queryParams
=
reactive
({
taskStatus
:
''
,
region
:
'全国'
,
...
...
@@ -188,10 +194,7 @@ const photoDialogList = ref([])
const
photoLookInfoObj
=
ref
({})
const
total
=
ref
(
0
)
// 城市经理状态为 true
const
cityManagerPrivilege
=
computed
(()
=>
{
return
store
.
state
?.
value
?.
user
?.
userInfo
?.
privilegeId
==
1
})
// 任务状态
const
taskStatusList
=
ref
([
...
...
@@ -349,7 +352,7 @@ const columns = ref([
// 删除任务列表
const
deleteView
=
async
(
row
)
=>
{
await
ElMessageBox
.
confirm
(
'确认删除该记录吗?'
,
'提示'
,
{
await
proxy
.
$modal
.
confirm
(
'确认删除该记录吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
...
...
@@ -357,7 +360,7 @@ const deleteView = async (row) => {
await
deletePromotionSystemAPI
(
row
.
id
)
// 提示删除成功
getTaskList
()
ElMessage
.
s
uccess
(
'删除成功'
)
proxy
.
$modal
.
msgS
uccess
(
'删除成功'
)
}
// 获取任务列表
...
...
@@ -367,12 +370,12 @@ const getTaskList = async () => {
queryParams
.
province
=
provinceList
.
value
.
find
(
item
=>
item
.
value
===
queryParams
.
provinceId
)?.
label
queryParams
.
city
=
cityList
.
value
.
find
(
item
=>
item
.
value
===
queryParams
.
cityId
)?.
label
// 城市经理查自己,职能角色查所有(需要的是促销系统 id)
if
(
cityManagerPrivilege
.
value
)
{
if
(
isCityManager
)
{
// 城市经理
await
getManagerList
()
queryParams
.
managerId
=
managerList
.
value
.
find
(
item
=>
item
.
employeeNo
===
store
.
state
.
value
.
user
.
userInfo
.
userName
)?.
value
queryParams
.
managerId
=
managerList
.
value
.
find
(
item
=>
item
.
employeeNo
===
empInfo
.
empNo
)?.
value
// 先从归属人查询当前登录用户的战区 ID
queryParams
.
zoneId
=
managerList
.
value
.
find
(
item
=>
item
.
employeeNo
===
store
.
state
.
value
.
user
.
userInfo
.
userName
)?.
deptQcId
queryParams
.
zoneId
=
managerList
.
value
.
find
(
item
=>
item
.
employeeNo
===
empInfo
.
empNo
)?.
deptQcId
}
const
{
data
:
{
records
,
totalRecord
}
}
=
await
getTaskListAPI
(
queryParams
)
...
...
@@ -511,7 +514,8 @@ const showDelete = (row) => {
::v-deep
(
.el-form-item
)
{
width
:
350px
!
important
;
}
.el-card
{
.el-card
{
margin-top
:
20px
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论