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

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["oilDistribution/distribute/distribute"],{"0330":function(t,n,e){"use strict";var o=e("5bb0"),i=e.n(o);i.a},"0463":function(t,n,e){"use strict";e.r(n);var o=e("6553"),i=e.n(o);for(var a in o)"default"!==a&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=i.a},"548c":function(t,n,e){"use strict";e.r(n);var o=e("dd6d"),i=e("0463");for(var a in i)"default"!==a&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e("0330");var s,u=e("f0c5"),c=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],s);n["default"]=c.exports},"5bb0":function(t,n,e){},6553:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(e("07c8"));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(){e.e("components/customPopup").then(function(){return resolve(e("5979"))}.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.barIndex=t},seleFn:function(t){this.seleindex=t,this.postData.disAmount="",this.receiveData=null}}};n.default=s}).call(this,e("543d")["default"])},"774e":function(t,n,e){"use strict";(function(t){e("6e43");o(e("66fd"));var n=o(e("548c"));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"])},dd6d: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,"3b32"))}},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=[]}},[["774e","common/runtime","common/vendor"]]]);