📄 mqcsh.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "mQcsh.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
TKSQcsh *sdQcsh;
//---------------------------------------------------------------------------
__fastcall TKSQcsh::TKSQcsh()
:TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSQcsh::ValidHeadValues()
{
int m_QcshType;
m_QcshType=GetDetailValue("QcshType");
if(m_QcshType<1 || m_QcshType>3)
throw Exception("质检类型只能是:1-采购收货质检,2-完成品质检,3-工序质检");
int m_QcshCheck;
m_QcshCheck=GetDetailValue("QcshCheck");
if(m_QcshCheck!=0 && m_QcshCheck!=1)
throw Exception("审核标志只能取值0-未审核1-已审");
}
//---------------------------------------------------------------------------
void __fastcall TKSQcsh::ValidItemValues()
{
double m_QcsdDQty;
m_QcsdDQty=GetDetailValue("QcsdDQty");
if(m_QcsdDQty <= 0)
throw Exception("送检数量数量必须大于零");
int m_QcsdLine;
m_QcsdLine=GetDetailValue("QcsdLine");
if(m_QcsdLine<=0)
throw Exception("质检单行号不能小于等于零");
int m_QcsdFLine;
m_QcsdFLine=GetDetailValue("QcsdFLine");
if(m_QcsdFLine<=0)
throw Exception("送检单行号不能小于等于零");
double m_QcsdCQty;
m_QcsdCQty=GetDetailValue("QcsdCQty");
if(m_QcsdCQty < 0)
throw Exception("实检数量数量不能小于零");
if(m_QcsdCQty > m_QcsdDQty)
throw Exception("实检数量数量不能大于送检数量");
double m_QcsdYQty;
m_QcsdYQty=GetDetailValue("QcsdYQty");
if(m_QcsdYQty < 0)
throw Exception("合格数量数量不能小于零");
if(m_QcsdYQty > m_QcsdCQty)
throw Exception("合格数量数量不能大于实检数量");
int m_QcsdMode;
m_QcsdMode=GetDetailValue("QcsdMode");
if(m_QcsdMode < 1 || m_QcsdMode >5)
throw Exception("不合格处理方式只能为:1-退货,2-全检,3-回用,4-换货,5-返工/修");
}
//---------------------------------------------------------------------------
void __fastcall TKSQcsh::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -