产品 检验 仓库
This commit is contained in:
parent
19428ae1a1
commit
fcee01d7fa
|
|
@ -477,6 +477,22 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1C_LongitudeBatchShort: TcxGridDBColumn
|
||||
Caption = #32463#32433#25209#21495#31616#31216
|
||||
DataBinding.FieldName = 'c_longitude_batch_short'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1C_LatitudeBatchShort: TcxGridDBColumn
|
||||
Caption = #32428#32433#25209#21495#31616#31216
|
||||
DataBinding.FieldName = 'c_latitude_batch_short'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #31576#21495
|
||||
DataBinding.FieldName = 'C_ReedNo'
|
||||
|
|
|
|||
|
|
@ -139,6 +139,8 @@ type
|
|||
tbPause: TToolButton;
|
||||
Tv1C_LongitudeBatchNo: TcxGridDBColumn;
|
||||
Tv1C_LatitudeBatchNo: TcxGridDBColumn;
|
||||
Tv1C_LongitudeBatchShort: TcxGridDBColumn;
|
||||
Tv1C_LatitudeBatchShort: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
|
|||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 360
|
||||
Top = 122
|
||||
Left = 353
|
||||
Top = 154
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #22836' '#32441#65306
|
||||
|
|
@ -201,8 +201,8 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
|
|||
Visible = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 29
|
||||
Top = 122
|
||||
Left = 27
|
||||
Top = 154
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #31576' '#21495#65306
|
||||
|
|
@ -320,6 +320,32 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
|
|||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label77: TLabel
|
||||
Left = 3
|
||||
Top = 122
|
||||
Width = 91
|
||||
Height = 12
|
||||
Caption = #32463#32433#25209#21495#31616#31216#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label78: TLabel
|
||||
Left = 335
|
||||
Top = 122
|
||||
Width = 91
|
||||
Height = 12
|
||||
Caption = #32428#32433#25209#21495#31616#31216#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label17: TLabel
|
||||
Left = 1296
|
||||
Top = 40
|
||||
|
|
@ -462,7 +488,7 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
|
|||
object C_YarnQty: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 120
|
||||
Top = 150
|
||||
Width = 234
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
|
|
@ -662,6 +688,22 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
|
|||
Height = 18
|
||||
TabOrder = 16
|
||||
end
|
||||
object c_longitude_batch_short: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 120
|
||||
Width = 236
|
||||
Height = 18
|
||||
TabOrder = 25
|
||||
end
|
||||
object c_latitude_batch_short: TEdit
|
||||
Tag = 2
|
||||
Left = 426
|
||||
Top = 120
|
||||
Width = 234
|
||||
Height = 18
|
||||
TabOrder = 26
|
||||
end
|
||||
object head_count: TEdit
|
||||
Tag = 2
|
||||
Left = 1325
|
||||
|
|
@ -680,7 +722,7 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
|
|||
object C_ReedNo: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
Top = 120
|
||||
Top = 150
|
||||
Width = 236
|
||||
Height = 18
|
||||
Font.Charset = GB2312_CHARSET
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@
|
|||
重量上限=100
|
||||
米数小数位=1
|
||||
码数小数位=1
|
||||
重量小数位=2
|
||||
重量小数位=1
|
||||
|
|
|
|||
|
|
@ -86,6 +86,19 @@ begin
|
|||
if ftype = '机台产品' then
|
||||
//列出该机台绑定的产品(FlagStr传机台号),按钮Hint存产品编号
|
||||
sql.Add('select AA.*,row_number () over (order by code) as keyNo from(select DISTINCT B.C_Code as code, B.C_Name as name from Bs_Machine A join Bs_Cloth_Info B on B.C_Code in (A.C_CodeName, A.C_CodeName2) where A.MCNO=' + QuotedStr(Trim(FlagStr)) + ')AA')
|
||||
else if ftype = '机台合同' then
|
||||
begin
|
||||
//列出该机台绑定的合同(FlagStr传机台号),按钮显示"合同号+产品名",Hint存"合同号|产品编号"
|
||||
sql.Add('select AA.*,row_number () over (order by code) as keyNo from(');
|
||||
sql.Add('select DISTINCT A.m_ConNo as code, ISNULL(B.C_Name,'''') as name, A.C_CodeName as pcode from Bs_Machine A');
|
||||
sql.Add(' left join Bs_Cloth_Info B on B.C_Code = A.C_CodeName');
|
||||
sql.Add(' where A.MCNO=' + QuotedStr(Trim(FlagStr)) + ' and ISNULL(A.m_ConNo,'''')<>''''');
|
||||
sql.Add(' union');
|
||||
sql.Add(' select DISTINCT A.m_ConNo2 as code, ISNULL(C.C_Name,'''') as name, A.C_CodeName2 as pcode from Bs_Machine A');
|
||||
sql.Add(' left join Bs_Cloth_Info C on C.C_Code = A.C_CodeName2');
|
||||
sql.Add(' where A.MCNO=' + QuotedStr(Trim(FlagStr)) + ' and ISNULL(A.m_ConNo2,'''')<>''''');
|
||||
sql.Add(')AA');
|
||||
end
|
||||
else
|
||||
sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT MCNO as name from Bs_Machine where ISNULL(Status,0)=5 )AA');
|
||||
// showmessage(sql.text);
|
||||
|
|
@ -113,6 +126,11 @@ begin
|
|||
TSpeedButton(Controls[i]).Caption := Trim(ADOTmp.FieldByName('name').AsString);
|
||||
TSpeedButton(Controls[i]).Hint := Trim(ADOTmp.FieldByName('code').AsString);
|
||||
end
|
||||
else if ftype = '机台合同' then
|
||||
begin
|
||||
TSpeedButton(Controls[i]).Caption := Trim(ADOTmp.FieldByName('code').AsString) + #13 + Trim(ADOTmp.FieldByName('name').AsString);
|
||||
TSpeedButton(Controls[i]).Hint := Trim(ADOTmp.FieldByName('code').AsString) + '|' + Trim(ADOTmp.FieldByName('pcode').AsString);
|
||||
end
|
||||
else
|
||||
TSpeedButton(Controls[i]).Caption := Trim(ADOTmp.FieldByName('name').AsString);
|
||||
end
|
||||
|
|
|
|||
|
|
@ -232,6 +232,14 @@ inherited frmTatClothInspList: TfrmTatClothInspList
|
|||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1ContractBuyName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'ContractBuyName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ type
|
|||
Tv1CARNO: TcxGridDBColumn;
|
||||
ComboBox1: TComboBox;
|
||||
Label9: TLabel;
|
||||
Tv1ContractBuyName: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
|
|||
|
|
@ -2933,6 +2933,10 @@
|
|||
object 查看: TcxTabSheet
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 1
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 0
|
||||
ExplicitHeight = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 0
|
||||
|
|
|
|||
|
|
@ -425,6 +425,7 @@ type
|
|||
FLoom, FBatchNO, FLenUnit, FC_Code, FC_Name, FC_Spec, FC_Width, FC_GramWeight: string;
|
||||
FC_Color, FC_ColorNo, FC_StyleNo, FC_Pattern, FC_CustPattern, FC_ColorDepth: string;
|
||||
FFtyPCId, FGangNo: string;
|
||||
FInLongitudeBatchShort, FInLatitudeBatchShort: string; //产品的经/纬纱批号简称(界面不显示,保存到Tat_Cloth_Inspect)
|
||||
FPieceNo: Integer;
|
||||
IsCommopen: boolean;
|
||||
procedure SetINIFile(); //设置配置文件
|
||||
|
|
@ -454,6 +455,8 @@ type
|
|||
function RoundUpToHalf(AValue: Double): Double; //decimal 0.1-0.4 -> 0.5, 0.6-0.9 -> next integer
|
||||
function FormatQty2(AValue: Double): string;
|
||||
function SelBoundProduct(AMCNO: string): string; //弹出选择机台绑定的产品,返回产品编号
|
||||
function SelBoundContract(AMCNO: string; var AConNo, ACode: string): Boolean; //弹出选择机台绑定的合同,返回合同号和产品编号
|
||||
function BringMachineContract(AConNo, ACode: string): Boolean; //带出机台绑定的合同和产品
|
||||
public
|
||||
fmanage: string;
|
||||
fFlileFlag: string;
|
||||
|
|
@ -546,6 +549,7 @@ begin
|
|||
MPlace.Text := FMPlace;
|
||||
YPlace.Text := FYPlace;
|
||||
KgPlace.Text := FKgPlace;
|
||||
KgPlace.Text := '2';
|
||||
end;
|
||||
procedure TfrmTatMachInsp.SetDdetails();
|
||||
begin
|
||||
|
|
@ -722,6 +726,8 @@ begin
|
|||
FLoom := '';
|
||||
C_LongitudeBatchNo.Text := '';
|
||||
C_LatitudeBatchNo.Text := '';
|
||||
FInLongitudeBatchShort := '';
|
||||
FInLatitudeBatchShort := '';
|
||||
end;
|
||||
procedure TfrmTatMachInsp.LookImage(FileName: string);
|
||||
var
|
||||
|
|
@ -1106,6 +1112,8 @@ begin
|
|||
SPEC.Text := Trim(ADOTmp.FieldByName('C_SPEC').AsString);
|
||||
C_LongitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LongitudeBatchNo').AsString);
|
||||
C_LatitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LatitudeBatchNo').AsString);
|
||||
FInLongitudeBatchShort := Trim(ADOTmp.FieldByName('c_longitude_batch_short').AsString);
|
||||
FInLatitudeBatchShort := Trim(ADOTmp.FieldByName('c_latitude_batch_short').AsString);
|
||||
FMainId := '';
|
||||
FSubId := '';
|
||||
Label14.Caption := '订单号';
|
||||
|
|
@ -1122,6 +1130,8 @@ begin
|
|||
SPEC.Text := '';
|
||||
C_LongitudeBatchNo.Text := '';
|
||||
C_LatitudeBatchNo.Text := '';
|
||||
FInLongitudeBatchShort := '';
|
||||
FInLatitudeBatchShort := '';
|
||||
end;
|
||||
end;
|
||||
procedure TfrmTatMachInsp.CodeNameExit(Sender: TObject);
|
||||
|
|
@ -1145,6 +1155,8 @@ begin
|
|||
SPEC.Text := Trim(ADOTmp.FieldByName('C_SPEC').AsString);
|
||||
C_LongitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LongitudeBatchNo').AsString);
|
||||
C_LatitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LatitudeBatchNo').AsString);
|
||||
FInLongitudeBatchShort := Trim(ADOTmp.FieldByName('c_longitude_batch_short').AsString);
|
||||
FInLatitudeBatchShort := Trim(ADOTmp.FieldByName('c_latitude_batch_short').AsString);
|
||||
FMainId := '';
|
||||
FSubId := '';
|
||||
Label14.Caption := '订单号';
|
||||
|
|
@ -1161,6 +1173,8 @@ begin
|
|||
SPEC.Text := '';
|
||||
C_LongitudeBatchNo.Text := '';
|
||||
C_LatitudeBatchNo.Text := '';
|
||||
FInLongitudeBatchShort := '';
|
||||
FInLatitudeBatchShort := '';
|
||||
end;
|
||||
end;
|
||||
procedure TfrmTatMachInsp.ComboBox1Change(Sender: TObject);
|
||||
|
|
@ -1702,6 +1716,8 @@ begin
|
|||
FieldByName('Coefficient').Value := StrToFloatdef(Coefficient.text, 0);
|
||||
FieldByName('Grade').Value := Grade.text;
|
||||
FieldByName('PieceNo').Value := 0;
|
||||
//保存合同号(来源:扫计划单/手选合同/机台带入),入库过程会把它带到Tat_Cloth_Stock
|
||||
FieldByName('ConNo').Value := Trim(FConNo);
|
||||
FieldByName('OrderNo').value := Trim(FOrderNo);
|
||||
if fmainid = '' then
|
||||
begin
|
||||
|
|
@ -1726,6 +1742,9 @@ begin
|
|||
FieldByName('C_Name').value := trim(codename.Text);
|
||||
FieldByName('C_LongBatchNo').Value := Trim(C_LongitudeBatchNo.Text);
|
||||
FieldByName('C_LatBatchNo').Value := Trim(C_LatitudeBatchNo.Text);
|
||||
//经/纬纱批号简称(界面不显示,随产品带入)
|
||||
FieldByName('in_longitude_batch_short').Value := Trim(FInLongitudeBatchShort);
|
||||
FieldByName('in_latitude_batch_short').Value := Trim(FInLatitudeBatchShort);
|
||||
FieldByName('C_Spec').value := trim(Spec.Text);
|
||||
FieldByName('C_Color').value := FC_Color;
|
||||
FieldByName('C_ColorNo').value := FC_ColorNo;
|
||||
|
|
@ -2108,6 +2127,8 @@ begin
|
|||
Self.SPEC.Text := Self.ADOTmp.FieldByName('C_SPEC').AsString;
|
||||
Self.C_LongitudeBatchNo.Text := ADOTmp.fieldbyname('C_LongitudeBatchNo').AsString;
|
||||
Self.C_LatitudeBatchNo.Text := ADOTmp.fieldbyname('C_LatitudeBatchNo').AsString;
|
||||
Self.FInLongitudeBatchShort := ADOTmp.fieldbyname('c_longitude_batch_short').AsString;
|
||||
Self.FInLatitudeBatchShort := ADOTmp.fieldbyname('c_latitude_batch_short').AsString;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
|
|
@ -2158,11 +2179,15 @@ begin
|
|||
begin
|
||||
C_LongitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LongitudeBatchNo').AsString);
|
||||
C_LatitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LatitudeBatchNo').AsString);
|
||||
FInLongitudeBatchShort := Trim(ADOTmp.FieldByName('c_longitude_batch_short').AsString);
|
||||
FInLatitudeBatchShort := Trim(ADOTmp.FieldByName('c_latitude_batch_short').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
C_LongitudeBatchNo.Text := '';
|
||||
C_LatitudeBatchNo.Text := '';
|
||||
FInLongitudeBatchShort := '';
|
||||
FInLatitudeBatchShort := '';
|
||||
end;
|
||||
SetDdetails();
|
||||
InitJYGrid();
|
||||
|
|
@ -2627,9 +2652,82 @@ begin
|
|||
frmSCPersonColor := OldFrm;
|
||||
end;
|
||||
end;
|
||||
function TfrmTatMachInsp.SelBoundContract(AMCNO: string; var AConNo, ACode: string): Boolean;
|
||||
var
|
||||
frm, OldFrm: TfrmSCPersonColor;
|
||||
MPos: Integer;
|
||||
begin
|
||||
Result := False;
|
||||
AConNo := '';
|
||||
ACode := '';
|
||||
OldFrm := frmSCPersonColor;
|
||||
frm := TfrmSCPersonColor.Create(Self);
|
||||
try
|
||||
frm.FType := '机台合同';
|
||||
frm.FlagStr := Trim(AMCNO);
|
||||
frm.Caption := '请选择带入的合同';
|
||||
if frm.ShowModal = 1 then
|
||||
begin
|
||||
//FName格式:"合同号|产品编号"
|
||||
MPos := Pos('|', Trim(frm.FName));
|
||||
if MPos > 0 then
|
||||
begin
|
||||
AConNo := Copy(Trim(frm.FName), 1, MPos - 1);
|
||||
ACode := Copy(Trim(frm.FName), MPos + 1, MaxInt);
|
||||
end
|
||||
else
|
||||
AConNo := Trim(frm.FName);
|
||||
Result := (AConNo <> '');
|
||||
end;
|
||||
finally
|
||||
frm.Free;
|
||||
//还原全局变量:FormDestroy会把它置nil,外层with frmSCPersonColor的finally还在用它
|
||||
frmSCPersonColor := OldFrm;
|
||||
end;
|
||||
end;
|
||||
function TfrmTatMachInsp.BringMachineContract(AConNo, ACode: string): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
if Trim(AConNo) = '' then
|
||||
Exit;
|
||||
ClearGlobal();
|
||||
FOperationStatus := '布票';
|
||||
//只带入合同号,不判断合同状态
|
||||
FConNo := Trim(AConNo);
|
||||
//产品带机台绑定的档案,机台没绑产品时不带产品
|
||||
if Trim(ACode) <> '' then
|
||||
begin
|
||||
with ADOTmp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from Bs_Cloth_Info where C_Code = ' + QuotedStr(Trim(ACode)));
|
||||
Open;
|
||||
end;
|
||||
if not ADOTmp.IsEmpty then
|
||||
begin
|
||||
Code.Text := Trim(ADOTmp.FieldByName('C_Code').AsString);
|
||||
CodeName.Text := Trim(ADOTmp.FieldByName('C_Name').AsString);
|
||||
MF.Text := Trim(ADOTmp.FieldByName('C_Width').AsString);
|
||||
KZ.Text := Trim(ADOTmp.FieldByName('C_GramWeight').AsString);
|
||||
SPEC.Text := Trim(ADOTmp.FieldByName('C_SPEC').AsString);
|
||||
C_LongitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LongitudeBatchNo').AsString);
|
||||
C_LatitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LatitudeBatchNo').AsString);
|
||||
FInLongitudeBatchShort := Trim(ADOTmp.FieldByName('c_longitude_batch_short').AsString);
|
||||
FInLatitudeBatchShort := Trim(ADOTmp.FieldByName('c_latitude_batch_short').AsString);
|
||||
end;
|
||||
end;
|
||||
Coefficient.Text := '0';
|
||||
Label14.Caption := Trim(AConNo);
|
||||
SetDdetails();
|
||||
InitJYGrid();
|
||||
InitCDGrid('');
|
||||
Result := True;
|
||||
end;
|
||||
procedure TfrmTatMachInsp.Button9Click(Sender: TObject);
|
||||
var
|
||||
MCode, MCode2: string;
|
||||
MCode, MCode2, MConNo, MConNo2, SelConNo, SelCode: string;
|
||||
MBrought, MSkip: Boolean;
|
||||
begin
|
||||
try
|
||||
frmSCPersonColor := TfrmSCPersonColor.Create(self);
|
||||
|
|
@ -2639,15 +2737,18 @@ begin
|
|||
if ShowModal = 1 then
|
||||
begin
|
||||
carno.text := trim(fname);
|
||||
//带出机台绑定的产品信息,有值直接覆盖;绑定两个产品时让用户选择带入哪个
|
||||
//带出机台绑定的合同和产品信息
|
||||
MCode := '';
|
||||
MCode2 := '';
|
||||
MConNo := '';
|
||||
MConNo2 := '';
|
||||
with Self.ADOTmp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('SELECT A.C_CodeName, ISNULL(B.C_Name,'''') AS C_Name, ');
|
||||
SQL.Add(' A.C_CodeName2, ISNULL(C.C_Name,'''') AS C_Name2 ');
|
||||
SQL.Add(' A.C_CodeName2, ISNULL(C.C_Name,'''') AS C_Name2, ');
|
||||
SQL.Add(' ISNULL(A.m_ConNo,'''') AS m_ConNo, ISNULL(A.m_ConNo2,'''') AS m_ConNo2 ');
|
||||
SQL.Add('FROM Bs_Machine A ');
|
||||
SQL.Add('LEFT JOIN Bs_Cloth_Info B ON B.C_Code = A.C_CodeName ');
|
||||
SQL.Add('LEFT JOIN Bs_Cloth_Info C ON C.C_Code = A.C_CodeName2 ');
|
||||
|
|
@ -2657,8 +2758,38 @@ begin
|
|||
begin
|
||||
MCode := Trim(FieldByName('C_CodeName').AsString);
|
||||
MCode2 := Trim(FieldByName('C_CodeName2').AsString);
|
||||
MConNo := Trim(FieldByName('m_ConNo').AsString);
|
||||
MConNo2 := Trim(FieldByName('m_ConNo2').AsString);
|
||||
end;
|
||||
end;
|
||||
//机台绑定了合同时带出合同+产品;两个合同都绑定时弹出大按钮选择带入哪组,取消则都不带
|
||||
MBrought := False;
|
||||
MSkip := False;
|
||||
if (MConNo <> '') or (MConNo2 <> '') then
|
||||
begin
|
||||
SelConNo := '';
|
||||
SelCode := '';
|
||||
if (MConNo <> '') and (MConNo2 <> '') then
|
||||
begin
|
||||
if not Self.SelBoundContract(Trim(fname), SelConNo, SelCode) then
|
||||
MSkip := True;
|
||||
end
|
||||
else if MConNo <> '' then
|
||||
begin
|
||||
SelConNo := MConNo;
|
||||
SelCode := MCode;
|
||||
end
|
||||
else
|
||||
begin
|
||||
SelConNo := MConNo2;
|
||||
SelCode := MCode2;
|
||||
end;
|
||||
if (not MSkip) and (SelConNo <> '') then
|
||||
MBrought := Self.BringMachineContract(SelConNo, SelCode);
|
||||
end;
|
||||
//机台没绑合同时维持原逻辑:只带产品
|
||||
if (not MSkip) and (not MBrought) then
|
||||
begin
|
||||
//只在产品2绑定时,同样直接带入
|
||||
if (MCode = '') and (MCode2 <> '') then
|
||||
MCode := MCode2;
|
||||
|
|
@ -2683,6 +2814,8 @@ begin
|
|||
Self.SPEC.Text := Self.ADOTmp.FieldByName('C_SPEC').AsString;
|
||||
Self.C_LongitudeBatchNo.Text := Self.ADOTmp.fieldbyname('C_LongitudeBatchNo').AsString;
|
||||
Self.C_LatitudeBatchNo.Text := Self.ADOTmp.fieldbyname('C_LatitudeBatchNo').AsString;
|
||||
Self.FInLongitudeBatchShort := Self.ADOTmp.fieldbyname('c_longitude_batch_short').AsString;
|
||||
Self.FInLatitudeBatchShort := Self.ADOTmp.fieldbyname('c_latitude_batch_short').AsString;
|
||||
FMainId := '';
|
||||
FSubId := '';
|
||||
Label14.Caption := '订单号';
|
||||
|
|
@ -2690,6 +2823,7 @@ begin
|
|||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmSCPersonColor.close;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ begin
|
|||
|
||||
FMPlace := programIni.ReadString('生产车间配置', '米数小数位', '1');
|
||||
FYPlace := programIni.ReadString('生产车间配置', '码数小数位', '0');
|
||||
FKgPlace := programIni.ReadString('生产车间配置', '重量小数位', '1');
|
||||
FKgPlace := programIni.ReadString('生产车间配置', '重量小数位', '2');
|
||||
|
||||
programIni.Free;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ begin
|
|||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||
DParameters1 := '管理';
|
||||
Parameters1 := '管理';
|
||||
dname:='test';
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -609,6 +609,14 @@ inherited frmTatClothInList: TfrmTatClothInList
|
|||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object Tv1ContractBuyName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'ContractBuyName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
|
|
@ -641,6 +649,21 @@ inherited frmTatClothInList: TfrmTatClothInList
|
|||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1in_longitude_batch_short: TcxGridDBColumn
|
||||
Caption = #32463#32433#25209#21495#31616#31216
|
||||
DataBinding.FieldName = 'in_longitude_batch_short'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1in_latitude_batch_short: TcxGridDBColumn
|
||||
Caption = #32428#32433#25209#21495#31616#31216
|
||||
DataBinding.FieldName = 'in_latitude_batch_short'
|
||||
DataBinding.IsNullValueType = True
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #21345#21495
|
||||
DataBinding.FieldName = 'PCId'
|
||||
|
|
|
|||
|
|
@ -110,6 +110,9 @@ type
|
|||
Tv1Column21: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
carno: TEdit;
|
||||
Tv1ContractBuyName: TcxGridDBColumn;
|
||||
Tv1in_longitude_batch_short: TcxGridDBColumn;
|
||||
Tv1in_latitude_batch_short: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
|
|
|
|||
|
|
@ -603,6 +603,14 @@ inherited frmTatClothOutList: TfrmTatClothOutList
|
|||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object Tv1ContractBuyName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'ContractBuyName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
|
|
@ -627,6 +635,22 @@ inherited frmTatClothOutList: TfrmTatClothOutList
|
|||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1in_longitude_batch_short: TcxGridDBColumn
|
||||
Caption = #32463#32433#25209#21495#31616#31216
|
||||
DataBinding.FieldName = 'in_longitude_batch_short'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1in_latitude_batch_short: TcxGridDBColumn
|
||||
Caption = #32428#32433#25209#21495#31616#31216
|
||||
DataBinding.FieldName = 'in_latitude_batch_short'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'C_Color'
|
||||
|
|
|
|||
|
|
@ -109,6 +109,9 @@ type
|
|||
Tv1Column22: TcxGridDBColumn;
|
||||
Label4: TLabel;
|
||||
carno: TEdit;
|
||||
Tv1ContractBuyName: TcxGridDBColumn;
|
||||
Tv1in_latitude_batch_short: TcxGridDBColumn;
|
||||
Tv1in_longitude_batch_short: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
|
|
|
|||
|
|
@ -142,8 +142,8 @@ begin
|
|||
Close;
|
||||
sql.Clear;
|
||||
|
||||
sql.Add('select C_NAME,C_code,C_LongBatchNo,C_LatBatchNo,COUNT(*)JS,SUM(stkMeter)stkMeter,SUM(StkYardage)StkYardage from V_Tat_Cloth_Stk AA where 1=1 ' + WSql);
|
||||
sql.Add('group by C_NAME,C_code,C_LongBatchNo,C_LatBatchNo');
|
||||
sql.Add('select C_NAME,C_code,C_LongBatchNo,C_LatBatchNo,in_longitude_batch_short,in_latitude_batch_short,COUNT(*)JS,SUM(stkMeter)stkMeter,SUM(StkYardage)StkYardage from V_Tat_Cloth_Stk AA where 1=1 ' + WSql);
|
||||
sql.Add('group by C_NAME,C_code,C_LongBatchNo,C_LatBatchNo,in_longitude_batch_short,in_latitude_batch_short');
|
||||
|
||||
// showmessage(sql.text);
|
||||
Open;
|
||||
|
|
|
|||
|
|
@ -449,7 +449,6 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
ParentFont = False
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 3
|
||||
ExplicitTop = 133
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
|
|
@ -549,6 +548,14 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object Tv1ContractBuyName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'ContractBuyName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
|
|
@ -597,6 +604,22 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1in_longitude_batch_short: TcxGridDBColumn
|
||||
Caption = #32463#32433#25209#21495#31616#31216
|
||||
DataBinding.FieldName = 'in_longitude_batch_short'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1in_latitude_batch_short: TcxGridDBColumn
|
||||
Caption = #32428#32433#25209#21495#31616#31216
|
||||
DataBinding.FieldName = 'in_latitude_batch_short'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #21345#21495
|
||||
DataBinding.FieldName = 'PCId'
|
||||
|
|
|
|||
|
|
@ -100,6 +100,9 @@ type
|
|||
Tv1ActualDiff: TcxGridDBColumn;
|
||||
Tv1C_LongBatchNo: TcxGridDBColumn;
|
||||
Tv1C_LatBatchNo: TcxGridDBColumn;
|
||||
Tv1ContractBuyName: TcxGridDBColumn;
|
||||
Tv1in_longitude_batch_short: TcxGridDBColumn;
|
||||
Tv1in_latitude_batch_short: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
|
|
|
|||
|
|
@ -338,14 +338,14 @@ begin
|
|||
Exit;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
Exit;
|
||||
if canshu1 <> '高权限' then
|
||||
begin
|
||||
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
// if canshu1 <> '高权限' then
|
||||
// begin
|
||||
// if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
// begin
|
||||
// Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
// end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
|
|
@ -513,6 +513,15 @@ begin
|
|||
if order_main.IsEmpty then
|
||||
Exit;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('update Tat_Cloth_DR_Main set Prter=' + QuotedStr(Trim(DName)));
|
||||
SQL.Add('where DRMID=' + QuotedStr(Trim(order_main.fieldbyname('DRMID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
try
|
||||
frmLabelPrint := TfrmLabelPrint.Create(Application);
|
||||
with frmLabelPrint do
|
||||
|
|
|
|||
|
|
@ -279,6 +279,9 @@ begin
|
|||
FieldByName('SubId').Value := Order_Sub.fieldbyname('SubId').Value;
|
||||
FieldByName('ConMId').Value := Order_Sub.fieldbyname('ConMId').Value;
|
||||
FieldByName('ConSId').Value := Order_Sub.fieldbyname('ConSId').Value;
|
||||
//经/纬纱批号简称(网格未绑定列,需显式保存)
|
||||
FieldByName('dr_longitude_batch_short').Value := Order_Sub.fieldbyname('dr_longitude_batch_short').Value;
|
||||
FieldByName('dr_latitude_batch_short').Value := Order_Sub.fieldbyname('dr_latitude_batch_short').Value;
|
||||
Post;
|
||||
end;
|
||||
Order_Sub.Edit;
|
||||
|
|
@ -558,6 +561,9 @@ begin
|
|||
FieldByName('Qty').Value := frmTatClothStkHZListSEL.CDS_1.fieldbyname('stkmeter').Value;
|
||||
FieldByName('DR_LongitudeBatchNo').Value := frmTatClothStkHZListSEL.CDS_1.fieldbyname('C_LongBatchNo').Value;
|
||||
FieldByName('DR_LatitudeBatchNo').Value := frmTatClothStkHZListSEL.CDS_1.fieldbyname('C_LatBatchNo').Value;
|
||||
//经/纬纱批号简称(库存汇总视图带出,不显示)
|
||||
FieldByName('dr_longitude_batch_short').Value := frmTatClothStkHZListSEL.CDS_1.fieldbyname('in_longitude_batch_short').Value;
|
||||
FieldByName('dr_latitude_batch_short').Value := frmTatClothStkHZListSEL.CDS_1.fieldbyname('in_latitude_batch_short').Value;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user