Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
19e55b4a
Commit
19e55b4a
authored
Apr 13, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
317f9d0d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
17 deletions
+31
-17
goodsku.vue
components/goods/goodsku.vue
+1
-4
goodsku2.vue
components/goods/goodsku2.vue
+30
-13
No files found.
components/goods/goodsku.vue
View file @
19e55b4a
...
...
@@ -9,10 +9,6 @@
<text
class=
"small"
>
¥
</text>
<text>
{{
goodprice
}}
</text>
</view>
<view
class=
"origin"
v-if=
"g.original_price && g.original_price > 0 && g.original_price != goodprice"
>
<text
class=
"small"
>
¥
</text>
<text>
{{
g
.
original_price
.
toFixed
(
2
)
}}
</text>
</view>
<view
class=
"amount"
>
{{
g
.
form_id
==
1
?
'余位'
:
'库存'
}}
{{
goodamount
}}
{{
g
.
unit
}}
</view>
<view
class=
"sku"
>
{{
skuObj
?
'已选择'
:
'选择'
}}
{{
sku
}}
</view>
<view
class=
"sku_close"
>
...
...
@@ -20,6 +16,7 @@
</view>
</view>
</view>
<scroll-view
scroll-y
class=
"sku-box"
>
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
:key=
"i"
>
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</view>
...
...
components/goods/goodsku2.vue
View file @
19e55b4a
...
...
@@ -9,9 +9,9 @@
<text
class=
"small"
>
¥
</text>
<text>
{{
goodprice
}}
</text>
</view>
<view
class=
"origin"
v-if=
"g
.original_price && g.original_price > 0 && g.
original_price != goodprice"
>
<view
class=
"origin"
v-if=
"g
ood_original_price && good_original_price >0 && good_
original_price != goodprice"
>
<text
class=
"small"
>
¥
</text>
<text>
{{
g
.
original_price
.
toFixed
(
2
)
}}
</text>
<text>
{{
g
ood_original_price
}}
</text>
</view>
<view
class=
"amount amount2"
>
可报名额
{{
goodamount
}}
人
</view>
<view
class=
"sku_close"
>
...
...
@@ -41,7 +41,8 @@
<view
class=
"val3 sku-chi2"
:style=
"
{
background: y.attr_id == x.checkId ? mc : '#eee',
color: y.attr_id == x.checkId ? '#FFF' : '#333'
}" v-if="notes" v-for="(item, index) in g.goodsRelevanceList" :key="index">
}"
v-if="notes" v-for="(item, index) in g.goodsRelevanceList" :key="index">
<text>
{{
item
.
RelevanceName
}}
</text>
<text>
¥
</text>
<text>
{{
item
.
RelevancePrice
}}
</text>
...
...
@@ -118,6 +119,7 @@
notes
:
true
,
goodimage
:
''
,
goodprice
:
''
,
good_original_price
:
0
,
goodamount
:
''
,
mc
:
''
,
fu
:
''
,
...
...
@@ -186,7 +188,6 @@
GoodsId
:
this
.
good
.
id
}
},
res
=>
{
this
.
g
=
res
.
data
.
goods
;
this
.
g
.
totalStock
=
0
;
...
...
@@ -197,37 +198,52 @@
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
fu
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
var
jjxkt_original_price
=
0
;
//原价
if
(
this
.
g
.
jjxkt_original_price
&&
this
.
g
.
jjxkt_original_price
>
0
)
{
jjxkt_original_price
=
this
.
g
.
jjxkt_original_price
;
}
console
.
log
(
"jjxkt_original_price"
,
jjxkt_original_price
)
this
.
good_original_price
=
this
.
g
.
jjxkt_original_price
;
this
.
skuObj
=
this
.
skued
.
id
?
this
.
skued
:
null
;
if
(
this
.
skuObj
)
{
this
.
goodimage
=
this
.
skuObj
.
pic_url
||
this
.
g
.
cover_pic
;
this
.
goodamount
=
this
.
skuObj
.
stock
;
// var tempGoodprice = (parseFloat(this.skuObj.price) * parseFloat(this.g.attr_groups[0].service_time)).toFixed(2);
// var tempGoodprice = (this.skuObj.price).toFixed(2);
if
(
this
.
g
.
goodsRelevanceList
&&
this
.
g
.
goodsRelevanceList
.
length
>
0
)
{
this
.
$nextTick
(()
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
// tempGoodprice += parseFloat(item.RelevancePrice).toFixed(2
)
console
.
log
(
11
)
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
+
parseFloat
(
item
.
RelevancePrice
)).
toFixed
(
2
)
.
RelevancePrice
)).
toFixed
(
2
);
//计算原价
if
(
jjxkt_original_price
>
0
)
{
this
.
good_original_price
=
(
parseFloat
(
jjxkt_original_price
)
+
parseFloat
(
item
.
RelevancePrice
)).
toFixed
(
2
);
}
});
})
}
else
{
this
.
$nextTick
(()
=>
{
this
.
goodprice
=
(
parseFloat
(
this
.
g
.
price
)).
toFixed
(
2
);
})
}
// this.goodprice = tempGoodprice
}
else
{
this
.
goodimage
=
this
.
g
.
cover_pic
;
// var tempGoodprice = (this.g.price).toFixed(2);
this
.
goodamount
=
this
.
g
.
goods_stock
;
if
(
this
.
g
.
goodsRelevanceList
&&
this
.
g
.
goodsRelevanceList
.
length
>
0
)
{
this
.
$nextTick
(()
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
// tempGoodprice += parseFloat(item.RelevancePrice).toFixed(2)
this
.
goodprice
=
(
parseFloat
(
this
.
g
.
price
)
+
parseFloat
(
item
.
RelevancePrice
)).
toFixed
(
2
)
.
RelevancePrice
)).
toFixed
(
2
);
//计算原价
if
(
jjxkt_original_price
>
0
)
{
this
.
good_original_price
=
(
parseFloat
(
jjxkt_original_price
)
+
parseFloat
(
item
.
RelevancePrice
)).
toFixed
(
2
);
}
});
})
...
...
@@ -565,6 +581,7 @@
text-decoration
:
line-through
;
margin-left
:
10
rpx
;
}
.amount2
{
margin-top
:
40
rpx
;
}
...
...
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