diff --git a/Views/Home/ProjectList.cshtml b/Views/Home/ProjectList.cshtml index 5d3c5f5e..a54f9108 100644 --- a/Views/Home/ProjectList.cshtml +++ b/Views/Home/ProjectList.cshtml @@ -233,6 +233,7 @@ + + +
+
+ + +
+
+
+
+ + + + + + +
+
+
+
+ + + +
diff --git a/Views/Shared/_LooperLayout.cshtml b/Views/Shared/_LooperLayout.cshtml index 85633c9f..dcf35bf5 100644 --- a/Views/Shared/_LooperLayout.cshtml +++ b/Views/Shared/_LooperLayout.cshtml @@ -31,6 +31,7 @@ + @@ -200,7 +201,7 @@ - + @@ -212,6 +213,7 @@ + @@ -242,6 +244,7 @@ + diff --git a/wwwroot/assets/javascript/custom/globalJS.js b/wwwroot/assets/javascript/custom/globalJS.js index e895d72b..d126b6fe 100644 --- a/wwwroot/assets/javascript/custom/globalJS.js +++ b/wwwroot/assets/javascript/custom/globalJS.js @@ -1,4 +1,6 @@ -(function ($, document) { +//const zhTw = require("../../vendor/fullcalendar/locale/zh-tw"); + +(function ($, document) { (function ($) { $.UrlParam = function (name) { //宣告正規表達式 @@ -131,7 +133,7 @@ function clearChildren(element) { switch (e.type) { case "radio": case "checkbox": break; - case "hidden": break; + case "hidden": e.value = ''; break; case "button": case "submit": case "text": e.value = ''; break; @@ -187,6 +189,8 @@ $(document).ready(function () { } })(jQuery); + flatpickr.localize(flatpickr.l10ns.zh_tw); + }); function logout() { diff --git a/wwwroot/assets/javascript/custom/projectlist.js b/wwwroot/assets/javascript/custom/projectlist.js index 393d2dfb..760bd17c 100644 --- a/wwwroot/assets/javascript/custom/projectlist.js +++ b/wwwroot/assets/javascript/custom/projectlist.js @@ -45,6 +45,21 @@ $(document).ready(function () { fpStart.setDate(new Date(startTxt + '/1')) fpEnd.setDate(new Date(endTxt + '/1')) + $("#quotation_range").flatpickr({ + mode: 'range', + onChange: function (selectedDates, dateStr, instance) { + if (selectedDates.length == 2) { + var dateStart = instance.formatDate(selectedDates[0], "Y/m/d"); + var dateEnd = instance.formatDate(selectedDates[1], "Y/m/d"); + + $('#quotation_expStart').val(dateStart); + $('#quotation_expEnd').val(dateEnd); + + // interact with selected dates here + } + } + }) + $('#projectSaveBtn').on('click', function () { var company_uid = $('#company_select').val(); var project_name = $('#project_name').val(); @@ -111,6 +126,10 @@ $(document).ready(function () { }); $('#QuotationListNewBtn').on('click', function () { + + + + $('#quotation_method').val('add'); $('#clientModelQuotationModal').modal("toggle"); }); @@ -185,6 +204,42 @@ $(document).ready(function () { } }); +function loadContactPersion() { + var data = $('#dt-responsive').DataTable().row(projectRowPos).data(); + var uid = $('#quotation_company_uid').val(); + var formData = { + company_uid: uid + } + + $.ajax({ + url: "/Api/contactPersonList", + type: "post", + data: formData, + success: function (data, textStatus, jqXHR) { + if (data.ret == "yes") { + var obj = data.contactPersons; + + $("#contactPerson_uid").empty(); + + $.each(obj, function (i, item) { + $("#contactPerson_uid").append($("