现场问题修改
This commit is contained in:
1 parent
faa3f5a9d3
commit
9872a308f7
6 files changed
+45
-18
No files matched your search
@@ -54,7 +54,8 @@ public class ShipOutController : BaseController
|
||||
// 判断箱号是否合理
|
||||
if (box != null)
|
||||
{
|
||||
var inv = _unitWork.Find<Inventory>(x => x.LocationCode.Equals(code));
|
||||
var inv = _unitWork.Find<Inventory>(x => x.LocationCode.Equals(code)
|
||||
&& x.TaskStatus == InventoryTaskStatus.任务中);
|
||||
return JsonMore(inv);
|
||||
|
||||
}
|
||||
@@ -102,19 +103,23 @@ public class ShipOutController : BaseController
|
||||
shipment.Status = ShipStatusEnum.拣货完成;
|
||||
shipment.UpdateTime = DateTime.Now;
|
||||
shipment.UpdateBy = Wtm.LoginUserInfo.ITCode;
|
||||
_unitWork.Update(shipment);
|
||||
|
||||
|
||||
if (!shipment.ShipmentHeader.ShipmentDetails.Any(x => x.Status < ShipStatusEnum.拣货完成))
|
||||
var header = _unitWork.Find<ShipmentHeader>(x => x.ID.Equals(shipment.ShipmentHeaderId))
|
||||
.Include(x => x.ShipmentDetails)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (!header.ShipmentDetails.Any(x => x.Status < ShipStatusEnum.拣货完成))
|
||||
{
|
||||
shipment.ShipmentHeader.FirstStatus = ShipStatusEnum.拣货完成;
|
||||
header.FirstStatus = ShipStatusEnum.拣货完成;
|
||||
}
|
||||
else
|
||||
{
|
||||
shipment.ShipmentHeader.FirstStatus = ShipStatusEnum.拣货中;
|
||||
header.FirstStatus = ShipStatusEnum.拣货中;
|
||||
}
|
||||
shipment.UpdateBy = Wtm.LoginUserInfo.ITCode;
|
||||
shipment.UpdateTime = DateTime.Now;
|
||||
_unitWork.Update(shipment);
|
||||
header.UpdateTime = DateTime.Now;
|
||||
header.UpdateBy = Wtm.LoginUserInfo.ITCode;
|
||||
_unitWork.Update(header);
|
||||
|
||||
var inv = _unitWork.FindSingle<Inventory>(x => x.UniqueCode.Equals(uniqueCode) && x.LocationCode == station);
|
||||
if (inv != null)
|
||||
@@ -203,7 +208,7 @@ public class ShipOutController : BaseController
|
||||
_unitWork.Update(Sation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Wtm.DoLog("", ActionLogTypesEnum.Normal, "mes", request: JsonConvert.SerializeObject(request), result: "success");
|
||||
tran.Commit();
|
||||
return JsonMore(null);
|
||||
@@ -253,7 +258,8 @@ public class ShipOutController : BaseController
|
||||
return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!");
|
||||
}
|
||||
//判断是否拣货完成
|
||||
if (_unitWork.IsExit<Inventory>(x => x.LocationCode.Equals(station.Code)))
|
||||
if (_unitWork.IsExit<Inventory>(x => x.LocationCode.Equals(station.Code)
|
||||
&& x.TaskStatus == InventoryTaskStatus.任务中))
|
||||
{
|
||||
return JsonMore(null, 500, $"站台{boxCode}存在未拣货物料,无法回库!");
|
||||
}
|
||||
|
||||
@@ -208,10 +208,19 @@
|
||||
&& _this.form.code.startsWith("C")) {
|
||||
_this.showBack = true;
|
||||
}
|
||||
_this.$refs['form'].resetFields();
|
||||
if (_this.form.code == "uniqueCode") {
|
||||
_this.form.code = "";
|
||||
}
|
||||
// 清空下面表单 不清空code
|
||||
_this.form.uniqueCode = "";
|
||||
_this.form.materialCode = "";
|
||||
_this.form.materialSpec = "";
|
||||
_this.form.batch = "";
|
||||
_this.form.qty = "";
|
||||
// _this.$refs['form'].resetFields();
|
||||
} else {
|
||||
_this.$message({
|
||||
message: "提交失败!",
|
||||
message: "提交失败!"+json.Msg,
|
||||
type: "warning",
|
||||
duration: "10000",
|
||||
});
|
||||
@@ -238,6 +247,14 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (_this.invTable.length > 0) {
|
||||
_this.$message({
|
||||
message: "存在未拣货库存,不能创建回库任务!",
|
||||
type: "error",
|
||||
duration: "1000",
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$confirm('确定执行回库动作?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
Reference in new issue
Block a user