import{am as C,db as k,aR as y,bb as _,bO as O,ae as Y,_ as $,d as j,x as i,ai as V,aM as W,p as q,W as G,bc as J,aZ as Z,r as d,aD as K,H as Q,m as n,o as b,G as g,D as r,l as s,J as D,M as B,a as w,bd as X}from"./index.js";import{d as ee,e as oe}from"./index.8d1ab27f.js";import ue from"./invoice-modal.16e6d5.js";import{u as h,w as te}from"./xlsx.ed122d16.js";import ne from"./index.e01589.js";import ae from"./choose-modal.d378b5.js";import"./index.47e512cd.js";import"./execl-upload.ab941f73.js";const le=[{type:"selection",width:40,align:"center",fixed:"left"},{label:"\u53D1\u7968\u7F16\u7801",prop:"InvCode",width:140},{label:"\u7A0E\u524D\u91D1\u989D",prop:"invoice_subtotal",width:100},{label:"\u7A0E\u540E\u91D1\u989D",prop:"invoice_total",width:100},{label:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:u,props:a})=>C(y,{size:a.size},{default:()=>{var l;return((l=k.find(m=>String(u.status)===String(m.value)))==null?void 0:l.label)||"--"}})},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",width:145,..._("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:145,..._("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:u}){return C(y,null,{default:()=>{var a;return((a=O.find(({value:l})=>l===u.invoice_type))==null?void 0:a.label)||"--"}})}},{label:"\u53D1\u7968\u53F7\u7801",width:110,prop:"invoice_number"},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:150,formatter:({addtime:u})=>Y(u).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:140}],se={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:le,apis:{httpDelete:ee,httpList:oe,httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,showDelete:({status:u})=>Number(u)<=3},A={formItems:[{field:"create_timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u65B0\u5EFA\u8D77\u59CB\u65F6\u95F4",endPlaceholder:"\u65B0\u5EFA\u7ED3\u675F\u65F6\u95F4"}},{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",options:k},{field:"supplierNo",type:"supplier-query"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},ie={\u53D1\u7968\u7C7B\u578B:"",\u5F00\u7968\u65E5\u671F:"",\u53D1\u7968\u53F7\u7801:"",\u53D1\u7968\u7A0E\u540E\u91D1\u989D:"",\u53D1\u7968\u4EE3\u7801:"",\u53D1\u7968\u7A0E\u524D\u91D1\u989D:"",\u6821\u9A8C\u7801:""},re=j({__name:"index",setup(u){const a="outputInvoicePool",l="/supply/outputInvoicePoolDetail",m=i([]),{isSuperUser:x}=V(),{hasPermissionWithCode:P}=W(a),c=i(null);i(!1);const{push:F}=q();G();const N=i(null),E=i(null),p=i({visible:!1,current:{}}),{run:pe,loading:R}=J({success:()=>{var o;Z.success("\u64A4\u9500\u6210\u529F"),(o=c.value)==null||o.onSearch()}}),S={pageSearchHook:()=>X(void 0,void 0,A)},I={content:{preview:({InvCode:o})=>F(`${l}?id=${o}`),create:()=>F(l)}};function M(){const o=h.book_new(),e=h.json_to_sheet([ie]);h.book_append_sheet(o,e,"sheet"),te(o,"\u53D1\u7968\u4FE1\u606F\u6A21\u677F.xlsx",{bookType:"xlsx"})}function T(o){p.value.current={...o},p.value.visible=!0}return(o,e)=>{const f=d("ElButton"),U=d("ElTooltip"),L=d("PageContainer"),z=d("PageAuth"),H=K("loading");return Q((b(),g(z,{pageName:a},{default:r(()=>[s(L,{hooks:S,events:I,contentConfig:n(se),"search-config":n(A),"get-content-ref":t=>c.value=t,onContentSelectChange:e[1]||(e[1]=t=>m.value=t)},{content_header:r(()=>[s(f,{size:"small",icon:n(D)("arrow-down-line"),onClick:M},{default:r(()=>[B("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u6A21\u677F")]),_:1},8,["icon"]),s(f,{size:"small",type:"primary",icon:n(D)("arrow-up-line"),onClick:e[0]||(e[0]=()=>E.value.onDisplay())},{default:r(()=>[B("\u4E0A\u4F20\u53D1\u7968\u4FE1\u606F ")]),_:1},8,["icon"])]),content_action:r(t=>[w(` <ElButton\r
          v-if="invStatus.includes(String(row.status))"\r
          link\r
          type="primary"\r
          :icon="useRenderIcon('scaletooriginal')"\r
          @click="() => invoiceModalRef.onDisplay(row)"\r
        />\r
        <ElTooltip \r
          v-if="row.status == '11' && hasPermissionWithCode('010') && row.has_account != 1" \r
          content="\u64A4\u9500\u56DE\u7968\u7533\u8BF7" \r
          placement="top"\r
        >\r
          <ElButton \r
            link \r
            type="primary" \r
            :icon="useRenderIcon('refresh')" \r
            @click="handleRefresh(row)" \r
          />\r
        </ElTooltip> `),s(U,{content:"\u7ED1\u5B9A\u516C\u53F8"},{default:r(()=>[n(P)("066")&&!n(x)?(b(),g(f,{key:0,link:"",type:"primary",icon:n(D)("home-filled"),onClick:v=>T(t)},null,8,["icon","onClick"])):w("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"]),s(ue,{ref_key:"invoiceModalRef",ref:N},null,512),s(ae,{visible:p.value.visible,"onUpdate:visible":e[2]||(e[2]=t=>p.value.visible=t),data:p.value.current,onRefresh:e[3]||(e[3]=t=>{var v;return(v=c.value)==null?void 0:v.onSearch()})},null,8,["visible","data"]),s(ne,{ref_key:"excelUploadInvRef",ref:E,onOnSuccess:e[4]||(e[4]=()=>c.value.onSearch())},null,512)]),_:1})),[[H,n(R)]])}}});var Ee=$(re,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supply/outputInvoicePool/index.vue"]]);export{Ee as default};
