using DefaultNamespace.ProcessMode; using Framework.Manager; using MotionFramework; using System; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; public class ScrapMaterialEntryQueryManager : MonoBehaviour { /// /// 申请单号输入字段 /// [Header("申请单号")] public TMP_InputField ApplicationNumber; /// /// 工厂输入字段 /// [Header("工厂")] public TMP_InputField Factory; /// /// 查询按钮 /// [Header("查询按钮")] public Button QueryButton; public Button viewPDFBt; public GameObject plane1; public GameObject plane2; public GameObject plane3; public GameObject plane4; public GameObject plane5; public GameObject plane6; public TMP_InputField kuguanyuan; public TMP_InputField riqi; public TMP_InputField cangkuzhuguan; public TMP_InputField yijiaoren; public TMP_InputField riqi2; public Button plane6closeBt; public Button plane6closeBt2; /// /// 组件初始化方法 /// private void Start() { // 为查询按钮添加点击事件监听器 if (QueryButton != null) { QueryButton.onClick.AddListener(OnQueryButtonClicked); } viewPDFBt.onClick.AddListener(delegate { }); plane6closeBt.onClick.AddListener(OnRuku); plane6closeBt2.onClick.AddListener(OnRuku2); } private void OnRuku2() { List list = new List(); list.Add(yijiaoren.text); list.Add(riqi2.text); MotionEngine.GetModule().HandleClick(list); } private void OnRuku() { List list = new List(); list.Add(kuguanyuan.text); list.Add(riqi.text); list.Add(cangkuzhuguan.text); if (MotionEngine.GetModule().HandleClick(list)) { TutorialGuideManager.Instance.TriggerNextGuide(); this.gameObject.SetActive(false); } } /// /// 处理查询按钮点击事件 /// private void OnQueryButtonClicked() { Debug.Log("报废物资入库申请单查询:开始执行查询操作"); List scrapMaterialData = new List(); // 获取查询条件 string applicationNumber = ApplicationNumber != null ? ApplicationNumber.text : ""; string factory = Factory != null ? Factory.text : ""; scrapMaterialData.Add(applicationNumber); scrapMaterialData.Add(factory); // 执行保存操作 if( MotionEngine.GetModule().HandleClick(scrapMaterialData)){ plane1.SetActive(false); plane2.SetActive(true); Debug.Log("报废物资入库申请单:保存成功"); // 可以在这里添加保存成功后的UI反馈 TutorialGuideManager.Instance.TriggerNextGuide(); } } }