|
@@ -9,7 +9,7 @@
|
|
|
<!-- <by-form :propConfig="addConfig" ref="addFormId"></by-form> -->
|
|
|
<ruleForm ref='addFormId' @toCargoOwner="toCargoOwner"></ruleForm>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
+ <el-button @click="close">取 消</el-button>
|
|
|
<el-button type="primary" @click="confirm">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -493,7 +493,12 @@
|
|
|
this.getDataList()
|
|
|
}, 500)
|
|
|
}
|
|
|
-
|
|
|
+ close(){
|
|
|
+ (this as any).$refs.addFormId.clearValue();
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+ },0)
|
|
|
+ }
|
|
|
// 跳转货主管理
|
|
|
toCargoOwner(){
|
|
|
this.dialogFormVisible = false;
|
|
@@ -505,12 +510,12 @@
|
|
|
(this.$refs.addFormId as any).validate().then(()=>{
|
|
|
let query = (this as any).$refs.addFormId.getValue();
|
|
|
// console.log(query);
|
|
|
- this.dialogFormVisible = false;
|
|
|
if (this.popTitle === '注册') {
|
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
|
api.saveList(query, 'maindataStorehouse').then((res : any) => {
|
|
|
loading.close();
|
|
|
if (res.code === 200) {
|
|
|
+ this.dialogFormVisible = false;
|
|
|
this.$message.success(this.popTitle + '成功');
|
|
|
this.getDataList();
|
|
|
this.$confirm('是否注册仓位', '提示', {
|
|
@@ -545,6 +550,7 @@
|
|
|
api.updateList(query, 'maindataStorehouse').then((res : any) => {
|
|
|
loading.close();
|
|
|
if (res.code === 200) {
|
|
|
+ this.dialogFormVisible = false;
|
|
|
this.$message.success(this.popTitle + '成功');
|
|
|
this.getDataList();
|
|
|
} else this.$message.error(res.msg)
|
|
@@ -559,12 +565,12 @@
|
|
|
let query = (this as any).$refs.addFormId2.getValue();
|
|
|
query.storehouseId = this.tableData.id;
|
|
|
query.idDelete = 0;
|
|
|
- this.dialogFormVisible2 = false;
|
|
|
if (this.popTitle === '注册') {
|
|
|
let loading = this.$loading({ target: '.main-container' });
|
|
|
api.saveList(query, 'maindataStoringLocation').then((res : any) => {
|
|
|
loading.close();
|
|
|
if (res.code === 200) {
|
|
|
+ this.dialogFormVisible2 = false;
|
|
|
this.$message.success(this.popTitle + '成功');
|
|
|
this.getOneself(query.storehouseId);
|
|
|
} else this.$message.error(res.msg)
|
|
@@ -574,6 +580,7 @@
|
|
|
api.updateList(query, 'maindataStoringLocation').then((res : any) => {
|
|
|
loading.close();
|
|
|
if (res.code === 200) {
|
|
|
+ this.dialogFormVisible2 = false;
|
|
|
this.$message.success(this.popTitle + '成功');
|
|
|
this.getOneself(query.storehouseId);
|
|
|
} else this.$message.error(res.msg)
|