调整了部分页面的查询条件
入库明细状态增加校验, 前端增加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'
|
||||
|
||||
Reference in new issue
Block a user