index.dea78531.js 8.7 KB

1
  1. import{al as d,aS as f,_ as ee,d as ue,aL as te,w as F,ah as le,b3 as M,n as ne,r as _,o as i,G as p,C as r,l as s,u,M as A,a as m,J as y,aY as I}from"./index.56c69f5a.js";import{c as oe,b as ae,a as re}from"./index.126bf4a4.js";import{u as U,m as N,i as O,g as ie,j as pe}from"./status.2df4810d.js";import{r as se}from"./columnRenderHelper.6c05b86e.js";import{u as ce}from"./use-page-search.27df6d7f.js";import de from"./post-modal.20739118.js";import fe from"./index.88b9b5aa.js";import{h as Fe}from"./export.61b14108.js";import me from"./approval-modal.747b05b2.js";import ve from"./back-modal.5acdf4bc.js";import{u as k,w as ye}from"./xlsx.ed122d16.js";import Be from"./invoice-modal.75f71b5f.js";import"./execl-upload.240c34a2.js";import"./status.4c13d767.js";import"./verification.611d3025.js";import"./index.211aa9d2.js";import"./invoice.3cbb6342.js";const _e=[{value:"1",label:"\u91D1\u7A0E\u5F00\u7968\u91D1\u7A0E\u9A8C\u7968"},{value:"2",label:"\u91D1\u7A0E\u5F00\u7968\u7EBF\u4E0B\u9A8C\u7968"},{value:"3",label:"\u7EBF\u4E0B\u5F00\u7968\u7EBF\u4E0B\u9A8C\u7968"}],he=[{type:"selection",width:40,align:"center"},{label:"\u53D1\u7968\u7533\u8BF7\u7F16\u7801",prop:"invNo",width:150},{label:"\u4E1A\u52A1\u4F01\u4E1A\u516C\u53F8",prop:"inv_out",width:180,...se("inv_out","inv_company","\u4E1A\u52A1\u4F01\u4E1A\u516C\u53F8\u7F16\u7801:")},{label:"\u5BA2\u6237\u516C\u53F8\u540D\u79F0",prop:"buyer_title",width:175},{label:"\u7533\u8BF7\u989D\u5EA6",prop:"inv_value",width:110},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:80},{label:"\u5E73\u53F0\u7C7B\u578B",prop:"platform_type",width:110,cellRenderer:({row:t})=>d(f,null,{default:()=>{var e;return((e=U.find(l=>l.value==t.platform_type+""))==null?void 0:e.label)||"--"}})},{label:"\u662F\u5426\u6709\u5907\u6CE8",width:80,cellRenderer:({row:t})=>d(f,null,{default:()=>t.exam_remark&&t.exam_remark.length>0?"\u662F":"\u5426"})},{label:"\u72B6\u6001",prop:"status",width:125,cellRenderer:({row:t})=>d(f,null,{default:()=>{var e;return((e=N.find(l=>l.value==t.status+""))==null?void 0:e.label)||"--"}})},{label:"\u5F00\u7968\u65B9\u5F0F",prop:"open_type",width:135,cellRenderer:({row:t})=>d(f,null,{default:()=>{var e;return((e=_e.find(l=>l.value==t.open_type+""))==null?void 0:e.label)||"\u672A\u9009\u62E9"}})},{field:"is_ticket",label:"\u662F\u5426\u652F\u6301\u91D1\u7A0E",width:90,cellRenderer({row:t}){return d(f,null,{default:()=>String(t.is_ticket)==="2"?"\u4E0D\u652F\u6301":String(t.is_ticket)==="1"?"\u652F\u6301":"--"})}},{label:"\u53D1\u7968\u7C7B\u578B",prop:"status",width:150,cellRenderer:({row:t})=>d(f,null,{default:()=>{var e;return((e=O.find(l=>l.value==t.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:t})=>d(f,null,{default:()=>{var e;return((e=ie.find(l=>l.value==t.seller_check+""))==null?void 0:e.label)||"--"}})},{label:"\u9500\u552E\u65B9\u62AC\u5934\u72B6\u6001",prop:"buyer_check",width:130,cellRenderer:({row:t})=>d(f,null,{default:()=>{var e;return((e=pe.find(l=>l.value==t.buyer_check+""))==null?void 0:e.label)||"--"}})},{label:"\u521B\u5EFA\u65F6\u95F4",width:140,prop:"addtime"},{label:"\u64CD\u4F5C",fixed:"right",width:140,slot:"operation"}],Ee={title:"\u53D1\u7968\u7533\u8BF7\u7BA1\u7406",columns:he,superUserNoAction:!0,companyProp:"inv_out",apis:{httpList:oe,httpAdd:!0}},T={colLayout:{span:8},formItems:[{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"}},{field:"status",type:"select",placeholder:"\u72B6\u6001",span:4,options:N},{field:"platform_type",type:"select",placeholder:"\u5E73\u53F0\u7C7B\u578B",span:4,options:U},{field:"buyer_name",type:"input",placeholder:"\u5BA2\u6237\u540D\u79F0"},{field:"invNo",type:"input",placeholder:"\u53D1\u7968\u7533\u8BF7\u7F16\u7801"},{field:"c",type:"range",otherOptions:{startProp:"inv_lower",endProp:"inv_uper",startPlaceholder:"\u7533\u8BF7\u989D\u5EA6\u4E0A\u9650",endPlaceholder:"\u7533\u8BF7\u989D\u5EA6\u4E0B\u9650"}},{field:"inv_type",type:"select",placeholder:"\u53D1\u7968\u7C7B\u578B",options:O,span:4},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA",span:4}]},Ae={\u53D1\u7968\u7533\u8BF7\u7F16\u7801:"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"},Ce=ue({__name:"index",setup(t){const e="invoiceApply",{hasPermissionWithCode:l}=te(e),h=F(!1),D="/InvoiceSales/invoiceApplyDetail",g=F(null),b=F(null),w=F(null),S=F(null),x=F(null),{isSuperUser:B}=le(),v=F(null),{run:L}=M({success:()=>v.value.onSearch()}),{run:z}=M({success:()=>v.value.onSearch()}),V=({invNo:o})=>z(ae({invNo:o,status:"7"})),{push:P}=ne(),E=F([]),j={pageSearchHook:()=>ce(void 0,void 0,T)};function H(o){L(re(o))}const $={content:{preview:({invNo:o})=>P(`${D}?id=${o}`),create:()=>P(D)}};async function q(){await Fe({url:"/ipe",name:"\u5F00\u7968\u4FE1\u606F",onStart:()=>h.value=!0,onSuccess:()=>h.value=!1,onFail:()=>h.value=!1,params:{...v.value.getBasicParams()}})}function G(){if(E.value.length===0){I.warning('\u8BF7\u9009\u62E9\u81F3\u5C11\u4E00\u6761"\u5F85\u8D22\u52A1\u5BA1\u6838"\u7684\u53D1\u7968\u7533\u8BF7');return}if(!E.value.every(({status:o})=>String(o)==="1")){I.warning('\u8BF7\u9009\u62E9\u72B6\u6001\u4E3A"\u5F85\u8D22\u52A1\u5BA1\u6838"\u7684\u53D1\u7968\u7533\u8BF7');return}S.value.onDisplay(E.value)}function J(){const o=k.book_new(),n=k.json_to_sheet([Ae]);k.book_append_sheet(o,n,"sheet"),ye(o,"\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(o,n)=>{const c=_("ElButton"),R=_("ElTooltip"),W=_("ElPopconfirm"),Y=_("PageContainer"),K=_("PageAuth");return i(),p(K,{pageName:e},{default:r(()=>[s(Y,{hooks:j,events:$,contentConfig:u(Ee),"search-config":u(T),"get-content-ref":a=>v.value=a,onContentSelectChange:n[3]||(n[3]=a=>E.value=a)},{content_header:r(()=>[u(l)("040")&&!u(B)?(i(),p(c,{key:0,size:"small",onClick:G},{default:r(()=>[A(" \u8D22\u52A1\u6279\u91CF\u5BA1\u6838(\u52FE\u9009) ")]),_:1})):m("v-if",!0),u(l)("026")?(i(),p(c,{key:1,icon:u(y)("arrow-up-line"),size:"small",loading:h.value,onClick:n[0]||(n[0]=()=>q())},{default:r(()=>[A("\u5F00\u7968\u4FE1\u606F\u5BFC\u51FA")]),_:1},8,["icon","loading"])):m("v-if",!0),u(l)("027")?(i(),p(c,{key:2,icon:u(y)("arrow-down-line"),size:"small",onClick:n[1]||(n[1]=()=>J())},{default:r(()=>[A("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u5BFC\u5165\u6A21\u677F")]),_:1},8,["icon"])):m("v-if",!0),!u(B)&&u(l)("028")?(i(),p(c,{key:3,onClick:n[2]||(n[2]=()=>w.value.onDisplay()),size:"small"},{default:r(()=>[A("\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u5F00\u7968\u7ED3\u679C\uFF08\u53D1\u7968\u7533\u8BF7\uFF09")]),_:1})):m("v-if",!0)]),content_action:r(({status:a,post_code:Q,invNo:C,inv_type:X,inv_number:Z})=>[!u(B)&&String(a)==="3"&&!Q?(i(),p(R,{key:0,content:"\u586B\u5199\u7269\u6D41",placement:"top"},{default:r(()=>[s(c,{text:"",type:"primary",style:{"margin-left":"0px"},icon:u(y)("promotion"),onClick:()=>g.value.onDisplay(C)},null,8,["icon","onClick"])]),_:2},1024)):m("v-if",!0),(String(a)==="1"||String(a)==="5")&&u(l)("010")&&!u(B)?(i(),p(W,{key:1,placement:"top",title:"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u5F00\u7968\u7533\u8BF7?",onConfirm:()=>V({invNo:C})},{reference:r(()=>[s(c,{text:"",type:"primary",style:{"margin-left":"0px"},icon:u(y)("refresh-right")},null,8,["icon"])]),_:2},1032,["onConfirm"])):m("v-if",!0),s(R,{content:"\u4FEE\u6539\u53D1\u7968\u4FE1\u606F",placement:"top"},{default:r(()=>[String(a)==="5"&&u(l)("005")&&!u(B)?(i(),p(c,{key:0,text:"",style:{"margin-left":"0px"},icon:u(y)("edit"),type:"primary",onClick:()=>x.value.onDisplay(X,C)},null,8,["icon","onClick"])):m("v-if",!0)]),_:2},1024),String(a)==="4"||String(a)==="6"?(i(),p(c,{key:2,link:"",type:"primary",icon:u(y)("scaletooriginal"),onClick:()=>b.value.open(Z)},null,8,["icon","onClick"])):m("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),s(de,{ref_key:"postModalRef",ref:g,onPostSave:H},null,512),s(me,{ref_key:"approvalModalRef",ref:S,onOnBatchApprovalComplete:n[4]||(n[4]=()=>v.value.onSearch())},null,512),s(fe,{ref_key:"execlUploadRef",ref:w,onOnSuccess:n[5]||(n[5]=()=>v.value.onSearch())},null,512),s(ve,{ref_key:"backModalRef",ref:x,onRefresh:n[6]||(n[6]=()=>v.value.onSearch())},null,512),s(Be,{ref_key:"invModalRef",ref:b},null,512)]),_:1})}}});var Ve=ee(Ce,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/index.vue"]]);export{Ve as default};