PageSourceSearch

https://zakup.gov.kz/assets/DisagreementCardPage-dkCqh2Nu.js

js zakup.gov.kz collected 2026-10-09 16:58:42 UTC 10,693 bytes, 1 lines download raw bytes

1import{ah as de,q as me,$ as ue,fF as pe,g4 as ge,g5 as he,g6 as fe,g7 as xe,g8 as je,fI as be,eR as Ce,fJ as _e,r as x,g9 as ye,j as r,a0 as P,b5 as d,ae as ve,G as c,s as n,m as ke}from"./theme-3dfVej7W.js";import"./purify.es-LQkvcK5U.js";import{I as l}from"./InfoDescriptions-bN0AQ_jG.js";import{N as we}from"./NoticeOverviewBlocks-CizrO_a2.js";import{D as Ne}from"./DisagreementStatusTag-CUDH7UmP.js";import{C as O}from"./CameralFilesTable-CrzJeQJg.js";import{u as De,R as Se}from"./RiskProfileLabel-DjNgPLfZ.js";import{S as Re}from"./SanitizedHtml-DX3UTD_G.js";import{b as ze}from"./useCameralJournalBackPath-DqqAIcDO.js";import{d as Ee}from"./downloadCameralFile-D1k0uc7j.js";import{s as Ie,n as Te}from"./signCameralText-_NIjuuIV.js";import{d as Me,f as Fe}from"./noticeDocument-CJPkWfkc.js";import{B as Le}from"./index-DljlvMzm.js";import{A as E}from"./index-wH3ULS13.js";import{C as _}from"./index-BKUOnk1C.js";import{T as y}from"./index-I1ZxXO3B.js";import{T}from"./index-C86gn5Ct.js";import{M as $}from"./index-C016Db5J.js";import{I as Ae}from"./index-CQ9iPbHV.js";import{S as Be}from"./index-C63dYVM1.js";import"./vite-preload-helper-BXl3LOEh.js";import"./index-DbyqvX_N.js";import"./useBreakpoint-DBaSuQQQ.js";import"./ActNoticeBlock--6ZTbFez.js";import"./formatAmount-BO0bCaMt.js";import"./directionLabel-CRze-WP6.js";import"./BellOutlined-DBiXdkLw.js";import"./AntdIcon-B8e_FEAo.js";import"./DownloadOutlined-qoht-QYR.js";import"./cameralStatus-D7S3xA3Z.js";import"./PrivateApp-BFO3_Tbx.js";import"./index-LRpAibSh.js";import"../remoteEntry.js";import"./index-BEDcFE4N.js";import"./SignatureContext-BIIScoJU.js";import"./registerCabinetApi-CKnIRFA1.js";import"./downloadFileByUrl-w19mXwt2.js";import"./LeftOutlined-zZTRbrqI.js";import"./PurePanel-CIovuaru.js";import"./index-BZy7ibvr.js";import"./index-DqejBB-o.js";import"./DeleteOutlined-A7wxyeiA.js";import"./index-YFykW8M_.js";import"./EyeOutlined-DGpwx6h2.js";import"./progress-DriKEix0.js";import"./InboxOutlined-C26zLnfQ.js";import"./signXmlAsCms-DKY4WdVM.js";import"./index-CPNG8-3L.js";import"./EllipsisOutlined-fLaExTxN.js";import"./PlusOutlined-DJbYRZlH.js";import"./isMobile-B_S5qVvp.js";import"./index-CwLtvCkV.js";import"./Sider-CaqjhNAo.js";import"./index-D10blwUV.js";import"./useForm-Cmblz3t1.js";function Pe(o,e){const u=new Blob([`<html><head><meta charset="utf-8"></head><body>${o}</body></html>`],{type:"application/msword"}),g=URL.createObjectURL(u),p=document.createElement("a");p.href=g,p.download=e,p.click(),URL.revokeObjectURL(g)}const K=o=>o?ke(o).format("DD.MM.YYYY HH:mm:ss"):"—";function $r(){const{disagreementId:o}=de(),{t:e}=me("cameral"),u=ue(),g=ze("disagreements"),p=De(),{data:f,isFetching:m,isError:W,error:U}=pe(o,{skip:!o}),[M,F]=ge(),[H,Y]=he(),[G,J]=fe(),[Q,q]=xe(),[V]=je(),[Z]=be(),{data:X}=Ce(),[ee]=_e(),[re,v]=x.useState(!1),[k,L]=x.useState(""),[w,N]=x.useState(!1),[ae,h]=x.useState(!1),[te,D]=x.useState(!1),s=f,t=s?.disagreement,i=t?.id,j=t?.attach_id!=null,S=t?.attach_file??(t?.file_items??[]).find(a=>a.file_id===t?.attach_id),b=!!S?.signed,R=ye(o,{skip:!o||j}),A=R.data?.html,B=async()=>{if(i!=null)try{const a=await M({id:i}).unwrap();a.attach_id!=null&&a.status!=="300"?h(!0):n.success(e("disagreement.approveSuccess"))}catch(a){n.error(d(a)??e("disagreement.approveError"))}},se=async()=>{if(!(i==null||t?.attach_id==null)){D(!0);try{const a=await Fe(t.attach_url),z=new File([a],`cameral_disagreement_${t.attach_id}.pdf`,{type:"application/pdf"}),ce=await Ie(z,X);await V({id:i,xml_data:ce}).unwrap()}catch(a){n.error(Te(a)??d(a)??e("filesTable.signError")),D(!1);return}try{await M({id:i}).unwrap(),n.success(e("disagreement.approveSuccess")),h(!1)}catch(a){n.error(d(a)??e("disagreement.approveError"))}finally{D(!1)}}},ie=async()=>{if(i!=null){if(!k.trim()){N(!0);return}try{await H({id:i,cause:k.trim()}).unwrap(),n.success(e("disagreement.rejectSuccess")),v(!1),L("")}catch(a){n.error(d(a)??e("disagreement.rejectError"))}}},ne=async()=>{if(i!=null)try{await G(i).unwrap(),n.success(e("disagreementCard.cancelApproveSuccess"))}catch(a){n.error(d(a)??e("disagreement.approveError"))}},C=s?.notice.id?`/cabinet/cameral/notices/${s.notice.id}/disagreement`:null,oe=async()=>
1{if(i!=null)try{await Q(i).unwrap(),n.success(e("disagreement.recallSuccess")),C&&u(C)}catch(a){n.error(d(a)??e("disagreement.recallError"))}},le=async a=>{if(i!=null)try{await ee({id:i,file_id:a}).unwrap(),n.success(e("filesTable.deleteSuccess"))}catch(z){n.error(d(z)??e("filesTable.deleteError"))}};return r.jsxs("div",{className:"container mx-auto p-6",children:[r.jsx(Le,{items:[{title:r.jsx(P,{to:"/cabinet",children:e("breadcrumb.home")})},{title:r.jsx(P,{to:"/cabinet/cameral",children:e("disagreementCard.breadcrumbJournal")})},{title:s?.notice?.id?e("disagreementCard.breadcrumbNotice",{number:s.notice.notice_number??s.notice.id}):e("disagreementCard.breadcrumbNotice",{number:"—"})},{title:e("disagreementCard.title",{number:t?.id??o})}]}),W&&r.jsx(E,{className:"mt-6",type:"error",showIcon:!0,message:d(U)??e("disagreementCard.loadError")}),m&&!s&&r.jsx(ve,{active:!0,className:"mt-6"}),s&&r.jsxs(r.Fragment,{children:[r.jsx(we,{notice:s.notice,showNoticeData:!1}),r.jsx(_,{className:"mt-6",title:e("disagreementCard.dataBlock"),children:r.jsxs(l,{colon:!1,children:[r.jsx(l.Item,{label:e("disagreementCard.disagreementNumber"),children:t?.id??"—"}),r.jsx(l.Item,{label:e("disagreementCard.noticeNumber"),children:s.notice.notice_number??"—"}),r.jsx(l.Item,{label:e("disagreementCard.noticeSent"),children:K(s.notice.send_date)}),r.jsx(l.Item,{label:e("disagreementCard.authorityName"),children:s.notice.authority_name_ru??"—"}),r.jsx(l.Item,{label:e("disagreementCard.violations"),children:s.notice.attach_id!=null?r.jsx(c,{type:"link",size:"small",className:"!px-0",onClick:()=>Me(s.notice.attach_url).catch(a=>n.error(d(a)??e("card.downloadNoticeError"))),children:e("card.downloadNotice")}):"—"}),r.jsx(l.Item,{label:e("disagreementWizard.authorFio"),children:t?.author_fio??"—"}),r.jsx(l.Item,{label:e("disagreementCard.disagreementFile"),children:t?.attach_id!=null?r.jsx(c,{type:"link",className:"p-0",onClick:()=>Ee(t.attach_url,`${e("disagreementCard.title",{number:t.id})}.pdf`).catch(()=>n.error(e("attachments.downloadError"))),children:e("disagreementCard.downloadFile")}):A?r.jsx(c,{type:"link",className:"p-0",onClick:()=>Pe(A,`cameral_dis_${t?.id}.doc`),children:e("disagreementCard.downloadDraftDoc")}):R.isError?r.jsx(y.Text,{type:"warning",children:d(R.error)??e("disagreementCard.downloadDocError")}):r.jsx(y.Text,{type:"secondary",children:e("disagreementCard.noFileYet")})}),r.jsx(l.Item,{label:e("disagreementCard.status"),children:r.jsx(Ne,{status:t?.status,statusNameRu:t?.status_name_ru})}),r.jsx(l.Item,{label:e("disagreementCard.sentAt"),children:K(t?.send_date)})]})}),s.profile_items.map(a=>r.jsxs(_,{className:"mt-6",children:[r.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(Se,{riskProfileId:a.risk_profile_id,map:p,index:a.profile_number??void 0}),r.jsx("div",{className:"text-sm text-red-500",children:e("disagreementCard.profileViolationRecorded")})]}),r.jsxs(T,{color:"red",children:["#",a.profile_number??a.profile_id]})]}),r.jsx(I,{labelRu:e("disagreementWizard.violationRu"),labelKz:e("disagreementWizard.violationKz"),ru:a.violation_ru,kz:a.violation_kz,fromNotice:!0}),r.jsx(I,{labelRu:e("disagreementWizard.groundsRu"),labelKz:e("disagreementWizard.groundsKz"),ru:a.grounds_ru,kz:a.grounds_kz}),r.jsx(I,{labelRu:e("disagreementWizard.docsRu"),labelKz:e("disagreementWizard.docsKz"),ru:a.docs_ru,kz:a.docs_kz})]},a.profile_id)),r.jsx(_,{className:"mt-6",title:e("disagreementCard.approverBlock"),children:r.jsx(l,{colon:!1,children:r.jsx(l.Item,{label:e("disagreementCard.approver"),children:t?.current_approver_fio??"—"})})}),r.jsx(_,{className:"mt-6",title:e("disagreementCard.filesBlock"),
1children:r.jsx(O,{items:t?.file_items??[],canEdit:s.can_edit_files,onAttach:i!=null?async a=>{await Z({id:i,file_id:a}).unwrap()}:void 0,onDetach:i!=null?le:void 0})}),t?.rejected_cause&&r.jsx(E,{className:"mt-6",type:"error",showIcon:!0,message:e("disagreement.rejectedCauseLabel"),description:t.rejected_cause}),s.can_approve&&j&&!b&&r.jsx(E,{className:"mt-6",type:"info",showIcon:!0,message:e("disagreementCard.prepared")}),r.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2",children:[r.jsxs(c,{onClick:()=>u(g),children:["← ",e("disagreementCard.backToList")]}),s.can_edit&&C&&r.jsx(c,{onClick:()=>u(C),children:e("disagreementCard.edit")}),s.can_recall&&r.jsx(c,{loading:q.isLoading,onClick:oe,children:e("disagreement.recall")}),s.can_approve&&(j?r.jsx(c,{loading:J.isLoading,disabled:b,onClick:ne,children:e("disagreementCard.cancelApprove")}):r.jsx(c,{danger:!0,onClick:()=>v(!0),children:e("disagreement.reject")})),s.can_approve&&r.jsx(c,{type:"primary",loading:F.isLoading,onClick:j?()=>h(!0):B,children:e("disagreementCard.approve")})]})]}),r.jsxs($,{open:re,title:e("disagreement.rejectTitle"),okText:e("disagreement.reject"),cancelText:e("disagreement.cancel"),okButtonProps:{danger:!0},confirmLoading:Y.isLoading,onOk:ie,onCancel:()=>{v(!1),N(!1)},children:[r.jsx(y.Text,{children:e("disagreement.rejectCauseLabel")}),r.jsx(Ae.TextArea,{className:"mt-2",rows:4,value:k,status:w?"error":void 0,placeholder:e("disagreement.rejectCausePlaceholder"),onChange:a=>{L(a.target.value),w&&a.target.value.trim()&&N(!1)}}),w&&r.jsx(y.Text,{type:"danger",className:"mt-1 block",children:e("disagreement.rejectCauseRequired")})]}),r.jsx($,{open:ae,width:640,title:e("disagreementCard.signModalTitle"),onCancel:()=>h(!1),footer:r.jsxs(Be,{children:[r.jsx(c,{onClick:()=>h(!1),children:e("disagreementCard.signModalClose")}),r.jsx(c,{type:"primary",disabled:!b,loading:F.isLoading,onClick:async()=>{await B(),h(!1)},children:e("disagreementCard.signModalConfirm")})]}),children:r.jsx(O,{compact:!0,items:S?[S]:[],canEdit:!b,onSign:se,signingFileId:te?t?.attach_id??null:null})})]})}function I({labelRu:o,labelKz:e,ru:u,kz:g,fromNotice:p=!1}){const f=[{key:"ru",label:o,tag:r.jsx(T,{color:"blue",children:"RU"}),html:u},{key:"kz",label:e,tag:r.jsx(T,{color:"orange",children:"KAZ"}),html:g}].filter(m=>!!m.html);return f.length===0?null:r.jsx("div",{className:`mb-4 grid gap-3 ${f.length>1?"md:grid-cols-2":""}`,children:f.map(m=>r.jsxs("div",{className:"flex h-full flex-col gap-1",children:[r.jsxs("span",{className:"flex-1 text-sm",children:[m.label," ",m.tag]}),r.jsx("div",{className:`rounded border bg-white p-2 ${p?"border-neutral-300":"border-neutral-200"}`,children:r.jsx(Re,{html:m.html,inline:!0})})]},m.key))})}export{$r 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.