Browse Source

Task #929 批量插入子/后项,清单可输入“图(册)号”

MaiXinRong 9 years ago
parent
commit
9c3adac13a
2 changed files with 9 additions and 2 deletions
  1. 1 0
      Forms/BatchInsertBillsFrm.dfm
  2. 8 2
      Forms/BatchInsertBillsFrm.pas

+ 1 - 0
Forms/BatchInsertBillsFrm.dfm

@@ -149,6 +149,7 @@ object BatchInsertBillsForm: TBatchInsertBillsForm
           Width = 475
           Height = 105
           OptionsEx = []
+          ColCount = 6
           RowCount = 7
           ShowGridLine = False
           DefaultColWidth = 50

+ 8 - 2
Forms/BatchInsertBillsFrm.pas

@@ -249,6 +249,7 @@ begin
     ValueByName('Units').AsString := zgBills.Cells[3, ARow].Text;
     ValueByName('Price').AsFloat := StrToFloatDef(zgBills.Cells[4, ARow].Text, 0);
     ValueByName('OrgQuantity').AsFloat := StrToFloatDef(zgPosition.Cells[ARow + 1, AQtyRow].Text, 0);
+    ValueByName('DrawingCode').AsString := zgBills.Cells[5, ARow].Text;
   end;
 end;
 
@@ -264,6 +265,8 @@ begin
   zgBills.ColWidths[3] := 60;
   zgBills.Cells[4, 0].Text := 'µ¥¼Û';
   zgBills.ColWidths[4] := 60;
+  zgBills.Cells[5, 0].Text := 'ͼ(²á)ºÅ';
+  zgBills.ColWidths[5] := 60;
   for iRow := 1 to zgBills.RowCount - 1 do
     zgBills.Cells[0, iRow].Text := 'Çåµ¥' + IntToStr(iRow);
 end;
@@ -337,10 +340,11 @@ begin
       zgBills.Cells[2, Row].Text := Rec.ValueByName('Name').AsString;
       zgBills.Cells[2, Row].Align := gaCenterLeft;
       zgBills.Cells[3, Row].Text := Rec.ValueByName('Units').AsString;
-      zgBills.Cells[3, Row].Align := gaCenterLeft;
+      zgBills.Cells[3, Row].Align := gaCenterCenter;
       zgBills.Cells[3, Row].Font.Name := 'smartSimSun';
       zgBills.Cells[4, Row].Text := Rec.ValueByName('Price').AsString;
       zgBills.Cells[4, Row].Align := gaCenterRight;
+      zgBills.Cells[5, Row].Align := gaCenterLeft;
     end;
   end
   else if (Col = 4) and (Row > 0) then
@@ -348,7 +352,9 @@ begin
     zgBills.Cells[Col, Row].Value := PriceRoundTo(
         StrToFloatDef(zgBills.Cells[Col, Row].Text, 0));
     zgBills.Cells[Col, Row].Align := gaCenterRight;
-  end;
+  end
+  else if (Col = 5) and (Row > 0) then
+    zgBills.Cells[Col, Row].Align := gaCenterLeft;
 end;
 
 procedure TBatchInsertBillsForm.zgDealBillsMouseDown(Sender: TObject;