New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Security.Cryptography; |
| | | using System.Collections.Concurrent; |
| | | using System.Runtime.Caching; |
| | | using System.Timers; |
| | | |
| | | namespace WebSRM.Utility |
| | | { |
| | | public class MemoryCacheHelper |
| | | { |
| | | /// <summary> |
| | | /// 获取缓存 |
| | | /// </summary> |
| | | /// <typeparam name="T"></typeparam> |
| | | /// <param name="key"></param> |
| | | /// <returns></returns> |
| | | public static string GetCache(string key) |
| | | { |
| | | if (MemoryCache.Default == null || MemoryCache.Default[key] == null) |
| | | { |
| | | return null; |
| | | } |
| | | return MemoryCache.Default[key].ToString(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建缓存 |
| | | /// </summary> |
| | | /// <param name="key"></param> |
| | | /// <param name="val"></param> |
| | | /// <param name="slidingExpiration">失效时间范围</param> |
| | | /// <param name="absoluteExpiration">失效的绝对时间</param> |
| | | /// <returns></returns> |
| | | public static void SetCache(string key, string val, DateTime? absoluteExpiration = null, TimeSpan? slidingExpiration = null ) |
| | | { |
| | | try |
| | | { |
| | | if (absoluteExpiration == null) |
| | | { |
| | | //默认设置为2小时之后 |
| | | absoluteExpiration = DateTime.Now.AddHours(2); |
| | | } |
| | | |
| | | var policy = CreatePolicy(slidingExpiration, absoluteExpiration); |
| | | MemoryCache.Default.Set(key, val, policy); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 清空缓存 |
| | | /// </summary> |
| | | public static void ClearCache() |
| | | { |
| | | List<string> cacheKeys = MemoryCache.Default.Select(kvp => kvp.Key).ToList(); |
| | | foreach (string cacheKey in cacheKeys) |
| | | { |
| | | MemoryCache.Default.Remove(cacheKey); |
| | | } |
| | | } |
| | | |
| | | |
| | | private static CacheItemPolicy CreatePolicy(TimeSpan? slidingExpiration, DateTime? absoluteExpiration) |
| | | { |
| | | var policy = new CacheItemPolicy(); |
| | | |
| | | if (absoluteExpiration.HasValue) |
| | | { |
| | | policy.AbsoluteExpiration = absoluteExpiration.Value; |
| | | } |
| | | else if (slidingExpiration.HasValue) |
| | | { |
| | | policy.SlidingExpiration = slidingExpiration.Value; |
| | | } |
| | | |
| | | policy.Priority = CacheItemPriority.Default; |
| | | |
| | | return policy; |
| | | } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | 2022/12/9 9:44:22 Cache: |
| | | |
| | | 2022/12/9 9:48:23 Cache:84887;Admin |
| | | |
| | | 2022/12/9 9:48:23 Cachekey:Admin |
| | | |
| | | 2022/12/9 9:48:23 Cachevalue:84887 |
| | | |
| | | 2022/12/9 9:48:56 Cache:84887;Admin |
| | | |
| | | 2022/12/9 9:48:56 Cachekey:Admin |
| | | |
| | | 2022/12/9 9:48:56 Cachevalue:84887 |
| | | |
| | | 2022/12/9 9:50:09 Cache:84947,84948,84949,84950,84951,84952,84995,84996,84989,84990,84991,84992,84993,84994,84983,84984,84985,84986,84987,84988,84977,84978,84979,84980,84981,84982,84971,84972,84973,84974,84975,84976,84965,84966,84967,84968,84969,84970,84959,84960,84961,84962,84963,84964,84953,84954,84955,84956,84957,84958,84997,84998,84999,85000,85001,85002,85093,85094,85095,85096,85087,85088,85089,85090,85091,85092,85081,85082,85083,85084,85085,85086,85075,85076,85077,85078,85079,85080,85069,85070,85071,85072,85073,85074,85063,85064,85065,85066,85067,85068,85057,85058,85059,85060,85061,85062,85051,85052,85053,85054,85055,85056,85045,85046,85047,85048,85049,85050,85039,85040,85041,85042,85043,85044,85033,85034,85035,85036,85037,85038,85027,85028,85029,85030,85031,85032,85021,85022,85023,85024,85025,85026,85015,85016,85017,85018,85019,85020,85009,85010,85011,85012,85013,85014,85003,85004,85005,85006,85007,85008;Admin |
| | | |
| | | 2022/12/9 9:50:09 Cachekey:Admin |
| | | |
| | | 2022/12/9 9:50:09 Cachevalue:84947,84948,84949,84950,84951,84952,84995,84996,84989,84990,84991,84992,84993,84994,84983,84984,84985,84986,84987,84988,84977,84978,84979,84980,84981,84982,84971,84972,84973,84974,84975,84976,84965,84966,84967,84968,84969,84970,84959,84960,84961,84962,84963,84964,84953,84954,84955,84956,84957,84958,84997,84998,84999,85000,85001,85002,85093,85094,85095,85096,85087,85088,85089,85090,85091,85092,85081,85082,85083,85084,85085,85086,85075,85076,85077,85078,85079,85080,85069,85070,85071,85072,85073,85074,85063,85064,85065,85066,85067,85068,85057,85058,85059,85060,85061,85062,85051,85052,85053,85054,85055,85056,85045,85046,85047,85048,85049,85050,85039,85040,85041,85042,85043,85044,85033,85034,85035,85036,85037,85038,85027,85028,85029,85030,85031,85032,85021,85022,85023,85024,85025,85026,85015,85016,85017,85018,85019,85020,85009,85010,85011,85012,85013,85014,85003,85004,85005,85006,85007,85008 |
| | | |
| | | 2022/12/9 9:50:48 HuserName:Admin |
| | | |
| | | 2022/12/9 9:50:48 linterid:84947,84948,84949,84950,84951,84952,84995,84996,84989,84990,84991,84992,84993,84994,84983,84984,84985,84986,84987,84988,84977,84978,84979,84980,84981,84982,84971,84972,84973,84974,84975,84976,84965,84966,84967,84968,84969,84970,84959,84960,84961,84962,84963,84964,84953,84954,84955,84956,84957,84958,84997,84998,84999,85000,85001,85002,85093,85094,85095,85096,85087,85088,85089,85090,85091,85092,85081,85082,85083,85084,85085,85086,85075,85076,85077,85078,85079,85080,85069,85070,85071,85072,85073,85074,85063,85064,85065,85066,85067,85068,85057,85058,85059,85060,85061,85062,85051,85052,85053,85054,85055,85056,85045,85046,85047,85048,85049,85050,85039,85040,85041,85042,85043,85044,85033,85034,85035,85036,85037,85038,85027,85028,85029,85030,85031,85032,85021,85022,85023,85024,85025,85026,85015,85016,85017,85018,85019,85020,85009,85010,85011,85012,85013,85014,85003,85004,85005,85006,85007,85008 |
| | | |
| | | 2022/12/9 9:50:48 select * from h_v_SRM_BarCodeBillList where HItemID in(84947,84948,84949,84950,84951,84952,84995,84996,84989,84990,84991,84992,84993,84994,84983,84984,84985,84986,84987,84988,84977,84978,84979,84980,84981,84982,84971,84972,84973,84974,84975,84976,84965,84966,84967,84968,84969,84970,84959,84960,84961,84962,84963,84964,84953,84954,84955,84956,84957,84958,84997,84998,84999,85000,85001,85002,85093,85094,85095,85096,85087,85088,85089,85090,85091,85092,85081,85082,85083,85084,85085,85086,85075,85076,85077,85078,85079,85080,85069,85070,85071,85072,85073,85074,85063,85064,85065,85066,85067,85068,85057,85058,85059,85060,85061,85062,85051,85052,85053,85054,85055,85056,85045,85046,85047,85048,85049,85050,85039,85040,85041,85042,85043,85044,85033,85034,85035,85036,85037,85038,85027,85028,85029,85030,85031,85032,85021,85022,85023,85024,85025,85026,85015,85016,85017,85018,85019,85020,85009,85010,85011,85012,85013,85014,85003,85004,85005,85006,85007,85008) order by 物料编码,内外箱标识,当前托数 |
| | | |
| | | 2022/12/9 9:51:21 错误:在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - 无法打开到 SQL Server 的连接) |
| | |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.ComponentModel.DataAnnotations" /> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | | <Reference Include="System.Runtime.Caching" /> |
| | | <Reference Include="System.Web.Extensions" /> |
| | | <Reference Include="System.Drawing" /> |
| | | <Reference Include="System.Web" /> |
| | |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\views\grf\条码.grf" /> |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\views\WarM\物料条码%28七行纸大%29_五云.grf" /> |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\views\WarM\送货单%28A4纸%29.grf" /> |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\views\SRM\Api\SRM_Web_PoBarCodeBillApi.ashx" /> |
| | | <None Include="Properties\PublishProfiles\websrm.pubxml" /> |
| | | <None Include="Scripts\jquery-1.8.2.intellisense.js" /> |
| | | <Content Include="Scripts\jquery-1.8.2.js" /> |
| | |
| | | <Compile Include="Global.asax.cs"> |
| | | <DependentUpon>Global.asax</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="layuiAdmin.std-v1.2.1\src\views\SRM\Api\SRM_Web_PoBarCodeBillApi.ashx.cs"> |
| | | <DependentUpon>SRM_Web_PoBarCodeBillApi.ashx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="layuiAdmin.std-v1.2.1\src\views\SRM\xmlSRM_Web_PoBarCodeBillList.aspx.cs"> |
| | | <DependentUpon>xmlSRM_Web_PoBarCodeBillList.aspx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | |
| | | <Compile Include="Site.Mobile.Master.designer.cs"> |
| | | <DependentUpon>Site.Mobile.Master</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Utility\MemoryCacheHelper.cs" /> |
| | | <Compile Include="ViewSwitcher.ascx.cs"> |
| | | <DependentUpon>ViewSwitcher.ascx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | |
| | | url = "/UpdatePOInStockBillPrintQty" |
| | | break; |
| | | } |
| | | if (Type == "HBarCodePrint") { |
| | | if (Type != "SRM_POInStockBillList") { |
| | | return; |
| | | } |
| | | //更新打印数量 |
New file |
| | |
| | | <%@ WebHandler Language="C#" CodeBehind="SRM_Web_PoBarCodeBillApi.ashx.cs" Class="WebSRM.layuiAdmin.std_v1._2._1.src.views.SRM.Api.SRM_Web_PoBarCodeBillApi" %> |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using WebSRM.Utility; |
| | | |
| | | namespace WebSRM.layuiAdmin.std_v1._2._1.src.views.SRM.Api |
| | | { |
| | | /// <summary> |
| | | /// SRM_Web_PoBarCodeBillApi 的摘要说明 |
| | | /// </summary> |
| | | public class SRM_Web_PoBarCodeBillApi : IHttpHandler |
| | | { |
| | | |
| | | public void ProcessRequest(HttpContext context) |
| | | { |
| | | context.Response.ContentType = "application/json"; |
| | | Stream stream = context.Request.InputStream; |
| | | var linterid = string.Empty; |
| | | using (StreamReader streamRead = new StreamReader(stream)) |
| | | { |
| | | linterid = streamRead.ReadToEnd(); |
| | | LogService.Write("Cache:"+ linterid); |
| | | } |
| | | //linterid = JsonConvert.SerializeObject(linterid); |
| | | var Cachekey = linterid.Split(';')[1]; |
| | | var Cachevalue = linterid.Split(';')[0]; |
| | | LogService.Write("Cachekey:" + Cachekey); |
| | | LogService.Write("Cachevalue:" + Cachevalue); |
| | | MemoryCacheHelper.SetCache(Cachekey, Cachevalue); |
| | | //HttpContext.Current.Session.Remove("linterid"); |
| | | //HttpContext.Current.Session.Add("linterid", linterid); |
| | | } |
| | | |
| | | public bool IsReusable |
| | | { |
| | | get |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | var sMainSub = sMainStr + ';' + sSubStr; |
| | | var _sSubStr = JSON.parse(sSubStr); |
| | | for (var i = 0; i < _sSubStr.length; i++) { |
| | | if (_sSubStr[i].HQty > 0 && (_sSubStr[i].HMinQty == 0 || _sSubStr[i].HWXQty == 0)) { |
| | | layer.msg("明细记录第" + (i + 1) + "行,包装数量不能为0!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" }); |
| | | return Result = false; |
| | | } |
| | | } |
| | | layer.load(3) |
| | | $.ajax( |
| | | { |
| | |
| | | rows = rows.substring(rows.length - 1, 0); |
| | | rows2 = rows2.substring(rows2.length - 1, 0); |
| | | if (rows == "") { |
| | | layer.msg("至少选择一行记录!") |
| | | layer.msg("没有需要打印的数据!") |
| | | return; |
| | | } |
| | | else { |
| | | var url = "linteridSession"; |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + url, //方法所在页面和方法名 |
| | | async: true, |
| | | data: { "linterid": rows.toString(), "HUserName": sessionStorage["HUserName"] }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.alert("错误:" + err, { icon: 5 }); |
| | | } |
| | | }); |
| | | sessionStorage["linterid"] = rows.toString(); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | |
| | | , shade: 0.6 //遮罩透明度 |
| | | , maxmin: false //允许全屏最小化 |
| | | , anim: 0 //0-6的动画形式,-1不开启 |
| | | , content: ['../../views/BaseSet/SRM_OpenTmpList.html?linterid=' + rows.toString() + '&HBarcode=&Type=' + openTmpListType, 'yes'] |
| | | , content: ['../../views/BaseSet/SRM_OpenTmpList.html?linterid=' + sessionStorage["HUserName"] + '&HBarcode=&Type=' + openTmpListType, 'yes'] |
| | | , resize: false |
| | | //, cancel: function () { |
| | | // $(".layui-btn").removeClass("layui-btn-disabled"); |
| | |
| | | , { field: 'HDDQty', title: '订单数量', width: 100 } |
| | | , { field: 'HBarcodeCount', title: '已生成条码数量', width: 135 } |
| | | , { field: 'HNotBarcodeCount', title: '未生成条码数量', width: 135 } |
| | | , { field: 'HQty', title: '本次生成条码数量', width: 135, edit: 'text' } |
| | | , { field: 'HMinQty', title: '内箱包装数', width: 100, edit: 'text' } |
| | | , { field: 'HQty', title: '本次生成条码数量', width: 135, edit: 'text', event: "inputHQty"} |
| | | , { field: 'HMinQty', title: '内箱包装数', width: 100, edit: 'text', event: "inputHMinQty" } |
| | | , { field: 'HBQty', title: '内箱数', width: 100 } |
| | | , { field: 'HWXQty', title: '外箱包装数', width: 100, edit: 'text' } |
| | | , { field: 'HWXQty', title: '外箱包装数', width: 100, edit: 'text', event: "inputHWXQty"} |
| | | , { field: 'HWBQty', title: '外箱数', width: 100 } |
| | | , { field: 'HPrice', title: '单价', width: 100, hide: true } |
| | | , { field: 'HMoney', title: '金额', width: 100, hide: true } |
| | |
| | | $input.val(val.replace(/[^\d]/g, '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHQty') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/[^\d]/g, '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHMinQty') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/[^\d]/g, '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHWXQty') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/[^\d]/g, '')); |
| | | }); |
| | | } |
| | | }); |
| | | table.on('edit(mainTable)', function (obj) { //注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值" |
| | | var value = obj.value //得到修改后的值 |
| | |
| | | layer.msg("至少选择一行记录!") |
| | | } |
| | | else { |
| | | var url = "linteridSession"; |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + url, //方法所在页面和方法名 |
| | | async: true, |
| | | data: { "linterid": rows.toString(), "HUserName": sessionStorage["HUserName"] }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.alert("错误:" + err, { icon: 5 }); |
| | | } |
| | | }); |
| | | sessionStorage["linterid"] = rows.toString(); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | |
| | | , shade: 0.6 //遮罩透明度 |
| | | , maxmin: false //允许全屏最小化 |
| | | , anim: 0 //0-6的动画形式,-1不开启 |
| | | , content: ['../../views/BaseSet/SRM_OpenTmpList.html?linterid=' + rows.toString() + '&HBarcode=' + rows2.toString() + '&Type=HBarCodePrint', 'yes'] |
| | | , content: ['../../views/BaseSet/SRM_OpenTmpList.html?linterid=' + sessionStorage["HUserName"] + '&HBarcode=&Type=HBarCodePrint', 'yes'] |
| | | , resize: false |
| | | //, cancel: function () { |
| | | // $(".layui-btn").removeClass("layui-btn-disabled"); |
| | | //} |
| | | }) |
| | | } |
| | | //if (OpenTmp != "") |
| | | //{ |
| | | // window.open("../../views/SRM/HBarPlanPrint.html?linterid=" + rows.toString() + "&Type=HBarCodePrint&OpenTmp=" + OpenTmp.toString()); |
| | | // $.ajax( |
| | | // { |
| | | // type: "POST", |
| | | // url: GetWEBURL() + "UpdateBarcodePrintQty", //方法所在页面和方法名 |
| | | // async: true, |
| | | // data: { "msg": rows2 }, |
| | | // dataType: "json", |
| | | // success: function (data) { |
| | | // //if (data.count == 1) { // 说明验证成功了, |
| | | // // layer.msg(data.Message, { icon: 1 }); |
| | | // //} |
| | | // //else { |
| | | // // layer.msg(data.Message, { icon: 5 }); |
| | | // //} |
| | | // layer.closeAll("loading"); |
| | | // }, |
| | | // error: function (err) { |
| | | // f_alert("错误:" + err); |
| | | // } |
| | | // }); |
| | | //} |
| | | break; |
| | | case 'btn-Delete': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | |
| | | <div class="layui-btn-container"> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>预览</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>审核</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>审核</button>--> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详情</button> |
| | |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">保存</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Aduit">审核</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Aduit">审核</button>--> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Print">打印</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">退出</button> |
| | | </div> |
| | |
| | | , { field: 'HUnitName', title: '计量单位', width: 100 } |
| | | , { field: 'HUnitNumber', title: '计量单位代码', width: 100, hide: true } |
| | | , { field: 'HUnitID', title: '计量单位ID', width: 100, hide: true } |
| | | , { field: 'HQty', title: '送货数量', width: 100, edit: 'text'/*, event: "inputHQty"*/ } |
| | | , { field: 'FPrintCount', title: '打印条码数量', width: 120 } |
| | | , { field: 'HQty', title: '送货数量', width: 100, edit: 'text' , event: "inputHQty"} |
| | | , { field: 'HRQty', title: '未入库数量', width: 100 } |
| | | , { field: 'HSQty', title: '源单数量', width: 100 } |
| | | , { field: 'HBatchNo', title: '批次', width: 120} |
| | |
| | | else if (obj.event == 'inputHQty') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "1"; |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/[^\d]/g, '')); |
| | | }); |
| | | } |
| | |
| | | layer.msg("明细记录第" + (i + 1) + "行,送货数量为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubStr[i].FPrintCount == 0) { |
| | | layer.msg("明细记录第" + (i + 1) + "行,没有进行条码打印,不能生成送货单!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" }); |
| | | return Result = false; |
| | | } |
| | | //送货数量 + (源单数量-未入库数量 = 已生成送货单数量) > 打印条码数量 时限制 |
| | | if (parseFloat(sSubStr[i].HQty) + parseFloat(sSubStr[i].HSQty) - parseFloat(sSubStr[i].HRQty) > parseFloat(sSubStr[i].FPrintCount)) { |
| | | layer.msg("明细记录第" + (i + 1) + "行,送货单数量不能超过已生成条码数量!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" }); |
| | | return Result = false; |
| | | } |
| | | } |
| | | } |
| | | else { |
| | |
| | | <head runat="server"> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <title></title> |
| | | <script runat="server"> |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | //★特别提示★: |
| | | //不同的数据库应该选用不同的报表XML数据生成类,SQL Server数据库用SqlXMLReportData,Oracle数据库用OracleXMLReportData |
| | | //OledbXMLReportData适合于Access等本地数据库,为了演示方便,这里从Grid++Report的Access例子数据库中获取报表数据 |
| | | |
| | | //OledbXMLReportData.GenOneRecordset(this, "select * from Customers order by CustomerID"); |
| | | //SqlXMLReportData.GenOneRecordset(this, "select * from h_v_Kf_POStockInBillList_K3 where hmainid=1781"); |
| | | //SqlXMLReportData.GenOneRecordset(this, "select * from h_v_SRM_BarCodeBillList where HItemID in(" + Request.Params["linterid"] + ") order by 物料代码"); |
| | | SqlXMLReportData.GenOneRecordset(this, "select * from h_v_SRM_BarCodeBillList where HItemID in(" + Request.Params["linterid"] + ") order by 物料代码"); |
| | | } |
| | | </script> |
| | | </head> |
| | | <body> |
| | | <form id="form1" runat="server"> |
| | | <div> |
| | | |
| | | </div> |
| | | </form> |
| | | </body> |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading; |
| | | using System.Web; |
| | | using System.Web.UI; |
| | | using System.Web.UI.WebControls; |
| | | using WebSRM.Utility; |
| | | |
| | | namespace WebSRM.layuiAdmin.std_v1._2._1.src.views.SRM |
| | | { |
| | |
| | | { |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | |
| | | if (!IsPostBack) |
| | | { |
| | | try |
| | | { |
| | | var HuserName = Request.Params["linterid"];//用户名称 |
| | | LogService.Write("HuserName:" + HuserName); |
| | | var linterid = MemoryCacheHelper.GetCache(HuserName); |
| | | LogService.Write("linterid:" + linterid); |
| | | SqlXMLReportData.GenOneRecordset(this, "select * from h_v_SRM_BarCodeBillList where HItemID in(" + linterid + ") order by 物料编码,内外箱标识,当前托数"); |
| | | } |
| | | catch (ThreadAbortException ex) |
| | | { |
| | | LogService.Write("错误:" + ex.Message.ToString()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogService.Write("错误:" + ex.Message.ToString()); |
| | | } |
| | | //Page.RegisterStartupScript("ggg",) |
| | | //SqlXMLReportData.GenOneRecordset(this, "select * from h_v_SRM_BarCodeBillList where HItemID in(" + window.localStorage.getItem('linterid') + ") order by 物料编码,内外箱标识,当前托数"); |
| | | } |
| | | } |
| | | } |
| | | } |