|
@@ -152,6 +152,17 @@
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-dialog title="确认充值" :visible.sync="openWelfareRecharge" width="400px">
|
|
|
+ <el-form ref="payFrom" :model="rechargeInfo" label-width="100px" style="margin-top: 20px" @submit.native.prevent>
|
|
|
+ <el-form-item label="充值金额:">
|
|
|
+ <span style="font-size: 16px;font-weight: bold">¥{{rechargeInfo.welfareAmount}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注:" >
|
|
|
+ <span style="font-size: 16px;font-weight: bold">{{rechargeInfo.remark}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-button type="primary" @click="submitSettlement" style="margin: 20px 80px 0; width: 200px; height: 40px">确认</el-button>
|
|
|
+ </el-dialog>
|
|
|
<!-- 支付方式 -->
|
|
|
<el-dialog :title="rechargeTitle" :visible.sync="openRecharge" width="75%" :before-close="checkClosePay">
|
|
|
<el-descriptions title="核对信息" v-if="rechargeInfo && appUserInfo" :column="4" border :contentStyle="{ 'text-align': 'center' }">
|
|
@@ -197,22 +208,29 @@
|
|
|
<el-form-item label="支付方式" label-width="150px" prop="payType">
|
|
|
<el-radio-group v-model="payFrom.payType" @input="changePayType">
|
|
|
<el-radio-button label="2">现金</el-radio-button>
|
|
|
- <el-radio-button label="0">微信</el-radio-button>
|
|
|
- <el-radio-button label="1">支付宝</el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="是否分段支付" label-width="150px" prop="isInstalment">
|
|
|
- <el-radio-group v-model="payFrom.isInstalment" :disabled="alreadyPayTotal > 0">
|
|
|
- <el-radio-button label="Y">是</el-radio-button>
|
|
|
- <el-radio-button label="N">否</el-radio-button>
|
|
|
+ <el-radio-button label="0">微信/支付宝</el-radio-button>
|
|
|
+<!-- <el-radio-button label="1">支付宝</el-radio-button>-->
|
|
|
+ <el-radio-button label="9">组合支付</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+<!-- <el-col :span="12">-->
|
|
|
+<!-- <el-form-item label="是否分段支付" label-width="150px" prop="isInstalment">-->
|
|
|
+<!-- <el-radio-group v-model="payFrom.isInstalment" :disabled="alreadyPayTotal > 0">-->
|
|
|
+<!-- <el-radio-button label="Y">是</el-radio-button>-->
|
|
|
+<!-- <el-radio-button label="N">否</el-radio-button>-->
|
|
|
+<!-- </el-radio-group>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- </el-col>-->
|
|
|
</el-row>
|
|
|
- <el-row :gutter="10" style="margin-top: 10px">
|
|
|
- <!-- <el-col :span="8">-->
|
|
|
+ <el-row style="margin-top: 10px; margin-left: 20px">
|
|
|
+ <div class="clearfix">
|
|
|
+ <!-- <span>已优惠<span style="color: #ff4949; font-size: 18px; font-weight: bold; margin: 0 4px">{{ getCouponAmount }}</span>元</span>-->
|
|
|
+ <span style="margin-left: 20px">需支付<span style="color: #ff4949; font-size: 18px; font-weight: bold; margin: 0 4px">{{ (getOrderNeedAmount * 100 - parseFloat(alreadyPayTotal * 100)) / 100 }}</span>元</span>
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10" style="margin-top: 10px">
|
|
|
+ <!-- <el-col :span="8">-->
|
|
|
<!-- <el-form-item label="已经支付:" label-width="90px" v-if="payFrom.isInstalment == 'Y'">-->
|
|
|
<!-- <span>{{ alreadyPayTotal }} 元</span>-->
|
|
|
<!-- </el-form-item>-->
|
|
@@ -226,21 +244,37 @@
|
|
|
<el-button type="primary" @click="submitConfirm" v-if="(payFrom.payType == '0' || payFrom.payType == '1') && payFrom.isInstalment == 'Y' && payConfirm == false"> 确认 </el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+
|
|
|
<el-row :gutter="10" style="margin-top: 10px">
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="实收现金(元)" label-width="150px" prop="thisPayMoney" v-if="payFrom.payType == '2' && payFrom.isInstalment == 'N'">
|
|
|
- <el-input-number style="width: 250px" :controls="false" v-model="payFrom.thisPayMoney"></el-input-number>
|
|
|
+ <el-form-item label="付款条形码" label-width="150px" prop="wxBarcode" v-if="payFrom.payType == '0'">
|
|
|
+ <el-input style="width: 250px" v-model="payFrom.wxBarcode" clearable placeholder="请输入付款码"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+<!-- <el-col :span="8">-->
|
|
|
+<!-- <el-form-item label="实收现金(元)" label-width="150px" prop="thisPayMoney" v-if="payFrom.payType == '2'">-->
|
|
|
+<!-- <el-input-number style="width: 250px" :controls="false" v-model="payFrom.thisPayMoney"></el-input-number>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- </el-col>-->
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="微信付款条形码" label-width="150px" prop="wxBarcode" v-if="(payFrom.payType == '0' && payFrom.isInstalment == 'N') || (payFrom.payType == '0' && payFrom.isInstalment == 'Y' && payConfirm == true)">
|
|
|
- <el-input style="width: 250px" v-model="payFrom.wxBarcode" clearable placeholder="请输入付款码"></el-input>
|
|
|
+ <el-form-item label="实收现金(元)" label-width="150px" prop="cashPayAmount" v-if="payFrom.payType == '9'">
|
|
|
+ <el-input style="width: 250px" :controls="false" v-model="payFrom.cashPayAmount" @input="changeCashPayAmount"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="微信/支付宝(元)" label-width="150px" prop="otherPayAmount" v-if="payFrom.payType == '9'">
|
|
|
+ <!-- <el-input-number style="width: 250px" :controls="false" disabled v-model="payFrom.otherPayAmount"></el-input-number>-->
|
|
|
+ <span style="font-size: 16px;font-weight: bold">¥{{payFrom.otherPayAmount || 0}}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="支付宝付款条形码" label-width="150px" prop="aliPayBarcode" v-if="(payFrom.payType == '1' && payFrom.isInstalment == 'N') || (payFrom.payType == '1' && payFrom.isInstalment == 'Y' && payConfirm == true)">
|
|
|
- <el-input style="width: 250px" v-model="payFrom.aliPayBarcode" clearable placeholder="请输入付款码"></el-input>
|
|
|
+ <el-form-item label="" label-width="150px" prop="wxBarcode" v-if="payFrom.payType == '9'">
|
|
|
+ <el-input-number style="width: 250px; opacity: 0" :controls="false" disabled v-model="payFrom.otherPayAmount"></el-input-number>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="付款条形码" label-width="150px" prop="wxBarcode" v-if="payFrom.payType == '9'">
|
|
|
+ <el-input style="width: 250px" v-model="payFrom.wxBarcode" clearable placeholder="请输入付款码"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- <el-row :gutter="10" style="margin-top: 10px">-->
|
|
@@ -261,44 +295,6 @@
|
|
|
<!-- </el-table>-->
|
|
|
<!-- </el-card>-->
|
|
|
<!-- </el-row>-->
|
|
|
- <el-row style="margin-top: 10px">
|
|
|
- <div class="clearfix">
|
|
|
- <div v-if="payFrom.isInstalment == 'Y'">
|
|
|
- <el-col :span="8">
|
|
|
- <span style="text-align: center"
|
|
|
- >已支付<span style="color: #ff4949">{{ parseFloat(alreadyPayTotal) }}</span
|
|
|
- >元</span
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <span
|
|
|
- >已优惠<span style="color: #ff4949">{{ getCouponAmount }}</span
|
|
|
- >元</span
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <span style="text-align: center"
|
|
|
- >还需支付<span style="color: #ff4949">{{ (getOrderNeedAmount * 100 - parseFloat(alreadyPayTotal * 100)) / 100 }}</span
|
|
|
- >元</span
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- </div>
|
|
|
- <div v-if="payFrom.isInstalment == 'N'">
|
|
|
- <el-col :span="8">
|
|
|
- <span
|
|
|
- >已优惠<span style="color: #ff4949">{{ getCouponAmount }}</span
|
|
|
- >元</span
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <span style="text-align: center"
|
|
|
- >还需支付<span style="color: #ff4949">{{ (getOrderNeedAmount * 100 - parseFloat(alreadyPayTotal * 100)) / 100 }}</span
|
|
|
- >元</span
|
|
|
- >
|
|
|
- </el-col>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-row>
|
|
|
</el-card>
|
|
|
<el-row :gutter="10">
|
|
|
<div>
|
|
@@ -396,7 +392,7 @@ export default {
|
|
|
// 客户信息
|
|
|
appUserInfo: null,
|
|
|
rechargeList: null,
|
|
|
- rechargeInfo: null,
|
|
|
+ rechargeInfo: {},
|
|
|
// 充值类型参数
|
|
|
rechargeFrom: {
|
|
|
rechargeType: '3',
|
|
@@ -431,6 +427,7 @@ export default {
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
openRecharge: false,
|
|
|
+ openWelfareRecharge: false,
|
|
|
openCoupon: false,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
@@ -545,6 +542,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeCashPayAmount(value) {
|
|
|
+ this.payFrom.cashPayAmount = value.replace(/[^\d]/g,'')
|
|
|
+ this.payFrom.otherPayAmount = Number(this.orderNeedPayAmount) - Number(this.payFrom.cashPayAmount)
|
|
|
+ },
|
|
|
clickRecharge(done) {
|
|
|
this.$confirm('是否关闭表单,关闭后数据将丢失?')
|
|
|
.then(function () {
|
|
@@ -672,7 +673,7 @@ export default {
|
|
|
this.rechargeInfo.rechargeTypeId = null
|
|
|
}
|
|
|
// 套餐充值
|
|
|
- if (this.rechargeFrom.rechargeType == '0') {
|
|
|
+ if (!this.rechargeFrom.rechargeType || this.rechargeFrom.rechargeType == '0') {
|
|
|
if (this.rechargeFrom.rechargeMealId == null) {
|
|
|
this.$message.error('充值套餐不能为空')
|
|
|
return
|
|
@@ -688,16 +689,25 @@ export default {
|
|
|
}
|
|
|
// 福利金额充值
|
|
|
if (this.rechargeFrom.rechargeType == '1') {
|
|
|
- if (this.rechargeFrom.welfareAmount == '0') {
|
|
|
+ if (!this.rechargeFrom.rechargeType || this.rechargeFrom.welfareAmount == '0') {
|
|
|
this.$message.error('充值金额不能为0元')
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.rechargeFrom.remark) {
|
|
|
+ this.$message.error('请输入备注')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
this.rechargeInfo.rechargeAmount = 0
|
|
|
this.rechargeInfo.giveAmount = 0
|
|
|
this.rechargeInfo.givePointAmount = 0
|
|
|
this.rechargeInfo.welfareAmount = this.rechargeFrom.welfareAmount
|
|
|
this.rechargeInfo.rechargeType = this.rechargeFrom.rechargeType
|
|
|
this.rechargeInfo.rechargeTypeId = null
|
|
|
+ this.rechargeInfo.remark = this.rechargeFrom.remark
|
|
|
+ this.openWelfareRecharge = true
|
|
|
+ this.orderNo = null
|
|
|
+ return;
|
|
|
}
|
|
|
// 卡密充值
|
|
|
if (this.rechargeFrom.rechargeType == '2') {
|
|
@@ -728,14 +738,14 @@ export default {
|
|
|
},
|
|
|
// 结算
|
|
|
submitSettlement() {
|
|
|
- if (this.payFrom.payType == '2' && this.payFrom.isInstalment == 'N' && this.payFrom.thisPayMoney < this.orderNeedPayAmount) {
|
|
|
- this.$message.error('支付金额小于还需支付金额')
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.payFrom.payType == '2' && this.payFrom.isInstalment == 'N' && this.payFrom.thisPayMoney > this.orderNeedPayAmount) {
|
|
|
- this.$message.error('支付金额大于还需支付金额')
|
|
|
- return
|
|
|
- }
|
|
|
+ // if (this.payFrom.payType == '2' && this.payFrom.isInstalment == 'N' && this.payFrom.thisPayMoney < this.orderNeedPayAmount) {
|
|
|
+ // this.$message.error('支付金额小于需支付金额')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (this.payFrom.payType == '2' && this.payFrom.isInstalment == 'N' && this.payFrom.thisPayMoney > this.orderNeedPayAmount) {
|
|
|
+ // this.$message.error('支付金额大于需支付金额')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
const orderRechargePayDTO = {
|
|
|
orderNo: this.orderNo,
|
|
|
appUserId: this.appUserInfo.id,
|
|
@@ -749,7 +759,7 @@ export default {
|
|
|
rechargeTypeId: this.rechargeInfo.rechargeTypeId,
|
|
|
welfareAmount: this.rechargeInfo.welfareAmount,
|
|
|
rechargeType: this.rechargeInfo.rechargeType,
|
|
|
- payAmount: this.orderNeedPayAmount
|
|
|
+ payAmount: this.orderNeedPayAmount,
|
|
|
}
|
|
|
if (this.alreadySelectCouponList.length > 0) {
|
|
|
this.alreadySelectCouponList.forEach((vo) => {
|
|
@@ -766,7 +776,7 @@ export default {
|
|
|
}
|
|
|
// 现金支付
|
|
|
if (this.payFrom.payType == 2) {
|
|
|
- orderRechargePayDTO.thisPayAmount = this.payFrom.thisPayMoney
|
|
|
+ orderRechargePayDTO.thisPayAmount = this.orderNeedPayAmount
|
|
|
}
|
|
|
// 微信支付
|
|
|
if (this.payFrom.payType == 0) {
|
|
@@ -777,6 +787,19 @@ export default {
|
|
|
orderRechargePayDTO.authCode = this.payFrom.aliPayBarcode
|
|
|
}
|
|
|
|
|
|
+ if (this.payFrom.payType == 9) {
|
|
|
+ if (!this.payFrom.cashPayAmount) {
|
|
|
+ this.$message.error('请输入现金支付金额')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (Number(this.payFrom.cashPayAmount) >= Number(this.orderNeedPayAmount)) {
|
|
|
+ this.$message.error('现金支付金额必须小于还需支付金额')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ orderRechargePayDTO.cashPayAmount = this.payFrom.cashPayAmount || 0
|
|
|
+ orderRechargePayDTO.otherPayAmount = this.payFrom.otherPayAmount || 0
|
|
|
+ }
|
|
|
+
|
|
|
this.$confirm('确定进行支付结算吗?')
|
|
|
.then(() => {
|
|
|
const loading = this.$loading({
|
|
@@ -791,7 +814,7 @@ export default {
|
|
|
loading.close()
|
|
|
this.orderNo = response.data.orderNo
|
|
|
// 第三方支付
|
|
|
- if (this.payFrom.payType == '0' || this.payFrom.payType == '1') {
|
|
|
+ if (this.payFrom.payType == '0' || this.payFrom.payType == '1' || (this.payFrom.payType == '9' && this.payFrom.otherPayAmount)) {
|
|
|
this.isPaying = true
|
|
|
var intervalId = setInterval(() => {
|
|
|
this.intervalCheckOrderStatus(intervalId, this.orderNo)
|
|
@@ -811,6 +834,8 @@ export default {
|
|
|
this.$modal.msgWarning('确定关闭本次充值吗?关闭后如需完成支付请前往订单管理继续支付')
|
|
|
})
|
|
|
}
|
|
|
+ }, err => {
|
|
|
+ loading.close()
|
|
|
})
|
|
|
} else {
|
|
|
// 多次支付
|
|
@@ -873,13 +898,14 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
checkIsAllPay(orderNo) {
|
|
|
- getOrderIsAllPayByOrderNo({ orderNo: orderNo }).then((response) => {
|
|
|
- if (response.data == true) {
|
|
|
+ // getOrderIsAllPayByOrderNo({ orderNo: orderNo }).then((response) => {
|
|
|
+ // if (response.data == true) {
|
|
|
this.$modal.msgSuccess('支付成功')
|
|
|
this.openRecharge = false
|
|
|
+ this.openWelfareRecharge = false
|
|
|
this.searchUser()
|
|
|
- }
|
|
|
- })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
// 保存临时的 支付金额 用于取消支付提示信息
|
|
|
saveAlreadyPayAmount() {
|