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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
10 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'
...
@@ -13,11 +13,11 @@ import { Http } from 'glsx-common'
let
timeout
=
30000
//超时时间
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
// console.log(1111111)
// console.log(1111111)
//
if (isEnv) {
if
(
isEnv
)
{
//
let { request } = cfg
let
{
request
}
=
cfg
//
Object.assign(request, { timeout })
Object
.
assign
(
request
,
{
timeout
})
//
return Promise.resolve(cfg)
return
Promise
.
resolve
(
cfg
)
//
}
}
//return window.fetch('https://', {}).then(res => res.json())
//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' })
// 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'
)
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 @@
...
@@ -26,7 +26,7 @@
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
directionalGiftName
}}
</el-button>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
directionalGiftName
}}
</el-button>
</span>
</span>
<div
slot=
"giftInfo"
slot-scope=
"scope"
>
<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>
</div>
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
...
@@ -40,6 +40,27 @@ import url from '@/assets/empty.png'
...
@@ -40,6 +40,27 @@ import url from '@/assets/empty.png'
import
{
aToExport
}
from
'@/common/constant'
import
{
aToExport
}
from
'@/common/constant'
export
default
{
export
default
{
name
:
'giftList'
,
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
()
{
data
()
{
return
{
return
{
size
:
'small'
,
size
:
'small'
,
...
@@ -104,7 +125,6 @@ export default {
...
@@ -104,7 +125,6 @@ export default {
]
]
},
},
//礼包详情
//礼包详情
getGiftListApi
:
this
.
$apis
.
giftBag
.
getGiftInfoApi
,
giftParams
:
{
giftParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableOption
:
false
,
tableOption
:
false
,
...
@@ -125,14 +145,20 @@ export default {
...
@@ -125,14 +145,20 @@ export default {
label
:
'已核销'
,
label
:
'已核销'
,
prop
:
'anticipatedCost '
,
prop
:
'anticipatedCost '
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
'X'
+
cellValue
.
numBer
if
(
cellValue
.
delet
)
{
return
'X'
+
cellValue
.
delet
}
}
}
},
},
{
{
label
:
'可使用'
,
label
:
'可使用'
,
prop
:
'getAmount'
,
prop
:
'getAmount'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
if
(
cellValue
.
numBer
)
{
return
'X'
+
cellValue
.
numBer
return
'X'
+
cellValue
.
numBer
}
else
{
return
'X'
+
cellValue
.
couponAmount
}
}
}
}
}
]
]
...
@@ -334,7 +360,7 @@ export default {
...
@@ -334,7 +360,7 @@ export default {
},
},
setTableFinishFun
()
{
setTableFinishFun
()
{
var
page
=
this
.
$refs
.
receivedGiftListRef
.
page
var
page
=
this
.
$refs
.
receivedGiftListRef
.
page
console
.
log
(
this
.
$refs
.
receivedGiftListRef
)
console
.
log
(
this
.
$refs
.
receivedGiftListRef
,
'1'
)
// 添加序号
// 添加序号
if
(
this
.
$refs
.
receivedGiftListRef
.
data
)
{
if
(
this
.
$refs
.
receivedGiftListRef
.
data
)
{
this
.
$refs
.
receivedGiftListRef
.
data
.
forEach
((
item
,
index
)
=>
{
this
.
$refs
.
receivedGiftListRef
.
data
.
forEach
((
item
,
index
)
=>
{
...
@@ -345,7 +371,9 @@ export default {
...
@@ -345,7 +371,9 @@ export default {
this
.
$refs
.
receivedGiftListRef
.
data
.
length
?
(
this
.
$refs
.
receivedGiftListRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
receivedGiftListRef
.
setTableHeightFun
()
this
.
$refs
.
receivedGiftListRef
.
data
.
length
?
(
this
.
$refs
.
receivedGiftListRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
receivedGiftListRef
.
setTableHeightFun
()
}
}
},
},
setGiftTableFinishFun
()
{
console
.
log
(
this
.
$refs
.
giftListRef
,
'2'
)
},
handleSearch
()
{
handleSearch
()
{
this
.
$refs
.
receivedGiftListRef
.
refreshTable
()
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