121 lines
3.3 KiB
C#
121 lines
3.3 KiB
C#
using DefaultNamespace.ProcessMode;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DefaultNamespace;
|
|
using MotionFramework;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using static InterfaceManager;
|
|
using TMPro;
|
|
|
|
/// <summary>
|
|
/// 悬挂物资卡片
|
|
/// </summary>
|
|
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 悬挂物资卡片
|
|
/// </summary>
|
|
public void HangModerController(string btname)
|
|
{
|
|
if (MotionEngine.GetModule<GlobalDataStorage>().ExamName.Contains("领用出库") ||
|
|
MotionEngine.GetModule<GlobalDataStorage>().ExamName.Contains("代保管物资出库"))
|
|
{
|
|
List<string> list = new List<string>();
|
|
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<ProcessManager>().HandleClick(list))
|
|
{
|
|
LoadTriggerNextGuide(btname);
|
|
}
|
|
|
|
btnHang.gameObject.SetActive(false);
|
|
MaterialCenter.Instance.PanelMaterialCard.gameObject.SetActive(false);
|
|
}
|
|
else
|
|
{
|
|
if (MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick(new List<string>
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
} |