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
Expand all
Hide 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
This diff is collapsed.
Click to expand it.
pages/order-submit/order-submit.vue
View file @
694fce9f
...
...
@@ -164,7 +164,7 @@
<text
class=
"price"
:style=
"{ color: mc }"
>
-¥{{ couponPrice.toFixed(2) }}
</text>
</view>
</view>
<view
class=
"filed"
v-if=
"mchs.length>0&&mchs[0].is_deduction_commission"
>
<view
class=
"left"
>
佣金抵扣
</view>
<view
class=
"right"
>
...
...
@@ -177,7 +177,7 @@
<text
class=
"price"
:style=
"{ color: mc }"
>
-¥{{ userInt ? integral.deduction_price.toFixed(2) : '0.00' }}
</text>
</view>
</view>
<view
class=
"filed"
v-if=
"IsDeposit==1 && mchs[0].deposit.can_use == true"
>
<view
class=
"filed"
v-if=
"IsDeposit==1 && mchs[0].deposit.can_use == true"
>
<view
class=
"left"
>
储蓄卡抵扣
</view>
<view
class=
"right"
>
<text
class=
"price"
:style=
"{ color: mc }"
>
-¥{{ cashPrice.toFixed(2) }}
</text>
...
...
@@ -203,11 +203,10 @@
</u-button>
</view>
</view>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:list=
"couponList"
:current=
"formdata.User_Coupon_Id"
@
close=
"closeCouponHandler"
></coupon>
<cashCard
v-if=
"cashCardList.length > 0 && showcashcard"
:list=
"cashCardList"
:current=
"formdata.Use_Deposit_Id"
@
close=
"closecashcard"
></cashCard>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:list=
"couponList"
:current=
"formdata.User_Coupon_Id"
@
close=
"closeCouponHandler"
></coupon>
<cashCard
v-if=
"cashCardList.length > 0 && showcashcard"
:list=
"cashCardList"
:current=
"formdata.Use_Deposit_Id"
@
close=
"closecashcard"
></cashCard>
<view
class=
"notOption"
v-if=
"submitOrder"
></view>
<good-list
:list=
"goodData"
v-if=
"showGoodList"
@
close=
"closeGoodListHandler"
></good-list>
<payCom
v-if=
"payBtn"
:payInfo=
"payInfo"
@
closePay=
"closePay"
></payCom>
...
...
@@ -256,7 +255,7 @@
import
payCom
from
'@/components/pay/pay'
;
import
peisong
from
'@/components/peisong/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'
;
export
default
{
components
:
{
...
...
@@ -301,7 +300,7 @@
expressPrice
:
0.0
,
goodPrice
:
0.0
,
couponPrice
:
0.0
,
cashPrice
:
0.0
,
cashPrice
:
0.0
,
integral
:
{
can_use
:
false
,
use
:
false
,
...
...
@@ -331,11 +330,11 @@
BuyerMessage
:
''
,
showReviceModal
:
false
,
//抵扣金额
deduction_commission
:
0
,
cashCardList
:[],
showcashcard
:
false
,
onecoupon
:
true
,
//第一次进页面的时候选最优的优惠券
IsDeposit
:
0
,
//是否开启储蓄卡功能
deduction_commission
:
0
,
cashCardList
:
[],
showcashcard
:
false
,
onecoupon
:
true
,
//第一次进页面的时候选最优的优惠券
IsDeposit
:
0
,
//是否开启储蓄卡功能
};
},
onLoad
(
option
)
{
...
...
@@ -345,7 +344,7 @@
if
(
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
)
{
this
.
IsFormShoppingCart
=
option
.
IsFormShoppingCart
;
...
...
@@ -354,7 +353,7 @@
this
.
ShoppingCartIdList
=
JSON
.
parse
(
option
.
ShoppingCartIdList
);
}
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
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
...
...
@@ -424,17 +423,17 @@
form
.
DetailList
=
that
.
DetailList
;
form
.
User_Coupon_Id
=
that
.
formdata
.
User_Coupon_Id
;
form
.
Use_Deposit_Id
=
that
.
formdata
.
Use_Deposit_Id
;
form
.
DepositMoney
=
that
.
cashPrice
;
//储蓄卡抵扣金额
form
.
DepositFreightMoney
=
that
.
expressPrice
;
//储蓄卡抵扣运费
form
.
DepositMoney
=
that
.
cashPrice
;
//储蓄卡抵扣金额
form
.
DepositFreightMoney
=
that
.
expressPrice
;
//储蓄卡抵扣运费
form
.
CouponMoney
=
that
.
couponPrice
;
form
.
FreightMoney
=
that
.
expressPrice
;
form
.
Income
=
that
.
ds
.
total_price
;
form
.
IsFormShoppingCart
=
that
.
IsFormShoppingCart
;
form
.
Use_Integral
=
that
.
formdata
.
Use_Integral
;
form
.
ShoppingCartIdList
=
that
.
ShoppingCartIdList
;
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
;
}
form
.
DeductionCommission
=
that
.
deduction_commission
;
...
...
@@ -446,7 +445,6 @@
if
(
res
.
resultCode
==
1
)
{
if
(
that
.
checked
==
true
)
{
that
.
zhaoren
=
true
;
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
let
Up
=
u
.
UserPageType
?
u
.
UserPageType
:
0
;
...
...
@@ -457,21 +455,17 @@
}
that
.
path
=
'/pages/index/index?OrderId='
+
res
.
data
.
OrderId
+
"&user_id="
+
uid
+
"&Up="
+
Up
+
"&SmallShopId="
+
SmallShopId
+
'&JumpType=4'
;
console
.
log
(
that
.
path
)
}
else
{
that
.
payInfo
.
OrderId
=
res
.
data
.
OrderId
;
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
({
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
;
}
}
}
else
{
that
.
$refs
.
uToast
.
show
({
title
:
res
.
data
.
message
,
...
...
@@ -481,7 +475,6 @@
uni
.
hideNavigationBarLoading
();
}
);
}
});
}
...
...
@@ -493,7 +486,7 @@
}
this
.
showCoupon
=
false
;
},
closecashcard
(
e
){
closecashcard
(
e
)
{
if
(
e
!=
-
1
)
{
this
.
formdata
.
Use_Deposit_Id
=
e
;
this
.
init
();
...
...
@@ -503,13 +496,12 @@
showCouponHandler
()
{
this
.
showCoupon
=
true
;
},
showcashcardbtn
(){
showcashcardbtn
()
{
this
.
showcashcard
=
true
;
},
initCoupon
()
{
let
ProductList
=
[];
this
.
DetailList
=
[];
this
.
mchs
.
forEach
(
item
=>
{
item
.
goods_list
.
forEach
(
list
=>
{
let
obj
=
{
...
...
@@ -536,10 +528,10 @@
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
couponList
=
res
.
data
;
if
(
this
.
onecoupon
==
true
)
{
this
.
onecoupon
=
false
this
.
couponList
.
map
(
x
=>
{
if
(
x
.
isBest
==
1
){
//进去页面优先选择优惠券
if
(
this
.
onecoupon
==
true
)
{
this
.
onecoupon
=
false
this
.
couponList
.
map
(
x
=>
{
if
(
x
.
isBest
==
1
)
{
//进去页面优先选择优惠券
this
.
formdata
.
User_Coupon_Id
=
x
.
id
this
.
init
()
return
...
...
@@ -563,7 +555,6 @@
},
changeSendTypeHandler
(
e
)
{
let
i
=
e
.
index
;
let
obj
=
this
.
mchs
[
i
];
obj
.
delivery
.
showDelivery
=
false
;
this
.
$set
(
this
.
mchs
,
i
,
obj
);
...
...
@@ -613,7 +604,6 @@
res
=>
{
this
.
loading
=
false
;
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'数据来了'
);
this
.
address
=
res
.
data
.
address
;
this
.
address_enable
=
res
.
data
.
address_enable
;
this
.
mchs
=
res
.
data
.
mch_list
;
...
...
@@ -640,7 +630,6 @@
};
this
.
formatPrice
();
this
.
initCoupon
();
// this.formatAttr();
this
.
adressInfo
=
{
Consignee
:
this
.
address
.
name
,
Mobile
:
this
.
address
.
mobile
,
...
...
@@ -650,30 +639,34 @@
ShoppingAddress
:
this
.
address
.
detail
};
}
uni
.
hideNavigationBarLoading
();
}
);
},
formatPrice
()
{
this
.
mchs
.
forEach
(
x
=>
{
x
.
delivery
.
showDelivery
=
false
;
x
.
delivery
.
send_type_list
.
forEach
(
y
=>
{
if
(
y
.
value
==
x
.
delivery
.
send_type
)
{
x
.
delivery
.
send_type_name
=
y
.
name
;
console
.
log
(
"this.mchs"
,
this
.
mchs
);
if
(
this
.
mchs
)
{
this
.
mchs
.
forEach
(
x
=>
{
x
.
delivery
.
showDelivery
=
false
;
if
(
x
.
delivery
.
send_type_list
&&
x
.
delivery
.
send_type_list
.
length
>
0
)
{
x
.
delivery
.
send_type_list
.
forEach
(
y
=>
{
if
(
y
.
value
==
x
.
delivery
.
send_type
)
{
x
.
delivery
.
send_type_name
=
y
.
name
;
}
});
}
this
.
goodPrice
+=
parseFloat
(
x
.
total_goods_price
);
this
.
expressPrice
+=
parseFloat
(
x
.
express_price
);
this
.
couponPrice
+=
parseFloat
(
x
.
coupon
.
coupon_discount
||
0.0
);
this
.
cashPrice
+=
parseFloat
(
x
.
deposit
.
deposit_price
||
0.0
);
if
(
x
.
integral
.
can_use
)
{
this
.
integral
.
can_use
=
true
;
this
.
integral
.
use
=
false
;
this
.
integral
.
use_num
+=
x
.
integral
.
use_num
;
this
.
integral
.
deduction_price
+=
parseFloat
(
x
.
integral
.
deduction_price
);
}
});
this
.
goodPrice
+=
parseFloat
(
x
.
total_goods_price
);
this
.
expressPrice
+=
parseFloat
(
x
.
express_price
);
this
.
couponPrice
+=
parseFloat
(
x
.
coupon
.
coupon_discount
||
0.0
);
this
.
cashPrice
+=
parseFloat
(
x
.
deposit
.
deposit_price
||
0.0
);
if
(
x
.
integral
.
can_use
)
{
this
.
integral
.
can_use
=
true
;
this
.
integral
.
use
=
false
;
this
.
integral
.
use_num
+=
x
.
integral
.
use_num
;
this
.
integral
.
deduction_price
+=
parseFloat
(
x
.
integral
.
deduction_price
);
}
});
}
},
formatAttr
()
{
this
.
mchs
.
forEach
(
x
=>
{
...
...
@@ -691,7 +684,6 @@
});
},
checkboxChange
(
val
)
{
console
.
log
(
val
)
if
(
val
.
value
==
true
)
{
this
.
btntext
=
'找人代付'
}
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