///************************************************************************/ /* Copyright (C), 2016-2020, [IT], 保留所有权利; /* 模 块 名:; /* 描 述:; /* /* 版 本:[V]; /* 作 者:[IT]; /* 日 期:[4/26/2016]; /* /* /* 注 意:; /* /* 修改记录:[IT]; /* 修改日期:; /* 修改版本:; /* 修改内容:; /************************************************************************/ #ifndef __DLG_SCAN_BARCODE__ #define __DLG_SCAN_BARCODE__ #include "afxwin.h" #include ".\list\SortListCtrl.h" #pragma once class CEnEdit : public CEdit { DECLARE_DYNAMIC(CEnEdit) public: CEnEdit(); virtual ~CEnEdit(); int m_nLines; CDialog* m_pParent; BOOL m_bLockKbdLayout; protected: virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); DECLARE_MESSAGE_MAP() HKL m_DefaultHKL; HKL m_Save_KbdLayout; HKL GetDefaultKbdLayout(); public: afx_msg void OnEnKillfocus(); afx_msg void OnEnSetfocus(); //afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); }; typedef struct __OrderItems__ { int nIndex; CString strOrder; // 1.订单号; CString strAutoId; // 2.商品autoid; CString strSPId; // 3.商品序列号; CString strSPName; // 4.商品名称; CString strSPLb; // 5.商品类别; CString strBackStatus; // 6.单个商品完成状态; CString strPickupStatus; // 7.单个商品取件状态; CString strShuliang; // 8.商品数量; CString strBackCot; // 9.完成数量; CString strPickupCot; // 10.取件数量; __OrderItems__() { nIndex = -1; strOrder = _T(""); strAutoId = _T(""); strSPId = _T(""); strSPName = _T(""); strSPLb = _T(""); strBackStatus = _T(""); strPickupStatus = _T(""); strShuliang = _T(""); strBackCot = _T(""); strPickupCot = _T(""); } const __OrderItems__& operator=(const __OrderItems__ &others) { if ( &others == this ) return *this; nIndex = others.nIndex; strOrder = others.strOrder; strAutoId = others.strAutoId; strSPId = others.strSPId; strSPName = others.strSPName; strSPLb = others.strSPLb; strBackStatus = others.strBackStatus; strPickupStatus = others.strPickupStatus; strShuliang = others.strShuliang; strBackCot = others.strBackCot; strPickupCot = others.strPickupCot; return *this; } }OrderItems, *pOrderItems; typedef struct __OUTWAREHOUSE__ { int nIndex; CString strOrder; CString strSPLB; CString strSPName; CString strCount; CString strDate; CString strClerk; CString strRemark; __OUTWAREHOUSE__() { nIndex = -1; strOrder = _T(""); strSPLB = _T(""); strSPName = _T(""); strCount = _T(""); strDate = _T(""); strClerk = _T(""); strRemark = _T(""); } const __OUTWAREHOUSE__& operator=(const __OUTWAREHOUSE__& others) { if ( &others == this ) return *this; nIndex = others.nIndex; strOrder = others.strOrder; strSPLB = others.strSPLB; strSPName = others.strSPName; strCount = others.strCount; strDate = others.strDate; strClerk = others.strClerk; strRemark = others.strRemark; return *this; } }OutWarehouse, *pOutWarehouse; typedef struct __WITHIN__ { int nIndex; CString strBarCode; }WithIn, *pWithIn; // CDlgScanBarCode 对话框 class CDlgScanBarCode : public CDialog { DECLARE_DYNAMIC(CDlgScanBarCode) public: CDlgScanBarCode(CWnd* pParent = NULL); // 标准构造函数 virtual ~CDlgScanBarCode(); // 对话框数据 enum { IDD = IDD_DLG_SCANBARCODE }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 DECLARE_MESSAGE_MAP() public: virtual BOOL OnInitDialog(); protected: virtual void OnOK(); public: // 扫描类型; == 0 表示扫描回件; 1== 表示扫描取件; int m_nScanMode; // 条码枪扫描的条形码; CEnEdit m_EtBarCode; // 没有查找到的商品记录; CStringArray m_AryWithOut; // 已存在的商品记录; vector m_vtWithIn; // 订单商品; CArray m_AryOrderItems; // 出库表; CArray m_AryOutWarehouse; // void DealScanBarCode(const int& nlines); // 初始化list; void InitSortList(); // 扫描结果; CSortListCtrl m_ScanResult; protected: virtual void OnCancel(); }; #endif // __DLG_SCAN_BARCODE__