1 |
- import{b_ as ee,al as s,aS as c,_ as ue,d as te,aN as le,w as d,ah as ne,b5 as M,n as oe,r as y,o as f,G as F,C as r,j as i,l,M as A,a as m,J as B,bZ as ae,bY as re,a$ as I}from"./index.js";import{u as N,n as T,i as O,j as ie,k as pe}from"./status.642bba24.js";import{r as se}from"./columnRenderHelper.e135e093.js";import{u as ce}from"./use-page-search.25c4eb03.js";import de from"./post-modal.89f781.js";import fe from"./index.c126ae.js";import{h as Fe}from"./export.0c0241a5.js";import me from"./approval-modal.7f0117.js";import ve from"./back-modal.65d106.js";import{u as k,w as Be}from"./xlsx.ed122d16.js";import ye from"./invoice-modal.ecfe8e.js";import"./execl-upload.6821a9a0.js";import"./status.4c13d767.js";import"./verification.611d3025.js";import"./index.c26071fb.js";const he=[{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"}],_e=[{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:u})=>s(c,null,{default:()=>{var e;return((e=N.find(t=>t.value==u.platform_type+""))==null?void 0:e.label)||"--"}})},{label:"\u662F\u5426\u6709\u5907\u6CE8",width:80,cellRenderer:({row:u})=>s(c,null,{default:()=>u.exam_remark&&u.exam_remark.length>0?"\u662F":"\u5426"})},{label:"\u72B6\u6001",prop:"status",width:125,cellRenderer:({row:u})=>s(c,null,{default:()=>{var e;return((e=T.find(t=>t.value==u.status+""))==null?void 0:e.label)||"--"}})},{label:"\u5F00\u7968\u65B9\u5F0F",prop:"open_type",width:135,cellRenderer:({row:u})=>s(c,null,{default:()=>{var e;return((e=he.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 s(c,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})=>s(c,null,{default:()=>{var e;return((e=O.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})=>s(c,null,{default:()=>{var e;return((e=ie.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})=>s(c,null,{default:()=>{var e;return((e=pe.find(t=>t.value==u.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:_e,superUserNoAction:!0,companyProp:"inv_out",apis:{httpList:ee,httpAdd:!0}},U={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:T},{field:"platform_type",type:"select",placeholder:"\u5E73\u53F0\u7C7B\u578B",span:4,options:N},{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\u7A0E\u524D\u91D1\u989D:"",\u6821\u9A8C\u7801:"",\u5F00\u7968\u65E5\u671F:"2020/12/17 0:00:00"},Ce=te({__name:"index",setup(u){const e="invoiceApply",{hasPermissionWithCode:t}=le(e),h=d(!1),D="/InvoiceSales/invoiceApplyDetail",g=d(null),b=d(null),w=d(null),S=d(null),x=d(null),{isSuperUser:_}=ne(),v=d(null),{run:L}=M({success:()=>v.value.onSearch()}),{run:j}=M({success:()=>v.value.onSearch()}),z=({invNo:o})=>j(ae({invNo:o,status:"7"})),{push:P}=oe(),E=d([]),V={pageSearchHook:()=>ce(void 0,void 0,U)};function $(o){L(re(o))}const H={content:{preview:({invNo:o})=>P(`${D}?id=${o}`),create:()=>P(D)}};async function W(){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 q(){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 G(){const o=k.book_new(),n=k.json_to_sheet([Ae]);k.book_append_sheet(o,n,"sheet"),Be(o,"\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(o,n)=>{const p=y("ElButton"),R=y("ElTooltip"),J=y("ElPopconfirm"),Y=y("PageContainer"),Z=y("PageAuth");return f(),F(Z,{pageName:e},{default:r(()=>[i(Y,{hooks:V,events:H,contentConfig:l(Ee),"search-config":l(U),"get-content-ref":a=>v.value=a,onContentSelectChange:n[3]||(n[3]=a=>E.value=a)},{content_header:r(()=>[l(t)("040")&&!l(_)?(f(),F(p,{key:0,size:"small",onClick:q},{default:r(()=>[A(" \u8D22\u52A1\u6279\u91CF\u5BA1\u6838(\u52FE\u9009) ")]),_:1})):m("v-if",!0),l(t)("026")?(f(),F(p,{key:1,icon:l(B)("arrow-up-line"),size:"small",loading:h.value,onClick:n[0]||(n[0]=()=>W())},{default:r(()=>[A("\u5F00\u7968\u4FE1\u606F\u5BFC\u51FA")]),_:1},8,["icon","loading"])):m("v-if",!0),l(t)("027")?(f(),F(p,{key:2,icon:l(B)("arrow-down-line"),size:"small",onClick:n[1]||(n[1]=()=>G())},{default:r(()=>[A("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u5BFC\u5165\u6A21\u677F")]),_:1},8,["icon"])):m("v-if",!0),m(` v-if="!isSuperUser && hasPermissionWithCode('028')" `),i(p,{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})]),content_action:r(({status:a,post_code:K,invNo:C,inv_type:Q,inv_number:X})=>[!l(_)&&String(a)==="3"&&!K?(f(),F(R,{key:0,content:"\u586B\u5199\u7269\u6D41",placement:"top"},{default:r(()=>[i(p,{text:"",type:"primary",style:{"margin-left":"0px"},icon:l(B)("promotion"),onClick:()=>g.value.onDisplay(C)},null,8,["icon","onClick"])]),_:2},1024)):m("v-if",!0),(String(a)==="1"||String(a)==="5")&&l(t)("010")&&!l(_)?(f(),F(J,{key:1,placement:"top",title:"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u5F00\u7968\u7533\u8BF7?",onConfirm:()=>z({invNo:C})},{reference:r(()=>[i(p,{text:"",type:"primary",style:{"margin-left":"0px"},icon:l(B)("refresh-right")},null,8,["icon"])]),_:2},1032,["onConfirm"])):m("v-if",!0),i(R,{content:"\u4FEE\u6539\u53D1\u7968\u4FE1\u606F",placement:"top"},{default:r(()=>[String(a)==="5"&&l(t)("005")&&!l(_)?(f(),F(p,{key:0,text:"",style:{"margin-left":"0px"},icon:l(B)("edit"),type:"primary",onClick:()=>x.value.onDisplay(Q,C)},null,8,["icon","onClick"])):m("v-if",!0)]),_:2},1024),String(a)==="4"||String(a)==="6"?(f(),F(p,{key:2,link:"",type:"primary",icon:l(B)("scaletooriginal"),onClick:()=>b.value.open(X)},null,8,["icon","onClick"])):m("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),i(de,{ref_key:"postModalRef",ref:g,onPostSave:$},null,512),i(me,{ref_key:"approvalModalRef",ref:S,onOnBatchApprovalComplete:n[4]||(n[4]=()=>v.value.onSearch())},null,512),i(fe,{ref_key:"execlUploadRef",ref:w,onOnSuccess:n[5]||(n[5]=()=>v.value.onSearch())},null,512),i(ve,{ref_key:"backModalRef",ref:x,onRefresh:n[6]||(n[6]=()=>v.value.onSearch())},null,512),i(ye,{ref_key:"invModalRef",ref:b},null,512)]),_:1})}}});var Le=ue(Ce,[["__file","C:/Users/63107/Desktop/projects/settle-vue3/src/views/InvoiceSales/invoiceApply/index.vue"]]);export{Le as default};
|