feat: 新增库存批次和Lot查询功能,优化入库界面和报表处理
refactor: 重构SimpleReceiptIn界面,增加历史记录和自动完成功能 fix: 修复报表参数处理和SQL解码问题 perf: 优化WCS接口调用和库存计算逻辑 style: 清理无用代码和调整格式 chore: 更新数据库连接配置和调试模式设置
This commit is contained in:
1 parent
5a04ca9d59
commit
48c63bb15d
13 files changed
+361
-199
No files matched your search
@@ -1,6 +1,7 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Web;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Mvc;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
@@ -56,7 +57,8 @@ namespace HHWMS.Web.Controllers
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create(ReportDesignVM vm)
|
||||
{
|
||||
vm.Entity.Params = vm.Entity.Params.Replace(""", "\"");
|
||||
vm.Entity.Params = HttpUtility.HtmlDecode(vm.Entity.Params.Replace("\\t","" ).Replace("\\n",""));
|
||||
vm.Entity.Sql = HttpUtility.HtmlDecode(vm.Entity.Sql.Replace("\\t","" ).Replace("\\n",""));
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
@@ -96,6 +98,8 @@ namespace HHWMS.Web.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.Entity.Params = HttpUtility.HtmlDecode(vm.Entity.Params.Replace("\\t","" ).Replace("\\n",""));
|
||||
vm.Entity.Sql = HttpUtility.HtmlDecode(vm.Entity.Sql.Replace("\\t","" ).Replace("\\n",""));
|
||||
vm.DoEdit();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using HHWMS.Web;
|
||||
using HHWMS.Web.Models;
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -52,6 +53,7 @@ namespace HHWMS.Web
|
||||
// 组装查询条件
|
||||
if (!string.IsNullOrEmpty(sFilter))
|
||||
{
|
||||
sFilter = HttpUtility.HtmlDecode(sFilter);
|
||||
if (string.IsNullOrEmpty(filter))
|
||||
{
|
||||
return ResponseResult<dynamic>.Error("请填写查询条件!");
|
||||
@@ -66,7 +68,7 @@ namespace HHWMS.Web
|
||||
return ResponseResult<dynamic>.Error("查询条件不正确!");
|
||||
}
|
||||
}
|
||||
|
||||
sql = HttpUtility.HtmlDecode(sql.Replace("\\t","" ).Replace("\\n",""));
|
||||
foreach (var item in json)
|
||||
{
|
||||
sql = sql.Replace(item.Key, item.Value.ToString());
|
||||
@@ -84,7 +86,8 @@ namespace HHWMS.Web
|
||||
}
|
||||
result.Add(colList);
|
||||
// 添加列表
|
||||
result.Add(data.Rows[0].Table);
|
||||
if(data.Rows.Count > 0)
|
||||
result.Add(data.Rows[0].Table);
|
||||
|
||||
return ResponseResult<dynamic>.Success(result);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,4 @@
|
||||
</wt:row>
|
||||
</wt:searchpanel>
|
||||
<wt:grid vm="@Model" url="/report/ReportDesign/Search"/>
|
||||
<div class="layui-row" id="ConfigParams" hidden>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<table id="demo" lay-filter="test"></table>
|
||||
|
||||
<div class="layui-row" id="ConfigParams" hidden>
|
||||
<div class="layui-row" id="ConfigParams">
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@@ -41,7 +41,7 @@
|
||||
var DictKey = $('#params').val();
|
||||
if (DictKey != undefined && DictKey != null && DictKey != "") {
|
||||
LoadParams(DictKey);
|
||||
layer.open({
|
||||
layui.layer.open({
|
||||
title: '参数',
|
||||
area: ["500px", "300px"],
|
||||
type: 1,
|
||||
@@ -75,7 +75,6 @@
|
||||
var dom = '';
|
||||
for (var item in oldobj) {
|
||||
var value = item;
|
||||
|
||||
var oldvalue = '';
|
||||
if (oldobj[value] !== undefined) {
|
||||
oldvalue = oldobj[value];
|
||||
@@ -87,6 +86,8 @@
|
||||
dom += '</div></div>';
|
||||
}
|
||||
$("#ConfigParams").html(dom);
|
||||
layui.form.render();
|
||||
console.log($("#ConfigParams"))
|
||||
}
|
||||
|
||||
function GetParams() {
|
||||
@@ -99,6 +100,7 @@
|
||||
|
||||
// 获取数据
|
||||
function QueryData() {
|
||||
|
||||
$.ajax({
|
||||
url: "/report/ReportView/QueryData",
|
||||
async: true,
|
||||
@@ -106,16 +108,23 @@
|
||||
data: { name: name, filter: $('#params').val() },
|
||||
dataType: "json",
|
||||
success: function (result) {
|
||||
layui.table.render({
|
||||
elem: '#demo'
|
||||
, page: { layout: ['count'] }
|
||||
, limit: Number.MAX_VALUE
|
||||
, toolbar: true
|
||||
, defaultToolbar: ['filter','exports']
|
||||
, height: 'full'
|
||||
, cols: [result.Data[0]]
|
||||
, data: result.Data[1]
|
||||
});
|
||||
if (result.Data.length > 1) {
|
||||
layui.table.render({
|
||||
elem: '#demo'
|
||||
, page: {layout: ['count']}
|
||||
, limit: Number.MAX_VALUE
|
||||
, toolbar: true
|
||||
, defaultToolbar: ['filter', 'exports']
|
||||
, height: 'full'
|
||||
, cols: [result.Data[0]]
|
||||
, data: result.Data[1]
|
||||
});
|
||||
}else{
|
||||
layui.table.render({
|
||||
elem: '#demo',
|
||||
data: [] // 确保新数据为空数组
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user