need.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2. function get_need_number(){
  3. $.post("qingdong/customer/need/get_need_number",function (data){
  4. top.window.Backend.api.sidebar({
  5. 'qingdong/customer/need/index':[data.data.number, 'red', 'badge'],
  6. 'qingdong/examine/examine/index':[data.data.examine, 'red', 'badge'], //合同
  7. 'qingdong/examine/examine/consume':[data.data.consume, 'red', 'badge'],
  8. 'qingdong/examine/examine/receivables':[data.data.receivables, 'red', 'badge'],
  9. 'qingdong/examine/examine/achievement':[data.data.achievement, 'red', 'badge'],
  10. 'qingdong/examine/examine/work':[data.data.approval, 'red', 'badge'],
  11. 'qingdong/canlendar/canlendar':[data.data.eventOne, 'red', 'badge'],
  12. });
  13. },'json');
  14. }
  15. get_need_number();
  16. setInterval(function (){
  17. get_need_number();
  18. },50000);
  19. var Controller = {
  20. index : function () {
  21. },
  22. api : {
  23. bindevent : function () {
  24. Form.api.bindevent($("form[role=form]"), function(data, ret){
  25. //这里是表单提交处理成功后的回调函数,接收来自php的返回数据
  26. Fast.api.close(data);//这里是重点
  27. });
  28. }
  29. }
  30. };
  31. return Controller;
  32. });