新增明细 加判断条件

计数页面修改
散料入新增条件
出库单据接口 修改判断条件
This commit is contained in:
zgf committed 2023-11-24 15:39:45 +08:00
1 parent 4334683c6f
commit 1365920fee
15 files changed
+66 -32

No files matched your search

@@ -167,10 +167,22 @@ namespace HHWMS.Web.Controllers
{
return FFResult().Alert("新增明细中,存在重复的唯一码!");
}
// 判断唯一码是否已在库内
var invList = _unitwork.Find<Inventory>(x => 1 == 1)
.Select(x => x.UniqueCode)
.ToList();
if(invList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
{
return FFResult().Alert("新增明细中,存在已在库内的唯一码!");
}
// 补充物料明细
foreach(var item in detailList)
foreach (var item in detailList)
{
var materialqr = _unitwork.FindSingle<MaterialQr>(x => x.UniqueCode.Equals(item.UniqueCode));
if(materialqr == null)
{
return FFResult().Alert("新增明细中,存在不是WMS生成的唯一码!");
}
var material = _unitwork.FindSingle<Material>(x => x.QRCode.Equals(materialqr.QRCode));
item.MaterialCode = material.MaterialCode;
item.MaterialName = material.MaterialName;
@@ -46,8 +46,10 @@ public class ReceiptSLInController : BaseController
&& x.Status != LocationStatus.任务锁
&& x.Status != LocationStatus.满货
&& x.Status != LocationStatus.空仓位
&& x.IsStop == false
&& x.Row == stations.First().Row)
.OrderBy(x => x.Layer)
.OrderBy(x => x.Status)
.ThenBy(x => x.Layer)
.ThenByDescending(x => x.Line)
.FirstOrDefault();
if (box == null && stations.Count == 2)
@@ -55,8 +57,10 @@ public class ReceiptSLInController : BaseController
&& x.Status != LocationStatus.任务锁
&& x.Status != LocationStatus.满货
&& x.Status != LocationStatus.空仓位
&& x.IsStop == false
&& x.Row == stations.Last().Row)
.OrderBy(x => x.Layer)
.OrderBy(x => x.Status)
.ThenBy(x => x.Layer)
.ThenByDescending(x => x.Line)
.FirstOrDefault();
@@ -104,9 +108,9 @@ public class ReceiptSLInController : BaseController
if (box != null)
{
if (box.Type != LocationTypeEnum.散料库站台)
if (string.IsNullOrEmpty(box.ContainerCode))
{
return JsonMore(null, 500, $"{boxCode}不在站台,无法入库!");
return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!");
}
return JsonMore(null);
}
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@@ -41,7 +41,7 @@
<script>
var str = "";
@{
<text>str = @Model.Entity.ID; </text>
<text>str = @Model.Entity.ID; </text>
}
var app = new Vue({
@@ -81,13 +81,14 @@ var app = new Vue({
// 绑定
onSubmit() {
var _this = this;
console.log(this.form);
var qty = _this.form.qty;
if (qty == "")
qty = _this.qtyPlaceholder;
// 提交已绑定数据
$.ajax({
type: "post",
dataType: "json",
data: { code: str, uniqueCode: _this.form.uniqueCode, qty: _this.form.qty },
data: { code: str, uniqueCode: _this.form.uniqueCode, qty: qty },
url: "/receipt/ReceiptHeader/CountCommit",
success: function (json) {
if (json.Code == 200) {
@@ -3,7 +3,7 @@
<el-form ref="form" :model="form" label-width="100px">
<el-row>
<el-col :span="16">
<el-form-item label="散料盒编码">
<el-form-item label="散料盒编码" prop="code">
<el-input v-model="form.code"
placeholder="请扫描散料盒编码"
@@change="scanBox">
@@ -224,7 +224,7 @@
// 重置
resetForm(formName) {
this.$refs[formName].resetFields();
this.boxSize = [];
this.form.code = "";
this.bindingData = [];
},
// 选择尺寸后