Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
f68914d3
Commit
f68914d3
authored
Sep 14, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
dec6a896
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
33 deletions
+98
-33
payMall.vue
src/components/commonPage/payMall.vue
+84
-28
goodlist.vue
src/components/mall/goodlist.vue
+14
-5
No files found.
src/components/commonPage/payMall.vue
View file @
f68914d3
<
template
>
<div
class=
"templatePayURL"
style=
"
float: right;
margin-right: 10px;"
>
<div
class=
"templatePayURL"
style=
"margin-right: 10px;"
>
<div>
<p
style=
"margin:0 0 15px 0;"
>
二维码收款
</p>
<div
style=
"margin: 15px 0;"
>
<el-input
:disabled=
"true"
v-model=
"item.TotalPrice"
>
</el-input>
<p
style=
"margin: 15px 0; text-indent:5px;"
>
<el-radio
v-model=
"payWay"
label=
"3"
>
支付宝
</el-radio>
<el-radio
v-model=
"payWay"
label=
"1"
>
微信
</el-radio>
</p>
<p>
<input
type=
"button"
@
click=
"getPayPic(item)"
class=
"normalBtn w280"
value=
"生成收款码"
/>
</p>
</div>
<div>
<img
:src=
"payPic"
style=
"float: left; margin-right: 15px; width: 150px; height: 150px; border: 1px solid #ccc;"
/>
<p
style=
"padding-right: 10px; font-size: 12px; line-height: 20px; margin-bottom: 10px;"
>
<span
style=
"color: #E95252;"
>
{{
payWay
==
"1"
?
'微信'
:
'支付宝'
}}
</span>
二维码有效时间为5分钟,为了不影响客户支付,请及时转发,以免失效
</p>
<p
class=
"fz12 color333"
>
倒计时
</p>
<p
style=
"color: #E95252; font-weight: bold; font-size: 12px; margin: 8px 0;"
>
{{
descMin
}}
分
{{
descSecond
}}
秒
</p>
</div>
<template
v-if=
"!isShowPic"
>
<div
style=
"margin: 15px 0;"
>
<!--
<el-input
:disabled=
"true"
v-model=
"item.TotalPrice"
>
</el-input>
-->
<div>
总金额:
<span
style=
"color:red;"
>
{{
item
.
TotalPrice
}}
</span>
</div>
<p
style=
"margin: 25px 0;"
>
<el-radio
v-model=
"payWay"
label=
"3"
>
支付宝
</el-radio>
<el-radio
v-model=
"payWay"
label=
"1"
>
微信
</el-radio>
</p>
<p>
<input
type=
"button"
@
click=
"getPayPic(item)"
style=
"width:100%;margin-left:0;"
class=
"normalBtn"
value=
"生成收款码"
/>
</p>
</div>
</
template
>
<
template
v-if=
"isShowPic"
>
<div>
<img
:src=
"payPic"
style=
"float: left; margin-right: 15px; width: 150px; height: 150px; border: 1px solid #ccc;"
/>
<p
style=
"padding-right: 10px; font-size: 12px; line-height: 20px; margin-bottom: 10px;"
>
<span
style=
"color: #E95252;"
>
{{
payWay
==
"1"
?
'微信'
:
'支付宝'
}}
</span>
二维码有效时间为5分钟,为了不影响客户支付,请及时转发,以免失效
</p>
<p
class=
"fz12 color333"
>
倒计时
</p>
<p
style=
"color: #E95252; font-weight: bold; font-size: 12px; margin: 8px 0;"
>
{{
descMin
}}
分
{{
descSecond
}}
秒
</p>
</div>
<div
style=
"color:red;font-size:13px;margin-top:50px;"
>
请不要刷新页面,否则无法支付成功,订单自动取消!
</div>
</
template
>
</div>
</div>
</template>
...
...
@@ -35,7 +43,7 @@
payWay
:
'3'
,
payType
:
211
,
lastTime
:
''
,
isShowPic
:
tru
e
,
isShowPic
:
fals
e
,
payPic
:
''
,
isDesc
:
false
,
descMin
:
0
,
...
...
@@ -44,17 +52,18 @@
begin
:
0
,
nowDate
:
new
Date
(),
timer
:
null
,
chaTime
:
0
timer2
:
null
,
chaTime
:
0
,
};
},
mounted
()
{
},
methods
:
{
getPayPic
(
obj
)
{
let
msg
=
{}
msg
.
OrderSource
=
16
msg
.
body
=
"支付赞羊商品订单:"
+
obj
.
orderId
;
msg
.
body
=
"支付赞羊商品订单:"
+
obj
.
orderId
;
msg
.
attach
=
this
.
payType
+
'|'
+
obj
.
contactName
+
'|'
+
obj
.
orderId
+
'|'
+
obj
.
customerId
+
'|'
+
obj
.
outBranchId
msg
.
total_fee
=
obj
.
TotalPrice
...
...
@@ -69,12 +78,56 @@
this
.
timer
=
setInterval
(()
=>
{
this
.
descTime
(
this
.
chaTime
)
},
1000
);
this
.
isShowPic
=
true
this
.
isShowPic
=
true
;
//重复调用支付状态
this
.
timer2
=
setInterval
(()
=>
{
this
.
getPayStatus
()
},
2000
);
}
else
{
this
.
$message
.
e
rror
(
res
.
data
.
message
)
this
.
E
rror
(
res
.
data
.
message
)
}
},
err
=>
{})
},
//获取付款状态
getPayStatus
()
{
console
.
log
(
this
.
item
,
'item'
);
let
msg
=
{
OrderId
:
40010
}
var
myPay
=
this
.
payWay
;
if
(
myPay
==
3
){
myPay
=
2
}
this
.
apipost
(
'OnlinePay_post_CheckOrderPay'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
data
=
res
.
data
.
data
;
let
mallMsg
=
{
OrderId
:
data
.
OrderId
,
MerchantsNo
:
data
.
Pay_Order
,
User_Id
:
this
.
item
.
User_Id
,
Out_Trade_No
:
data
.
Trade_Order
,
Transaction_Id
:
''
,
PayWay
:
myPay
,
Money
:
this
.
item
.
TotalPrice
,
Remarks
:
"支付赞羊商品订单:"
+
this
.
item
.
orderId
}
this
.
mallapipost
(
"/api/AppletOrder/UpdateERPGoodsOrderInfo"
,
mallMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
this
.
$emit
(
'closeDia'
)
clearInterval
(
this
.
timer2
);
}
else
{
// this.Error(res.data.message)
}
},
err
=>
{})
},
descTime
()
{
let
day
=
parseInt
(
this
.
chaTime
/
1000
/
60
/
60
/
24
)
let
hr
=
parseInt
(
this
.
chaTime
/
1000
/
60
/
60
%
24
)
...
...
@@ -101,6 +154,9 @@
this
.
chaTime
-=
1000
// 一秒后递归
},
parentHandleclick
()
{
this
.
isShowPic
=
false
;
}
},
};
...
...
src/components/mall/goodlist.vue
View file @
f68914d3
...
...
@@ -195,10 +195,10 @@
<el-button
size=
"small"
type=
"danger"
@
click=
"saveInfo('AddressMsg')"
>
确 定
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"
立即支付
"
:visible
.
sync=
"payVisible"
width=
"400px"
>
<payMall
:item=
"payObj"
></payMall>
<el-dialog
title=
"
二维码收款
"
:visible
.
sync=
"payVisible"
width=
"400px"
>
<payMall
:item=
"payObj"
@
closeDia=
"closeDia"
ref=
"payChild"
></payMall>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"
payVisible = false
"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"
cancelPay()
"
>
取 消
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -215,6 +215,7 @@
contactName
:
""
,
customerId
:
0
,
outBranchId
:
0
,
User_Id
:
0
},
statusValue
:
0
,
//请选择
//数据列表
...
...
@@ -539,6 +540,7 @@
this
.
payObj
.
contactName
=
userInfo
.
emName
;
this
.
payObj
.
customerId
=
userInfo
.
EmployeeId
;
this
.
payObj
.
outBranchId
=
userInfo
.
RB_Branch_id
;
this
.
payObj
.
User_Id
=
this
.
orderMsg
.
mallUserId
;
this
.
payVisible
=
true
;
this
.
Success
(
"下单成功!"
);
this
.
clreaMsg
();
...
...
@@ -643,9 +645,16 @@
return
false
;
}
});
},
//调用取消
cancelPay
(){
this
.
payVisible
=
false
;
this
.
$refs
.
payChild
.
parentHandleclick
();
},
//关闭
closeDia
(){
this
.
payVisible
=
false
;
}
},
mounted
()
{
this
.
getCategroy
();
...
...
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