business.b77c23c4.js 3.8 KB

1
  1. import{Z as F,cr as B,_ as w,d as I,m,cp as z,n as T,r as u,o as _,A as g,x as a,h as i,u as l,H as P,D as v,a as E,ce as V}from"./index.56449854.js";import{s as k}from"./search.config.96435a7a.js";import{a as b,D as $}from"./demand-modify-modal.8681fe49.js";import{u as q}from"./use-page-search.59eb5443.js";import"./lodash.0da4bba2.js";import{u as H}from"./useBusinessQuery.85cdd2fe.js";import O from"./exec-modal.93691983.js";import"./createRequset.56e9fc42.js";import"./isBeyondTime.ab735625.js";const U=[{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"}],K=[{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=j.find(({value:o})=>String(o)===String(r.exec_type));return F(B,{type:t.type||""},{default:()=>t.label||"--"})}},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:r}){const t=U.find(({value:o})=>String(o)===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"}],L={columns:K,showTitle:!1,superUserNoAction:!1,apis:{httpList:b.list}},y="subscribes",Z=I({__name:"business",setup(r){const{searchConfig:t}=H({sourceConfig:k,queryField:"companyNo"}),o=m(null),h=m(null),S=m(null),{hasPermissionWithCode:C}=z(y),x=m(k),D={pageSearchHook:()=>q(void 0,void 0,t)};async function M(c){const e=await b.delete_exec({id:c});e.code===1?o.value.onSearch():V.warning(e.message)}async function A(){const{data:c,code:e}=await b.exce_list({size:1e4}),p=x.value.formItems.findIndex(({field:s})=>s==="exec_id");Number(e)===1&&p>=0&&(x.value.formItems[p].options=c.list.map(({id:s,exec_name:f})=>({value:s,label:f})))}return T(()=>A()),(c,e)=>{const p=u("el-button"),s=u("ElButton"),f=u("el-link"),N=u("el-popconfirm"),R=u("page-container"),W=u("page-auth");return _(),g(W,{"page-name":y,all:!1},{default:a(()=>[i(R,{"search-config":l(t),hooks:D,"page-name":y,"get-content-ref":n=>o.value=n,"content-config":l(L),lockKey:"companyNo"},{content_header:a(()=>[i(p,{type:"",size:"mini",onClick:e[0]||(e[0]=n=>{var d;return(d=h.value)==null?void 0:d.onDisplay({})})},{default:a(()=>[P("\u67E5\u770B\u6267\u884C\u7C7B\u578B\u8BF4\u660E")]),_:1})]),content_action:a(n=>[String(n.status)==="2"&&l(C)("19")?(_(),g(f,{key:0,href:n.down_url,target:"_blank",underline:!1},{default:a(()=>[i(s,{link:"",size:"small",type:"primary",icon:l(v)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):E("v-if",!0),l(C)("17")&&(String(n.status)==="3"||String(n.status)==="1")?(_(),g(N,{key:1,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u6761\u8BB0\u5F55?",onConfirm:d=>M(n.id)},{reference:a(()=>[i(s,{link:"",size:"small",type:"primary",icon:l(v)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):E("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"]),i($,{"is-business":!0,ref_key:"demandModifyModal",ref:S,onRefresh:e[1]||(e[1]=n=>o.value.onSearch())},null,512),i(O,{ref_key:"execModalRef",ref:h},null,512)]),_:1})}}});var se=w(Z,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/subscribe/subscribes/components/business.vue"]]);export{se as default};