Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-commodity
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 a379853a
authored
May 22, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
325b20d9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
15 deletions
src/views/commodity/commodityDetail.vue
src/views/commodity/constant/data.js
src/views/commodity/editCommodity.vue
src/views/commodity/index.vue
src/views/commodity/commodityDetail.vue
View file @
a379853
...
@@ -81,11 +81,16 @@ export default {
...
@@ -81,11 +81,16 @@ export default {
isNum
:
true
isNum
:
true
},
},
{
{
label
:
'库存预警'
,
label
:
'库存
下限
预警'
,
name
:
'warningValue'
,
name
:
'warningValue'
,
isNum
:
true
isNum
:
true
},
},
{
{
label
:
'库存预警上限'
,
name
:
'warningValueMax'
,
isNum
:
true
},
{
label
:
'质保年限'
,
label
:
'质保年限'
,
name
:
'warrantyPeriod'
,
name
:
'warrantyPeriod'
,
isNum
:
true
isNum
:
true
...
@@ -103,7 +108,7 @@ export default {
...
@@ -103,7 +108,7 @@ export default {
prop
:
'merchantId'
prop
:
'merchantId'
}
}
]
]
}
,
}
}
}
},
},
...
@@ -141,16 +146,16 @@ export default {
...
@@ -141,16 +146,16 @@ export default {
this
.
detailForm
.
baseProductFlag
==
'Y'
?
list
.
push
(
'基础产品'
)
:
''
this
.
detailForm
.
baseProductFlag
==
'Y'
?
list
.
push
(
'基础产品'
)
:
''
this
.
detailForm
.
upgradeProductFlag
==
'Y'
?
list
.
push
(
'升级产品'
)
:
''
this
.
detailForm
.
upgradeProductFlag
==
'Y'
?
list
.
push
(
'升级产品'
)
:
''
this
.
detailForm
.
typeTxt
=
list
.
join
(
','
)
this
.
detailForm
.
typeTxt
=
list
.
join
(
','
)
if
(
list
.
length
!=
2
&&
this
.
detailForm
.
baseProductFlag
==
'Y'
)
{
if
(
list
.
length
!=
2
&&
this
.
detailForm
.
baseProductFlag
==
'Y'
)
{
this
.
detailForm
.
sellPrice
=
'-'
;
this
.
detailForm
.
sellPrice
=
'-'
this
.
detailForm
.
minSellPrice
=
'-'
this
.
detailForm
.
minSellPrice
=
'-'
this
.
detailForm
.
productCost
=
'-'
this
.
detailForm
.
productCost
=
'-'
}
}
if
(
this
.
detailForm
.
goodsCodeName
!=
'太阳膜'
)
{
if
(
this
.
detailForm
.
goodsCodeName
!=
'太阳膜'
)
{
this
.
detailForm
.
warrantyPeriod
=
'-'
this
.
detailForm
.
warrantyPeriod
=
'-'
}
else
{
}
else
{
this
.
detailForm
.
warrantyPeriod
=
(
this
.
detailForm
.
warrantyPeriod
||
0
)
+
'年'
this
.
detailForm
.
warrantyPeriod
=
(
this
.
detailForm
.
warrantyPeriod
||
0
)
+
'年'
}
}
})
})
},
},
handleCancel
()
{
handleCancel
()
{
...
...
src/views/commodity/constant/data.js
View file @
a379853
...
@@ -51,7 +51,8 @@ const editCommodityObj = {
...
@@ -51,7 +51,8 @@ const editCommodityObj = {
minSellPrice
:
[{
required
:
true
,
message
:
'请输入最低售价'
,
trigger
:
'change'
}],
minSellPrice
:
[{
required
:
true
,
message
:
'请输入最低售价'
,
trigger
:
'change'
}],
giftCost
:
[{
required
:
true
,
message
:
'请输入赠送成本'
,
trigger
:
'change'
}],
giftCost
:
[{
required
:
true
,
message
:
'请输入赠送成本'
,
trigger
:
'change'
}],
productCost
:
[{
required
:
true
,
message
:
'请输入产品成本'
,
trigger
:
'change'
}],
productCost
:
[{
required
:
true
,
message
:
'请输入产品成本'
,
trigger
:
'change'
}],
warningValue
:
[{
required
:
true
,
message
:
'请输入库存预警'
,
trigger
:
'change'
}],
warningValue
:
[{
required
:
true
,
message
:
'请输入库存预警下限'
,
trigger
:
'change'
}],
warningValueMax
:
[{
required
:
true
,
message
:
'请输入库存预警上限'
,
trigger
:
'change'
}],
merchantList
:
[{
required
:
true
,
message
:
'请选择门店'
,
trigger
:
'change'
}],
merchantList
:
[{
required
:
true
,
message
:
'请选择门店'
,
trigger
:
'change'
}],
warrantyPeriod
:
[{
required
:
true
,
message
:
'请输入质保年限'
,
trigger
:
'change'
}]
warrantyPeriod
:
[{
required
:
true
,
message
:
'请输入质保年限'
,
trigger
:
'change'
}]
},
},
...
@@ -121,11 +122,16 @@ const editCommodityObj = {
...
@@ -121,11 +122,16 @@ const editCommodityObj = {
isHide
:
true
isHide
:
true
},
},
{
{
label
:
'库存
预警
'
,
label
:
'库存
下限预警/件
'
,
name
:
'warningValue'
,
name
:
'warningValue'
,
type
:
'input'
type
:
'input'
},
},
{
{
label
:
'库存预警上限/件'
,
name
:
'warningValueMax'
,
type
:
'input'
},
{
label
:
'质保年限'
,
label
:
'质保年限'
,
name
:
'warrantyPeriod'
,
name
:
'warrantyPeriod'
,
type
:
'input'
,
type
:
'input'
,
...
...
src/views/commodity/editCommodity.vue
View file @
a379853
...
@@ -123,10 +123,14 @@ export default {
...
@@ -123,10 +123,14 @@ export default {
'editForm.productCost'
(
newValue
,
oldValue
)
{
'editForm.productCost'
(
newValue
,
oldValue
)
{
this
.
editForm
.
productCost
=
limitPrice
(
newValue
,
oldValue
,
6
,
2
)
this
.
editForm
.
productCost
=
limitPrice
(
newValue
,
oldValue
,
6
,
2
)
},
},
// 库存预警
// 库存
下限
预警
'editForm.warningValue'
(
newValue
,
oldValue
)
{
'editForm.warningValue'
(
newValue
,
oldValue
)
{
this
.
editForm
.
warningValue
=
limitPrice
(
newValue
,
oldValue
,
6
,
2
)
this
.
editForm
.
warningValue
=
limitPrice
(
newValue
,
oldValue
,
6
,
2
)
},
},
// 库存预警上限
'editForm.warningValueMax'
(
newValue
,
oldValue
)
{
this
.
editForm
.
warningValueMax
=
limitPrice
(
newValue
,
oldValue
,
6
,
2
)
},
// 年限
// 年限
'editForm.warrantyPeriod'
(
newValue
,
oldValue
)
{
'editForm.warrantyPeriod'
(
newValue
,
oldValue
)
{
this
.
editForm
.
warrantyPeriod
=
limitPrice
(
newValue
,
oldValue
,
2
,
0
)
this
.
editForm
.
warrantyPeriod
=
limitPrice
(
newValue
,
oldValue
,
2
,
0
)
...
@@ -211,13 +215,12 @@ export default {
...
@@ -211,13 +215,12 @@ export default {
minSellPrice
:
''
,
minSellPrice
:
''
,
productCost
:
''
,
productCost
:
''
,
warningValue
:
''
,
warningValue
:
''
,
warningValueMax
:
''
,
giftCost
:
''
,
giftCost
:
''
,
warrantyPeriod
:
''
warrantyPeriod
:
''
}
}
},
},
changeFormAttr
(
formName
,
attrName
,
labelList
,
attrValue
)
{
changeFormAttr
(
formName
,
attrName
,
labelList
,
attrValue
)
{
console
.
log
(
formName
,
attrName
,
labelList
,
attrValue
)
console
.
log
(
this
[
formName
])
labelList
.
forEach
(
item
=>
{
labelList
.
forEach
(
item
=>
{
console
.
log
(
item
)
console
.
log
(
item
)
let
idx
=
this
[
formName
]?.
findIndex
(
k
=>
{
let
idx
=
this
[
formName
]?.
findIndex
(
k
=>
{
...
...
src/views/commodity/index.vue
View file @
a379853
...
@@ -78,7 +78,8 @@ export default {
...
@@ -78,7 +78,8 @@ export default {
},
},
{
{
label
:
'最低售价/元'
,
label
:
'最低售价/元'
,
prop
:
'minSellPrice'
prop
:
'minSellPrice'
,
width
:
120
,
},
},
{
{
label
:
'赠送成本'
,
label
:
'赠送成本'
,
...
@@ -88,6 +89,11 @@ export default {
...
@@ -88,6 +89,11 @@ export default {
label
:
'产品成本'
,
label
:
'产品成本'
,
prop
:
'productCost'
prop
:
'productCost'
},
},
{
label
:
'质保年限/年'
,
prop
:
'warrantyPeriod'
,
width
:
120
,
},
{
{
label
:
'使用门店'
,
label
:
'使用门店'
,
prop
:
''
,
prop
:
''
,
...
...
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