HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.2.20
System: Linux 825a8fd6cf8c 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User: apache (48)
PHP: 8.2.20
Disabled: NONE
Upload Files
File: /var/www/html/public/static/js/hook-2758afe3.js
import{getEmployeeFormListWeb as Ye,getEmployeeCompanyInfoWeb as He,DelEmployeeCompanyWeb as Qe}from"./employee_company-2dabc374.js";import{yuyueFDF as Xe,submitImageNoteFormWeb as qe,resetEmployeeFormWeb as Ge,AddEmployeeDurationmWeb as Je,getImportDetailWeb as Ke}from"./po-4f5ed739.js";import{deal200 as Ze,alertError as et}from"./utils-2ab4f76a.js";import{E as tt}from"./edit-pen-af58ba35.js";import{u as at}from"./hooks-925dc7bd.js";import{g as nt}from"./upload-0ec567a8.js";import{b7 as l}from"./message-2472a54a.js";import{o as ot}from"./index-81e4a901.js";import{r as a,A as i,o as st,y as w,F as it,v as C,Q as rt}from"./runtime-core.esm-bundler-6128546f.js";import"./index-74d93170.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./vue-router-a383d220.js";import"./index-9676aad5.js";import"./error-78e43d3e.js";import"./focus-trap-53f1c6ab.js";const f=a();function Et(){const D=i({company_id:"",update_img:""}),r=i({duration:"",price:"",id:"",data:""}),V=i({}),S=a(!1),x=a([]),E=a([]),$=a([{id:1,text:"1 day",value:"1"},{id:2,text:"1 weekly",value:"7"}]),B=i({}),Y=i({}),H=i({}),m=a([]),A=a([]),u=a(!1),_=a(!1),g=a(!1),Q=a(0),X=a(0),q=a(""),G=a(""),F=a("7"),J=a(1e3),p=i({total:0,pageSize:J.value,pageSizes:[10,15,20,50,100],currentPage:1,background:!0}),K=["模型ID","模型名称","模型表","模型路径","是否可用","添加时间","添加人"],Z=i({uid:"",code:"",name:"",phone:"",email:""}),ee=a(!1),te=i({fno:"",fname:""}),ae=a([]),I={},ne=(t,e)=>{t&&(I[e]=t)},oe=a([{id:1,text:"matched",value:"matched",is_selected:1},{id:2,text:"not matched",value:"not_matched",is_selected:1},{id:3,text:"repeat",value:"repeat",is_selected:1},{id:4,text:"date error",value:"date_error",is_selected:1}]),se=a(""),O=(t,e)=>{const n=e.property.split(".");return n[0]=="dur_list"?(t.dur_list[n[1]].is_edit,!0):!1},R=(t,e)=>{const n=e.property.split(".");return n[0]=="dur_list"?t.dur_list[n[1]].type:""},T=(t,e)=>{const n=e.property.split(".");return n[0]=="dur_list"?t.dur_list[n[1]].value:1},ie=(t,e)=>{const n=e.property.split(".");return n[0]=="dur_list"?t.dur_list[n[1]].id:0},re=({row:t,column:e})=>{R(t,e);let n=T(t,e),s=O(t,e);return w("span",null,[s?w(it,null,[C(" "),w(rt("el-button"),{title:"Edit with no invoice",circle:!0,type:"primary",size:"small",icon:at(tt)},null),C(" ")," ",n,C(" ")]):n])},M=a([]);async function c(t={}){var s,d,v,U;u.value=!0;const{data:e}=await Ye(Object.assign(o,{page:p.currentPage,resault:p.pageSize}));let n=[];for(let Be in(s=e.data)==null?void 0:s.title){let b=(d=e.data)==null?void 0:d.title[Be];b.kind=="duration"&&(b.cellRenderer=re),n.push(b)}h.value=n,h.value[0].slot="ServiceContent",x.value=(v=e.data)==null?void 0:v.content,M.value=(U=e.data)==null?void 0:U.price_config,y.value=[e.data.begin_date,e.data.end_date],o.begin_date=e.data.begin_date,o.end_date=e.data.end_date,setTimeout(()=>{u.value=!1},500)}function ce(){c()}const k=a([]);async function le(t={}){var n,s;u.value=!0;const{data:e}=await He(Object.assign({},{page:p.currentPage,resault:p.pageSize}));(n=e==null?void 0:e.data)==null||n.forEach((d,v)=>{k.value.push({label:d.company_name,value:d.id})}),((s=e==null?void 0:e.data)==null?void 0:s.length)>0&&(o.company_id=parseInt(e==null?void 0:e.data[0].id)),setTimeout(()=>{u.value=!1,c()},500)}function de(t,e){return e.hasOwnProperty("op_list")?e.op_list.includes(t):!0}function ue(t){c()}const N=a([]);function pe(t){N.value=t.map(e=>e.id)}const P=1900,j=2100,me=t=>{let[e,n]=t.split("-").map(Number);return n+=1,n>12&&(n=1,e+=1),e>j&&(e=j),`${e}-${String(n).padStart(2,"0")}`},fe=t=>{let[e,n]=t.split("-").map(Number);return n-=1,n<1&&(n=12,e-=1),e<P&&(e=P),`${e}-${String(n).padStart(2,"0")}`},L=new Date;L.getFullYear(),(L.getMonth()+1).toString().padStart(2,"0");const o=i({company_id:0,date:"",begin_date:"",end_date:""}),y=a([]),_e=t=>{t&&(t.resetFields(),c())},h=a([]),ge=a([]);a([]);const ye=a([]),he=a("Note form list"),W=a(!1),ve=a(!1),be=a(!0),we=a(""),Ce=a(0);W.value=!1;const De=a([]),Se=i({form_json:{},data:{},field_setup:{},tpl_id:0}),xe=a(!1),Ee=a(!1),Ae=a(!1),Fe=a({}),Ie=t=>{Qe(t.id).then(e=>{Ze({code:parseInt(e==null?void 0:e.code),data:e,msg:"Delete Success!",error_msg:"Apply error",func:()=>{c()}})}).catch(e=>{et(e,"Apply error")})};function Oe(t,e,n){t.code==1&&(t.data.excel_data&&(m.value=t.data.excel_data.formContent.content,A.value=t.data.excel_data.formContent.title,_.value=!0),D.update_img=Xe+t.file_path.replace("var/www/html/public",""))}const Re=t=>{f.value.clearFiles();const e=t[0];e.uid=nt(),f.value.handleStart(e),z()};function Te(t,e,n){e.length>1&&e.splice(0,1)}const z=()=>{f.value.submit()};async function Me(t){const{data:e}=await qe(Object.assign(V,{company_id:o.company_id,content:m.value}));e.code==1?(c(),l({type:"success",message:e.msg}),_.value=!1):l({type:"error",message:e.msg})}function ke(t){}function Ne(t){}function Pe(t){F.value=t.value}function je(t){window.open(t)}const Le=t=>{ot.confirm("This operation will delete the current invoice. Please confirm if you want to continue ? ?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{We()}).catch(()=>{l({type:"info",message:"Canceled"})})};async function We(){const{data:t}=await Ge(Object.assign(B,{begin_date:o.begin_date,end_date:o.end_date,company_id:o.company_id}));t.code==1?(c(),l({type:"success",message:t.msg})):l({type:"error",message:t.msg})}function ze(t){t==null?(y.value=[],o.begin_date="",o.end_date=""):(o.begin_date=t[0],o.end_date=t[1]),c()}function Ue(t){r.duration=t.duration,r.id=t.id,r.price="",g.value=!0}async function Ve(){const{data:t}=await Je(Object.assign(Y,{duration:r.duration,price:r.price,company_id:o.company_id}));t.code==1?(m.value.forEach((e,n)=>{e.content.forEach((s,d)=>{r.id==s.id&&(s.match_duration=r.duration),s.match_content=t.data})}),g.value=!1,l({type:"success",message:t.msg})):l({type:"error",message:t.msg})}async function $e(t){r.data=t.date;const{data:e}=await Ke(Object.assign(H,{company_id:o.company_id,date:t.date}));e.code==1?(S.value=!0,E.value=e.date):l({type:"error",message:e.msg})}return st(()=>{le()}),{price_config:M,getCanEdit:O,getDurCellValue:T,getDurCellId:ie,getDurCellType:R,addOneMonth:me,subtractOneMonth:fe,comp_list:k,handleDelete:Ie,status_list:De,show_select_btn:ve,statusHas:de,tpl_item_id:Ce,load_defualt_search:Fe,paramString:se,row_key:we,config_loading:Ae,search_load:Ee,show_operate:be,select_items:N,handleSelectionChange:pe,show_select:W,show_search:xe,search_info:Se,customOperates:ye,model_name:he,model_id:Q,entity_id:X,handleCurrentChange:ue,resetForm:_e,childColumns:ge,columns:h,search_form:o,form_name:q,form_desc:G,vFormRefMap:I,setItemRef:ne,activeNames:ae,onSearchParams:ce,onSearch:c,selectList:K,editFormDialogVisible:ee,editformData:Z,form:te,loading:u,dataList:x,pagination:p,uploadSlotFile1:Oe,infoArr:D,uploadDialog:_,uploadList:m,uploadTitle:A,btnUploadConfirm:Me,beforeRemove:ke,beforeAvatarUpload:Ne,handleExceed:Re,upload:f,submitUpload:z,handleChangePic:Te,DeductionType:$,selectedTr:Pe,is_days:F,loadUpdateImg:je,invoice_date:y,getDate:ze,onReset:Le,durationDialog:g,durationArr:r,onAddService:Ue,onDurationConfirm:Ve,ImportHistory:$e,historyData:E,historyDialog:S,stulesShow:oe}}export{Et as useList};