1 |
- import{bb as H,am as C,da as G,aR as h,cs as du,bO as J,de as W,ae as V,cJ as Fu,cK as Du,cr as K,_ as Eu,d as Bu,x as d,aM as fu,ai as mu,p as Cu,bc as hu,aZ as F,W as yu,r as g,aD as vu,H as _u,m as t,o as D,G as E,D as i,l as B,J as f,M as k,a as y,bd as Au,dG as bu,cE as gu,b5 as ku,b7 as $}from"./index.js";import{f as wu,a as xu,e as Nu}from"./index.26d6ac45.js";import Ru from"./invoice-modal.328d4b.js";import{h as Su}from"./export.fc82d641.js";import Pu from"./index.1802cf.js";import{u as T,w as Tu}from"./xlsx.ed122d16.js";import Iu from"./index.6028c9.js";import"./index.bf16817a.js";import"./execl-upload.7c83427b.js";const Uu=[{type:"selection",width:40,align:"center",fixed:"left"},{label:"\u5E8F\u53F7",type:"index",width:70,hide:({checkList:u})=>!u.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:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyNo",width:150,...H("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\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:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:u,props:o})=>C(h,{size:o.size},{default:()=>{var n;return((n=G.find(c=>String(u.status)===String(c.value)))==null?void 0:n.label)||"--"}})},{label:"\u4E1A\u52A1\u7C7B\u578B",width:95,...du(K,"is_comon")},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:u}){return C(h,null,{default:()=>{var o;return((o=J.find(({value:n})=>n===u.invoiceType))==null?void 0:o.label)||"--"}})}},{label:"\u53D1\u7968\u72B6\u6001",width:70,prop:"invStatus_cn"},{label:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",width:100,cellRenderer:({row:u,props:o})=>C(h,{size:o.size},{default:()=>{var n;return(n=W.find(c=>String(u.checkApi)===c.value))==null?void 0:n.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:u})=>u?V(u).format("YYYY-MM-DD"):""},{label:"\u8D2D\u4E70\u65B9\u62AC\u5934\u72B6\u6001",prop:"seller_check",width:130,cellRenderer:({row:u})=>C(h,null,{default:()=>{var o;return((o=Fu.find(n=>n.value==u.seller_check+""))==null?void 0:o.label)||"--"}})},{label:"\u9500\u552E\u65B9\u62AC\u5934\u72B6\u6001",prop:"buyer_check",width:130,cellRenderer:({row:u})=>C(h,null,{default:()=>{var o;return((o=Du.find(n=>n.value==u.buyer_check+""))==null?void 0:o.label)||"--"}})},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierNo",width:150,...H("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:150,formatter:({addtime:u})=>V(u).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:150}],Mu={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"companyNo",columns:Uu,apis:{httpDelete:wu,httpList:xu,httpAdd:!0},deleteProp:"hpNo",delTooltip:"\u662F\u5426\u64A4\u56DE\u91C7\u8D2D\u56DE\u7968\u7533\u8BF7",superUserNoAction:!0,listNoRelation:!0,companyProp:"supplierNo",showDelete:({status:u})=>Number(u)<=3},q={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:G},{field:"companyNo",type:"business-query"},{field:"checkApi",type:"select",placeholder:"\u53D1\u7968\u67E5\u9A8C\u65B9\u5F0F",options:W},{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"},{field:"is_comon",type:"select",placeholder:"\u4E1A\u52A1\u7C7B\u578B",span:4,options:K}]};const zu=Bu({__name:"index",setup(u){const o="supplyTicketReturn",n="/supply/supplyTicketReturnDetail",c=["2","3","4","6","7","10","11","12","13"],v=d(!1),{hasPermissionWithCode:_}=fu(o),I=d(null),{isSuperUser:w}=mu(),r=d([]),{push:U}=Cu(),M=d(null),z=d(null),A=d(null),{run:Z,loading:Q}=hu({success:()=>{var l;F.success("\u64A4\u9500\u6210\u529F"),(l=A.value)==null||l.onSearch()}});yu();const X={pageSearchHook:()=>Au(void 0,void 0,q)},uu={content:{preview:({hpNo:l})=>U(`${n}?id=${l}`),create:()=>U(n)}};async function eu(){if(r.value.length===0){F.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}if(r.value.length>1){F.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}await Su({url:"paycgdexport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>v.value=!0,onSuccess:()=>v.value=!1,onFail:()=>v.value=!1,params:{payNo:r.value[0].payNo}})}function tu(l){const e={status:"8",hpNo:l.hpNo};Z(Nu(e))}async function ou(){if(r.value.length===0){F.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u56DE\u7968\u7533\u8BF7");return}if(r.value.length>1){F.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u56DE\u7968\u7533\u8BF7");return}const l=["\u5F85\u5173\u8054\u8BA2\u5355","\u8BA2\u5355\u5173\u8054\u5B8C\u6BD5\u5F85\u8D22\u52A1\u5BA1\u6838","\u5F85\u4E70\u65B9\u516C\u53F8\u8BA4\u8BC1","\u8BA4\u8BC1\u6210\u529F","\u8BA4\u8BC1\u5931\u8D25","\u56DE\u7968\u5DF2\u9000","\u8D22\u52A1\u5BA1\u6838\u9A73\u56DE"],[e]=r.value;if(!c.includes(String(e.status))){F.warning("\u8BF7\u9009\u62E9\u72B6\u6001\u4E3A:"+l.join("\u3001")+"\u7684\u91C7\u8D2D\u5355");return}const s=await bu({code:e.hpNo}),x=await gu({number:e.invoiceNumber}),{data:N=[]}=s||{},{buyer_name:R,buyer_id:S,seller_name:a,seller_id:Y,number:nu,issue_date:au,type:lu}=(x||{}).data||{},su=N.map(p=>{var j;const{total_amount:b,tax_amount:L,num:m}=p,P=Number(ku(b,L)).toFixed(2),ru=!Number(P)||!Number(m)?"":Number($(P,m)).toFixed(2),pu=!Number(b)||!Number(m)?"":Number($(b,m)).toFixed(2);return{\u53D1\u7968\u660E\u7EC6ID:p.id,\u5BF9\u8D26\u56DE\u7968\u7F16\u53F7:p.invoiceCode,\u53D1\u7968\u7C7B\u578B:((j=J.find(cu=>cu.value===lu))==null?void 0:j.label)||"--",\u53D1\u7968\u53F7\u7801:nu,\u5F00\u7968\u65E5\u671F:au,\u8D2D\u4E70\u65B9\u540D\u79F0:R,\u8D2D\u4E70\u65B9\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7:S,\u9500\u552E\u65B9\u540D\u79F0:a,\u9500\u552E\u65B9\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7:Y,\u7C7B\u76EE\u7F16\u53F7:p.cat_code,"\u8D27\u7269\u6216\u5E94\u7A0E\u52B3\u52A1\u3001\u670D\u52A1\u540D\u79F0":p.good_name,\u5355\u4F4D:p.unit,\u6570\u91CF:m,\u5355\u4EF7:ru,\u91D1\u989D:P,\u7A0E\u7387:p.tax,\u7A0E\u989D:L,\u7A0E\u540E\u5355\u4EF7:pu,\u7A0E\u540E\u91D1\u989D:b,\u91C7\u8D2D\u5355\u5173\u8054\u91D1\u989D:"",\u5BF9\u8D26\u5355\u53F7:"",\u91C7\u8D2D\u5355\u7F16\u53F7:"",\u9500\u552E\u5355\u7F16\u53F7:"",\u4F9B\u8D27\u5546:"",\u4E1A\u52A1\u516C\u53F8:"",\u8BA2\u5355\u5355\u4F4D:"",\u5546\u54C1\u6570\u91CF:"",\u5546\u54C1\u5355\u4EF7:"",\u603B\u8D27\u6B3E:"",\u9500\u552E\u4E3B\u5355\u53F7:"",\u5546\u54C1\u7F16\u7801:"",\u5546\u54C1\u540D\u79F0:"",\u8D27\u7269\u548C\u52B3\u52A1\u540D\u79F0:"",\u5546\u54C1\u5F00\u7968\u7C7B\u76EE:"",\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0:"",\u5F00\u7968\u7A0E\u7387:"",\u5F00\u7968\u5546\u54C1\u540D\u79F0:"",\u5F00\u7968\u7C7B\u578B:"",\u91C7\u8D2D\u5355\u53EF\u5173\u8054\u91D1\u989D:""}}),O=T.book_new(),iu=T.json_to_sheet(su);T.book_append_sheet(O,iu,"sheet"),Tu(O,"\u53D1\u7968\u660E\u7EC6.xlsx",{bookType:"xlsx"})}return(l,e)=>{const s=g("ElButton"),x=g("ElTooltip"),N=g("PageContainer"),R=g("PageAuth"),S=vu("loading");return _u((D(),E(R,{pageName:o},{default:i(()=>[B(N,{hooks:X,events:uu,contentConfig:t(Mu),"search-config":t(q),"get-content-ref":a=>A.value=a,onContentSelectChange:e[3]||(e[3]=a=>r.value=a)},{content_header:i(()=>[t(_)("033")&&!t(w)?(D(),E(s,{key:0,size:"small",icon:t(f)("arrow-up-line"),onClick:e[0]||(e[0]=()=>z.value.onDisplay())},{default:i(()=>[k("\u6279\u91CF\u521B\u5EFA\u5F00\u7968\u6570\u636E")]),_:1},8,["icon"])):y("v-if",!0),!t(w)&&t(_)("064")?(D(),E(s,{key:1,size:"small",icon:t(f)("arrow-up-line"),onClick:e[1]||(e[1]=()=>I.value.onDisplay())},{default:i(()=>[k("\u6279\u91CF\u5BFC\u5165\u7968\u4E0E\u8BA2\u5355\u5173\u8054\u6570\u636E ")]),_:1},8,["icon"])):y("v-if",!0),B(s,{size:"small",loading:v.value,icon:t(f)("arrow-down-line"),onClick:e[2]||(e[2]=()=>eu())},{default:i(()=>[k(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading","icon"]),t(_)("033")&&!t(w)?(D(),E(s,{key:2,size:"small",type:"primary",icon:t(f)("arrow-down-line"),onClick:ou},{default:i(()=>[k("\u5BFC\u51FA\u53D1\u7968\u660E\u7EC6 ")]),_:1},8,["icon"])):y("v-if",!0)]),content_action:i(a=>[c.includes(String(a.status))?(D(),E(s,{key:0,link:"",type:"primary",icon:t(f)("scaletooriginal"),onClick:()=>M.value.onDisplay(a)},null,8,["icon","onClick"])):y("v-if",!0),(a.status=="11"||a.status=="9")&&t(_)("010")?(D(),E(x,{key:1,content:"\u64A4\u9500\u53D1\u7968\u7533\u8BF7",placement:"top"},{default:i(()=>[B(s,{link:"",type:"primary",icon:t(f)("refresh"),onClick:Y=>tu(a)},null,8,["icon","onClick"])]),_:2},1024)):y("v-if",!0)]),_:1},8,["contentConfig","search-config","get-content-ref"]),B(Ru,{ref_key:"invoiceModalRef",ref:M},null,512),B(Pu,{ref_key:"execelUploadRef",ref:z,onOnSuccess:e[4]||(e[4]=()=>A.value.onSearch())},null,512),B(Iu,{ref_key:"excelUploadRelationRef",ref:I,onOnSuccess:e[5]||(e[5]=()=>A.value.onSearch())},null,512)]),_:1})),[[S,t(Q)]])}}});var Ju=Eu(zu,[["__scopeId","data-v-78d10555"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supply/ticketReturn/index.vue"]]);export{Ju as default};
|