From 2ac90163499626a2e2c4b4a46219b944dc6c9b17 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 06 九月 2023 13:45:30 +0800
Subject: [PATCH] 1
---
WarM/条码打印/Kf_WeighToBarCode_StationOutBill.cs | 184 +++++++++++++
WarM/条码打印/Kf_WeighToBarCode.cs | 11
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 2
WarM/条码打印/Kf_WeighToBarCode_StationOutBill.designer.cs | 164 ++++++++++--
WarM/条码打印/Kf_WeighToBarCode_StationOutBill.resx | 45 +++
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs | 1
WebAPI/Controllers/LMESController.cs | 268 ++++++++++++++++++++
WebAPI/Controllers/BaseSet/Gy_SourceController.cs | 81 ++++++
8 files changed, 721 insertions(+), 35 deletions(-)
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
index 8f913b6..9be67cd 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
@@ -523,6 +523,17 @@
//鏉$爜鐢熸垚鍓嶅垽鏂�
private bool Sub_AllowSave()
{
+ //鍒ゆ柇褰撳墠鍗曟嵁ID鏄惁宸蹭笂浼犵敓鎴愬崟鎹�
+ DataSet Ds = oCn.RunProcReturn("select top 1 1 from KF_WeighSource_Temp with(nolock) where HInterID=" + HInterID.ToString() + " and HRelationInterID=1 ", "KF_WeighSource_Temp", ref DBUtility.ClsPub.sExeReturnInfo);
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ }
+ else
+ {
+ MessageBox.Show("褰撳墠鏉$爜璁板綍宸叉崲鐝笂浼犵敓鎴愬崟鎹紝璇烽��鍑哄悗閲嶆柊杩涘叆璇ユā鍧楄繘琛屾潯鐮佺敓鎴愭搷浣滐紒", "鎻愮ず");
+ return false;
+ }
+
if (HInterID==0 || HBillNo=="")
{
MessageBox.Show("鑾峰彇鏉$爜瀵瑰簲鍗曟嵁ID鎴栧崟鎹彿澶辫触锛岃閲嶆柊鍒锋柊鐣岄潰锛�", "鎻愮ず");
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.cs"
index 05279c5..11b1e6a 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.cs"
@@ -35,6 +35,7 @@
public Int64 HProcessExchangeEntryID = 0;
public Int64 HSupID = 0;
public double HSourceQty = 0;
+ public double HMaterWeight = 0; //鐗╂枡鍏嬮噸
public string HCusMaterName = ""; //瀹㈡埛鐗╂枡鍚嶇О
public string HCusModel = ""; //瀹㈡埛瑙勬牸鍨嬪彿
public string HMaker = DBUtility.ClsPub.CurUserName;
@@ -522,7 +523,7 @@
if (chkHDYFlag.Checked == true)
{
//鎵撳嵃鏉$爜
- Sub_SetReport("鐗╂枡鏉$爜");
+ Sub_SetReport("鍗婃垚鍝佹潯鐮�");
Report.Print(false);
Thread.Sleep(1000);
}
@@ -542,6 +543,8 @@
}
txtHQty.Text = "";
+ txtHWeightQyt.Text = "";
+ txtHBarcodeNo.Text = "";
txtHQty.Focus();
}
@@ -574,12 +577,37 @@
MessageBox.Show("璇疯緭鍏ユ纭背鏁帮紒", "鎻愮ず");
return false;
}
+ else if (DBUtility.ClsPub.isDoule(txtHWeightQyt.Text) == 0)
+ {
+ MessageBox.Show("璇疯緭鍏ユ纭噸閲忥紒", "鎻愮ず");
+ return false;
+ }
+ else if (DBUtility.ClsPub.isInt(txtHBarcodeNo.Text) == 0)
+ {
+ MessageBox.Show("璇疯緭鍏ュ寘鍙凤紒", "鎻愮ず");
+ return false;
+ }
else if (DBUtility.ClsPub.isDoule(txtHProcID.Tag) == 0)
{
MessageBox.Show("璇峰厛閫夋嫨宸ュ簭锛�", "鎻愮ず");
return false;
}
+ //瀹為檯鍏嬮噸=閲嶉噺/绫虫暟*1000锛屽疄闄呭厠閲嶈秴鍑虹墿鏂欑淮鎶ゅ厠閲嶇殑鐧惧垎涔嬩簩鍗佹垨涓嶈冻鐗╂枡缁存姢鍏嬮噸鐨勭櫨鍒嗕箣鍏崄锛岄璀︽彁绀�
+ double sQty = 0; //瀹為檯鍏嬮噸
+ sQty = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text) / DBUtility.ClsPub.isDoule(txtHQty.Text) * 1000;
+
+ if (sQty > HMaterWeight * 1.2 || sQty < HMaterWeight * 0.8)
+ {
+ if (MessageBox.Show("鐗╂枡缁存姢鍏嬮噸涓猴細" + HMaterWeight.ToString() + "锛屽疄闄呭厠閲嶄负锛�" + sQty.ToString() + "锛屾墍杈撳叆瀹為檯鍏嬮噸瓒呭嚭鐗╂枡缁存姢鍏嬮噸鐨勭櫨鍒嗕箣浜屽崄鎴栦笉瓒崇墿鏂欑淮鎶ゅ厠閲嶇殑鐧惧垎涔嬪叓鍗侊紝璇锋鏌ヨ緭鍏ョ殑鏁版嵁鏄惁姝g‘锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
return true;
}
@@ -641,9 +669,11 @@
string HBarCodeType = "";
Int64 HMaterID2 = 0;
double HQty = 0; //绫虫暟
+ double HMaterialJQty = 0; //閲嶉噺
Int64 HGroupID = 0;
Int64 HDeptID = 0;
string HProcessExchangeBillNo = "";
+ Int64 HBarcodeNo = 0; //鍖呮暟
string HMaterName = "";
string HMaterModel = "";
Int64 HProcID = 0;
@@ -655,9 +685,11 @@
HBarCodeType = DBUtility.ClsPub.isStrNull(cmbHBarCodeType.Text);
HMaterID2 = DBUtility.ClsPub.isLong(txtHMaterNumber.Tag);
HQty = DBUtility.ClsPub.isDoule(txtHQty.Text);
+ HMaterialJQty = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text);
HGroupID = DBUtility.ClsPub.isLong(txtHGroupID.Tag);
HDeptID = DBUtility.ClsPub.isLong(txtHDeptName.Tag);
HProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text);
+ HBarcodeNo = DBUtility.ClsPub.isLong(txtHBarcodeNo.Text);
HMaterName = DBUtility.ClsPub.isStrNull(txtHMaterName.Text);
HMaterModel = DBUtility.ClsPub.isStrNull(txtHMaterModel.Text);
HProcID = DBUtility.ClsPub.isLong(txtHProcID.Tag);
@@ -683,8 +715,8 @@
+ " '" + HBarCode + "','" + HBarCodeType + "'," + HMaterID2.ToString() + "," + HUnitID.ToString() + "," + HQty.ToString()
+ ",'" + HBatchNo + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + HMaker + "',getdate(),0," + HQty.ToString()
+ ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "',''"
- + ", 1,1," + HDeptID.ToString() + ",0,0,''"
- + ", 0,'',getdate(),'','" + sDate + "',0,0"
+ + ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + ",0,0,''"
+ + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + ",0"
+ ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0"
+ ", " + HProcessExchangeInterID.ToString() + "," + HProcessExchangeEntryID.ToString() + ",'" + HProcessExchangeBillNo + "',0,'" + HCusMaterName + "','" + HCusModel + "'"
+ ", " + HProcID.ToString() + "," + HCenterID.ToString() + "," + HSourceID.ToString() + "," + HProcNo.ToString() + "," + HSourceQty.ToString()
@@ -727,6 +759,7 @@
HSourceQty = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("鏁伴噺")].Value);
HProcessExchangeInterID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HProcessExchangeInterID")].Value);
HSupID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HSupID")].Value);
+ HMaterWeight = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HMaterWeight")].Value);
HCusMaterName = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusMaterName")].Value);
HCusModel = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusModel")].Value);
}
@@ -928,6 +961,50 @@
#endregion
+ #region //娴佹按鍙锋壂鎻�
+ private void txtHProcNo_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.KeyCode == Keys.Return)
+ {
+ if (txtHProcNo.Text == "")
+ {
+ MessageBox.Show("娴佹按鍙蜂负绌猴紝璇疯緭鍏ユ祦姘村彿锛�");
+ return;
+ }
+ //鏍规嵁杞崱涓籌D銆佹祦姘村彿甯﹀嚭娴佽浆鍗′笂鐩稿簲宸ュ簭銆佺彮缁勩�佸伐浣滀腑蹇冦�佺敓浜ц祫婧�
+ DataSet Ds = oCn.RunProcReturn("exec h_p_KF_GetBCPWeighSource_HProcNo " + HProcessExchangeInterID.ToString() + "," + txtHProcNo.Text, "h_p_KF_GetBCPWeighSource_HProcNo");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ txtHProcNo.Text = "";
+ txtHProcID.Tag = 0;
+ txtHProcID.Text = "";
+ txtHCenterID.Tag = 0;
+ txtHCenterID.Text = "";
+ txtHGroupID.Tag = 0;
+ txtHGroupID.Text = "";
+ txtHSourceID.Tag = 0;
+ txtHSourceID.Text = "";
+ MessageBox.Show("鎵�杈撳叆娴佹按鍙蜂笉鍦ㄥ綋鍓嶅伐搴忔祦杞崱涓嬶紝璇烽噸鏂拌緭鍏ユ祦姘村彿锛�");
+ return;
+ }
+ else
+ {
+ HProcessExchangeEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceEntryID"]);
+ txtHProcNo.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcNo"]);
+ txtHProcID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcID"]);
+ txtHProcID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcName"]);
+ txtHCenterID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCenterID"]);
+ txtHCenterID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCenterName"]);
+ txtHGroupID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HGroupID"]);
+ txtHGroupID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HGroupName"]);
+ txtHSourceID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceID"]);
+ txtHSourceID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSourceName"]);
+ }
+ }
+ }
+
+ #endregion
+
#region //宸ュ簭閫夋嫨
private void cmdHProcID_Click(object sender, EventArgs e)
@@ -970,5 +1047,106 @@
}
#endregion
+
+ #region //鐢熶骇璧勬簮閫夋嫨
+
+ private void txtHSourceID_KeyPress(object sender, KeyPressEventArgs e)
+ {
+ if (e.KeyChar == (char)Keys.Return)
+ {
+ if (DBUtility.ClsPub.isStrNull(txtHSourceID.Text) != "")
+ {
+ DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View();
+ if (oSource.GetInfoByID(DBUtility.ClsPub.isLong(txtHSourceID.Text.Replace("HCX", ""))))
+ {
+ txtHSourceID.Text = oSource.omodel.HName;
+ txtHSourceID.Tag = oSource.omodel.HItemID;
+ }
+ else
+ {
+ txtHSourceID.Text = "";
+ txtHSourceID.Tag = 0;
+ }
+ }
+ else
+ {
+ txtHSourceID.Text = "";
+ txtHSourceID.Tag = 0;
+ }
+ }
+ }
+
+ private void txtHSourceID_Click(object sender, EventArgs e)
+ {
+ txtHSourceID.SelectAll();
+ }
+
+ private void txtHSourceID_TextChanged(object sender, EventArgs e)
+ {
+ BLL.ClsPub_BLL.Sub_ClearText(txtHSourceID);
+ }
+
+ private void cmdHSourceID_Click(object sender, EventArgs e)
+ {
+ DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View();
+ if (oSource.RefreshView())
+ {
+ txtHSourceID.Text = oSource.oModel.HName;
+ txtHSourceID.Tag = oSource.oModel.HItemID.ToString();
+ }
+ else
+ {
+ txtHSourceID.Text = "";
+ }
+ }
+
+ #endregion
+
+ #region //鐢熶骇鐝粍閫夋嫨
+
+ private void cmdHGroupID_Click(object sender, EventArgs e)
+ {
+ DAL.ClsGy_Group_View oGroup = new DAL.ClsGy_Group_View();
+ if (oGroup.RefreshView())
+ {
+ txtHGroupID.Text = oGroup.oModel.HName;
+ txtHGroupID.Tag = oGroup.oModel.HItemID.ToString();
+ }
+ else
+ {
+ txtHGroupID.Text = "";
+ }
+ }
+
+ private void txtHGroupID_TextChanged(object sender, EventArgs e)
+ {
+ BLL.ClsPub_BLL.Sub_ClearText(txtHGroupID);
+ }
+
+ #endregion
+
+ #region //宸ヤ綔涓績閫夋嫨
+
+ private void cmdHCenterID_Click(object sender, EventArgs e)
+ {
+ DAL.ClsGy_WorkCenter_View oWorkCenter = new DAL.ClsGy_WorkCenter_View();
+ if (oWorkCenter.RefreshView())
+ {
+ txtHCenterID.Text = oWorkCenter.oModel.HName;
+ txtHCenterID.Tag = oWorkCenter.oModel.HItemID.ToString();
+ }
+ else
+ {
+ txtHCenterID.Text = "";
+ }
+ }
+
+ private void txtHCenterID_TextChanged(object sender, EventArgs e)
+ {
+ BLL.ClsPub_BLL.Sub_ClearText(txtHCenterID);
+ }
+
+
+ #endregion
}
}
\ No newline at end of file
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.designer.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.designer.cs"
index ec7a0b6..3575e62 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.designer.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.designer.cs"
@@ -30,8 +30,8 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Kf_WeighToBarCode_StationOutBill));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.Tool = new System.Windows.Forms.ToolStrip();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.mrlk = new System.Windows.Forms.ToolStripButton();
@@ -55,6 +55,13 @@
this.label4 = new System.Windows.Forms.Label();
this.txtHMaterNumber = new System.Windows.Forms.TextBox();
this.gbUp = new System.Windows.Forms.GroupBox();
+ this.cmdHCenterID = new System.Windows.Forms.Button();
+ this.cmdHGroupID = new System.Windows.Forms.Button();
+ this.cmdHSourceID = new System.Windows.Forms.Button();
+ this.label15 = new System.Windows.Forms.Label();
+ this.txtHBarcodeNo = new System.Windows.Forms.TextBox();
+ this.label18 = new System.Windows.Forms.Label();
+ this.txtHWeightQyt = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txtHProcNo = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
@@ -270,14 +277,14 @@
this.grdMain.AllowUserToDeleteRows = false;
this.grdMain.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
this.grdMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
- dataGridViewCellStyle1.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
- dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.grdMain.DefaultCellStyle = dataGridViewCellStyle1;
+ dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+ dataGridViewCellStyle3.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.grdMain.DefaultCellStyle = dataGridViewCellStyle3;
this.grdMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.grdMain.Location = new System.Drawing.Point(3, 3);
this.grdMain.Margin = new System.Windows.Forms.Padding(0);
@@ -315,7 +322,7 @@
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ForeColor = System.Drawing.Color.Black;
- this.label3.Location = new System.Drawing.Point(272, 88);
+ this.label3.Location = new System.Drawing.Point(662, 116);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 52;
@@ -325,10 +332,10 @@
//
this.txtHProcID.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtHProcID.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.txtHProcID.Location = new System.Drawing.Point(303, 84);
+ this.txtHProcID.Location = new System.Drawing.Point(693, 112);
this.txtHProcID.Name = "txtHProcID";
this.txtHProcID.ReadOnly = true;
- this.txtHProcID.Size = new System.Drawing.Size(112, 21);
+ this.txtHProcID.Size = new System.Drawing.Size(108, 21);
this.txtHProcID.TabIndex = 53;
this.txtHProcID.TextChanged += new System.EventHandler(this.txtHProcID_TextChanged);
//
@@ -356,6 +363,13 @@
// gbUp
//
this.gbUp.BackColor = System.Drawing.Color.Transparent;
+ this.gbUp.Controls.Add(this.cmdHCenterID);
+ this.gbUp.Controls.Add(this.cmdHGroupID);
+ this.gbUp.Controls.Add(this.cmdHSourceID);
+ this.gbUp.Controls.Add(this.label15);
+ this.gbUp.Controls.Add(this.txtHBarcodeNo);
+ this.gbUp.Controls.Add(this.label18);
+ this.gbUp.Controls.Add(this.txtHWeightQyt);
this.gbUp.Controls.Add(this.label17);
this.gbUp.Controls.Add(this.txtHProcNo);
this.gbUp.Controls.Add(this.label16);
@@ -399,12 +413,88 @@
this.gbUp.TabIndex = 58;
this.gbUp.TabStop = false;
//
+ // cmdHCenterID
+ //
+ this.cmdHCenterID.BackColor = System.Drawing.Color.Transparent;
+ this.cmdHCenterID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHCenterID.Image")));
+ this.cmdHCenterID.ImageAlign = System.Drawing.ContentAlignment.TopRight;
+ this.cmdHCenterID.Location = new System.Drawing.Point(409, 111);
+ this.cmdHCenterID.Name = "cmdHCenterID";
+ this.cmdHCenterID.Size = new System.Drawing.Size(22, 22);
+ this.cmdHCenterID.TabIndex = 332;
+ this.cmdHCenterID.UseVisualStyleBackColor = false;
+ this.cmdHCenterID.Click += new System.EventHandler(this.cmdHCenterID_Click);
+ //
+ // cmdHGroupID
+ //
+ this.cmdHGroupID.BackColor = System.Drawing.Color.Transparent;
+ this.cmdHGroupID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHGroupID.Image")));
+ this.cmdHGroupID.ImageAlign = System.Drawing.ContentAlignment.TopRight;
+ this.cmdHGroupID.Location = new System.Drawing.Point(201, 111);
+ this.cmdHGroupID.Name = "cmdHGroupID";
+ this.cmdHGroupID.Size = new System.Drawing.Size(22, 22);
+ this.cmdHGroupID.TabIndex = 331;
+ this.cmdHGroupID.UseVisualStyleBackColor = false;
+ this.cmdHGroupID.Click += new System.EventHandler(this.cmdHGroupID_Click);
+ //
+ // cmdHSourceID
+ //
+ this.cmdHSourceID.BackColor = System.Drawing.Color.Transparent;
+ this.cmdHSourceID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHSourceID.Image")));
+ this.cmdHSourceID.ImageAlign = System.Drawing.ContentAlignment.TopRight;
+ this.cmdHSourceID.Location = new System.Drawing.Point(604, 111);
+ this.cmdHSourceID.Name = "cmdHSourceID";
+ this.cmdHSourceID.Size = new System.Drawing.Size(22, 22);
+ this.cmdHSourceID.TabIndex = 330;
+ this.cmdHSourceID.UseVisualStyleBackColor = false;
+ this.cmdHSourceID.Click += new System.EventHandler(this.cmdHSourceID_Click);
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.label15.ForeColor = System.Drawing.Color.Black;
+ this.label15.Location = new System.Drawing.Point(466, 88);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(29, 12);
+ this.label15.TabIndex = 328;
+ this.label15.Text = "鍖呭彿";
+ //
+ // txtHBarcodeNo
+ //
+ this.txtHBarcodeNo.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.txtHBarcodeNo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.txtHBarcodeNo.Location = new System.Drawing.Point(498, 84);
+ this.txtHBarcodeNo.Name = "txtHBarcodeNo";
+ this.txtHBarcodeNo.Size = new System.Drawing.Size(128, 21);
+ this.txtHBarcodeNo.TabIndex = 329;
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.label18.ForeColor = System.Drawing.Color.Black;
+ this.label18.Location = new System.Drawing.Point(272, 88);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(29, 12);
+ this.label18.TabIndex = 326;
+ this.label18.Text = "閲嶉噺";
+ //
+ // txtHWeightQyt
+ //
+ this.txtHWeightQyt.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.txtHWeightQyt.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.txtHWeightQyt.Location = new System.Drawing.Point(303, 84);
+ this.txtHWeightQyt.Name = "txtHWeightQyt";
+ this.txtHWeightQyt.Size = new System.Drawing.Size(128, 21);
+ this.txtHWeightQyt.TabIndex = 327;
+ //
// label17
//
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.ForeColor = System.Drawing.Color.Black;
- this.label17.Location = new System.Drawing.Point(454, 88);
+ this.label17.Location = new System.Drawing.Point(650, 88);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(41, 12);
this.label17.TabIndex = 324;
@@ -414,18 +504,18 @@
//
this.txtHProcNo.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtHProcNo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.txtHProcNo.Location = new System.Drawing.Point(498, 84);
+ this.txtHProcNo.Location = new System.Drawing.Point(693, 84);
this.txtHProcNo.Name = "txtHProcNo";
- this.txtHProcNo.ReadOnly = true;
this.txtHProcNo.Size = new System.Drawing.Size(128, 21);
this.txtHProcNo.TabIndex = 325;
+ this.txtHProcNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtHProcNo_KeyDown);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label16.ForeColor = System.Drawing.Color.Black;
- this.label16.Location = new System.Drawing.Point(626, 88);
+ this.label16.Location = new System.Drawing.Point(27, 144);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(65, 12);
this.label16.TabIndex = 320;
@@ -435,7 +525,7 @@
//
this.txtHICMOBillNo.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtHICMOBillNo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.txtHICMOBillNo.Location = new System.Drawing.Point(693, 84);
+ this.txtHICMOBillNo.Location = new System.Drawing.Point(95, 140);
this.txtHICMOBillNo.Name = "txtHICMOBillNo";
this.txtHICMOBillNo.ReadOnly = true;
this.txtHICMOBillNo.Size = new System.Drawing.Size(128, 21);
@@ -459,15 +549,17 @@
this.txtHCenterID.Location = new System.Drawing.Point(303, 112);
this.txtHCenterID.Name = "txtHCenterID";
this.txtHCenterID.ReadOnly = true;
- this.txtHCenterID.Size = new System.Drawing.Size(128, 21);
+ this.txtHCenterID.Size = new System.Drawing.Size(108, 21);
this.txtHCenterID.TabIndex = 319;
+ this.txtHCenterID.TextChanged += new System.EventHandler(this.txtHCenterID_TextChanged);
//
// cmdHProcID
//
this.cmdHProcID.BackColor = System.Drawing.Color.Transparent;
+ this.cmdHProcID.Enabled = false;
this.cmdHProcID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHProcID.Image")));
this.cmdHProcID.ImageAlign = System.Drawing.ContentAlignment.TopRight;
- this.cmdHProcID.Location = new System.Drawing.Point(409, 83);
+ this.cmdHProcID.Location = new System.Drawing.Point(799, 111);
this.cmdHProcID.Name = "cmdHProcID";
this.cmdHProcID.Size = new System.Drawing.Size(22, 22);
this.cmdHProcID.TabIndex = 317;
@@ -570,9 +662,11 @@
this.txtHSourceID.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.txtHSourceID.Location = new System.Drawing.Point(498, 112);
this.txtHSourceID.Name = "txtHSourceID";
- this.txtHSourceID.ReadOnly = true;
- this.txtHSourceID.Size = new System.Drawing.Size(128, 21);
+ this.txtHSourceID.Size = new System.Drawing.Size(108, 21);
this.txtHSourceID.TabIndex = 151;
+ this.txtHSourceID.Click += new System.EventHandler(this.txtHSourceID_Click);
+ this.txtHSourceID.TextChanged += new System.EventHandler(this.txtHSourceID_TextChanged);
+ this.txtHSourceID.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtHSourceID_KeyPress);
//
// label9
//
@@ -592,8 +686,9 @@
this.txtHGroupID.Location = new System.Drawing.Point(95, 112);
this.txtHGroupID.Name = "txtHGroupID";
this.txtHGroupID.ReadOnly = true;
- this.txtHGroupID.Size = new System.Drawing.Size(128, 21);
+ this.txtHGroupID.Size = new System.Drawing.Size(108, 21);
this.txtHGroupID.TabIndex = 149;
+ this.txtHGroupID.TextChanged += new System.EventHandler(this.txtHGroupID_TextChanged);
//
// label7
//
@@ -733,14 +828,14 @@
this.grdSub.AllowUserToDeleteRows = false;
this.grdSub.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
this.grdSub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
- dataGridViewCellStyle2.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
- dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.grdSub.DefaultCellStyle = dataGridViewCellStyle2;
+ dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+ dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
+ dataGridViewCellStyle4.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
+ dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+ this.grdSub.DefaultCellStyle = dataGridViewCellStyle4;
this.grdSub.Dock = System.Windows.Forms.DockStyle.Fill;
this.grdSub.Location = new System.Drawing.Point(0, 73);
this.grdSub.Margin = new System.Windows.Forms.Padding(0);
@@ -973,5 +1068,12 @@
private System.Windows.Forms.TextBox txtHICMOBillNo;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txtHProcNo;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.TextBox txtHBarcodeNo;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.TextBox txtHWeightQyt;
+ private System.Windows.Forms.Button cmdHSourceID;
+ private System.Windows.Forms.Button cmdHCenterID;
+ private System.Windows.Forms.Button cmdHGroupID;
}
}
\ No newline at end of file
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.resx" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.resx"
index 0ff34c1..5459c55 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.resx"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.resx"
@@ -435,6 +435,51 @@
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>102, 16</value>
</metadata>
+ <data name="cmdHCenterID.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ R0lGODlhEAAQAIZBAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp
+ /yOn/2jD/q3h/le8/sz3/5zg/7bt/73l/7Xs/2fH/4DT///bnZXb/97//2rK/wWb/8np/6zf/1S//77x
+ /73w/8Xv/1+//wmc/1jA/5Db/5LV/6rn/6Xb/zCt/33O/9X3/4LO/7jj/4PT/x+m/7nk/3XP/3PJ/3bQ
+ /6Tb/5Td/zCv/3fM/029/4za/6Pf/ZHc/6Pk/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQB
+ AABBACwAAAAAEAAQAAAIqACDCBwoMIDBAAQTBjEYIcKECQYVLmQQ44KJFhBmQECYMAAOEAJYnPjgwAHH
+ gQEYqAhBA4YOBDwQIDg5cYcLGyg8LOixYAFNABJkZBBRI8cDEg98ACAIlIOGGylWGOhgwMBSphUq/ACC
+ wQAFClcFEiAAQICAEhZGvDAbloCCDQUAlDUrQO5AtwkKHBgQRK7duwryHmjAV2IQAoIJGxY4QK/ixYwH
+ FIYcEAA7
+</value>
+ </data>
+ <data name="cmdHGroupID.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ R0lGODlhEAAQAIZBAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp
+ /yOn/2jD/q3h/le8/sz3/5zg/7bt/73l/7Xs/2fH/4DT///bnZXb/97//2rK/wWb/8np/6zf/1S//77x
+ /73w/8Xv/1+//wmc/1jA/5Db/5LV/6rn/6Xb/zCt/33O/9X3/4LO/7jj/4PT/x+m/7nk/3XP/3PJ/3bQ
+ /6Tb/5Td/zCv/3fM/029/4za/6Pf/ZHc/6Pk/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQB
+ AABBACwAAAAAEAAQAAAIqACDCBwoMIDBAAQTBjEYIcKECQYVLmQQ44KJFhBmQECYMAAOEAJYnPjgwAHH
+ gQEYqAhBA4YOBDwQIDg5cYcLGyg8LOixYAFNABJkZBBRI8cDEg98ACAIlIOGGylWGOhgwMBSphUq/ACC
+ wQAFClcFEiAAQICAEhZGvDAbloCCDQUAlDUrQO5AtwkKHBgQRK7duwryHmjAV2IQAoIJGxY4QK/ixYwH
+ FIYcEAA7
+</value>
+ </data>
+ <data name="cmdHSourceID.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ R0lGODlhEAAQAIZBAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp
+ /yOn/2jD/q3h/le8/sz3/5zg/7bt/73l/7Xs/2fH/4DT///bnZXb/97//2rK/wWb/8np/6zf/1S//77x
+ /73w/8Xv/1+//wmc/1jA/5Db/5LV/6rn/6Xb/zCt/33O/9X3/4LO/7jj/4PT/x+m/7nk/3XP/3PJ/3bQ
+ /6Tb/5Td/zCv/3fM/029/4za/6Pf/ZHc/6Pk/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQB
+ AABBACwAAAAAEAAQAAAIqACDCBwoMIDBAAQTBjEYIcKECQYVLmQQ44KJFhBmQECYMAAOEAJYnPjgwAHH
+ gQEYqAhBA4YOBDwQIDg5cYcLGyg8LOixYAFNABJkZBBRI8cDEg98ACAIlIOGGylWGOhgwMBSphUq/ACC
+ wQAFClcFEiAAQICAEhZGvDAbloCCDQUAlDUrQO5AtwkKHBgQRK7duwryHmjAV2IQAoIJGxY4QK/ixYwH
+ FIYcEAA7
+</value>
+ </data>
<data name="cmdHProcID.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhEAAQAIZBAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp
diff --git a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
index bbde934..5956b12 100644
--- a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
@@ -307,6 +307,87 @@
return model;
}
+ #region 鐢熶骇璧勬簮 鏍戝舰鍥�
+ public class TreeModel
+ {
+ public string id { get; set; }
+ public string title { get; set; }
+ public List<TreeModel> children = new List<TreeModel>();
+ }
+ [Route("Gy_Source/Gy_SourceTreeList")]
+ [HttpGet]
+ public object Gy_SourceTreeList()
+ {
+ try
+ {
+ string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source order by hnumber");
+
+ ds = oCN.RunProcReturn(sql1, "Gy_Source");
+
+ List<TreeModel> treeModels = new List<TreeModel>();
+ TreeModel first = new TreeModel();
+ first.id = "0";
+ first.title = "鐢熶骇璧勬簮璁剧疆";
+ treeModels.Add(first);
+
+ foreach (DataRow row in ds.Tables[0].Rows)
+ {
+ var strLen = row["hitemid"].ToString().Split('.');
+ if (strLen.Length == 1)
+ {
+ TreeModel tree = new TreeModel();
+ tree.id = row["hitemid"].ToString();
+ tree.title = row["hname"].ToString();
+ treeModels[0].children.Add(tree);
+ }
+ }
+ digui(ds.Tables[0], treeModels[0].children, 2);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = Newtonsoft.Json.JsonConvert.SerializeObject(treeModels);
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 閫掑綊鍑芥暟
+ /// </summary>
+ public void digui(DataTable dt, List<TreeModel> tree, int num)
+ {
+ for (int m = 0; m < tree.Count; m++)
+ {
+ tree[m].children = new List<TreeModel>();
+ for (int i = 0; i < dt.Rows.Count; i++)//绗竴娆″惊鐜紝寰楀埌鎵�鏈夋牴鑺傜偣鐨勫瓙闆�
+ {
+ var strLen = dt.Rows[i]["hnumber"].ToString().Split('.');
+ if (strLen.Length == num && dt.Rows[i]["hnumber"].ToString().Contains(tree[m].id + "."))
+ {
+ TreeModel tbjson = new TreeModel();
+ tbjson.id = dt.Rows[i]["hitemid"].ToString();
+ tbjson.title = dt.Rows[i]["hname"].ToString();
+ tree[m].children.Add(tbjson);
+ }
+ }
+ var strLens = tree[m].id.Split('.');
+ for (int i = 0; i < tree[m].children.Count; i++)
+ {
+ digui(dt, tree[m].children, strLens.Length + 2);//鍐嶆鐢ㄥ瓙闆嗗幓寰幆锛屾嬁鍑哄瓙闆嗙殑瀛愰泦
+ }
+ }
+
+ }
+ #endregion
+
/// <summary>
/// 鐢熶骇璧勬簮鍒犻櫎鍔熻兘
/// </summary>
diff --git a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
index 9e8244e..22547e6 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -69,6 +69,7 @@
oItem.HBillSubType = OperationType=="5"?"SUB":"3772";
oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+ oItem.HDate = OperationType == "5" ? DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")) : oItem.HDate;
if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
{
objJsonResult.code = "0";
diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
index 118d58b..364928c 100644
--- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
+++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -149,7 +149,7 @@
long HInterID = mainList[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
string HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
- DateTime HDate = mainList[0].HDate;//鏃ユ湡
+ DateTime HDate = OperationType == 4 ? DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")) : mainList[0].HDate;//鏃ユ湡
int HYear = DateTime.Now.Year;
double HPeriod = DateTime.Now.Month;
string HRemark = mainList[0].HRemark;//澶囨敞
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 6b74fad..12bc5d0 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -117,6 +117,274 @@
}
}
+
+ /// <summary>
+ /// 宸ュ簭娴佽浆鍗″彧鏄剧ず宸ュ簭鏌撳巶鐨勬暟鎹�
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <param name="user"></param>
+ /// <returns></returns>
+ [Route("LEMS/MES_ProcessExchangeBillList_Json")]
+ [HttpGet]
+ public object MES_ProcessExchangeBillList_Json(string sWhere, string user,int OperationType)
+ {
+ DataSet ds;
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (OperationType == 1) {
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇瀹㈡埛涓轰箶涓�
+ if (oSystemParameter.omodel.WMS_CampanyName == "涔斾竴")
+ {
+ sWhere += " and 宸ュ簭='鏌撳巶' ";
+
+ }
+ else {
+ sWhere += " and 宸ュ簭='绮楃(' ";
+ }
+ }
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillList where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillList");
+ }
+ else
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+ if (oSystemParameter.omodel.WMS_CampanyName == "涔斾竴")
+ {
+
+
+ }
+ }
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeArrangementList where 1 = 1 " + sWhere , "h_v_Sc_ProcessExch_v_Sc_ProcessExchangeArrangementListhangeBillList");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "寮傚父锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #region 鎺掔几鍔熻兘
+ [Route("LEMS/ProcessExchangeArrangement_Add")]
+ [HttpGet]
+ public object ProcessExchangeArrangement_Add(string HInterID_S, int HSourceID,long HOrgID,string user)
+ {
+ DataSet ds;
+ DataSet ds1;
+ try
+ {
+ var HNum = HInterID_S.Split(',');
+
+ oCN.BeginTran();
+
+ for (int j = 0; j < HNum.Length; j++)
+ {
+ long HInterID = long.Parse(HNum[j].Split('|')[0]);
+ long HEntryID = long.Parse(HNum[j].Split('|')[1]);
+ ds = oCN.RunProcReturn(@"select a.HMaterID,b.HProcID,a.HBillNo from Sc_ProcessExchangeBillMain a inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID
+where a.HInterID=" + HInterID + " and b.HEntryID=" + HEntryID, "Sc_ProcessExchangeBillMain");
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ユ棤姝ゅ伐搴忔祦杞崱锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鏌ヨ瀛愬伐鑹鸿矾绾跨墿鏂� 宸ュ簭
+ string HMaterID = ds.Tables[0].Rows[0]["HMaterID"].ToString();
+ string HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString();
+
+ ds1 = oCN.RunProcReturn(@"select a.HMaterID,a.HMainProcID,b.* from Gy_RoutingBillMain a inner join Gy_RoutingBillSub b on a.HInterID=b.HInterID where a.HMaterID=" + HMaterID + " and a.HMainProcID=" + HProcID + " and a.HBillSubType='SUB'", "Gy_RoutingBillMain");
+ if (ds1.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鐩稿搴旂殑榛樿宸ヨ壓璺嚎,璇峰厛璁剧疆宸ヨ壓璺嚎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DAL.ClsSc_ProcessExchangeBill oBill = new DAL.ClsSc_ProcessExchangeBill();
+ string sReturn = "";
+ DBUtility.ClsPub.HOrgID = HOrgID;
+ oBill.ShowBill(HInterID, ref sReturn);
+
+ long HInterID1 = DBUtility.ClsPub.CreateBillID(oBill.omodel.HBillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ string HBillNo = DBUtility.ClsPub.CreateBillCode(oBill.omodel.HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+ oBill.omodel.HInterID = HInterID1;
+ oBill.omodel.HBillNo = HBillNo;
+ oBill.omodel.HBillSubType = "SUB";
+ oBill.omodel.HDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
+ oBill.omodel.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oBill.omodel.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+ oBill.omodel.HMaker = user;
+ oBill.omodel.HMakeDate = DateTime.Now.ToString();
+ oBill.omodel.HMainSourceInterID = HInterID;
+ oBill.omodel.HMainSourceEntryID = HEntryID;
+ oBill.omodel.HMainSourceBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+
+ oBill.DetailColl.Clear();
+
+
+ for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsSc_ProcessExchangeBillSub oSub = new Model.ClsSc_ProcessExchangeBillSub();
+ oSub.HInterID = HInterID1;
+ oSub.HEntryID = (i + 1);
+ oSub.HProcNo = long.Parse(ds1.Tables[0].Rows[i]["HProcNo"].ToString());
+ oSub.HProcID = long.Parse(ds1.Tables[0].Rows[i]["HProcID"].ToString());
+ oSub.HWorkRemark = ds1.Tables[0].Rows[i]["HRemark"].ToString();
+ oSub.HCenterID = long.Parse(ds1.Tables[0].Rows[i]["HCenterID"].ToString());
+ oSub.HSupID = long.Parse(ds1.Tables[0].Rows[i]["HSupID"].ToString());
+ oSub.HSupFlag = ds1.Tables[0].Rows[i]["HSupFlag"].ToString() == "1" ? true : false;
+ oSub.HQty = oBill.omodel.HQty;
+ oSub.HTechnologyParameter = "";
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oBill.DetailColl.Add(oSub);
+ }
+
+
+ bool bResult = false;
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+
+ oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=" + HSourceID + " where HInterID=" + HInterID + " and HEntryID=" + HEntryID);
+
+ if (!bResult)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娲惧伐澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "娲惧伐鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "寮傚父锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍙栨秷鎺掔几鍔熻兘
+ [Route("LEMS/ProcessExchangeArrangementDel")]
+ [HttpGet]
+ public object ProcessExchangeArrangementDel(string HInterID_S, int HSourceID, long HOrgID, string user)
+ {
+ DataSet ds;
+ DataSet ds1;
+ try
+ {
+ var HNum = HInterID_S.Split(',');
+
+ oCN.BeginTran();
+
+ for (int j = 0; j < HNum.Length; j++)
+ {
+
+ ds = oCN.RunProcReturn(@"select * from Sc_ProcessExchangeBillMain a where a.HInterID=" + HNum[j], "Sc_ProcessExchangeBillMain");
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ユ棤姝ゅ瓙宸ュ簭娴佽浆鍗★紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string HMainSourceInterID = ds.Tables[0].Rows[0]["HMainSourceInterID"].ToString();
+ string HMainSourceEntryID = ds.Tables[0].Rows[0]["HMainSourceEntryID"].ToString();
+
+ ds1 = oCN.RunProcReturn(@"select * from Sc_ProcessExchangeBillMain where HInterID=" + HMainSourceInterID, "Sc_ProcessExchangeBillMain");
+ if (ds1.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ユ棤姝ゅ瓙宸ュ簭娴佽浆鍗″搴旂殑涓诲伐搴忔祦杞崱锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=0 where HInterID=" + HMainSourceInterID + " and HEntryID=" + HMainSourceEntryID);
+ oCN.RunProc("delete from Sc_ProcessExchangeBillMain where HInterID=" + HNum[j]);
+ oCN.RunProc("delete from Sc_ProcessExchangeBillSub where HInterID=" + HNum[j]);
+ }
+
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "宸插彇娑堟淳宸ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "寮傚父锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
/// <summary>
/// 杩斿洖宸ュ簭娴佽浆鍗$淮鎶ゅ垪琛ㄤ粠琛�
///鍙傛暟锛歴tring sql銆�
--
Gitblit v1.9.1