mgmth_w.cpp
来自「一个以前收集的基于C/S架构的ERP客户端源代码」· C++ 代码 · 共 287 行
CPP
287 行
//---------------------------------------------------------------------------
#include <vcl.h>
#include "mGmth_W.h"
//---------------------------------------------------------------------------
#pragma hdrstop
#pragma package(smart_init)
TKSGmth_W *sdGmth_W;
//---------------------------------------------------------------------------
__fastcall TKSGmth_W::TKSGmth_W()
:TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidHeadValues()
{
//领料单号
ValidGmthCode();
//财务月份
ValidGmthFmonth();
//领料日期
ValidGmthDate();
//工单号
ValidGmthWoCode();
//领料部门
ValidGmthDept();
//收发存类型
ValidGmthPosType();
//领料类型
ValidGmthType();
//备注
ValidGmthDesc();
//操作员
ValidGmthUser();
//审核标志
ValidGmthCheck();
//审核人
ValidGmthChecker();
//审核日期
ValidGmthCheckDate();
//状态
ValidGmthState();
//系统日期
ValidGmthSysDate();
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthCode() //领料单号
{
AnsiString m_GmthCode;
AnsiString b_GmthCode;
m_GmthCode=GetMasterValue("GmthCode");
b_GmthCode=GetMasterOldValue("GmthCode");
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthFmonth() //财务月份
{
AnsiString m_GmthFmonth;
m_GmthFmonth=GetMasterValue("GmthFmonth");
if(m_GmthFmonth.Length()>6)
throw Exception("财务月份的长度不能大于6!");
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthDate() //领料日期
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthWoCode() //工单号
{
AnsiString m_GmthWoCode;
AnsiString b_GmthWoCode;
m_GmthWoCode=GetMasterValue("GmthWoCode");
b_GmthWoCode=GetMasterOldValue("GmthWoCode");
if(m_GmthWoCode != b_GmthWoCode)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("Select WoCode from sdWo where WoCheck=1 and WoClose=0 and WoCancel=0 and WoCode='"+m_GmthWoCode+"'");
Query->Open();
if(Query->RecordCount==0)
{
Query->Close();
throw Exception("加工单:'"+m_GmthWoCode+"'不存在,或已结清,或已作废,或未审核!");
}
Query->Close();
}
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthDept() //领料部门
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthPosType() //收发存类型
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthType() //领料类型
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthDesc() //备注
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthUser() //操作员
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthCheck() //审核标志
{
int m_GmthCheck;
m_GmthCheck=GetMasterValue("GmthCheck");
if(m_GmthCheck!=0 && m_GmthCheck!=1)
throw Exception("审核标志只能取值(0-未审核,1-已审核)!");
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthChecker() //审核人
{
int m_GmthCheck;
AnsiString m_GmthChecker;
AnsiString b_GmthChecker;
m_GmthCheck=GetMasterValue("GmthCheck");
m_GmthChecker=GetMasterValue("GmthChecker");
b_GmthChecker=GetMasterOldValue("GmthChecker");
if(m_GmthCheck==1)
{
if(m_GmthChecker!=b_GmthChecker)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("select ProducterCode from sdProducter where ProducterCode='"+m_GmthChecker+"' and ProducterCheck=1");
Query->Open();
if(Query->RecordCount<=0)
{
Query->Close();
throw Exception("审核人:'"+m_GmthChecker+"'未定义或无审核的权限!");
}
Query->Close();
}
}
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthCheckDate() //审核日期
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthState() //状态
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmthSysDate() //系统日期
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidItemValues()
{
ValidGmtdCode();
ValidGmtdLine();
ValidGmtdGoods();
ValidGmtdUnit();
ValidGmtdWoCode();
ValidGmtdSLoc();
ValidGmtdProcess();
ValidGmtdDLoc();
ValidGmtdBatch();
ValidGmtdQty();
ValidGmtdDQty();
ValidGmtdDesc();
ValidGmtdOQty();
ValidGmtdIPrice();
ValidGmtdIAmt();
ValidGmtdPQty();
ValidGmtdGQty();
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdCode()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdLine()
{
int m_GmtdLine;
m_GmtdLine=GetDetailValue("GmtdLine");
if(m_GmtdLine<=0)
throw Exception("工单领料表明细的行号不能小于和等于零!");
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdGoods()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdUnit()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdWoCode()
{
AnsiString m_GmtdWoCode;
AnsiString b_GmtdWoCode;
m_GmtdWoCode=GetDetailValue("GmtdWoCode");
b_GmtdWoCode=GetDetailOldValue("GmtdWoCode");
if(m_GmtdWoCode != b_GmtdWoCode)
{
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("Select WoCode from sdWo where WoCheck=1 and WoClose=0 and woCancel=0 and WoCode='"+m_GmtdWoCode+"'");
Query->Open();
if(Query->RecordCount==0)
{
Query->Close();
throw Exception("加工单:'"+m_GmtdWoCode+"'不存在,或已结清,或已作废,或未审核!");
}
Query->Close();
}
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdSLoc()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdProcess()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdDLoc()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdBatch()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdQty()
{
double m_GmtdQty;
m_GmtdQty=GetDetailValue("GmtdQty");
if(m_GmtdQty<0)
throw Exception("领料的数量不能小于零!");
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdDQty()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdDesc()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdOQty()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdIPrice()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdIAmt()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdPQty()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::ValidGmtdGQty()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSGmth_W::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?