????
Current Path : C:/inetpub/vhost/sdoc.nextform.vn/www/assets/ |
Current File : C:/inetpub/vhost/sdoc.nextform.vn/www/assets/Index-c4f7c352.js |
import{d as v,r as n,i as C,m as x,j as e,R as m,Y as F}from"./index-727ccf4d.js";import{T as L}from"./TabsBasic-ac34a1aa.js";import{B as y}from"./Button-9330b92c.js";import{F as f}from"./FormGroup-74b8b50e.js";import{I as N}from"./Input-ae2484bb.js";import{A as D}from"./Alert-f0fd0c60.js";import{F as k}from"./FontAwesome4-32fe4385.js";import"./Nav-12db6fea.js";import"./Fade-7cf1057f.js";import"./Transition-27f52f03.js";const R=v.div` .form-group { label, b { font-weight: bold; } } `,S=()=>{const[r,j]=n.useState(),[c,T]=n.useState(null),[l,g]=n.useState(null),[h,p]=n.useState(""),d=n.useCallback(()=>{r?C(`TraCuu/SearchInformation?keyWord=${r}`,"GET",null,{odata:!1}).then(t=>{g(t[0].ListLinhVuc||[]),p(t[0].MaDonVi),T(t[0].TenDonVi)}).catch(()=>x("Không thể tải dữ liệu đơn vị hoặc mã đơn vị không đúng","Thông báo")):x("Vui lòng nhập mã đơn vị hoặc tên đơn vị")},[r]),a=t=>{j(t.target.value)},s=n.useCallback(({TenQuyTrinh:t,data:o})=>o&&o.length?o.map((i,M)=>e.jsxs("tr",{children:[e.jsx("td",{style:{textAlign:"center",color:"#FFBB28",verticalAlign:"top"},children:e.jsx(f,{check:!0,children:e.jsx(N,{type:"checkbox",name:"check",checked:i.IsThucHien})})}),e.jsx("td",{children:i.TanSuat}),e.jsx("td",{children:i.TenMau}),e.jsx("td",{children:i.MaDonViNhan}),e.jsx("td",{children:i.DonViNhan}),e.jsx("td",{children:i.NDTGui_Name}),e.jsx("td",{children:i.NDTNhan_Name}),e.jsx("td",{children:t})]},M)):e.jsx("tr",{children:e.jsx("td",{colSpan:"7",className:"text-center",children:e.jsx(D,{color:"warning",children:"Không có dữ liệu"})})}),[]),u=n.useCallback(({item:t})=>e.jsxs(m.Fragment,{children:[e.jsx("h5",{style:{marginTop:"2rem"},children:t.TenDieu}),e.jsxs("table",{className:"customers-table-search",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Thực hiện"}),e.jsx("th",{children:"Tần suất"}),e.jsx("th",{children:"Mẫu báo cáo"}),e.jsx("th",{children:"Mã đơn vị nhận"}),e.jsx("th",{children:"Tên đơn vị nhận"}),e.jsx("th",{children:"Nhóm đối tượng gửi"}),e.jsx("th",{children:"Nhóm đối tượng nhận"}),e.jsx("th",{children:"Tên quy trình"})]})}),e.jsx("tbody",{children:e.jsx(s,{TenQuyTrinh:t.TenQuyTrinh,data:t.ListMauBaoCao})})]})]}),[]),b=n.memo(({item:t})=>e.jsxs(m.Fragment,{children:[e.jsx("h4",{className:"text-center text-primary mt-5",children:t.TenLinhVuc}),t.ListDieu.sort(F("TenDieu")).map((o,i)=>e.jsx(u,{item:o,TenQuyTrinh:t.TenQuyTrinh},i))]})),V=n.useMemo(()=>l&&l.map((t,o)=>e.jsx(b,{item:t},o)),[s,l]);return e.jsxs(R,{children:[e.jsxs("div",{className:"mb-2",children:[e.jsx("b",{children:"Đơn vị hoặc tên đơn vị : "}),e.jsx("input",{value:r,placeholder:"Tìm kiếm",onKeyPress:t=>{t.key==="Enter"&&d()},onChange:a}),e.jsxs(y,{style:{marginLeft:5,marginTop:-4},size:"sm",onClick:d,color:"success",children:[e.jsx(k,{fa:"search"}),e.jsx("span",{className:"ms-1",children:"Tìm kiếm"})]}),c&&e.jsxs("span",{className:"ms-2",children:[e.jsx("b",{children:"Tên đơn vị : "})," ",c]}),h&&e.jsxs("span",{className:"ms-2",children:[e.jsx("b",{children:"Mã đơn vị : "})," ",h]})]}),e.jsx("div",{children:V})]})},K=S,E=v.div` .form-group { label, b { font-weight: bold; } } `,I=()=>{const[r,j]=n.useState(null),[c,T]=n.useState([]),l=n.useCallback(()=>{r?C(`TraCuu/TraCuuDonVi_TheoMau?keyWord=${r}`,"GET",null,{odata:!1}).then(a=>{T(a)}).catch(()=>x("Không tồn tại mẫu đơn vị","Thông báo")):x("Vui lòng nhập đơn vị")},[r]),g=a=>{j(a.target.value)},h=n.useCallback(({item:a})=>e.jsxs(m.Fragment,{children:[e.jsx("strong",{style:{marginTop:"2rem"},children:a.Dieu}),e.jsxs("table",{className:"customers-table-search",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Thực hiện"}),e.jsx("th",{children:"Mẫu"})]})}),e.jsx("tbody",{children:e.jsxs("tr",{children:[e.jsx("td",{style:{textAlign:"center",color:"#FFBB28",verticalAlign:"top"},children:e.jsx(f,{children:e.jsx(N,{type:"checkbox",name:"check",checked:a.IsThucHien})})}),e.jsx("td",{children:a.Mau})]})})]})]}),[]),p=n.memo(({item:a})=>e.jsxs(m.Fragment,{children:[e.jsx("h4",{className:"text-center text-primary mt-5",children:a.LinhVuc}),e.jsx(h,{item:a})]})),d=n.useMemo(()=>c.map((a,s)=>e.jsx(p,{item:a},s)),[c]);return e.jsxs(E,{children:[e.jsxs("div",{className:"mb-2",children:[e.jsx("strong",{children:"Đơn vị tra cứu : "}),e.jsx("input",{value:r,placeholder:"Tìm kiếm",onKeyPress:a=>{a.key==="Enter"&&l()},onChange:g}),e.jsxs(y,{style:{marginLeft:5,marginTop:-4},size:"sm",onClick:l,color:"success",children:[e.jsx(k,{fa:"search"}),e.jsx("span",{className:"ms-1",children:"Tìm kiếm"})]})]}),e.jsx("div",{children:d})]})},A=I,B=v.div` .form-group { label, b { font-weight: bold; } } `,_=()=>{const[r,j]=n.useState(),[c,T]=n.useState(null),l=n.useCallback(()=>{r?C(`TraCuu/TraCuuMauBaoCao?keyWord=${r}`,"GET",null,{odata:!1}).then(s=>{T(s[0].ListLinhVuc||[])}).catch(()=>x("Không thể tải dữ liệu đơn vị hoặc mã đơn vị không đúng","Thông báo")):x("Vui lòng nhập mẫu")},[r]),g=s=>{j(s.target.value)},h=n.useCallback(({data:s})=>s&&s.length?s.map((u,b)=>e.jsxs("tr",{children:[e.jsx("td",{children:u.ChiTietGuiNhan_Id}),e.jsx("td",{children:u.ChiTietQuyTrinh_Id})]},b)):e.jsx("tr",{children:e.jsx("td",{colSpan:"7",className:"text-center",children:e.jsx(D,{color:"warning",children:"Không có dữ liệu"})})}),[]),p=n.useCallback(({item:s})=>e.jsx(m.Fragment,{children:e.jsxs("table",{className:"customers-table-search",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Chi tiết gửi nhận ID"}),e.jsx("th",{children:"Chi tiết quy trình ID"})]})}),e.jsx("tbody",{children:e.jsx(h,{data:s.ListDieu})})]})}),[]),d=n.memo(({item:s})=>e.jsx(m.Fragment,{children:e.jsx("div",{style:{marginTop:"2rem"},children:e.jsx(p,{item:s})})})),a=n.useMemo(()=>c&&c.map((s,u)=>e.jsx(d,{item:s},u)),[h,c]);return e.jsxs(B,{children:[e.jsxs("div",{className:"mb-2",children:[e.jsx("strong",{children:"Mẫu báo cáo : "}),e.jsx("input",{value:r,placeholder:"Tìm kiếm",onKeyPress:s=>{s.key==="Enter"&&l()},onChange:g}),e.jsxs(y,{style:{marginLeft:5,marginTop:-4},size:"sm",onClick:l,color:"success",children:[e.jsx(k,{fa:"search"}),e.jsx("span",{className:"ms-1",children:"Tìm kiếm"})]})]}),e.jsx("div",{children:a})]})},G=_;function J(){return e.jsx(L,{data:[{TabName:"Tra cứu đơn vị (all)",TabContent:e.jsx(e.Fragment,{children:e.jsx("div",{className:"p-3",children:e.jsx(K,{})})})},{TabName:"Tra cứu đơn vị ( theo mẫu)",TabContent:e.jsx(e.Fragment,{children:e.jsx("div",{className:"p-3",children:e.jsx(A,{})})})},{TabName:"Tra cứu theo mẫu",TabContent:e.jsx(e.Fragment,{children:e.jsx("div",{className:"p-3",children:e.jsx(G,{})})})}]})}export{J as default};