import{am as y,aR as v,bb as k,_ as $,d as H,p as Y,bU as Z,x as F,bc as J,aM as Q,W as X,ai as uu,bd as eu,r as p,aD as tu,o as A,c as ou,l as e,D as t,h as P,m as u,bE as au,G as h,M as s,a as c,bF as lu,bV as nu,H as ru,aZ as su}from"./index.js";import{u as i,w as x}from"./xlsx.ed122d16.js";import pu from"./index.a7b2dd.js";import iu from"./index.0caf10.js";import du from"./index.6fd14c.js";import{c as N,t as O}from"./configs.05320623.js";import{c as Fu,d as cu,a as Eu}from"./index.4e61d38f.js";import{h as Du}from"./export.fc82d641.js";import{F as Bu}from"./index.9fa50e99.js";import"./execl-upload.7c83427b.js";const S={formItems:[{field:"create_timer",type:"date_picker",trigger:"change",label:"\u4EA4\u6613\u65F6\u95F4",otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"}},{field:"create_start_timer",type:"date_picker",trigger:"change",label:"\u521B\u5EFA\u65F6\u95F4",otherOptions:{type:"daterange",startProp:"create_start",endProp:"create_end",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"}},{type:"select",placeholder:"\u72B6\u6001",field:"status",options:N},{type:"select",placeholder:"\u56DE\u6B3E\u7C7B\u578B",field:"trade_type",options:O},{field:"companyNo",type:"business-query",placeholder:"\u6536\u6B3E\u65B9\u516C\u53F8"},{type:"range",field:"gold-1",otherOptions:{startProp:"total_lower",endProp:"total_upper",startPlaceholder:"\u4E1A\u52A1\u516C\u53F8\u6536\u5165\u8D77\u59CB\u91D1\u989D",endPlaceholder:"\u4E1A\u52A1\u516C\u53F8\u6536\u5165\u7ED3\u675F\u91D1\u989D"}},{type:"range",field:"gold-2",otherOptions:{startProp:"plat_total_lower",endProp:"plat_total_upper",startPlaceholder:"\u5E73\u53F0\u516C\u53F8\u6536\u5165\u8D77\u59CB\u91D1\u989D",endPlaceholder:"\u5E73\u53F0\u516C\u53F8\u6536\u5165\u7ED3\u675F\u91D1\u989D"}},{field:"group",type_field:"group_type",type:"input_group",span:8,otherOptions:{inputGroupOptions:[{value:"tradNo",label:"\u8D44\u91D1\u7F16\u53F7"},{value:"pcCode",label:"\u6279\u6B21\u53F7"},{value:"customerName",label:"\u5BA2\u6237\u673A\u6784\u540D\u79F0"},{value:"poCode",label:"\u5BA2\u6237PO"},{value:"NdCode",label:"\u5BA2\u6237DN"},{value:"palt_po",label:"\u5E73\u53F0\u91C7\u8D2DPO"},{value:"skuCode",label:"\u6CF0e\u8D2DSKU"},{value:"goodName",label:"\u5E73\u53F0\u7269\u6599\u540D\u79F0"},{value:"trade_used",label:"\u4EA4\u6613\u7528\u9014"}]}}]},Cu=[{label:"\u8D44\u91D1\u7F16\u7801",prop:"tradNo",fixed:"left",width:150},{label:"\u6279\u6B21\u53F7",width:100,prop:"pcCode"},{label:"\u603B\u91D1\u989D",prop:"total_fee",width:120},{label:"\u72B6\u6001",prop:"status",width:100,cellRenderer:({row:a,props:l})=>y(v,{size:l.size},{default:()=>{var r;return((r=N.find(f=>String(a.status)===String(f.value)))==null?void 0:r.label)||"--"}})},{label:"\u672A\u8BA4\u9886\u91D1\u989D",prop:"balance",width:120},{label:"\u5DF2\u8BA4\u9886\u91D1\u989D",prop:"used_fee",width:120},{label:"\u56DE\u6B3E\u7C7B\u578B",width:120,cellRenderer({row:a}){return y(v,{size:"small"},{default:()=>{var l;return((l=O.find(({value:r})=>r==a.trade_type))==null?void 0:l.label)||"--"}})}},{label:"\u4E1A\u52A1\u516C\u53F8",width:160,...k("companyNo","companyName","\u6536\u6B3E\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u6536\u6B3E\u65B9\u516C\u53F8",width:160,...k("trade_in_code","trade_in","\u6536\u6B3E\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u6536\u6B3E\u65B9\u8D26\u6237",width:120,prop:"trade_in_account"},{label:"\u4EA4\u6613\u65F6\u95F4",width:120,prop:"trade_time"},{label:"\u5BA2\u6237\u673A\u6784\u540D\u79F0",width:160,prop:"customerName"},{label:"\u5BA2\u6237\u4ED8\u6B3E\u94F6\u884C\u6237\u540D",width:120,prop:"trade_out"},{label:"\u5BA2\u6237\u4ED8\u6B3E\u884C\u540D",width:120,prop:"trade_bank"},{label:"\u5BA2\u6237\u4ED8\u6B3E\u94F6\u884C\u8D26\u53F7",width:120,prop:"trade_account"},{label:"\u5BA2\u6237PO",width:120,prop:"poCode"},{label:"\u5BA2\u6237DN",width:120,prop:"NdCode"},{label:"\u5E73\u53F0\u91C7\u8D2DPO",width:120,prop:"palt_po"},{label:"\u6CF0e\u8D2DSKU",width:120,prop:"skuCode"},{label:"\u5E73\u53F0\u7269\u6599\u540D\u79F0",width:120,prop:"goodName"},{label:"\u4EA7\u54C1\u6570\u91CF",width:120,prop:"goodNum"},{label:"\u5E73\u53F0\u516C\u53F8\u6536\u5165\u5355\u4EF7",width:120,prop:"platPrice"},{label:"\u5E73\u53F0\u516C\u53F8\u6536\u5165\u603B\u4EF7",width:120,prop:"plat_total"},{label:"\u4E1A\u52A1\u516C\u53F8\u6536\u5165\u5355\u4EF7",width:120,prop:"comPrice"},{label:"\u4E1A\u52A1\u516C\u53F8\u6536\u5165\u603B\u4EF7",width:120,cellRenderer({row:a}){return a.trade_type=="0"?a.total_fee:a.com_total}},{label:"\u4EA4\u6613\u7528\u9014",width:120,prop:"trade_used"},{label:"\u521B\u5EFA\u4EBA",width:120,prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",width:120,prop:"addtime"},{label:"\u64CD\u4F5C",fixed:"right",width:60,slot:"operation"}],_u={title:"\u8D44\u91D1\u8BA4\u9886\u7BA1\u7406",columns:Cu,isTree:!0,showDelete({status:a}={},l){return a=="1"&&!l},apis:{httpList:Fu,httpDelete:cu}},Au={"*\u6536\u6B3E\u65B9\u516C\u53F8\u7F16\u7801":"GS2302231124114965","*\u6536\u6B3E\u65B9\u516C\u53F8\u540D\u79F0":"\u5317\u4EAC\u666E\u6DA6\u5FC3\u5802\u5546\u8D38\u6709\u9650\u516C\u53F8","*\u6536\u6B3E\u65B9\u8D26\u6237":"9550880042966400187","*\u4EA4\u6613\u65F6\u95F4":"2023-12-25",\u5BA2\u6237\u673A\u6784\u540D\u79F0:"","*\u5BA2\u6237\u4ED8\u6B3E\u94F6\u884C\u6237\u540D":"\u6CF0\u5EB7\u4FDD\u9669\u96C6\u56E2\u80A1\u4EFD\u6709\u9650\u516C\u53F8","*\u5BA2\u6237\u4ED8\u6B3E\u884C\u540D":"\u5174\u4E1A\u94F6\u884C\u603B\u884C","*\u5BA2\u6237\u4ED8\u6B3E\u94F6\u884C\u8D26\u53F7":0x2782668c1280f8,\u5BA2\u6237PO:"PO190020240800409752",\u5BA2\u6237DN:"DN20240822174723373","*\u4E1A\u52A1\u516C\u53F8\u6536\u5165\u603B\u4EF7":"200",\u4EA4\u6613\u7528\u9014:""},fu={"*\u4E1A\u52A1\u516C\u53F8\u7F16\u7801":"GS2302231125079621","*\u4E1A\u52A1\u516C\u53F8\u540D\u79F0":"\u5317\u4EAC\u767E\u8FB0\u8363\u8FBE\u56FD\u9645\u79D1\u8D38\u6709\u9650\u516C\u53F8","*\u6536\u6B3E\u65B9\u516C\u53F8\u7F16\u7801":"GS2404151642335170","*\u6536\u6B3E\u65B9\u516C\u53F8\u540D\u79F0":"\u5317\u4EAC\u5143\u9686\u96C5\u56FE\u6587\u5316\u4F20\u64AD\u80A1\u4EFD\u6709\u9650\u516C\u53F8","*\u6536\u6B3E\u65B9\u8D26\u6237":"9550880042966400000","*\u5E73\u53F0\u91C7\u8D2DPO":"PO-YL31-2024-1546","*\u5BA2\u6237PO":"PO190020240800409752","*\u5E73\u53F0\u7269\u6599\u540D\u79F0":"AI\u97F3\u7BB1","*\u5355\u4F4D":"\u53F0","*\u4EA7\u54C1\u6570\u91CF":"1","*\u4E1A\u52A1\u516C\u53F8\u6536\u5165\u5355\u4EF7":"200","*\u4E1A\u52A1\u516C\u53F8\u6536\u5165\u603B\u4EF7":"200","*\u7A0E\u7387(%)":"13","*\u7A0E\u6536\u7F16\u7801":"1090519060000000000","*\u7A0E\u6536\u7F16\u7801\u540D\u79F0":"\u7535\u5B50\u5143\u4EF6","*\u5BA2\u6237DN":"DN20240822174723373","*\u5BA2\u6237\u673A\u6784\u540D\u79F0":"\u6CF0\u5EB7\u4EBA\u5BFF\u4FDD\u9669\u6709\u9650\u8D23\u4EFB\u516C\u53F8\u6CB3\u5317\u5206\u516C\u53F8","*\u5BA2\u6237\u4ED8\u6B3E\u94F6\u884C\u6237\u540D":"\u6CF0\u5EB7\u4FDD\u9669\u96C6\u56E2\u80A1\u4EFD\u6709\u9650\u516C\u53F8","*\u5E73\u53F0\u516C\u53F8\u6536\u5165\u5355\u4EF7":"243.04","*\u5E73\u53F0\u516C\u53F8\u6536\u5165\u603B\u4EF7":"243.04","*\u4EA4\u6613\u65F6\u95F4":"2023-12-25","*\u6CF0e\u8D2DSKU":"SKU20240906100039001","*\u5546\u54C1\u552F\u4E00\u7F16\u53F7(\u91C7\u9500365\u5546\u54C1\u7F16\u53F7)":"SKU20240906100039002","*\u5BA2\u6237\u4ED8\u6B3E\u94F6\u884C\u8D26\u53F7":0x2782668c1280f8,"*\u5BA2\u6237\u4ED8\u6B3E\u884C\u540D":"\u5174\u4E1A\u94F6\u884C\u603B\u884C","*\u4EA4\u6613\u7528\u9014":"DN20240822174723373/PO190020240800409752"};const mu={class:"main capital-claim"},hu={class:"w-full"},bu={class:"flex gap-[10px] flex-wrap"},wu=H({__name:"index",setup(a){Y();const l=Z({initialData:{}}),r=F(null),f=F(null),b=F(null),U="capitalClaim",E=F(!1),m=F(!1);J({success:()=>B.value.onSearch()});const{hasPermissionWithCode:D,permissions:R}=Q(U),{currentCompany:I}=X(),{isSuperUser:T}=uu(),{pageContentRef:B,handleResetClick:C,handleSearchClick:V}=eu(void 0,void 0,S);function G(){const n=i.book_new(),o=i.json_to_sheet([Au]);i.book_append_sheet(n,o,"sheet"),x(n,"\u81EA\u8425\u8BA2\u5355\u56DE\u6B3E\u8D44\u91D1\u5BFC\u5165\u6A21\u677F.xlsx",{bookType:"xlsx"})}function K(){const n=i.book_new(),o=i.json_to_sheet([fu]);i.book_append_sheet(n,o,"sheet"),x(n,"\u5E73\u53F0\u8BA2\u5355\u56DE\u6B3E\u8D44\u91D1\u5BFC\u5165\u6A21\u677F.xlsx",{bookType:"xlsx"})}async function L(){const{total:n}=B.value.getPagination();if(n>500){su.warning("\u5BFC\u51FA\u9875\u9762\u6570\u636E\u4E0D\u80FD\u8D85\u8FC7500\u6761");return}await Du({url:"orderPay/exportTrade",name:"\u8D44\u91D1\u4FE1\u606F\u8868",onStart:()=>E.value=!0,onSuccess:()=>E.value=!1,onFail:()=>E.value=!1,params:{...B.value.getBasicParams(),companyNo:I.value.companyNo}})}function j(n){m.value=!0,l.run(Eu({tradNo:n.tradNo}))}return(n,o)=>{const w=p("ElButton"),_=p("ElDropdownItem"),g=p("ElDropdown"),z=p("el-button"),M=p("el-button-group"),W=p("ElDialog"),q=tu("loading");return A(),ou("div",mu,[e(nu,{"is-show":u(D)("001")},{default:t(()=>[P("div",hu,[e(u(au),{"form-config":u(S),onSearchBtnClick:u(V),onResetBtnClick:u(C)},{action:t(()=>[P("div",bu,[e(M,null,{default:t(()=>[u(D)("029")?(A(),h(g,{key:0},{dropdown:t(()=>[e(_,{onClick:K},{default:t(()=>[s(" \u5E73\u53F0\u8BA2\u5355\u56DE\u6B3E ")]),_:1}),e(_,{onClick:G},{default:t(()=>[s(" \u81EA\u8425\u8BA2\u5355\u56DE\u6B3E ")]),_:1})]),default:t(()=>[e(w,{type:"warning",plain:""},{default:t(()=>[s(" 1.\u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F ")]),_:1})]),_:1})):c("v-if",!0),!u(T)&&u(D)("030")?(A(),h(g,{key:1},{dropdown:t(()=>[e(_,{onClick:o[0]||(o[0]=d=>b.value.onDisplay())},{default:t(()=>[s("\u5E73\u53F0\u8BA2\u5355\u56DE\u6B3E")]),_:1}),e(_,{onClick:o[1]||(o[1]=d=>r.value.onDisplay())},{default:t(()=>[s("\u81EA\u8425\u8BA2\u5355\u56DE\u6B3E")]),_:1})]),default:t(()=>[e(w,{type:"primary",plain:""},{default:t(()=>[s(" 2.\u5BFC\u5165\u8D44\u91D1\u6570\u636E ")]),_:1})]),_:1})):c("v-if",!0),c(` execlUploadRef.onDisplay()"\r
>\r
2.\u5BFC\u5165\u81EA\u8425\u8BA2\u5355\u56DE\u6B3E\u8D44\u91D1\u6570\u636E(\u6279\u91CF)\r
`),c(` \r
3.\u4E0B\u8F7D\u5E73\u53F0\u8BA2\u5355\u56DE\u6B3E\u8D44\u91D1\u5BFC\u5165\u6A21\u677F\r
\r
\r
4.\u5BFC\u5165\u5E73\u53F0\u8BA2\u5355\u56DE\u6B3E\u8D44\u91D1\u6570\u636E(\u6279\u91CF)\r
`),u(D)("057")?(A(),h(z,{key:2,plain:"",type:"success",onClick:o[2]||(o[2]=()=>L()),loading:E.value},{default:t(()=>[s(" 3.\u5BFC\u51FA\u8D44\u91D1\u4FE1\u606F ")]),_:1},8,["loading"])):c("v-if",!0)]),_:1})])]),_:1},8,["form-config","onSearchBtnClick","onResetBtnClick"]),e(u(lu),{ref_key:"pageContentRef",ref:B,"content-config":u(_u),powers:u(R),onPreviewBtnClick:o[3]||(o[3]=d=>j(d))},null,8,["content-config","powers"])])]),_:1},8,["is-show"]),e(pu,{ref_key:"execlUploadRef",ref:r,onOnSuccess:u(C)},null,8,["onOnSuccess"]),e(iu,{ref_key:"execlCapitalUploadRef",ref:f,onOnSuccess:u(C)},null,8,["onOnSuccess"]),e(du,{ref_key:"execlBusinessUploadRef",ref:b,onOnSuccess:u(C)},null,8,["onOnSuccess"]),e(W,{center:"",title:"\u8D44\u91D1\u8BE6\u60C5",modelValue:m.value,"onUpdate:modelValue":o[4]||(o[4]=d=>m.value=d)},{default:t(()=>[ru(e(Bu,{tradeInfo:u(l).data},null,8,["tradeInfo"]),[[q,u(l).loading]])]),_:1},8,["modelValue"])])}}});var Ru=$(wu,[["__scopeId","data-v-a768f3c6"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/capitalClaim/index.vue"]]);export{Ru as default};