Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-points
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 56c1cfe2
authored
Dec 21, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.22.2' of
http://192.168.3.233:8090/saas/scrm-micro-points
into v3.22.2
2 parents
97f8f6d5
38dcdc83
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
214 additions
and
94 deletions
src/views/storeCredit/add.vue
src/views/storeCredit/components/auditDialog.vue
src/views/storeCredit/components/detailDialog.vue
src/views/storeCredit/components/gas.vue
src/views/storeCredit/components/pointsConfig.vue
src/views/storeCredit/components/service.vue
src/views/storeCredit/index.vue
src/views/withdraw/detail.vue
src/views/withdraw/index.vue
src/views/storeCredit/add.vue
View file @
56c1cfe
...
@@ -76,17 +76,22 @@
...
@@ -76,17 +76,22 @@
>
下载模板
<
/a
>
>
下载模板
<
/a
>
<
/div
>
<
/div
>
<
template
v
-
if
=
"importObject.detailList"
>
<
template
v
-
if
=
"importObject.detailList"
>
<
div
class
=
"file-info flex"
>
<
template
v
-
if
=
"importObject.name"
>
<
template
v
-
if
=
"importObject.name"
>
<
div
class
=
"file-info flex"
>
<
div
class
=
"el-icon-success"
><
/div
>
<
div
class
=
"el-icon-success"
><
/div
>
文件格式正确(
{{
importObject
.
name
}}
)
文件格式正确(
{{
importObject
.
name
}}
)
<
/template
>
<
/div
>
<
/div
>
<
/template
>
<
div
class
=
"table-box"
>
<
div
class
=
"table-box"
>
<
div
class
=
"table"
>
<
GLTable
<
GLTable
:
tableData
=
"importObject.detailList
"
:
tableData
=
"importObject.detailList[pageNum - 1]
"
:
tableParams
=
"tableParams"
:
tableParams
=
"tableParams"
:
hasPage
=
"false"
ref
=
"listRef"
:
pageConf
=
"pageConf"
:
tableTotal
=
"totalForm.customerTotal"
:
pageSizes
=
"[50]"
@
refreshTable
=
"refreshTable"
>
>
<
template
<
template
slot
=
"cashBackValue"
slot
=
"cashBackValue"
...
@@ -100,7 +105,7 @@
...
@@ -100,7 +105,7 @@
><
/el-input
>
><
/el-input
>
<
/template
>
<
/template
>
<
template
v
-
else
>
<
template
v
-
else
>
{{
scope
.
scope
.
buy
Value
||
'-'
}}
{{
scope
.
scope
.
cashBack
Value
||
'-'
}}
<
/template
>
<
/template
>
<
/template
>
<
/template
>
<
template
<
template
...
@@ -124,16 +129,23 @@
...
@@ -124,16 +129,23 @@
>
>
<
template
v
-
if
=
"scope.scope.oilList && scope.scope.oilList.length"
>
<
template
v
-
if
=
"scope.scope.oilList && scope.scope.oilList.length"
>
<
div
class
=
"flex"
>
<
div
class
=
"flex"
>
<
div
class
=
"list"
>
<
span
>
{{
filterData
(
scope
.
scope
.
oilList
,
'oilList'
).
slice
(
0
,
1
).
join
(
'、'
)
}}
<
/span
>
<
template
v
-
for
=
"(i, index) in scope.scope.oilList"
>
<
el
-
popover
<
template
>
placement
=
"top"
width
=
"fit-content"
trigger
=
"hover"
>
<
div
<
div
v
-
for
=
"(item,index) in filterData(scope.scope.oilList,'oilList')"
:
key
=
"index"
:
key
=
"index"
class
=
"item flex"
>
>
{{
i
.
aliasName
}}
*
{{
i
.
amount
}}
({{
NP
.
times
(
i
.
amount
,
i
.
faceValue
)
}}
积分
)
<
/div
>
{{
item
}}
<
/template
>
<
/template
>
<
/div
>
<
/div
>
<
span
class
=
"more-info"
slot
=
"reference"
>
...({{
scope
.
scope
.
oilList
.
length
}}
)
<
/span
>
<
/el-popover
>
<
template
v
-
if
=
"!pageObject.disabled"
>
<
template
v
-
if
=
"!pageObject.disabled"
>
<
el
-
button
<
el
-
button
type
=
"text"
type
=
"text"
...
@@ -160,16 +172,23 @@
...
@@ -160,16 +172,23 @@
>
>
<
template
v
-
if
=
"scope.scope.couponList && scope.scope.couponList.length"
>
<
template
v
-
if
=
"scope.scope.couponList && scope.scope.couponList.length"
>
<
div
class
=
"flex"
>
<
div
class
=
"flex"
>
<
div
class
=
"list"
>
<
span
>
{{
filterData
(
scope
.
scope
.
couponList
,
'couponList'
).
slice
(
0
,
1
).
join
(
'、'
)
}}
<
/span
>
<
template
v
-
for
=
"(i, index) in scope.scope.couponList"
>
<
el
-
popover
<
template
>
placement
=
"top"
width
=
"fit-content"
trigger
=
"hover"
>
<
div
<
div
v
-
for
=
"(item,index) in filterData(scope.scope.couponList,'couponList')"
:
key
=
"index"
:
key
=
"index"
class
=
"item flex"
>
>
{{
i
.
couponName
}}
*
{{
i
.
amount
}}
<
/div
>
{{
item
}}
<
/template
>
<
/template
>
<
/div
>
<
/div
>
<
span
class
=
"more-info"
slot
=
"reference"
>
...({{
scope
.
scope
.
couponList
.
length
}}
)
<
/span
>
<
/el-popover
>
<
template
v
-
if
=
"!pageObject.disabled"
>
<
template
v
-
if
=
"!pageObject.disabled"
>
<
el
-
button
<
el
-
button
type
=
"text"
type
=
"text"
...
@@ -191,6 +210,7 @@
...
@@ -191,6 +210,7 @@
<
/template
>
<
/template
>
<
/template
>
<
/template
>
<
/GLTable
>
<
/GLTable
>
<
/div
>
<
div
<
div
class
=
"total"
class
=
"total"
:
key
=
"totalKey"
:
key
=
"totalKey"
...
@@ -257,9 +277,12 @@ import NP from 'number-precision'
...
@@ -257,9 +277,12 @@ import NP from 'number-precision'
import
selectStore
from
'./components/selectStore'
import
selectStore
from
'./components/selectStore'
import
pointsConfig
from
'./components/pointsConfig.vue'
import
pointsConfig
from
'./components/pointsConfig.vue'
import
importErrDialog
from
'./components/importErrDialog.vue'
import
importErrDialog
from
'./components/importErrDialog.vue'
let
chargeObject
=
{
const
truncateDecimal
=
(
number
,
decimalPlaces
=
2
)
=>
{
gasCardServiceCharge
:
0
,
let
[
integer
,
decimals
]
=
String
(
number
).
split
(
'.'
)
passageServiceCharge
:
0
if
(
!
decimals
)
decimals
=
'00'
if
(
decimals
.
length
>
2
)
decimals
=
decimals
.
substring
(
0
,
decimalPlaces
)
if
(
decimals
.
length
==
1
)
decimals
+=
'0'
return
`${integer
}
.${decimals
}
`
}
}
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -272,6 +295,7 @@ export default {
...
@@ -272,6 +295,7 @@ export default {
return
{
return
{
NP
,
NP
,
loading
:
false
,
loading
:
false
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
}
,
relateStoreVisible
:
false
,
relateStoreVisible
:
false
,
rule
:
{
rule
:
{
merchantId
:
[{
required
:
true
,
message
:
'请选择商户'
,
trigger
:
'change'
}
],
merchantId
:
[{
required
:
true
,
message
:
'请选择商户'
,
trigger
:
'change'
}
],
...
@@ -279,8 +303,10 @@ export default {
...
@@ -279,8 +303,10 @@ export default {
required
:
true
,
trigger
:
'change'
,
validator
:
(
rule
,
value
,
callback
)
=>
{
required
:
true
,
trigger
:
'change'
,
validator
:
(
rule
,
value
,
callback
)
=>
{
const
{
detailList
}
=
this
.
importObject
const
{
detailList
}
=
this
.
importObject
if
(
detailList
&&
detailList
.
length
)
{
if
(
detailList
&&
detailList
.
length
)
{
detailList
.
map
(
e
=>
{
detailList
.
map
(
i
=>
{
if
(
!
e
.
cashBackValue
&&
!
e
.
buyValue
)
callback
(
new
Error
(
'返现金额和商品兑换积分二者至少需填写一个正整数的数值'
))
i
.
map
(
e
=>
{
if
(
e
.
cashBackValue
<
1
&&
e
.
buyValue
<
1
)
callback
(
new
Error
(
'返现金额和商品兑换积分二者至少需填写一个正整数的数值'
))
}
)
}
)
}
)
callback
()
callback
()
}
else
callback
(
new
Error
(
'请导入充值人群'
))
}
else
callback
(
new
Error
(
'请导入充值人群'
))
...
@@ -324,9 +350,9 @@ export default {
...
@@ -324,9 +350,9 @@ export default {
name
:
'passageServiceCharge'
,
name
:
'passageServiceCharge'
,
formatter
:
(
cell
)
=>
{
formatter
:
(
cell
)
=>
{
const
{
passageService
}
=
cell
,
const
{
passageService
}
=
cell
,
{
passageServiceCharge
}
=
chargeObject
,
{
passageServiceCharge
}
=
this
.
chargeObject
,
passageSum
=
passageService
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
),
passageSum
=
passageService
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
),
sum
=
NP
.
times
(
passageSum
,
passageServiceCharge
).
toFixed
(
2
)
sum
=
truncateDecimal
(
NP
.
times
(
passageSum
,
passageServiceCharge
,
0.01
)
)
return
`${passageSum
}
*${passageServiceCharge
}
%=${sum
}
`
return
`${passageSum
}
*${passageServiceCharge
}
%=${sum
}
`
}
}
}
,
}
,
...
@@ -335,9 +361,9 @@ export default {
...
@@ -335,9 +361,9 @@ export default {
name
:
'gasCardServiceCharge'
,
name
:
'gasCardServiceCharge'
,
formatter
:
(
cell
)
=>
{
formatter
:
(
cell
)
=>
{
const
{
gasService
}
=
cell
,
const
{
gasService
}
=
cell
,
{
gasCardServiceCharge
}
=
chargeObject
,
{
gasCardServiceCharge
}
=
this
.
chargeObject
,
gasCardSum
=
gasService
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
),
gasCardSum
=
gasService
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
),
sum
=
NP
.
times
(
gasCardSum
,
gasCardServiceCharge
).
toFixed
(
2
)
sum
=
truncateDecimal
(
NP
.
times
(
gasCardSum
,
gasCardServiceCharge
,
0.01
)
)
return
`${gasCardSum
}
*${gasCardServiceCharge
}
%=${sum
}
`
return
`${gasCardSum
}
*${gasCardServiceCharge
}
%=${sum
}
`
}
}
}
,
}
,
...
@@ -346,12 +372,11 @@ export default {
...
@@ -346,12 +372,11 @@ export default {
name
:
'sum'
,
name
:
'sum'
,
formatter
:
(
cell
)
=>
{
formatter
:
(
cell
)
=>
{
const
{
total
,
gasService
,
passageService
}
=
cell
,
const
{
total
,
gasService
,
passageService
}
=
cell
,
{
gasCardServiceCharge
,
passageServiceCharge
}
=
chargeObject
,
{
gasCardServiceCharge
,
passageServiceCharge
}
=
this
.
chargeObject
,
gasPrice
=
NP
.
times
(
gasService
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
),
gasCardServiceCharge
),
gasPrice
=
NP
.
times
(
gasService
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
),
gasCardServiceCharge
,
0.01
),
passagePrice
=
NP
.
times
(
passageService
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
),
passageServiceCharge
),
passagePrice
=
NP
.
times
(
passageService
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
),
passageServiceCharge
,
0.01
),
totalPrice
=
total
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
)
totalPrice
=
total
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
,
0
)
return
truncateDecimal
(
NP
.
plus
(
gasPrice
,
passagePrice
,
totalPrice
))
return
NP
.
plus
(
gasPrice
,
passagePrice
,
totalPrice
).
toFixed
(
2
)
}
}
}
,
}
,
],
],
...
@@ -360,7 +385,7 @@ export default {
...
@@ -360,7 +385,7 @@ export default {
{
{
label
:
'保单号'
,
label
:
'保单号'
,
prop
:
'policyNo'
,
prop
:
'policyNo'
,
minWidth
:
1
00
minWidth
:
2
00
}
,
}
,
{
{
label
:
'用户姓名'
,
label
:
'用户姓名'
,
...
@@ -370,7 +395,7 @@ export default {
...
@@ -370,7 +395,7 @@ export default {
{
{
label
:
'身份证号'
,
label
:
'身份证号'
,
prop
:
'idCardNo'
,
prop
:
'idCardNo'
,
minWidth
:
1
00
minWidth
:
2
00
}
,
}
,
{
{
label
:
'用户手机号'
,
label
:
'用户手机号'
,
...
@@ -379,22 +404,22 @@ export default {
...
@@ -379,22 +404,22 @@ export default {
}
,
}
,
{
{
label
:
'返现金额'
,
label
:
'返现金额'
,
minWidth
:
200
,
minWidth
:
128
,
addHtml
:
'cashBackValue'
,
addHtml
:
'cashBackValue'
,
}
,
}
,
{
{
label
:
'商品兑换积分'
,
label
:
'商品兑换积分'
,
addHtml
:
'buyValue'
,
addHtml
:
'buyValue'
,
minWidth
:
200
minWidth
:
128
}
,
}
,
{
{
label
:
'赠送油券'
,
label
:
'赠送油券'
,
minWidth
:
2
0
0
,
minWidth
:
2
6
0
,
addHtml
:
'oilList'
addHtml
:
'oilList'
}
,
}
,
{
{
label
:
'赠送自店服务'
,
label
:
'赠送自店服务'
,
minWidth
:
2
0
0
,
minWidth
:
2
6
0
,
addHtml
:
'couponList'
addHtml
:
'couponList'
}
,
}
,
{
{
...
@@ -414,7 +439,7 @@ export default {
...
@@ -414,7 +439,7 @@ export default {
{
{
label
:
'商户名称'
,
label
:
'商户名称'
,
prop
:
'merchantName'
,
prop
:
'merchantName'
,
minWidth
:
1
00
minWidth
:
3
00
}
,
}
,
]
]
}
,
}
,
...
@@ -429,7 +454,12 @@ export default {
...
@@ -429,7 +454,12 @@ export default {
disabled
:
false
,
disabled
:
false
,
batchNo
:
''
,
batchNo
:
''
,
status
:
''
status
:
''
}
}
,
chargeObject
:
{
gasCardServiceCharge
:
0
,
passageServiceCharge
:
0
}
,
pageNum
:
1
}
}
}
,
}
,
mounted
()
{
mounted
()
{
...
@@ -437,6 +467,9 @@ export default {
...
@@ -437,6 +467,9 @@ export default {
if
(
id
)
this
.
getDetail
(
id
,
type
)
if
(
id
)
this
.
getDetail
(
id
,
type
)
}
,
}
,
methods
:
{
methods
:
{
refreshTable
({
pageNum
}
)
{
this
.
pageNum
=
pageNum
}
,
async
getDetail
(
id
,
type
)
{
async
getDetail
(
id
,
type
)
{
try
{
try
{
this
.
loading
=
true
this
.
loading
=
true
...
@@ -456,12 +489,18 @@ export default {
...
@@ -456,12 +489,18 @@ export default {
this
.
handleRelateStoreConfirm
({
this
.
handleRelateStoreConfirm
({
merchantId
:
res
.
merchantId
,
merchantId
:
res
.
merchantId
,
merchantName
:
res
.
merchantName
merchantName
:
res
.
merchantName
}
,
{
gasCardServiceCharge
:
res
.
oilCouponRate
,
passageServiceCharge
:
res
.
integralRate
}
)
}
)
this
.
totalForm
.
customerTotal
=
detailList
.
length
this
.
totalForm
.
customerTotal
=
detailList
.
length
const
list
=
this
.
splitArray
(
detailList
,
50
)
this
.
importObject
=
{
this
.
importObject
=
{
detailList
detailList
:
list
}
}
this
.
loading
=
false
this
.
loading
=
false
this
.
pageNum
=
1
this
.
setTableHeight
(
detailList
)
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
loading
=
false
this
.
loading
=
false
setTimeout
(()
=>
this
.
$router
.
go
(
-
1
),
1
e3
)
setTimeout
(()
=>
this
.
$router
.
go
(
-
1
),
1
e3
)
...
@@ -477,7 +516,8 @@ export default {
...
@@ -477,7 +516,8 @@ export default {
const
{
merchantId
,
merchantName
}
=
this
.
configForm
,
const
{
merchantId
,
merchantName
}
=
this
.
configForm
,
list
=
this
.
importObject
.
detailList
list
=
this
.
importObject
.
detailList
let
detailList
=
[]
let
detailList
=
[]
list
.
map
(
e
=>
{
list
.
map
(
i
=>
{
i
.
map
(
e
=>
{
let
oilList
=
[],
couponList
=
[]
let
oilList
=
[],
couponList
=
[]
e
.
oilList
?.
map
(
o
=>
{
e
.
oilList
?.
map
(
o
=>
{
oilList
.
push
({
oilList
.
push
({
...
@@ -499,12 +539,13 @@ export default {
...
@@ -499,12 +539,13 @@ export default {
customerName
:
e
.
customerName
,
customerName
:
e
.
customerName
,
customerPhone
:
e
.
customerPhone
,
customerPhone
:
e
.
customerPhone
,
idCardNo
:
e
.
idCardNo
,
idCardNo
:
e
.
idCardNo
,
cashBackValue
:
e
.
cashBackValue
,
cashBackValue
:
e
.
cashBackValue
||
0
,
buyValue
:
e
.
buyValue
,
buyValue
:
e
.
buyValue
||
0
,
oilList
,
oilList
,
couponList
couponList
}
)
}
)
}
)
}
)
}
)
let
params
=
{
let
params
=
{
merchantId
,
merchantId
,
merchantName
,
merchantName
,
...
@@ -534,12 +575,14 @@ export default {
...
@@ -534,12 +575,14 @@ export default {
const
reader
=
new
FileReader
()
const
reader
=
new
FileReader
()
reader
.
readAsDataURL
(
file
)
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
async
event
=>
{
reader
.
onload
=
async
event
=>
{
this
.
loading
=
true
this
.
$refs
.
file
.
value
=
''
this
.
$refs
.
file
.
value
=
''
const
imgFile
=
event
.
target
.
result
,
const
imgFile
=
event
.
target
.
result
,
[,
arrBase64
]
=
imgFile
.
split
(
','
),
[,
arrBase64
]
=
imgFile
.
split
(
','
),
splitStr
=
file
.
name
.
split
(
'.'
),
splitStr
=
file
.
name
.
split
(
'.'
),
fileUrl
=
splitStr
.
at
(
-
1
)
+
'@'
+
arrBase64
,
fileUrl
=
splitStr
.
at
(
-
1
)
+
'@'
+
arrBase64
,
{
code
,
message
,
data
}
=
await
this
.
$apis
.
points
.
importCustomerIntegral
({
file
:
fileUrl
}
)
{
code
,
message
,
data
}
=
await
this
.
$apis
.
points
.
importCustomerIntegral
({
file
:
fileUrl
}
)
this
.
loading
=
false
if
(
code
==
0
)
{
if
(
code
==
0
)
{
const
{
importStatue
,
const
{
importStatue
,
detailList
,
detailList
,
...
@@ -550,8 +593,9 @@ export default {
...
@@ -550,8 +593,9 @@ export default {
detailList
.
map
((
row
,
index
)
=>
{
detailList
.
map
((
row
,
index
)
=>
{
this
.
updateTotal
(
row
,
index
)
this
.
updateTotal
(
row
,
index
)
}
)
}
)
const
list
=
this
.
splitArray
(
detailList
,
50
)
this
.
importObject
=
{
this
.
importObject
=
{
detailList
,
detailList
:
list
,
name
:
file
.
name
name
:
file
.
name
}
}
this
.
$message
({
this
.
$message
({
...
@@ -559,7 +603,9 @@ export default {
...
@@ -559,7 +603,9 @@ export default {
type
:
'success'
type
:
'success'
}
)
}
)
this
.
totalForm
.
customerTotal
=
detailList
.
length
this
.
totalForm
.
customerTotal
=
detailList
.
length
this
.
pageNum
=
1
this
.
validateField
(
'table'
)
this
.
validateField
(
'table'
)
this
.
setTableHeight
(
detailList
)
}
else
this
.
importObj
=
{
}
else
this
.
importObj
=
{
errorCount
,
errorCount
,
errorUrl
,
errorUrl
,
...
@@ -567,14 +613,25 @@ export default {
...
@@ -567,14 +613,25 @@ export default {
show
:
true
show
:
true
}
}
}
}
else
th
row
message
||
''
else
th
is
.
$message
.
error
(
message
)
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
loading
=
false
this
.
$refs
.
file
.
value
=
''
this
.
$refs
.
file
.
value
=
''
if
(
error
)
this
.
$message
.
error
(
error
)
if
(
error
)
this
.
$message
.
error
(
error
)
}
}
}
,
}
,
setTableHeight
(
detailList
=
[])
{
const
{
listRef
}
=
this
.
$refs
if
(
listRef
)
{
let
length
=
detailList
.
length
listRef
.
tableHeightValues
=
`${(length > 10 ? 10 : length) * 56 + 56
}
px`
}
else
setTimeout
(()
=>
{
this
.
setTableHeight
(
detailList
)
}
,
100
)
}
,
// 选择门店
// 选择门店
handleRelateStoreClose
()
{
handleRelateStoreClose
()
{
this
.
relateStoreVisible
=
false
this
.
relateStoreVisible
=
false
...
@@ -582,21 +639,22 @@ export default {
...
@@ -582,21 +639,22 @@ export default {
validateField
(
id
)
{
validateField
(
id
)
{
this
.
$refs
.
fromRef
.
$refs
.
formRef
.
validateField
(
id
)
this
.
$refs
.
fromRef
.
$refs
.
formRef
.
validateField
(
id
)
}
,
}
,
async
handleRelateStoreConfirm
(
selectedData
)
{
async
handleRelateStoreConfirm
(
selectedData
,
isEdit
)
{
selectedData
.
merchantId
&&
(
this
.
$set
(
this
.
configForm
,
'merchantId'
,
selectedData
.
merchantId
))
selectedData
.
merchantId
&&
(
this
.
$set
(
this
.
configForm
,
'merchantId'
,
selectedData
.
merchantId
))
selectedData
.
merchantName
&&
(
this
.
$set
(
this
.
configForm
,
'merchantName'
,
selectedData
.
merchantName
))
selectedData
.
merchantName
&&
(
this
.
$set
(
this
.
configForm
,
'merchantName'
,
selectedData
.
merchantName
))
this
.
validateField
(
'merchantId'
)
this
.
validateField
(
'merchantId'
)
this
.
handleRelateStoreClose
()
this
.
handleRelateStoreClose
()
try
{
try
{
const
res
=
await
this
.
$apis
.
points
.
getMerchantCharge
({
merchantId
:
selectedData
.
merchantId
}
)
const
res
=
isEdit
?
isEdit
:
await
this
.
$apis
.
points
.
getMerchantCharge
({
merchantId
:
selectedData
.
merchantId
}
)
if
(
res
)
{
if
(
res
)
{
this
.
totalFormData
.
map
(
e
=>
{
this
.
totalFormData
.
map
(
e
=>
{
if
([
'gasCardServiceCharge'
,
'passageServiceCharge'
].
includes
(
e
.
name
))
{
if
([
'gasCardServiceCharge'
,
'passageServiceCharge'
].
includes
(
e
.
name
))
{
const
val
=
NP
.
divide
(
res
[
e
.
name
]
||
0
,
100
)
const
val
=
res
[
e
.
name
]
||
0
e
.
label
=
e
.
label
.
replace
(
/
\d
+/g
,
val
)
e
.
label
=
e
.
label
.
replace
(
/
\d
+/g
,
val
)
chargeObject
[
e
.
name
]
=
val
this
.
chargeObject
[
e
.
name
]
=
val
}
}
}
)
}
)
console
.
log
(
this
.
totalFormData
)
this
.
updateView
()
this
.
updateView
()
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -605,13 +663,13 @@ export default {
...
@@ -605,13 +663,13 @@ export default {
}
,
}
,
showConfig
(
row
,
index
,
type
=
0
)
{
showConfig
(
row
,
index
,
type
=
0
)
{
row
.
oilList
||=
[]
row
.
couponList
||=
[]
this
.
configParams
=
{
this
.
configParams
=
{
show
:
true
,
show
:
true
,
row
,
row
,
type
,
type
,
index
index
,
oilList
:
JSON
.
parse
(
JSON
.
stringify
(
row
.
oilList
||
[])),
couponList
:
JSON
.
parse
(
JSON
.
stringify
(
row
.
couponList
||
[])),
}
}
}
,
}
,
setRowTotal
(
row
,
index
)
{
setRowTotal
(
row
,
index
)
{
...
@@ -674,6 +732,19 @@ export default {
...
@@ -674,6 +732,19 @@ export default {
}
}
}
}
}
)
}
)
}
,
filterData
(
list
,
name
)
{
return
list
?.
map
(
i
=>
{
return
name
==
'oilList'
?
`${i.aliasName
}
*${i.amount
}
(${NP.times(i.amount, i.faceValue)
}
积分)`
:
`${i.couponName
}
*${i.amount
}
`
}
)
||
[]
}
,
splitArray
(
arr
,
size
)
{
let
result
=
[],
newArr
=
JSON
.
parse
(
JSON
.
stringify
(
arr
))
for
(
let
i
=
0
;
i
<
newArr
.
length
;
i
+=
size
)
{
result
.
push
(
newArr
.
slice
(
i
,
i
+
size
))
}
return
result
}
}
}
}
...
@@ -689,7 +760,7 @@ export default {
...
@@ -689,7 +760,7 @@ export default {
left
:
0
;
left
:
0
;
.
box
{
.
box
{
width
:
100
%
;
width
:
100
%
;
height
:
calc
(
100
%
-
46
px
);
height
:
calc
(
100
%
-
78
px
);
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
}
}
.
content
{
.
content
{
...
@@ -776,20 +847,24 @@ export default {
...
@@ -776,20 +847,24 @@ export default {
margin
-
top
:
10
px
;
margin
-
top
:
10
px
;
}
}
.
file
-
info
{
.
file
-
info
{
height
:
32
px
;
height
:
20
px
;
font
-
size
:
14
px
;
font
-
size
:
14
px
;
color
:
#
999999
;
color
:
#
999999
;
align
-
items
:
center
;
margin
-
top
:
10
px
;
.
el
-
icon
-
success
{
.
el
-
icon
-
success
{
color
:
#
67
c23a
;
color
:
#
67
c23a
;
line
-
height
:
32
px
;
line
-
height
:
20
px
;
margin
-
right
:
4
px
;
margin
-
right
:
4
px
;
}
}
}
}
.
table
-
box
{
.
table
-
box
{
width
:
864
px
;
min
-
width
:
864
px
;
max
-
width
:
calc
(
100
vw
-
446
px
);
background
:
#
f9f9f9
;
background
:
#
f9f9f9
;
border
-
radius
:
4
px
;
border
-
radius
:
4
px
;
padding
:
20
px
;
padding
:
20
px
;
margin
-
top
:
10
px
;
/deep/
.
el
-
input
{
/deep/
.
el
-
input
{
width
:
100
%
;
width
:
100
%
;
}
}
...
@@ -817,4 +892,18 @@ export default {
...
@@ -817,4 +892,18 @@ export default {
}
}
}
}
}
}
.
more
-
info
{
white
-
space
:
nowrap
;
color
:
#
5850
ff
;
cursor
:
pointer
;
}
/deep/
.
el
-
pagination__sizes
{
width
:
88
px
;
.
el
-
select
{
width
:
100
%
;
.
el
-
input
{
width
:
100
%
;
}
}
}
<
/style
>
<
/style
>
src/views/storeCredit/components/auditDialog.vue
View file @
56c1cfe
...
@@ -59,6 +59,7 @@ export default {
...
@@ -59,6 +59,7 @@ export default {
},
},
methods
:
{
methods
:
{
handleClose
()
{
handleClose
()
{
this
.
checked
=
false
this
.
$emit
(
'update:auditObj'
,
{})
this
.
$emit
(
'update:auditObj'
,
{})
},
},
async
handleConfirm
()
{
async
handleConfirm
()
{
...
@@ -69,11 +70,11 @@ export default {
...
@@ -69,11 +70,11 @@ export default {
try
{
try
{
const
res
=
await
this
.
$apis
.
points
.
auditIntegral
({
id
})
const
res
=
await
this
.
$apis
.
points
.
auditIntegral
({
id
})
if
(
res
)
{
if
(
res
)
{
this
.
$loading
().
close
()
this
.
handleClose
()
this
.
handleClose
()
this
.
$message
.
success
(
'操作成功'
)
this
.
$message
.
success
(
'操作成功'
)
this
.
$parent
.
handleSearch
()
this
.
$parent
.
handleSearch
()
}
}
this
.
$loading
().
close
()
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
$loading
().
close
()
this
.
$loading
().
close
()
if
(
error
)
this
.
$message
.
error
(
error
)
if
(
error
)
this
.
$message
.
error
(
error
)
...
...
src/views/storeCredit/components/detailDialog.vue
View file @
56c1cfe
...
@@ -23,18 +23,23 @@
...
@@ -23,18 +23,23 @@
<template
v-if=
"scope.scope.oilList && scope.scope.oilList.length"
>
<template
v-if=
"scope.scope.oilList && scope.scope.oilList.length"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<div
class=
"list"
>
<span>
{{
filterData
(
scope
.
scope
.
oilList
,
'oilList'
).
slice
(
0
,
1
).
join
(
'、'
)
}}
</span>
<template
v-for=
"(i,index) in scope.scope.oilList"
>
<el-popover
<template>
placement=
"top"
width=
"fit-content"
trigger=
"hover"
>
<div
<div
v-for=
"(item,index) in filterData(scope.scope.oilList,'oilList')"
:key=
"index"
:key=
"index"
class=
"item flex"
>
>
{{
i
.
aliasName
}}
*
{{
i
.
amount
}}
(
{{
NP
.
times
(
i
.
amount
,
i
.
faceValue
)
}}
积分)
{{
item
}}
</div>
</
template
>
</template>
</div>
</div>
<span
class=
"more-info"
slot=
"reference"
>
...(
{{
scope
.
scope
.
oilList
.
length
}}
)
</span>
</el-popover>
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
...
@@ -47,18 +52,23 @@
...
@@ -47,18 +52,23 @@
>
>
<template
v-if=
"scope.scope.couponList && scope.scope.couponList.length"
>
<template
v-if=
"scope.scope.couponList && scope.scope.couponList.length"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<div
class=
"list"
>
<span>
{{
filterData
(
scope
.
scope
.
couponList
,
'couponList'
).
slice
(
0
,
1
).
join
(
'、'
)
}}
</span>
<template
v-for=
"(i,index) in scope.scope.couponList"
>
<el-popover
<template>
placement=
"top"
width=
"fit-content"
trigger=
"hover"
>
<div
<div
v-for=
"(item,index) in filterData(scope.scope.couponList,'couponList')"
:key=
"index"
:key=
"index"
class=
"item flex"
>
>
{{
i
.
couponName
}}
*
{{
i
.
amount
}}
{{
item
}}
</div>
</
template
>
</template>
</div>
</div>
<span
class=
"more-info"
slot=
"reference"
>
...(
{{
scope
.
scope
.
couponList
.
length
}}
)
</span>
</el-popover>
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
...
@@ -94,7 +104,7 @@ export default {
...
@@ -94,7 +104,7 @@ export default {
{
{
label
:
'保单号'
,
label
:
'保单号'
,
prop
:
'policyNo'
,
prop
:
'policyNo'
,
minWidth
:
1
00
minWidth
:
2
00
},
},
{
{
label
:
'用户姓名'
,
label
:
'用户姓名'
,
...
@@ -103,7 +113,7 @@ export default {
...
@@ -103,7 +113,7 @@ export default {
},
},
{
{
label
:
'身份证号'
,
label
:
'身份证号'
,
minWidth
:
1
00
,
minWidth
:
2
00
,
prop
:
'idCardNo'
,
prop
:
'idCardNo'
,
},
},
{
{
...
@@ -123,12 +133,12 @@ export default {
...
@@ -123,12 +133,12 @@ export default {
},
},
{
{
label
:
'赠送油券'
,
label
:
'赠送油券'
,
minWidth
:
15
0
,
minWidth
:
26
0
,
addHtml
:
'oilList'
addHtml
:
'oilList'
},
},
{
{
label
:
'赠送自店服务'
,
label
:
'赠送自店服务'
,
minWidth
:
15
0
,
minWidth
:
26
0
,
addHtml
:
'couponList'
addHtml
:
'couponList'
},
},
{
{
...
@@ -150,17 +160,27 @@ export default {
...
@@ -150,17 +160,27 @@ export default {
methods
:
{
methods
:
{
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
this
.
searchForm
.
batchNo
=
this
.
detailObj
.
batchNo
this
.
searchForm
.
recordId
=
this
.
detailObj
.
recordId
this
.
loading
=
false
this
.
loading
=
false
resolve
()
resolve
()
})
})
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'update:detailObj'
,
{})
this
.
$emit
(
'update:detailObj'
,
{})
}
},
filterData
(
list
,
name
)
{
return
list
?.
map
(
i
=>
{
return
name
==
'oilList'
?
`
${
i
.
aliasName
}
*
${
i
.
amount
}
(
${
NP
.
times
(
i
.
amount
,
i
.
faceValue
)}
积分)`
:
`
${
i
.
couponName
}
*
${
i
.
amount
}
`
})
||
[]
},
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
'scss'
>
.more-info
{
white-space
:
nowrap
;
color
:
#5850ff
;
cursor
:
pointer
;
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/storeCredit/components/gas.vue
View file @
56c1cfe
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<el-input-number
<el-input-number
size=
"small"
size=
"small"
:min=
"1"
:min=
"1"
:max=
"
10
"
:max=
"
scope.scope.maxStock
"
:step=
"1"
:step=
"1"
v-model=
"scope.scope.amount"
v-model=
"scope.scope.amount"
@
change=
"changeAmount(...arguments,scope.scope,'oilCouponId')"
@
change=
"changeAmount(...arguments,scope.scope,'oilCouponId')"
...
@@ -112,8 +112,10 @@ export default {
...
@@ -112,8 +112,10 @@ export default {
this
.
$apis
.
points
.
getOilCouponList
(
params
).
then
(
res
=>
{
this
.
$apis
.
points
.
getOilCouponList
(
params
).
then
(
res
=>
{
this
.
loading
=
false
this
.
loading
=
false
res
.
list
.
map
(
e
=>
{
res
.
list
.
map
(
e
=>
{
let
maxStock
=
e
.
stock
-
e
.
usedStock
e
.
amount
=
1
e
.
amount
=
1
e
.
oilCouponId
=
e
.
id
e
.
oilCouponId
=
e
.
id
e
.
maxStock
=
maxStock
>
10
?
10
:
maxStock
})
})
// 重置分页组件
// 重置分页组件
this
.
serviceList
=
res
.
list
this
.
serviceList
=
res
.
list
...
...
src/views/storeCredit/components/pointsConfig.vue
View file @
56c1cfe
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
class=
"points-panel"
class=
"points-panel"
bigTitle=
"选择"
bigTitle=
"选择"
okText=
"提交"
okText=
"提交"
:before-close=
"handleGiftClose"
@
onCancel=
"handleGiftClose"
@
onCancel=
"handleGiftClose"
@
onOk=
"handleConfirm"
@
onOk=
"handleConfirm"
:visible
.
sync=
"configParams.show"
:visible
.
sync=
"configParams.show"
...
@@ -19,13 +18,13 @@
...
@@ -19,13 +18,13 @@
v-show=
"currentComponent == 'gas'"
v-show=
"currentComponent == 'gas'"
ref=
"gasRef"
ref=
"gasRef"
:merchantId=
"merchantId"
:merchantId=
"merchantId"
:selectedGasList=
"configParams.
row.oilList || []
"
:selectedGasList=
"configParams.
oilList
"
/>
/>
<service
<service
v-show=
"currentComponent == 'service'"
v-show=
"currentComponent == 'service'"
ref=
"serviceRef"
ref=
"serviceRef"
:merchantId=
"merchantId"
:merchantId=
"merchantId"
:selectedServiceList=
"configParams.
row.couponList || []
"
:selectedServiceList=
"configParams.
couponList
"
/>
/>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/storeCredit/components/service.vue
View file @
56c1cfe
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
<el-input-number
<el-input-number
size=
"small"
size=
"small"
:min=
"1"
:min=
"1"
:max=
"
10
"
:max=
"
scope.scope.maxStock
"
:step=
"1"
:step=
"1"
v-model=
"scope.scope.amount"
v-model=
"scope.scope.amount"
@
change=
"changeAmount(...arguments,scope.scope,'couponId')"
@
change=
"changeAmount(...arguments,scope.scope,'couponId')"
...
@@ -185,8 +185,10 @@ export default {
...
@@ -185,8 +185,10 @@ export default {
this
.
$apis
.
points
.
getghDirectionalGiftListApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
points
.
getghDirectionalGiftListApi
(
params
).
then
(
res
=>
{
this
.
loading
=
false
this
.
loading
=
false
res
.
list
.
map
(
e
=>
{
res
.
list
.
map
(
e
=>
{
let
maxStock
=
e
.
residueAmount
e
.
amount
=
1
e
.
amount
=
1
e
.
couponId
=
e
.
id
e
.
couponId
=
e
.
id
e
.
maxStock
=
maxStock
>
10
?
10
:
maxStock
})
})
// 重置分页组件
// 重置分页组件
this
.
serviceList
=
res
.
list
this
.
serviceList
=
res
.
list
...
@@ -214,7 +216,7 @@ export default {
...
@@ -214,7 +216,7 @@ export default {
}[
row
.
useType
]
}[
row
.
useType
]
},
},
addCoupon
()
{
addCoupon
()
{
util
.
openTab
(
'/tools/couponManage/
index'
)
window
.
open
(
'/login?redirect=tools%2FcouponManage%2F
index'
)
},
},
}
}
}
}
...
...
src/views/storeCredit/index.vue
View file @
56c1cfe
...
@@ -13,8 +13,9 @@
...
@@ -13,8 +13,9 @@
type=
"default"
type=
"default"
plain
plain
@
click=
"jump"
@
click=
"jump"
size=
"small"
>
门店客户积分充值
</el-button>
>
门店客户积分充值
</el-button>
<el-button
@
click=
"handleExport"
>
导出
<el-button
@
click=
"handleExport"
size=
"small"
>
导出
</el-button>
</el-button>
</div>
</div>
<div
class=
"tabelList"
>
<div
class=
"tabelList"
>
...
@@ -31,7 +32,7 @@
...
@@ -31,7 +32,7 @@
>
>
<div
<div
class=
"link"
class=
"link"
@
click=
"openDetail(scope.scope.
batchNo
)"
@
click=
"openDetail(scope.scope.
id
)"
>
{{
scope
.
scope
.
customerNumber
}}
</div>
>
{{
scope
.
scope
.
customerNumber
}}
</div>
</
template
>
</
template
>
<
template
<
template
...
@@ -282,10 +283,10 @@ export default {
...
@@ -282,10 +283,10 @@ export default {
}
}
}
)
}
)
}
,
}
,
openDetail
(
batchNo
)
{
openDetail
(
recordId
)
{
this
.
detailObj
=
{
this
.
detailObj
=
{
show
:
true
,
show
:
true
,
batchNo
recordId
}
}
}
,
}
,
editForm
(
row
,
type
=
''
)
{
editForm
(
row
,
type
=
''
)
{
...
...
src/views/withdraw/detail.vue
View file @
56c1cfe
...
@@ -110,7 +110,7 @@ export default {
...
@@ -110,7 +110,7 @@ export default {
label
:
'提现金额'
,
label
:
'提现金额'
,
name
:
'payAmount'
,
name
:
'payAmount'
,
addHtml
:
obj
=>
{
addHtml
:
obj
=>
{
return
(
obj
.
payAmount
/
100
).
toFixed
(
2
)
return
obj
.
payAmount
?(
obj
.
payAmount
/
100
).
toFixed
(
2
):
'--'
}
}
},
},
{
{
...
@@ -165,7 +165,10 @@ export default {
...
@@ -165,7 +165,10 @@ export default {
},
},
{
{
label
:
'结算金额'
,
label
:
'结算金额'
,
name
:
'settleAmount'
name
:
'settleAmount'
,
addHtml
:
obj
=>
{
return
obj
.
settleAmount
?(
obj
.
settleAmount
/
100
).
toFixed
(
2
):
'--'
}
},
},
{
{
label
:
'到账时间'
,
label
:
'到账时间'
,
...
...
src/views/withdraw/index.vue
View file @
56c1cfe
...
@@ -331,7 +331,7 @@ export default {
...
@@ -331,7 +331,7 @@ export default {
prop
:
'payAmount'
,
prop
:
'payAmount'
,
width
:
100
,
width
:
100
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
(
cellValue
.
payAmount
/
100
).
toFixed
(
2
)
return
cellValue
.
payAmount
?(
cellValue
.
payAmount
/
100
).
toFixed
(
2
):
'--'
}
}
},
},
{
{
...
@@ -393,6 +393,9 @@ export default {
...
@@ -393,6 +393,9 @@ export default {
{
{
label
:
'结算金额/元'
,
label
:
'结算金额/元'
,
prop
:
'settleAmount'
,
prop
:
'settleAmount'
,
formatter
:
cellValue
=>
{
return
cellValue
.
settleAmount
?(
cellValue
.
settleAmount
/
100
).
toFixed
(
2
):
'--'
},
width
:
'150px'
width
:
'150px'
},
},
]
]
...
...
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