PageSourceSearch

https://zakup.gov.kz/assets/NewAnnualPlan-Dnes3qC9.js

js zakup.gov.kz collected 2026-10-09 16:56:47 UTC 6,937 bytes, 1 lines download raw bytes

1import{x as D,q as E,$ as U,r as f,m as h,j as a,a0 as O,G as P}from"./theme-3dfVej7W.js";import{G as q,N as G,K as V,O as $,P as B,s as W}from"./PrivateApp-BFO3_Tbx.js";import{p as z}from"./parseErrors-BsNA3L7K.js";import{F as t}from"./index-BzeA_MbD.js";import{B as K}from"./index-DljlvMzm.js";import{R as Q}from"./ArrowLeftOutlined-BgJ2ADM0.js";import{C as H}from"./index-BKUOnk1C.js";import{S as w}from"./AntdIcon-B8e_FEAo.js";import{C as J}from"./index-CwLtvCkV.js";import{P as X}from"./index-DqejBB-o.js";import{R as Z}from"./InfoCircleTwoTone-OJZVSewk.js";import{T as ee}from"./index-I1ZxXO3B.js";import{I as x}from"./index-CQ9iPbHV.js";import{D as ae}from"./index-D4v2P043.js";import{U as T}from"./index-YFykW8M_.js";import{R as ne}from"./InboxOutlined-C26zLnfQ.js";import{R as te}from"./FileTwoTone-Cek3T99P.js";import{M as re}from"./index-C016Db5J.js";import{F as se}from"./index-C86gn5Ct.js";import"./vite-preload-helper-BXl3LOEh.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"./purify.es-LQkvcK5U.js";import"./formatAmount-BO0bCaMt.js";import"./index-wH3ULS13.js";import"./PurePanel-CIovuaru.js";import"./useBreakpoint-DBaSuQQQ.js";import"./useForm-Cmblz3t1.js";import"./row-M1qaIYld.js";import"./index-CPNG8-3L.js";import"./EllipsisOutlined-fLaExTxN.js";import"./PlusOutlined-DJbYRZlH.js";import"./isMobile-B_S5qVvp.js";import"./index-C63dYVM1.js";import"./EyeOutlined-DGpwx6h2.js";import"./progress-DriKEix0.js";import"./Sider-CaqjhNAo.js";import"./index-D10blwUV.js";function Qe(){const{message:i,notification:C}=D.useApp(),{t:n}=E("plan"),s=q(),d=G(),g=U(),[l]=t.useForm(),j=t.useWatch("preliminary_plan",l),[F,m]=f.useState(!1),p=t.useWatch("planType",l),S=t.useWatch("year",l),[c,k]=f.useState([]),[v,{isLoading:_}]=V(),[R,{isLoading:b}]=$(),N=s.data?.find(e=>e.id===S)?.year,u=B({year:Number(N),act_type:Number(p)},{skip:!N||j||p===3}),A=async e=>{const r={year:e.year,preliminary_plan:e.preliminary_plan,plan_type:e.planType,act_number:e?.numberAct,act_date:e?.act_date?.format("YYYY-MM-DD"),act_file:e?.act_file_id,merge_preliminary_act_ids:e.preliminary_plan?[]:c};try{await R(r).unwrap(),C.success({message:n("annual.addPlan"),placement:"bottomRight",closable:!0}),g("../")}catch(o){i.error(z(o?.data))}},M=async e=>{const{file:r,onSuccess:o,onError:Y}=e;if(!r){i.error(n("annual.fileNotSelected"));return}try{const y=await W(r),I=await v({userfile:r,signature:y}).unwrap();l.setFieldsValue({act_file_id:I?.uuid}),o?.({act_file_id:I?.uuid},r),i.success(n("annual.signedUploaded"))}catch(y){Y?.(y),i.error(n("annual.signUploadError"))}},L=e=>Array.isArray(e)?e:e?.fileList;return f.useEffect(()=>{if(s.isSuccess&&s.data?.length){const e=h().year(),r=s.data.find(o=>o.year===e);r&&l.setFieldsValue({year:r.id})}},[s.isSuccess,s.data]),a.jsxs("div",{className:"space-y-12 max-w-[800px] m-auto",children:[a.jsx(K,{items:[{title:a.jsxs(O,{to:"../",children:[a.jsx(Q,{className:"mr-2"})," ",n("annual.plans")]})},{title:n("annual.createPlan")}]}),a.jsxs(t,{initialValues:{preliminary_plan:!1,planType:1},disabled:b||_,name:"annualPlanForm",onFinish:A,form:l,layout:"vertical",className:"space-y-6",children:[a.jsx(H,{title:n("annual.newPlan"),children:a.jsxs("div",{className:"space-y-4",children:[a.jsx(t.Item,{label:n("annual.financialYear"),name:"year",rules:[{required:!0,message:n("annual.requiredYear")}],children:a.jsx(w,{loading:s.isLoading,placeholder:n("annual.enterFinancialYear"),options:s.isSuccess?s.data?.filter(e=>e.year>=h().year()-1).map(e=>({value:e.id,label:e.year})):[]})}),a.jsx(t.Item,{label:n("annual.planType"),name:"planType",rules:[{required:!0,message:n("annual.requiredYear")}],children:a.jsx(w,{loading:d.isLoading,placeholder:n("annual.selectPlanType"),options:d.isSuccess?d.data.map(e=>({value:e.id,label:e.name})):[]})}),p!==3&&a.jsxs(a.Fragment,{children:[a.jsx(t.Item,{name:"preliminary_plan",valuePropName:"checked",children:a.jsxs(J,{children:["Предварительный план",a.jsx(X,{placement:"rightTop",overlayClassName:"shadow-xl rounded-lg",content:a.jsx(ee.Paragraph,{className:"w-60",children:"Предварительный годов ой план государственных закупок действует до утверждения..."}),title:n("annual.whenSelectAttribute"),children:a.jsx(Z,{className:"ml-2"})})]})}),!j&&a.jsx(t.Item,{label:n("annual.selectChangedPreliminary"),children:a.jsx(x,{readOnly:!0,placeholder:n("annual.selectChangedPreliminary"),value:c.length?`Выбранные акты: ${(u.data??[]).filter(e=>c.includes(e.id)).map(e=>e.act_number||e.id).join(", ")}`:"",onMouseDown:()=>m(!0)})})]}),a.jsx(t.Item,{label:n("annual.actNumber"),name:"numberAct",children:a.jsx(x,{placeholder:n("annual.enterActNumber")})}),a.jsx(t.Item,{label:n("annual.actDate"),name:"act_date",children:a.jsx(ae,{className:"w-full",placeholder:n("annual.enterDate"),disabledDate:e=>e&&e>h().endOf("day")})}),a.jsx(t.Item,{name:"act_file_id",noStyle:!0,children:a.jsx(x,{type:"hidden"})}),a.jsx(t.Item,{name:"act_file",label:n("annual.approvedPlanFile"),valuePropName:"fileList",getValueFromEvent:L,children:a.jsxs(T.Dragger,{onRemove:()=>{l.setFieldsValue({act_file_id:null})},disabled:_,listType:"picture",iconRender:()=>a.jsx(te,{twoToneColor:"#1677ff",style:{fontSize:20}}),showUploadList:{showRemoveIcon:!0},accept:".pdf,.doc,.docx",maxCount:1,customRequest:M,beforeUpload:e=>e.size/1024/1024<19?!0:(i.error("Файл должен быть меньше 20MB!"),T.LIST_IGNORE),children:[a.jsx("p",{className:"ant-upload-drag-icon",children:a.jsx(ne,{})}),a.jsx("p",{className:"ant-upload-text",children:n("annual.uploadClickDrop")}),a.jsx("p",{className:"ant-upload-hint",children:"Загрузите 1 файл в формате .PDF до 20 мегабайт"})]})})]})}),a.jsxs("div",{className:"flex gap-4 items-center justify-end",children:[a.jsx(P,{onClick:()=>g("../"),children:n("annual.cancel")}),a.jsx(P,{type:"primary",htmlType:"submit",loading:b,children:n("annual.save")})]})]}),a.jsx(re,{centered:!0,title:n("annual.mergePlans"),open:F,width:"80%",onOk:()=>m(!1),okText:n("annual.apply"),onCancel:()=>
1m(!1),cancelText:n("annual.close"),keyboard:!0,maskClosable:!0,children:a.jsx("div",{className:"border rounded-2xl pb-4 mt-2",children:a.jsx(se,{rowKey:"id",scroll:{y:600},pagination:!1,loading:u.isFetching,rowSelection:{selectedRowKeys:c,onChange:e=>k(e)},columns:[{title:"№",dataIndex:"id",key:"no"},{title:"Финансовый год",dataIndex:"year",key:"year"},{title:"№ акта",key:"act_no",render:e=>e?.act_number||"—"},{title:"Дата акта",key:"act_date",render:e=>e?.act_date||"—"},{title:"Пунктов плана",dataIndex:"points_cnt",key:"count"}],dataSource:u.data??[]})})})]})}export{Qe 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.