添加设置密保、密保改密、版本提示 更新版本v2.2.0 版本号android 10 ios 11
diff --git a/pages/sub_medical/pay.vue b/pages/sub_medical/pay.vue
index c763a23..5c9ebe5 100644
--- a/pages/sub_medical/pay.vue
+++ b/pages/sub_medical/pay.vue
@@ -11,10 +11,12 @@
<u-cell-item title="订单号" :arrow="false" :value="msg.billNo"></u-cell-item>
<u-cell-item title="就诊日期" :arrow="false" :value="msg.date"></u-cell-item>
<!-- <u-cell-item title="截止日期" :arrow="false" value="2020/10/28 23:29:29"></u-cell-item> -->
- <u-cell-item title="交易状态" :arrow="false" :value="msg.status_ok" :value-style="msg.status=='wip'?status_style:vstyle"></u-cell-item>
+ <u-cell-item title="交易状态" :arrow="false" :value="msg.status_ok" :value-style="msg.status=='wip'|| msg.status==undefined?status_style:vstyle"></u-cell-item>
+ <u-cell-item title="退款状态" :arrow="false" :value="msg.refundflag_ok" :value-style="msg.refundflag=='refund'?status_style:vstyle"
+ v-if="msg.refundflag == 'wip' || msg.refundflag == 'refund'"></u-cell-item>
</u-cell-group>
<u-button @click="msg.status=='wip'?query():open()" :custom-style="payBtn" v-if="kind =='unpay'">{{msg.status=='wip'?'查询订单状态':'立即支付'}}</u-button>
- <u-button @click="" :custom-style="payBtn" v-if="kind =='payed'&& msg.notifyStatus == false">通知医院</u-button>
+ <u-button @click="notify_hosiptal" :custom-style="payBtn" v-if="kind =='payed'&& msg.notifyStatus == false">通知医院</u-button>
<!-- 支付密码弹框 -->
<uni-popup ref="showPassword" class="pwd-wrapper">
<view class="uni-tip uni-pwd">
@@ -49,11 +51,11 @@
},
vstyle: {
color: '#FF6F6F',
- fontSize:'30rpx'
+ fontSize: '30rpx'
},
status_style: {
color: '#18B566',
- fontSize:'30rpx'
+ fontSize: '30rpx'
},
payBtn: {
backgroundColor: ' #2FA8E1',
@@ -65,7 +67,7 @@
marginTop: '50rpx'
},
msg: {},
- kind:''
+ kind: ''
}
},
methods: {
@@ -123,12 +125,12 @@
let obj = that.msg
let date = res.transdate.substr(0, 4) +
"-" + res.transdate.substr(4, 2) + "-" + res.transdate.substr(6, 2) + " " + res.transtime.substr(0, 2) + ":" +
- res.transtime.substr(2, 2) + ":" + res.transtime.substr(4, 2)
- setTimeout(()=>{
- uni.navigateTo({
- url: `/pages/sub_medical/payResult?status=${status}&msg=${JSON.stringify(obj)}&date=${date}`
- })
- },1500)
+ res.transtime.substr(2, 2) + ":" + res.transtime.substr(4, 2)
+ setTimeout(() => {
+ uni.navigateTo({
+ url: `/pages/sub_medical/payResult?status=${status}&msg=${JSON.stringify(obj)}&date=${date}`
+ })
+ }, 1500)
})
},
query() {
@@ -136,31 +138,49 @@
let billno = that.msg.billNo
that.$u.post('/medicalapi/pay/query/' + billno, {}).then(res => {
let status = res.status
- if(status == 'wip'){
+ if (status == 'wip') {
uni.showToast({
- icon:'none',
- title:'订单正在支付中,请稍等...'
+ icon: 'none',
+ title: '订单正在支付中,请稍等...'
})
- }else{
+ } else {
let status = res.status
let obj = that.msg
let date = res.transdate.substr(0, 4) +
"-" + res.transdate.substr(4, 2) + "-" + res.transdate.substr(6, 2) + " " + res.transtime.substr(0, 2) + ":" +
- res.transtime.substr(2, 2) + ":" + res.transtime.substr(4, 2)
- setTimeout(()=>{
- uni.navigateTo({
- url: `/pages/sub_medical/payResult?status=${status}&msg=${JSON.stringify(obj)}&date=${date}`
- })
- },1500)
+ res.transtime.substr(2, 2) + ":" + res.transtime.substr(4, 2)
+ setTimeout(() => {
+ uni.navigateTo({
+ url: `/pages/sub_medical/payResult?status=${status}&msg=${JSON.stringify(obj)}&date=${date}`
+ })
+ }, 1500)
}
})
+ },
+ notify_hosiptal() {
+ let that = this
+ let billno = that.msg.billno
+ that.$u.post('/medicalapi/pay/notify/' + billno).then(res => {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration:800,
+ success(ret) {
+ setTimeout(() => {
+ uni.navigateBack({
+ delta: 1
+ })
+ }, 1500)
+ }
+ })
+ })
}
},
onLoad(options) {
let msg = JSON.parse(options.msg)
let id = options.id
this.kind = id
- if(id == 'unpay'){
+ if (id == 'unpay') {
msg.date = msg.medicalDate.substr(0, 4) + '-' + msg.medicalDate.substr(4, 2) + '-' + msg.medicalDate.substr(6, 2) +
' ' + msg.medicalDate.substr(8, 2) + ':' + msg.medicalDate.substr(10, 2) + ':' + msg.medicalDate.substr(12, 2)
switch (msg.status) {
@@ -172,14 +192,20 @@
break
}
this.msg = msg
- }else if(id == 'payed'){
+ } else if (id == 'payed') {
msg.date = msg.medicaldate.substr(0, 4) + '-' + msg.medicaldate.substr(4, 2) + '-' + msg.medicaldate.substr(6, 2) +
' ' + msg.medicaldate.substr(8, 2) + ':' + msg.medicaldate.substr(10, 2) + ':' + msg.medicaldate.substr(12, 2)
- msg.billNo = msg.billno
- msg.mergingSubtotal = msg.mergingsubtotal
- msg.mergingName = msg.mergingname
- msg.status_ok = '已完成'
- msg.hospitalName = msg.hospitalname
+ msg.billNo = msg.billno
+ msg.mergingSubtotal = msg.mergingsubtotal
+ msg.mergingName = msg.mergingname
+ msg.status_ok = '已完成'
+ switch (msg.refundflag) {
+ case 'wip':
+ msg.refundflag_ok = '退款处理中...';
+ break
+ case 'refund':
+ msg.refundflag_ok = '已退款';
+ }
this.msg = msg
}
}