[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: 8939.js
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8939],{2114:(e,t,a)=>{a.d(t,{A:()=>n});var l=a(6314),s=a.n(l)()(function(e){return e[1]});s.push([e.id,"@media print{.hidden-print[data-v-22a37759]{display:none!important}}",""]);const n=s},5316:(e,t,a)=>{a.d(t,{A:()=>n});class l{constructor(e){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,e),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let e="";this.settings.url&&!this.settings.asyncUrl&&(e=this.settings.url);let t=this;if(this.settings.asyncUrl)return void t.settings.asyncUrl(function(e){let a=t.getPrintWindow(e);t.settings.preview?t.previewIfrmaeLoad():t.print(a)},t.settings.vue);let a=this.getPrintWindow(e);this.settings.url||this.write(a.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(a)}addEvent(e,t,a){e.addEventListener?e.addEventListener(t,a,!1):e.attachEvent?e.attachEvent("on"+t,a):e["on"+t]=a}previewIfrmaeLoad(){let e=document.getElementById("vue-pirnt-nb-previewBox");if(e){let t=this,a=e.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(a,"load",function(){t.previewBoxShow(),t.removeCanvasImg(),t.settings.previewOpenCallback()}),this.addEvent(e.querySelector(".previewBodyUtilPrintBtn"),"click",function(){t.settings.beforeOpenCallback(),t.settings.openCallback(),a.contentWindow.print(),t.settings.closeCallback()})}}removeCanvasImg(){let e=this;try{if(e.elsdom){let t=e.elsdom.querySelectorAll(".canvasImg");for(let e=0;e<t.length;e++)t[e].remove()}}catch(e){console.log(e)}}print(e){var t=this;let a=document.getElementById(this.settings.id)||e.f,l=document.getElementById(this.settings.id).contentWindow||e.f.contentWindow;t.settings.beforeOpenCallback(),t.addEvent(a,"load",function(){l.focus(),t.settings.openCallback(),l.print(),a.remove(),t.settings.closeCallback(),t.removeCanvasImg()})}write(e){e.open(),e.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),e.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let e="",t="",a="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,t=>{e+=t}),[].forEach.call(document.querySelectorAll("link"),function(e){e.href.indexOf(".css")>=0&&(t+=`<link type="text/css" rel="stylesheet" href="${e.href}" >`)});let l=document.styleSheets;if(l&&l.length>0)for(let e=0;e<l.length;e++)try{if(l[e].cssRules||l[e].rules){let t=l[e].cssRules||l[e].rules;for(let e=0;e<t.length;e++)a+=t[e].cssText}}catch(t){console.log(l[e].href+t)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,e=>{t+=`<link type="text/css" rel="stylesheet" href="${e}">`}),`<head><title>${this.settings.popTitle}</title>${e}${t}<style type="text/css">${a}</style></head>`}getBody(){let e=this.settings.ids;return e=e.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(e)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(e){let t=e.querySelectorAll("canvas");for(let e=0;e<t.length;e++)if(!t[e].style.display){let a=t[e].parentNode,l=t[e].toDataURL("image/png"),s=new Image;s.className="canvasImg",s.style.display="none",s.src=l,a.appendChild(s)}return e}getFormData(e){let t=e.cloneNode(!0),a=t.querySelectorAll("input,select,textarea"),l=t.querySelectorAll(".canvasImg,canvas"),s=-1;for(let e=0;e<l.length;e++){let t=l[e].parentNode,a=l[e];"canvas"===a.tagName.toLowerCase()?t.removeChild(a):a.style.display="block"}for(let t=0;t<a.length;t++){let l=a[t],n=l.getAttribute("type"),i=a[t];if(n||(n="SELECT"===l.tagName?"select":"TEXTAREA"===l.tagName?"textarea":""),"INPUT"===l.tagName)"radio"===n||"checkbox"===n?l.checked&&i.setAttribute("checked",l.checked):(i.value=l.value,i.setAttribute("value",l.value));else if("select"===n){s++;for(let t=0;t<e.querySelectorAll("select").length;t++){let a=e.querySelectorAll("select")[t];if(!a.getAttribute("newbs")&&a.setAttribute("newbs",t),a.getAttribute("newbs")==s){let t=e.querySelectorAll("select")[s].selectedIndex;l.options[t].setAttribute("selected",!0)}}}else i.innerHTML=l.value,i.setAttribute("html",l.value)}return t}getPrintWindow(e){var t=this.Iframe(e);return{f:t,win:t.contentWindow||t,doc:t.doc}}previewBoxShow(){let e=document.getElementById("vue-pirnt-nb-previewBox");e&&(document.querySelector("html").setAttribute("style","overflow: hidden"),e.style.display="block")}previewBoxHide(){let e=document.getElementById("vue-pirnt-nb-previewBox");e&&(document.querySelector("html").setAttribute("style","overflow: visible;"),e.querySelector("iframe")&&e.querySelector("iframe").remove(),e.style.display="none")}previewBox(){let e=document.getElementById("vue-pirnt-nb-previewBox");if(e)return e.querySelector("iframe")&&e.querySelector("iframe").remove(),{close:e.querySelector(".previewClose"),previewBody:e.querySelector(".previewBody")};let t=document.createElement("div");t.setAttribute("id","vue-pirnt-nb-previewBox"),t.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),t.style.zIndex=this.settings.zIndex;let a=document.createElement("div");a.setAttribute("class","previewHeader"),a.setAttribute("style","padding: 5px 20px;"),a.innerHTML=this.settings.previewTitle,t.appendChild(a),this.close=document.createElement("div");let l=this.close;l.setAttribute("class","previewClose"),l.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let s=document.createElement("div"),n=document.createElement("div");s.setAttribute("class","closeBefore"),s.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),n.setAttribute("class","closeAfter"),n.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),l.appendChild(s),l.appendChild(n),a.appendChild(l),this.previewBody=document.createElement("div");let i=this.previewBody;i.setAttribute("class","previewBody"),i.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),t.appendChild(i);let r=document.createElement("div");r.setAttribute("class","previewBodyUtil"),r.setAttribute("style","height: 32px;background: #474747;position: relative;"),i.appendChild(r),this.previewBodyUtilPrintBtn=document.createElement("div");let o=this.previewBodyUtilPrintBtn;return o.setAttribute("class","previewBodyUtilPrintBtn"),o.innerHTML=this.settings.previewPrintBtnLabel,o.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),r.appendChild(o),document.body.appendChild(t),{close:this.close,previewBody:this.previewBody}}iframeBox(e,t){let a=document.createElement("iframe");return a.style.border="0px",a.style.position="absolute",a.style.width="0px",a.style.height="0px",a.style.right="0px",a.style.top="0px",a.setAttribute("id",e),a.setAttribute("src",t),a}Iframe(e){let t=this.settings.id;e=e||(new Date).getTime();let a=this,l=this.iframeBox(t,e);try{if(this.settings.preview){l.setAttribute("style","border: 0px;flex: 1;");let e=this.previewBox(),t=e.previewBody,s=e.close;t.appendChild(l),this.addEvent(s,"click",function(){a.previewBoxHide()})}else document.body.appendChild(l);l.doc=null,l.doc=l.contentDocument?l.contentDocument:l.contentWindow?l.contentWindow.document:l.document}catch(e){throw new Error(e+". iframes may not be supported in this browser.")}if(null==l.doc)throw new Error("Cannot find document.");return l}}var s={directiveName:"print",mounted(e,t,a){let s=t.instance,n="";var i,r,o;r="click",o=()=>{if("string"==typeof t.value)n=t.value;else{if("object"!=typeof t.value||!t.value.id)return void window.print();{n=t.value.id;let e=n.replace(new RegExp("#","g"),"");document.getElementById(e)||(console.log("id in Error"),n="")}}d()},(i=e).addEventListener?i.addEventListener(r,o,!1):i.attachEvent?i.attachEvent("on"+r,o):i["on"+r]=o;const d=()=>{new l({ids:n,vue:s,url:t.value.url,standard:"",extraHead:t.value.extraHead,extraCss:t.value.extraCss,zIndex:t.value.zIndex||20002,previewTitle:t.value.previewTitle||"打印预览",previewPrintBtnLabel:t.value.previewPrintBtnLabel||"打印",popTitle:t.value.popTitle,preview:t.value.preview||!1,asyncUrl:t.value.asyncUrl,previewBeforeOpenCallback(){t.value.previewBeforeOpenCallback&&t.value.previewBeforeOpenCallback(s)},previewOpenCallback(){t.value.previewOpenCallback&&t.value.previewOpenCallback(s)},openCallback(){t.value.openCallback&&t.value.openCallback(s)},closeCallback(){t.value.closeCallback&&t.value.closeCallback(s)},beforeOpenCallback(){t.value.beforeOpenCallback&&t.value.beforeOpenCallback(s)}})}},install:function(e){e.directive("print",s)}};const n=s},6883:(e,t,a)=>{a.d(t,{A:()=>n});var l=a(9726);const s={name:"PrintButtonComponent",props:["props","buttonClass"],directives:{print:a(5316).A}};const n=(0,a(6262).A)(s,[["render",function(e,t,a,s,n,i){var r=(0,l.resolveDirective)("print");return(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)("button",{class:(0,l.normalizeClass)(a.buttonClass)},[t[0]||(t[0]=(0,l.createElementVNode)("i",{class:"lab-fill-printer"},null,-1)),(0,l.createTextVNode)(" "+(0,l.toDisplayString)(e.$t("button.print")),1)],2)),[[r,a.props]])}]])},8939:(e,t,a)=>{a.r(t),a.d(t,{default:()=>be});var l=a(9726),s={class:"col-12",id:"print"},n={class:"db-card p-4 mb-8"},i={class:"grid grid-cols-1 md:grid-cols-1 gap-6"},r={class:"p-4 rounded-xl border border-gray-100"},o={class:"text-sm capitalize font-semibold text-secondary mb-1.5"},d={class:"flex flex-col gap-1"},c={class:"flex items-start gap-1"},p={class:"text-sm capitalize"},m={class:"text-sm"},u={key:0,class:"grid grid-cols-1 md:grid-cols-1 gap-6 pt-4"},b={class:"p-4 rounded-xl border border-gray-100"},g={class:"text-sm capitalize font-semibold text-secondary mb-1.5"},h=["innerHTML"],y={class:"db-card overflow-hidden"},v={class:"db-table-responsive"},f={class:"db-table stripe"},x={class:"db-table-head"},w={class:"db-table-head-tr"},E={class:"db-table-head-th"},N={class:"db-table-head-th"},B={class:"db-table-head-th"},k={class:"db-table-head-th"},C={class:"db-table-head-th"},V={class:"db-table-head-th"},A={class:"db-table-body border-b border-gray-200"},S={class:"db-table-body-td font-medium"},D={key:0},$={class:"db-table-body-td"},T={class:"db-table-body-td"},L={class:"db-table-body-td"},I={class:"db-table-body-td"},_={class:"db-table-body-td"},O={class:"grid grid-cols-1 md:grid-cols-2 gap-6 items-start py-6 px-4"},q={class:"p-4 rounded-xl flex flex-col gap-2.5 bg-gray-100"},H={key:0,class:"flex items-start gap-1.5"},P={class:"text-base font-medium text-secondary"},U={class:"text-base font-medium text-secondary"},j={class:"flex items-start gap-1.5"},z={class:"text-base font-medium text-secondary"},R={class:"text-base font-medium text-secondary"},F={class:"w-full flex flex-col gap-3.5 p-4 rounded-xl border border-gray-100"},W={class:"w-full flex items-center justify-between"},M={class:"text-base font-semibold text-secondary"},Y={class:"text-base font-semibold text-secondary"},X={class:"w-full flex items-center justify-between"},G={class:"text-base font-semibold text-secondary"},J={class:"text-base font-semibold text-secondary"},K={class:"w-full flex items-center justify-between"},Q={class:"text-base font-semibold text-secondary"},Z={class:"text-base font-semibold text-secondary"},ee={class:"w-full flex items-center justify-between"},te={class:"text-base font-semibold text-secondary"},ae={class:"text-base font-semibold text-secondary"},le={class:"col-12 hidden-print"},se={class:"flex items-center justify-end gap-6"},ne={class:"capitalize text-sm font-medium"};var ie=a(9856),re=a(8655),oe=a(6883);const de={name:"DamageShowComponent",components:{LoadingComponent:a(5475).A,PrintButtonComponent:oe.A},data:function(){return{loading:{isActive:!1},printObj:{id:"print",popTitle:this.$t("menu.damages")}}},mounted:function(){this.show()},computed:{damage:function(){return this.$store.getters["damage/show"]},setting:function(){return this.$store.getters["frontendSetting/lists"]}},methods:{floatFormat:function(e){return re.A.floatFormat(e,this.setting.site_digit_after_decimal_point)},show:function(){var e=this;isNaN(this.$route.params.id)||(this.loading.isActive=!0,this.$store.dispatch("damage/show",this.$route.params.id).then(function(t){e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1}))},download:function(){var e=this;isNaN(this.$route.params.id)||(this.loading.isActive=!0,this.$store.dispatch("damage/download",this.$route.params.id).then(function(t){e.loading.isActive=!1;var a="";if(t.data.type){var l=t.data.type;a=(l=l.split("/"))[1]}if(t.data.size>0){var s=window.URL.createObjectURL(new Blob([t.data])),n=document.createElement("a");n.href=s,n.download=e.$t("menu.damages")+"."+a,n.click(),URL.revokeObjectURL(n.href)}else ie.A.info(e.$t("menu.damages")+" "+e.$t("message.attachment_not_found"))}).catch(function(t){e.loading.isActive=!1}))}}};var ce=a(5072),pe=a.n(ce),me=a(2114),ue={insert:"head",singleton:!1};pe()(me.A,ue);me.A.locals;const be=(0,a(6262).A)(de,[["render",function(e,t,a,ie,re,oe){var de=(0,l.resolveComponent)("LoadingComponent"),ce=(0,l.resolveComponent)("PrintButtonComponent");return(0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,[(0,l.createVNode)(de,{props:re.loading},null,8,["props"]),(0,l.createElementVNode)("div",s,[(0,l.createElementVNode)("div",n,[(0,l.createElementVNode)("div",i,[(0,l.createElementVNode)("div",r,[t[1]||(t[1]=(0,l.createElementVNode)("i",{class:"lab-fill-file text-2xl text-success mb-2 lab-font-size-24"},null,-1)),(0,l.createElementVNode)("h4",o,(0,l.toDisplayString)(e.$t("label.reference"))+": "+(0,l.toDisplayString)(oe.damage.reference_no),1),(0,l.createElementVNode)("ul",d,[(0,l.createElementVNode)("li",c,[(0,l.createElementVNode)("span",p,(0,l.toDisplayString)(e.$t("label.date"))+":",1),(0,l.createElementVNode)("span",m,(0,l.toDisplayString)(oe.damage.converted_date),1)])])])]),oe.damage.note?((0,l.openBlock)(),(0,l.createElementBlock)("div",u,[(0,l.createElementVNode)("div",b,[(0,l.createElementVNode)("h4",g,(0,l.toDisplayString)(e.$t("label.note"))+": ",1),(0,l.createElementVNode)("span",{innerHTML:oe.damage.note},null,8,h)])])):(0,l.createCommentVNode)("",!0)]),(0,l.createElementVNode)("div",y,[(0,l.createElementVNode)("div",v,[(0,l.createElementVNode)("table",f,[(0,l.createElementVNode)("thead",x,[(0,l.createElementVNode)("tr",w,[(0,l.createElementVNode)("th",E,(0,l.toDisplayString)(e.$t("label.product")),1),(0,l.createElementVNode)("th",N,(0,l.toDisplayString)(e.$t("label.unit_cost")),1),(0,l.createElementVNode)("th",B,(0,l.toDisplayString)(e.$t("label.quantity")),1),(0,l.createElementVNode)("th",k,(0,l.toDisplayString)(e.$t("label.discount")),1),(0,l.createElementVNode)("th",C,(0,l.toDisplayString)(e.$t("label.taxes")),1),(0,l.createElementVNode)("th",V,(0,l.toDisplayString)(e.$t("label.sub_total")),1)])]),(0,l.createElementVNode)("tbody",A,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(oe.damage.products,function(t,a){return(0,l.openBlock)(),(0,l.createElementBlock)("tr",{key:a,class:"db-table-body-tr"},[(0,l.createElementVNode)("td",S,[(0,l.createTextVNode)((0,l.toDisplayString)(t.product_name)+" ",1),t.variation_names?((0,l.openBlock)(),(0,l.createElementBlock)("span",D," ( "+(0,l.toDisplayString)(e.$t("label.variation"))+" : "+(0,l.toDisplayString)(t.variation_names)+" ) ",1)):(0,l.createCommentVNode)("",!0)]),(0,l.createElementVNode)("td",$,(0,l.toDisplayString)(oe.floatFormat(t.price)),1),(0,l.createElementVNode)("td",T,(0,l.toDisplayString)(t.quantity),1),(0,l.createElementVNode)("td",L,(0,l.toDisplayString)(0===Number(t.discount)?"":"-")+" "+(0,l.toDisplayString)(oe.floatFormat(t.discount)),1),(0,l.createElementVNode)("td",I,(0,l.toDisplayString)(oe.floatFormat(t.tax)),1),(0,l.createElementVNode)("td",_,(0,l.toDisplayString)(oe.floatFormat(t.total)),1)])}),128))])])]),(0,l.createElementVNode)("div",O,[(0,l.createElementVNode)("div",q,[oe.damage.creator&&oe.damage.creator.name?((0,l.openBlock)(),(0,l.createElementBlock)("dl",H,[(0,l.createElementVNode)("dt",P,(0,l.toDisplayString)(e.$t("label.created_by"))+": ",1),(0,l.createElementVNode)("dd",U,(0,l.toDisplayString)(oe.damage.creator?oe.damage.creator.name:""),1)])):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("dl",j,[(0,l.createElementVNode)("dt",z,(0,l.toDisplayString)(e.$t("label.created_date"))+": ",1),(0,l.createElementVNode)("dd",R,(0,l.toDisplayString)(oe.damage.created_at),1)])]),(0,l.createElementVNode)("ul",F,[(0,l.createElementVNode)("li",W,[(0,l.createElementVNode)("span",M,(0,l.toDisplayString)(e.$t("label.subtotal")),1),(0,l.createElementVNode)("span",Y,(0,l.toDisplayString)(oe.damage.subtotal_currency),1)]),(0,l.createElementVNode)("li",X,[(0,l.createElementVNode)("span",G,(0,l.toDisplayString)(e.$t("label.tax_fee")),1),(0,l.createElementVNode)("span",J,(0,l.toDisplayString)(oe.damage.tax_currency),1)]),(0,l.createElementVNode)("li",K,[(0,l.createElementVNode)("span",Q,(0,l.toDisplayString)(e.$t("label.discount")),1),(0,l.createElementVNode)("span",Z,(0,l.toDisplayString)(oe.damage.discount_currency),1)]),(0,l.createElementVNode)("li",ee,[(0,l.createElementVNode)("span",te,(0,l.toDisplayString)(e.$t("label.total")),1),(0,l.createElementVNode)("span",ae,(0,l.toDisplayString)(oe.damage.total_currency),1)])])])])]),(0,l.createElementVNode)("div",le,[(0,l.createElementVNode)("div",se,[oe.damage.file?((0,l.openBlock)(),(0,l.createElementBlock)("button",{key:0,onClick:t[0]||(t[0]=function(){return oe.download&&oe.download.apply(oe,arguments)}),type:"button",class:"flex items-center justify-center gap-1.5 h-10 px-6 rounded-3xl text-white bg-primary"},[t[2]||(t[2]=(0,l.createElementVNode)("i",{class:"lab lab-fill-download"},null,-1)),(0,l.createElementVNode)("span",ne,(0,l.toDisplayString)(e.$t("label.download")),1)])):(0,l.createCommentVNode)("",!0),(0,l.createVNode)(ce,{props:re.printObj,buttonClass:"flex items-center justify-center gap-1.5 h-10 px-6 rounded-3xl text-white bg-success"},null,8,["props"])])])],64)}],["__scopeId","data-v-22a37759"]])}}]);
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.87 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285