Add 成品入库

This commit is contained in:
Ling 2024-06-01 11:14:26 +08:00
parent 5510353811
commit df0b2a4a6f
7 changed files with 82 additions and 85 deletions

View File

@ -1,4 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Productin_Form.aspx.cs" Inherits="Productout_Form" %> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Productin_Form.aspx.cs" Inherits="Productin_Form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -89,7 +89,8 @@
<form id="form" runat="server"> <form id="form" runat="server">
<div class="rtbjdiv" > <div class="rtbjdiv" >
<div class="add-top" > <div class="add-top" >
<div class="add-top-dh" id="div_listdaohang"><h4>成品出库表单页 &nbsp&nbsp</h4> <a href="Productout_list.aspx" id="bt_fhlb" runat="server" style=" width:65px" class="button icon pin">回到列表</a></div> <div class="add-top-dh" id="div_listdaohang"><h4>成品出库表单页 &nbsp&nbsp</h4>
<a href="Productin_list.aspx" id="bt_fhlb" runat="server" style=" width:65px" class="button icon pin">回到列表</a></div>
<div class="add-top-cz" > <div class="add-top-cz" >
<a href="#button" id="bt_tj" onclick="setbcbd()" class="button icon log">保存</a> <a href="#button" id="bt_tj" onclick="setbcbd()" class="button icon log">保存</a>
<a href="#button" id="chongzhi" onclick="form.reset();" style=" width:60px; " class=" button icon reload">重置表单</a> <a href="#button" id="chongzhi" onclick="form.reset();" style=" width:60px; " class=" button icon reload">重置表单</a>
@ -157,7 +158,7 @@
</div> </div>
<asp:HiddenField ID="id" runat="server" Value="" /> <asp:HiddenField ID="id" runat="server" Value="" />
<asp:HiddenField ID="sg_hidden" runat="server" Value="" /> <asp:HiddenField ID="sg_hidden" runat="server" Value="" />
<asp:HiddenField ID="pagename" runat="server" Value="cpck" /> <asp:HiddenField ID="pagename" runat="server" Value="cprk" />
<asp:HiddenField ID="wlidhidden" runat="server" Value="" /> <asp:HiddenField ID="wlidhidden" runat="server" Value="" />
<asp:HiddenField ID="scdidhidden" runat="server" Value="" /> <asp:HiddenField ID="scdidhidden" runat="server" Value="" />
<span style=" display:none"> <asp:button id="severbc" runat="server" CssClass="button bluez small" Text="保存" OnClientClick="return pd()" onclick="bt_tj_Click" ></asp:button> </span> <span style=" display:none"> <asp:button id="severbc" runat="server" CssClass="button bluez small" Text="保存" OnClientClick="return pd()" onclick="bt_tj_Click" ></asp:button> </span>

View File

@ -6,7 +6,7 @@ using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using System.Data; using System.Data;
public partial class Productout_Form : System.Web.UI.Page public partial class Productin_Form : System.Web.UI.Page
{ {
//创建一个操作记录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();
@ -170,7 +170,7 @@ public partial class Productout_Form : System.Web.UI.Page
rizhi.leixing = "成品出库"; rizhi.leixing = "成品出库";
rizhi.riqi = DateTime.Now; rizhi.riqi = DateTime.Now;
rizhibll.Add(rizhi); rizhibll.Add(rizhi);
Response.Redirect("Productout_browse.aspx?uid=" + rtx, false); Response.Redirect("Productin_browse.aspx?uid=" + rtx, false);
} }
else else
{ {

View File

@ -1,4 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Productin_browse.aspx.cs" Inherits="Productout_browse" %> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Productin_browse.aspx.cs" Inherits="Productin_browse" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -18,7 +18,7 @@
<script type="text/javascript"> <script type="text/javascript">
function printdj() { function printdj() {
var url = "../Common/cpck_dy.aspx?uid=" + $("#id").val(); var url = "../Common/cpck_dy.aspx?uid=" + $("#id").val();
window.open(url, '成品库打印', 'height=650,width=1100,top=0,left=100,toolbar=yes,menubar=no,scrollbars=yes, resizable=no,location=no, status=no') window.open(url, '成品库打印', 'height=650,width=1100,top=0,left=100,toolbar=yes,menubar=no,scrollbars=yes, resizable=no,location=no, status=no')
} }
</script> </script>
</head> </head>
@ -26,23 +26,23 @@
<form id="form" runat="server"> <form id="form" runat="server">
<div class="rtbjdiv" > <div class="rtbjdiv" >
<div class="add-top" > <div class="add-top" >
<div class="add-top-dh" id="div_listdaohang"><h4>成品出库详细页 &nbsp&nbsp</h4> <a href="Productout_list.aspx" id="bt_fhlb" runat="server" style=" width:65px" class="button icon pin">回到列表</a></div> <div class="add-top-dh" id="div_listdaohang"><h4>成品入库详细页 &nbsp&nbsp</h4> <a href="Productin_list.aspx" id="bt_fhlb" runat="server" style=" width:65px" class="button icon pin">回到列表</a></div>
<div class="add-top-cz" > <div class="add-top-cz" >
<a href="Productout_Form.aspx" id="bt_add" runat="server" Visible=false class="button icon add">添加</a> <a href="Productin_Form.aspx" id="bt_add" runat="server" Visible=false class="button icon add">添加</a>
<input type=button id="dayin" style=" width:80px;" class="button" value="打印单据" visible=false runat=server onclick="printdj()" /> <input type=button id="dayin" style=" width:80px;" class="button" value="打印单据" visible=false runat=server onclick="printdj()" />
<asp:button id="ckqr" Width="80" runat="server" CssClass="button" Text="出库确认" OnClientClick="return confirm('确定要出库吗')" onclick="btn_chuku_Click" Visible=false ></asp:button>&nbsp&nbsp <asp:button id="rkqr" Width="80" runat="server" CssClass="button" Text="入库确认" OnClientClick="return confirm('确定要入库吗')" onclick="btn_chuku_Click" Visible=false ></asp:button>&nbsp&nbsp
<asp:button id="ckch" runat="server" Width="80" CssClass="button" Text="出库冲红" OnClientClick="return confirm('确定要出库冲红吗')" onclick="btnchonghong_Click" Visible=false></asp:button> <asp:button id="ckch" runat="server" Width="80" CssClass="button" Text="入库冲红" OnClientClick="return confirm('确定要入库冲红吗')" onclick="btnchonghong_Click" Visible=false></asp:button>
<asp:button id="bt_tj" runat="server" CssClass="button" Text="编辑" Visible=false onclick="bt_tj_Click" ></asp:button>&nbsp&nbsp <asp:button id="bt_tj" runat="server" CssClass="button" Text="编辑" Visible=false onclick="bt_tj_Click" ></asp:button>&nbsp&nbsp
<asp:button id="shanchu" runat="server" CssClass="button" Text="删除" OnClientClick="return confirm('确定要删除吗')" Visible=false onclick="Button1_Click" ></asp:button>&nbsp&nbsp <asp:button id="shanchu" runat="server" CssClass="button" Text="删除" OnClientClick="return confirm('确定要删除吗')" Visible=false onclick="Button1_Click" ></asp:button>&nbsp&nbsp
<asp:label id="z_error" CssClass="error" runat="server"></asp:label> <asp:label id="z_error" CssClass="error" runat="server"></asp:label>
</div> </div>
</div> </div>
<div id="dd_kong" style=" overflow:auto;"> <div id="dd_kong" style=" overflow:auto;">
<table class="bule"> <tr class="tdlietou"><td><h4>库基本信息</h4></td></tr></table> <table class="bule"> <tr class="tdlietou"><td><h4>库基本信息</h4></td></tr></table>
<table class="bule"> <table class="bule">
<tr> <tr>
<td><span>库编号:</span><asp:Label id="ckdh" runat="server"></asp:Label></td> <td><span>库编号:</span><asp:Label id="ckdh" runat="server"></asp:Label></td>
<td><span>库日期:</span><asp:Label id="riqi" runat="server"></asp:Label></td> <td><span>库日期:</span><asp:Label id="riqi" runat="server"></asp:Label></td>
<td><span>单据编号:</span><asp:Label id="scdh" runat="server"></asp:Label></td> <td><span>单据编号:</span><asp:Label id="scdh" runat="server"></asp:Label></td>
<td><span>客户名称:</span><asp:Label id="khming" runat="server"></asp:Label></td> <td><span>客户名称:</span><asp:Label id="khming" runat="server"></asp:Label></td>
<td><span>产品编号:</span><asp:Label id="cpbh" runat="server" ></asp:Label></td> <td><span>产品编号:</span><asp:Label id="cpbh" runat="server" ></asp:Label></td>

View File

@ -6,7 +6,7 @@ using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using System.Data; using System.Data;
public partial class Productout_browse : System.Web.UI.Page public partial class Productin_browse : System.Web.UI.Page
{ {
Maticsoft.Model.nr_z_cprk cpckmodel = new Maticsoft.Model.nr_z_cprk(); Maticsoft.Model.nr_z_cprk cpckmodel = new Maticsoft.Model.nr_z_cprk();
Maticsoft.BLL.nr_z_cprk cpckbll = new Maticsoft.BLL.nr_z_cprk(); Maticsoft.BLL.nr_z_cprk cpckbll = new Maticsoft.BLL.nr_z_cprk();
@ -96,7 +96,7 @@ public partial class Productout_browse : System.Web.UI.Page
if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "入库确认")) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "入库确认"))
{ {
ckqr.Visible = true; rkqr.Visible = true;
} }
if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "入库冲红")) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "入库冲红"))
@ -111,8 +111,8 @@ public partial class Productout_browse : System.Web.UI.Page
if (zhuangtai.Text == "已入库") if (zhuangtai.Text == "已入库")
{ {
ckqr.Enabled = false; rkqr.Enabled = false;
ckqr.BackColor = System.Drawing.Color.Gray; rkqr.BackColor = System.Drawing.Color.Gray;
shanchu.Enabled = false; shanchu.Enabled = false;
shanchu.BackColor = System.Drawing.Color.Gray; shanchu.BackColor = System.Drawing.Color.Gray;
bt_tj.Enabled = false; bt_tj.Enabled = false;
@ -132,7 +132,7 @@ public partial class Productout_browse : System.Web.UI.Page
#endregion #endregion
protected void bt_tj_Click(object sender, EventArgs e) protected void bt_tj_Click(object sender, EventArgs e)
{ {
Response.Redirect("Productout_Form.aspx?uid=" + id.Value); Response.Redirect("Productin_Form.aspx?uid=" + id.Value);
} }
protected void Button1_Click(object sender, EventArgs e) protected void Button1_Click(object sender, EventArgs e)
{ {
@ -149,7 +149,7 @@ public partial class Productout_browse : System.Web.UI.Page
rizhi.jilu = zh.zhanghao + "删除了成品入库,入库单号为:" + cpbh.Text.Trim(); rizhi.jilu = zh.zhanghao + "删除了成品入库,入库单号为:" + cpbh.Text.Trim();
rizhi.yonghuming = zh.zhanghao.ToString(); rizhi.yonghuming = zh.zhanghao.ToString();
rizhibll.Add(rizhi); rizhibll.Add(rizhi);
Response.Redirect("Productout_list.aspx", false); Response.Redirect("Productin_list.aspx", false);
} }
else else
{ {
@ -182,7 +182,7 @@ public partial class Productout_browse : System.Web.UI.Page
rizhi.jilu = zh.zhanghao + "执行了入库冲红,入库单号为:" + ckdh.Text.Trim(); rizhi.jilu = zh.zhanghao + "执行了入库冲红,入库单号为:" + ckdh.Text.Trim();
rizhi.yonghuming = zh.zhanghao.ToString(); rizhi.yonghuming = zh.zhanghao.ToString();
rizhibll.Add(rizhi); rizhibll.Add(rizhi);
Response.Redirect("Productout_browse.aspx?uid=" + id.Value); Response.Redirect("Productin_browse.aspx?uid=" + id.Value);
} }
@ -218,7 +218,7 @@ public partial class Productout_browse : System.Web.UI.Page
rizhi.jilu = zh.zhanghao + "执行了成品入库,成品入库号为:" + ckdh.Text.Trim(); rizhi.jilu = zh.zhanghao + "执行了成品入库,成品入库号为:" + ckdh.Text.Trim();
rizhi.yonghuming = zh.zhanghao.ToString(); rizhi.yonghuming = zh.zhanghao.ToString();
rizhibll.Add(rizhi); rizhibll.Add(rizhi);
Response.Redirect("Productout_browse.aspx?uid=" + id.Value); Response.Redirect("Productin_browse.aspx?uid=" + id.Value);
} }
} }

View File

@ -1,4 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Productin_list.aspx.cs" Inherits="Productout_list" %> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Productin_list.aspx.cs" Inherits="Productin_list" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -17,7 +17,7 @@
<script src="../Js/prettify.js" type="text/javascript"></script> <script src="../Js/prettify.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
spasefuzhi(Productout_list); spasefuzhi(Productin_list);
$("#ycdaochu").click(function () { $("#ycdaochu").click(function () {
var selectid = ""; var selectid = "";
$(".xz").each(function () { $(".xz").each(function () {
@ -30,12 +30,12 @@
$("#drp_zt").change(function () { $("#drp_zt").change(function () {
yltj = ""; yltj = "";
var daylength = ""; var daylength = "";
daylength = Productout_list.nowdaycount($("#drp_zt").val(),nowmonth).value; daylength = Productin_list.nowdaycount($("#drp_zt").val(),nowmonth).value;
if ($("#drop_ziduan").length == 0) { if ($("#drop_ziduan").length == 0) {
$("#gjxnr").html(daylength); $("#gjxnr").html(daylength);
} }
var nowp = Productout_list.sumitem(" where " + pxtiaojian() + " 1=1 ").value var nowp = Productin_list.sumitem(" where " + pxtiaojian() + " 1=1 ").value
$("#span_sumitem").text(nowp); $("#span_sumitem").text(nowp);
pagecount = $("#span_sumpage").text() - 1; pagecount = $("#span_sumpage").text() - 1;
$("#drp_pageitem").change(); $("#drp_pageitem").change();
@ -57,13 +57,13 @@
<table width="100%" height="100%"> <table width="100%" height="100%">
<tr> <tr>
<td > <td >
<div class="right-top-dh" id="div_listdaohang"><h4>成品库主页</h4> <div class="right-top-dh" id="div_listdaohang"><h4>成品库主页</h4>
</div> </div>
</td> </td>
<td > <td >
<div class="right-top-an"> <div class="right-top-an">
<ul id="ul_gongju" class="ulgongju" > <ul id="ul_gongju" class="ulgongju" >
<li runat=server id="li_add" visible=false><a href="Productout_Form.aspx" class="button icon add">添加</a></li> <li runat=server id="li_add" visible=false><a href="Productin_Form.aspx" class="button icon add">添加</a></li>
<li runat="server" id="sousuo"><a href="#button" class="button icon search" onclick="gjzk('search')" >查询</a> </li> <li runat="server" id="sousuo"><a href="#button" class="button icon search" onclick="gjzk('search')" >查询</a> </li>
<li runat=server id="xiazai" visible=false><a href="#button" id="btn_daochu" onclick="wddcfont()" class="button icon arrowdown">导出</a> </li> <li runat=server id="xiazai" visible=false><a href="#button" id="btn_daochu" onclick="wddcfont()" class="button icon arrowdown">导出</a> </li>
<li runat=server id="leiset" visible=false><a href="#button" id="li_liepeizhi" class="button icon settings">配置</a></li> <li runat=server id="leiset" visible=false><a href="#button" id="li_liepeizhi" class="button icon settings">配置</a></li>

View File

@ -10,7 +10,7 @@ using System.IO;
using System.Data.OleDb; using System.Data.OleDb;
using System.Collections; using System.Collections;
using System.Text; using System.Text;
public partial class Productout_list : System.Web.UI.Page public partial class Productin_list : System.Web.UI.Page
{ {
//创建一个客户模板 //创建一个客户模板
Maticsoft.Model.nr_z_ddwxd kehumd = new Maticsoft.Model.nr_z_ddwxd(); Maticsoft.Model.nr_z_ddwxd kehumd = new Maticsoft.Model.nr_z_ddwxd();
@ -31,7 +31,7 @@ public partial class Productout_list : System.Web.UI.Page
} }
} }
Utility.RegisterTypeForAjax(typeof(Productout_list)); Utility.RegisterTypeForAjax(typeof(Productin_list));
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"]);
hiddenid.Value = user.juese.ToString(); hiddenid.Value = user.juese.ToString();
Hiddenname.Value = user.zhanghao; Hiddenname.Value = user.zhanghao;
@ -80,7 +80,7 @@ public partial class Productout_list : System.Web.UI.Page
htmlcode += " <td style='width:20px'><input type='checkbox' class='xz'/></td>"; htmlcode += " <td style='width:20px'><input type='checkbox' class='xz'/></td>";
for (int j = 0; j < dt_paixu.Columns.Count - 1; j++) for (int j = 0; j < dt_paixu.Columns.Count - 1; j++)
{ {
htmlcode += "<td><span>" + dt_paixu.Rows[i][j] + "</span></td>"; htmlcode += "<td><span>" + dt_paixu.Rows[i][j] + "</span></td>";
} }
htmlcode += "</tr>"; htmlcode += "</tr>";
} }
@ -220,17 +220,18 @@ public partial class Productout_list : System.Web.UI.Page
DateTime nowdt = DateTime.Now; DateTime nowdt = DateTime.Now;
int days = DateTime.DaysInMonth(nowdt.Year, selmonth); int days = DateTime.DaysInMonth(nowdt.Year, selmonth);
string yuechu = nowdt.Year + "-" + selmonth + "-" + "1"; string yuechu = nowdt.Year + "-" + selmonth + "-" + "1";
string yuemo = Convert.ToDateTime(nowdt.Year + "-" + selmonth + "-" +days).AddDays(1).ToString("yyyy-MM-dd"); string yuemo = Convert.ToDateTime(nowdt.Year + "-" + selmonth + "-" + days).AddDays(1).ToString("yyyy-MM-dd");
DateTime yc = Convert.ToDateTime(yuechu); DateTime yc = Convert.ToDateTime(yuechu);
string cmd = ""; string cmd = "";
if (zt == "") if (zt == "")
{ {
cmd = string.Format("select CONVERT(varchar(12),riqi,111) as riqi from nr_z_cpck where riqi>='{0}' and riqi<='{1}' ", yuechu, yuemo); cmd = string.Format("select CONVERT(varchar(12),riqi,111) as riqi from nr_z_cpck where riqi>='{0}' and riqi<='{1}' ", yuechu, yuemo);
} }
else { else
cmd = string.Format("select CONVERT(varchar(12),riqi,111) as riqi from nr_z_cpck where riqi>='{0}' and riqi<='{1}' and zt='"+zt+"' ", yuechu, yuemo); {
cmd = string.Format("select CONVERT(varchar(12),riqi,111) as riqi from nr_z_cpck where riqi>='{0}' and riqi<='{1}' and zt='" + zt + "' ", yuechu, yuemo);
} }
Maticsoft.Model.nr_z_yhzh yhzh = (Maticsoft.Model.nr_z_yhzh)Session["user"]; Maticsoft.Model.nr_z_yhzh yhzh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
if (!DBHlper.GetPermission(yhzh.juese, "成品出库", "nr_z_cpck", "查看全部")) if (!DBHlper.GetPermission(yhzh.juese, "成品出库", "nr_z_cpck", "查看全部"))
{ {
@ -343,7 +344,7 @@ public partial class Productout_list : System.Web.UI.Page
} }
else else
{ {
selectcode = "select " + colmn + " from nr_z_cpck where 1=1 "; selectcode = "select " + colmn + " from nr_z_cpck where 1=1 ";
} }
if (tj != "") if (tj != "")
{ {
@ -362,7 +363,7 @@ public partial class Productout_list : System.Web.UI.Page
selectcode += " and jsr='" + zhanghao.zhanghao + "'"; selectcode += " and jsr='" + zhanghao.zhanghao + "'";
} }
DataTable dt = DBHlper.Execute(selectcode + " order by id desc").Tables[0]; DataTable dt = DBHlper.Execute(selectcode + " order by id desc").Tables[0];
DBHlper.ExportByWeb(dt, "成品出库"+DateTime.Now, sList); DBHlper.ExportByWeb(dt, "成品出库" + DateTime.Now, sList);
} }
#endregion #endregion
#region #region
@ -410,5 +411,5 @@ public partial class Productout_list : System.Web.UI.Page
} }
#endregion #endregion
} }

View File

@ -8,8 +8,8 @@ using System.Data;
public partial class Productout_browse : System.Web.UI.Page public partial class Productout_browse : System.Web.UI.Page
{ {
Maticsoft.Model.nr_z_cpck cpckmodel = new Maticsoft.Model.nr_z_cpck(); Maticsoft.Model.nr_z_cprk cprkmodel = new Maticsoft.Model.nr_z_cprk();
Maticsoft.BLL.nr_z_cpck cpckbll = new Maticsoft.BLL.nr_z_cpck(); Maticsoft.BLL.nr_z_cprk cprkbll = new Maticsoft.BLL.nr_z_cprk();
//创建一个操作记录模板 //创建一个操作记录模板
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
@ -37,27 +37,27 @@ public partial class Productout_browse : System.Web.UI.Page
#region #region
private void initdata(int did) private void initdata(int did)
{ {
cpckmodel = cpckbll.GetModel(did); cprkmodel = cprkbll.GetModel(did);
ckdh.Text = cpckmodel.ckbh; //ckdh.Text = cprkmodel.ckbh;
riqi.Text = cpckmodel.riqi.ToString("yyyy-MM-dd"); riqi.Text = cprkmodel.riqi.ToString("yyyy-MM-dd");
scdh.Text = cpckmodel.scdh; scdh.Text = cprkmodel.scdh;
khming.Text = cpckmodel.khmc; //khming.Text = cprkmodel.khmc;
cpbh.Text = cpckmodel.cpbh; //cpbh.Text = cprkmodel.cpbh;
cpmc.Text = cpckmodel.cpmc; cpmc.Text = cprkmodel.cpmc;
danjia.Text = cpckmodel.cpdj.ToString(); //danjia.Text = cprkmodel.cpdj.ToString();
guige.Text = cpckmodel.guige.ToString(); //guige.Text = cprkmodel.guige.ToString();
zzshuliang.Text = cpckmodel.zzsl.ToString(); zzshuliang.Text = cprkmodel.zzsl.ToString();
lingtou.Text = cpckmodel.lt.ToString(); lingtou.Text = cprkmodel.lt.ToString();
shuliang.Text = cpckmodel.sl.ToString(); shuliang.Text = cprkmodel.sl.ToString();
danwei.Text = cpckmodel.danwei; //danwei.Text = cprkmodel.danwei;
lxr.Text = cpckmodel.lxr; //lxr.Text = cprkmodel.lxr;
zongjine.Text = cpckmodel.zje.ToString(); //zongjine.Text = cprkmodel.zje.ToString();
lxdh.Text = cpckmodel.lxdh; //lxdh.Text = cprkmodel.lxdh;
jingshouren.Text = cpckmodel.jsr; jingshouren.Text = cprkmodel.jsr;
shr.Text = cpckmodel.shr; //shr.Text = cprkmodel.shr;
dizhi.Text = cpckmodel.shdizhi; //dizhi.Text = cprkmodel.shdizhi;
txt_beizhu.Text = cpckmodel.beizhu; //txt_beizhu.Text = cprkmodel.beizhu;
zhuangtai.Text = cpckmodel.zt; zhuangtai.Text = cprkmodel.zt;
} }
#endregion #endregion
@ -69,47 +69,42 @@ public partial class Productout_browse : System.Web.UI.Page
{ {
Response.Redirect("../index.aspx"); Response.Redirect("../index.aspx");
} }
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "查看全部") == false && DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "查看个人") == false) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "查看全部") == false && DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "查看个人") == false)
{ {
Response.Redirect("../Common/nopower.htm"); Response.Redirect("../Common/nopower.htm");
} }
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "编辑个人") && jingshouren.Text == user.zhanghao) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "编辑个人") && jingshouren.Text == user.zhanghao)
{ {
bt_tj.Visible = true; bt_tj.Visible = true;
} }
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "编辑全部")) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "编辑全部"))
{ {
bt_tj.Visible = true; bt_tj.Visible = true;
} }
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "删除个人") && jingshouren.Text == user.zhanghao) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "删除个人") && jingshouren.Text == user.zhanghao)
{ {
shanchu.Visible = true; shanchu.Visible = true;
} }
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "删除全部")) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "删除全部"))
{ {
shanchu.Visible = true; shanchu.Visible = true;
} }
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "出库确认")) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "入库确认"))
{ {
ckqr.Visible = true; ckqr.Visible = true;
} }
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "出库冲红")) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "添加"))
{
ckch.Visible = true;
}
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "添加"))
{ {
bt_add.Visible = true; bt_add.Visible = true;
} }
if (zhuangtai.Text == "已库") if (zhuangtai.Text == "已入库")
{ {
ckqr.Enabled = false; ckqr.Enabled = false;
ckqr.BackColor = System.Drawing.Color.Gray; ckqr.BackColor = System.Drawing.Color.Gray;
@ -123,7 +118,7 @@ public partial class Productout_browse : System.Web.UI.Page
ckch.Enabled = false; ckch.Enabled = false;
ckch.BackColor = System.Drawing.Color.Gray; ckch.BackColor = System.Drawing.Color.Gray;
} }
if (DBHlper.GetPermission(juese, "成品出库", "nr_z_cpck", "打印")) if (DBHlper.GetPermission(juese, "成品入库", "nr_z_cprk", "打印"))
{ {
dayin.Visible = true; dayin.Visible = true;
} }
@ -138,15 +133,15 @@ public partial class Productout_browse : System.Web.UI.Page
{ {
if (cpckbll.Delete(Convert.ToInt32(id.Value))) if (cprkbll.Delete(Convert.ToInt32(id.Value)))
{ {
//给日志模板赋值 //给日志模板赋值
rizhi.riqi = DateTime.Now; rizhi.riqi = DateTime.Now;
rizhi.leixing = "成品库"; rizhi.leixing = "成品库";
//将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"];
//拼接字符串插入日志 //拼接字符串插入日志
rizhi.jilu = zh.zhanghao + "删除了成品出库,出库单号为:" + cpbh.Text.Trim(); rizhi.jilu = zh.zhanghao + "删除了成品入库,入库单号为:" + cpbh.Text.Trim();
rizhi.yonghuming = zh.zhanghao.ToString(); rizhi.yonghuming = zh.zhanghao.ToString();
rizhibll.Add(rizhi); rizhibll.Add(rizhi);
Response.Redirect("Productout_list.aspx", false); Response.Redirect("Productout_list.aspx", false);
@ -166,20 +161,20 @@ public partial class Productout_browse : System.Web.UI.Page
int gxcount = DBHlper.excutecmd("update nr_z_cpkc set sl=" + (sl + nowsl) + " where id=" + dt.Rows[0]["id"]); int gxcount = DBHlper.excutecmd("update nr_z_cpkc set sl=" + (sl + nowsl) + " where id=" + dt.Rows[0]["id"]);
if (gxcount > 0) if (gxcount > 0)
{ {
DBHlper.excutecmd("update nr_z_cpck set zt='待确认' where id=" + id.Value); DBHlper.excutecmd("update nr_z_cprk set zt='待确认' where id=" + id.Value);
} }
else else
{ {
Response.Write("<script>alert('库冲红失败')</script>"); Response.Write("<script>alert('库冲红失败')</script>");
} }
//给日志模板赋值 //给日志模板赋值
rizhi.riqi = DateTime.Now; rizhi.riqi = DateTime.Now;
rizhi.leixing = "成品库"; rizhi.leixing = "成品库";
//将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"];
//拼接字符串插入日志 //拼接字符串插入日志
rizhi.jilu = zh.zhanghao + "执行了出库冲红,出库单号为:" + ckdh.Text.Trim(); rizhi.jilu = zh.zhanghao + "执行了入库冲红,入库单号为:" + ckdh.Text.Trim();
rizhi.yonghuming = zh.zhanghao.ToString(); rizhi.yonghuming = zh.zhanghao.ToString();
rizhibll.Add(rizhi); rizhibll.Add(rizhi);
Response.Redirect("Productout_browse.aspx?uid=" + id.Value); Response.Redirect("Productout_browse.aspx?uid=" + id.Value);
@ -209,13 +204,13 @@ public partial class Productout_browse : System.Web.UI.Page
else else
{ {
DBHlper.excutecmd("update nr_z_cpkc set sl=" + (sl - nowsl) + " where id=" + dt.Rows[0]["id"]); DBHlper.excutecmd("update nr_z_cpkc set sl=" + (sl - nowsl) + " where id=" + dt.Rows[0]["id"]);
DBHlper.excutecmd("update nr_z_cpck set zt='已出库' where id=" + id.Value); DBHlper.excutecmd("update nr_z_cprk set zt='已入库' where id=" + id.Value);
rizhi.riqi = DateTime.Now; rizhi.riqi = DateTime.Now;
rizhi.leixing = "成品库"; rizhi.leixing = "成品库";
//将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"];
//拼接字符串插入日志 //拼接字符串插入日志
rizhi.jilu = zh.zhanghao + "执行了成品出库,成品出库号为:" + ckdh.Text.Trim(); rizhi.jilu = zh.zhanghao + "执行了成品入库,成品入库号为:" + ckdh.Text.Trim();
rizhi.yonghuming = zh.zhanghao.ToString(); rizhi.yonghuming = zh.zhanghao.ToString();
rizhibll.Add(rizhi); rizhibll.Add(rizhi);
Response.Redirect("Productout_browse.aspx?uid=" + id.Value); Response.Redirect("Productout_browse.aspx?uid=" + id.Value);