using System.Collections;
using System.Collections.Generic;
using DefaultNamespace;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using static InterfaceManager;
using DefaultNamespace.ProcessMode;
using MotionFramework;
public class DisplayStockCertificateList : MonoBehaviour
{
///
/// 批次号
///
public InputField batchNumberDisplayStockCertificateList;
///
/// 查询
///
public Button queryDisplayStockCertificateList;
///
/// 表格化
///
public Button tableDisplayStockCertificateList;
///
/// 面板1
///
public Transform PanelDisplayStockCertificateListOne;
///
/// 面板2
///
public Transform PanelDisplayStockCertificateListTwo;
///
/// 面板3
///
public Transform PanelDisplayStockCertificateListThree;
///
/// 文件信息面板
///
public Transform PanelFileInformation;
///
/// 移动类型文本
///
[Header("移动类型文本")] public List BtnForms = new List();
///
/// 移动类型
///
[Header("移动类型")] public List InputMovementTypes = new List();
///
/// 移动类型文本
///
[Header("移动类型文本")] public List InputMovementTypesTexts = new List();
///
/// 物料凭证
///
[Header("物料凭证")] public List InputMaterialCertificates = new List();
///
/// 数量
///
[Header("数量")] public List InputQuantities = new List();
///
/// 凭证日期
///
[Header("凭证日期")] public List InputCertificateDates = new List();
///
/// 过账日期
///
[Header("过账日期")] public List InputPostingDates = new List();
///
/// 创建日期
///
[Header("创建日期")] public List InputCreationDates = new List();
///
/// 创建 时分秒
///
[Header("创建 时分秒")] public List InputCreationTimes = new List();
///
/// 显示
///
public TextMeshProUGUI InputMaterialNameDisplayStock;
///
/// 数量
///
public TMP_InputField InputQuantitieDisplayStock;
///
/// 移动类型
///
public TMP_InputField InputMovementTypeDisplayStock;
///
/// 凭证日期
///
public TextMeshProUGUI InputCertificateDateDisplayStock;
///
/// 过账日期
///
public TextMeshProUGUI InputPostingDateDisplayStock;
///
/// 创建日期
///
public TextMeshProUGUI CreationDateYearMonthDay;
///
/// 创建日期 时分秒
///
public TextMeshProUGUI HourMinuteSecond;
///
/// 确定按钮
///
public Button BtnConfirmDisplayStock;
///
/// 文件信息按钮
///
public Button BtnPanelFileInformation;
///
/// 物料凭证分析答题卡按钮
///
public Button btnMaterialDocumentAnalysis;
public InputField gongchang;
private Framework.Dto.InventoryReversalVoucherAnalyzer returnRevVoucherAnalyzer;
public GameObject plane1;
public GameObject plane2;
public GameObject aaa;
void Start()
{
batchNumberDisplayStockCertificateList = FindObjectByName("batchNumberDisplayStockCertificateList");
queryDisplayStockCertificateList = FindObjectByName("queryDisplayStockCertificateList");
tableDisplayStockCertificateList = FindObjectByName("tableDisplayStockCertificateList");
PanelDisplayStockCertificateListOne = FindObjectByName("PanelDisplayStockCertificateListOne");
// PanelDisplayStockCertificateListTwo = FindObjectByName("PanelDisplayStockCertificateListTwo");
PanelDisplayStockCertificateListThree = FindObjectByName("PanelDisplayStockCertificateListThree");
btnMaterialDocumentAnalysis = FindObjectByName("btnMaterialDocumentAnalysis");
if (batchNumberDisplayStockCertificateList != null && queryDisplayStockCertificateList != null && tableDisplayStockCertificateList != null
&& PanelDisplayStockCertificateListOne != null )
{
queryDisplayStockCertificateList.onClick.AddListener(() =>
{
List list = new List();
list.Add(gongchang.text);
list.Add(batchNumberDisplayStockCertificateList.text);
// 你可以在这里调用其他方法来处理订单号
if (MotionFramework.MotionEngine.GetModule().HandleClick(list))
{
PanelDisplayStockCertificateListOne.gameObject.SetActive(true);
// if (btnMaterialDocumentAnalysis)
// btnMaterialDocumentAnalysis.gameObject.SetActive(true);
LoadTriggerNextGuide();
}
});
tableDisplayStockCertificateList.onClick.AddListener(() =>
{
if (returnRevVoucherAnalyzer.formselection == "2411H00032")
{
plane1.SetActive(true);
FileComponent.DownloadSingleFile("2411H00032凭证");
/// aaa.SetActive(true);
}
else
{
plane2.SetActive(true);
FileComponent.DownloadSingleFile("2410H03417凭证");
/// aaa.SetActive(true);
}
// PanelDisplayStockCertificateListTwo.gameObject.SetActive(true);
LoadTriggerNextGuide();
});
}
InputMaterialNameDisplayStock = FindObjectByName("InputMaterialNameDisplayStock");
InputQuantitieDisplayStock = FindObjectByName("InputQuantitieDisplayStock");
InputMovementTypeDisplayStock = FindObjectByName("InputMovementTypeDisplayStock");
BtnConfirmDisplayStock = FindObjectByName("BtnConfirmDisplayStock");
InputCertificateDateDisplayStock = FindObjectByName("InputCertificateDateDisplayStock");
InputPostingDateDisplayStock = FindObjectByName("InputPostingDateDisplayStock");
CreationDateYearMonthDay = FindObjectByName("CreationDateYearMonthDay");
HourMinuteSecond = FindObjectByName("HourMinuteSecond");
if (BtnConfirmDisplayStock != null && PanelDisplayStockCertificateListThree != null)
{
BtnConfirmDisplayStock.onClick.AddListener(() =>
{
PanelDisplayStockCertificateListThree.gameObject.SetActive(false);
LoadTriggerNextGuide("关闭");
MotionFramework.MotionEngine.GetModule().HandleClick("显示库存凭证清单");
});
}
BtnPanelFileInformation = FindObjectByName("BtnPanelFileInformation");
PanelFileInformation = FindObjectByName("PanelFileInformation");
if (BtnPanelFileInformation != null && PanelFileInformation != null)
{
BtnPanelFileInformation.onClick.AddListener(() =>
{
PanelFileInformation.gameObject.SetActive(true);
LoadTriggerNextGuide();
});
}
returnRevVoucherAnalyzer = (Framework.Dto.InventoryReversalVoucherAnalyzer)MotionEngine.GetModule().materialTaskObj;
}
///
/// 显示
///
public void LoadPanelDisplayStockCertificateListThree(Button btn)
{
// if (returnRevVoucherAnalyzer.formselection == "2411H00032")
// {
//
// }
// else if (returnRevVoucherAnalyzer.formselection == "2410H03417")
// {
//
// }
//
int index = BtnForms.IndexOf(btn);
PanelDisplayStockCertificateListThree.gameObject.SetActive(true);
PanelFileInformation.gameObject.SetActive(false);
InputMaterialNameDisplayStock.text = "显示 物料凭证 " + InputMaterialCertificates[0].text + " - 杨丽";
InputCertificateDateDisplayStock.text = InputCertificateDates[0].text;
InputPostingDateDisplayStock.text = InputPostingDates[0].text;
InputQuantitieDisplayStock.text = InputQuantities[0].text;
InputMovementTypeDisplayStock.text = InputMovementTypes[0].text;
CreationDateYearMonthDay.text = InputCreationDates[0].text;
HourMinuteSecond.text = InputCreationTimes[0].text;
aaa.SetActive(false);
plane1.SetActive(false);
plane2.SetActive(false);
LoadTriggerNextGuide();
}
}