更新bug
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
|
||||
<!-- 列表 -->
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
@@ -49,13 +48,11 @@ import AddOrUpdate from './add-or-updata';
|
||||
import basicPage from '@/mixins/basic-page';
|
||||
import codeFilter from '@/mixins/code-filter';
|
||||
import {
|
||||
deleteWarehouseArea,
|
||||
getWarehouseAreaPage,
|
||||
getWarehouseAreaListAll
|
||||
} from "@/api/warehouse/warehouse-area-setup";
|
||||
import {
|
||||
getWarehouseList
|
||||
} from "@/api/warehouse/warehouse-setup";
|
||||
deleteWarehouseArea,
|
||||
getWarehouseAreaPage,
|
||||
getWarehouseAreaListAll,
|
||||
} from '@/api/warehouse/warehouse-area-setup';
|
||||
import { getWarehouseList } from '@/api/warehouse/warehouse-setup';
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
|
||||
const tableProps = [
|
||||
@@ -79,7 +76,7 @@ const tableProps = [
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage,tableHeightMixin],
|
||||
mixins: [basicPage, tableHeightMixin],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
@@ -94,13 +91,13 @@ export default {
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`warehouse:warehouse-area-setup:delete`)
|
||||
this.$auth.hasPermi(`warehouse:warehouse-area-setup:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v)=>v),
|
||||
].filter((v) => v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
@@ -129,7 +126,9 @@ export default {
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('warehouse:warehouse-area-setup:create') ? 'button' : '',
|
||||
type: this.$auth.hasPermi('warehouse:warehouse-area-setup:create')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
@@ -148,7 +147,7 @@ export default {
|
||||
getWarehouseAreaListAll().then((response) => {
|
||||
this.formConfig[1].selectOptions = response.data;
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
@@ -180,6 +179,22 @@ export default {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
getWarehouseAreaListAll().then((response) => { //刷新搜索框库区
|
||||
this.formConfig[1].selectOptions = response.data;
|
||||
});
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
if (response.hasOwnProperty('data')) {
|
||||
this.tableData = response.data.list;
|
||||
this.listQuery.total = response.data.total;
|
||||
} else {
|
||||
this.tableData = []
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user