This commit is contained in:
2025-03-10 20:08:15 +08:00
parent c4cf4106c2
commit 7f02dffebe
2 changed files with 34 additions and 28 deletions
@@ -90,7 +90,7 @@ public class MemberPaymentMineController {
@RequiresPermissions("member.payment.mine") @RequiresPermissions("member.payment.mine")
public Object pcOrderPay(Integer paymentMoney) { public Object pcOrderPay(Integer paymentMoney) {
WxPayNeedParamVo paramVo = new WxPayNeedParamVo(); WxPayNeedParamVo paramVo = new WxPayNeedParamVo();
paramVo.setDescription("会费缴纳支付"); paramVo.setDescription(ShiroUtil.getPlatformUsername() + "会费缴纳支付");
paramVo.setAttach(""); paramVo.setAttach("");
paramVo.setAmount(new Amount().setTotal(paymentMoney)); paramVo.setAmount(new Amount().setTotal(paymentMoney));
return wxPayCommonService.nativePay(paramVo); return wxPayCommonService.nativePay(paramVo);
@@ -100,8 +100,8 @@ public class MemberPaymentMineController {
@At @At
@RequiresPermissions("member.payment.mine") @RequiresPermissions("member.payment.mine")
public Object getIsPay(String paymentInfoId) { public Object getIsPay(String paymentInfoId) {
MemberPaymentInfo info = memberPaymentService.dao().fetch(MemberPaymentInfo.class, int count = memberPaymentService.dao().count(MemberPaymentInfo.class,
Cnd.where("id", "=", paymentInfoId).and("isPayment", "=", 1)); Cnd.where("id", "=", paymentInfoId).and("isPayment", "=", 1));
return Result.success(info); return Result.success().addData(count);
} }
} }
@@ -79,9 +79,6 @@ layout("/layouts/platform.html"){
<el-button :disabled="row.isPayment" @click="openPay(row)" <el-button :disabled="row.isPayment" @click="openPay(row)"
size="mini" type="primary">缴费 size="mini" type="primary">缴费
</el-button> </el-button>
<el-button @click="openPay(row)"
size="mini" type="primary">缴费
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -167,28 +164,33 @@ layout("/layouts/platform.html"){
</div> </div>
</div> </div>
<div v-if="payActive===3"> <div v-if="payActive===3">
<div v-loading="submitLoading">
<div <div style="margin-top: 35px;background-color: RGB(245, 254, 243);">
style="margin-top: 35px;background-color: RGB(245, 254, 243);height: 100px;display: flex;align-items: center;justify-content: center"> <div
<div> style="display: flex;align-items: center;height: 100px;margin-left: 10%">
<el-image <div>
src="/assets/mobile/svg/memberPay/pcPaySuccess.svg"></el-image> <el-image
src="/assets/mobile/svg/memberPay/pcPaySuccess.svg"></el-image>
</div>
<div style="font-weight: bold;font-size: 25px;margin-left: 10px;">
支付成功!
</div>
</div>
</div> </div>
<div style="font-weight: bold;font-size: 25px">支付成功!</div> <el-form-item label="商品订单">
{{formData.tradingOrderNo}}
</el-form-item>
<el-form-item label="支付金额">
<div style="color: #2cd000;font-size: 25px">¥ {{formData.paymentMoney}}
</div>
</el-form-item>
</div> </div>
<el-form-item label="商品订单">
{{viewInfo.tradingOrderNo}}
</el-form-item>
<el-form-item label="支付金额">
<div style="color: #2cd000;font-size: 25px">¥ {{viewInfo.paymentMoney}}</div>
</el-form-item>
</div> </div>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<span> <span>
<el-button @click="clickClose">关 闭</el-button> <el-button @click="clickClose">关 闭</el-button>
<el-button @click="next" v-if="payActive===0" <el-button @click="next" v-if="payActive===0&&formData.paymentMoney>0"
type="primary">下一步</el-button> type="primary">下一步</el-button>
</span> </span>
</div> </div>
@@ -249,14 +251,15 @@ layout("/layouts/platform.html"){
const data = JSON.parse(resp.data) const data = JSON.parse(resp.data)
this.$nextTick(() => { this.$nextTick(() => {
$("#qrcode").html("") $("#qrcode").html("")
$("#qrcode").qrcode({ //设置css $("#qrcode").qrcode({
render: "canvas", //二维码的生成方式 render: "canvas",
width: $("#qrcode").width(), //生成二维码的宽度 width: $("#qrcode").width(),
height: $("#qrcode").width(), //生成二维码的高度 height: $("#qrcode").width(),
text: data.code_url, text: data.code_url,
correctLevel: 3 //容错级别,默认为2,最高为3,为了让用户扫码最快,容错级别应当设为最低 correctLevel: 3
}) })
}) })
this.formData.tradingOrderNo = data.tradingOrderNo
await this.getIsPay() await this.getIsPay()
} }
this.qrcodeLoading = false this.qrcodeLoading = false
@@ -267,12 +270,14 @@ layout("/layouts/platform.html"){
const resp = await $.get(loc() + "/getIsPay", { paymentInfoId: this.formData.paymentInfoId }) const resp = await $.get(loc() + "/getIsPay", { paymentInfoId: this.formData.paymentInfoId })
if (resp.code === 0) { if (resp.code === 0) {
if (resp.data) { if (resp.data) {
this.payInfo = resp.data
this.payActive = 3 this.payActive = 3
this.submitLoading = true
clearInterval(this.intervalTimer) clearInterval(this.intervalTimer)
setTimeout(() => {
this.submitLoading = false
}, 1500)
} }
} }
}, 4000) }, 4000)
}, },
changePayModeValue() { changePayModeValue() {
@@ -282,6 +287,7 @@ layout("/layouts/platform.html"){
this.$set(this.formData, "paymentMoney", parseFloat((paymentMoney * 0.005 * this.formData.paymentMonth).toFixed(2))) this.$set(this.formData, "paymentMoney", parseFloat((paymentMoney * 0.005 * this.formData.paymentMonth).toFixed(2)))
}, },
openPay(row) { openPay(row) {
this.payActive = 0
const payStandards = JSON.parse(row.payStandards) const payStandards = JSON.parse(row.payStandards)
const payStandard = payStandards.find(p => p.payPersonnel === row.payPersonnel && p.personType === row.personType) const payStandard = payStandards.find(p => p.payPersonnel === row.payPersonnel && p.personType === row.personType)
this.$set(this.formData, "paymentMonth", row.paymentMonth) this.$set(this.formData, "paymentMonth", row.paymentMonth)