Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 b9a7865d
authored
Nov 09, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
订单管理,数据看板
1 parent
67fa86e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
308 deletions
src/views/orderManage/index.vue
src/views/seckillActivity/dataBoard.vue
src/views/orderManage/index.vue
View file @
b9a7865
...
...
@@ -2,10 +2,7 @@
<
template
>
<div
class=
"marketing order-manage"
>
<div
class=
"list-tips m-b-10"
>
<img
class=
"tips-img"
src=
"@/assets/icon-info.png"
/>
<img
class=
"tips-img"
src=
"@/assets/icon-info.png"
/>
<span
class=
"table-tips"
>
已生成有效订单
<span
class=
"txt-blue"
>
{{
statisticsInfo
.
orderCount
||
0
}}
</span>
...
...
@@ -18,204 +15,69 @@
</div>
<div
class=
"container"
>
<div
class=
"sticky"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"flex"
>
<div
class=
"flex-default tabs"
>
<el-tabs
v-model=
"searchForm.requestSource"
@
tab-click=
"handleTabClick"
>
<el-tab-pane
label=
"全部订单"
name=
"0"
></el-tab-pane>
<el-tab-pane
label=
"已付款"
name=
"1"
></el-tab-pane>
<el-tab-pane
label=
"未付款"
name=
"2"
></el-tab-pane>
<el-tab-pane
label=
"已退款"
name=
"3"
></el-tab-pane>
<el-tab-pane
label=
"售后订单"
name=
"4"
></el-tab-pane>
<el-tabs
v-model=
"searchForm.requestSource"
@
tab-click=
"handleTabClick"
>
<el-tab-pane
label=
"全部订单"
name=
"0"
></el-tab-pane>
<el-tab-pane
label=
"已付款"
name=
"1"
></el-tab-pane>
<el-tab-pane
label=
"未付款"
name=
"2"
></el-tab-pane>
<el-tab-pane
label=
"已退款"
name=
"3"
></el-tab-pane>
<el-tab-pane
label=
"售后订单"
name=
"4"
></el-tab-pane>
</el-tabs>
</div>
<el-button
class=
"default-blue-btn"
:size=
"size"
type=
"default"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
class=
"default-blue-btn"
:size=
"size"
type=
"default"
@
click=
"handleExport"
>
导出
</el-button>
</div>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<div
class=
"order-manage-table"
>
<GLTable
ref=
"allOrderRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"weChatName"
class=
"flex-align"
slot-scope=
"scope"
>
<img
v-if=
"scope.scope.weChatImageUrl"
class=
"img-36 pointer img-circle"
:src=
"scope.scope.weChatImageUrl"
/>
<GLTable
ref=
"allOrderRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"weChatName"
class=
"flex-align"
slot-scope=
"scope"
>
<img
v-if=
"scope.scope.weChatImageUrl"
class=
"img-36 pointer img-circle"
:src=
"scope.scope.weChatImageUrl"
/>
<span
class=
"m-l-10"
>
{{
scope
.
scope
.
weChatName
}}
</span>
<span
v-if=
"!scope.scope.shareAvatar && !scope.scope.weChatName"
>
-
</span>
</div>
<template
slot=
"vinNo"
slot-scope=
"scope"
>
<template
slot=
"vinNo"
slot-scope=
"scope"
>
{{
Array
.
isArray
(
scope
.
scope
.
vinNo
)
?
scope
.
scope
.
vinNo
[
0
]
:
scope
.
scope
.
vinNo
}}
<el-popover
popper-class=
"order-table-popover"
placement=
"right-start"
trigger=
"click"
>
<p
v-for=
"(item, index) in scope.scope.vinNo"
:key=
"index"
>
{{
item
}}
</p>
<span
class=
"car-no"
slot=
"reference"
v-show=
"Array.isArray(scope.scope.vinNo)"
>
...(
{{
scope
.
scope
.
vinNo
.
length
-
1
}}
)
</span>
<el-popover
popper-class=
"order-table-popover"
placement=
"right-start"
trigger=
"click"
>
<p
v-for=
"(item, index) in scope.scope.vinNo"
:key=
"index"
>
{{
item
}}
</p>
<span
class=
"car-no"
slot=
"reference"
v-show=
"Array.isArray(scope.scope.vinNo)"
>
...(
{{
scope
.
scope
.
vinNo
.
length
-
1
}}
)
</span>
</el-popover>
</
template
>
<div
slot=
"orderStatus"
slot-scope=
"scope"
>
<div
slot=
"orderStatus"
slot-scope=
"scope"
>
<span
:class=
"['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"
></span>
<span>
{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}
</span>
</div>
<div
slot=
"shareStaffName"
class=
"table-image"
slot-scope=
"scope"
>
<div
slot=
"shareStaffName"
class=
"table-image"
slot-scope=
"scope"
>
<div>
<img
v-if=
"scope.scope.shareStaffImageUrl"
class=
"img-36 pointer img-circle"
style=
"vertical-align: middle"
slot=
"reference"
:src=
"scope.scope.shareStaffImageUrl"
/>
<img
v-if=
"scope.scope.shareStaffImageUrl"
class=
"img-36 pointer img-circle"
style=
"vertical-align: middle"
slot=
"reference"
:src=
"scope.scope.shareStaffImageUrl"
/>
<span
class=
"m-l-10"
>
<span>
{{ scope.scope.shareStaffName }}
</span>
<span
class=
"txt-green"
v-if=
"scope.scope.shareStaffType == 1"
>
@微信
</span>
<span
class=
"txt-orange"
v-if=
"scope.scope.shareStaffType == 2"
>
@企微
</span>
<span
class=
"txt-blue"
v-if=
"scope.scope.shareStaffType == 3"
>
@小程序
</span>
<span
class=
"txt-green"
v-if=
"scope.scope.shareStaffSource == 1"
>
@微信
</span>
<span
class=
"txt-orange"
v-if=
"scope.scope.shareStaffSource == 2"
>
@企微
</span>
<span
class=
"txt-blue"
v-if=
"scope.scope.shareStaffSource == 3"
>
@员工
</span>
</span>
</div>
<span
v-if=
"!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName"
>
-
</span>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</div>
</GLTable>
</div>
<!-- 表格区域 - 全部订单/售后订单 - end -->
</div>
<!-- 快递信息 -->
<GLDialog
v-if=
"isExpressVisible"
title=
"输入快递信息"
mode=
"mid"
okText=
"确定"
cancelText=
"取消"
:visible
.
sync=
"isExpressVisible"
@
onOk=
"handleExpressConfirm"
@
onCancel=
"handleExpressClose"
>
<glsx-combi-form
class=
"small-content m-t-20"
ref=
"expressRef"
:isBlock=
"true"
defaultWidth=
"284px"
:isEdit=
"isEdit"
:formRef=
"editChildRef"
:formObj=
"expressForm"
:formData=
"expressFormData"
:formRules=
"expressRules"
></glsx-combi-form>
<GLDialog
v-if=
"isExpressVisible"
title=
"输入快递信息"
mode=
"mid"
okText=
"确定"
cancelText=
"取消"
:visible
.
sync=
"isExpressVisible"
@
onOk=
"handleExpressConfirm"
@
onCancel=
"handleExpressClose"
>
<glsx-combi-form
class=
"small-content m-t-20"
ref=
"expressRef"
:isBlock=
"true"
defaultWidth=
"284px"
:isEdit=
"isEdit"
:formRef=
"editChildRef"
:formObj=
"expressForm"
:formData=
"expressFormData"
:formRules=
"expressRules"
></glsx-combi-form>
</GLDialog>
<!-- 订单核销 -->
<GLDialog
v-if=
"isWriteOffVisible"
title=
"订单核销(请确保用户到店后核销,避免引起不必要问题)"
mode=
"mid"
okText=
"确定"
cancelText=
"取消"
:visible
.
sync=
"isWriteOffVisible"
@
onOk=
"handleWriteOffConfirm"
@
onCancel=
"handleWriteOffClose"
>
<glsx-combi-form
class=
"small-content m-t-20"
ref=
"writeOffRef"
:isBlock=
"true"
defaultWidth=
"284px"
:formRef=
"editChildRef"
:formObj=
"writeOffForm"
:formData=
"writeOffFormData"
:formRules=
"writeOffRules"
></glsx-combi-form>
<GLDialog
v-if=
"isWriteOffVisible"
title=
"订单核销(请确保用户到店后核销,避免引起不必要问题)"
mode=
"mid"
okText=
"确定"
cancelText=
"取消"
:visible
.
sync=
"isWriteOffVisible"
@
onOk=
"handleWriteOffConfirm"
@
onCancel=
"handleWriteOffClose"
>
<glsx-combi-form
class=
"small-content m-t-20"
ref=
"writeOffRef"
:isBlock=
"true"
defaultWidth=
"284px"
:formRef=
"editChildRef"
:formObj=
"writeOffForm"
:formData=
"writeOffFormData"
:formRules=
"writeOffRules"
></glsx-combi-form>
</GLDialog>
<!-- 退款审核 -->
<GLDialog
v-if=
"isExamineVisible"
bigTitle=
"退款审核"
mode=
"big"
:visible
.
sync=
"isExamineVisible"
@
onOk=
"handleExamineConfirm"
@
onCancel=
"handleExamineClose"
>
<GLDialog
v-if=
"isExamineVisible"
bigTitle=
"退款审核"
mode=
"big"
:visible
.
sync=
"isExamineVisible"
@
onOk=
"handleExamineConfirm"
@
onCancel=
"handleExamineClose"
>
<el-form
label-width=
"144px"
>
<el-form-item
label=
"售后类型"
>
<span>
{{ orderInfo.refundTypeName }}
</span>
...
...
@@ -230,15 +92,8 @@
<span>
{{ orderInfo.remark || '-' }}
</span>
</el-form-item>
<el-form-item
v-if=
"orderInfo.imgUrls"
>
<span
v-for=
"(item, index) in orderInfo.imgUrls"
:key=
"index"
>
<el-image
class=
"img-60"
:src=
"item"
:preview-src-list=
"[item]"
></el-image>
<span
v-for=
"(item, index) in orderInfo.imgUrls"
:key=
"index"
>
<el-image
class=
"img-60"
:src=
"item"
:preview-src-list=
"[item]"
></el-image>
</span>
</el-form-item>
<el-form-item
label=
"审核是否通过"
>
...
...
@@ -248,28 +103,12 @@
</el-radio-group>
</el-form-item>
<
template
v-if=
"orderInfo.refundType == 1 && examineForm.isAllowed == '1'"
>
<glsx-combi-form
ref=
"examineRef"
:isEdit=
"isEdit"
defaultWidth=
"284px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"examineForm"
:formData=
"examineFormData"
:formRules=
"examineRules"
></glsx-combi-form>
<glsx-combi-form
ref=
"examineRef"
:isEdit=
"isEdit"
defaultWidth=
"284px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"examineForm"
:formData=
"examineFormData"
:formRules=
"examineRules"
></glsx-combi-form>
</
template
>
</el-form>
</GLDialog>
<!-- 确认收货 -->
<GLDialog
v-if=
"isReceivingVisible"
bigTitle=
"确认收货"
mode=
"big"
:visible
.
sync=
"isReceivingVisible"
@
onOk=
"handleReceivingConfirm"
@
onCancel=
"handleReceivingClose"
>
<GLDialog
v-if=
"isReceivingVisible"
bigTitle=
"确认收货"
mode=
"big"
:visible
.
sync=
"isReceivingVisible"
@
onOk=
"handleReceivingConfirm"
@
onCancel=
"handleReceivingClose"
>
<el-form
label-width=
"140px"
>
<el-form-item
label=
"售后类型"
>
<span>
{{ orderInfo.refundTypeName }}
</span>
...
...
@@ -300,7 +139,7 @@ import url from '@/assets/empty.png'
import
{
orderManageStatusList
,
afterSaleStatusList
,
orderSourceList
,
deliveryTypeList
,
exportFn
}
from
'@/common/constant'
export
default
{
name
:
'orderManage'
,
data
()
{
data
()
{
return
{
size
:
'small'
,
url
:
url
,
...
...
@@ -321,7 +160,7 @@ export default {
deliveryType
:
''
,
vin
:
''
,
shareStaffName
:
''
,
shareStaff
Typ
e
:
''
,
shareStaff
Sourc
e
:
''
,
activityName
:
''
,
goodsName
:
''
,
requestSource
:
'0'
...
...
@@ -465,12 +304,12 @@ export default {
},
{
label
:
'推荐人类型'
,
name
:
'shareStaff
Typ
e'
,
name
:
'shareStaff
Sourc
e'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'shareStaff
Typ
eList'
optionsName
:
'shareStaff
Sourc
eList'
},
{
label
:
'活动名称'
,
...
...
@@ -612,7 +451,7 @@ export default {
},
listeners
:
{
click
:
row
=>
{
this
.
secondConfirm
(
'退款'
,
'请确定是否发起退款?'
,
'orderManage'
,
'crowdFundRefundApi'
,
{
orderCode
:
row
.
orderCode
})
this
.
secondConfirm
(
'退款'
,
'请确定是否发起退款?'
,
'orderManage'
,
'crowdFundRefundApi'
,
{
orderCode
:
row
.
orderCode
}
,
()
=>
{},
this
.
searchForm
.
requestSource
!=
0
)
}
}
},
...
...
@@ -836,21 +675,22 @@ export default {
{
confId
:
'2'
,
confName
:
'我要退款(无需退货)'
},
{
confId
:
'3'
,
confName
:
'众筹订单退款'
}
],
shareStaff
Typ
eList
:
[
shareStaff
Sourc
eList
:
[
{
confId
:
'1'
,
confName
:
'个微'
},
{
confId
:
'2'
,
confName
:
'企微'
}
{
confId
:
'2'
,
confName
:
'企微'
},
{
confId
:
'3'
,
confName
:
'员工'
}
]
}
}
},
mounted
()
{
mounted
()
{
// this.getCount()
this
.
getOptionsList
(
'searchFormData'
)
},
methods
:
{
getParams
()
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchForm
.
createDate
.
length
)
{
params
.
createdStartDateStr
=
new
Date
(
this
.
searchForm
.
createDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
...
...
@@ -861,7 +701,7 @@ export default {
return
params
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
this
.
getParams
()
delete
this
.
tableSearchForm
.
createDate
...
...
@@ -869,7 +709,7 @@ export default {
})
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
var
index
=
this
[
formName
].
findIndex
(
k
=>
k
.
name
==
refreshSigle
)
...
...
@@ -895,7 +735,7 @@ export default {
}
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
,
isResetPage
=
true
)
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -909,7 +749,7 @@ export default {
})
if
(
res
.
code
==
'0'
)
{
fn
&&
fn
()
this
.
handleSearch
(
)
isResetPage
?
this
.
handleSearch
()
:
this
.
$refs
.
allOrderRef
.
refreshTable
(
false
)
}
})
}
...
...
@@ -917,7 +757,7 @@ export default {
})
},
getCount
()
{
getCount
()
{
var
params
=
this
.
getParams
()
delete
params
.
createDate
// if(params.orderStatuses.includes('3')) return
...
...
@@ -926,7 +766,7 @@ export default {
})
},
handleDetail
(
row
)
{
handleDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/orderManage/orderDetail'
,
query
:
{
...
...
@@ -936,7 +776,7 @@ export default {
},
// 输入快递信息 - start
handleExpressClose
()
{
handleExpressClose
()
{
this
.
isExpressVisible
=
!
this
.
isExpressVisible
this
.
orderCode
=
''
this
.
expressForm
=
{
...
...
@@ -945,7 +785,7 @@ export default {
}
},
handleExpressConfirm
()
{
handleExpressConfirm
()
{
this
.
$refs
.
expressRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
expressForm
)
...
...
@@ -965,14 +805,14 @@ export default {
})
},
handleExpressInfo
(
row
)
{
handleExpressInfo
(
row
)
{
this
.
isExpressVisible
=
!
this
.
isExpressVisible
this
.
orderCode
=
row
.
orderCode
},
// 输入快递信息 - end
// 订单核销 - start
handleWriteOffClose
()
{
handleWriteOffClose
()
{
this
.
isWriteOffVisible
=
!
this
.
isWriteOffVisible
this
.
orderCode
=
''
this
.
writeOffForm
=
{
...
...
@@ -980,7 +820,7 @@ export default {
}
},
handleWriteOffConfirm
()
{
handleWriteOffConfirm
()
{
this
.
$refs
.
writeOffRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
writeOffForm
)
...
...
@@ -993,16 +833,16 @@ export default {
})
if
(
res
.
code
==
'0'
)
{
this
.
handleWriteOffClose
()
this
.
handleSearch
()
this
.
searchForm
.
requestSource
==
0
?
this
.
$refs
.
allOrderRef
.
refreshTable
(
false
)
:
this
.
handleSearch
()
}
})
}
})
},
handleWriteOff
(
row
)
{
handleWriteOff
(
row
)
{
if
(
row
.
orderSource
==
4
)
{
this
.
secondConfirm
(
'订单核销'
,
'请确定是否核销此订单?'
,
'orderManage'
,
'crowdFundWriteOffApi'
,
{
orderCode
:
row
.
orderCode
})
this
.
secondConfirm
(
'订单核销'
,
'请确定是否核销此订单?'
,
'orderManage'
,
'crowdFundWriteOffApi'
,
{
orderCode
:
row
.
orderCode
}
,
()
=>
{},
this
.
searchForm
.
requestSource
!=
0
)
return
true
}
this
.
isWriteOffVisible
=
!
this
.
isWriteOffVisible
...
...
@@ -1011,7 +851,7 @@ export default {
// 订单核销 - end
// 退款审核 - start
handleExamineClose
()
{
handleExamineClose
()
{
this
.
isExamineVisible
=
!
this
.
isExamineVisible
this
.
orderCode
=
''
this
.
orderInfo
=
{}
...
...
@@ -1023,7 +863,7 @@ export default {
}
},
submitExamine
(
params
)
{
submitExamine
(
params
)
{
this
.
$apis
.
orderManage
.
examineAllowApi
(
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
...
...
@@ -1032,12 +872,12 @@ export default {
})
if
(
res
.
code
==
'0'
)
{
this
.
handleExamineClose
()
this
.
handleSearch
()
this
.
searchForm
.
requestSource
==
0
?
this
.
$refs
.
allOrderRef
.
refreshTable
(
false
)
:
this
.
handleSearch
()
}
})
},
handleExamineConfirm
()
{
handleExamineConfirm
()
{
var
params
=
{
id
:
this
.
orderInfo
.
id
}
...
...
@@ -1056,7 +896,7 @@ export default {
}
},
handleExamine
(
row
)
{
handleExamine
(
row
)
{
this
.
orderCode
=
row
.
orderCode
this
.
$apis
.
orderManage
.
examineDetailApi
({
orderCode
:
row
.
orderCode
}).
then
(
res
=>
{
this
.
orderInfo
=
res
||
{}
...
...
@@ -1068,13 +908,13 @@ export default {
// 退款审核 - end
// 确认收货 - start
handleReceivingClose
()
{
handleReceivingClose
()
{
this
.
isReceivingVisible
=
!
this
.
isReceivingVisible
this
.
orderCode
=
''
this
.
orderInfo
=
{}
},
handleReceivingConfirm
()
{
handleReceivingConfirm
()
{
var
params
=
{
id
:
this
.
orderInfo
.
id
}
...
...
@@ -1091,7 +931,7 @@ export default {
})
},
handleReceiving
(
row
)
{
handleReceiving
(
row
)
{
this
.
$apis
.
orderManage
.
examineDetailApi
({
orderCode
:
row
.
orderCode
}).
then
(
res
=>
{
this
.
orderInfo
=
res
||
{}
this
.
orderInfo
.
refundTypeName
=
[
1
,
2
,
3
].
includes
(
this
.
orderInfo
.
refundType
)
?
this
.
baseData
.
refundTypeList
.
find
(
item
=>
item
.
confId
==
this
.
orderInfo
.
refundType
+
''
).
confName
:
'-'
...
...
@@ -1101,7 +941,7 @@ export default {
},
// 确认收货 - end
setTableFinishFun
()
{
setTableFinishFun
()
{
this
.
$refs
.
allOrderRef
.
data
.
forEach
(
item
=>
{
item
.
vinNo
=
item
.
vin
?
(
item
.
vin
.
split
(
','
).
length
>
1
?
item
.
vin
.
split
(
','
)
:
item
.
vin
)
:
'-'
})
...
...
@@ -1110,22 +950,22 @@ export default {
this
.
getCount
()
},
handleSearch
()
{
handleSearch
()
{
this
.
$refs
.
allOrderRef
.
refreshTable
()
},
handleTabClick
()
{
handleTabClick
()
{
this
.
handleSearch
()
},
handleExport
(
row
)
{
handleExport
(
row
)
{
var
params
=
this
.
getParams
()
this
.
$apis
.
orderManage
.
orderExportApi
(
params
).
then
(
res
=>
{
exportFn
(
res
)
})
},
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
this
.
$options
.
data
.
call
(
this
).
searchForm
this
.
handleSearch
()
}
...
...
src/views/seckillActivity/dataBoard.vue
View file @
b9a7865
...
...
@@ -3,33 +3,14 @@
<div
class=
"data-board-box"
>
<p
class=
"edit-title"
>
数据看板
</p>
<div
class=
"p-20"
>
<GLCombiForm
ref=
"dataRef"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
></GLCombiForm>
<GLCombiForm
ref=
"dataRef"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
></GLCombiForm>
<div
class=
"data-view"
>
<template
v-for=
"(item,index) in dataList"
>
<div
:key=
"index"
class=
"item"
>
<div
:key=
"index"
class=
"item"
>
<div
class=
"name"
>
{{
item
.
name
}}
<el-popover
class=
"tips"
placement=
"top"
width=
"260"
trigger=
"hover"
:content=
"item.tips"
>
<img
slot=
"reference"
class=
"tips-icon"
src=
"@/components/glsx-combi-form/images/icon-tip.png"
/>
<el-popover
class=
"tips"
placement=
"top"
width=
"260"
trigger=
"hover"
:content=
"item.tips"
>
<img
slot=
"reference"
class=
"tips-icon"
src=
"@/components/glsx-combi-form/images/icon-tip.png"
/>
</el-popover>
</div>
<div
class=
"value"
>
{{
dataBoard
[
item
.
key
]
||
0
}}
</div>
...
...
@@ -51,54 +32,17 @@
<div
class=
"data-board-box"
>
<p
class=
"edit-title"
>
员工排行榜
</p>
<div
class=
"p-20"
>
<GLCombiForm
ref=
"rankRef"
:rowNumber=
"1"
:formObj=
"searchRankForm"
:formData=
"searchFormRankData"
@
handleOk=
"handleSearchRank"
></GLCombiForm>
<GLCombiForm
ref=
"rankRef"
:rowNumber=
"1"
:formObj=
"searchRankForm"
:formData=
"searchFormRankData"
@
handleOk=
"handleSearchRank"
></GLCombiForm>
<div
class=
"flex m-b-10 w-100-percent"
>
<span
class=
"table-title"
></span>
<el-button
:size=
"size"
class=
"default-blue-btn"
type=
"default"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
:size=
"size"
class=
"default-blue-btn"
type=
"default"
@
click=
"handleExport"
>
导出
</el-button>
</div>
<GLTable
ref=
"dataTableRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"false"
>
<div
slot=
"shareName"
class=
"flex-align"
slot-scope=
"scope"
>
<GLTable
ref=
"dataTableRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"false"
>
<div
slot=
"shareName"
class=
"flex-align"
slot-scope=
"scope"
>
<
template
v-if=
"scope.scope.shareAvatar"
>
<el-popover
placement=
"top"
width=
"160"
trigger=
"hover"
popper-class=
"table-popover-block"
>
<img
class=
"table-popover-img"
:src=
"scope.scope.shareAvatar"
/>
<img
class=
"img-36 pointer"
slot=
"reference"
:src=
"scope.scope.shareAvatar"
/>
<el-popover
placement=
"top"
width=
"160"
trigger=
"hover"
popper-class=
"table-popover-block"
>
<img
class=
"table-popover-img"
:src=
"scope.scope.shareAvatar"
/>
<img
class=
"img-36 pointer"
slot=
"reference"
:src=
"scope.scope.shareAvatar"
/>
</el-popover>
</
template
>
...
...
@@ -133,12 +77,13 @@ const dataList = [
export
default
{
name
:
'ScrmMicroMarketingDataBoard'
,
data
()
{
data
()
{
return
{
url
,
dataList
,
searchForm
:
{
statDate
:
dayjs
().
format
(
'YYYY-MM-DD'
)
statDate
:
dayjs
().
format
(
'YYYY-MM-DD'
),
shareName
:
''
},
searchFormData
:
[
{
...
...
@@ -162,6 +107,12 @@ export default {
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'statusList'
},
{
label
:
'员工名称'
,
name
:
'shareName'
,
type
:
'input'
,
maxlength
:
100
}
],
getListApi
:
this
.
$apis
.
seckillActivity
.
getRankListApi
,
...
...
@@ -209,11 +160,11 @@ export default {
dataBoard
:
{}
}
},
created
()
{
created
()
{
this
.
getDataBoardApi
()
},
mounted
()
{
mounted
()
{
let
[
dataResetBtn
]
=
this
.
$refs
.
dataRef
.
$el
.
getElementsByClassName
(
'el-button--default'
),
[
rankResetBtn
]
=
this
.
$refs
.
rankRef
.
$el
.
getElementsByClassName
(
'el-button--default'
)
if
(
dataResetBtn
)
dataResetBtn
.
style
.
display
=
'none'
...
...
@@ -221,38 +172,38 @@ export default {
},
methods
:
{
getDataBoardApi
()
{
getDataBoardApi
()
{
let
{
activityId
}
=
this
.
$route
.
query
,
{
statDate
}
=
this
.
searchForm
this
.
$apis
.
seckillActivity
.
getDataBoardApi
({
activityId
,
statDimension
:
dayjs
(
statDate
).
format
(
'YYYY-MM-DD'
)
}).
then
(
res
=>
{
this
.
dataBoard
=
res
||
{}
})
},
getParams
()
{
getParams
()
{
let
{
activityId
}
=
this
.
$route
.
query
,
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchRankForm
))
params
.
activityId
=
activityId
return
params
},
handleSearch
()
{
handleSearch
()
{
this
.
getDataBoardApi
()
},
handleSearchRank
()
{
handleSearchRank
()
{
this
.
$refs
.
dataTableRef
.
refreshTable
()
},
handleExport
()
{
handleExport
()
{
let
params
=
this
.
getParams
()
this
.
$apis
.
seckillActivity
.
exportRankListApi
(
params
).
then
(
res
=>
{
exportFn
(
res
)
})
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
this
.
getParams
()
resolve
()
})
},
setTableFinishFun
()
{
setTableFinishFun
()
{
//接收到的数据为空
this
.
$refs
.
dataTableRef
.
data
.
length
?
(
this
.
$refs
.
dataTableRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
dataTableRef
.
setTableHeightFun
()
}
...
...
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