195 lines
6.9 KiB
C#
195 lines
6.9 KiB
C#
using DefaultNamespace;
|
|
using DefaultNamespace.ProcessMode;
|
|
using MotionFramework;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using static InterfaceManager;
|
|
/// <summary>
|
|
/// 入库单
|
|
/// </summary>
|
|
public class WarehouseReceipt : DocumentScript
|
|
{
|
|
public static WarehouseReceipt Instance;
|
|
|
|
|
|
#region UI
|
|
/// <summary>
|
|
/// 入库类型
|
|
/// </summary>
|
|
[Header("入库类型")]
|
|
public TMP_InputField InInTypeWarehouseWarrant;
|
|
/// <summary>
|
|
/// 公司代码/名称
|
|
/// </summary>
|
|
[Header("公司代码/名称")]
|
|
public TMP_InputField InCompanyCodeNameWarehouseWarrant;
|
|
/// <summary>
|
|
/// 工厂代码/工厂名称
|
|
/// </summary>
|
|
[Header("工厂代码/工厂名称")]
|
|
public TMP_InputField InFactoryCodeNameWarehouseWarrant;
|
|
/// <summary>
|
|
/// 移动类型代码/移动类型名称
|
|
/// </summary>
|
|
[Header("移动类型代码/移动类型名称")]
|
|
public TMP_InputField InTransportationTypeCodeNameWarehouseWarrant;
|
|
/// <summary>
|
|
/// 供应商编码/供应商名称
|
|
/// </summary>
|
|
[Header("供应商编码/供应商名称")]
|
|
public TMP_InputField InSupplierCodeNameWarehouseWarrant;
|
|
/// <summary>
|
|
/// 订单号
|
|
/// </summary>
|
|
[Header("订单号")]
|
|
public TMP_InputField InOrderNumberWarehouseWarrant;
|
|
/// <summary>
|
|
/// 凭证输入日期
|
|
/// </summary>
|
|
[Header("凭证输入日期")]
|
|
public TMP_InputField InVoucherInputDateWarehouseWarrant;
|
|
/// <summary>
|
|
/// 合同编号
|
|
/// </summary>
|
|
[Header("合同编号")]
|
|
public TMP_InputField InContractNumberWarehouseWarrant;
|
|
/// <summary>
|
|
/// 物料凭证
|
|
/// </summary>
|
|
[Header("物料凭证")]
|
|
public TMP_InputField InMaterialVoucherWarehouseWarrant;
|
|
/// <summary>
|
|
/// 物料编码
|
|
/// </summary>
|
|
[Header("物料编码")]
|
|
public TMP_InputField InMaterialCodeWarehouseWarrant;
|
|
/// <summary>
|
|
/// 物料描述
|
|
/// </summary>
|
|
[Header("物料描述")]
|
|
public TMP_InputField InMaterialDescriptionWarehouseWarrant;
|
|
/// <summary>
|
|
/// 计量单位
|
|
/// </summary>
|
|
[Header("计量单位")]
|
|
public TMP_InputField InMeasurementUnitWarehouseWarrant;
|
|
/// <summary>
|
|
/// 订单数量
|
|
/// </summary>
|
|
[Header("订单数量")]
|
|
public TMP_InputField InStockQuantityWarehouseWarrant;
|
|
/// <summary>
|
|
/// 实际到货数量
|
|
/// </summary>
|
|
[Header("实际到货数量")]
|
|
public TMP_InputField InActualArrivalQuantityWarehouseWarrant;
|
|
/// <summary>
|
|
/// 单价
|
|
/// </summary>
|
|
[Header("单价")]
|
|
public TMP_InputField InUnitPriceWarehouseWarrant;
|
|
/// <summary>
|
|
/// 总价
|
|
/// </summary>
|
|
[Header("总价")]
|
|
public TMP_InputField InTotalPriceWarehouseWarrant;
|
|
/// <summary>
|
|
/// 库存地点代码
|
|
/// </summary>
|
|
[Header("库存地点代码")]
|
|
public TMP_InputField InStockLocationCodeWarehouseWarrant;
|
|
/// <summary>
|
|
/// 批次号
|
|
/// </summary>
|
|
[Header("批次号")]
|
|
public TMP_InputField InBatchNumberWarehouseWarrant;
|
|
/// <summary>
|
|
/// 打印日期
|
|
/// </summary>
|
|
[Header("打印日期")]
|
|
public TMP_InputField InPrintDateWarehouseWarrant;
|
|
/// <summary>
|
|
/// 库管员
|
|
/// </summary>
|
|
[Header("库管员")]
|
|
public TMP_InputField InStockKeeperWarehouseWarrant;
|
|
/// <summary>
|
|
/// 仓库主管
|
|
/// </summary>
|
|
[Header("仓库主管")]
|
|
public TMP_InputField InWarehouseManagerWarehouseWarrant;
|
|
/// <summary>
|
|
/// 保存按钮
|
|
/// </summary>
|
|
[Header("保存按钮")]
|
|
public Button btnSaveWarehouseWarrant;
|
|
/// <summary>
|
|
/// 保存完毕
|
|
/// </summary>
|
|
public TextMeshProUGUI textSaveWarehouseWarrant;
|
|
|
|
#endregion
|
|
|
|
private void Awake()
|
|
{
|
|
Instance = this;
|
|
}
|
|
|
|
void Start()
|
|
{
|
|
if(btnSaveWarehouseWarrant!= null)
|
|
{
|
|
btnSaveWarehouseWarrant.onClick.AddListener(() =>
|
|
{
|
|
List<string> inputList = new List<string>();
|
|
inputList.Add(InStockKeeperWarehouseWarrant.text);
|
|
inputList.Add(InWarehouseManagerWarehouseWarrant.text);
|
|
if(MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick(inputList)){
|
|
|
|
// 保存成功
|
|
Debug.Log("保存成功");
|
|
btnSaveWarehouseWarrant.interactable = false;
|
|
textSaveWarehouseWarrant.gameObject.SetActive(true);
|
|
LoadTriggerNextGuide();
|
|
}
|
|
});
|
|
}
|
|
Init();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 初始化
|
|
/// </summary>
|
|
private void Init()
|
|
{
|
|
CombinedClass combinedClass = GameManager.Instance.combinedClass;
|
|
if (combinedClass != null)
|
|
{
|
|
InInTypeWarehouseWarrant.text = combinedClass.storageType;
|
|
InFactoryCodeNameWarehouseWarrant.text = combinedClass.FactoryCode + "/"
|
|
+ combinedClass.FactoryName;
|
|
InTransportationTypeCodeNameWarehouseWarrant.text = combinedClass.TransportationTypeCode + " "
|
|
+ combinedClass.TransportationTypeName;
|
|
//InSupplierCodeNameWarehouseWarrant.text = combinedClass.SupplierCode
|
|
//+ combinedClass.SupplierName;
|
|
InSupplierCodeNameWarehouseWarrant.text = ModerController.Instance.checkGoods[0].Manufacturer.text;
|
|
InOrderNumberWarehouseWarrant.text = combinedClass.OrderNumber;
|
|
InVoucherInputDateWarehouseWarrant.text = combinedClass.DeliveryDate;
|
|
InContractNumberWarehouseWarrant.text = combinedClass.ContractNumber;
|
|
InMaterialVoucherWarehouseWarrant.text = combinedClass.materialVoucherCreator;
|
|
InMaterialCodeWarehouseWarrant.text = MotionEngine.GetModule<GlobalDataStorage>().GetTaskBookValueByMapping("物料编码");
|
|
InMaterialDescriptionWarehouseWarrant.text = MotionEngine.GetModule<GlobalDataStorage>().GetTaskBookValueByMapping("物料描述");
|
|
InMeasurementUnitWarehouseWarrant.text = GameManager.Instance.unit;
|
|
InStockQuantityWarehouseWarrant.text = GameManager.Instance.marteialnumber.ToString();
|
|
InActualArrivalQuantityWarehouseWarrant.text = GameManager.Instance.marteialnumber.ToString();
|
|
InUnitPriceWarehouseWarrant.text = GameManager.Instance.pice;
|
|
InTotalPriceWarehouseWarrant.text = (float.Parse(GameManager.Instance.marteialnumber.ToString()) * float.Parse(GameManager.Instance.pice)).ToString();
|
|
InStockLocationCodeWarehouseWarrant.text = "HDA1";
|
|
InBatchNumberWarehouseWarrant.text = MotionEngine.GetModule<GlobalDataStorage>().GetTaskBookValueByMapping("批次");
|
|
InPrintDateWarehouseWarrant.text = "2025.03.04";
|
|
}
|
|
}
|
|
}
|