1 |
- import{bb as S,cs as V,am as f,dc as O,aR as m,bO as q,de as U,ae as R,cJ as J,cK as W,ct as $,_ as G,d as K,ai as Q,aM as X,x as i,cl as Z,p as ee,W as ue,r as b,o as r,G as p,D as n,l as _,m as t,c as te,L as P,a as c,J as h,M as C,bd as oe}from"./index.js";import{f as ae,a as le}from"./index.26d6ac45.js";import ne from"./invoice-modal.8dd918.js";import{h as se}from"./export.fc82d641.js";import{u as k,w as re}from"./xlsx.ed122d16.js";import ie from"./index.bb66eb.js";import pe from"./index.2c1ef7.js";import"./index.bf16817a.js";import"./execl-upload.7c83427b.js";const ce=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",width:70,hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u5BF9\u8D26\u56DE\u7968\u7533\u8BF7",prop:"hpNo",width:140},{label:"\u5BF9\u8D26\u7F16\u7801",prop:"payNo",width:150},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u7269\u6D41\u4F9B\u5E94\u5546",prop:"supplierName",width:145,...S("supplierNo","supplierName","\u7269\u6D41\u4F9B\u5E94\u5546\u7F16\u7801:")},{label:"\u53D1\u7968\u7A0E\u524D\u91D1\u989D",width:"110px",prop:"inv_subtotal_amount"},{label:"\u53D1\u7968\u7A0E\u540E\u91D1\u989D",width:"110px",prop:"total"},{label:"\u4F9B\u5E94\u5546\u7AEF",prop:"has_account",width:80,...V($,"has_account")},{label:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:e,props:u})=>f(m,{size:u.size},{default:()=>{var o;return(o=O.find(d=>String(e.status)===String(d.value)))==null?void 0:o.label}})},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:e}){return f(m,null,{default:()=>{var u;return((u=q.find(({value:o})=>o===e.invoiceType))==null?void 0:u.label)||"--"}})}},{label:"\u53D1\u7968\u72B6\u6001",width:70,prop:"invStatus_cn"},{label:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",width:100,cellRenderer:({row:e,props:u})=>f(m,{size:u.size},{default:()=>{var o;return(o=U.find(d=>String(e.checkApi)===d.value))==null?void 0:o.label}})},{label:"\u53D1\u7968\u53F7\u7801",width:110,prop:"invoiceNumber"},{label:"\u53D1\u7968\u4EE3\u7801",width:110,prop:"invoiceCode"},{label:"\u5F00\u7968\u65E5\u671F",prop:"open_time",width:90,formatter:({open_time:e})=>e?R(e).format("YYYY-MM-DD"):""},{label:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:e})=>f(m,null,{default:()=>{var u;return((u=J.find(o=>o.value==e.seller_check+""))==null?void 0:u.label)||"--"}})},{label:"\u9500\u552E\u65B9\u62AC\u5934\u72B6\u6001",prop:"buyer_check",width:130,cellRenderer:({row:e})=>f(m,null,{default:()=>{var u;return((u=W.find(o=>o.value==e.buyer_check+""))==null?void 0:u.label)||"--"}})},{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName",width:145,...S("companyNo","companyName","\u4E1A\u52A1\u516C\u53F8\u7F16\u7801:")},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:150,formatter:({addtime:e})=>R(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:110}],de={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:ce,apis:{httpDelete:ae,httpList:e=>le({...e,pay_type:"2"}),httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,showDelete:({status:e})=>Number(e)<=3},I={formItems:[{field:"create_timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u65B0\u5EFA\u8D77\u59CB\u65F6\u95F4",endPlaceholder:"\u65B0\u5EFA\u7ED3\u675F\u65F6\u95F4"}},{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",options:O},{field:"supplierNo",type:"supplier-query",placeholder:"\u7269\u6D41\u4F9B\u5E94\u5546"},{field:"checkApi",type:"select",placeholder:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",options:U},{field:"hpNo",type:"input",placeholder:"\u5BF9\u8D26\u56DE\u7968\u7F16\u7801"},{field:"payNo",type:"input",placeholder:"\u5BF9\u8D26\u7F16\u7801"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},fe={\u4E70\u65B9\u516C\u53F8\u7F16\u7801:"",\u56DE\u7968\u7533\u8BF7\u7F16\u7801:"",\u5BF9\u8D26\u7F16\u7801:"",\u5BA1\u6838\u72B6\u6001:"",\u5BA1\u6838\u5907\u6CE8:""},me={key:0},he=K({__name:"index",setup(e){const u="sendOrderInvoice",o="/postSupplierOrder/sendOrderInvoiceDetail",d=["4","10"],{isSuperUser:w}=Q(),{hasPermissionWithCode:F}=X(u),D=i(null),y=Z({payNo:"",hpNo:""}),{push:A}=ee(),{currentCompany:M}=ue(),v=i(!1),g=i(null),N=i(null),x=i(null),B=i({inv_subtotal_amount:"",total:""});async function T(){await se({url:"ile",name:"\u56DE\u7968\u6570\u636E\u8868",onStart:()=>v.value=!0,onSuccess:()=>v.value=!1,onFail:()=>v.value=!1,params:{companyNo:M.value.companyNo,...D.value.getBasicParams()}})}const z={pageSearchHook:()=>oe(void 0,void 0,I)},Y={content:{preview:({hpNo:s})=>A(`${o}?id=${s}`),create:()=>A(o),result:({inv_subtotal_amount:s,total:a})=>{const l=D.value.getBasicParams();y.hpNo=l.hpNo,y.payNo=l.payNo,B.value.inv_subtotal_amount=s,B.value.total=a}}};function L(){const s=k.book_new(),a=k.json_to_sheet([fe]);k.book_append_sheet(s,a,"sheet"),re(s,"\u6279\u91CF\u5BFC\u5165\u56DE\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(s,a)=>{const l=b("ElButton"),j=b("PageContainer"),H=b("PageAuth");return r(),p(H,{pageName:u},{default:n(()=>[_(j,{hooks:z,events:Y,contentConfig:t(de),"search-config":t(I),"get-content-ref":E=>D.value=E},{content_table_header:n(()=>[t(y).payNo||t(y).hpNo?(r(),te("p",me," \u5408\u8BA1:\u53D1\u7968\u7A0E\u524D\u91D1\u989D:"+P(B.value.inv_subtotal_amount)+",\u4EF7\u7A0E\u5408\u8BA1:"+P(B.value.total),1)):c("v-if",!0)]),content_header:n(()=>[t(F)("017")?(r(),p(l,{key:0,size:"small",icon:t(h)("arrow-down-line"),loading:v.value,onClick:a[0]||(a[0]=()=>T())},{default:n(()=>[C("\u5BFC\u51FA\u56DE\u7968\u6570\u636E")]),_:1},8,["icon","loading"])):c("v-if",!0),t(F)("033")&&!t(w)?(r(),p(l,{key:1,size:"small",icon:t(h)("arrow-up-line"),onClick:a[1]||(a[1]=()=>x.value.onDisplay())},{default:n(()=>[C("\u6279\u91CF\u521B\u5EFA\u5F00\u7968\u6570\u636E")]),_:1},8,["icon"])):c("v-if",!0),t(F)("018")&&!t(w)?(r(),p(l,{key:2,size:"small",icon:t(h)("arrow-up-line"),onClick:a[2]||(a[2]=()=>N.value.onDisplay())},{default:n(()=>[C("\u6279\u91CF\u5BFC\u5165\u8BA4\u8BC1\u7ED3\u679C")]),_:1},8,["icon"])):c("v-if",!0),t(F)("019")?(r(),p(l,{key:3,size:"small",icon:t(h)("arrow-down-line"),onClick:a[3]||(a[3]=()=>L())},{default:n(()=>[C("\u4E0B\u8F7D\u8BA4\u8BC1\u6A21\u677F ")]),_:1},8,["icon"])):c("v-if",!0)]),content_action:n(E=>[d.includes(String(E.status))?(r(),p(l,{key:0,link:"",type:"primary",icon:t(h)("scaletooriginal"),onClick:()=>g.value.onDisplay(E)},null,8,["icon","onClick"])):c("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),_(ne,{ref_key:"invoiceModalRef",ref:g},null,512),_(ie,{ref_key:"execelUploadRef",ref:N},null,512),_(pe,{ref_key:"execelUploadInvRef",ref:x,onOnSuccess:a[4]||(a[4]=()=>D.value.onSearch())},null,512)]),_:1})}}});var ke=G(he,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/postSupplierOrder/sendOrderInvoice/index.vue"]]);export{ke as default};
|