1 |
- import{b as W,a as j,h as q}from"./index.e7e25fcc.js";import{a as P}from"./inv-open.f10f51b3.js";import{i as K,f as Y,g as Z}from"./status.8fda4b80.js";import{ah as F,aK as h,d as G,bn as J,F as _,ag as Q,aY as g,B as X,y as d,o as s,O as i,L as a,z as m,u as o,T as B,V as f,Z as D}from"./index.f3373917.js";import{u as ee}from"./use-page-search.577f74c6.js";import ue from"./post-modal.7ddde2c3.js";import te from"./index.04791ae8.js";import{h as oe}from"./export.df2004dc.js";import{u as y,w as ne}from"./xlsx.ed122d16.js";import"./tootip.aeb4d9b8.js";import"./execl-upload.92dd04ea.js";const le=[{label:"\u53D1\u7968\u7533\u8BF7\u7F16\u53F7",prop:"invNo",width:155},{label:"\u4E1A\u52A1\u4F01\u4E1A\u7F16\u53F7",prop:"inv_out",width:155},{label:"\u5BA2\u6237\u516C\u53F8\u540D\u79F0",prop:"buyer_title",width:175},{label:"\u7533\u8BF7\u989D\u5EA6",prop:"inv_value",width:110},{label:"\u72B6\u6001",prop:"status",width:125,cellRenderer:({row:l})=>F(h,null,{default:()=>{var e;return((e=P.find(u=>u.value==l.status+""))==null?void 0:e.label)||"--"}})},{label:"\u53D1\u7968\u7C7B\u578B",prop:"status",minWidth:160,cellRenderer:({row:l})=>F(h,null,{default:()=>{var e;return((e=K.find(u=>u.value==l.inv_type+""))==null?void 0:e.label)||"--"}})},{label:"\u53D1\u7968\u53F7\u7801",prop:"inv_number",width:130},{label:"\u53D1\u7968\u4EE3\u7801",prop:"inv_code",width:100},{label:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:l})=>F(h,null,{default:()=>{var e;return((e=Y.find(u=>u.value==l.seller_check+""))==null?void 0:e.label)||"--"}})},{label:"\u9500\u552E\u65B9\u62AC\u5934\u72B6\u6001",prop:"buyer_check",width:130,cellRenderer:({row:l})=>F(h,null,{default:()=>{var e;return((e=Z.find(u=>u.value==l.buyer_check+""))==null?void 0:e.label)||"--"}})},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:80},{label:"\u521B\u5EFA\u65F6\u95F4",width:140,prop:"addtime"},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],ae={title:"\u53D1\u7968\u7533\u8BF7\u7BA1\u7406",columns:le,superUserNoAction:!0,companyProp:"inv_out",apis:{httpList:W,httpAdd:!0}},w={colLayout:{span:8},formItems:[{field:"invNo",type:"input",placeholder:"\u53D1\u7968\u7533\u8BF7\u7F16\u53F7"},{field:"buyer_name",type:"input",placeholder:"\u5BA2\u6237\u540D\u79F0"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"},{field:"status",type:"select",placeholder:"\u72B6\u6001",span:4,options:P},{field:"timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u7533\u8BF7\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7533\u8BF7\u7ED3\u675F\u65F6\u95F4"}}]},re={\u53D1\u7968\u7533\u8BF7\u7F16\u53F7:"INV20210712w0vHkk",\u53D1\u7968\u7C7B\u578B:"\u589E\u503C\u7A0E\u7535\u5B50\u666E\u901A\u53D1\u7968",\u53D1\u7968\u4EE3\u7801:"011002000711",\u53D1\u7968\u53F7\u7801:"51678540",\u53D1\u7968\u91D1\u989D:"4900",\u53D1\u7968\u7A0E\u540E\u91D1\u989D:"",\u6821\u9A8C\u7801:"",\u5F00\u7968\u65E5\u671F:"2020/12/17 0:00:00"},se=D("\u5F00\u7968\u4FE1\u606F\u5BFC\u51FA"),ie=D("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u5BFC\u5165\u6A21\u677F"),pe=D("\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u5F00\u7968\u7ED3\u679C\uFF08\u53D1\u7968\u7533\u8BF7\uFF09"),ve=G({__name:"index",setup(l){const e="invoiceApply",{hasPermissionWithCode:u}=J(e),E="/InvoiceSales/invoiceApplyDetail",v=_(null),C=_(null),{isSuperUser:k}=Q(),p=_(null),{run:S}=g({success:()=>p.value.onSearch()}),{run:x}=g({success:()=>p.value.onSearch()}),R=({invNo:n})=>x(j({invNo:n,status:"7"})),{push:A}=X(),N=_([]),T={pageSearchHook:()=>ee(void 0,void 0,w)};function U(n){S(q(n))}const I={content:{preview:({invNo:n})=>A(`${E}?id=${n}`),create:()=>A(E)}};async function V(){await oe({url:"/ipe",name:"\u5F00\u7968\u4FE1\u606F",params:{...p.value.getBasicParams()}})}function O(){const n=y.book_new(),t=y.json_to_sheet([re]);y.book_append_sheet(n,t,"sheet"),ne(n,"\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(n,t)=>{const c=d("ElButton"),z=d("ElTooltip"),L=d("ElPopconfirm"),$=d("PageContainer"),H=d("PageAuth");return s(),i(H,{pageName:e},{default:a(()=>[m($,{hooks:T,events:I,contentConfig:o(ae),"search-config":o(w),"get-content-ref":r=>p.value=r,onContentSelectChange:t[3]||(t[3]=r=>N.value=r)},{content_header:a(()=>[o(u)("026")?(s(),i(c,{key:0,icon:o(B)("arrow-up-line"),size:"small",onClick:t[0]||(t[0]=()=>V())},{default:a(()=>[se]),_:1},8,["icon"])):f("",!0),o(u)("027")?(s(),i(c,{key:1,icon:o(B)("arrow-down-line"),size:"small",onClick:t[1]||(t[1]=()=>O())},{default:a(()=>[ie]),_:1},8,["icon"])):f("",!0),!o(k)&&o(u)("028")?(s(),i(c,{key:2,onClick:t[2]||(t[2]=()=>C.value.onDisplay()),size:"small"},{default:a(()=>[pe]),_:1})):f("",!0)]),content_action:a(({status:r,post_code:M,invNo:b})=>[!o(k)&&String(r)==="3"&&!M?(s(),i(z,{key:0,content:"\u586B\u5199\u7269\u6D41",placement:"top"},{default:a(()=>[m(c,{text:"",type:"primary",style:{"margin-left":"0px"},icon:o(B)("promotion"),onClick:()=>v.value.onDisplay(b)},null,8,["icon","onClick"])]),_:2},1024)):f("",!0),(String(r)==="1"||String(r)==="5")&&o(u)("010")?(s(),i(L,{key:1,placement:"top",title:"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u5F00\u7968\u7533\u8BF7?","on-confirm":()=>R({invNo:b})},{reference:a(()=>[m(c,{text:"",type:"primary",style:{"margin-left":"0px"},icon:o(B)("refresh-right")},null,8,["icon"])]),_:2},1032,["on-confirm"])):f("",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),m(ue,{ref_key:"postModalRef",ref:v,onPostSave:U},null,512),m(te,{ref_key:"execlUploadRef",ref:C,onOnSuccess:t[4]||(t[4]=()=>p.value.onSearch())},null,512)]),_:1})}}});export{ve as default};
|