????

Your IP : 3.144.17.93


Current Path : C:/inetpub/vhost/sdoc.nextform.vn/www/assets/
Upload File :
Current File : C:/inetpub/vhost/sdoc.nextform.vn/www/assets/Index-54ed42b0.js

import{r as n,R as j,i as u,n as H,C as L,j as e,T as C,m as I,d as b,I as K,z as $,q as R}from"./index-727ccf4d.js";import{C as B}from"./Card-8b4f40d9.js";import{C as M}from"./CardBody-4a2e5616.js";import{C as P}from"./CardHeader-dcb844ec.js";import{R as v}from"./Row-4ad47f29.js";import{C as T}from"./Col-ed66bf37.js";import{A as N}from"./Alert-f0fd0c60.js";import"./Button-461c8cce.js";import{B as k}from"./DataSelect-00074039.js";import{L as O}from"./Required-e4b19dca.js";import{D as A,F as f,a as F}from"./DropdownList-ca18995c.js";import{B as G}from"./Button-9330b92c.js";import{a as J,b as Y,M as z}from"./SelectCustom-701e5fac.js";import{a as V}from"./InputNumber-dceb4c1c.js";import"./InputTime-0a0b65be.js";import{F as W}from"./FontAwesome4-32fe4385.js";import"./Fade-7cf1057f.js";import"./Transition-27f52f03.js";import"./useTheme-41684c89.js";import"./classCallCheck-22a738c0.js";import"./withStyles-da525f81.js";import"./possibleConstructorReturn-e4ffd6dd.js";import"./DialogCustomize-4c6977d9.js";import"./capitalize-f7a57a5c.js";import"./OdataUtils-2c90172a.js";import"./index-0eaf7829.js";import"./TextArea-56268c1b.js";import"./Input-ae2484bb.js";import"./Dropdown-ab2dfbba.js";import"./Manager-0c2f0563.js";import"./SelectPanelMulti-70ffdcea.js";import"./TransitionGroup-273fc20b.js";import"./Collapse-da981db3.js";import"./DataTable-2f4d7f97.js";const{IDDonVi:y}=C||{};function q({open:o,onClose:t,onSave:s}){const[a,i]=n.useState([]),c=j.useCallback(()=>{u(`DonVis?$filter=ID eq '${y}'`,"GET",null).then(h=>{i(h.value[0].Dieu1213_LinhVuc_Id)})},[]);j.useEffect(()=>{c()},[c]);const d=j.useCallback(()=>{a!==null?u(`DonVis('${y}')`,"PATCH",JSON.stringify({Dieu1213_LinhVuc_Id:a})).then(h=>{H("Cập nhật thành công","Thông báo")}).catch(h=>console.log(h)):L("Vui lòng chọn lĩnh vực","Thông báo")},[a]);return e.jsxs("div",{children:[e.jsx("strong",{children:"Cài đặt lĩnh vực:"}),e.jsx("hr",{}),e.jsx(N,{color:"warning",children:'Chú ý! Để phục vụ công tác tổng hợp dữ liệu, người dùng vui lòng chọn lĩnh vực của mình, sau đó bấm "Lưu"'}),e.jsxs(v,{children:[e.jsx(T,{md:"12",children:e.jsx(O,{children:e.jsx("b",{children:"Chọn lĩnh vực:"})})}),e.jsx(T,{md:"10",children:e.jsx(A,{url:"Dieu1213_DM_LinhVuc",placeholder:"Chọn lĩnh vực...",valueField:"Id",textField:"Name",value:a,onChange:h=>i(h)})}),e.jsx(T,{md:"2",children:e.jsx(k,{size:"sm",onClick:d,children:"Lưu"})})]})]})}function U(){const[o,t]=n.useState([]),s=n.useCallback((d,h)=>{t(x=>({...x,[d]:h}))},[]),a={PhanLoaiDoanhNghiep_Id:{field_name:"PhanLoaiDoanhNghiep_Id",title:"Chọn loại doanh nghiệp:",type:"data-select",hidden_label:!0,dataSelect:{url:"DM_PhanLoaiDoanhNghiep",value_field:"Id",text_field:"Name",placeholder:"Chọn loại doanh nghiệp"}}},i=n.useCallback(()=>{let d=["SYS_CoCheDonViTuChu","SYS_CoCheToChucTuChu","SYS_DonVi_ChiTietToChucKHCN","DM_PhanLoaiDoanhNghiep"].join(",");u(`DonVis('${C.IDDonVi}')?$expand=${d}`,"GET",null).then(h=>t(h)).catch(h=>L(h,"THÔNG BÁO"))},[]);n.useEffect(()=>{i()},[]);const c=n.useCallback(()=>{u(`DonVis('${C.IDDonVi}')`,"PATCH",JSON.stringify({PhanLoaiDoanhNghiep_Id:o.PhanLoaiDoanhNghiep_Id})).then(()=>i()).catch(()=>I("Đã xảy ra lỗi cập nhật đơn vị tự chủ","Thông báo"))},[o.PhanLoaiDoanhNghiep_Id,i]);return e.jsx(j.Fragment,{children:e.jsxs(v,{children:[e.jsx(T,{md:"3",children:e.jsx("b",{children:"Cài đặt doanh nghiệp:"})}),e.jsx(T,{md:"6",children:e.jsx(f,{data:a.PhanLoaiDoanhNghiep_Id,value:o.PhanLoaiDoanhNghiep_Id,onChange:s})}),e.jsx(T,{md:"3",children:e.jsx(k,{size:"sm",onClick:c,children:"Lưu"})})]})})}const X=b.div``,w=b.div``,Q=b.div`
  table {
    tbody {
      tr:nth-child(odd) {
        background: #f6f6f6;
      }
    }
  }
  input[type='checkbox'] {
    position: static;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0.5rem;
  }
`,Z={LoaiKySo:{field_name:"LoaiKySo",title:"Loại ký số:",type:"radio-list",data:[{value:1,label:"Sở Ban Ngành"},{value:2,label:"Doanh nghiệp"}]}},ee=()=>{const[o,t]=n.useState(""),s=n.useCallback(()=>{u(`DonVis('${C.IDDonVi}')?$select=LoaiKySo`,"GET",null).then(({LoaiKySo:i})=>t(i))},[]);n.useEffect(()=>{s()},[s]);const a=n.useCallback(i=>{u(`DonVis('${C.IDDonVi}')`,"PATCH",JSON.stringify({LoaiKySo:i})).then(()=>s())},[s]);return e.jsxs(w,{children:[e.jsxs(N,{color:"warning",children:[e.jsx("b",{children:"Chú ý"}),": Sau khi thiết lập, bạn cần phải đăng xuất tài khoản, sau đó đăng nhập lại."]}),e.jsx(f,{value:o,data:Z.LoaiKySo,onChange:(i,c)=>a(c)})]})},ne=ee,E=n.memo(({isModal:o,isSetup:t,toggleIsSetup:s})=>{const[a,i]=n.useState([]),c=n.useCallback(()=>{u("Reports/GetBaoCaoSetupThucHien","GET",null,{odata:!1}).then(l=>i(l)).catch(()=>I("Không thể tải dữ liệu thực hiện báo cáo","Thông báo"))},[]);n.useEffect(()=>{c()},[c]);const d=n.useCallback(()=>{u(`DonVis('${C.IDDonVi}')`,"PATCH",JSON.stringify({IsSetup:!0})).then(()=>{let l={...C,IsSetup:!0};localStorage.setItem(K,JSON.stringify(l))})},[]),h=n.useCallback((l,r)=>{u(`RP_ChiTietGuiNhan(guid'${r}')`,"PATCH",JSON.stringify({IsThucHien:l})).then(()=>{o&&!t&&(d(),s()),o||c()})},[c,o,t,d,s]),x=n.useCallback((l,r)=>{o?h(l,r):$("Bạn chắc chắn muốn thực hiện thao tác này?","Thông báo").then(()=>{h(l,r)})},[o,h]),m=n.useCallback(l=>l.map((r,_)=>e.jsxs("p",{className:"d-flex align-items-center",children:[o?e.jsx(V,{type:"checkbox",defaultChecked:r.IsThucHien,onChange:g=>x(g.target.checked,r.ChiTietGuiNhan_Id)}):e.jsx(V,{type:"checkbox",checked:r.IsThucHien,onChange:g=>x(g.target.checked,r.ChiTietGuiNhan_Id)}),e.jsx("span",{children:r.TenMau})]},_)),[o,x]),S=n.useMemo(()=>a.map((l,r)=>e.jsxs("tr",{children:[e.jsx("td",{className:"text-center",children:r+1}),e.jsx("td",{children:l.TenBaoCao}),e.jsx("td",{children:m(l.MauBaoCao||[])})]},r)),[m,a]);return e.jsxs(Q,{children:[!o&&e.jsx("div",{className:"mb-2",children:e.jsx("b",{children:"Cài đặt báo cáo:"})}),e.jsxs("table",{border:"1",cellPadding:"5",width:"100%",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"STT"}),e.jsx("th",{children:"Điều"}),e.jsx("th",{children:"Mẫu báo cáo"})]})}),e.jsx("tbody",{children:S})]})]})}),oe=E;n.memo(()=>{const[o,t]=n.useState(C.IsSetup),s=n.useCallback(()=>t(!o),[o]),a=n.useCallback(()=>window.location.reload(),[]);return e.jsxs(ie,{isOpen:!1,size:"xl",children:[e.jsxs(J,{className:"bg-primary d-flex",children:[e.jsx("div",{children:e.jsx("b",{children:" Thiết lập báo cáo cần thực hiện"})}),e.jsx("div",{children:e.jsxs(G,{color:"danger",onClick:R,children:[e.jsx(W,{fa:"sign-out"})," Đăng xuất"]})})]}),e.jsxs(Y,{children:[e.jsxs(N,{color:"warning",children:[e.jsx("b",{children:"Chú ý"}),": Bạn cần thực hiện thao tác này để có thể sử dụng phần mềm"]}),e.jsx(E,{isModal:!0,toggleIsSetup:s,isSetup:o})]}),e.jsx(F,{children:e.jsx(k,{disabled:!o,color:"success",onClick:a,children:"Xác nhận"})})]})});const ie=b(z)`
  .modal-title {
    display: flex;
    align-items: center;
    justify-content: inherit;
  }
`,te=n.memo(o=>{const[t,s]=n.useState({}),[a,i]=n.useState(!1),[c,d]=n.useState(!1),[h,x]=n.useState(!1),m=n.useMemo(()=>({isShowToChucTuChu:{field_name:"isShowToChucTuChu",title:"Checkbox",type:"checkbox",hidden_label:!0},isShowDonViTuChu:{field_name:"isShowDonViTuChu",title:"Checkbox",type:"checkbox",hidden_label:!0}}),[]),S=n.useCallback(()=>{let p=["SYS_CoCheDonViTuChu","SYS_CoCheToChucTuChu","SYS_DonVi_ChiTietToChucKHCN"].join(",");u(`DonVis('${C.IDDonVi}')?$expand=${p}`,"GET",null).then(D=>s(D)).catch(D=>L(D,"THÔNG BÁO"))},[]);n.useEffect(()=>{S()},[]),n.useEffect(()=>{i(!0)},[]),n.useEffect(()=>{t&&t.SYS_CoCheDonViTuChu?x(!0):x(!1),t&&t.SYS_CoCheToChucTuChu?d(!0):d(!1)},[t]);const l=n.useCallback(p=>{},[]),r=n.useCallback(p=>{},[]),_=n.useCallback(p=>{u(`DonVis('${C.IDDonVi}')`,"PATCH",JSON.stringify({[p]:null})).then(()=>S())},[S]),g=n.useMemo(()=>a&&e.jsxs(j.Fragment,{children:[e.jsx("strong",{children:"Cài đặt chế độ tự chủ:"}),e.jsx("hr",{}),e.jsxs("div",{className:"d-flex",children:[e.jsxs("p",{className:"me-4",style:{textDecoration:"underline"},children:["Chọn loại đơn vị tự chủ:"," "]}),e.jsx(f,{data:m.isShowDonViTuChu,value:h,onChange:(p,D)=>x(D)})]}),e.jsx("hr",{}),e.jsxs("div",{className:"d-flex",children:[e.jsxs("p",{className:"me-4",style:{textDecoration:"underline"},children:["Chọn loại tổ chức tự chủ:"," "]}),e.jsx(f,{data:m.isShowToChucTuChu,value:c,onChange:(p,D)=>d(D)})]})]}),[t,m.isShowDonViTuChu,m.isShowToChucTuChu,a,h,c,_,l,r]);return e.jsx(j.Fragment,{children:g})}),se=te,ae={isSoLieuTinh:{field_name:"isSoLieuTinh",title:"Checkbox",type:"checkbox",hidden_label:!0}},he=()=>{const[o,t]=n.useState(),s=n.useCallback(()=>{u(`DonVis('${C.IDDonVi}')?$select=Dieu18_SoLieuTinh`,"GET",null).then(i=>t(i.Dieu18_SoLieuTinh))},[]);n.useEffect(()=>{s()},[s]);const a=n.useCallback(i=>{u(`DonVis('${C.IDDonVi}')`,"PATCH",JSON.stringify({Dieu18_SoLieuTinh:i})).then(()=>s())},[s]);return console.log(o),e.jsxs(w,{children:[e.jsx("strong",{children:"Cài đặt số liệu tỉnh điều 18:"}),e.jsx("hr",{}),e.jsxs("div",{className:"d-flex",children:[e.jsxs("p",{className:"me-4",style:{textDecoration:"underline"},children:["Chọn chế độ chỉ nhập liệu số liệu tỉnh:"," "]}),e.jsx(f,{value:o,data:ae.isSoLieuTinh,onChange:(i,c)=>a(c)})]})]})},ce=he;function Ge(){const o=n.useMemo(()=>e.jsx(ne,{}),[]),t=n.useMemo(()=>e.jsx(oe,{}),[]),s=n.useMemo(()=>e.jsx(se,{}),[]),a=n.useMemo(()=>e.jsx(q,{}),[]),i=n.useMemo(()=>e.jsx(U,{}),[]),c=n.useMemo(()=>e.jsx(ce,{}),[]);return e.jsxs(le,{children:[e.jsx(P,{children:e.jsx("b",{children:"Thiết lập đơn vị"})}),e.jsx(M,{children:e.jsxs(X,{children:[o,e.jsx("hr",{}),s,e.jsx("hr",{}),i,e.jsx("hr",{}),a,e.jsx("hr",{}),t,e.jsx("hr",{}),c]})})]})}const le=b(B)`
  max-width: 1000px;
  margin: auto;

  .form-group {
    .col-form-label-sm {
      font-size: 15px;
    }

    label,
    strong,
    b {
      font-weight: 500 !important;
    }
  }
`;export{Ge as default};