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
694fce9f
Commit
694fce9f
authored
Oct 10, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
1abbd1fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
187 deletions
+98
-187
goodsku2.vue
components/goods/goodsku2.vue
+49
-130
order-submit.vue
pages/order-submit/order-submit.vue
+49
-57
No files found.
components/goods/goodsku2.vue
View file @
694fce9f
...
@@ -7,37 +7,16 @@
...
@@ -7,37 +7,16 @@
<view
class=
"chosen-info"
>
<view
class=
"chosen-info"
>
<view
class=
"price"
:style=
"
{ color: mc }">
<view
class=
"price"
:style=
"
{ color: mc }">
<text
class=
"small"
>
¥
</text>
<text
class=
"small"
>
¥
</text>
<!--
<text
v-show=
"notes"
>
{{
goodprice2
}}
</text>
-->
<text>
{{
goodprice
}}
</text>
<text>
{{
goodprice
}}
</text>
</view>
</view>
<!--
<view
class=
"amount"
>
{{
g
.
form_id
==
1
?
'余位'
:
'库存'
}}
{{
goodamount
}}
{{
g
.
unit
}}
</view>
-->
<!--
<view
class=
"sku"
>
{{
skuObj
?
'已选择'
:
'选择'
}}
{{
sku
}}
</view>
-->
<view
class=
"amount amount2"
>
可报名额
{{
goodamount
}}
人
</view>
<view
class=
"amount amount2"
>
可报名额
{{
goodamount
}}
人
</view>
<view
class=
"sku_close"
>
<view
class=
"sku_close"
>
<u-icon
name=
"cross"
color=
"#9F9F9F"
@
click=
"cloGood()"
size=
"40"
/>
<u-icon
name=
"cross"
color=
"#9F9F9F"
@
click=
"cloGood()"
size=
"40"
/>
</view>
</view>
</view>
</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>
<view>
<view
class=
"sku-chi"
:style=
"
{
background: y.attr_id == x.checkId ? mc : '#eee',
color: y.attr_id == x.checkId ? '#FFF' : '#333'
}" :class="{ disable: notStockGood.indexOf(y.attr_id) != -1 }" v-for="(y, yi) in x.attr_list" :key="yi"
@click="clickSkuItemHandler(yi, i)">
<image
:src=
"y.pic_url"
class=
"img"
v-if=
"i == 0 && y.pic_url"
></image>
<text
class=
"val"
>
{{
y
.
attr_name
}}
</text>
</view>
</view>
</view>
</scroll-view>
-->
<view
class=
"count-box"
>
<view
class=
"count-box"
>
<text
class=
"label"
>
数量
</text>
<text
class=
"label"
>
数量
</text>
<!-- :max="goodamount" -->
<!--
<u-number-box
:disabled=
"!skuObj"
v-model=
"gc"
:min=
"1"
:max=
"g.attr_groups[0].service_time"
@
change=
"valChange"
></u-number-box>
-->
</view>
</view>
<view
class=
"sku-chi2"
:style=
"
{
<view
class=
"sku-chi2"
:style=
"
{
background: y.attr_id == x.checkId ? mc : '#eee',
background: y.attr_id == x.checkId ? mc : '#eee',
...
@@ -46,27 +25,20 @@
...
@@ -46,27 +25,20 @@
<text
class=
"val2"
>
{{
g
.
attr_groups
[
0
].
service_time
}}
次
</text>
<text
class=
"val2"
>
{{
g
.
attr_groups
[
0
].
service_time
}}
次
</text>
</view>
</view>
<view
class=
"count-box"
v-show=
"g.goodsRelevanceList.length>0"
>
<view
class=
"count-box"
v-show=
"g.goodsRelevanceList.length>0"
>
<text
>
<text>
<text
class=
"label2"
>
物品
</text>
<text
class=
"label2"
>
物品
</text>
<text
class=
"label3"
>
<text
class=
"label3"
>
说明:以下物品需与当前课程绑定购买
说明:以下物品需与当前课程绑定购买
</text>
</text>
</text>
</text>
<!-- :max="goodamount" -->
<!--
<u-number-box
:disabled=
"!skuObj"
v-model=
"gc"
:min=
"1"
:max=
"g.attr_groups[0].service_time"
@
change=
"valChange"
></u-number-box>
-->
</view>
</view>
<!-- 是否购买讲义 -->
<!--
<view
v-show=
"g.goodsRelevanceList.length>0"
>
<u-checkbox-group
@
change=
"checkboxChange"
>
<u-checkbox
v-model=
"checkboxValue1"
shape=
"circle"
v-for=
"(item, index) in checkboxList1"
:key=
"index"
:label=
"item.name"
:name=
"item.name"
>
{{
item
.
name
}}
</u-checkbox>
</u-checkbox-group>
</view>
-->
<view
class=
"val3 sku-chi2"
:style=
"
{
<view
class=
"val3 sku-chi2"
:style=
"
{
background: y.attr_id == x.checkId ? mc : '#eee',
background: y.attr_id == x.checkId ? mc : '#eee',
color: y.attr_id == x.checkId ? '#FFF' : '#333'
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>
{{
item
.
RelevanceName
}}
</text>
<text>
¥
</text>
<text>
¥
</text>
<text>
{{
item
.
RelevancePrice
}}
</text>
<text>
{{
item
.
RelevancePrice
}}
</text>
...
@@ -215,8 +187,6 @@
...
@@ -215,8 +187,6 @@
res
=>
{
res
=>
{
this
.
g
=
res
.
data
.
goods
;
this
.
g
=
res
.
data
.
goods
;
this
.
g
.
totalStock
=
0
;
this
.
g
.
totalStock
=
0
;
// console.log("进入新的",this.g.attr_groups[0].service_time);
this
.
g
.
attr
.
forEach
(
x
=>
{
this
.
g
.
attr
.
forEach
(
x
=>
{
this
.
g
.
totalStock
+=
x
.
stock
this
.
g
.
totalStock
+=
x
.
stock
})
})
...
@@ -225,59 +195,27 @@
...
@@ -225,59 +195,27 @@
this
.
fu
=
this
.
$uiConfig
.
secondary
;
this
.
fu
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
skuObj
=
this
.
skued
.
id
?
this
.
skued
:
null
;
this
.
skuObj
=
this
.
skued
.
id
?
this
.
skued
:
null
;
console
.
log
(
"this.skuObj"
,
this
.
skuObj
);
if
(
this
.
skuObj
)
{
if
(
this
.
skuObj
)
{
this
.
goodimage
=
this
.
skuObj
.
pic_url
||
this
.
g
.
cover_pic
;
this
.
goodimage
=
this
.
skuObj
.
pic_url
||
this
.
g
.
cover_pic
;
// this.goodprice = (parseFloat(this.skuObj.price) * 1).toFixed(2);
this
.
goodamount
=
this
.
skuObj
.
stock
;
this
.
goodamount
=
this
.
skuObj
.
stock
;
// 新增讲义
var
tempGoodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
if
(
this
.
notes
)
{
if
(
this
.
g
.
goodsRelevanceList
&&
this
.
g
.
goodsRelevanceList
.
length
>
0
)
{
this
.
$nextTick
(()
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
+
parseFloat
(
tempGoodprice
+=
parseFloat
(
item
.
RelevancePrice
).
toFixed
(
2
)
item
.
RelevancePrice
)).
toFixed
(
2
);
})
});
}
else
{
this
.
$nextTick
(()
=>
{
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
});
});
}
}
this
.
goodprice
=
tempGoodprice
}
else
{
}
else
{
this
.
goodimage
=
this
.
g
.
cover_pic
;
this
.
goodimage
=
this
.
g
.
cover_pic
;
// this.goodprice = this.g.price_min && this.g.price_min != '' ? this.g.price_min : this.g
var
tempGoodprice
=
(
parseFloat
(
this
.
g
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
// .price_content;
if
(
this
.
g
.
goodsRelevanceList
&&
this
.
g
.
goodsRelevanceList
.
length
>
0
)
{
// 新增讲义
if
(
this
.
notes
)
{
this
.
$nextTick
(()
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
// this.goodprice2 =(parseFloat(this.goodprice)+parseFloat(item.RelevancePrice)).toFixed(2);
tempGoodprice
+=
parseFloat
(
item
.
RelevancePrice
).
toFixed
(
2
);
this
.
goodprice
=
this
.
g
.
price_min
&&
this
.
g
.
price_min
!=
''
?
(
parseFloat
(
this
.
g
.
price_min
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
+
parseFloat
(
item
.
RelevancePrice
))
.
toFixed
(
2
)
:
(
parseFloat
(
this
.
g
.
price_content
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
+
parseFloat
(
item
.
RelevancePrice
))
.
toFixed
(
2
)
})
})
console
.
log
(
'22222222222222222222'
,
this
.
goodprice
)
});
// this.goodprice2 =parseFloat(this.goodprice)+parseFloat(this.g.goodsRelevanceList[0].RelevancePrice)
}
else
{
this
.
$nextTick
(()
=>
{
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
=
tempGoodprice
;
this
.
goodamount
=
this
.
g
.
goods_stock
;
this
.
goodamount
=
this
.
g
.
goods_stock
;
}
}
this
.
bian
=
this
.
$utils
.
is_biang
;
this
.
bian
=
this
.
$utils
.
is_biang
;
this
.
btn1
.
background
=
this
.
secondary
;
this
.
btn1
.
background
=
this
.
secondary
;
...
@@ -290,7 +228,6 @@
...
@@ -290,7 +228,6 @@
if
(
this
.
g
.
attr_groups
&&
this
.
g
.
attr_groups
.
length
>
0
)
{
if
(
this
.
g
.
attr_groups
&&
this
.
g
.
attr_groups
.
length
>
0
)
{
this
.
g
.
attr_groups
.
forEach
(
x
=>
{
this
.
g
.
attr_groups
.
forEach
(
x
=>
{
if
(
!
this
.
skuObj
)
{
if
(
!
this
.
skuObj
)
{
//(x.checkId = 0), (x.checkName = x.attr_group_name);
(
x
.
checkId
=
0
),
(
x
.
checkName
=
x
.
attr_list
[
0
].
attr_name
);
(
x
.
checkId
=
0
),
(
x
.
checkName
=
x
.
attr_list
[
0
].
attr_name
);
x
.
checkId
=
x
.
attr_list
[
0
].
attr_id
;
x
.
checkId
=
x
.
attr_list
[
0
].
attr_id
;
}
else
{
}
else
{
...
@@ -307,31 +244,10 @@
...
@@ -307,31 +244,10 @@
this
.
getfu
()
this
.
getfu
()
this
.
formatDisableSku
();
this
.
formatDisableSku
();
this
.
formatChosenTips
();
this
.
formatChosenTips
();
}
});
);
// this.g = this.good;
},
},
methods
:
{
methods
:
{
// checkboxChange(n) {
// this.notes = !this.notes
// if (!this.notes) {
// this.g.goodsRelevanceList.forEach(item => {
// this.goodprice = (parseFloat(this.goodprice) - parseFloat(item
// .RelevancePrice)).toFixed(2);
// })
// // this.goodprice = this.goodprice+this.g.goodsRelevanceList[0].RelevancePrice
// } else {
// this.g.goodsRelevanceList.forEach(item => {
// this.goodprice = (parseFloat(this.goodprice) + parseFloat(item
// .RelevancePrice)).toFixed(2);
// })
// }
// // if(n.length>0) {
// // this.goodprice = this.goodprice+this.g.goodsRelevanceList[0].RelevancePrice
// // }
// },
getfu
()
{
getfu
()
{
let
fucolor
=
this
.
colorRgb
(
this
.
fu
);
let
fucolor
=
this
.
colorRgb
(
this
.
fu
);
var
RgbValue
=
fucolor
.
replace
(
"rgb("
,
""
).
replace
(
")"
,
""
);
var
RgbValue
=
fucolor
.
replace
(
"rgb("
,
""
).
replace
(
")"
,
""
);
var
RgbValueArry
=
RgbValue
.
split
(
","
);
var
RgbValueArry
=
RgbValue
.
split
(
","
);
...
@@ -342,7 +258,6 @@
...
@@ -342,7 +258,6 @@
}
else
{
}
else
{
this
.
btn1
.
color
=
'#FFF'
;
this
.
btn1
.
color
=
'#FFF'
;
}
}
},
},
colorRgb
(
color
)
{
colorRgb
(
color
)
{
var
sColor
=
color
.
toLowerCase
();
var
sColor
=
color
.
toLowerCase
();
...
@@ -367,14 +282,21 @@
...
@@ -367,14 +282,21 @@
return
sColor
;
return
sColor
;
},
},
joinCar
()
{
joinCar
()
{
console
.
log
(
"商品信息"
,
this
.
g
);
if
(
this
.
skuObj
&&
this
.
skuObj
.
id
)
{
if
(
this
.
skuObj
&&
this
.
skuObj
.
id
)
{
this
.
request2
({
var
postMsg
=
{
url
:
'/api/AppletOrder/SetGoodsShoppingCartInfo'
,
data
:
{
GoodsId
:
this
.
skuObj
.
goods_id
,
GoodsId
:
this
.
skuObj
.
goods_id
,
SpecificationSort
:
this
.
skuObj
.
sign_id
,
SpecificationSort
:
this
.
skuObj
.
sign_id
,
Number
:
this
.
gc
==
0
?
1
:
this
.
gc
Number
:
this
.
gc
==
0
?
1
:
this
.
gc
,
RelationId
:
0
,
//关联讲义编号
};
//有讲义的添加讲义
if
(
this
.
g
&&
this
.
g
.
goodsRelevanceList
&&
this
.
g
.
goodsRelevanceList
.
length
>
0
)
{
postMsg
.
RelationId
=
this
.
g
.
goodsRelevanceList
[
0
].
RelevanceId
;
}
}
this
.
request2
({
url
:
'/api/AppletOrder/SetGoodsShoppingCartInfo'
,
data
:
postMsg
},
},
res
=>
{
res
=>
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -486,7 +408,6 @@
...
@@ -486,7 +408,6 @@
let
chosen
=
''
;
let
chosen
=
''
;
if
(
this
.
g
.
attr_groups
&&
this
.
g
.
attr_groups
.
length
>
0
)
{
if
(
this
.
g
.
attr_groups
&&
this
.
g
.
attr_groups
.
length
>
0
)
{
this
.
g
.
attr_groups
.
forEach
(
x
=>
{
this
.
g
.
attr_groups
.
forEach
(
x
=>
{
// if (x.checkId != 0) {
if
(
x
.
checkId
!=
-
1
)
{
if
(
x
.
checkId
!=
-
1
)
{
chosen
+=
(
chosen
==
''
?
''
:
','
)
+
x
.
checkName
;
chosen
+=
(
chosen
==
''
?
''
:
','
)
+
x
.
checkName
;
}
else
{
}
else
{
...
@@ -499,7 +420,8 @@
...
@@ -499,7 +420,8 @@
this
.
sku
=
unchosen
;
this
.
sku
=
unchosen
;
this
.
skuObj
=
null
;
this
.
skuObj
=
null
;
this
.
goodimage
=
this
.
g
.
cover_pic
;
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
.
attr_groups
[
0
].
service_time
)
:
parseFloat
(
this
.
g
.
price_content
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
);
this
.
goodamount
=
this
.
g
.
goods_stock
;
this
.
goodamount
=
this
.
g
.
goods_stock
;
}
else
{
}
else
{
this
.
sku
=
chosen
;
this
.
sku
=
chosen
;
...
@@ -514,7 +436,6 @@
...
@@ -514,7 +436,6 @@
sign
.
push
(
`
${
x
.
checkId
}
`
);
sign
.
push
(
`
${
x
.
checkId
}
`
);
}
}
});
});
if
(
sign
.
length
==
this
.
g
.
attr_groups
.
length
-
1
)
{
if
(
sign
.
length
==
this
.
g
.
attr_groups
.
length
-
1
)
{
this
.
formatDisable
(
sign
);
this
.
formatDisable
(
sign
);
}
else
if
(
sign
.
length
==
this
.
g
.
attr_groups
.
length
)
{
}
else
if
(
sign
.
length
==
this
.
g
.
attr_groups
.
length
)
{
...
@@ -572,7 +493,6 @@
...
@@ -572,7 +493,6 @@
if
(
this
.
skuObj
!=
null
)
{
if
(
this
.
skuObj
!=
null
)
{
this
.
goodimage
=
this
.
skuObj
.
pic_url
||
this
.
g
.
cover_pic
;
this
.
goodimage
=
this
.
skuObj
.
pic_url
||
this
.
g
.
cover_pic
;
// this.goodprice = (parseFloat(this.skuObj.price) * parseFloat(this.gc)).toFixed(2);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
this
.
goodamount
=
this
.
skuObj
.
stock
;
this
.
goodamount
=
this
.
skuObj
.
stock
;
}
}
...
@@ -585,29 +505,20 @@
...
@@ -585,29 +505,20 @@
valChange
(
e
)
{
valChange
(
e
)
{
this
.
gc
=
e
.
value
;
this
.
gc
=
e
.
value
;
if
(
this
.
skuObj
)
{
if
(
this
.
skuObj
)
{
// this.goodprice = (parseFloat(this.skuObj.price) * parseFloat(this.gc)).toFixed(2);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
if
(
this
.
notes
)
{
if
(
this
.
notes
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
this
.
g
.
goodsRelevanceList
.
forEach
(
item
=>
{
// this.goodprice = (parseFloat(this.skuObj.price) * parseFloat(this.gc) +
// parseFloat(item.RelevancePrice)).toFixed(2);
// this.goodprice = (parseFloat(this.goodprice) + parseFloat(item.RelevancePrice))
// .toFixed(2);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
+
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)
+
parseFloat
(
item
.
RelevancePrice
)).
toFixed
(
2
);
parseFloat
(
item
.
RelevancePrice
)).
toFixed
(
2
);
})
})
})
})
}
else
{
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
// this.goodprice = (parseFloat(this.skuObj.price) * parseFloat(this.gc)).toFixed(2);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
this
.
goodprice
=
(
parseFloat
(
this
.
skuObj
.
price
)
*
parseFloat
(
this
.
g
.
attr_groups
[
0
].
service_time
)).
toFixed
(
2
);
})
})
}
}
}
}
},
},
previewImage
(
index
,
images
)
{
previewImage
(
index
,
images
)
{
images
=
[
images
]
images
=
[
images
]
...
@@ -709,7 +620,8 @@
...
@@ -709,7 +620,8 @@
margin-right
:
10px
;
margin-right
:
10px
;
font-size
:
13px
;
font-size
:
13px
;
}
}
.sku-chi2
{
.sku-chi2
{
background
:
#eee
;
background
:
#eee
;
border-radius
:
3px
;
border-radius
:
3px
;
padding
:
3px
;
padding
:
3px
;
...
@@ -720,6 +632,7 @@
...
@@ -720,6 +632,7 @@
margin-right
:
10px
;
margin-right
:
10px
;
font-size
:
13px
;
font-size
:
13px
;
}
}
.goodsku
.sku-box
.sku-item
.sku-chi.disable
{
.goodsku
.sku-box
.sku-item
.sku-chi.disable
{
background
:
#eee
!important
;
background
:
#eee
!important
;
color
:
#ddd
!important
;
color
:
#ddd
!important
;
...
@@ -731,18 +644,21 @@
...
@@ -731,18 +644,21 @@
line-height
:
24px
;
line-height
:
24px
;
padding
:
0
7px
;
padding
:
0
7px
;
}
}
.val2
{
.val2
{
/* width: 1px; */
/* width: 1px; */
height
:
24px
;
height
:
24px
;
line-height
:
24px
;
line-height
:
24px
;
padding
:
0
7px
;
padding
:
0
7px
;
}
}
.val3
{
.val3
{
/* width: 1px; */
/* width: 1px; */
height
:
24px
;
height
:
24px
;
line-height
:
24px
;
line-height
:
24px
;
padding
:
0
26
rpx
;
padding
:
0
26
rpx
;
}
}
.goodsku
.sku-box
.sku-item
.sku-chi
.img
{
.goodsku
.sku-box
.sku-item
.sku-chi
.img
{
width
:
24px
;
width
:
24px
;
height
:
24px
;
height
:
24px
;
...
@@ -762,19 +678,22 @@
...
@@ -762,19 +678,22 @@
width
:
1px
;
width
:
1px
;
flex
:
1
;
flex
:
1
;
}
}
.label2
{
.label2
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#333
;
color
:
#333
;
width
:
1px
;
width
:
1px
;
flex
:
1
;
flex
:
1
;
}
}
.label3
{
.label3
{
font-size
:
20
rpx
;
font-size
:
20
rpx
;
color
:
#333
;
color
:
#333
;
width
:
1px
;
width
:
1px
;
flex
:
1
;
flex
:
1
;
margin-left
:
10
rpx
;
margin-left
:
10
rpx
;
}
}
.goodsku
.btn-box
{
.goodsku
.btn-box
{
display
:
flex
;
display
:
flex
;
background
:
#fff
;
background
:
#fff
;
...
...
pages/order-submit/order-submit.vue
View file @
694fce9f
...
@@ -203,8 +203,7 @@
...
@@ -203,8 +203,7 @@
</u-button>
</u-button>
</view>
</view>
</view>
</view>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:list=
"couponList"
:current=
"formdata.User_Coupon_Id"
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:list=
"couponList"
:current=
"formdata.User_Coupon_Id"
@
close=
"closeCouponHandler"
></coupon>
@
close=
"closeCouponHandler"
></coupon>
<cashCard
v-if=
"cashCardList.length > 0 && showcashcard"
:list=
"cashCardList"
:current=
"formdata.Use_Deposit_Id"
<cashCard
v-if=
"cashCardList.length > 0 && showcashcard"
:list=
"cashCardList"
:current=
"formdata.Use_Deposit_Id"
@
close=
"closecashcard"
></cashCard>
@
close=
"closecashcard"
></cashCard>
...
@@ -256,7 +255,7 @@
...
@@ -256,7 +255,7 @@
import
payCom
from
'@/components/pay/pay'
;
import
payCom
from
'@/components/pay/pay'
;
import
peisong
from
'@/components/peisong/index'
;
import
peisong
from
'@/components/peisong/index'
;
import
coupon
from
'@/components/coupon/index'
;
import
coupon
from
'@/components/coupon/index'
;
import
cashCard
from
'@/components/coupon/cashCard'
;
//储蓄卡
import
cashCard
from
'@/components/coupon/cashCard'
;
//储蓄卡
import
goodList
from
'@/components/goods/order-good-list'
;
import
goodList
from
'@/components/goods/order-good-list'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -301,7 +300,7 @@
...
@@ -301,7 +300,7 @@
expressPrice
:
0.0
,
expressPrice
:
0.0
,
goodPrice
:
0.0
,
goodPrice
:
0.0
,
couponPrice
:
0.0
,
couponPrice
:
0.0
,
cashPrice
:
0.0
,
cashPrice
:
0.0
,
integral
:
{
integral
:
{
can_use
:
false
,
can_use
:
false
,
use
:
false
,
use
:
false
,
...
@@ -331,11 +330,11 @@
...
@@ -331,11 +330,11 @@
BuyerMessage
:
''
,
BuyerMessage
:
''
,
showReviceModal
:
false
,
showReviceModal
:
false
,
//抵扣金额
//抵扣金额
deduction_commission
:
0
,
deduction_commission
:
0
,
cashCardList
:[],
cashCardList
:
[],
showcashcard
:
false
,
showcashcard
:
false
,
onecoupon
:
true
,
//第一次进页面的时候选最优的优惠券
onecoupon
:
true
,
//第一次进页面的时候选最优的优惠券
IsDeposit
:
0
,
//是否开启储蓄卡功能
IsDeposit
:
0
,
//是否开启储蓄卡功能
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -345,7 +344,7 @@
...
@@ -345,7 +344,7 @@
if
(
option
.
formData
)
{
if
(
option
.
formData
)
{
this
.
formData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
formData
));
this
.
formData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
formData
));
this
.
formdata
=
JSON
.
parse
(
decodeURIComponent
(
option
.
formData
));
this
.
formdata
=
JSON
.
parse
(
decodeURIComponent
(
option
.
formData
));
this
.
formdata
.
Use_Deposit_Id
=
0
;
//储蓄卡ID 2021-4-8加的
this
.
formdata
.
Use_Deposit_Id
=
0
;
//储蓄卡ID 2021-4-8加的
}
}
if
(
option
.
IsFormShoppingCart
)
{
if
(
option
.
IsFormShoppingCart
)
{
this
.
IsFormShoppingCart
=
option
.
IsFormShoppingCart
;
this
.
IsFormShoppingCart
=
option
.
IsFormShoppingCart
;
...
@@ -354,7 +353,7 @@
...
@@ -354,7 +353,7 @@
this
.
ShoppingCartIdList
=
JSON
.
parse
(
option
.
ShoppingCartIdList
);
this
.
ShoppingCartIdList
=
JSON
.
parse
(
option
.
ShoppingCartIdList
);
}
}
this
.
payInfo
.
OpenId
=
uni
.
getStorageSync
(
'mall_UserInfo'
).
OpenId
;
this
.
payInfo
.
OpenId
=
uni
.
getStorageSync
(
'mall_UserInfo'
).
OpenId
;
this
.
IsDeposit
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
.
IsDeposit
:
0
this
.
IsDeposit
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
.
IsDeposit
:
0
this
.
initPage
();
this
.
initPage
();
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
...
@@ -424,8 +423,8 @@
...
@@ -424,8 +423,8 @@
form
.
DetailList
=
that
.
DetailList
;
form
.
DetailList
=
that
.
DetailList
;
form
.
User_Coupon_Id
=
that
.
formdata
.
User_Coupon_Id
;
form
.
User_Coupon_Id
=
that
.
formdata
.
User_Coupon_Id
;
form
.
Use_Deposit_Id
=
that
.
formdata
.
Use_Deposit_Id
;
form
.
Use_Deposit_Id
=
that
.
formdata
.
Use_Deposit_Id
;
form
.
DepositMoney
=
that
.
cashPrice
;
//储蓄卡抵扣金额
form
.
DepositMoney
=
that
.
cashPrice
;
//储蓄卡抵扣金额
form
.
DepositFreightMoney
=
that
.
expressPrice
;
//储蓄卡抵扣运费
form
.
DepositFreightMoney
=
that
.
expressPrice
;
//储蓄卡抵扣运费
form
.
CouponMoney
=
that
.
couponPrice
;
form
.
CouponMoney
=
that
.
couponPrice
;
form
.
FreightMoney
=
that
.
expressPrice
;
form
.
FreightMoney
=
that
.
expressPrice
;
form
.
Income
=
that
.
ds
.
total_price
;
form
.
Income
=
that
.
ds
.
total_price
;
...
@@ -434,7 +433,7 @@
...
@@ -434,7 +433,7 @@
form
.
Use_Integral
=
that
.
formdata
.
Use_Integral
;
form
.
Use_Integral
=
that
.
formdata
.
Use_Integral
;
form
.
ShoppingCartIdList
=
that
.
ShoppingCartIdList
;
form
.
ShoppingCartIdList
=
that
.
ShoppingCartIdList
;
form
.
AnchorName
=
uni
.
getStorageSync
(
"AnchorName"
)
?
uni
.
getStorageSync
(
"AnchorName"
).
AnchorName
:
''
;
//直播名称
form
.
AnchorName
=
uni
.
getStorageSync
(
"AnchorName"
)
?
uni
.
getStorageSync
(
"AnchorName"
).
AnchorName
:
''
;
//直播名称
if
(
that
.
mchs
&&
that
.
mchs
.
length
>
0
)
{
if
(
that
.
mchs
&&
that
.
mchs
.
length
>
0
)
{
that
.
deduction_commission
=
that
.
mchs
[
0
].
deduction_commission
;
that
.
deduction_commission
=
that
.
mchs
[
0
].
deduction_commission
;
}
}
form
.
DeductionCommission
=
that
.
deduction_commission
;
form
.
DeductionCommission
=
that
.
deduction_commission
;
...
@@ -446,7 +445,6 @@
...
@@ -446,7 +445,6 @@
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
if
(
that
.
checked
==
true
)
{
if
(
that
.
checked
==
true
)
{
that
.
zhaoren
=
true
;
that
.
zhaoren
=
true
;
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
let
Up
=
u
.
UserPageType
?
u
.
UserPageType
:
0
;
let
Up
=
u
.
UserPageType
?
u
.
UserPageType
:
0
;
...
@@ -457,21 +455,17 @@
...
@@ -457,21 +455,17 @@
}
}
that
.
path
=
'/pages/index/index?OrderId='
+
res
.
data
.
OrderId
+
"&user_id="
+
uid
+
"&Up="
+
Up
+
that
.
path
=
'/pages/index/index?OrderId='
+
res
.
data
.
OrderId
+
"&user_id="
+
uid
+
"&Up="
+
Up
+
"&SmallShopId="
+
SmallShopId
+
'&JumpType=4'
;
"&SmallShopId="
+
SmallShopId
+
'&JumpType=4'
;
console
.
log
(
that
.
path
)
}
else
{
}
else
{
that
.
payInfo
.
OrderId
=
res
.
data
.
OrderId
;
that
.
payInfo
.
OrderId
=
res
.
data
.
OrderId
;
that
.
payInfo
.
total_price
=
that
.
ds
.
total_price
;
that
.
payInfo
.
total_price
=
that
.
ds
.
total_price
;
if
(
that
.
formdata
.
Use_Deposit_Id
!=
0
&&
that
.
ds
.
total_price
==
0
){
//如果使用了储蓄卡 就直接支付成功 跳入支付结果
if
(
that
.
formdata
.
Use_Deposit_Id
!=
0
&&
that
.
ds
.
total_price
==
0
)
{
//如果使用了储蓄卡 就直接支付成功 跳入支付结果
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
'/pages/order-submit/pay-success?payInfo='
+
JSON
.
stringify
(
that
.
payInfo
)
url
:
'/pages/order-submit/pay-success?payInfo='
+
JSON
.
stringify
(
that
.
payInfo
)
})
})
}
else
{
//没使用的话 就弹出支付页面
}
else
{
//没使用的话 就弹出支付页面
that
.
payBtn
=
true
;
that
.
payBtn
=
true
;
}
}
}
}
}
else
{
}
else
{
that
.
$refs
.
uToast
.
show
({
that
.
$refs
.
uToast
.
show
({
title
:
res
.
data
.
message
,
title
:
res
.
data
.
message
,
...
@@ -481,7 +475,6 @@
...
@@ -481,7 +475,6 @@
uni
.
hideNavigationBarLoading
();
uni
.
hideNavigationBarLoading
();
}
}
);
);
}
}
});
});
}
}
...
@@ -493,7 +486,7 @@
...
@@ -493,7 +486,7 @@
}
}
this
.
showCoupon
=
false
;
this
.
showCoupon
=
false
;
},
},
closecashcard
(
e
){
closecashcard
(
e
)
{
if
(
e
!=
-
1
)
{
if
(
e
!=
-
1
)
{
this
.
formdata
.
Use_Deposit_Id
=
e
;
this
.
formdata
.
Use_Deposit_Id
=
e
;
this
.
init
();
this
.
init
();
...
@@ -503,13 +496,12 @@
...
@@ -503,13 +496,12 @@
showCouponHandler
()
{
showCouponHandler
()
{
this
.
showCoupon
=
true
;
this
.
showCoupon
=
true
;
},
},
showcashcardbtn
(){
showcashcardbtn
()
{
this
.
showcashcard
=
true
;
this
.
showcashcard
=
true
;
},
},
initCoupon
()
{
initCoupon
()
{
let
ProductList
=
[];
let
ProductList
=
[];
this
.
DetailList
=
[];
this
.
DetailList
=
[];
this
.
mchs
.
forEach
(
item
=>
{
this
.
mchs
.
forEach
(
item
=>
{
item
.
goods_list
.
forEach
(
list
=>
{
item
.
goods_list
.
forEach
(
list
=>
{
let
obj
=
{
let
obj
=
{
...
@@ -536,10 +528,10 @@
...
@@ -536,10 +528,10 @@
res
=>
{
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
couponList
=
res
.
data
;
this
.
couponList
=
res
.
data
;
if
(
this
.
onecoupon
==
true
)
{
if
(
this
.
onecoupon
==
true
)
{
this
.
onecoupon
=
false
this
.
onecoupon
=
false
this
.
couponList
.
map
(
x
=>
{
this
.
couponList
.
map
(
x
=>
{
if
(
x
.
isBest
==
1
){
//进去页面优先选择优惠券
if
(
x
.
isBest
==
1
)
{
//进去页面优先选择优惠券
this
.
formdata
.
User_Coupon_Id
=
x
.
id
this
.
formdata
.
User_Coupon_Id
=
x
.
id
this
.
init
()
this
.
init
()
return
return
...
@@ -563,7 +555,6 @@
...
@@ -563,7 +555,6 @@
},
},
changeSendTypeHandler
(
e
)
{
changeSendTypeHandler
(
e
)
{
let
i
=
e
.
index
;
let
i
=
e
.
index
;
let
obj
=
this
.
mchs
[
i
];
let
obj
=
this
.
mchs
[
i
];
obj
.
delivery
.
showDelivery
=
false
;
obj
.
delivery
.
showDelivery
=
false
;
this
.
$set
(
this
.
mchs
,
i
,
obj
);
this
.
$set
(
this
.
mchs
,
i
,
obj
);
...
@@ -613,7 +604,6 @@
...
@@ -613,7 +604,6 @@
res
=>
{
res
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'数据来了'
);
this
.
address
=
res
.
data
.
address
;
this
.
address
=
res
.
data
.
address
;
this
.
address_enable
=
res
.
data
.
address_enable
;
this
.
address_enable
=
res
.
data
.
address_enable
;
this
.
mchs
=
res
.
data
.
mch_list
;
this
.
mchs
=
res
.
data
.
mch_list
;
...
@@ -640,7 +630,6 @@
...
@@ -640,7 +630,6 @@
};
};
this
.
formatPrice
();
this
.
formatPrice
();
this
.
initCoupon
();
this
.
initCoupon
();
// this.formatAttr();
this
.
adressInfo
=
{
this
.
adressInfo
=
{
Consignee
:
this
.
address
.
name
,
Consignee
:
this
.
address
.
name
,
Mobile
:
this
.
address
.
mobile
,
Mobile
:
this
.
address
.
mobile
,
...
@@ -650,19 +639,22 @@
...
@@ -650,19 +639,22 @@
ShoppingAddress
:
this
.
address
.
detail
ShoppingAddress
:
this
.
address
.
detail
};
};
}
}
uni
.
hideNavigationBarLoading
();
uni
.
hideNavigationBarLoading
();
}
}
);
);
},
},
formatPrice
()
{
formatPrice
()
{
console
.
log
(
"this.mchs"
,
this
.
mchs
);
if
(
this
.
mchs
)
{
this
.
mchs
.
forEach
(
x
=>
{
this
.
mchs
.
forEach
(
x
=>
{
x
.
delivery
.
showDelivery
=
false
;
x
.
delivery
.
showDelivery
=
false
;
if
(
x
.
delivery
.
send_type_list
&&
x
.
delivery
.
send_type_list
.
length
>
0
)
{
x
.
delivery
.
send_type_list
.
forEach
(
y
=>
{
x
.
delivery
.
send_type_list
.
forEach
(
y
=>
{
if
(
y
.
value
==
x
.
delivery
.
send_type
)
{
if
(
y
.
value
==
x
.
delivery
.
send_type
)
{
x
.
delivery
.
send_type_name
=
y
.
name
;
x
.
delivery
.
send_type_name
=
y
.
name
;
}
}
});
});
}
this
.
goodPrice
+=
parseFloat
(
x
.
total_goods_price
);
this
.
goodPrice
+=
parseFloat
(
x
.
total_goods_price
);
this
.
expressPrice
+=
parseFloat
(
x
.
express_price
);
this
.
expressPrice
+=
parseFloat
(
x
.
express_price
);
this
.
couponPrice
+=
parseFloat
(
x
.
coupon
.
coupon_discount
||
0.0
);
this
.
couponPrice
+=
parseFloat
(
x
.
coupon
.
coupon_discount
||
0.0
);
...
@@ -674,6 +666,7 @@
...
@@ -674,6 +666,7 @@
this
.
integral
.
deduction_price
+=
parseFloat
(
x
.
integral
.
deduction_price
);
this
.
integral
.
deduction_price
+=
parseFloat
(
x
.
integral
.
deduction_price
);
}
}
});
});
}
},
},
formatAttr
()
{
formatAttr
()
{
this
.
mchs
.
forEach
(
x
=>
{
this
.
mchs
.
forEach
(
x
=>
{
...
@@ -691,7 +684,6 @@
...
@@ -691,7 +684,6 @@
});
});
},
},
checkboxChange
(
val
)
{
checkboxChange
(
val
)
{
console
.
log
(
val
)
if
(
val
.
value
==
true
)
{
if
(
val
.
value
==
true
)
{
this
.
btntext
=
'找人代付'
this
.
btntext
=
'找人代付'
}
else
{
}
else
{
...
...
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