From 92c9cc0b1b15a08699739db47797345b6abca3c5 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期六, 12 十月 2024 10:39:10 +0800
Subject: [PATCH] #
---
Monitor-APP/pages/index/data.json | 166 +++++++++++++++++++++++++++++++++++++++++
Monitor-APP/pages/home/home.vue | 73 +++++++-----------
2 files changed, 194 insertions(+), 45 deletions(-)
diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue
index 456d233..5e1bc2c 100644
--- a/Monitor-APP/pages/home/home.vue
+++ b/Monitor-APP/pages/home/home.vue
@@ -191,8 +191,8 @@
<view class="button-right" @click="ejected()"></view>
<!-- 涓讳綋 -->
<view class="info-main">
- <view class="info-box">
- <y-box>
+ <view class="info-box" style="display: flex;">
+ <y-box v-for="item in infoText">
<!-- 鏂囨湰瀹瑰櫒 -->
<view class="text-content">
<!-- head -->
@@ -309,7 +309,7 @@
<view class="board">
<uni-transition ref="ani" custom-class="transition" :mode-class="newModeClass" :show="errorBoardShow">
<view class="error-board">
- <text v-for="item in carInfo">{{item}}</text>
+ <text>{{infoText.error}}</text>
</view>
</uni-transition>
</view>
@@ -394,7 +394,7 @@
error: null,
infoType: 0,
text: '',
- infoText: {
+ infoText: [{
title: '鑷姩浠撳簱WCS鐩戞帶骞冲彴',
title2: '',
staNo: "",
@@ -411,7 +411,7 @@
doneOfUnit: '',
totalOfUnit: '',
ctnNo: '1'
- },
+ }],
swiperList: [],
timeOut: false,
times: 0,
@@ -540,12 +540,12 @@
this.getServerData()
this.getDate2()
this.getUrl()
- this.getInfo()
- this.getError()
- this.getCarInfo()
+ // this.getInfo()
+ // this.getError()
+ // this.getCarInfo()
// this.getCarInfoTest()
- // this.getInfo2()
- // this.getError2()
+ this.getInfo2()
+ this.getError2()
this.controller()
}, 1000)
@@ -690,22 +690,12 @@
let that = this
let result = ycqdata.dataError2
var res = result.data
- if (res.data && res.data !== "") {
- var errorInfo = res.data
- if (that.infoType == 1) {
- that.infoType = 3
- that.infoText.title = "寮傚父"
- that.infoText.error = errorInfo
- return
- }
- that.infoType = 2
- that.infoText.title = "寮傚父"
- that.infoText.error = errorInfo
+ if (res.code == 200 && res.data != '') {
+ that.infoText.title = "鍏朵粬淇℃伅"
+ that.infoText.error = res.data
+ this.errorBoardShow = true
} else {
- if (that.infoType == 1) {
- return
- }
- that.infoType = 0
+ this.errorBoardShow = false
}
},
getInfo() {
@@ -759,32 +749,26 @@
},
infoModel(res) {
let that = this
+
if (res.data && res.data !== "") {
if (that.infoType == 2 || that.infoType == 3) {
return;
}
// infoType1:鍙湁鎷f枡绛変俊鎭�
that.infoType = 1
- if (res.data[0].ioType === 101) {
- that.infoText.title = '鍏ㄦ澘鍑哄簱'
- that.infoText.title2 = '鍏ㄦ澘鍑哄簱'
- } else if (res.data[0].ioType === 103) {
- that.infoText.title = '鎷f枡鍑哄簱'
- that.infoText.title2 = '鎷f枡鍑哄簱'
- } else if (res.data[0].ioType === 107) {
- that.infoText.title = '鐩樼偣鍑哄簱'
- that.infoText.title2 = '鐩樼偣鍑哄簱'
- }
- res.data[0].matDtos
- for (let k in res.data[0].matDtos) {
-
- if (res.data[0].matDtos[k].count == 0) {
- res.data[0].matDtos[k]['color'] = 'color: #df741c'
+ that.infoText.title = '绔欑偣鍑哄簱'
+ that.infoText = res.data
+ for (let info of res.data) {
+ console.log(info);
+ res.data[0].matDtos
+ for (let k in res.data[0].matDtos) {
+
}
+ that.infoText.staNo = res.data[0].staNo
+ that.infoText.barcode = res.data[0].barcode
+ that.swiperList = res.data[0].matDtos
}
- that.infoText.staNo = res.data[0].staNo
- that.infoText.barcode = res.data[0].barcode
- that.swiperList = res.data[0].matDtos
+
} else {
if (that.infoType == 2 || that.infoType == 3) {
return;
@@ -1492,7 +1476,8 @@
.error-board {
margin: .2rem;
- height: 11vh;
+ padding: .2rem;
+ /* height: 11vh; */
background-color: #F56C6C;
box-shadow: rgba(0, 0, 0, .35) 0px 5px 15px;
border-radius: .2rem;
diff --git a/Monitor-APP/pages/index/data.json b/Monitor-APP/pages/index/data.json
index ff6f8c1..d3027de 100644
--- a/Monitor-APP/pages/index/data.json
+++ b/Monitor-APP/pages/index/data.json
@@ -5,7 +5,7 @@
"code": 200,
"data": [{
"title": "鍏ㄦ澘鍑哄簱",
- "workNo": 8046,
+ "workNo": 1111,
"staNo": 204,
"sourceStaNo": null,
"locNo": null,
@@ -166,6 +166,170 @@
],
"emptyMk": false,
"ioType": 101
+ },
+ {
+ "title": "鍏ㄦ澘鍑哄簱",
+ "workNo": 8046,
+ "staNo": 204,
+ "sourceStaNo": null,
+ "locNo": null,
+ "sourceLocNo": "1500502",
+ "barcode": "80009901",
+ "matDtos": [{
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "23129502652,23129502651,23129502652,23129502652"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ },
+ {
+ "matNo": "230309103100005",
+ "maknx": "瀹氬瓙绾垮湀",
+ "batch": null,
+ "count": 40.0,
+ "specs": "RV-E075/100-蠁22閿�8瀛旀繁46閿敭閿敭閿敭",
+ "total": 1055,
+ "containerCode": 1000000268,
+ "orderNo": "1699507854268"
+ }
+
+
+ ],
+ "emptyMk": false,
+ "ioType": 101
}]
}
},
--
Gitblit v1.9.1