yui表格背景變紅

來源:互聯網
上載者:User
<script language="javascript">pirl.subscribe("postRenderEvent",function(){ var allRows = this._elTbody.rows; for(var i=allRows.length-1; i>-1; i--) {  //alert(allRows[i].id); var oRecord = this.getRecord(allRows[i].id); var isExpired=oRecord.getData('isExpired'); if(isExpired=='1'){ $("#" + allRows[i].id).css("backgroundColor","yellow"); }else if(isExpired=='2'){ $("#" + allRows[i].id).css("backgroundColor","#FC8383"); }else{ } }});</script> 

sql

select  TBASBASEINFO.BASEINFO_ID as baseInfoId, TBASBASEINFO.GENDER gender,TBASBASEINFO.BIRTHDAY birthday,TBASBASEINFO.NAME as name,TBASBASEINFO.ID_CARD as idCard,case         when (TBAEXTINFO.ENGAGEMENT_DATE + 3 year - 6 month)>=current date        then 0        when TBAEXTINFO.ENGAGEMENT_DATE+3 year <current date        then 2        else 1    end isExpired,  TBAEXTINFO.PERSON_NO as personNo,  TBAEXTINFO.CATEGORY as category, TBAEXTINFO.TYPES as types, TBAEXTINFO.ENGAGEMENT_DATE as engagementDate, TBAEXTINFO.DISPOSE dispose, TBAEXTINFO.PROMOTION_DATE as promotionDate, TBAEXTINFO.CERTIFICATE_NO as certificateNo, TBASBASEINFO.AREA as area,  TBAEXTINFO.EXTINFO_ID as extInfoId, TBASBASEINFO.ORGANIZATION as organization,TBAEXTINFO.CERTIFICATION as cretification,TBAEXTINFO.POWERSTAR as powerstar,TBAEXTINFO.FLAG_FOOD_ACC as flagFoodAcc,TBAEXTINFO.FLAG_PERSON as flagInner,TBAEXTINFO.FOCUS focus, V_YEARCOUNT.YEARCOUNT as yearCount,V_ALLCOUNT.ALLCOUNT as allCount, TBASBASEINFO.card ,TBASBASEINFO.USER_ID as userId,TBAEXTINFO.FLAG_AB flagAb FROM TBASBASEINFO, TBAEXTINFO LEFT JOIN V_YEARCOUNT ON TBAEXTINFO.EXTINFO_ID=V_YEARCOUNT.EXTINFOID     LEFT JOIN V_ALLCOUNT  ON TBAEXTINFO.EXTINFO_ID=V_ALLCOUNT.EXTINFOIDWHERE TBASBASEINFO.BASEINFO_ID = TBAEXTINFO.BASEINFO_ID 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.