using System;
using System.Collections;
using System.Collections.Generic;
using DefaultNamespace;
using DefaultNamespace.ProcessMode;
using Framework.Manager;
using MotionFramework;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
///
/// 基建延期供应计划与合同执行查询管理器
///
public class InfrastructureDelaySupplyPlanAndContractExecutionQueryManager : MonoBehaviour
{
public Button jiaohuoBt; //交货期维护按钮
public GameObject jiaohuoWindow; //维护交货日期
public InputField gongchang;
public InputField gongsidaima;
public Button queryBt;
public GameObject plane1;
public InputField dingdanhao;
public Button ecpchaxun;
public GameObject plane2;
public Toggle ecp1;
public Toggle ecp2;
public Toggle ecp3;
public Toggle ecp4;
public Toggle ecp5;
public Button picibt;
public GameObject piciSelectList;
public Button btcheck;
public InputField pici;
public InputField pici1;
public InputField pici2;
public TMP_InputField selectDate;
public GameObject dateSelectWindow;
public Button btDateClose;
public Text dateText;
public Button jiaohuoSavebt; //维护交货日期保存
public GameObject xuanxiangka;
public Toggle t1;
public Toggle t2;
// public TMP_InputField pici;
// public Toggle tiaozheng;
// public Toggle butiaozheng;
// public TMP_InputField yuanyin;
// public Button queding;
private void Start()
{
t1.onValueChanged.AddListener((bool value) =>
{
MotionEngine.GetModule().HandleClick("是");
xuanxiangka.SetActive(false);
TutorialGuideManager.Instance.TriggerNextGuide();
});
t2.onValueChanged.AddListener((bool value) =>
{
MotionEngine.GetModule().HandleClick("否");
xuanxiangka.SetActive(false);
TutorialGuideManager.Instance.TriggerNextGuide();
});
jiaohuoSavebt.onClick.AddListener(delegate
{
xuanxiangka.SetActive(true);
MotionEngine.GetModule().HandleClick(new List() { dateText.text.Replace("/", ".") });
});
jiaohuoBt.onClick.AddListener(delegate
{
jiaohuoWindow.SetActive(true);
TutorialGuideManager.Instance.TriggerNextGuide(jiaohuoBt.name);
});
btDateClose.onClick.AddListener(delegate
{
dateText.text = selectDate.text;
dateSelectWindow.SetActive(false);
TutorialGuideManager.Instance.TriggerNextGuide();
});
picibt.onClick.AddListener(delegate
{
TutorialGuideManager.Instance.TriggerNextGuide(picibt.name);
piciSelectList.SetActive(true);
});
btcheck.onClick.AddListener(delegate
{
TutorialGuideManager.Instance.TriggerNextGuide(btcheck.name);
piciSelectList.SetActive(false);
pici.text = pici1.text;
});
ecp1.onValueChanged.AddListener((bool b) => { TutorialGuideManager.Instance.TriggerNextGuide(); });
ecp2.onValueChanged.AddListener((bool b) => { TutorialGuideManager.Instance.TriggerNextGuide(); });
ecp3.onValueChanged.AddListener((bool b) => { TutorialGuideManager.Instance.TriggerNextGuide(); });
ecp4.onValueChanged.AddListener((bool b) => { TutorialGuideManager.Instance.TriggerNextGuide(); });
ecp5.onValueChanged.AddListener((bool b) => { TutorialGuideManager.Instance.TriggerNextGuide(); });
queryBt.onClick.AddListener(() =>
{
List inputList = new List();
inputList.Add(gongchang.text);
inputList.Add(gongsidaima.text);
inputList.Add(pici1.text);
inputList.Add(pici2.text);
if (MotionFramework.MotionEngine.GetModule().HandleClick(inputList))
{
plane1.SetActive(true);
FileComponent.DownloadSingleFile("供应计划制定");
FileComponent.DownloadSingleFile("供应计划交货期三方确认单");
TutorialGuideManager.Instance.TriggerNextGuide(queryBt.name);
}
});
ecpchaxun.onClick.AddListener(delegate
{
List inputList = new List();
inputList.Add(dingdanhao.text);
if (MotionFramework.MotionEngine.GetModule().HandleClick(inputList))
plane2.SetActive(true);
TutorialGuideManager.Instance.TriggerNextGuide(ecpchaxun.name);
});
// queding.onClick.AddListener(() =>
// {
// List inputList = new List();
// inputList.Add(pici.text);
// inputList.Add(tiaozheng.isOn.ToString());
// inputList.Add(butiaozheng.isOn.ToString());
// inputList.Add(yuanyin.text);
// MotionFramework.MotionEngine.GetModule().HandleClick(inputList);
// plane1.SetActive(false);
// });
}
}