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 54e12ab5
authored
Nov 17, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
查看单位
1 parent
99d24539
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
17 deletions
src/views/commodity/commodityDetail.vue
src/views/commodity/commodityDetail.vue
View file @
54e12ab
...
...
@@ -70,35 +70,40 @@ export default {
},
{
label
:
'比例换算'
,
name
:
'convertedValue'
name
:
'convertedValue
Txt
'
},
{
label
:
'扣减标准'
,
name
:
'deductionStandard'
name
:
'deductionStandard'
,
suffix
:
'米/车'
},
{
label
:
'产品类型'
,
name
:
'typeTxt'
},
{
label
:
'售价
/元
'
,
label
:
'售价'
,
name
:
'sellPrice'
,
isNum
:
true
isNum
:
true
,
suffix
:
'元/件'
},
{
label
:
'最低售价
/元
'
,
label
:
'最低售价'
,
name
:
'minSellPrice'
,
isNum
:
true
isNum
:
true
,
suffix
:
'元/件'
},
{
label
:
'赠送成本
/元
'
,
label
:
'赠送成本'
,
name
:
'giftCost'
,
isNum
:
true
isNum
:
true
,
suffix
:
'米/车'
},
{
label
:
'产品成本/元'
,
name
:
'productCost'
,
isNum
:
true
isNum
:
true
,
suffix
:
'元/件'
},
{
label
:
'质保年限/年'
,
...
...
@@ -108,12 +113,14 @@ export default {
{
label
:
'库存下限预警'
,
name
:
'warningValue'
,
isNum
:
true
isNum
:
true
,
suffix
:
'米'
},
{
label
:
'库存预警上限'
,
name
:
'warningValueMax'
,
isNum
:
true
isNum
:
true
,
suffix
:
'米'
}
],
// 门店表格
...
...
@@ -166,24 +173,39 @@ export default {
this
.
detailForm
.
posTxt
=
obj
?
obj
.
positionName
:
'-'
})
},
changeFormAttr
(
formName
,
attrName
,
labelList
,
attrValue
)
{
labelList
.
forEach
(
item
=>
{
this
[
formName
].
forEach
(
k
=>
{
if
(
k
.
label
==
item
)
{
k
[
attrName
]
=
attrValue
}
})
})
},
getInfo
()
{
this
.
$apis
.
commodity
.
getGoodsDetail
({
upgradeGoodsId
:
this
.
routeInfo
.
info
.
upgradeGoodsId
}).
then
(
res
=>
{
this
.
detailForm
=
res
let
list
=
[]
let
baseLabelList
=
[
'售价'
,
'最低售价'
,
'产品成本'
]
let
unitLabelList
=
[
'库存下限预警'
,
'库存上限预警'
]
this
.
detailForm
.
baseProductFlag
==
'Y'
?
list
.
push
(
'基础产品'
)
:
''
this
.
detailForm
.
upgradeProductFlag
==
'Y'
?
list
.
push
(
'升级产品'
)
:
''
this
.
detailForm
.
typeTxt
=
list
.
join
(
','
)
console
.
log
(
this
.
detailForm
,
'000'
)
this
.
changeFormAttr
(
'detailFormDataRow'
,
'suffix'
,
baseLabelList
,
this
.
detailForm
.
goodsTypeName
==
'自建商品-精品'
?
'元/件'
:
'元/车'
)
this
.
changeFormAttr
(
'editFdetailFormDataRowormData'
,
'suffix'
,
unitLabelList
,
this
.
detailForm
.
goodsTypeName
==
'自建商品-精品'
?
'件'
:
'米'
)
this
.
detailForm
.
convertedValueTxt
=
this
.
detailForm
.
convertedValue
?
'1卷='
+
this
.
detailForm
.
convertedValue
+
'米'
:
'-'
if
(
list
.
length
!=
2
&&
this
.
detailForm
.
baseProductFlag
==
'Y'
)
{
this
.
detailForm
.
sellPrice
=
'-'
this
.
detailForm
.
minSellPrice
=
'-'
this
.
detailForm
.
productCost
=
'-'
}
if
(
this
.
detailForm
.
goodsCodeName
!=
'太阳膜'
)
{
this
.
detailForm
.
warrantyPeriod
=
'-'
this
.
detailForm
.
giftCost
=
'-'
}
else
{
this
.
detailForm
.
warrantyPeriod
=
(
this
.
detailForm
.
warrantyPeriod
||
0
)
+
'年'
}
//
if (this.detailForm.goodsCodeName != '太阳膜') {
//
this.detailForm.warrantyPeriod = '-'
//
this.detailForm.giftCost = '-'
//
} else {
this
.
detailForm
.
warrantyPeriod
=
(
this
.
detailForm
.
warrantyPeriod
||
0
)
+
'年'
//
}
this
.
getGoodsPosList
()
})
},
...
...
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