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
d2d11b53
Commit
d2d11b53
authored
Aug 25, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-activity'
# Conflicts: # src/pages/Activity/releaseProduc/components/addProduc.vue
parents
ad03eeb0
68962cf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
addProduc.vue
src/pages/Activity/releaseProduc/components/addProduc.vue
+14
-7
No files found.
src/pages/Activity/releaseProduc/components/addProduc.vue
View file @
d2d11b53
...
...
@@ -5,9 +5,9 @@
<el-button
class=
"addCommodityBtn"
@
click=
"commodity('add', '')"
>
添加商品
</el-button
>
<el-button
class=
"commodLibraryAdd"
@
click=
"commodLibraryAdd"
<
!--
<
el-button
class=
"commodLibraryAdd"
@
click=
"commodLibraryAdd"
>
从商品库添加
</el-button
>
>
-->
</div>
<!-- Tab -->
<el-table
...
...
@@ -138,7 +138,11 @@
></el-input-number>
</el-form-item>
<br
/>
<el-form-item
label=
"新增库存:"
prop=
"inventory_total"
>
<el-form-item
label=
"库存:"
prop=
"inventory_total"
:rules=
"[{ required: true, message: '请输入库存' }]"
>
<el-input
v-model=
"commodityForm.inventory_total"
placeholder=
""
...
...
@@ -150,7 +154,7 @@
已售:
<span
style=
"margin-right: 10px"
>
{{
commodityForm.total_amount_sold
}}
</span>
剩余库存:
<span>
{{ inventoryRest }}
</span
>
<!-- 剩余库存:<span>{{ commodityForm.inventory_total }}</span> --
>
</div>
<el-form-item
prop=
"checkedRadio"
...
...
@@ -376,7 +380,8 @@ var addProduct = {
goodsSkuID
:
""
,
inventoryTotal
:
0
,
// 总库存
inventoryRest
:
0
// 剩余库存
inventoryRest
:
0
,
// 剩余库存
inventory
:
0
,
// 添加库存
};
},
methods
:
{
...
...
@@ -410,6 +415,7 @@ var addProduct = {
// 库存计算
inventoryIpt
(
val
)
{
if
(
val
<
0
)
return
this
.
commodityForm
.
inventory_total
=
0
;
var
pattern
=
/^-
?[
1-9
]\d
*$|^0$/g
;
if
(
!
pattern
.
test
(
this
.
commodityForm
.
inventory_total
))
{
this
.
commodityForm
.
inventory_total
=
""
;
...
...
@@ -468,6 +474,7 @@ var addProduct = {
const
res
=
await
markGoodsInfo
(
params
);
this
.
inventoryRest
=
res
.
result
.
goods_info
.
inventory_rest
;
this
.
inventoryTotal
=
res
.
result
.
goods_info
.
inventory_total
;
this
.
inventory
=
res
.
result
.
goods_info
.
inventory_total
;
this
.
commodityForm
=
res
.
result
.
goods_info
;
this
.
commodityForm
.
num_limit
=
res
.
result
.
goods_info
.
rule_limit
===
0
...
...
@@ -503,7 +510,7 @@ var addProduct = {
goods_name
:
this
.
commodityForm
.
goods_name
,
desc_pic_url
:
this
.
picStr
,
desc
:
""
,
inventory_add
:
this
.
commodityForm
.
inventory_total
,
inventory_add
:
this
.
commodityForm
.
inventory_total
-
this
.
inventory
,
original_price
:
this
.
commodityForm
.
original_price
,
price
:
this
.
commodityForm
.
price
,
marketing_name
:
this
.
editInfo
.
marketing_name
,
...
...
@@ -584,7 +591,7 @@ var addProduct = {
goods_name
:
this
.
commodityForm
.
goods_name
,
desc_pic_url
:
this
.
picStr
,
desc
:
""
,
inventory
:
this
.
commodityForm
.
inventory_total
,
inventory
:
this
.
commodityForm
.
inventory_total
-
this
.
inventory
,
original_price
:
this
.
commodityForm
.
original_price
,
marketing_type
:
"4"
,
price
:
this
.
commodityForm
.
price
,
...
...
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