index.5b7e9e0b.js 6.6 KB

1
  1. import{al as p,aO as c,ae as N,_ as H,d as V,bs as q,ah as W,w as d,bD as $,n as G,W as J,r as v,o as r,G as m,C as s,l as C,u as o,c as K,L as x,a as h,J as _,M as b}from"./index.3f1ca816.js";import{e as Q,h as X}from"./index.e0c74124.js";import{t as S,i as Z,g as M,d as ee,e as ue,m as te}from"./status.d6b2a53d.js";import{r as R,a as oe}from"./columnRenderHelper.c7097252.js";import{u as ae}from"./use-page-search.fa6a742a.js";import le from"./invoice-modal.42063629.js";import{h as ne}from"./export.12a5b455.js";import{u as k,w as se}from"./xlsx.ed122d16.js";import re from"./index.7439df91.js";import"./index.4ee41641.js";import"./invoice.225c047c.js";import"./execl-upload.23e3fe1e.js";const ie=[{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,...R("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,...oe(te,"has_account")},{label:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:e,props:u})=>p(c,{size:u.size},{default:()=>{var t;return(t=S.find(i=>String(e.status)===String(i.value)))==null?void 0:t.label}})},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:e}){return p(c,null,{default:()=>{var u;return((u=Z.find(({value:t})=>t===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})=>p(c,{size:u.size},{default:()=>{var t;return(t=M.find(i=>String(e.checkApi)===i.value))==null?void 0:t.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?N(e).format("YYYY-MM-DD"):""},{label:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:e})=>p(c,null,{default:()=>{var u;return((u=ee.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})=>p(c,null,{default:()=>{var u;return((u=ue.find(t=>t.value==e.buyer_check+""))==null?void 0:u.label)||"--"}})},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:145,...R("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:150,formatter:({addtime:e})=>N(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:110}],pe={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:ie,apis:{httpDelete:Q,httpList:X,httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,showDelete:({status:e})=>Number(e)<=3},P={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:S},{field:"supplierNo",type:"supplier-query"},{field:"checkApi",type:"select",placeholder:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",options:M},{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"}]},ce={\u4E70\u65B9\u516C\u53F8\u7F16\u7801:"",\u56DE\u7968\u7533\u8BF7\u7F16\u7801:"",\u5BF9\u8D26\u7F16\u7801:"",\u5BA1\u6838\u72B6\u6001:"",\u5BA1\u6838\u5907\u6CE8:""},de={key:0},me=V({__name:"index",setup(e){const u="ticketReturn",t="/purchase/ticketReturnDetail",i=["4","10"],{hasPermissionWithCode:y}=q(u),{isSuperUser:T}=W(),E=d(null),f=$({payNo:"",hpNo:""}),{push:w}=G(),{currentCompany:U}=J(),F=d(!1),g=d(null),A=d(null),D=d({inv_subtotal_amount:"",total:""});async function Y(){await ne({url:"ile",name:"\u56DE\u7968\u6570\u636E\u8868",onStart:()=>F.value=!0,onSuccess:()=>F.value=!1,onFail:()=>F.value=!1,params:{companyNo:U.value.companyNo,...E.value.getBasicParams()}})}const z={pageSearchHook:()=>ae(void 0,void 0,P)},I={content:{preview:({hpNo:l})=>w(`${t}?id=${l}`),create:()=>w(t),result:({inv_subtotal_amount:l,total:a})=>{const n=E.value.getBasicParams();f.hpNo=n.hpNo,f.payNo=n.payNo,D.value.inv_subtotal_amount=l,D.value.total=a}}};function L(){const l=k.book_new(),a=k.json_to_sheet([ce]);k.book_append_sheet(l,a,"sheet"),se(l,"\u56DE\u7968\u6279\u91CF\u5BFC\u5165\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(l,a)=>{const n=v("ElButton"),O=v("PageContainer"),j=v("PageAuth");return r(),m(j,{pageName:u},{default:s(()=>[C(O,{hooks:z,events:I,contentConfig:o(pe),"search-config":o(P),"get-content-ref":B=>E.value=B},{content_table_header:s(()=>[o(f).payNo||o(f).hpNo?(r(),K("p",de," \u5408\u8BA1:\u53D1\u7968\u7A0E\u524D\u91D1\u989D:"+x(D.value.inv_subtotal_amount)+",\u4EF7\u7A0E\u5408\u8BA1:"+x(D.value.total),1)):h("v-if",!0)]),content_header:s(()=>[o(y)("017")?(r(),m(n,{key:0,size:"small",icon:o(_)("arrow-down-line"),loading:F.value,onClick:a[0]||(a[0]=()=>Y())},{default:s(()=>[b("\u5BFC\u51FA\u56DE\u7968\u6570\u636E")]),_:1},8,["icon","loading"])):h("v-if",!0),o(y)("018")&&!o(T)?(r(),m(n,{key:1,size:"small",icon:o(_)("arrow-up-line"),onClick:a[1]||(a[1]=()=>A.value.onDisplay())},{default:s(()=>[b("\u6279\u91CF\u5BFC\u5165\u8BA4\u8BC1\u7ED3\u679C")]),_:1},8,["icon"])):h("v-if",!0),o(y)("019")?(r(),m(n,{key:2,size:"small",icon:o(_)("arrow-down-line"),onClick:a[2]||(a[2]=()=>L())},{default:s(()=>[b("\u4E0B\u8F7D\u56DE\u7968\u6279\u91CF\u7533\u8BF7\u6A21\u677F")]),_:1},8,["icon"])):h("v-if",!0)]),content_action:s(B=>[i.includes(String(B.status))?(r(),m(n,{key:0,link:"",type:"primary",icon:o(_)("scaletooriginal"),onClick:()=>g.value.onDisplay(B)},null,8,["icon","onClick"])):h("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),C(le,{ref_key:"invoiceModalRef",ref:g},null,512),C(re,{ref_key:"execelUploadRef",ref:A},null,512)]),_:1})}}});var we=H(me,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/ticketReturn/index.vue"]]);export{we as default};