You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
7.2 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["oilAccount/page/companyRecharge/add"],{"0865":function(n,t,a){"use strict";(function(n){a("84da");o(a("66fd"));var t=o(a("21e5"));function o(n){return n&&n.__esModule?n:{default:n}}wx.__webpack_require_UNI_MP_PLUGIN__=a,n(t.default)}).call(this,a("543d")["createPage"])},"08dc":function(n,t,a){"use strict";a.r(t);var o=a("9dba"),e=a.n(o);for(var i in o)"default"!==i&&function(n){a.d(t,n,(function(){return o[n]}))}(i);t["default"]=e.a},"0fc2":function(n,t,a){"use strict";a.d(t,"b",(function(){return e})),a.d(t,"c",(function(){return i})),a.d(t,"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"))},uniEasyinput:function(){return a.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(a.bind(null,"fb2e"))},uSelect:function(){return a.e("uview-ui/components/u-select/u-select").then(a.bind(null,"e4ec"))}},e=function(){var n=this,t=n.$createElement,a=(n._self._c,n.postData.paymentCompanyIds[0]?n.companyAccountData.filter((function(t){return t.value==n.postData.paymentCompanyIds[0]})):null),o=n.postData.paymentCompanyIds[1]?n.companyAccountBankData.filter((function(t){return t.value==n.postData.paymentCompanyIds[1]})):null;n._isMounted||(n.e0=function(t){n.isShow.picker=!0}),n.$mp.data=Object.assign({},{$root:{g0:a,g1:o}})},i=[]},"21e5":function(n,t,a){"use strict";a.r(t);var o=a("0fc2"),e=a("08dc");for(var i in e)"default"!==i&&function(n){a.d(t,n,(function(){return e[n]}))}(i);a("b95b"),a("b6d9");var c,s=a("f0c5"),u=Object(s["a"])(e["default"],o["b"],o["c"],!1,null,"2542dd86",null,!1,o["a"],c);t["default"]=u.exports},2590:function(n,t,a){},"4e24":function(n,t,a){},"9dba":function(n,t,a){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(a("3415")),e=i(a("7979"));i(a("0c78"));function i(n){return n&&n.__esModule?n:{default:n}}var c=function(){a.e("oilAccount/components/picker").then(function(){return resolve(a("d180"))}.bind(null,a)).catch(a.oe)},s={components:{cpicker:c},data:function(){return{barIndex:1,countdown:0,companyAccountData:[],companyAccountBankData:[],oilCompanyData:[],oilCompanyBankData:[],isShow:{picker:!1,companyAccount:!1,companyAccountBank:!1,oilCompanyBank:!1},timer:null,disabled:!1,postData:{companyName:"",offlineTransactionProof:"",bankCardName:"",bankCardNo:"",bankDeposit:"",bankName:"",companyId:"",createSource:"OMS-MINIAPP",interBankCode:null,operationCode:"",paymentCompanyIds:[],reverseRemark:"",transactionAmount:"",transactionType:"RECHARGE"}}},created:function(){this.init()},onLoad:function(){},onUnload:function(){!this.timer&&clearInterval(this.timer)},methods:{seleBarFn:function(n){this.barIndex=n},localSeach:function(n){var t=this;e.default.getLikeBySiteComNameNew({companyName:n}).then((function(n){t.$refs.cpicker.upDateList(n.data)})),console.log("seach")},countdownFn:function(n){var t=this;this.countdown=n,this.timer=setInterval((function(){t.countdown?t.countdown-=1:(clearInterval(t.timer),t.timer=null,t.operationCode="")}),1e3)},getCode:function(){var n=this;e.default.getRechargeCode({type:3}).then((function(t){2e4==t.code&&(n.postData.operationCode=t.data.code),n.countdownFn(60)}))},isShowFn:function(t){switch(t){case"companyAccount":this.isShow[t]=!this.isShow[t];break;case"companyAccountBank":if(0===this.postData.paymentCompanyIds.length)return void n.showToast({title:"请先选择企业打款账户",icon:"none"});this.isShow[t]=!this.isShow[t];break;case"oilCompanyBank":if(!this.postData.companyName||!this.postData.companyId)return void n.showToast({title:"请先选择油站公司",icon:"none"});this.isShow[t]=!this.isShow[t];break}},clickfn:function(t){if("object"!==typeof t)return this.postData.offlineTransactionProof=t,void n.showToast({title:"上传成功"});o.default.chooseImage(this.clickfn)},oilCompanyBankConfirm:function(n){var t,a=this.oilCompanyBankData.filter((function(t){return t.value==n[0].value}));a.length&&(t=a[0],this.postData.bankCardName=t.bankCardName,this.postData.bankCardNo=t.bankCardNo,this.postData.bankDeposit=t.bankDeposit,this.postData.bankName=t.bankName,this.postData.interBankCode=t.interBankCode),console.log(a,"11111")},companyAccountBankConfirm:function(n){var t=this.companyAccountBankData.filter((function(t){return t.value==n[0].value}));t.length&&this.postData.paymentCompanyIds.push(t[0].value),console.log(this.postData.paymentCompanyIds,this.companyAccountBankData,"companyAccountBankConfirm")},companyAccountConfirm:function(n){this.companyAccountBankData=[],this.postData.paymentCompanyIds=[];var t=this.companyAccountData.filter((function(t){return t.value==n[0].value}));t.length&&(this.companyAccountBankData=t[0].children)&&this.postData.paymentCompanyIds.push(t[0].value),console.log(this.postData.paymentCompanyIds,this.companyAccountBankData,"companyAccountConfirm")},chargeChange:function(n){var t=this;n&&(this.oilCompanyBankData=[],this.clearFn(this.postData,["bankCardName","bankCardNo","bankDeposit","bankName","interBankCode"]),this.postData.companyId=n["id"],this.postData.companyName=n["companyName"],e.default.getBySiteCompanyId(n.id).then((function(n){2e4==n.code&&(t.oilCompanyBankData=n.data),t.oilCompanyBankData.length&&t.oilCompanyBankData.forEach((function(n){n["value"]=n.bankCardNo,n["label"]=n.bankCardName+"(".concat(n.bankCardNo,")")}))})))},clearFn:function(n,t){n&&t&&t.forEach((function(t){n[t]=""}))},init:function(){this.getAccounts()},getAccounts:function(){var n=this;e.default.getCascaderList().then((function(t){2e4==t.code&&(n.companyAccountData=t.data)}))},confirm:function(n){console.log("confirm",n)},inputFn:function(t){console.log(t),-1!=this.postData[t].indexOf(".")&&this.postData[t].split(".")[1].length>2&&(n.showToast({title:"最多保留小数点后两位",icon:"none"}),this.$nextTick((function(){this.postData[t]=Number(this.postData[t]).toFixed(2)})))},postFn:function(){var t=null,a={paymentCompanyIds:{tacitly:"",minLength:2,WrongText:"请完善企业打款信息"},companyName:{tacitly:"",WrongText:"请完善油站公司信息"},companyId:{tacitly:"",WrongText:"请完善油站公司信息"},bankCardName:{tacitly:"",WrongText:"请完善油站公司信息"},transactionAmount:{tacitly:"",WrongText:"交易金额不能为空"},reverseRemark:{tacitly:"",WrongText:"交易摘要不能为空"},operationCode:{tacitly:"",WrongText:"操作码不能为空"}};1==this.barIndex&&delete a.operationCode,t=o.default.checkFn(this.postData,[],a),t.result?this.saveFn():n.showToast({title:t.WrongText,icon:"none"})},saveFn:function(){var t=JSON.parse(JSON.stringify(this.postData));1==this.barIndex&&delete t.operationCode,e.default.save(t).then((function(t){2e4==t.code&&n.showToast({title:"操作成功",icon:"none"})&&setTimeout((function(){n.navigateBack()}),500)}))},open:function(){this.show=!this.show},change:function(){this.aboutEnterprise.shareCompanyQuota=this.switchOpen?1:0,console.log(this.switchOpen)},radioChange:function(n){console.log(n)}}};t.default=s}).call(this,a("543d")["default"])},b6d9:function(n,t,a){"use strict";var o=a("2590"),e=a.n(o);e.a},b95b:function(n,t,a){"use strict";var o=a("4e24"),e=a.n(o);e.a}},[["0865","common/runtime","common/vendor"]]]);