调整了部分页面的查询条件
入库明细状态增加校验, 前端增加loading,禁用按钮,空提交检测
This commit is contained in:
1 parent
40a6810713
commit
6897508f8d
26 files changed
+227
-106
No files matched your search
@@ -66,7 +66,7 @@
|
||||
<el-table-column label="料盘尺寸" align="center" prop="size" :formatter="sizeFormatter"></el-table-column>
|
||||
</el-table>
|
||||
<el-form-item style="float:right">
|
||||
<el-button type="primary" @@click="onSubmit">绑定入库</el-button>
|
||||
<el-button type="primary" @@click="onSubmit" :disabled="disabledButton">绑定入库</el-button>
|
||||
<el-button @@click="resetForm('form')">重置</el-button>
|
||||
@* <el-button type="primary" @@click="inOperation">启动入库</el-button> *@
|
||||
</el-form-item>
|
||||
@@ -107,7 +107,8 @@
|
||||
boxCode: [
|
||||
{ validator: validatePass, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
},
|
||||
disabledButton : false
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
@@ -132,7 +133,16 @@
|
||||
//绑定单据
|
||||
onSubmit() {
|
||||
var _this = this;
|
||||
|
||||
if (_this.bindingData.length == 0){
|
||||
_this.$message({
|
||||
message: "待入库清单为空!",
|
||||
type: "warning",
|
||||
duration: "10000",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
var loadIndex = layer.load(1);
|
||||
_this.disabledButton = true;
|
||||
// 提交已绑定数据
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -140,6 +150,8 @@
|
||||
data: { data: _this.bindingData },
|
||||
url: "/receipt/ReceiptIn/BindingData",
|
||||
success: function (json) {
|
||||
layer.close(loadIndex);
|
||||
_this.disabledButton = false;
|
||||
if (json.Code == 200) {
|
||||
_this.$message({
|
||||
message: '入库成功!',
|
||||
@@ -149,12 +161,14 @@
|
||||
}
|
||||
else {
|
||||
_this.$message({
|
||||
message: '入库失败!',
|
||||
message: '入库失败!'+json.Msg,
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
layer.close(loadIndex);
|
||||
_this.disabledButton = false;
|
||||
_this.$message({
|
||||
message: '入库失败!',
|
||||
type: 'error'
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" @@click="onSubmit">绑定</el-button>
|
||||
<el-button type="primary" @@click="onSubmit" :disabled="disabledButton">绑定</el-button>
|
||||
<el-button @@click="resetForm('form')">重置</el-button>
|
||||
<el-button type="success" @@click="back" :disabled="disabledbackbutton">回库</el-button>
|
||||
</el-form-item>
|
||||
@@ -102,6 +102,7 @@
|
||||
uniqueCode: "",
|
||||
isFull: false
|
||||
},
|
||||
disabledButton : false,
|
||||
disabledbackbutton: true,// true不可回库,false可回库
|
||||
boxSize: [
|
||||
{ label: "8mm", value: "8" },
|
||||
@@ -223,7 +224,16 @@
|
||||
// 绑定
|
||||
onSubmit() {
|
||||
var _this = this;
|
||||
|
||||
if (_this.bindingData.length == 0){
|
||||
_this.$message({
|
||||
message: "待入库清单为空!",
|
||||
type: "warning",
|
||||
duration: "10000",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
var loadIndex = layer.load(1);
|
||||
_this.disabledButton = true;
|
||||
// 提交已绑定数据
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -231,6 +241,8 @@
|
||||
data: { data: _this.bindingData },
|
||||
url: "/receipt/ReceiptSLIn/BindingData",
|
||||
success: function (json) {
|
||||
layer.close(loadIndex);
|
||||
_this.disabledButton = false;
|
||||
if (json.Code == 200) {
|
||||
_this.$message({
|
||||
message: "绑定成功!",
|
||||
@@ -249,6 +261,8 @@
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
layer.close(loadIndex);
|
||||
_this.disabledButton = false;
|
||||
_this.$message({
|
||||
message: "绑定失败!",
|
||||
type: "error",
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" @@click="onSubmit">入库</el-button>
|
||||
<el-button type="primary" @@click="onSubmit" :disabled="disabledButton">入库</el-button>
|
||||
<el-button @@click="resetForm('form')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -74,7 +74,8 @@
|
||||
uniqueCode: "",
|
||||
locationCode: ""
|
||||
},
|
||||
bindingData: []
|
||||
bindingData: [],
|
||||
disabledButton : false
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
@@ -97,7 +98,16 @@
|
||||
// 绑定
|
||||
onSubmit() {
|
||||
var _this = this;
|
||||
|
||||
if (_this.bindingData.length == 0){
|
||||
_this.$message({
|
||||
message: "待入库清单为空!",
|
||||
type: "warning",
|
||||
duration: "10000",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
var loadIndex = layer.load(1);
|
||||
_this.disabledButton = true;
|
||||
// 提交已绑定数据
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -105,6 +115,8 @@
|
||||
data: { data: _this.bindingData },
|
||||
url: "/receipt/ReceiptShelfIn/BindingData",
|
||||
success: function (json) {
|
||||
layer.close(loadIndex);
|
||||
_this.disabledButton = false;
|
||||
if (json.Code == 200) {
|
||||
_this.$message({
|
||||
message: "入库成功!",
|
||||
@@ -112,13 +124,15 @@
|
||||
_this.bindingData = [];
|
||||
} else {
|
||||
_this.$message({
|
||||
message: "入库失败!",
|
||||
message: "入库失败!"+json.Msg,
|
||||
type: "warning",
|
||||
duration: "10000",
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
layer.close(loadIndex);
|
||||
_this.disabledButton = false;
|
||||
_this.$message({
|
||||
message: "入库失败!",
|
||||
type: "error",
|
||||
@@ -135,7 +149,14 @@
|
||||
// 扫描唯一码
|
||||
scanUniqueCode(data) {
|
||||
var _this = this;
|
||||
|
||||
if (_this.form.locationCode == ""){
|
||||
_this.$message({
|
||||
message: "位置不能为空!",
|
||||
type: "warning",
|
||||
duration: "1000",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
//1. 判断唯一码是否合理,调用后台,并返回唯一码对应的数量
|
||||
var isExit = this.bindingData.findIndex(function (value) {
|
||||
return value.uniqueCode == data;
|
||||
|
||||
Reference in new issue
Block a user