211 lines
6.3 KiB
C#
211 lines
6.3 KiB
C#
using DefaultNamespace.ProcessMode;
|
|
using MotionFramework;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using static InterfaceManager;
|
|
public class ELP_TransportationTaskManagement : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 采购订单号
|
|
/// </summary>
|
|
public TMP_InputField PurchaseOrderNumber;
|
|
/// <summary>
|
|
/// 合同编号
|
|
/// </summary>
|
|
public TMP_InputField ContractNumber;
|
|
/// <summary>
|
|
/// 合同名称
|
|
/// </summary>
|
|
public TMP_InputField ContractName;
|
|
/// <summary>
|
|
/// 项目名称toggle
|
|
/// </summary>
|
|
public Toggle ProjectNametog;
|
|
/// <summary>
|
|
/// 项目名称
|
|
/// </summary>
|
|
public TMP_Text ProjectNamebt;
|
|
/// <summary>
|
|
/// 查询后的项目名称
|
|
/// </summary>
|
|
public TMP_Text ProjectNameInternal;
|
|
/// <summary>
|
|
/// 供应商toggle
|
|
/// </summary>
|
|
public Toggle Suppliertog;
|
|
/// <summary>
|
|
/// 供应商名称
|
|
/// </summary>
|
|
public TMP_Text Supplierbt;
|
|
/// <summary>
|
|
/// 查询后的供应商名称
|
|
/// </summary>
|
|
public TMP_Text SupplierInternal;
|
|
/// <summary>
|
|
/// 承运商toggle
|
|
/// </summary>
|
|
public Toggle Carrierstog;
|
|
/// <summary>
|
|
/// 承运商名称
|
|
/// </summary>
|
|
public TMP_Text Carriersbt;
|
|
/// <summary>
|
|
/// 承运商名称
|
|
/// </summary>
|
|
public TMP_Text CarriersInternal;
|
|
/// <summary>
|
|
/// 需求单位toggle
|
|
/// </summary>
|
|
public Toggle Demandsectortog;
|
|
/// <summary>
|
|
/// 需求单位名称
|
|
/// </summary>
|
|
public TMP_Text Demandsectorbt;
|
|
/// <summary>
|
|
/// 查询后的需求单位名称
|
|
/// </summary>
|
|
public TMP_Text DemandsectorInternal;
|
|
/// <summary>
|
|
/// 发货时间
|
|
/// </summary>
|
|
public TMP_InputField StartTime;
|
|
/// <summary>
|
|
/// 到货时间
|
|
/// </summary>
|
|
public TMP_InputField EndTime;
|
|
/// <summary>
|
|
/// 项目类别
|
|
/// </summary>
|
|
public TMP_Dropdown Projectcategory;
|
|
/// <summary>
|
|
/// 项目类别下拉框
|
|
/// </summary>
|
|
public TMP_Dropdown Projectcategorydrop;
|
|
/// <summary>
|
|
/// 运输方式下拉框
|
|
/// </summary>
|
|
public TMP_Dropdown Shippingmethoddrop;
|
|
/// <summary>
|
|
/// 发货地址选择
|
|
/// </summary>
|
|
public Toggle Shippingaddresstog;
|
|
/// <summary>
|
|
/// 确认发货选择地址
|
|
/// </summary>
|
|
public Button Shippingaddressbt;
|
|
/// <summary>
|
|
/// 发货地址信息
|
|
/// </summary>
|
|
public GameObject ShippingaddressPanel;
|
|
/// <summary>
|
|
/// 收货货地址选择
|
|
/// </summary>
|
|
public Toggle Receivingaddresstog;
|
|
/// <summary>
|
|
/// 确认收货选择地址
|
|
/// </summary>
|
|
public Button Receivingaddressbt;
|
|
/// <summary>
|
|
/// 收货地址信息
|
|
/// </summary>
|
|
public GameObject ReceivingaddressPanel;
|
|
/// <summary>
|
|
/// 物资描述选择
|
|
/// </summary>
|
|
public Toggle materialtog;
|
|
/// <summary>
|
|
/// 确认物资描述
|
|
/// </summary>
|
|
public Button materialbt;
|
|
/// <summary>
|
|
/// 物资描述信息面板
|
|
/// </summary>
|
|
public GameObject materialPanel;
|
|
/// <summary>
|
|
/// 确认新增物资
|
|
/// </summary>
|
|
public Button materialAddbt;
|
|
/// <summary>
|
|
/// 确认物资描述信息面板
|
|
/// </summary>
|
|
public GameObject materialAddPanel;
|
|
/// <summary>
|
|
/// 下一步按钮
|
|
/// </summary>
|
|
public Button NextBt;
|
|
/// <summary>
|
|
/// 页面6预报警按钮
|
|
/// </summary>
|
|
public Button ErrorBT;
|
|
/// <summary>
|
|
///页面7到货交接
|
|
/// </summary>
|
|
public Button ArrivalBT;
|
|
private void Awake()
|
|
{
|
|
ErrorBT = FindObjectByName<Button>("页面6预报警");
|
|
ArrivalBT = FindObjectByName<Button>("页面7到货交接");
|
|
}
|
|
void Start()
|
|
{
|
|
Shippingaddressbt.onClick.AddListener(() =>
|
|
{
|
|
ShippingaddressPanel.SetActive(Shippingaddresstog.isOn);
|
|
});
|
|
Receivingaddressbt.onClick.AddListener(() =>
|
|
{
|
|
ReceivingaddressPanel.SetActive(Receivingaddresstog.isOn);
|
|
});
|
|
materialbt.onClick.AddListener(() => { materialPanel.SetActive(materialtog.isOn); });
|
|
|
|
materialAddbt.onClick.AddListener(() => { materialAddPanel.SetActive(true); });
|
|
NextBt.onClick.AddListener(() =>
|
|
{
|
|
//MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick(new List<string>() { PurchaseOrderNumber.text, ContractNumber.text,
|
|
// ContractName.text,ProjectNamebt.text, Supplierbt.text,Carriersbt.text,Projectcategory.captionText.text,
|
|
// Demandsectorbt.text,Shippingmethoddrop.captionText.text, ShippingaddressPanel.activeInHierarchy.ToString().ToLower(),ReceivingaddressPanel.activeInHierarchy.ToString().ToLower(),
|
|
// materialAddPanel.activeInHierarchy.ToString().ToLower()
|
|
//});
|
|
MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick(new List<string>() { PurchaseOrderNumber.text, ContractNumber.text,
|
|
ContractName.text,ProjectNamebt.text, Supplierbt.text,Carriersbt.text,Projectcategory.captionText.text,
|
|
Demandsectorbt.text,Shippingmethoddrop.captionText.text, ShippingaddressPanel.activeInHierarchy ? "保定天威保变电气股份有限公司" : "false",ReceivingaddressPanel.activeInHierarchy ? "江苏省盐城市建湖县" : "false",
|
|
materialAddPanel.activeInHierarchy.ToString().ToLower()
|
|
});
|
|
});
|
|
|
|
|
|
// ErrorBT.onClick.AddListener(() =>
|
|
// {
|
|
// MotionEngine.GetModule<ProcessManager>().HandleClick("true");
|
|
// });
|
|
// ArrivalBT.onClick.AddListener(() =>
|
|
// {
|
|
// MotionEngine.GetModule<ProcessManager>().HandleClick("true");
|
|
// });
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if (ProjectNametog.isOn)
|
|
{
|
|
ProjectNamebt.text = ProjectNameInternal.text;
|
|
}
|
|
if (Suppliertog.isOn)
|
|
{
|
|
Supplierbt.text = SupplierInternal.text;
|
|
}
|
|
if (Demandsectortog.isOn)
|
|
{
|
|
Demandsectorbt.text = DemandsectorInternal.text;
|
|
}
|
|
if (Carrierstog.isOn)
|
|
{
|
|
Carriersbt.text = CarriersInternal.text;
|
|
}
|
|
}
|
|
}
|