formatter.js 486 B

1234567891011121314151617181920212223242526
  1.  // easyui的格式化js包
  2. function formatDateTime(value, row, index){
  3. try{
  4. if(value==null){
  5. return null;
  6. }
  7. return (new Date(value)).Format("yyyy-MM-dd hh:mm:ss");
  8. }catch (e) {
  9. // TODO: handle exception
  10. return null;
  11. }
  12. }
  13. function formatDate(value, row, index){
  14. return (new Date(value)).Format("yyyy-MM-dd");
  15. }
  16.  
  17. /*标签打印,打印个数格式化*/
  18. function formatFldTp(value, row, index) {
  19. if (row.fldTp == 1) {
  20. return "-";
  21. } else {
  22. return value;
  23. }
  24. }