|
|
@@ -28,6 +28,8 @@ namespace UAS_MES.Make
|
|
|
|
|
|
System.DateTime[] indate;
|
|
|
|
|
|
+ string ma_unlimitin = "";
|
|
|
+
|
|
|
ApplicationClass lbl;
|
|
|
|
|
|
string oErrorMessage = "";
|
|
|
@@ -97,13 +99,14 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
//获取工单的其他信息
|
|
|
sql.Clear();
|
|
|
- sql.Append("select ma_code,nvl(mcd_okqty,0),ma_prodcode,pr_detail,");
|
|
|
+ sql.Append("select ma_code,nvl(mcd_okqty,0),ma_prodcode,pr_detail,nvl(ma_unlimitin,0)ma_unlimitin,");
|
|
|
sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
|
|
|
sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + oMakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
|
|
|
mapB = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
//如果有数据的话
|
|
|
if (mapB.Rows.Count > 0)
|
|
|
{
|
|
|
+ ma_unlimitin = mapB.Rows[0]["ma_unlimitin"].ToString();
|
|
|
//将工单的其他信息赋值到对应的控件
|
|
|
BaseUtil.SetFormValue(this.Controls, mapB);
|
|
|
//提示用户“<<工单号:取ma_makecode”
|
|
|
@@ -157,11 +160,11 @@ namespace UAS_MES.Make
|
|
|
sncode.Text = "";
|
|
|
sncode.Focus();
|
|
|
//刷新打印数量和剩余数量
|
|
|
- dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,nvl(ma_unlimitin,0)ma_unlimitin from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
|
|
|
BaseUtil.SetFormValue(Controls, dt);
|
|
|
mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
|
|
|
//IF 剩余数=0,则清空form中的数据, 提示用户“工单:xx已经打印完成,>>请输入SN”, 清空mapB,listC 中的数据
|
|
|
- if (int.Parse(mcd_remainqty.Text) == 0)
|
|
|
+ if (int.Parse(mcd_remainqty.Text) == 0 && ma_unlimitin == "0")
|
|
|
{
|
|
|
OperateResult.AppendText(">>工单:" + ma_code.Text + "打印完成,>>请输入SN\n", Color.Green);
|
|
|
}
|
|
|
@@ -190,7 +193,7 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
private void pr_code_TextChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
- dt = (DataTable)dh.ExecuteSql("select pl_labelcode ||':'||pl_labelname pl_name,pl_labelname,pl_labelcode, pl_indate,pl_labelurl from productlabel where pl_prodcode='" + ma_prodcode.Text + "'and PL_LABELTYPE='机身标' order by pl_isdefault desc", "select");
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select pl_labelcode ||':'||pl_labelname pl_name,pl_labelname,pl_labelcode, pl_indate,pl_labelurl from productlabel where pl_prodcode='" + ma_prodcode.Text + "'and PL_LABELTYPE='机身标' order by pl_isdefault desc", "select");
|
|
|
if (dt.Rows.Count == 0)
|
|
|
{
|
|
|
return;
|