大型商贸系统(进货管理)技术解析(三)自营进仓冲红单
功能介绍:
进仓冲红单通过选择已审核进仓单抵消某张已审核过的进仓单使其进货无效。进仓冲红包括自营进仓冲红;无订单进仓冲红。其中自营进仓冲红,在选择了相应的需要冲红的已审核进仓单后,使其录入的件数和细数为原进仓单的相反数,然后保存,修改,经过审核后即可实现冲红操作功能。
1.1功能效果图:
图:1.1
1.2商品进仓冲红单所用到的控件:
控件名称 | 说明
|
下拉框(easyui-combobox) | 设置该控件的ID,设置其大小,若不设置也用默认值,可以在data-options进行数据操作:设置该控件的一些属性和事件。 |
日期时间控件 (easyui-datetimebox) | 日期时间输入框允许用户选择日期和指定的时间并按照指定的输出格式显示。相比日期输入框,它在下拉面板中添加了一个时间微调器。可以在data-options进行数据操作:设置该控件的一些属性和事件 |
文本框(text) | 在Input中可以设置其一些属性和事件 |
功能实现:
1.1商品进仓冲红单所涉及表与表之间的关系图
表1:冲红单表(Offset)
用于存放自营进仓冲红单信息
列名 | 数据类型 | 主键/外键 | 说明 |
Offset_id | int | 主键 | 冲红单id |
Repertory_enter_id | int | 外键 | 进仓单id |
Review_deny | Bit |
| 审核否 |
Record_number | nchar(20) |
| 记录编号 |
Registrant_id | int | 外键 | 登记人id |
Auditor_id | int | 外键 | 审核人id |
Review_time | datetime |
| 审核时间 |
Review_time | datetime |
| 登记时间 |
表2:进仓单表(Repertory_enter)
用于存放商品进仓单信息
列名 | 数据类型 | 主键/外键 | 说明 |
Repertory_enter_id | int | 主键 | 进仓单id |
Repertory_place_id | int | 外键 | 仓库地点id |
Indent_id | int | 外键 | 订单id |
Hava_indent_deny | Bit |
| 有无订单否 |
Receiver_id | int | 外键 | 收货人id |
Record_number | nchar(20) |
| 记录编号 |
Registrant_id | int | 外键 | 登记人id |
Register_time | datetime |
| 登记时间 |
Auditor_id | int | 外键 | 审核人id |
Review_time | datetime |
| 审核时间 |
Affix_count | nchar(10) |
| 附件张数 |
Type_of_operation_pubid | int | 外键 | 经营方式pubid |
Original_number | nchar(20) |
| 原始单号 |
Agreement_id | int | 外键 | 合同id |
Review_deny | Bit |
| 审核否 |
YouXiaoFou | Bit |
| 有效否 |
表3:进仓明细表(Repertory_enter_detail)
用于记录进仓明细单信息
列名 | 数据类型 | 主键/外键 | 说明 |
Repertory_enter_detail_id | int | 主键 | 进仓明细id |
Repertory_enter_detail_Farid | int | 外键 | 进仓明细farid |
Repertory_enter_id | int | 外键 | 进仓id |
Goods_id | int | 外键 | 商品id |
Repertory_enter_packages | decimal(18,0) |
| 入库件数 |
Repertory_enter_quantity | decimal(18,0) |
| 入库细数 |
Giveaway_quantity | decimal(18,0) |
| 物扣数量 |
Review_deny | bit |
| 审核否 |
Auditor_id | int | 外键 | 审核人id |
Review_time | datetime |
| 审核时间 |
ChongHong_deny | Bit |
| 冲红否 |
表4:员工表(Eemployee)
用于记录员工信息
列名 | 数据类型 | 主键/外键 | 说明 |
Employee_id | int | 主键 | 员工id |
Employee_number | nchar(12) |
| 员工编号 |
Employee_name | nchar(10) |
| 员工名称 |
Department_id | int | 外键 | 部门id |
Duties_id | int | 外键 | 职务id |
Sex | int | 外键 | 性别pubid |
功能实现:
1. 商品进仓冲红单界面效果图
图2.1
2.商品进仓冲红单界面的实现代码
<div><pre name="code" class="csharp"><!DOCTYPE html>
<html>
<head>
<meta content="text/javascript;charset=utf-8" />
<title>自营进窗冲红单处理</title>
<script src="../../Content/jquery-easyui-1.3.3/jquery.min.js"></script>
<script src="../../Content/jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
<script src="../../Content/jquery-easyui-1.3.3/easyloader.js"></script>
<link href="../../Content/jquery-easyui-1.3.3/themes/icon.css" rel="stylesheet" />
<link href="../../Content/jquery-easyui-1.3.3/demo/demo.css" rel="stylesheet" />
<link href="../../Content/jquery-easyui-1.3.3/themes/default/easyui.css" rel="stylesheet" />
<link href="../../Content/IconExtension.css" rel="stylesheet" />
<link href="../../Content/MyCSS/PublicCSS.css" rel="stylesheet" />
<link href="../../Content/yxsss/js_css/yu.css" rel="stylesheet" />
<script src="../../Content/yxsss/js_css/yu.js"></script>
<style type="text/css">
body { text-align: center; font-size: 20px; }
input { margin-top: 1px; margin-left: 5px; margin-right: 5px; font-size: 15px; }
button { height: 26px; font-size: 20px; margin: 1px 3px 1px 3px; }
</style>
</head>
<body style="text-align: center">
<div class="easyui-window" title="" id="wShangPinJinCangDan" style="display: none; text-align: center; border-spacing: 0; padding: 0; border: 0 solid white; height: 600px;"
data-options="fit:true,collapsible:false,minimizable:false,maximizable:false,closable:false,draggable:false,resizable:false,shadow:false,modal:true,center:true">
<div style="padding: 5px; background: #e0ffff; color: #4169e1; font-size: 20px; margin: 0 0 auto;">
<span style="float: right">
<img οnclick="parent.jinCang();" id="dimg" src="../../Content/image/delete.png" /></span>商品进仓冲红单
</div>
<table id="tbShangPinJinCangDan" style="width: 780px; height: 20px; padding: 0; border: none;">
<tr>
<td style="vertical-align: middle">
<input type="button" οnclick="SelectJinCangChongHongDan()" value="记录编号" style="width: 100px;" /><input type="text" οnclick=" offsetRecordNumber()" id="txtJiLuBianMa" style="width: 120px; color: red" /></td>
<td style="vertical-align: middle">
<input type="button" value="进货部门" style="width: 100px;" /><input type="text" id="ConsignmentDepartmentCode" style="width: 120px; text-align: center" /></td>
<td style="vertical-align: middle">
<div style="border-bottom: #000 1px solid; width: 200px;">
<input id="ConsignmentDepartmentName" readonly="readonly" style="width: 200px; border: none; color: #0000FF; font-size: 23px;" />
</div>
</td>
</tr>
</table>
<table style="width: 780px; height: 150px; padding: 0; border: none;">
<tr>
<td style="width: 300px;">
<table style="width: 300px; height: 150px; padding: 0; border: none;">
<tr>
<td style="width: 110px; text-align: right; font-size: 15px;">合同号:</td>
<td>
<div style="border-bottom: #000 1px solid; width: 180px;">
<input id="AgreementCode" readonly="readonly" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
<tr>
<td style="width: 110px; text-align: right; font-size: 15px;">订单号:</td>
<td>
<div style="border-bottom: #000 1px solid; width: 180px;">
<input readonly="readonly" id="IndentNumber" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
<tr>
<td style="width: 110px; text-align: right; font-size: 15px;">订单类型:</td>
<td>
<div style="border-bottom: #000 1px solid; width: 180px;">
<input readonly="readonly" id="IndentType" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
<tr>
<td style="width: 110px; text-align: right; font-size: 15px;">结算方式:</td>
<td>
<div style="border-bottom: #000 1px solid; width: 180px;">
<input readonly="readonly" id="jiesuanfangshi" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
<tr>
<td style="width: 110px; text-align: right; font-size: 15px;">买家:</td>
<td>
<div style="border-bottom: #000 1px solid; width: 180px;">
<input readonly="readonly" id="Buyer" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
</table>
</td>
<td>
<table style="width: 467px; height: 150px; padding: 0; border: none;">
<tr>
<td style="width: 120px; text-align: right; font-size: 15px;">供应单位:</td>
<td style="width: 160px;" colspan="2">
<div style="border-bottom: #000 1px solid; width: 300px;">
<input readonly="readonly" id="SupplyUnits" style="width: 300px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
<tr>
<td style="text-align: right; font-size: 15px;">库存地点:</td>
<td>
<input class="easyui-combobox" id="RepertoryPlaceIdentifier" data-options="onSelect:getRepertory_place_name,required:true" style="width: 145px; text-align: center" /></td>
<td>
<div style="border-bottom: #000 1px solid; width: 180px;">
<input readonly="readonly" id="kucunMC" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
<tr>
<td style="text-align: right; font-size: 15px;">收货人:</td>
<td>
<input class="easyui-combobox" id="shouhuorenbianhao" data-options="onSelect:getReceiver_nam,required:true" style="width: 145px; text-align: center" /></td>
<td>
<div style="border-bottom: #000 1px solid; width: 180px;">
<input readonly="readonly" id="ReceiverName" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
<tr>
<td style="text-align: right; font-size: 15px;">附件<input type="text" id="txtFuJianZhangShu" style="width: 40px" />张数</td>
<td></td>
<td></td>
</tr>
<tr>
<td style="text-align: right; font-size: 15px;">原始进货单号:</td>
<td style="width: 160px;" colspan="2">
<div style="border-bottom: #000 1px solid; width: 300px;">
<input id="Original_number" style="width: 300px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="easyui-panel" style="width: 785px; height: 243px;">
<table id="tb进窗信息" class="easyui-datagrid" style="width: 3780px;" data-options="rownumbers:true,idField:'Goods_id',singleSelect:true, onAfterEdit:onAfterEdit,
fit:true,pagination:true,frozenColumns:[[
{field:'ShanChu',width:40,title:'删除',align:'center',formatter:deleteSelect}
]]">
<thead>
<tr>
<th data-options="field:'Goods_id',hidden:true,width:80,align:'center'">商品ID</th>
<th data-options="field:'Repertory_enter_detail_id',width:80,hidden:true,align:'center'">Repertory_enter_detail_id</th>
<th data-options="field:'indentId',width:80,hidden:true,align:'center'">indentId</th>
<th data-options="field:'Goods_code',width:80,align:'center'">商品代码</th>
<th data-options="field:'Goods_bar_code',width:80,align:'center'">商品条码</th>
<th data-options="field:'Goods_name',width:80,align:'center'">商品名称</th>
<th data-options="field:'Art_No',width:80,align:'center'">货号</th>
<th data-options="field:'RuKuShuLiang1',value:'0',width:80,align:'center'">入库件数</th>
<th data-options="field:'AAA',width:80,align:'center',styler:cellStyler">入库细数</th>
<th data-options="field:'AAA1',width:80,hidden:true,align:'center'">入库细数1</th>
<th data-options="field:'YiRuKuShu',hidden:true,width:80,align:'center'">已入库数</th>
<th data-options="field:'HaiYaoRuKuShu',hidden:true,width:80,align:'center'">还缺入库数</th>
<th data-options="field:'BBB',width:80,align:'center'">含税进价</th>
<th data-options="field:'Retail_unit_price',width:80,align:'center'">零售单价</th>
<th data-options="field:'Format_model',width:80,align:'center'">规格型号</th>
<th data-options="field:'Unit_of_measurement',width:80,align:'center'">计量单位</th>
<th data-options="field:'Quality_content',width:80,align:'center'">包装含量</th>
<th data-options="field:'Buyer',width:80,hidden:true,align:'center'">买手</th>
<th data-options="field:'Vender_bar_code_deny',width:80,align:'center'">厂家条码否</th>
<th data-options="field:'Giveaway_quantity',width:80,align:'center',styler:cellStyler">物扣数量</th>
<th data-options="field:'Goods_abbreviation',width:80,align:'center'">商品简称</th>
<th data-options="field:'Plncode_PLN',width:80,align:'center'">PLN码</th>
<th data-options="field:'Goods_rademark_name',width:80,align:'center'">商品标记</th>
<th data-options="field:'Copy_record_deny',width:80,align:'center'">复制记录否</th>
<th data-options="field:'Contract_number',width:80,align:'center'">合同号</th>
<th data-options="field:'Manufacturer_name',width:80,align:'center'">生产厂家</th>
<th data-options="field:'Producing_area_name',width:80,align:'center'">产地</th>
<th data-options="field:'Art_No',width:80,align:'center'">货号</th>
<th data-options="field:'Unit_of_measurement',width:80,align:'center'">计量单位</th>
<th data-options="field:'Use_target',width:80,align:'center'">使用对象</th>
<th data-options="field:'Goods_colours',width:80,align:'center'">商品花色</th>
<th data-options="field:'Quality_guarantee_period',width:80,align:'center'">保质期</th>
<th data-options="field:'Input_ratio',width:80,align:'center'">进项税率</th>
<th data-options="field:'Output_ratio',width:80,align:'center'">销项税率</th>
<th data-options="field:'Count_scale',width:80,align:'center'">统计比例</th>
<th data-options="field:'Quality_content',width:80,align:'center'">质地含量</th>
<th data-options="field:'Quality_grade',width:80,align:'center'">质量等级</th>
<th data-options="field:'Manage_season_name',width:80,align:'center'">经营季节</th>
<th data-options="field:'Employee_name',width:80,align:'center'">登记人</th>
<th data-options="field:'Register_time',width:80,align:'center'">登记时间</th>
<th data-options="field:'Auditor',width:80,align:'center'">审核人</th>
<th data-options="field:'Review_time',width:80,align:'center'">审核时间</th>
<th data-options="field:'GengXinRen',width:80,align:'center'">更新人</th>
<th data-options="field:'Update_Time',width:80,align:'center'">更新时间</th>
<th data-options="field:'Purchase_bid',width:80,align:'center'">采购进价</th>
<th data-options="field:'Self_fix_goods_deny',width:80,align:'center'">自订货否</th>
<th data-options="field:'Mini_fix_goods_deny',width:80,align:'center'">最小订货数</th>
</tr>
</thead>
</table>
</div>
<table style="width: 715px; height: 30px">
<tr>
<td style=" font-size: 15px; width: 50px; left: 30px">价款</td>
<td style="width: 50px">
<div style="border-bottom: #000 1px solid; width: 100px;">
<input id="txtJiaKuang" readonly="readonly" style="width: 100px; border: none" />
</div>
</td>
<td style=" font-size: 15px">税金</td>
<td style="width: 50px">
<div style="border-bottom: #000 1px solid; width: 100px;">
<input id="txtShuiJin" readonly="readonly" style="width: 100px; border: none" />
</div>
</td>
<td style="width: 50px"></td>
<td style=" font-size: 15px">价格合计</td>
<td>
<div style="border-bottom: #000 1px solid; width: 110px;">
<input id="txtJiaShuiHeJi" readonly="readonly" style="width: 110px; border: none" />
</div>
</td>
</tr>
</table>
<table style="width: 715px; height: 30px">
<tr>
<td style=" font-size: 15px; width: 60px">登记人</td>
<td style="width: 50px">
<div style="border-bottom: #000 1px solid; width: 180px;">
<input class="easyui-combobox" id="dengjiren" data-options="url:'/ShangPinJinChuangDan/SelectEmployee',valueField:'ID',textField:'MC'" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
<td style=" font-size: 15px">登记时间</td>
<td style="width: 50px">
<div style="border-bottom: #000 1px solid; width: 180px;">
<input class="easyui-datetimebox" data-options="formatter:myformatter,required:true" id="datdengjishijian" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
<tr>
<td style=" font-size: 15px; width: 60px">审核人</td>
<td style="width: 50px">
<div style="border-bottom: #000 1px solid; width: 180px;">
<input class="easyui-combobox" id="Auditor" data-options="url:'/ShangPinJinChuangDan/SelectEmployee',valueField:'ID',textField:'MC'" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
<td style=" font-size: 15px">审核时间</td>
<td>
<div style="border-bottom: #000 1px solid; width: 180px;">
<input class="easyui-datetimebox" data-options="formatter:myformatter,required:true" id="datshenheshijian" style="width: 180px; border: none; color: #0000FF; font-size: 17px;" />
</div>
</td>
</tr>
</table>
<button οnclick="OpenwXuanZeDingHuoQingDanXiAll();" id="TianJia">
<img src="../../Content/image/add.png" />添加</button>
<button id="XiuGai" οnclick="UpdateJinCangChongHong()">
<img src="../../Content/image/table_edit.png" />修改</button>
<button οnclick="DeleteJinCangChongHong();" id="ShanChu">
<img src="../../Content/image/delete.png" />删除</button>
<button id="BaoCun" οnclick="BaoCunOffset();">
<img src="../../Content/image/disk.png" />保存</button>
<button οnclick="QingChu();" id="FanQi">
<img src="../../Content/image/01.png" />放弃</button>
<button οnclick="ShenHeJinCangChongHong();" id="ShenHe">
<img src="../../Content/image/ok.gif" />审核</button>
<button id="DaYin" οnclick="shenHe2()">
<img src="../../Content/image/2012081511202.png" />打印</button>
<button id="TuiChu" οnclick="parent.jinCang();">
<img src="../../Content/image/2012080412301.png" />退出</button>
</div>
</body>
</html>
4.对此按钮功能的操作
4.1 点击“添加”该按钮将会弹出“选择已审核进仓单”窗口,同时也会禁用某些所需要的按钮,其效果图如下
而禁用按钮实现在界面,所用到的代码:
4.2 为了实现此功能,其界面代码
4.3 在<body style="text-align:center"></body>中实现“选择已审核进仓单”的界面代码。
其中用两个触发事件“onclick”方法分别是“查询”按钮与“添加”按钮的操作
<div style="text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;"><div class="easyui-window" id="wXuanZeYiShenHeDanXiAll" title="选择已审核进仓单" style="width: 700px; height: 300px;" data-options="closed:true"></span></div> <table style="width: 686px; height: 28px; padding: 0; border-spacing: 0">
<tr>
<div style="text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;">" id="strBlur" style="width: 200px; height: 15px;" /></td>
<td>
<button οnclick="MoHiuChaXunXuanZeDingHuoQingDanXiAll();"</span></div> <td style="vertical-align: middle; font-size: 15px;">请输入已审核记录编号查找:<input type="tex
t>
<img src="../../Content/image/2012092109942.png" />查询</button>
<button οnclick="GetChangPin();">
<img src="../../Content/image/add.png" />添加</button></td>
<div style="text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;">ter'">记录编号</th>
</span></div> </tr>
</table>
<div class="easyui-panel" style="width: 686px; height: 236px;">
<table id="tbXuanZeYiShenHeDanXiAll" class="easyui-datagrid" style="width: 3360px;" data-options="rownumbers:true,
striped:true,pagination:true,idField:'Repertory_enter_id',singleSelect:true,fit:true,fitColumns:false,onDblClickRow:DblDingHuoQingDan">
<thead>
<tr>
<th data-options="field:'Indent_number',width:80,align:'center'">订单号</th>
<th data-options="field:'Department_name',width:80,align:'center'">进货部门</th>
<th data-options="field:'Record_number',width:180,align:'ce
n <th data-options="field:'Indent_type_name',width:80,align:'center'">订单类型</th>
<th data-options="field:'settlement',width:80,align:'center'">结算方式</th>
<th data-options="field:'Contract_number',width:80,align:'center'">合同号</th>
<th data-options="field:'Repertory_place_name',width:80,align:'center'">仓库地点</th>
<th data-options="field:'Auditor',width:80,align:'center'">审核人</th>
<th data-options="field:'Review_time',width:80,align:'center'">审核时间</th>
<th data-options="field:'Receiver_id',hidden:true"></th>
</tr>
</thead>
</table>
</div>
</div>
4.4 对“查询”按钮的操作,在JavaScript里的代码
4.5对“查询”按钮的操作,控制器代码实现
#region 查询已审核进仓单/ 模糊查询已审核进仓单
public ActionResult SelectYiShenHeJinCangDan(string strBlur)
{
DataTable dt = _myJinCangDan.SelectYiShenHeJinCangDan(strBlur);
List<Dictionary<string, object>> listReturn = ConvertHelper.DtToList(dt);
return Json(listReturn, JsonRequestBehavior.AllowGet);
}
#endregion
4.6 对“查询”按钮的操作,逻辑层代码实现
#region 查询已审核进仓单 /模糊查询已审核进仓单
public DataTable SelectYiShenHeJinCangDan(string strBlur)
{
SqlParameter[] sqlcmDpas =
{
new SqlParameter("@NB", SqlDbType.Char),
new SqlParameter("@strBlur", SqlDbType.Char),
};
sqlcmDpas[0].Value = "SelectYiShenHeJinCangDan";
sqlcmDpas[1].Value = strBlur;
DataTable dt = _myDalMethod.DAL_SelectDB_Par("Commodity_Warehouse_Entry", sqlcmDpas);
return dt;
}
#endregion
4.7对“查询”按钮的操作,存储过程
if(@NB='SelectYiShenHeJinCangDan'and @strBlur ='')
begin
SELECT Repertory_enter.Repertory_enter_id, Goods_indent.Indent_number, Department.Department_name, Repertory_place.Repertory_place_name, Repertory_enter.Record_number,
Repertory_enter.Original_number, Eemployee_1.Employee_name AS Receiver, Repertory_enter.Receiver_id, CONVERT(varchar(20), Repertory_enter.Register_time, 120) AS Register_time,
Repertory_enter.Review_deny, Repertory_enter.Auditor_id, Repertory_enter.Review_time, Eemployee_2.Employee_name,
Attribute_gather_detail.Attribute_gather_detail_name AS Indent_type_name, Agreement.Contract_number, Attribute_gather_detail_1.Attribute_gather_detail_name AS settlement,
Goods_indent.Review_time AS Expr1, Attribute_gather_detail_2.Attribute_gather_detail_name AS Auditor, Department.Department_code, Enterprise_name.Chinese,
Eemployee.Employee_name AS Buyer, Goods_indent.Department_id, Goods_indent.Indent_id, Eemployee_1.Employee_number AS Receiver_name, Repertory_place.Repertory_place_identifier,
Repertory_enter.Affix_count, Repertory_enter.Registrant_id, Eemployee_3.Employee_name AS Registrant, Repertory_enter.Register_time AS Expr2, Repertory_place.Repertory_place_id
FROM Repertory_place INNER JOIN
Repertory_enter INNER JOIN
Goods_indent ON Repertory_enter.Indent_id = Goods_indent.Indent_id INNER JOIN
Department ON Goods_indent.Department_id = Department.Department_id ON Repertory_place.Repertory_place_id = Repertory_enter.Repertory_place_id INNER JOIN
Eemployee AS Eemployee_1 ON Repertory_enter.Receiver_id = Eemployee_1.Employee_id INNER JOIN
Eemployee AS Eemployee_2 ON Repertory_enter.Auditor_id = Eemployee_2.Employee_id INNER JOIN
Attribute_gather_detail ON Goods_indent.Indent_type_pubid = Attribute_gather_detail.Attribute_gather_detail_id INNER JOIN
Attribute_gather_detail AS Attribute_gather_detail_1 ON Goods_indent.Settle_accounts_way_pubid = Attribute_gather_detail_1.Attribute_gather_detail_id INNER JOIN
Agreement ON Goods_indent.Agreement_id = Agreement.Agreement_id INNER JOIN
Attribute_gather_detail AS Attribute_gather_detail_2 ON Goods_indent.Auditor_id = Attribute_gather_detail_2.Attribute_gather_detail_id INNER JOIN
Supply_units ON Agreement.Supply_units_id = Supply_units.Supply_units_id INNER JOIN
Enterprise_name ON Supply_units.Enterprise_name_id = Enterprise_name.Enterprise_name_id INNER JOIN
Eemployee ON Agreement.Purchasing_agent_id = Eemployee.Employee_id INNER JOIN
Eemployee AS Eemployee_3 ON Repertory_enter.Registrant_id = Eemployee_3.Employee_id
where Repertory_enter.Review_deny='True' and YouXiaoFou ='true'
end
--模糊查询已审核自营进仓单
else
if(@NB='SelectYiShenHeJinCangDan' and @strBlur <> '')
begin
SELECT Repertory_enter.Repertory_enter_id, Goods_indent.Indent_number, Department.Department_name, Repertory_place.Repertory_place_name, Repertory_enter.Record_number,
Repertory_enter.Original_number, Eemployee_1.Employee_name AS Receiver, Repertory_enter.Receiver_id, CONVERT(varchar(20), Repertory_enter.Register_time, 120) AS Register_time,
Repertory_enter.Review_deny, Repertory_enter.Auditor_id, Repertory_enter.Review_time, Eemployee_2.Employee_name,
Attribute_gather_detail.Attribute_gather_detail_name AS Indent_type_name, Agreement.Contract_number, Attribute_gather_detail_1.Attribute_gather_detail_name AS settlement,
Goods_indent.Review_time AS Expr1, Attribute_gather_detail_2.Attribute_gather_detail_name AS Auditor, Department.Department_code, Enterprise_name.Chinese,
Eemployee.Employee_name AS Buyer, Goods_indent.Department_id, Goods_indent.Indent_id, Eemployee_1.Employee_number AS Receiver_name, Repertory_place.Repertory_place_identifier,
Repertory_enter.Affix_count, Repertory_enter.Registrant_id, Eemployee_3.Employee_name AS Registrant, Repertory_enter.Register_time AS Expr2, Repertory_place.Repertory_place_id
FROM Repertory_place INNER JOIN
Repertory_enter INNER JOIN
Goods_indent ON Repertory_enter.Indent_id = Goods_indent.Indent_id INNER JOIN
Department ON Goods_indent.Department_id = Department.Department_id ON Repertory_place.Repertory_place_id = Repertory_enter.Repertory_place_id INNER JOIN
Eemployee AS Eemployee_1 ON Repertory_enter.Receiver_id = Eemployee_1.Employee_id INNER JOIN
Eemployee AS Eemployee_2 ON Repertory_enter.Auditor_id = Eemployee_2.Employee_id INNER JOIN
Attribute_gather_detail ON Goods_indent.Indent_type_pubid = Attribute_gather_detail.Attribute_gather_detail_id INNER JOIN
Attribute_gather_detail AS Attribute_gather_detail_1 ON Goods_indent.Settle_accounts_way_pubid = Attribute_gather_detail_1.Attribute_gather_detail_id INNER JOIN
Agreement ON Goods_indent.Agreement_id = Agreement.Agreement_id INNER JOIN
Attribute_gather_detail AS Attribute_gather_detail_2 ON Goods_indent.Auditor_id = Attribute_gather_detail_2.Attribute_gather_detail_id INNER JOIN
Supply_units ON Agreement.Supply_units_id = Supply_units.Supply_units_id INNER JOIN
Enterprise_name ON Supply_units.Enterprise_name_id = Enterprise_name.Enterprise_name_id INNER JOIN
Eemployee ON Agreement.Purchasing_agent_id = Eemployee.Employee_id INNER JOIN
Eemployee AS Eemployee_3 ON Repertory_enter.Registrant_id = Eemployee_3.Employee_id
where Repertory_enter.Record_number like '%'+RTRIM(@strBlur)+'%'and Repertory_enter.Review_deny='true' and YouXiaoFou ='true'
end
4.8 对双击“已审核进仓单”中DGV后把数据绑定到“商品进仓冲红单”中,效果图如下:
图4.8
4.9 根据要求与需要双击“选择已审核进仓单”DGV把数据绑定到“商品进仓冲红单”的JavaScript中代码
//双击已审核进仓冲红单
//对所需要用到的id声明全局变量
var Department_id = 0;
var indentId = 0;
var repertoryEnterId = 0;
//方法,有两个参数为rowIndex索引,rowData数据
function DblDingHuoQingDan(rowIndex, rowData) {
SelectJiLuBianHao();//调用方法
$.getJSON("/ShangPinJinChuangDan/SelectInventoryPlaceByDepartment_id?Department_id=" + rowData.Department_id, function (data) {
//对库存地点的编号下拉框的绑定
$('#RepertoryPlaceIdentifier').combobox({
data: data,
valueField: 'Repertory_place_id',
textField: 'Repertory_place_identifier'
});
//设置获取下拉框Id的值
$('#RepertoryPlaceIdentifier').combobox('setValue', rowData.Repertory_place_id);
});
//查询收货人编号方法
$.getJSON("/ShangPinJinChuangDan/SelectShouHuoRenBianHao?Department_id=" + rowData.Department_id, function (data) {
//对收货人编号下拉框的绑定
$('#shouhuorenbianhao').combobox({
data: data,
valueField: 'Employee_id',
textField: 'Employee_number'
});
//设置获取下拉框Id的值
$('#shouhuorenbianhao').combobox('setValue', rowData.Receiver_id);
});
//双击后关闭该窗口
$('#wXuanZeYiShenHeDanXiAll').window('close');
//把双击所在处的界面的数据绑定到所对应的控件
$('#IndentNumber').val(rowData.Indent_number);
$('#IndentType').val(rowData.Indent_type_name);
$('#jiesuanfangshi').val(rowData.settlement);
$('#ConsignmentDepartmentCode').val(rowData.Department_code);
$('#ConsignmentDepartmentName').val(rowData.Department_name);
$('#AgreementCode').val(rowData.Contract_number);
$('#Buyer').val(rowData.Buyer);
$('#SupplyUnits').val(rowData.Chinese);
$('#txtFuJianZhangShu').val(rowData.Affix_count);
$('#Original_number').val(rowData.Record_number);
$('#kucunMC').val(rowData.Repertory_place_name);
$('#RepertoryPlaceIdentifier').val(rowData.Repertory_place_identifier);
$('#ReceiverName').val(rowData.Receiver);
Department_id = rowData.Department_id;
indentId = rowData.indentId;
repertoryEnterId = rowData.Repertory_enter_id;
BindingRepertoryEnterChongHongDetail(repertoryEnterId);
}
//绑定已审核进仓冲红单明细
function BindingRepertoryEnterChongHongDetail(repertoryEnterId) {
$.getJSON("/ShangPinJinCangChongHong/BindingRepertoryEnterChongHongDetail?repertoryEnterId=" + repertoryEnterId, function (result) {
$('#tb进窗信息').datagrid('loadData', result);
onAfterEdit(0);
});
}
4.10 根据要求与需要双击“选择已审核进仓单”DGV把数据绑定到“商品进仓冲红单”的控制器代码
#region 根据部门ID查库存地点编号
public ActionResult SelectInventoryPlaceByDepartment_id(int Department_id)
{
DataTable dt = _myJinCangDan.SelectInventoryPlaceByDepartment_id(Department_id);
List<Dictionary<string, object>> listReturn = ConvertHelper.DtToList(dt);
return Json(listReturn, JsonRequestBehavior.AllowGet);
}
#endregion
#region 根据进货部门ID查收货人
public ActionResult SelectShouHuoRenBianHao(int Department_id)
{
DataTable dt = _myJinCangDan.SelectShouHuoRenByJinHuoBuMenId(Department_id);
List<Dictionary<string, object>> listReturn = ConvertHelper.DtToList(dt);
return Json(listReturn, JsonRequestBehavior.AllowGet);
}
#endregion
#region 绑定进仓冲红单
public ActionResult BindingRepertoryEnterChongHongDetail(int repertoryEnterId)
{
DataTable dt = _myJinCangChongHongDan.BindingRepertoryEnterChongHongDetail(repertoryEnterId);
dt.Columns.Add("YiRuKuShu", typeof(string));
dt.Columns.Add("RuKuShuLiang1", typeof(int));
dt.Columns.Add("AAA", typeof(int));
dt.Columns.Add("AAA1", typeof(int));
dt.Columns.Add("CaiGouJinJia1", typeof(int));
dt.Columns.Add("JinXiangShuiLv1", typeof(int));
dt.Columns.Add("BBB", typeof(decimal));
dt.Columns.Add("WuGouShu1", typeof(string));
dt.Columns.Add("HaiYaoRuKuShu", typeof(string));
for (int i = 0; i < dt.Rows.Count; i++)
{
var mingxiid = Convert.ToInt32(dt.Rows[i][0]);
DataTable dt1 = _myJinCangChongHongDan.CheckNeTamount(mingxiid);
int shu = 0;
if (dt1.Rows[0][0].ToString() != "")
{
shu = Convert.ToInt32(dt1.Rows[0][0]);
}
dt.Rows[i]["YiRuKuShu"] = shu;
int ruKuShuLiang = (Convert.ToInt32(dt.Rows[i]["Repertory_enter_packages"]));
int zhiDiHanLiang = Convert.ToInt32(dt.Rows[i]["Quality_content"]);
dt.Rows[i]["RuKuShuLiang1"] = -ruKuShuLiang;
dt.Rows[i]["AAA"] = -(ruKuShuLiang * zhiDiHanLiang);
dt.Rows[i]["AAA1"] = -(ruKuShuLiang * zhiDiHanLiang + Convert.ToInt32(dt.Rows[i]["Giveaway_quantity"]));
decimal caiGouJinJia = Convert.ToDecimal(dt.Rows[i]["Purchase_bid"]);
decimal Input_ratio = Convert.ToDecimal(dt.Rows[i]["Input_ratio"]);
dt.Rows[i]["CaiGouJinJia1"] = -caiGouJinJia;
dt.Rows[i]["JinXiangShuiLv1"] = Input_ratio;
dt.Rows[i]["BBB"] = (Input_ratio / 100 + 1) * caiGouJinJia;
dt.Rows[i]["HaiYaoRuKuShu"] = ruKuShuLiang * zhiDiHanLiang - (Convert.ToInt32(dt.Rows[i]["Giveaway_quantity"])) - shu;
dt.Rows[i]["WuGouShu1"] = -(Convert.ToInt32(dt.Rows[i]["Giveaway_quantity"]));
}
List<Dictionary<string, object>> listReturn = ConvertHelper.DtToList(dt);
return Json(listReturn, JsonRequestBehavior.AllowGet);
}
#endregion
4.11根据要求与需要双击“选择已审核进仓单”DGV把数据绑定到“商品进仓冲红单”的逻辑层代码
#region 绑定进仓冲红单
public DataTable BindingRepertoryEnterChongHongDetail(int repertoryEnterId)
{
SqlParameter[] sql =
{
new SqlParameter("@NB", SqlDbType.Char),
new SqlParameter("@Repertory_enter_id", SqlDbType.Int),
};
sql[0].Value = "BindingRepertoryEnterChongHongDetail";
sql[1].Value = repertoryEnterId;
DataTable dt = _myDalMethod.DAL_SelectDB_Par("Warehouse_Offset_Entry", sql);
return dt;
}
4.12根据要求与需要双击“选择已审核进仓单”DGV把数据绑定到“商品进仓冲红单”的存储过程
--绑定进仓冲红单
if(@NB='BindingRepertoryEnterChongHongDetail')
begin
SELECT Repertory_enter_detail.Repertory_enter_detail_id, Attribute_gather_detail.Attribute_gather_detail_name, attribute_gather_detail_2.Attribute_gather_detail_name AS Unit_of_measurement,
attribute_gather_detail_3.Attribute_gather_detail_name AS Use_target, attribute_gather_detail_6.Attribute_gather_detail_name AS ChanPinZhuangTai, Agreement.Agreement_code,
Manufacturer.Manufacturer_name, Goods_producing_area.Producing_area_name, Goods_rademark.Goods_rademark_name, Manage_season.Manage_season_name, Eemployee.Employee_name,
Eemployee_1.Employee_name AS Auditor, Eemployee.Employee_name AS GengXinRen, Goods.Goods_id, Goods.Goods_code, Goods.Goods_bar_code, Goods.Vender_bar_code_deny,
Goods.Goods_name, Goods.Goods_abbreviation, Goods.Plncode_PLN, Goods.Copy_record_deny, Goods.Goods_tab_pubid, Goods.Agreement_id, Goods.Manufacturer_id,
Goods.Producing_area_id, Goods.Art_No, Goods.Format_model, Goods.Unit_of_measurement_pubid, Goods.Use_target_pubid, Goods.Goods_colours, Goods.Goods_rademark_id,
Goods.Goods_classify_pubid, Goods.Quality_guarantee_period_pubid, Goods.Input_ratio, Goods.Output_ratio, Goods.Count_scale, Goods.Quality_content, Goods.Quality_grade_pubid,
Goods.Manage_season_id, Goods.Permit_decimal_deny, Goods.Product_status_pubid, Goods.Registrant_id, CONVERT(varchar(20), Goods.Register_time, 120) AS Register_time, Goods.Auditor_id,
CONVERT(varchar(20), Goods.Review_time, 120) AS Review_time, Goods.Update_person_id, CONVERT(varchar(20), Goods.Update_Time, 120) AS Update_Time, Goods.Retail_unit_price,
Goods.Purchase_bid, Goods.Self_fix_goods_deny, Goods.Mini_fix_goods_deny, Repertory_enter_detail.Repertory_enter_detail_Farid, Repertory_enter_detail.Repertory_enter_quantity,
Repertory_enter_detail.Repertory_enter_packages, Repertory_enter_detail.Review_deny, Repertory_enter_detail.Repertory_enter_quantity AS Expr1, Repertory_enter_detail.Repertory_enter_id,
Repertory_enter_detail.Giveaway_quantity, Agreement.Contract_number, Attribute_gather_detail_1.Attribute_gather_detail_name AS Quality_guarantee_period,
attribute_gather_detail_5.Attribute_gather_detail_name AS Quality_grade
FROM Attribute_gather_detail INNER JOIN
Goods ON Attribute_gather_detail.Attribute_gather_detail_id = Goods.Goods_tab_pubid INNER JOIN
Attribute_gather_detail AS attribute_gather_detail_2 ON Goods.Unit_of_measurement_pubid = attribute_gather_detail_2.Attribute_gather_detail_id INNER JOIN
Attribute_gather_detail AS attribute_gather_detail_3 ON Goods.Use_target_pubid = attribute_gather_detail_3.Attribute_gather_detail_id INNER JOIN
Attribute_gather_detail AS attribute_gather_detail_5 ON Goods.Quality_grade_pubid = attribute_gather_detail_5.Attribute_gather_detail_id INNER JOIN
Attribute_gather_detail AS attribute_gather_detail_6 ON Goods.Product_status_pubid = attribute_gather_detail_6.Attribute_gather_detail_id INNER JOIN
Agreement ON Goods.Agreement_id = Agreement.Agreement_id INNER JOIN
Manufacturer ON Goods.Manufacturer_id = Manufacturer.Manufacturer_id INNER JOIN
Goods_producing_area ON Goods.Producing_area_id = Goods_producing_area.Producing_area_id INNER JOIN
Goods_rademark ON Goods.Goods_rademark_id = Goods_rademark.Goods_rademark_id INNER JOIN
Manage_season ON Goods.Manage_season_id = Manage_season.Manage_season_id INNER JOIN
Eemployee ON Goods.Registrant_id = Eemployee.Employee_id INNER JOIN
Eemployee AS Eemployee_1 ON Goods.Auditor_id = Eemployee_1.Employee_id INNER JOIN
Eemployee AS Eemployee_2 ON Goods.Update_person_id = Eemployee_2.Employee_id INNER JOIN
Repertory_enter_detail ON Goods.Goods_id = Repertory_enter_detail.Goods_id INNER JOIN
Attribute_gather_detail AS Attribute_gather_detail_1 ON Goods.Quality_guarantee_period_pubid = Attribute_gather_detail_1.Attribute_gather_detail_id
WHERE (Repertory_enter_detail.Repertory_enter_id = @Repertory_enter_id) AND (Repertory_enter_detail.Repertory_enter_detail_Farid = 0) AND (Repertory_enter_detail.Review_deny = 'true')
end
4.13 根据要求选择好登记人,登记时间信息后,点击“保存”按钮,即可添加商品进仓冲红单
在对“保存”按钮操作的界面代码:
//添加新进仓单(进仓冲红单)
function BaoCunOffset() {
if (confirm('是否保存新增?')) {
//新增冲红单,并对所需控件的获取
$.getJSON("/ShangPinJinCangChongHong/Insert_Offsert?" +
"repertoryEnterId=" + repertoryEnterId + "&" +
"recordNumber=" + $('#txtJiLuBianMa').val() + "&" +
"registrantId=" + $('#dengjiren').combobox('getValue') + "&" +
"registerTime=" + $('#datdengjishijian').datetimebox('getValue'),
function (data) {
if (data > 0) {
//如果返回的数据大于0,获取DGV中的行和声明变量
var dataMingXi = $('#tb进窗信息').datagrid('getRows');
for (var i = 0; i < dataMingXi.length; i++) {
//for循环遍历每一行,新增进仓冲红明细
$.getJSON("/ShangPinJinCangChongHong/Insert_NewRepertoryEnterDetail?" +
"repertoryEnterId=" + repertoryEnterId + '&' +
"goodsId=" + dataMingXi[i].Goods_id + '&' +
"repertoryEnterQuantity=" + dataMingXi[i].AAA + '&' +
"repertoryEnterPackages=" + dataMingXi[i].RuKuShuLiang1 + "&" +
"giveawayQuantity=" + dataMingXi[i].Giveaway_quantity);
}
ui.alert('新增进仓冲红单保存成功!!!', 1000, false);
QingChu();//调用方法
//对控件的禁用
$('#Auditor').combobox({ disabled: false });
$('#datshenheshijian').datetimebox({ disabled: false });
} else {
ui.alert('新增进仓冲红单保存失败!!!', 1000, false);
}
});
}
}
对“保存”按钮操作的控制器代码
#region 保存新增
//新增新进仓单明细(进仓冲红明细)
public void Insert_NewRepertoryEnterDetail(string repertoryEnterId, string goodsId,
string repertoryEnterQuantity, string repertoryEnterPackages,
string giveawayQuantity)
{
_myJinCangChongHongDan.Insert_NewRepertoryEnterDetail(Convert.ToInt32(repertoryEnterId),
Convert.ToInt32(goodsId),
Convert.ToDecimal(repertoryEnterQuantity),
Convert.ToDecimal(repertoryEnterPackages),
Convert.ToDecimal(giveawayQuantity));
}
//新增冲红单
public int Insert_Offsert(string repertoryEnterId, string recordNumber,
string registrantId, string registerTime)
{
DataTable dt = _myJinCangChongHongDan.Insert_Offsert(
Convert.ToInt32(repertoryEnterId),
recordNumber,
Convert.ToInt32(registrantId),
Convert.ToDateTime(registerTime));
return Convert.ToInt32(dt.Rows[0][0].ToString());
}
#endregion
对“保存”按钮操作的逻辑层
#region 保存新增
//新增新进仓单明细(进仓冲红明细)
public int Insert_NewRepertoryEnterDetail(int repertoryEnterId, int goodsId,
decimal repertoryEnterQuantity, decimal repertoryEnterPackages,
decimal giveawayQuantity)
{
SqlParameter[] sql =
{
new SqlParameter("@NB", SqlDbType.Char),
new SqlParameter("@Repertory_enter_id", SqlDbType.Int),
new SqlParameter("@Goods_id", SqlDbType.Int),
new SqlParameter("@Repertory_enter_quantity", SqlDbType.Decimal),
new SqlParameter("@Repertory_enter_packages", SqlDbType.Decimal),
new SqlParameter("@Giveaway_quantity", SqlDbType.Decimal),
};
sql[0].Value = "Insert_NewRepertoryEnterDetail";
sql[1].Value = repertoryEnterId;
sql[2].Value = goodsId;
sql[3].Value = repertoryEnterQuantity;
sql[4].Value = repertoryEnterPackages;
sql[5].Value = giveawayQuantity;
int dt = _myDalMethod.DAL_OPTableDB_Par("Warehouse_Offset_Entry", sql);
return dt;
}
//新增冲红单
public DataTable Insert_Offsert(int repertoryEnterId,
string recordNumber, int registrantId, DateTime registerTime)
{
SqlParameter[] sql =
{
new SqlParameter("@NB", SqlDbType.Char),
new SqlParameter("@Repertory_enter_id", SqlDbType.Int),
new SqlParameter("@Record_number", SqlDbType.Char),
new SqlParameter("@Registrant_id", SqlDbType.Int),
new SqlParameter("@Register_time", SqlDbType.DateTime),
};
sql[0].Value = "Insert_Offsert";
sql[1].Value = repertoryEnterId;
sql[2].Value = recordNumber;
sql[3].Value = registrantId;
sql[4].Value = registerTime;
DataTable dt = _myDalMethod.DAL_SelectDB_Par("Warehouse_Offset_Entry", sql);
return dt;
}
对“保存”按钮操作的存储过程
</pre><pre name="code" class="csharp">
--新增新进仓单明细(进仓冲红明细)
if(@NB='Insert_NewRepertoryEnterDetail')
begin
INSERT INTO Repertory_enter_detail
(Repertory_enter_detail_Farid, Repertory_enter_id, Goods_id, Repertory_enter_packages, Repertory_enter_quantity, Giveaway_quantity, ChongHong_deny)
VALUES (0,@Repertory_enter_id,@Goods_id,@Repertory_enter_packages,@Repertory_enter_quantity,@Giveaway_quantity, 'true')
end
--新增冲红单
if(@NB='Insert_Offsert')
begin
begin tran
INSERT INTO Offset
(Repertory_enter_id, Record_number, Registrant_id, Register_time, Review_deny)
VALUES (@Repertory_enter_id,@Record_number,@Registrant_id,@Register_time, 'false')
select @@IDENTITY
--新增单据数
UPDATE Day_max_quantity
SET Day_max_count = Day_max_count+1
where Day_max_quantity_id=11
commit tran
end
4.14 对于DGV中列的冻结效果图
实现此功能的代码:
4.14 对计算的操作效果图
实现代码:在JavaScript中
//计算
function onAfterEdit(rowIndex, rowData, changes) {
//通过计算价款 税金 价税合计 入库细数,(零售单价,包装含量,入库件数,进项税率,含税进价)
var dataMingXi = $('#tb进窗信息').datagrid('getRows');
var jiaKuan = 0;
var shuijiaheji = 0;
var shuijin = 0;
for (var i = 0; i < dataMingXi.length; i++) {
shuijin += (dataMingXi[i].Purchase_bid) * (dataMingXi[i].Input_ratio / 100) * (dataMingXi[i].AAA);
shuijiaheji += (dataMingXi[i].AAA) * (dataMingXi[i].BBB);
jiaKuan += (shuijiaheji - shuijin);
}
if (!isNaN(shuijin)) {
$.getJSON("/ShangPinJinChuangDan/ConvertToDouble?shu=" + shuijin, function (data) {
$('#txtShuiJin').val("¥" + data).css('color', 'red');
shuijin = 0;
});
}
if (!isNaN(shuijiaheji)) {
$.getJSON("/ShangPinJinChuangDan/ConvertToDouble?shu=" + shuijiaheji, function (data) {
$('#txtJiaShuiHeJi').val("¥" + data).css('color', 'red');
shuijiaheji = 0;
});
}
if (!isNaN(jiaKuan)) {
$.getJSON("/ShangPinJinChuangDan/ConvertToDouble?shu=" + jiaKuan, function (data) {
$('#txtJiaKuang').val("¥" + data).css('color', 'red');
jiaKuan = 0;
});
}
}
4.16对“删除”按钮的操作界面代码
//删除进仓冲红单
function DeleteJinCangChongHong() {
$.messager.confirm('系统提示!', '是否删除???', function (r) {
if (r)
$.getJSON("/ShangPinJinCangChongHong/DeleteJinCangDan?offsetId=" + offsetId,
function (data) {
if (data > 0) {
ui.alert('删除成功!!!', 1000, false);
QingChu();
}
});
});
}
对删除按钮控制器的操作
#region 删除进仓冲红
public int DeleteJinCangDan(int offsetId)
{
return _myJinCangChongHongDan.DeleteJinCangDan(offsetId);
}
#endregion
对删除按钮逻辑层的操作
#region 删除进仓冲红单
public int DeleteJinCangDan(int offsetId)
{
SqlParameter[] sql =
{
new SqlParameter("@NB", SqlDbType.Char),
new SqlParameter("@Offset_id", SqlDbType.Int),
};
sql[0].Value = "DeleteJinCangDan";
sql[1].Value = offsetId;
int dt = _myDalMethod.DAL_OPTableDB_Par("Warehouse_Offset_Entry", sql);
return dt;
}
#endregion
对删除按钮存储过程的操作
--删除进仓冲红明细,删除进仓冲红单
if(@NB='DeleteJinCangDan')
begin
begin tran
DELETE FROM Repertory_enter_detail
where Repertory_enter_id=(SELECT Repertory_enter_id
FROM Offset where Offset_id=@Offset_id) and ChongHong_deny='true'
DELETE FROM Offset
where Offset_id=@Offset_id
commit tran
end
仅供初学者使用,禁止商业用途。
即使爬到最高的山上,一次也只能脚踏实地地迈一步。
别想一下造出大海,必须先由小河川开始。