Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-discover
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 9534ecc0
authored
Jul 11, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
bf81eb3c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
15 deletions
src/api/modules/case.js
src/views/goods/add.vue
src/views/goods/components/selectMerchantDialog.vue
src/views/store/components/selectCarDialog.vue
src/views/store/index.vue
src/api/modules/case.js
View file @
9534ecc
...
@@ -44,7 +44,7 @@ const addCaseApi = params => {
...
@@ -44,7 +44,7 @@ const addCaseApi = params => {
const
getCarSeriesApi
=
params
=>
{
const
getCarSeriesApi
=
params
=>
{
params
.
method
=
'scrm.api.carlife.common.getCarBrandList'
params
.
method
=
'scrm.api.carlife.common.get
Only
CarBrandList'
return
http
({
return
http
({
url
:
'rop-scrm-carlife/router'
,
url
:
'rop-scrm-carlife/router'
,
method
:
'GET'
,
method
:
'GET'
,
...
...
src/views/goods/add.vue
View file @
9534ecc
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
</GLFooter>
</GLFooter>
<selectCarDialog
v-if=
"carDialogVisible"
@
handleClose=
"handleCarSeriesClose"
@
handleConfirm=
"handleConfirm"
:dialogVisible=
"carDialogVisible"
></selectCarDialog>
<selectCarDialog
v-if=
"carDialogVisible"
@
handleClose=
"handleCarSeriesClose"
@
handleConfirm=
"handleConfirm"
:dialogVisible=
"carDialogVisible"
></selectCarDialog>
<selectGoods
v-if=
"goodsVisible"
:dialogVisible=
"goodsVisible"
:goodsInfo=
"formObj"
@
handleGoodsConfirm=
"handleGoodsConfirm"
@
handleGoodsClose=
"handleGoodsClose"
></selectGoods>
<selectGoods
v-if=
"goodsVisible"
:dialogVisible=
"goodsVisible"
:goodsInfo=
"formObj"
@
handleGoodsConfirm=
"handleGoodsConfirm"
@
handleGoodsClose=
"handleGoodsClose"
></selectGoods>
<selectMerchantDialog
@
confirmDialog=
"confirmDialog"
@
closeDialog=
"closeDialog"
:selected
GoodsList=
"
{}
" v-if="merchantDialogVisible" :isVisible="merchantDialogVisible">
</selectMerchantDialog>
<selectMerchantDialog
@
confirmDialog=
"confirmDialog"
@
closeDialog=
"closeDialog"
:selected
List=
"merchantRequestList
"
v-if=
"merchantDialogVisible"
:isVisible=
"merchantDialogVisible"
></selectMerchantDialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
src/views/goods/components/selectMerchantDialog.vue
View file @
9534ecc
...
@@ -72,6 +72,8 @@ export default {
...
@@ -72,6 +72,8 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
copyList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
selectedList
))
console
.
log
(
this
.
copyList
)
},
},
methods
:
{
methods
:
{
handleOk
()
{
handleOk
()
{
...
@@ -86,20 +88,19 @@ export default {
...
@@ -86,20 +88,19 @@ export default {
},
},
onOk
()
{
onOk
()
{
let
list
=
this
.
$refs
.
tableRef
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
||
[]
let
list
=
this
.
$refs
.
tableRef
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
||
[]
for
(
let
i
=
0
;
i
<
this
.
selectedList
.
length
;
i
++
)
{
//
for (let i = 0; i < this.selectedList.length; i++) {
let
idx
=
list
.
findIndex
(
item
=>
item
.
id
==
this
.
selectedList
[
i
].
id
)
//
let idx = list.findIndex(item => item.id == this.selectedList[i].id)
if
(
idx
>
-
1
)
{
//
if (idx > -1) {
list
.
splice
(
idx
,
1
)
//
list.splice(idx, 1)
}
//
}
}
//
}
list
.
map
(
item
=>
this
.
$set
(
item
,
'activityPrice'
,
''
))
list
.
map
(
item
=>
this
.
$set
(
item
,
'activityPrice'
,
''
))
this
.
$emit
(
'confirmDialog'
,
[...
list
,
...
this
.
selected
List
])
this
.
$emit
(
'confirmDialog'
,
[...
list
,
...
this
.
copy
List
])
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'closeDialog'
)
this
.
$emit
(
'closeDialog'
)
},
},
setTableFinishFun
()
{
setTableFinishFun
()
{
this
.
copyList
=
[...
this
.
selectedGoodsList
,
...
this
[
this
.
curType
==
1
?
'couponList'
:
'directChargeList'
]]
this
.
copyList
.
forEach
(
row
=>
{
this
.
copyList
.
forEach
(
row
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
let
idx
=
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
let
idx
=
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
...
@@ -108,6 +109,7 @@ export default {
...
@@ -108,6 +109,7 @@ export default {
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
[
idx
],
true
)
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
[
idx
],
true
)
let
id
=
this
.
copyList
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
let
id
=
this
.
copyList
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
if
(
id
>
-
1
)
this
.
copyList
.
splice
(
id
,
1
)
if
(
id
>
-
1
)
this
.
copyList
.
splice
(
id
,
1
)
console
.
log
(
this
.
copyList
)
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
err
)
console
.
log
(
err
)
}
}
...
...
src/views/store/components/selectCarDialog.vue
View file @
9534ecc
...
@@ -183,7 +183,7 @@
...
@@ -183,7 +183,7 @@
},
},
// 获取数据源
// 获取数据源
getCarSeriesData
()
{
getCarSeriesData
()
{
this
.
$apis
.
case
.
getCarSeriesApi
({
needCarSeries
:
true
}).
then
(
res
=>
{
this
.
$apis
.
case
.
getCarSeriesApi
({}).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
?.
length
){
if
(
res
?.
length
){
this
.
carSeriesData
=
res
this
.
carSeriesData
=
res
...
...
src/views/store/index.vue
View file @
9534ecc
...
@@ -71,7 +71,8 @@
...
@@ -71,7 +71,8 @@
</div>
</div>
</GLDialog>
</GLDialog>
<!-- 分享 -->
<!-- 分享 -->
<GLDialog
:mode=
"mode"
title=
"分享"
:visible
.
sync=
"shareVisible"
:hasFooter=
"hasFooter"
>
<GLDialog
class=
"share-dialog"
:mode=
"mode"
title=
"分享"
:visible
.
sync=
"shareVisible"
:hasFooter=
"hasFooter"
>
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleClick"
></GLTabs>
<div
class=
"preview-wrap"
>
<div
class=
"preview-wrap"
>
<div
class=
"share-content"
>
<div
class=
"share-content"
>
<div>
<div>
...
@@ -113,6 +114,9 @@ export default {
...
@@ -113,6 +114,9 @@ export default {
merchantName
:
''
,
merchantName
:
''
,
createDate
:
[]
createDate
:
[]
},
},
shareMerchantId
:
''
,
tabPaneList
:
[],
activeName
:
''
,
searchForm
:
{},
searchForm
:
{},
url
:
url
,
url
:
url
,
mode
:
'mid'
,
mode
:
'mid'
,
...
@@ -192,7 +196,8 @@ export default {
...
@@ -192,7 +196,8 @@ export default {
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
}
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
}
}
}
},
},
created
()
{},
created
()
{
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
...
mapMutations
({
...
mapMutations
({
...
@@ -223,12 +228,38 @@ export default {
...
@@ -223,12 +228,38 @@ export default {
alink
.
click
()
alink
.
click
()
alink
.
remove
()
alink
.
remove
()
},
},
getChannelList
()
{
this
.
$apis
.
store
.
getconfigMerchant
({
pageSize
:
100
,
pageNum
:
1
,
merchantId
:
this
.
shareMerchantId
})
.
then
(
res
=>
{
if
(
res
?.
length
){
let
tabPaneList
=
[]
res
.
forEach
(
item
=>
{
tabPaneList
.
push
({
label
:
item
.
channelName
,
name
:
item
.
channelType
,
merchantChannelId
:
item
.
id
})
})
this
.
tabPaneList
=
tabPaneList
this
.
activeName
=
tabPaneList
[
0
].
name
this
.
getShareData
()
}
})
},
handleClick
(){
this
.
getShareData
()
},
//分享
//分享
handleShare
(
val
)
{
handleShare
(
val
)
{
this
.
$apis
.
store
.
getMerchantShare
({
merchantId
:
val
.
merchantId
}).
then
(
res
=>
{
this
.
shareMerchantId
=
val
.
merchantId
this
.
getChannelList
()
this
.
shareVisible
=
true
},
getShareData
(){
this
.
$apis
.
store
.
getMerchantShare
({
merchantId
:
this
.
shareMerchantId
,
channelType
:
this
.
activeName
}).
then
(
res
=>
{
this
.
shareData
=
res
this
.
shareData
=
res
})
})
this
.
shareVisible
=
true
},
},
//预览
//预览
handlePreview
()
{
handlePreview
()
{
...
@@ -411,6 +442,15 @@ export default {
...
@@ -411,6 +442,15 @@ export default {
}
}
}
}
}
}
.share-dialog
{
.preview-wrap{
margin-top
:
10px
;
}
/
deep
/
.el-dialog__body
{
padding-top
:
0
;
}
}
.share-content
{
.share-content
{
width
:
335px
;
width
:
335px
;
height
:
328px
;
height
:
328px
;
...
...
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