CTP 2 years ago
commit 2e8c0618e6

@ -52,11 +52,11 @@
</el-form>
<el-table
v-loading="loading"
ref="list"
:data="list"
style="width: 100%"
highlight-current-row
border
ref="deptTableRef"
v-if="refreshTable"
row-key="id"
@current-change="handleDeptChange"
@ -356,6 +356,7 @@ import { filterSubAll } from "@/api/system/invSubWarehouse";
export default {
data() {
return {
checkdefault: null,
filterQuery: {
status: 1,
companyName: "",
@ -575,15 +576,26 @@ export default {
let depList = response.data.list || [];
this.deptOptions = this.handleTree(depList, "code", "pcode");
});
console.log(JSON.parse(JSON.stringify(row)));
this.checkdefault = JSON.parse(JSON.stringify(row));
},
/* 获取列表 */
getList() {
let qwe = this.checkdefault;
this.loading = true;
filterList(this.filterQuery)
.then((response) => {
this.loading = false;
let depList = response.data.list || [];
this.list = this.handleTree(depList, "code", "pcode");
this.$nextTick(() => {
console.log(qwe);
if (qwe === null) {
this.$refs.deptTableRef.setCurrentRow(depList[0]);
} else {
this.$refs.deptTableRef.setCurrentRow(qwe);
}
});
})
.catch(() => {
this.loading = false;

@ -186,6 +186,8 @@ export default {
} else {
callback();
}
}else{
callback();
}
};
return {

Loading…
Cancel
Save