Clear code

This commit is contained in:
Ling 2024-06-03 15:07:04 +08:00
parent df0b2a4a6f
commit e253ca19bf
9 changed files with 163 additions and 216 deletions

View File

@ -54,7 +54,7 @@
</tr> </tr>
<tr> <tr>
<td class='head6' width='160'>外协单编号</td> <td class='head6' width='160'>外协单编号</td>
<td class='head3' >客户订单号</td> <!-- <td class='head3' >客户订单号</td> -->
<td class='head3' >总金额</td> <td class='head3' >总金额</td>
<td class='head3' >付款金额</td> <td class='head3' >付款金额</td>
<td class='head3' >付款方式</td> <td class='head3' >付款方式</td>

View File

@ -27,40 +27,48 @@ public partial class Common_wxfk_dy : System.Web.UI.Page
[Ajax.AjaxMethod] [Ajax.AjaxMethod]
public string[] getxinxi(int[] zu) public string[] getxinxi(int[] zu)
{ {
string[]code =new string[2]; string[] code = new string[2];
string code1 = ""; string code1 = "";
string khname = ""; string khname = "";
foreach (int i in zu) try
{ {
DataSet ds = DBHlper.Execute("select *,(SELECT ISNULL(SUM(wxfyze), 0) FROM dbo.view_nr_z_ddwxd WHERE (wxdh=view_nr_z_wxfk.wxdh)) as zje from view_nr_z_wxfk where id='" + i + "' order by id "); foreach (int i in zu)
if (ds != null && ds.Tables[0].Rows.Count > 0)
{ {
//如果当前订单下存在明细就加载成tr行 DataSet ds = DBHlper.Execute("select *,(SELECT ISNULL(SUM(wxfyze), 0) FROM dbo.view_nr_z_ddwxd WHERE (wxdh=view_nr_z_wxfk.wxdh)) as zje from view_nr_z_wxfk where id='" + i + "' order by id ");
foreach (DataRow r in ds.Tables[0].Rows) if (ds != null && ds.Tables[0].Rows.Count > 0)
{ {
khname = r["mingcheng"].ToString(); //如果当前订单下存在明细就加载成tr行
code1 += "<tr>" foreach (DataRow r in ds.Tables[0].Rows)
+ " <td class='head4'>" + r["wxdh"].ToString() + "</td>" {
+ "<td class='head4'>" + r["gdh"].ToString() + "</td>" khname = r["mingcheng"].ToString();
+ "</td><td class='head4'>" + r["zje"].ToString() + "</td>" code1 += "<tr>"
+ "</td><td class='head4 je'>" + r["fkje"].ToString() + "</td>" + " <td class='head4'>" + r["wxdh"].ToString() + "</td>"
+ "</td><td class='head4'>" + r["fkfs"].ToString() + "</td>" //+ "<td class='head4'>" + r["gdh"].ToString() + "</td>"
+ "</td><td class='head4'>" + r["fpje"].ToString() + "</td>" + "</td><td class='head4'>" + r["zje"].ToString() + "</td>"
+ "</td><td class='head4'>" + Convert.ToDateTime(r["fkrq"]).ToString("yyyy-MM-dd") + "</td>" + "</td><td class='head4 je'>" + r["fkje"].ToString() + "</td>"
+ "</td><td class='head4'>" + r["bz"].ToString() + "</td></tr>"; + "</td><td class='head4'>" + r["fkfs"].ToString() + "</td>"
+ "</td><td class='head4'>" + r["fpje"].ToString() + "</td>"
+ "</td><td class='head4'>" + Convert.ToDateTime(r["fkrq"]).ToString("yyyy-MM-dd") + "</td>"
+ "</td><td class='head4'>" + r["bz"].ToString() + "</td></tr>";
}
} }
} }
} }
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
code[0] = code1; code[0] = code1;
code[1] = khname; code[1] = khname;
return code; return code;
} }
[Ajax.AjaxMethod] [Ajax.AjaxMethod]
public string hsdx(string zje) public string hsdx(string zje)
{ {
return DBHlper.ConvertToChineseNum(zje); return DBHlper.ConvertToChineseNum(zje);
} }
} }

View File

@ -199,8 +199,8 @@ function setcpxm() {
//var scfs = document.getElementById(scfsid).value; //var scfs = document.getElementById(scfsid).value;
var dhslid = "dhsl" + trid; var dhslid = "dhsl" + trid;
var dhsl = document.getElementById(dhslid).value; var dhsl = document.getElementById(dhslid).value;
var tqslid = "tqsl" + trid; //var tqslid = "tqsl" + trid;
var tqsl = document.getElementById(tqslid).name; //var tqsl = document.getElementById(tqslid).name;
var scslid = "scsl" + trid; var scslid = "scsl" + trid;
var scsl = document.getElementById(scslid).value; var scsl = document.getElementById(scslid).value;
var jhrqid = "jhrq" + trid; var jhrqid = "jhrq" + trid;
@ -216,7 +216,7 @@ function setcpxm() {
jsonStr2 += "\"zl\":\"" + zl + "\","; jsonStr2 += "\"zl\":\"" + zl + "\",";
//jsonStr2 += "\"scfs\":\"" + scfs + "\","; //jsonStr2 += "\"scfs\":\"" + scfs + "\",";
jsonStr2 += "\"ddsl\":\"" + dhsl + "\","; jsonStr2 += "\"ddsl\":\"" + dhsl + "\",";
jsonStr2 += "\"tqkc\":\"" + tqsl + "\","; //jsonStr2 += "\"tqkc\":\"" + tqsl + "\",";
jsonStr2 += "\"scsl\":\"" + scsl + "\","; jsonStr2 += "\"scsl\":\"" + scsl + "\",";
jsonStr2 += "\"jhrq\":\"" + jhrq + "\","; jsonStr2 += "\"jhrq\":\"" + jhrq + "\",";
jsonStr2 += "\"bz\":\"" + beizhu + "\""; jsonStr2 += "\"bz\":\"" + beizhu + "\"";

View File

@ -19,7 +19,7 @@
<script src="../Js/TcOrder.js" type="text/javascript"></script> <script src="../Js/TcOrder.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
cpxmscfs = "<%=hqyscpscfs()%>"; //cpxmscfs = "<%=hqyscpscfs()%>";
}) })
//调用添加方法 //调用添加方法
function setbcbd() { function setbcbd() {
@ -46,59 +46,7 @@
$("#ttpky").text(kcmxz.split('&')[0]); $("#ttpky").text(kcmxz.split('&')[0]);
$("#tspky").text(kcmxz.split('&')[1]); $("#tspky").text(kcmxz.split('&')[1]);
$("#tbdky").text(kcmxz.split('&')[2]); $("#tbdky").text(kcmxz.split('&')[2]);
$("#dialog-cpinfo").dialog({
resizable: false,
height: 300,
width: 600,
modal: true,
buttons: {
确定提取: function () {
if ($("#tptq").val() == "") {
$("#tptq").val("0");
}
if ($("#sptq").val() == "") {
$("#sptq").val("0");
}
if ($("#bdtq").val() == "") {
$("#bdtq").val("0");
}
if (parseFloat($("#tptq").val()) > parseFloat(kcmxz.split('&')[0])) {
alert("土坯提取数量不能大于土坯可用数量!");
return false;
}
if (parseFloat($("#sptq").val()) > parseFloat(kcmxz.split('&')[1])) {
alert("素坯提取数量不能大于素坯可用数量!");
return false;
}
if (parseFloat($("#bdtq").val()) > parseFloat(kcmxz.split('&')[2])) {
alert("白地提取数量不能大于白地可用数量!");
return false;
}
var iscg = Dispatch_Form.settqsl($("#tptq").val(), $("#sptq").val(), $("#bdtq").val(), $("#cphh" + hcout).val()).value;
if (iscg != "0") {
$("#tqsl" + hcout).attr('name', iscg);
$("#tqsl" + hcout).val($("#tptq").val() + "," + $("#sptq").val() + "," + $("#bdtq").val());
}
$('#dialog-cpinfo').dialog('close');
},
格式化: function () {
if ($("#tqsl" + hcout).attr('name') != "") {
var gsrt = Dispatch_Form.deletetqlc($("#tqsl" + hcout).attr('name')).value;
if (gsrt > 0) {
$("#tqsl" + hcout).val("")
$("#tqsl" + hcout).attr('name', "");
}
} else {
alert("只能格式化已提取的项目!");
}
$('#dialog-cpinfo').dialog('close');
}
},
close: function () {
$(".ui-widget-overlay").css("display", "none");
}
});
} }
</script> </script>
</head> </head>
@ -141,34 +89,6 @@
<div id="cpxx" runat=server > </div> <div id="cpxx" runat=server > </div>
</div> </div>
</div> </div>
<div id="dialog-cpinfo" title="提取产品库存" style="overflow: hidden; display: none;">
<table class="tablewk" >
<tr><td style=" height:20px" colspan="7"></td></tr>
<tr><td class="wktblm" width="80"><span>&nbsp 产品货号:</span></td><td width="120"><span id="tcphh"></span></td>
<td class="wktblm" width="80"><span>&nbsp 产品名称:</span></td><td colspan="3"><span id="tcpmc"></span></td>
<td class="tdjj5">&nbsp </td>
</tr>
<tr>
<td class="wktblm" width="80"><span>&nbsp 土坯可用:</span></td><td><span id="ttpky"></span></td>
<td class="wktblm" width="80"><span>&nbsp 素坯可用:</span></td><td><span id="tspky"></span></td>
<td class="wktblm" width="80"><span>&nbsp 白地可用:</span></td><td><span id="tbdky"></span></td>
<td class="tdjj5">&nbsp </td>
</tr>
<tr id="tqyttr">
<td class="wktblm" width="80"><span>&nbsp 土坯已提:</span></td><td><span id="ttpyt"></span></td>
<td class="wktblm" width="80"><span>&nbsp 素坯已提:</span></td><td><span id="tspyt"></span></td>
<td class="wktblm" width="80"><span>&nbsp 白地已提:</span></td><td><span id="tbdyt"></span></td>
<td class="tdjj5">&nbsp </td>
</tr>
<tr id="tqbdtr" >
<td class="wktblm" width="80"><span>&nbsp 土坯提取</span></td><td><input type="text" id="tptq" onkeyup="doubleshuru(this)" runat="server" class="tbinput" /></td>
<td class="wktblm" width="80"><span>&nbsp 素坯提取</span></td><td><input type="text" id="sptq" onkeyup="doubleshuru(this)" runat="server" class="tbinput" /></td>
<td class="wktblm" width="80"><span>&nbsp 白地提取</span></td><td><input type="text" id="bdtq" onkeyup="doubleshuru(this)" runat="server" class="tbinput" /></td>
<td class="tdjj5">&nbsp </td>
</tr>
<tr><td style=" height:20px" colspan="7"></td></tr>
</table>
</div>
<span style=" display:none"> <asp:button id="severbc" runat="server" CssClass="button bluez small" Text="保存" <span style=" display:none"> <asp:button id="severbc" runat="server" CssClass="button bluez small" Text="保存"
OnClientClick="return setcpxm()" onclick="bt_tj_Click" ></asp:button> </span> OnClientClick="return setcpxm()" onclick="bt_tj_Click" ></asp:button> </span>
<asp:HiddenField ID="id" runat="server" Value="" /> <asp:HiddenField ID="id" runat="server" Value="" />

View File

@ -9,17 +9,17 @@ using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using Ajax; using Ajax;
public partial class Dispatch_Form : CommonPage public partial class Dispatch_Form : CommonPage
{ {
//创建一个共用的生产单bll层 //创建一个共用的生产单bll层
Maticsoft.BLL.nr_z_scd scdbll = new Maticsoft.BLL.nr_z_scd(); Maticsoft.BLL.nr_z_scd scdbll = new Maticsoft.BLL.nr_z_scd();
//创建一个共用的生产单模板 //创建一个共用的生产单模板
Maticsoft.Model.nr_z_scd scd = new Maticsoft.Model.nr_z_scd(); Maticsoft.Model.nr_z_scd scd = new Maticsoft.Model.nr_z_scd();
//创建一个操作项目bll //创建一个操作项目bll
Maticsoft.BLL.nr_z_scd_cp scdcpbll = new Maticsoft.BLL.nr_z_scd_cp(); Maticsoft.BLL.nr_z_scd_cp scdcpbll = new Maticsoft.BLL.nr_z_scd_cp();
//创建一个操作记录模板 //创建一个操作记录模板
Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi(); Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi();
//创建一个操作记录bll //创建一个操作记录bll
Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi(); Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi();
//创建一个共用的编码bll层 //创建一个共用的编码bll层
Maticsoft.BLL.nr_sys_bianma bm = new Maticsoft.BLL.nr_sys_bianma(); Maticsoft.BLL.nr_sys_bianma bm = new Maticsoft.BLL.nr_sys_bianma();
//创建一个共用的类型BLL层 //创建一个共用的类型BLL层
@ -37,24 +37,24 @@ public partial class Dispatch_Form : CommonPage
Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]); Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]);
binddata(); binddata();
if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString().Length > 0) if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString().Length > 0)
{ {
string uid = Request.QueryString["uid"].ToString(); string uid = Request.QueryString["uid"].ToString();
id.Value = uid; id.Value = uid;
initdata(uid); initdata(uid);
updatewlxx(Convert.ToInt32(uid)); updatewlxx(Convert.ToInt32(uid));
} }
else if (Request.QueryString["jsxmid"] != null && Request.QueryString["jsxmid"].ToString().Length > 0) else if (Request.QueryString["jsxmid"] != null && Request.QueryString["jsxmid"].ToString().Length > 0)
{ {
jssccpxx(); jssccpxx();
} }
} }
} }
#region model对象 #region model对象
private void getmd() private void getmd()
{ {
scd.sclx = sclx.Text; scd.sclx = sclx.Text;
scd.xdrq = Convert.ToDateTime(xdrq.Value); scd.xdrq = Convert.ToDateTime(xdrq.Value);
scd.wgrq = Convert.ToDateTime(wgrq.Value); scd.wgrq = Convert.ToDateTime(wgrq.Value);
@ -71,20 +71,20 @@ public partial class Dispatch_Form : CommonPage
#region #region
private void initdata(string did) private void initdata(string did)
{ {
DataSet scdds=DBHlper.Execute("select * from view_nr_z_scd where id='" + did + "'"); DataSet scdds = DBHlper.Execute("select * from view_nr_z_scd where id='" + did + "'");
if (scdds != null && scdds.Tables[0].Rows.Count > 0) if (scdds != null && scdds.Tables[0].Rows.Count > 0)
{ {
bh.Value = scdds.Tables[0].Rows[0]["bh"].ToString(); bh.Value = scdds.Tables[0].Rows[0]["bh"].ToString();
sclx.Text = scdds.Tables[0].Rows[0]["sclx"].ToString(); sclx.Text = scdds.Tables[0].Rows[0]["sclx"].ToString();
xdrq.Value = Convert.ToDateTime(scdds.Tables[0].Rows[0]["xdrq"]).ToString("yyyy-MM-dd"); xdrq.Value = Convert.ToDateTime(scdds.Tables[0].Rows[0]["xdrq"]).ToString("yyyy-MM-dd");
wgrq.Value = Convert.ToDateTime(scdds.Tables[0].Rows[0]["wgrq"]).ToString("yyyy-MM-dd"); wgrq.Value = Convert.ToDateTime(scdds.Tables[0].Rows[0]["wgrq"]).ToString("yyyy-MM-dd");
ywy.Value = scdds.Tables[0].Rows[0]["kdr"].ToString(); ywy.Value = scdds.Tables[0].Rows[0]["kdr"].ToString();
ddbz.Value = scdds.Tables[0].Rows[0]["bz"].ToString(); ddbz.Value = scdds.Tables[0].Rows[0]["bz"].ToString();
} }
} }
#endregion #endregion
string cpmxstring = ""; string cpmxstring = "";
#region #region
private void jssccpxx() private void jssccpxx()
{ {
@ -92,15 +92,16 @@ public partial class Dispatch_Form : CommonPage
string biao = "<table id='scdcptab' class='bule'> <tr id='0' class='tbtilt'>" string biao = "<table id='scdcptab' class='bule'> <tr id='0' class='tbtilt'>"
+ "<td><span>单据编号</span></td><td><span>客户编号</span></td><td><span>产品货号</span></td>" + "<td><span>单据编号</span></td><td><span>客户编号</span></td><td><span>产品货号</span></td>"
+ "<td><span>产品名称</span></td><td><span>种类</span></td> <td><span>特殊工艺</span></td><td ><span>订单数量</span></td>" + "<td><span>产品名称</span></td><td><span>种类</span></td> <td><span>特殊工艺</span></td><td ><span>订单数量</span></td>"
+ "<td><span>提取库存数量</span></td><td><span>生产数量</span></td><td><span>交货日期</span></td>" //+ "<td><span>提取库存数量</span></td>"
+ "<td><span>生产数量</span></td><td><span>交货日期</span></td>"
+ "<td><span>备注</span></td></tr>"; + "<td><span>备注</span></td></tr>";
DataSet jsds=DBHlper.Execute("select * from view_nr_z_scdjs_tccp where id in (" + Request.QueryString["jsxmid"].ToString()+")"); DataSet jsds = DBHlper.Execute("select * from view_nr_z_scdjs_tccp where id in (" + Request.QueryString["jsxmid"].ToString() + ")");
foreach(DataRow r in jsds.Tables[0].Rows ) foreach (DataRow r in jsds.Tables[0].Rows)
{ {
if (r["mxlx"].ToString() == "产品") if (r["mxlx"].ToString() == "产品")
{ {
//为保证唯一性获取id拼接保证稳定性 //为保证唯一性获取id拼接保证稳定性
string hcount = "cp"+r["id"].ToString(); string hcount = "cp" + r["id"].ToString();
biao += "<tr id='" + hcount + "' name='0'>" biao += "<tr id='" + hcount + "' name='0'>"
+ "<td><input type='text' id='djbh" + hcount + "' Value='" + r["bh"].ToString() + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='djbh" + hcount + "' Value='" + r["bh"].ToString() + "' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='khbh" + hcount + "' Value='" + r["kh_bh"].ToString() + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='khbh" + hcount + "' Value='" + r["kh_bh"].ToString() + "' Class='inpittxt_hx' readonly /></td>"
@ -109,15 +110,15 @@ public partial class Dispatch_Form : CommonPage
+ "<td><input type='text' id='zl" + hcount + "' Value='" + r["zl"].ToString() + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='zl" + hcount + "' Value='" + r["zl"].ToString() + "' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='scfs" + hcount + "' Value='" + r["scfs"].ToString() + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='scfs" + hcount + "' Value='" + r["scfs"].ToString() + "' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='dhsl" + hcount + "' Value='" + r["dhsl"].ToString() + "' onkeyup='doubleshuru(this)' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='dhsl" + hcount + "' Value='" + r["dhsl"].ToString() + "' onkeyup='doubleshuru(this)' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='tqsl" + hcount + "' name='' Value='0' onclick=\"tqkcsc('" + hcount + "')\" readonly Class='inpittxt' /></td>" //+ "<td><input type='text' id='tqsl" + hcount + "' name='' Value='0' onclick=\"tqkcsc('" + hcount + "')\" readonly Class='inpittxt' /></td>"
+ "<td><input type='text' id='scsl" + hcount + "' onkeyup='doubleshuru(this)' Value='" + r["dhsl"].ToString() + "' Class='inpittxt' /></td>" + "<td><input type='text' id='scsl" + hcount + "' onkeyup='doubleshuru(this)' Value='" + r["dhsl"].ToString() + "' Class='inpittxt' /></td>"
+ "<td><input type='text' id='jhrq" + hcount + "' Value='" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "' onclick='new Calendar().show(this);' readonly='readonly' Class='inpittxt' /> </td>" + "<td><input type='text' id='jhrq" + hcount + "' Value='" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "' onclick='new Calendar().show(this);' readonly='readonly' Class='inpittxt' /> </td>"
+ "<td ><input type='text' id='beizhu" + hcount + "' Value='" + r["bz"].ToString() + "' Class='inpittxt' /> </td></tr>"; + "<td ><input type='text' id='beizhu" + hcount + "' Value='" + r["bz"].ToString() + "' Class='inpittxt' /> </td></tr>";
} }
else else
{ {
cpmxstring=""; cpmxstring = "";
biao+=getcpmx(r["mxlx"].ToString(), r["cpid"].ToString(), Convert.ToDecimal(r["dhsl"]), r["bh"].ToString(), r["kh_bh"].ToString(), r["scfs"].ToString(), Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd"), r["bz"].ToString()); biao += getcpmx(r["mxlx"].ToString(), r["cpid"].ToString(), Convert.ToDecimal(r["dhsl"]), r["bh"].ToString(), r["kh_bh"].ToString(), r["scfs"].ToString(), Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd"), r["bz"].ToString());
} }
@ -127,16 +128,22 @@ public partial class Dispatch_Form : CommonPage
cpxx.InnerHtml = biao + "</table>"; cpxx.InnerHtml = biao + "</table>";
} }
#endregion #endregion
private string getcpmx(string zjlx, string zjid, decimal bhsl,string djbh,string khbh,string scfs,string jhrq,string bz) private string getcpmx(string zjlx, string zjid, decimal bhsl, string djbh, string khbh, string scfs, string jhrq, string bz)
{ {
/*
tptq
sptq
bdtq
*/
if (zjlx == "产品") if (zjlx == "产品")
{ {
DataSet ds = DBHlper.Execute("select * from dbo.view_nr_z_cpkc where id='" + zjid + "'"); DataSet ds = DBHlper.Execute("select * from dbo.view_nr_z_cpkc where id='" + zjid + "'");
//为保证唯一性获取id拼接保证稳定性 //为保证唯一性获取id拼接保证稳定性
if(ds!=null&&ds.Tables[0].Rows.Count>0) if (ds != null && ds.Tables[0].Rows.Count > 0)
{ {
string hcount ="bm"+ds.Tables[0].Rows[0]["id"].ToString(); string hcount = "bm" + ds.Tables[0].Rows[0]["id"].ToString();
cpmxstring += "<tr id='" + hcount + "' name='0'>" cpmxstring += "<tr id='" + hcount + "' name='0'>"
+ "<td><input type='text' id='djbh" + hcount + "' Value='" + djbh + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='djbh" + hcount + "' Value='" + djbh + "' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='khbh" + hcount + "' Value='" + khbh + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='khbh" + hcount + "' Value='" + khbh + "' Class='inpittxt_hx' readonly /></td>"
@ -144,38 +151,39 @@ public partial class Dispatch_Form : CommonPage
+ "<td><input type='text' id='cpmc" + hcount + "' Value='" + ds.Tables[0].Rows[0]["cpmc"].ToString() + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='cpmc" + hcount + "' Value='" + ds.Tables[0].Rows[0]["cpmc"].ToString() + "' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='zl" + hcount + "' Value='" + ds.Tables[0].Rows[0]["zl"].ToString() + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='zl" + hcount + "' Value='" + ds.Tables[0].Rows[0]["zl"].ToString() + "' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='scfs" + hcount + "' Value='" + scfs + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='scfs" + hcount + "' Value='" + scfs + "' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='dhsl" + hcount + "' Value='" + bhsl+ "' onkeyup='doubleshuru(this)' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='dhsl" + hcount + "' Value='" + bhsl + "' onkeyup='doubleshuru(this)' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='tqsl" + hcount + "' name='' Value='0' readonly onclick=\"tqkcsc('" + hcount + "')\" Class='inpittxt' /></td>" + "<td><input type='text' id='tqsl" + hcount + "' name='' Value='0' readonly onclick=\"tqkcsc('" + hcount + "')\" Class='inpittxt' /></td>"
+ "<td><input type='text' id='scsl" + hcount + "' onkeyup='doubleshuru(this)' Value='" +bhsl + "' Class='inpittxt' /></td>" + "<td><input type='text' id='scsl" + hcount + "' onkeyup='doubleshuru(this)' Value='" + bhsl + "' Class='inpittxt' /></td>"
+ "<td><input type='text' id='jhrq" + hcount + "' Value='" + jhrq + "' onclick='new Calendar().show(this);' readonly='readonly' Class='inpittxt' /> </td>" + "<td><input type='text' id='jhrq" + hcount + "' Value='" + jhrq + "' onclick='new Calendar().show(this);' readonly='readonly' Class='inpittxt' /> </td>"
+ "<td><input type='text' id='beizhu" + hcount + "' Value='" +bz+ "' Class='inpittxt' /> </td></tr>"; + "<td><input type='text' id='beizhu" + hcount + "' Value='" + bz + "' Class='inpittxt' /> </td></tr>";
} }
return cpmxstring; return cpmxstring;
} }
else else
{ {
DataSet ds = DBHlper.Execute("select * from view_nr_z_cpbom_xm where bomid='" + zjid + "'"); DataSet ds = DBHlper.Execute("select * from view_nr_z_cpbom_xm where bomid='" + zjid + "'");
foreach (DataRow r in ds.Tables[0].Rows) foreach (DataRow r in ds.Tables[0].Rows)
{ {
decimal cpmxbhsl = bhsl * Convert.ToDecimal(r["mtsl"]); decimal cpmxbhsl = bhsl * Convert.ToDecimal(r["mtsl"]);
getcpmx(r["cplx"].ToString(), r["zjid"].ToString(),cpmxbhsl,djbh,khbh,scfs,jhrq,bz); getcpmx(r["cplx"].ToString(), r["zjid"].ToString(), cpmxbhsl, djbh, khbh, scfs, jhrq, bz);
} }
return cpmxstring; return cpmxstring;
} }
} }
#region #region
private void updatewlxx(int scdid) private void updatewlxx(int scdid)
{ {
//修改页面时,首先吧项目明细的表头加载出来 //修改页面时,首先吧项目明细的表头加载出来
string biao = "<table id='scdcptab' class='bule' > <tr id='0' class='tbtilt'>" string biao = "<table id='scdcptab' class='bule' > <tr id='0' class='tbtilt'>"
+ "<td><span>单据编号</span></td><td><span>客户编号</span></td><td><span>产品货号</span></td>" + "<td><span>单据编号</span></td><td><span>客户编号</span></td><td><span>产品货号</span></td>"
+ "<td><span>产品名称</span></td><td><span>种类</span></td> <td><span>特殊工艺</span></td><td><span>订单数量</span></td>" + "<td><span>产品名称</span></td><td><span>种类</span></td> <td><span>特殊工艺</span></td><td><span>订单数量</span></td>"
+ "<td><span>提取库存数量</span></td><td><span>生产数量</span></td><td><span>交货日期</span></td>" //+ "<td><span>提取库存数量</span></td>"
+ "<td><span>生产数量</span></td><td><span>交货日期</span></td>"
+ "<td><span>备注</span></td></tr>"; + "<td><span>备注</span></td></tr>";
DataSet ds = DBHlper.Execute("select * from view_nr_z_allscdxm where scdid='" + scdid + "' order by id "); DataSet ds = DBHlper.Execute("select * from view_nr_z_allscdxm where scdid='" + scdid + "' order by id ");
@ -184,10 +192,11 @@ public partial class Dispatch_Form : CommonPage
//如果当前订单下存在明细就加载成tr行 //如果当前订单下存在明细就加载成tr行
foreach (DataRow r in ds.Tables[0].Rows) foreach (DataRow r in ds.Tables[0].Rows)
{ {
DataSet tqds=DBHlper.Execute("select * from nr_z_scd_cp_tqkc where xmid='" + r["id"] + "'"); DataSet tqds = DBHlper.Execute("select * from nr_z_scd_cp_tqkc where xmid='" + r["id"] + "'");
string dqxmid=""; string dqxmid = "";
string tqxxst=""; string tqxxst = "";
if(tqds!=null&&tqds.Tables[0].Rows.Count>0){ if (tqds != null && tqds.Tables[0].Rows.Count > 0)
{
dqxmid = tqds.Tables[0].Rows[0]["id"].ToString(); dqxmid = tqds.Tables[0].Rows[0]["id"].ToString();
tqxxst = tqds.Tables[0].Rows[0]["tptqsl"].ToString() + "," + tqds.Tables[0].Rows[0]["sptqsl"].ToString() + "," + tqds.Tables[0].Rows[0]["bdtqsl"].ToString(); tqxxst = tqds.Tables[0].Rows[0]["tptqsl"].ToString() + "," + tqds.Tables[0].Rows[0]["sptqsl"].ToString() + "," + tqds.Tables[0].Rows[0]["bdtqsl"].ToString();
} }
@ -201,19 +210,19 @@ public partial class Dispatch_Form : CommonPage
+ "<td><input type='text' id='zl" + hcount + "' Value='" + r["zl"].ToString() + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='zl" + hcount + "' Value='" + r["zl"].ToString() + "' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='scfs" + hcount + "' Value='" + r["scfs"].ToString() + "' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='scfs" + hcount + "' Value='" + r["scfs"].ToString() + "' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='dhsl" + hcount + "' Value='" + r["ddsl"].ToString() + "' onkeyup='doubleshuru(this)' Class='inpittxt_hx' readonly /></td>" + "<td><input type='text' id='dhsl" + hcount + "' Value='" + r["ddsl"].ToString() + "' onkeyup='doubleshuru(this)' Class='inpittxt_hx' readonly /></td>"
+ "<td><input type='text' id='tqsl" + hcount + "' name='" + dqxmid + "' Value='" + tqxxst+ "' readonly onclick=tqkcsc(" + hcount + ") Class='inpittxt' /></td>" //+ "<td><input type='text' id='tqsl" + hcount + "' name='" + dqxmid + "' Value='" + tqxxst + "' readonly onclick=tqkcsc(" + hcount + ") Class='inpittxt' /></td>"
+ "<td><input type='text' id='scsl" + hcount + "' onkeyup='doubleshuru(this)' Value='" + r["scsl"].ToString() + "' Class='inpittxt' /></td>" + "<td><input type='text' id='scsl" + hcount + "' onkeyup='doubleshuru(this)' Value='" + r["scsl"].ToString() + "' Class='inpittxt' /></td>"
+ "<td><input type='text' id='jhrq" + hcount + "' Value='" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "' onclick='new Calendar().show(this);' readonly='readonly' Class='inpittxt' /> </td>" + "<td><input type='text' id='jhrq" + hcount + "' Value='" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "' onclick='new Calendar().show(this);' readonly='readonly' Class='inpittxt' /> </td>"
+ "<td><input type='text' id='beizhu" + hcount + "' Value='" + r["bz"].ToString() + "' Class='inpittxt' /> </td></tr>"; + "<td><input type='text' id='beizhu" + hcount + "' Value='" + r["bz"].ToString() + "' Class='inpittxt' /> </td></tr>";
} }
} }
cpxx.InnerHtml = biao + "</table>"; cpxx.InnerHtml = biao + "</table>";
} }
#endregion #endregion
#region #region
private void binddata() private void binddata()
{ {
Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"]; Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
ywy.Value = zh.zhanghao; ywy.Value = zh.zhanghao;
xdrq.Value = DateTime.Now.ToString("yyyy-MM-dd"); xdrq.Value = DateTime.Now.ToString("yyyy-MM-dd");
@ -259,26 +268,26 @@ public partial class Dispatch_Form : CommonPage
public string hqyscpscfs() public string hqyscpscfs()
{ {
string cpxmscfs = ""; string cpxmscfs = "";
DataSet hylx = bmlx.GetAllList(); //DataSet hylx = bmlx.GetAllList();
DataRow[] dr = hylx.Tables[0].Select("leixing='特殊工艺'"); //DataRow[] dr = hylx.Tables[0].Select("leixing='特殊工艺'");
if (dr != null && dr.Length > 0) //if (dr != null && dr.Length > 0)
{ //{
DataSet hy = bm.GetList("zhongleiid='" + dr[0]["id"] + "'"); // DataSet hy = bm.GetList("zhongleiid='" + dr[0]["id"] + "'");
if (hy != null) // if (hy != null)
{ // {
foreach (DataRow r in hy.Tables[0].Rows) // foreach (DataRow r in hy.Tables[0].Rows)
{ // {
cpxmscfs += "<option value='" + r["mingcheng"] + "' >" + r["mingcheng"] + "</option>"; // cpxmscfs += "<option value='" + r["mingcheng"] + "' >" + r["mingcheng"] + "</option>";
} // }
} // }
} //}
else //else
{ //{
cpxmscfs += "<option value='无' >无</option>"; // cpxmscfs += "<option value='无' >无</option>";
} //}
return cpxmscfs; return cpxmscfs;
} }
@ -324,16 +333,16 @@ public partial class Dispatch_Form : CommonPage
{ {
try try
{ {
string caozuo = "添加"; string caozuo = "添加";
//接收成功参数值 //接收成功参数值
int rtx = 0; int rtx = 0;
//判断uid是否存在值有值为修改无值为添加 //判断uid是否存在值有值为修改无值为添加
if (id.Value != null && id.Value != "") if (id.Value != null && id.Value != "")
{ {
scd = scdbll.GetModel(Convert.ToInt32(id.Value)); scd = scdbll.GetModel(Convert.ToInt32(id.Value));
getmd(); getmd();
caozuo = "修改"; caozuo = "修改";
scd.id = Convert.ToInt32(id.Value); scd.id = Convert.ToInt32(id.Value);
if (scdbll.Update(scd)) if (scdbll.Update(scd))
{ {
@ -360,26 +369,26 @@ public partial class Dispatch_Form : CommonPage
foreach (Maticsoft.Model.nr_z_scd_cp x in sccpxmds) foreach (Maticsoft.Model.nr_z_scd_cp x in sccpxmds)
{ {
ci = ci + 1; ci = ci + 1;
int cpxmid=0; int cpxmid = 0;
x.scdid = Convert.ToInt32(rtx); x.scdid = Convert.ToInt32(rtx);
//判断如果存在id的时候且是修改操作时 //判断如果存在id的时候且是修改操作时
if (x.id > 0 && Request.QueryString["uid"] != null) if (x.id > 0 && Request.QueryString["uid"] != null)
{ {
scdcpbll.Update(x); scdcpbll.Update(x);
deletecmd += " and id !=" + x.id; deletecmd += " and id !=" + x.id;
cpxmid=x.id; cpxmid = x.id;
} }
else else
{ {
int mxid = scdcpbll.Add(x); int mxid = scdcpbll.Add(x);
deletecmd += " and id !=" + mxid; deletecmd += " and id !=" + mxid;
cpxmid=mxid; cpxmid = mxid;
} }
if (x.tqkc !=0) if (x.tqkc != 0)
{ {
int tqrt=DBHlper.excutecmd("update nr_z_scd_cp_tqkc set xmid='" + cpxmid + "' where id='"+x.tqkc+"'"); int tqrt = DBHlper.excutecmd("update nr_z_scd_cp_tqkc set xmid='" + cpxmid + "' where id='" + x.tqkc + "'");
} }
} }
DBHlper.excutecmd(deletecmd); DBHlper.excutecmd(deletecmd);
@ -387,7 +396,7 @@ public partial class Dispatch_Form : CommonPage
catch catch
{ {
Response.Write("<script>alert('生产单项目在第'" + ci + "行时保存失败!);</script>"); Response.Write("<script>alert('生产单项目在第'" + ci + "行时保存失败!);</script>");
} }
//将session转换对象取值 //将session转换对象取值
Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"]; Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
@ -409,7 +418,7 @@ public partial class Dispatch_Form : CommonPage
Response.Redirect("../Common/error.aspx"); Response.Redirect("../Common/error.aspx");
} }
} }
[Ajax.AjaxMethod] [Ajax.AjaxMethod]
public string getcpkc(string cphh) public string getcpkc(string cphh)
{ {
@ -429,7 +438,7 @@ public partial class Dispatch_Form : CommonPage
public string getxmyt(string ytxmid) public string getxmyt(string ytxmid)
{ {
string code = ""; string code = "";
DataSet ds = DBHlper.Execute("select tptqsl,sptqsl,bdtqsl from nr_z_scd_cp_tqkc where id='"+ytxmid+"'"); DataSet ds = DBHlper.Execute("select tptqsl,sptqsl,bdtqsl from nr_z_scd_cp_tqkc where id='" + ytxmid + "'");
if (ds != null && ds.Tables[0].Rows.Count > 0) if (ds != null && ds.Tables[0].Rows.Count > 0)
{ {
code = ds.Tables[0].Rows[0]["tptqsl"].ToString() + "&" + ds.Tables[0].Rows[0]["sptqsl"].ToString() + "&" + ds.Tables[0].Rows[0]["bdtqsl"].ToString(); code = ds.Tables[0].Rows[0]["tptqsl"].ToString() + "&" + ds.Tables[0].Rows[0]["sptqsl"].ToString() + "&" + ds.Tables[0].Rows[0]["bdtqsl"].ToString();
@ -441,17 +450,17 @@ public partial class Dispatch_Form : CommonPage
return code; return code;
} }
[Ajax.AjaxMethod] [Ajax.AjaxMethod]
public int settqsl(string tpsl,string spsl,string bdsl,string cphh) public int settqsl(string tpsl, string spsl, string bdsl, string cphh)
{ {
int code = DBHlper.ExecuteReid("insert into nr_z_scd_cp_tqkc(xmid,tptqsl,sptqsl,bdtqsl,cphh) values ('0','" + tpsl + "','" + spsl + "','" + bdsl + "','" + cphh + "');SELECT id from nr_z_scd_cp_tqkc WHERE (id = @@IDENTITY)"); int code = DBHlper.ExecuteReid("insert into nr_z_scd_cp_tqkc(xmid,tptqsl,sptqsl,bdtqsl,cphh) values ('0','" + tpsl + "','" + spsl + "','" + bdsl + "','" + cphh + "');SELECT id from nr_z_scd_cp_tqkc WHERE (id = @@IDENTITY)");
return code; return code;
} }
[Ajax.AjaxMethod] [Ajax.AjaxMethod]
public int deletetqlc(string tqid) public int deletetqlc(string tqid)
{ {
int gshrt = DBHlper.excutecmd("delete nr_z_scd_cp_tqkc where id='" + tqid + "'"); int gshrt = DBHlper.excutecmd("delete nr_z_scd_cp_tqkc where id='" + tqid + "'");
return gshrt; return gshrt;
} }
} }

View File

@ -130,7 +130,8 @@ public partial class Dispatch_browse : CommonPage
string biao = "<table id='scdcptab' class='bule' > <tr id='0' class='tbtilt'>" string biao = "<table id='scdcptab' class='bule' > <tr id='0' class='tbtilt'>"
+ "<td><span>单据编号</span></td><td><span>客户编号</span></td><td><span>产品货号</td>" + "<td><span>单据编号</span></td><td><span>客户编号</span></td><td><span>产品货号</td>"
+ "<td><span>产品名称</span></td><td><span>种类</span></td> <td><span>特殊工艺</span></td><td><span>订单数量</span></td>" + "<td><span>产品名称</span></td><td><span>种类</span></td> <td><span>特殊工艺</span></td><td><span>订单数量</span></td>"
+ "<td><span>提取库存数量</span></td><td><span>生产数量</span></td><td><span>交货日期</span></td>" //+ "<td><span>提取库存数量</span></td>"
+ "<td><span>生产数量</span></td><td><span>交货日期</span></td>"
+ "<td><span>备注</span></td></tr>"; + "<td><span>备注</span></td></tr>";
//查询数据视图,获取当前订单下的所有明细 //查询数据视图,获取当前订单下的所有明细
DataSet ds = DBHlper.Execute("select * from nr_z_scd_cp where scdid='" + scdid + "' order by id "); DataSet ds = DBHlper.Execute("select * from nr_z_scd_cp where scdid='" + scdid + "' order by id ");
@ -152,7 +153,7 @@ public partial class Dispatch_browse : CommonPage
+ "<td><span>" + r["cphh"].ToString() + "</span></td>" + "<td><span>" + r["cphh"].ToString() + "</span></td>"
+ "<td><span>" + r["cpmc"] + "</span></td><td><span>" + r["zl"].ToString() + "</span></td>" + "<td><span>" + r["cpmc"] + "</span></td><td><span>" + r["zl"].ToString() + "</span></td>"
+ "<td><span>" + r["scfs"].ToString() + "</span> </td><td><span>" + r["ddsl"].ToString() + "</span></td>" + "<td><span>" + r["scfs"].ToString() + "</span> </td><td><span>" + r["ddsl"].ToString() + "</span></td>"
+ "<td><span>" + tqxxst + "</span></td> " //+ "<td><span>" + tqxxst + "</span></td> "
+ "<td><span>" + r["scsl"].ToString() + "</span></td> " + "<td><span>" + r["scsl"].ToString() + "</span></td> "
+ "<td><span>" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "</span></td> " + "<td><span>" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "</span></td> "
+ "<td><span>" + r["bz"].ToString() + "</span></td></tr>"; + "<td><span>" + r["bz"].ToString() + "</span></td></tr>";

View File

@ -414,21 +414,21 @@ public partial class ProductLibrary_list : System.Web.UI.Page
rizhi.leixing = "产品库盘库"; rizhi.leixing = "产品库盘库";
string pksqlst = ""; string pksqlst = "";
string cxsl = ""; string cxsl = "";
if (kf == "土坯仓") //if (kf == "土坯仓")
{ //{
pksqlst = "update nr_z_cpkc set tpcsl='" + pksl + "' where id='" + id + "'"; // pksqlst = "update nr_z_cpkc set tpcsl='" + pksl + "' where id='" + id + "'";
cxsl = "select isnull(tpcsl,0) from nr_z_cpkc where id='" + id + "'"; // cxsl = "select isnull(tpcsl,0) from nr_z_cpkc where id='" + id + "'";
} //}
if (kf == "素坯仓") //if (kf == "素坯仓")
{ //{
pksqlst = "update nr_z_cpkc set spcsl='" + pksl + "' where id='" + id + "'"; // pksqlst = "update nr_z_cpkc set spcsl='" + pksl + "' where id='" + id + "'";
cxsl = "select isnull(spcsl,0) from nr_z_cpkc where id='" + id + "'"; // cxsl = "select isnull(spcsl,0) from nr_z_cpkc where id='" + id + "'";
} //}
if (kf == "白地仓") //if (kf == "白地仓")
{ //{
pksqlst = "update nr_z_cpkc set bdcsl='" + pksl + "' where id='" + id + "'"; // pksqlst = "update nr_z_cpkc set bdcsl='" + pksl + "' where id='" + id + "'";
cxsl = "select isnull(bdcsl,0) from nr_z_cpkc where id='" + id + "'"; // cxsl = "select isnull(bdcsl,0) from nr_z_cpkc where id='" + id + "'";
} //}
if (kf == "产品仓") if (kf == "产品仓")
{ {
pksqlst = "update nr_z_cpkc set sl='" + pksl + "' where id='" + id + "'"; pksqlst = "update nr_z_cpkc set sl='" + pksl + "' where id='" + id + "'";

View File

@ -61,11 +61,10 @@
<td><span>联系人:</span><asp:Label id="lxr" runat="server" ></asp:Label></td> <td><span>联系人:</span><asp:Label id="lxr" runat="server" ></asp:Label></td>
<td><span>联系电话:</span><asp:Label id="lxdh" runat="server"></asp:Label></td> <td><span>联系电话:</span><asp:Label id="lxdh" runat="server"></asp:Label></td>
<td><span>经手人:</span><asp:Label id="jingshouren" runat="server"></asp:Label></td> <td><span>经手人:</span><asp:Label id="jingshouren" runat="server"></asp:Label></td>
<td><span>送货人:</span><asp:Label id="shr" runat="server"></asp:Label></td>
<td><span>状态:</span><asp:Label id="zhuangtai" runat="server"></asp:Label></td> <td><span>状态:</span><asp:Label id="zhuangtai" runat="server"></asp:Label></td>
</tr> </tr>
<tr> <tr>
<td colspan="6"><span>送货地址:</span><asp:Label id="dizhi" runat="server" ></asp:Label></td>
</tr> </tr>
<tr> <tr>
<td colspan="6"><span>备注:</span><asp:Label id="txt_beizhu" runat="server"></asp:Label></td> <td colspan="6"><span>备注:</span><asp:Label id="txt_beizhu" runat="server"></asp:Label></td>

View File

@ -11,15 +11,15 @@ public partial class DispatchPrint : System.Web.UI.Page
//创建一个共用的订单bll层 //创建一个共用的订单bll层
Maticsoft.BLL.nr_z_dd ddbll = new Maticsoft.BLL.nr_z_dd(); Maticsoft.BLL.nr_z_dd ddbll = new Maticsoft.BLL.nr_z_dd();
//创建一个共用的订单模板 //创建一个共用的订单模板
Maticsoft.Model.nr_z_dd dd = new Maticsoft.Model.nr_z_dd(); Maticsoft.Model.nr_z_dd dd = new Maticsoft.Model.nr_z_dd();
//创建一个共用的客户bll层 //创建一个共用的客户bll层
Maticsoft.BLL.nr_z_kehu kehubll = new Maticsoft.BLL.nr_z_kehu(); Maticsoft.BLL.nr_z_kehu kehubll = new Maticsoft.BLL.nr_z_kehu();
//创建一个操作记录模板 //创建一个操作记录模板
Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi(); Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi();
//创建一个操作记录bll //创建一个操作记录bll
Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi(); Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi();
public string userinfo = ""; public string userinfo = "";
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!IsPostBack) if (!IsPostBack)
@ -44,7 +44,7 @@ public partial class DispatchPrint : System.Web.UI.Page
id.Value = Request.QueryString["uid"].ToString(); id.Value = Request.QueryString["uid"].ToString();
} }
initdata(id.Value); initdata(id.Value);
getsccpxm(Convert.ToInt32(id.Value)); getsccpxm(Convert.ToInt32(id.Value));
} }
} }
@ -60,7 +60,7 @@ public partial class DispatchPrint : System.Web.UI.Page
wgrq.Text = Convert.ToDateTime(scdds.Tables[0].Rows[0]["wgrq"]).ToString("yyyy-MM-dd"); wgrq.Text = Convert.ToDateTime(scdds.Tables[0].Rows[0]["wgrq"]).ToString("yyyy-MM-dd");
ywy.Text = scdds.Tables[0].Rows[0]["kdr"].ToString(); ywy.Text = scdds.Tables[0].Rows[0]["kdr"].ToString();
ddbz.Text = scdds.Tables[0].Rows[0]["bz"].ToString(); ddbz.Text = scdds.Tables[0].Rows[0]["bz"].ToString();
zt.Text = scdds.Tables[0].Rows[0]["zt"].ToString(); zt.Text = scdds.Tables[0].Rows[0]["zt"].ToString();
} }
} }
#endregion #endregion
@ -70,9 +70,16 @@ public partial class DispatchPrint : System.Web.UI.Page
{ {
//修改页面时,首先吧项目明细的表头加载出来 //修改页面时,首先吧项目明细的表头加载出来
string biao = "<table id='scdcptab' class='bule' > <tr id='0' class='tbtilt'>" string biao = "<table id='scdcptab' class='bule' > <tr id='0' class='tbtilt'>"
+ "<td><span>单据编号</span></td><td><span>客户编号</span></td><td><span>产品货号</td>" + "<td><span>单据编号</span></td>" +
+ "<td><span>产品名称</span></td><td><span>种类</span></td> <td><span>工艺要求</span></td><td><span>订单数量</span></td>" "<td><span>客户编号</span></td>" +
+ "<td><span>提取库存数量</span></td><td><span>生产数量</span></td><td><span>交货日期</span></td>" "<td><span>产品货号</td>"
+ "<td><span>产品名称</span>" +
"</td><td><span>种类</span></td> " +
"<td><span>工艺要求</span></td>" +
"<td><span>订单数量</span></td>" +
//+ "<td><span>提取库存数量</span></td>" +
"<td><span>生产数量</span></td><" +
"td><span>交货日期</span></td>"
+ "<td><span>备注</span></td></tr>"; + "<td><span>备注</span></td></tr>";
//查询数据视图,获取当前订单下的所有明细 //查询数据视图,获取当前订单下的所有明细
DataSet ds = DBHlper.Execute("select * from nr_z_scd_cp where scdid='" + scdid + "' order by id "); DataSet ds = DBHlper.Execute("select * from nr_z_scd_cp where scdid='" + scdid + "' order by id ");
@ -90,11 +97,14 @@ public partial class DispatchPrint : System.Web.UI.Page
tqxxst = tqds.Tables[0].Rows[0]["tptqsl"].ToString() + "," + tqds.Tables[0].Rows[0]["sptqsl"].ToString() + "," + tqds.Tables[0].Rows[0]["bdtqsl"].ToString(); tqxxst = tqds.Tables[0].Rows[0]["tptqsl"].ToString() + "," + tqds.Tables[0].Rows[0]["sptqsl"].ToString() + "," + tqds.Tables[0].Rows[0]["bdtqsl"].ToString();
} }
biao += "<tr id='" + hcount + "' name='" + hcount + "'>" biao += "<tr id='" + hcount + "' name='" + hcount + "'>"
+ "<td><span>" + r["djbh"].ToString() + "</span></td><td><span>" + r["khbh"].ToString() + "</span></td>" + "<td><span>" + r["djbh"].ToString() + "</span></td>" +
"<td><span>" + r["khbh"].ToString() + "</span></td>"
+ "<td><span>" + r["cphh"].ToString() + "</span></td>" + "<td><span>" + r["cphh"].ToString() + "</span></td>"
+ "<td><span>" + r["cpmc"] + "</span></td><td><span>" + r["zl"].ToString() + "</span></td>" + "<td><span>" + r["cpmc"] + "</span></td>" +
+ "<td><span>" + r["scfs"].ToString() + "</span> </td><td><span>" + r["ddsl"].ToString() + "</span></td>" "<td><span>" + r["zl"].ToString() + "</span></td>"
+ "<td><span>" + tqxxst + "</span></td> " + "<td><span>" + r["scfs"].ToString() + "</span> </td>" +
"<td><span>" + r["ddsl"].ToString() + "</span></td>"
//+ "<td><span>" + tqxxst + "</span></td> "
+ "<td><span>" + r["scsl"].ToString() + "</span></td> " + "<td><span>" + r["scsl"].ToString() + "</span></td> "
+ "<td><span>" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "</span></td> " + "<td><span>" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "</span></td> "
+ "<td><span>" + r["bz"].ToString() + "</span></td></tr>"; + "<td><span>" + r["bz"].ToString() + "</span></td></tr>";