ERP退货系统管理(四十五)

网友投稿 249 2022-09-05

ERP退货系统管理(四十五)

添加的存储过程:(添加退货申请信息的存储过程)

CREATE PROCEDURE [dbo].[BioBackSendGoods_ADD]@SendBackID INT OUTPUT,@SubJect NVARCHAR(100),@AppUserID INT,@DepartMentID INT,@EndTimeLimit DATETIME,@SendUnit NVARCHAR(100),@BackUnit INT,@SendID INT,@SendAppUser INT,@SendRealUser INT,@SendDate DATETIME,@BackRealUser INT AS INSERT INTO [BioBackSendGoods]( [SubJect],[AppUserID],[DepartMentID],[EndTimeLimit],[SendUnit],[BackUnit],[SendID],[SendAppUser],[SendRealUser],[SendDate],[BackRealUser] )VALUES( @SubJect,@AppUserID,@DepartMentID,@EndTimeLimit,@SendUnit,@BackUnit,@SendID,@SendAppUser,@SendRealUser,@SendDate,@BackRealUser ) SET @SendBackID = @@IDENTITYGO

视图:

CREATE VIEW [dbo].[BioBackSendGoodsViews]ASSELECT SendBackID, SubJect, AppUserID, AppUserName=dbo.getUserNameByUserID(AppUserID), SubmitTime, DepartMentID, DepartMentName=dbo.FN_GetDepartMentByID(DepartMentID), EndTimeLimit, DeleteSate, SendUnit, BackUnit, BackUnitName=dbo.getCustomerByID(BackUnit), SendID, SendAppUser, SendAppUserName=dbo.getUserNameByUserID(SendAppUser), SendRealUser, SendRealUserName=dbo.getUserNameByUserID(SendRealUser), SendDate, BackRealUser, BackRealUserName=dbo.getUserNameByUserID(BackRealUser), DoneTime, isQualityCheck, QualityUserID, QualityUserName=dbo.getUserNameByUserID(QualityUserID), isfinance, FinanceUserID, FinanceUserName=dbo.getUserNameByUserID(FinanceUserID), StockUserid, StockUserName=dbo.getUserNameByUserID(StockUserid), IsStockAllow, StockID, StockName=dbo.FN_getStockNameByStockID(StockID), BackProTotalCount=ISNULL(dbo.FN_getTotalProCount(SendBackID),0), BackProTotalMoney=ISNULL(dbo.FN_getTotalProMoney(SendBackID),0)FROM BioBackSendGoods

添加退货产品信息的存储过程:

CREATE PROCEDURE [dbo].[BioBackGoodsPro_ADD]@BackSendID INT,@ProID INT,@ProName NVARCHAR(100),@SendCount INT,@BackGoodsCount INT,@BackProBaths NVARCHAR(100),@SendPrice MONEY,@BackPrice MONEY,@StockDate DATETIME,@ExPriationDate DATETIME,@MakeDate DATETIME,@ReturnBackBox NVARCHAR(100),@proBaths NVARCHAR(100) AS INSERT INTO [BioBackGoodsPro]( [BackSendID],[ProID],[ProName],[SendCount],[BackGoodsCount],[BackProBaths],[SendPrice],[BackPrice],[StockDate],[ExPriationDate],[MakeDate],[ReturnBackBox],[proBaths] )VALUES( @BackSendID,@ProID,@ProName,@SendCount,@BackGoodsCount,@BackProBaths,@SendPrice,@BackPrice,@StockDate,@ExPriationDate,@MakeDate,@ReturnBackBox,@proBaths )

退货申请的前端页面:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BackSendGoodsNew.aspx.cs" Transaction="Required" Inherits="BioErpWeb.BackSendGoods.BackSendGoodsNew" %><%@ Register Src="../UserControl/BaseTop.ascx" TagName="BaseTop" TagPrefix="uc2" %>

申请部门 制表人 经手人 制表时间
退货客户 选择退货单据
退货单据 发货商 退货商
发货申请人 发货经手人 发货时间
产 品 名 称 及 规 格( 批号货号信息 ) 可退货数量 退货数量 发货价 退货价 批号 退货货号 入库日期 近效期 生产日期
备注: 审批核人


前端js:

//客户选择对话框function showBackSendNumber(backUnitID) { if (backUnitID == undefined || backUnitID == '' || backUnitID == '请选择') { alert('请先选择退货单位'); return false; } var backunitid = backUnitID; var re = showModalDialog("../../PersonList/SendNOList.aspx?backUnitID=" + backunitid,"", "dialogWidth=320px;dialogHeight=350px"); var obj = window.event.srcElement; var td = obj.parentNode; var txts = td.getElementsByTagName('input'); if (re == null || re == "") { if (txts[0].value == "" || txts[0].value == null) { txts[0].value = "请选择"; } } else { txts[0].value = re; }}

选择的嵌套页面的前台:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SendNOList.aspx.cs" Inherits="BioErpWeb.PersonList.SendNOList" %>