index-legacy.61e43fb6.js 3.6 KB

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