| | |
| | | <el-row type="flex" align="middle" style="padding: 0 0 10px 0;"> |
| | | <el-col :span="5" style="text-align: center;">充值金额</el-col> |
| | | <el-col :span="10" style="text-align: center; line-height: 50px;"> |
| | | <el-input v-model="rechargeMoney" placeholder="0.1元起充"></el-input> |
| | | <el-input type="number" v-model="rechargeMoney" @change="changeRechargeMoney" placeholder="可充负数退款"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | <el-row style="line-height: 50px;" v-for="(item, index) in payMoneys"> |
| | | <el-col :span="6" style="text-align: right; padding-right: 10px; font-size: 12px;">{{item.value}}</el-col> |
| | | <el-col :span="8"><el-input v-model="item.money"></el-input></el-col> |
| | | <el-col :span="6" style="margin-left: 10px;" v-if="item.type == '储值卡'">{{item.isGift == 1 ? '赠送余额' : '余额' }}:<span class="arrears">¥ {{item.balance}}</span></el-col> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | data : { |
| | | cardInfo : "", |
| | | loginUser : "", |
| | | rechargeMoney : "", |
| | | rechargeMoney : 0, |
| | | payMethods: [{ |
| | | value: '现金支付', |
| | | img: '/images/pay/cash.png', |
| | |
| | | let _this = this; |
| | | this.cardInfo = /*[[${obj}]]*/ |
| | | |
| | | this.cardInfo.vipId = vipId; |
| | | //获取用户列表 |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | |
| | | }); |
| | | }, |
| | | methods : { |
| | | //修改充值金额同步修改业绩 |
| | | changeRechargeMoney(){ |
| | | let aMoeny=(this.rechargeMoney/this.achieveList.length).toFixed(2); |
| | | this.achieveList.forEach(item=>{ |
| | | item.achieveMoney=aMoeny; |
| | | }); |
| | | }, |
| | | submitRecharge() { |
| | | let _this = this; |
| | | |
| | | if (!_this.rechargeMoney) { |
| | | this.$message.warning("请输入充值金额"); |
| | | return; |
| | | } |
| | | |
| | | if (_this.rechargeMoney < 0.1) { |
| | | this.$message.warning("0.1元起充"); |
| | | return; |
| | | } |
| | | |
| | |
| | | this.$message.warning("请输入" + item.type + "的付款金额"); |
| | | return false; |
| | | } |
| | | flow.amount = item.money; |
| | | total += item.money; |
| | | flow.amount = parseFloat(item.money); |
| | | total += parseFloat(item.money); |
| | | flows.push(flow); |
| | | }) |
| | | if (total == _this.rechargeMoney) { |
| | | debugger |
| | | if (total != _this.rechargeMoney) { |
| | | this.$message.warning("付款金额应等于充值金额"); |
| | | return false; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | _this.cardInfo.bjMoney = _this.rechargeMoney; |
| | | let achaeveList = []; |
| | | _this.achieveList.forEach(achieve => { |
| | | let achieveNew = { |
| | | beaultId: achieve.saleId, |
| | | t1: achieve.achieveMoney, |
| | | t3: '现金业绩', |
| | | projPercentage: achieve.commission, |
| | | }; |
| | | achaeveList.push(achieveNew); |
| | | }) |
| | | _this.cardInfo.bjmoney = _this.rechargeMoney; |
| | | _this.cardInfo.achaeveList = achaeveList; |
| | | let url = basePath + "/admin/moneyCardUse/cz"; |
| | | |
| | | console.log(_this.cardInfo); |
| | | AjaxProxy.requst({ |
| | | app: _this, |
| | | data: _this.cardInfo, |
| | |
| | | } |
| | | |
| | | if (parent.app) { |
| | | parent.app.orderQuery(); |
| | | parent.app.vipInfoFn(); |
| | | } |
| | | |
| | | _this.closeFrame(); |
| | |
| | | return; |
| | | } |
| | | |
| | | if (rechargeMoney < 0.1) { |
| | | this.$message.warning("0.1元起充"); |
| | | return; |
| | | } |
| | | |
| | | if (item.type != '储值卡') { |
| | | this.$nextTick(function () { |
| | | if (item.isActive) { |
| | |
| | | for(var i = 0; i < payMoneys.length; i++) { |
| | | hasAmount += parseFloat(payMoneys[i].money); |
| | | } |
| | | if (_this.order.arrears - hasAmount > 0) { |
| | | Vue.set(item, 'money', _this.rechargeMoney - hasAmount); |
| | | } |
| | | Vue.set(item, 'money', _this.rechargeMoney - hasAmount); |
| | | _this.payMoneys.push(item); |
| | | } |
| | | }); |