Explorar o código

生成条码BUG调整

章政 %!s(int64=6) %!d(string=hai) anos
pai
achega
87007df214

+ 10 - 10
UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

@@ -983,9 +983,9 @@ namespace UAS_LabelMachine
             ComBoxClickChangeLabelDoc = false;
             Attach = (DataTable)dh.ExecuteSql("select lap_param lp_name,lap_value lp_sql  from LabelAttachPARAMETER where lap_custcode='" + cu_code.Text + "'", "select");
             sql.Clear();
-            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
-            sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + cu_code.Text + "' ");
-            sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='单盘' order by cl_custcode");
+            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS') ");
+            sql.Append(" la_id,cl_custcode from customerlabel left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where (cl_custcode='" + cu_code.Text + "' ");
+            sql.Append(" or cl_custcode is null) and cl_labeltype='单盘' order by cl_custcode");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             SingleLabelCombox.DisplayMember = "cl_labelname";
             SingleLabelCombox.ValueMember = "la_id";
@@ -1021,9 +1021,9 @@ namespace UAS_LabelMachine
                 SingleLabelParam = (DataTable)dh.ExecuteSql("select lp_name,lp_sql,lp_valuetype from label left join LABELPARAMETER on la_id= lp_laid where la_id=" + SingleLabelCombox.SelectedValue.ToString().Split('#')[0], "select");
             }
             sql.Clear();
-            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
-            sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + cu_code.Text + "' ");
-            sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='中盒' order by cl_custcode");
+            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS') ");
+            sql.Append(" la_id,cl_custcode from customerlabel left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where (cl_custcode='" + cu_code.Text + "' ");
+            sql.Append(" or cl_custcode is null) and cl_labeltype='中盒' order by cl_custcode");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             MidLabelCombox.DisplayMember = "cl_labelname";
             MidLabelCombox.ValueMember = "la_id";
@@ -1061,9 +1061,9 @@ namespace UAS_LabelMachine
             }
             //缓存中盒参数
             sql.Clear();
-            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS')  la_id,cl_custcode from customerlabel left join prodinout on pi_cardcode=cl_custcode ");
-            sql.Append("left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where ((pi_cardcode='" + cu_code.Text + "' ");
-            sql.Append("and  pi_inoutno='" + pi_inoutno.Text + "') or( cl_custcode is null)) and cl_labeltype='外箱' order by cl_custcode");
+            sql.Append("select to_char(nvl(cl_date,sysdate),'YYYY-MM-DD HH24:Mi:SS') cl_date,cl_labelname,cl_isdefault,la_id||'#'||cl_labelurl||'#'||to_char(cl_date,'YYYY-MM-DD HH24:Mi:SS') ");
+            sql.Append(" la_id,cl_custcode from customerlabel left join customer on cu_code=cl_custcode left join label on la_code=CL_LABELCODE where (cl_custcode='" + cu_code.Text + "' ");
+            sql.Append(" or cl_custcode is null) and cl_labeltype='外箱' order by cl_custcode");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             OutBoxCombox.DisplayMember = "cl_labelname";
             OutBoxCombox.ValueMember = "la_id";
@@ -2201,7 +2201,7 @@ namespace UAS_LabelMachine
                     BaseUtil.SetFormCenter(form);
                     form.ShowDialog();
                     break;
-                case "附信息设置":
+                case "附信息设置":
                     if (cu_code.Text != "")
                     {
                         附件内容打印 att = new 附件内容打印(cu_code.Text);

+ 3 - 3
UAS-出货标签管理(贸易版)/生成条码.cs

@@ -506,7 +506,7 @@ namespace UAS_LabelMachine
                     string cu_print_midprod = custrule.Rows[0]["cu_print_midprod"].ToString();
                     if (cu_print_midspec == "-1")
                     {
-                        condition += ",pd_vespecprint_user";
+                        condition += ",pd_vespec_user";
                     }
                     if (cu_print_midpo == "-1")
                     {
@@ -522,9 +522,9 @@ namespace UAS_LabelMachine
                     case "出货单":
                         sql.Clear();
                         sql.Append("select pd_piid,pd_id,pr_id,pr_brand,pr_orispeccode,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty pd_totalqty,pd_pocode,pd_ordercode,pd_orderdetno,pd_pdno,pd_prodcode,pd_custprodcode,");
-                        sql.Append("pd_piclass,pd_qty from (select pd_piid,pd_id,pr_id,pr_brand,nvl(nvl(pd_vespecprint_user,pd_vespec_user),pr_orispeccode)pr_orispeccode,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty,pd_pocode,pd_ordercode,pd_orderdetno,pd_pdno,");
+                        sql.Append("pd_piclass,pd_qty from (select pd_piid,pd_id,pr_id,pr_brand,nvl(pd_vespec_user,pr_orispeccode)pr_orispeccode,pr_madein,pr_unit,pr_detail,pr_spec,pr_zxbzs,outqty,pd_pocode,pd_ordercode,pd_orderdetno,pd_pdno,");
                         sql.Append("pd_prodcode,pd_custprodcode,pd_piclass,outqty-nvl((select sum(nvl(pib_qty,0)) from PRODIOBARCODE where PIB_PIID=pd_piid and pib_pdno=pd_pdno ),0)pd_qty ");
-                        sql.Append("from (select pd_piid,min(pd_id)pd_id,max(pd_vespec_user)pd_vespec_user,max(pd_vespecprint_user)pd_vespecprint_user,sum(pd_outqty)outqty,min(pd_pocode)pd_pocode,min(pd_ordercode)pd_ordercode,min(pd_orderdetno)pd_orderdetno,min(pd_pdno)pd_pdno,max(pd_custprodcode)pd_custprodcode,max(pd_prodcode)pd_prodcode,max(pd_piclass)pd_piclass ");
+                        sql.Append("from (select pd_piid,min(pd_id)pd_id,max(nvl(pd_vespecprint_user,pd_vespec_user))pd_vespec_user,sum(pd_outqty)outqty,min(pd_pocode)pd_pocode,min(pd_ordercode)pd_ordercode,min(pd_orderdetno)pd_orderdetno,min(pd_pdno)pd_pdno,max(pd_custprodcode)pd_custprodcode,max(pd_prodcode)pd_prodcode,max(pd_piclass)pd_piclass ");
                         sql.Append("from prodiodetail group by pd_piid" + condition + ")T left join product ");
                         sql.Append("on pr_code=pd_prodcode)  where  pd_piid='" + pi_id + "' order by pd_pdno");
                         break;