PageSourceSearch

https://gazprom.kg/assets/AttachmentModal-dPYFEfyM.js

js gazprom.kg collected 2026-10-07 02:59:59 UTC 7,492 bytes, 1 lines download raw bytes

1import{T as f,B as I,J as V,U as b,L as C,K as B,_ as w,t as x,M as N,c as m,o as a,u as l,x as h,b as i,v as r,d,G as k,w as p,N as X,e as M}from"./index-ae80RWzP.js";import{_ as F}from"./BaseInput-BByyJOvX.js";import{a as T}from"./AccountsCarousel-BRaDEX46.js";import U from"./attachment-OLPl9id1.js";import _ from"./ErrorModal-CGHy5hkG.js";import{_ as q}from"./instruction1-DKi0zkeF.js";import"./question-DJwRJGH1.js";import"./carousel-DphbfNlr.js";import"./edit-BN5QpqYw.js";const J={props:{account:String,lastReading:Number,lastReadingDate:String},directives:{maska:B},components:{BaseButton:C,BaseInput:F,AttachmentIcon:U},data(){return{facility:{},data:{},balance:0,readings:"",unmaskedValue:"",step:"readings",errorMsg:"",userProfile:{},userAccount:"",loading:!1,reading:"",readingDate:"",formErrors:{userAccount:"",readings:""}}},computed:{filteredFacilities(){var e,t;return((t=(e=this.userProfile)==null?void 0:e.facilities)==null?void 0:t.filter(n=>n.account))||[]}},methods:{...f(b,["open","close"]),...f(V,["fetchUserProfile"]),...f(I,["setPaymentInfo"]),changeData(e){var t,n,c;this.userAccount=e.account,this.reading=((n=(t=this.userProfile)==null?void 0:t.facilities[e.index].reading)==null?void 0:n.toString())??"",this.readingDate=((c=this.userProfile)==null?void 0:c.facilities[e.index].readingDate)??""},formatDate:e=>e?new Date(e).toLocaleDateString("ru-RU",{year:"numeric",month:"long",day:"numeric"}):"",clearError(e){this.formErrors[e]=""},limitInput(e,t){this[e].toString().length>t&&(this[e]=this[e].toString().slice(0,t))},validateFields(){let e=!0;return this.account||(this.userAccount?this.formErrors.userAccount="":(this.formErrors.userAccount="Лицевой счет не может быть пустым",e=!1)),!this.readings||isNaN(Number(this.readings))?(this.formErrors.readings="Текущие показания должны быть числом",e=!1):Number(this.readings)<=0?(this.formErrors.readings="Текущие показания должны быть больше нуля",e=!1):this.formErrors.readings="",e},closeModal(){var e;this.data&&this.setPaymentInfo(parseInt(this.userAccount),this.data.payAmount),this.userProfile&&((e=this.userProfile.facilities)!=null&&e.find(t=>t.account===this.userAccount))||this.account?this.$router.push({name:"PaymentPage",query:{account:this.userAccount?this.userAccount:this.account}}):this.$router.push({name:"PaymentPage"}),this.close()},async sendReadings(){if(this.validateFields()){this.loading=!0;try{await this.$axiosApi.post("/facility/readings",{account:this.account?this.account:this.userAccount,reading:parseInt(this.readings)}).then(({data:e})=>{e&&(this.data=e,this.step="success")})}catch(e){if(console.log(e),e.response){const{status:t,data:n}=e.response;t===409?(console.log("Показание не может быть меньше показания за прошлый месяц"),this.open(_,{message:n.message,hasRecalcBtn:!0})):this.open(_,{message:n.message})}else console.error("Ошибка без ответа сервера:",e),this.open(_,{message:"Произошла ошибка. Пожалуйста, попробуйте позже."})}this.loading=!1}}},async beforeMount(){var t;if(this.account){this.userAccount=this.account;return}const e=localStorage.getItem("user");if(e&&(this.userProfile=JSON.parse(e),(t=this.userProfile)!=null&&t.facilities.length)){const n=this.userProfile.facilities.find(c=>c.account);n&&(this.userAccount=n.account,this.reading=n.reading.toString(),this.readingDate=n.readingDate)}}},L="/assets/instruction2-w7qf1uF4.jpg",G={class:"attachment-wrapper"},K={key:0,class:"readings-header"},O={class:"readings-title"},W={key:1,class:"readings"},z={class:"readings-form"},H={class:"error-attach"},Q={class:"error-attach"},Y={key:2},Z={class:"success"},j={class:"success-title"},$={class:"consumption"},ee={class:"name"},te={class:"total"},se={class:"name"},ne={class:"tariff"},ie={class:"name"};function ue(e,t,n,c,s,u){var E,D,v;const R=x("AttachmentIcon"),S=T,g=F,P=X,A=C,y=N("maska");return a(),m("div",G,[s.step==="readings"?(a(),m("div",K,[h(R),i("div",O,r(e.$t("modals.sendReadings.title")),1)])):l("",!0),s.step==="readings"?(a(),m("div",W,[i("div",z,[u.filteredFacilities.length>0&&!n.account?(a(),d(S,{key:0,items:u.filteredFacilities,showIcon:!1,onChangeFacility:u.changeData,style:{"align-self":"normal !important",width:"100%"}},null,8,["items","onChangeFacility"])):l("",!0),(!u.filteredFacilities.length||!s.userProfile)&&!n.account?k((a(),d(g,{key:1,modelValue:s.userAccount,"onUpdate:modelValue":t[0]||(t[0]=o=>s.userAccount=o),label:e.$t("modals.sendReadings.inputs.account"),placeholder:"XXXXXXXXX",inputType:"text",tooltip:!0,tooltipText:e.$t("modals.sendReadings.inputs.accountTooltip"),error:!!s.formErrors.userAccount,onClearError:t[1]||(t[1]=o=>u.clearError("userAccount")),onInput:t[2]||(t[2]=o=>u.limitInput("userAccount",9))},{"image-content":p(()=>t[7]||(t[7]=[i("img",{src:q,alt:"instruction"},null,-1)])),_:1},8,["modelValue","label","tooltipText","error"])),[[y,"#########","unmaskedValue",{unmasked:!0}]]):l("",!0),i("span",H,r(s.formErrors.userAccount),1),s.userProfile&&u.filteredFacilities.length||n.lastReading?(a(),d(g,{key:2,modelValue:s.reading,"onUpdate:modelValue":t[3]||(t[3]=o=>s.reading=o),placeholder:n.lastReading?n.lastReading.toString():s.reading,isDisabled:!0,date:n.lastReadingDate?u.formatDate(n.lastReadingDate):u.formatDate(s.readingDate),label:e.$t("modals.sendReadings.inputs.lastReadings")},null,8,["modelValue","placeholder","date","label"])):l("",!0),k((a(),d(g,{modelValue:s.readings,"onUpdate:modelValue":t[4]||(t[4]=o=>s.readings=o),label:"Текущие показания",placeholder:"Текущие показания",inputType:"text",tooltip:!0,tooltipText:"Введите текущее показание счётчика, например: <b style=' color: #FC4E3C;'>5460</b>. Передать нужно только черные цифры.",error:!!s.formErrors.readings,onClearError:t[5]||
1(t[5]=o=>u.clearError("readings")),onInput:t[6]||(t[6]=o=>u.limitInput("readings",7))},{"image-content":p(()=>t[8]||(t[8]=[i("img",{src:L,alt:"instruction"},null,-1)])),_:1},8,["modelValue","error"])),[[y,"#########","unmaskedValue",{unmasked:!0}]]),i("span",Q,r(s.formErrors.readings),1),h(A,{onClick:u.sendReadings,text:s.loading?"":"Отправить показания",bgColor:"#1852E0",style:{"margin-top":"30px !important","align-self":"stretch"}},{btnContent:p(()=>[s.loading?(a(),d(P,{key:0,loaderWidth:"10px",color:"white",style:{width:"15px !important"}})):l("",!0)]),_:1},8,["onClick","text"])])])):s.step==="success"?(a(),m("div",Y,[i("div",Z,[i("h3",j,r(e.$t("modals.successfullySentReadings.title")),1),i("div",null,[i("div",$,[i("span",ee,r(e.$t("modals.successfullySentReadings.inputs.consumption")),1),i("span",null,[M(r((E=s.data)==null?void 0:E.consumption)+" м",1),t[9]||(t[9]=i("sup",null,"3",-1))])]),i("div",te,[i("span",se,r(e.$t("modals.successfullySentReadings.inputs.payAmount")),1),i("span",null,r((D=s.data)==null?void 0:D.payAmount)+" сом",1)]),i("div",ne,[i("span",ie,r(e.$t("modals.successfullySentReadings.inputs.tariff")),1),i("span",null,r((v=s.data)==null?void 0:v.tariff),1)])]),h(A,{onClick:u.closeModal,text:e.$t("modals.successfullySentReadings.submit"),bgColor:"#1852E0",style:{"align-self":"stretch"}},null,8,["onClick","text"])])])):l("",!0)])}const he=w(J,[["render",ue],["__scopeId","data-v-4ac37a39"]]);export{he as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.