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 dd73a737
authored
Jul 11, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
详情编辑接口
1 parent
283aa717
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
34 deletions
src/api/modules/goods.js
src/views/case/add.vue
src/views/goods/add.vue
src/views/goods/components/brandCascader.vue
src/views/goods/components/selectGoods.vue
src/views/goods/components/selectMerchantDialog.vue
src/views/goods/index.vue
src/api/modules/goods.js
View file @
dd73a73
...
@@ -54,10 +54,22 @@ const addGoodsApi = params => {
...
@@ -54,10 +54,22 @@ const addGoodsApi = params => {
}
}
const
getGoodsDetail
=
params
=>
{
params
.
method
=
'scrm.api.shopmall.goods.configuration.detail'
return
http
({
url
,
method
:
'post'
,
data
:
params
,
sign
:
true
})
}
export
default
{
export
default
{
getGoodsListApi
,
getGoodsListApi
,
updateGoodsStatusApi
,
updateGoodsStatusApi
,
delGoodsApi
,
delGoodsApi
,
getCarlifeGoodsApi
,
getCarlifeGoodsApi
,
addGoodsApi
addGoodsApi
,
getGoodsDetail
}
}
\ No newline at end of file
\ No newline at end of file
src/views/case/add.vue
View file @
dd73a73
...
@@ -126,7 +126,9 @@ export default {
...
@@ -126,7 +126,9 @@ export default {
created
(){
created
(){
this
.
formObj
.
id
=
this
.
$route
.
query
.
id
||
''
this
.
formObj
.
id
=
this
.
$route
.
query
.
id
||
''
this
.
getVideoList
()
this
.
getVideoList
()
this
.
getCaseDetailApi
()
if
(
this
.
formObj
.
id
){
this
.
getCaseDetailApi
()
}
},
},
methods
:{
methods
:{
openBrandDialog
(){
openBrandDialog
(){
...
...
src/views/goods/add.vue
View file @
dd73a73
This diff is collapsed.
Click to expand it.
src/views/goods/components/brandCascader.vue
View file @
dd73a73
...
@@ -36,7 +36,7 @@ export default {
...
@@ -36,7 +36,7 @@ export default {
},
},
model
:
{
model
:
{
prop
:
'value'
,
// 默认是value
prop
:
'value'
,
// 默认是value
event
:
'change'
,
// 默认是input
event
:
'change
Item
'
,
// 默认是input
},
},
props
:
{
props
:
{
// defaultProps: {
// defaultProps: {
...
@@ -56,16 +56,30 @@ export default {
...
@@ -56,16 +56,30 @@ export default {
default
:
()
=>
{
default
:
()
=>
{
return
[]
return
[]
}
}
},
curInfo
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
}
},
},
// watch: {
watch
:
{
// value:{
// value:{
// handler(nVal, oVal){
// handler(nVal, oVal){
// console.log(nVal)
// const arr = this.listTree.flat(Infinity);
// },
// console.log(arr,456)
// deep: true
// },
// }
// deep: true
// },
// },
'curInfo.id'
:{
handler
(
nVal
,
oVal
){
this
.
curBrand
=
this
.
curInfo
},
deep
:
true
},
},
created
(){
created
(){
this
.
getCategory
()
this
.
getCategory
()
},
},
...
@@ -115,7 +129,7 @@ export default {
...
@@ -115,7 +129,7 @@ export default {
if
(
e
.
level
==
2
)
{
if
(
e
.
level
==
2
)
{
this
.
curBrand
=
e
.
data
this
.
curBrand
=
e
.
data
this
.
brandTree
=
!
this
.
brandTree
this
.
brandTree
=
!
this
.
brandTree
this
.
$emit
(
'change'
,
this
.
curBrand
.
id
)
this
.
$emit
(
'change
Item
'
,
this
.
curBrand
.
id
)
this
.
$emit
(
'clickItem'
,
{
data
:
e
.
data
,
parent
:
e
.
parent
?.
data
||
{}})
this
.
$emit
(
'clickItem'
,
{
data
:
e
.
data
,
parent
:
e
.
parent
?.
data
||
{}})
}
}
}
}
...
...
src/views/goods/components/selectGoods.vue
View file @
dd73a73
...
@@ -130,6 +130,7 @@ export default {
...
@@ -130,6 +130,7 @@ export default {
mounted
()
{
mounted
()
{
let
clientHeight
=
document
.
documentElement
.
clientHeight
let
clientHeight
=
document
.
documentElement
.
clientHeight
this
.
heightBox
=
clientHeight
-
0.15
*
clientHeight
-
425
this
.
heightBox
=
clientHeight
-
0.15
*
clientHeight
-
425
console
.
log
(
this
.
goodsInfo
)
this
.
curInfo
=
this
.
goodsInfo
||
{}
this
.
curInfo
=
this
.
goodsInfo
||
{}
this
.
getList
()
this
.
getList
()
},
},
...
...
src/views/goods/components/selectMerchantDialog.vue
View file @
dd73a73
...
@@ -99,21 +99,21 @@ export default {
...
@@ -99,21 +99,21 @@ export default {
this
.
$emit
(
'closeDialog'
)
this
.
$emit
(
'closeDialog'
)
},
},
setTableFinishFun
()
{
setTableFinishFun
()
{
//
this.copyList = [...this.selectedGoodsList, ...this[this.curType == 1 ? 'couponList' : 'directChargeList']]
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
)
//
if (idx > -1) {
if
(
idx
>
-
1
)
{
//
try {
try
{
//
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
)
//
} catch (err) {
}
catch
(
err
)
{
//
console.log(err)
console
.
log
(
err
)
//
}
}
//
}
}
//
})
})
//
})
})
}
}
}
}
}
}
...
...
src/views/goods/index.vue
View file @
dd73a73
<
template
>
<
template
>
<div
class=
"goods-list-cntr"
>
<div
class=
"goods-list-cntr"
>
<
GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleClick"
></GLTabs
>
<
!--
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleClick"
></GLTabs>
--
>
<div
class=
"table-wrap"
>
<div
class=
"table-wrap"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"tableSearchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"tableSearchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"operate-wrap"
>
<div
class=
"operate-wrap"
>
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
fn
:
'查看'
fn
:
'查看'
},
},
listeners
:
{
listeners
:
{
click
:
row
=>
this
.
addContent
(
row
.
scope
,
1
)
click
:
row
=>
this
.
handleAdd
(
row
.
scope
,
1
)
}
}
},
},
{
{
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
fn
:
'编辑'
fn
:
'编辑'
},
},
listeners
:
{
listeners
:
{
click
:
row
=>
this
.
addContent
(
row
.
scope
,
1
)
click
:
row
=>
this
.
handleAdd
(
row
.
scope
,
2
)
}
}
},
},
{
{
...
@@ -297,10 +297,19 @@
...
@@ -297,10 +297,19 @@
//接收到的数据为空
//接收到的数据为空
this
.
$refs
.
channelRef
.
data
.
length
?
(
this
.
$refs
.
channelRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
channelRef
.
setTableHeightFun
()
this
.
$refs
.
channelRef
.
data
.
length
?
(
this
.
$refs
.
channelRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
channelRef
.
setTableHeightFun
()
},
},
handleAdd
(
val
=
{}){
handleAdd
(
row
=
{},
type
){
this
.
$router
.
push
({
const
params
=
{
path
:
`/goods/add?id=
${
val
.
id
}
&channelType=
${
val
.
channelType
}
&$title=频道设置`
id
:
row
.
id
})
}
let
title
=
'新增商品'
if
(
type
){
params
.
id
=
row
.
id
params
.
type
=
type
title
=
type
==
1
?
'新增'
:
'查看'
}
const
queryStr
=
encodeURIComponent
(
JSON
.
stringify
(
params
))
this
.
$router
.
push
({
path
:
`/goods/add/`
+
queryStr
,
query
:
{
$title
:
title
}})
}
}
}
}
}
}
...
...
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