From f28869a9a04fb8100d1dd2036968baff632a8ab2 Mon Sep 17 00:00:00 2001 From: 13208366016 <47278630@qq.com> Date: Fri, 20 Oct 2023 20:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B5=E7=A0=81.=E5=BC=B9?= =?UTF-8?q?=E7=AA=97bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LsystemsInventory/LsystemsInventory.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/views/distribution/LsystemsInventory/LsystemsInventory.vue b/src/views/distribution/LsystemsInventory/LsystemsInventory.vue index 8211cc5a..ec9d8863 100644 --- a/src/views/distribution/LsystemsInventory/LsystemsInventory.vue +++ b/src/views/distribution/LsystemsInventory/LsystemsInventory.vue @@ -7,7 +7,7 @@
- +
@@ -323,10 +323,11 @@ const data = ref([]); // 表格数据 const TabHeight = ref(); //动态获取表格高度 const AddLalog = ref(false); //提交弹窗 const AddForm = ref({}); //表单所有信息 +const AddData = ref({}); //获取数据列表 const tableRef = ref(null); // 用于引用 table 实例 const menu = ref(false); //功能菜单列表 const menuHeight = ref(); //右侧菜单栏高度,用于固定表头 -const total = ref(100); //页码总数 +const total = ref(null); //页码总数 const checkList = ref<(string | number)[]>([]); //隐藏 const flexList = ref<(string | number)[]>([]); //冻结 const loading = ref(false); //刷新功能 @@ -468,7 +469,6 @@ const menuData = ref([ head: true, }, ]); - // 获取表格数据 function onLoad() { loading.value = true; //开启加载效果 @@ -476,10 +476,12 @@ function onLoad() { $_SyncInventoryList({ pageNum: currentPage.value, pageSize: pageSize.value, - inventoryNo: AddForm.value.inventoryNo, //搜索字段(不必填写) + inventoryNo: AddData.value.inventoryNo, //搜索字段(不必填写) }).then(res => { loading.value = false; //关闭加载效果 //表格信息 + console.log(res, 'res=====>'); + total.value = res.data.data.total; data.value = res.data.data.records; }); } @@ -519,11 +521,12 @@ const SizeChange = val => { // 表单信息提交 const submit = () => { console.log(AddForm.value); + AddLalog.value = false; $_SyncInventorySubmit(AddForm.value).then(res => { + console.log(res, 'res=======>>>>'); AddForm.value.inventoryNo = ''; //重置表单 重新请求列表 - total.value = res.data.data.total; //页码 + onLoad(); //重新渲染方法 - AddLalog.value = false; }); }; // 菜单触发功能 @@ -571,7 +574,7 @@ const refresh = () => { // 搜索展开功能 const search = () => { searchSo.value = !searchSo.value; - TabHeig(); + TabHeig(); }; // 顶部搜索功能 const SoInput = () => { @@ -579,7 +582,7 @@ const SoInput = () => { }; // 顶部清空搜索 const SoEmpty = () => { - AddForm.value.inventoryNo = ''; + AddData.value.inventoryNo = ''; onLoad(); };