~
This commit is contained in:
parent
08850ca60a
commit
6369e4d72d
|
|
@ -163,16 +163,17 @@ procedure TfrmYSYGGJList.InitGrid();
|
|||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Clear;
|
||||
Filtered := False;
|
||||
sql.Add('select A.*,B.PRTCodeName,B.prtcode,B.PRTColor,B.SOrddefstr5,');
|
||||
sql.Add('gxdj=case when A.qty<=30 then isnull((select (A.GxPrice)*2 from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
||||
SQL.Add('else isnull((A.GxPrice ),0) end, ');
|
||||
sql.Add('gxmoney=case when A.qty<=30 then isnull((select ((A.GxPrice)*2)*B.qty from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
||||
SQL.Add(' else isnull(((A.GxPrice)*qty ),0) end ');
|
||||
sql.Add(' isnull((A.GxPrice ),0) as gxdj ,isnull(((A.GxPrice)*qty ),0) as gxmoney ');
|
||||
// sql.Add('gxdj=case when A.qty<=30 then isnull((select (A.GxPrice)*2 from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
||||
// SQL.Add('else isnull((A.GxPrice ),0) end, ');
|
||||
// sql.Add('gxmoney=case when A.qty<=30 then isnull((select ((A.GxPrice)*2)*B.qty from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
||||
// SQL.Add(' else isnull(((A.GxPrice)*qty ),0) end ');
|
||||
sql.Add('from JyOrder_Yield A ');
|
||||
sql.Add('left join JYOrder_Sub B on A.mainid=B.mainid and A.subid=B.subid');
|
||||
sql.Add('where A.filltime>=''' + FormatDateTime('yyyy-MM-dd', begdate.DateTime) + ''' ');
|
||||
|
|
@ -180,6 +181,7 @@ begin
|
|||
if cxTabControl1.TabIndex < 2 then
|
||||
sql.Add(' and isnull(A.status,0)=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||
// Sql.add('group by convert(char(10),A.FillTime,120),A.Filler,A.mainID,A.MjTypeOther,C.OrderNo,D.PRTCodeName,C.conNo,C.CustomerNoName,D.PrtColor');
|
||||
// ShowMessage(sql.text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
|
|
@ -499,7 +501,7 @@ begin
|
|||
sql.Add(',getdate() ');
|
||||
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||
sql.Add(',' + quotedstr(trim('员工工价')));
|
||||
sql.Add(',' + quotedstr(trim('修改前→条码:' + trim(CDS_Main.fieldbyname('CLID').AsString) + ',单价 ' + trim(CDS_Main.fieldbyname('GXPrice').AsString) + ',数量 '+ trim(CDS_Main.fieldbyname('QTY').AsString) + '修改后:' + ',单价 ' + trim(Edit_GXPrice.Text) + ',数量 ' + trim(Edit_QTY.text))));
|
||||
sql.Add(',' + quotedstr(trim('修改前→条码:' + trim(CDS_Main.fieldbyname('CLID').AsString) + ',单价 ' + trim(CDS_Main.fieldbyname('GXPrice').AsString) + ',数量 ' + trim(CDS_Main.fieldbyname('QTY').AsString) + '修改后:' + ',单价 ' + trim(Edit_GXPrice.Text) + ',数量 ' + trim(Edit_QTY.text))));
|
||||
sql.Add(',' + quotedstr(trim('成功')));
|
||||
sql.Add(')');
|
||||
if CheckBox4.Checked then
|
||||
|
|
@ -526,15 +528,15 @@ begin
|
|||
end;
|
||||
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('操作成功!', '提示', 0);
|
||||
Panel2.Visible := false;
|
||||
Edit_GXPrice.Text := '';
|
||||
Edit_QTY.Text := '';
|
||||
CheckBox4.Checked:=false;
|
||||
CheckBox5.Checked:=false;
|
||||
CheckBox4.Checked := false;
|
||||
CheckBox5.Checked := false;
|
||||
Exit;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user