Sin Descripción

index.js 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ;
  2. spa_define(function(){
  3. return $.use(["spa","pagedatagrid","util"],function(spa,pdgf,util){
  4. return{
  5. main: function() {
  6. var root = spa.findInMain(".sys_customer_index");
  7. root.find((".org"), {orgname: {keyPressInterval: 1}});
  8. var pdg = pdgf.build(root);
  9. pdg.code.shell("showDay", function(env) {
  10. if(env.cd && env.cd[this.k]) {
  11. var day = env.cd[this.k];
  12. return day.substring(0, 4) + "-" + day.substring(4, 6) + "-" + day.substring(6, 8);
  13. }
  14. return "";
  15. });
  16. pdg.code.listen($.dict.doTransfer);
  17. root.find(".opt-query").on("click", function() {
  18. pdg.load();
  19. });
  20. pdg.load();
  21. var bindDataEvent = function() {
  22. root.find(".table-opt i.icon-edit").on("click", function() {
  23. var $this = $(this);
  24. var professorId = $this.parent().attr("professorId");
  25. // var orgname = $this.parent().attr("orgName");
  26. spa.showModal("sys_customer_new", {
  27. // data:{id:professorId,name:orgname},
  28. data:professorId,
  29. hand: function() {
  30. pdg.load();
  31. }
  32. });
  33. });
  34. root.find(".table-opt a.name").on("click", function () {
  35. var professorId = $(this).parent().attr("professorId");
  36. window.open('http://www.ekexiu.com/information-brow.html?professorId=' + professorId);
  37. });
  38. };
  39. pdg.code.listen(bindDataEvent);
  40. }
  41. };
  42. });
  43. });