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
35e1649d
Commit
35e1649d
authored
Oct 11, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
bd53b1cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
22 deletions
+37
-22
goodsku2.vue
components/goods/goodsku2.vue
+37
-22
No files found.
components/goods/goodsku2.vue
View file @
35e1649d
<
template
>
<u-popup
mode=
"bottom"
:border-radius=
"borderRadius"
:popup=
"false"
v-model=
"value"
:maskCloseAble=
"maskCloseAble"
length=
"auto"
:safeAreaInsetBottom=
"true"
@
close=
"popupClose"
:z-index=
"9999"
close-icon=
"close"
>
length=
"auto"
:safeAreaInsetBottom=
"true"
@
close=
"popupClose"
:z-index=
"9999"
close-icon=
"close"
>
<view
class=
"goodsku"
>
<view
class=
"goods"
>
<image
:src=
"goodimage"
class=
"img"
@
click=
"previewImage(0,goodimage)"
></image>
...
...
@@ -24,7 +24,7 @@
}">
<text
class=
"val2"
>
{{
g
.
attr_groups
[
0
].
service_time
}}
次
</text>
</view>
<view
class=
"count-box"
v-
show=
"
g.goodsRelevanceList.length>0"
>
<view
class=
"count-box"
v-
if=
"g.goodsRelevanceList&&
g.goodsRelevanceList.length>0"
>
<text>
<text
class=
"label2"
>
物品
</text>
<text
class=
"label3"
>
...
...
@@ -37,8 +37,7 @@
<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>
...
...
@@ -112,7 +111,6 @@
name
:
'是否购买讲义'
,
checked
:
true
},
],
goodprice2
:
''
,
notes
:
true
,
goodimage
:
''
,
goodprice
:
''
,
...
...
@@ -199,23 +197,41 @@
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 = (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
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
tempGoodprice
+=
parseFloat
(
item
.
RelevancePrice
).
toFixed
(
2
)
});
this
.
$nextTick
(()
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
// tempGoodprice += parseFloat(item.RelevancePrice).toFixed(2)
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
+
parseFloat
(
item
.
RelevancePrice
)).
toFixed
(
2
)
});
})
}
else
{
this
.
$nextTick
(()
=>
{
this
.
goodprice
=
(
parseFloat
(
this
.
g
.
price
)).
toFixed
(
2
);
})
}
this
.
goodprice
=
tempGoodprice
//
this.goodprice = tempGoodprice
}
else
{
this
.
goodimage
=
this
.
g
.
cover_pic
;
var
tempGoodprice
=
(
parseFloat
(
this
.
g
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
// var tempGoodprice = (this.g.price).toFixed(2);
this
.
goodamount
=
this
.
g
.
goods_stock
;
if
(
this
.
g
.
goodsRelevanceList
&&
this
.
g
.
goodsRelevanceList
.
length
>
0
)
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
tempGoodprice
+=
parseFloat
(
item
.
RelevancePrice
).
toFixed
(
2
);
this
.
$nextTick
(()
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
// tempGoodprice += parseFloat(item.RelevancePrice).toFixed(2)
this
.
goodprice
=
(
parseFloat
(
this
.
g
.
price
)
+
parseFloat
(
item
.
RelevancePrice
)).
toFixed
(
2
)
});
})
}
else
{
this
.
$nextTick
(()
=>
{
this
.
goodprice
=
(
parseFloat
(
this
.
g
.
price
)).
toFixed
(
2
);
})
}
this
.
goodprice
=
tempGoodprice
;
this
.
goodamount
=
this
.
g
.
goods_stock
;
}
this
.
bian
=
this
.
$utils
.
is_biang
;
this
.
btn1
.
background
=
this
.
secondary
;
...
...
@@ -420,8 +436,8 @@
this
.
sku
=
unchosen
;
this
.
skuObj
=
null
;
this
.
goodimage
=
this
.
g
.
cover_pic
;
this
.
goodprice
=
this
.
g
.
price_min
&&
this
.
g
.
price_min
!=
''
?
parseFloat
(
this
.
g
.
price_min
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
:
parseFloat
(
this
.
g
.
price_content
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
);
this
.
goodprice
=
this
.
g
.
price_min
&&
this
.
g
.
price_min
!=
''
?
parseFloat
(
this
.
g
.
price_min
)
:
parseFloat
(
this
.
g
.
price_content
);
this
.
goodamount
=
this
.
g
.
goods_stock
;
}
else
{
this
.
sku
=
chosen
;
...
...
@@ -493,7 +509,7 @@
if
(
this
.
skuObj
!=
null
)
{
this
.
goodimage
=
this
.
skuObj
.
pic_url
||
this
.
g
.
cover_pic
;
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
).
toFixed
(
2
);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)).
toFixed
(
2
);
this
.
goodamount
=
this
.
skuObj
.
stock
;
}
},
...
...
@@ -505,17 +521,16 @@
valChange
(
e
)
{
this
.
gc
=
e
.
value
;
if
(
this
.
skuObj
)
{
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
).
toFixed
(
2
);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)).
toFixed
(
2
);
if
(
this
.
notes
)
{
this
.
$nextTick
(()
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
+
parseFloat
(
item
.
RelevancePrice
)).
toFixed
(
2
);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)).
toFixed
(
2
);
})
})
}
else
{
this
.
$nextTick
(()
=>
{
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
).
toFixed
(
2
);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)).
toFixed
(
2
);
})
}
}
...
...
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