import{Z as F,cp as b,_ as R,d as z,d1 as I,m as d,cU as P,w as T,r as s,o as f,A as _,x as o,h as u,u as l,H as v,D as x,a as k,cc as U}from"./index.aedafc85.js";import{s as V}from"./search.config.904af058.js";import{a as E,D as $}from"./demand-modify-modal.2ae74f8c.js";import{u as H}from"./use-page-search.76f1460d.js";import"./lodash.93a5b9b5.js";import{u as O}from"./useBusinessQuery.72d3b0cf.js";import j from"./exec-modal.ffbed8aa.js";import"./createRequset.72613757.js";import"./isBeyondTime.caea2fbe.js";const q=[{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"}],K=[{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 t=K.find(({value:a})=>String(a)===String(r.exec_type));return F(b,{type:t.type||""},{default:()=>t.label||"--"})}},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:r}){const t=q.find(({value:a})=>String(a)===String(r.status));return F(b,{type:t.type||""},{default:()=>t.label||"--"})}},{prop:"companyName",label:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",minWidth:"155px"},{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}},g="procureDetail",G=z({__name:"business",setup(r){const{searchConfig:t}=O({sourceConfig:V,queryField:"companyNo"}),a=I(),p=d(null),y=d(null),h=d(null),{hasPermissionWithCode:C}=P(g),D={pageSearchHook:()=>H(void 0,void 0,t)};async function S(i){const e=await E.delete_exec({id:i});e.code===1?p.value.onSearch():U.warning(e.message)}T(()=>a.level,i=>{const{formItems:e}=t;e.findIndex(({field:c})=>c==="depart_id"),a.info},{immediate:!0});function A(){var e;const{companyNo:i}=p.value.getBasicParams();(e=h.value)==null||e.onDisplay(i)}return(i,e)=>{const c=s("el-button"),B=s("ElButton"),M=s("el-link"),N=s("el-popconfirm"),W=s("page-container"),w=s("page-auth");return f(),_(w,{"page-name":g,all:!1},{default:o(()=>[u(W,{"search-config":l(t),hooks:D,"page-name":g,"get-content-ref":n=>p.value=n,"content-config":l(Z),lockKey:"companyNo"},{content_header:o(()=>[u(c,{type:"",size:"mini",onClick:e[0]||(e[0]=n=>{var m;return(m=y.value)==null?void 0:m.onDisplay({})})},{default:o(()=>[v("\u67E5\u770B\u6267\u884C\u7C7B\u578B\u8BF4\u660E")]),_:1}),u(c,{type:"primary",size:"mini",onClick:A},{default:o(()=>[v("\u6DFB\u52A0")]),_:1})]),content_action:o(n=>[String(n.status)==="2"&&l(C)("19")?(f(),_(M,{key:0,href:n.down_url,target:"_blank",underline:!1},{default:o(()=>[u(B,{link:"",size:"small",type:"primary",icon:l(x)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):k("v-if",!0),l(C)("17")&&(String(n.status)==="3"||String(n.status)==="1")?(f(),_(N,{key:1,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u6761\u8BB0\u5F55?",onConfirm:m=>S(n.id)},{reference:o(()=>[u(B,{link:"",size:"small",type:"primary",icon:l(x)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):k("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"]),u($,{"is-business":!0,ref_key:"demandModifyModal",ref:h,onRefresh:e[1]||(e[1]=n=>p.value.onSearch())},null,512),u(j,{ref_key:"execModalRef",ref:y},null,512)]),_:1})}}});var ae=R(G,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/subscribe/procureDetail/components/business.vue"]]);export{ae as default};
