import{scoreAppealApi as b}from"./index-DxOMYcp4.js";import{_ as x,E as A,o as p,c as w,a as u,d as e,w as s,Y as N,j as _,h as E,r as i,X as V,b as m,t as B,z as O,Z as I,$ as R}from"./index-BKsb6cIX.js";import"./index-B8_nURbH.js";const J={class:"app-page appeal-workbench"},M={class:"page-hero"},S={key:2,class:"muted"},$={__name:"ScoreAppealView",setup(j){const r=E("OPEN"),f=E([]),c=E(!1);A(()=>d());async function d(){c.value=!0;try{f.value=await b.list({status:r.value})}finally{c.value=!1}}async function v(o,t){const{value:n}=await I.prompt("请输入处理意见",t==="ACCEPTED"?"接受申诉":"驳回申诉",{inputType:"textarea",inputPlaceholder:t==="ACCEPTED"?"说明后续修正或沟通安排":"说明驳回原因",confirmButtonText:"提交处理",cancelButtonText:"取消"});await b.resolve(o.id,{status:t,reply:n}),R.success("申诉已处理"),await d()}function y(o){return{OPEN:"待处理",ACCEPTED:"已接受",REJECTED:"已驳回"}[o]||o}function h(o){return{OPEN:"warning",ACCEPTED:"success",REJECTED:"info"}[o]||"info"}return(o,t)=>{const n=i("el-option"),D=i("el-select"),l=i("el-table-column"),T=i("el-tag"),C=i("el-button"),g=i("el-table"),k=V("loading");return p(),w("div",J,[u("div",M,[t[1]||(t[1]=u("div",{class:"hero-info"},[u("h2",null,"绩效申诉"),u("p",null,"员工异议处理与结果回执")],-1)),e(D,{modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=a=>r.value=a),style:{width:"160px"},onChange:d},{default:s(()=>[e(n,{label:"待处理",value:"OPEN"}),e(n,{label:"已接受",value:"ACCEPTED"}),e(n,{label:"已驳回",value:"REJECTED"}),e(n,{label:"全部",value:""})]),_:1},8,["modelValue"])]),N((p(),_(g,{data:f.value,stripe:"",class:"data-table",style:{width:"100%"}},{default:s(()=>[e(l,{prop:"id",label:"ID",width:"70"}),e(l,{prop:"periodId",label:"周期",width:"90"}),e(l,{prop:"userId",label:"员工ID",width:"90"}),e(l,{prop:"reason",label:"申诉原因","min-width":"260","show-overflow-tooltip":""}),e(l,{label:"状态",width:"110"},{default:s(({row:a})=>[e(T,{type:h(a.status),effect:"plain",round:""},{default:s(()=>[m(B(y(a.status)),1)]),_:2},1032,["type"])]),_:1}),e(l,{prop:"reply",label:"处理意见","min-width":"180","show-overflow-tooltip":""}),e(l,{prop:"submittedAt",label:"提交时间","min-width":"160"}),e(l,{label:"操作",width:"150",fixed:"right"},{default:s(({row:a})=>[a.status==="OPEN"?(p(),_(C,{key:0,link:"",type:"primary",onClick:P=>v(a,"ACCEPTED")},{default:s(()=>[...t[2]||(t[2]=[m("接受",-1)])]),_:1},8,["onClick"])):O("",!0),a.status==="OPEN"?(p(),_(C,{key:1,link:"",type:"danger",onClick:P=>v(a,"REJECTED")},{default:s(()=>[...t[3]||(t[3]=[m("驳回",-1)])]),_:1},8,["onClick"])):(p(),w("span",S,"已处理"))]),_:1})]),_:1},8,["data"])),[[k,c.value]])])}}},X=x($,[["__scopeId","data-v-6a983776"]]);export{X as default};
