Browse Source

提交

master
学 赵 4 years ago
parent
commit
135dae9150
  1. 132
      SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx
  2. 420
      SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs
  3. 308
      SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.designer.cs
  4. 2
      SCP/Views/沈阳金杯/WarehouseData/SCP_INVOICE_DELTAIL_RED.aspx.cs

132
SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx

@ -1,6 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_LIST.aspx.cs" Inherits="SCP.SupplierData.ReceiveList" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_LIST.aspx.cs" Inherits="SCP.WarehouseData.ReceiveList" %>
<%@ Import Namespace="CK.SCP.Utils" %>
<%@ Import Namespace="CK.SCP.Models.Enums" %>
@ -22,106 +20,7 @@
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start">
<Items>
<f:Form runat="server">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();">
</f:Button>
<f:Button ID="btnCreate" runat="server" EnablePostBack="True" Text="生成发票" OnClick="btnCreate_OnClick" Icon="Add" Hidden="true">
</f:Button>
<f:Button ID="btnCreateAll" runat="server" EnablePostBack="True" Text="生成发票" Icon="Add" OnClick="btnCreateAll_Click" OnClientClick="if(!confirm('生成发票时请先处理退货数量,如发现收票时还有退货数量未处理,造成不能收票自行负责!'))return false;">
</f:Button>
<f:Button ID="btn" runat="server" EnablePostBack="True" Text="补开发票" Icon="Add" Hidden="true">
</f:Button>
<f:Button ID="Button2" runat="server" EnablePostBack="True" Text="导出" Icon="Add" OnClick="btnOutput_OnClick">
</f:Button>
<f:Button ID="btnCanIn" runat="server" EnablePostBack="True" Text="只看可开票零件" Icon="Zoom" OnClick="btnCanIn_Click" Hidden="true">
</f:Button>
<f:Button ID="btnShow" runat="server" Text="查询面板" OnClick="btnShow_Click">
</f:Button>
<f:ToolbarFill runat="server" Hidden="true"/>
<f:TextBox ID="tb_RecvBillNum" runat="server" Label="单据号" Hidden="true"/>
<f:Button ID="btn_Search" runat="server" EnablePostBack="True" Text="快速查找" OnClick="btnSearch_Click" Hidden="true"></f:Button>
<f:DropDownList ID="DDL_VEND_LIST" DataValueField="VendId" DataTextField="VendName" runat="server" Label="供应商编码" EnableEdit="true" EnableMultiSelect="false" Hidden="true"/>
<f:Button ID="BTN_INV" runat="server" EnablePostBack="True" Text="确认" OnClick="BTN_INV_Click" Hidden="true" Icon="Accept" ></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox" >
<Items>
<f:Form runat="server" >
<Rows>
<f:FormRow runat="server" ID="FormRow_1">
<Items>
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" />
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_ASNBill" />
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" />
<f:TextBox runat = "server" Label = "供应商编号" EmptyText = "" ID = "TXT_VendId" />
<f:DropDownList runat="server" ID="DDL_State" Label="单据类型" Hidden="true">
<f:ListItem Text="-" Value=""/>
<f:ListItem Text="退货单" Value="退货单" />
<f:ListItem Text="收货单" Value="收货单" />
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_2">
<Items>
<f:TextBox runat = "server" Label = "项目编号" EmptyText = "" ID = "TXT_ProjectId" />
<f:TextBox runat = "server" Label = "零件编号" EmptyText = "" ID = "TXT_PartCode" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="收货日期" EmptyText="请选择日期" ID="DP_StartDate" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" EmptyText="请选择日期" Label="至" ID="Date_EndDate" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_3">
<Items>
<f:TextBox runat = "server" Label = "收(退)货单号" EmptyText = "" ID = "TXT_RECEIVE" />
<f:Button runat="server" Text="关闭" ID="BtnClose" OnClick="BtnClose_Click"></f:Button>
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找">
</f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
<f:Form runat="server" Title="">
<Items>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow1">
<Items>
<f:NumberBox ID="txtContractPrice1" runat="server" Label="折扣金额" Hidden="true" />
<f:NumberBox ID="txtBlancePrice1" runat="server" Label="调整税额" MaxValue="1" Hidden="true" />
<f:Label runat="server"></f:Label>
<f:Label runat="server"></f:Label>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow2">
<Items>
<f:DropDownList runat="server" Label="供应商税率" ID="lbTaxRate" AutoPostBack="true" >
<f:ListItem Text="0.16" Value="0.16" />
<f:ListItem Text="0.13" Value="0.13" />
<f:ListItem Text="0" Value="0" />
</f:DropDownList>
<f:Button ID="btnTax" runat="server" Text="使用税率" OnClientClick="updateTotal();" Icon="Accept" ></f:Button>
<f:Label runat="server"></f:Label>
<f:Label runat="server"></f:Label>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid ID="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid"
<f:Grid ID="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="1000" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine" IsDatabasePaging="true" AllowPaging="True" SortField="RecvBillNum"
AutoScroll="True" OnPageIndexChange="Grid_V_TB_RECEIVE_LIST_PageIndexChange" EnableCheckBoxSelect = "true" OnRowDataBound="Grid_V_TB_RECEIVE_LIST_RowDataBound" >
<PageItems>
@ -130,20 +29,16 @@
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_OnSelectedIndexChanged" runat="server">
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="200" Value="200" />
<f:ListItem Text="500" Value="500" />
<f:ListItem Text="1000" Value="1000" />
</f:DropDownList>
</PageItems>
<Columns>
<%-- <f:RowNumberField runat="server" ID="chb" HeaderText="行号" />--%>
<%--<f:RowNumberField runat="server" ID="chb" HeaderText="行号" />--%>
<%-- <f:TemplateField HeaderText="否可开票" Width="120px" ColumnID="IsCheck">
<ItemTemplate>
<asp:Label runat="server" DataField="Qty" ID="Label1" Text='<%# Eval("IsCheck") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:BoundField runat="server" HeaderText="项目编码" DataField="ProjectId" width="80"/>
<f:BoundField runat="server" HeaderText="单据类型" ColumnID="BillType_DESC" DataField="BillType_DESC" width="80"/>
<f:BoundField runat="server" HeaderText="单据号" ColumnID="RecvBillNum" DataField="RecvBillNum" width="80" />
@ -153,9 +48,7 @@
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" width="80"/>
<f:BoundField runat="server" HeaderText="订单行" ColumnID="" DataField="PoLine" width="50" />
<f:BoundField runat="server" HeaderText="单价" ColumnID="" DataField="Price" width="80"/>
<f:BoundField runat="server" HeaderText="采购价格" ColumnID="" DataField="PurPrice" width="80"/>
<f:TemplateField HeaderText="可开票数量" ColumnID="Qty" width="100">
<ItemTemplate>
<input type="hidden" class="price" runat="server" value='<%# Eval("Price") %>' />
@ -175,29 +68,14 @@
<f:BoundField runat="server" HeaderText="备注" ColumnID="Remark" DataField="Remark" />
</Columns>
</f:Grid>
<f:ContentPanel runat="server" CssClass="totalpanel" ShowBorder="true" ShowHeader="false" ColumnWidth="50%">
<div style="margin-bottom: 10px; ">
<input type="hidden" id="TOTAL_PRICE" name="TOTAL_PRICE" />
总计:<span id="totalPrice" style="color: red; font-size: 1.5em; font-weight: bold;" ></span>
<input type="hidden" id="TOTAL_PRICE1" name="TOTAL_PRICE1" />
<input type="hidden" id="TOTAL_PRICE_TAX" name="TOTAL_PRICE_TAX" />
税额:<span id="totalPriceTax" style="color: red; font-size: 1.5em; font-weight: bold;" ></span>
税后金额:<span id="totalPrice1" style="color: red; font-size: 1.5em; font-weight: bold;" ></span>
</div>
<%--<div style="margin-bottom: 10px;">
</div>
<div style="margin-bottom: 10px;">
</div>--%>
</f:ContentPanel>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close"
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" />
</form>
<script src="../../res/js/jquery.min.js"></script>
<%--<script src="../../res/js/jquery.min.js"></script>
<script type="text/javascript">
var gridClientID = '<%= Grid_V_TB_RECEIVE_LIST.ClientID %>';
var taxRateClientID = '<%= lbTaxRate.ClientID %>';
@ -244,6 +122,6 @@
updateTotal();
});
</script>
</script>--%>
</body>
</html>

420
SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs

@ -14,61 +14,17 @@ using SCP.Code;
using System.Drawing;
using CK.SCP.Models.Enums;
namespace SCP.SupplierData
namespace SCP.WarehouseData
{
public partial class ReceiveList : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
IsRoleRight();
if (!IsPostBack)
{
TranslatorAgents(Toolbar2);
TranslatorAgent(Grid_V_TB_RECEIVE_LIST);
TranslatorAgents(FormRow_1);
TranslatorAgents(FormRow_2);
TranslatorAgents(FormRow_3);
LoadData();
SetRoleRule();
BindVender(DDL_VEND_LIST);
}
}
public void IsRoleRight()
{
//if (!CurrentUser.RoleList.Contains("供应商"))
//{
// Alert.Show("当前用户角色不能操作该模块!");
// return;
//}
//else
//{
//}
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
//{
// Alert.Show("当前用户未选择地点!");
// return;
//}
}
private void SetRoleRule()
{
if (CurrentUser.RoleList.Contains("采购人员"))
{
DDL_VEND_LIST.Hidden = false;
BTN_INV.Hidden = false;
if( CurrentUser.FactoryList!=null && CurrentUser.FactoryList.Count>0)
{
var _site= CurrentUser.FactoryList.FirstOrDefault();
if(_site=="CNS")
{
txtContractPrice1.Enabled = false;
}
}
}
}
public void LoadData()
{
// 每页记录数
@ -79,80 +35,7 @@ namespace SCP.SupplierData
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action)
{
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST();
_ls.PoBillNum = TXT_BillNo.Text;
_ls.VendName = TXT_VendName.Text;
_ls.AsnBillNum = TXT_ASNBill.Text;
_ls.PartCode = TXT_PartCode.Text;
_ls.VendId = TXT_VendId.Text;
_ls.ProjectId = TXT_ProjectId.Text;
if (DP_StartDate.SelectedDate != null)
{
_ls.BeginTime = DP_StartDate.SelectedDate;
}
if (Date_EndDate.SelectedDate != null)
{
_ls.ShipTime = Date_EndDate.SelectedDate;
}
if (!string.IsNullOrEmpty(DDL_State.SelectedValue))
{
_ls.BillType_DESC = DDL_State.SelectedValue;
}
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
_ls.Site = CurrentUser.FactoryList[0];
}
_ls.State = 1;
if (CurrentUser.RoleList.Contains("采购人员"))
{
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!");
return;
}
var _venderId = DDL_VEND_LIST.SelectedValue;
_ls.VendId = DDL_VEND_LIST.SelectedValue;
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId))
{
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site);
if (_vender.Tax != null)
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
else
{
lbTaxRate.SelectedValue = "0";
}
}
}
else
{
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{
var _venderId = CurrentUser.VenderList.FirstOrDefault();
_ls.VendId = _venderId;
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId))
{
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site);
if (_vender.Tax != null)
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
else
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
}
}
}
if (string.IsNullOrEmpty(_ls.VendId))
{
return;
}
_ls.VendId = Request.Params["VendId"];
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
@ -160,37 +43,16 @@ namespace SCP.SupplierData
p_action(ret.Result);
}
});
}
public void BindData()
{
SearchData(ret =>
{
if (CurrentUser.RoleList.Contains("采购人员"))
{
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST,"DESC");
List<V_TB_RECEIVE_LIST> temp = ret.ToList();
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!");
return;
}
Grid_V_TB_RECEIVE_LIST.DataSource = temp;
Grid_V_TB_RECEIVE_LIST.DataBind();
}
else
{
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST,"DESC");
List<V_TB_RECEIVE_LIST> temp = ret.ToList();
Grid_V_TB_RECEIVE_LIST.DataSource = temp;
Grid_V_TB_RECEIVE_LIST.DataBind();
}
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST, "DESC");
List<V_TB_RECEIVE_LIST> temp = ret.ToList();
Grid_V_TB_RECEIVE_LIST.DataSource= temp;
Grid_V_TB_RECEIVE_LIST.DataBind();
});
// 排列和数据库分页
}
@ -206,175 +68,6 @@ namespace SCP.SupplierData
BindData();
}
//生成发票
protected void btnCreate_OnClick(object sender, EventArgs e)
{
CreateInvoice("0");
}
private void CreateInvoice(string p_all)
{
try
{
string vender = string.Empty;
if (CurrentUser.RoleList.Contains("采购人员"))
{
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!");
return;
}
vender = DDL_VEND_LIST.SelectedValue;
}
else
{
vender = CurrentUser.VenderList[0];
}
TM_HYANTOLIN_REVIEW _entity = new TM_HYANTOLIN_REVIEW();
_entity.UltimateName = vender;
_entity.State = 0;
var _state = 0;
SCP_QUALITY_CONTROLLER.Get_TM_HYANTOLIN_REVIEW_List(_entity, (rs) =>
{
if (rs.State == ReturnStatus.Succeed)
{
var _ls = rs.Result.ToList();
if (_ls != null && _ls.Count > 0)
{
var _sum = _ls.Sum(p => p.ClaimAmount);
var _ary = _ls.Select(p => p.ReviewBillNum).ToList();
_state = 1;
if (_sum == 0)
{
_state = 0;
}
if (_sum > 0)
{
Alert.Show(string.Format("索赔金额合计{0}供应商存在未处理索赔单{1}!", _sum.ToString(), string.Join(",", _ary.ToArray())), "索赔管理查看");
}
}
}
});
if (_state == 1)
{
return;
}
var _tax = lbTaxRate.SelectedValue;
var _cj = string.IsNullOrEmpty(txtContractPrice1.Text) ? "0" : txtContractPrice1.Text;
var _tz = string.IsNullOrEmpty(txtBlancePrice1.Text) ? "0" : txtBlancePrice1.Text;
SearchData((rs) =>
{
string IsCreate = "0";
if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length == 0)
{
Alert.Show("请选择要创建发票的记录!");
return;
}
string IDS = "";
List<string> _list = new List<string>();
List<string> _projectList = new List<string>();
List<string> _rejList = new List<string>();
string _projectId = string.Empty;
List<string> _recList = new List<string>();
for (int i = 0; i < Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length; i++)
{
int rowIndex = Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray[i];
int ID = Convert.ToInt32(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][0]);
IDS += ID + ",";
_projectId = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][1].ToString();
_projectList.Add(_projectId);
var _recbill = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][2].ToString();
if (!string.IsNullOrEmpty(_recbill) && _recbill.IndexOf("R.") > 0)
{
_rejList.Add(_projectId);
}
}
//if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
//{
// if (_projectList.Distinct().Count() > 1)
// {
// Alert.Show("请选择同一项目编号零件生成发票(可以到【查询面板】填写查询)</br>有退货必须选择否则影响财务收票!");
// return;
// }
// //var _ls = rs.Where(p => p.State==(int)ReceiveState.Check && p.RecvBillNum.Contains("R.") && p.VendId==vender && p.IsDeleted == false && p.ProjectId==_projectId && p.Site==CurrentUser.FactoryList.FirstOrDefault());
// //if (_ls.Count() > 0)
// //{
// // var _count=_rejList.Count(p => p == _projectId);
// // if (_count != _ls.Count())
// // {
// // Alert.Show(_projectId+"项目还存在退货数量!");
// // return;
// // }
// //}
//}
if (_list.Distinct().Count() > 1)
{
Alert.Show("请选择的记录不是同一个供应商,请选择供应商!");
return;
}
if (IDS != "") IDS = IDS.Substring(0, IDS.Length - 1);
if (CurrentUser.FactoryList.FirstOrDefault() != "BJCIAI")
{
var _ls = GetIsAllChecked(vender, IDS);
if (_ls.Count > 0)
{
Alert.Show(string.Format("退货或索赔单{0}未开票!", string.Join(",", _ls.ToArray())));
return;
}
}
MyQueryStringEnCode me = new MyQueryStringEnCode("ReceiveID=" + IDS + "&VendId=" + vender + "&Modify=" + IsCreate + "&IsAll=" + p_all + "&Tax=" + _tax + "&CJ=" + _cj + "&TZ=" + _tz);
if (me.QueryString.Length > 2000)
{
Alert.Show("选择零件记录超过,发票允许条数!");
return;
}
string ret = Window1.GetShowReference("../../Views/SupplierData/SCP_INVOICE_CREATE.aspx?" + me.QueryString, "生成发票");
PageContext.RegisterStartupScript(ret);
});
}
catch (Exception ex)
{
Alert.Show(ex.Message);
}
}
private List<string> GetIsAllChecked(string p_VendId,string p_VendIds)
{
List<string> unSelected = new List<string>();
var _ls = SCPDB.V_TB_RECEIVE_LIST.Where(p => p.VendId == p_VendId && p.State == 1 && (p.BillType_DESC == "索赔单" || p.BillType_DESC == "退货单")).Select(p => new { p.UID, p.RecvBillNum }).ToList();
//SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ent, (ret) =>
//{
// if (ret.State == ReturnStatus.Succeed)
// {
var _lsCompare = p_VendIds.Split(new char[] { ',' });
// var _ls = ret.Result.Select(p => new { p.UID, p.RecvBillNum }).ToList();
foreach (var itm in _ls)
{
if (!_lsCompare.Contains(itm.UID.ToString()))
{
unSelected.Add(itm.RecvBillNum);
}
}
// }
//});
return unSelected.Distinct().ToList();
}
protected void Grid_V_TB_RECEIVE_LIST_PageIndexChange(object sender, GridPageEventArgs e)
@ -383,92 +76,7 @@ namespace SCP.SupplierData
}
//导出
protected void btnOutput_OnClick(object sender, EventArgs e)
{
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST();
_ls.PoBillNum = TXT_BillNo.Text;
_ls.VendName = TXT_VendName.Text;
_ls.UserInVendIds = CurrentUser.VenderList;
_ls.AsnBillNum = TXT_ASNBill.Text;
_ls.PartCode = TXT_PartCode.Text;
_ls.VendId = TXT_VendId.Text;
_ls.ProjectId = TXT_ProjectId.Text;
_ls.RecvBillNum = TXT_RECEIVE.Text;
if (DP_StartDate.SelectedDate != null)
{
_ls.BeginTime = DP_StartDate.SelectedDate;
}
if (Date_EndDate.SelectedDate != null)
{
_ls.ShipTime = Date_EndDate.SelectedDate;
}
if (!string.IsNullOrEmpty(DDL_State.SelectedValue))
{
_ls.BillType_DESC = DDL_State.SelectedValue;
}
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
_ls.Site = CurrentUser.FactoryList[0];
}
_ls.State = 1;
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{
var _venderId = CurrentUser.VenderList.FirstOrDefault();
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId))
{
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site);
if (_vender.Tax != null)
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
else
{
lbTaxRate.Text = "0";
}
}
}
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
var _lst = ret.Result.ToList();
Dictionary<string, string> cellheader = new Dictionary<string, string>
{
{ "ProjectId", "项目编号" },
{ "BillType_DESC", "单据类型" },
{ "RecvBillNum", "单据编号" },
{ "AsnBillNum", "发货单号" },
{ "VendName", "供应商" },
{ "VendId", "供应商编码" },
{ "PoBillNum", "订单号" },
{ "PoLine", "订单行" },
{ "PartCode", "零件号" },
{ "PartDesc1", "零件名称" },
{ "LocUnit", "单位" },
{ "Currency", "币种" },
{ "Qty", "可开票数量" },
{ "Price", "单价" },
{ "CreateTime", "创建时间" }
};
string url = EntityListToExcel2003(cellheader,_lst , "审核明细");
}
});
}
//快速查找
protected void btnSearch_Click(object sender, EventArgs e)
{
}
protected void btnShow_Click(object sender, EventArgs e)
{
gp1.Hidden = false;
}
protected void BtnClose_Click(object sender, EventArgs e)
{
gp1.Hidden = true;
}
protected void BtnSearch_Click(object sender, EventArgs e)
{
BindData();
@ -476,6 +84,7 @@ namespace SCP.SupplierData
protected void Grid_V_TB_RECEIVE_LIST_RowDataBound(object sender, GridRowEventArgs e)
{
System.Web.UI.WebControls.Label _label= (System.Web.UI.WebControls.Label)Grid_V_TB_RECEIVE_LIST.Rows[e.RowIndex].FindControl("Qty1");
if (!string.IsNullOrEmpty(_label.Text))
{
@ -486,12 +95,6 @@ namespace SCP.SupplierData
}
}
protected void btnCanIn_Click(object sender, EventArgs e)
{
}
protected void BTN_INV_Click(object sender, EventArgs e)
{
@ -502,12 +105,5 @@ namespace SCP.SupplierData
{
BindData();
}
protected void btnCreateAll_Click(object sender, EventArgs e)
{
CreateInvoice("1");
}
}
}

308
SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.designer.cs

@ -7,7 +7,7 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.SupplierData {
namespace SCP.WarehouseData {
public partial class ReceiveList {
@ -30,312 +30,6 @@ namespace SCP.SupplierData {
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// Button1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button1;
/// <summary>
/// btnCreate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCreate;
/// <summary>
/// btnCreateAll 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCreateAll;
/// <summary>
/// btn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btn;
/// <summary>
/// Button2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button2;
/// <summary>
/// btnCanIn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCanIn;
/// <summary>
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnShow;
/// <summary>
/// tb_RecvBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox tb_RecvBillNum;
/// <summary>
/// btn_Search 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btn_Search;
/// <summary>
/// DDL_VEND_LIST 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_VEND_LIST;
/// <summary>
/// BTN_INV 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BTN_INV;
/// <summary>
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.GroupPanel gp1;
/// <summary>
/// FormRow_1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_1;
/// <summary>
/// TXT_BillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_BillNo;
/// <summary>
/// TXT_ASNBill 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ASNBill;
/// <summary>
/// TXT_VendName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendName;
/// <summary>
/// TXT_VendId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendId;
/// <summary>
/// DDL_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
/// <summary>
/// FormRow_2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_2;
/// <summary>
/// TXT_ProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ProjectId;
/// <summary>
/// TXT_PartCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// DP_StartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_StartDate;
/// <summary>
/// Date_EndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker Date_EndDate;
/// <summary>
/// FormRow_3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_3;
/// <summary>
/// TXT_RECEIVE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_RECEIVE;
/// <summary>
/// BtnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnClose;
/// <summary>
/// BtnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnSearch;
/// <summary>
/// FormRow1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow1;
/// <summary>
/// txtContractPrice1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox txtContractPrice1;
/// <summary>
/// txtBlancePrice1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox txtBlancePrice1;
/// <summary>
/// FormRow2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow2;
/// <summary>
/// lbTaxRate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList lbTaxRate;
/// <summary>
/// btnTax 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnTax;
/// <summary>
/// Grid_V_TB_RECEIVE_LIST 控件。
/// </summary>

2
SCP/Views/沈阳金杯/WarehouseData/SCP_INVOICE_DELTAIL_RED.aspx.cs

@ -11,7 +11,7 @@ using CK.SCP.Models.Enums;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using CK.SCP.Controller;
using CK.SCP.Utils;
using FineUI;

Loading…
Cancel
Save