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
5.6 KiB
1 line
5.6 KiB
9 months ago
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["ChargingStation/pages/placeOrder/index"],{"28cb":function(e,n,t){"use strict";(function(e,n){var a=t("4ea4");t("9773");a(t("66fd"));var o=a(t("ea2a"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},"3a7a":function(e,n,t){"use strict";t.r(n);var a=t("a4ff"),o=t.n(a);for(var i in a)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return a[e]}))}(i);n["default"]=o.a},"581e":function(e,n,t){},a4ff:function(e,n,t){"use strict";(function(e){var a=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("2303")),i=a(t("c781")),c=t("1eac"),l={components:{selectLicense:function(){t.e("ChargingStation/pages/placeOrder/components/selectLicense/selectLicense").then(function(){return resolve(t("0046"))}.bind(null,t)).catch(t.oe)},platItem:function(){t.e("ChargingStation/pages/placeOrder/components/accountItem/index").then(function(){return resolve(t("0a02"))}.bind(null,t)).catch(t.oe)}},data:function(){return{accountIndex:0,plateNum:"",accountList:[],isShow:{licenseDialog:!1},pageIndex:{plateNumberIndex:0},checkPage:{qrcode:{tacitly:"",WrongText:"参数qrcode错误"},connectorId:{tacitly:"",WrongText:"参数connectorId错误"},licensePlate:{tacitly:"",WrongText:"车牌号输入错误"},payMoneyPreFreeze:{tacitly:"",WrongText:"参数payMoneyPreFreeze错误"},payMoneyPreAvailable:{tacitly:"",WrongText:"充电金额不能为空"}},payMoneyPreAvailable:"",selectPriceOptionValue:"",priceOptions:[{label:"10元",value:10},{label:"30元",value:30},{label:"60元",value:60},{label:"80元",value:80},{label:"100元",value:100},{label:"120元",value:120}],pageData:null}},created:function(){this.getAccountList()},onLoad:function(e){console.log(e,"====="),this.getStationData(e)},filters:{price:function(e){var n=Number(e.stationPrice.businessElectricityFee)+Number(e.stationPrice.businessServiceFee);return n.toFixed(2)}},watch:{"isShow.licenseDialog":function(e){e?this.$refs.licenseDialog.open("bottom"):this.$refs.licenseDialog.close()},selectPriceOptionValue:function(e){this.payMoneyPreAvailable=e}},methods:{getAccountList:function(){var e=this;o.default.getAccountList().then((function(n){e.accountList=n.data}))},accountChange:function(){},getPlateNum:function(e){e.value&&(this.pageData["plateNumberList"].push(e.value),this.pageIndex.plateNumberIndex=this.pageData["plateNumberList"].length-1)},tipFn:function(){e.showModal({title:"支付阈值说明",showCancel:!1,content:"为避免金额预估不准导致电未充满,以及防止超充导致订单金额差异。该部分金额,将于订单结算后会根据实际系统结算,自动退回。",success:function(e){e.confirm?console.log("用户点击确定"):e.cancel&&console.log("用户点击取消")}})},licenseConfirm:function(e){this.pageIndex.plateNumberIndex=e,this.isShow.licenseDialog=!1},licenseChange:function(e){e.show||(this.isShow.licenseDialog=!1)},showSb:function(){this.showLicenseDialog=!0},priceOptionClick:function(e){this.selectPriceOptionValue=e.value},getStationData:function(n){var t=this;(n.type="qrCode")&&o.default[n.pointTo?n.pointTo:"scanCode"](Object.assign(n,{qrCode:decodeURIComponent(n.qrCode)})).then((function(n){2e4==n.code?t.pageData=new t.tool.Anticorrosive(n.data,c.indexPage):e.showModal({title:"提示",content:n.msg,showCancel:!1,success:function(n){e.navigateBack()}})}))},goPlay:function(){var n=this,t=JSON.parse(JSON.stringify(this.pageData));delete t.stationPrice,t=Object.assign(t,{payMoneyPreAvailable:this.payMoneyPreAvailable,licensePlate:t.plateNumberList[this.pageIndex.plateNumberIndex]});var a=this.tool.checkFn(t,[],this.checkPage);if(a.result){var o=this.accountList[this.accountIndex],c=o.companyId,l=o.accountCardCode;o.payMoneyPreAvailable,o.payMoneyPreFreeze;i.default.createOrder(Object.assign(t,{companyId:c,accountId:l})).then((function(a){setTimeout((function(){e.navigateTo({url:"/ChargingStation/pages/placeOrder/result/index?price=".concat(n.tool.getnum(Number(t.payMoneyPreAvailable)+Number(t.pa
|