Tz2/Assets/Scripts/基建工程供应计划制定/FormulationSupplyPlanInfras...

150 lines
4.8 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using DefaultNamespace;
using DefaultNamespace.ProcessMode;
using Framework.Manager;
using MotionFramework;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class FormulationSupplyPlanInfrastructureProjects : MonoBehaviour
{
public GameObject data1;
public GameObject data2;
public InputField orderid;
public Button querybtn;
public Button jiaohuoqiweihu;
public Toggle t1;
public Toggle t2;
public Toggle t3;
public Toggle t4;
public TMP_InputField InputField;
public GameObject message;
public GameObject toggleWin;
public Button closebt;
private bool isTrue = false;
public Toggle hetongguanli;
public InputField inputfield1;
public Button querybtn1;
public GameObject xuanxiangka2;
public Toggle gongyingjihuaweihu;
public Toggle gongyingjihuachaxun;
public GameObject riqiwindow;
public TMP_InputField selectDate;
public GameObject dateSelectWindow;
public Button btDateClose;
public Text dateText;
public Button jiaohuoSavebt; //维护交货日期保存
private void Start()
{
jiaohuoSavebt.onClick.AddListener(delegate
{
MotionEngine.GetModule<ProcessManager>().HandleClick(new List<string>() { dateText.text.Replace("/", ".") });
if (isTrue)
{
xuanxiangka2.SetActive(true);
}
else
{
// FileComponent.UploadExamFiles();
}
});
btDateClose.onClick.AddListener(delegate
{
dateText.text = selectDate.text;
dateSelectWindow.SetActive(false);
TutorialGuideManager.Instance.TriggerNextGuide();
});
if (MotionEngine.GetModule<GlobalDataStorage>().ExamName == "基建工程供应计划制定")
{
jiaohuoqiweihu.onClick.AddListener(delegate
{
// if (isTrue)
// {
// xuanxiangka2.SetActive(true);
// }
// else
// {
// FileComponent.UploadExamFiles();
// }
riqiwindow.SetActive(true);
TutorialGuideManager.Instance.TriggerNextGuide();
});
}
gongyingjihuaweihu.onValueChanged.AddListener((bool v) => { TutorialGuideManager.Instance.TriggerNextGuide(gongyingjihuaweihu.name); });
hetongguanli.onValueChanged.AddListener((bool v) => { TutorialGuideManager.Instance.TriggerNextGuide(hetongguanli.name); });
gongyingjihuachaxun.onValueChanged.AddListener((bool v) => { TutorialGuideManager.Instance.TriggerNextGuide(gongyingjihuachaxun.name); });
querybtn.onClick.AddListener(() =>
{
if (MotionEngine.GetModule<ProcessManager>().HandleClick(orderid.text))
{
data1.SetActive(true);
FileComponent.DownloadSingleFile("系统数据-供应计划制定-02-高级工");
toggleWin.SetActive(true);
TutorialGuideManager.Instance.HideGuide();
}
});
t1.onValueChanged.AddListener((bool value) =>
{
MotionEngine.GetModule<ProcessManager>().HandleClick("是");
isTrue = true;
toggleWin.SetActive(false);
message.SetActive(true);
TutorialGuideManager.Instance.TriggerNextGuide();
});
t2.onValueChanged.AddListener((bool value) =>
{
MotionEngine.GetModule<ProcessManager>().HandleClick("否");
isTrue = false;
toggleWin.SetActive(false);
message.SetActive(true);
TutorialGuideManager.Instance.TriggerNextGuide();
});
closebt.onClick.AddListener(delegate
{
MotionEngine.GetModule<ProcessManager>().HandleClick(InputField.text);
TutorialGuideManager.Instance.TriggerNextGuide(closebt.name);
message.SetActive(false);
});
querybtn1.onClick.AddListener(delegate
{
if (MotionEngine.GetModule<ProcessManager>().HandleClick(new List<string>() { inputfield1.text }))
{
data2.SetActive(true);
TutorialGuideManager.Instance.TriggerNextGuide(querybtn1.name);
}
});
t3.onValueChanged.AddListener((bool value) =>
{
MotionEngine.GetModule<ProcessManager>().HandleClick("是");
xuanxiangka2.SetActive(false);
});
t4.onValueChanged.AddListener((bool value) =>
{
MotionEngine.GetModule<ProcessManager>().HandleClick("否");
xuanxiangka2.SetActive(false);
});
}
}