|
@@ -117,6 +117,13 @@
|
|
|
"
|
|
|
>充值</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="handleDetail(scope.row)"
|
|
|
+ >交易明细</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -396,9 +403,9 @@
|
|
|
maxlength="18"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-button type="primary" plain>全部提现</el-button>
|
|
|
+ <el-button type="primary" plain @click="allMoney">全部提现</el-button>
|
|
|
<el-row type="flex" align="middle" class="zap-title"
|
|
|
- ><span class="zap-title__prefix"></span>可提现金额:999,999,999</el-row
|
|
|
+ ><span class="zap-title__prefix"></span>可提现金额:{{KYAMT ? KYAMT : 0.00}}元</el-row
|
|
|
>
|
|
|
</el-form>
|
|
|
<el-row style="height: 109px" type="flex" align="middle" justify="center">
|
|
@@ -420,11 +427,18 @@ import {
|
|
|
detailsAcc,
|
|
|
listCard
|
|
|
} from "@/api/system/accInf";
|
|
|
-
|
|
|
+import { balance,withdrawal } from "@/api/bank/bankInterface";
|
|
|
+import { listElectronicsAcc } from "@/api/common/companyAcc";
|
|
|
+import { release } from 'os';
|
|
|
+import Cookies from 'js-cookie';
|
|
|
export default {
|
|
|
name: "accInf",
|
|
|
data() {
|
|
|
return {
|
|
|
+ //可用余额
|
|
|
+ KYAMT: null,
|
|
|
+ //电子账户
|
|
|
+ accno: null,
|
|
|
// id隐藏
|
|
|
isShow: false,
|
|
|
// 遮罩层
|
|
@@ -444,6 +458,8 @@ export default {
|
|
|
total: 0,
|
|
|
// 账户表格数据
|
|
|
accList: [],
|
|
|
+ //账户卡号数据
|
|
|
+ cardList: [],
|
|
|
//姓名
|
|
|
nameList: [],
|
|
|
bankList: [],
|
|
@@ -503,6 +519,13 @@ export default {
|
|
|
trigger: ["change", "blur"],
|
|
|
},
|
|
|
],
|
|
|
+ amount: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "提现金额不能为空",
|
|
|
+ trigger: ["change", "blur"],
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -546,10 +569,45 @@ export default {
|
|
|
this.recharge = false;
|
|
|
this.reset();
|
|
|
},
|
|
|
- // 提现取消按钮
|
|
|
+ //全部提现
|
|
|
+ allMoney(){
|
|
|
+ this.$set(this.form, "amount", this.KYAMT);
|
|
|
+ },
|
|
|
+ // 提现按钮
|
|
|
cancelWithdrawal() {
|
|
|
- this.withdrawal = false;
|
|
|
- this.reset();
|
|
|
+ var self = this;
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const loading = self.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ if(eval(self.form.amount) > eval(self.KYAMT)){
|
|
|
+ self.$message({
|
|
|
+ message: '提现金额不得大于可提现金额!',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ loading.close();
|
|
|
+ }else{
|
|
|
+ var map = {'recvAccNo': self.form.paiAccno,'tranAmt':self.form.amount}
|
|
|
+ withdrawal(map).then((response) =>{
|
|
|
+ debugger
|
|
|
+ if(response.data.status == "AAAAAAA"){
|
|
|
+ loading.close();
|
|
|
+ self.msgSuccess("提现成功");
|
|
|
+ this.withdrawal = false;
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //this.withdrawal = false;
|
|
|
+ //this.reset();
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
@@ -569,11 +627,14 @@ export default {
|
|
|
sfsRemark: null,
|
|
|
ssId: null,
|
|
|
ssName: null,
|
|
|
+ amount: null
|
|
|
};
|
|
|
this.noneBtnImg = false;
|
|
|
this.enclosureList = [];
|
|
|
this.sfzList = [];
|
|
|
this.resetForm("form");
|
|
|
+ this.accno = null,
|
|
|
+ this.KYAMT = null
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
@@ -649,6 +710,15 @@ export default {
|
|
|
console.log(response)
|
|
|
this.cardList = response.data.records;
|
|
|
});
|
|
|
+ //查询本企业电子账户余额
|
|
|
+ listElectronicsAcc().then((response) =>{
|
|
|
+ if(response.data[0]){
|
|
|
+ this.accno = response.data[0].paiAccno;
|
|
|
+ balance(response.data[0].paiAccno).then((response) =>{
|
|
|
+ this.KYAMT = response.data.list.row.KYAMT
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
const paiId = row.paiId || this.ids;
|
|
|
detailsAcc(paiId).then((response) => {
|
|
|
this.form = response.data.sccInf[0];
|
|
@@ -656,6 +726,18 @@ export default {
|
|
|
this.title = "提现";
|
|
|
});
|
|
|
},
|
|
|
+ //交易明细按钮
|
|
|
+ handleDetail(row){
|
|
|
+ Cookies.set("/accInf/accInfDetail/")
|
|
|
+ this.$router.push({ path: "/accInf/accInfDetail/"});
|
|
|
+ },
|
|
|
+ // accNo(item) {
|
|
|
+ // if(item.paiAccno){
|
|
|
+ // balance(item.paiAccno).then((response) =>{
|
|
|
+ // this.KYAMT = response.data.list.row.KYAMT
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
/** 新增提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate((valid) => {
|