|
|
@ -45,6 +45,9 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); |
|
|
|
List<BarcodeRules> _barcodeRules = null; |
|
|
|
public delegate void myMethodDelegate(); |
|
|
|
|
|
|
|
private string PlaceFirstPositionType = string.Empty; |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 变量
|
|
|
@ -67,6 +70,9 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
public TJFrmPlace() |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
|
|
|
|
PlaceFirstPositionType = System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionType"].ToString(); |
|
|
|
|
|
|
|
_barcodeRules = _agent.InvokeServiceFunction<List<BarcodeRules>>("BarcodeRulesBLL_GetListForSend"); |
|
|
|
} |
|
|
|
#endregion
|
|
|
@ -754,11 +760,11 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
//#region "隐藏了rb_hx 和rb_dx,全部根据pFisType判断,生产线的设置使用按钮进行设置"
|
|
|
|
if (pFisType == "01") |
|
|
|
{ |
|
|
|
strprodtype = "( 混 )"; |
|
|
|
strprodtype = "( 左 )"; |
|
|
|
} |
|
|
|
else if (pFisType == "02") |
|
|
|
{ |
|
|
|
strprodtype = "( 单 )"; |
|
|
|
strprodtype = "( 右 )"; |
|
|
|
} |
|
|
|
//提交数据处理
|
|
|
|
foreach (DataRow dr in tbl.Rows) |
|
|
@ -805,7 +811,7 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
nfpastecard.OPERATOR = ClientContext.LoginInfo.UserName.ToString(); |
|
|
|
// nfpastecard.
|
|
|
|
} |
|
|
|
int rowindex = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard); |
|
|
|
int rowindex = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard); |
|
|
|
// 打印处理
|
|
|
|
TJFrmCarCardPrintShow frm = new TJFrmCarCardPrintShow(nfpastecard, strprodtype, "手动"); |
|
|
|
frm.Owner = this; |
|
|
@ -813,23 +819,6 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
frm.ShowDialog(); |
|
|
|
isprint = frm.isprint; |
|
|
|
} |
|
|
|
//if (isprint)
|
|
|
|
//{
|
|
|
|
// nfpastecard.DetailsCardlist = nflist;
|
|
|
|
// nfindex = 0;
|
|
|
|
// // BllFisOrder bllFisOrder = new BllFisOrder();
|
|
|
|
// //int strindex = bllFisOrder.AddPasteCard(nfpastecard);
|
|
|
|
// //QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
|
|
|
|
// int strindex = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard);
|
|
|
|
// TJPrintPasteCard prin = new TJPrintPasteCard();
|
|
|
|
// prin.Print(strindex, nfpastecard, strprodtype);
|
|
|
|
// GetInitData();
|
|
|
|
// DGVRemoveRow(nflist, ref ncslist);
|
|
|
|
// nflist = new List<EPasteDetailsCard>();
|
|
|
|
// dgvNF.DataMember = null;
|
|
|
|
// dgvNF.DataSource = nflist;
|
|
|
|
// //computenfncs();
|
|
|
|
//}
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
@ -980,7 +969,7 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
nfpastecard.FailLog = log; |
|
|
|
nfindex = 0; |
|
|
|
QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); |
|
|
|
int rowindex = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_AddPasteCard.ToString(), nfpastecard); |
|
|
|
int rowindex = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard); |
|
|
|
//BllFisOrder bllFisOrder = new BllFisOrder();
|
|
|
|
//int rowindex = bllFisOrder.AddPasteCard(nfpastecard);
|
|
|
|
TJPrintPasteCard prin = new TJPrintPasteCard(); |
|
|
@ -1040,7 +1029,7 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
if (openConfirmDialog |
|
|
|
&& string.Equals(QMAPP.WinForm.Common.LocalSetting.Settings["AlertConfirmEnable", "0"], "1")) |
|
|
|
{ |
|
|
|
Common.frmAlertConfirm alertconfirm = new Common.frmAlertConfirm(message, "CD85010800"); |
|
|
|
Common.frmAlertConfirm alertconfirm = new Common.frmAlertConfirm(message, "85010800"); |
|
|
|
alertconfirm.StartPosition = FormStartPosition.CenterScreen; |
|
|
|
alertconfirm.ShowDialog(); |
|
|
|
} |
|
|
@ -1126,21 +1115,20 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
|
|
|
|
dgvMATChange.Rows[temprowindex].Cells["STATE"].Value = "1"; |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
temprowindex = dgvMATChange.Rows.Count; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
SetContainerItem(nfindex, false); |
|
|
|
Alert("条码错误:条码的零件号与FIS队列零件号不符合。"); |
|
|
|
break; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
SetContainerItem(nfindex, false); |
|
|
|
Alert("条码错误:条码已扫描或车型不符合。"); |
|
|
|
break; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@ -1148,9 +1136,11 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
else |
|
|
|
{ |
|
|
|
Alert("扫描条码重复,请重新扫描。"); |
|
|
|
return; |
|
|
|
} |
|
|
|
SetContainerItem(nfindex, true); |
|
|
|
|
|
|
|
CreateNFPaste(Code); //创建NF的贴车单以及明细
|
|
|
|
SetContainerItem(nfindex, true); |
|
|
|
if (dgvMATChange.RowCount > 0) |
|
|
|
{ |
|
|
|
dgvMATChange.FirstDisplayedScrollingRowIndex = nfindex - nfindex % 4; |
|
|
@ -1177,74 +1167,7 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
} |
|
|
|
inputstring = txtCode.Text.ToUpper(); |
|
|
|
this.lberror.Text = null; |
|
|
|
#region 使用登录码快速切换用户
|
|
|
|
//使用登录码快速切换用户
|
|
|
|
//if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$"))
|
|
|
|
//{
|
|
|
|
// var ret = ClientContext.CodeLogin(txtCode.Text);
|
|
|
|
// if (string.Equals(ret, "登录成功!"))
|
|
|
|
// {
|
|
|
|
// ClientContext.SetUserAuth(this);
|
|
|
|
// }
|
|
|
|
// lberror.Text = ret;
|
|
|
|
// ArragetxtCode();
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
//if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text.ToUpper(), "^>CMD:\\w+$"))//扫描输入为指令码
|
|
|
|
//{
|
|
|
|
// ExcuteCMDCode();
|
|
|
|
// txtCode.Text = "";
|
|
|
|
// txtCode.Focus();
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
|
|
|
|
_CMDConfirm = ""; |
|
|
|
#endregion
|
|
|
|
|
|
|
|
//#region 原校验
|
|
|
|
//string PastNOConfirmEnable = QMAPP.WinForm.Common.LocalSetting.Settings["PastNOConfirmEnable", "0"];
|
|
|
|
//if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text.ToUpper(), "^" + WORKCENTER_CODE + "\\w+$"))//扫描输入为贴车单号
|
|
|
|
//{
|
|
|
|
// if (string.Equals("1", PastNOConfirmEnable)) //贴车单确认功能开启
|
|
|
|
// {
|
|
|
|
// GetLastPastCard();
|
|
|
|
// if (string.Equals(txtCode.Text.ToUpper(), lblLastPastNO.Text.ToUpper()))
|
|
|
|
// {
|
|
|
|
// lberror.Text = "前车贴车单号确认完成!";
|
|
|
|
// SetPastNOConfirm(1);
|
|
|
|
// ArragetxtCode();
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
// lberror.Text = "前车贴车单号确认失败!";
|
|
|
|
// SetPastNOConfirm(2);
|
|
|
|
// ArragetxtCode();
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
// lberror.Text = "贴车单号确认功能未开启,无需扫描贴车单号!";
|
|
|
|
// SetPastNOConfirm(0);
|
|
|
|
// ArragetxtCode();
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
//if (string.Equals("1", PastNOConfirmEnable)) //贴车单确认功能开启
|
|
|
|
//{
|
|
|
|
// if (!pbPastNoConfirmed.Enabled)
|
|
|
|
// {
|
|
|
|
// Alert("请先扫描前车贴车单号进行贴车单确认!");
|
|
|
|
// ArragetxtCode();
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region fis区是否有记录
|
|
|
|
if (dgvMATChange.Rows.Count == 0) |
|
|
|
{ |
|
|
@ -1260,10 +1183,8 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
if (this.dgvNF.Rows.Count == 0) //第一个码必须先扫描1号位
|
|
|
|
{ |
|
|
|
string placeCode = txtCode.Text.Trim(); |
|
|
|
var sss = System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionCode"].ToString(); |
|
|
|
if (placeCode.Equals(System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionCode"].ToString())) |
|
|
|
{ |
|
|
|
|
|
|
|
{ |
|
|
|
this.placeFirstPosition = placeCode; |
|
|
|
this.placeFirstPositionTime = DateTime.Now; |
|
|
|
this.txtCode.Text = ""; |
|
|
@ -1274,39 +1195,7 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 一号位时间校验
|
|
|
|
|
|
|
|
//if (this.dgvNF.Rows.Count == 0 && !string.IsNullOrEmpty(this.placeFirstPosition))//超时判断
|
|
|
|
//{
|
|
|
|
// double timeOutSecond = 0;
|
|
|
|
// //获取超时时间设定值
|
|
|
|
// //DataTable dtTimeOut = new BllTimeOutSet().GetList();
|
|
|
|
// DataTable dtTimeOut = agent.InvokeServiceFunction<DataTable>(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_GetTimeOutSet.ToString());
|
|
|
|
// if (dtTimeOut.Rows.Count > 0)
|
|
|
|
// {
|
|
|
|
// timeOutSecond = Convert.ToDouble(dtTimeOut.Rows[0]["TIMEOUT_VALUE"].ToString());
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //获取超时时间设定值
|
|
|
|
// if (timeOutSecond > 0)
|
|
|
|
// {
|
|
|
|
// TimeSpan ts = DateTime.Now - this.placeFirstPositionTime;
|
|
|
|
// if (ts.TotalSeconds > timeOutSecond)
|
|
|
|
// {
|
|
|
|
// this.placeFirstPosition = "";
|
|
|
|
// this.txtCode.Text = "";
|
|
|
|
// this.placeFirstPositionTime = DateTime.MinValue;
|
|
|
|
// lberror.Text = "扫描本体件超时,请重新扫描1号位!";
|
|
|
|
// //处理条码扫描文本框
|
|
|
|
// ArragetxtCode();
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 请先扫描1号位
|
|
|
|
if (string.IsNullOrEmpty(this.placeFirstPosition)) |
|
|
|
{ |
|
|
@ -1315,31 +1204,87 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
lberror.Text = "请先扫描1号位!"; |
|
|
|
return; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region FIS区域数据全部扫描完成,请获取数据后再扫描
|
|
|
|
if (dgvNF.Rows.Count >= dgvMATChange.Rows.Count) |
|
|
|
#region 计划外发运
|
|
|
|
|
|
|
|
if (inputstring.Equals("FIRSTPOSITIONTYPE")) |
|
|
|
{ |
|
|
|
Alert("当前计划数据全部扫描完成,请下达计划后再扫描!"); |
|
|
|
if (PlaceFirstPositionType == "False") |
|
|
|
{ |
|
|
|
PlaceFirstPositionType = "True"; |
|
|
|
lberror.Text = "关闭验证!"; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
PlaceFirstPositionType = "False"; |
|
|
|
lberror.Text = "打开验证!"; |
|
|
|
} |
|
|
|
this.txtCode.Text = ""; |
|
|
|
//处理条码扫描文本框
|
|
|
|
ArragetxtCode(); |
|
|
|
return; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 长度校验
|
|
|
|
//string pp = System.Configuration.ConfigurationManager.AppSettings["UpperBarcodeLen"].ToString();
|
|
|
|
//Int32 ul = int.Parse(System.Configuration.ConfigurationManager.AppSettings["UpperBarcodeLen"].ToString());
|
|
|
|
//Int32 ll = int.Parse(System.Configuration.ConfigurationManager.AppSettings["LowerBarcodeLen"].ToString());
|
|
|
|
if (PlaceFirstPositionType == "True") |
|
|
|
{ |
|
|
|
#region 校验是否有重复的扫过的条码
|
|
|
|
if (dgvNF.Rows.Count > 0) |
|
|
|
{ |
|
|
|
for (var i = 0; i < dgvNF.Rows.Count; i++) |
|
|
|
{ |
|
|
|
if (dgvNF.Rows[i].Cells[CODE_NF.Name].Value.ToString().ToUpper() == inputstring) |
|
|
|
{ |
|
|
|
SetContainerItem(nfindex, false); |
|
|
|
Alert("该条码已扫描!"); |
|
|
|
txtCode.Text = ""; |
|
|
|
txtCode.Focus(); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
CheckDataBase(inputstring); //检查T_PP_TJFY_WORKORDER 是否存在条码记录
|
|
|
|
|
|
|
|
foreach (var rule in _barcodeRules) |
|
|
|
{ |
|
|
|
if (System.Text.RegularExpressions.Regex.IsMatch(inputstring, rule.REGEX)) |
|
|
|
{ |
|
|
|
strprodno = rule.MATERIAL_CODE; |
|
|
|
strmouldcode = rule.REMARK; |
|
|
|
strcarsetdesc_cn = rule.MATERIAL_TYPE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//主键
|
|
|
|
strFiskey = Guid.NewGuid().ToString(); |
|
|
|
|
|
|
|
CreateNFPaste(inputstring); //创建NF的贴车单以及明细
|
|
|
|
|
|
|
|
//CreateNFPaste__();
|
|
|
|
|
|
|
|
SetContainerItem(nfindex, true); //变更右下角位置颜色
|
|
|
|
|
|
|
|
txtCode.Text = ""; |
|
|
|
txtCode.Focus(); |
|
|
|
return; |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//if (txtCode.Text.Length <= ll || txtCode.Text.Length >= ul)
|
|
|
|
//{
|
|
|
|
// Alert("条码错误:条码长度不符合要求(" + ll.ToString() + "-" + ul.ToString() + ")。");
|
|
|
|
|
|
|
|
// ArragetxtCode();
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region FIS区域数据全部扫描完成,请获取数据后再扫描
|
|
|
|
if (dgvNF.Rows.Count >= dgvMATChange.Rows.Count) |
|
|
|
{ |
|
|
|
Alert("当前计划数据全部扫描完成,请下达计划后再扫描!"); |
|
|
|
ArragetxtCode(); |
|
|
|
return; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 校验位计算
|
|
|
|
|
|
|
|
if (txtCode.Text.StartsWith("052")) |
|
|
@ -1374,11 +1319,43 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#region 底盘号间隔校验
|
|
|
|
|
|
|
|
//2016-10-31 闫永刚
|
|
|
|
int scanSum = dgvNF.Rows.Count; |
|
|
|
int lastvinNumber = 0; |
|
|
|
int vinNumber = 0; |
|
|
|
if (scanSum > 0) |
|
|
|
{ |
|
|
|
lastvinNumber = Convert.ToInt32(dgvMATChange.Rows[scanSum - 1].Cells["REQUESTID"].Value.ToString()); |
|
|
|
vinNumber = Convert.ToInt32(dgvMATChange.Rows[scanSum].Cells["REQUESTID"].Value.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
if ((vinNumber - lastvinNumber) > 1) |
|
|
|
{ |
|
|
|
var dresult = MessageBox.Show("出现顺序号间隔,是否继续发货?", "提示", MessageBoxButtons.YesNo); |
|
|
|
if (dresult == DialogResult.No) |
|
|
|
{ |
|
|
|
ArragetxtCode(); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 判断当前扫描过的数据集合中是否有相同条码
|
|
|
|
|
|
|
|
//判断当前扫描过的数据集合中是否有相同条码
|
|
|
|
CheckDataBase(Code); |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
//规则
|
|
|
|
bool signal = false; |
|
|
|
string outSourceProduct = ""; |
|
|
|
|
|
|
|
string MOULD_CODE = ""; |
|
|
|
foreach (var rule in _barcodeRules) |
|
|
|
{ |
|
|
@ -1386,7 +1363,7 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
{ |
|
|
|
signal = true; |
|
|
|
ProMaterial = rule.MATERIAL_CODE; |
|
|
|
outSourceProduct = rule.DATA_TYPE; |
|
|
|
|
|
|
|
MOULD_CODE = rule.REMARK; |
|
|
|
} |
|
|
|
} |
|
|
@ -1415,56 +1392,8 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
//-------------------------End-----------
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 2.判断成品 下线时间校验
|
|
|
|
//if (product.STATUS != "0")
|
|
|
|
//{
|
|
|
|
// SetContainerItem(nfindex, false);
|
|
|
|
// Alert("扫描的不是合格成品,不能进行发运!");
|
|
|
|
// txtCode.Text = "";
|
|
|
|
// txtCode.Focus();
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
//if (product.OUTFLAG != "0")
|
|
|
|
//{
|
|
|
|
// SetContainerItem(nfindex, false);
|
|
|
|
// Alert("扫描产品已出库,不能进行发运操作!");
|
|
|
|
// txtCode.Text = "";
|
|
|
|
// txtCode.Focus();
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
//var StorageTimeLimit=0d;
|
|
|
|
//double.TryParse(QMAPP.WinForm.Common.LocalSetting.Settings["StorageTimeLimit", "24"],out StorageTimeLimit);
|
|
|
|
//if ((DateTime.Now - product.CREATEDATE).TotalHours < StorageTimeLimit)
|
|
|
|
//{
|
|
|
|
// SetContainerItem(nfindex, false);
|
|
|
|
// Alert("扫描产品下线时间不足"+StorageTimeLimit+"小时!,不能进行发运操作!");
|
|
|
|
// txtCode.Text = "";
|
|
|
|
// txtCode.Focus();
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
//var mcresult = agent.InvokeServiceFunction<DataResult<MaterialClass>>("MaterialClassBLL_Get", new MaterialClass { MATERIAL_TYPE_CODE = product.MATERIAL_TYPE });
|
|
|
|
//var mc = mcresult.IsSuccess ? mcresult.Result : new MaterialClass { };
|
|
|
|
//if (!string.Equals(mc.MATERIAL_ATTRIBUTE, "2"))
|
|
|
|
//{
|
|
|
|
// SetContainerItem(nfindex, false);
|
|
|
|
// Alert("扫描产品不是总成件!,不能进行发运操作!");
|
|
|
|
// txtCode.Text = "";
|
|
|
|
// txtCode.Focus();
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
//FJC.Entity.ProductIn.ProductIn inrecord = agent.InvokeServiceFunction<FJC.Entity.ProductIn.ProductIn>("ProductInBLL_GetInRecord", Code);
|
|
|
|
//if (inrecord != null)
|
|
|
|
//{
|
|
|
|
// SetContainerItem(nfindex, false);
|
|
|
|
// Alert("此产品为退返件,请更换总成标签后再发运!");
|
|
|
|
// txtCode.Text = "";
|
|
|
|
// txtCode.Focus();
|
|
|
|
// return;
|
|
|
|
//}
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 4.与FIS数据匹配
|
|
|
|
//4.与FIS数据匹配
|
|
|
|
//4.与FIS数据匹配 匹配到计划后 开始生成贴车单
|
|
|
|
FISDataCompare(Code, ProMaterial, MOULD_CODE); |
|
|
|
|
|
|
|
#endregion
|
|
|
@ -1480,38 +1409,6 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 底盘号间隔校验
|
|
|
|
|
|
|
|
//2016-10-31 闫永刚
|
|
|
|
int scanSum = dgvNF.Rows.Count; |
|
|
|
int lastvinNumber = 0; |
|
|
|
int vinNumber = 0; |
|
|
|
if (scanSum > 0) |
|
|
|
{ |
|
|
|
lastvinNumber = Convert.ToInt32(dgvMATChange.Rows[scanSum - 1].Cells["REQUESTID"].Value.ToString()); |
|
|
|
vinNumber = Convert.ToInt32(dgvMATChange.Rows[scanSum].Cells["REQUESTID"].Value.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
if ((vinNumber - lastvinNumber) > 1) |
|
|
|
{ |
|
|
|
var dresult = MessageBox.Show("出现顺序号间隔,是否继续发货?", "提示", MessageBoxButtons.YesNo); |
|
|
|
if (dresult == DialogResult.No) |
|
|
|
{ |
|
|
|
ArragetxtCode(); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 判断当前扫描过的数据集合中是否有相同条码
|
|
|
|
//判断当前扫描过的数据集合中是否有相同条码
|
|
|
|
if (outSourceProduct == "OP") |
|
|
|
{ |
|
|
|
CheckDataBase(Code); |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 处理条码扫描文本框
|
|
|
|
ArragetxtCode(); |
|
|
|
#endregion
|
|
|
@ -1665,7 +1562,6 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
|
|
|
|
if (tblbarcode.Rows.Count > 0) |
|
|
|
{ |
|
|
|
|
|
|
|
Alert("扫描条码重复,请重新扫描。"); |
|
|
|
} |
|
|
|
} |
|
|
@ -1853,7 +1749,7 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
dgvNF.DataSource = nflist; |
|
|
|
strprodno = ""; |
|
|
|
nfindex++; |
|
|
|
|
|
|
|
|
|
|
|
//int setdefaultSum = Convert.ToInt32(QM.Config.CustomConfig.GetItem("ShowDataCount"));
|
|
|
|
int setdefaultSum = Convert.ToInt32(QMAPP.WinForm.Common.LocalSetting.Settings["ShowDataCount",""]); |
|
|
|
if (nfindex == setdefaultSum) |
|
|
@ -2156,15 +2052,8 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
} |
|
|
|
for (int i = 0; i < tpContainer.ColumnCount; i++) |
|
|
|
{ |
|
|
|
//tpContainer.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, tpContainer.ColumnCount > 8 ? 60 : 90));
|
|
|
|
tpContainer.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50)); |
|
|
|
|
|
|
|
//Label lblno = new Label();
|
|
|
|
//lblno.Text = (i + 1).ToString();
|
|
|
|
//lblno.Font = new Font("微软雅黑", 20, FontStyle.Bold);
|
|
|
|
//lblno.Dock = DockStyle.Fill;
|
|
|
|
//lblno.TextAlign = ContentAlignment.MiddleCenter;
|
|
|
|
//tpContainer.Controls.Add(lblno, i, 0);
|
|
|
|
|
|
|
|
for (int j = 0; j < tpContainer.RowCount; j++) |
|
|
|
{ |
|
|
|
Label lblItem = new Label(); |
|
|
@ -2175,7 +2064,7 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
tpContainer.Controls.Add(lblItem, i, j); |
|
|
|
} |
|
|
|
} |
|
|
|
//tpContainer.Height = tpContainer.RowCount * (3 + (tpContainer.ColumnCount > 8 ? 60 : 90));
|
|
|
|
|
|
|
|
for (int i = 0; i < nfindex; i++) |
|
|
|
{ |
|
|
|
SetContainerItem(i, true); |
|
|
@ -2190,13 +2079,23 @@ namespace QMAPP.WinForm.Forms.TianJin |
|
|
|
/// <param name="result"></param>
|
|
|
|
public void SetContainerItem(int itemindex, bool result) |
|
|
|
{ |
|
|
|
var columnindex = itemindex / (tpContainer.RowCount); |
|
|
|
var rowindex = itemindex % (tpContainer.RowCount) ; |
|
|
|
var label = tpContainer.GetControlFromPosition(columnindex, rowindex) as Label; |
|
|
|
if (label != null) |
|
|
|
if (itemindex == 1) |
|
|
|
{ |
|
|
|
var label = tpContainer.GetControlFromPosition(0, 0) as Label; |
|
|
|
label.BackColor = result ? Color.Lime : Color.Red; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
itemindex = itemindex - 1; |
|
|
|
var columnindex = itemindex / (tpContainer.RowCount); |
|
|
|
var rowindex = itemindex % (tpContainer.RowCount); |
|
|
|
var label = tpContainer.GetControlFromPosition(columnindex, rowindex) as Label; |
|
|
|
if (label != null) |
|
|
|
{ |
|
|
|
label.BackColor = result ? Color.Lime : Color.Red; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|