Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9033eeb1
authored
Mar 28, 2024
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调完成
1 parent
0fad7280
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
117 additions
and
22 deletions
src/views/taskList/constant.js
src/views/taskList/detail.vue
src/views/taskList/index.vue
src/views/taskList/constant.js
View file @
9033eeb
export
const
taskSt
utas
=
{
export
const
taskSt
atusEnum
=
{
0
:
{
label
:
'待执行'
,
color
:
'#C6C6C6'
...
...
@@ -12,7 +12,17 @@ export const taskStutas = {
color
:
'#2CCA74'
}
}
export
const
shlftStutas
=
{
export
const
detailTaskStatusEnum
=
{
0
:
{
label
:
'未完成'
,
color
:
'#C6C6C6'
},
1
:
{
label
:
'已完成'
,
color
:
'#2CCA74'
}
}
export
const
shelfStatusEnum
=
{
0
:
{
label
:
'待执行'
,
color
:
'#C6C6C6'
...
...
@@ -26,3 +36,17 @@ export const shlftStutas = {
color
:
'#2CCA74'
}
}
export
const
detailShelfStatusEnum
=
{
0
:
{
label
:
'未上架'
,
color
:
'#C6C6C6'
},
1
:
{
label
:
'已上架'
,
color
:
'#FDB757'
},
2
:
{
label
:
'上架失败'
,
color
:
'#2CCA74'
}
}
src/views/taskList/detail.vue
View file @
9033eeb
...
...
@@ -2,17 +2,29 @@
<div
class=
"container"
>
<div
class=
"global-title"
>
任务详情
</div>
<div
class=
"main"
>
<GLTable
:pageSizes=
"pageSizes"
ref=
"tableRef"
:pageConf=
"pageConf"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:beforeSearchFn=
"beforeSearchFn"
:getListApi=
"getListApi"
></GLTable>
<GLTable
:pageSizes=
"pageSizes"
ref=
"tableRef"
:pageConf=
"pageConf"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:beforeSearchFn=
"beforeSearchFn"
:getListApi=
"getListApi"
>
<div
slot=
"shelfStatusSlot"
slot-scope=
"scope"
>
<span
class=
"status"
:style=
"
{ 'background-color': detailShelfStatusEnum[scope.scope.shelfStatus].color }">
</span>
{{
detailShelfStatusEnum
[
scope
.
scope
.
shelfStatus
]
?
detailShelfStatusEnum
[
scope
.
scope
.
shelfStatus
].
label
:
'--'
}}
</div>
<div
slot=
"taskStatusSlot"
slot-scope=
"scope"
>
<span
class=
"status"
:style=
"
{ 'background-color': detailTaskStatusEnum[scope.scope.taskStatus].color }">
</span>
{{
detailTaskStatusEnum
[
scope
.
scope
.
taskStatus
]
?
detailTaskStatusEnum
[
scope
.
scope
.
taskStatus
].
label
:
'--'
}}
</div>
</GLTable>
</div>
</div>
</
template
>
<
script
>
import
util
from
'@/util/util'
import
{
detailShelfStatusEnum
,
detailTaskStatusEnum
}
from
'./constant'
export
default
{
name
:
'index'
,
data
()
{
return
{
size
:
'small'
,
detailTaskStatusEnum
,
detailShelfStatusEnum
,
getListApi
:
this
.
$apis
.
task
.
getDetailApi
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
pageSizes
:
[
10
,
20
,
30
,
40
,
50
],
...
...
@@ -23,7 +35,9 @@ export default {
tableColumns
:
[
{
label
:
'门店名称'
,
prop
:
'merchantName'
prop
:
'merchantName'
,
width
:
200
,
line
:
1
},
{
label
:
'门店ID'
,
...
...
@@ -31,11 +45,14 @@ export default {
},
{
label
:
'产品编号'
,
prop
:
'skuCode'
prop
:
'skuCode'
,
width
:
200
},
{
label
:
'产品名称'
,
prop
:
'skuName'
prop
:
'skuName'
,
width
:
200
,
line
:
1
},
{
label
:
'数量'
,
...
...
@@ -43,23 +60,30 @@ export default {
},
{
label
:
'单价(元)'
,
prop
:
'unitPrice'
prop
:
'unitPrice'
,
formatter
:
cell
=>
{
return
cell
.
unitPrice
?
(
cell
.
unitPrice
/
100
).
toFixed
(
0
)
:
0
}
},
{
label
:
'商品状态'
,
prop
:
'createdDate
'
addHtml
:
'shelfStatusSlot
'
},
{
label
:
'商品状态描述'
,
prop
:
'failReason'
prop
:
'failReason'
,
width
:
200
,
line
:
1
},
{
label
:
'任务状态'
,
prop
:
'updatedBy
'
addHtml
:
'taskStatusSlot
'
},
{
label
:
'任务状态描述'
,
prop
:
'taskFailReason'
prop
:
'taskFailReason'
,
width
:
200
,
line
:
1
}
]
}
...
...
@@ -82,4 +106,13 @@ export default {
padding
:
20px
;
}
}
.status
{
width
:
6px
;
height
:
6px
;
display
:
inline-block
;
border-radius
:
50%
;
background-color
:
antiquewhite
;
margin-right
:
8px
;
vertical-align
:
middle
;
}
</
style
>
src/views/taskList/index.vue
View file @
9033eeb
<
template
>
<div
class=
"container"
>
<GLCombiForm
ref=
"searchRef"
:rowNumber=
"2"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleOk"
@
handleRest=
"handleRest"
></GLCombiForm>
<GLCombiForm
ref=
"searchRef"
:rowNumber=
"2"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleOk"
@
handleRest=
"handleRest"
>
<div
slot=
"dateSlot"
>
<el-date-picker
class=
"month-class"
v-model=
"searchForm.taskMonth"
type=
"month"
placeholder=
"选择月"
></el-date-picker>
</div>
</GLCombiForm>
<div
class=
"operate_wrap"
>
<span
class=
"table_title"
>
导入列表
</span>
<div
class=
"operate_btn"
>
...
...
@@ -8,6 +12,14 @@
</div>
</div>
<GLTable
:pageSizes=
"pageSizes"
ref=
"tableRef"
:pageConf=
"pageConf"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:beforeSearchFn=
"beforeSearchFn"
:getListApi=
"getListApi"
>
<div
slot=
"shelfStatusSlot"
slot-scope=
"scope"
>
<span
class=
"status"
:style=
"
{ 'background-color': shelfStatusEnum[scope.scope.shelfStatus].color }">
</span>
{{
shelfStatusEnum
[
scope
.
scope
.
shelfStatus
]
?
shelfStatusEnum
[
scope
.
scope
.
shelfStatus
].
label
:
'--'
}}
</div>
<div
slot=
"taskStatusSlot"
slot-scope=
"scope"
>
<span
class=
"status"
:style=
"
{ 'background-color': taskStatusEnum[scope.scope.taskStatus].color }">
</span>
{{
taskStatusEnum
[
scope
.
scope
.
taskStatus
]
?
taskStatusEnum
[
scope
.
scope
.
taskStatus
].
label
:
'--'
}}
</div>
<div
class=
"table-btns"
slot=
"table-btns"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"3"
></GLTableButton>
</div>
...
...
@@ -18,12 +30,13 @@
<div
slot=
"dateSlot"
>
<el-date-picker
v-model=
"uploadFormObj.taskMonth"
type=
"month"
placeholder=
"选择月"
></el-date-picker>
</div>
<!--
<div
slot=
"dateSlot"
><el-input
v-model
.
trim=
"uploadFormObj.taskCount"
placeholder=
"请输入任务数"
@
input=
"value => (uploadFormObj.taskCount = value.replace(/[^\d]/g, ''))"
clearable
/></div>
-->
<div
slot=
"uploadSlot"
>
<el-button
icon=
"el-icon-plus"
:size=
"size"
@
click=
"upload"
>
上传文件
<input
type=
"file"
style=
"opacity: 0;width: 0;height: 0;"
ref=
"file"
accept=
".xlsx"
@
change=
"uploadFile"
/>
</el-button>
<div
class=
"file-wrap"
>
<div
class=
"file-wrap"
v-if=
"uploadFormObj.fileName"
>
<div
class=
"file-box"
@
click=
"toOpenPDF(uploadFormObj.fileUrl)"
>
<div
class=
"info"
v-if=
"uploadFormObj.fileName"
>
<span
class=
"name"
>
{{
uploadFormObj
.
fileName
}}
</span>
...
...
@@ -45,9 +58,9 @@
</
template
>
<
script
>
import
util
from
'@/util/util'
import
exampleImg
from
'@/assets/example.png'
import
glsxCombiForm
from
'@/components/glsx-combi-form'
import
dayjs
from
'dayjs'
import
{
taskStatusEnum
,
shelfStatusEnum
}
from
'./constant'
export
default
{
name
:
'index'
,
components
:
{
...
...
@@ -56,7 +69,8 @@ export default {
data
()
{
return
{
size
:
'small'
,
exampleImg
,
taskStatusEnum
,
shelfStatusEnum
,
isVisible
:
false
,
uploadRules
:
{
taskMonth
:
[{
required
:
true
,
message
:
'请选择任务时间'
,
trigger
:
'change'
}],
...
...
@@ -81,6 +95,7 @@ export default {
label
:
'任务数:'
,
name
:
'taskCount'
,
type
:
'input'
,
placeholder
:
'请输入任务数'
,
maxlength
:
8
,
isHide
:
false
},
...
...
@@ -160,11 +175,11 @@ export default {
},
{
label
:
'商品上架状态'
,
prop
:
'shelfStatus
'
addHtml
:
'shelfStatusSlot
'
},
{
label
:
'任务状态'
,
prop
:
'taskStatus
'
addHtml
:
'taskStatusSlot
'
},
{
label
:
'创建时间'
,
...
...
@@ -182,10 +197,14 @@ export default {
},
{
label
:
'操作人'
,
prop
:
'updatedBy'
prop
:
'updatedBy'
,
formatter
:
cell
=>
{
return
cell
.
updatedBy
||
cell
.
createdBy
}
},
{
label
:
'操作'
,
width
:
120
,
addHtml
:
'table-btns'
}
]
...
...
@@ -201,10 +220,7 @@ export default {
{
label
:
'任务时间'
,
name
:
'taskMonth'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'packageCode'
,
optionLabel
:
'packageName'
addHtml
:
'dateSlot'
},
{
label
:
'商品上架状态'
,
...
...
@@ -317,6 +333,7 @@ export default {
params
.
updateBeginDate
=
new
Date
(
this
.
searchForm
.
upadteDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
updateEndDate
=
new
Date
(
this
.
searchForm
.
upadteDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
if
(
params
.
taskMonth
)
params
.
taskMonth
=
dayjs
(
params
.
taskMonth
).
format
(
'YYYY-MM'
)
delete
params
.
createDate
delete
params
.
upadteDate
return
params
...
...
@@ -351,6 +368,7 @@ export default {
.
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
uploadFormObj
.
fileUrl
=
res
.
data
this
.
$refs
?.
uploadRef
?.
$refs
.
formRef
&&
this
.
$refs
.
uploadRef
.
$refs
.
formRef
.
clearValidate
(
'fileUrl'
)
}
})
.
finally
(
end
=>
{
...
...
@@ -418,6 +436,9 @@ export default {
/deep/
.el-form-item__label
{
width
:
154px
;
}
/
deep
/
.el-form-item__error
{
margin-left
:
154px
;
}
.file-wrap
{
margin
:
8px
0
0
154px
;
display
:
flex
;
...
...
@@ -464,4 +485,21 @@ export default {
}
}
}
.status
{
width
:
6px
;
height
:
6px
;
display
:
inline-block
;
border-radius
:
50%
;
background-color
:
antiquewhite
;
margin-right
:
8px
;
vertical-align
:
middle
;
}
//
/
deep
/
.month-class
{
//
.today
{
//
color
:
unset
;
//
}
//
.el-month-table
td
.current
:not
(
.disabled
)
.cell
{
//
color
:
aqua
;
//
}
//
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment