import{al as s,a$ as l,_ as k,d as x,n as P,bx as R,w,r as p,o as g,G as _,C as c,j as d,l as i,J as U,a as W}from"./index.js";import{j as N,k as O,l as f,o as m,m as E}from"./index.13ae5653.js";import{u as j}from"./use-page-search.f7bc460e.js";import T from"./upperModal.5ff69b.js";import"./validator.92b8f4b2.js";import"./useTask.8a645393.js";const I=[{prop:"code",label:"\u7F16\u53F7",minWidth:"160"},{prop:"name",label:"\u4F9B\u5E94\u5546\u540D\u79F0",minWidth:"200"},{prop:"status",label:"\u72B6\u6001",minWidth:"60",cellRenderer({row:o}){var u;return s(l,{type:((u=f.find(({value:e})=>e===String(o.status)))==null?void 0:u.type)||"info"},{default:()=>{var e;return((e=f.find(({value:t})=>t===String(o.status)))==null?void 0:e.label)||"--"}})}},{prop:"ocr_status",label:"\u8425\u4E1A\u6267\u7167\u8BC6\u522B\u72B6\u6001",width:"120",cellRenderer({row:o}){var u;return s(l,{type:((u=m.find(({value:e})=>e===String(o.ocr_status)))==null?void 0:u.type)||"info"},{default:()=>{var e;return((e=m.find(({value:t})=>t===String(o.ocr_status)))==null?void 0:e.label)||"--"}})}},{prop:"is_upgrade",label:"\u662F\u5426\u5347\u7EA7\u4E3A\u4E1A\u52A1\u516C\u53F8",width:"130",cellRenderer({row:o}){var u;return s(l,{type:((u=E.find(({value:e})=>e===String(o.is_upgrade)))==null?void 0:u.type)||"info"},{default:()=>{var e;return((e=E.find(({value:t})=>t===String(o.is_upgrade)))==null?void 0:e.label)||"--"}})}},{prop:"legaler",label:"\u6CD5\u4EBA",minWidth:"80"},{prop:"person",label:"\u8D1F\u8D23\u4EBA",minWidth:"100"},{prop:"creater",label:"\u521B\u5EFA\u4EBA",minWidth:"80"},{prop:"addtime",label:"\u521B\u5EFA\u65F6\u95F4",width:"145"},{prop:"",label:"\u64CD\u4F5C",fixed:"right",width:"140px",_noset_:!0,slot:"operation"}],V={title:"\u516C\u53F8\u8D26\u53F7\u89D2\u8272\u67E5\u8BE2",columns:I,apis:{httpList:N,httpAdd:!0,httpStatus:O,httpUpdate:!0}},B={formItems:[{field:"create_timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"}},{field:"status",type:"select",options:f,placeholder:"\u72B6\u6001"},{field:"ocr_status",type:"select",options:m,placeholder:"\u8425\u4E1A\u6267\u7167\u8BC6\u522B\u72B6\u6001"},{type:"input",field:"name",placeholder:"\u4F9B\u5E94\u5546"},{type:"input",field:"creater",placeholder:"\u521B\u5EFA\u4EBA"},{type:"input",field:"company_name",placeholder:"\u521B\u5EFA\u4EBA\u90E8\u95E8"},{type:"input",field:"person",placeholder:"\u8D1F\u8D23\u4EBA"}]},$=x({__name:"index",setup(o){const u="supplier",e=P(),t=R({visible:!1,code:""}),h=w(null),F={pageSearchHook:()=>j(void 0,void 0,B)},v={content:{create:()=>e.push("/supplierSettings/supplierDetail?type=create"),update:({code:r})=>e.push("/supplierSettings/supplierDetail?id="+r+"&type=update"),preview:({code:r})=>e.push("/supplierSettings/supplierDetail?id="+r+"&type=preview")}};function y(r){t.code=r,t.visible=!0}return(r,a)=>{const b=p("ElButton"),A=p("ElTooltip"),C=p("PageContainer"),S=p("PageAuth");return g(),_(S,{pageName:u},{default:c(()=>[d(C,{hooks:F,events:v,"search-config":i(B),"content-config":i(V),"get-content-ref":n=>h.value=n},{content_action:c(({is_upgrade:n,code:D})=>[String(n)==="0"?(g(),_(A,{key:0,placement:"top",content:"\u5347\u7EA7"},{default:c(()=>[d(b,{onClick:G=>y(D),style:{transform:"rotate(-90deg)"},icon:i(U)("unExpand"),type:"primary",link:""},null,8,["onClick","icon"])]),_:2},1024)):W("v-if",!0)]),_:1},8,["search-config","content-config","get-content-ref"]),d(T,{onRefresh:a[0]||(a[0]=()=>{var n;return(n=h.value)==null?void 0:n.onSearch()}),visible:i(t).visible,"onUpdate:visible":a[1]||(a[1]=n=>i(t).visible=n),code:i(t).code},null,8,["visible","code"])]),_:1})}}});var K=k($,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/supplier/index.vue"]]);export{K as default};
