|
@@ -204,7 +204,7 @@
|
|
|
</div>
|
|
|
<div class="button-box">
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
- <el-button type="primary" :disabled="disable" @click="makeSure"
|
|
|
+ <el-button type="primary" :loading="isLoading" @click="makeSure"
|
|
|
>确定</el-button
|
|
|
>
|
|
|
</div>
|
|
@@ -256,7 +256,7 @@ export default {
|
|
|
components: { PageTitle },
|
|
|
data() {
|
|
|
return {
|
|
|
- disable: false,
|
|
|
+ isLoading: false,
|
|
|
list: [],
|
|
|
form1: {},
|
|
|
tableData: [],
|
|
@@ -523,7 +523,7 @@ export default {
|
|
|
},
|
|
|
// 确定
|
|
|
makeSure() {
|
|
|
- this.disable = true;
|
|
|
+ this.isLoading = true;
|
|
|
let state = 0;
|
|
|
if (
|
|
|
this.list.length > 0 &&
|
|
@@ -538,7 +538,7 @@ export default {
|
|
|
) {
|
|
|
state = 1;
|
|
|
} else {
|
|
|
- this.disable = false;
|
|
|
+ this.isLoading = false;
|
|
|
console.log(this.list.length);
|
|
|
if (this.list.length == 0) {
|
|
|
this.$message({
|
|
@@ -627,7 +627,7 @@ export default {
|
|
|
});
|
|
|
if(!flag){
|
|
|
this.$message.warning("拼装车的标重不存在!");
|
|
|
- this.disable = false;
|
|
|
+ this.isLoading = false;
|
|
|
return ;
|
|
|
}
|
|
|
}
|
|
@@ -640,19 +640,18 @@ export default {
|
|
|
type: "success",
|
|
|
message: "新增成功"
|
|
|
});
|
|
|
- this.disable = false;
|
|
|
this.cancel();
|
|
|
} else {
|
|
|
- this.disable = false;
|
|
|
this.$message({
|
|
|
type: "error",
|
|
|
message: res.data.data
|
|
|
});
|
|
|
}
|
|
|
+ this.isLoading = false;
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.$message.error("请联系管理员");
|
|
|
- this.disable = false;
|
|
|
+ this.isLoading = false;
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -690,7 +689,7 @@ export default {
|
|
|
if (rows.length > 0) {
|
|
|
that.list = [];
|
|
|
that.tableData = [];
|
|
|
- that.disable = false;
|
|
|
+ that.isLoading = false;
|
|
|
if (typeof rows[0]["车皮号"] == "undefined") {
|
|
|
that.$message({
|
|
|
message: "车皮号不存在!请参考下方格式!",
|