1 |
- import{af as B,ez as P,ce as w,cA as _,db as O,_ as V,d as j,n as i,ab as H,c9 as W,k as q,O as G,cB as J,cm as K,r as f,aw as Q,B as X,i as t,o as C,A as h,y as p,h as n,D,H as k,a as b,cC as Y}from"./index.js";import{d as Z,e as ee}from"./index.f8570968.js";import ue from"./invoice-modal.aa7984.js";import{u as y,w as oe}from"./xlsx.ed122d16.js";import te from"./index.20a102.js";import ne from"./create-modal.da1199.js";import ie from"./choose-modal.abb805.js";import"./index.25c063e4.js";import"./execl-upload.f811ec24.js";import"./_rules.bde94d19.js";import"./global.9ad647c8.js";import"./index.249f7662.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:a})=>B(w,{size:a.size},{default:()=>{var s;return((s=P.find(m=>String(l.status)===String(m.value)))==null?void 0:s.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:l}){return B(w,null,{default:()=>{var a;return((a=O.find(({value:s})=>s===l.invoice_type))==null?void 0:a.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}],ae={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:le,apis:{httpDelete:Z,httpList:ee,httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,showDelete:({status:l})=>Number(l)<=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:P},{field:"supplierNo",type:"supplier-query"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},se={\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:""},N="inputInvoicePool",re="/purchase/inputInvoicePoolDetail",pe=j({__name:"index",setup(l){const a=i([]),{isSuperUser:s}=H(),{hasPermissionWithCode:m}=W(N),c=i(null);i(!1);const{push:S}=q();G();const g=i(null),E=i(null),F=i(!1),d=i({visible:!1,current:{companyNo:"",supplierNo:"",companyName:"",supplierName:""}}),{run:ce,loading:x}=J({success:()=>{var o;K.success("\u64A4\u9500\u6210\u529F"),(o=c.value)==null||o.onSearch()}}),I={pageSearchHook:()=>Y(void 0,void 0,A)},R={content:{preview:({InvCode:o})=>S(`${re}?id=${o}`),create:()=>F.value=!0}};function T(){const o=y.book_new(),e=y.json_to_sheet([se]);y.book_append_sheet(o,e,"sheet"),oe(o,"\u53D1\u7968\u4FE1\u606F\u6A21\u677F.xlsx",{bookType:"xlsx"})}function U(o){d.value.current={...o},d.value.visible=!0}return(o,e)=>{const v=f("ElButton"),M=f("ElTooltip"),z=f("PageContainer"),L=f("PageAuth"),$=Q("loading");return X((C(),h(L,{pageName:N},{default:p(()=>[n(z,{hooks:I,events:R,contentConfig:t(ae),"search-config":t(A),"get-content-ref":u=>c.value=u,onContentSelectChange:e[1]||(e[1]=u=>a.value=u)},{content_header:p(()=>[n(v,{size:"small",icon:t(D)("arrow-down-line"),onClick:T},{default:p(()=>e[7]||(e[7]=[k("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u6A21\u677F")])),_:1},8,["icon"]),t(m)("033")?(C(),h(v,{key:0,size:"small",type:"primary",icon:t(D)("arrow-up-line"),onClick:e[0]||(e[0]=()=>E.value.onDisplay())},{default:p(()=>e[8]||(e[8]=[k("\u4E0A\u4F20\u53D1\u7968\u4FE1\u606F ")])),_:1},8,["icon"])):b("v-if",!0)]),content_action:p(u=>[b(` v-if="(String(row.status) === '1' || String(row.status) === '2' || String(row.status) === '5') && hasPermissionWithCode('006')" `),n(v,{link:"",type:"primary",icon:t(D)("scaletooriginal"),onClick:()=>g.value.onDisplay({...u,invoiceNumber:u.invoice_number})},null,8,["icon","onClick"]),t(m)("066")&&!t(s)&&String(u.status)==="1"?(C(),h(M,{key:0,content:"\u7ED1\u5B9A\u516C\u53F8"},{default:p(()=>[n(v,{link:"",type:"primary",icon:t(D)("home-filled"),onClick:r=>U(u)},null,8,["icon","onClick"])]),_:2},1024)):b("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),n(ue,{ref_key:"invoiceModalRef",ref:g},null,512),n(ie,{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(ne,{visible:F.value,"onUpdate:visible":e[4]||(e[4]=u=>F.value=u),onRefresh:e[5]||(e[5]=u=>{var r;return(r=c.value)==null?void 0:r.onSearch()})},null,8,["visible"]),n(te,{ref_key:"excelUploadInvRef",ref:E,onOnSuccess:e[6]||(e[6]=()=>c.value.onSearch())},null,512)]),_:1})),[[$,t(x)]])}}});var Be=V(pe,[["__file","D:/work/jiesuan/settle-vue3/src/views/purchase/inputInvoicePool/index.vue"]]);export{Be as default};
|