index.1f9adbe7.js 8.4 KB

1
  1. import{al as i,aS as p,_ as X,d as Z,aL as ee,w as m,ah as ue,b3 as R,n as te,r as h,o as s,G as c,C as a,l as d,u as l,M as A,a as v,J as y,aY as M}from"./index.42bf163d.js";import{c as le,b as ne,a as oe}from"./index.cac8bb6a.js";import{u as T,f as U,i as N,d as ae,e as re}from"./status.d6b2a53d.js";import{r as ie}from"./columnRenderHelper.3490fdb2.js";import{u as pe}from"./use-page-search.d97bdd00.js";import se from"./post-modal.9edc7d06.js";import ce from"./index.0504fd84.js";import{h as de}from"./export.e9249fd9.js";import{u as D,w as fe}from"./xlsx.ed122d16.js";import Fe from"./approval-modal.5af13bb3.js";import me from"./back-modal.a0657bfd.js";import"./execl-upload.e1817bbd.js";import"./status.4c13d767.js";import"./verification.611d3025.js";const ve=[{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"}],Be=[{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,...ie("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:"\u5E73\u53F0\u7C7B\u578B",prop:"platform_type",width:110,cellRenderer:({row:u})=>i(p,null,{default:()=>{var e;return((e=T.find(t=>t.value==u.platform_type+""))==null?void 0:e.label)||"--"}})},{label:"\u662F\u5426\u6709\u5907\u6CE8",width:80,cellRenderer:({row:u})=>i(p,null,{default:()=>u.exam_remark&&u.exam_remark.length>0?"\u662F":"\u5426"})},{label:"\u72B6\u6001",prop:"status",width:125,cellRenderer:({row:u})=>i(p,null,{default:()=>{var e;return((e=U.find(t=>t.value==u.status+""))==null?void 0:e.label)||"--"}})},{label:"\u5F00\u7968\u65B9\u5F0F",prop:"open_type",width:135,cellRenderer:({row:u})=>i(p,null,{default:()=>{var e;return((e=ve.find(t=>t.value==u.open_type+""))==null?void 0:e.label)||"\u672A\u9009\u62E9"}})},{field:"is_ticket",label:"\u662F\u5426\u652F\u6301\u91D1\u7A0E",width:90,cellRenderer({row:u}){return i(p,null,{default:()=>String(u.is_ticket)==="2"?"\u4E0D\u652F\u6301":String(u.is_ticket)==="1"?"\u652F\u6301":"--"})}},{label:"\u53D1\u7968\u7C7B\u578B",prop:"status",width:150,cellRenderer:({row:u})=>i(p,null,{default:()=>{var e;return((e=N.find(t=>t.value==u.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:u})=>i(p,null,{default:()=>{var e;return((e=ae.find(t=>t.value==u.seller_check+""))==null?void 0:e.label)||"--"}})},{label:"\u9500\u552E\u65B9\u62AC\u5934\u72B6\u6001",prop:"buyer_check",width:130,cellRenderer:({row:u})=>i(p,null,{default:()=>{var e;return((e=re.find(t=>t.value==u.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:140,slot:"operation"}],he={title:"\u53D1\u7968\u7533\u8BF7\u7BA1\u7406",columns:Be,superUserNoAction:!0,companyProp:"inv_out",apis:{httpList:le,httpAdd:!0}},I={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:U},{field:"platform_type",type:"select",placeholder:"\u5E73\u53F0\u7C7B\u578B",span:4,options:T},{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:N.slice(0,4),span:4},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA",span:4}]},ye={\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"},_e=Z({__name:"index",setup(u){const e="invoiceApply",{hasPermissionWithCode:t}=ee(e),_=m(!1),k="/InvoiceSales/invoiceApplyDetail",g=m(null),b=m(null),w=m(null),S=m(null),{isSuperUser:B}=ue(),f=m(null),{run:O}=R({success:()=>f.value.onSearch()}),{run:L}=R({success:()=>f.value.onSearch()}),z=({invNo:o})=>{L(ne({invNo:o,status:"7"}))},{push:x}=te(),E=m([]),V={pageSearchHook:()=>pe(void 0,void 0,I)};function j(o){O(oe(o))}const H={content:{preview:({invNo:o})=>x(`${k}?id=${o}`),create:()=>x(k)}};async function $(){await de({url:"/ipe",name:"\u5F00\u7968\u4FE1\u606F",onStart:()=>_.value=!0,onSuccess:()=>_.value=!1,onFail:()=>_.value=!1,params:{...f.value.getBasicParams()}})}function q(){if(E.value.length===0){M.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")){M.warning('\u8BF7\u9009\u62E9\u72B6\u6001\u4E3A"\u5F85\u8D22\u52A1\u5BA1\u6838"\u7684\u53D1\u7968\u7533\u8BF7');return}w.value.onDisplay(E.value)}function G(){const o=D.book_new(),n=D.json_to_sheet([ye]);D.book_append_sheet(o,n,"sheet"),fe(o,"\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(o,n)=>{const F=h("ElButton"),P=h("ElTooltip"),J=h("ElPopconfirm"),W=h("PageContainer"),Y=h("PageAuth");return s(),c(Y,{pageName:e},{default:a(()=>[d(W,{hooks:V,events:H,contentConfig:l(he),"search-config":l(I),"get-content-ref":r=>f.value=r,onContentSelectChange:n[3]||(n[3]=r=>E.value=r)},{content_header:a(()=>[l(t)("040")&&!l(B)?(s(),c(F,{key:0,size:"small",onClick:q},{default:a(()=>[A(" \u8D22\u52A1\u6279\u91CF\u5BA1\u6838(\u52FE\u9009) ")]),_:1})):v("v-if",!0),l(t)("026")?(s(),c(F,{key:1,icon:l(y)("arrow-up-line"),size:"small",loading:_.value,onClick:n[0]||(n[0]=()=>$())},{default:a(()=>[A("\u5F00\u7968\u4FE1\u606F\u5BFC\u51FA")]),_:1},8,["icon","loading"])):v("v-if",!0),l(t)("027")?(s(),c(F,{key:2,icon:l(y)("arrow-down-line"),size:"small",onClick:n[1]||(n[1]=()=>G())},{default:a(()=>[A("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u5BFC\u5165\u6A21\u677F")]),_:1},8,["icon"])):v("v-if",!0),!l(B)&&l(t)("028")?(s(),c(F,{key:3,onClick:n[2]||(n[2]=()=>b.value.onDisplay()),size:"small"},{default:a(()=>[A("\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u5F00\u7968\u7ED3\u679C\uFF08\u53D1\u7968\u7533\u8BF7\uFF09")]),_:1})):v("v-if",!0)]),content_action:a(({status:r,post_code:K,invNo:C,inv_type:Q})=>[!l(B)&&String(r)==="3"&&!K?(s(),c(P,{key:0,content:"\u586B\u5199\u7269\u6D41",placement:"top"},{default:a(()=>[d(F,{text:"",type:"primary",style:{"margin-left":"0px"},icon:l(y)("promotion"),onClick:()=>g.value.onDisplay(C)},null,8,["icon","onClick"])]),_:2},1024)):v("v-if",!0),(String(r)==="1"||String(r)==="5")&&l(t)("010")&&!l(B)?(s(),c(J,{key:1,placement:"top",title:"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u5F00\u7968\u7533\u8BF7?",onConfirm:()=>z({invNo:C})},{reference:a(()=>[d(F,{text:"",type:"primary",style:{"margin-left":"0px"},icon:l(y)("refresh-right")},null,8,["icon"])]),_:2},1032,["onConfirm"])):v("v-if",!0),d(P,{content:"\u4FEE\u6539\u53D1\u7968\u4FE1\u606F",placement:"top"},{default:a(()=>[String(r)==="5"&&l(t)("005")&&!l(B)?(s(),c(F,{key:0,text:"",style:{"margin-left":"0px"},icon:l(y)("edit"),type:"primary",onClick:()=>S.value.onDisplay(Q,C)},null,8,["icon","onClick"])):v("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"]),d(se,{ref_key:"postModalRef",ref:g,onPostSave:j},null,512),d(Fe,{ref_key:"approvalModalRef",ref:w,onOnBatchApprovalComplete:n[4]||(n[4]=()=>f.value.onSearch())},null,512),d(ce,{ref_key:"execlUploadRef",ref:b,onOnSuccess:n[5]||(n[5]=()=>f.value.onSearch())},null,512),d(me,{ref_key:"backModalRef",ref:S,onRefresh:n[6]||(n[6]=()=>f.value.onSearch())},null,512)]),_:1})}}});var Te=X(_e,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/index.vue"]]);export{Te as default};