132 lines
3.1 KiB
C#
132 lines
3.1 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// 申请单号输入字段
|
|
/// </summary>
|
|
[Header("申请单号")]
|
|
public TMP_InputField ApplicationNumber;
|
|
|
|
/// <summary>
|
|
/// 工厂输入字段
|
|
/// </summary>
|
|
[Header("工厂")]
|
|
public TMP_InputField Factory;
|
|
|
|
/// <summary>
|
|
/// 查询按钮
|
|
/// </summary>
|
|
[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;
|
|
/// <summary>
|
|
/// 组件初始化方法
|
|
/// </summary>
|
|
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<string> list = new List<string>();
|
|
list.Add(yijiaoren.text);
|
|
list.Add(riqi2.text);
|
|
|
|
MotionEngine.GetModule<ProcessManager>().HandleClick(list);
|
|
}
|
|
|
|
private void OnRuku()
|
|
{
|
|
List<string> list = new List<string>();
|
|
list.Add(kuguanyuan.text);
|
|
list.Add(riqi.text);
|
|
list.Add(cangkuzhuguan.text);
|
|
|
|
if (MotionEngine.GetModule<ProcessManager>().HandleClick(list))
|
|
{
|
|
TutorialGuideManager.Instance.TriggerNextGuide();
|
|
|
|
this.gameObject.SetActive(false);
|
|
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 处理查询按钮点击事件
|
|
/// </summary>
|
|
private void OnQueryButtonClicked()
|
|
{
|
|
Debug.Log("报废物资入库申请单查询:开始执行查询操作");
|
|
List<string> scrapMaterialData = new List<string>();
|
|
|
|
// 获取查询条件
|
|
string applicationNumber = ApplicationNumber != null ? ApplicationNumber.text : "";
|
|
string factory = Factory != null ? Factory.text : "";
|
|
|
|
scrapMaterialData.Add(applicationNumber);
|
|
scrapMaterialData.Add(factory);
|
|
|
|
// 执行保存操作
|
|
if( MotionEngine.GetModule<ProcessManager>().HandleClick(scrapMaterialData)){
|
|
|
|
|
|
plane1.SetActive(false);
|
|
plane2.SetActive(true);
|
|
|
|
Debug.Log("报废物资入库申请单:保存成功");
|
|
// 可以在这里添加保存成功后的UI反馈
|
|
|
|
|
|
TutorialGuideManager.Instance.TriggerNextGuide();
|
|
}
|
|
}
|
|
}
|