if StrToFloat(mcEdit.Text)>300 then
    begin
      if not MainForm.PshowMessage('提示','你输入数据太大,可能有误,确定吗?',1) then
      begin
        DataCheck := false;
        mcEdit.SelectAll;
      end;
    end;
    if DataCheck then
    begin
      if (MzEdit.Text <>'') and (KcEdit.Text<>'') then
      begin
        DataInputStringGrid.Cells[3,i] :=FloatToStr(StrToFloat(mcEdit.text) * StrToFloat(MzEdit.text));
        DataInputStringGrid.Cells[2,i] :=FloatToStr(StrToFloat(mcEdit.text) * StrToFloat(MzEdit.text)-StrToFloat(KcEdit.text));
        DataInputStringGrid.Cells[3,i] :=Format('%8.1f',[StrToFloat(DataInputStringGrid.Cells[3,i])]);
        DataInputStringGrid.Cells[2,i] :=Format('%8.1f',[StrToFloat(DataInputStringGrid.Cells[2,i])]);
        DataInputStringGrid.Cells[1,i] :=mcEdit.Text;
        mcEdit.SelectAll;
      end else
        MainForm.PshowMessage('提示','一定要输入码重与扣除,不能为空,即使为0也要输入!',0);
    end;
  end;
end;
procedure TInputForm.CfNoteEditKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key=VK_F3 then
  begin    //修改调出的库存成份
    if CfNoteEdit.text<>'' then
    begin
      CfnrEdit.text := CfnrEdit.text+CfNoteEdit.Text+'% '+CfComboBox.Text+'  ';
      CfComboBox.SetFocus;
    end else
      KhpmEdit.SetFocus;
  end;
end;
procedure TInputForm.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if (ssCtrl in Shift) and (Key=Word('I')) then
    InputSpeedButtonClick(nil);
end;
procedure TInputForm.SaveSpeedButtonClick(Sender: TObject);
var CheckData :boolean;
    ErrorMess :string;
    SaveClient :integer;
begin
  CheckData := true;
  ErrorMess := InputCheckData;
  if ErrorMess <>'' then
  begin
    MainForm.PshowMessage('提示',ErrorMess,0);
    CheckData := false;
  end;
  if CheckData then
  begin  //保存数据
    try
      //保存主表数据
      MDataForm.DataADOConnection.BeginTrans;
      with MDataForm.InputMasterADOQuery do
      begin
        Close;
        SQL.Clear;
        SQL.Add('Inse


