库存回传新增flag
新增入库单明细,判断重复 出库页面修改 散料出库后回库按钮
This commit is contained in:
1 parent
0269655891
commit
c27a357771
7 files changed
+155
-104
No files matched your search
@@ -167,6 +167,16 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在重复的唯一码!");
|
||||
}
|
||||
|
||||
// 判断唯一码是否已在库内
|
||||
var reDetailList = _unitwork.Find<ReceiptDetail>(x => 1 == 1)
|
||||
.Select(x => x.UniqueCode)
|
||||
.ToList();
|
||||
if (reDetailList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在已添加的唯一码!");
|
||||
}
|
||||
|
||||
// 判断唯一码是否已在库内
|
||||
var invList = _unitwork.Find<Inventory>(x => 1 == 1)
|
||||
.Select(x => x.UniqueCode)
|
||||
|
||||
@@ -80,7 +80,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="primary" @@click="back">回库</el-button>
|
||||
<el-button type="success" @@click="back">回库</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@@ -127,33 +127,45 @@
|
||||
// 呼叫料箱
|
||||
callBox() {
|
||||
var _this = this;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {},
|
||||
url: "/receipt/ReceiptSLIn/CallBox",
|
||||
success: function (json) {
|
||||
if (json.Code == 200) {
|
||||
this.$confirm('确定要呼叫料盒出库?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {},
|
||||
url: "/receipt/ReceiptSLIn/CallBox",
|
||||
success: function (json) {
|
||||
if (json.Code == 200) {
|
||||
_this.$message({
|
||||
message: "呼叫成功!",
|
||||
});
|
||||
// _this.resetForm('form');
|
||||
} else {
|
||||
_this.$message({
|
||||
message: "呼叫失败!" + json.Msg,
|
||||
type: "warning",
|
||||
duration: "10000",
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
_this.$message({
|
||||
message: "呼叫成功!",
|
||||
});
|
||||
// _this.resetForm('form');
|
||||
} else {
|
||||
_this.$message({
|
||||
message: "呼叫失败!" + json.Msg,
|
||||
type: "warning",
|
||||
message: "呼叫失败!",
|
||||
type: "error",
|
||||
duration: "10000",
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
_this.$message({
|
||||
message: "呼叫失败!",
|
||||
type: "error",
|
||||
duration: "10000",
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消'
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
// 扫描散料箱
|
||||
scanBox(data) {
|
||||
@@ -312,7 +324,7 @@
|
||||
back() {
|
||||
var _this = this;
|
||||
// 创建回库任务
|
||||
if (_this.code == "") {
|
||||
if (_this.form.code == "") {
|
||||
_this.$message({
|
||||
message: "箱号为空,不能创建回库任务!",
|
||||
type: "error",
|
||||
@@ -320,32 +332,43 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: { boxCode: _this.form.code, isFull: _this.form.isFull },
|
||||
url: "/receipt/ReceiptSLIn/BoxBack",
|
||||
success: function (json) {
|
||||
if (json.Code != 200) {
|
||||
this.$confirm('确定执行回库动作?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: { boxCode: _this.form.code, isFull: _this.form.isFull },
|
||||
url: "/receipt/ReceiptSLIn/BoxBack",
|
||||
success: function (json) {
|
||||
if (json.Code != 200) {
|
||||
_this.$message({
|
||||
message: "回库任务创建失败!" + json.Msg,
|
||||
type: "warning",
|
||||
duration: "10000",
|
||||
});
|
||||
} else {
|
||||
_this.$message({
|
||||
message: "回库任务创建成功!"
|
||||
});
|
||||
_this.resetForm('form');
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
_this.$message({
|
||||
message: "回库任务创建失败!" + json.Msg,
|
||||
type: "warning",
|
||||
message: "回库任务创建失败!",
|
||||
type: "error",
|
||||
duration: "10000",
|
||||
});
|
||||
} else {
|
||||
_this.$message({
|
||||
message: "回库任务创建成功!"
|
||||
});
|
||||
_this.resetForm('form');
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
_this.$message({
|
||||
message: "回库任务创建失败!",
|
||||
type: "error",
|
||||
duration: "10000",
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消'
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user