1 |
- import{a as O,h as I}from"./index.a02bae8b.js";import{af as n,aI as i,aJ as M,aX as C,_ as U,d as L,bn as V,ad as $,B as H,F as m,a5 as j,y as f,o as p,O as c,L as r,z as F,u as o,T as _,V as y,Z as k}from"./index.a584ddad.js";import{s as D,i as A,c as P}from"./_opitons.854186b3.js";import{f as q,g as J,i as W}from"./status.25ea5e43.js";import{u as X}from"./use-page-search.5ed9bf1b.js";import Z from"./invoice-modal.45a83956.js";import{h as G}from"./export.b132a393.js";import K from"./index.1c753888.js";import"./index.e9b581b3.js";import"./invoice.f79e33fd.js";import"./execl-upload.d9f92d9c.js";import"./xlsx.ed122d16.js";const Q=[{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:"\u72B6\u6001",prop:"status",width:160,transform:e=>{var u;return(u=D.find(t=>String(e)===t.value))==null?void 0:u.label},cellRenderer:({row:e,props:u})=>n(i,{size:u.size},{default:()=>{var t;return(t=D.find(l=>String(e.status)===l.value))==null?void 0:t.label}})},{label:"\u53D1\u7968\u4E0A\u4F20\u65B9\u5F0F",prop:"invType",width:120,cellRenderer:({row:e,props:u})=>n(i,{size:u.size},{default:()=>{var t;return(t=A.find(l=>String(e.invType)===l.value))==null?void 0:t.label}})},{label:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",width:120,cellRenderer:({row:e,props:u})=>n(i,{size:u.size},{default:()=>{var t;return(t=P.find(l=>String(e.checkApi)===l.value))==null?void 0:t.label}})},{label:"\u53D1\u7968\u56FE\u7247",prop:"inv_img",width:85,cellRenderer:({row:e})=>n(M,{src:e.inv_img,style:{height:"20px"},previewSrcList:[e.inv_img],previewTeleported:!0})},{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:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:e})=>n(i,null,{default:()=>{var u;return((u=q.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(i,null,{default:()=>{var u;return((u=J.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\u65F6\u95F4",prop:"open_time",width:120,formatter:({open_time:e})=>e?C(e).format("YYYY-MM-DD"):""},{label:"\u53D1\u7968\u72B6\u6001",width:110,prop:"invStatus_cn"},{label:"\u53D1\u7968\u7C7B\u578B",width:110,prop:"invoiceType_cn"},{label:"\u53D1\u7968\u7C7B\u578B",width:110,cellRenderer({row:e}){return n(i,null,{default:()=>{var u;return((u=W.find(({value:t})=>t===e.invoiceType))==null?void 0:u.label)||"--"}})}},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:180,formatter:({addtime:e})=>C(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:110}],ee={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:Q,apis:{httpList:O,httpDelete:I,httpAdd:!0},deleteProp:"hpNo",superUserNoAction:!0,delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",companyProp:"supplierNo",showDelete:({status:e})=>Number(e)!==6},w={formItems:[{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",options:D},{field:"invType",type:"select",placeholder:"\u53D1\u7968\u4E0A\u4F20\u65B9\u5F0F",options:A},{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\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"}},{field:"open_timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"open_start",endProp:"open_end",startPlaceholder:"\u5F00\u7968\u8D77\u59CB\u65F6\u95F4",endPlaceholder:"\u5F00\u7968\u7ED3\u675F\u65F6\u95F4"}}]};const ue=k("\u5BFC\u51FA\u5BF9\u8D26\u5F00\u7968\u6570\u636E"),te=k("\u6279\u91CF\u521B\u5EFA\u5F00\u7968\u6570\u636E"),oe=L({__name:"index",setup(e){const u="supplyTicketReturn",t="/supply/supplyTicketReturnDetail",l=["3","4","5","6","9","10","12"],{hasPermissionWithCode:v}=V(u),{isSuperUser:x}=$(),{push:B}=H(),b=m(null),g=m(null),d=m(null),{currentCompany:N}=j(),R={pageSearchHook:()=>X(void 0,void 0,w)},T={content:{preview:({hpNo:E})=>B(`${t}?id=${E}`),create:()=>B(t)}};async function S(){await G({url:"ile",name:"\u5F00\u7968\u6570\u636E\u8868",params:{supplierNo:N.value.companyNo,...d.value.getBasicParams()}})}return(E,a)=>{const h=f("ElButton"),z=f("PageContainer"),Y=f("PageAuth");return p(),c(Y,{pageName:u},{default:r(()=>[F(z,{hooks:R,events:T,contentConfig:o(ee),"search-config":o(w),"get-content-ref":s=>d.value=s},{content_header:r(()=>[o(v)("032")?(p(),c(h,{key:0,size:"small",icon:o(_)("arrow-down-line"),onClick:a[0]||(a[0]=()=>S())},{default:r(()=>[ue]),_:1},8,["icon"])):y("",!0),o(v)("033")&&!o(x)?(p(),c(h,{key:1,size:"small",icon:o(_)("arrow-up-line"),onClick:a[1]||(a[1]=()=>g.value.onDisplay())},{default:r(()=>[te]),_:1},8,["icon"])):y("",!0)]),content_action:r(s=>[l.includes(String(s.status))?(p(),c(h,{key:0,link:"",type:"primary",icon:o(_)("scaletooriginal"),onClick:()=>b.value.onDisplay(s)},null,8,["icon","onClick"])):y("",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),F(Z,{ref_key:"invoiceModalRef",ref:b},null,512),F(K,{ref_key:"execelUploadRef",ref:g,onOnSuccess:a[2]||(a[2]=()=>d.value.onSearch())},null,512)]),_:1})}}});var Fe=U(oe,[["__scopeId","data-v-0bcd5dd3"]]);export{Fe as default};
|