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 e958fce5
authored
Feb 20, 2022
by
周子尧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
3d9003f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
11 deletions
src/config/index.js
src/views/giftBag/receivedGiftList.vue
src/config/index.js
View file @
e958fce
...
...
@@ -13,11 +13,11 @@ import { Http } from 'glsx-common'
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
// console.log(1111111)
//
if (isEnv) {
//
let { request } = cfg
//
Object.assign(request, { timeout })
//
return Promise.resolve(cfg)
//
}
if
(
isEnv
)
{
let
{
request
}
=
cfg
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
cfg
)
}
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return
new
Http
().
get
(
'https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config'
)
...
...
src/views/giftBag/receivedGiftList.vue
View file @
e958fce
...
...
@@ -26,7 +26,7 @@
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
directionalGiftName
}}
</el-button>
</span>
<div
slot=
"giftInfo"
slot-scope=
"scope"
>
<GLTable
ref=
"giftListRef"
:hasNum=
"false"
:hasPage=
"false"
:noDataImg=
"url"
:tableParams=
"giftParams"
:tableData=
"scope.scope
.couponList
"
></GLTable>
<GLTable
ref=
"giftListRef"
:hasNum=
"false"
:hasPage=
"false"
:noDataImg=
"url"
:tableParams=
"giftParams"
:tableData=
"scope.scope
| filterTable"
@
setTableFinishFun=
"setGiftTableFinishFun
"
></GLTable>
</div>
</GLTable>
<!-- 表格区域 end -->
...
...
@@ -40,6 +40,27 @@ import url from '@/assets/empty.png'
import
{
aToExport
}
from
'@/common/constant'
export
default
{
name
:
'giftList'
,
filters
:
{
filterTable
(
list
)
{
// console.log(params)
// return
let
arr1
=
list
.
couponList
let
arr2
=
list
.
verificationCouponList
let
reduceArr
=
arr1
.
map
(
item
=>
{
// item.numBer = ''
arr2
.
map
(
ele
=>
{
if
(
item
.
couponId
==
ele
.
couponId
)
{
item
.
numBer
=
item
.
couponAmount
-
ele
.
couponAmount
item
.
delet
=
ele
.
couponAmount
// item.couponAmount = ele.couponAmount
}
})
return
item
})
console
.
log
(
reduceArr
)
return
reduceArr
}
},
data
()
{
return
{
size
:
'small'
,
...
...
@@ -104,7 +125,6 @@ export default {
]
},
//礼包详情
getGiftListApi
:
this
.
$apis
.
giftBag
.
getGiftInfoApi
,
giftParams
:
{
listName
:
'list'
,
tableOption
:
false
,
...
...
@@ -125,14 +145,20 @@ export default {
label
:
'已核销'
,
prop
:
'anticipatedCost '
,
formatter
:
cellValue
=>
{
return
'X'
+
cellValue
.
numBer
if
(
cellValue
.
delet
)
{
return
'X'
+
cellValue
.
delet
}
}
},
{
label
:
'可使用'
,
prop
:
'getAmount'
,
formatter
:
cellValue
=>
{
return
'X'
+
cellValue
.
numBer
if
(
cellValue
.
numBer
)
{
return
'X'
+
cellValue
.
numBer
}
else
{
return
'X'
+
cellValue
.
couponAmount
}
}
}
]
...
...
@@ -334,7 +360,7 @@ export default {
},
setTableFinishFun
()
{
var
page
=
this
.
$refs
.
receivedGiftListRef
.
page
console
.
log
(
this
.
$refs
.
receivedGiftListRef
)
console
.
log
(
this
.
$refs
.
receivedGiftListRef
,
'1'
)
// 添加序号
if
(
this
.
$refs
.
receivedGiftListRef
.
data
)
{
this
.
$refs
.
receivedGiftListRef
.
data
.
forEach
((
item
,
index
)
=>
{
...
...
@@ -345,7 +371,9 @@ export default {
this
.
$refs
.
receivedGiftListRef
.
data
.
length
?
(
this
.
$refs
.
receivedGiftListRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
receivedGiftListRef
.
setTableHeightFun
()
}
},
setGiftTableFinishFun
()
{
console
.
log
(
this
.
$refs
.
giftListRef
,
'2'
)
},
handleSearch
()
{
this
.
$refs
.
receivedGiftListRef
.
refreshTable
()
},
...
...
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