Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
91729326
提交
91729326
authored
2月 14, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(plan): 超过当日 10 点的无法删除计划
同上
上级
db5f6437
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
107 行增加
和
44 行删除
+107
-44
.env.development
.env.development
+3
-0
.env.production
.env.production
+3
-0
.env.staging
.env.staging
+3
-0
plan.js
src/api/promotion/plan.js
+3
-4
jimu.vue
src/views/jimureport/jimu.vue
+3
-23
index.vue
src/views/promotion/plan/index.vue
+92
-17
没有找到文件。
.env.development
浏览文件 @
91729326
...
...
@@ -16,3 +16,5 @@ VITE_APP_PUBLIC_PATH = '/'
# 第三方服务回调地址
VITE_APP_REDIRECT_URL = 'http://localhost:8080/'
# 积木报表网页资源地址
VITE_APP_REPORT_URL = 'http://192.168.100.39:8080'
\ No newline at end of file
.env.production
浏览文件 @
91729326
...
...
@@ -13,3 +13,5 @@ VITE_APP_PUBLIC_PATH = './'
# 第三方服务回调地址
VITE_APP_REDIRECT_URL = 'http://111.198.15.68:86/link/'
# 积木报表网页资源地址
VITE_APP_REPORT_URL = 'http://111.198.15.68:8080/'
\ No newline at end of file
.env.staging
浏览文件 @
91729326
...
...
@@ -13,3 +13,5 @@ VITE_APP_PUBLIC_PATH = './'
# 第三方服务回调地址
VITE_APP_REDIRECT_URL = 'http://111.198.15.68:85/link/'
# 积木报表网页资源地址
VITE_APP_REPORT_URL = 'http://111.198.15.68:8080/'
\ No newline at end of file
src/api/promotion/plan.js
浏览文件 @
91729326
...
...
@@ -50,13 +50,11 @@ export function savePlanAPI(uuid) {
// 删除活动计划
export
function
deletePlanAPI
(
ids
)
{
export
function
deletePlanAPI
(
data
)
{
return
request
({
baseURL
:
VITE_APP_PROMOTION
,
url
:
`/plan/v2/core/delete`
,
method
:
'DELETE'
,
data
:
{
planIds
:
ids
}
data
})
}
\ No newline at end of file
src/views/jimureport/jimu.vue
浏览文件 @
91729326
<
template
>
<i-frame
:src=
"openUrl"
id=
"jimuReportFrame"
ref=
"myIframe"
@
load=
"load"
></i-frame>
id=
"jimuReportFrame"
></i-frame>
</
template
>
<
script
>
// 报表设计器
...
...
@@ -14,25 +12,8 @@ export default {
data
()
{
return
{
// 这里写暴露的统一的网关地址
openUrl
:
"http://192.168.100.39:8080/report/jmreport/list?token="
+
getToken
(),
openUrl
:
`
${
import
.
meta
.
env
.
VITE_APP_REPORT_URL
}
/report/jmreport/list?token=`
+
getToken
(),
};
},
mounted
:
function
()
{
},
methods
:
{
load
()
{
setTimeout
(()
=>
{
const
iframe
=
this
.
$refs
.
myIframe
;
console
.
log
(
iframe
.
contentDocument
)
const
iframeBody
=
iframe
.
body
;
console
.
log
(
iframeBody
)
},
5000
)
// 现在你可以操作 iframeBody 中的标签了
// const h1Element = iframeBody.querySelector('h1');
// console.log(h1Element.textContent); // 输出 h1 标签的文本内容
}
}
};
</
script
>
...
...
@@ -40,8 +21,8 @@ export default {
<
style
lang=
"scss"
>
#jimuReportFrame
{
width
:
100%
;
// 为了隐藏积木报表顶部的广告栏
min-height
:
calc
(
100vh
-
50px
)
!
important
;
// height: calc(100vh + 50px) !important;
margin-top
:
-50px
;
}
</
style
>
\ No newline at end of file
src/views/promotion/plan/index.vue
浏览文件 @
91729326
...
...
@@ -45,9 +45,11 @@
border
style=
"width: 100%"
show-overflow-tooltip
@
selection-change=
"handleSelectionChange"
>
@
selection-change=
"handleSelectionChange"
:row-class-name=
"tableRowTimeOutClassName"
>
<el-table-column
type=
"selection"
width=
"55"
>
width=
"55"
:selectable=
"selectableFn"
>
</el-table-column>
<el-table-column
v-for=
"item in columns"
:key=
"item.label"
...
...
@@ -60,6 +62,7 @@
<
template
#
default=
"scope"
>
<el-button
type=
"danger"
link
:disabled=
"!selectableFn(scope.row)"
@
click=
"deletePlane(scope.row)"
>
删除
</el-button>
...
...
@@ -144,11 +147,22 @@ const columns = ref([
fixed
:
true
},
{
label
:
'
负责
人'
,
label
:
'
归属
人'
,
prop
:
'employeeName'
,
width
:
90
,
fixed
:
true
},
{
label
:
'归属人工号'
,
prop
:
'employeeNo'
,
width
:
140
,
fixed
:
true
},
{
label
:
'经销商 ID'
,
prop
:
'dealerId'
,
width
:
120
},
{
label
:
'经销商'
,
prop
:
'dealerName'
,
...
...
@@ -159,11 +173,21 @@ const columns = ref([
prop
:
'lineName'
,
width
:
100
},
{
label
:
'店铺编码'
,
prop
:
'storeCode'
,
width
:
160
},
{
label
:
'店铺名称'
,
prop
:
'storeName'
,
width
:
200
},
{
label
:
'活动日期'
,
prop
:
'date'
,
width
:
180
},
{
label
:
'活动状态'
,
prop
:
'planStatus'
,
...
...
@@ -180,10 +204,40 @@ const columns = ref([
width
:
100
},
{
label
:
'城市'
,
prop
:
'city'
,
label
:
'地址'
,
prop
:
'addr'
,
width
:
200
},
{
label
:
'上班时间'
,
prop
:
'clockInTime'
,
width
:
180
},
{
label
:
'下班时间'
,
prop
:
'clockOutTime'
,
width
:
180
},
{
label
:
'促销员薪资'
,
prop
:
'salary'
,
width
:
100
},
{
label
:
'杂费'
,
prop
:
'incidentals'
,
width
:
100
},
{
label
:
'战区'
,
prop
:
'orgName'
,
width
:
150
},
// {
// label: '城市',
// prop: 'city',
// width: 100
// },
{
label
:
'最后修改时间'
,
prop
:
'modifyTime'
,
...
...
@@ -204,12 +258,36 @@ getPlanList()
const
formatter
=
(
row
,
col
,
value
)
=>
{
if
(
col
.
property
===
'planStatus'
)
{
return
value
==
0
?
'执行中'
:
'取消'
}
else
if
(
col
.
property
===
'modifyTime'
)
{
}
else
if
(
col
.
property
===
'modifyTime'
||
col
.
property
===
'date'
||
col
.
property
===
'clockInTime'
||
col
.
property
===
'clockOutTime'
)
{
return
parseTime
(
value
)
}
else
{
return
value
}
}
// 判断计划是否过期
const
checkPlanExpire
=
(
row
)
=>
{
const
date
=
new
Date
()
const
targetDate
=
new
Date
(
`
${
date
.
getFullYear
()}
-
${
date
.
getMonth
()
+
1
}
-
${
date
.
getDate
()}
10:00:00`
)
const
rowDate
=
new
Date
(
row
.
date
)
if
(
rowDate
<
targetDate
)
{
return
false
}
else
{
return
true
}
}
// 计划是否可选
const
selectableFn
=
(
row
)
=>
{
return
checkPlanExpire
(
row
)
}
// 计划是否已经过期,不可以操作
const
tableRowTimeOutClassName
=
({
row
})
=>
{
const
isExpire
=
checkPlanExpire
(
row
)
if
(
!
isExpire
)
{
return
'timeout-row'
}
else
{
return
''
}
}
// 上传计划
const
uploadFile
=
async
(
file
)
=>
{
...
...
@@ -314,7 +392,10 @@ const deletePlane = (row) => {
handleDelete
()
}
const
handleDelete
=
async
()
=>
{
await
deletePlanAPI
(
deleteList
.
value
.
map
(
o
=>
o
.
id
))
await
deletePlanAPI
({
ids
:
deleteList
.
value
.
map
(
o
=>
o
.
id
),
employeeNo
:
store
.
state
.
value
.
user
.
userInfo
.
userName
})
ElMessage
.
success
(
'删除成功'
)
getPlanList
()
}
...
...
@@ -326,15 +407,10 @@ const handleDelete = async () => {
::v-deep
(
.error-row
)
{
--el-table-tr-bg-color
:
var
(
--
el-color-error-light-9
);
}
/* 灰色过期行颜色 */
::v-deep
(
.timeout-row
)
{
--el-table-tr-bg-color
:
#e2e2e2
9e
;
}
}
/* .el-table .warning-row {
--el-table-tr-bg-color: var(--el-color-warning-light-9);
}
.el-table .success-row {
--el-table-tr-bg-color: var(--el-color-success-light-9);
}
.el-table .error-row {
} */
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论