import{Z as B,cp as F,_ as I,d as N,m as c,d1 as z,cU as T,w as U,r as s,o as f,A as _,x as o,h as a,u as i,H as x,D as b,a as k,cc as $}from"./index.aedafc85.js";import{s as g}from"./search.config.af5c0fae.js";import{a as E,D as P}from"./demand-modify-modal.ad3c35ca.js";import{u as V}from"./use-page-search.76f1460d.js";import H from"./exec-modal.89bf294c.js";import"./createRequset.72613757.js";import"./isBeyondTime.caea2fbe.js";const O=[{value:1,label:"\u5F85\u6267\u884C",type:"info"},{value:2,label:"\u6267\u884C\u5B8C\u6210",type:"success"},{value:3,label:"\u6267\u884C\u5931\u8D25",type:"danger"}],j=[{value:1,label:"\u7ACB\u5373\u6267\u884C",type:""},{value:2,label:"\u5EF6\u8FDF\u6267\u884C",type:"warning"}],L=[{prop:"exec_name",label:"\u4E1A\u52A1\u8868\u540D\u79F0",minWidth:"115px"},{prop:"start",label:"\u6570\u636E\u5F00\u59CB\u65F6\u95F4",minWidth:"155px"},{prop:"end",label:"\u6570\u636E\u7ED3\u675F\u65F6\u95F4",minWidth:"155px"},{prop:"updatetime",label:"\u72B6\u6001\u66F4\u65B0\u65F6\u95F4",minWidth:"155px"},{prop:"createtime",label:"\u521B\u5EFA\u65F6\u95F4",minWidth:"115px"},{prop:"exce_type",label:"\u6267\u884C\u7C7B\u578B",cellRenderer({row:r}){const n=j.find(({value:u})=>String(u)===String(r.exec_type));return B(F,{type:n.type||""},{default:()=>n.label||"--"})}},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:r}){const n=O.find(({value:u})=>String(u)===String(r.status));return B(F,{type:n.type||""},{default:()=>n.label||"--"})}},{prop:"apply_name",label:"\u7533\u8BF7\u4EBA",minWidth:"80px"},{label:"\u64CD\u4F5C",fixed:"right",width:90,slot:"operation"}],Z={columns:L,showTitle:!1,superUserNoAction:!1,apis:{httpList:E.list}},y="saleInvoice",q=N({__name:"all",setup(r){const n=c(null),u=c(null),v=z(),{hasPermissionWithCode:C}=T(y),m=c(null),S=c(g);U(()=>v.level,d=>{const{formItems:e}=S.value;e.findIndex(({field:p})=>p==="depart_id"),v.info},{immediate:!0});async function D(d){const e=await E.delete_exec({id:d});e.code===1?m.value.onSearch():$.warning(e.message)}const A={pageSearchHook:()=>V(void 0,void 0,g)};return(d,e)=>{const p=s("el-button"),h=s("ElButton"),M=s("el-link"),R=s("el-popconfirm"),w=s("page-container"),W=s("page-auth");return f(),_(W,{"page-name":y},{default:o(()=>[a(w,{hooks:A,"page-name":y,"search-config":i(g),"get-content-ref":t=>m.value=t,"content-config":i(Z)},{content_header:o(()=>[a(p,{type:"",size:"mini",onClick:e[0]||(e[0]=t=>{var l;return(l=n.value)==null?void 0:l.onDisplay({})})},{default:o(()=>[x("\u67E5\u770B\u6267\u884C\u7C7B\u578B\u8BF4\u660E")]),_:1}),a(p,{type:"primary",size:"mini",onClick:e[1]||(e[1]=t=>{var l;return(l=u.value)==null?void 0:l.onDisplay({})})},{default:o(()=>[x("\u6DFB\u52A0")]),_:1})]),content_action:o(t=>[String(t.status)==="2"&&i(C)("10")?(f(),_(M,{key:0,href:t.down_url,target:"_blank",underline:!1},{default:o(()=>[a(h,{link:"",size:"small",type:"primary",icon:i(b)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):k("v-if",!0),i(C)("8")&&(String(t.status)==="3"||String(t.status)==="1")?(f(),_(R,{key:1,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u6761\u8BB0\u5F55?",onConfirm:l=>D(t.id)},{reference:o(()=>[a(h,{link:"",size:"small",type:"primary",icon:i(b)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):k("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"]),a(P,{ref_key:"demandModifyModal",ref:u,onRefresh:e[2]||(e[2]=t=>m.value.onSearch())},null,512),a(H,{ref_key:"execModalRef",ref:n},null,512)]),_:1})}}});var te=I(q,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/subscribe/saleInvoice/components/all.vue"]]);export{te as default};
