작업 조건 분석 검색 기능 개발
This commit is contained in:
@@ -106,10 +106,10 @@ public class UI_Calendar : UIBase
|
||||
}
|
||||
else // ÀÌÀü ´Þ
|
||||
{
|
||||
DateTime dayInLastMonth = new DateTime(lastMonth.Year, lastMonth.Month, lastMonthDaysCount - (weekIndex - i - 1));
|
||||
calendarItemList[i].SetDate(dayInLastMonth, Color.gray);
|
||||
DateTime LastMonthDate = new DateTime(lastMonth.Year, lastMonth.Month, lastMonthDaysCount - (weekIndex - i - 1));
|
||||
calendarItemList[i].SetDate(LastMonthDate, Color.gray);
|
||||
|
||||
if (today == dayInLastMonth)
|
||||
if (today == LastMonthDate)
|
||||
{
|
||||
calendarItemList[i].ShowTodayUI();
|
||||
}
|
||||
|
||||
@@ -17,11 +17,6 @@ public class UI_CalendarItem : UIBase, IPointerEnterHandler, IPointerExitHandler
|
||||
public Image TodayUI;
|
||||
public TextMeshProUGUI Text_Day;
|
||||
|
||||
public void OnDisable()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
private void Init()
|
||||
{
|
||||
HoverUI.gameObject.SetActive(false);
|
||||
@@ -41,6 +36,7 @@ public class UI_CalendarItem : UIBase, IPointerEnterHandler, IPointerExitHandler
|
||||
public void Close()
|
||||
{
|
||||
SetActive(false);
|
||||
Init();
|
||||
}
|
||||
|
||||
public void ShowSelectUI()
|
||||
|
||||
@@ -5,6 +5,8 @@ using WI;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using System;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Menu;
|
||||
using System.Globalization;
|
||||
|
||||
namespace CHN
|
||||
{
|
||||
@@ -21,12 +23,15 @@ namespace CHN
|
||||
|
||||
private UI_Calendar ui_Calendar;
|
||||
|
||||
HTTPTest hTTPTest;
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
ui_Calendar = transform.GetComponentInChildren<UI_Calendar>();
|
||||
Button_Close.onClick.AddListener(() => SetActive(false));
|
||||
Button_StartDay.onClick.AddListener(OnClickStartDayBtn);
|
||||
Button_EndDay.onClick.AddListener(OnClickEndDayBtn);
|
||||
Button_Search.onClick.AddListener(OnClickSearchBtn);
|
||||
|
||||
ui_Calendar.Close();
|
||||
|
||||
@@ -36,6 +41,30 @@ namespace CHN
|
||||
SetActive(false);
|
||||
}
|
||||
|
||||
private void SetFacilityDropDown()
|
||||
{
|
||||
hTTPTest = FindObjectOfType<HTTPTest>();
|
||||
|
||||
if (hTTPTest == null)
|
||||
return;
|
||||
|
||||
Dropdown_Facility.ClearOptions();
|
||||
|
||||
string[] data = hTTPTest.workConditionFacilityData.data;
|
||||
|
||||
List<TMP_Dropdown.OptionData> optionList = new List<TMP_Dropdown.OptionData>();
|
||||
|
||||
foreach (string str in data)
|
||||
{
|
||||
optionList.Add(new TMP_Dropdown.OptionData(str));
|
||||
}
|
||||
|
||||
Dropdown_Facility.AddOptions(optionList);
|
||||
Dropdown_Facility.value = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void OnClickStartDayBtn()
|
||||
{
|
||||
ui_Calendar.Open(Text_StartDay);
|
||||
@@ -44,10 +73,24 @@ namespace CHN
|
||||
private void OnClickEndDayBtn()
|
||||
{
|
||||
ui_Calendar.Open(Text_EndDay);
|
||||
}
|
||||
|
||||
private void OnClickSearchBtn()
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(Text_StartDay.text);
|
||||
DateTime endDate = Convert.ToDateTime(Text_EndDay.text);
|
||||
|
||||
string startDateString = startDate.ToString("yyyy-MM-ddTHH:mm:ssZ");
|
||||
string endDateString = endDate.ToString("yyyy-MM-ddTHH:mm:ssZ");
|
||||
string MCHCD = Dropdown_Facility.options[Dropdown_Facility.value].text;
|
||||
string WO = InputField_WorkOrderNumber.text;
|
||||
|
||||
hTTPTest.WorkTimeInQuiry(startDateString, endDateString, MCHCD, WO);
|
||||
}
|
||||
|
||||
public void Open()
|
||||
{
|
||||
SetFacilityDropDown();
|
||||
SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user