Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
welfare
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
达摩4.0重构
welfare
Commits
93491a94
Commit
93491a94
authored
Feb 26, 2021
by
chenxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 上传记录
parent
822c3e90
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
189 additions
and
7 deletions
+189
-7
common.js
src/api/common.js
+5
-0
gift.js
src/api/gift.js
+1
-5
index.vue
src/components/stock-upload-record/index.vue
+161
-0
gic-card.js
src/router/gic-card.js
+4
-0
other.js
src/router/other.js
+1
-1
stock-upload-list.vue
src/views/card/gic-card/stock-upload-list.vue
+16
-0
stock-record.vue
src/views/gift-manage/stock-record.vue
+1
-1
No files found.
src/api/common.js
View file @
93491a94
...
...
@@ -21,6 +21,11 @@ let o2 = {
},
getStockActivityStatistics
:
'/stock/activity-statistics'
,
// 库存记录-统计记录
getRelationId
:
'/gift/get-gift-id'
,
// 随机返回一个ID
virtualUploadLog
:
{
url
:
'/gift/vir-card-log-page'
,
method
:
'post'
},
// 库存上传记录
virtualErrorPage
:
'/gift/vir-card-error-page'
,
// 库存上传记录-上传错误日志分页
};
// other
...
...
src/api/gift.js
View file @
93491a94
...
...
@@ -44,10 +44,7 @@ let realGift = {
giftStandardValueNew
:
'/gift/spec-value-save'
,
// 规格值新建
giftStandardValueList
:
'/gift/spec-value-list'
,
// 规格值查询
virtualCardList
:
'/gift/vir-card-page'
,
// 虚拟礼品卡券卡密列表
virtualUploadLog
:
{
url
:
'/gift/vir-card-log-page'
,
method
:
'post'
},
// 库存上传记录
batchUpdate
:
{
url
:
'/gift/batch-update'
,
method
:
'post'
...
...
@@ -75,7 +72,6 @@ let realGift = {
},
// 保存操作人权限数据
getOperatorList
:
'/auth/operator-list'
,
// 查询操作人权限回显数据
virtualCostUpdate
:
'/gift/vir-cost-update'
,
// 虚拟礼品调整库存
virtualErrorPage
:
'/gift/vir-card-error-page'
,
// 虚拟礼品卡密上传错误日志分页
};
// 通用配置
...
...
src/components/stock-upload-record/index.vue
0 → 100644
View file @
93491a94
<
template
>
<div
class=
"p20"
v-loading=
"loading"
>
<div
class=
"pb20 clearfix flex-center"
>
<el-input
class=
"mr10 w220"
v-model=
"listParams.search"
clearable
placeholder=
"请输入福利id"
@
change=
"refresh"
><i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i></el-input>
<el-input
class=
"mr10 w220"
v-model=
"listParams.activityName"
clearable
placeholder=
"请输入操作人姓名搜索"
@
change=
"refresh"
><i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i></el-input>
<el-date-picker
class=
"w300 mr10"
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"refresh"
></el-date-picker>
</div>
<el-table
tooltip-effect=
"dark"
:data=
"tableList"
style=
"width: 100%"
>
<el-table-column
label=
"上传时间"
prop=
"createTime"
width=
"300px"
>
<template
slot-scope=
"scope"
>
<div
v-html=
"listTime(scope.row.createTime)"
></div>
</
template
>
</el-table-column>
<el-table-column
prop=
"creatorName"
label=
"操作人"
min-width=
"150px"
></el-table-column>
<el-table-column
prop=
"fileName"
label=
"文件名称"
min-width=
"150px"
></el-table-column>
<el-table-column
prop=
"giftName"
label=
"福利名称"
min-width=
"120px"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"goDetail(scope.row)"
>
{{
scope
.
row
.
giftName
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"上传结果"
min-width=
"150px"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.statusFlag === 1"
>
成功
<span
class=
"blue"
>
{{
scope
.
row
.
successNum
}}
</span>
条,失败
<span
class=
"danger-color"
>
{{
scope
.
row
.
errorNum
}}
</span>
条
</div>
<div
v-else-if=
"scope.row.statusFlag === 0"
>
上传中
</div>
<div
v-else
>
上传失败
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.row.statusFlag === 2"
@
click=
"uploadReview(scope.row)"
>
重新上传
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.statusFlag === 1 && scope.row.errorNum !== 0"
@
click=
"checkDetail(scope.row)"
>
查看失败原因
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
class=
"clearfix"
>
<dm-pagination
class=
"fr mb0"
v-if=
"tableList.length"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
</div>
<el-dialog
title=
"查看详情"
:visible
.
sync=
"dialogVisible"
width=
"40%"
:before-close=
"handleClose"
>
<div>
<el-table
:data=
"errorData"
>
<el-table-column
prop=
"errorMsg"
label=
"错误信息"
></el-table-column>
</el-table>
<div
class=
"pagination-conteiner"
style=
"background:#fff;"
v-show=
"totalError > 0"
>
<div
class=
"pagination"
>
<dm-pagination
small
background
@
size-change=
"handleSizeErrorChange"
@
current-change=
"handleCurrentErrorChange"
:current-page
.
sync=
"currentErrorPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"pageErrorSize"
layout=
"total, sizes, prev, pager, next"
:total=
"totalError"
v-if=
"totalError != 0"
>
</dm-pagination>
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
page
,
formate
}
from
'@/mixins/table.js'
;
import
{
listTime
}
from
'@/utils/index.js'
;
import
fetch
from
'@/api/common.js'
;
const
{
virtualUploadLog
,
virtualErrorPage
}
=
fetch
;
export
default
{
name
:
'StockRecord'
,
mixins
:
[
page
,
formate
],
props
:
{
type
:
{
type
:
[
Number
,
String
],
// 0 礼品 1 卡券
required
:
true
}
},
data
()
{
return
{
loading
:
false
,
dateTime
:
[
,
],
listParams
:
{
source
:
this
.
type
,
search
:
''
,
creatorName
:
''
,
modifyType
:
''
,
// 调整类型(1:加,2:减)
startTime
:
''
,
endTime
:
''
,
currentPage
:
1
,
pageSize
:
20
},
listParams2
:
{
currentPage
:
1
,
pageSize
:
20
},
total
:
0
,
tableList
:
[],
dialogVisible
:
false
,
totalError
:
''
,
uploadLogId
:
''
,
};
},
mounted
()
{
this
.
getTableList
();
},
methods
:
{
listTime
,
getTableList
()
{
if
(
this
.
loading
)
{
return
;
}
this
.
formatterTimeFunc
(
'startTime'
,
'endTime'
,
'yyyy-MM-dd'
,
'dateTime'
);
this
.
loading
=
true
;
const
params
=
{
...
this
.
listParams
,
pageNum
:
this
.
listParams
.
currentPage
};
virtualUploadLog
(
params
).
then
(
res
=>
{
this
.
loading
=
false
;
const
data
=
res
.
result
;
this
.
tableList
=
data
.
result
||
[];
this
.
total
=
data
.
totalCount
;
// 删除至最后一页没数据的情况,页码-1
if
(
this
.
tableList
.
length
===
0
&&
this
.
listParams
.
currentPage
!==
1
)
{
this
.
listParams
.
currentPage
-=
1
;
this
.
getTableList
();
}
}).
finally
(()
=>
{
this
.
loading
=
false
;
});
},
checkDetail
(
item
){
this
.
dialogVisible
=
true
;
this
.
uploadLogId
=
item
.
uploadLogId
;
this
.
getDetail
();
},
getDetail
(){
let
params
=
{
id
:
this
.
uploadLogId
,
key
:
''
,
...
this
.
listParams2
,
pageNum
:
this
.
listParams2
.
currentPage
};
virtualErrorPage
(
params
).
then
(
res
=>
{
this
.
errorData
=
res
.
result
.
result
||
[];
this
.
totalError
=
res
.
result
.
totalCount
;
});
},
goDetail
(
item
){
if
(
item
.
source
===
0
){
this
.
$router
.
push
({
path
:
'/gift-manage/virtual-gift-detail'
,
query
:
{
giftId
:
item
.
giftId
}
});
}
else
{
this
.
$router
.
push
({
path
:
'/gic-card/info'
,
query
:
{
id
:
item
.
giftId
}
});
}
},
uploadReview
(
item
){
if
(
item
.
source
===
0
){
this
.
$router
.
push
({
path
:
'/gift-manage/virtual-gift'
,
query
:
{
giftId
:
item
.
giftId
}
});
}
else
{
this
.
$router
.
push
({
path
:
'/gic-card/list'
,
query
:
{
couponId
:
item
.
giftId
}
});
}
},
},
};
</
script
>
src/router/gic-card.js
View file @
93491a94
...
...
@@ -29,6 +29,10 @@ export default [
path
:
'/gic-card/list'
}
},
{
path
:
'stock-upload-list'
,
// 上传设置
component
:
()
=>
import
(
/* webpackChunkName: "gic-card" */
'@/views/card/gic-card/stock-upload-list.vue'
),
},
// 转赠列表
{
path
:
'send-list'
,
...
...
src/router/other.js
View file @
93491a94
...
...
@@ -77,7 +77,7 @@ export default [
children
:
[
{
path
:
'custom'
,
// 设置
component
:
()
=>
import
(
'@/views/card/setting/custom.vue'
),
component
:
()
=>
import
(
/* webpackChunkName: "gic-card" */
'@/views/card/setting/custom.vue'
),
},
]
}
...
...
src/views/card/gic-card/stock-upload-list.vue
0 → 100644
View file @
93491a94
<
template
>
<stock-record
type=
"1"
></stock-record>
</
template
>
<
script
>
import
stockRecord
from
'@/components/stock-upload-record/index.vue'
;
export
default
{
name
:
'StockUploadList'
,
components
:
{
stockRecord
},
created
()
{
this
.
$emit
(
'updateBread'
,
[
{
breadName
:
'福利中心'
},
{
breadName
:
'GIC卡券'
,
breadPath
:
'/gic-card/list'
},
{
breadName
:
'库存上传记录'
}
]);
}
};
</
script
>
src/views/gift-manage/stock-record.vue
View file @
93491a94
...
...
@@ -82,7 +82,7 @@
<
script
>
import
{
page
,
formate
}
from
'@/mixins/table.js'
;
import
{
formatDateTimeByType
,
listTime
}
from
'@/utils/index.js'
;
import
api
from
'@/api/
gift
.js'
;
import
api
from
'@/api/
common
.js'
;
const
{
virtualUploadLog
,
virtualErrorPage
}
=
api
;
export
default
{
components
:
{
...
...
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