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