12345678910111213141516171819202122232425262728293031323334353637 |
- ;
- spa_define(function() {
- return $.use(["spa", "util", "form"], function(spa, util, fb) {
- return {
- modal: function(data) {
- var root = spa.findInModal(".sys_customer_new");
- var form = fb.build(root.find(".newForm"));
- var id = util.data("loginUser").id;
- form.val({
- cuserId: id,
- professorId: data.data,
- powType: 0
- });
- root.find(".modal-ctrl .icon-times").on("click", function() {
- spa.closeModal();
- });
- root.find(".opt-save").on("click", function() {
- var content = $("textarea").val();
- if (content != "" || content == null) {
- form.doPost("../ajax/sys/cpow", function() {
- spa.closeModal();
- if (data.hand) {
- data.hand();
- }
- }, {});
- } else {
- alert("请填写认证说明!");
- }
- });
- }
- };
- });
- });
|