|
|
@@ -61,10 +61,10 @@ namespace UAS_MES_NEW.Make
|
|
|
asc.controllInitializeSize(this);
|
|
|
ComList.Text = BaseUtil.GetCacheData("PortName").ToString();
|
|
|
BaudRate.Text = BaseUtil.GetCacheData("BaudRate").ToString();
|
|
|
- //InitPrint = new Thread(InPrint);
|
|
|
- //SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
|
|
|
- //BaseUtil.SetFormCenter(stw);
|
|
|
- //stw.ShowDialog();
|
|
|
+ InitPrint = new Thread(InPrint);
|
|
|
+ SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
|
|
|
+ BaseUtil.SetFormCenter(stw);
|
|
|
+ stw.ShowDialog();
|
|
|
//设置锁定工单
|
|
|
LockMakeCode.GetMakeCodeCtl(ma_code);
|
|
|
ma_code.SetLockCheckBox(LockMakeCode);
|
|
|
@@ -137,13 +137,13 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
|
|
|
{
|
|
|
- string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
|
|
|
- if (nextstepcode != User.CurrentStepCode)
|
|
|
- {
|
|
|
- string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
|
|
|
- OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sncode);
|
|
|
- return;
|
|
|
- }
|
|
|
+ //string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
|
|
|
+ //if (nextstepcode != User.CurrentStepCode)
|
|
|
+ //{
|
|
|
+ // string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
|
|
|
+ // OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sncode);
|
|
|
+ // return;
|
|
|
+ //}
|
|
|
sql.Clear();
|
|
|
sql.Append("select ms_makecode ma_code,ma_qty,ma_salecode,pr_detail pr_spec,pr_colorboxunit,pr_code,pr_colorboxgw,");
|
|
|
sql.Append("pr_colorboxunit,pr_colorboxmaxw,pr_colorboxminw,nvl(PR_CHECKCOLORBOXW,'0') PR_CHECKCOLORBOXW,nvl(pr_sendchecktype,'LineCode')");
|
|
|
@@ -367,10 +367,19 @@ namespace UAS_MES_NEW.Make
|
|
|
private void pr_code_TextChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
LoadCheckQTY();
|
|
|
- DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='彩盒标' and la_statuscode='AUDITED' order by la_isdefault", "select");
|
|
|
- PrintLabel.DataSource = _dt;
|
|
|
- PrintLabel.DisplayMember = "la_url";
|
|
|
- PrintLabel.ValueMember = "la_id";
|
|
|
+ DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='彩盒标' and la_statuscode='AUDITED' order by la_isdefault", "select");
|
|
|
+ if (_dt.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault,replace(LA_SOFTTYPE,';',',')LA_SOFTTYPE from label where la_prodcode is null and la_templatetype='彩盒标' and la_statuscode='AUDITED' order by la_isdefault", "select");
|
|
|
+ }
|
|
|
+ if (_dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ string la_id = _dt.Rows[0]["la_id"].ToString();
|
|
|
+ _dt = (DataTable)dh.ExecuteSql("select fp_name la_url,'" + la_id + "' la_id from FILEPATH where fp_id in (select * from table(select parsestring(LA_SOFTTYPE,';') from label where la_templatetype='彩盒标' and la_id='" + la_id + "') where COLUMN_VALUE is not null)", "select");
|
|
|
+ PrintLabel.DataSource = _dt;
|
|
|
+ PrintLabel.DisplayMember = "la_url";
|
|
|
+ PrintLabel.ValueMember = "la_id";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void SendCheck_Click(object sender, EventArgs e)
|