index.9e79b6a7.js 7.0 KB

1
  1. import{aj as i,aL as p,aM as j,ah as x,_ as H,d as V,ai as q,bo as W,E as _,A as $,a5 as K,a7 as G,x as v,o as c,N as m,K as s,y,u as l,R as D,a as F,c as J,T as N,W as C}from"./index.743f0c80.js";import{h as Q,a as X}from"./index.cb28f7dd.js";import{s as b,i as S,c as P}from"./_opitons.689eae18.js";import{a as Z,b as ee,i as ue}from"./status.868e86c0.js";import{u as te}from"./use-page-search.a895acdb.js";import oe from"./invoice-modal.ddea8234.js";import{h as le}from"./export.155240ef.js";import{u as E,w as ae}from"./xlsx.ed122d16.js";import ne from"./index.52c35ba6.js";import"./index.5fbf2896.js";import"./invoice.7fa18a6d.js";import"./execl-upload.acc3acaa.js";const ie=[{type:"selection",width:55,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:180},{label:"\u5BF9\u8D26\u7F16\u53F7",prop:"payNo",width:180},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u5356\u65B9\u516C\u53F8\u7F16\u53F7",prop:"supplierNo",width:145},{label:"\u5356\u65B9\u516C\u53F8\u540D\u79F0",prop:"supplierName",width:145},{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:"\u4E70\u65B9\u516C\u53F8\u7F16\u53F7",prop:"companyNo",width:145},{label:"\u4E70\u65B9\u516C\u53F8\u540D\u79F0",prop:"companyName",width:145},{label:"\u72B6\u6001",prop:"status",width:160,transform:e=>{var u;return(u=b.find(t=>String(e)===String(t.value)))==null?void 0:u.label},cellRenderer:({row:e,props:u})=>i(p,{size:u.size},{default:()=>{var t;return(t=b.find(a=>String(e.status)===String(a.value)))==null?void 0:t.label}})},{label:"\u53D1\u7968\u4E0A\u4F20\u65B9\u5F0F",prop:"invType",width:120,cellRenderer:({row:e,props:u})=>i(p,{size:u.size},{default:()=>{var t;return(t=S.find(a=>String(e.invType)===String(a.value)))==null?void 0:t.label}})},{label:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",width:120,cellRenderer:({row:e,props:u})=>i(p,{size:u.size},{default:()=>{var t;return(t=P.find(a=>String(e.checkApi)===a.value))==null?void 0:t.label}})},{label:"\u53D1\u7968\u56FE\u7247",prop:"inv_img",width:85,cellRenderer:({row:e})=>i(j,{src:e.inv_img,style:{height:"20px"},previewSrcList:[e.inv_img],previewTeleported:!0})},{label:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:e})=>i(p,null,{default:()=>{var u;return((u=Z.find(t=>t.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})=>i(p,null,{default:()=>{var u;return((u=ee.find(t=>t.value==e.buyer_check+""))==null?void 0:u.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:120,formatter:({open_time:e})=>e?x(e).format("YYYY-MM-DD"):""},{label:"\u53D1\u7968\u72B6\u6001",width:110,prop:"invStatus_cn"},{label:"\u53D1\u7968\u7C7B\u578B",width:110,cellRenderer({row:e}){return i(p,null,{default:()=>{var u;return((u=ue.find(({value:t})=>t===e.invoiceType))==null?void 0:u.label)||"--"}})}},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:180,formatter:({addtime:e})=>x(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:110}],se={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:ie,apis:{httpDelete:Q,httpList:X},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,showDelete:({status:e})=>Number(e)<=3},R={formItems:[{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",options:b},{field:"supplierNo",type:"supplier-query"},{field:"invType",type:"select",placeholder:"\u53D1\u7968\u4E0A\u4F20\u65B9\u5F0F",options:S},{field:"checkApi",type:"select",placeholder:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",options:P},{field:"payNo",type:"input",placeholder:"\u5BF9\u8D26\u7F16\u53F7"},{field:"hpNo",type:"input",placeholder:"\u5BF9\u8D26\u56DE\u7968\u7533\u8BF7\u7F16\u53F7"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"},{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"}}]},re={\u4E70\u65B9\u516C\u53F8\u7F16\u7801:"",\u56DE\u7968\u7533\u8BF7\u7F16\u7801:"",\u5BF9\u8D26\u7F16\u53F7:"",\u5BA1\u6838\u72B6\u6001:"",\u5BA1\u6838\u5907\u6CE8:""},pe=C("\u5BFC\u51FA\u56DE\u7968\u6570\u636E"),ce=C("\u6279\u91CF\u5BFC\u5165\u8BA4\u8BC1\u7ED3\u679C"),de=C("\u4E0B\u8F7D\u56DE\u7968\u6279\u91CF\u7533\u8BF7\u6A21\u677F"),me={key:0,style:{"font-weight":"500"}},Fe=V({__name:"index",setup(e){const u="ticketReturn",t="/purchase/ticketReturnDetail",a=["4","10"],{isSuperUser:T}=q(),{hasPermissionWithCode:B}=W(u),w=_(null),f=_(!1),{push:g}=$(),{currentCompany:z}=K(),k=_(null),A=_(null),d=G({inv_subtotal_amount:"",total:""});async function M(){await le({url:"ile",name:"\u56DE\u7968\u6570\u636E\u8868",onStart:()=>f.value=!0,onSuccess:()=>f.value=!1,onFail:()=>f.value=!1,params:{companyNo:z.value.companyNo,...w.value.getBasicParams()}})}const Y={pageSearchHook:()=>te(void 0,void 0,R)},U={content:{preview:({hpNo:n})=>g(`${t}?id=${n}`),create:()=>g(t),result:n=>{const{inv_subtotal_amount:o,total:r}=n;d.inv_subtotal_amount=o,d.total=r}}};function I(){const n=E.book_new(),o=E.json_to_sheet([re]);E.book_append_sheet(n,o,"sheet"),ae(n,"\u56DE\u7968\u6279\u91CF\u5BFC\u5165\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(n,o)=>{const r=v("ElButton"),L=v("PageContainer"),O=v("PageAuth");return c(),m(O,{pageName:u},{default:s(()=>[y(L,{hooks:Y,events:U,contentConfig:l(se),"search-config":l(R),"get-content-ref":h=>w.value=h},{content_header:s(()=>[l(B)("017")?(c(),m(r,{key:0,size:"small",icon:l(D)("arrow-down-line"),loading:f.value,onClick:o[0]||(o[0]=()=>M())},{default:s(()=>[pe]),_:1},8,["icon","loading"])):F("v-if",!0),l(B)("018")&&!l(T)?(c(),m(r,{key:1,size:"small",icon:l(D)("arrow-up-line"),onClick:o[1]||(o[1]=()=>A.value.onDisplay())},{default:s(()=>[ce]),_:1},8,["icon"])):F("v-if",!0),l(B)("019")?(c(),m(r,{key:2,size:"small",icon:l(D)("arrow-down-line"),onClick:o[2]||(o[2]=()=>I())},{default:s(()=>[de]),_:1},8,["icon"])):F("v-if",!0)]),content_action:s(h=>[a.includes(String(h.status))?(c(),m(r,{key:0,link:"",type:"primary",icon:l(D)("scaletooriginal"),onClick:()=>k.value.onDisplay(h)},null,8,["icon","onClick"])):F("v-if",!0)]),content_table_bottom:s(()=>[d.inv_subtotal_amount?(c(),J("p",me," \u5408\u8BA1: \u53D1\u7968\u7A0E\u524D\u91D1\u989D:"+N(d.inv_subtotal_amount)+", \u4EF7\u7A0E\u5408\u8BA1: "+N(d.total),1)):F("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),y(oe,{ref_key:"invoiceModalRef",ref:k},null,512),y(ne,{ref_key:"execelUploadRef",ref:A},null,512)]),_:1})}}});var ke=H(Fe,[["__file","D:/work/accout-vue3-ui/src/views/purchase/ticketReturn/index.vue"]]);export{ke as default};