Clear code
This commit is contained in:
parent
df0b2a4a6f
commit
e253ca19bf
|
|
@ -54,7 +54,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -27,40 +27,48 @@ public partial class Common_wxfk_dy : System.Web.UI.Page
|
|||
[Ajax.AjaxMethod]
|
||||
public string[] getxinxi(int[] zu)
|
||||
{
|
||||
string[]code =new string[2];
|
||||
string[] code = new string[2];
|
||||
string code1 = "";
|
||||
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 ");
|
||||
if (ds != null && ds.Tables[0].Rows.Count > 0)
|
||||
foreach (int i in zu)
|
||||
{
|
||||
//如果当前订单下存在明细就加载成tr行
|
||||
foreach (DataRow r in ds.Tables[0].Rows)
|
||||
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 ");
|
||||
if (ds != null && ds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
khname = r["mingcheng"].ToString();
|
||||
code1 += "<tr>"
|
||||
+ " <td class='head4'>" + r["wxdh"].ToString() + "</td>"
|
||||
+ "<td class='head4'>" + r["gdh"].ToString() + "</td>"
|
||||
+ "</td><td class='head4'>" + r["zje"].ToString() + "</td>"
|
||||
+ "</td><td class='head4 je'>" + r["fkje"].ToString() + "</td>"
|
||||
+ "</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>";
|
||||
//如果当前订单下存在明细就加载成tr行
|
||||
foreach (DataRow r in ds.Tables[0].Rows)
|
||||
{
|
||||
khname = r["mingcheng"].ToString();
|
||||
code1 += "<tr>"
|
||||
+ " <td class='head4'>" + r["wxdh"].ToString() + "</td>"
|
||||
//+ "<td class='head4'>" + r["gdh"].ToString() + "</td>"
|
||||
+ "</td><td class='head4'>" + r["zje"].ToString() + "</td>"
|
||||
+ "</td><td class='head4 je'>" + r["fkje"].ToString() + "</td>"
|
||||
+ "</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[1] = khname;
|
||||
return code;
|
||||
|
||||
|
||||
|
||||
}
|
||||
[Ajax.AjaxMethod]
|
||||
public string hsdx(string zje)
|
||||
{
|
||||
return DBHlper.ConvertToChineseNum(zje);
|
||||
return DBHlper.ConvertToChineseNum(zje);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -199,8 +199,8 @@ function setcpxm() {
|
|||
//var scfs = document.getElementById(scfsid).value;
|
||||
var dhslid = "dhsl" + trid;
|
||||
var dhsl = document.getElementById(dhslid).value;
|
||||
var tqslid = "tqsl" + trid;
|
||||
var tqsl = document.getElementById(tqslid).name;
|
||||
//var tqslid = "tqsl" + trid;
|
||||
//var tqsl = document.getElementById(tqslid).name;
|
||||
var scslid = "scsl" + trid;
|
||||
var scsl = document.getElementById(scslid).value;
|
||||
var jhrqid = "jhrq" + trid;
|
||||
|
|
@ -216,7 +216,7 @@ function setcpxm() {
|
|||
jsonStr2 += "\"zl\":\"" + zl + "\",";
|
||||
//jsonStr2 += "\"scfs\":\"" + scfs + "\",";
|
||||
jsonStr2 += "\"ddsl\":\"" + dhsl + "\",";
|
||||
jsonStr2 += "\"tqkc\":\"" + tqsl + "\",";
|
||||
//jsonStr2 += "\"tqkc\":\"" + tqsl + "\",";
|
||||
jsonStr2 += "\"scsl\":\"" + scsl + "\",";
|
||||
jsonStr2 += "\"jhrq\":\"" + jhrq + "\",";
|
||||
jsonStr2 += "\"bz\":\"" + beizhu + "\"";
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<script src="../Js/TcOrder.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
cpxmscfs = "<%=hqyscpscfs()%>";
|
||||
//cpxmscfs = "<%=hqyscpscfs()%>";
|
||||
})
|
||||
//调用添加方法
|
||||
function setbcbd() {
|
||||
|
|
@ -46,59 +46,7 @@
|
|||
$("#ttpky").text(kcmxz.split('&')[0]);
|
||||
$("#tspky").text(kcmxz.split('&')[1]);
|
||||
$("#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>
|
||||
</head>
|
||||
|
|
@ -141,34 +89,6 @@
|
|||
<div id="cpxx" runat=server > </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>  产品货号:</span></td><td width="120"><span id="tcphh"></span></td>
|
||||
<td class="wktblm" width="80"><span>  产品名称:</span></td><td colspan="3"><span id="tcpmc"></span></td>
|
||||
<td class="tdjj5">  </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="wktblm" width="80"><span>  土坯可用:</span></td><td><span id="ttpky"></span></td>
|
||||
<td class="wktblm" width="80"><span>  素坯可用:</span></td><td><span id="tspky"></span></td>
|
||||
<td class="wktblm" width="80"><span>  白地可用:</span></td><td><span id="tbdky"></span></td>
|
||||
<td class="tdjj5">  </td>
|
||||
</tr>
|
||||
<tr id="tqyttr">
|
||||
<td class="wktblm" width="80"><span>  土坯已提:</span></td><td><span id="ttpyt"></span></td>
|
||||
<td class="wktblm" width="80"><span>  素坯已提:</span></td><td><span id="tspyt"></span></td>
|
||||
<td class="wktblm" width="80"><span>  白地已提:</span></td><td><span id="tbdyt"></span></td>
|
||||
<td class="tdjj5">  </td>
|
||||
</tr>
|
||||
<tr id="tqbdtr" >
|
||||
<td class="wktblm" width="80"><span>  土坯提取</span></td><td><input type="text" id="tptq" onkeyup="doubleshuru(this)" runat="server" class="tbinput" /></td>
|
||||
<td class="wktblm" width="80"><span>  素坯提取</span></td><td><input type="text" id="sptq" onkeyup="doubleshuru(this)" runat="server" class="tbinput" /></td>
|
||||
<td class="wktblm" width="80"><span>  白地提取</span></td><td><input type="text" id="bdtq" onkeyup="doubleshuru(this)" runat="server" class="tbinput" /></td>
|
||||
<td class="tdjj5">  </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="保存"
|
||||
OnClientClick="return setcpxm()" onclick="bt_tj_Click" ></asp:button> </span>
|
||||
<asp:HiddenField ID="id" runat="server" Value="" />
|
||||
|
|
|
|||
|
|
@ -9,17 +9,17 @@ using System.Data;
|
|||
using System.Data.SqlClient;
|
||||
using Ajax;
|
||||
public partial class Dispatch_Form : CommonPage
|
||||
{
|
||||
{
|
||||
//创建一个共用的生产单bll层
|
||||
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
|
||||
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();
|
||||
//创建一个操作记录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层
|
||||
Maticsoft.BLL.nr_sys_bianma bm = new Maticsoft.BLL.nr_sys_bianma();
|
||||
//创建一个共用的类型BLL层
|
||||
|
|
@ -37,24 +37,24 @@ public partial class Dispatch_Form : CommonPage
|
|||
Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]);
|
||||
binddata();
|
||||
if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString().Length > 0)
|
||||
{
|
||||
{
|
||||
string uid = Request.QueryString["uid"].ToString();
|
||||
id.Value = uid;
|
||||
id.Value = uid;
|
||||
initdata(uid);
|
||||
updatewlxx(Convert.ToInt32(uid));
|
||||
}
|
||||
else if (Request.QueryString["jsxmid"] != null && Request.QueryString["jsxmid"].ToString().Length > 0)
|
||||
{
|
||||
{
|
||||
jssccpxx();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region 获取页面参数赋值model对象
|
||||
private void getmd()
|
||||
{
|
||||
{
|
||||
scd.sclx = sclx.Text;
|
||||
scd.xdrq = Convert.ToDateTime(xdrq.Value);
|
||||
scd.wgrq = Convert.ToDateTime(wgrq.Value);
|
||||
|
|
@ -71,20 +71,20 @@ public partial class Dispatch_Form : CommonPage
|
|||
#region 获取真正数据值
|
||||
private void initdata(string did)
|
||||
{
|
||||
DataSet scdds=DBHlper.Execute("select * from view_nr_z_scd where id='" + did + "'");
|
||||
if (scdds != null && scdds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
bh.Value = scdds.Tables[0].Rows[0]["bh"].ToString();
|
||||
sclx.Text = scdds.Tables[0].Rows[0]["sclx"].ToString();
|
||||
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");
|
||||
ywy.Value = scdds.Tables[0].Rows[0]["kdr"].ToString();
|
||||
ddbz.Value = scdds.Tables[0].Rows[0]["bz"].ToString();
|
||||
}
|
||||
DataSet scdds = DBHlper.Execute("select * from view_nr_z_scd where id='" + did + "'");
|
||||
if (scdds != null && scdds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
bh.Value = scdds.Tables[0].Rows[0]["bh"].ToString();
|
||||
sclx.Text = scdds.Tables[0].Rows[0]["sclx"].ToString();
|
||||
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");
|
||||
ywy.Value = scdds.Tables[0].Rows[0]["kdr"].ToString();
|
||||
ddbz.Value = scdds.Tables[0].Rows[0]["bz"].ToString();
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
string cpmxstring = "";
|
||||
string cpmxstring = "";
|
||||
#region 接收生产单项目
|
||||
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'>"
|
||||
+ "<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>";
|
||||
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 )
|
||||
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)
|
||||
{
|
||||
if (r["mxlx"].ToString() == "产品")
|
||||
{
|
||||
//为保证唯一性,获取id拼接,保证稳定性
|
||||
string hcount = "cp"+r["id"].ToString();
|
||||
string hcount = "cp" + r["id"].ToString();
|
||||
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='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='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='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='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>";
|
||||
}
|
||||
else
|
||||
{
|
||||
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());
|
||||
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());
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -127,16 +128,22 @@ public partial class Dispatch_Form : CommonPage
|
|||
cpxx.InnerHtml = biao + "</table>";
|
||||
}
|
||||
#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 == "产品")
|
||||
{
|
||||
DataSet ds = DBHlper.Execute("select * from dbo.view_nr_z_cpkc where id='" + zjid + "'");
|
||||
//为保证唯一性,获取id拼接,保证稳定性
|
||||
if(ds!=null&&ds.Tables[0].Rows.Count>0)
|
||||
{
|
||||
|
||||
string hcount ="bm"+ds.Tables[0].Rows[0]["id"].ToString();
|
||||
if (ds != null && ds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
|
||||
string hcount = "bm" + ds.Tables[0].Rows[0]["id"].ToString();
|
||||
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='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='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='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='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='beizhu" + hcount + "' Value='" +bz+ "' Class='inpittxt' /> </td></tr>";
|
||||
}
|
||||
+ "<td><input type='text' id='beizhu" + hcount + "' Value='" + bz + "' Class='inpittxt' /> </td></tr>";
|
||||
}
|
||||
return cpmxstring;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
DataSet ds = DBHlper.Execute("select * from view_nr_z_cpbom_xm where bomid='" + zjid + "'");
|
||||
foreach (DataRow r in ds.Tables[0].Rows)
|
||||
{
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#region 修改时用来加载项目
|
||||
private void updatewlxx(int scdid)
|
||||
{
|
||||
{
|
||||
//修改页面时,首先吧项目明细的表头加载出来
|
||||
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></tr>";
|
||||
|
||||
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行
|
||||
foreach (DataRow r in ds.Tables[0].Rows)
|
||||
{
|
||||
DataSet tqds=DBHlper.Execute("select * from nr_z_scd_cp_tqkc where xmid='" + r["id"] + "'");
|
||||
string dqxmid="";
|
||||
string tqxxst="";
|
||||
if(tqds!=null&&tqds.Tables[0].Rows.Count>0){
|
||||
DataSet tqds = DBHlper.Execute("select * from nr_z_scd_cp_tqkc where xmid='" + r["id"] + "'");
|
||||
string dqxmid = "";
|
||||
string tqxxst = "";
|
||||
if (tqds != null && tqds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
|
@ -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='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='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='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>";
|
||||
}
|
||||
}
|
||||
|
||||
cpxx.InnerHtml = biao + "</table>";
|
||||
cpxx.InnerHtml = biao + "</table>";
|
||||
}
|
||||
#endregion
|
||||
#region 用来初始化绑定下拉框等值
|
||||
private void binddata()
|
||||
{
|
||||
{
|
||||
Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
|
||||
ywy.Value = zh.zhanghao;
|
||||
xdrq.Value = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
|
|
@ -259,26 +268,26 @@ public partial class Dispatch_Form : CommonPage
|
|||
public string hqyscpscfs()
|
||||
{
|
||||
string cpxmscfs = "";
|
||||
DataSet hylx = bmlx.GetAllList();
|
||||
DataRow[] dr = hylx.Tables[0].Select("leixing='特殊工艺'");
|
||||
if (dr != null && dr.Length > 0)
|
||||
{
|
||||
DataSet hy = bm.GetList("zhongleiid='" + dr[0]["id"] + "'");
|
||||
//DataSet hylx = bmlx.GetAllList();
|
||||
//DataRow[] dr = hylx.Tables[0].Select("leixing='特殊工艺'");
|
||||
//if (dr != null && dr.Length > 0)
|
||||
//{
|
||||
// DataSet hy = bm.GetList("zhongleiid='" + dr[0]["id"] + "'");
|
||||
|
||||
if (hy != null)
|
||||
{
|
||||
foreach (DataRow r in hy.Tables[0].Rows)
|
||||
{
|
||||
cpxmscfs += "<option value='" + r["mingcheng"] + "' >" + r["mingcheng"] + "</option>";
|
||||
// if (hy != null)
|
||||
// {
|
||||
// foreach (DataRow r in hy.Tables[0].Rows)
|
||||
// {
|
||||
// cpxmscfs += "<option value='" + r["mingcheng"] + "' >" + r["mingcheng"] + "</option>";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cpxmscfs += "<option value='无' >无</option>";
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// cpxmscfs += "<option value='无' >无</option>";
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
return cpxmscfs;
|
||||
}
|
||||
|
|
@ -324,16 +333,16 @@ public partial class Dispatch_Form : CommonPage
|
|||
{
|
||||
try
|
||||
{
|
||||
string caozuo = "添加";
|
||||
|
||||
string caozuo = "添加";
|
||||
|
||||
//接收成功参数值
|
||||
int rtx = 0;
|
||||
int rtx = 0;
|
||||
//判断uid是否存在值,有值为修改,无值为添加
|
||||
if (id.Value != null && id.Value != "")
|
||||
{
|
||||
scd = scdbll.GetModel(Convert.ToInt32(id.Value));
|
||||
getmd();
|
||||
caozuo = "修改";
|
||||
caozuo = "修改";
|
||||
scd.id = Convert.ToInt32(id.Value);
|
||||
if (scdbll.Update(scd))
|
||||
{
|
||||
|
|
@ -360,26 +369,26 @@ public partial class Dispatch_Form : CommonPage
|
|||
foreach (Maticsoft.Model.nr_z_scd_cp x in sccpxmds)
|
||||
{
|
||||
ci = ci + 1;
|
||||
int cpxmid=0;
|
||||
int cpxmid = 0;
|
||||
x.scdid = Convert.ToInt32(rtx);
|
||||
//判断如果存在id的时候且是修改操作时
|
||||
if (x.id > 0 && Request.QueryString["uid"] != null)
|
||||
{
|
||||
scdcpbll.Update(x);
|
||||
deletecmd += " and id !=" + x.id;
|
||||
cpxmid=x.id;
|
||||
cpxmid = x.id;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
int mxid = scdcpbll.Add(x);
|
||||
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);
|
||||
|
|
@ -387,7 +396,7 @@ public partial class Dispatch_Form : CommonPage
|
|||
catch
|
||||
{
|
||||
Response.Write("<script>alert('生产单项目在第'" + ci + "行时保存失败!);</script>");
|
||||
}
|
||||
}
|
||||
|
||||
//将session转换对象取值
|
||||
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");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
[Ajax.AjaxMethod]
|
||||
public string getcpkc(string cphh)
|
||||
{
|
||||
|
|
@ -429,7 +438,7 @@ public partial class Dispatch_Form : CommonPage
|
|||
public string getxmyt(string ytxmid)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
[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)");
|
||||
return code;
|
||||
}
|
||||
[Ajax.AjaxMethod]
|
||||
[Ajax.AjaxMethod]
|
||||
public int deletetqlc(string tqid)
|
||||
{
|
||||
int gshrt = DBHlper.excutecmd("delete nr_z_scd_cp_tqkc where id='" + tqid + "'");
|
||||
return gshrt;
|
||||
return gshrt;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -130,7 +130,8 @@ public partial class Dispatch_browse : CommonPage
|
|||
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>交货日期</span></td>"
|
||||
+ "<td><span>备注</span></td></tr>";
|
||||
//查询数据视图,获取当前订单下的所有明细
|
||||
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["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>" + tqxxst + "</span></td> "
|
||||
//+ "<td><span>" + tqxxst + "</span></td> "
|
||||
+ "<td><span>" + r["scsl"].ToString() + "</span></td> "
|
||||
+ "<td><span>" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "</span></td> "
|
||||
+ "<td><span>" + r["bz"].ToString() + "</span></td></tr>";
|
||||
|
|
|
|||
|
|
@ -414,21 +414,21 @@ public partial class ProductLibrary_list : System.Web.UI.Page
|
|||
rizhi.leixing = "产品库盘库";
|
||||
string pksqlst = "";
|
||||
string cxsl = "";
|
||||
if (kf == "土坯仓")
|
||||
{
|
||||
pksqlst = "update nr_z_cpkc set tpcsl='" + pksl + "' where id='" + id + "'";
|
||||
cxsl = "select isnull(tpcsl,0) from nr_z_cpkc where id='" + id + "'";
|
||||
}
|
||||
if (kf == "素坯仓")
|
||||
{
|
||||
pksqlst = "update nr_z_cpkc set spcsl='" + pksl + "' where id='" + id + "'";
|
||||
cxsl = "select isnull(spcsl,0) from nr_z_cpkc where id='" + id + "'";
|
||||
}
|
||||
if (kf == "白地仓")
|
||||
{
|
||||
pksqlst = "update nr_z_cpkc set bdcsl='" + pksl + "' where id='" + id + "'";
|
||||
cxsl = "select isnull(bdcsl,0) from nr_z_cpkc where id='" + id + "'";
|
||||
}
|
||||
//if (kf == "土坯仓")
|
||||
//{
|
||||
// pksqlst = "update nr_z_cpkc set tpcsl='" + pksl + "' where id='" + id + "'";
|
||||
// cxsl = "select isnull(tpcsl,0) from nr_z_cpkc where id='" + id + "'";
|
||||
//}
|
||||
//if (kf == "素坯仓")
|
||||
//{
|
||||
// pksqlst = "update nr_z_cpkc set spcsl='" + pksl + "' where id='" + id + "'";
|
||||
// cxsl = "select isnull(spcsl,0) from nr_z_cpkc where id='" + id + "'";
|
||||
//}
|
||||
//if (kf == "白地仓")
|
||||
//{
|
||||
// pksqlst = "update nr_z_cpkc set bdcsl='" + pksl + "' where id='" + id + "'";
|
||||
// cxsl = "select isnull(bdcsl,0) from nr_z_cpkc where id='" + id + "'";
|
||||
//}
|
||||
if (kf == "产品仓")
|
||||
{
|
||||
pksqlst = "update nr_z_cpkc set sl='" + pksl + "' where id='" + id + "'";
|
||||
|
|
|
|||
|
|
@ -61,11 +61,10 @@
|
|||
<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="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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6"><span>送货地址:</span><asp:Label id="dizhi" runat="server" ></asp:Label></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6"><span>备注:</span><asp:Label id="txt_beizhu" runat="server"></asp:Label></td>
|
||||
|
|
|
|||
|
|
@ -11,15 +11,15 @@ public partial class DispatchPrint : System.Web.UI.Page
|
|||
//创建一个共用的订单bll层
|
||||
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层
|
||||
Maticsoft.BLL.nr_z_kehu kehubll = new Maticsoft.BLL.nr_z_kehu();
|
||||
//创建一个操作记录模板
|
||||
//创建一个操作记录模板
|
||||
Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi();
|
||||
//创建一个操作记录bll
|
||||
Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi();
|
||||
public string userinfo = "";
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
|
|
@ -44,7 +44,7 @@ public partial class DispatchPrint : System.Web.UI.Page
|
|||
id.Value = Request.QueryString["uid"].ToString();
|
||||
}
|
||||
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");
|
||||
ywy.Text = scdds.Tables[0].Rows[0]["kdr"].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
|
||||
|
|
@ -70,9 +70,16 @@ public partial class DispatchPrint : System.Web.UI.Page
|
|||
{
|
||||
//修改页面时,首先吧项目明细的表头加载出来
|
||||
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>";
|
||||
//查询数据视图,获取当前订单下的所有明细
|
||||
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();
|
||||
}
|
||||
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["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>" + tqxxst + "</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>" + tqxxst + "</span></td> "
|
||||
+ "<td><span>" + r["scsl"].ToString() + "</span></td> "
|
||||
+ "<td><span>" + Convert.ToDateTime(r["jhrq"]).ToString("yyyy-MM-dd") + "</span></td> "
|
||||
+ "<td><span>" + r["bz"].ToString() + "</span></td></tr>";
|
||||
|
|
|
|||
Loading…
Reference in New Issue