From 068ffaaf6c3309b99b89c93b590902363833261c Mon Sep 17 00:00:00 2001
From: caill <815519168@qq.com>
Date: Tue, 30 Apr 2024 13:51:32 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96websocket?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/style/layout.css | 10 ++---
components/GridDetail.vue | 43 ++++++++++++++-----
components/NavBar.vue | 8 +---
pages/home/home.vue | 30 ++++++-------
.../home/{home的副本.vue => home_back.vue} | 28 ------------
pages/login/login.vue | 5 ++-
pages/management/in-storage.vue | 28 ++++++------
utils/getData2.js | 2 +-
8 files changed, 70 insertions(+), 84 deletions(-)
rename pages/home/{home的副本.vue => home_back.vue} (86%)
diff --git a/common/style/layout.css b/common/style/layout.css
index 6b2eb4e..b4ab1ce 100644
--- a/common/style/layout.css
+++ b/common/style/layout.css
@@ -114,7 +114,7 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
background: center / 100% 100% url(./static/images/bg-task-r1.png) no-repeat;
}
.grid-wrap{
- width: 100%;
+ width: calc(100% - 20px);
/* height: calc(100% - 145px); */
margin: 0 auto;
padding-top: 5px;
@@ -238,9 +238,9 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
align-items: center;
font-size: 12px;
line-height: 13px;
- height: 39px;
+ height: 49px;
color: #fff;
- /* padding: 0 5px; */
+ padding: 5px 2px;
text-align: center;
border-bottom: 1px solid #7A9FE0;
word-break: break-all;
@@ -252,10 +252,10 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
align-items: center;
font-size: 12px;
line-height: 13px;
- height: 52px;
+ height: 49px;
color: #fff;
background-color: rgba(194, 86, 62, 0.2);
- padding: 0 5px;
+ padding: 5px 2px;
text-align: center;
border-bottom: 1px solid #C2563E;
word-break: break-all;
diff --git a/components/GridDetail.vue b/components/GridDetail.vue
index 95d1a39..bd4ab4b 100644
--- a/components/GridDetail.vue
+++ b/components/GridDetail.vue
@@ -5,11 +5,11 @@
{{data.data.djbh}}
- | 发起部门 |
+ 来源部门 |
{{data.data.bmmc}} |
- | 去向 |
+ 去向部门 |
{{data.data.zzmc}} |
@@ -32,20 +32,36 @@
| 业务日期 |
{{data.data.ywrq}} |
-
- | 操作日期 |
- {{data.data.update_time}} |
-
| 操作人 |
{{data.data.update_name}} |
+
+ | 操作日期 |
+ {{data.data.update_time}} |
+
| 备注 |
{{data.data.remark}} |
+
+ | 单据ID |
+ {{data.data.djid}} |
+
+
+ | 分录ID |
+ {{data.data.flid}} |
+
+
+ | 来源部门 |
+ {{data.data.bmmc}} |
+
+
+ | 去向部门 |
+ {{data.data.zzmc}} |
+
| 仓库名称 |
{{data.data.ckmc}} |
@@ -58,6 +74,10 @@
物料名称 |
{{data.data.wlmc}} |
+
+ | 规格型号 |
+ {{data.data.ggxh}} |
+
| 单位 |
{{data.data.jldw}} |
@@ -82,14 +102,15 @@
库存 |
{{data.data.kcsl}} |
-
- | 操作日期 |
- {{data.data.update_time}} |
-
| 操作人 |
{{data.data.update_name}} |
+
+ | 操作日期 |
+ {{data.data.update_time}} |
+
+
| 备注 |
{{data.data.remark}} |
@@ -137,7 +158,7 @@
padding 30px 10px
transition: all .3s linear;
.modal
- background-color rgba(0,0,0,0.1)
+ background-color rgba(0,0,0,0.4)
.font1
font-size: 16px;
color: #000;
diff --git a/components/NavBar.vue b/components/NavBar.vue
index 508c37a..39ef8fe 100644
--- a/components/NavBar.vue
+++ b/components/NavBar.vue
@@ -34,15 +34,11 @@
} else if (this.inner2) {
this.$emit('goIn')
} else {
- uni.redirectTo({
- url: '/pages/home/home'
- })
+ uni.navigateBack()
}
},
backHome () {
- uni.redirectTo({
- url: '/pages/home/home'
- })
+ uni.navigateBack()
}
}
}
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 8a09e0b..5b6a7b6 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -32,12 +32,16 @@
data() {
return {
intervalId: null,
- interTime: this.$store.getters.setTime,
userName: this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : '',
menuList: []
};
},
- created () {
+ onLoad() {
+ // setTimeout(() => {
+ // uni.showLoading({
+ // title: '加载中...'
+ // })
+ // }, 200)
this._getBillsCount()
},
beforeDestroy () {
@@ -60,16 +64,8 @@
wsMessage (res) {
console.log(res)
clearTimeout(this.intervalId)
- let data = res.head
- this.$store.dispatch('materObj', res.home.result)
- if (data.code === '1') {
- this.menuList = [...data.result]
- } else {
- uni.showToast({
- title: data.desc,
- icon: 'none'
- })
- }
+ // uni.hideLoading()
+ this.menuList = [...res]
},
wsErr () {
this.intervalId = setTimeout(() => {
@@ -79,15 +75,15 @@
toPage (e) {
let url = ''
url = '/pages/management/in-storage?id=' + e.djlx + '&name=' + e.name + '&type=' + e.ywlx
- uni.redirectTo({
+ uni.navigateTo({
url: url
})
},
Quit () {
- this.$store.dispatch('delUserInfo', '')
- uni.redirectTo({
- url: '/pages/login/login'
- })
+ this.$store.dispatch('delUserInfo', '')
+ uni.redirectTo({
+ url: '/pages/login/login'
+ })
}
}
}
diff --git a/pages/home/home的副本.vue b/pages/home/home_back.vue
similarity index 86%
rename from pages/home/home的副本.vue
rename to pages/home/home_back.vue
index a30661d..4c34437 100644
--- a/pages/home/home的副本.vue
+++ b/pages/home/home_back.vue
@@ -28,7 +28,6 @@