123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- ///************************************************************************/
- /* 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<WithIn> m_vtWithIn;
- // 订单商品;
- CArray<CStringArray, CStringArray> m_AryOrderItems;
- // 出库表;
- CArray<CStringArray, CStringArray> m_AryOutWarehouse;
- //
- void DealScanBarCode(const int& nlines);
- // 初始化list;
- void InitSortList();
- // 扫描结果;
- CSortListCtrl m_ScanResult;
- protected:
- virtual void OnCancel();
- };
- #endif // __DLG_SCAN_BARCODE__
|