using DefaultNamespace; using DefaultNamespace.ProcessMode; using MotionFramework; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; /// /// 调拨单 /// public class TransferWarehouseTransferOrder : MonoBehaviour { /// /// 申请调入单位 /// [Header("申请调入单位")] public TMP_InputField InApplicantTransferWarehouseTransferOrder; /// /// 调出单位 /// [Header("调出单位")] public TMP_InputField InFromUnitTransferWarehouseTransferOrder; /// /// 调拨单号 /// [Header("调拨单号")] public TMP_InputField InTransferOrderNumberTransferWarehouseTransferOrder; /// /// 调拨日期 /// [Header("调拨日期")] public TMP_InputField InTransferDateTransferWarehouseTransferOrder; /// /// 物料编码 /// [Header("物料编码")] public TMP_InputField InMaterialCodeTransferWarehouseTransferOrder; /// /// 物料描述 /// [Header("物料描述")] public TMP_InputField InMaterialDescriptionTransferWarehouseTransferOrder; /// /// 批次号 /// [Header("批次号")] public TMP_InputField InBatchNumberTransferWarehouseTransferOrder; /// /// 计量单位 /// [Header("计量单位")] public TMP_InputField InMeasurementUnitTransferWarehouseTransferOrder; /// /// 数量 /// [Header("数量")] public TMP_InputField InStockQuantityTransferWarehouseTransferOrder; /// /// 单价 /// [Header("单价")] public TMP_InputField InUnitPriceTransferWarehouseTransferOrder; /// /// 金额 /// [Header("金额")] public TMP_InputField InAmountTransferWarehouseTransferOrder; /// /// 调入库存地 /// [Header("调入库存地")] public TMP_InputField InFromStorageLocationTransferWarehouseTransferOrder; /// /// 调出库存地 /// [Header("调出库存地")] public TMP_InputField InToStorageLocationTransferWarehouseTransferOrder; /// /// 保存按钮 /// [Header("保存按钮")] public Button btnSaveTransferWarehouseTransferOrder; /// /// 保存完毕 /// public TextMeshProUGUI textSaveTransferWarehouseTransferOrder; void Start() { if (btnSaveTransferWarehouseTransferOrder != null) { btnSaveTransferWarehouseTransferOrder.onClick.AddListener(() => { List inputList = new List(); if (MotionFramework.MotionEngine.GetModule().HandleClick(inputList)) { // 保存成功 Debug.Log("保存成功"); btnSaveTransferWarehouseTransferOrder.interactable = false; textSaveTransferWarehouseTransferOrder.gameObject.SetActive(true); } }); } Init(); } /// /// 初始化 /// private void Init() { //CombinedClass combinedClass = GameManager.Instance.combinedClass; //if (combinedClass != null) //{ // InMaterialCodeTransferWarehouseTransferOrder.text = combinedClass.materialCode; // InMaterialDescriptionTransferWarehouseTransferOrder.text = combinedClass.materialName; // InBatchNumberTransferWarehouseTransferOrder.text = combinedClass.BatchNumber; // InMeasurementUnitTransferWarehouseTransferOrder.text = combinedClass.materialUnit; // InStockQuantityTransferWarehouseTransferOrder.text = combinedClass.incomeQuantity; // InUnitPriceTransferWarehouseTransferOrder.text = combinedClass.unitPrice; // InAmountTransferWarehouseTransferOrder.text = (float.Parse(combinedClass.incomeQuantity) * float.Parse(combinedClass.unitPrice)).ToString(); //InBatchNumberTransferWarehouseTransferOrder.text = combinedClass.DeliveryDate; //} InMaterialCodeTransferWarehouseTransferOrder.text = MotionEngine.GetModule().GetTaskBookValueByMapping("物料编码"); InMaterialDescriptionTransferWarehouseTransferOrder.text = MotionEngine.GetModule().GetTaskBookValueByMapping("物料描述"); InStockQuantityTransferWarehouseTransferOrder.text = GameManager.Instance.marteialnumber.ToString(); InUnitPriceTransferWarehouseTransferOrder.text = GameManager.Instance.pice; InAmountTransferWarehouseTransferOrder.text= (GameManager.Instance.marteialnumber*float.Parse(GameManager.Instance.pice)).ToString(); //InActualArrivalQuantityWarehouseWarrant.text = MotionEngine.GetModule().GetTaskBookValueByMapping("收入数量"); //InUnitPriceWarehouseWarrant.text = combinedClass.unitPrice; //InTotalPriceWarehouseWarrant.text = (float.Parse(combinedClass.incomeQuantity) * float.Parse(combinedClass.unitPrice)).ToString(); //InStockLocationCodeWarehouseWarrant.text = MotionEngine.GetModule().GetTaskBookValueByMapping(""); InBatchNumberTransferWarehouseTransferOrder.text = MotionEngine.GetModule().GetTaskBookValueByMapping("批次"); } }