Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
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
bp
op-web-service
Commits
7b84d767
Commit
7b84d767
authored
Jul 19, 2021
by
pengyunqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.yidian-inc.com:8021/bp/op-web-service
into pyq_goods
parents
a19bdf93
acb0f866
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
index.vue
src/pages/Goods/Detail/index.vue
+16
-8
No files found.
src/pages/Goods/Detail/index.vue
View file @
7b84d767
...
...
@@ -390,12 +390,12 @@
v-if=
"$route.params.operation === 'EDIT'"
v-model=
"inventoryAdd"
@
change=
"hasNumberChange"
@
blur=
"hasNumberChange
"
:precision=
"0
"
></el-input-number>
<span
v-else
>
{{ goodsObj.inventory_rest }}
</span>
</el-form-item>
<el-form-item
label=
"已下单量:"
>
<span>
{{ goodsObj.total_amount_
sold
}}
</span>
<span>
{{ goodsObj.total_amount_
order
}}
</span>
</el-form-item>
<el-form-item
label=
"已卖出总数:"
>
<span>
{{ goodsObj.total_amount_sold }}
</span>
...
...
@@ -647,7 +647,7 @@ export default {
}
},
moun
ted
()
{
crea
ted
()
{
this
.
getOptions
();
this
.
getGoodsDetailList
(
this
.
$route
.
params
.
spuId
);
},
...
...
@@ -686,7 +686,7 @@ export default {
if
(
!
val
)
{
this
.
rejectReason
.
reason
=
""
;
}
}
}
,
},
data
()
{
...
...
@@ -723,6 +723,7 @@ export default {
introduceUploadList
:
[],
// 上传详情图片列表
inventoryNumber
:
0
,
// 库存数量
isAllowStockChange
:
true
,
// 是否允许更改库存
// 使用规则表单
rulesForm
:
{
...
...
@@ -1059,13 +1060,14 @@ export default {
this
.
inventoryAdd
=
0
;
});
}
if
(
this
.
inventoryAdd
+
this
.
goodsObj
.
inventory_rest
<
0
)
{
if
(
this
.
inventoryAdd
+
this
.
goodsObj
.
inventory_rest
<
1
)
{
this
.
$nextTick
(()
=>
{
this
.
i
nventoryAdd
=
0
;
this
.
i
sAllowStockChange
=
false
;
});
this
.
$message
.
error
(
"库存增减不得超出剩余库存范围"
);
return
this
.
$message
.
error
(
"剩余库存量不得小于1"
);
}
else
{
this
.
isAllowStockChange
=
true
;
}
console
.
log
(
this
.
inventoryAdd
);
},
// 单人可购买上限的修改
...
...
@@ -1242,6 +1244,12 @@ export default {
if
(
!
this
.
isGoodsNameRepeat
)
{
return
this
.
$message
.
error
(
"商品名称被占用,请重新更换商品名称"
);
}
console
.
log
(
this
.
isAllowStockChange
);
if
(
!
this
.
isAllowStockChange
)
{
return
this
.
$message
.
error
(
"剩余库存量不得小于1"
);
}
if
(
!
query
.
expiration_time
)
{
return
this
.
$message
.
error
(
"过期时间未填写,请填写后再提交"
);
}
...
...
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