From 4481c6973519ae025e9dcc1be7d4724c64a7bbfc Mon Sep 17 00:00:00 2001 From: huaxinzhu <15565133664@163.com> Date: Fri, 17 Sep 2021 11:48:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E4=BA=A7-=E6=8F=90=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/module/bankcard.js | 19 +++++ src/views/system/asset/wddetails.vue | 2 + src/views/system/asset/withdraw/index.vue | 99 ++++++++++------------ src/views/system/retreat/retreat/index.vue | 6 +- 4 files changed, 69 insertions(+), 57 deletions(-) diff --git a/src/api/module/bankcard.js b/src/api/module/bankcard.js index e073d47..2c68fff 100644 --- a/src/api/module/bankcard.js +++ b/src/api/module/bankcard.js @@ -169,3 +169,22 @@ export function addInvoiceData (data) { data: data }); } + +// 获å–验è¯ç +export function getCheckCodeData(data) { + return request({ + url: '/system/withdrawlog/getCheckCode', + method: 'post', + data: data + }) +} + +// æäº¤ æçŽ°ç”³è¯· +export function applyWithdraw(data) { + return request({ + url: '/system/withdrawlog/applyWithdraw', + method: 'post', + data: data + }) +} + diff --git a/src/views/system/asset/wddetails.vue b/src/views/system/asset/wddetails.vue index 8a6781c..5d25e8b 100644 --- a/src/views/system/asset/wddetails.vue +++ b/src/views/system/asset/wddetails.vue @@ -260,6 +260,8 @@ let backward4 = strBankcardId.substring(strBankcardId.length-4,strBankcardId.length) this.withdrawInfo.bank_name_all = this.withdrawInfo.bank_name + '\u00a0\u00a0' + Forward4 + '****' + backward4; } + // 补充å‘ç¥¨ä¿¡æ¯ æŒ‰é’® 是å¦å¯ä»¥ç‚¹å‡» + this.isSubmitInvoice = this.withdrawInfo.invoice_status == 1 ? true : false; } // 打款备注 if(res.data.action_logs && res.data.action_logs.content) { diff --git a/src/views/system/asset/withdraw/index.vue b/src/views/system/asset/withdraw/index.vue index 2fbcb6a..b1bdb89 100644 --- a/src/views/system/asset/withdraw/index.vue +++ b/src/views/system/asset/withdraw/index.vue @@ -23,29 +23,29 @@ <el-option v-for="item in bankList" :key="item.id" :label="item.bank_name" :value="item.id"></el-option> </el-select> <span class="withdraw-tip"> - 您还没有账户,<span>åŽ»æ·»åŠ >></span> + 您还没有账户,<span class="spe-span-a" @click="goToAddBank">åŽ»æ·»åŠ </span> </span> </el-form-item> <el-form-item label="æçް金é¢ï¼š"> <el-input v-model="withdrawalBalance" disabled placeholder="全部æçް金é¢" style="width:420px;"/> <span class="withdraw-tip"> - ä¸å…许手动输入,æçް金é¢å¿…é¡»ä¸ºå…¨éƒ¨çš„å¯æçŽ°ä½™é¢ï¼Œ - 手ç»è´¹å°†ä»Žæ‚¨çš„æçް金é¢ä¸æ‰£é™¤ï¼Œä»¥å®žé™…到账为准(开票以实际到账金é¢å¼€å…·ï¼‰ + æçް金é¢ä¸ºå…¨éƒ¨çš„å¯æçŽ°ä½™é¢ï¼Œæ‰‹ç»è´¹å°†ä»Žæ‚¨çš„æçް金é¢ä¸æ‰£é™¤ï¼Œä»¥å®žé™…到账为准(开票以实际到账金é¢å¼€å…·ï¼‰ </span> + <p class="withdraw-tip-spe">å½“å‰æçŽ°æ‰‹ç»è´¹ä¸ºï¼š{{ chargeCount }} å…ƒ</p> </el-form-item> <el-form-item label="支付密ç :" prop="pay_pass"> <el-input v-model="assetForm.pay_pass" type="password" placeholder="请输入æçް坆ç " style="width:420px;"/> <span class="withdraw-tip"> - 忘记支付密ç ï¼Ÿé‡æ–°è®¾å®š + 忘记支付密ç ?<span class="spe-span-a" @click="goToSetting">釿–°è®¾å®š</span> </span> </el-form-item> <el-form-item label="çŸä¿¡éªŒè¯ç :" prop="code" class="spe-code-con-item"> <el-input v-model="assetForm.code" placeholder="验è¯ç " style="width:420px;"> <template slot="append"> - <span v-show="show" @click="getCheckCode">获å–验è¯ç </span> + <span v-show="show" @click="getCheckCode" style="padding:10px 0;">获å–验è¯ç </span> <span v-show="!show" class="count">{{count}} s</span> </template> </el-input> @@ -61,8 +61,7 @@ </div> </template> <script> - // import {getSellerInfo, getBankcardList, addWithdrawlog, getCheckCode} from '@/api/module/withdrawlog' - import { getMyAssetListData } from '@/api/module/bankcard' + import { getMyAssetListData, getCheckCodeData,applyWithdraw } from '@/api/module/bankcard' export default { name: "withdrawlog", @@ -74,6 +73,7 @@ count: '', timer: null, + chargeCount: 0, // 手ç»è´¹ seller_id: 0, currentBalance: 0, withdrawalBalance: 0, @@ -108,6 +108,7 @@ this.withdrawalBalance = Number(res.data.account_info.new_balance) / 100; this.withdrawalProgress = Number(res.data.account_info.new_frozen_money) / 100; this.currentBalance = this.add(this.withdrawalBalance,this.withdrawalProgress); + this.chargeCount = Number(res.data.account_info.service_fee) / 100; } // è´¦æˆ·ç®¡ç† if(res.data.bank_list) { @@ -164,10 +165,14 @@ getCheckCode() { let numRegExp = /^[0-9]+(.[0-9]{2})?$/; - if(this.assetForm.bank_id === '') { + if(this.assetForm.bank_id == '') { this.$refs.assetForm.validateField("bank_id"); return; } + if(this.assetForm.pay_pass ==='') { + this.$refs.assetForm.validateField("pay_pass"); + return; + } if (this.seller_id <= 0) { this.msgError("商户信æ¯é”™è¯¯"); @@ -177,12 +182,21 @@ // 倒计时效果 this.getCode() - getCheckCode({seller_id: this.seller_id}).then(response => { + getCheckCodeData({seller_id: this.seller_id}).then(response => { if (response.code == 0) { this.msgSuccess(response.msg); } }); + }, + /** 去 资产 首页 æ·»åŠ è´¦æˆ· */ + goToAddBank() { + this.$router.push({ path: "/system/asset/myAsset" }); + }, + + /** 去 设置 密ç */ + goToSetting() { + this.$router.push({ path: "/system/settings/setpsd" }); }, // 暂时 æ— ç”¨ @@ -219,51 +233,15 @@ /** æäº¤æŒ‰é’® */ submitForm() { - this.$refs["form"].validate(valid => { + this.$refs["assetForm"].validate(valid => { if (valid) { - let numberMoney = Number(this.form.amount); - let numberCash = Number(this.drawableCash); - let numberFee = Number(this.newFee); - - // æçŽ°é‡‘é¢ + 手ç»è´¹ <= å¯æçŽ°é‡‘é¢ - // add minus - // æçŽ°é‡‘é¢ + 手ç»è´¹ - let feeAddAmount = this.add(numberFee,numberMoney); - let isabled = Number(this.minus( numberCash, feeAddAmount) ); - - this.form.seller_id = this.seller_id; - // 冿¬¡æ ¡éªŒ æçŽ°ä¿¡æ¯ - if(!this.form.seller_id) { - this.$message({type: 'error',message: 'å•†æˆ·ä¿¡æ¯æœ‰è¯¯ï¼'}); - return; - } - if(numberMoney < 100 ) { - this.$message({type: 'error',message: 'æçް金é¢ä¸èƒ½å°äºŽ100'}); - return; - } - if( (numberMoney > numberCash) ) { - this.$message({type: 'error',message: 'æçް金é¢ä¸è¶³ï¼'}); - return; - } - - if( isabled < 0 ) { - this.$message({type: 'error',message: '本次æ“作æçްåŽï¼Œã€å½“å‰ä½™é¢ã€‘ä¸è¶³ä»¥æ”¯ä»˜æœ¬æ¬¡æçŽ°çš„æ‰‹ç»è´¹ç”¨ï¼Œè¯·æ‚¨é‡æ–°è¾“å…¥æçް金é¢'}); - return; - } - - this.form.amount = Number(this.form.amount); - - // console.log(this.newFee); - // console.log(feeAddAmount,isabled); - // - // return; - addWithdrawlog(this.form).then(response => { - if (response.code === 1) { - this.msgSuccess(response.message); - // this.getList(); - } - else { - this.$message({type: 'error',message: response.message}); + applyWithdraw(this.assetForm).then(res => { + if (res.code == 1) { + this.getMyAssetList() + this.resetAssetForm(); + this.$message({type: 'success',message: 'æçްæˆåŠŸ'}); + } else { + this.$message({type: 'error',message: res.message ? res.message : 'æçŽ°å¤±è´¥'}); } }); } @@ -323,10 +301,25 @@ box-shadow: 0 -8px 9px 1px rgba(51, 51, 51, 0.06); } + .withdraw-tip-spe { + font-size:12px; + color: #999; + margin: 0; + } + .withdraw-tip { font-size:12px; color: #999; margin: 5px; line-height: 26px; } + + .spe-span-a { + color: #409EFF; + cursor: pointer; + } + + .spe-span-a:hover { + /*color: #46a6ff;*/ + } </style> diff --git a/src/views/system/retreat/retreat/index.vue b/src/views/system/retreat/retreat/index.vue index 6d8aca8..8e5eacb 100644 --- a/src/views/system/retreat/retreat/index.vue +++ b/src/views/system/retreat/retreat/index.vue @@ -46,7 +46,7 @@ </el-select> </el-form-item> - <el-form-item label="订å•å·" prop="refund_sn"> + <el-form-item label="å”®åŽè®¢å•å·" prop="refund_sn"> <el-input v-model="queryParams.refund_sn" placeholder="请输入订å•å·" @@ -70,7 +70,7 @@ <el-table class="after-sale-table" :data="afterSaleList" :height="afterSaleHeight"> <el-table-column label="商å“ID" align="center" width="150" prop="goodsId"></el-table-column> <el-table-column label="商å“åç§°" align="center" width="180" prop="title"></el-table-column> - <el-table-column label="订å•å·" align="center" width="240" prop="refund_sn"></el-table-column> + <el-table-column label="å”®åŽè®¢å•å·" align="center" width="240" prop="refund_sn"></el-table-column> <el-table-column label="退æ¢è´§ç±»åž‹" align="center" width="180"> <template slot-scope="scope"> <span v-if="scope.row.refund_type == 1">仅退款</span> @@ -244,8 +244,6 @@ refund_sn: '', reason: '' } - // console.log('queryParams:',this.queryParams); - //console.log('ä¼ å‘åŽå°çš„傿•°ï¼š',params); if( this.queryParams.applyTime.length === 2) { params.apply_start_time = new Date(this.queryParams.applyTime[0]).getTime() / 1000 -- 2.18.1