Browse Source

Merge branch 'master' of https://gitee.com/zxyabc/COMONE

master
TML 4 years ago
parent
commit
ccaa121583
  1. 8
      SCP/SCP.csproj
  2. 2
      SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx
  3. 50
      SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs
  4. 127
      SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx
  5. 109
      SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx.cs
  6. 87
      SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx.designer.cs
  7. 2
      SCP/Views/沈阳金杯/WarehouseData/SCP_INVOICE_DELTAIL_RED.aspx.cs

8
SCP/SCP.csproj

@ -4501,7 +4501,6 @@
<Content Include="Views\WarehouseData\SCP_INVOICE_CONFIRM.aspx" />
<Content Include="Views\WarehouseData\SCP_INVOICE_CHECKFAIL.aspx" />
<Content Include="Views\WarehouseData\SCP_INVOICE.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE_LIST.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE_VIEW.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE_DETAIL_VIEW.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE.aspx" />
@ -5561,13 +5560,6 @@
<Compile Include="Views\WarehouseData\SCP_INVOICE.aspx.designer.cs">
<DependentUpon>SCP_INVOICE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\WarehouseData\SCP_RECEIVE_LIST.aspx.cs">
<DependentUpon>SCP_RECEIVE_LIST.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\WarehouseData\SCP_RECEIVE_LIST.aspx.designer.cs">
<DependentUpon>SCP_RECEIVE_LIST.aspx</DependentUpon>
</Compile>
<Compile Include="Views\WarehouseData\SCP_RECEIVE_VIEW.aspx.cs">
<DependentUpon>SCP_RECEIVE_VIEW.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

2
SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx

@ -122,7 +122,7 @@
<f:Grid ID="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine" IsDatabasePaging="true" AllowPaging="True" SortField="RecvBillNum"
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine,Qty,Price" 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>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">

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

@ -16,6 +16,7 @@ using CK.SCP.Models.Enums;
namespace SCP.SupplierData
{
public partial class ReceiveList : PageBase
{
protected void Page_Load(object sender, EventArgs e)
@ -277,12 +278,19 @@ namespace SCP.SupplierData
List<string> _rejList = new List<string>();
string _projectId = string.Empty;
List<string> _recList = new List<string>();
List<int> IdList = new List<int>();
decimal _total = 0;
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]);
decimal _qty = decimal.Parse(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][5].ToString());
decimal _price = decimal.Parse(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][6].ToString());
_total += (_qty * _price);
IDS += ID + ",";
_projectId = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][1].ToString();
_projectList.Add(_projectId);
@ -291,12 +299,22 @@ namespace SCP.SupplierData
{
_rejList.Add(_projectId);
}
IdList.Add(ID);
}
if (_total < 0)
{
Alert.Show("不允许开负数发票!退货、索赔零件数量有问题,请联系工厂库房和质量解决!");
return;
}
if (IdList.Count > 200)
{
Alert.Show("选择零件记录超过,发票允许条数!");
return;
}
//if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
//{
// if (_projectList.Distinct().Count() > 1)
@ -335,14 +353,25 @@ namespace SCP.SupplierData
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, "生成发票");
InvoiceCreateQueryParm parm = new InvoiceCreateQueryParm();
parm.ReceiveID = IDS;
parm.VendId = vender;
parm.Modify = IsCreate;
parm.IsAll = p_all;
parm.Tax = _tax;
parm.CJ = _cj;
parm.TZ = _tz;
//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;
//}
Session["InvoiceCreateQueryParm"] = parm;
string ret = Window1.GetShowReference("../../Views/SupplierData/SCP_INVOICE_CREATE.aspx", "生成发票");
PageContext.RegisterStartupScript(ret);
});
}
@ -500,6 +529,7 @@ namespace SCP.SupplierData
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
Session["InvoiceCreateQueryParm"] = null;
BindData();
}

127
SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx

@ -1,127 +0,0 @@
<%@ 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" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
.totalpanel .x-panel-body {
border-top-width: 0 !important;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start">
<Items>
<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>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<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="1000" Value="1000" />
</f:DropDownList>
</PageItems>
<Columns>
<%--<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" />
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="AsnBillNum" DataField="AsnBillNum" width="80"/>
<f:BoundField runat="server" HeaderText="供应商" ColumnID="VendName" DataField="VendName" />
<f:BoundField runat="server" HeaderText="供应商编码" DataField="VendId" width="80"/>
<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") %>' />
<input type="hidden" class="number" runat="server" value='<%# Eval("Qty") %>' />
<asp:Label runat="server" DataField="Qty" ID="Qty1" Text='<%# Eval("Qty") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField runat="server" HeaderText="零件号" ColumnID="" DataField="PartCode" width="80"/>
<f:BoundField runat="server" HeaderText="零件名称" ColumnID="" DataField="PartDesc1" />
<f:BoundField runat="server" HeaderText="单位" ColumnID="LocUnit" DataField="LocUnit" width="50"/>
<f:BoundField runat="server" HeaderText="币种" ColumnID="Currency" DataField="Currency" width="50"/>
<f:BoundField runat="server" HeaderText="Erp收货单税率" ColumnID="Tax" DataField="Tax" width="50" Hidden="true"/>
<f:BoundField runat="server" HeaderText="要货日期" ColumnID="BeginTime" DataField="BeginTime" Hidden="true"/>
<f:BoundField runat="server" HeaderText="收货时间" ColumnID="CreateTime" DataField="CreateTime" DataFormatString="{0:yyyy-MM-dd}" />
<f:BoundField runat="server" HeaderText="备注" ColumnID="Remark" DataField="Remark" />
</Columns>
</f:Grid>
</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 type="text/javascript">
var gridClientID = '<%= Grid_V_TB_RECEIVE_LIST.ClientID %>';
var taxRateClientID = '<%= lbTaxRate.ClientID %>';
var priceSelector = '.f-grid-tpl input.price';
var numberSelector = '.f-grid-tpl input.number';
function getRowPrice(row) {
return parseFloat(row.find(priceSelector).val());
}
function getRowNumber(row) {
var num = parseFloat(row.find(numberSelector).val(), 10);
return num;
}
function updateTotal() {
var grid = F(gridClientID);
var tax = F(taxRateClientID);
var selection = grid.getSelectionModel().getSelection();
var store = grid.getStore();
var total = 0;
$.each(selection, function (index, item) {
var rowIndex = store.indexOf(item);
var row = $(grid.body.el.dom).find('.x-grid-item').eq(rowIndex);
total += getRowNumber(row) * getRowPrice(row);
});
$('#totalPrice').text( total.toFixed(4));
$('#TOTAL_PRICE').val(total.toFixed(4));
var _tax = total.toFixed(4) * parseFloat(tax.value);
var _totalPrice1 =parseFloat(total) + parseFloat(_tax);
$('#totalPriceTax').text( _tax.toFixed(4));
$('#TOTAL_PRICE_TAX').val(_tax.toFixed(4));
$('#totalPrice1').text( _totalPrice1.toFixed(4));
$('#TOTAL_PRICE1').val(_totalPrice1);
}
function registerSelectionChangeEvents() {
var grid = F(gridClientID);
grid.on('selectionchange', function (cmp, selected) {
updateTotal();
});
}
// 页面第一次加载完成后调用的函数
F.ready(function () {
registerSelectionChangeEvents();
updateTotal();
});
</script>--%>
</body>
</html>

109
SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx.cs

@ -1,109 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using CK.SCP.Models.AppBoxEntity;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Controller;
using FineUI;
using SCP.Code;
using System.Drawing;
using CK.SCP.Models.Enums;
namespace SCP.WarehouseData
{
public partial class ReceiveList : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadData();
}
}
public void LoadData()
{
// 每页记录数
Grid_V_TB_RECEIVE_LIST.PageSize = ConfigHelper.PageSize;
ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString();
BindData();
}
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action)
{
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST();
_ls.VendId = Request.Params["VendId"];
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
p_action(ret.Result);
}
});
}
public void BindData()
{
SearchData(ret =>
{
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();
});
// 排列和数据库分页
}
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e)
{
Grid_V_TB_RECEIVE_LIST.PageIndex = e.NewPageIndex;
BindData();
}
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e)
{
Grid_V_TB_RECEIVE_LIST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
BindData();
}
//生成发票
protected void Grid_V_TB_RECEIVE_LIST_PageIndexChange(object sender, GridPageEventArgs e)
{
BindData();
}
//导出
protected void BtnSearch_Click(object sender, EventArgs e)
{
BindData();
}
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))
{
if (decimal.Parse(_label.Text) < 0)
{
_label.ForeColor = Color.Red;
}
}
}
protected void BTN_INV_Click(object sender, EventArgs e)
{
BindData();
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindData();
}
}
}

87
SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx.designer.cs

@ -1,87 +0,0 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.WarehouseData {
public partial class ReceiveList {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// Grid_V_TB_RECEIVE_LIST 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_V_TB_RECEIVE_LIST;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarText ToolbarText1;
/// <summary>
/// ddlGridPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList ddlGridPageSize;
/// <summary>
/// Qty1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Qty1;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window1;
}
}

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