index.a9f4dbc5.js 2.5 KB

1
  1. import{d as p,r as g,$ as m,c as a,aj as y,q as i,b6 as r,e as f,ai as l,ak as S,m as o}from"./index.332c7f08.js";import{s as t}from"./index.module.ee4f9b91.js";import{O as h}from"./index.d7c1b6ac.js";import{C as v}from"./index.91135ff9.js";import{G as w,a as n}from"./index.5e198b6f.js";var C=p({name:"practice-rewards",setup(){const e=g({list:[],listState:{dataShow:!0,loading:!1,finished:!1},statistics:{totalTrainingSalary:0,waitSalary:0}}),c=async()=>{try{const{data:s}=await o.post("/api-school/schoolWeekSalaryRecord/trainingStatistics");console.log(s),e.statistics={totalTrainingSalary:s.totalTrainingSalary||0,waitSalary:s.waitSalary||0}}catch{}},d=async()=>{try{const s=await o.post("/api-school/schoolWeekSalaryRecord/trainingList",{data:{}}),u=s.data||[];if(e.list.length>0&&u.current===1)return;e.list=s.data||[],e.listState.dataShow=e.list.length>0}catch{e.listState.dataShow=!1}};return m(()=>{c(),d()}),()=>a("div",{class:t.practiceRewards},[a(h,{position:"top",style:{background:"transparent"}},{default:()=>[a(y,{border:!1,background:"transparent"},null),a("div",{class:t.headerContainer},[a("div",{class:t.headerContent},[a("div",{class:t.priceTitle},[i("\u5F85\u7ED3\u7B97\u91D1\u989D (\u5143)")]),a("div",{class:t.priceCount},[a("span",null,[i("\xA5")]),r(e.statistics.waitSalary)]),a("span",{class:t.btn,onClick:()=>{f({api:"open_app_page",content:{action:"app",pageTag:"settlementRecord",url:"",params:JSON.stringify({type:"TRAINING"})}})}},[i("\u7ED3\u7B97\u8BB0\u5F55")])])])]}),e.listState.dataShow?e.list.map(s=>a("div",{class:t.gridGroup},[a(v,{center:!0,isLink:!0,to:"/practice-rewards-detail?id="+s.id},{title:()=>a("div",{class:t.itemTitle},[a("span",{style:{fontFamily:"DINA"}},[l(s.startTime).format("YYYY-MM-DD"),i(" \u81F3")," ",l(s.endTime).format("YYYY-MM-DD")]),a("span",{class:[t.status,!s.settleFlag&&t.red]},[s.settleFlag?"\u5DF2\u7ED3\u7B97":"\u5F85\u7ED3\u7B97"])])}),a(w,{class:t.grid,columnNum:2,border:!1},{default:()=>[a(n,{class:t.gridBorderRight},{default:()=>[a("div",{class:[t.gridItem]},[a("div",{class:t.gridItemTop},[a("span",{class:t.topNum,style:{color:"#333"}},[s.targetNum||0])]),a("div",null,[i("\u7EC3\u4E60\u8FBE\u6807\u4EBA\u6570")])])]}),a(n,null,{default:()=>[a("div",{class:t.gridItem},[a("div",{class:t.gridItemTop},[a("span",{class:t.topNum,style:{color:"#333"}},[r(s.totalSalary||0)]),i("\u5143")]),a("div",null,[i("\u5956\u52B1\u91D1\u989D")])])]})]})])):a(S,{btnStatus:!1,tips:"\u6682\u65E0\u7EC3\u4E60\u5956\u52B1\u8BB0\u5F55"},null)])}});export{C as default};