⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpieceh.cpp

📁 科思ERP部分源码及控件
💻 CPP
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#include "mPieceh.h"
//---------------------------------------------------------------------------
#pragma hdrstop
#pragma package(smart_init)

TKSPieceh *sdPieceh;
//---------------------------------------------------------------------------
__fastcall TKSPieceh::TKSPieceh()
  :TKSMidBase()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidHeadValues()
{
  //计件单号
      ValidPiecehCode();
  //计件日期
      ValidPiecehDate();
  //财务月份
      ValidPiecehFmonth();
  //车间
      ValidPiecehShop();
  //班组
      ValidPiecehTeam();
  //状态
      ValidPiecehState();
  //操作员
      ValidPiecehUser();
  //审核
      ValidPiecehCheck();
  //审核人
      ValidPiecehChecker();
  //审核日期
      ValidPiecehCheckDate();
  //系统日期
      ValidPiecehSysDate();
  //备注
      ValidPiecehDesc();
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehCode()  //计件单号
{

}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehDate()  //计件日期
{

}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehFmonth()  //财务月份
{
    AnsiString  m_PiecehFmonth;
    AnsiString  b_PiecehFmonth;
    m_PiecehFmonth=GetMasterValue("PiecehFmonth");
    b_PiecehFmonth=GetMasterOldValue("PiecehFmonth");

    if(m_PiecehFmonth.Length()>6)
       throw Exception("财务月份的长度不能大于6!");
    if(m_PiecehFmonth != b_PiecehFmonth)
    {
      Query->Close();
      Query->SQL->Clear();
      Query->SQL->Add("select fcmonth from sdfc where fccurrent=1");
      Query->Open();
      if(Query->RecordCount<=0)
      {
        Query->Close();
        throw Exception("未定义当前财务月份!");
      }
      AnsiString tFcstr=Query->FieldValues["FcMonth"];
      if(m_PiecehFmonth<tFcstr)
      {
        Query->Close();
        throw Exception("财务月份不能小于当前月份!");
      }
       Query->Close();
    }
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehShop()  //车间
{

}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehTeam()  //班组
{

}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehState()  //状态
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehUser()  //操作员
{

}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehCheck()  //审核
{
    int m_PiecehCheck;
    m_PiecehCheck=GetMasterValue("PiecehCheck");
    if(m_PiecehCheck!=0 && m_PiecehCheck!=1)
       throw Exception("审核标识的取值只能是(0-未审核,1-已审核.)");
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehChecker()  //审核人
{
    int m_PiecehCheck;
    AnsiString  m_PiecehChecker;
    AnsiString  b_PiecehChecker;
    m_PiecehCheck=GetMasterValue("PiecehCheck");
    m_PiecehChecker=GetMasterValue("PiecehChecker");
    b_PiecehChecker=GetMasterOldValue("PiecehChecker");
    if(m_PiecehCheck==1)
    {
      if(m_PiecehChecker!=b_PiecehChecker)
      {
         Query->Close();
         Query->SQL->Clear();
         Query->SQL->Add("select ProducterCode from sdProducter Where ProducterCode='"+m_PiecehChecker+"' and ProducterCheck=1");
         Query->Open();
         if(Query->RecordCount<=0)
         {
            Query->Close();
            throw Exception("审核人:'"+m_PiecehChecker+"'未定义,或无审核的权限.");
         }
         Query->Close();
      }
    }
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehCheckDate()  //审核日期
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehSysDate()  //系统日期
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecehDesc()  //备注
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidItemValues()
{
      ValidPiecedCode();
      ValidPiecedEmployee();
      ValidPiecedLine();
      ValidPiecedWo();
      ValidPiecedProcess();
      ValidPiecedQty();
      ValidPiecedPrice();
      ValidPiecedQty1();
      ValidPiecedPrice1();
      ValidPiecedQty2();
      ValidPiecedPrice2();
      ValidPiecedQty3();
      ValidPiecedPrice3();
      ValidPiecedQty4();
      ValidPiecedPrice4();
      ValidPiecedQty5();
      ValidPiecedPrice5();
      ValidPiecedQty6();
      ValidPiecedPrice6();
      ValidPiecedQty7();
      ValidPiecedPrice7();
      ValidPiecedQty8();
      ValidPiecedPrice8();
      ValidPiecedQty9();
      ValidPiecedPrice9();
      ValidPiecedQty10();
      ValidPiecedPrice10();
      ValidPiecedDType();
      ValidPiecedDesc();
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedCode()
{

}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedEmployee()
{

}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedLine()
{
    int m_PiecedLine;
    m_PiecedLine=GetDetailValue("PiecedLine");
    if(m_PiecedLine<=0)
       throw Exception("计件登记单的行号不能小于等于零!");
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedWo()
{
    AnsiString  m_PiecedWo;
    AnsiString  b_PiecedWo;
    m_PiecedWo=GetDetailValue("PiecedWo");
    b_PiecedWo=GetDetailOldValue("PiecedWo");
    if(m_PiecedWo!=b_PiecedWo)
    {
        Query->Close();
        Query->SQL->Clear();
        Query->SQL->Add("Select WoCode from sdWo where WoCheck=1 and WoClose=0 and WoCancel=0 and WoCode='"+m_PiecedWo+"'");
        Query->Open();
        if(Query->RecordCount<=0)
        {
            Query->Close();
            throw Exception("加工单:'"+m_PiecedWo+"'不存在,或已结清,或已作废,或未审核!");
        }
        Query->Close();
    }
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedProcess()
{

}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty()
{
    double m_PiecedQty;
    m_PiecedQty=GetDetailValue("PiecedQty");
    if(m_PiecedQty<=0)
       throw Exception("计件登记单的计件数量不能小于和等于0.");
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice()
{
    double m_PiecedPrice;
    m_PiecedPrice=GetDetailValue("PiecedPrice");
    if(m_PiecedPrice<=0)
       throw Exception("计件登记单的计件单价不能小于和等于0.");
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty1()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice1()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty2()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice2()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty3()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice3()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty4()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice4()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty5()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice5()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty6()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice6()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty7()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice7()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty8()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice8()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty9()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice9()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedQty10()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedPrice10()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedDType()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::ValidPiecedDesc()
{
}
//---------------------------------------------------------------------------
void __fastcall TKSPieceh::CmdExec(AnsiString Param)
{
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -