From e35bcf919935392bccd3197608991366edca2255 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期五, 26 九月 2025 10:27:31 +0800
Subject: [PATCH] 凯贝客户条码生成模块,客户料号取值方式修改,以下拉框方式返回数据进行编辑选择

---
 WarM/条码打印/Gy_CusBarCodeBill_KaiBei.cs          |   16 +++++++++++++++-
 WarM/条码打印/Gy_CusBarCodeBill_KaiBei_LangChao.cs |   16 +++++++++++++++-
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_CusBarCodeBill_KaiBei.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_CusBarCodeBill_KaiBei.cs"
index 7feb8f3..1f5897b 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_CusBarCodeBill_KaiBei.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_CusBarCodeBill_KaiBei.cs"
@@ -982,6 +982,8 @@
                                 "," + HMinQtyCol.ToString() +
                                 "," + HMaterNumberCol.ToString() +
                                 "," + HAuxPropNumberCol.ToString() +
+                                "," + HCusModelNameCol.ToString() +
+                                "," + HCusModelCol.ToString() +
                                 "," + HUnitNumberCol.ToString() +
                                 "," + HCode1Col.ToString() +
                                 //"," + HCode2Col.ToString() +
@@ -1399,6 +1401,8 @@
             string sAllowCol = HQtyCol.ToString() +
                                 "," + HMinQtyCol.ToString() +
                                 "," + HAuxPropNumberCol.ToString() +
+                                "," + HCusModelNameCol.ToString() +
+                                "," + HCusModelCol.ToString() +
                                 "," + HCode1Col.ToString() +
                                 //"," + HCode2Col.ToString() +
                                 "," + HCode3Col.ToString() +
@@ -1647,11 +1651,21 @@
                     DataSet ds = oCn.RunProcReturn("exec h_p_Gy_CusBarCodeBill_CusMatNo " + num.ToString() + "," + HCusID.ToString() + "," + HMaterID.ToString(), "h_p_Gy_CusBarCodeBill_CusMatNo");
                     if (ds == null || ds.Tables[0].Rows.Count == 0)
                     {
-                        grdMain.Rows[j].Cells[HCusModelNameCol].Value = "";
+                        //缃戞牸涓嬫媺閫夋嫨妗�
+                        DataGridViewComboBoxCell column = new DataGridViewComboBoxCell();
+                        column.Items.Add("");
+                        grdMain.Rows[j].Cells[HCusModelNameCol] = column;
                         grdMain.Rows[j].Cells[HCusModelCol].Value = "";
                     }
                     else
                     {
+                        //缃戞牸涓嬫媺閫夋嫨妗�
+                        DataGridViewComboBoxCell column = new DataGridViewComboBoxCell();
+                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+                        {
+                            column.Items.Add(DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HCusRelationNumber"]));
+                        }
+                        grdMain.Rows[j].Cells[HCusModelNameCol] = column;
                         grdMain.Rows[j].Cells[HCusModelNameCol].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCusRelationNumber"]);
                         grdMain.Rows[j].Cells[HCusModelCol].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCusRelationName"]);
                         if (num == 2)
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_CusBarCodeBill_KaiBei_LangChao.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_CusBarCodeBill_KaiBei_LangChao.cs"
index 9d21881..d60529d 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_CusBarCodeBill_KaiBei_LangChao.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_CusBarCodeBill_KaiBei_LangChao.cs"
@@ -1165,6 +1165,8 @@
                                 //"," + HMaterNumberCol.ToString() +
                                 "," + HAuxPropNumberCol.ToString() +
                                 "," + HUnitNumberCol.ToString() +
+                                "," + HCusModelNameCol.ToString() +
+                                "," + HCusModelCol.ToString() +
                                 //"," + HCode1Col.ToString() +
                                 //"," + HCode2Col.ToString() +
                                 //"," + HCode3Col.ToString() +
@@ -1594,6 +1596,8 @@
                                 "," + HMinQtyCol.ToString() +
                                 "," + HWMinQtyCol.ToString() +
                                 "," + HAuxPropNumberCol.ToString() +
+                                "," + HCusModelNameCol.ToString() +
+                                "," + HCusModelCol.ToString() +
                                 //"," + HCode1Col.ToString() +
                                 //"," + HCode2Col.ToString() +
                                 //"," + HCode3Col.ToString() +
@@ -1913,11 +1917,21 @@
                     DataSet ds = oCn.RunProcReturn("exec h_p_Gy_CusBarCodeBill_CusMatNo " + num.ToString() + "," + HCusID.ToString() + "," + HMaterID.ToString(), "h_p_Gy_CusBarCodeBill_CusMatNo");
                     if (ds == null || ds.Tables[0].Rows.Count == 0)
                     {
-                        grdMain.Rows[j].Cells[HCusModelNameCol].Value = "";
+                        //缃戞牸涓嬫媺閫夋嫨妗�
+                        DataGridViewComboBoxCell column = new DataGridViewComboBoxCell();
+                        column.Items.Add("");
+                        grdMain.Rows[j].Cells[HCusModelNameCol] = column;
                         grdMain.Rows[j].Cells[HCusModelCol].Value = "";
                     }
                     else
                     {
+                        //缃戞牸涓嬫媺閫夋嫨妗�
+                        DataGridViewComboBoxCell column = new DataGridViewComboBoxCell();
+                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+                        {
+                            column.Items.Add(DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HCusRelationNumber"]));
+                        }
+                        grdMain.Rows[j].Cells[HCusModelNameCol] = column;
                         grdMain.Rows[j].Cells[HCusModelNameCol].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCusRelationNumber"]);
                         grdMain.Rows[j].Cells[HCusModelCol].Value = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCusRelationName"]);
                         if (num == 2)

--
Gitblit v1.9.1