111 lines
3.4 KiB
C#
111 lines
3.4 KiB
C#
using DefaultNamespace;
|
|
using DefaultNamespace.ProcessMode;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using static InterfaceManager;
|
|
|
|
/// <summary>
|
|
/// 库存物资查询报表
|
|
/// </summary>
|
|
public class ERP_InventoryInquiryReport : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 查询按钮
|
|
/// </summary>
|
|
[SerializeField] private Button Inquire;
|
|
|
|
/// <summary>
|
|
/// 工厂代码输入框
|
|
/// </summary>
|
|
[SerializeField] private InputField Factorycode;
|
|
|
|
/// <summary>
|
|
/// 物资编码输入框
|
|
/// </summary>
|
|
[SerializeField] private InputField itemcod;
|
|
|
|
/// <summary>
|
|
/// 选项清单
|
|
/// </summary>
|
|
[SerializeField] private Button Listofoptions;
|
|
|
|
/// <summary>
|
|
/// 电子表格按钮
|
|
/// </summary>
|
|
[SerializeField] private Button Spreadsheet;
|
|
|
|
/// <summary>
|
|
/// 导出按钮
|
|
/// </summary>
|
|
[SerializeField] private Button Export;
|
|
|
|
/// <summary>
|
|
/// 导出保存
|
|
/// </summary>
|
|
[SerializeField] private Button Exporttosave;
|
|
|
|
/// <summary>
|
|
/// Excel表格下载按钮
|
|
/// </summary>
|
|
[SerializeField] private Button Excel;
|
|
|
|
/// <summary>
|
|
/// Excel表格上传按钮
|
|
/// </summary>
|
|
[SerializeField] private Button UploadExcel;
|
|
|
|
/// <summary>
|
|
/// 答题卡页面
|
|
/// </summary>
|
|
[SerializeField] private GameObject Answersheets;
|
|
|
|
private void Awake()
|
|
{
|
|
Inquire = FindObjectByName<Button>("Button-查询");
|
|
Factorycode = FindObjectByName<InputField>("工厂代码");
|
|
itemcod = FindObjectByName<InputField>("InputField-物料号码");
|
|
Exporttosave = FindObjectByName<Button>("Button-保存");
|
|
Excel = FindObjectByName<Button>("BtnExcel");
|
|
UploadExcel = FindObjectByName<Button>("btn_Upload");
|
|
Listofoptions = FindObjectByName<Button>("Button-选项清单");
|
|
Export = FindObjectByName<Button>("Button-导出");
|
|
Spreadsheet = FindObjectByName<Button>("Button-电子表格");
|
|
//Answersheets = Resources.Load<GameObject>("Prefabs/配送专业/答题卡/电缆分支箱跨地市物资调配答题卡");
|
|
}
|
|
|
|
void Start()
|
|
{
|
|
Inquire.onClick.AddListener(() => { StartCoroutine(Querythereport()); });
|
|
Listofoptions.onClick.AddListener(() => { LoadTriggerNextGuide(); });
|
|
Export.onClick.AddListener(() => { LoadTriggerNextGuide(); });
|
|
Spreadsheet.onClick.AddListener(() => { LoadTriggerNextGuide(); });
|
|
Exporttosave.onClick.AddListener(() =>
|
|
{
|
|
LoadTriggerNextGuide();
|
|
LoadTriggerNextGuide("关闭");
|
|
Answersheets.gameObject.SetActive(true);
|
|
// GameObject go = Instantiate(Answersheets, Listofoptions.transform.parent);
|
|
// go.SetActive(true);
|
|
FileComponent.DownloadSingleFile("500028508全省库存.XLSX");
|
|
// FileComponent.DownloadSingleFile("物资利用计划.XLSX");
|
|
});
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询报表
|
|
/// </summary>
|
|
private IEnumerator Querythereport()
|
|
{
|
|
List<string> Querylist = new List<string>();
|
|
yield return new WaitForSeconds(0.5f);
|
|
Querylist.Add(itemcod.text);
|
|
Querylist.Add(Factorycode.text);
|
|
if (MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick(Querylist))
|
|
{
|
|
LoadTriggerNextGuide();
|
|
// Debug.Log("答案是否正确:" + isMatch);
|
|
}
|
|
}
|
|
} |