customform.js 835 B

12345678910111213141516171819
  1. define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2. var Controller = {
  3. index: function () {
  4. //因为日期选择框不会触发change事件,导致无法刷新textarea,所以加上判断
  5. $(document).on("dp.change", "#second-form .datetimepicker", function () {
  6. $(this).parent().prev().find("input").trigger("change");
  7. });
  8. $(document).on("fa.event.appendfieldlist", "#second-form .btn-append", function (e, obj) {
  9. Form.events.selectpage(obj);
  10. Form.events.datetimepicker(obj);
  11. });
  12. Form.api.bindevent($("form[role=form]"), function (data, ret) {
  13. Layer.alert(data.data);
  14. });
  15. },
  16. };
  17. return Controller;
  18. });