调整了部分页面的查询条件
入库明细状态增加校验, 前端增加loading,禁用按钮,空提交检测
This commit is contained in:
1 parent
40a6810713
commit
6897508f8d
26 files changed
+227
-106
No files matched your search
@@ -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