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 line
4.7 KiB

2 years ago
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["oilDistribution/distribute/distribute"],{"05a8":function(t,n,e){"use strict";(function(t){e("84da");o(e("66fd"));var n=o(e("8d6a"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=e,t(n.default)}).call(this,e("543d")["createPage"])},"2d45":function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return o}));var o={uniIcons:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(e.bind(null,"65b9"))}},i=function(){var t=this,n=t.$createElement;t._self._c;t._isMounted||(t.e0=function(n){2==t.barIndex?t.postData.disAmount=t.receiveData.balance:t.postData.disAmount=t.sendData.balance})},a=[]},3596:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(e("2d56"));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(){e.e("components/customPopup").then(function(){return resolve(e("34d2"))}.bind(null,e)).catch(e.oe)},s={components:{popup:a},data:function(){return{postData:{disCompanyId:"",disTagType:"",disType:"",customerId:"",companyId:"",disAmount:""},iShow:{seting:!1},sendData:null,receiveData:null,seleindex:1,barIndex:1,transition:{zIndex:"1",transform:"scale(0.9)",backgroundColor:"#66AFFF"}}},onLoad:function(){var n=this;t.$on("driverfn",(function(t){console.log(t,"司机参数更新"),n.receiveData=t,n.postData.customerId=t.id,n.postData.companyId="",n.postData.disTagType=0==t.companyCustomerNature?"OUTSIDE":"ESELF_SUPPORT"})),t.$on("company",(function(t){console.log(t.type,t),n.receiveData=null,"send"==t.type?(n.sendData=t,n.postData.disCompanyId=t.id):"receive"==t.type&&(n.receiveData=t,n.postData.companyId=t.id,n.postData.customerId="",n.postData.disTagType="SUBCOMPANY"),console.log(t,"公司参数更新")}))},methods:{inputFn:function(n){-1!=this.postData.disAmount.indexOf(".")&&this.postData.disAmount.split(".")[1].length>2&&(t.showToast({title:"最多保留小数点后两位",icon:"none"}),this.$nextTick((function(){this.postData.disAmount=Number(this.postData.disAmount).toFixed(2),console.log(this.postData.disAmount)})))},confirmFn:function(){var n=this;if(2==this.barIndex){if(0==Number(this.receiveData.balance))return void t.showToast({title:"圈回对象账户不能为零",icon:"none"});if(Number(this.postData.disAmount)>Number(this.receiveData.balance))return void t.showToast({title:"输入金额不能大于圈回对象总余额",icon:"none"})}else{if(Number(this.postData.disAmount)>Number(this.sendData.balance))return void t.showToast({title:"输入金额不能大于总余额",icon:"none"});if(0==Number(this.sendData.balance))return void t.showToast({title:"转账方金额不能为零",icon:"none"})}if(0!=Number(this.postData.disAmount)){var e=this;this.postData.disType=1==this.barIndex?1:-1,console.log(this.postData),o.default.oilDistributions(e.postData).then((function(e){2e4===e.code&&(t.showToast({title:"操作成功",icon:"none"}),n.iShow.seting=!1,setTimeout((function(){t.redirectTo({url:"../index/index"})}),500))}))}else t.showToast({title:"操作金额不能为零",icon:"none"})},closeFn:function(){this.iShow.seting=!1,console.log("取消")},postFn:function(){null!=this.sendData&&null!=this.receiveData&&(""!=this.postData.disAmount&&0!=this.postData.disAmount?this.iShow.seting=!0:t.showToast({title:"金额不能为零",icon:"none"}))},jump:function(n){switch(n){case 1:t.navigateTo({url:"../newSeleCompany/newSeleCompany?jsData="+JSON.stringify({type:"send",data:""})});break;case 2:if(null==this.sendData&&1==this.seleindex)return void t.showToast({title:"请先选择企业",icon:"none"});1==this.seleindex?t.navigateTo({url:"../newSeleDirver/newSeleDirver?jsData="+JSON.stringify(this.sendData),fail:function(t){console.log(t)}}):t.navigateTo({url:"../newSeleCompany/newSeleCompany?jsData="+JSON.stringify({type:"receive",data:this.sendData}),fail:function(t){console.log(t)}});break}},seleBarFn:function(t){this.barI