From af6e1e7da3131b268b035401aeb75a6bab83f312 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 12 五月 2023 09:10:12 +0800
Subject: [PATCH] 末道工序入库时,可入库数量得等于出站汇报单数量,要是可入库数量小于汇报数量,则保存汇报单失败,报错提示,匹配生产汇报单数量不足出站数量,不允许入库。 --首道出站单删除的时候判断一下对应的金蝶云生产汇报单是否删除,要是没有删除本地出站单也不允许删除 --末道出站单删除的时候判断一下对应的金蝶云生产入库单是否删除,要是没有删除本地出站单也不允许删除 工序流转卡号改成年+月+四位流水号(23050001) 角色对应权限 设置功能 完善;
---
WorkM/流转卡管理/MES_StationEntrustInBill.cs | 73 +++++++++++++++++++++++++++---------
1 files changed, 54 insertions(+), 19 deletions(-)
diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustInBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustInBill.cs"
index 324ed87..dbc2232 100644
--- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustInBill.cs"
+++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationEntrustInBill.cs"
@@ -42,7 +42,24 @@
public void Sub_ClearBill()
{
DBUtility.Xt_BaseBillFun.Sub_ClearBill(gbUp);
+ DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage1);
+ DBUtility.Xt_BaseBillFun.Sub_ClearBill1(tabPage2);
+ initGrid();
+ txtHBarCode.Text = "";
+ txtHProcExchBillNo.Enabled = true;
+ txtHWWWorkOrderBillNo.Enabled = true;
+ txtHProcNo.Enabled = true;
+ txtHBarCode.Enabled = true;
+ tabControl1.SelectedIndex = 0;
txtHBarCode.Focus();
+ lngBillKey = 0;
+ }
+
+ //鍒濆鍖朑RID
+ private void initGrid()
+ {
+ DBUtility.Xt_BaseBillFun.initGridMESList(grdCardList, this.Name + "grdCardList");
+ grdCardList.DataSource = null;
}
//杩涚珯鎸夐挳
private void cmdOK_Click(object sender, EventArgs e)
@@ -508,8 +525,18 @@
if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify)
BillNew.omodel.HInterID = BillOld.omodel.HInterID;
//涓荤被璧嬪��
- BillNew.omodel.HYear = 2011;
- BillNew.omodel.HPeriod = 1;
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DBUtility.ClsPub.isDate(this.txtHStationInTime.Text), ref sYear, ref sPeriod, ref s) == false)
+ {
+ MessageBox.Show(s, "鎻愮ず");
+ return false;
+ }
+ //
+ BillNew.omodel.HYear = sYear;
+ BillNew.omodel.HPeriod = sPeriod;
BillNew.omodel.HBillNo = this.txtHBillNo.Text.Trim();
BillNew.omodel.HInnerBillNo = this.txtHInnerBillNo.Text.Trim();
BillNew.omodel.HICMOBillNo = this.txtHICMOBillNo.Text.Trim();
@@ -1165,6 +1192,7 @@
if (e.KeyCode == Keys.Enter)
{
cmdOK.Select();
+ txtHWWWorkOrderBillNo.Focus();
}
}
@@ -1315,23 +1343,23 @@
MessageBox.Show("娌℃湁褰曞叆娴佽浆鍗″彿鎴栬�呮祦姘村彿");
return;
}
- //鏍规嵁宸ュ彿鑾峰彇濮斿宸ュ崟 鍙婂唴鐮侊紝瀛愬唴鐮�
- SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
- DataSet ds;
- ds = oCn.RunProcReturn("exec h_p_WW_GetWWWorkBillInfoByNo '" + txtHWWWorkOrderBillNo.Text + "'," + lngBillKey.ToString() + "," + lngBillSubKey.ToString(), "h_p_WW_GetWWWorkBillInfoByNo");
- if (ds == null)
- {
- MessageBox.Show("娌℃湁鎵惧埌瀵瑰簲鐨勫澶栧伐鍗曪紒");
- return;
- }
- if (ds.Tables[0].Rows.Count > 0)
- {
- txtHWWWorkOrderBillNo.Text = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]);
- lngBillKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]);
- lngBillSubKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HEntryID"]);
- txtHWWWorkOrderBillNo.Enabled = false;
- }
-
+ ////鏍规嵁宸ュ彿鑾峰彇濮斿宸ュ崟 鍙婂唴鐮侊紝瀛愬唴鐮�
+ //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //DataSet ds;
+ //ds = oCn.RunProcReturn("exec h_p_WW_GetWWWorkBillInfoByNo '" + txtHWWWorkOrderBillNo.Text + "'," + lngBillKey.ToString() + "," + lngBillSubKey.ToString(), "h_p_WW_GetWWWorkBillInfoByNo");
+ //if (ds == null)
+ //{
+ // MessageBox.Show("娌℃湁鎵惧埌瀵瑰簲鐨勫澶栧伐鍗曪紒");
+ // return;
+ //}
+ //if (ds.Tables[0].Rows.Count > 0)
+ //{
+ // txtHWWWorkOrderBillNo.Text = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]);
+ // lngBillKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]);
+ // lngBillSubKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HEntryID"]);
+ // txtHWWWorkOrderBillNo.Enabled = false;
+ //}
+ txtHRemark.Focus();
}
}
@@ -1414,6 +1442,7 @@
if (Ds == null || Ds.Tables[0].Rows.Count == 0)
{
txtHProcExchBillNo.Text = "";
+ txtHBarCode.Text = "";
MessageBox.Show("鏈煡璇㈠埌娴佽浆鍗′俊鎭紒");
return;
}
@@ -1449,5 +1478,11 @@
//}
}
+ //鏂板
+ private void cmdXZ_Click(object sender, EventArgs e)
+ {
+ this.Sub_AddBill();
+ }
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1