盘料 散料收货扫完码自动滚动
批量新增明细,报错信息修改 散料扫完站台码,显示所有已绑定物料
This commit is contained in:
parent
8b4c33283c
commit
faa3f5a9d3
@ -168,18 +168,31 @@ namespace HHWMS.Web.Controllers
|
||||
}
|
||||
}
|
||||
var uniqueGroup = detailList.GroupBy(x => x.UniqueCode);
|
||||
|
||||
if (uniqueGroup.Any(x => x.Count() > 1))
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在重复的唯一码!");
|
||||
var codeList = uniqueGroup.Where(x => x.Count() > 1)
|
||||
.Select(x => x.Key)
|
||||
.ToList();
|
||||
return FFResult().Alert($"新增明细中,存在重复的唯一码!{String.Join(", ", codeList.ToArray())}");
|
||||
}
|
||||
|
||||
// 判断唯一码是否已在库内
|
||||
var reDetailList = _unitwork.Find<ReceiptDetail>(x => x.Status == ReceiptStatusEnum.新建)
|
||||
.Select(x => x.UniqueCode)
|
||||
.Select(x => new { x.UniqueCode, x.ReceiptHeader.Code })
|
||||
.ToList();
|
||||
if (reDetailList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
|
||||
var reDel = reDetailList.Select(x => x.UniqueCode)
|
||||
.Intersect(detailList.Select(x => x.UniqueCode));
|
||||
if (reDel.Count() > 0)
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在已添加的唯一码!");
|
||||
var tt= reDetailList.Where(x => reDel.Contains(x.UniqueCode))
|
||||
.ToList();
|
||||
var returnStr = "";
|
||||
foreach (var item in tt)
|
||||
{
|
||||
returnStr += $"单号:{item.Code};唯一码:{item.UniqueCode};";
|
||||
}
|
||||
return FFResult().Alert($"新增明细中,存在已添加的唯一码!{returnStr}");
|
||||
}
|
||||
|
||||
// 判断唯一码是否已在库内
|
||||
|
||||
@ -145,7 +145,9 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
// 更新入库单明细状态
|
||||
var header = receiptHeaderList.First(x => x.Code.Equals(item.ReceiptCode));
|
||||
var receipt = header.ReceiptDetails.First(x => x.UniqueCode.Equals(item.UniqueCode));
|
||||
var receipt = header.ReceiptDetails.First(x =>
|
||||
x.UniqueCode.Equals(item.UniqueCode)
|
||||
&& x.Status < ReceiptStatusEnum.收完);
|
||||
//var receipt = _unitWork.FindSingle<ReceiptDetail>(x => x.UniqueCode == item.UniqueCode);
|
||||
if (receipt != null)
|
||||
{
|
||||
|
||||
@ -112,7 +112,9 @@ public class ReceiptSLInController : BaseController
|
||||
{
|
||||
return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!");
|
||||
}
|
||||
return JsonMore(null);
|
||||
var data = _unitWork.Find<Inventory>(x => x.LocationCode == boxCode
|
||||
&& x.TaskStatus == InventoryTaskStatus.任务中).ToList();
|
||||
return JsonMore(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -187,6 +189,7 @@ public class ReceiptSLInController : BaseController
|
||||
Qty = item.BindQty,
|
||||
LocationCode = item.BoxCode,
|
||||
ContainerCode = station.ContainerCode,
|
||||
ReceiptCode = item.ReceiptCode,
|
||||
Status = "0",
|
||||
TaskStatus = InventoryTaskStatus.任务中,
|
||||
Flag = item.Size,
|
||||
|
||||
@ -40,7 +40,9 @@
|
||||
<el-form-item label="唯一码" prop="uniqueCode">
|
||||
<el-input v-model="form.uniqueCode" @@change="scanUniqueCode" ref="uniqueCode"></el-input>
|
||||
</el-form-item>
|
||||
<el-table :data="bindingData" height="450" border
|
||||
<el-table :data="bindingData"
|
||||
ref="tableData"
|
||||
height="450" border
|
||||
style="width: 100%">
|
||||
<el-table-column fixed="left"
|
||||
label="操作"
|
||||
@ -323,6 +325,9 @@
|
||||
size: this.form.size
|
||||
})
|
||||
this.form.uniqueCode = '';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tableData.bodyWrapper.scrollTop = this.$refs.tableData.bodyWrapper.scrollHeight
|
||||
})
|
||||
},
|
||||
// 删除已绑定行
|
||||
deleteRow(index, rows) {
|
||||
|
||||
@ -42,7 +42,9 @@
|
||||
<el-switch v-model="form.isFull"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-table :data="bindingData" stripe max-height="450" border style="width: 100%">
|
||||
<el-table :data="bindingData"
|
||||
ref="tableData"
|
||||
stripe max-height="450" border style="width: 100%">
|
||||
<el-table-column fixed="left" label="操作" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @@click.native.prevent="deleteRow(scope.$index, bindingData)"
|
||||
@ -80,7 +82,7 @@
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" @@click="onSubmit">绑定</el-button>
|
||||
<el-button @@click="resetForm('form')">重置</el-button>
|
||||
<el-button type="success" @@click="back">回库</el-button>
|
||||
<el-button type="success" @@click="back" :disabled="disabledbackbutton">回库</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@ -93,10 +95,11 @@
|
||||
return {
|
||||
form: {
|
||||
code: "",
|
||||
size: "",
|
||||
size: "1",
|
||||
uniqueCode: "",
|
||||
isFull: false
|
||||
},
|
||||
disabledbackbutton: true,// true不可回库,false可回库
|
||||
boxSize: [
|
||||
{ label: "8mm", value: "8" },
|
||||
{ label: "10mm", value: "10" },
|
||||
@ -170,6 +173,7 @@
|
||||
// 扫描散料箱
|
||||
scanBox(data) {
|
||||
var _this = this;
|
||||
_this.bindingData = [];
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
@ -184,7 +188,19 @@
|
||||
});
|
||||
}
|
||||
else {
|
||||
json.Data.forEach(function (item) {
|
||||
_this.bindingData.push({
|
||||
"receiptCode":item.ReceiptCode,
|
||||
"boxCode": item.ContainerCode,
|
||||
"uniqueCode": item.UniqueCode,
|
||||
"qty": item.Qty,
|
||||
"bindQty": item.Qty,
|
||||
"size": item.Flag
|
||||
})
|
||||
});
|
||||
|
||||
_this.$refs.uniqueCode.focus();
|
||||
_this.disabledbackbutton = false;
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
@ -215,7 +231,8 @@
|
||||
_this.$message({
|
||||
message: "绑定成功!",
|
||||
});
|
||||
_this.bindingData = [];
|
||||
// _this.bindingData = [];
|
||||
_this.disabledbackbutton = false;
|
||||
} else {
|
||||
_this.$message({
|
||||
message: "绑定失败!",
|
||||
@ -289,6 +306,10 @@
|
||||
bindQty: json.Data.Qty - json.Data.CompletedQty,
|
||||
size: _this.form.size,
|
||||
});
|
||||
_this.disabledbackbutton = true;
|
||||
_this.$nextTick(() => {
|
||||
_this.$refs.tableData.bodyWrapper.scrollTop = _this.$refs.tableData.bodyWrapper.scrollHeight
|
||||
})
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
@ -354,6 +375,7 @@
|
||||
message: "回库任务创建成功!"
|
||||
});
|
||||
_this.resetForm('form');
|
||||
_this.disabledbackbutton = true;
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
|
||||
@ -22,19 +22,19 @@
|
||||
},
|
||||
|
||||
"Connections": [
|
||||
//{
|
||||
// "Key": "default",
|
||||
// "Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;",
|
||||
// "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
|
||||
"Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;",
|
||||
"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",
|
||||
// "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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user