|
@@ -10,13 +10,13 @@
|
|
|
<u-cell-item title="优惠金额" :value="couponId ? '-¥' + memberInfo.discountsAmount : ''" @click="couponShow = true"></u-cell-item>
|
|
|
<u-cell-item title="学员姓名" :value="studentName" @click="studentShow = true" required></u-cell-item>
|
|
|
<u-cell-item title="实际金额" :value="'¥' + memberInfo.realPayAmount" :arrow="false"></u-cell-item>
|
|
|
- <u-cell-item title="乙方签字" :arrow="false" :title-style="{width: '100%'}" required>
|
|
|
+ <!-- <u-cell-item title="乙方签字" :arrow="false" :title-style="{width: '100%'}" required>
|
|
|
<view class="canvas-container" slot="label">
|
|
|
<canvas canvas-id="canvas" id="canvas" :disable-scroll="true" v-show="!couponShow && !studentShow" style="width: 100%; height: 200px;background-color: #FFFFFF;"
|
|
|
@touchstart="handleTouchStart($event)" @touchmove="handleTouchMove($event)" @touchend="handleTouchEnd($event)"
|
|
|
@touchcancel="handleEnd($event)"></canvas>
|
|
|
</view>
|
|
|
- </u-cell-item>
|
|
|
+ </u-cell-item> -->
|
|
|
</u-cell-group>
|
|
|
<u-popup v-model="couponShow" mode="bottom" border-radius="30" closeable>
|
|
|
<scroll-view scroll-y style="height:300px;margin: 30px 0 15px 0;">
|
|
@@ -36,8 +36,8 @@
|
|
|
</scroll-view>
|
|
|
</u-popup>
|
|
|
<view class="handle-fix-box">
|
|
|
- <text class="contract-link" @click="checkContract()">点击查看合同协议</text>
|
|
|
- <u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="submitContract()">确定支付¥{{memberInfo.realPayAmount}}</u-button>
|
|
|
+ <!-- <text class="contract-link" @click="checkContract()">点击查看合同协议</text> -->
|
|
|
+ <u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="toPay()">确定支付¥{{memberInfo.realPayAmount}}</u-button>
|
|
|
</view>
|
|
|
<u-popup v-model="studentShow" mode="bottom" border-radius="30">
|
|
|
<scroll-view scroll-y class="student-box">
|
|
@@ -48,7 +48,8 @@
|
|
|
</view>
|
|
|
</u-card>
|
|
|
</scroll-view>
|
|
|
- <u-button type="warning" shape="circle" :ripple="true" :custom-style="{...customStyle,margin:'15px'}" @click="goToSubscribelForm()">新增学员</u-button>
|
|
|
+ <u-button type="warning" shape="circle" :ripple="true" :custom-style="{...customStyle,margin:'15px',float: 'left',width: 'calc(100% - 30px)'}"
|
|
|
+ @click="goToSubscribelForm()">新增学员</u-button>
|
|
|
</u-popup>
|
|
|
<u-top-tips ref="uTips"></u-top-tips>
|
|
|
</view>
|
|
@@ -279,43 +280,50 @@
|
|
|
},
|
|
|
// 支付
|
|
|
toPay(contractId) {
|
|
|
- NET.request(API.getPayParams, {
|
|
|
- id: this.memberCardId,
|
|
|
- couponId: this.couponId,
|
|
|
- studentId: this.studentId,
|
|
|
- contractId: contractId
|
|
|
- }, 'POST').then(res => {
|
|
|
- if (this.memberInfo.realPayAmount <= 0) {
|
|
|
- this.goToPayResult(res.data.oderNo)
|
|
|
- return false
|
|
|
- }
|
|
|
- uni.requestPayment({
|
|
|
- provider: 'wxpay',
|
|
|
- timeStamp: res.data.timeStamp,
|
|
|
- nonceStr: res.data.nonceStr,
|
|
|
- package: res.data.packageString,
|
|
|
- signType: res.data.signType,
|
|
|
- paySign: res.data.paySign,
|
|
|
- success: (payRes) => {
|
|
|
- this.goToPayResult(res.data.oderNo)
|
|
|
- },
|
|
|
- fail: (error) => {
|
|
|
- this.$refs.uTips.show({
|
|
|
- title: '支付未成功',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }).catch(error => {
|
|
|
+ if (!this.studentId) {
|
|
|
this.$refs.uTips.show({
|
|
|
- title: error.message,
|
|
|
+ title: '请选择学员',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
- })
|
|
|
- // uni.navigateTo({
|
|
|
- // url: '/pagesMain/contractInfo?memberCardId=' + this.memberCardId + '&couponId=' + this.couponId + '&studentId=' +
|
|
|
- // this.studentId
|
|
|
- // });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // NET.request(API.getPayParams, {
|
|
|
+ // id: this.memberCardId,
|
|
|
+ // couponId: this.couponId,
|
|
|
+ // studentId: this.studentId,
|
|
|
+ // contractId: contractId
|
|
|
+ // }, 'POST').then(res => {
|
|
|
+ // if (this.memberInfo.realPayAmount <= 0) {
|
|
|
+ // this.goToPayResult(res.data.oderNo)
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // uni.requestPayment({
|
|
|
+ // provider: 'wxpay',
|
|
|
+ // timeStamp: res.data.timeStamp,
|
|
|
+ // nonceStr: res.data.nonceStr,
|
|
|
+ // package: res.data.packageString,
|
|
|
+ // signType: res.data.signType,
|
|
|
+ // paySign: res.data.paySign,
|
|
|
+ // success: (payRes) => {
|
|
|
+ // this.goToPayResult(res.data.oderNo)
|
|
|
+ // },
|
|
|
+ // fail: (error) => {
|
|
|
+ // this.$refs.uTips.show({
|
|
|
+ // title: '支付未成功',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }).catch(error => {
|
|
|
+ // this.$refs.uTips.show({
|
|
|
+ // title: error.message,
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pagesMain/contractInfo?memberCardId=' + this.memberCardId + '&couponId=' + this.couponId + '&studentId=' +
|
|
|
+ this.studentId
|
|
|
+ });
|
|
|
},
|
|
|
// 跳转支付结果
|
|
|
goToPayResult(oderNo) {
|
|
@@ -339,7 +347,8 @@
|
|
|
.content {
|
|
|
width: 100%;
|
|
|
float: left;
|
|
|
- padding: 15px 15px 85px 15px;
|
|
|
+ // padding: 15px 15px 85px 15px;
|
|
|
+ padding: 15px 15px 60px 15px;
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
.card-list {
|
|
@@ -428,7 +437,8 @@
|
|
|
}
|
|
|
|
|
|
.handle-fix-box {
|
|
|
- height: 85px;
|
|
|
+ // height: 85px;
|
|
|
+ height: 60px;
|
|
|
text-align: center;
|
|
|
|
|
|
.contract-link {
|