You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
561 lines
22 KiB
561 lines
22 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using CK.SCP.Models.ScpEntity;
|
|
using CK.SCP.Controller;
|
|
using System.Data;
|
|
using CK.SCP.Models.Enums;
|
|
using FineUI;
|
|
using CK.SCP.Utils;
|
|
using System.Data.Entity.Migrations;
|
|
|
|
namespace SCP.锦州锦恒.SupplierData
|
|
{
|
|
public partial class SCP_ASN_DETAIL : PageBase
|
|
{
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
GetV_TB_ASNData();
|
|
BindDetail();
|
|
SetRoleRule();
|
|
TranslatorAgents(Toolbar2);
|
|
TranslatorAgents(Toolbar1);
|
|
TranslatorAgent(Grid_V_TB_ASN_DETAIL);
|
|
TranslatorAgents(FormRow_1);
|
|
TranslatorAgents(FormRow_2);
|
|
TranslatorAgents(FormRow_3);
|
|
string openUrl = string.Format("SCP_SELECT_MAKE.aspx?select=<script>encodeURIComponent({0})</script>", TXT_MarkType.GetValueReference());
|
|
btnSelectedBarCode.OnClientClick = WindowUpload.GetSaveStateReference(TXT_MarkType.ClientID) + WindowUpload.GetShowReference(openUrl);
|
|
}
|
|
}
|
|
private void SetRoleRule()
|
|
{
|
|
IsPriceVisible(Grid_V_TB_ASN_DETAIL, "价格");
|
|
}
|
|
|
|
public void SearchV_TB_ASN_DETAILData(Action<IQueryable<V_TB_ASN_DETAIL>> p_action)
|
|
{
|
|
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL();
|
|
_entity.AsnBillNum= Request["AsnBillNum"];
|
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(_entity, (_ret) => {
|
|
if (_ret.State == ReturnStatus.Succeed)
|
|
{
|
|
p_action(_ret.Result);
|
|
}
|
|
});
|
|
|
|
}
|
|
public void GetV_TB_ASNData()
|
|
{
|
|
V_TB_ASN _entity = new V_TB_ASN();
|
|
_entity.AsnBillNum = Request["AsnBillNum"];
|
|
_entity.UserInVendIds = CurrentUser.VenderList;
|
|
_entity.UserInAddress= CurrentUser.FactoryList;
|
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(_entity, (_ret) =>
|
|
{
|
|
if (_ret.State == ReturnStatus.Succeed)
|
|
{
|
|
var _result = _ret.Result.FirstOrDefault();
|
|
Session["Asn"] = _result;
|
|
TXT_AsnBillNum.Text = _result.AsnBillNum;
|
|
TXT_PlateNumber.Text = _result.PlateNumber;
|
|
TXT_ReceiveUser.Text = _result.ReceiveUser;
|
|
TXT_ShipUser.Text = _result.ShipUser;
|
|
TXT_Site.Text = _result.Site_Desc;
|
|
TXT_Remark.Text = _result.Remark;
|
|
TXT_VendName.Text = _result.VendName;
|
|
DP_ReceiveTime.SelectedDate = _result.ReceiveTime;
|
|
DP_ShipTime.SelectedDate = _result.ShipTime;
|
|
TXT_StateDesc.Text = _result.State_DESC;
|
|
}
|
|
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(new TS_BARCODE() { BillNum= TXT_AsnBillNum.Text.Trim() }, retobj => {
|
|
if (retobj.State == ReturnStatus.Succeed)
|
|
{
|
|
if (retobj.Result.Count() > 0)
|
|
{
|
|
this.btnCreateBarCode.Enabled = false;
|
|
}
|
|
else
|
|
{
|
|
this.btnCreateBarCode.Enabled = true;
|
|
}
|
|
}
|
|
});
|
|
|
|
});
|
|
}
|
|
public void BindDetail()
|
|
{
|
|
SearchV_TB_ASN_DETAILData((ret) => {
|
|
Grid_V_TB_ASN_DETAIL.RecordCount = ret.Count();
|
|
var list = SortAndPage<V_TB_ASN_DETAIL>(ret, Grid_V_TB_ASN_DETAIL);
|
|
Grid_V_TB_ASN_DETAIL.DataSource = list;
|
|
Grid_V_TB_ASN_DETAIL.DataBind();
|
|
});
|
|
}
|
|
|
|
protected void btnOutput_Click(object sender, EventArgs e)
|
|
{
|
|
List<V_TB_ASN_DETAIL> _ls = new List<V_TB_ASN_DETAIL>();
|
|
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++)
|
|
{
|
|
V_TB_ASN_DETAIL inv = new V_TB_ASN_DETAIL();
|
|
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i];
|
|
|
|
if (rowDataKeys[24] != null)
|
|
{
|
|
inv.AsnBillNum = rowDataKeys[24].ToString();//发货单号
|
|
}
|
|
if (rowDataKeys[8] != null)
|
|
{
|
|
inv.PackQty = decimal.Parse(rowDataKeys[8].ToString());//标包数量
|
|
}
|
|
if (rowDataKeys[25] != null)
|
|
{
|
|
inv.Qty = decimal.Parse(rowDataKeys[25].ToString());//发货数量
|
|
}
|
|
inv.PartCode = rowDataKeys[3].ToString();//零件编号
|
|
if (rowDataKeys[19] != null)
|
|
{
|
|
inv.PartDesc1 = rowDataKeys[19].ToString();//零件名称
|
|
}
|
|
if (rowDataKeys[20] != null)
|
|
{
|
|
inv.CurrencyDesc = rowDataKeys[20].ToString();//货种
|
|
}
|
|
if (rowDataKeys[28] != null)
|
|
{
|
|
inv.Batch = rowDataKeys[28].ToString();//批次
|
|
}
|
|
if (rowDataKeys[26] != null)
|
|
{
|
|
inv.VendBatch = rowDataKeys[26].ToString();//供应商批次
|
|
}
|
|
if (rowDataKeys[27] != null)
|
|
{
|
|
inv.ProduceDate = DateTime.Parse(rowDataKeys[27].ToString());//生产日期
|
|
}
|
|
//if (rowDataKeys[26] != null)
|
|
//{
|
|
// inv.EndTime = DateTime.Parse(rowDataKeys[34].ToString());//到货截至日期
|
|
//}
|
|
inv.PoUnit = rowDataKeys[4].ToString();//采购单位
|
|
// if (rowDataKeys[6] != null)
|
|
// {
|
|
// inv.Price = decimal.Parse(rowDataKeys[6].ToString());//价格
|
|
// }
|
|
// if (rowDataKeys[34] != null)
|
|
//{
|
|
// inv.ReceivedPort_Desc = rowDataKeys[34].ToString();//收货口
|
|
//}
|
|
_ls.Add(inv);
|
|
}
|
|
|
|
|
|
Dictionary<string, string> cellheader = new Dictionary<string, string>
|
|
{
|
|
{ "AsnBillNum", "发货单号" },
|
|
{ "PackQty", "标包数量" },
|
|
{ "Qty", "发货数量" },
|
|
{ "PartCode", "零件编号" },
|
|
{ "PartDesc1", "零件名称" },
|
|
{ "Batch", "批次" },
|
|
{ "VendBatch", "供应商批次" },
|
|
{ "ProduceDate", "生产日期" },
|
|
{ "EndTime", "到货截至日期" },
|
|
{ "PoUnit", "单位" }
|
|
};
|
|
|
|
string url = EntityListToExcel2003(cellheader, _ls, "发货明细");
|
|
}
|
|
|
|
protected void btnCreate_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
|
|
BindDetail();
|
|
}
|
|
|
|
protected void btnEdit_Click(object sender, EventArgs e)
|
|
{
|
|
var _asn=Session["Asn"] as V_TB_ASN;
|
|
if (_asn == null)
|
|
{
|
|
Alert.Show("发货订单信息不能为空!");
|
|
}
|
|
List<V_TB_ASN_DETAIL> _list = new List<V_TB_ASN_DETAIL>();
|
|
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++)
|
|
{
|
|
GridRow row = Grid_V_TB_ASN_DETAIL.Rows[i];
|
|
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL();
|
|
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i];
|
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]);
|
|
_entity.PoBillNum = rowDataKeys[1] as string;
|
|
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]);
|
|
_entity.PartCode = rowDataKeys[3] as string;
|
|
_entity.PoUnit = rowDataKeys[4] as string;
|
|
_entity.LocUnit = rowDataKeys[5] as string;
|
|
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[6]);
|
|
_entity.Currency = rowDataKeys[7] as string;
|
|
_entity.PackQty = ConvertHelper.To<Decimal>(rowDataKeys[8]);
|
|
_entity.UnConv = ConvertHelper.To<Decimal>(rowDataKeys[9]);
|
|
_entity.DockCode = rowDataKeys[10] as string;
|
|
_entity.State = ConvertHelper.To<int?>(rowDataKeys[11]);
|
|
_entity.Remark = rowDataKeys[12] as string;
|
|
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[13]);
|
|
_entity.CreateUser = rowDataKeys[14] as string;
|
|
_entity.UpdateTime = ConvertHelper.To<DateTime>(rowDataKeys[15]);
|
|
_entity.UpdateUser = rowDataKeys[16] as string;
|
|
_entity.UpdateInfo = rowDataKeys[17] as string;
|
|
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[18]);
|
|
_entity.PartDesc1 = rowDataKeys[19] as string;
|
|
_entity.CurrencyDesc = rowDataKeys[20] as string;
|
|
_entity.Site = rowDataKeys[21] as string;
|
|
_entity.VendName = rowDataKeys[22] as string;
|
|
_entity.PartDesc2 = rowDataKeys[23] as string;
|
|
_entity.AsnBillNum = rowDataKeys[24] as string;
|
|
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[25]);
|
|
_entity.VendBatch = rowDataKeys[26] as string;
|
|
_entity.Batch = rowDataKeys[28] as string;
|
|
_entity.VendId = rowDataKeys[29] as string;
|
|
System.Web.UI.WebControls.TextBox TXT_VenBatch = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_VenBatch");
|
|
System.Web.UI.WebControls.TextBox TXT_PackQty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_PackQty");
|
|
System.Web.UI.WebControls.TextBox TXT_Qty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_Qty");
|
|
System.Web.UI.WebControls.TextBox TXT_ProduceDate = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_ProduceDate");
|
|
_entity.VendBatch= TXT_VenBatch.Text;
|
|
|
|
|
|
if (string.IsNullOrEmpty(TXT_ProduceDate.Text))
|
|
{
|
|
Alert.Show("包装量填写错误!");
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
_entity.ProduceDate =DateTime.Parse(TXT_ProduceDate.Text);
|
|
}
|
|
_list.Add(_entity);
|
|
}
|
|
if (_list.Count > 0)
|
|
{
|
|
var _first = _list.FirstOrDefault();
|
|
if (_first.State != (int)AsnState.New)
|
|
{
|
|
Alert.Show("不是新建状态,不能保存信息!");
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
protected void btnRefresh_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
private List<V_TB_ASN_DETAIL> GetSelectedList()
|
|
{
|
|
List<V_TB_ASN_DETAIL> _list = new List<V_TB_ASN_DETAIL>();
|
|
int _flag = 0;
|
|
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++)
|
|
{
|
|
GridRow row = Grid_V_TB_ASN_DETAIL.Rows[i];
|
|
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL();
|
|
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i];
|
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]);
|
|
_entity.PoBillNum = rowDataKeys[1] as string;
|
|
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]);
|
|
_entity.PartCode = rowDataKeys[3] as string;
|
|
_entity.PoUnit = rowDataKeys[4] as string;
|
|
_entity.LocUnit = rowDataKeys[5] as string;
|
|
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[6]);
|
|
_entity.Currency = rowDataKeys[7] as string;
|
|
_entity.PackQty = ConvertHelper.To<Decimal>(rowDataKeys[8]);
|
|
_entity.UnConv = ConvertHelper.To<Decimal>(rowDataKeys[9]);
|
|
_entity.DockCode = rowDataKeys[10] as string;
|
|
_entity.State = ConvertHelper.To<int>(rowDataKeys[11]);
|
|
_entity.Remark = rowDataKeys[12] as string;
|
|
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[13]);
|
|
_entity.CreateUser = rowDataKeys[14] as string;
|
|
_entity.UpdateTime = ConvertHelper.To<DateTime?>(rowDataKeys[15]);
|
|
_entity.UpdateUser = rowDataKeys[16] as string;
|
|
_entity.UpdateInfo = rowDataKeys[17] as string;
|
|
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[18]);
|
|
_entity.PartDesc1 = rowDataKeys[19] as string;
|
|
_entity.CurrencyDesc = rowDataKeys[20] as string;
|
|
_entity.Site = rowDataKeys[21] as string;
|
|
_entity.VendName = rowDataKeys[22] as string;
|
|
_entity.PartDesc2 = rowDataKeys[23] as string;
|
|
_entity.AsnBillNum = rowDataKeys[24] as string;
|
|
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[25]);
|
|
_entity.VendBatch = rowDataKeys[26] as string;
|
|
_entity.ProduceDate = ConvertHelper.To<DateTime>(rowDataKeys[27]);
|
|
_entity.Batch = rowDataKeys[28] as string;
|
|
_entity.VendId = rowDataKeys[29] as string;
|
|
_entity.Guid=ConvertHelper.To<Guid>(rowDataKeys[29]);
|
|
|
|
_list.Add(_entity);
|
|
}
|
|
if (_flag == 1)
|
|
{ _list = new List<V_TB_ASN_DETAIL>(); }
|
|
return _list;
|
|
}
|
|
protected void btnSend_Click(object sender, EventArgs e)
|
|
{
|
|
var _asn = Session["Asn"] as V_TB_ASN;
|
|
if (_asn == null)
|
|
{
|
|
Alert.Show("发货订单信息不能为空!");
|
|
}
|
|
var _list = GetSelectedList();
|
|
if (_list.Count > 0)
|
|
{
|
|
var _first = _list.FirstOrDefault();
|
|
if (_first.State != (int)AsnState.New)
|
|
{
|
|
Alert.Show("不是新建状态,不能保存信息!");
|
|
}
|
|
else
|
|
{
|
|
var result=SCP_BARCODE_CONTROLLER.Get_TB_PRINT_COUNT_List(new TB_PRINT_COUNT() { BillNo=_asn.AsnBillNum });
|
|
if (result.State == ReturnStatus.Succeed)
|
|
{
|
|
if (result.Result.Count(p => p.PrintType == (int)PrintType.ASN) == 0)
|
|
{
|
|
Alert.Show(_asn.AsnBillNum + "发货单未打印!");
|
|
return;
|
|
}
|
|
if (result.Result.Count(p => p.PrintType == (int)PrintType.BAR_CODE) == 0)
|
|
{
|
|
Alert.Show(_asn.AsnBillNum + "标签未打印!");
|
|
return;
|
|
}
|
|
}
|
|
var check = SCP_ASN_CONTROLLER.Get_TS_UNI_API(_asn);
|
|
if(check.State == ReturnStatus.Failed)
|
|
{
|
|
Alert.Show(_asn.AsnBillNum + "请勿重复提交数据!");
|
|
return;
|
|
}
|
|
var ret = SCP_ASN_CONTROLLER.Save_TB_ASN_DETAIL(_asn, _list);
|
|
if (ret.State == ReturnStatus.Succeed)
|
|
{
|
|
SET_ASN_STATE("发货成功", AsnState.Ship);
|
|
GetV_TB_ASNData();
|
|
BindDetail();
|
|
}
|
|
else
|
|
{
|
|
Alert.Show(string.Join("\n\r", ret.MessageList.ToArray()));
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
private void SET_ASN_STATE(string p_msg, AsnState p_state)
|
|
{
|
|
if (Session["Asn"] != null)
|
|
{
|
|
|
|
if (CurrentUser.Name == "admin")
|
|
{
|
|
if (p_state == AsnState.Reject)
|
|
{
|
|
var _asn = Session["Asn"] as V_TB_ASN;
|
|
|
|
|
|
var asn = SCPDB.TB_ASN.Where(p => p.AsnBillNum == _asn.AsnBillNum).FirstOrDefault();
|
|
var detail = SCPDB.TB_ASN_DETAIL.Where(p => p.AsnBillNum == _asn.AsnBillNum).ToArray();
|
|
if (asn != null)
|
|
{
|
|
asn.State = -1;
|
|
asn.IsDeleted = true;
|
|
SCPDB.TB_ASN.AddOrUpdate(asn);
|
|
}
|
|
if (detail.Count() > 0)
|
|
{
|
|
foreach (var itm in detail)
|
|
{
|
|
itm.IsDeleted = true;
|
|
itm.State = -1;
|
|
|
|
}
|
|
SCPDB.TB_ASN_DETAIL.AddOrUpdate(detail);
|
|
}
|
|
if (SCPDB.SaveChanges() != -1)
|
|
{
|
|
Alert.Show("发货单删除成功");
|
|
}
|
|
}
|
|
|
|
}
|
|
else
|
|
{
|
|
var _ask = Session["Asn"] as V_TB_ASN;
|
|
var ret = SCP_ASN_CONTROLLER.Save_TB_ASN_STATE(new List<string>() { _ask.AsnBillNum }, p_state);
|
|
if (ret.State == ReturnStatus.Succeed)
|
|
{
|
|
Alert.Show(p_msg);
|
|
}
|
|
else
|
|
{
|
|
Alert.Show(ret.Message);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
protected void btnCancel_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
SET_ASN_STATE("发货单作废成功", AsnState.Reject);
|
|
|
|
}
|
|
|
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
Grid_V_TB_ASN_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
|
|
|
|
BindDetail();
|
|
}
|
|
|
|
protected void Grid_V_TB_ASN_DETAIL_PageIndexChange(object sender, GridPageEventArgs e)
|
|
{
|
|
BindDetail();
|
|
}
|
|
|
|
protected void CreateBarCode_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
var _list=GetSelectedList();
|
|
if (_list.Count > 0)
|
|
{
|
|
btnCreateBarCode.Enabled = false;
|
|
var ret=SCP_ASN_CONTROLLER.Save_TB_CREATE_BARCODE(_list);
|
|
if (ret.State == ReturnStatus.Succeed)
|
|
{
|
|
Alert.Show("条码创建成功!");
|
|
}
|
|
else
|
|
{
|
|
btnCreateBarCode.Enabled = true;
|
|
Alert.Show(string.Join("<BR>", ret.MessageList.ToArray()));
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void btnBarCodeList_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
string AsnBillNum = Request["AsnBillNum"];
|
|
string script = Window1.GetShowReference("SCP_SHIP_DETAIL_BARCODE.aspx?BillNo=" + AsnBillNum, "条码列表");
|
|
PageContext.RegisterStartupScript(script);
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Alert.Show(ex.Message);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
protected void SelectedBarCode_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void btnPrint_Click(object sender, EventArgs e)
|
|
{
|
|
string AsnBillNum = Request["AsnBillNum"];
|
|
var str = string.Format("window.open(\"../../../Handlers/GenerateReport.ashx?report=SendBill&data=102&type=pdf&filename=SendBill.pdf&AsnBillNum={0}&open=\")", AsnBillNum);
|
|
PageContext.RegisterStartupScript(str);
|
|
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.ASN});
|
|
}
|
|
|
|
protected void btnSelectedBarCode_Click(object sender, EventArgs e)
|
|
{
|
|
string openUrl = string.Format("SCP_SELECT_MAKE.aspx?select={0}", HttpUtility.UrlEncode(TXT_MarkType.Text));
|
|
PageContext.RegisterStartupScript(WindowUpload.GetSaveStateReference(TXT_MarkType.ClientID) + WindowUpload.GetShowReference(openUrl));
|
|
}
|
|
|
|
protected void btnOutputPallet_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
#region 计算托盘数量和发货数量是否相等
|
|
|
|
SearchV_TB_ASN_DETAILData((ret) => {
|
|
|
|
var _asn = Session["Asn"] as V_TB_ASN;
|
|
if (_asn == null)
|
|
{
|
|
Alert.Show("发货单不存在!");
|
|
return;
|
|
}
|
|
|
|
|
|
var _ls=SCP_ASN_CONTROLLER.Get_CAN_PALLET_QTY(ret.ToList());
|
|
var _errList = new List<string>();
|
|
_ls.ForEach(p => {
|
|
if(p.CanQty>0)
|
|
{
|
|
_errList.Add(string.Format("编号:{0}名称:{1},托盘数量总和小于发货单数量",p.PartCode,(p.PartDesc1+p.PartDesc2)));
|
|
}
|
|
});
|
|
if (_errList.Count > 0)
|
|
{
|
|
Alert.Show(string.Join("<BR>", _errList.ToArray()));
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
List<string> _list = new List<string>();
|
|
_list.Add(_asn.AsnBillNum);
|
|
DataSet ds = SCP_EXCEL_CONTROLLER.GET_PALLET_EXECEL(_list);
|
|
PageBase.DataSetToExcel(ds, "打印导出托盘!");
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
protected void btnPackage_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void WindowUpload1_Close(object sender, WindowCloseEventArgs e)
|
|
{
|
|
if(string.IsNullOrEmpty(TXT_MarkType.Text))
|
|
{
|
|
Alert.Show("没有选择标签模板!");
|
|
return;
|
|
}
|
|
string AsnBillNum = Request["AsnBillNum"];
|
|
if (!string.IsNullOrEmpty(AsnBillNum))
|
|
{
|
|
var str = string.Format("window.open(\"../../../Handlers/GenerateReport.ashx?report={1}&data=101&type=pdf&filename=标签.pdf&AsnBillNum={0}&open=\")", AsnBillNum, TXT_MarkType.Text);
|
|
PageContext.RegisterStartupScript(str);
|
|
}
|
|
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.BAR_CODE });
|
|
TXT_MarkType.Text = "";
|
|
}
|
|
}
|
|
}
|