using System;
using System.Collections;
using System.Collections.Generic;
using DefaultNamespace;
using DefaultNamespace.ProcessMode;
using Framework.Manager;
using MotionFramework;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
///
/// 分析全市库存500138347物料号的一二次融合成套柱上断路器总库存
///
public class CityInventoryManager : MonoBehaviour
{
public Button queryButton;
public TMP_InputField factoryInputField;
public TMP_InputField cityInputField;
public GameObject queryPanel1;
public GameObject queryPanel2;
public Button saveButton1;
public Button saveButton2;
private Framework.Dto.InventoryReversalVoucherAnalyzer returnRevVoucherAnalyzer;
private void Start()
{
queryButton.onClick.AddListener(OnQueryButtonClicked);
saveButton1.onClick.AddListener(OnSaveButtonClicked);
saveButton2.onClick.AddListener(OnSaveButtonClicked);
returnRevVoucherAnalyzer = (Framework.Dto.InventoryReversalVoucherAnalyzer)MotionEngine.GetModule().materialTaskObj;
}
private void OnSaveButtonClicked()
{
if (MotionEngine.GetModule().HandleClick("保存"))
{
if (returnRevVoucherAnalyzer.formselection == "库存报表1")
{
FileComponent.DownloadSingleFile("库存物资报表的查询与解读--全市库存表1");
}
else
{
FileComponent.DownloadSingleFile("库存物资报表的查询与解读--全市库存表2");
}
}
}
private void OnQueryButtonClicked()
{
if (MotionEngine.GetModule().HandleClick(new List() { factoryInputField.text, cityInputField.text })){
if (returnRevVoucherAnalyzer.formselection == "库存报表1")
{
queryPanel1.SetActive(true);
}
else if (returnRevVoucherAnalyzer.formselection == "库存报表2")
{
queryPanel2.SetActive(true);
}
TutorialGuideManager.Instance.TriggerNextGuide(queryButton.name);
}
}
}