1 |
- import{aj as h,aF as v,_ as Z,d as $,aZ as q,F as d,ai as G,b8 as w,B as J,y as f,o as s,O as i,L as a,z as m,u as o,T as y,V as F,Z as D}from"./index.bfaa26f1.js";import{b as K,a as Q,h as X}from"./index.7d651c89.js";import{a as x}from"./inv-open.7821cd59.js";import{i as Y,e as ee,f as ue}from"./status.ba3625fb.js";import{u as te}from"./use-page-search.e4daa53b.js";import oe from"./post-modal.e2d68f85.js";import ne from"./index.e2214154.js";import{h as le}from"./export.612b89f4.js";import{u as B,w as ae}from"./xlsx.ed122d16.js";import"./tootip.7350812f.js";import"./execl-upload.913f840e.js";const re=[{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=x.find(u=>u.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=Y.find(u=>u.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(u=>u.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(u=>u.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"}],se={title:"\u53D1\u7968\u7533\u8BF7\u7BA1\u7406",columns:re,superUserNoAction:!0,companyProp:"inv_out",apis:{httpList:K,httpAdd:!0}},S={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:x},{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",\u53D1\u7968\u91D1\u989D:"4900",\u53D1\u7968\u7A0E\u540E\u91D1\u989D:"",\u6821\u9A8C\u7801:"",\u5F00\u7968\u65E5\u671F:"2020/12/17 0:00:00"},pe=D("\u5F00\u7968\u4FE1\u606F\u5BFC\u51FA"),ce=D("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u5BFC\u5165\u6A21\u677F"),de=D("\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u5F00\u7968\u7ED3\u679C\uFF08\u53D1\u7968\u7533\u8BF7\uFF09"),fe=$({__name:"index",setup(l){const e="invoiceApply",{hasPermissionWithCode:u}=q(e),_=d(!1),E="/InvoiceSales/invoiceApplyDetail",C=d(null),k=d(null),{isSuperUser:A}=G(),p=d(null),{run:P}=w({success:()=>p.value.onSearch()}),{run:R}=w({success:()=>p.value.onSearch()}),N=({invNo:n})=>R(Q({invNo:n,status:"7"})),{push:g}=J(),T=d([]),U={pageSearchHook:()=>te(void 0,void 0,S)};function I(n){P(X(n))}const V={content:{preview:({invNo:n})=>g(`${E}?id=${n}`),create:()=>g(E)}};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 z(){const n=B.book_new(),t=B.json_to_sheet([ie]);B.book_append_sheet(n,t,"sheet"),ae(n,"\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(n,t)=>{const c=f("ElButton"),L=f("ElTooltip"),j=f("ElPopconfirm"),M=f("PageContainer"),H=f("PageAuth");return s(),i(H,{pageName:e},{default:a(()=>[m(M,{hooks:U,events:V,contentConfig:o(se),"search-config":o(S),"get-content-ref":r=>p.value=r,onContentSelectChange:t[3]||(t[3]=r=>T.value=r)},{content_header:a(()=>[o(u)("026")?(s(),i(c,{key:0,icon:o(y)("arrow-up-line"),size:"small",loading:_.value,onClick:t[0]||(t[0]=()=>O())},{default:a(()=>[pe]),_:1},8,["icon","loading"])):F("v-if",!0),o(u)("027")?(s(),i(c,{key:1,icon:o(y)("arrow-down-line"),size:"small",onClick:t[1]||(t[1]=()=>z())},{default:a(()=>[ce]),_:1},8,["icon"])):F("v-if",!0),!o(A)&&o(u)("028")?(s(),i(c,{key:2,onClick:t[2]||(t[2]=()=>k.value.onDisplay()),size:"small"},{default:a(()=>[de]),_:1})):F("v-if",!0)]),content_action:a(({status:r,post_code:W,invNo:b})=>[!o(A)&&String(r)==="3"&&!W?(s(),i(L,{key:0,content:"\u586B\u5199\u7269\u6D41",placement:"top"},{default:a(()=>[m(c,{text:"",type:"primary",style:{"margin-left":"0px"},icon:o(y)("promotion"),onClick:()=>C.value.onDisplay(b)},null,8,["icon","onClick"])]),_:2},1024)):F("v-if",!0),(String(r)==="1"||String(r)==="5")&&o(u)("010")?(s(),i(j,{key:1,placement:"top",title:"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u5F00\u7968\u7533\u8BF7?","on-confirm":()=>N({invNo:b})},{reference:a(()=>[m(c,{text:"",type:"primary",style:{"margin-left":"0px"},icon:o(y)("refresh-right")},null,8,["icon"])]),_:2},1032,["on-confirm"])):F("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),m(oe,{ref_key:"postModalRef",ref:C,onPostSave:I},null,512),m(ne,{ref_key:"execlUploadRef",ref:k,onOnSuccess:t[4]||(t[4]=()=>p.value.onSearch())},null,512)]),_:1})}}});var Ae=Z(fe,[["__file","/Users/apple/Desktop/company-projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/index.vue"]]);export{Ae as default};
|