index.1b651a.js 5.9 KB

1
  1. import{am as B,db as I,aR as A,bb as N,bO as J,ae as Z,_ as K,d as Q,x as a,ai as X,aM as ee,p as oe,W as ue,bc as w,aZ as P,r as d,aD as te,H as ne,m as t,o as D,G as b,D as r,l as i,J as v,M as S,a as h,bd as ie,dP as le}from"./index.js";import{e as se}from"./index.2fb9f37c.js";import ae from"./invoice-modal.3ed9c1.js";import{u as _,w as re}from"./xlsx.ed122d16.js";import pe from"./index.b01925.js";import ce from"./create-modal.ce7816.js";import de from"./choose-modal.0e0cec.js";import"./index.bf16817a.js";import"./ticketReturn.6df30604.js";import"./porder.9a85976d.js";import"./execl-upload.7c83427b.js";import"./_rules.e8143b8f.js";import"./global.9ad647c8.js";import"./index.1e471a82.js";const me=[{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:l,props:n})=>B(A,{size:n.size},{default:()=>{var p;return((p=I.find(C=>String(l.status)===String(C.value)))==null?void 0:p.label)||"--"}})},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",width:145,...N("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:145,...N("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:l}){return B(A,null,{default:()=>{var n;return((n=J.find(({value:p})=>p===l.invoice_type))==null?void 0:n.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:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:150,formatter:({addtime:l})=>Z(l).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:140}],ve={title:"\u91C7\u8D2D\u56DE\u7968",companyProp:"supplierNo",columns:me,apis:{httpList:({supplierNo:l,...n}={})=>se({...n}),httpAdd:!0},notPreview:!0,superUserNoAction:!0,delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7"},x={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:I},{field:"invoice_number",placeholder:"\u53D1\u7968\u53F7\u7801",type:"input"},{field:"companyNo",type:"business-query"}]},fe={\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:""},De=Q({__name:"index",setup(l){const n="outputInvoicePool",p="/supply/outputInvoicePoolDetail",C=a([]),{isSuperUser:g}=X(),{hasPermissionWithCode:F}=ee(n),c=a(null);a(!1);const{push:R}=oe();ue();const E=a(null),k=a(null),y=a(!1),m=a({visible:!1,current:{companyNo:"",supplierNo:"",companyName:"",supplierName:""}}),{run:be,loading:M}=w({success:()=>{var u;P.success("\u64A4\u9500\u6210\u529F"),(u=c.value)==null||u.onSearch()}}),{run:U,loading:T}=w({success(){var u;P.success("\u5220\u9664\u6210\u529F!"),(u=c.value)==null||u.onSearch()}}),L={pageSearchHook:()=>ie(void 0,void 0,x)},$={content:{preview:({InvCode:u})=>R(`${p}?id=${u}`),create:()=>y.value=!0}};function z(){const u=_.book_new(),o=_.json_to_sheet([fe]);_.book_append_sheet(u,o,"sheet"),re(u,"\u53D1\u7968\u4FE1\u606F\u6A21\u677F.xlsx",{bookType:"xlsx"})}function H(u){m.value.current={...u},m.value.visible=!0}function O(u){U(le({InvCode:u.InvCode}))}return(u,o)=>{const f=d("ElButton"),Y=d("ElTooltip"),j=d("el-button"),V=d("ElPopconfirm"),W=d("PageContainer"),q=d("PageAuth"),G=te("loading");return ne((D(),b(q,{pageName:n},{default:r(()=>[i(W,{hooks:L,events:$,contentConfig:t(ve),"search-config":t(x),"get-content-ref":e=>c.value=e,onContentSelectChange:o[1]||(o[1]=e=>C.value=e)},{content_header:r(()=>[i(f,{size:"small",icon:t(v)("arrow-down-line"),onClick:z},{default:r(()=>[S("\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u6A21\u677F")]),_:1},8,["icon"]),t(F)("033")?(D(),b(f,{key:0,size:"small",type:"primary",icon:t(v)("arrow-up-line"),onClick:o[0]||(o[0]=()=>k.value.onDisplay())},{default:r(()=>[S("\u4E0A\u4F20\u53D1\u7968\u4FE1\u606F ")]),_:1},8,["icon"])):h("v-if",!0)]),content_action:r(e=>[i(f,{link:"",type:"primary",icon:t(v)("scaletooriginal"),onClick:()=>E.value.onDisplay({...e,invoiceNumber:e.invoice_number})},null,8,["icon","onClick"]),i(Y,{content:"\u7ED1\u5B9A\u516C\u53F8"},{default:r(()=>[t(F)("066")&&!t(g)&&String(e.status)==="1"?(D(),b(f,{key:0,link:"",type:"primary",icon:t(v)("home-filled"),onClick:s=>H(e)},null,8,["icon","onClick"])):h("v-if",!0)]),_:2},1024),(String(e.status)==="1"||String(e.status)==="2"||String(e.status)==="5")&&t(F)("006")&&!t(g)?(D(),b(V,{key:0,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onConfirm:s=>O(e)},{reference:r(()=>[i(j,{class:"reset-margin",link:"",type:"primary",size:"mini",icon:t(v)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):h("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),i(ae,{ref_key:"invoiceModalRef",ref:E},null,512),i(de,{data:m.value.current,visible:m.value.visible,"onUpdate:visible":o[2]||(o[2]=e=>m.value.visible=e),onRefresh:o[3]||(o[3]=e=>{var s;return(s=c.value)==null?void 0:s.onSearch()})},null,8,["data","visible"]),i(ce,{visible:y.value,"onUpdate:visible":o[4]||(o[4]=e=>y.value=e),onRefresh:o[5]||(o[5]=e=>{var s;return(s=c.value)==null?void 0:s.onSearch()})},null,8,["visible"]),i(pe,{ref_key:"excelUploadInvRef",ref:k,onOnSuccess:o[6]||(o[6]=()=>c.value.onSearch())},null,512)]),_:1})),[[G,t(M)||t(T)]])}}});var xe=K(De,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supplyNew/inputInvoicePool/index.vue"]]);export{xe as default};