1 |
- import{ao as h,aL as v,_ as $,d as q,b4 as K,E as d,ai as G,bd as w,A as J,x as f,o as r,N as i,K as a,y as F,u,R as y,a as m,W as A}from"./index.2ea15e16.js";import{c as Q,b as X,a as Y}from"./index.ce519c31.js";import{e as S,i as Z,s as ee,c as ue}from"./status.0ef18281.js";import{u as te}from"./use-page-search.579bcbb4.js";import oe from"./post-modal.2a030712.js";import ne from"./index.255ef3b0.js";import{h as le}from"./export.ba8aab1d.js";import{u as E,w as ae}from"./xlsx.ed122d16.js";import"./execl-upload.759d9d0b.js";const se=[{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:l})=>h(v,null,{default:()=>{var e;return((e=S.find(t=>t.value==l.status+""))==null?void 0:e.label)||"--"}})},{label:"\u53D1\u7968\u7C7B\u578B",prop:"status",minWidth:160,cellRenderer:({row:l})=>h(v,null,{default:()=>{var e;return((e=Z.find(t=>t.value==l.inv_type+""))==null?void 0:e.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:l})=>h(v,null,{default:()=>{var e;return((e=ee.find(t=>t.value==l.seller_check+""))==null?void 0:e.label)||"--"}})},{label:"\u9500\u552E\u65B9\u62AC\u5934\u72B6\u6001",prop:"buyer_check",width:130,cellRenderer:({row:l})=>h(v,null,{default:()=>{var e;return((e=ue.find(t=>t.value==l.buyer_check+""))==null?void 0:e.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:80,slot:"operation"}],re={title:"\u53D1\u7968\u7533\u8BF7\u7BA1\u7406",columns:se,superUserNoAction:!0,companyProp:"inv_out",apis:{httpList:Q,httpAdd:!0}},x={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:S},{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"}}]},ie={\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"},pe=A("\u5F00\u7968\u4FE1\u606F\u5BFC\u51FA"),ce=A("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u5BFC\u5165\u6A21\u677F"),de=A("\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u5F00\u7968\u7ED3\u679C\uFF08\u53D1\u7968\u7533\u8BF7\uFF09"),fe=q({__name:"index",setup(l){const e="invoiceApply",{hasPermissionWithCode:t}=K(e),_=d(!1),C="/InvoiceSales/invoiceApplyDetail",D=d(null),k=d(null),{isSuperUser:B}=G(),p=d(null),{run:P}=w({success:()=>p.value.onSearch()}),{run:R}=w({success:()=>p.value.onSearch()}),N=({invNo:n})=>R(X({invNo:n,status:"7"})),{push:b}=J(),U=d([]),I={pageSearchHook:()=>te(void 0,void 0,x)};function T(n){P(Y(n))}const L={content:{preview:({invNo:n})=>b(`${C}?id=${n}`),create:()=>b(C)}};async function O(){await le({url:"/ipe",name:"\u5F00\u7968\u4FE1\u606F",onStart:()=>_.value=!0,onSuccess:()=>_.value=!1,onFail:()=>_.value=!1,params:{...p.value.getBasicParams()}})}function V(){const n=E.book_new(),o=E.json_to_sheet([ie]);E.book_append_sheet(n,o,"sheet"),ae(n,"\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(n,o)=>{const c=f("ElButton"),z=f("ElTooltip"),M=f("ElPopconfirm"),W=f("PageContainer"),j=f("PageAuth");return r(),i(j,{pageName:e},{default:a(()=>[F(W,{hooks:I,events:L,contentConfig:u(re),"search-config":u(x),"get-content-ref":s=>p.value=s,onContentSelectChange:o[3]||(o[3]=s=>U.value=s)},{content_header:a(()=>[u(t)("026")?(r(),i(c,{key:0,icon:u(y)("arrow-up-line"),size:"small",loading:_.value,onClick:o[0]||(o[0]=()=>O())},{default:a(()=>[pe]),_:1},8,["icon","loading"])):m("v-if",!0),u(t)("027")?(r(),i(c,{key:1,icon:u(y)("arrow-down-line"),size:"small",onClick:o[1]||(o[1]=()=>V())},{default:a(()=>[ce]),_:1},8,["icon"])):m("v-if",!0),!u(B)&&u(t)("028")?(r(),i(c,{key:2,onClick:o[2]||(o[2]=()=>k.value.onDisplay()),size:"small"},{default:a(()=>[de]),_:1})):m("v-if",!0)]),content_action:a(({status:s,post_code:H,invNo:g})=>[!u(B)&&String(s)==="3"&&!H?(r(),i(z,{key:0,content:"\u586B\u5199\u7269\u6D41",placement:"top"},{default:a(()=>[F(c,{text:"",type:"primary",style:{"margin-left":"0px"},icon:u(y)("promotion"),onClick:()=>D.value.onDisplay(g)},null,8,["icon","onClick"])]),_:2},1024)):m("v-if",!0),(String(s)==="1"||String(s)==="5")&&u(t)("010")&&!u(B)?(r(),i(M,{key:1,placement:"top",title:"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u5F00\u7968\u7533\u8BF7?","on-confirm":()=>N({invNo:g})},{reference:a(()=>[F(c,{text:"",type:"primary",style:{"margin-left":"0px"},icon:u(y)("refresh-right")},null,8,["icon"])]),_:2},1032,["on-confirm"])):m("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),F(oe,{ref_key:"postModalRef",ref:D,onPostSave:T},null,512),F(ne,{ref_key:"execlUploadRef",ref:k,onOnSuccess:o[4]||(o[4]=()=>p.value.onSearch())},null,512)]),_:1})}}});var Ce=$(fe,[["__file","/Users/apple/Desktop/company-projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/index.vue"]]);export{Ce as default};
|