1 |
- import{aj as v,aL as y,_ as K,d as Z,bo as G,E as f,ai as J,aZ as S,A as Q,x as F,o as i,N as s,K as l,y as p,u as e,R as _,a as m,W as C}from"./index.743f0c80.js";import{h as X,c as Y,b as ee}from"./index.8212cab4.js";import{I as R}from"./inv-open.a0819b58.js";import{i as ue,a as te,b as oe}from"./status.868e86c0.js";import{u as ne}from"./use-page-search.a895acdb.js";import le from"./post-modal.5944bda5.js";import ae from"./index.4b168bd0.js";import{h as re}from"./export.155240ef.js";import{u as E,w as ie}from"./xlsx.ed122d16.js";import se from"./back-modal.43789ded.js";import"./tootip.48acd346.js";import"./execl-upload.acc3acaa.js";import"./status.4c13d767.js";const pe=[{label:"\u53D1\u7968\u7533\u8BF7\u7F16\u53F7",prop:"invNo",width:155},{label:"\u4E1A\u52A1\u4F01\u4E1A\u7F16\u53F7",prop:"inv_out",width:155},{label:"\u5BA2\u6237\u516C\u53F8\u540D\u79F0",prop:"buyer_title",width:175},{label:"\u7533\u8BF7\u989D\u5EA6",prop:"inv_value",width:110},{label:"\u72B6\u6001",prop:"status",width:125,cellRenderer:({row:a})=>v(y,null,{default:()=>{var u;return((u=R.find(o=>o.value==a.status+""))==null?void 0:u.label)||"--"}})},{label:"\u53D1\u7968\u7C7B\u578B",prop:"status",minWidth:160,cellRenderer:({row:a})=>v(y,null,{default:()=>{var u;return((u=ue.find(o=>o.value==a.inv_type+""))==null?void 0:u.label)||"--"}})},{label:"\u53D1\u7968\u53F7\u7801",prop:"inv_number",width:130},{label:"\u53D1\u7968\u4EE3\u7801",prop:"inv_code",width:100},{label:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:a})=>v(y,null,{default:()=>{var u;return((u=te.find(o=>o.value==a.seller_check+""))==null?void 0:u.label)||"--"}})},{label:"\u9500\u552E\u65B9\u62AC\u5934\u72B6\u6001",prop:"buyer_check",width:130,cellRenderer:({row:a})=>v(y,null,{default:()=>{var u;return((u=oe.find(o=>o.value==a.buyer_check+""))==null?void 0:u.label)||"--"}})},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:80},{label:"\u521B\u5EFA\u65F6\u95F4",width:140,prop:"addtime"},{label:"\u64CD\u4F5C",fixed:"right",width:140,slot:"operation"}],ce={title:"\u53D1\u7968\u7533\u8BF7\u7BA1\u7406",columns:pe,superUserNoAction:!0,companyProp:"inv_out",apis:{httpList:X,httpAdd:!0}},P={colLayout:{span:8},formItems:[{field:"invNo",type:"input",placeholder:"\u53D1\u7968\u7533\u8BF7\u7F16\u53F7"},{field:"buyer_name",type:"input",placeholder:"\u5BA2\u6237\u540D\u79F0"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"},{field:"status",type:"select",placeholder:"\u72B6\u6001",span:4,options:R},{field:"timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u7533\u8BF7\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7533\u8BF7\u7ED3\u675F\u65F6\u95F4"}}]},de={\u53D1\u7968\u7533\u8BF7\u7F16\u53F7:"INV20210712w0vHkk",\u53D1\u7968\u7C7B\u578B:"\u589E\u503C\u7A0E\u7535\u5B50\u666E\u901A\u53D1\u7968",\u53D1\u7968\u4EE3\u7801:"011002000711",\u53D1\u7968\u53F7\u7801:"51678540",\u4EF7\u7A0E\u5408\u8BA1:"4900",\u53D1\u7968\u91D1\u989D:"",\u6821\u9A8C\u7801:"",\u5F00\u7968\u65E5\u671F:"2020/12/17 0:00:00"},fe=C("\u5F00\u7968\u4FE1\u606F\u5BFC\u51FA"),me=C("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u5BFC\u5165\u6A21\u677F"),Fe=C("\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u5F00\u7968\u7ED3\u679C\uFF08\u53D1\u7968\u7533\u8BF7\uFF09"),_e=Z({__name:"index",setup(a){const u="invoiceApply",{hasPermissionWithCode:o}=G(u),h=f(!1),D="/InvoiceSales/invoiceApplyDetail",g=f(null),A=f(null),{isSuperUser:B}=J(),c=f(null),{run:N}=S({success:()=>c.value.onSearch()}),{run:I}=S({success:()=>c.value.onSearch()}),T=({invNo:n})=>I(Y({invNo:n,status:"7"})),{push:b}=Q(),U=f([]),w=f(null),M={pageSearchHook:()=>ne(void 0,void 0,P)};function V(n){N(ee(n))}const L={content:{preview:({invNo:n})=>b(`${D}?id=${n}`),create:()=>b(D)}};async function O(){await re({url:"/ipe",name:"\u5F00\u7968\u4FE1\u606F",onStart:()=>h.value=!0,onSuccess:()=>h.value=!1,onFail:()=>h.value=!1,params:{...c.value.getBasicParams()}})}function z(){const n=E.book_new(),t=E.json_to_sheet([de]);E.book_append_sheet(n,t,"sheet"),ie(n,"\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(n,t)=>{const d=F("ElButton"),x=F("ElTooltip"),W=F("ElPopconfirm"),j=F("PageContainer"),H=F("PageAuth");return i(),s(H,{pageName:u},{default:l(()=>[p(j,{hooks:M,events:L,contentConfig:e(ce),"search-config":e(P),"get-content-ref":r=>c.value=r,onContentSelectChange:t[3]||(t[3]=r=>U.value=r)},{content_header:l(()=>[e(o)("026")?(i(),s(d,{key:0,icon:e(_)("arrow-up-line"),size:"small",loading:h.value,onClick:t[0]||(t[0]=()=>O())},{default:l(()=>[fe]),_:1},8,["icon","loading"])):m("v-if",!0),e(o)("027")?(i(),s(d,{key:1,icon:e(_)("arrow-down-line"),size:"small",onClick:t[1]||(t[1]=()=>z())},{default:l(()=>[me]),_:1},8,["icon"])):m("v-if",!0),!e(B)&&e(o)("028")?(i(),s(d,{key:2,onClick:t[2]||(t[2]=()=>A.value.onDisplay()),size:"small"},{default:l(()=>[Fe]),_:1})):m("v-if",!0)]),content_action:l(({status:r,post_code:$,invNo:k,inv_type:q})=>[!e(B)&&String(r)==="3"&&!$?(i(),s(x,{key:0,content:"\u586B\u5199\u7269\u6D41",placement:"top"},{default:l(()=>[p(d,{text:"",type:"primary",style:{"margin-left":"0px"},icon:e(_)("promotion"),onClick:()=>g.value.onDisplay(k)},null,8,["icon","onClick"])]),_:2},1024)):m("v-if",!0),(String(r)==="1"||String(r)==="5")&&e(o)("010")&&!e(B)?(i(),s(W,{key:1,placement:"top",title:"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u5F00\u7968\u7533\u8BF7?","on-confirm":()=>T({invNo:k})},{reference:l(()=>[p(d,{text:"",type:"primary",style:{"margin-left":"0px","padding-right":"0px"},icon:e(_)("refresh-right")},null,8,["icon"])]),_:2},1032,["on-confirm"])):m("v-if",!0),String(r)==="5"&&e(o)("005")?(i(),s(x,{key:2,content:"\u4FEE\u6539\u53D1\u7968\u4FE1\u606F",placement:"top"},{default:l(()=>[p(d,{text:"",icon:e(_)("edit"),style:{"margin-left":"0px"},type:"primary",onClick:()=>w.value.onDisplay(q,k)},null,8,["icon","onClick"])]),_:2},1024)):m("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),p(le,{ref_key:"postModalRef",ref:g,onPostSave:V},null,512),p(ae,{ref_key:"execlUploadRef",ref:A,onOnSuccess:t[4]||(t[4]=()=>c.value.onSearch())},null,512),p(se,{ref_key:"backModalRef",ref:w,onRefresh:t[5]||(t[5]=()=>c.value.onSearch())},null,512)]),_:1})}}});var Se=K(_e,[["__file","D:/work/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/index.vue"]]);export{Se as default};
|