|
@@ -5,7 +5,7 @@
|
|
@resert="getDataList" @detail="openEdit" @onRefresh="onRefresh">
|
|
@resert="getDataList" @detail="openEdit" @onRefresh="onRefresh">
|
|
</module-view>
|
|
</module-view>
|
|
<!-- 注册/编辑弹窗 -->
|
|
<!-- 注册/编辑弹窗 -->
|
|
- <el-dialog :title="popTitle+'仓库'" :visible.sync="dialogFormVisible" width="960px" height="450px">
|
|
|
|
|
|
+ <el-dialog :title="popTitle+'仓库'" :visible.sync="dialogFormVisible" width="960px" height="450px" v-loading="load">
|
|
<!-- <by-form :propConfig="addConfig" ref="addFormId"></by-form> -->
|
|
<!-- <by-form :propConfig="addConfig" ref="addFormId"></by-form> -->
|
|
<ruleForm ref='addFormId' @toCargoOwner="toCargoOwner"></ruleForm>
|
|
<ruleForm ref='addFormId' @toCargoOwner="toCargoOwner"></ruleForm>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -44,6 +44,7 @@
|
|
import Assembly from "@/components/Assembly/yesno.vue";
|
|
import Assembly from "@/components/Assembly/yesno.vue";
|
|
@Component({ components: { ruleForm } })
|
|
@Component({ components: { ruleForm } })
|
|
export default class Depots extends Vue {
|
|
export default class Depots extends Vue {
|
|
|
|
+ load:boolean = false;
|
|
isShow : any = 'ckb'
|
|
isShow : any = 'ckb'
|
|
timeNum = 0;
|
|
timeNum = 0;
|
|
timer : any = null
|
|
timer : any = null
|
|
@@ -347,7 +348,7 @@
|
|
address: [{
|
|
address: [{
|
|
required: true, message: '请输入详细地址', trigger: 'blur'
|
|
required: true, message: '请输入详细地址', trigger: 'blur'
|
|
}],
|
|
}],
|
|
- province: [{
|
|
|
|
|
|
+ street: [{
|
|
required: true, message: '请选择仓库地址', trigger: 'change'
|
|
required: true, message: '请选择仓库地址', trigger: 'change'
|
|
}],
|
|
}],
|
|
}
|
|
}
|
|
@@ -521,9 +522,11 @@
|
|
}
|
|
}
|
|
// console.log(query);
|
|
// console.log(query);
|
|
if (this.popTitle === '注册') {
|
|
if (this.popTitle === '注册') {
|
|
|
|
+ this.load = true;
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
api.saveList(query, 'maindataStorehouse').then((res : any) => {
|
|
api.saveList(query, 'maindataStorehouse').then((res : any) => {
|
|
loading.close();
|
|
loading.close();
|
|
|
|
+ this.load = false;
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.dialogFormVisible = false;
|
|
this.dialogFormVisible = false;
|
|
// this.$message.success(this.popTitle + '成功');
|
|
// this.$message.success(this.popTitle + '成功');
|
|
@@ -555,17 +558,25 @@
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
// });
|
|
// });
|
|
} else this.$message.error(res.msg)
|
|
} else this.$message.error(res.msg)
|
|
- }).catch(() => loading.close());
|
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.load = false;
|
|
|
|
+ loading.close()
|
|
|
|
+ });
|
|
} else if (this.popTitle === '编辑') {
|
|
} else if (this.popTitle === '编辑') {
|
|
|
|
+ this.load = true;
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
api.updateList(query, 'maindataStorehouse').then((res : any) => {
|
|
api.updateList(query, 'maindataStorehouse').then((res : any) => {
|
|
|
|
+ this.load = false;
|
|
loading.close();
|
|
loading.close();
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.dialogFormVisible = false;
|
|
this.dialogFormVisible = false;
|
|
this.$message.success(this.popTitle + '成功');
|
|
this.$message.success(this.popTitle + '成功');
|
|
this.getDataList();
|
|
this.getDataList();
|
|
} else this.$message.error(res.msg)
|
|
} else this.$message.error(res.msg)
|
|
- }).catch(() => loading.close());
|
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.load = false;
|
|
|
|
+ loading.close();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
}
|
|
}
|