
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * Gitee  https://gitee.com/hooray/fantastic-admin
 * Github https://github.com/hooray/fantastic-admin
 */
  
import{_ as L}from"./index-7911c6db.js";import{A as N}from"./sales-adbe4b7a.js";import{O as W,o as M}from"./index-66a830a3.js";import{d as Q,r as b,Q as X,x as G,o as p,c as y,e as t,f as a,R,S as D,b as _,k as f,w as J,I as S,a as K,t as T,h as n,X as Y,q as U}from"./index-4eef28ae.js";const Z=["src"],E=Q({__name:"order",setup(ee){const C=b(),k=b(0),m=b(!1),o=X({orderStatus:0,withdrawalChannels:null,page:1,size:10}),z=b([]);async function u(){try{m.value=!0;const s=await N.querySalesOrder(o);m.value=!1;const{rows:l,count:c}=s.data;k.value=c,z.value=l}catch{m.value=!1}}function B(s){s==null||s.resetFields(),u()}async function x(s,l){const{id:c}=s,w={id:c,status:l};await N.salesAuditOrder(w),u()}return G(()=>{u()}),(s,l)=>{const c=n("el-option"),w=n("el-select"),h=n("el-form-item"),g=n("el-button"),q=n("el-form"),v=L,P=n("el-alert"),i=n("el-table-column"),I=n("el-tag"),O=n("el-popconfirm"),$=n("el-table"),j=n("el-pagination"),F=n("el-row"),H=Y("loading");return p(),y("div",null,[t(v,null,{default:a(()=>[t(q,{ref_key:"formRef",ref:C,inline:!0,model:o},{default:a(()=>[t(h,{label:"工单状态",prop:"orderStatus"},{default:a(()=>[t(w,{modelValue:o.orderStatus,"onUpdate:modelValue":l[0]||(l[0]=e=>o.orderStatus=e),placeholder:"请选择工单状态",clearable:""},{default:a(()=>[(p(!0),y(R,null,D(_(W),e=>(p(),S(c,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(h,{label:"提现渠道",prop:"withdrawalChannels"},{default:a(()=>[t(w,{modelValue:o.withdrawalChannels,"onUpdate:modelValue":l[1]||(l[1]=e=>o.withdrawalChannels=e),placeholder:"请选择提现渠道",clearable:""},{default:a(()=>[(p(!0),y(R,null,D(_(M),e=>(p(),S(c,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(h,null,{default:a(()=>[t(g,{type:"primary",onClick:u},{default:a(()=>[f(" 查询 ")]),_:1}),t(g,{onClick:l[2]||(l[2]=e=>B(_(C)))},{default:a(()=>[f(" 重置 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(v,null,{default:a(()=>[t(P,{"show-icon":"",title:"提现审核说明",description:"所有工单只可审核一次、请准确操作、打款请人工打款、确定打款后点击审核通过即可！",type:"success"})]),_:1}),t(v,{style:{width:"100%"}},{default:a(()=>[J((p(),S($,{border:"",data:_(z),style:{width:"100%"},size:"large"},{default:a(()=>[t(i,{prop:"userInfo.avatar",label:"头像",width:"120"},{default:a(e=>{var r,d;return[K("img",{src:(d=(r=e.row)==null?void 0:r.userInfo)==null?void 0:d.avatar,style:{height:"50px"}},null,8,Z)]}),_:1}),t(i,{prop:"withdrawalChannels",align:"center",label:"提现渠道"},{default:a(e=>{var r;return[t(I,{type:((r=e.row)==null?void 0:r.withdrawalChannels)===1?"":"success"},{default:a(()=>{var d;return[f(T(((d=e.row)==null?void 0:d.withdrawalChannels)===1?"支付宝":"微信"),1)]}),_:2},1032,["type"])]}),_:1}),t(i,{prop:"userInfo.email",label:"邮箱",width:"200"}),t(i,{prop:"withdrawalAmount",align:"center",label:"提现金额"}),t(i,{prop:"contactInformation",align:"center",label:"提现备注",width:"340"}),t(i,{prop:"remark",align:"center",label:"提现留言",width:"340"}),t(i,{prop:"orderStatus",align:"center",label:"工单状态",width:"140"},{default:a(e=>{var r,d;return[t(I,{type:((r=e.row)==null?void 0:r.orderStatus)===0?"":((d=e.row)==null?void 0:d.orderStatus)===1?"success":"danger"},{default:a(()=>{var V,A;return[f(T(((V=e.row)==null?void 0:V.orderStatus)===0?"待审核":((A=e.row)==null?void 0:A.orderStatus)===1?"已通过":"已拒绝"),1)]}),_:2},1032,["type"])]}),_:1}),t(i,{fixed:"right",label:"审核",width:"200",align:"center"},{default:a(e=>[t(O,{title:"确认通过审核吗、请您先手动打款后通过！",width:"260","icon-color":"red",onConfirm:r=>x(e.row,1)},{reference:a(()=>[t(g,{link:"",type:"primary",size:"small",disabled:e.row.orderStatus!==0},{default:a(()=>[f(" 通过审核 ")]),_:2},1032,["disabled"])]),_:2},1032,["onConfirm"]),t(O,{title:"确认拒绝审核么、拒绝后此次提交将作废！",width:"260","icon-color":"red",onConfirm:r=>x(e.row,-1)},{reference:a(()=>[t(g,{link:"",type:"danger",size:"small",disabled:e.row.orderStatus!==0},{default:a(()=>[f(" 拒绝审核 ")]),_:2},1032,["disabled"])]),_:2},1032,["onConfirm"])]),_:1})]),_:1},8,["data"])),[[H,_(m)]]),t(F,{class:"flex justify-end mt-5"},{default:a(()=>[t(j,{"current-page":o.page,"onUpdate:currentPage":l[3]||(l[3]=e=>o.page=e),"page-size":o.size,"onUpdate:pageSize":l[4]||(l[4]=e=>o.size=e),class:"mr-5","page-sizes":[10,20,30,50],layout:"total, sizes, prev, pager, next, jumper",total:_(k),onSizeChange:u,onCurrentChange:u},null,8,["current-page","page-size","total"])]),_:1})]),_:1})])}}});typeof U=="function"&&U(E);export{E as default};
