Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
member
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
member
member
Commits
db298adc
Commit
db298adc
authored
Jul 27, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 客户详情,客户日志修改
parent
d8c44a12
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
286 additions
and
59 deletions
+286
-59
customerLog.vue
src/components/allCustomers/components/customerLog.vue
+134
-0
customerDetail.vue
src/components/allCustomers/customerDetail.vue
+4
-3
info.js
src/components/allCustomers/info.js
+47
-45
cardMixin.js
src/components/wechatmembers/cardMixin.js
+39
-0
cardvoucher.vue
src/components/wechatmembers/cardvoucher.vue
+44
-7
integralDataPage.vue
src/components/wechatmembers/integralDataPage.vue
+11
-4
index.js
src/router/index.js
+7
-0
No files found.
src/components/allCustomers/components/customerLog.vue
0 → 100644
View file @
db298adc
<
template
>
<div
style=
"padding:20px"
>
<div
class=
"logTop"
>
<el-cascader
placeholder=
"全部类型/全部事由"
:options=
"options"
filterable
>
</el-cascader>
<el-date-picker
style=
"width: 256px;"
v-model=
"dateDefault"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"创建开始日期"
end-placeholder=
"创建结束日期"
:default-time=
"['00:00:00', '23:59:59']"
:picker-options=
"pickerOptions()"
value-format=
"yyyy-MM-dd"
@
change=
"handleSearch"
>
</el-date-picker>
<p
class=
"font14 tip-p"
>
展示近一年的日志
</p>
</div>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
prop=
"createTime"
label=
"时间"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
createTime
|
formatTime
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"operType"
label=
"日志类型"
/>
<el-table-column
prop=
"operReason"
label=
"事由"
/>
<el-table-column
prop=
"operContent"
label=
"日志详情"
show-overflow-tooltip
/>
<el-table-column
prop=
"operRemark"
label=
"备注"
show-overflow-tooltip
>
<
template
slot-scope=
"{ row }"
>
<span
v-html=
"row.operRemark"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"操作"
width=
"120"
v-if=
"memberId"
>
<
template
slot-scope=
"{ }"
>
<el-button
type=
"text"
@
click=
"goLink('/customerLog')"
>
查看
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
class=
"page mTop20"
v-if=
"totalCount > 0"
>
<dm-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"logPageParam.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"logPageParam.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"totalCount"
/>
</div>
</div>
</template>
<
script
>
import
mixin
from
'../../wechatmembers/cardMixin'
;
import
url
from
'../../axios/url'
;
import
{
doFetch
}
from
'../../axios/api'
;
export
default
{
name
:
'customerLog'
,
mixins
:
[
mixin
],
props
:
{
memberId
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
tableLoading
:
false
,
tableData
:
[],
logPageParam
:
{
pageSize
:
20
,
currentPage
:
1
,
},
totalCount
:
0
,
};
},
created
()
{
this
.
getLogPage
();
},
methods
:
{
getLogPage
()
{
this
.
tableLoading
=
true
;
doFetch
(
url
.
logPage
,
{
...
this
.
logPageParam
,
memberId
:
this
.
memberId
||
this
.
$route
.
query
.
memberId
,
})
.
then
(
res
=>
{
this
.
tableLoading
=
false
;
if
(
res
.
data
.
errorCode
===
0
)
{
this
.
tableData
=
res
.
data
.
result
.
page
.
result
||
[];
this
.
tableData
=
this
.
tableData
.
map
(
el
=>
{
if
(
typeof
el
.
operRemark
==
'string'
)
{
el
.
operRemark
=
el
.
operRemark
.
replace
(
/
\n
/g
,
' <br />'
);
}
return
el
;
});
this
.
totalCount
=
res
.
data
.
result
.
page
.
totalCount
;
}
else
{
checkFalse
(
res
.
data
.
message
);
return
false
;
}
})
.
catch
(
err
=>
{
this
.
tableLoading
=
false
;
checkStatus
(
err
);
})
.
finally
(
_
=>
this
.
count
++
);
},
handleSizeChange
(
v
)
{
this
.
logPageParam
.
pageSize
=
v
;
this
.
logPageParam
.
currentPage
=
1
;
this
.
getLogPage
();
},
handleCurrentChange
(
v
)
{
this
.
logPageParam
.
currentPage
=
v
;
this
.
getLogPage
();
},
handleSearch
()
{
this
.
logPageParam
.
currentPage
=
1
;
this
.
getLogPage
();
},
goLink
(
v
)
{
console
.
log
(
this
.
memberId
,
'this.memberId'
);
if
(
v
)
this
.
$router
.
push
({
path
:
v
,
query
:
{
memberId
:
this
.
memberId
}
});
},
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.logTop
{
margin-bottom
:
20px
;
display
:
flex
;
align-items
:
center
;
margin-right
:
10px
;
}
.tip-p
{
margin-left
:
20px
;
color
:
#6B6D71
;
//
padding-bottom
:
16px
;
}
</
style
>
\ No newline at end of file
src/components/allCustomers/customerDetail.vue
View file @
db298adc
...
...
@@ -729,7 +729,8 @@
<!-- 标签备注end -->
<!-- 客户日志 -->
<
template
v-if=
"section.name==='log'"
>
<customer-log
style=
"padding:0"
v-if=
"section.name==='log'"
:memberId=
"memberId"
></customer-log>
<!-- <template v-if="section.name==='log'">
<el-table :data="tableData" v-loading="tableLoading" style="width: 100%">
<el-table-column prop="createTime" label="时间">
<template slot-scope="scope">
...
...
@@ -737,8 +738,8 @@
</template>
</el-table-column>
<el-table-column prop="operType" label="日志类型" />
<el-table-column
prop=
"operContent"
label=
"日志详情"
/>
<el-table-column prop="operReason" label="事由" />
<el-table-column prop="operContent" label="日志详情" />
<el-table-column prop="operRemark" label="备注">
<template slot-scope="{ row }">
<span v-html="row.operRemark" />
...
...
@@ -757,7 +758,7 @@
:total="totalCount"
/>
</div>
</template>
</template>
-->
<!-- 客户日志end -->
</div>
</div>
...
...
src/components/allCustomers/info.js
View file @
db298adc
...
...
@@ -10,6 +10,7 @@ import { mapState } from 'vuex';
import
url
from
'../../components/axios/url'
;
import
{
doFetch
,
doFetchqs
,
doFetchGet
}
from
'../../components/axios/api'
;
import
authMethods
from
'@/mixins/auth'
;
import
CustomerLog
from
'./components/customerLog.vue'
;
import
{
checkFalse
,
checkStatus
,
...
...
@@ -65,16 +66,16 @@ export default {
sourceTagList
:
[]
}
},
tableData
:
[],
logPageParam
:
{
pageSize
:
20
,
currentPage
:
1
,
},
totalCount
:
0
,
//
tableData: [],
//
logPageParam: {
//
pageSize: 20,
//
currentPage: 1,
//
},
//
totalCount: 0,
defaultImg
,
labelTabsActive
:
'memberTagGroup'
,
fullscreenLoading
:
false
,
// 全局loading
tableLoading
:
false
,
// 用户日志列表loading
//
tableLoading: false, // 用户日志列表loading
imgLoading
:
false
,
// 刷新头像loading
popoverVisible
:
false
,
// 修改等级popover
toggleTag
:
false
,
// 拓展信息展开按钮
...
...
@@ -180,7 +181,7 @@ export default {
},
watch
:
{
count
:
function
(
n
,
o
)
{
if
(
n
===
4
)
this
.
fullscreenLoading
=
false
;
if
(
n
===
3
)
this
.
fullscreenLoading
=
false
;
},
},
filters
:
{
...
...
@@ -237,7 +238,7 @@ export default {
this
.
count
=
0
;
this
.
fullscreenLoading
=
true
;
this
.
getAllDetail
();
this
.
getLogPage
();
//
this.getLogPage();
},
isOverflow
(
text
)
{
const
dom
=
document
.
createElement
(
'span'
);
...
...
@@ -330,32 +331,32 @@ export default {
.
finally
(
_
=>
this
.
count
++
);
});
},
getLogPage
()
{
this
.
tableLoading
=
true
;
doFetch
(
url
.
logPage
,
{
...
this
.
logPageParam
,
memberId
:
this
.
memberId
,
})
.
then
(
res
=>
{
this
.
tableLoading
=
false
;
if
(
res
.
data
.
errorCode
===
0
)
{
this
.
tableData
=
res
.
data
.
result
.
page
.
result
||
[];
this
.
tableData
=
this
.
tableData
.
map
(
el
=>
{
if
(
typeof
el
.
operRemark
==
'string'
)
{
el
.
operRemark
=
el
.
operRemark
.
replace
(
/
\n
/g
,
' <br />'
);
}
return
el
;
});
this
.
totalCount
=
res
.
data
.
result
.
page
.
totalCount
;
}
else
{
checkFalse
(
res
.
data
.
message
);
return
false
;
}
})
.
catch
(
err
=>
{
this
.
tableLoading
=
false
;
checkStatus
(
err
);
})
.
finally
(
_
=>
this
.
count
++
);
},
//
getLogPage () {
//
this.tableLoading = true;
//
doFetch(url.logPage, {
//
...this.logPageParam,
//
memberId: this.memberId,
//
})
//
.then(res => {
//
this.tableLoading = false;
//
if (res.data.errorCode === 0) {
//
this.tableData = res.data.result.page.result || [];
//
this.tableData = this.tableData.map(el => {
//
if (typeof el.operRemark == 'string') { el.operRemark = el.operRemark.replace(/\n/g, ' <br />'); }
//
return el;
//
});
//
this.totalCount = res.data.result.page.totalCount;
//
} else {
//
checkFalse(res.data.message);
//
return false;
//
}
//
})
//
.catch(err => {
//
this.tableLoading = false;
//
checkStatus(err);
//
})
//
.finally(_ => this.count++);
//
},
updateImgUrl
()
{
this
.
imgLoading
=
true
;
doFetch
(
url
.
updateImgUrl
,
{
...
...
@@ -395,15 +396,15 @@ export default {
});
}
},
handleSizeChange
(
v
)
{
this
.
logPageParam
.
pageSize
=
v
;
this
.
logPageParam
.
currentPage
=
1
;
this
.
getLogPage
();
},
handleCurrentChange
(
v
)
{
this
.
logPageParam
.
currentPage
=
v
;
this
.
getLogPage
();
},
//
handleSizeChange (v) {
//
this.logPageParam.pageSize = v;
//
this.logPageParam.currentPage = 1;
//
this.getLogPage();
//
},
//
handleCurrentChange (v) {
//
this.logPageParam.currentPage = v;
//
this.getLogPage();
//
},
// 集团配置
getEnterpriseInfo
()
{
doFetchqs
(
url
.
enterpriseInfo
).
then
(
res
=>
{
...
...
@@ -488,6 +489,7 @@ export default {
customermainstoreDialog
,
customersubstoreDialog
,
customerlabelDialog
,
IconLabelValue
IconLabelValue
,
CustomerLog
},
};
src/components/wechatmembers/cardMixin.js
0 → 100644
View file @
db298adc
import
{
formatYMD
}
from
'@/common/filters/custom.js'
;
export
default
{
data
()
{
return
{
// dateKey: 0,
dateDefault
:
[],
pickerOptions
()
{
// let pickerMinDate;
return
{
onPick
(
obj
)
{
// pickerMinDate = obj.minDate;
},
disabledDate
(
time
)
{
let
start
=
new
Date
();
start
.
setFullYear
(
start
.
getFullYear
()
-
1
);
start
.
setDate
(
start
.
getDate
()
+
1
);
start
=
new
Date
(
`
${
start
.
getFullYear
()}
-
${
start
.
getMonth
()
+
1
}
-
${
start
.
getDate
()}
`
);
let
end
=
new
Date
();
end
=
new
Date
(
`
${
end
.
getFullYear
()}
-
${
end
.
getMonth
()
+
1
}
-
${
end
.
getDate
()}
23:59:59`
);
return
time
.
getTime
()
<
start
.
getTime
()
||
time
.
getTime
()
>
end
;
}
};
}
};
},
methods
:
{
setDefalutTime
(){
let
start
=
new
Date
();
start
.
setFullYear
(
start
.
getFullYear
()
-
1
);
start
.
setDate
(
start
.
getDate
()
+
1
);
start
=
`
${
start
.
getFullYear
()}
-
${
start
.
getMonth
()
+
1
}
-
${
start
.
getDate
()}
`
;
let
end
=
new
Date
();
end
=
`
${
end
.
getFullYear
()}
-
${
end
.
getMonth
()
+
1
}
-
${
end
.
getDate
()}
`
;
this
.
dateDefault
=
[
formatYMD
(
new
Date
(
start
).
getTime
()),
formatYMD
(
new
Date
(
end
).
getTime
())]
},
}
};
\ No newline at end of file
src/components/wechatmembers/cardvoucher.vue
View file @
db298adc
...
...
@@ -5,12 +5,12 @@
<el-select
v-model=
"cardReviceCode"
style=
"margin-right: 7px;"
placeholder=
"所有
渠道
"
placeholder=
"所有
来源
"
@
change=
"handleSearch"
>
<el-option
:key=
-1
label=
"所有
渠道
"
label=
"所有
来源
"
:value=
-1
></el-option>
<el-option
...
...
@@ -24,6 +24,7 @@
v-model=
"useStatus"
placeholder=
"所有状态"
@
change=
"handleSearch"
style=
"margin-right: 7px;"
>
<el-option
:key=
-1
...
...
@@ -71,7 +72,9 @@
:value=
10
></el-option>
</el-select>
<el-date-picker
style=
"width: 256px;"
v-model=
"dateDefault"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"创建开始日期"
end-placeholder=
"创建结束日期"
:default-time=
"['00:00:00', '23:59:59']"
:picker-options=
"pickerOptions()"
value-format=
"yyyy-MM-dd"
@
change=
"handleSearch"
>
</el-date-picker>
</div>
<p
class=
"font14 tip-p"
>
展示投放时间仅一年的卡券
</p>
<div
class=
"table-content"
>
<el-table
:data=
"memberData"
...
...
@@ -107,9 +110,17 @@
</el-table-column>
<el-table-column
prop=
"receiveName"
label=
"投放
渠道
"
label=
"投放
来源
"
></el-table-column>
<el-table-column
prop=
"cardType"
label=
"卡券类型"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
cardType
==
0
?
'抵金券'
:
row
.
cardType
==
1
?
'折扣券'
:
row
.
cardType
==
2
?
'兑换券'
:
'--'
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"cardName"
label=
"卡券名称"
>
...
...
@@ -120,6 +131,24 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"cardDenomination"
label=
"优惠额度"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
cardType
==
0
?
`${row.cardDenomination
}
元`
:
row
.
cardType
==
1
?
`${row.cardDenomination
}
折`
:
row
.
cardType
==
2
?
`${row.cardDenomination
}
`
:
'--'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"receiveName"
label
=
"有效期"
>
<
template
slot
-
scope
=
"{row
}
"
>
<!--
{{
row
.
cardEffectiveMode
==
0
?
`${row.effectTime | formatTime
}
-${row.limitTime | formatTime
}
`
:
row
.
cardEffectiveMode
==
1
&&
row
.
receiveTime
==
null
?
`领取后${row.startDay
}
天生效,有效期${row.limitDay
}
天`
:
row
.
cardEffectiveMode
==
1
&&
row
.
receiveTime
!=
null
?
`${row.effectTime | formatTime
}
-${row.limitTime | formatTime
}
`
:
row
.
cardEffectiveMode
==
2
&&
row
.
receiveTime
==
null
?
'领取后当月有效'
:
row
.
cardEffectiveMode
==
2
&&
row
.
receiveTime
!=
null
?
`${row.effectTime | formatTime
}
-${row.limitTime | formatTime
}
`
:
'--'
}}
-->
{{
row
.
cardEffectiveMode
==
0
||
(
row
.
cardEffectiveMode
==
2
&&
row
.
receiveTime
!=
null
)
||
(
row
.
cardEffectiveMode
==
1
&&
row
.
receiveTime
!=
null
)
?
`${row.effectTime | formatTime
}
-${row.limitTime | formatTime
}
`
:
row
.
cardEffectiveMode
==
1
&&
row
.
receiveTime
==
null
?
`领取后${row.startDay
}
天生效,有效期${row.limitDay
}
天`
:
row
.
cardEffectiveMode
==
2
&&
row
.
receiveTime
==
null
?
'领取后当月有效'
:
'--'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"cardCode"
label
=
"卡券代码"
>
...
...
@@ -130,7 +159,7 @@
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"status"
label=
"状态"
label
=
"
卡券
状态"
>
<
div
slot
-
scope
=
"scope"
v
-
html
=
"formatStatus(scope.row)"
>
<!--
<
span
v
-
if
=
"scope.row.status === -1"
>
所有
<
/span
>
...
...
@@ -299,6 +328,7 @@
<
/template
>
<
script
>
import
mixin
from
'./cardMixin'
;
import
nav
from
"../../common/navbar/navbar.vue"
;
import
{
doFetch
}
from
"../../components/axios/api"
;
import
url
from
"../../components/axios/url"
;
...
...
@@ -352,12 +382,12 @@ export default {
orderNumber
:
null
,
}
;
}
,
mixins
:
[
authMethods
],
mixins
:
[
authMethods
,
mixin
],
methods
:
{
formatStatus
(
row
)
{
let
_content
=
''
;
const
{
status
}
=
row
;
console
.
log
(
row
)
//
console.log(row)
let
isOverdue
=
Date
.
now
()
>=
row
.
limitTime
;
if
(
status
==
3
)
{
_content
=
`<div class="${isOverdue ? 'dm-status--info' : 'dm-status--error'
}
">${isOverdue ? '已过期' : '待领取'
}
</div>`
;
...
...
@@ -503,7 +533,9 @@ export default {
pageSize
:
this
.
page
.
pageSize
,
currentPage
:
this
.
page
.
currentPage
,
cardReviceCode
:
this
.
cardReviceCode
,
useStatus
:
this
.
useStatus
useStatus
:
this
.
useStatus
,
beginTime
:
this
.
dateDefault
[
0
],
endTime
:
this
.
dateDefault
[
1
],
}
)
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
...
...
@@ -556,6 +588,7 @@ export default {
}
}
,
created
()
{
this
.
setDefalutTime
()
if
(
this
.
memberId
)
{
this
.
getMemberCardsPage
();
}
...
...
@@ -569,6 +602,10 @@ export default {
<
/script
>
<
style
lang
=
"stylus"
scoped
>
.
tip
-
p
{
color
:
#
6
B6D71
;
padding
-
bottom
:
16
px
;
}
.
check
-
box
{
padding
-
bottom
:
20
px
;
}
...
...
src/components/wechatmembers/integralDataPage.vue
View file @
db298adc
<
template
>
<div
class=
"integral-tab"
>
<div
class=
"integral-tab
m20
"
>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
label=
"积分明细"
name=
"first"
>
<p
class=
"font14 tip-p"
>
展示近两年的积分明细
</p>
...
...
@@ -52,6 +52,7 @@
<el-option
label=
"所有积分状态"
:value=
-1
></el-option>
<el-option
v-for=
"item in frozenStatusList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
<el-date-picker
style=
"width: 256px;"
v-model=
"dateDefault"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"创建开始日期"
end-placeholder=
"创建结束日期"
:default-time=
"['00:00:00', '23:59:59']"
:picker-options=
"pickerOptions()"
value-format=
"yyyy-MM-dd"
@
change=
"handleSearch"
>
</el-date-picker>
</div>
<el-button
v-if=
"getCodeAuth('memberAdjustIntegral')"
...
...
@@ -232,6 +233,7 @@
</template>
<
script
>
import
mixin
from
'./integralMixin'
;
import
enterpriseIntergralWithhold
from
'./enterpriseIntergralWithhold.vue'
;
import
nav
from
"../../common/navbar/navbar.vue"
;
import
{
doFetch
}
from
"../../components/axios/api"
;
...
...
@@ -284,7 +286,7 @@ export default {
integralFlag
:
""
};
},
mixins
:
[
authMethods
],
mixins
:
[
authMethods
,
mixin
],
methods
:
{
formatSourceType
(
row
,
col
,
val
)
{
const
type
=
this
.
sourceTypeList
.
find
(
el
=>
el
.
value
==
val
)
||
{};
...
...
@@ -335,8 +337,8 @@ export default {
dictCode
:
this
.
dictCode
,
searchType
:
this
.
searchType
,
sourceType
:
this
.
sourceType
,
beginTime
:
this
.
beginTime
,
endTime
:
this
.
endTime
,
beginTime
:
this
.
dateDefault
[
0
]
,
endTime
:
this
.
dateDefault
[
1
]
,
storeName
:
this
.
storeName
,
frozenStatus
:
this
.
frozenStatus
})
...
...
@@ -395,6 +397,7 @@ export default {
}
},
created
()
{
this
.
setDefalutTime
()
if
(
this
.
memberId
)
{
this
.
getIntegralDataPage
();
this
.
getIntegralOperateType
();
...
...
@@ -410,6 +413,10 @@ export default {
</
script
>
<
style
lang=
"stylus"
>
.m20
{
margin
:
20px
;
margin-top
:
0px
;
}
.tip-p
{
color
:
#6B6D71
;
padding-bottom
:
16px
;
...
...
src/router/index.js
View file @
db298adc
...
...
@@ -53,6 +53,13 @@ export const constantRouterMap = [
},
},
{
path
:
'/customerLog'
,
component
:
_import
(
'allCustomers/components'
,
'customerLog'
),
meta
:
{
title
:
'客户日志'
,
},
},
{
path
:
'/order-list'
,
component
:
_import
(
'allCustomers'
,
'order-list'
),
meta
:
{
...
...
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