import{a2 as s,T as e,f as t,g as a,o as i,h as l,w as r,a as o,k as n,F as u,l as c,i as d,j as m,t as p,N as f,m as y,x as k,s as _,z as h,a1 as x,O as v}from"./index-Dnh6GPlT.js";import{_ as g,a as j}from"./uni-row.C8l4_QpR.js";import{_ as C}from"./uni-dateformat.C-BKL-OF.js";import{_ as b,a as $}from"./uni-list.Y9x-0uJ_.js";import{_ as I}from"./passed.ChLrPDzE.js";import{_ as w}from"./refuse.CZtpHAer.js";import{_ as D}from"./revoke.jEFcy-58.js";import{e as T}from"./index.ZMpzRqor.js";import{e as z}from"./examineListItem.DLm4Ta0N.js";import{d as L,a as M}from"./business.B0hIPKPC.js";import{_ as N}from"./_plugin-vue_export-helper.BCo6x5W8.js";const S=N({__name:"examineListDefault",props:{listData:{type:Array,default:()=>[]},typeIndex:{type:Number,default:0},emptyTitle:{type:String,default:""}},setup(N){const S=N,{listData:A,typeIndex:B,emptyTitle:E}=s(S),F=s=>{y(`/pages/users/examine/defaults?id=${s.id}&typeIndex=${B.value}`)},J=(s,e,t)=>{M(s,e).then((s=>{k.success(s.message),A.value.splice(t,1)})).catch((s=>{k.error(s.message)}))};return e((()=>A),((s,e)=>{}),{immediate:!0,deep:!0}),(s,e)=>{const M=h,N=t(a("uni-col"),g),S=t(a("uni-dateformat"),C),K=t(a("uni-row"),j),O=x,Q=v,q=t(a("uni-list-item"),b),G=t(a("uni-list"),$);return i(),l(M,{class:"examine-content-list"},{default:r((()=>[o(A).length>0?(i(),l(G,{key:0,border:!1},{default:r((()=>[(i(!0),n(u,null,c(o(A),((s,e)=>(i(),l(q,{key:"list"+s.id},{body:r((()=>[d(M,{class:"item-list"},{default:r((()=>[s.card?(i(),l(M,{key:0,class:"item-list-top",onClick:e=>F(s)},{default:r((()=>[m(p(s.card.name)+"的"+p(s.approve.name),1)])),_:2},1032,["onClick"])):f("",!0),d(M,{class:"",onClick:e=>F(s)},{default:r((()=>[d(z,{content:s.content},null,8,["content"]),d(K,{class:"item-list-content"},{default:r((()=>[d(N,{span:6,class:"left"},{default:r((()=>[m("提交时间")])),_:1}),d(N,{span:18},{default:r((()=>[d(S,{format:"yyyy/MM/dd hh:mm",date:s.created_at},null,8,["date"])])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"]),d(M,{class:"item-list-content item-list-button"},{default:r((()=>[o(B)<0?(i(),n(u,{key:0},[(1===s.status&&s.rules&&1==s.rules.recall||0===s.status)&&!s.recall?(i(),l(O,{key:0,class:"default-error",onClick:e=>(s=>{0===s.status?_("确定要撤销该审批记录吗").then((()=>{L(s.id).then((e=>{k.success(e.message),s.status=-1})).catch((s=>{k.error(s.message)}))})).catch((()=>{})):y(`/pages/users/examine/components/addSignature?id=${s.id}&type=3`)})(s)},{default:r((()=>[m("撤销")])),_:2},1032,["onClick"])):f("",!0),1===s.status&&s.type<6?(i(),l(O,{key:1,class:"default-color",onClick:e=>(s=>{if(!s.approve)return k.error("审批流程已被删除"),!1;y(`/pages/users/examine/default?id=${s.approve.id}&name=${s.approve.name}&isEdit=true&aid=${s.id}`)})(s)},{default:r((()=>[m("重新提交")])),_:2},1032,["onClick"])):f("",!0)],64)):(i(),n(u,{key:1},[1!==s.status?(i(),n(u,{key:0},[0===s.verify_status?(i(),l(O,{key:0,class:"default-error",onClick:t=>((s,e)=>{_("确定要 拒绝 申请人的申请吗").then((()=>{J(s.id,0,e)})).catch((s=>{}))})(s,e)},{default:r((()=>[m("拒绝")])),_:2},1032,["onClick"])):f("",!0),0===s.verify_status?(i(),l(O,{key:1,class:"default-color",onClick:t=>((s,e)=>{_("确定要同意申请人的申请吗").then((()=>{J(s.id,1,e)})).catch((()=>{}))})(s,e)},{default:r((()=>[m("同意")])),_:2},1032,["onClick"])):f("",!0)],64)):f("",!0)],64))])),_:2},1024),0===s.status?(i(),l(Q,{key:1,class:"item-list-status",src:"/work/assets/approval-DzBb9buv.png",mode:""})):f("",!0),1===s.status?(i(),l(Q,{key:2,class:"item-list-status",src:I,mode:""})):f("",!0),2===s.status?(i(),l(Q,{key:3,class:"item-list-status",src:w,mode:""})):f("",!0),-1===s.status?(i(),l(Q,{key:4,class:"item-list-status",src:D,mode:""})):f("",!0)])),_:2},1024)])),_:2},1024)))),128))])),_:1})):(i(),l(T,{key:1,index:4,title:o(E)},null,8,["title"]))])),_:1})}}},[["__scopeId","data-v-1b340d1b"]]);export{S as e};
