(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["oilAccount/page/accountRecharge/add"],{"11d6":function(t,n,a){},"42bc":function(t,n,a){"use strict";a.r(n);var o=a("f503"),e=a("7fc6");for(var c in e)"default"!==c&&function(t){a.d(n,t,(function(){return e[t]}))}(c);a("c3b1"),a("750e");var i,u=a("f0c5"),s=Object(u["a"])(e["default"],o["b"],o["c"],!1,null,"24ac6196",null,!1,o["a"],i);n["default"]=s.exports},"750e":function(t,n,a){"use strict";var o=a("11d6"),e=a.n(o);e.a},"7fc6":function(t,n,a){"use strict";a.r(n);var o=a("98af"),e=a.n(o);for(var c in o)"default"!==c&&function(t){a.d(n,t,(function(){return o[t]}))}(c);n["default"]=e.a},"98af":function(t,n,a){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=c(a("3415")),e=c(a("7979"));c(a("0c78"));function c(t){return t&&t.__esModule?t:{default:t}}var i=function(){a.e("oilAccount/components/picker").then(function(){return resolve(a("d180"))}.bind(null,a)).catch(a.oe)},u={components:{cpicker:i},data:function(){return{barIndex:1,companyAccountData:[],companyAccountBankData:[],oilCompanyData:[],oilCompanyBankData:[],isShow:{picker:!1,companyAccount:!1,companyAccountBank:!1,oilCompanyBank:!1},disabled:!1,postData:{accountName:"",companyName:"",receivingCompanyId:"",reverseRemark:"",siteChannelAccountId:"",transactionAmount:"",transactionState:"0",transactionType:"",createSource:"OMS-MINIAPP",balance:"",totalRechargeAmount:""}}},created:function(){this.init()},onLoad:function(){},methods:{localSeach:function(t){var n=this.companyAccountData.filter((function(n){return-1!==n.label.indexOf(t)}));n.length&&this.$refs.cpicker.upDateList(n)},siteChannelAccountIdFn:function(t){},seleBarFn:function(t){this.barIndex=t},isShowFn:function(t){this.isShow[t]=!this.isShow[t]},clickfn:function(t){},companyAccountConfirm:function(n){var a=this;this.clearFn(this.postData,["accountName","siteChannelAccountId","receivingCompanyId","companyName","theRemainingAmount","totalRechargeAmount"]);var o=this.companyAccountData.filter((function(t){return t.id==n.id}));o.length&&1==o.length?(this.postData.totalRechargeAmount=o[0].totalRechargeAmount,e.default.getBySiteCompanyId(o[0].siteCompanyInfoId).then((function(c){c.data.length?(a.postData["receivingCompanyId"]=c.data[0]["siteCompanyId"],a.postData["accountName"]=n.label,a.postData["siteChannelAccountId"]=o[0]["value"],e.default.getLikeBySiteComNameLimitNew({id:o[0].siteCompanyInfoId}).then((function(t){a.postData.companyName=t.data[0]["companyName"],a.postData.balance=t.data[0]["balance"]}))):t.showToast({title:"未绑定油站公司",icon:"none"})}))):t.showToast({title:"数据错误",icon:"none"})},clearFn:function(t,n){t&&n&&n.forEach((function(n){t[n]=""}))},init:function(){this.getAccounts()},getAccounts:function(){var t=this;e.default.getChannelAccountMapsNew().then((function(n){2e4==n.code&&(t.companyAccountData=n.data,t.companyAccountData.forEach((function(t){t["label"]=t.value,t.value=t.id})))}))},confirm:function(t){console.log("confirm",t)},inputFn:function(n){console.log(n),-1!=this.postData[n].indexOf(".")&&this.postData[n].split(".")[1].length>2&&(t.showToast({title:"最多保留小数点后两位",icon:"none"}),this.$nextTick((function(){this.postData[n]=Number(this.postData[n]).toFixed(2)})))},postFn:function(){var n=this,a=null,e={receivingCompanyId:{tacitly:"",WrongText:"请完善油站公司信息"},siteChannelAccountId:{tacitly:"",WrongText:"请完善油站账户信息"},transactionAmount:{tacitly:"",WrongText:"交易金额不能为空"}};a=o.default.checkFn(this.postData,[],e),a.result?1==this.barIndex?Number(this.postData.transactionAmount)>Number(this.postData.balance)?t.showModal({title:"提示",content:"余额不足,是否依然提交?",success:function(t){t.confirm?n.saveFn():t.cancel&&console.log("用户点击取消")}}):this.saveFn():Number(this.postData.transactionAmount)>Number(this.postData.totalRechargeAmount)?t.showModal({title:"提示",content:"余额不足,是否依然提交?",success:function(t){t.confirm?n.saveFn():t.cancel&&console.log("用户点击取消")}}):this.saveFn():t.showToast({title:a.WrongText,icon:"none"})},saveFn:function(){this.postData["transactionType"]=1==this.barIndex?"DISPATCH":"CALLBACK",e.default.saveNew(this.postData).then((function(n){2e4==n.code&&t.showToast({title:"操作成功",icon:"none"})&&setTimeout((function(){t.navigateBack()}),500)}))},open:function(){this.show=!this.show},change:function(){this.aboutEnterprise.shareCompanyQuota=this.switchOpen?1:0,console.log(this.switchOpen)},radioChange:function(t){console.log(t)}}};n.default=u}).call(this,a("543d")["default"])},c3b1:function(t,n,a){"use strict";var o=a("ec0a"),e=a.n(o);e.a},c437:function(t,n,a){"use strict";(function(t){a("84da");o(a("66fd"));var n=o(a("42bc"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=a,t(n.default)}).call(this,a("543d")["createPage"])},ec0a:function(t,n,a){},f503:function(t,n,a){"use strict";a.d(n,"b",(function(){return e})),a.d(n,"c",(function(){return c})),a.d(n,"a",(function(){return o}));var o={uniList:function(){return a.e("uni_modules/uni-list/components/uni-list/uni-list").then(a.bind(null,"0500"))},uniListItem:function(){return a.e("uni_modules/uni-list/components/uni-list-item/uni-list-item").then(a.bind(null,"6d48"))}},e=function(){var t=this,n=t.$createElement;t._self._c},c=[]}},[["c437","common/runtime","common/vendor"]]]);