index.95c514.js 5.4 KB

1
  1. import{am as B,db as x,aR as w,bb as k,bO as V,_ as W,d as j,x as a,ai as H,aM as q,p as G,W as J,bc as Z,aZ as K,r as v,aD as Q,H as X,m as t,o as F,G as b,D as p,l as n,J as f,M as A,a as C,bd as Y}from"./index.js";import{d as ee,e as ue}from"./index.2fb9f37c.js";import oe from"./invoice-modal.ad965b.js";import{u as g,w as te}from"./xlsx.ed122d16.js";import ne from"./index.7e9593.js";import ie from"./create-modal.fd3052.js";import ae from"./choose-modal.b6a665.js";import"./index.bf16817a.js";import"./execl-upload.7c83427b.js";import"./_rules.bde94d19.js";import"./global.9ad647c8.js";import"./index.1e471a82.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:l,props:i})=>B(w,{size:i.size},{default:()=>{var s;return((s=x.find(D=>String(l.status)===String(D.value)))==null?void 0:s.label)||"--"}})},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",width:145,...k("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:145,...k("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:l}){return B(w,null,{default:()=>{var i;return((i=V.find(({value:s})=>s===l.invoice_type))==null?void 0:i.label)||"--"}})}},{label:"\u53D1\u7968\u53F7\u7801",width:110,prop:"invoice_number"},{label:"\u5907\u6CE8",width:150,prop:"remark"},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:150},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:140}],se={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:le,apis:{httpDelete:ee,httpList:ue,httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,showDelete:({status:l})=>Number(l)<=3},N={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:x},{field:"supplierNo",type:"supplier-query"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},re={\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:""},pe=j({__name:"index",setup(l){const i="inputInvoicePool",s="/purchase/inputInvoicePoolDetail",D=a([]),{isSuperUser:P}=H(),{hasPermissionWithCode:y}=q(i),c=a(null);a(!1);const{push:S}=G();J();const E=a(null),_=a(null),h=a(!1),d=a({visible:!1,current:{companyNo:"",supplierNo:"",companyName:"",supplierName:""}}),{run:ce,loading:I}=Z({success:()=>{var o;K.success("\u64A4\u9500\u6210\u529F"),(o=c.value)==null||o.onSearch()}}),R={pageSearchHook:()=>Y(void 0,void 0,N)},U={content:{preview:({InvCode:o})=>S(`${s}?id=${o}`),create:()=>h.value=!0}};function T(){const o=g.book_new(),e=g.json_to_sheet([re]);g.book_append_sheet(o,e,"sheet"),te(o,"\u53D1\u7968\u4FE1\u606F\u6A21\u677F.xlsx",{bookType:"xlsx"})}function M(o){d.value.current={...o},d.value.visible=!0}return(o,e)=>{const m=v("ElButton"),L=v("ElTooltip"),$=v("PageContainer"),z=v("PageAuth"),O=Q("loading");return X((F(),b(z,{pageName:i},{default:p(()=>[n($,{hooks:R,events:U,contentConfig:t(se),"search-config":t(N),"get-content-ref":u=>c.value=u,onContentSelectChange:e[1]||(e[1]=u=>D.value=u)},{content_header:p(()=>[n(m,{size:"small",icon:t(f)("arrow-down-line"),onClick:T},{default:p(()=>[A("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u6A21\u677F")]),_:1},8,["icon"]),t(y)("033")?(F(),b(m,{key:0,size:"small",type:"primary",icon:t(f)("arrow-up-line"),onClick:e[0]||(e[0]=()=>_.value.onDisplay())},{default:p(()=>[A("\u4E0A\u4F20\u53D1\u7968\u4FE1\u606F ")]),_:1},8,["icon"])):C("v-if",!0)]),content_action:p(u=>[C(` v-if="(String(row.status) === '1' || String(row.status) === '2' || String(row.status) === '5') && hasPermissionWithCode('006')" `),n(m,{link:"",type:"primary",icon:t(f)("scaletooriginal"),onClick:()=>E.value.onDisplay({...u,invoiceNumber:u.invoice_number})},null,8,["icon","onClick"]),n(L,{content:"\u7ED1\u5B9A\u516C\u53F8"},{default:p(()=>[t(y)("066")&&!t(P)&&String(u.status)==="1"?(F(),b(m,{key:0,link:"",type:"primary",icon:t(f)("home-filled"),onClick:r=>M(u)},null,8,["icon","onClick"])):C("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"]),n(oe,{ref_key:"invoiceModalRef",ref:E},null,512),n(ae,{data:d.value.current,visible:d.value.visible,"onUpdate:visible":e[2]||(e[2]=u=>d.value.visible=u),onRefresh:e[3]||(e[3]=u=>{var r;return(r=c.value)==null?void 0:r.onSearch()})},null,8,["data","visible"]),n(ie,{visible:h.value,"onUpdate:visible":e[4]||(e[4]=u=>h.value=u),onRefresh:e[5]||(e[5]=u=>{var r;return(r=c.value)==null?void 0:r.onSearch()})},null,8,["visible"]),n(ne,{ref_key:"excelUploadInvRef",ref:_,onOnSuccess:e[6]||(e[6]=()=>c.value.onSearch())},null,512)]),_:1})),[[O,t(I)]])}}});var _e=W(pe,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/purchase/inputInvoicePool/index.vue"]]);export{_e as default};