1 |
- import{al as m,aS as f,ae as R,_ as V,d as q,aL as W,ah as $,w as i,bL as G,n as J,W as K,r as k,o as s,G as p,C as n,l as E,u as t,c as Q,L as S,a as c,J as h,M as C}from"./index.fd765376.js";import{e as X,h as Z}from"./index.06a6dd44.js";import{t as z,i as ee,m as I,g as ue,j as te,h as oe}from"./status.0f05917e.js";import{r as P,a as ae}from"./columnRenderHelper.d64097c5.js";import{u as le}from"./use-page-search.414f397e.js";import ne from"./invoice-modal.b227aa1c.js";import{h as re}from"./export.6a5cb026.js";import{u as b,w as se}from"./xlsx.ed122d16.js";import ie from"./index.f8ddb546.js";import pe from"./index.e3b8f0df.js";import"./index.50dbfda0.js";import"./invoice.89a3db62.js";import"./execl-upload.491b2dd2.js";const ce=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",width:70,hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u5BF9\u8D26\u56DE\u7968\u7533\u8BF7",prop:"hpNo",width:140},{label:"\u5BF9\u8D26\u7F16\u7801",prop:"payNo",width:150},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",width:145,...P("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u53D1\u7968\u7A0E\u524D\u91D1\u989D",width:"110px",prop:"inv_subtotal_amount"},{label:"\u53D1\u7968\u7A0E\u540E\u91D1\u989D",width:"110px",prop:"total"},{label:"\u4F9B\u5E94\u5546\u7AEF",prop:"has_account",width:80,...ae(oe,"has_account")},{label:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:e,props:u})=>m(f,{size:u.size},{default:()=>{var o;return(o=z.find(d=>String(e.status)===String(d.value)))==null?void 0:o.label}})},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:e}){return m(f,null,{default:()=>{var u;return((u=ee.find(({value:o})=>o===e.invoiceType))==null?void 0:u.label)||"--"}})}},{label:"\u53D1\u7968\u72B6\u6001",width:70,prop:"invStatus_cn"},{label:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",width:100,cellRenderer:({row:e,props:u})=>m(f,{size:u.size},{default:()=>{var o;return(o=I.find(d=>String(e.checkApi)===d.value))==null?void 0:o.label}})},{label:"\u53D1\u7968\u53F7\u7801",width:110,prop:"invoiceNumber"},{label:"\u53D1\u7968\u4EE3\u7801",width:110,prop:"invoiceCode"},{label:"\u5F00\u7968\u65E5\u671F",prop:"open_time",width:90,formatter:({open_time:e})=>e?R(e).format("YYYY-MM-DD"):""},{label:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:e})=>m(f,null,{default:()=>{var u;return((u=ue.find(o=>o.value==e.seller_check+""))==null?void 0:u.label)||"--"}})},{label:"\u9500\u552E\u65B9\u62AC\u5934\u72B6\u6001",prop:"buyer_check",width:130,cellRenderer:({row:e})=>m(f,null,{default:()=>{var u;return((u=te.find(o=>o.value==e.buyer_check+""))==null?void 0:u.label)||"--"}})},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:145,...P("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:150,formatter:({addtime:e})=>R(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:110}],de={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:ce,apis:{httpDelete:X,httpList:Z,httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,showDelete:({status:e})=>Number(e)<=3},U={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:z},{field:"supplierNo",type:"supplier-query"},{field:"checkApi",type:"select",placeholder:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",options:I},{field:"hpNo",type:"input",placeholder:"\u5BF9\u8D26\u56DE\u7968\u7F16\u7801"},{field:"payNo",type:"input",placeholder:"\u5BF9\u8D26\u7F16\u7801"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},me={\u4E70\u65B9\u516C\u53F8\u7F16\u7801:"",\u56DE\u7968\u7533\u8BF7\u7F16\u7801:"",\u5BF9\u8D26\u7F16\u7801:"",\u5BA1\u6838\u72B6\u6001:"",\u5BA1\u6838\u5907\u6CE8:""},fe={key:0},he=q({__name:"index",setup(e){const u="ticketReturn",o="/purchase/ticketReturnDetail",d=["4","10"],{hasPermissionWithCode:F}=W(u),{isSuperUser:w}=$(),B=i(null),D=G({payNo:"",hpNo:""}),{push:A}=J(),{currentCompany:M}=K(),y=i(!1),g=i(null),N=i(null),x=i(null),v=i({inv_subtotal_amount:"",total:""});async function T(){await re({url:"ile",name:"\u56DE\u7968\u6570\u636E\u8868",onStart:()=>y.value=!0,onSuccess:()=>y.value=!1,onFail:()=>y.value=!1,params:{companyNo:M.value.companyNo,...B.value.getBasicParams()}})}const Y={pageSearchHook:()=>le(void 0,void 0,U)},L={content:{preview:({hpNo:r})=>A(`${o}?id=${r}`),create:()=>A(o),result:({inv_subtotal_amount:r,total:a})=>{const l=B.value.getBasicParams();D.hpNo=l.hpNo,D.payNo=l.payNo,v.value.inv_subtotal_amount=r,v.value.total=a}}};function O(){const r=b.book_new(),a=b.json_to_sheet([me]);b.book_append_sheet(r,a,"sheet"),se(r,"\u6279\u91CF\u5BFC\u5165\u56DE\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(r,a)=>{const l=k("ElButton"),j=k("PageContainer"),H=k("PageAuth");return s(),p(H,{pageName:u},{default:n(()=>[E(j,{hooks:Y,events:L,contentConfig:t(de),"search-config":t(U),"get-content-ref":_=>B.value=_},{content_table_header:n(()=>[t(D).payNo||t(D).hpNo?(s(),Q("p",fe," \u5408\u8BA1:\u53D1\u7968\u7A0E\u524D\u91D1\u989D:"+S(v.value.inv_subtotal_amount)+",\u4EF7\u7A0E\u5408\u8BA1:"+S(v.value.total),1)):c("v-if",!0)]),content_header:n(()=>[t(F)("017")?(s(),p(l,{key:0,size:"small",icon:t(h)("arrow-down-line"),loading:y.value,onClick:a[0]||(a[0]=()=>T())},{default:n(()=>[C("\u5BFC\u51FA\u56DE\u7968\u6570\u636E")]),_:1},8,["icon","loading"])):c("v-if",!0),t(F)("033")&&!t(w)?(s(),p(l,{key:1,size:"small",icon:t(h)("arrow-up-line"),onClick:a[1]||(a[1]=()=>x.value.onDisplay())},{default:n(()=>[C("\u6279\u91CF\u521B\u5EFA\u5F00\u7968\u6570\u636E")]),_:1},8,["icon"])):c("v-if",!0),t(F)("018")&&!t(w)?(s(),p(l,{key:2,size:"small",icon:t(h)("arrow-up-line"),onClick:a[2]||(a[2]=()=>N.value.onDisplay())},{default:n(()=>[C("\u6279\u91CF\u5BFC\u5165\u8BA4\u8BC1\u7ED3\u679C")]),_:1},8,["icon"])):c("v-if",!0),t(F)("019")?(s(),p(l,{key:3,size:"small",icon:t(h)("arrow-down-line"),onClick:a[3]||(a[3]=()=>O())},{default:n(()=>[C("\u4E0B\u8F7D\u8BA4\u8BC1\u6A21\u677F ")]),_:1},8,["icon"])):c("v-if",!0)]),content_action:n(_=>[d.includes(String(_.status))?(s(),p(l,{key:0,link:"",type:"primary",icon:t(h)("scaletooriginal"),onClick:()=>g.value.onDisplay(_)},null,8,["icon","onClick"])):c("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),E(ne,{ref_key:"invoiceModalRef",ref:g},null,512),E(ie,{ref_key:"execelUploadRef",ref:N},null,512),E(pe,{ref_key:"execelUploadInvRef",ref:x,onOnSuccess:a[4]||(a[4]=()=>B.value.onSearch())},null,512)]),_:1})}}});var Ne=V(he,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/ticketReturn/index.vue"]]);export{Ne as default};
|