From 22140688f6aa6a15793b7505c527089c00c680ee Mon Sep 17 00:00:00 2001
From: 13208366016 <47278630@qq.com>
Date: Fri, 20 Oct 2023 20:00:41 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=B9=E7=AA=97=E4=B8=8D?=
=?UTF-8?q?=E5=85=B3=E9=97=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../LsystemsInventory/LsystemsInventory.vue | 34 ++++++++++++-------
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/src/views/distribution/LsystemsInventory/LsystemsInventory.vue b/src/views/distribution/LsystemsInventory/LsystemsInventory.vue
index 21dc0542..8211cc5a 100644
--- a/src/views/distribution/LsystemsInventory/LsystemsInventory.vue
+++ b/src/views/distribution/LsystemsInventory/LsystemsInventory.vue
@@ -76,7 +76,11 @@
:width="item.width"
:fixed="item.fixed"
align="center"
- />
+ >
+
+ {{ props.row[item.prop] ? props.row[item.prop] : '/' }}
+
+
@@ -96,7 +100,7 @@
? '同步中'
: props.row[item.prop] === 2
? '同步完成'
- : props.row[item.prop] === 2
+ : props.row[item.prop] === 2
? '同步异常'
: '/'
}}
@@ -457,7 +461,7 @@ const menuData = ref([
label: '仓库',
type: 1,
values: '',
- width: '260',
+ width: '280',
checkarr: [],
fixed: false,
sortable: true,
@@ -467,16 +471,16 @@ const menuData = ref([
// 获取表格数据
function onLoad() {
+ loading.value = true; //开启加载效果
// 获取表格数据API($_TableList)
$_SyncInventoryList({
pageNum: currentPage.value,
pageSize: pageSize.value,
- inventoryNo: AddForm.value.inventoryNo,
- // inventoryNo:123123
+ inventoryNo: AddForm.value.inventoryNo, //搜索字段(不必填写)
}).then(res => {
+ loading.value = false; //关闭加载效果
//表格信息
data.value = res.data.data.records;
- console.log(res, 'res');
});
}
// 同步老系统盘点数据列表接口
@@ -484,12 +488,15 @@ const Sub = () => {
onLoad();
};
+const TabHeig = () => {
+ TabHeight.value = TabHeight.value.offsetHeight - 91;
+ menuHeight.value = window.innerHeight - 136;
+};
+
// 动态获取DOM高度给表单防止页面出现滚动条
onMounted(() => {
//默认值88
- TabHeight.value = TabHeight.value.offsetHeight - 91;
- menuHeight.value = window.innerHeight - 136;
- console.log('元素的高度:', menuHeight.value);
+ TabHeig();
// 等待DOM高度被复制之后在请求数据,防止被数据撑开高度
onLoad();
});
@@ -502,20 +509,21 @@ const AddInfo = () => {
const PageSizeChange = val => {
pageSize.value = val;
onLoad();
- console.log('每一页', val, '条');
};
// 页码翻页触发
const SizeChange = val => {
currentPage.value = val;
onLoad();
- console.log('当前是第', val, '页');
};
// 表单信息提交
const submit = () => {
console.log(AddForm.value);
$_SyncInventorySubmit(AddForm.value).then(res => {
- console.log(res);
+ AddForm.value.inventoryNo = ''; //重置表单 重新请求列表
+ total.value = res.data.data.total; //页码
+ onLoad(); //重新渲染方法
+ AddLalog.value = false;
});
};
// 菜单触发功能
@@ -557,11 +565,13 @@ const ViewEvent = val => {
};
// 刷新功能触发事件
const refresh = () => {
+ onLoad();
// loading.value = !loading.value;
};
// 搜索展开功能
const search = () => {
searchSo.value = !searchSo.value;
+ TabHeig();
};
// 顶部搜索功能
const SoInput = () => {