import{cl as W,Q as w,Z as F,cr as b,_ as z,d as I,cp as O,m as y,r,o as g,A as _,x as s,h as a,u as p,H as v,D as x,a as E,ce as P}from"./index.56449854.js";import{s as T}from"./search.config.0b9ec04c.js";import{a as k,D as H}from"./demand-modify-modal.6d7bf3a5.js";import{u as V}from"./use-page-search.59eb5443.js";import"./lodash.0da4bba2.js";import $ from"./exec-modal.db97abde.js";import"./isBeyondTime.ab735625.js";import"./createRequset.56e9fc42.js";function q(l){const{sourceConfig:e,queryField:o="relaComNo"}=l,u=JSON.parse(JSON.stringify(e)),i=W(""),c=w(()=>i.value==="");return u.formItems=[...u.formItems,{noRest:!0,trigger:"change",field:o,placeholder:"\u4F9B\u5E94\u5546",type:"supplier-permission",onChange:f=>i.value=f}],{searchConfig:u,isHasCompany:c,companyNo:i}}const J=[{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"}],Q=[{value:1,label:"\u7ACB\u5373\u6267\u884C",type:""},{value:2,label:"\u5EF6\u8FDF\u6267\u884C",type:"warning"}],U=[{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:l}){const e=Q.find(({value:o})=>String(o)===String(l.exec_type));return F(b,{type:e.type||""},{default:()=>e.label||"--"})}},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:l}){const e=J.find(({value:o})=>String(o)===String(l.status));return F(b,{type:e.type||""},{default:()=>e.label||"--"})}},{prop:"companyName",label:"\u4F9B\u5E94\u5546\u540D\u79F0",minWidth:"155px"},{prop:"apply_name",label:"\u7533\u8BF7\u4EBA",minWidth:"80px"},{label:"\u64CD\u4F5C",fixed:"right",width:90,slot:"operation"}],j={columns:U,showTitle:!1,superUserNoAction:!1,apis:{httpList:k.list}},C="supplierBusinessAnalysis",K=I({__name:"business",setup(l){const{searchConfig:e}=q({sourceConfig:T,queryField:"companyNo"}),{hasPermissionWithCode:o}=O(C),u=y(null),i=y(null),c=y(null),f={pageSearchHook:()=>V(void 0,void 0,e)};async function S(m){const n=await k.delete_exec({id:m});n.code===1?u.value.onSearch():P.warning(n.message)}function D(){var n;const{companyNo:m}=u.value.getBasicParams();(n=c.value)==null||n.onDisplay(m)}return(m,n)=>{const h=r("el-button"),B=r("ElButton"),N=r("el-link"),A=r("el-popconfirm"),M=r("page-container"),R=r("page-auth");return g(),_(R,{"page-name":C,all:!0},{default:s(()=>[a(M,{"search-config":p(e),hooks:f,"page-name":C,"get-content-ref":t=>u.value=t,"content-config":p(j),lockKey:"companyNo"},{content_header:s(()=>[a(h,{type:"",size:"mini",onClick:n[0]||(n[0]=t=>{var d;return(d=i.value)==null?void 0:d.onDisplay({})})},{default:s(()=>[v("\u67E5\u770B\u6267\u884C\u7C7B\u578B\u8BF4\u660E")]),_:1}),a(h,{type:"primary",size:"mini",onClick:D},{default:s(()=>[v("\u6DFB\u52A0")]),_:1})]),content_action:s(t=>[String(t.status)==="2"&&p(o)("10")?(g(),_(N,{key:0,href:t.down_url,underline:!1,target:"_blank"},{default:s(()=>[a(B,{link:"",size:"small",type:"primary",icon:p(x)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):E("v-if",!0),p(o)("8")&&(String(t.status)==="3"||String(t.status)==="1")?(g(),_(A,{key:1,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u6761\u8BB0\u5F55?",onConfirm:d=>S(t.id)},{reference:s(()=>[a(B,{link:"",size:"small",type:"primary",icon:p(x)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):E("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"]),a(H,{ref_key:"demandModifyModal",ref:c,"is-business":!0,onRefresh:n[1]||(n[1]=t=>u.value.onSearch())},null,512),a($,{ref_key:"execModalRef",ref:i},null,512)]),_:1})}}});var oe=z(K,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/subscribe/supplierBusinessAnalysis/components/business.vue"]]);export{oe as default};