1 |
- import{af as _,ez as x,ce as B,cA as k,db as J,_ as K,d as Q,n as a,ab as X,c9 as Y,k as Z,O as ee,cB as w,cm as A,r as c,aw as ue,B as oe,i as t,o as D,A as C,y as r,h as n,D as f,H as S,a as b,cC as te,fc as ne}from"./index.js";import{e as ie}from"./index.f8570968.js";import le from"./invoice-modal.33e29c.js";import{u as h,w as se}from"./xlsx.ed122d16.js";import ae from"./index.e87970.js";import re from"./create-modal.7b8b62.js";import pe from"./choose-modal.3e0b45.js";import"./index.25c063e4.js";import"./ticketReturn.494468d2.js";import"./porder.0f2b35d0.js";import"./execl-upload.f811ec24.js";import"./_rules.731b2b7a.js";import"./global.9ad647c8.js";import"./index.249f7662.js";const ce=[{type:"selection",width:40,align:"center",fixed:"left"},{label:"\u53D1\u7968\u7F16\u7801",prop:"InvCode",width:140},{label:"\u7A0E\u524D\u91D1\u989D",prop:"invoice_subtotal",width:100},{label:"\u7A0E\u540E\u91D1\u989D",prop:"invoice_total",width:100},{label:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:d,props:i})=>_(B,{size:i.size},{default:()=>{var l;return((l=x.find(m=>String(d.status)===String(m.value)))==null?void 0:l.label)||"--"}})},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",width:145,...k("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:145,...k("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:d}){return _(B,null,{default:()=>{var i;return((i=J.find(({value:l})=>l===d.invoice_type))==null?void 0:i.label)||"--"}})}},{label:"\u53D1\u7968\u53F7\u7801",width:110,prop:"invoice_number"},{label:"\u5907\u6CE8",width:150,prop:"remark"},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u5F00\u7968\u65E5\u671F",prop:"open_date",width:120},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:150},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:140}],de={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:ce,notPreview:!0,delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,apis:{httpAdd:!0,httpList:({companyNo:d,...i})=>ie({...i})}},N={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:x},{field:"invoice_number",placeholder:"\u53D1\u7968\u53F7\u7801",type:"input"},{field:"supplierNo",type:"supplier-query"}]},me={\u53D1\u7968\u7C7B\u578B:"",\u5F00\u7968\u65E5\u671F:"",\u53D1\u7968\u53F7\u7801:"",\u53D1\u7968\u7A0E\u540E\u91D1\u989D:"",\u53D1\u7968\u4EE3\u7801:"",\u53D1\u7968\u7A0E\u524D\u91D1\u989D:"",\u6821\u9A8C\u7801:""},P="inputInvoicePool",ve="/purchase/inputInvoicePoolDetail",fe=Q({__name:"index",setup(d){const i=a([]),{isSuperUser:l}=X(),{hasPermissionWithCode:m,permissions:Fe}=Y(P),p=a(null);a(!1);const{push:I}=Z();ee();const y=a(null),E=a(null),g=a(!1),v=a({visible:!1,current:{companyNo:"",supplierNo:"",companyName:"",supplierName:""}}),{run:De,loading:R}=w({success:()=>{var o;A.success("\u64A4\u9500\u6210\u529F"),(o=p.value)==null||o.onSearch()}}),{run:T,loading:U}=w({success(){var o;A.success("\u5220\u9664\u6210\u529F!"),(o=p.value)==null||o.onSearch()}}),L={pageSearchHook:()=>te(void 0,void 0,N)},z={content:{preview:({InvCode:o})=>I(`${ve}?id=${o}`),create:()=>g.value=!0}};function M(){const o=h.book_new(),e=h.json_to_sheet([me]);h.book_append_sheet(o,e,"sheet"),se(o,"\u53D1\u7968\u4FE1\u606F\u6A21\u677F.xlsx",{bookType:"xlsx"})}function $(o){v.value.current={...o},v.value.visible=!0}function O(o){T(ne({InvCode:o.InvCode}))}return(o,e)=>{const F=c("ElButton"),V=c("ElTooltip"),j=c("el-button"),H=c("ElPopconfirm"),q=c("PageContainer"),W=c("PageAuth"),G=ue("loading");return oe((D(),C(W,{pageName:P},{default:r(()=>[n(q,{hooks:L,events:z,contentConfig:t(de),"search-config":t(N),"get-content-ref":u=>p.value=u,onContentSelectChange:e[1]||(e[1]=u=>i.value=u)},{content_header:r(()=>[n(F,{size:"small",icon:t(f)("arrow-down-line"),onClick:M},{default:r(()=>e[7]||(e[7]=[S("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u6A21\u677F")])),_:1},8,["icon"]),t(m)("033")?(D(),C(F,{key:0,size:"small",type:"primary",icon:t(f)("arrow-up-line"),onClick:e[0]||(e[0]=()=>E.value.onDisplay())},{default:r(()=>e[8]||(e[8]=[S("\u4E0A\u4F20\u53D1\u7968\u4FE1\u606F ")])),_:1},8,["icon"])):b("v-if",!0)]),content_action:r(u=>[b(` v-if="String(row.status) === '1' || String(row.status) === '2' || String(row.status) === '5'" `),n(F,{link:"",type:"primary",icon:t(f)("scaletooriginal"),onClick:()=>y.value.onDisplay({...u,invoiceNumber:u.invoice_number})},null,8,["icon","onClick"]),t(m)("066")&&!t(l)&&String(u.status)==="1"?(D(),C(V,{key:0,content:"\u7ED1\u5B9A\u516C\u53F8"},{default:r(()=>[n(F,{link:"",type:"primary",icon:t(f)("home-filled"),onClick:s=>$(u)},null,8,["icon","onClick"])]),_:2},1024)):b("v-if",!0),(String(u.status)==="1"||String(u.status)==="2"||String(u.status)==="5")&&t(m)("006")&&!t(l)?(D(),C(H,{key:1,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onConfirm:s=>O(u)},{reference:r(()=>[n(j,{class:"reset-margin",link:"",type:"primary",size:"mini",icon:t(f)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):b("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),n(le,{ref_key:"invoiceModalRef",ref:y},null,512),n(pe,{data:v.value.current,visible:v.value.visible,"onUpdate:visible":e[2]||(e[2]=u=>v.value.visible=u),onRefresh:e[3]||(e[3]=u=>{var s;return(s=p.value)==null?void 0:s.onSearch()})},null,8,["data","visible"]),n(re,{visible:g.value,"onUpdate:visible":e[4]||(e[4]=u=>g.value=u),onRefresh:e[5]||(e[5]=u=>{var s;return(s=p.value)==null?void 0:s.onSearch()})},null,8,["visible"]),n(ae,{ref_key:"excelUploadInvRef",ref:E,onOnSuccess:e[6]||(e[6]=()=>p.value.onSearch())},null,512)]),_:1})),[[G,t(R)||t(U)]])}}});var xe=K(fe,[["__file","D:/work/jiesuan/settle-vue3/src/views/purchaseNew/inputInvoicePool/index.vue"]]);export{xe as default};
|