1 |
- import{al as m,aS as f,ae as R,_ as W,d as $,aL as G,ah as J,w as r,bN as K,n as Q,W as X,r as b,o as i,G as p,C as n,l as E,u as t,c as Z,L as S,a as c,J as h,M as C}from"./index.56c69f5a.js";import{f as ee,a as ue}from"./index.d4057835.js";import{y as z,i as te,B as I,g as oe,j as ae,h as le,o as M}from"./status.2df4810d.js";import{r as P,a as U}from"./columnRenderHelper.6c05b86e.js";import{u as ne}from"./use-page-search.27df6d7f.js";import se from"./invoice-modal.a4cfed95.js";import{h as ie}from"./export.61b14108.js";import{u as k,w as re}from"./xlsx.ed122d16.js";import pe from"./index.ab82a0ba.js";import ce from"./index.b9fdcbf7.js";import"./index.211aa9d2.js";import"./invoice.3cbb6342.js";import"./execl-upload.240c34a2.js";const de=[{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,...U(le,"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:"\u4E1A\u52A1\u7C7B\u578B",width:95,...U(M,"is_comon")},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:e}){return m(f,null,{default:()=>{var u;return((u=te.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=oe.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=ae.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}],me={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:de,apis:{httpDelete:ee,httpList:ue,httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,showDelete:({status:e})=>Number(e)<=3},T={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"},{field:"is_comon",type:"select",placeholder:"\u4E1A\u52A1\u7C7B\u578B",span:4,options:M}]},fe={\u4E70\u65B9\u516C\u53F8\u7F16\u7801:"",\u56DE\u7968\u7533\u8BF7\u7F16\u7801:"",\u5BF9\u8D26\u7F16\u7801:"",\u5BA1\u6838\u72B6\u6001:"",\u5BA1\u6838\u5907\u6CE8:""},he={key:0},Fe=$({__name:"index",setup(e){const u="ticketReturn",o="/purchase/ticketReturnDetail",d=["4","10"],{hasPermissionWithCode:F}=G(u),{isSuperUser:w}=J(),B=r(null),y=K({payNo:"",hpNo:""}),{push:A}=Q(),{currentCompany:Y}=X(),D=r(!1),g=r(null),N=r(null),x=r(null),_=r({inv_subtotal_amount:"",total:""});async function L(){await ie({url:"ile",name:"\u56DE\u7968\u6570\u636E\u8868",onStart:()=>D.value=!0,onSuccess:()=>D.value=!1,onFail:()=>D.value=!1,params:{companyNo:Y.value.companyNo,...B.value.getBasicParams()}})}const O={pageSearchHook:()=>ne(void 0,void 0,T)},j={content:{preview:({hpNo:s})=>A(`${o}?id=${s}`),create:()=>A(o),result:({inv_subtotal_amount:s,total:a})=>{const l=B.value.getBasicParams();y.hpNo=l.hpNo,y.payNo=l.payNo,_.value.inv_subtotal_amount=s,_.value.total=a}}};function H(){const s=k.book_new(),a=k.json_to_sheet([fe]);k.book_append_sheet(s,a,"sheet"),re(s,"\u6279\u91CF\u5BFC\u5165\u56DE\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(s,a)=>{const l=b("ElButton"),V=b("PageContainer"),q=b("PageAuth");return i(),p(q,{pageName:u},{default:n(()=>[E(V,{hooks:O,events:j,contentConfig:t(me),"search-config":t(T),"get-content-ref":v=>B.value=v},{content_table_header:n(()=>[t(y).payNo||t(y).hpNo?(i(),Z("p",he," \u5408\u8BA1:\u53D1\u7968\u7A0E\u524D\u91D1\u989D:"+S(_.value.inv_subtotal_amount)+",\u4EF7\u7A0E\u5408\u8BA1:"+S(_.value.total),1)):c("v-if",!0)]),content_header:n(()=>[t(F)("017")?(i(),p(l,{key:0,size:"small",icon:t(h)("arrow-down-line"),loading:D.value,onClick:a[0]||(a[0]=()=>L())},{default:n(()=>[C("\u5BFC\u51FA\u56DE\u7968\u6570\u636E")]),_:1},8,["icon","loading"])):c("v-if",!0),t(F)("033")&&!t(w)?(i(),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)?(i(),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")?(i(),p(l,{key:3,size:"small",icon:t(h)("arrow-down-line"),onClick:a[3]||(a[3]=()=>H())},{default:n(()=>[C(" \u4E0B\u8F7D\u8BA4\u8BC1\u6A21\u677F ")]),_:1},8,["icon"])):c("v-if",!0)]),content_action:n(v=>[d.includes(String(v.status))?(i(),p(l,{key:0,link:"",type:"primary",icon:t(h)("scaletooriginal"),onClick:()=>g.value.onDisplay(v)},null,8,["icon","onClick"])):c("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),E(se,{ref_key:"invoiceModalRef",ref:g},null,512),E(pe,{ref_key:"execelUploadRef",ref:N},null,512),E(ce,{ref_key:"execelUploadInvRef",ref:x,onOnSuccess:a[4]||(a[4]=()=>B.value.onSearch())},null,512)]),_:1})}}});var xe=W(Fe,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/ticketReturn/index.vue"]]);export{xe as default};
|