import{V as y,Z as u,d as v,e as w,r as T,ay as S,ac as M,c as P,o as H,w as N,j as c,l as n,G as I,X as R}from"./index-9PRMimni.js";import{B}from"./BasicForm-dL_oCSPM.js";import{u as C}from"./useForm-CKmgcynv.js";import{B as D}from"./Table-0PViRYCf.js";import{J as x}from"./vesselEquipmentDetails-CJeqdW1Z.js";import{_ as l}from"./index-DatBjkM3.js";import"./Render.vue_vue_type_script_lang-DKUYY0Zw.js";import"./SingleImageUpload-CNx4b9eC.js";import"./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";import"./componentSetting-DVhNDBTO.js";import"./ImageUpload-DUsnro3W.js";import"./vuedraggable.umd-Co2xEC3p.js";import"./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";import"./tabsView-BXskTdVh.js";import"./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js";import"./propTypes-CebMRUpe.js";import"./BasicSelect-C_uwzMkE.js";import"./BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js";import"./dictionary-BRse4lkf.js";import"./index-DkvzUEqh.js";import"./index-kKnqLkWM.js";import"./AutoComplete-Dv1Bqed4.js";import"./TreeSelect-BZh2DeCh.js";import"./usePageCache-DluHn7Yy.js";import"./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";import"./componentMap-CElCaWis.js";import"./format-DgF6KtHk.js";import"./omit-B2_8Y6O_.js";import"./_flatRest-DBrd2CHT.js";import"./flatten-DeoUZLdb.js";import"./print-CT_2hrjP.js";import"./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";import"./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";import"./useModal-CO65vga3.js";import"./useTimeout-BxFilWvD.js";import"./Flex-CTSf12gq.js";const{t}=y();function V(s={}){return{columns:[{title:t("equipmentLibrary.equipmentMainLibrary.tableNum"),key:"num",width:80,render:(e,p)=>p+1},{title:t("equipmentLibrary.equipmentMainLibrary.purchaseHistory.poNo"),key:"orderNo",width:160,render:e=>u("a",{href:"javascript:",onClick:()=>{s?.handleGoDetail(e)}},e.orderNo)},{title:t("equipmentLibrary.equipmentMainLibrary.purchaseHistory.poTitle"),key:"title",width:200},{title:t("equipmentLibrary.equipmentMainLibrary.purchaseHistory.poCategory"),key:"category",width:200,render:e=>u(l,{cacheKey:"material_category",dictValue:e.category})},{title:t("equipmentLibrary.equipmentMainLibrary.purchaseHistory.poStatus"),key:"approveStatus",width:200,render:e=>u(l,{cacheKey:"purchase_order_state",dictValue:e.approveStatus,optionType:"number"})},{title:t("equipmentLibrary.equipmentMainLibrary.purchaseHistory.requisitionNo"),key:"reqNo",width:200},{title:t("equipmentLibrary.equipmentMainLibrary.purchaseHistory.vendorName"),key:"vendorName",width:200}]}}const{t:d}=y();function F(){return{searchSchemas:[{field:"applyDate",component:"NDatePicker",label:d("equipmentLibrary.equipmentMainLibrary.purchaseHistory.poCreateDate"),componentProps:{type:"daterange",valueFormat:"yyyy-MM-dd"}},{field:"approveStatus",component:"BasicSelect",label:d("equipmentLibrary.equipmentMainLibrary.purchaseHistory.poStatus"),componentProps:{cacheKey:"purchase_order_state",block:!0}}]}}const ke=v({__name:"index",props:{selectedTreeItem:{}},setup(s){const o=s,e=w(),p=T(),{columns:h}=V({handleGoDetail:q}),{searchSchemas:b}=F(),[f,{getFieldsValue:_}]=C({gridProps:{cols:4},schemas:b,labelWidth:"auto",labelPlacement:"top",showAdvancedButton:!1});S(()=>o.selectedTreeItem,()=>{M(()=>{m()})},{immediate:!0,deep:!0});function q(i){e.push({name:"Add_PMS_PolistPage",query:{poId:i.id,type:"view"}})}function L(i,r){return x({...i,...r,productCode:o.selectedTreeItem?.code,model:o.selectedTreeItem?.model,shipId:o.selectedTreeItem?.shipId})}function m(i){p.value.restReload()}return(i,r)=>{const k=I,g=R;return H(),P(g,null,{default:N(()=>[c(n(B),{onRegister:n(f),onSubmit:r[0]||(r[0]=a=>m(!0)),onReset:r[1]||(r[1]=a=>m(!0))},null,8,["onRegister"]),c(k,{class:"mt-3 mb-4"}),c(n(D),{ref_key:"basicTableRef",ref:p,columns:n(h),request:a=>L(a,n(_)()),"row-key":a=>a.id,autoScrollX:!0,immediate:!1,"virtual-scroll":""},null,8,["columns","request","row-key"])]),_:1})}}});export{ke as default};
