import{d as E,ah as F,ag as R,R as y,r as $,$ as k,c as a,aj as L,a5 as q,q as t,b6 as r,B as x,m as g,g as v,b9 as O}from"./index.332c7f08.js";import{s as e}from"./index.module.6c7a343e.js";import{O as w}from"./index.626c48f9.js";import{O as G}from"./index.d7c1b6ac.js";import{i as P}from"./icon_teacher.df08d662.js";import{O as V}from"./index.a8f5f4b5.js";import{q as H}from"./quest-icon.f1b2f4e3.js";import{C as i}from"./index.91135ff9.js";import{G as I,a as o}from"./index.5e198b6f.js";var Y=E({name:"approval-manage-subsidy",setup(){const u=F(),S=R(),n=y(!1),c=y(!1),d=y(""),l=$({startDate:"",endDate:"",manageSalary:"",courseSalary:"",trainingSalary:"",manageSalaryInfo:{},courseSalaryInfo:{},practiceSalaryInfo:{}}),p=async()=>{try{const s=await g.post(`${v.platformApi}/schoolWeekSalaryRecord/manageConfirm/${u.query.salaryId}`,{});if(s!=null&&s.data){const{courseSalaryInfo:A,manageSalaryInfo:N,practiceSalaryInfo:T,startDate:m="",endDate:f="",manageSalary:B,courseSalary:C,trainingSalary:b,id:D}=s.data;l.courseSalaryInfo=A,l.manageSalaryInfo=N,l.practiceSalaryInfo=T,l.startDate=(m==null?void 0:m.split(" ")[0])||"",l.endDate=(f==null?void 0:f.split(" ")[0])||"",l.manageSalary=B,l.courseSalary=C,l.trainingSalary=b,d.value=D}}catch{}c.value=!1};k(()=>{p()});const h=()=>{O({message:"\u662F\u5426\u786E\u8BA4\u8BE5\u5468\u8865\u52A9\u91D1\u989D?"}).then(()=>{g.post(`${v.platformApi}/schoolWeekSalaryRecord/manageConfirmed/${u.query.salaryId}`,{hideLoading:!1}).then(s=>{(s==null?void 0:s.code)==200&&S.back()})})};return()=>a("div",null,[a(G,{onGetHeight:s=>{document.documentElement.style.setProperty("--header-height",s+"px")}},{default:()=>[a(L,{class:e.rightTip,onClickRight:()=>n.value=!0,title:u.query.display?"\u8865\u52A9\u8BE6\u60C5":"\u8865\u52A9\u786E\u8BA4"},{right:()=>a(q,{name:H,size:22,color:"#333"},null)})]}),a(w,{modelValue:c.value,"onUpdate:modelValue":s=>c.value=s,onRefresh:p,style:"min-height: calc(100vh - var(--header-height))"},{default:()=>[a("div",{class:e.wrap},[!!l.courseSalaryInfo&&a("div",{class:e.item},[a(i,{center:!0},{title:()=>a("div",{class:e.itemTitle},[a("span",null,[l.startDate,t(" \u81F3 "),l.endDate]),a("span",{class:e.itemTag},[t("\u8865\u52A9\u5468\u671F")])])}),a(I,{class:e.grid,columnNum:2,border:!1},{default:()=>[a(o,null,{default:()=>[a("div",{class:e.gridItem},[a("div",{class:e.gridItemTop},[a("span",{class:e.topNum},[r(l.manageSalary||0)]),t("\u5143")]),a("div",null,[t("\u7BA1\u7406\u8865\u52A9")])])]}),a(o,null,{default:()=>[a("div",{class:e.gridItem},[a("div",{class:e.gridItemTop},[a("span",{class:e.topNum},[r(l.courseSalary||0)]),t("\u5143")]),a("div",null,[t("\u8BAD\u7EC3\u8865\u52A9")])])]})]})]),!!l.manageSalaryInfo&&a("div",{class:e.item},[a(i,{style:{"--van-cell-value-color":(l.manageSalaryInfo.photoNum||0)>=(l.manageSalaryInfo.expectPhotoNum||0)?"#333":"#F44541"},center:!0,value:`\u8BAD\u7EC3\u7167\u7247${l.manageSalaryInfo.photoNum||0}/${l.manageSalaryInfo.expectPhotoNum||0}`,isLink:!0,to:`/subsidy-grant-detail?id=${d.value}`},{title:()=>a("div",{class:e.itemTitle},[a("div",{class:e.titleLine},null),a("span",null,[t("\u7BA1\u7406\u8865\u52A9")])])}),a(I,{class:e.grid,columnNum:3,border:!1},{default:()=>[a(o,null,{default:()=>[a("div",{class:e.gridItem},[a("div",{class:e.gridItemTop},[a("span",{class:[e.topNum,e.small],style:{color:"#333"}},[r(l.manageSalaryInfo.standardSalary||0)]),t("\u5143/\u5468")]),a("div",null,[t("\u8865\u52A9\u6807\u51C6")])])]}),a(o,null,{default:()=>[a("div",{class:e.gridItem},[a("div",{class:e.gridItemTop},[a("span",{class:[e.topNum,e.small],style:{color:"#333"}},[l.manageSalaryInfo.coursewareNum||0]),t("\u8BFE\u65F6")]),a("div",null,[t("\u672C\u5468\u8BFE\u65F6\u6570")])])]}),a(o,null,{default:()=>[a("div",{class:e.gridItem},[a("div",{class:e.gridItemTop},[a("span",{class:[e.topNum,e.small]},[r(l.manageSalaryInfo.actualSalary||0)]),t("\u5143")]),a("div",null,[t("\u5B9E\u9645\u8865\u52A9")])])]})]})]),a("div",{class:e.item},[a(i,{center:!0},{title:()=>a("div",{class:e.itemTitle},[a("div",{class:e.titleLine},null),a("span",null,[t("\u8BAD\u7EC3\u8865\u52A9")])])}),Array.isArray(l.courseSalaryInfo.salaryRecordDetailItemList)&&l.courseSalaryInfo.salaryRecordDetailItemList.map(s=>a(i,{center:!0,title:s.userName,class:e.teacherListCell,isLink:!0,to:`/subsidy-exercise-detail?id=${d.value}&userId=${s.userId}`},{icon:()=>a("img",{class:e.itemPicture,src:s.avatar||P},null),value:()=>a("div",{class:e.gridItem},[a("div",{class:e.gridItemTop},[a("span",{class:[e.topNum,e.small]},[r(s.salary||0)]),t("\u5143")]),a("div",{class:e.valeLabel},[t("\u5B9E\u9645\u8865\u52A9")])])}))]),a("div",{class:"van-safe-area-bottom"},[a("div",{style:{height:"calc(var(--van-button-default-height) + 0.8rem)"}},null)])])]}),u.query.display&&a("div",{class:e.confirmBtn},[a("div",{class:"van-safe-area-bottom"},[a(x,{block:!0,type:"primary",round:!0,onClick:h},{default:()=>[t("\u786E\u8BA4\u65E0\u8BEF")]})])]),a(V,{title:"\u8865\u52A9\u53D1\u653E\u89C4\u5219",message:`1\u3001\u6BCF\u5468\u4E00\u51CC\u6668\u751F\u6210\u4E0A\u4E00\u5468\u5B9E\u9645\u8865\u52A9\u6570\u636E 2\u3001\u6BCF\u5468\u4E0024\u70B9\u524D\u5B8C\u6210\u8865\u52A9\u786E\u8BA4\uFF0C\u5219\u8BE5\u8865\u52A9\u5C06\u4F1A\u5728\u5F53\u5468\u5468\u4E94\u53D1\u653E 3\u3001\u8D85\u8FC7\u5468\u4E0024\u70B9\u786E\u8BA4\uFF0C\u5219\u5EF6\u540E\u5230\u4E0B\u5468\u5468\u4E94\u53D1\u653E 4\u3001\u5982\u9047\u6CD5\u5B9A\u8282\u5047\u65E5\uFF0C\u5219\u7EDF\u4E00\u5EF6\u540E\u5230\u4E0B\u4E00\u5468\u4E94\u53D1\u653E 5\u3001\u672A\u7ED1\u5B9A\u94F6\u884C\u5361\u5BFC\u81F4\u65E0\u6CD5\u53D1\u653E\u65F6\uFF0C\u5C06\u5728\u7ED1\u5B9A\u94F6\u884C\u5361\u540E\u7684\u4E0B\u4E00\u5468\u4E94\uFF0C\u4E00\u6B21\u6027\u5C06\u5DF2\u786E\u8BA4\u4E14\u672A\u53D1\u653E\u7684\u8865\u52A9\u91D1\u989D\u53D1\u653E`,show:n.value,"onUpdate:show":s=>n.value=s,dialogMarginTop:"env(safe-area-inset-top)",messageAlign:"left",confirmButtonText:"\u6211\u77E5\u9053\u4E86"},null)])}});export{Y as default};