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
73d24001
Commit
73d24001
authored
Nov 23, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商品数量
parent
6c4a0db1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
+30
-4
index.vue
src/components/shop/index.vue
+25
-2
index.vue
src/components/sourceManage/index.vue
+0
-2
api.js
src/service/api.js
+5
-0
No files found.
src/components/shop/index.vue
View file @
73d24001
...
...
@@ -107,6 +107,10 @@
{{
scope
.
row
.
is_real
|
isOrNot
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"buy_nums"
label=
"商品购买数量"
>
</el-table-column>
<el-table-column
label=
"状态"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -125,7 +129,7 @@
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"
68
0"
>
width=
"
80
0"
>
<div
style=
"text-align: center"
>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"detail(scope.row)"
>
查看详情
...
...
@@ -155,6 +159,9 @@
<el-button
size=
"mini"
plain
type=
"success"
@
click=
"addComment(scope.row)"
>
编辑备注
</el-button>
<el-button
size=
"mini"
plain
type=
"primary"
@
click=
"updateGoodsNumber(scope.row)"
>
修改购买数量
</el-button>
<el-button
size=
"mini"
plain
type=
"danger"
@
click=
"onDel(scope.row)"
v-if=
"$store.state.deletePermission"
>
删除
</el-button>
...
...
@@ -201,7 +208,7 @@
</template>
<
script
>
import
{
getGoodsListApi
,
deleteGoodsApi
,
downGoodsApi
,
upGoodsApi
,
bindOtherApi
,
conflictApi
,
copyShopApi
,
getLessonApi
,
editGoodsDescApi
}
from
"../../service/api"
;
import
{
getGoodsListApi
,
deleteGoodsApi
,
downGoodsApi
,
upGoodsApi
,
bindOtherApi
,
conflictApi
,
copyShopApi
,
getLessonApi
,
editGoodsDescApi
,
updateGoodsNumbeApi
}
from
"../../service/api"
;
import
{
ISORNOT
,
GOODSTYPE
,
LESSONTYPE
,
GOODSSTATUS
}
from
"../../util/wordbook"
;
import
page
from
'../framework/page'
import
dialogCom
from
'./dialog'
...
...
@@ -478,6 +485,22 @@
this
.
getUser
()
});
})
},
updateGoodsNumber
(
row
){
this
.
$prompt
(
''
,
'修改商品购买数量'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputType
:
'number'
,
inputValue
:
row
.
buy_nums
||
0
}).
then
(({
value
})
=>
{
updateGoodsNumbeApi
(
row
.
id
,{
buy_nums
:
parseInt
(
value
)}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改商品购买数量成功'
});
this
.
getUser
()
});
})
}
}
}
...
...
src/components/sourceManage/index.vue
View file @
73d24001
...
...
@@ -371,8 +371,6 @@
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
console
.
log
(
'json form id'
,
dia
.
form
.
id
)
console
.
log
(
'json'
,
json
)
updateSourceApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
...
...
src/service/api.js
View file @
73d24001
...
...
@@ -704,3 +704,8 @@ const delSourceUrl = `api/admin/code/rule/`;
export
const
delSourceApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$del
(
`
${
delSourceUrl
}${
id
}
`
)
};
// 修改商品购买数量
const
updateGoodsNumberUrl
=
'api/admin/goods/buy/nums'
;
export
const
updateGoodsNumbeApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
updateGoodsNumberUrl
}
/
${
id
}
`
,
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