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([["driverManagement/accountDetails/accountDetails"],{"653b":function(t,e,n){"use strict";(function(t){n("84da");o(n("66fd"));var e=o(n("9b5a"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},"8b77":function(t,e,n){"use strict";n.r(e);var o=n("a2dc"),i=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},"9b5a":function(t,e,n){"use strict";n.r(e);var o=n("d43c"),i=n("8b77");for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("e060");var c,u=n("f0c5"),s=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],c);e["default"]=s.exports},a2dc:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(n("b1e4")),i=a(n("3415"));function a(t){return t&&t.__esModule?t:{default:t}}var c=function(){n.e("components/topbar").then(function(){return resolve(n("6fd4"))}.bind(null,n)).catch(n.oe)},u=function(){n.e("components/customPopup").then(function(){return resolve(n("34d2"))}.bind(null,n)).catch(n.oe)},s={components:{topBar:c,popup:u},data:function(){return{butten:{colse:"取消",confirm:"确定",coloseBg:"",coloseColor:"",confirmBg:"",confirmColor:""},oliCarSeting:{orderAmountToplimit:"",dayAmountToplimit:"",dayVolumeToplimit:"",orderVolumeToplimit:"",id:""},baseUrl:this.networkResource.baseUrl,iShow:{seting:!1},openText:{one:"启用",off:"禁用"},switchOpen:"",wqswitchOpen:"",styles:{},jsData:null,listData:[],gr:null,getData:{pageSize:10,currentPage:1,params:{accountId:""},sorted:{}}}},onReachBottom:function(){this.getData.currentPage+=1,this.jsData?this.getList():this.grlist(),console.log("触底了")},onShow:function(){console.log(o.default,this.networkResource.baseUrl),null!==this.jsData&&this.getList(),null!==this.gr&&this.grlist()},onLoad:function(t){var e=this;if(t.jsData){this.jsData=JSON.parse(t.jsData),e.getData.params.accountId=e.jsData.id,this.switchOpen=0!=this.jsData.shareCompanyQuota,this.wqswitchOpen=0!=this.jsData.accountState;var n=this.jsData;e.oliCarSeting.orderAmountToplimit=n.orderAmountToplimit,e.oliCarSeting.dayAmountToplimit=n.dayAmountToplimit,e.oliCarSeting.dayVolumeToplimit=n.dayVolumeToplimit,e.oliCarSeting.orderVolumeToplimit=n.orderVolumeToplimit,e.oliCarSeting.id=n.id,console.log(this.jsData,this.switchOpen,JSON.parse(t.jsData),"*-*-")}else t.gr&&(this.gr=JSON.parse(t.gr))},methods:{grlist:function(){var t=this,e={pageSize:this.getData.pageSize,currentPage:this.getData.currentPage,params:{customerId:this.gr.customerId,receiptResult:"1"}};o.default.oilCustomerAccountRecord(e).then((function(e){e.data.list.forEach((function(t){i.default.numberSetting(t,["currentRechargeBalance","currentBalance","currentChargeRechargeBalance","currentConsumeRebateAmount","currentTotalRebateBalance","currentFrozenBalance"],2)})),1===t.getData.currentPage?(t.listData=e.data.list,console.log(t.listData)):t.listData=t.listData.concat(e.data.list)}))},wqchange:function(e){var n=this;t.showModal({title:"提示",content:e?"确定要启用吗":"确定要禁用吗",success:function(i){i.confirm?(o.default.disableEnable({id:n.jsData.id}).then((function(e){console.log(e),2e4==e.code?(t.showToast({title:"修改成功",icon:"none"}),setTimeout((function(){t.$emit("updateDriver")}),500)):n.wqswitchOpen=0!=n.jsData.accountState})),console.log("用户点击确定")):i.cancel&&(n.wqswitchOpen=!e,console.log("用户点击取消"))}})},recoveryFn:function(){var t=this,e=this.jsData;t.oliCarSeting.orderAmountToplimit=e.orderAmountToplimit,t.oliCarSeting.dayAmountToplimit=e.dayAmountToplimit,t.oliCarSeting.dayVolumeToplimit=e.dayVolumeToplimit,t.oliCarSeting.orderVolumeToplimit=e.orderVolumeToplimit,t.oliCarSeting.id=e.id},inputChange:function(){this.butten.colse="恢复",this.butten.coloseBg="#78797F",this.butten.coloseColor="#FFFFFF"},setUpFn:function(){this.iShow.seting=!0},confirmFn:function(){var e=this;o.default.upOilCard(this.oliCarSeting).then((function(n){2e4!==n.code?e.recoveryFn():(t.showToast({title:"修改成功",icon:"none"}),e.butten.colse="取消",e.butten.coloseBg="",e.butten.coloseColor="",e.iShow.seting=!1)})),console.log("确定回调",this.jsData,this.oliCarSeting)},closesFn:function(){this.$refs.popup.close()},closeFn:function(){"恢复"!=this.butten.colse?this.iShow.seting=!1:(this.recoveryFn(),this.butten.colse="取消",this.butten.coloseBg="",this.butten.coloseColor="")},jbFn:function(){var e=this,n={accountId:this.getData.params.accountId};o.default.unbindOilCard(n).then((function(n){2e4===n.code&&(e.$refs.popup.close(),setTimeout((function(){t.showToast({title:"操作成功",icon:"none"})}),500),setTimeout((function(){t.navigateBack()}),1e3))}))},lower:function(){console.log("lower")},change:function(e){var n=this;t.showModal({title:"提示",content:e?"确定要启用吗":"确定要禁用吗",success:function(i){if(i.confirm){console.log("用户点击确定");var a={accountId:n.getData.params.accountId,shareCompanyQuota:"",updateSource:"OMS-MINIAPP"};a.shareCompanyQuota=n.switchOpen?1:0,o.default.updateCompanyQuota(a).then((function(o){2e4===o.code?(t.showToast({title:o.msg,icon:"none"}),setTimeout((function(){n.getList()}),500)):n.switchOpen=!e}))}else i.cancel&&(n.switchOpen=!e,console.log("用户点击取消"))}}),console.log(this.switchOpen,"--")},classification:function(t){switch(t){case"SEPARATION_OIL":return"分油";case"TURN":return"圈回";case"REFUELLING":return"加油";case"REFUND":return"退款";case"RECHARGE":return"充值";case"RECHARGE_REFUND":return"充值退款";case"REFUELLING_REFUND":return"加油退款";case"RECHARGE_REBETE":return"充值返利";case"RECHARGE_REBETE__REFUND":return"充值返利退款"}},openPopup:function(){this.$refs.popup.open("center")},open:function(){},close:function(){this.iShow=!1},getList:function(){var t=this;o.default.getByPage(this.getData).then((function(e){e.data.list.forEach((function(t){i.default.numberSetting(t,["currentRechargeBalance","currentBalance","currentChargeRechargeBalance","currentConsumeRebateAmount","currentTotalRebateBalance","currentFrozenBalance"],2)})),1===t.getData.currentPage?(t.listData=e.data.list,console.log(t.listData)):t.listData=t.listData.concat(e.data.list)}))}}};e.default=s}).call(this,n("543d")["default"])},cad2:function(t,e,n){},d43c:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var o={uSwitch:function(){return n.e("uview-ui/components/u-switch/u-switch").then(n.bind(null,"6316"))},uCollapse:function(){return n.e("uview-ui/components/u-collapse/u-collapse").then(n.bind(null,"0db6"))},uCollapseItem:function(){return n.e("uview-ui/components/u-collapse-item/u-collapse-item").then(n.bind(null,"36f4"))},uniPopup:function(){return n.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(n.bind(null,"66ae"))}},i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.listData,(function(e,n){var o=t.__get_orig(e),i=t.classification(e.billType);return{$orig:o,m0:i}})));t.$mp.data=Object.assign({},{$root:{l0:n}})},a=[]},e060:function(t,e,n){"use strict";var o=n("cad2"),i=n.n(o);i.a}},[["653b","common/runtime","common/vendor"]]]);