index.bd7ddff3.js 5.8 KB

1
  1. import{ao as n,aL as r,ah as g,_ as Y,d as M,E as c,b4 as z,ai as O,A as I,a5 as H,x as F,o as d,N as h,K as i,y as _,u as o,R as y,a as D,W as w}from"./index.1bd4a40a.js";import{e as L,h as V}from"./index.cae39784.js";import{p as j,i as q,g as A,s as W,c as $,t as K}from"./status.c5a3efde.js";import{u as G}from"./use-page-search.a438c70f.js";import J from"./invoice-modal.1ff9818b.js";import{h as Q}from"./export.2be2f6fb.js";import X from"./index.ec10b169.js";import"./index.aee7ee11.js";import"./invoice.f6f0000e.js";import"./xlsx.ed122d16.js";import"./execl-upload.35314fa4.js";const Z=[{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:140},{label:"\u5BF9\u8D26\u7F16\u53F7",prop:"payNo",width:150},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u4E70\u65B9\u516C\u53F8\u7F16\u53F7",prop:"companyNo",width:145},{label:"\u4E70\u65B9\u516C\u53F8\u540D\u79F0",prop:"companyName",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:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:e,props:u})=>n(r,{size:u.size},{default:()=>{var t;return(t=j.find(l=>String(e.status)===String(l.value)))==null?void 0:t.label}})},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:e}){return n(r,null,{default:()=>{var u;return((u=q.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(r,{size:u.size},{default:()=>{var t;return(t=A.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?g(e).format("YYYY-MM-DD"):""},{label:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:e})=>n(r,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(r,null,{default:()=>{var u;return((u=$.find(t=>t.value==e.buyer_check+""))==null?void 0:u.label)||"--"}})},{label:"\u5356\u65B9\u516C\u53F8\u7F16\u53F7",prop:"supplierNo",width:145},{label:"\u5356\u65B9\u516C\u53F8\u540D\u79F0",prop:"supplierName",width:145},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:150,formatter:({addtime:e})=>g(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:Z,apis:{httpDelete:L,httpList:V,httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,showDelete:({status:e})=>Number(e)<=3},k={formItems:[{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",options:K},{field:"checkApi",type:"select",placeholder:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",options:A},{field:"payNo",type:"input",placeholder:"\u5BF9\u8D26\u7F16\u53F7"},{field:"hpNo",type:"input",placeholder:"\u5BF9\u8D26\u7533\u8BF7\u7F16\u53F7"},{field:"companyNo",type:"business-query"},{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=w("\u5BFC\u51FA\u5BF9\u8D26\u5F00\u7968\u6570\u636E"),te=w("\u6279\u91CF\u521B\u5EFA\u5F00\u7968\u6570\u636E"),oe=M({__name:"index",setup(e){const u="supplyTicketReturn",t="/supply/supplyTicketReturnDetail",l=["4","10"],s=c(!1),{hasPermissionWithCode:v,permissions:ae}=z(u),{isSuperUser:N}=O(),{push:B}=I(),C=c(null),E=c(null),f=c(null),{currentCompany:P}=H(),x={pageSearchHook:()=>G(void 0,void 0,k)},R={content:{preview:({hpNo:b})=>B(`${t}?id=${b}`),create:()=>B(t)}};async function S(){await Q({url:"ile",name:"\u5F00\u7968\u6570\u636E\u8868",onStart:()=>s.value=!0,onSuccess:()=>s.value=!1,onFail:()=>s.value=!1,params:{supplierNo:P.value.companyNo,...f.value.getBasicParams()}})}return(b,a)=>{const m=F("ElButton"),T=F("PageContainer"),U=F("PageAuth");return d(),h(U,{pageName:u},{default:i(()=>[_(T,{hooks:x,events:R,contentConfig:o(ee),"search-config":o(k),"get-content-ref":p=>f.value=p},{content_header:i(()=>[o(v)("032")?(d(),h(m,{key:0,size:"small",icon:o(y)("arrow-down-line"),loading:s.value,onClick:a[0]||(a[0]=()=>S())},{default:i(()=>[ue]),_:1},8,["icon","loading"])):D("v-if",!0),o(v)("033")&&!o(N)?(d(),h(m,{key:1,size:"small",icon:o(y)("arrow-up-line"),onClick:a[1]||(a[1]=()=>E.value.onDisplay())},{default:i(()=>[te]),_:1},8,["icon"])):D("v-if",!0)]),content_action:i(p=>[l.includes(String(p.status))?(d(),h(m,{key:0,link:"",type:"primary",icon:o(y)("scaletooriginal"),onClick:()=>C.value.onDisplay(p)},null,8,["icon","onClick"])):D("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),_(J,{ref_key:"invoiceModalRef",ref:C},null,512),_(X,{ref_key:"execelUploadRef",ref:E,onOnSuccess:a[2]||(a[2]=()=>f.value.onSearch())},null,512)]),_:1})}}});var Fe=Y(oe,[["__scopeId","data-v-78d10555"],["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/supply/ticketReturn/index.vue"]]);export{Fe as default};