purchase.017e0ed9.js 4.7 KB

1
  1. import{aj as l,aL as n,aM as y,ah as d,_ as w,d as k,E as v,A as P,x as i,o as h,N as D,K as m,y as F,u as r,R as N,a as S}from"./index.743f0c80.js";import{h as R,a as x}from"./index.cb28f7dd.js";import{i as T}from"./status.868e86c0.js";import{u as M}from"./use-page-search.a895acdb.js";import Y from"./invoice-modal.9c994951.js";import"./index.5fbf2896.js";import"./invoice.7fa18a6d.js";const B=[{label:"\u56FE\u7247\u8BC6\u522B\u4E2D",value:"0"},{label:"\u5F85\u7CFB\u7EDF\u9A8C\u8BC1",value:"1"},{label:"\u4E70\u65B9\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838",value:"2"},{label:"\u5F85\u4E70\u65B9\u516C\u53F8\u8BA4\u8BC1",value:"3"},{label:"\u8BA4\u8BC1\u6210\u529F",value:"4"},{label:"\u9A8C\u8BC1\u5931\u8D25",value:"5"},{label:"\u4E70\u65B9\u5BA1\u6838\u9A73\u56DE",value:"6"},{label:"\u8BA4\u8BC1\u5931\u8D25",value:"7"},{label:"\u56DE\u7968\u6D41\u7A0B\u7EC8\u6B62",value:"8"},{label:"\u9A8C\u8BC1\u8D85\u8FC7\u6B21\u6570",value:"9"},{label:"\u56DE\u7968\u5DF2\u9000",value:"10"}],z=[{value:"1",label:"\u624B\u5DE5\u6DFB\u52A0"},{value:"2",label:"ocr\u8BC6\u522B"},{value:"3",label:"\u91D1\u7A0E\u8BC6\u522B"}],I=[{value:"0",label:"\u672A\u5206\u914D\u67E5\u8BE2"},{value:"1",label:"\u91D1\u7A0E\u63A5\u53E3"},{value:"2",label:"\u534E\u4E3A\u4E91"}],L=[{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 t;return(t=B.find(u=>String(e)===String(u.value)))==null?void 0:t.label},cellRenderer:({row:e,props:t})=>l(n,{size:t.size},{default:()=>{var u;return(u=B.find(a=>String(e.status)===String(a.value)))==null?void 0:u.label}})},{label:"\u53D1\u7968\u4E0A\u4F20\u65B9\u5F0F",prop:"invType",width:120,cellRenderer:({row:e,props:t})=>l(n,{size:t.size},{default:()=>{var u;return(u=z.find(a=>String(e.invType)===String(a.value)))==null?void 0:u.label}})},{label:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",width:120,cellRenderer:({row:e,props:t})=>l(n,{size:t.size},{default:()=>{var u;return(u=I.find(a=>String(e.checkApi)===a.value))==null?void 0:u.label}})},{label:"\u53D1\u7968\u56FE\u7247",prop:"inv_img",width:85,cellRenderer:({row:e})=>l(y,{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:"\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?d(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 l(n,null,{default:()=>{var t;return((t=T.find(({value:u})=>u===e.invoiceType))==null?void 0:t.label)||"--"}})}},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:180,formatter:({addtime:e})=>d(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:110}],O={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:L,apis:{httpDelete:R,httpList:x},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,notPreview:!0,showDelete:({status:e})=>Number(e)<=3},b={formItems:[{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"}}]},H=k({__name:"purchase",setup(e){const t="query",u="/purchase/ticketReturnDetail",a=["3","4","5","6","9","10","12"],f=v(null),s=v(null),{push:p}=P(),E={pageSearchHook:()=>M(void 0,void 0,b)},C={content:{preview:({hpNo:c})=>p(`${u}?id=${c}`),create:()=>p(u)}};return(c,j)=>{const g=i("ElButton"),_=i("PageContainer"),A=i("PageAuth");return h(),D(A,{pageName:t},{default:m(()=>[F(_,{hooks:E,events:C,contentConfig:r(O),"search-config":r(b),"get-content-ref":o=>f.value=o},{content_action:m(o=>[a.includes(String(o.status))?(h(),D(g,{key:0,link:"",type:"primary",icon:r(N)("scaletooriginal"),onClick:()=>s.value.onDisplay(o.invoiceNumber)},null,8,["icon","onClick"])):S("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),F(Y,{"inv-type":"purchase",ref_key:"invoiceModalRef",ref:s},null,512)]),_:1})}}});var Q=w(H,[["__file","D:/work/accout-vue3-ui/src/views/invoice/query/components/purchase.vue"]]);export{Q as default};