using DefaultNamespace.ProcessMode;
using System.Collections;
using System.Collections.Generic;
using DefaultNamespace;
using MotionFramework;
using UnityEngine;
using UnityEngine.UI;
using static InterfaceManager;
using TMPro;
///
/// 悬挂物资卡片
///
public class MaterialCard : MonoBehaviour
{
//物料编码
public InputField inputCode;
//物料描述
public Dropdown dropdownDesc;
//期初库存数量
public InputField inputInitStock;
//批次号
public InputField inputBatch;
//收入数量
public InputField inputIncome;
//发出数量
public InputField inputIssue;
//结存数量
public InputField inputStock;
//日
public InputField inputDay;
//月
public InputField inputMonth;
//供应商
public InputField Stroe;
//悬挂
public Button btnHang;
public TextMeshProUGUI Unit;
// Start is called before the first frame update
void Start()
{
btnHang.onClick.AddListener(() =>
{
inputCode.readOnly = true;
dropdownDesc.interactable = false;
inputMonth.readOnly = true;
inputDay.readOnly = true;
inputBatch.readOnly = true;
inputInitStock.readOnly = true;
inputIncome.readOnly = true;
inputIssue.readOnly = true;
inputStock.readOnly = true;
Stroe.readOnly = true;
});
Unit.text = GameManager.Instance.unit;
}
///
/// 悬挂物资卡片
///
public void HangModerController(string btname)
{
if (MotionEngine.GetModule().ExamName.Contains("领用出库") ||
MotionEngine.GetModule().ExamName.Contains("代保管物资出库"))
{
List list = new List();
list.Add(inputCode.text);
list.Add(dropdownDesc.options[dropdownDesc.value].text);
list.Add(inputMonth.text);
list.Add(inputDay.text);
list.Add(inputBatch.text);
list.Add(inputInitStock.text);
list.Add(inputIncome.text);
list.Add(inputIssue.text);
list.Add(inputStock.text);
if (MotionEngine.GetModule().HandleClick(list))
{
LoadTriggerNextGuide(btname);
}
btnHang.gameObject.SetActive(false);
MaterialCenter.Instance.PanelMaterialCard.gameObject.SetActive(false);
}
else
{
if (MotionFramework.MotionEngine.GetModule().HandleClick(new List
{
inputCode.text,
dropdownDesc.options[dropdownDesc.value].text,
inputInitStock.text,
inputBatch.text,
inputIncome.text,
inputIssue.text,
inputStock.text,
Stroe.text,
inputMonth.text,
inputDay.text
}))
{
//, inputDay.text, inputMonth.text
LoadTriggerNextGuide(btname);
}
btnHang.gameObject.SetActive(false);
MaterialCenter.Instance.PanelMaterialCard.gameObject.SetActive(false);
}
}
}