Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
08bb1a34
Commit
08bb1a34
authored
Nov 14, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品添加备注
parent
9b880b31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
index.vue
src/components/shop/index.vue
+33
-2
api.js
src/service/api.js
+6
-0
No files found.
src/components/shop/index.vue
View file @
08bb1a34
...
@@ -113,13 +113,19 @@
...
@@ -113,13 +113,19 @@
{{
scope
.
row
.
status
|
goodsStatus
}}
{{
scope
.
row
.
status
|
goodsStatus
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"备注"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
desc
|
goodsDesc
}}
</
template
>
</el-table-column>
<el-table-column
<el-table-column
width=
"60"
width=
"60"
label=
"操作"
>
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-popover
<el-popover
placement=
"top"
placement=
"top"
width=
"6
0
0"
>
width=
"6
8
0"
>
<div
style=
"text-align: center"
>
<div
style=
"text-align: center"
>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"detail(scope.row)"
>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"detail(scope.row)"
>
查看详情
查看详情
...
@@ -146,6 +152,9 @@
...
@@ -146,6 +152,9 @@
<el-button
size=
"mini"
plain
@
click=
"conflict(scope.row)"
>
<el-button
size=
"mini"
plain
@
click=
"conflict(scope.row)"
>
冲突商品
冲突商品
</el-button>
</el-button>
<el-button
size=
"mini"
plain
type=
"success"
@
click=
"addComment(scope.row)"
>
编辑备注
</el-button>
<el-button
size=
"mini"
plain
type=
"danger"
@
click=
"onDel(scope.row)"
v-if=
"$store.state.deletePermission"
>
<el-button
size=
"mini"
plain
type=
"danger"
@
click=
"onDel(scope.row)"
v-if=
"$store.state.deletePermission"
>
删除
删除
</el-button>
</el-button>
...
@@ -192,7 +201,7 @@
...
@@ -192,7 +201,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
getGoodsListApi
,
deleteGoodsApi
,
downGoodsApi
,
upGoodsApi
,
bindOtherApi
,
conflictApi
,
copyShopApi
,
getLessonApi
}
from
"../../service/api"
;
import
{
getGoodsListApi
,
deleteGoodsApi
,
downGoodsApi
,
upGoodsApi
,
bindOtherApi
,
conflictApi
,
copyShopApi
,
getLessonApi
,
editGoodsDescApi
}
from
"../../service/api"
;
import
{
ISORNOT
,
GOODSTYPE
,
LESSONTYPE
,
GOODSSTATUS
}
from
"../../util/wordbook"
;
import
{
ISORNOT
,
GOODSTYPE
,
LESSONTYPE
,
GOODSSTATUS
}
from
"../../util/wordbook"
;
import
page
from
'../framework/page'
import
page
from
'../framework/page'
import
dialogCom
from
'./dialog'
import
dialogCom
from
'./dialog'
...
@@ -246,6 +255,11 @@
...
@@ -246,6 +255,11 @@
goodsStatus
(
value
){
goodsStatus
(
value
){
return
GOODSSTATUS
[
value
]
return
GOODSSTATUS
[
value
]
},
},
goodsDesc
(
value
){
let
_desc
=
JSON
.
parse
(
value
)
console
.
log
(
'goodsDesc value'
,
_desc
.
desc
)
return
_desc
.
desc
}
},
},
mounted
(){
mounted
(){
this
.
getUser
();
this
.
getUser
();
...
@@ -449,6 +463,23 @@
...
@@ -449,6 +463,23 @@
this
.
classList
=
res
.
list
;
this
.
classList
=
res
.
list
;
})
})
},
},
addComment
(
row
){
let
_descJson
=
JSON
.
parse
(
row
.
desc
)
||
{}
this
.
$prompt
(
''
,
'编辑备注'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputValue
:
_descJson
.
desc
||
''
}).
then
(({
value
})
=>
{
editGoodsDescApi
(
row
.
id
,{
desc
:
value
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑备注成功'
});
this
.
getUser
()
});
})
}
}
}
}
}
</
script
>
</
script
>
...
...
src/service/api.js
View file @
08bb1a34
...
@@ -630,3 +630,9 @@ const getSyncUserUrl = '/api/admin/student/mobile';
...
@@ -630,3 +630,9 @@ const getSyncUserUrl = '/api/admin/student/mobile';
export
const
getSyncUserApi
=
function
(
json
)
{
export
const
getSyncUserApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
getSyncUserUrl
,
json
)
return
Vue
.
prototype
.
$fetch
(
getSyncUserUrl
,
json
)
};
};
// 修改商品备注
const
editGoodsDescUrl
=
`/api/admin/goods/info/desc/`
;
export
const
editGoodsDescApi
=
function
(
goodsId
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
editGoodsDescUrl
}${
goodsId
}
`
,
json
)
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment