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

2 years ago
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["priceAdjustment/page/addPrice/addPrice"],{"1f8e":function(t,e,i){"use strict";i.r(e);var o=i("954d"),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e["default"]=n.a},"5fd5":function(t,e,i){},"7ad1":function(t,e,i){"use strict";var o=i("5fd5"),n=i.n(o);n.a},"954d":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(i("69b8")),n=(r(i("e041")),r(i("7968")));function r(t){return t&&t.__esModule?t:{default:t}}var s={data:function(){return{params:{year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!1},shows:{img:!1,footer:!1},show:!1,disabled:!1,start:"",aboutEnterprise:{siteName:"",siteId:"",oilProductCode:"",effectiveMode:0,oloIndex:"",subEntryTime:"",applyStatus:0,marketPrice:"",sitePrice:"",oldMarketPrice:"",oldSitePrice:"",siteOilsPriceId:"",createSource:"OMS-MINIAPP"},isShow:{oliType:!1},radiolist1:[{name:"立即",value:0},{name:"预约",value:1}]}},onLoad:function(){var e=this;t.$on("serviceStation",(function(t){console.log("%c 油站参数更新↓","font-size:50px;color:red"),e.aboutEnterprise=Object.assign(e.aboutEnterprise,t),e.aboutEnterprise.siteId=e.aboutEnterprise.id,e.clearFn(),console.log(t)}));var i=new Date;i.setMinutes(i.getMinutes()+35),this.start="".concat(i.getFullYear(),"-").concat(i.getMonth()+1,"-").concat(i.getDate()," ").concat(i.getHours(),":").concat(i.getMinutes()),console.log(this.start,"---")},methods:{clearFn:function(){this.aboutEnterprise.oldMarketPrice="",this.aboutEnterprise.oloIndex="",this.aboutEnterprise.oilProductCode="",this.aboutEnterprise.oldSitePrice="",this.aboutEnterprise.siteOilsPriceId="",this.aboutEnterprise.marketPrice="",this.aboutEnterprise.sitePrice=""},datetimeChange:function(t){console.log(t,"*-*-*")},olioss:function(t,e){this.aboutEnterprise.oilProductCode=t.oilProductCode,this.aboutEnterprise.oloIndex=e,this.aboutEnterprise.oldMarketPrice=JSON.parse(JSON.stringify(this.aboutEnterprise.oilSiteOilsPrices[this.aboutEnterprise.oloIndex].marketPrice)),this.aboutEnterprise.oldSitePrice=JSON.parse(JSON.stringify(this.aboutEnterprise.oilSiteOilsPrices[this.aboutEnterprise.oloIndex].sitePrice)),this.aboutEnterprise=Object.assign(this.aboutEnterprise,this.aboutEnterprise.oilSiteOilsPrices[this.aboutEnterprise.oloIndex]),this.aboutEnterprise.siteOilsPriceId=this.aboutEnterprise.id},closeFn:function(){this.aboutEnterprise.oilProductCode="",this.isShow.oliType=!1},confirmFn:function(){this.isShow.oliType=!1},seleoli:function(){this.aboutEnterprise.oilSiteOilsPrices&&0!=this.aboutEnterprise.oilSiteOilsPrices.length?this.isShow.oliType=!0:t.showToast({title:"请选择则正确油站",icon:"none"})},dateConfirm:function(t){this.aboutEnterprise.subEntryTime="".concat(t.year,"-").concat(t.month,"-").concat(t.day," ").concat(t.hour,":").concat(t.minute,":00"),console.log(t)},inputFn:function(e){console.log(this.aboutEnterprise[e]),-1!=this.aboutEnterprise[e].indexOf(".")&&this.aboutEnterprise[e].split(".")[1].length>2&&(t.showToast({title:"最多保留小数点后两位",icon:"none"}),this.$nextTick((function(){this.aboutEnterprise[e]=Number(this.aboutEnterprise[e]).toFixed(2)})))},postFn:function(){var e={siteName:{tacitly:"",WrongText:"请选择油站"},oilProductCode:{tacitly:"",WrongText:"请选择油号"},marketPrice:{tacitly:"",WrongText:"发改委价格不能为空"},sitePrice:{tacitly:"",WrongText:"油站价格不能为空"}},i=o.default.checkFn(this.aboutEnterprise,[],e);i.result?this.aboutEnterprise.oilSiteOilsPrices[this.aboutEnterprise.oloIndex].marketPrice!=this.aboutEnterprise.marketPrice||this.aboutEnterprise.oilSiteOilsPrices[this.aboutEnterprise.oloIndex].sitePrice!=this.aboutEnterprise.sitePrice?(this.aboutEnterprise.createSource="OMS-MINIAPP",n.default.save(this.aboutEnterprise).then((function(e){2e4===e.code&&(setTimeout((function(){t.navigateBack()}),500),console.log(e))}))):t.showToast({title:"请变动价格后提交",icon:"none"}):t.showToast({title:i.WrongText,icon:"none"})},jump:function(e){t.naviga