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>
<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>

View File

@ -30,6 +30,8 @@ public partial class Common_wxfk_dy : System.Web.UI.Page
string[] code = new string[2];
string code1 = "";
string khname = "";
try
{
foreach (int i in zu)
{
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 ");
@ -41,7 +43,7 @@ public partial class Common_wxfk_dy : System.Web.UI.Page
khname = r["mingcheng"].ToString();
code1 += "<tr>"
+ " <td class='head4'>" + r["wxdh"].ToString() + "</td>"
+ "<td class='head4'>" + r["gdh"].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>"
@ -51,6 +53,12 @@ public partial class Common_wxfk_dy : System.Web.UI.Page
}
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
code[0] = code1;
code[1] = khname;
return code;

View File

@ -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 + "\"";

View File

@ -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>
@ -140,34 +88,6 @@
<table class="bule"> <tr class="tdlietou"><td><h4>产品信息</h4></td></tr></table>
<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>&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="保存"
OnClientClick="return setcpxm()" onclick="bt_tj_Click" ></asp:button> </span>

View File

@ -92,7 +92,8 @@ 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)
@ -109,7 +110,7 @@ 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>";
@ -129,6 +130,12 @@ public partial class Dispatch_Form : CommonPage
#endregion
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 + "'");
@ -175,7 +182,8 @@ 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 ds = DBHlper.Execute("select * from view_nr_z_allscdxm where scdid='" + scdid + "' order by id ");
@ -187,7 +195,8 @@ public partial class Dispatch_Form : CommonPage
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){
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,7 +210,7 @@ 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>";
@ -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;
}

View File

@ -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>";

View File

@ -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 + "'";

View File

@ -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>

View File

@ -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>";