Ei kuvausta

new.js 853B

12345678910111213141516171819202122232425262728293031323334353637
  1. ;
  2. spa_define(function() {
  3. return $.use(["spa", "util", "form"], function(spa, util, fb) {
  4. return {
  5. modal: function(data) {
  6. var root = spa.findInModal(".sys_customer_new");
  7. var form = fb.build(root.find(".newForm"));
  8. var id = util.data("loginUser").id;
  9. form.val({
  10. cuserId: id,
  11. professorId: data.data,
  12. powType: 0
  13. }); //加入表单意外的值
  14. root.find(".modal-ctrl .icon-times").on("click", function() {
  15. spa.closeModal();
  16. });
  17. root.find(".opt-save").on("click", function() {
  18. var content = $("textarea").val();
  19. if (content != "" || content == null) {
  20. form.doPost("../ajax/sys/cpow", function() {
  21. spa.closeModal();
  22. if (data.hand) {
  23. data.hand();
  24. }
  25. }, {});
  26. } else {
  27. alert("请填写认证说明!");
  28. }
  29. });
  30. }
  31. };
  32. });
  33. });