Add Print

This commit is contained in:
Ling 2024-07-02 21:50:46 +08:00
parent 754ddf3b87
commit e59b5e350c
10 changed files with 361 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -53,7 +53,8 @@ function add_cp() {
+ "<td><input type='text' id='danjia" + hcount + "' onkeyup='doubleshuru(this),jscpxmje(" + hcount + ")' Class='inpittxt' /> </td>"
+"<td><input type='text' id='jine" + hcount + "' onkeyup='doubleshuru(this)' Class='inpittxt' /> </td>"
+ "<td><input type='text' id='jhrq" + hcount + "' onclick='new Calendar().show(this);' readonly='readonly' Class='inpittxt' /> </td>"
+"<td><input type='text' id='beizhu" + hcount + "' Class='inpittxt' /> </td></tr>");
+ "<td><input type='text' id='beizhu" + hcount + "' Class='inpittxt' /> </td>"
+ "<td><img src='../Images_Folder/Button/tjltj.png' onclick='baozhuang(this)' width='25px' height='25px' /></td></tr>");
}
/*
string biao = "<table class='bule' id='ddxm'> <tr class='tbtilt' id='0'>"

View File

@ -78,7 +78,11 @@
function setbcbd() {
$("#<%=severbc.ClientID%>").click();
}
function baozhuang(item) {
if (item != null) {
console.log(item.parentElement);
}
}
</script>
</head>
@ -236,6 +240,10 @@
<iframe src="../ddselect/Product_list.aspx" frameborder="no" border="0"
style="height:500px;width:100%;overflow:hidden" scrolling="no" id="selectcp"></iframe>
</div>
<div id="dialogBaozhuang" title="包装信息" style="overflow:hidden; display:none;">
<iframe src="../ddselect/Product_list.aspx" frameborder="no" border="0"
style="height:500px;width:100%;overflow:hidden" scrolling="no" id="baozhuangxinxi"></iframe>
</div>
<span style=" display:none">
<asp:button id="severbc" runat="server" CssClass="button bluez small" Text="保存"
OnClientClick="return pd()" onclick="bt_tj_Click"></asp:button>

View File

@ -204,7 +204,10 @@ public partial class TcOrder_Form : CommonPage
+ "<td width='25px' onclick='add_cp()' > <img src='../Images_Folder/Button/tjltj.png' width='25px' height='25px' /></td>"
+ "<td width='80' ><span><font>*项目类型</font></span></td><td><span><font>*产品货号</font></span></td><td><span>产品名称</span></td><td><span>重量(G)</span></td><td><span>体积(ML)</span></td>"
+ " <td><span>规格(CM)</span></td><td><span>种类</span></td><td width='100' ><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></table>";
+ " <td><span>单价</span></td><td><span>金额</span></td><td><span>交货日期</span></td>" +
"<td><span>备注</span></td>" +
"<td><span>包装信息</span></td>" +
"</tr></table>";
cpxx.InnerHtml = biao;
}
#endregion
@ -228,7 +231,8 @@ public partial class TcOrder_Form : CommonPage
+ " <td><span>单价</span></td>" +
"<td><span>金额</span></td>" +
"<td><span>交货日期</span></td>" +
"<td><span>备注</span></td></tr>";
"<td><span>备注</span></td>" +
"<td><button>包装信息</button></td></tr>";
//查询数据视图,获取当前订单下的所有明细
DataSet ds = DBHlper.Execute("select * from view_nr_z_dd_tccp where dd_id='" + dd_id + "' order by id ");
if (ds != null && ds.Tables[0].Rows.Count > 0)
@ -261,7 +265,8 @@ public partial class TcOrder_Form : CommonPage
+ " <td><input type='text' id='danjia" + hcount + "' Value='" + r["danjia"].ToString() + "' onkeyup='doubleshuru(this),jscpxmje(" + hcount + ")' Class='inpittxt' /> </td> " +
"<td><input type='text' id='jine" + hcount + "' Value='" + r["jine"].ToString() + "' onkeyup='doubleshuru(this)' 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>"+
"<td><button onclick='package_info("+ r["cphh"] + ")'>包装信息</button></td></tr>";
}
}
cpxx.InnerHtml = biao + "</table>";

View File

@ -22,7 +22,7 @@
</sectionGroup>
</configSections>
<appSettings>
<add key="connstring" value="workstation id=;packet size=4096;Uid=sa;data source=.;pwd=Sa123456.;persist security info=False;initial catalog=MY-CeramicProject;pooling=true;connection lifetime=0;Max Pool Size = 512;"/>
<add key="connstring" value="workstation id=;packet size=4096;Uid=sa;data source=192.168.8.130;pwd=Sa123456.;persist security info=False;initial catalog=MY-CeramicProject;pooling=true;connection lifetime=0;Max Pool Size = 512;"/>
</appSettings>
<system.web>
<!--

View File

@ -0,0 +1,177 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Baozhuang_xinxi.aspx.cs" Inherits="BaozhuangXinxi" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="../Css/index.css" rel="stylesheet" type="text/css" />
<script src="../Jquery-ui/js/jquery-1.10.2.js" type="text/javascript"></script>
<link href="../Css/right.css" rel="stylesheet" type="text/css" />
<script src="../Jquery-ui/js/jquery-ui-1.10.4.custom.js" type="text/javascript"></script>
<link href="../Jquery-ui/css/pepper-grinder/jquery-ui-1.10.4.custom.css" rel="stylesheet" type="text/css" />
<script src="../Js/Calendar3.js" type="text/javascript"></script>
<script src="../Js/ToolTip.js" type="text/javascript"></script>
<link rel="stylesheet" href="../Css/gh-buttons.css" type="text/css"/>
<link rel="stylesheet" href="../Css/prettify.css"/>
<script src="../Js/prettify.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
spasefuzhi(Product_list);
})
function check(id) {
var cpxinxi = Product_list.cpxinxi(id).value;
var xinxizu = cpxinxi.split('//');
var rowval = $("body", parent.document).find('#dialogcp').attr("tag");
var pagename = $("body", parent.document).find('#pagename').val();
if (pagename == 'cpck') {
$("body", parent.document).find('#cpbh').val(xinxizu[0]);
$("body", parent.document).find('#cpmc').val(xinxizu[1]);
$("body", parent.document).find('#shuliang').val(xinxizu[2]);
$("body", parent.document).find('#danjia').val(xinxizu[3]);
$("body", parent.document).find('#danwei').val(xinxizu[4]);
//$("body", parent.document).find('#btn_cpclose').click();
//$("body", parent.document).find('#guige').keyup();
}
else if (pagename == 'cpbom') {
$("body", parent.document).find('#cpbh' + rowval).val(xinxizu[0]);
$("body", parent.document).find('#cpmc' + rowval).val(xinxizu[1]);
$("body", parent.document).find('#mxlx' + rowval).val("产品");
$("body", parent.document).find('#cpdj' + rowval).val(xinxizu[3]);
$("body", parent.document).find('#cpdw' + rowval).val(xinxizu[4]);
//$("body", parent.document).find('#btn_cpclose').click();
} else if (pagename == 'dd') {
$("body", parent.document).find('#mxlx' + rowval).val("产品");
$("body", parent.document).find('#cphh' + rowval).val(xinxizu[0]);
$("body", parent.document).find('#cpmc' + rowval).val(xinxizu[1]);
//$("body", parent.document).find('#zhongliang' + rowval).val(xinxizu[5]);
//$("body", parent.document).find('#tiji' + rowval).val(xinxizu[6]);
$("body", parent.document).find('#guige' + rowval).val(xinxizu[7]);
$("body", parent.document).find('#zhonglei' + rowval).val(xinxizu[8]);
$("body", parent.document).find('#danwei' + rowval).val(xinxizu[4]);
$("body", parent.document).find('#danjia' + rowval).val(xinxizu[3]);
//$("body", parent.document).find('#btn_cpclose').click();
} else if (pagename == 'cprk') {
$("body", parent.document).find('#cpbh').val(xinxizu[0]);
$("body", parent.document).find('#cpmc').val(xinxizu[1]);
$("body", parent.document).find('#shuliang').val(xinxizu[2]);
$("body", parent.document).find('#danjia').val(xinxizu[3]);
$("body", parent.document).find('#danwei').val(xinxizu[4]);
}
$("body", parent.document).find('#btn_cpclose').click();
}
function select(obj) {
$(".xz").attr("src", "../Images_Folder/checkOff1.png");
$(obj).children("td:first").children().attr("src", "../Images_Folder/checkOn1.png");
}
</script>
<script src="../Js/common.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
gjzk('search');
$("#txt_tiaojian").focus();
})
</script>
</head>
<body>
<form id="form" runat="server">
<div class="rtbjdiv" >
<div class="right-top">
<table width="100%" height="100%">
<tr>
<td >
<div class="right-top-an">
<ul id="ul_gongju" class="ulgongju">
<li runat="server" id="sousuo"><a href="#button" class="button icon search" onclick="gjzk('search')" >查询</a> </li>
</ul>
</div>
</td>
<td >
<div id="div_page" >
<table id="tbl_pagebottom" height="20" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>共<span id="span_sumitem"></span>条数据</td>
<td class="pagestyle" id="td_first" title="首页">
<img src="../Images_Folder/pagination_icons_01.png" width="16" height="16" alt="">
</td>
<td class="pagestyle" id="td_up" title="上一页">
<img src="../Images_Folder/pagination_icons_02.png" width="16" height="16" alt="">
</td>
<td><span>第</span></td>
<td>
<span><input id="txt_nowpage" type="text" class="ui-pg-input" value="1"/></span>
</td>
<td><span>页/共</span></td>
<td ><span id="span_sumpage" ></span>页</td>
<td class="pagestyle" id="td_next" title="下一页">
<img src="../Images_Folder/pagination_icons_03.png" width="16" height="16" alt="">
</td>
<td class="pagestyle" id="td_endpage" title="尾页">
<img src="../Images_Folder/pagination_icons_04.png" width="16" height="16" alt="">
</td>
<td class="pagestyle" id="td_go" title="跳页"><img src="../Images_Folder/ty.png" style="margin-top:5px" width="16" height="16" alt=""></td>
<td title="显示条数">
<span>
<select id="drp_pageitem">
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
<option value="50">50</option>
</select>
</span>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<%-- 工具箱--%>
<div id="Gjx" class="Gjxzhu">
<table width="100%" height="100%">
<tr height="80px">
<td >
<div id="gjxnr" class="right-gjxnr">
</div>
</td>
</tr>
</table>
</div>
<div id="ycsjgddiv">
<%-- 数据表头--%>
<div class="shujutou" id="div_title">
<table border="0" class="tbl_titie" id="biaotou">
<tr class="tr_titile" id="tr_biaotou">
</tr>
</table>
</div>
<%-- 数据列表--%>
<div class="shuju" id="t_r_content" onscroll="scrolltow()" style="height: 405px; overflow: scroll;" >
<table class="hovertable" id="tbl_list">
</table>
</div>
<%--数据汇总--%>
<div id="div_huizong" onscroll="listscroll()">
<table border="0" id="huizong" >
<tr class="tr_bottom">
</tr>
</table>
</div>
</div>
</div>
<asp:HiddenField ID="hiddenid" runat=server />
<asp:HiddenField ID="Hiddenname" runat=server />
<input type=hidden id="pagename" value="cpkc" />
<asp:HiddenField ID="selectid" runat=server />
<asp:HiddenField ID="strwhere" runat=server />
<input type="hidden" id="showselect"/>
</form>
</body>
</html>

View File

@ -0,0 +1,164 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ajax;
using System.Data;
using System.IO;
using System.Data.OleDb;
using System.Collections;
using System.Text;
public partial class BaozhuangXinxi : System.Web.UI.Page
{
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();
int jsid = 0;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["user"] == null)
{
Response.Redirect("../index.aspx");
}
}
Utility.RegisterTypeForAjax(typeof(BaozhuangXinxi));
Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]);
hiddenid.Value = user.juese.ToString();
Hiddenname.Value = user.zhanghao;
jsid = user.juese;
pdquanxian(jsid);
}
#region
[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)]
public string page_change(int pg, int pageitem, string paixu, string tiaojian)
{
return "";
}
#endregion
#region 便
[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)]
public int maxpage(int count, string tj)
{
int fanhuizhi = 0;
return fanhuizhi;
}
#endregion
#region
[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)]
public void itempaixu(string code)
{
Maticsoft.Model.nr_z_yhzh yhzh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
string[] codezu = code.Split(',');
string cmdexits = string.Format("select id from nr_lt_paixu where userid='{0}' and tblname='{1}' and lieming='{2}'", yhzh.id, "view_nr_z_cpkc", codezu[2]);
DataTable paixutable = DBHlper.Execute(cmdexits).Tables[0];
if (paixutable.Rows.Count > 0)
{
int idfanhui = Convert.ToInt32(paixutable.Rows[0][0]);
string updatepaixu = string.Format("update nr_lt_paixu set shuixu={0},isxianshi={1} where id={2}", codezu[0], codezu[3], idfanhui);
DBHlper.excutecmd(updatepaixu);
}
else
{
string paixuinsert = string.Format("insert into nr_paixu (userid,tblname,lieming,zhongwen,shuixu,isxianshi) values('{0}','{1}','{2}','{3}',{4},{5})", yhzh.id, "view_nr_z_cpkc", codezu[2], codezu[1], codezu[0], codezu[3]);
DBHlper.excutecmd(paixuinsert);
}
}
#endregion
#region
[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)]
public string paixu()
{
Maticsoft.Model.nr_z_yhzh zhanghao = (Maticsoft.Model.nr_z_yhzh)Session["user"];
string paixuselct = string.Format("select * from nr_lt_paixu where userid='{0}' and tblname='{1}' and isxianshi={2} order by shuixu ", zhanghao.id, "view_nr_z_cpkc", 1);
DataTable dtselect = DBHlper.Execute(paixuselct).Tables[0];
string htmlcode = "<td style='width:20px'></td>";
foreach (DataRow dr in dtselect.Rows)
{
htmlcode += string.Format("<td tag='{0}'>{1}</td>", dr["lieming"], dr["zhongwen"]);
}
return htmlcode;
}
#endregion
#region
[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)]
public string yincanglie(int endid)
{
Maticsoft.Model.nr_z_yhzh zhanghao = (Maticsoft.Model.nr_z_yhzh)Session["user"];
endid = endid - 1;
string displaycmd = "select * from nr_lt_paixu where isxianshi=0 and tblname='view_nr_z_cpkc' and userid='" + zhanghao.id + "'";
DataTable distable = DBHlper.Execute(displaycmd).Tables[0];
string htmlcode = "";
foreach (DataRow dr in distable.Rows)
{
endid++;
htmlcode += "<tr class='tr_item' id='tr_" + endid + "'><td style='width:30%'>" + endid + "</td><td style='width:30%' tag=" + dr["lieming"] + ">" + dr["zhongwen"] + "</td><td style='width:30%'><input type='checkbox'/></td> </tr>";
}
return htmlcode;
}
#endregion
#region
[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)]
public int sumitem(string wheretj)
{
string selectcmd = "select count(*) from view_nr_z_cpkc " + wheretj;
Maticsoft.Model.nr_z_yhzh yhzh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
if (!DBHlper.GetPermission(yhzh.juese, "产品档案", "nr_z_cpkc", "查看全部"))
{
if (wheretj == "")
{
selectcmd += " where yewuyuan='" + yhzh.zhanghao + "'";
}
else
{
selectcmd += " and yewuyuan='" + yhzh.zhanghao + "'";
}
}
int sumcount = DBHlper.getcount(selectcmd);
return sumcount;
}
#endregion
#region
void pdquanxian(int juese)
{
Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]);
if (DBHlper.getzt(user.id) != 1)
{
Response.Redirect("../index.aspx");
}
}
#endregion
#region
[Ajax.AjaxMethod]
public string isquanxian(int uid)
{
return "1";
}
#endregion
}