修改点数
修改 新增明细限制 新增定时器 清除已完成单据 入库查找 先层 后列
This commit is contained in:
1 parent
54b51891a0
commit
e7c558ecf9
5 files changed
+30
-14
No files matched your search
@@ -132,6 +132,11 @@ namespace HHWMS.Web.Controllers
|
|||||||
[ActionDescription("Sys.Create")]
|
[ActionDescription("Sys.Create")]
|
||||||
public ActionResult CreateDetails(ReceiptDetailVM vm)
|
public ActionResult CreateDetails(ReceiptDetailVM vm)
|
||||||
{
|
{
|
||||||
|
var header = _unitwork.FindSingle<ReceiptHeader>(x => x.ID == vm.Entity.ReceiptHeaderId);
|
||||||
|
if(header.FirstStatus != ReceiptStatusEnum.新建)
|
||||||
|
{
|
||||||
|
return FFResult().Alert("主单据不是新建状态,不能新建明细!");
|
||||||
|
}
|
||||||
var plList = vm.Entity.MaterialCode.Split("\n");
|
var plList = vm.Entity.MaterialCode.Split("\n");
|
||||||
var slList = vm.Entity.Lot.Split("\n");
|
var slList = vm.Entity.Lot.Split("\n");
|
||||||
var detailList = new List<ReceiptDetail>();
|
var detailList = new List<ReceiptDetail>();
|
||||||
@@ -169,7 +174,7 @@ namespace HHWMS.Web.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 判断唯一码是否已在库内
|
// 判断唯一码是否已在库内
|
||||||
var reDetailList = _unitwork.Find<ReceiptDetail>(x => 1 == 1)
|
var reDetailList = _unitwork.Find<ReceiptDetail>(x => x.Status == ReceiptStatusEnum.新建)
|
||||||
.Select(x => x.UniqueCode)
|
.Select(x => x.UniqueCode)
|
||||||
.ToList();
|
.ToList();
|
||||||
if (reDetailList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
|
if (reDetailList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ var app = new Vue({
|
|||||||
var _this = this;
|
var _this = this;
|
||||||
var qty = _this.form.qty;
|
var qty = _this.form.qty;
|
||||||
if (qty == "")
|
if (qty == "")
|
||||||
qty = _this.qtyPlaceholder;
|
qty = parseInt(_this.qtyPlaceholder);
|
||||||
// 提交已绑定数据
|
// 提交已绑定数据
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
@@ -98,7 +98,7 @@ var app = new Vue({
|
|||||||
var isExit = _this.tableData.findIndex(function (value) {
|
var isExit = _this.tableData.findIndex(function (value) {
|
||||||
return value.UniqueCode == _this.form.uniqueCode;
|
return value.UniqueCode == _this.form.uniqueCode;
|
||||||
});
|
});
|
||||||
_this.tableData[isExit].Qty = _this.form.qty
|
_this.tableData[isExit].Qty = qty;
|
||||||
_this.$refs['form'].resetFields();
|
_this.$refs['form'].resetFields();
|
||||||
_this.qtyPlaceholder = "数量";
|
_this.qtyPlaceholder = "数量";
|
||||||
_this.$refs.uniqueCode.focus();
|
_this.$refs.uniqueCode.focus();
|
||||||
|
|||||||
@@ -205,7 +205,10 @@ namespace HHWMS.Web
|
|||||||
&& x.Type == LocationTypeEnum.盘料库位
|
&& x.Type == LocationTypeEnum.盘料库位
|
||||||
&& (x.Status == LocationStatus.有货 || x.Status == LocationStatus.空容器)
|
&& (x.Status == LocationStatus.有货 || x.Status == LocationStatus.空容器)
|
||||||
&& x.Length == Length && !x.IsStop)
|
&& x.Length == Length && !x.IsStop)
|
||||||
.OrderByDescending(x => x.Length - x.Width).FirstOrDefault();
|
.OrderByDescending(x => x.Length - x.Width)
|
||||||
|
.ThenBy(x => x.Layer)
|
||||||
|
.ThenByDescending(x => x.Line)
|
||||||
|
.FirstOrDefault();
|
||||||
if (Length == 23 && container == null && station.Row == 3)
|
if (Length == 23 && container == null && station.Row == 3)
|
||||||
{
|
{
|
||||||
station = _unitwork.Find<Location>(x => x.Type.Equals(LocationTypeEnum.堆垛机工位)
|
station = _unitwork.Find<Location>(x => x.Type.Equals(LocationTypeEnum.堆垛机工位)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using HHWMS.Web.Models;
|
using HHWMS.Web.Models;
|
||||||
using Quartz;
|
using Quartz;
|
||||||
@@ -18,9 +19,16 @@ namespace HHWMS.Web
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var _unitwork = new UnitWork(Wtm);
|
var _unitwork = new UnitWork(Wtm);
|
||||||
//var sql = $"DELETE FROM {this.Wtm.DC.GetTableName<PersistedGrant>()} WHERE Expiration<'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}'";
|
if (_unitwork.IsExit<ReceiptHeader>(x => x.FirstStatus == ReceiptStatusEnum.收完))
|
||||||
//this.Wtm.DC.RunSQL(sql);
|
{
|
||||||
Wtm.DoLog("清理过期的token", ActionLogTypesEnum.Job, "TestJob");
|
_unitwork.BatchDelete<ReceiptHeader>(x => x.FirstStatus == ReceiptStatusEnum.收完);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_unitwork.IsExit<ShipmentHeader>(x => x.FirstStatus == ShipStatusEnum.拣货完成))
|
||||||
|
{
|
||||||
|
_unitwork.BatchDelete<ShipmentHeader>(x => x.FirstStatus == ShipStatusEnum.拣货完成);
|
||||||
|
}
|
||||||
|
Wtm.DoLog("清理过期单据", ActionLogTypesEnum.Job, "TestJob");
|
||||||
|
|
||||||
#region 更新时间
|
#region 更新时间
|
||||||
var job = _unitwork.FindSingle<SysJob>(x => x.JobName == context.JobDetail.Key.Name);
|
var job = _unitwork.FindSingle<SysJob>(x => x.JobName == context.JobDetail.Key.Name);
|
||||||
|
|||||||
@@ -27,18 +27,18 @@
|
|||||||
// "Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;",
|
// "Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;",
|
||||||
// "DBType": "mysql"
|
// "DBType": "mysql"
|
||||||
//}
|
//}
|
||||||
//{
|
|
||||||
// "Key": "default",
|
|
||||||
// "Value": "Data Source=.;Initial Catalog=8357wms;User=sa;Password=abc123*;Persist Security Info=True",
|
|
||||||
// "DbContext": "DataContext",
|
|
||||||
// "DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle
|
|
||||||
//}
|
|
||||||
{
|
{
|
||||||
"Key": "default",
|
"Key": "default",
|
||||||
"Value": "Data Source=10.18.106.4;Initial Catalog=8357wms;User=wms;Password=abc123*;Persist Security Info=True",
|
"Value": "Data Source=.;Initial Catalog=8357wms;User=sa;Password=abc123*;Persist Security Info=True",
|
||||||
"DbContext": "DataContext",
|
"DbContext": "DataContext",
|
||||||
"DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle
|
"DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle
|
||||||
}
|
}
|
||||||
|
//{
|
||||||
|
// "Key": "default",
|
||||||
|
// "Value": "Data Source=10.18.106.4;Initial Catalog=8357wms;User=wms;Password=abc123*;Persist Security Info=True",
|
||||||
|
// "DbContext": "DataContext",
|
||||||
|
// "DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle
|
||||||
|
//}
|
||||||
],
|
],
|
||||||
"CookiePre": "HHWMS", //cookie前缀
|
"CookiePre": "HHWMS", //cookie前缀
|
||||||
"IsQuickDebug": true, //是否启用debug模式
|
"IsQuickDebug": true, //是否启用debug模式
|
||||||
|
|||||||
Reference in new issue
Block a user