index-legacy.f2376166.js 3.7 KB

1
  1. !function(){function t(t,e,n,a,r,i,s){try{var c=t[i](s),o=c.value}catch(l){return void n(l)}c.done?e(o):Promise.resolve(o).then(a,r)}function e(e){return function(){var n=this,a=arguments;return new Promise((function(r,i){var s=e.apply(n,a);function c(e){t(s,r,i,c,o,"next",e)}function o(e){t(s,r,i,c,o,"throw",e)}c(void 0)}))}}System.register(["./index-legacy.5f9666b4.js","./index.module-legacy.aa168c61.js","./index-legacy.dc9d3f42.js","./index-legacy.1f24a6b5.js","./index-legacy.9bcfff34.js","./index-legacy.812ec873.js","./index-legacy.85e16f70.js"],(function(t){"use strict";var n,a,r,i,s,c,o,l,u,d,f,p,g,v,m,y;return{setters:[function(t){n=t.d,a=t.r,r=t.$,i=t.c,s=t.aj,c=t.q,o=t.bf,l=t.e,u=t.ai,d=t.ak,f=t.m},function(t){p=t.s},function(t){g=t.O},function(t){v=t.C},function(t){m=t.G,y=t.a},function(){},function(){}],execute:function(){t("default",n({name:"practice-rewards",setup:function(){var t=a({list:[],listState:{dataShow:!0,loading:!1,finished:!1},statistics:{totalTrainingSalary:0,waitSalary:0}}),n=function(){var n=e(regeneratorRuntime.mark((function e(){var n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.post("/api-school/schoolWeekSalaryRecord/trainingStatistics");case 3:n=e.sent,a=n.data,console.log(a),t.statistics={totalTrainingSalary:a.totalTrainingSalary||0,waitSalary:a.waitSalary||0},e.next=11;break;case 9:e.prev=9,e.t0=e.catch(0);case 11:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return n.apply(this,arguments)}}(),h=function(){var n=e(regeneratorRuntime.mark((function e(){var n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.post("/api-school/schoolWeekSalaryRecord/trainingList",{data:{}});case 3:if(n=e.sent,a=n.data||[],!(t.list.length>0&&1===a.current)){e.next=7;break}return e.abrupt("return");case 7:t.list=n.data||[],t.listState.dataShow=t.list.length>0,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),t.listState.dataShow=!1;case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return n.apply(this,arguments)}}();return r((function(){n(),h()})),function(){return i("div",{class:p.practiceRewards},[i(g,{position:"top",style:{background:"transparent"}},{default:function(){return[i(s,{border:!1,background:"transparent"},null),i("div",{class:p.headerContainer},[i("div",{class:p.headerContent},[i("div",{class:p.priceTitle},[c("待结算金额 (元)")]),i("div",{class:p.priceCount},[i("span",null,[c("¥")]),o(t.statistics.waitSalary)]),i("span",{class:p.btn,onClick:function(){l({api:"open_app_page",content:{action:"app",pageTag:"settlementRecord",url:"",params:JSON.stringify({type:"TRAINING"})}})}},[c("结算记录")])])])]}}),t.listState.dataShow?t.list.map((function(t){return i("div",{class:p.gridGroup},[i(v,{center:!0,isLink:!0,to:"/practice-rewards-detail?id="+t.id},{title:function(){return i("div",{class:p.itemTitle},[i("span",{style:{fontFamily:"DINA"}},[u(t.startTime).format("YYYY-MM-DD"),c(" 至")," ",u(t.endTime).format("YYYY-MM-DD")]),i("span",{class:[p.status,!t.settleFlag&&p.red]},[t.settleFlag?"已结算":"待结算"])])}}),i(m,{class:p.grid,columnNum:2,border:!1},{default:function(){return[i(y,{class:p.gridBorderRight},{default:function(){return[i("div",{class:[p.gridItem]},[i("div",{class:p.gridItemTop},[i("span",{class:p.topNum,style:{color:"#333"}},[t.targetNum||0])]),i("div",null,[c("练习达标人数")])])]}}),i(y,null,{default:function(){return[i("div",{class:p.gridItem},[i("div",{class:p.gridItemTop},[i("span",{class:p.topNum,style:{color:"#333"}},[o(t.totalSalary||0)]),c("元")]),i("div",null,[c("奖励金额")])])]}})]}})])})):i(d,{btnStatus:!1,tips:"暂无练习奖励记录"},null)])}}}))}}}))}();