166 lines
4.7 KiB
C#
166 lines
4.7 KiB
C#
using System;
|
||
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using DefaultNamespace.ProcessMode;
|
||
using Framework.Manager;
|
||
using MotionFramework;
|
||
using TMPro;
|
||
using UnityEngine;
|
||
using UnityEngine.UI;
|
||
|
||
/// <summary>
|
||
/// 退出退役资产物资代保管出库作业
|
||
/// </summary>
|
||
public class RetiredAssetOutboundShipmentManager : MonoBehaviour
|
||
{
|
||
//public Button renwushuX;
|
||
public Button danju;
|
||
|
||
public TMP_InputField localInput;
|
||
|
||
/// <summary>
|
||
/// 管理库存收发货检查按钮,可在 Unity 编辑器中指定
|
||
/// </summary>
|
||
public Button inventoryCheckButton;
|
||
/// <summary>
|
||
/// 管理库存收发货过账按钮,可在 Unity 编辑器中指定
|
||
/// </summary>
|
||
public Button inventoryPostingButton;
|
||
|
||
public GameObject plane3;
|
||
public GameObject plane4;
|
||
|
||
|
||
public TMP_Dropdown t1;
|
||
public TMP_InputField rukuleixing;
|
||
public TMP_InputField wuliaoduanwenben;
|
||
public TMP_InputField shuliang;
|
||
public TMP_InputField pici;
|
||
public TMP_InputField kucundidian;
|
||
|
||
|
||
|
||
|
||
private void Start()
|
||
{
|
||
Init();
|
||
}
|
||
|
||
public void Init()
|
||
{
|
||
|
||
|
||
// renwushuX.onClick.AddListener(delegate
|
||
// {
|
||
// che.SetActive(true);
|
||
// TutorialGuideManager.Instance.HideGuide();
|
||
// });
|
||
|
||
// 为输入框添加实时输入检测监听器
|
||
localInput.onValueChanged.AddListener(OnLocalInputChanged);
|
||
|
||
|
||
// 为新增按钮添加点击事件
|
||
if (inventoryCheckButton != null)
|
||
{
|
||
inventoryCheckButton.onClick.AddListener(OnInventoryCheckClick);
|
||
}
|
||
if (inventoryPostingButton != null)
|
||
{
|
||
inventoryPostingButton.onClick.AddListener(OnInventoryPostingClick);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 处理输入框内容变化的事件
|
||
/// 当输入内容为 HFA2 时触发特定操作
|
||
/// </summary>
|
||
/// <param name="inputValue">输入框中的当前内容</param>
|
||
public void OnLocalInputChanged(string inputValue)
|
||
{
|
||
Debug.Log($"检测到输入内容变化: {inputValue}");
|
||
|
||
// 检测输入内容是否为 HFA2
|
||
if (inputValue == "HFA2")
|
||
{
|
||
Debug.Log("检测到特定输入内容: HFA2 - 触发特殊处理逻辑");
|
||
}
|
||
}
|
||
|
||
public void OnDanJuClick()
|
||
{
|
||
List<UI_StampConfirmation> uI_StampConfirmations = UI_StampConfirmationManager.Instance.uI_StampConfirmations;
|
||
List<string> stampNames = new List<string>();
|
||
for (int i = uI_StampConfirmations.Count - 1; i >= 0; i--)
|
||
{
|
||
Debug.Log( uI_StampConfirmations[i].name);
|
||
|
||
string IsChecked = uI_StampConfirmations[i].IsClick ? "true" : "false";
|
||
stampNames.Add(IsChecked);
|
||
}
|
||
|
||
bool isMatch = MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick(stampNames);
|
||
if (isMatch) //查询
|
||
{
|
||
Debug.Log("单据验收完毕");
|
||
}
|
||
else
|
||
{
|
||
Debug.Log("未查询到入库单,请检查输入是否正确");
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 管理库存收发货检查按钮点击状态,true 表示已点击,false 表示未点击
|
||
/// </summary>
|
||
public bool isInventoryCheckButtonClicked = false;
|
||
/// <summary>
|
||
/// 管理库存收发货过账按钮点击状态,true 表示已点击,false 表示未点击
|
||
/// </summary>
|
||
public bool isInventoryPostingButtonClicked = false;
|
||
|
||
/// <summary>
|
||
/// 管理库存收发货检查按钮点击事件
|
||
/// </summary>
|
||
public void OnInventoryCheckClick()
|
||
{
|
||
Debug.Log("管理库存收发货检查按钮被点击");
|
||
// 标记检查按钮已点击
|
||
isInventoryCheckButtonClicked = true;
|
||
// 这里添加库存收发货检查的具体逻辑
|
||
|
||
List<string> lis = new List<string>();
|
||
string selectedText = t1.options[t1.value].text;
|
||
lis.Add(selectedText);
|
||
lis.Add(rukuleixing.text);
|
||
lis.Add(wuliaoduanwenben.text);
|
||
lis.Add(shuliang.text);
|
||
lis.Add(pici.text);
|
||
lis.Add(kucundidian.text);
|
||
|
||
MotionEngine.GetModule<ProcessManager>().HandleClick(lis);
|
||
|
||
plane3.SetActive(true);
|
||
TutorialGuideManager.Instance.TriggerNextGuide();
|
||
|
||
|
||
}
|
||
|
||
/// <summary>
|
||
/// 管理库存收发货过账按钮点击事件
|
||
/// </summary>
|
||
public void OnInventoryPostingClick()
|
||
{
|
||
Debug.Log("管理库存收发货过账按钮被点击");
|
||
// 标记过账按钮已点击
|
||
isInventoryPostingButtonClicked = true;
|
||
// 这里添加库存收发货过账的具体逻辑
|
||
|
||
|
||
plane3.SetActive(false);
|
||
plane4.SetActive(true);
|
||
TutorialGuideManager.Instance.TriggerNextGuide();
|
||
|
||
}
|
||
}
|