Built files from Bizgaze WebServer
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. var Mobil;
  2. (function (Mobil) {
  3. let Apps;
  4. (function (Apps) {
  5. let Communications;
  6. (function (Communications) {
  7. let Components;
  8. (function (Components) {
  9. class Meetings extends Unibase.Platform.Core.BaseComponent {
  10. cssFiles() {
  11. return [''];
  12. }
  13. jsFiles() {
  14. return ['apps/mobil/meetings.js'];
  15. }
  16. html(id, containerid) {
  17. let html = ``;
  18. return html;
  19. }
  20. load(id, containerid, callback) {
  21. function format_two_digits(n) {
  22. return n < 10 ? '0' + n : n;
  23. }
  24. var cdate = new Date();
  25. if (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.length == 0) {
  26. $("#time_starttime").val(format_two_digits(cdate.getHours()) + ':' + format_two_digits(cdate.getMinutes()));
  27. $("#time_endtime").val(format_two_digits(cdate.getHours() + 1) + ':' + format_two_digits(cdate.getMinutes()));
  28. }
  29. var mindate = cdate.setDate(cdate.getDate() + (-15));
  30. var startmindate = new Date(mindate);
  31. $('.date_startdate.datepicker-input').daterangepicker({
  32. singleDatePicker: true,
  33. showDropdowns: true,
  34. minYear: 1901,
  35. locale: {
  36. format: 'DD/MM/YYYY',
  37. },
  38. minDate: startmindate,
  39. });
  40. $('.date_enddate.datepicker-input').daterangepicker({
  41. singleDatePicker: true,
  42. showDropdowns: true,
  43. minYear: 1901,
  44. locale: {
  45. format: 'DD/MM/YYYY',
  46. },
  47. minDate: startmindate
  48. }, function (start, end, label) {
  49. $(".hfdate_enddate").val(end.format('YYYY/MM/DD'));
  50. });
  51. $('.date_startdate.datepicker-input').change(function () {
  52. var mindate = $('.date_startdate').val();
  53. $('.date_enddate').val(mindate);
  54. $('.date_enddate.datepicker-input').daterangepicker({
  55. singleDatePicker: true,
  56. showDropdowns: true,
  57. minYear: 1901,
  58. locale: {
  59. format: 'DD/MM/YYYY',
  60. },
  61. minDate: mindate.toString()
  62. }, function (start, end, label) {
  63. $(".hfdate_enddate").val(end.format('YYYY/MM/DD'));
  64. });
  65. $(".hfdate_startdate").val(moment(mindate, 'DD/MM/YYYY').format('YYYY/MM/DD'));
  66. $(".hfdate_enddate").val(moment(mindate, 'DD/MM/YYYY').format('YYYY/MM/DD'));
  67. });
  68. if (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.length > 0) {
  69. var lockdate = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_lockdate").Value;
  70. var date = Number(lockdate.substring(0, 2));
  71. var month = Number(lockdate.substring(3, 5));
  72. var year = Number(lockdate.substring(6, 10));
  73. var dateToCompare = new Date(year, month - 1, date);
  74. var crDate = new Date();
  75. if (crDate > dateToCompare) {
  76. $(".date_startdate.datepicker-input").prop('disabled', true);
  77. $(".date_enddate.datepicker-input").prop('disabled', true);
  78. $("#time_starttime").prop("disabled", true);
  79. $("#time_endtime").prop("disabled", true);
  80. }
  81. }
  82. }
  83. loadmeeting() {
  84. let customername = $(".txtAutoComplete_contactid option:selected").text();
  85. var crDate = moment(new Date($.now())).format("DD/MM/YYYY");
  86. let typeofmeeting = $(".txtAutoComplete_meetingtype option:selected").text();
  87. let nameofmeeting = "";
  88. if (typeofmeeting == "") {
  89. typeofmeeting = "";
  90. }
  91. nameofmeeting = customername + '-' + typeofmeeting + '-' + crDate;
  92. $(".txt_meetingsubject").val(nameofmeeting);
  93. $(".div_meetingsubject").addClass("floating-label-form-group-with-value");
  94. }
  95. loadtypemeeting() {
  96. let customername = $(".txtAutoComplete_contactid option:selected").text();
  97. var crDate = moment(new Date($.now())).format("DD/MM/YYYY");
  98. let typeofmeeting = "";
  99. let nameofmeeting = "";
  100. typeofmeeting = $(".txtAutoComplete_meetingtype option:selected").text();
  101. if (customername == "") {
  102. customername = "Select Customer";
  103. }
  104. nameofmeeting = customername + '-' + typeofmeeting + '-' + crDate;
  105. $(".txt_meetingsubject").val(nameofmeeting);
  106. $(".div_meetingsubject").addClass("floating-label-form-group-with-value");
  107. }
  108. static Instance() {
  109. if (this.instance == undefined) {
  110. this.instance = new Meetings();
  111. }
  112. return this.instance;
  113. }
  114. }
  115. Components.Meetings = Meetings;
  116. })(Components = Communications.Components || (Communications.Components = {}));
  117. })(Communications = Apps.Communications || (Apps.Communications = {}));
  118. })(Apps = Mobil.Apps || (Mobil.Apps = {}));
  119. })(Mobil || (Mobil = {}));