|
@@ -98,6 +98,7 @@
|
|
|
type="text"
|
|
|
icon="el-icon-withdrawal"
|
|
|
@click="handleWithdrawal(scope.row)"
|
|
|
+ v-hasPermi="['user:wthdrawal:add']"
|
|
|
v-if="
|
|
|
scope.row.paiAcctype == '06' ||
|
|
|
scope.row.paiAcctype == '07' ||
|
|
@@ -403,7 +404,22 @@
|
|
|
maxlength="18"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="电子账户" prop="accno" size="large" style="display:none">
|
|
|
+ <el-input
|
|
|
+ v-model="form.accno"
|
|
|
+ clearable
|
|
|
+ style="width: 215px"
|
|
|
+ placeholder="请输入电子账户"
|
|
|
+ maxlength="18"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-button type="primary" plain @click="allMoney">全部提现</el-button>
|
|
|
+ <el-form-item prop="cade">
|
|
|
+ <el-input v-model="form.shortMessageCode" type="text" maxlength="" auto-complete="off" placeholder="请输入验证码">
|
|
|
+ <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
|
|
+ <el-button class="zap-code-button" slot="suffix" @click="sendMessage" :disabled="sendShortMessageBtn">{{codeBtnWord}}</el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-row type="flex" align="middle" class="zap-title"
|
|
|
><span class="zap-title__prefix"></span>可提现金额:{{KYAMT ? KYAMT : 0.00}}元</el-row
|
|
|
>
|
|
@@ -418,23 +434,19 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- listAcc,
|
|
|
- addAcc,
|
|
|
- updateAcc,
|
|
|
- delAcc,
|
|
|
- listBank,
|
|
|
- detailsAcc,
|
|
|
- listCard
|
|
|
-} from "@/api/system/accInf";
|
|
|
-import { balance,withdrawal } from "@/api/bank/bankInterface";
|
|
|
+import { listAcc,addAcc,updateAcc,delAcc,listBank,detailsAcc,listCard,wthdrawal,listChargeStatus,payMoney} from "@/api/system/accInf";
|
|
|
+import { balance } from "@/api/bank/bankInterface";
|
|
|
import { listElectronicsAcc } from "@/api/common/companyAcc";
|
|
|
+import {sendMessageForMoney} from "@/api/login";
|
|
|
import { release } from 'os';
|
|
|
import Cookies from 'js-cookie';
|
|
|
export default {
|
|
|
name: "accInf",
|
|
|
data() {
|
|
|
return {
|
|
|
+ //验证码
|
|
|
+ sendShortMessageBtn : false,
|
|
|
+ codeBtnWord: '获取验证码', // 获取验证码按钮文字
|
|
|
//可用余额
|
|
|
KYAMT: null,
|
|
|
//电子账户
|
|
@@ -495,7 +507,9 @@ export default {
|
|
|
ssName: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ shortMessageCode: null
|
|
|
+ },
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
paiBankName: [
|
|
@@ -555,6 +569,12 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ //查询对公账户
|
|
|
+ listCard(){
|
|
|
+ listCard().then((response) => {
|
|
|
+ this.cardList = response.data.records;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
@@ -590,9 +610,14 @@ export default {
|
|
|
type: 'warning'
|
|
|
});
|
|
|
loading.close();
|
|
|
+ }else if(self.form.shortMessageCode == null || self.form.shortMessageCode == ""){
|
|
|
+ self.msgError("请输入短信验证码!");
|
|
|
+ loading.close();
|
|
|
}else{
|
|
|
- var map = {'recvAccNo': self.form.paiAccno,'tranAmt':self.form.amount}
|
|
|
- withdrawal(map).then((response) =>{
|
|
|
+ console.log(self.form.shortMessageCode,'验证码')
|
|
|
+ //stAccNo:实体账户 dzAccNo:电子账户 tranAmt:提现金额 shortMessageCode:短信验证码
|
|
|
+ var map = {'stAccNo': self.form.paiAccno,'dzAccNo':self.form.accno,'tranAmt':self.form.amount,'shortMessageCode':self.form.shortMessageCode}
|
|
|
+ wthdrawal(map).then((response) =>{
|
|
|
debugger
|
|
|
if(response.data.status == "AAAAAAA"){
|
|
|
loading.close();
|
|
@@ -627,7 +652,8 @@ export default {
|
|
|
sfsRemark: null,
|
|
|
ssId: null,
|
|
|
ssName: null,
|
|
|
- amount: null
|
|
|
+ amount: null,
|
|
|
+ shortMessageCode: null
|
|
|
};
|
|
|
this.noneBtnImg = false;
|
|
|
this.enclosureList = [];
|
|
@@ -672,7 +698,6 @@ export default {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
detailsAcc().then((response) => {
|
|
|
- console.log(response);
|
|
|
this.$set(this.form, "paiAccnoName", response.data.company);
|
|
|
});
|
|
|
this.title = "添加对公账户";
|
|
@@ -697,7 +722,6 @@ export default {
|
|
|
this.reset();
|
|
|
const paiId = row.paiId || this.ids;
|
|
|
detailsAcc(paiId).then((response) => {
|
|
|
- console.log(response.data);
|
|
|
this.form = response.data.sccInf[0];
|
|
|
this.recharge = true;
|
|
|
this.title = "充值转账";
|
|
@@ -705,26 +729,88 @@ export default {
|
|
|
},
|
|
|
/** 提现按钮操作 */
|
|
|
handleWithdrawal(row) {
|
|
|
- this.reset();
|
|
|
- listCard().then((response) => {
|
|
|
- console.log(response)
|
|
|
- this.cardList = response.data.records;
|
|
|
- });
|
|
|
+ var self = this;
|
|
|
+ self.reset();
|
|
|
//查询本企业电子账户余额
|
|
|
listElectronicsAcc().then((response) =>{
|
|
|
if(response.data[0]){
|
|
|
- this.accno = response.data[0].paiAccno;
|
|
|
+ self.accno = response.data[0].paiAccno
|
|
|
+ self.$set(self.form, "accno", response.data[0].paiAccno);
|
|
|
balance(response.data[0].paiAccno).then((response) =>{
|
|
|
- this.KYAMT = response.data.list.row.KYAMT
|
|
|
+ self.KYAMT = response.data.kyAmt
|
|
|
})
|
|
|
}
|
|
|
+ }).then(() =>{
|
|
|
+ listChargeStatus('3115730025233104147').then((response) =>{
|
|
|
+ debugger
|
|
|
+ const list = response.data;
|
|
|
+ if(list.length > 0){
|
|
|
+ const newDatas = []
|
|
|
+ let confirmText = []
|
|
|
+ const h = self.$createElement
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ confirmText = [
|
|
|
+ `编号:${list[i].zfrNumber}`,`费用:${list[i].zciAmount}`
|
|
|
+ ]
|
|
|
+ for (const j in confirmText) {
|
|
|
+ newDatas.push(h('p', null, confirmText[j]))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.$confirm('提示', {
|
|
|
+ title: '请缴纳手续费',
|
|
|
+ message: h('div', null, newDatas),
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ center: true
|
|
|
+ })
|
|
|
+ .then(function(){
|
|
|
+ const loading = self.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ var map = {'accNo':'3115730025233104147'}
|
|
|
+ payMoney(map).then((response) =>{
|
|
|
+ debugger
|
|
|
+ const resultList = response.data;
|
|
|
+ if(resultList.length > 0){
|
|
|
+ self.msgError("缴费失败!");
|
|
|
+ loading.close();
|
|
|
+ }else{
|
|
|
+ loading.close();
|
|
|
+ self.$message({
|
|
|
+ message: '缴费成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ listCard().then((response) => {
|
|
|
+ self.cardList = response.data.records;
|
|
|
+ });
|
|
|
+ const paiId = row.paiId || self.ids;
|
|
|
+ detailsAcc(paiId).then((response) => {
|
|
|
+ self.form = response.data.sccInf[0];
|
|
|
+ self.withdrawal = true;
|
|
|
+ self.title = "提现";
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ listCard().then((response) => {
|
|
|
+ self.cardList = response.data.records;
|
|
|
+ });
|
|
|
+ const paiId = row.paiId || self.ids;
|
|
|
+ detailsAcc(paiId).then((response) => {
|
|
|
+ self.form = response.data.sccInf[0];
|
|
|
+ self.withdrawal = true;
|
|
|
+ self.title = "提现";
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- const paiId = row.paiId || this.ids;
|
|
|
- detailsAcc(paiId).then((response) => {
|
|
|
- this.form = response.data.sccInf[0];
|
|
|
- this.withdrawal = true;
|
|
|
- this.title = "提现";
|
|
|
- });
|
|
|
+
|
|
|
},
|
|
|
//交易明细按钮
|
|
|
handleDetail(row){
|
|
@@ -741,7 +827,6 @@ export default {
|
|
|
/** 新增提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
- console.log(this.form);
|
|
|
if (valid) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
@@ -755,6 +840,7 @@ export default {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
+ this.listCard();
|
|
|
})
|
|
|
.catch((response) => {
|
|
|
loading.close();
|
|
@@ -806,6 +892,60 @@ export default {
|
|
|
this.msgSuccess("删除成功");
|
|
|
});
|
|
|
},
|
|
|
+ sendMessage(){
|
|
|
+ this.$refs.form.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ // 调用获取短信验证码接口
|
|
|
+ sendMessageForMoney(this.form.phone, this.form.code, this.form.uuid).then(response => {
|
|
|
+ this.sendShortMessageBtn = true;
|
|
|
+ this.msgSuccess("发送成功!");
|
|
|
+ // 因为下面用到了定时器,需要保存this指向
|
|
|
+ let that = this
|
|
|
+ that.waitTime = 60;
|
|
|
+ this.codeBtnWord = `${this.waitTime}s 后重新获取`
|
|
|
+ let timer = setInterval(function(){
|
|
|
+ if(that.waitTime>1){
|
|
|
+ that.waitTime--
|
|
|
+ that.codeBtnWord = `${that.waitTime}s 后重新获取`
|
|
|
+ }else{
|
|
|
+ clearInterval(timer)
|
|
|
+ that.codeBtnWord = '获取验证码'
|
|
|
+ that.waitTime = 60
|
|
|
+ that.getCode();
|
|
|
+ that.sendShortMessageBtn = false;
|
|
|
+ }
|
|
|
+ },1000)
|
|
|
+
|
|
|
+ }).catch((response)=>{
|
|
|
+ this.getCode();
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
+<style rel="stylesheet/scss" lang="scss">
|
|
|
+// 验证码
|
|
|
+ .login-code {
|
|
|
+ height: 55px;
|
|
|
+ img {
|
|
|
+ cursor: pointer;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .login-code-img {
|
|
|
+ flex: 1;
|
|
|
+ height: 55px;
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rightulliimg{
|
|
|
+ width: 860px;
|
|
|
+
|
|
|
+ }
|
|
|
+ .divider_left{
|
|
|
+ margin-left: -40px;
|
|
|
+ }
|
|
|
+ </style>
|