2 lines
6.2 KiB
JavaScript
2 lines
6.2 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a0ffaa32"],{"2d25":function(t,a,e){"use strict";e.d(a,"c",(function(){return o})),e.d(a,"d",(function(){return c})),e.d(a,"b",(function(){return r}));var n=e("b775");function o(t){return new Promise((a,e)=>{Object(n["a"])({url:"/accountBank.queryAccountBank",method:"get",params:t}).then(t=>{const e=t.data;a(e)}).catch(t=>{e(t)})})}function c(t){return new Promise((a,e)=>{Object(n["a"])({url:"/accountWithdrawalApply.saveAccountWithdrawalApply",method:"post",data:t}).then(t=>{const e=t.data;a(e)}).catch(t=>{e(t)})})}function r(t){return new Promise((a,e)=>{Object(n["a"])({url:"/accountWithdrawalApply/listAccountWithdrawalApply",method:"get",params:t}).then(t=>{const e=t.data;a(e)}).catch(t=>{e(t)})})}},"5cf5":function(t,a,e){},9403:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t._self._c;return a("div",[a("el-card",{staticClass:"ibox"},[a("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("账户")])]),a("div",{},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.shopAccountManageInfo.shopAccounts,border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"acctId",label:"账户编号",align:"center"}}),a("el-table-column",{attrs:{prop:"acctName",label:"账户名称",align:"center"}}),a("el-table-column",{attrs:{prop:"acctTypeName",label:"账户类型",align:"center"}}),a("el-table-column",{attrs:{prop:"amount",label:"账户金额",align:"center"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间",align:"center"}}),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return["2003"===e.row.acctType&&e.row.amount>0?a("el-button",{attrs:{size:"mini"},on:{click:function(a){return t._openAddAccountWithdrawalApplyModal(e.row)}}},[t._v(" 提现 ")]):t._e()]}}])})],1),a("el-pagination",{attrs:{"current-page":t.pagination.currentPage,"page-sizes":[10,20,30,50],"page-size":t.pagination.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.shopAccountManageInfo.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)]),a("add-account-withdrawal-apply",{ref:"addAccountWithdrawalApply"})],1)},o=[],c=e("b775");function r(t){return new Promise((a,e)=>{Object(c["a"])({url:"/account/queryAccount",method:"get",params:t}).then(t=>{const e=t.data;a(e)}).catch(t=>{e(t)})})}var s=function(){var t=this,a=t._self._c;return a("el-dialog",{attrs:{title:"账户提现",visible:t.dialogVisible,width:"70%"},on:{"update:visible":function(a){t.dialogVisible=a},close:t.clearForm}},[a("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px","label-position":"left"}},[a("el-form-item",{attrs:{label:"提现金额",prop:"amount",rules:[{required:!0,message:"提现金额不能为空",trigger:"blur"},{pattern:/^\d+(\.\d{1,2})?$/,message:"金额格式不正确",trigger:"blur"}]}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入提现金额"},model:{value:t.form.amount,callback:function(a){t.$set(t.form,"amount",a)},expression:"form.amount"}})],1),a("el-form-item",{attrs:{label:"开户行",prop:"bankId",rules:[{required:!0,message:"请选择开户行",trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择开户行"},model:{value:t.form.bankId,callback:function(a){t.$set(t.form,"bankId",a)},expression:"form.bankId"}},t._l(t.accountBanks,(function(t){return a("el-option",{key:t.bankId,attrs:{label:t.bankName,value:t.bankId}})})),1)],1),a("el-form-item",{attrs:{label:"申请说明",prop:"context",rules:[{required:!0,message:"申请说明不能为空",trigger:"blur"},{max:500,message:"长度不能超过500个字符",trigger:"blur"}]}},[a("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",placeholder:"请输入申请说明"},model:{value:t.form.context,callback:function(a){t.$set(t.form,"context",a)},expression:"form.context"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(a){t.dialogVisible=!1}}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.saveAccountWithdrawalApplyInfo}},[t._v("确 定")])],1)],1)},l=[],i=e("2d25"),u={name:"AddAccountWithdrawalApply",data(){return{dialogVisible:!1,form:{acctId:"",amount:"",context:"",accamount:"",objId:"",acctObjId:"",bankId:""},accountBanks:[]}},methods:{open(t){this.form={...this.form,acctId:t.acctId,accamount:t.amount,acctObjId:t.objId},this.dialogVisible=!0,this._listAddAccountBanks()},async _listAddAccountBanks(){try{const t={page:1,row:50,shopId:this.form.objId},a=await Object(i["c"])(t);this.accountBanks=a.data}catch(t){console.error("获取开户行列表失败:",t)}},async saveAccountWithdrawalApplyInfo(){this.$refs.form.validate(async t=>{if(t)if(parseFloat(this.form.amount)>parseFloat(this.form.accamount))this.$message.error("提现失败!账户余额不足。");else try{const t=await Object(i["d"])(this.form);0===t.code?(this.$message.success(t.msg),this.dialogVisible=!1,this.$emit("refresh")):this.$message.error(t.msg)}catch(a){console.error("保存提现申请失败:",a)}})},clearForm(){this.$refs.form.resetFields(),this.form={acctId:"",amount:"",context:"",accamount:"",objId:"",acctObjId:"",bankId:""}}}},d=u,p=e("2877"),h=Object(p["a"])(d,s,l,!1,null,null,null),m=h.exports,f={name:"ShopAccountManage",components:{AddAccountWithdrawalApply:m},data(){return{shopAccountManageInfo:{shopAccounts:[],total:0,conditions:{shopId:""}},pagination:{currentPage:1,pageSize:10}}},created(){this._listshopAccounts()},methods:{async _listshopAccounts(){try{const t={...this.shopAccountManageInfo.conditions,page:this.pagination.currentPage,row:this.pagination.pageSize},a=await r(t);this.shopAccountManageInfo.shopAccounts=a.data,this.shopAccountManageInfo.total=a.total}catch(t){console.error("获取账户列表失败:",t)}},handleSizeChange(t){this.pagination.pageSize=t,this._listshopAccounts()},handleCurrentChange(t){this.pagination.currentPage=t,this._listshopAccounts()},_openAddAccountWithdrawalApplyModal(t){this.$refs.addAccountWithdrawalApply.open(t)}}},g=f,b=(e("f39a"),Object(p["a"])(g,n,o,!1,null,"63784b23",null));a["default"]=b.exports},f39a:function(t,a,e){"use strict";e("5cf5")}}]);
|
|
//# sourceMappingURL=chunk-a0ffaa32.805f1405.js.map
|