import{al as n,aS as a,ae as E,_ as M,d as U,w as s,aL as Y,ah as I,n as z,W as L,r as c,o as d,G as f,C as p,l as h,u as o,J as b,M as O,a as m}from"./index.56c69f5a.js";import{f as j,a as H}from"./index.d4057835.js";import{y as k,i as V,B as w,g as W,j as $,o as A}from"./status.2df4810d.js";import{r as v,a as q}from"./columnRenderHelper.6c05b86e.js";import{u as G}from"./use-page-search.27df6d7f.js";import J from"./invoice-modal.ebbe3bd1.js";import K from"./index.8f28e028.js";import"./index.211aa9d2.js";import"./invoice.3cbb6342.js";import"./execl-upload.240c34a2.js";import"./xlsx.ed122d16.js";const Q=[{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:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyNo",width:150,...v("companyNo","companyName","\u4E70\u5165\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:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:e,props:u})=>n(a,{size:u.size},{default:()=>{var t;return((t=k.find(l=>String(e.status)===String(l.value)))==null?void 0:t.label)||"--"}})},{label:"\u4E1A\u52A1\u7C7B\u578B",width:95,...q(A,"is_comon")},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:e}){return n(a,null,{default:()=>{var u;return((u=V.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})=>n(a,{size:u.size},{default:()=>{var t;return(t=w.find(l=>String(e.checkApi)===l.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?E(e).format("YYYY-MM-DD"):""},{label:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:e})=>n(a,null,{default:()=>{var u;return((u=W.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})=>n(a,null,{default:()=>{var u;return((u=$.find(t=>t.value==e.buyer_check+""))==null?void 0:u.label)||"--"}})},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierNo",width:150,...v("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:150,formatter:({addtime:e})=>E(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:110}],X={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:Q,apis:{httpDelete:j,httpList:H,httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,listNoRelation:!0,companyProp:"supplierNo",showDelete:({status:e})=>Number(e)<=3},g={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:k},{field:"companyNo",type:"business-query"},{field:"checkApi",type:"select",placeholder:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",options:w},{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:A}]};const Z=U({__name:"index",setup(e){const u="supplyTicketReturn",t="/supply/supplyTicketReturnDetail",l=["4","10"];s(!1);const{hasPermissionWithCode:N}=Y(u),{isSuperUser:R}=I(),{push:F}=z(),_=s(null),y=s(null),B=s(null);L();const x={pageSearchHook:()=>G(void 0,void 0,g)},P={content:{preview:({hpNo:D})=>F(`${t}?id=${D}`),create:()=>F(t)}};return(D,r)=>{const C=c("ElButton"),S=c("PageContainer"),T=c("PageAuth");return d(),f(T,{pageName:u},{default:p(()=>[h(S,{hooks:x,events:P,contentConfig:o(X),"search-config":o(g),"get-content-ref":i=>B.value=i},{content_header:p(()=>[o(N)("033")&&!o(R)?(d(),f(C,{key:0,size:"small",icon:o(b)("arrow-up-line"),onClick:r[0]||(r[0]=()=>y.value.onDisplay())},{default:p(()=>[O("\u6279\u91CF\u521B\u5EFA\u5F00\u7968\u6570\u636E")]),_:1},8,["icon"])):m("v-if",!0),m(` <ElButton\r
          size="small"\r
          v-if="hasPermissionWithCode('019')"\r
          :icon="useRenderIcon('arrow-down-line')"\r
          @click="() => onDownloadTemplate()"\r
          >\u4E0B\u8F7D\u56DE\u7968\u6279\u91CF\u7533\u8BF7\u6A21\u677F</ElButton\r
        > `)]),content_action:p(i=>[l.includes(String(i.status))?(d(),f(C,{key:0,link:"",type:"primary",icon:o(b)("scaletooriginal"),onClick:()=>_.value.onDisplay(i)},null,8,["icon","onClick"])):m("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),h(J,{ref_key:"invoiceModalRef",ref:_},null,512),h(K,{ref_key:"execelUploadRef",ref:y,onOnSuccess:r[1]||(r[1]=()=>B.value.onSearch())},null,512)]),_:1})}}});var ce=M(Z,[["__scopeId","data-v-78d10555"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/supply/ticketReturn/index.vue"]]);export{ce as default};
