create.ui.js 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. window.changeExecution = function(e)
  2. {
  3. const executionID = e.target.value;
  4. const url = $.createLink('nc', 'ajaxGetAuditplan', `projectID=${projectID}&executionID=${executionID}`);
  5. $.getJSON(url, function(data)
  6. {
  7. $('[name="auditplan"]').zui('picker').render({items: data});
  8. $('[name="auditplan"]').zui('picker').$.setValue('');
  9. });
  10. $('[name="listID"]').zui('picker').render({items: []});
  11. $('[name="listID"]').zui('picker').$.setValue('');
  12. }
  13. window.changeAuditplan = function(e)
  14. {
  15. const auditplanID = e.target.value;
  16. const url = $.createLink('nc', 'ajaxGetCheckList', `auditplanID=${auditplanID}`);
  17. $.getJSON(url, function(data)
  18. {
  19. $('[name="listID"]').zui('picker').render({items: data});
  20. $('[name="listID"]').zui('picker').$.setValue('');
  21. });
  22. }
  23. window.changeObjectType = function(e)
  24. {
  25. const type = $(e.target).val();
  26. const objectID = from == 'execution' ? executionID : projectID;
  27. const url = $.createLink('nc', 'create', `project=${objectID}&auditplanID=${auditplanID}&from=${from}&type=${type}`)
  28. loadCurrentPage({url: url});
  29. }