using System;
using System.Collections.Generic;
using DefaultNamespace;
using DefaultNamespace.ProcessMode;
using Framework.Manager;
using MotionFramework;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
namespace Zion.Scripts.ERP.查询需求计划平衡利库情况
{
///
/// 查询需求计划平衡利库情况
///
public class DemandBalancerManager : MonoBehaviour
{
[SerializeField] private TMP_InputField factoryInputField; // 工厂输入框
[SerializeField] private TMP_InputField codeField; // 唯一码1
[SerializeField] private TMP_InputField code1Field; // 唯一码1
[SerializeField] private TMP_InputField code2Field; // 唯一码2
[SerializeField] private Button queryBt; // 工厂输入框
[SerializeField] private Button wuziBt; // 工厂输入框
[SerializeField] private Button saveBt; // 工厂输入框
[SerializeField] private GameObject plane1;
[SerializeField] private GameObject plane2;
[SerializeField] private TMP_InputField ans1;
[SerializeField] private TMP_InputField ans2;
[SerializeField] private TMP_InputField ans3;
[SerializeField] private TMP_InputField ans4;
[SerializeField] private TMP_InputField ans5;
[SerializeField] private TMP_InputField ans6;
[SerializeField] private TMP_InputField ans7;
[SerializeField] private TMP_InputField ans8;
[SerializeField] private GameObject ansWin;
public Button closeButton;
public Button tijiaobt;
private void Start()
{
queryBt.onClick.AddListener(OnQueryButtonClicked);
wuziBt.onClick.AddListener(OnWuziButtonClicked);
saveBt.onClick.AddListener(OnSaveButtonClicked);
tijiaobt.onClick.AddListener(SaveAnswerSheet);
closeButton.onClick.AddListener(delegate
{
TutorialGuideManager.Instance.HideGuide();
});
}
private void OnSaveButtonClicked()
{
FileComponent.DownloadSingleFile("物资需求计划审批情况查询表");
ansWin.SetActive(true);
}
private void OnWuziButtonClicked()
{
codeField.text = code1Field.text;
}
public void SaveAnswerSheet()
{
if (MotionEngine.GetModule().HandleClick(
new List()
{
ans1.text,
ans2.text,
ans3.text,
ans4.text,
ans5.text,
ans6.text,
ans7.text,
ans8.text,
}))
{
ansWin.SetActive(false);
}
}
private void OnQueryButtonClicked()
{
if (MotionEngine.GetModule().HandleClick(
new List() { factoryInputField.text, code1Field.text, code2Field.text }))
{
plane1.SetActive(false);
plane2.SetActive(true);
TutorialGuideManager.Instance.TriggerNextGuide();
}
}
private void OnRaycastHit(GameObject hitObject)
{
// 这里可以添加射线击中物体后的逻辑
Debug.Log("射线击中物体: " + hitObject.name);
bool isb = MotionEngine.GetModule().HandleClick(
new List()
{
hitObject.name
});
}
}
}